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
313 lines
9.1 KiB
JSON
313 lines
9.1 KiB
JSON
{
|
|
"name": "@open-pencil/core",
|
|
"version": "0.11.2",
|
|
"license": "MIT",
|
|
"type": "module",
|
|
"sideEffects": false,
|
|
"exports": {
|
|
".": {
|
|
"types": "./src/index.ts",
|
|
"bun": "./src/index.ts",
|
|
"default": "./src/index.ts"
|
|
},
|
|
"./scene-graph": {
|
|
"types": "./src/scene-graph/index.ts",
|
|
"bun": "./src/scene-graph/index.ts",
|
|
"default": "./src/scene-graph/index.ts"
|
|
},
|
|
"./color": {
|
|
"types": "./src/color/index.ts",
|
|
"bun": "./src/color/index.ts",
|
|
"default": "./src/color/index.ts"
|
|
},
|
|
"./text": {
|
|
"types": "./src/text/index.ts",
|
|
"bun": "./src/text/index.ts",
|
|
"default": "./src/text/index.ts"
|
|
},
|
|
"./vector": {
|
|
"types": "./src/vector/index.ts",
|
|
"bun": "./src/vector/index.ts",
|
|
"default": "./src/vector/index.ts"
|
|
},
|
|
"./figma-api": {
|
|
"types": "./src/figma-api/index.ts",
|
|
"bun": "./src/figma-api/index.ts",
|
|
"default": "./src/figma-api/index.ts"
|
|
},
|
|
"./icons": {
|
|
"types": "./src/icons/index.ts",
|
|
"bun": "./src/icons/index.ts",
|
|
"default": "./src/icons/index.ts"
|
|
},
|
|
"./canvas": {
|
|
"types": "./src/canvas/index.ts",
|
|
"bun": "./src/canvas/index.ts",
|
|
"default": "./src/canvas/index.ts"
|
|
},
|
|
"./design-jsx": {
|
|
"types": "./src/design-jsx/index.ts",
|
|
"bun": "./src/design-jsx/index.ts",
|
|
"default": "./src/design-jsx/index.ts"
|
|
},
|
|
"./editor": {
|
|
"types": "./src/editor/index.ts",
|
|
"bun": "./src/editor/index.ts",
|
|
"default": "./src/editor/index.ts"
|
|
},
|
|
"./tools": {
|
|
"types": "./src/tools/index.ts",
|
|
"bun": "./src/tools/index.ts",
|
|
"default": "./src/tools/index.ts"
|
|
},
|
|
"./profiler": {
|
|
"types": "./src/profiler/index.ts",
|
|
"bun": "./src/profiler/index.ts",
|
|
"default": "./src/profiler/index.ts"
|
|
},
|
|
"./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"
|
|
},
|
|
"./io": {
|
|
"types": "./src/io/index.ts",
|
|
"bun": "./src/io/index.ts",
|
|
"default": "./src/io/index.ts"
|
|
},
|
|
"./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"
|
|
},
|
|
"./kiwi": {
|
|
"types": "./src/kiwi/index.ts",
|
|
"bun": "./src/kiwi/index.ts",
|
|
"default": "./src/kiwi/index.ts"
|
|
},
|
|
"./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"
|
|
},
|
|
"./canvaskit": {
|
|
"types": "./src/canvaskit.ts",
|
|
"bun": "./src/canvaskit.ts",
|
|
"default": "./src/canvaskit.ts"
|
|
},
|
|
"./layout": {
|
|
"types": "./src/layout.ts",
|
|
"bun": "./src/layout.ts",
|
|
"default": "./src/layout.ts"
|
|
},
|
|
"./geometry": {
|
|
"types": "./src/geometry.ts",
|
|
"bun": "./src/geometry.ts",
|
|
"default": "./src/geometry.ts"
|
|
}
|
|
},
|
|
"main": "./src/index.ts",
|
|
"types": "./src/index.ts",
|
|
"files": [
|
|
"src",
|
|
"dist",
|
|
"assets"
|
|
],
|
|
"scripts": {
|
|
"build": "bunx tsgo && bunx fix-esm-import-path dist",
|
|
"prepublishOnly": "bun run build"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/open-pencil/open-pencil.git",
|
|
"directory": "packages/core"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public",
|
|
"provenance": true,
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.js",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./scene-graph": {
|
|
"types": "./dist/scene-graph/index.d.ts",
|
|
"import": "./dist/scene-graph/index.js",
|
|
"default": "./dist/scene-graph/index.js"
|
|
},
|
|
"./color": {
|
|
"types": "./dist/color/index.d.ts",
|
|
"import": "./dist/color/index.js",
|
|
"default": "./dist/color/index.js"
|
|
},
|
|
"./text": {
|
|
"types": "./dist/text/index.d.ts",
|
|
"import": "./dist/text/index.js",
|
|
"default": "./dist/text/index.js"
|
|
},
|
|
"./vector": {
|
|
"types": "./dist/vector/index.d.ts",
|
|
"import": "./dist/vector/index.js",
|
|
"default": "./dist/vector/index.js"
|
|
},
|
|
"./figma-api": {
|
|
"types": "./dist/figma-api/index.d.ts",
|
|
"import": "./dist/figma-api/index.js",
|
|
"default": "./dist/figma-api/index.js"
|
|
},
|
|
"./icons": {
|
|
"types": "./dist/icons/index.d.ts",
|
|
"import": "./dist/icons/index.js",
|
|
"default": "./dist/icons/index.js"
|
|
},
|
|
"./canvas": {
|
|
"types": "./dist/canvas/index.d.ts",
|
|
"import": "./dist/canvas/index.js",
|
|
"default": "./dist/canvas/index.js"
|
|
},
|
|
"./design-jsx": {
|
|
"types": "./dist/design-jsx/index.d.ts",
|
|
"import": "./dist/design-jsx/index.js",
|
|
"default": "./dist/design-jsx/index.js"
|
|
},
|
|
"./editor": {
|
|
"types": "./dist/editor/index.d.ts",
|
|
"import": "./dist/editor/index.js",
|
|
"default": "./dist/editor/index.js"
|
|
},
|
|
"./tools": {
|
|
"types": "./dist/tools/index.d.ts",
|
|
"import": "./dist/tools/index.js",
|
|
"default": "./dist/tools/index.js"
|
|
},
|
|
"./profiler": {
|
|
"types": "./dist/profiler/index.d.ts",
|
|
"import": "./dist/profiler/index.js",
|
|
"default": "./dist/profiler/index.js"
|
|
},
|
|
"./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"
|
|
},
|
|
"./io": {
|
|
"types": "./dist/io/index.d.ts",
|
|
"import": "./dist/io/index.js",
|
|
"default": "./dist/io/index.js"
|
|
},
|
|
"./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"
|
|
},
|
|
"./kiwi": {
|
|
"types": "./dist/kiwi/index.d.ts",
|
|
"import": "./dist/kiwi/index.js",
|
|
"default": "./dist/kiwi/index.js"
|
|
},
|
|
"./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"
|
|
},
|
|
"./canvaskit": {
|
|
"types": "./dist/canvaskit.d.ts",
|
|
"import": "./dist/canvaskit.js",
|
|
"default": "./dist/canvaskit.js"
|
|
},
|
|
"./layout": {
|
|
"types": "./dist/layout.d.ts",
|
|
"import": "./dist/layout.js",
|
|
"default": "./dist/layout.js"
|
|
},
|
|
"./geometry": {
|
|
"types": "./dist/geometry.d.ts",
|
|
"import": "./dist/geometry.js",
|
|
"default": "./dist/geometry.js"
|
|
}
|
|
},
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts"
|
|
},
|
|
"dependencies": {
|
|
"@iconify/utils": "^3.1.0",
|
|
"canvaskit-wasm": "^0.40.0",
|
|
"culori": "^4.0.2",
|
|
"diff": "^8.0.3",
|
|
"expr-eval": "^2.0.2",
|
|
"fflate": "^0.8.2",
|
|
"fontoxpath": "^3.34.0",
|
|
"fzstd": "^0.1.1",
|
|
"nanoevents": "^9.1.0",
|
|
"sucrase": "^3.35.1",
|
|
"svgpath": "^2.6.0",
|
|
"yoga-layout": "npm:@open-pencil/yoga-layout@3.3.0-grid.2"
|
|
},
|
|
"devDependencies": {
|
|
"@types/culori": "^4.0.1",
|
|
"@types/diff": "^8.0.0",
|
|
"typescript": "~5.8.3"
|
|
}
|
|
}
|