2026-02-28 22:03:07 +00:00
|
|
|
{
|
|
|
|
|
"name": "@open-pencil/core",
|
2026-04-22 17:31:33 +00:00
|
|
|
"version": "0.11.7",
|
2026-03-02 05:31:54 +00:00
|
|
|
"license": "MIT",
|
2026-02-28 22:03:07 +00:00
|
|
|
"type": "module",
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
"sideEffects": false,
|
2026-02-28 22:03:07 +00:00
|
|
|
"exports": {
|
2026-02-28 22:24:54 +00:00
|
|
|
".": {
|
2026-03-02 12:02:43 +00:00
|
|
|
"types": "./src/index.ts",
|
2026-03-04 11:51:44 +00:00
|
|
|
"bun": "./src/index.ts",
|
2026-03-02 12:03:40 +00:00
|
|
|
"default": "./src/index.ts"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
|
|
|
|
"./scene-graph": {
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"types": "./src/scene-graph/index.ts",
|
|
|
|
|
"bun": "./src/scene-graph/index.ts",
|
|
|
|
|
"default": "./src/scene-graph/index.ts"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./color": {
|
|
|
|
|
"types": "./src/color/index.ts",
|
|
|
|
|
"bun": "./src/color/index.ts",
|
|
|
|
|
"default": "./src/color/index.ts"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./text": {
|
|
|
|
|
"types": "./src/text/index.ts",
|
|
|
|
|
"bun": "./src/text/index.ts",
|
|
|
|
|
"default": "./src/text/index.ts"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./vector": {
|
|
|
|
|
"types": "./src/vector/index.ts",
|
|
|
|
|
"bun": "./src/vector/index.ts",
|
|
|
|
|
"default": "./src/vector/index.ts"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./figma-api": {
|
|
|
|
|
"types": "./src/figma-api/index.ts",
|
|
|
|
|
"bun": "./src/figma-api/index.ts",
|
|
|
|
|
"default": "./src/figma-api/index.ts"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./icons": {
|
|
|
|
|
"types": "./src/icons/index.ts",
|
|
|
|
|
"bun": "./src/icons/index.ts",
|
|
|
|
|
"default": "./src/icons/index.ts"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./canvas": {
|
|
|
|
|
"types": "./src/canvas/index.ts",
|
|
|
|
|
"bun": "./src/canvas/index.ts",
|
|
|
|
|
"default": "./src/canvas/index.ts"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./design-jsx": {
|
|
|
|
|
"types": "./src/design-jsx/index.ts",
|
|
|
|
|
"bun": "./src/design-jsx/index.ts",
|
|
|
|
|
"default": "./src/design-jsx/index.ts"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./editor": {
|
|
|
|
|
"types": "./src/editor/index.ts",
|
|
|
|
|
"bun": "./src/editor/index.ts",
|
|
|
|
|
"default": "./src/editor/index.ts"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./tools": {
|
|
|
|
|
"types": "./src/tools/index.ts",
|
|
|
|
|
"bun": "./src/tools/index.ts",
|
|
|
|
|
"default": "./src/tools/index.ts"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
|
|
|
|
"./profiler": {
|
|
|
|
|
"types": "./src/profiler/index.ts",
|
|
|
|
|
"bun": "./src/profiler/index.ts",
|
|
|
|
|
"default": "./src/profiler/index.ts"
|
Extract createEditor() to packages/core/src/editor/ folder
Split the 2505-line god store into 13 domain modules sharing an
EditorContext interface:
editor/types.ts — EditorState, EditorOptions, Tool, EditorToolDef
editor/create.ts — createEditor() assembler
editor/viewport.ts — screenToCanvas, applyZoom, pan, zoom*
editor/selection.ts — select, clearSelection, marquee, snap, hover
editor/pages.ts — switchPage, addPage, deletePage, renamePage
editor/shapes.ts — createShape, pen tool, adoptNodesIntoSection
editor/structure.ts — group, ungroup, reorder, reparent, z-order
editor/components.ts — component/instance/detach/componentSet
editor/clipboard.ts — duplicate, copy, paste, delete
editor/undo.ts — commitMove/Resize/Rotation, snapshot
editor/text.ts — startTextEditing, commitTextEdit
editor/nodes.ts — updateNode, setLayoutMode
Move design constants (fills, strokes, zoom) from app to core.
Largest file is structure.ts at 394 lines (was 2505).
App store is now a thin Vue wrapper (747 lines) delegating to
the core Editor — ready for @open-pencil/vue SDK consumption.
All 955 tests pass, 0 lint errors, 1.41% duplication.
2026-03-16 12:14:50 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./rpc": {
|
|
|
|
|
"types": "./src/rpc/index.ts",
|
|
|
|
|
"bun": "./src/rpc/index.ts",
|
|
|
|
|
"default": "./src/rpc/index.ts"
|
|
|
|
|
},
|
|
|
|
|
"./lint": {
|
|
|
|
|
"types": "./src/lint/index.ts",
|
|
|
|
|
"bun": "./src/lint/index.ts",
|
|
|
|
|
"default": "./src/lint/index.ts"
|
2026-03-27 22:58:05 +00:00
|
|
|
},
|
|
|
|
|
"./io": {
|
|
|
|
|
"types": "./src/io/index.ts",
|
|
|
|
|
"bun": "./src/io/index.ts",
|
|
|
|
|
"default": "./src/io/index.ts"
|
2026-03-28 11:27:53 +00:00
|
|
|
},
|
|
|
|
|
"./io/formats/fig": {
|
|
|
|
|
"types": "./src/io/formats/fig/index.ts",
|
|
|
|
|
"bun": "./src/io/formats/fig/index.ts",
|
|
|
|
|
"default": "./src/io/formats/fig/index.ts"
|
|
|
|
|
},
|
|
|
|
|
"./io/formats/pen": {
|
|
|
|
|
"types": "./src/io/formats/pen/index.ts",
|
|
|
|
|
"bun": "./src/io/formats/pen/index.ts",
|
|
|
|
|
"default": "./src/io/formats/pen/index.ts"
|
|
|
|
|
},
|
|
|
|
|
"./io/formats/jsx": {
|
|
|
|
|
"types": "./src/io/formats/jsx/index.ts",
|
|
|
|
|
"bun": "./src/io/formats/jsx/index.ts",
|
|
|
|
|
"default": "./src/io/formats/jsx/index.ts"
|
|
|
|
|
},
|
|
|
|
|
"./io/formats/raster": {
|
|
|
|
|
"types": "./src/io/formats/raster/index.ts",
|
|
|
|
|
"bun": "./src/io/formats/raster/index.ts",
|
|
|
|
|
"default": "./src/io/formats/raster/index.ts"
|
|
|
|
|
},
|
|
|
|
|
"./io/formats/svg": {
|
|
|
|
|
"types": "./src/io/formats/svg/index.ts",
|
|
|
|
|
"bun": "./src/io/formats/svg/index.ts",
|
|
|
|
|
"default": "./src/io/formats/svg/index.ts"
|
2026-04-06 11:24:35 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./kiwi": {
|
|
|
|
|
"types": "./src/kiwi/index.ts",
|
|
|
|
|
"bun": "./src/kiwi/index.ts",
|
|
|
|
|
"default": "./src/kiwi/index.ts"
|
|
|
|
|
},
|
2026-04-06 11:24:35 +00:00
|
|
|
"./constants": {
|
|
|
|
|
"types": "./src/constants.ts",
|
|
|
|
|
"bun": "./src/constants.ts",
|
|
|
|
|
"default": "./src/constants.ts"
|
|
|
|
|
},
|
|
|
|
|
"./types": {
|
|
|
|
|
"types": "./src/types.ts",
|
|
|
|
|
"bun": "./src/types.ts",
|
|
|
|
|
"default": "./src/types.ts"
|
|
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./canvaskit": {
|
|
|
|
|
"types": "./src/canvaskit.ts",
|
|
|
|
|
"bun": "./src/canvaskit.ts",
|
|
|
|
|
"default": "./src/canvaskit.ts"
|
2026-04-06 11:24:35 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./layout": {
|
|
|
|
|
"types": "./src/layout.ts",
|
|
|
|
|
"bun": "./src/layout.ts",
|
|
|
|
|
"default": "./src/layout.ts"
|
2026-04-06 11:24:35 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./geometry": {
|
|
|
|
|
"types": "./src/geometry.ts",
|
|
|
|
|
"bun": "./src/geometry.ts",
|
|
|
|
|
"default": "./src/geometry.ts"
|
2026-02-28 22:24:54 +00:00
|
|
|
}
|
|
|
|
|
},
|
2026-03-02 12:02:43 +00:00
|
|
|
"main": "./src/index.ts",
|
|
|
|
|
"types": "./src/index.ts",
|
2026-04-06 11:24:35 +00:00
|
|
|
"files": [
|
|
|
|
|
"src",
|
|
|
|
|
"dist",
|
|
|
|
|
"assets"
|
|
|
|
|
],
|
2026-02-28 22:24:54 +00:00
|
|
|
"scripts": {
|
2026-04-08 19:04:22 +00:00
|
|
|
"build": "bunx tsdown --config tsdown.config.ts",
|
2026-03-02 11:59:59 +00:00
|
|
|
"prepublishOnly": "bun run build"
|
2026-02-28 22:24:54 +00:00
|
|
|
},
|
2026-03-01 13:23:30 +00:00
|
|
|
"repository": {
|
|
|
|
|
"type": "git",
|
|
|
|
|
"url": "git+https://github.com/open-pencil/open-pencil.git",
|
|
|
|
|
"directory": "packages/core"
|
|
|
|
|
},
|
2026-02-28 22:24:54 +00:00
|
|
|
"publishConfig": {
|
2026-03-01 13:23:30 +00:00
|
|
|
"access": "public",
|
2026-03-07 17:16:52 +00:00
|
|
|
"provenance": true,
|
|
|
|
|
"exports": {
|
|
|
|
|
".": {
|
|
|
|
|
"types": "./dist/index.d.ts",
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
"import": "./dist/index.js",
|
2026-03-07 17:16:52 +00:00
|
|
|
"default": "./dist/index.js"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
|
|
|
|
"./scene-graph": {
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"types": "./dist/scene-graph/index.d.ts",
|
|
|
|
|
"import": "./dist/scene-graph/index.js",
|
|
|
|
|
"default": "./dist/scene-graph/index.js"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./color": {
|
|
|
|
|
"types": "./dist/color/index.d.ts",
|
|
|
|
|
"import": "./dist/color/index.js",
|
|
|
|
|
"default": "./dist/color/index.js"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./text": {
|
|
|
|
|
"types": "./dist/text/index.d.ts",
|
|
|
|
|
"import": "./dist/text/index.js",
|
|
|
|
|
"default": "./dist/text/index.js"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./vector": {
|
|
|
|
|
"types": "./dist/vector/index.d.ts",
|
|
|
|
|
"import": "./dist/vector/index.js",
|
|
|
|
|
"default": "./dist/vector/index.js"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./figma-api": {
|
|
|
|
|
"types": "./dist/figma-api/index.d.ts",
|
|
|
|
|
"import": "./dist/figma-api/index.js",
|
|
|
|
|
"default": "./dist/figma-api/index.js"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./icons": {
|
|
|
|
|
"types": "./dist/icons/index.d.ts",
|
|
|
|
|
"import": "./dist/icons/index.js",
|
|
|
|
|
"default": "./dist/icons/index.js"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./canvas": {
|
|
|
|
|
"types": "./dist/canvas/index.d.ts",
|
|
|
|
|
"import": "./dist/canvas/index.js",
|
|
|
|
|
"default": "./dist/canvas/index.js"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./design-jsx": {
|
|
|
|
|
"types": "./dist/design-jsx/index.d.ts",
|
|
|
|
|
"import": "./dist/design-jsx/index.js",
|
|
|
|
|
"default": "./dist/design-jsx/index.js"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./editor": {
|
|
|
|
|
"types": "./dist/editor/index.d.ts",
|
|
|
|
|
"import": "./dist/editor/index.js",
|
|
|
|
|
"default": "./dist/editor/index.js"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./tools": {
|
|
|
|
|
"types": "./dist/tools/index.d.ts",
|
|
|
|
|
"import": "./dist/tools/index.js",
|
|
|
|
|
"default": "./dist/tools/index.js"
|
Add subpath exports to @open-pencil/core
12 domain-specific subpath exports for targeted imports:
scene-graph, kiwi, tools, renderer, render, rpc, figma-api,
canvaskit, layout, color, render-image, profiler.
- Create kiwi/index.ts barrel (codec, fig-file, fig-import, protocol)
- Route main index.ts kiwi re-exports through the new barrel
- Add exports map + publishConfig mirror for npm consumers
- Mark package as sideEffects: false for tree-shaking
- Document subpath exports in AGENTS.md
2026-03-12 16:58:32 +00:00
|
|
|
},
|
|
|
|
|
"./profiler": {
|
|
|
|
|
"types": "./dist/profiler/index.d.ts",
|
|
|
|
|
"import": "./dist/profiler/index.js",
|
|
|
|
|
"default": "./dist/profiler/index.js"
|
Extract createEditor() to packages/core/src/editor/ folder
Split the 2505-line god store into 13 domain modules sharing an
EditorContext interface:
editor/types.ts — EditorState, EditorOptions, Tool, EditorToolDef
editor/create.ts — createEditor() assembler
editor/viewport.ts — screenToCanvas, applyZoom, pan, zoom*
editor/selection.ts — select, clearSelection, marquee, snap, hover
editor/pages.ts — switchPage, addPage, deletePage, renamePage
editor/shapes.ts — createShape, pen tool, adoptNodesIntoSection
editor/structure.ts — group, ungroup, reorder, reparent, z-order
editor/components.ts — component/instance/detach/componentSet
editor/clipboard.ts — duplicate, copy, paste, delete
editor/undo.ts — commitMove/Resize/Rotation, snapshot
editor/text.ts — startTextEditing, commitTextEdit
editor/nodes.ts — updateNode, setLayoutMode
Move design constants (fills, strokes, zoom) from app to core.
Largest file is structure.ts at 394 lines (was 2505).
App store is now a thin Vue wrapper (747 lines) delegating to
the core Editor — ready for @open-pencil/vue SDK consumption.
All 955 tests pass, 0 lint errors, 1.41% duplication.
2026-03-16 12:14:50 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./rpc": {
|
|
|
|
|
"types": "./dist/rpc/index.d.ts",
|
|
|
|
|
"import": "./dist/rpc/index.js",
|
|
|
|
|
"default": "./dist/rpc/index.js"
|
|
|
|
|
},
|
|
|
|
|
"./lint": {
|
|
|
|
|
"types": "./dist/lint/index.d.ts",
|
|
|
|
|
"import": "./dist/lint/index.js",
|
|
|
|
|
"default": "./dist/lint/index.js"
|
2026-03-27 22:58:05 +00:00
|
|
|
},
|
|
|
|
|
"./io": {
|
|
|
|
|
"types": "./dist/io/index.d.ts",
|
|
|
|
|
"import": "./dist/io/index.js",
|
|
|
|
|
"default": "./dist/io/index.js"
|
2026-03-28 11:27:53 +00:00
|
|
|
},
|
|
|
|
|
"./io/formats/fig": {
|
|
|
|
|
"types": "./dist/io/formats/fig/index.d.ts",
|
|
|
|
|
"import": "./dist/io/formats/fig/index.js",
|
|
|
|
|
"default": "./dist/io/formats/fig/index.js"
|
|
|
|
|
},
|
|
|
|
|
"./io/formats/pen": {
|
|
|
|
|
"types": "./dist/io/formats/pen/index.d.ts",
|
|
|
|
|
"import": "./dist/io/formats/pen/index.js",
|
|
|
|
|
"default": "./dist/io/formats/pen/index.js"
|
|
|
|
|
},
|
|
|
|
|
"./io/formats/jsx": {
|
|
|
|
|
"types": "./dist/io/formats/jsx/index.d.ts",
|
|
|
|
|
"import": "./dist/io/formats/jsx/index.js",
|
|
|
|
|
"default": "./dist/io/formats/jsx/index.js"
|
|
|
|
|
},
|
|
|
|
|
"./io/formats/raster": {
|
|
|
|
|
"types": "./dist/io/formats/raster/index.d.ts",
|
|
|
|
|
"import": "./dist/io/formats/raster/index.js",
|
|
|
|
|
"default": "./dist/io/formats/raster/index.js"
|
|
|
|
|
},
|
|
|
|
|
"./io/formats/svg": {
|
|
|
|
|
"types": "./dist/io/formats/svg/index.d.ts",
|
|
|
|
|
"import": "./dist/io/formats/svg/index.js",
|
|
|
|
|
"default": "./dist/io/formats/svg/index.js"
|
2026-04-06 11:24:35 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./kiwi": {
|
|
|
|
|
"types": "./dist/kiwi/index.d.ts",
|
|
|
|
|
"import": "./dist/kiwi/index.js",
|
|
|
|
|
"default": "./dist/kiwi/index.js"
|
|
|
|
|
},
|
2026-04-06 11:24:35 +00:00
|
|
|
"./constants": {
|
|
|
|
|
"types": "./dist/constants.d.ts",
|
|
|
|
|
"import": "./dist/constants.js",
|
|
|
|
|
"default": "./dist/constants.js"
|
|
|
|
|
},
|
|
|
|
|
"./types": {
|
|
|
|
|
"types": "./dist/types.d.ts",
|
|
|
|
|
"import": "./dist/types.js",
|
|
|
|
|
"default": "./dist/types.js"
|
|
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./canvaskit": {
|
|
|
|
|
"types": "./dist/canvaskit.d.ts",
|
|
|
|
|
"import": "./dist/canvaskit.js",
|
|
|
|
|
"default": "./dist/canvaskit.js"
|
2026-04-06 11:24:35 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./layout": {
|
|
|
|
|
"types": "./dist/layout.d.ts",
|
|
|
|
|
"import": "./dist/layout.js",
|
|
|
|
|
"default": "./dist/layout.js"
|
2026-04-06 11:24:35 +00:00
|
|
|
},
|
Restructure @open-pencil/core into domain modules
Move 30+ loose files at src/ root into domain directories:
- scene-graph/ — SceneGraph class, instances, hit-test, copy, snap, undo
- color/ — parse/format, color management, OkHCL
- text/ — text editor, style runs, direction, fonts
- vector/ — vector network encode/decode, bezier math
- figma-api/ — FigmaAPI class, FigmaNodeProxy
- icons/ — Iconify API client, icon rendering
- canvas/ — SkiaRenderer (was renderer/)
- design-jsx/ — JSX-to-design renderer (was render/)
Also:
- Move fig-compress.ts into io/formats/fig/compress.ts
- Delete re-export shims (headless-render.ts, svg-export/)
- Convert all self-referencing @open-pencil/core/* imports to relative
- Clean up package.json exports (26 subpaths, no internal leaks)
- Update AGENTS.md subpath table
Fixes #179
2026-04-06 11:39:53 +00:00
|
|
|
"./geometry": {
|
|
|
|
|
"types": "./dist/geometry.d.ts",
|
|
|
|
|
"import": "./dist/geometry.js",
|
|
|
|
|
"default": "./dist/geometry.js"
|
2026-03-07 17:16:52 +00:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"main": "./dist/index.js",
|
|
|
|
|
"types": "./dist/index.d.ts"
|
2026-02-28 22:03:07 +00:00
|
|
|
},
|
|
|
|
|
"dependencies": {
|
2026-03-13 11:46:18 +00:00
|
|
|
"@iconify/utils": "^3.1.0",
|
2026-02-28 22:03:07 +00:00
|
|
|
"canvaskit-wasm": "^0.40.0",
|
|
|
|
|
"culori": "^4.0.2",
|
Port analyze/diff tools from figma-use, split tools into domain files
Analyze: colors, typography, spacing, clusters
Diff: diff_create (tree diff), diff_show (preview changes)
Utility: get_components, get_current_page, arrange, node_to_component
Split schema.ts (2600 lines) into read, create, modify, structure,
variables, vector, analyze, registry — each under 600 lines.
Clean up inline types (use Color, Vector, SceneNode from existing defs).
Update AGENTS.md and CONTRIBUTING.md with code quality guidelines.
2026-03-05 16:00:40 +00:00
|
|
|
"diff": "^8.0.3",
|
2026-03-13 11:46:18 +00:00
|
|
|
"expr-eval": "^2.0.2",
|
2026-02-28 22:03:07 +00:00
|
|
|
"fflate": "^0.8.2",
|
XPath query for node selection (#82)
* Add XPath query for node selection
- packages/core/src/xpath.ts: XPath engine using fontoxpath with custom
DOM facade over SceneGraph nodes
- RPC command: 'query' with selector, page, limit params
- CLI command: 'open-pencil query <file> <xpath>' with --json, --page, --limit
- AI/MCP tool: 'query_nodes' with XPath examples in description
- Queryable attributes: name, width, height, x, y, visible, opacity,
cornerRadius, fontSize, fontFamily, fontWeight, layoutMode, itemSpacing,
padding*, strokeWeight, rotation, locked, blendMode, text, lineHeight,
letterSpacing
* Add tests and docs for XPath query
- 9 unit tests for queryByXPath/matchByXPath core functions
- 6 tool tests for query_nodes AI/MCP tool
- README: query examples in CLI section
- VitePress docs: patterns, queryable attributes, example output
- CHANGELOG: feature entry
* Lazy-load fontoxpath to avoid bundling in desktop app
- Dynamic import() instead of static import for fontoxpath
- queryByXPath/matchByXPath now async (they were sync before)
- RpcCommand.execute allows R | Promise<R> for async commands
- Fix 2 lint errors (unnecessary optional chain, always-truthy)
- Update all tests and CLI to await results
2026-03-09 12:32:27 +00:00
|
|
|
"fontoxpath": "^3.34.0",
|
2026-02-28 22:03:07 +00:00
|
|
|
"fzstd": "^0.1.1",
|
2026-03-09 13:02:54 +00:00
|
|
|
"nanoevents": "^9.1.0",
|
2026-04-08 17:45:43 +00:00
|
|
|
"opentype.js": "^1.3.4",
|
Multi-provider AI, sucrase JSX, Figma zoom shortcuts (#72)
* Add multi-provider AI support (Anthropic, OpenAI, Google AI, OpenAI-compatible)
- Add AI_PROVIDERS registry with per-provider model lists, key placeholders, and URLs
- Refactor use-chat composable: provider factory creates the right AI SDK model
- Per-provider API key storage in localStorage with automatic legacy migration
- New ProviderSetup.vue replaces APIKeySetup.vue with provider selector
- New ProviderSettings.vue popover accessible from gear icon in chat input
- OpenAI-compatible provider with custom base URL and model ID fields
- Install @ai-sdk/anthropic and @ai-sdk/google dependencies
- Update E2E tests for new provider setup flow
* Fix reactivity, key masking, missing model ID field, and chat reset on model change
- Use ref instead of computed for apiKey — computed getter over localStorage
wasn't triggering reactivity when the key was set
- Load stored key for new provider in providerId watcher
- Reset chat on modelId and customModelId change, not just provider switch
- Add custom model ID field to ProviderSetup.vue for OpenAI-compatible
- Simplify ProviderSettings key field — empty input with contextual placeholder
instead of fragile dot-masking that broke on partial edits
- Use data-test-id locator for model selector in E2E test
* Use useLocalStorage from vueuse instead of manual ref + watch + localStorage
Replaces 5 hand-rolled ref/watch/localStorage sync pairs with useLocalStorage.
API key uses a computed storage key that rebinds when the provider changes.
* Use useLocalStorage for collab name persistence
* Review fixes: changelog placement, remove dead class, cursor-pointer
* Extract ProviderSelect component and uiInput helper
- ProviderSelect.vue: shared select dropdown for AI providers
- ui/input.ts: shared input styling (sm/md sizes)
- Remove 7 duplicated input class strings across chat components
* Use uppercase acronyms: keyURL, customBaseURL, supportsCustomBaseURL
* Match select dropdown width to trigger via --reka-select-trigger-width
Move min-w-[var(--reka-select-trigger-width)] into selectContent base
style so all selects get it by default. Remove per-component overrides.
* Uppercase acronyms in variable names, improve setup form layout
- providerID, modelID, customModelID, setAPIKey, AIProviderID
- Keep apiKey lowercase at start (standard JS convention)
- Compact setup form: single column, full-width Connect button
- Fix grammar: 'a OpenRouter' → 'an OpenRouter'
- Shorter promo text
* Allow text selection in chat panel
* Fix chat E2E test: Save → Connect button text
* Disable mermaid in chat markdown renderer
Alias mermaid and beautiful-mermaid to empty shims in Vite config,
preventing vue-stream-markdown from attempting to load them.
* Interleave text and tool calls in chat messages
Render message parts in order instead of grouping all tool calls
first then all text. Use SDK's isToolUIPart/isTextUIPart/getToolName
instead of custom type guards. Fix error state: output-error, not error.
* Implement figma.viewport.scrollAndZoomIntoView()
Figma Plugin API method that centers the viewport on given nodes.
Reuses the same bounding box logic as the viewport_zoom_to_fit tool.
* Catch tool execution errors and return them to the AI
Instead of crashing with an unhandled exception, tool errors are
caught and returned as { error: message } so the AI can retry or
explain the failure. UI detects error outputs and shows them in red
with the error message when expanded.
* Replace esbuild with sucrase for JSX transform
Sucrase is a pure JS transform (201 KB / 46 KB gzip) that works in
both Node/Bun and the browser. Replaces esbuild (13 MB WASM) which
only worked in Node/Bun.
- buildComponent() and renderJSX() are now synchronous
- render tool works in browser AI chat (no more 'esbuild required')
- Handles full JS expressions (map, ternaries, Array.from, etc.)
* Update system prompt to prioritize render tool with JSX
Document available tags, props, layout, text, and sizing options.
Instruct the AI to use full JS expressions in JSX for complex layouts.
* Fix zoom shortcuts to match Figma
Cmd+0: Zoom to 100% (was incorrectly mapped to Zoom to fit)
Cmd+1: Zoom to fit
Cmd+2: Zoom to selection
Shift+1 / Shift+2: same as Cmd+1 / Cmd+2
Add zoomTo100() and zoomToSelection() to editor store.
Refactor zoomToFit() to use shared zoomToBounds() helper.
* Refactor keyboard shortcuts to useMagicKeys
Replace manual keydown handler with VueUse useMagicKeys + whenever
for declarative shortcut registration.
- mod() helper for cross-platform Meta/Control shortcuts
- plain() helper for modifier-free keys
- Proper modifier exclusion (⌘G vs ⌘⇧G no longer conflict)
- Add E2E tests: duplicate, zoom (⌘0/⌘1/⌘2/⇧1/⇧2), auto-layout (⇧A)
- All 26 keyboard shortcut tests pass
* Fix scrollAndZoomIntoView to actually zoom
Match Figma Plugin API behavior (equivalent to Shift-1): compute
zoom level that fits all nodes with padding, capped at 100%.
Previously only set center without adjusting zoom.
2026-03-08 19:05:18 +00:00
|
|
|
"sucrase": "^3.35.1",
|
2026-03-11 13:42:05 +00:00
|
|
|
"svgpath": "^2.6.0",
|
2026-04-13 09:09:45 +00:00
|
|
|
"yoga-layout": "npm:@open-pencil/yoga-layout@3.3.0-grid.3"
|
2026-02-28 22:03:07 +00:00
|
|
|
},
|
|
|
|
|
"devDependencies": {
|
2026-02-28 22:24:54 +00:00
|
|
|
"@types/culori": "^4.0.1",
|
Port analyze/diff tools from figma-use, split tools into domain files
Analyze: colors, typography, spacing, clusters
Diff: diff_create (tree diff), diff_show (preview changes)
Utility: get_components, get_current_page, arrange, node_to_component
Split schema.ts (2600 lines) into read, create, modify, structure,
variables, vector, analyze, registry — each under 600 lines.
Clean up inline types (use Color, Vector, SceneNode from existing defs).
Update AGENTS.md and CONTRIBUTING.md with code quality guidelines.
2026-03-05 16:00:40 +00:00
|
|
|
"@types/diff": "^8.0.0",
|
2026-04-08 17:45:43 +00:00
|
|
|
"@types/opentype.js": "^1.3.9",
|
2026-02-28 22:24:54 +00:00
|
|
|
"typescript": "~5.8.3"
|
2026-02-28 22:03:07 +00:00
|
|
|
}
|
|
|
|
|
}
|