AI-native design editor. Open-source Figma alternative.
docs: refresh SceneGraph package references
Danila Poyarkoveff17dec094c
diff --git a/AGENTS.md b/AGENTS.mdindex 4b793088c..035f3ad3c 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -18,7 +18,7 @@ Bun workspace packages:- `packages/vue` — `@open-pencil/vue`: headless Vue 3 SDK (Reka UI-style) for building custom OpenPencil-powered editor shells and embedded editing surfaces. Renderless components and composables. The app is one consumer of the SDK.-The root app (`src/`) is the Tauri/Vite desktop editor. App-specific editor, document, AI, collaboration, shell, tabs, demo, and automation code lives under `src/app/*`. The app consumes `@open-pencil/core` through targeted core subpath exports and `@open-pencil/vue` through the public Vue SDK entrypoint.+The root app (`src/`) is the Tauri/Vite desktop editor. App-specific editor, document, AI, collaboration, shell, tabs, demo, and automation code lives under `src/app/*`. The app consumes scene graph primitives from `@open-pencil/scene-graph`, editor/rendering services through targeted `@open-pencil/core` subpath exports, and `@open-pencil/vue` through the public Vue SDK entrypoint.### Core subpath exports@@ -26,8 +26,8 @@ The root app (`src/`) is the Tauri/Vite desktop editor. App-specific editor, doc| Subpath | What | Heavy dep isolated ||---|---|---|-| `@open-pencil/core` | everything (barrel) | all |-| `@open-pencil/core/scene-graph` | SceneGraph, node types, hit-test, copy, snap, undo | — |+| `@open-pencil/core` | editor/rendering engine barrel | all core subsystems |+| `@open-pencil/scene-graph` | SceneGraph, node types, hit-test, copy, snap, undo | — || `@open-pencil/core/color` | parseColor, colorToHex, color management, OkHCL | culori || `@open-pencil/core/text` | fonts, text editor, style runs, direction | — || `@open-pencil/core/vector` | vector network encode/decode, bezier math | — |@@ -280,9 +280,9 @@ Use `scripts/` only for tiny compatibility entrypoint shims that import `../tool- No `any` — use proper types, generics, declaration merging- No `!` non-null assertions — use guards, `?.`, `??`- No `Math.random()` — use `crypto.getRandomValues()` everywhere-- No inline type definitions when a named type exists — use `Color` not `{ r: number; g: number; b: number; a: number }`, use `Vector` not `{ x: number; y: number }`, use `SceneNode` / `Effect` / `Fill` / `Stroke` from `@open-pencil/core/scene-graph` instead of re-spelling their shapes inline+- No inline type definitions when a named type exists — use `Color` not `{ r: number; g: number; b: number; a: number }`, use `Vector` not `{ x: number; y: number }`, use `SceneNode` / `Effect` / `Fill` / `Stroke` from `@open-pencil/scene-graph` instead of re-spelling their shapes inline- Shared types (GUID, Color, Vector, Matrix, Rect) live in `packages/core/src/types.ts`-- Domain types (SceneNode, Fill, Stroke, Effect, BlendMode, etc.) live in `packages/core/src/scene-graph/` and are exported from `@open-pencil/core/scene-graph`+- Domain types (SceneNode, Fill, Stroke, Effect, BlendMode, etc.) live in `packages/scene-graph/src/` and are exported from `@open-pencil/scene-graph`- Window API extensions (showOpenFilePicker, queryLocalFonts) live in `src/global.d.ts` and `packages/core/src/global.d.ts`- Use `culori` for color conversions — don't reimplement parseColor/colorToRgba- Use `@vueuse/core` hooks — prefer higher-level composables (`useBreakpoints`, `useEventListener`, `onClickOutside`, etc.) over raw APIs (`useMediaQuery`, manual `addEventListener`)diff --git a/lint/plugin.js b/lint/plugin.jsindex 5a87367a7..df60a580d 100644--- a/lint/plugin.js+++ b/lint/plugin.js@@ -1807,7 +1807,7 @@ const noLocalJsonObjectAliases = {if (!isRecordStringUnknownType(node.typeAnnotation)) returncontext.report({node,- message: 'Import JsonObject from @open-pencil/core/types instead of declaring a local alias.'+ message: 'Import JsonObject from @open-pencil/scene-graph/primitives instead of declaring a local alias.'})}}diff --git a/packages/docs/development/testing.md b/packages/docs/development/testing.mdindex 64867da9f..d4c754252 100644--- a/packages/docs/development/testing.md+++ b/packages/docs/development/testing.md@@ -58,7 +58,7 @@ Tests cover:```typescriptimport { describe, expect, it } from 'bun:test'-import { SceneGraph } from '@open-pencil/core/scene-graph'+import { SceneGraph } from '@open-pencil/scene-graph'describe('SceneGraph', () => {it('creates and retrieves a node', () => {diff --git a/packages/docs/ru/development/testing.md b/packages/docs/ru/development/testing.mdindex 80c33f04d..673b321e3 100644--- a/packages/docs/ru/development/testing.md+++ b/packages/docs/ru/development/testing.md@@ -58,7 +58,7 @@ bun run test:unit```typescriptimport { describe, expect, it } from 'bun:test'-import { SceneGraph } from '@open-pencil/core/scene-graph'+import { SceneGraph } from '@open-pencil/scene-graph'describe('SceneGraph', () => {it('creates and retrieves a node', () => {diff --git a/tools/i18n/src/check-locales.ts b/tools/i18n/src/check-locales.tsindex 09cd2ca38..81574447d 100644--- a/tools/i18n/src/check-locales.ts+++ b/tools/i18n/src/check-locales.ts@@ -2,7 +2,7 @@import { readFileSync, readdirSync } from 'node:fs'import { join } from 'node:path'-import type { JsonObject } from '@open-pencil/core/types'+import type { JsonObject } from '@open-pencil/scene-graph/primitives'const MESSAGES_PATH = 'packages/vue/src/i18n/messages.ts'const LOCALES_DIR = 'packages/vue/src/locales'