Introduces the @pascal-app/core/registry surface that future node-bundle packages (and external plugins) will use to register node kinds with the host. No runtime behavior changes — registry is empty until subsequent PRs populate it. - types.ts: NodeDefinition, Capabilities, Relations, DragAction, Plugin, ParametricDescriptor, Affordance, SceneApi, NodeRegistry. Capability configs accept an override escape hatch; additive-only after v1. - registry.ts: nodeRegistry singleton, registerNode, async loadPlugin. Validates kind, schemaVersion, apiVersion; rejects duplicate kinds. - scene-api.ts: createSceneApi factory wrapping the scene store with copy-on-write snapshot semantics for pauseHistory/restore/resumeHistory. - index.ts: barrel re-exporting the public surface. - core/index.ts + package.json: export * from registry and add the ./registry subpath so consumers can import either way. Tests (27 cases, all bun:test): registry registration / validation / plugin loading; SceneApi read/write/dirty/history; lazy snapshot capture with update/upsert/delete reversal via restore and restoreAll. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
103 lines
2.8 KiB
JSON
103 lines
2.8 KiB
JSON
{
|
|
"name": "@pascal-app/core",
|
|
"version": "0.8.0",
|
|
"description": "Core library for Pascal 3D building editor",
|
|
"type": "module",
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.js",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./clone-scene-graph": {
|
|
"types": "./dist/utils/clone-scene-graph.d.ts",
|
|
"import": "./dist/utils/clone-scene-graph.js",
|
|
"default": "./dist/utils/clone-scene-graph.js"
|
|
},
|
|
"./registry": {
|
|
"types": "./dist/registry/index.d.ts",
|
|
"import": "./dist/registry/index.js",
|
|
"default": "./dist/registry/index.js"
|
|
},
|
|
"./schema": {
|
|
"types": "./dist/schema/index.d.ts",
|
|
"import": "./dist/schema/index.js",
|
|
"default": "./dist/schema/index.js"
|
|
},
|
|
"./store": {
|
|
"types": "./dist/store/use-scene.d.ts",
|
|
"import": "./dist/store/use-scene.js",
|
|
"default": "./dist/store/use-scene.js"
|
|
},
|
|
"./material-library": {
|
|
"types": "./dist/material-library.d.ts",
|
|
"import": "./dist/material-library.js",
|
|
"default": "./dist/material-library.js"
|
|
},
|
|
"./spatial-grid": {
|
|
"types": "./dist/hooks/spatial-grid/spatial-grid-manager.d.ts",
|
|
"import": "./dist/hooks/spatial-grid/spatial-grid-manager.js",
|
|
"default": "./dist/hooks/spatial-grid/spatial-grid-manager.js"
|
|
},
|
|
"./wall": {
|
|
"types": "./dist/systems/wall/wall-footprint.d.ts",
|
|
"import": "./dist/systems/wall/wall-footprint.js",
|
|
"default": "./dist/systems/wall/wall-footprint.js"
|
|
},
|
|
"./stair-openings": {
|
|
"types": "./dist/systems/stair/stair-opening-sync.d.ts",
|
|
"import": "./dist/systems/stair/stair-opening-sync.js",
|
|
"default": "./dist/systems/stair/stair-opening-sync.js"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"README.md"
|
|
],
|
|
"scripts": {
|
|
"build": "tsc --build",
|
|
"dev": "tsc --build --watch",
|
|
"prepublishOnly": "npm run build"
|
|
},
|
|
"peerDependencies": {
|
|
"@react-three/drei": "^10",
|
|
"@react-three/fiber": "^9",
|
|
"react": "^18 || ^19",
|
|
"three": "^0.184"
|
|
},
|
|
"dependencies": {
|
|
"dedent": "^1.7.1",
|
|
"idb-keyval": "^6.2.2",
|
|
"mitt": "^3.0.1",
|
|
"nanoid": "^5.1.6",
|
|
"zod": "^4.3.5",
|
|
"zundo": "^2.3.0",
|
|
"zustand": "^5"
|
|
},
|
|
"devDependencies": {
|
|
"@pascal/typescript-config": "*",
|
|
"@types/bun": "^1.3.0",
|
|
"@types/react": "^19.2.2",
|
|
"@types/three": "^0.184.0",
|
|
"typescript": "6.0.2"
|
|
},
|
|
"keywords": [
|
|
"3d",
|
|
"building",
|
|
"editor",
|
|
"architecture",
|
|
"webgpu",
|
|
"three.js"
|
|
],
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/pascalorg/editor.git",
|
|
"directory": "packages/core"
|
|
},
|
|
"license": "MIT",
|
|
"homepage": "https://github.com/pascalorg/editor/tree/main/packages/core#readme",
|
|
"bugs": "https://github.com/pascalorg/editor/issues"
|
|
}
|