openpencil/packages/core/package.json
Danila Poyarkov abe108c473
Add event emitter to SceneGraph, refactor collab sync
- Add nanoevents to @open-pencil/core, emit typed events from
  SceneGraph mutation methods: node:created, node:updated,
  node:deleted, node:reparented, node:reordered
- Subscribe to node:updated in editor store for renderer
  invalidation (vector path + node picture cache) instead of
  inlining it in updateNode()
- Re-subscribe to graph events after file open/reload (graph
  instance is replaced)
- Replace monkey-patching of graph.updateNode in use-collab with
  event subscriptions for node:created, node:updated, node:deleted,
  node:reparented — fixes sync gaps for create/delete/reparent that
  the monkey-patch missed
- Clean up event subscriptions on collab disconnect
2026-03-09 16:02:54 +03:00

55 lines
1.2 KiB
JSON

{
"name": "@open-pencil/core",
"version": "0.8.0",
"license": "MIT",
"type": "module",
"exports": {
".": {
"types": "./src/index.ts",
"bun": "./src/index.ts",
"default": "./src/index.ts"
}
},
"main": "./src/index.ts",
"types": "./src/index.ts",
"files": ["src", "dist"],
"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",
"node": "./dist/index.js",
"default": "./dist/index.js"
}
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"dependencies": {
"canvaskit-wasm": "^0.40.0",
"culori": "^4.0.2",
"diff": "^8.0.3",
"fflate": "^0.8.2",
"fontoxpath": "^3.34.0",
"fzstd": "^0.1.1",
"nanoevents": "^9.1.0",
"sucrase": "^3.35.1",
"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"
}
}