fundus 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -3
- package/build/client/_app/immutable/assets/3.BuCXJbRG.css +1 -0
- package/build/client/_app/immutable/assets/3.BuCXJbRG.css.br +0 -0
- package/build/client/_app/immutable/assets/3.BuCXJbRG.css.gz +0 -0
- package/build/client/_app/immutable/assets/4.C0QkCMQ4.css +1 -0
- package/build/client/_app/immutable/assets/4.C0QkCMQ4.css.br +0 -0
- package/build/client/_app/immutable/assets/4.C0QkCMQ4.css.gz +0 -0
- package/build/client/_app/immutable/assets/LibraryContextMenu.B6By2-yb.css +1 -0
- package/build/client/_app/immutable/assets/LibraryContextMenu.B6By2-yb.css.br +0 -0
- package/build/client/_app/immutable/assets/LibraryContextMenu.B6By2-yb.css.gz +0 -0
- package/build/client/_app/immutable/assets/Popover.Et4sBRbI.css +1 -0
- package/build/client/_app/immutable/assets/Popover.Et4sBRbI.css.br +0 -0
- package/build/client/_app/immutable/assets/Popover.Et4sBRbI.css.gz +0 -0
- package/build/client/_app/immutable/chunks/B9HdDE5n.js +1 -0
- package/build/client/_app/immutable/chunks/B9HdDE5n.js.br +0 -0
- package/build/client/_app/immutable/chunks/B9HdDE5n.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CAQ5okPf.js +2 -0
- package/build/client/_app/immutable/chunks/CAQ5okPf.js.br +0 -0
- package/build/client/_app/immutable/chunks/CAQ5okPf.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Ccz62-Hi.js +1 -0
- package/build/client/_app/immutable/chunks/Ccz62-Hi.js.br +0 -0
- package/build/client/_app/immutable/chunks/Ccz62-Hi.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ChVOZl2x.js +1 -0
- package/build/client/_app/immutable/chunks/ChVOZl2x.js.br +0 -0
- package/build/client/_app/immutable/chunks/ChVOZl2x.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CiBv7EZv.js +108 -0
- package/build/client/_app/immutable/chunks/CiBv7EZv.js.br +0 -0
- package/build/client/_app/immutable/chunks/CiBv7EZv.js.gz +0 -0
- package/build/client/_app/immutable/chunks/UFAWUL-4.js +1 -0
- package/build/client/_app/immutable/chunks/UFAWUL-4.js.br +0 -0
- package/build/client/_app/immutable/chunks/UFAWUL-4.js.gz +0 -0
- package/build/client/_app/immutable/chunks/YWIvyYJl.js +1 -0
- package/build/client/_app/immutable/chunks/YWIvyYJl.js.br +0 -0
- package/build/client/_app/immutable/chunks/YWIvyYJl.js.gz +0 -0
- package/build/client/_app/immutable/chunks/YpiA5Xry.js +3 -0
- package/build/client/_app/immutable/chunks/YpiA5Xry.js.br +0 -0
- package/build/client/_app/immutable/chunks/YpiA5Xry.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CliRE4wo.js → jjXOSnwf.js} +1 -1
- package/build/client/_app/immutable/chunks/jjXOSnwf.js.br +0 -0
- package/build/client/_app/immutable/chunks/jjXOSnwf.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.Rv8f5zSo.js +2 -0
- package/build/client/_app/immutable/entry/app.Rv8f5zSo.js.br +0 -0
- package/build/client/_app/immutable/entry/app.Rv8f5zSo.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.C5jRg_CF.js +1 -0
- package/build/client/_app/immutable/entry/start.C5jRg_CF.js.br +1 -0
- package/build/client/_app/immutable/entry/start.C5jRg_CF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.Gv5d6CcW.js +1 -0
- package/build/client/_app/immutable/nodes/0.Gv5d6CcW.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.Gv5d6CcW.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.8J9y5zyF.js +1 -0
- package/build/client/_app/immutable/nodes/1.8J9y5zyF.js.br +0 -0
- package/build/client/_app/immutable/nodes/1.8J9y5zyF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.BNvTqsKZ.js +3 -0
- package/build/client/_app/immutable/nodes/2.BNvTqsKZ.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.BNvTqsKZ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.CmlRI2XA.js +1 -0
- package/build/client/_app/immutable/nodes/3.CmlRI2XA.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.CmlRI2XA.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.CHTKk5QR.js +2 -0
- package/build/client/_app/immutable/nodes/4.CHTKk5QR.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.CHTKk5QR.js.gz +0 -0
- package/build/client/_app/version.json +1 -1
- package/build/client/_app/version.json.br +0 -0
- package/build/client/_app/version.json.gz +0 -0
- package/build/handler.js +7 -7
- package/build/index.js +7 -7
- package/build/server/chunks/chunks/{context.js-Cg-Pih8x.js → context.js-BJfk3ZiR.js} +440 -6
- package/build/server/chunks/chunks/context.js-BJfk3ZiR.js.map +1 -0
- package/build/server/chunks/chunks/{contract.js-C6yL03Hj.js → contract.js-DRcxzb4o.js} +17 -3
- package/build/server/chunks/chunks/contract.js-DRcxzb4o.js.map +1 -0
- package/build/server/chunks/chunks/{exports.js-CKLcHEPO.js → exports.js-BcB5q0h5.js} +2 -2
- package/build/server/chunks/chunks/{exports.js-CKLcHEPO.js.map → exports.js-BcB5q0h5.js.map} +1 -1
- package/build/server/chunks/chunks/{http.js-B2joT3YT.js → http.js-DMkgmpI5.js} +2 -2
- package/build/server/chunks/chunks/{http.js-B2joT3YT.js.map → http.js-DMkgmpI5.js.map} +1 -1
- package/build/server/chunks/chunks/{internal.js-ByCfjWgU.js → internal.js-B6eePlP4.js} +3 -3
- package/build/server/chunks/chunks/{internal.js-ByCfjWgU.js.map → internal.js-B6eePlP4.js.map} +1 -1
- package/build/server/chunks/chunks/internal2.js-BlXt2rfE.js.map +1 -1
- package/build/server/chunks/chunks/{shared.js-BDdrmPL3.js → shared.js-BO7vJlPc.js} +2 -2
- package/build/server/chunks/chunks/{shared.js-BDdrmPL3.js.map → shared.js-BO7vJlPc.js.map} +1 -1
- package/build/server/chunks/chunks/{utils.js-CD_wf0ka.js → utils.js-BTV5xnNv.js} +3 -3
- package/build/server/chunks/chunks/{utils.js-CD_wf0ka.js.map → utils.js-BTV5xnNv.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/_...path_/{_server.ts.js-Cn8Ztaiw.js → _server.ts.js-m2QGyBiV.js} +3 -3
- package/build/server/chunks/entries/endpoints/api/_...path_/{_server.ts.js-Cn8Ztaiw.js.map → _server.ts.js-m2QGyBiV.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/_id_/{_server.ts.js-CrOiDQG8.js → _server.ts.js-eMNgdaf4.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/assets/_id_/{_server.ts.js-CrOiDQG8.js.map → _server.ts.js-eMNgdaf4.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/_id_/raw/{_server.ts.js-CpJ_OzDV.js → _server.ts.js-CEQd4Wxn.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/assets/_id_/raw/{_server.ts.js-CpJ_OzDV.js.map → _server.ts.js-CEQd4Wxn.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/_id_/reimport/{_server.ts.js-BCZRAtqn.js → _server.ts.js-B2JoGCzy.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/assets/_id_/reimport/{_server.ts.js-BCZRAtqn.js.map → _server.ts.js-B2JoGCzy.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/{_server.ts.js-CwyV_AMP.js → _server.ts.js-DTpkVywC.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/assets/{_server.ts.js-CwyV_AMP.js.map → _server.ts.js-DTpkVywC.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/delete/{_server.ts.js-BZAM3HSB.js → _server.ts.js-D6Z_pGEZ.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/assets/delete/{_server.ts.js-BZAM3HSB.js.map → _server.ts.js-D6Z_pGEZ.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/move/{_server.ts.js-CPNISyB1.js → _server.ts.js-CnDi9p0a.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/assets/move/{_server.ts.js-CPNISyB1.js.map → _server.ts.js-CnDi9p0a.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/folders/_path_/{_server.ts.js-5R7ywd4H.js → _server.ts.js-BCzuPX5Z.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/folders/_path_/{_server.ts.js-5R7ywd4H.js.map → _server.ts.js-BCzuPX5Z.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/folders/{_server.ts.js-ZQiaSMNA.js → _server.ts.js-CGbYyJ6S.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/folders/{_server.ts.js-ZQiaSMNA.js.map → _server.ts.js-CGbYyJ6S.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/imports/{_server.ts.js-CE29dwBF.js → _server.ts.js-CL_89klb.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/imports/{_server.ts.js-CE29dwBF.js.map → _server.ts.js-CL_89klb.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/manifests/_name_/{_server.ts.js-CU3gpNeg.js → _server.ts.js-DZUKtjz9.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/manifests/_name_/{_server.ts.js-CU3gpNeg.js.map → _server.ts.js-DZUKtjz9.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/manifests/{_server.ts.js-BhJDoTAq.js → _server.ts.js-Dz25LG_P.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/manifests/{_server.ts.js-BhJDoTAq.js.map → _server.ts.js-Dz25LG_P.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/raw/adopt/{_server.ts.js-B72NkhD1.js → _server.ts.js-C-NuN3JJ.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/raw/adopt/{_server.ts.js-B72NkhD1.js.map → _server.ts.js-C-NuN3JJ.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/raw/edited/accept/{_server.ts.js-CWK5em43.js → _server.ts.js-CwL9UPh3.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/raw/edited/accept/{_server.ts.js-CWK5em43.js.map → _server.ts.js-CwL9UPh3.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/raw/edited/dismiss/{_server.ts.js-BBxmYiE6.js → _server.ts.js-DanXYrj1.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/raw/edited/dismiss/{_server.ts.js-BBxmYiE6.js.map → _server.ts.js-DanXYrj1.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/reconcile/{_server.ts.js-DR4xHt0w.js → _server.ts.js-BZrun0up.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/reconcile/{_server.ts.js-DR4xHt0w.js.map → _server.ts.js-BZrun0up.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/reveal/{_server.ts.js-CfiypExu.js → _server.ts.js-DQOabHbS.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/reveal/{_server.ts.js-CfiypExu.js.map → _server.ts.js-DQOabHbS.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/state/{_server.ts.js-DjmTUX8d.js → _server.ts.js-k8Ueydx1.js} +4 -4
- package/build/server/chunks/entries/endpoints/api/state/{_server.ts.js-DjmTUX8d.js.map → _server.ts.js-k8Ueydx1.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/usage/_server.ts.js-DmMmiFiu.js +82 -0
- package/build/server/chunks/entries/endpoints/api/usage/_server.ts.js-DmMmiFiu.js.map +1 -0
- package/build/server/chunks/entries/endpoints/files/_...path_/{_server.ts.js-qfzdfNHQ.js → _server.ts.js-CT7yOdDS.js} +3 -3
- package/build/server/chunks/entries/endpoints/files/_...path_/{_server.ts.js-qfzdfNHQ.js.map → _server.ts.js-CT7yOdDS.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/files/proxy/_...path_/{_server.ts.js-CS_5SEL-.js → _server.ts.js-BQTC0OSC.js} +4 -4
- package/build/server/chunks/entries/endpoints/files/proxy/_...path_/{_server.ts.js-CS_5SEL-.js.map → _server.ts.js-BQTC0OSC.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/files/raw/_...path_/{_server.ts.js-Cv-y3Nqu.js → _server.ts.js-mv9cqSuS.js} +4 -4
- package/build/server/chunks/entries/endpoints/files/raw/_...path_/{_server.ts.js-Cv-y3Nqu.js.map → _server.ts.js-mv9cqSuS.js.map} +1 -1
- package/build/server/chunks/entries/{hooks.server.js-WOShZElI.js → hooks.server.js-BNQO3cZr.js} +3 -3
- package/build/server/chunks/entries/{hooks.server.js-WOShZElI.js.map → hooks.server.js-BNQO3cZr.js.map} +1 -1
- package/build/server/chunks/{handler-CIOnH690.js → handler-DQdjBhko.js} +5 -5
- package/build/server/chunks/{handler-CIOnH690.js.map → handler-DQdjBhko.js.map} +1 -1
- package/build/server/chunks/{index.js-nSuivP3M.js → index.js-DtKY5QD2.js} +5 -5
- package/build/server/chunks/{index.js-nSuivP3M.js.map → index.js-DtKY5QD2.js.map} +1 -1
- package/build/server/chunks/{manifest.js-CIFnCWGv.js → manifest.js-CJMiboeI.js} +35 -28
- package/build/server/chunks/manifest.js-CJMiboeI.js.map +1 -0
- package/build/server/chunks/nodes/{0.js-BSbmgTIm.js → 0.js-Ce__dNtc.js} +2 -2
- package/build/server/chunks/nodes/{0.js-BSbmgTIm.js.map → 0.js-Ce__dNtc.js.map} +1 -1
- package/build/server/chunks/nodes/1.js-BIwe5V8L.js +7 -0
- package/build/server/chunks/nodes/{1.js-kvz4iUXK.js.map → 1.js-BIwe5V8L.js.map} +1 -1
- package/build/server/chunks/nodes/2.js-Bj7c0eH1.js +7 -0
- package/build/server/chunks/nodes/{2.js-B9ILHJtB.js.map → 2.js-Bj7c0eH1.js.map} +1 -1
- package/build/server/chunks/nodes/3.js-BMOf9FTK.js +7 -0
- package/build/server/chunks/nodes/3.js-BMOf9FTK.js.map +1 -0
- package/build/server/chunks/nodes/4.js-CNLb7Xc5.js +7 -0
- package/build/server/chunks/nodes/4.js-CNLb7Xc5.js.map +1 -0
- package/dist/cli.js +6 -1
- package/dist/config.d.ts +1 -1
- package/dist/core/api-types.d.ts +36 -1
- package/dist/core/config.d.ts +35 -0
- package/dist/core/index.d.ts +2 -2
- package/dist/runtime/chroma-key-video-lifecycle.d.ts +2 -2
- package/dist/runtime/chroma-key-video-lifecycle.js +221 -124
- package/dist/runtime/components/ChromaKeyVideo.svelte +13 -2
- package/dist/runtime/components/Slice.svelte +22 -12
- package/dist/runtime/components/Slice.svelte.d.ts +3 -6
- package/dist/runtime/components/SliceCanvas.svelte +51 -40
- package/dist/runtime/components/SliceCanvas.svelte.d.ts +2 -2
- package/dist/runtime/components/SliceDom.svelte +96 -42
- package/dist/runtime/components/SliceDom.svelte.d.ts +2 -2
- package/dist/runtime/slice-source-lifecycle.d.ts +14 -0
- package/dist/runtime/slice-source-lifecycle.js +70 -0
- package/dist/server/check.d.ts +6 -0
- package/dist/server/check.js +4 -1
- package/dist/server/cli-commands.d.ts +3 -1
- package/dist/server/cli-commands.js +117 -2
- package/dist/server/codegen.d.ts +3 -0
- package/dist/server/codegen.js +19 -2
- package/dist/server/config-loader.d.ts +3 -1
- package/dist/server/config-loader.js +13 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +1 -1
- package/dist/server/operations.d.ts +7 -1
- package/dist/server/operations.js +85 -2
- package/dist/server/start.d.ts +8 -0
- package/dist/server/start.js +24 -0
- package/dist/server/usage.d.ts +24 -0
- package/dist/server/usage.js +441 -0
- package/package.json +4 -1
- package/build/client/_app/immutable/assets/3.CmXD8k9d.css +0 -1
- package/build/client/_app/immutable/assets/3.CmXD8k9d.css.br +0 -0
- package/build/client/_app/immutable/assets/3.CmXD8k9d.css.gz +0 -0
- package/build/client/_app/immutable/assets/4.p004hmEN.css +0 -1
- package/build/client/_app/immutable/assets/4.p004hmEN.css.br +0 -0
- package/build/client/_app/immutable/assets/4.p004hmEN.css.gz +0 -0
- package/build/client/_app/immutable/assets/LibraryContextMenu.BSnKt_Is.css +0 -1
- package/build/client/_app/immutable/assets/LibraryContextMenu.BSnKt_Is.css.br +0 -0
- package/build/client/_app/immutable/assets/LibraryContextMenu.BSnKt_Is.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BD3hQKzV.js +0 -1
- package/build/client/_app/immutable/chunks/BD3hQKzV.js.br +0 -0
- package/build/client/_app/immutable/chunks/BD3hQKzV.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C3HGm51f.js +0 -1
- package/build/client/_app/immutable/chunks/C3HGm51f.js.br +0 -0
- package/build/client/_app/immutable/chunks/C3HGm51f.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C7OUKWnm.js +0 -1
- package/build/client/_app/immutable/chunks/C7OUKWnm.js.br +0 -0
- package/build/client/_app/immutable/chunks/C7OUKWnm.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CaKQ_luf.js +0 -1
- package/build/client/_app/immutable/chunks/CaKQ_luf.js.br +0 -0
- package/build/client/_app/immutable/chunks/CaKQ_luf.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CliRE4wo.js.br +0 -1
- package/build/client/_app/immutable/chunks/CliRE4wo.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DPZDGjcn.js +0 -1
- package/build/client/_app/immutable/chunks/DPZDGjcn.js.br +0 -0
- package/build/client/_app/immutable/chunks/DPZDGjcn.js.gz +0 -0
- package/build/client/_app/immutable/chunks/JSnjcoVL.js +0 -108
- package/build/client/_app/immutable/chunks/JSnjcoVL.js.br +0 -0
- package/build/client/_app/immutable/chunks/JSnjcoVL.js.gz +0 -0
- package/build/client/_app/immutable/chunks/NblqapDQ.js +0 -3
- package/build/client/_app/immutable/chunks/NblqapDQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/NblqapDQ.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.p0Th9Q3c.js +0 -2
- package/build/client/_app/immutable/entry/app.p0Th9Q3c.js.br +0 -0
- package/build/client/_app/immutable/entry/app.p0Th9Q3c.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.p06L3A6u.js +0 -1
- package/build/client/_app/immutable/entry/start.p06L3A6u.js.br +0 -0
- package/build/client/_app/immutable/entry/start.p06L3A6u.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.D2yDRY2E.js +0 -2
- package/build/client/_app/immutable/nodes/0.D2yDRY2E.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.D2yDRY2E.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.nLMgahSZ.js +0 -1
- package/build/client/_app/immutable/nodes/1.nLMgahSZ.js.br +0 -3
- package/build/client/_app/immutable/nodes/1.nLMgahSZ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.Cr-DsqQM.js +0 -3
- package/build/client/_app/immutable/nodes/2.Cr-DsqQM.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.Cr-DsqQM.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.CmsMY1VJ.js +0 -1
- package/build/client/_app/immutable/nodes/3.CmsMY1VJ.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.CmsMY1VJ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.CeeDVfsm.js +0 -2
- package/build/client/_app/immutable/nodes/4.CeeDVfsm.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.CeeDVfsm.js.gz +0 -0
- package/build/server/chunks/chunks/context.js-Cg-Pih8x.js.map +0 -1
- package/build/server/chunks/chunks/contract.js-C6yL03Hj.js.map +0 -1
- package/build/server/chunks/manifest.js-CIFnCWGv.js.map +0 -1
- package/build/server/chunks/nodes/1.js-kvz4iUXK.js +0 -7
- package/build/server/chunks/nodes/2.js-B9ILHJtB.js +0 -7
- package/build/server/chunks/nodes/3.js-YAjQeV5C.js +0 -7
- package/build/server/chunks/nodes/3.js-YAjQeV5C.js.map +0 -1
- package/build/server/chunks/nodes/4.js-7My4KJNM.js +0 -7
- package/build/server/chunks/nodes/4.js-7My4KJNM.js.map +0 -1
|
@@ -13,25 +13,28 @@
|
|
|
13
13
|
canvas is enlarged by the overdraw's destination size and offset negatively
|
|
14
14
|
(see `computeCanvasPaintLayout`), so the baked shadow/glow paints outside
|
|
15
15
|
the layout box while the wrapper (and therefore the layout) keeps the box
|
|
16
|
-
size — exactly where the DOM backend positions its
|
|
16
|
+
size — exactly where the DOM backend positions its border-image paint.
|
|
17
17
|
-->
|
|
18
18
|
<script lang="ts">
|
|
19
|
-
import
|
|
20
|
-
|
|
19
|
+
import {
|
|
20
|
+
computeCanvasPaintLayout,
|
|
21
|
+
computeRenderCells,
|
|
22
|
+
type CanvasPaintLayout
|
|
23
|
+
} from '../geometry.js';
|
|
21
24
|
import { observeBorderBoxSize } from '../observe-border-box-size.js';
|
|
25
|
+
import type { LoadedSliceSnapshot } from '../slice-source-lifecycle.js';
|
|
22
26
|
|
|
23
27
|
interface Props {
|
|
24
|
-
|
|
28
|
+
snapshot: LoadedSliceSnapshot | null;
|
|
25
29
|
/** Accessible label for the rendered graphic. */
|
|
26
30
|
alt?: string;
|
|
27
31
|
class?: string;
|
|
28
32
|
}
|
|
29
33
|
|
|
30
|
-
let {
|
|
34
|
+
let { snapshot, alt = '', class: className = '' }: Props = $props();
|
|
31
35
|
|
|
32
36
|
let root = $state<HTMLDivElement>();
|
|
33
37
|
let canvas = $state<HTMLCanvasElement>();
|
|
34
|
-
let image = $state<HTMLImageElement>();
|
|
35
38
|
let boxWidth = $state(0);
|
|
36
39
|
let boxHeight = $state(0);
|
|
37
40
|
let devicePixelRatio = $state(1);
|
|
@@ -39,23 +42,6 @@
|
|
|
39
42
|
// box nor the entry changed (belt and braces alongside the ResizeObserver).
|
|
40
43
|
let redrawTick = $state(0);
|
|
41
44
|
|
|
42
|
-
// Load the source image once per entry `src` — the same plain URL the DOM
|
|
43
|
-
// backend paints (slices are image-backed: the browser cache owns the bytes,
|
|
44
|
-
// preload retains nothing to resolve).
|
|
45
|
-
$effect(() => {
|
|
46
|
-
const sourceUrl = src.src;
|
|
47
|
-
const next = new Image();
|
|
48
|
-
let cancelled = false;
|
|
49
|
-
next.onload = () => {
|
|
50
|
-
if (!cancelled) image = next;
|
|
51
|
-
};
|
|
52
|
-
next.src = sourceUrl;
|
|
53
|
-
return () => {
|
|
54
|
-
cancelled = true;
|
|
55
|
-
next.onload = null;
|
|
56
|
-
};
|
|
57
|
-
});
|
|
58
|
-
|
|
59
45
|
// Track the display's devicePixelRatio: a resolution media query fires
|
|
60
46
|
// exactly when the DPR leaves the tracked value (browser zoom, moving the
|
|
61
47
|
// window to another display). The tracked state must be READ first — a
|
|
@@ -83,40 +69,65 @@
|
|
|
83
69
|
});
|
|
84
70
|
});
|
|
85
71
|
|
|
86
|
-
const
|
|
72
|
+
const emptyLayout: CanvasPaintLayout = {
|
|
73
|
+
cssLeft: 0,
|
|
74
|
+
cssTop: 0,
|
|
75
|
+
cssWidth: 0,
|
|
76
|
+
cssHeight: 0,
|
|
77
|
+
backingWidth: 0,
|
|
78
|
+
backingHeight: 0,
|
|
79
|
+
originX: 0,
|
|
80
|
+
originY: 0
|
|
81
|
+
};
|
|
82
|
+
const layout = $derived.by(() => {
|
|
83
|
+
const current = snapshot;
|
|
84
|
+
return current
|
|
85
|
+
? computeCanvasPaintLayout(current.entry, boxWidth, boxHeight, devicePixelRatio)
|
|
86
|
+
: emptyLayout;
|
|
87
|
+
});
|
|
87
88
|
|
|
88
|
-
// Redraw when
|
|
89
|
+
// Redraw only when a committed snapshot, the box, DPR, or window changes.
|
|
89
90
|
$effect(() => {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
void layout;
|
|
91
|
+
const current = snapshot;
|
|
92
|
+
const currentLayout = layout;
|
|
93
93
|
void redrawTick;
|
|
94
|
-
draw();
|
|
94
|
+
draw(current, currentLayout);
|
|
95
95
|
});
|
|
96
96
|
|
|
97
|
-
function draw(): void {
|
|
97
|
+
function draw(current: LoadedSliceSnapshot | null, currentLayout: CanvasPaintLayout): void {
|
|
98
98
|
const element = canvas;
|
|
99
|
-
|
|
100
|
-
if (!
|
|
101
|
-
if (boxWidth === 0 || boxHeight === 0) {
|
|
99
|
+
if (!element) return;
|
|
100
|
+
if (!current || boxWidth === 0 || boxHeight === 0) {
|
|
102
101
|
element.width = 0;
|
|
103
102
|
element.height = 0;
|
|
104
103
|
return;
|
|
105
104
|
}
|
|
106
105
|
|
|
107
|
-
element.width =
|
|
108
|
-
element.height =
|
|
106
|
+
element.width = currentLayout.backingWidth;
|
|
107
|
+
element.height = currentLayout.backingHeight;
|
|
109
108
|
|
|
110
109
|
const context = element.getContext('2d');
|
|
111
110
|
if (!context) return;
|
|
112
111
|
// Origin at the layout box's top-left, so the (possibly negative) cell
|
|
113
112
|
// coordinates from computeRenderCells apply directly.
|
|
114
|
-
context.setTransform(
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
113
|
+
context.setTransform(
|
|
114
|
+
devicePixelRatio,
|
|
115
|
+
0,
|
|
116
|
+
0,
|
|
117
|
+
devicePixelRatio,
|
|
118
|
+
currentLayout.originX,
|
|
119
|
+
currentLayout.originY
|
|
120
|
+
);
|
|
121
|
+
context.clearRect(
|
|
122
|
+
currentLayout.cssLeft,
|
|
123
|
+
currentLayout.cssTop,
|
|
124
|
+
currentLayout.cssWidth,
|
|
125
|
+
currentLayout.cssHeight
|
|
126
|
+
);
|
|
127
|
+
|
|
128
|
+
for (const cell of computeRenderCells(current.entry, boxWidth, boxHeight)) {
|
|
118
129
|
context.drawImage(
|
|
119
|
-
|
|
130
|
+
current.image,
|
|
120
131
|
cell.sx,
|
|
121
132
|
cell.sy,
|
|
122
133
|
cell.sw,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LoadedSliceSnapshot } from '../slice-source-lifecycle.js';
|
|
2
2
|
interface Props {
|
|
3
|
-
|
|
3
|
+
snapshot: LoadedSliceSnapshot | null;
|
|
4
4
|
/** Accessible label for the rendered graphic. */
|
|
5
5
|
alt?: string;
|
|
6
6
|
class?: string;
|
|
@@ -5,33 +5,96 @@
|
|
|
5
5
|
in the entry. Private: hosts render `Slice.svelte`, which dispatches between
|
|
6
6
|
this and the canvas backend.
|
|
7
7
|
|
|
8
|
-
Fills its container and measures it (ResizeObserver), then paints
|
|
9
|
-
slice
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
With overdraw the
|
|
14
|
-
root switches to overflow: visible and the baked shadow/glow draws
|
|
15
|
-
layout box.
|
|
8
|
+
Fills its container and measures it (ResizeObserver), then paints the complete
|
|
9
|
+
slice through one CSS border-image. The browser still stretches the same source
|
|
10
|
+
regions computed by `computeRenderCells`, but rasterizes them as one border
|
|
11
|
+
image instead of separate clipped elements. Shared slice edges therefore cannot
|
|
12
|
+
expose the background under fractional transforms.
|
|
13
|
+
With overdraw the paint element extends past the container (negative offsets),
|
|
14
|
+
so the root switches to overflow: visible and the baked shadow/glow draws
|
|
15
|
+
outside the layout box.
|
|
16
16
|
-->
|
|
17
17
|
<script lang="ts">
|
|
18
|
-
import type { SliceManifestEntry } from '../../core/index.js';
|
|
19
|
-
import { computeRenderCells, effectiveOverdraw } from '../geometry.js';
|
|
18
|
+
import type { SliceInsets, SliceManifestEntry } from '../../core/index.js';
|
|
19
|
+
import { computeRenderCells, effectiveInsets, effectiveOverdraw } from '../geometry.js';
|
|
20
20
|
import { observeBorderBoxSize } from '../observe-border-box-size.js';
|
|
21
|
+
import type { LoadedSliceSnapshot } from '../slice-source-lifecycle.js';
|
|
21
22
|
|
|
22
23
|
interface Props {
|
|
23
|
-
|
|
24
|
+
snapshot: LoadedSliceSnapshot | null;
|
|
24
25
|
/** Accessible label for the rendered graphic. */
|
|
25
26
|
alt?: string;
|
|
26
27
|
class?: string;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
let {
|
|
30
|
+
let { snapshot, alt = '', class: className = '' }: Props = $props();
|
|
30
31
|
|
|
31
32
|
let root = $state<HTMLDivElement>();
|
|
32
33
|
let boxWidth = $state(0);
|
|
33
34
|
let boxHeight = $state(0);
|
|
34
35
|
|
|
36
|
+
interface BorderImagePaint {
|
|
37
|
+
left: number;
|
|
38
|
+
top: number;
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
slices: SliceInsets;
|
|
42
|
+
widths: SliceInsets;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function clamp(value: number, min: number, max: number): number {
|
|
46
|
+
return Math.max(min, Math.min(max, value));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function computeBorderImagePaint(
|
|
50
|
+
entry: SliceManifestEntry,
|
|
51
|
+
width: number,
|
|
52
|
+
height: number
|
|
53
|
+
): BorderImagePaint | null {
|
|
54
|
+
const cells = computeRenderCells(entry, width, height);
|
|
55
|
+
if (cells.length === 0) return null;
|
|
56
|
+
|
|
57
|
+
const effective = effectiveInsets(entry);
|
|
58
|
+
const leftSlice = clamp(effective.left, 0, entry.sourceWidth);
|
|
59
|
+
const rightSlice = clamp(effective.right, 0, entry.sourceWidth - leftSlice);
|
|
60
|
+
const topSlice = clamp(effective.top, 0, entry.sourceHeight);
|
|
61
|
+
const bottomSlice = clamp(effective.bottom, 0, entry.sourceHeight - topSlice);
|
|
62
|
+
const slices = {
|
|
63
|
+
top: topSlice,
|
|
64
|
+
right: rightSlice,
|
|
65
|
+
bottom: bottomSlice,
|
|
66
|
+
left: leftSlice
|
|
67
|
+
};
|
|
68
|
+
const left = Math.min(...cells.map((cell) => cell.dx));
|
|
69
|
+
const top = Math.min(...cells.map((cell) => cell.dy));
|
|
70
|
+
const right = Math.max(...cells.map((cell) => cell.dx + cell.dw));
|
|
71
|
+
const bottom = Math.max(...cells.map((cell) => cell.dy + cell.dh));
|
|
72
|
+
|
|
73
|
+
return {
|
|
74
|
+
left,
|
|
75
|
+
top,
|
|
76
|
+
width: right - left,
|
|
77
|
+
height: bottom - top,
|
|
78
|
+
slices,
|
|
79
|
+
widths: {
|
|
80
|
+
top: cells.find((cell) => topSlice > 0 && cell.sy === 0 && cell.sh === topSlice)?.dh ?? 0,
|
|
81
|
+
right:
|
|
82
|
+
cells.find(
|
|
83
|
+
(cell) =>
|
|
84
|
+
rightSlice > 0 && cell.sx === entry.sourceWidth - rightSlice && cell.sw === rightSlice
|
|
85
|
+
)?.dw ?? 0,
|
|
86
|
+
bottom:
|
|
87
|
+
cells.find(
|
|
88
|
+
(cell) =>
|
|
89
|
+
bottomSlice > 0 &&
|
|
90
|
+
cell.sy === entry.sourceHeight - bottomSlice &&
|
|
91
|
+
cell.sh === bottomSlice
|
|
92
|
+
)?.dh ?? 0,
|
|
93
|
+
left: cells.find((cell) => leftSlice > 0 && cell.sx === 0 && cell.sw === leftSlice)?.dw ?? 0
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
35
98
|
$effect(() => {
|
|
36
99
|
const element = root;
|
|
37
100
|
if (!element) return;
|
|
@@ -41,9 +104,11 @@
|
|
|
41
104
|
});
|
|
42
105
|
});
|
|
43
106
|
|
|
44
|
-
const
|
|
107
|
+
const entry = $derived(snapshot?.entry ?? null);
|
|
108
|
+
const paint = $derived(entry ? computeBorderImagePaint(entry, boxWidth, boxHeight) : null);
|
|
45
109
|
const hasOverdraw = $derived.by(() => {
|
|
46
|
-
|
|
110
|
+
if (!entry) return false;
|
|
111
|
+
const overdraw = effectiveOverdraw(entry);
|
|
47
112
|
return overdraw.top > 0 || overdraw.right > 0 || overdraw.bottom > 0 || overdraw.left > 0;
|
|
48
113
|
});
|
|
49
114
|
</script>
|
|
@@ -55,25 +120,18 @@
|
|
|
55
120
|
role={alt ? 'img' : undefined}
|
|
56
121
|
aria-label={alt || undefined}
|
|
57
122
|
>
|
|
58
|
-
{#
|
|
123
|
+
{#if entry && paint}
|
|
59
124
|
<div
|
|
60
|
-
class="fundus-
|
|
61
|
-
style:left="{
|
|
62
|
-
style:top="{
|
|
63
|
-
style:width="{
|
|
64
|
-
style:height="{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
style:width="{(src.sourceWidth / cell.sw) * 100}%"
|
|
71
|
-
style:height="{(src.sourceHeight / cell.sh) * 100}%"
|
|
72
|
-
style:left="{(-cell.sx / cell.sw) * 100}%"
|
|
73
|
-
style:top="{(-cell.sy / cell.sh) * 100}%"
|
|
74
|
-
/>
|
|
75
|
-
</div>
|
|
76
|
-
{/each}
|
|
125
|
+
class="fundus-slice__paint"
|
|
126
|
+
style:left="{paint.left}px"
|
|
127
|
+
style:top="{paint.top}px"
|
|
128
|
+
style:width="{paint.width}px"
|
|
129
|
+
style:height="{paint.height}px"
|
|
130
|
+
style:border-image-source={`url(${JSON.stringify(entry.src)})`}
|
|
131
|
+
style:border-image-slice={`${paint.slices.top} ${paint.slices.right} ${paint.slices.bottom} ${paint.slices.left} fill`}
|
|
132
|
+
style:border-image-width={`${paint.widths.top}px ${paint.widths.right}px ${paint.widths.bottom}px ${paint.widths.left}px`}
|
|
133
|
+
></div>
|
|
134
|
+
{/if}
|
|
77
135
|
</div>
|
|
78
136
|
|
|
79
137
|
<style>
|
|
@@ -84,21 +142,17 @@
|
|
|
84
142
|
overflow: hidden;
|
|
85
143
|
}
|
|
86
144
|
|
|
87
|
-
/* Overdraw
|
|
145
|
+
/* Overdraw deliberately extends the paint past the box — don't clip it. */
|
|
88
146
|
.fundus-slice--overdraw {
|
|
89
147
|
overflow: visible;
|
|
90
148
|
}
|
|
91
149
|
|
|
92
|
-
.fundus-
|
|
93
|
-
position: absolute;
|
|
94
|
-
overflow: hidden;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.fundus-slice__cell img {
|
|
150
|
+
.fundus-slice__paint {
|
|
98
151
|
position: absolute;
|
|
99
|
-
|
|
100
|
-
|
|
152
|
+
box-sizing: border-box;
|
|
153
|
+
border-width: 0;
|
|
154
|
+
border-style: solid;
|
|
155
|
+
border-image-repeat: stretch;
|
|
101
156
|
pointer-events: none;
|
|
102
|
-
user-select: none;
|
|
103
157
|
}
|
|
104
158
|
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { LoadedSliceSnapshot } from '../slice-source-lifecycle.js';
|
|
2
2
|
interface Props {
|
|
3
|
-
|
|
3
|
+
snapshot: LoadedSliceSnapshot | null;
|
|
4
4
|
/** Accessible label for the rendered graphic. */
|
|
5
5
|
alt?: string;
|
|
6
6
|
class?: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SliceManifestEntry } from '../core/index.js';
|
|
2
|
+
export interface LoadedSliceSnapshot {
|
|
3
|
+
entry: SliceManifestEntry;
|
|
4
|
+
image: HTMLImageElement;
|
|
5
|
+
}
|
|
6
|
+
export type SliceImageLoader = (url: string) => Promise<HTMLImageElement>;
|
|
7
|
+
export declare function loadSliceImage(url: string): Promise<HTMLImageElement>;
|
|
8
|
+
/** Coordinates requested slice entries with the last image-ready snapshot. */
|
|
9
|
+
export declare class SliceSourceLifecycle {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(commit: (snapshot: LoadedSliceSnapshot) => void, loadImage?: SliceImageLoader);
|
|
12
|
+
request(entry: SliceManifestEntry): void;
|
|
13
|
+
dispose(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export function loadSliceImage(url) {
|
|
2
|
+
const image = new Image();
|
|
3
|
+
image.decoding = 'async';
|
|
4
|
+
image.src = url;
|
|
5
|
+
return image.decode().then(() => image);
|
|
6
|
+
}
|
|
7
|
+
/** Coordinates requested slice entries with the last image-ready snapshot. */
|
|
8
|
+
export class SliceSourceLifecycle {
|
|
9
|
+
#loadImage;
|
|
10
|
+
#commit;
|
|
11
|
+
#requestedEntry = null;
|
|
12
|
+
#displayedSnapshot = null;
|
|
13
|
+
#inFlight = new Map();
|
|
14
|
+
#disposed = false;
|
|
15
|
+
constructor(commit, loadImage = loadSliceImage) {
|
|
16
|
+
this.#commit = commit;
|
|
17
|
+
this.#loadImage = loadImage;
|
|
18
|
+
}
|
|
19
|
+
request(entry) {
|
|
20
|
+
if (this.#disposed)
|
|
21
|
+
return;
|
|
22
|
+
this.#requestedEntry = entry;
|
|
23
|
+
const displayed = this.#displayedSnapshot;
|
|
24
|
+
if (displayed?.entry.src === entry.src) {
|
|
25
|
+
this.#commitSnapshot({ entry, image: displayed.image });
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (this.#inFlight.has(entry.src))
|
|
29
|
+
return;
|
|
30
|
+
let promise;
|
|
31
|
+
try {
|
|
32
|
+
promise = Promise.resolve(this.#loadImage(entry.src));
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
promise = Promise.reject(error);
|
|
36
|
+
}
|
|
37
|
+
const load = { promise };
|
|
38
|
+
this.#inFlight.set(entry.src, load);
|
|
39
|
+
void promise.then((image) => this.#settleSuccess(entry.src, load, image), () => this.#settleFailure(entry.src, load));
|
|
40
|
+
}
|
|
41
|
+
dispose() {
|
|
42
|
+
if (this.#disposed)
|
|
43
|
+
return;
|
|
44
|
+
this.#disposed = true;
|
|
45
|
+
this.#requestedEntry = null;
|
|
46
|
+
this.#displayedSnapshot = null;
|
|
47
|
+
this.#inFlight.clear();
|
|
48
|
+
}
|
|
49
|
+
#settleSuccess(url, load, image) {
|
|
50
|
+
if (this.#inFlight.get(url) !== load)
|
|
51
|
+
return;
|
|
52
|
+
this.#inFlight.delete(url);
|
|
53
|
+
if (this.#disposed)
|
|
54
|
+
return;
|
|
55
|
+
const requested = this.#requestedEntry;
|
|
56
|
+
if (!requested || requested.src !== url)
|
|
57
|
+
return;
|
|
58
|
+
this.#commitSnapshot({ entry: requested, image });
|
|
59
|
+
}
|
|
60
|
+
#settleFailure(url, load) {
|
|
61
|
+
if (this.#inFlight.get(url) === load)
|
|
62
|
+
this.#inFlight.delete(url);
|
|
63
|
+
}
|
|
64
|
+
#commitSnapshot(snapshot) {
|
|
65
|
+
if (this.#disposed)
|
|
66
|
+
return;
|
|
67
|
+
this.#displayedSnapshot = snapshot;
|
|
68
|
+
this.#commit(snapshot);
|
|
69
|
+
}
|
|
70
|
+
}
|
package/dist/server/check.d.ts
CHANGED
|
@@ -20,9 +20,15 @@ export interface CheckReport {
|
|
|
20
20
|
errors: CheckFinding[];
|
|
21
21
|
/** Advisory findings — fatal unless the caller allows warnings. */
|
|
22
22
|
warnings: CheckFinding[];
|
|
23
|
+
/** Non-fatal integration guidance that never changes the exit status. */
|
|
24
|
+
advisories: CheckAdvisory[];
|
|
23
25
|
assetCount: number;
|
|
24
26
|
manifestCount: number;
|
|
25
27
|
}
|
|
28
|
+
export interface CheckAdvisory {
|
|
29
|
+
kind: 'usage-not-configured';
|
|
30
|
+
message: string;
|
|
31
|
+
}
|
|
26
32
|
export declare function runCheck(projectRoot: string, registry?: ServerPluginRegistry): Promise<CheckReport>;
|
|
27
33
|
/** Pure expansion of a raw classification into canonical hard check findings. */
|
|
28
34
|
export declare function rawCheckFindings(library: Library, raw: RawClassification, registry: ServerPluginRegistry, validationIssues: ValidationIssueDto[]): CheckFinding[];
|
package/dist/server/check.js
CHANGED
|
@@ -10,7 +10,7 @@ import { existsSync } from 'node:fs';
|
|
|
10
10
|
import { readFile } from 'node:fs/promises';
|
|
11
11
|
import { join } from 'node:path';
|
|
12
12
|
import { collectAllReferences, compareCodeUnits, computeLibraryMembership, rawFileNameOfPath, typesForFileName } from '../core/index.js';
|
|
13
|
-
import { loadConfig } from './config-loader.js';
|
|
13
|
+
import { loadConfig, USAGE_NOT_CONFIGURED_MESSAGE } from './config-loader.js';
|
|
14
14
|
import { LibraryStore } from './library-store.js';
|
|
15
15
|
import { classifyRawDirectory } from './raw-reconciliation.js';
|
|
16
16
|
import { buildManifestEntries, manifestModuleFileName, renderManifestModule, strayGeneratedModuleNames } from './codegen.js';
|
|
@@ -28,6 +28,9 @@ export async function runCheck(projectRoot, registry = serverPluginsByType) {
|
|
|
28
28
|
const report = {
|
|
29
29
|
errors: [],
|
|
30
30
|
warnings: [],
|
|
31
|
+
advisories: config.usage === null
|
|
32
|
+
? [{ kind: 'usage-not-configured', message: USAGE_NOT_CONFIGURED_MESSAGE }]
|
|
33
|
+
: [],
|
|
31
34
|
assetCount: Object.keys(library.assets).length,
|
|
32
35
|
manifestCount: Object.keys(library.manifests).length
|
|
33
36
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const STATE_HELP = "fundus state \u2014 the full project state in one document\n\nUsage: fundus state [--json]\n\nThe agent's one-stop overview: every asset (type, raw file, parameters,\nexplicit + passive manifest memberships, proxy status, reference edges,\nwarnings), every manifest (members, delivered bytes), library-level\nvalidation issues, and the available preset names per asset type.\n\nFlags:\n --json print {\"ok\": true, \"state\": <FundusStateDto>} on stdout\n --help this help\n\nRead-only: nothing is processed or written.\n\nExample:\n fundus state --json | jq '.state.assets[].id'\n";
|
|
2
2
|
export declare function runStateCommand(argumentList: string[]): Promise<void>;
|
|
3
|
+
export declare const USAGE_HELP = "fundus usage \u2014 inspect typed source references to assets\n\nUsage: fundus usage [assetId] [--unused] [--json]\n\nWithout an asset id, analyzes every asset and prints its used, unused, or\nunknown status. With an asset id, also returns the concrete source locations,\nmanifest roots, and dependency paths that attribute those usages.\n\nFlags:\n --unused only return conclusively unused assets; cannot be combined with an asset id\n --json print {\"ok\": true, \"assets\": [<usage record>, \u2026]}\n Source references omit editor open tokens, which are meaningful\n only inside the persistent Fundus server process.\n --help this help\n\nRead-only: nothing is processed or written. Requires usage.referenceProvider\nand usage.openLocation in fundus.config.ts.\n\nExamples:\n fundus usage --unused\n fundus usage navigationPanel --json\n";
|
|
4
|
+
export declare function runUsageCommand(argumentList: string[]): Promise<void>;
|
|
3
5
|
export declare const ASSET_HELP = "fundus asset \u2014 inspect and mutate assets\n\nUsage: fundus asset <subcommand> \u2026\n\nEvery mutation runs the full editor autosave chain: write library \u2192\nprocess affected assets \u2192 regenerate manifest modules. There is no\nseparate apply/sync step. All subcommands accept --json (a single JSON\ndocument on stdout) and --help.\n\nSubcommands:\n list list assets (--manifest, --type, --warnings-only)\n show one asset in detail\n ingest acquire a file or Figma selection as a typed asset\n reimport refresh an asset from its saved source\n replace replace an asset's raw file while preserving its metadata\n set merge parameters and/or replace manifest membership\n rename rename an asset id\n move move an asset to a folder or root\n delete delete an asset (record, raw file, proxies)\n\nRun `fundus asset <subcommand> --help` for the focused page (flags,\nsemantics, an example) \u2014 e.g. `fundus asset set --help` documents the\n--parameters merge rules.\n";
|
|
4
6
|
export declare const ASSET_LIST_HELP: string;
|
|
5
7
|
export declare const ASSET_SHOW_HELP = "fundus asset show \u2014 one asset in detail\n\nUsage: fundus asset show <id> [--json]\n\nPrints the asset's raw file, content hash, parameters, explicit +\npassive manifest memberships, proxy status, reference edges (outgoing\nand incoming), and warnings.\n\nFlags:\n --json print {\"ok\": true, \"asset\": <AssetStateDto>}\n --help this help\n\nRead-only: nothing is processed or written.\n\nExample:\n fundus asset show navigationPanel --json\n";
|
|
@@ -23,5 +25,5 @@ export declare const MANIFEST_PALETTE_HELP = "fundus manifest palette \u2014 lis
|
|
|
23
25
|
export declare function runManifestCommand(argumentList: string[]): Promise<void>;
|
|
24
26
|
export declare const BUILD_HELP = "fundus build \u2014 run the headless pipeline\n\nUsage: fundus build [--json]\n\nValidates the library, processes every stale or missing proxy, prunes\norphaned proxies, and regenerates all manifest modules. Deterministic\nand idempotent: a second run on an unchanged project processes nothing\nand rewrites byte-identical modules. Run it in CI, postinstall, or\nbefore the host build; commit the result.\n\nFlags:\n --json print {\"ok\": true, \"processed\": [\u2026], \"upToDate\": [\u2026],\n \"prunedProxies\": [\u2026], \"modulesWritten\": [\u2026],\n \"modulesRemoved\": [\u2026]} \u2014 asset ids for processing,\n file names for pruning/codegen\n --help this help\n\nA validation failure processes nothing and exits 1 (with --json:\n{\"error\": {\"message\": \u2026}}).\n\nExample:\n fundus build --json | jq '.processed'\n";
|
|
25
27
|
export declare function runBuildCommand(argumentList: string[]): Promise<void>;
|
|
26
|
-
export declare const CHECK_HELP = "fundus check \u2014 verify the committed state (the CI gate)\n\nUsage: fundus check [--allow-warnings] [--json]\n\nVerify-only, no writes: the library must validate, every delivered\nasset's committed proxy must exist under its expected name (staleness\nis a name check), the proxy directory must hold no orphans, and every\ngenerated manifest module must be byte-identical to an in-memory\nregeneration. Warnings (such as unreachable assets) fail the check\nunless --allow-warnings downgrades them. New, missing, edited, or\ninvalid entries in the raw directory are hard errors:\nopen or refocus the Fundus editor and resolve its ingestion queue.\nRaw-file errors never downgrade.\n\nFlags:\n --allow-warnings exit 0 despite warnings (errors still fail)\n --json print one report document:\n {\"ok\": <pass/fail>, \"assetCount\": \u2026, \"manifestCount\": \u2026,\n \"errors\": [<finding>, \u2026], \"warnings\": [<finding>, \u2026]}\n where a finding is {\"kind\", \"message\"} plus\n \"assetId\" / \"manifest\" / \"fileName\" where applicable\n --help this help\n\nExit codes: 0 = clean (or warnings allowed), 1 = failed. A failure to\neven run the check (e.g. no fundus.config.ts) exits 1 with the usual\n{\"error\": {\"message\": \u2026}} envelope under --json.\n\nExample:\n fundus check --json | jq '.errors[].kind'\n";
|
|
28
|
+
export declare const CHECK_HELP = "fundus check \u2014 verify the committed state (the CI gate)\n\nUsage: fundus check [--allow-warnings] [--json]\n\nVerify-only, no writes: the library must validate, every delivered\nasset's committed proxy must exist under its expected name (staleness\nis a name check), the proxy directory must hold no orphans, and every\ngenerated manifest module must be byte-identical to an in-memory\nregeneration. Warnings (such as unreachable assets) fail the check\nunless --allow-warnings downgrades them. New, missing, edited, or\ninvalid entries in the raw directory are hard errors:\nopen or refocus the Fundus editor and resolve its ingestion queue.\nRaw-file errors never downgrade.\n\nFlags:\n --allow-warnings exit 0 despite warnings (errors still fail)\n --json print one report document:\n {\"ok\": <pass/fail>, \"assetCount\": \u2026, \"manifestCount\": \u2026,\n \"errors\": [<finding>, \u2026], \"warnings\": [<finding>, \u2026],\n \"advisories\": [<non-fatal integration guidance>, \u2026]}\n where a finding is {\"kind\", \"message\"} plus\n \"assetId\" / \"manifest\" / \"fileName\" where applicable\n --help this help\n\nExit codes: 0 = clean (or warnings allowed), 1 = failed. A failure to\neven run the check (e.g. no fundus.config.ts) exits 1 with the usual\n{\"error\": {\"message\": \u2026}} envelope under --json.\n\nExample:\n fundus check --json | jq '.errors[].kind'\n";
|
|
27
29
|
export declare function runCheckCommand(argumentList: string[]): Promise<void>;
|
|
@@ -192,6 +192,116 @@ export async function runStateCommand(argumentList) {
|
|
|
192
192
|
printHumanState(state);
|
|
193
193
|
}
|
|
194
194
|
// ---------------------------------------------------------------------------
|
|
195
|
+
// fundus usage
|
|
196
|
+
// ---------------------------------------------------------------------------
|
|
197
|
+
export const USAGE_HELP = `fundus usage — inspect typed source references to assets
|
|
198
|
+
|
|
199
|
+
Usage: fundus usage [assetId] [--unused] [--json]
|
|
200
|
+
|
|
201
|
+
Without an asset id, analyzes every asset and prints its used, unused, or
|
|
202
|
+
unknown status. With an asset id, also returns the concrete source locations,
|
|
203
|
+
manifest roots, and dependency paths that attribute those usages.
|
|
204
|
+
|
|
205
|
+
Flags:
|
|
206
|
+
--unused only return conclusively unused assets; cannot be combined with an asset id
|
|
207
|
+
--json print {"ok": true, "assets": [<usage record>, …]}
|
|
208
|
+
Source references omit editor open tokens, which are meaningful
|
|
209
|
+
only inside the persistent Fundus server process.
|
|
210
|
+
--help this help
|
|
211
|
+
|
|
212
|
+
Read-only: nothing is processed or written. Requires usage.referenceProvider
|
|
213
|
+
and usage.openLocation in fundus.config.ts.
|
|
214
|
+
|
|
215
|
+
Examples:
|
|
216
|
+
fundus usage --unused
|
|
217
|
+
fundus usage navigationPanel --json
|
|
218
|
+
`;
|
|
219
|
+
function usageReferenceForCli(reference) {
|
|
220
|
+
return {
|
|
221
|
+
id: reference.id,
|
|
222
|
+
file: reference.file,
|
|
223
|
+
line: reference.line,
|
|
224
|
+
column: reference.column,
|
|
225
|
+
...(reference.label === undefined ? {} : { label: reference.label })
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
function usageAssetForCli(asset) {
|
|
229
|
+
return {
|
|
230
|
+
...asset,
|
|
231
|
+
references: asset.references.map(usageReferenceForCli)
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
function printHumanUsageOverview(assets, unusedOnly) {
|
|
235
|
+
if (assets.length === 0) {
|
|
236
|
+
console.log(unusedOnly ? 'No unused assets.' : 'No assets.');
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
if (unusedOnly) {
|
|
240
|
+
console.log(`Unused assets (${assets.length}):`);
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
const count = (status) => assets.filter((asset) => asset.status === status).length;
|
|
244
|
+
console.log(`Asset usage: ${count('used')} used, ${count('unused')} unused, ${count('unknown')} unknown.`);
|
|
245
|
+
}
|
|
246
|
+
const idWidth = Math.max(...assets.map((asset) => asset.assetId.length));
|
|
247
|
+
for (const asset of assets) {
|
|
248
|
+
console.log(` ${asset.assetId.padEnd(idWidth)} ${asset.status}`);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
function printHumanUsageDetail(asset) {
|
|
252
|
+
console.log(`${asset.assetId}: ${asset.status}`);
|
|
253
|
+
if (asset.references.length === 0) {
|
|
254
|
+
console.log(' code references: none');
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
console.log(` code references (${asset.references.length}):`);
|
|
258
|
+
for (const reference of asset.references) {
|
|
259
|
+
console.log(` ${reference.file}:${reference.line}:${reference.column}` +
|
|
260
|
+
(reference.label ? ` ${reference.label}` : ''));
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
for (const root of asset.roots) {
|
|
264
|
+
console.log(` root: ${root.manifest}.${root.rootAssetId}`);
|
|
265
|
+
for (const path of root.paths)
|
|
266
|
+
console.log(` path: ${path.join(' → ')}`);
|
|
267
|
+
if (root.additionalPathCount) {
|
|
268
|
+
console.log(` +${root.additionalPathCount} additional path(s)`);
|
|
269
|
+
}
|
|
270
|
+
if (root.result.status === 'unknown') {
|
|
271
|
+
console.log(` unknown: ${root.result.reason ?? 'Usage could not be resolved.'}`);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
export async function runUsageCommand(argumentList) {
|
|
276
|
+
if (hasHelpFlag(argumentList)) {
|
|
277
|
+
console.log(USAGE_HELP);
|
|
278
|
+
return;
|
|
279
|
+
}
|
|
280
|
+
const parsed = parseArguments(argumentList, { ...COMMON_FLAGS, unused: { takesValue: false } }, 'fundus usage');
|
|
281
|
+
if (parsed.positionals.length > 1) {
|
|
282
|
+
throw new CliUsageError('`fundus usage` expects at most one asset id (usage: fundus usage [assetId]) — ' +
|
|
283
|
+
`got ${parsed.positionals.length}. Run \`fundus usage --help\`.`);
|
|
284
|
+
}
|
|
285
|
+
const assetId = parsed.positionals[0];
|
|
286
|
+
const unusedOnly = parsed.flags.unused === true;
|
|
287
|
+
if (assetId && unusedOnly) {
|
|
288
|
+
throw new CliUsageError('Flag "--unused" cannot be combined with an asset id — run `fundus usage --help`.');
|
|
289
|
+
}
|
|
290
|
+
const operations = await createOperations();
|
|
291
|
+
const report = await operations.analyzeUsage(assetId ? { assetId } : {});
|
|
292
|
+
const assets = unusedOnly
|
|
293
|
+
? report.assets.filter((asset) => asset.status === 'unused')
|
|
294
|
+
: report.assets;
|
|
295
|
+
if (parsed.flags.json) {
|
|
296
|
+
printJsonDocument({ ok: true, assets: assets.map(usageAssetForCli) });
|
|
297
|
+
return;
|
|
298
|
+
}
|
|
299
|
+
if (assetId)
|
|
300
|
+
printHumanUsageDetail(assets[0]);
|
|
301
|
+
else
|
|
302
|
+
printHumanUsageOverview(assets, unusedOnly);
|
|
303
|
+
}
|
|
304
|
+
// ---------------------------------------------------------------------------
|
|
195
305
|
// fundus asset …
|
|
196
306
|
// ---------------------------------------------------------------------------
|
|
197
307
|
export const ASSET_HELP = `fundus asset — inspect and mutate assets
|
|
@@ -1402,7 +1512,8 @@ Flags:
|
|
|
1402
1512
|
--allow-warnings exit 0 despite warnings (errors still fail)
|
|
1403
1513
|
--json print one report document:
|
|
1404
1514
|
{"ok": <pass/fail>, "assetCount": …, "manifestCount": …,
|
|
1405
|
-
"errors": [<finding>, …], "warnings": [<finding>, …]
|
|
1515
|
+
"errors": [<finding>, …], "warnings": [<finding>, …],
|
|
1516
|
+
"advisories": [<non-fatal integration guidance>, …]}
|
|
1406
1517
|
where a finding is {"kind", "message"} plus
|
|
1407
1518
|
"assetId" / "manifest" / "fileName" where applicable
|
|
1408
1519
|
--help this help
|
|
@@ -1431,7 +1542,8 @@ export async function runCheckCommand(argumentList) {
|
|
|
1431
1542
|
assetCount: report.assetCount,
|
|
1432
1543
|
manifestCount: report.manifestCount,
|
|
1433
1544
|
errors: report.errors,
|
|
1434
|
-
warnings: report.warnings
|
|
1545
|
+
warnings: report.warnings,
|
|
1546
|
+
advisories: report.advisories
|
|
1435
1547
|
});
|
|
1436
1548
|
if (failed)
|
|
1437
1549
|
process.exitCode = 1;
|
|
@@ -1443,6 +1555,9 @@ export async function runCheckCommand(argumentList) {
|
|
|
1443
1555
|
for (const warning of report.warnings) {
|
|
1444
1556
|
console.error(`⚠ ${formatCheckFinding(warning)}`);
|
|
1445
1557
|
}
|
|
1558
|
+
for (const advisory of report.advisories) {
|
|
1559
|
+
console.error(`ℹ ${advisory.message}`);
|
|
1560
|
+
}
|
|
1446
1561
|
if (failed) {
|
|
1447
1562
|
console.error(`fundus check failed: ${report.errors.length} error(s), ${report.warnings.length} warning(s)` +
|
|
1448
1563
|
(warningsFatal ? ' (warnings are errors — pass --allow-warnings to downgrade them)' : '') +
|
package/dist/server/codegen.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { type AssetRecord, type Library, type ManifestEntry, type ManifestEntryData, type ManifestMembership, type ReferencesByAsset } from '../core/index.js';
|
|
2
|
+
import type { SourceLocation } from '../core/index.js';
|
|
2
3
|
import type { ResolvedFundusConfig } from './config-loader.js';
|
|
3
4
|
import type { ServerPluginRegistry } from './plugins/contract.js';
|
|
4
5
|
import type { AssetProxyInfo } from './processing/processor.js';
|
|
5
6
|
export declare const GENERATED_HEADER = "// generated by fundus \u2014 do not edit\n";
|
|
7
|
+
/** Locate a generated top-level manifest member in frozen module source. */
|
|
8
|
+
export declare function locateGeneratedAssetDeclaration(file: string, source: string, assetId: string): SourceLocation | null;
|
|
6
9
|
/** `mainCatalog` → `main-catalog`. */
|
|
7
10
|
export declare function kebabCaseFromCamel(name: string): string;
|
|
8
11
|
/** Generated module file name for a manifest. */
|