{"_id":"@elftia/canvas-core","name":"@elftia/canvas-core","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@elftia/canvas-core","version":"0.1.0","private":false,"description":"Host-neutral canvas artifact protocols, scanning, layout, scene construction, and registration orchestration.","license":"MIT","main":"dist/index.cjs","module":"dist/index.mjs","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"scripts":{"build":"tsup","typecheck":"tsc --noEmit -p tsconfig.json","test":"vitest run --root ../.. --config vite.config.js packages/canvas-core/src/__tests__"},"dependencies":{"@elftia/plugin-types":"^1.46.0"},"devDependencies":{"tsup":"^8.3.0","typescript":"^5.6.0","vitest":"^4.0.7"},"engines":{"node":">=18"},"_id":"@elftia/canvas-core@0.1.0","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-RPAIP/+qCuJE6dBxPzzsbcrkrMuMjffGqH4puptdgZ7rCMKzbx/Byn94oCYlYDetYXgQKmvf4Zf9bU0bPuLuZg==","shasum":"0dcd5549e02631d72a3f4c47cd2f80ff23ca0a5b","tarball":"https://registry.npmjs.org/@elftia/canvas-core/-/canvas-core-0.1.0.tgz","fileCount":8,"unpackedSize":225411,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDkyxxL7sp5hnXSp6Iiw+yyPwSF6V3eA7OQbOHa+jQP3gIhAJI37trhc+c4ySGLt3Y51L6D9jxwu9YFrNLVnAx6uVrJ"}]},"_npmUser":{"name":"atelierai","email":"ws11579@gmail.com"},"directories":{},"maintainers":[{"name":"atelierai","email":"ws11579@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/canvas-core_0.1.0_1788430072528_0.40216637769521424"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-03T10:07:52.319Z","0.1.0":"2026-09-03T10:07:52.670Z","modified":"2026-09-03T10:07:52.985Z"},"maintainers":[{"name":"atelierai","email":"ws11579@gmail.com"}],"description":"Host-neutral canvas artifact protocols, scanning, layout, scene construction, and registration orchestration.","license":"MIT","readme":"# `@elftia/canvas-core`\r\n\r\nThis package owns the host-neutral canvas artifact vocabulary and pure canvas operations. Its exported declarations are the single public TypeScript contract authority.\r\n\r\nThe root export also owns the permissive `CanvasElement`, `CanvasAppState`,\r\n`CanvasBinaryFile`, and `CanvasState` scene envelopes. Public consumers never\r\nneed Elftia's private `@elftia/shared` package. Host-side runtime validators\r\nvalidate these envelopes and re-export the types instead of redefining them.\r\n\r\nThe four domain actions are deliberately separate:\r\n\r\n- **Generation** produces a generated asset. Only a true generation result has `CanvasGenerationProvenance` (`runId` and `outputId`).\r\n- **Import/store** obtains or persists an already available `CanvasAsset`. It does not place anything on a canvas and does not invent generation provenance.\r\n- **Canvas registration** uses `registerOnCanvas` to associate a `CanvasRegistrationDraft` with a destination canvas and returns a `CanvasRegistration` containing its element id.\r\n- **Pure scene construction** uses `buildCanvasArtifactSceneContent` over `CanvasArtifactPlacementInput`. It creates byte-free canvas content but performs no persistence itself.\r\n\r\nEvery placed artifact is identified by its `HostArtifactRef` in `customData.artifactRef`. `customData.generation` is optional and appears only when the caller supplies genuine generation provenance. A local file and a generated output therefore follow the same registration operation without pretending to be the same source action.\r\n\r\nReact synchronization and presentation live in `@elftia/canvas-react`. Provider calls, imports, databases, IPC, completion events, caches, and host surface registration remain application concerns outside this package.\r\n","readmeFilename":"README.md","_rev":"1-a0d77b1fc45378b7d36ae5c959e12e92"}