fundus 0.11.1 → 0.12.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 +5 -2
- package/build/client/_app/immutable/assets/2.Do83Bm42.css +1 -0
- package/build/client/_app/immutable/assets/2.Do83Bm42.css.br +0 -0
- package/build/client/_app/immutable/assets/2.Do83Bm42.css.gz +0 -0
- package/build/client/_app/immutable/assets/{3.BuCXJbRG.css → 3.C6xo25uI.css} +1 -1
- package/build/client/_app/immutable/assets/3.C6xo25uI.css.br +0 -0
- package/build/client/_app/immutable/assets/3.C6xo25uI.css.gz +0 -0
- package/build/client/_app/immutable/assets/{LibraryContextMenu.B6By2-yb.css → AssetSourceMenu.BmQJNvwU.css} +1 -1
- package/build/client/_app/immutable/assets/AssetSourceMenu.BmQJNvwU.css.br +0 -0
- package/build/client/_app/immutable/assets/AssetSourceMenu.BmQJNvwU.css.gz +0 -0
- package/build/client/_app/immutable/assets/Popover.CCTioPJZ.css +1 -0
- package/build/client/_app/immutable/assets/Popover.CCTioPJZ.css.br +0 -0
- package/build/client/_app/immutable/assets/Popover.CCTioPJZ.css.gz +0 -0
- package/build/client/_app/immutable/chunks/Br-_gll5.js +108 -0
- package/build/client/_app/immutable/chunks/Br-_gll5.js.br +0 -0
- package/build/client/_app/immutable/chunks/Br-_gll5.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D1_lla-1.js +1 -0
- package/build/client/_app/immutable/chunks/D1_lla-1.js.br +0 -0
- package/build/client/_app/immutable/chunks/D1_lla-1.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Q50krHyn.js +2 -0
- package/build/client/_app/immutable/chunks/Q50krHyn.js.br +0 -0
- package/build/client/_app/immutable/chunks/Q50krHyn.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{jjXOSnwf.js → XXb1V1W4.js} +1 -1
- package/build/client/_app/immutable/chunks/XXb1V1W4.js.br +2 -0
- package/build/client/_app/immutable/chunks/XXb1V1W4.js.gz +0 -0
- package/build/client/_app/immutable/chunks/dNO-9VOT.js +1 -0
- package/build/client/_app/immutable/chunks/dNO-9VOT.js.br +0 -0
- package/build/client/_app/immutable/chunks/dNO-9VOT.js.gz +0 -0
- package/build/client/_app/immutable/chunks/hUfV2O0k.js +1 -0
- package/build/client/_app/immutable/chunks/hUfV2O0k.js.br +0 -0
- package/build/client/_app/immutable/chunks/hUfV2O0k.js.gz +0 -0
- package/build/client/_app/immutable/entry/{app.Rv8f5zSo.js → app.CCAhttSp.js} +2 -2
- package/build/client/_app/immutable/entry/app.CCAhttSp.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CCAhttSp.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.DJIzRm6t.js +1 -0
- package/build/client/_app/immutable/entry/start.DJIzRm6t.js.br +1 -0
- package/build/client/_app/immutable/entry/start.DJIzRm6t.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{0.Gv5d6CcW.js → 0.DUlsG4Qh.js} +1 -1
- package/build/client/_app/immutable/nodes/0.DUlsG4Qh.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.DUlsG4Qh.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.8J9y5zyF.js → 1.CuulMHsk.js} +1 -1
- package/build/client/_app/immutable/nodes/1.CuulMHsk.js.br +3 -0
- package/build/client/_app/immutable/nodes/1.CuulMHsk.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.7TnKW5UR.js +3 -0
- package/build/client/_app/immutable/nodes/2.7TnKW5UR.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.7TnKW5UR.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.Db6_fvQZ.js +1 -0
- package/build/client/_app/immutable/nodes/3.Db6_fvQZ.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.Db6_fvQZ.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.bgUCYdNb.js +2 -0
- package/build/client/_app/immutable/nodes/4.bgUCYdNb.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.bgUCYdNb.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-BJfk3ZiR.js → context.js-6YdbScn_.js} +166 -5
- package/build/server/chunks/chunks/context.js-6YdbScn_.js.map +1 -0
- package/build/server/chunks/chunks/{contract.js-DRcxzb4o.js → contract.js-BHQbpsFk.js} +29 -6
- package/build/server/chunks/chunks/contract.js-BHQbpsFk.js.map +1 -0
- package/build/server/chunks/chunks/{core.js-Cj7hjmtV.js → core.js-CABVXpby.js} +2 -2
- package/build/server/chunks/chunks/{core.js-Cj7hjmtV.js.map → core.js-CABVXpby.js.map} +1 -1
- package/build/server/chunks/chunks/{exports.js-BcB5q0h5.js → exports.js-BTuzD8-J.js} +2 -2
- package/build/server/chunks/chunks/{exports.js-BcB5q0h5.js.map → exports.js-BTuzD8-J.js.map} +1 -1
- package/build/server/chunks/chunks/{http.js-DMkgmpI5.js → http.js-dbT0ifQ9.js} +2 -2
- package/build/server/chunks/chunks/{http.js-DMkgmpI5.js.map → http.js-dbT0ifQ9.js.map} +1 -1
- package/build/server/chunks/chunks/{internal.js-B6eePlP4.js → internal.js-xEkkCIRs.js} +3 -3
- package/build/server/chunks/chunks/{internal.js-B6eePlP4.js.map → internal.js-xEkkCIRs.js.map} +1 -1
- package/build/server/chunks/chunks/internal2.js-BlXt2rfE.js.map +1 -1
- package/build/server/chunks/chunks/{manifest-membership.js-vIb-KkQi.js → manifest-membership.js-BnSECWpJ.js} +2 -2
- package/build/server/chunks/chunks/{manifest-membership.js-vIb-KkQi.js.map → manifest-membership.js-BnSECWpJ.js.map} +1 -1
- package/build/server/chunks/chunks/{raw-reconciliation.js-CeIOAYCA.js → raw-reconciliation.js-ZEOCk_jA.js} +3 -3
- package/build/server/chunks/chunks/raw-reconciliation.js-ZEOCk_jA.js.map +1 -0
- package/build/server/chunks/chunks/{raw-reconciliation2.js-5mUCDiJk.js → raw-reconciliation2.js-CscuoBC2.js} +2 -2
- package/build/server/chunks/chunks/{raw-reconciliation2.js-5mUCDiJk.js.map → raw-reconciliation2.js-CscuoBC2.js.map} +1 -1
- package/build/server/chunks/chunks/{shared.js-BO7vJlPc.js → shared.js-ClQ0W6xa.js} +2 -2
- package/build/server/chunks/chunks/{shared.js-BO7vJlPc.js.map → shared.js-ClQ0W6xa.js.map} +1 -1
- package/build/server/chunks/chunks/{utils.js-BTV5xnNv.js → utils.js-_DPNtm3G.js} +3 -3
- package/build/server/chunks/chunks/{utils.js-BTV5xnNv.js.map → utils.js-_DPNtm3G.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/_...path_/{_server.ts.js-m2QGyBiV.js → _server.ts.js-BaMGnbi8.js} +6 -6
- package/build/server/chunks/entries/endpoints/api/_...path_/{_server.ts.js-m2QGyBiV.js.map → _server.ts.js-BaMGnbi8.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/_id_/{_server.ts.js-eMNgdaf4.js → _server.ts.js-B6YhmqYd.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/assets/_id_/{_server.ts.js-eMNgdaf4.js.map → _server.ts.js-B6YhmqYd.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/_id_/raw/{_server.ts.js-CEQd4Wxn.js → _server.ts.js-qtGGwjZ4.js} +14 -7
- package/build/server/chunks/entries/endpoints/api/assets/_id_/raw/_server.ts.js-qtGGwjZ4.js.map +1 -0
- package/build/server/chunks/entries/endpoints/api/assets/_id_/reimport/{_server.ts.js-B2JoGCzy.js → _server.ts.js-98vjovDS.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/assets/_id_/reimport/{_server.ts.js-B2JoGCzy.js.map → _server.ts.js-98vjovDS.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/{_server.ts.js-DTpkVywC.js → _server.ts.js-CCzQEr--.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/assets/{_server.ts.js-DTpkVywC.js.map → _server.ts.js-CCzQEr--.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/delete/{_server.ts.js-D6Z_pGEZ.js → _server.ts.js-Ca7G_5IJ.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/assets/delete/{_server.ts.js-D6Z_pGEZ.js.map → _server.ts.js-Ca7G_5IJ.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/assets/move/{_server.ts.js-CnDi9p0a.js → _server.ts.js-DRw4ICSn.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/assets/move/{_server.ts.js-CnDi9p0a.js.map → _server.ts.js-DRw4ICSn.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/folders/_path_/{_server.ts.js-BCzuPX5Z.js → _server.ts.js-Ai46jTgw.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/folders/_path_/{_server.ts.js-BCzuPX5Z.js.map → _server.ts.js-Ai46jTgw.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/folders/{_server.ts.js-CGbYyJ6S.js → _server.ts.js-NQKYbtiU.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/folders/{_server.ts.js-CGbYyJ6S.js.map → _server.ts.js-NQKYbtiU.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/imports/{_server.ts.js-CL_89klb.js → _server.ts.js-_vJ2Npqd.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/imports/{_server.ts.js-CL_89klb.js.map → _server.ts.js-_vJ2Npqd.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/manifests/_name_/{_server.ts.js-DZUKtjz9.js → _server.ts.js-DIn5srjK.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/manifests/_name_/{_server.ts.js-DZUKtjz9.js.map → _server.ts.js-DIn5srjK.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/manifests/{_server.ts.js-Dz25LG_P.js → _server.ts.js-CqFLRTP-.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/manifests/{_server.ts.js-Dz25LG_P.js.map → _server.ts.js-CqFLRTP-.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/raw/adopt/{_server.ts.js-C-NuN3JJ.js → _server.ts.js-BYn_v3VS.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/raw/adopt/{_server.ts.js-C-NuN3JJ.js.map → _server.ts.js-BYn_v3VS.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/raw/edited/accept/{_server.ts.js-CwL9UPh3.js → _server.ts.js-sxVzkX1S.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/raw/edited/accept/{_server.ts.js-CwL9UPh3.js.map → _server.ts.js-sxVzkX1S.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/raw/edited/dismiss/{_server.ts.js-DanXYrj1.js → _server.ts.js-E3B6VyAs.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/raw/edited/dismiss/{_server.ts.js-DanXYrj1.js.map → _server.ts.js-E3B6VyAs.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/reconcile/{_server.ts.js-BZrun0up.js → _server.ts.js-ClgS9ghS.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/reconcile/{_server.ts.js-BZrun0up.js.map → _server.ts.js-ClgS9ghS.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/reveal/{_server.ts.js-DQOabHbS.js → _server.ts.js-BPUzWMNL.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/reveal/{_server.ts.js-DQOabHbS.js.map → _server.ts.js-BPUzWMNL.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/state/{_server.ts.js-k8Ueydx1.js → _server.ts.js-_G6pURnx.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/state/{_server.ts.js-k8Ueydx1.js.map → _server.ts.js-_G6pURnx.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/api/usage/{_server.ts.js-DmMmiFiu.js → _server.ts.js-as3GcjaI.js} +7 -7
- package/build/server/chunks/entries/endpoints/api/usage/{_server.ts.js-DmMmiFiu.js.map → _server.ts.js-as3GcjaI.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/files/_...path_/{_server.ts.js-CT7yOdDS.js → _server.ts.js-CR58wymO.js} +6 -6
- package/build/server/chunks/entries/endpoints/files/_...path_/{_server.ts.js-CT7yOdDS.js.map → _server.ts.js-CR58wymO.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/files/proxy/_...path_/{_server.ts.js-BQTC0OSC.js → _server.ts.js-Do2LOf04.js} +7 -7
- package/build/server/chunks/entries/endpoints/files/proxy/_...path_/{_server.ts.js-BQTC0OSC.js.map → _server.ts.js-Do2LOf04.js.map} +1 -1
- package/build/server/chunks/entries/endpoints/files/raw/_...path_/{_server.ts.js-mv9cqSuS.js → _server.ts.js-Ckp6_SaE.js} +7 -7
- package/build/server/chunks/entries/endpoints/files/raw/_...path_/{_server.ts.js-mv9cqSuS.js.map → _server.ts.js-Ckp6_SaE.js.map} +1 -1
- package/build/server/chunks/entries/{hooks.server.js-BNQO3cZr.js → hooks.server.js-CL1tg0CT.js} +6 -6
- package/build/server/chunks/entries/{hooks.server.js-BNQO3cZr.js.map → hooks.server.js-CL1tg0CT.js.map} +1 -1
- package/build/server/chunks/{handler-DQdjBhko.js → handler-6UmsR4HY.js} +5 -5
- package/build/server/chunks/{handler-DQdjBhko.js.map → handler-6UmsR4HY.js.map} +1 -1
- package/build/server/chunks/{index.js-DtKY5QD2.js → index.js-CjHZ4kgG.js} +5 -5
- package/build/server/chunks/{index.js-DtKY5QD2.js.map → index.js-CjHZ4kgG.js.map} +1 -1
- package/build/server/chunks/{manifest.js-CJMiboeI.js → manifest.js-DFh4gv8f.js} +29 -29
- package/build/server/chunks/{manifest.js-CJMiboeI.js.map → manifest.js-DFh4gv8f.js.map} +1 -1
- package/build/server/chunks/nodes/{0.js-Ce__dNtc.js → 0.js-B_HfQzlA.js} +2 -2
- package/build/server/chunks/nodes/{0.js-Ce__dNtc.js.map → 0.js-B_HfQzlA.js.map} +1 -1
- package/build/server/chunks/nodes/1.js-S48YmPof.js +7 -0
- package/build/server/chunks/nodes/{1.js-BIwe5V8L.js.map → 1.js-S48YmPof.js.map} +1 -1
- package/build/server/chunks/nodes/2.js-NPMtObSV.js +7 -0
- package/build/server/chunks/nodes/2.js-NPMtObSV.js.map +1 -0
- package/build/server/chunks/nodes/3.js-p75We_hZ.js +7 -0
- package/build/server/chunks/nodes/3.js-p75We_hZ.js.map +1 -0
- package/build/server/chunks/nodes/4.js-C8FMkoda.js +7 -0
- package/build/server/chunks/nodes/4.js-C8FMkoda.js.map +1 -0
- package/dist/cli.js +2 -1
- package/dist/core/api-types.d.ts +2 -0
- package/dist/runtime/chroma-key-video-lifecycle.js +1 -2
- package/dist/server/check.d.ts +1 -1
- package/dist/server/check.js +16 -2
- package/dist/server/cli-commands.d.ts +2 -2
- package/dist/server/cli-commands.js +47 -11
- package/dist/server/image-duplicates.d.ts +18 -0
- package/dist/server/image-duplicates.js +140 -0
- package/dist/server/index.d.ts +1 -1
- package/dist/server/library-store.d.ts +7 -1
- package/dist/server/library-store.js +38 -1
- package/dist/server/operations.d.ts +6 -0
- package/dist/server/operations.js +66 -0
- package/package.json +1 -1
- package/build/client/_app/immutable/assets/2.6TBn1n3x.css +0 -1
- package/build/client/_app/immutable/assets/2.6TBn1n3x.css.br +0 -0
- package/build/client/_app/immutable/assets/2.6TBn1n3x.css.gz +0 -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/ConfirmDialog.BdKlitwi.css +0 -1
- package/build/client/_app/immutable/assets/ConfirmDialog.BdKlitwi.css.br +0 -0
- package/build/client/_app/immutable/assets/ConfirmDialog.BdKlitwi.css.gz +0 -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 +0 -1
- 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/CAQ5okPf.js +0 -2
- 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 +0 -1
- 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 +0 -1
- 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 +0 -108
- 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 +0 -1
- 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 +0 -1
- 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/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.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 +0 -1
- package/build/client/_app/immutable/entry/start.C5jRg_CF.js.br +0 -1
- package/build/client/_app/immutable/entry/start.C5jRg_CF.js.gz +0 -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.br +0 -0
- package/build/client/_app/immutable/nodes/1.8J9y5zyF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.BNvTqsKZ.js +0 -3
- 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 +0 -1
- 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 +0 -2
- 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/server/chunks/chunks/context.js-BJfk3ZiR.js.map +0 -1
- package/build/server/chunks/chunks/contract.js-DRcxzb4o.js.map +0 -1
- package/build/server/chunks/chunks/raw-reconciliation.js-CeIOAYCA.js.map +0 -1
- package/build/server/chunks/entries/endpoints/api/assets/_id_/raw/_server.ts.js-CEQd4Wxn.js.map +0 -1
- package/build/server/chunks/nodes/1.js-BIwe5V8L.js +0 -7
- package/build/server/chunks/nodes/2.js-Bj7c0eH1.js +0 -7
- package/build/server/chunks/nodes/2.js-Bj7c0eH1.js.map +0 -1
- package/build/server/chunks/nodes/3.js-BMOf9FTK.js +0 -7
- package/build/server/chunks/nodes/3.js-BMOf9FTK.js.map +0 -1
- package/build/server/chunks/nodes/4.js-CNLb7Xc5.js +0 -7
- package/build/server/chunks/nodes/4.js-CNLb7Xc5.js.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{$ as e,A as t,F as n,I as r,J as i,M as a,O as o,Q as s,R as c,T as l,U as u,X as d,Y as f,_ as p,c as m,ct as h,d as g,et as _,it as v,k as y,rt as b,st as x,u as S,v as C}from"../chunks/YpiA5Xry.js";import{c as w}from"../chunks/D1_lla-1.js";import"../chunks/xihTtKlq.js";import{A as T,H as E,K as D,a as ee,c as te,et as O,f as k,t as A}from"../chunks/Q50krHyn.js";import{i as j,n as ne,t as M}from"../chunks/hUfV2O0k.js";var N=[{name:`slate`,value:`#64748b`},{name:`red`,value:`#ef4444`},{name:`orange`,value:`#f97316`},{name:`amber`,value:`#f59e0b`},{name:`yellow`,value:`#eab308`},{name:`lime`,value:`#84cc16`},{name:`green`,value:`#22c55e`},{name:`teal`,value:`#14b8a6`},{name:`cyan`,value:`#06b6d4`},{name:`blue`,value:`#3b82f6`},{name:`indigo`,value:`#6366f1`},{name:`violet`,value:`#8b5cf6`},{name:`pink`,value:`#ec4899`}],P=`🗂️.🏠.🎯.⭐.🔥.💎.🎨.🧩.🚀.🎵.🏆.⚡.🌟.🍀.🎁.📦.🗺️.🔑.🛒.❤️.🐙.🎲.🌈.🧪.🎪.🎭.🎬.🎤.🎧.🎸.🥁.🔔.💡.🔮.🧭.⏰.📸.🖼️.📚.✏️.🖌️.🧲.⚙️.🛠️.🔧.🧰.🔌.🔋.🌍.🌙.☀️.❄️.🌊.🍄.🌵.🌸.🍎.🍕.🍩.☕.🐳.🦄.🐝`.split(`.`),F=a(`<button type="button" title="Emoji"> </button>`),re=a(`<button type="button"> </button>`),I=a(`<div class="picker emojis svelte-58t64l"><button type="button" title="No emoji" aria-label="No emoji">∅</button> <!></div>`),L=a(`<button type="button" title="Color"></button>`),R=a(`<button type="button"></button>`),z=a(`<div class="picker swatches svelte-58t64l"><button type="button" title="No color" aria-label="No color"></button> <!></div>`),B=a(`<div class="controls svelte-58t64l"><!> <!></div>`);function ie(n,a){v(a,!0);let o=_(()=>A.manifestAppearance(a.name)),f=_(()=>c(o).color??null),m=_(()=>c(o).emoji??null),x=e(!1),S=e(!1);async function w(e){let t=a.name;s(x,!1);try{await A.mutate(()=>O(t,{color:e}),k(t,{color:e}),{dependencies:[`manifest:${t}`]})}catch{}}async function T(e){let t=a.name;s(S,!1);try{await A.mutate(()=>O(t,{emoji:e}),k(t,{emoji:e}),{dependencies:[`manifest:${t}`]})}catch{}}var E=B(),D=i(E);M(D,{get label(){return`Pick an emoji for ${a.name??``}`},get open(){return c(S)},set open(e){s(S,e,!0)},trigger:(e,n)=>{let o=()=>(n?.()).toggle,s=()=>(n?.()).open;var l=F();let d;var f=i(l,!0);h(l),u(()=>{d=C(l,1,`emoji-trigger svelte-58t64l`,null,d,{empty:!c(m),active:s()}),g(l,`aria-label`,`Emoji for ${a.name??``}`),y(f,c(m)??`☺`)}),r(`click`,l,function(...e){o()?.apply(this,e)}),t(e,l)},children:(e,n)=>{var a=I(),o=i(a);let s;l(d(o,2),16,()=>P,e=>e,(e,n)=>{var a=re();let o;var s=i(a,!0);h(a),u(()=>{o=C(a,1,`emoji svelte-58t64l`,null,o,{selected:c(m)===n}),g(a,`title`,n),y(s,n)}),r(`click`,a,()=>void T(n)),t(e,a)}),h(a),u(()=>s=C(o,1,`emoji none svelte-58t64l`,null,s,{selected:c(m)===null})),r(`click`,o,()=>void T(null)),t(e,a)},$$slots:{trigger:!0,default:!0}}),M(d(D,2),{get label(){return`Pick a color for ${a.name??``}`},get open(){return c(x)},set open(e){s(x,e,!0)},trigger:(e,n)=>{let i=()=>(n?.()).toggle,o=()=>(n?.()).open;var s=L();let l;u(()=>{l=C(s,1,`swatch-trigger svelte-58t64l`,null,l,{empty:!c(f),active:o()}),p(s,`--swatch: ${c(f)??`transparent`??``}`),g(s,`aria-label`,`Color for ${a.name??``}`)}),r(`click`,s,function(...e){i()?.apply(this,e)}),t(e,s)},children:(e,n)=>{var a=z(),o=i(a);let s;l(d(o,2),17,()=>N,e=>e.value,(e,n)=>{var i=R();let a;u(()=>{a=C(i,1,`swatch svelte-58t64l`,null,a,{selected:c(f)===c(n).value}),p(i,`background: ${c(n).value??``}`),g(i,`title`,c(n).name),g(i,`aria-label`,c(n).name)}),r(`click`,i,()=>void w(c(n).value)),t(e,i)}),h(a),u(()=>s=C(o,1,`swatch none svelte-58t64l`,null,s,{selected:c(f)===null})),r(`click`,o,()=>void w(null)),t(e,a)},$$slots:{trigger:!0,default:!0}}),h(E),t(n,E),b()}n([`click`]);var ae=a(`<span class="hint svelte-1k9wgg5"> </span>`),oe=a(`<div class="empty svelte-1k9wgg5">No manifests yet. Assets only get processed and generated once they are in a manifest.</div>`),se=a(`<span class="asset-type svelte-1k9wgg5"> </span>`),ce=a(`<li class="passive-member svelte-1k9wgg5"><a class="svelte-1k9wgg5"><span class="asset-id passive-id svelte-1k9wgg5"> </span> <!> <span class="asset-via svelte-1k9wgg5"> </span> <span class="asset-size svelte-1k9wgg5"> </span></a></li>`),le=a(`<li class="svelte-1k9wgg5"><a class="svelte-1k9wgg5"><span class="asset-id svelte-1k9wgg5"> </span> <span class="asset-type svelte-1k9wgg5"> </span> <span class="asset-size svelte-1k9wgg5"> </span></a></li> <!>`,1),ue=a(`<ul class="svelte-1k9wgg5"></ul>`),de=a(`<p class="hint svelte-1k9wgg5">Empty — an empty manifest still generates an (empty) module.</p>`),fe=a(`<section class="manifest svelte-1k9wgg5"><header class="svelte-1k9wgg5"><!> <h2 class="svelte-1k9wgg5"> </h2> <span class="size svelte-1k9wgg5" title="Total delivered proxy size incl. the reference closure — the preload budget"> </span> <span class="count svelte-1k9wgg5"> </span> <button class="control">Rename</button> <button class="control danger">Delete</button></header> <!></section>`),pe=a(`<div class="list svelte-1k9wgg5"></div>`),V=a(`<p class="dialog-text warn svelte-1k9wgg5"> </p>`),me=a(`<p class="dialog-text svelte-1k9wgg5">Delete manifest <strong> </strong> </p> <!>`,1),he=a(`<p class="dialog-text warn svelte-1k9wgg5">A manifest with this name already exists.</p>`),ge=a(`<label class="dialog-row svelte-1k9wgg5"><span class="dialog-label svelte-1k9wgg5">Name</span> <input class="control svelte-1k9wgg5" type="text" spellcheck="false"/></label> <!> <p class="dialog-text svelte-1k9wgg5">The generated module is renamed with the manifest — host code importing <code> </code> must be updated by hand.</p> <!>`,1),_e=a(`<div class="page svelte-1k9wgg5"><div class="create svelte-1k9wgg5"><input class="control svelte-1k9wgg5" type="text" placeholder="newManifestName" spellcheck="false"/> <button class="control primary">Create manifest</button> <!></div> <!></div> <!> <!>`,1);function H(n,a){v(a,!0);let C=e(``),M=_(()=>A.state?.assets??[]),N=_(()=>A.manifestNames);function P(e){return c(M).filter(t=>t.manifests.includes(e))}function F(e){return A.state?.manifestMemberships[e]?.passiveMembers??[]}function re(e,t){return F(e).filter(e=>e.via.includes(t))}function I(e){return A.state?.manifestDeliveredBytes[e]??0}let L=_(()=>c(C)?T(c(C)):null),R=_(()=>c(C)!==``&&!c(L)&&!c(N).includes(c(C)));async function z(){if(!c(R))return;let e=c(C),t=A.mutate(()=>E(e),ee(e),{dependencies:[`manifest:${e}`],invalidatesOnFailure:[`manifest:${e}`]});s(C,``);try{await t}catch{c(C)===``&&!Object.hasOwn(A.state?.library.manifests??{},e)&&s(C,e,!0)}}let B=e(null),H=e(null),U=e(``),W=e(!1),G=e(null),K=0;function ve(e){K+=1,s(G,null),s(B,e,!0)}function ye(e){K+=1,s(G,null),s(U,e,!0),s(H,e,!0)}function q(){K+=1,s(B,null),s(H,null),s(G,null)}let J=_(()=>c(H)!==null&&c(U)!==c(H)?T(c(U)):null),be=_(()=>c(H)!==null&&c(U)!==c(H)&&c(N).includes(c(U))),xe=_(()=>c(H)!==null&&c(U)!==c(H)&&!c(J)&&!c(be));async function Se(){if(c(B)===null)return;let e=c(B);s(W,!0),s(G,null);let t=A.mutate(()=>D(e),te(e),{dependencies:[`manifest:${e}`],invalidatesOnFailure:[`manifest:${e}`]});q();let n=K;s(W,!1);try{await t}catch(t){K===n&&Object.hasOwn(A.state?.library.manifests??{},e)&&(s(B,e,!0),s(G,t instanceof Error?t.message:String(t),!0))}finally{s(W,!1)}}async function Ce(){if(c(H)===null||!c(xe))return;let e=c(H),t=c(U);s(W,!0),s(G,null);let n=A.mutate(()=>O(e,{renameTo:t}),k(e,{renameTo:t}),{dependencies:[`manifest:${e}`,`manifest:${t}`],invalidatesOnFailure:[`manifest:${e}`,`manifest:${t}`]});q();let r=K;s(W,!1);try{await n}catch(n){K===r&&Object.hasOwn(A.state?.library.manifests??{},e)&&(s(H,e,!0),s(U,t,!0),s(G,n instanceof Error?n.message:String(n),!0))}finally{s(W,!1)}}var we=_e(),Y=f(we),X=i(Y),Z=i(X);S(Z);var Q=d(Z,2),Te=d(Q,2),Ee=e=>{var n=ae(),r=i(n,!0);h(n),u(()=>y(r,c(L))),t(e,n)};o(Te,e=>{c(L)&&e(Ee)}),h(X);var De=d(X,2),Oe=e=>{t(e,oe())},ke=e=>{var n=pe();l(n,20,()=>c(N),e=>e,(e,n)=>{var a=fe(),s=i(a),m=i(s);ie(m,{get name(){return n}});var v=d(m,2),b=i(v,!0);h(v);var x=d(v,2),S=i(x,!0);h(x);var C=d(x,2),T=i(C);h(C);var E=d(C,2),D=d(E,2);h(s);var ee=d(s,2),te=e=>{var r=ue();l(r,21,()=>P(n),e=>e.id,(e,r)=>{var a=le(),s=f(a),p=i(s),m=i(p),v=i(m,!0);h(m);var b=d(m,2),x=i(b,!0);h(b);var S=d(b,2),C=i(S,!0);h(S),h(p),h(s),l(d(s,2),17,()=>re(n,c(r).id),e=>e.assetId,(e,n)=>{let a=_(()=>A.assetById(c(n).assetId));var s=ce(),l=i(s),f=i(l),p=i(f,!0);h(f);var m=d(f,2),v=e=>{var n=se(),r=i(n,!0);h(n),u(()=>y(r,c(a).type)),t(e,n)};o(m,e=>{c(a)&&e(v)});var b=d(m,2),x=i(b);h(b);var S=d(b,2),C=i(S,!0);h(S),h(l),h(s),u((e,t)=>{g(l,`href`,e),y(p,c(n).assetId),y(x,`via ${c(r).id??``}`),y(C,t)},[()=>w(`/asset/[id]`,{id:c(n).assetId}),()=>c(a)?.proxy?j(c(a).proxy.fileSize):`—`]),t(e,s)}),u((e,t)=>{g(p,`href`,e),y(v,c(r).id),y(x,c(r).type),y(C,t)},[()=>w(`/asset/[id]`,{id:c(r).id}),()=>c(r).proxy?j(c(r).proxy.fileSize):`—`]),t(e,a)}),h(r),t(e,r)},O=_(()=>P(n).length>0),k=e=>{t(e,de())};o(ee,e=>{c(O)?e(te):e(k,-1)}),h(a),u((e,t,r,i)=>{p(a,`--manifest-color: ${e??``}`),y(b,n),y(S,t),y(T,`${r??``} asset(s)${i??``}`)},[()=>A.manifestAppearance(n).color??`var(--border-soft)`,()=>j(I(n)),()=>P(n).length,()=>F(n).length>0?` + ${F(n).length} passive`:``]),r(`click`,E,()=>ye(n)),r(`click`,D,()=>ve(n)),t(e,a)}),h(n),t(e,n)};o(De,e=>{c(N).length===0?e(Oe):e(ke,-1)}),h(Y);var $=d(Y,2),Ae=e=>{let n=_(()=>P(c(B)).length);{let r=_(()=>c(W)?`Deleting…`:`Delete`);ne(e,{title:`Delete manifest`,get confirmLabel(){return c(r)},danger:!0,get busy(){return c(W)},onConfirm:()=>void Se(),onCancel:q,children:(e,r)=>{var a=me(),s=f(a),l=d(i(s)),p=i(l,!0);h(l);var m=d(l);h(s);var g=d(s,2),_=e=>{var n=V(),r=i(n,!0);h(n),u(()=>y(r,c(G))),t(e,n)};o(g,e=>{c(G)&&e(_)}),u(()=>{y(p,c(B)),y(m,`? Its generated module is removed. Assets are
|
|
2
|
+
not deleted${c(n)>0?`, but ${c(n)} asset(s) lose this membership and may become unreachable`:``}.`)}),t(e,a)},$$slots:{default:!0}})}};o($,e=>{c(B)!==null&&e(Ae)});var je=d($,2),Me=e=>{{let n=_(()=>c(W)?`Renaming…`:`Rename`),r=_(()=>!c(xe));ne(e,{title:`Rename manifest`,get confirmLabel(){return c(n)},get confirmDisabled(){return c(r)},get busy(){return c(W)},onConfirm:()=>void Ce(),onCancel:q,children:(e,n)=>{var r=ge(),a=f(r),l=d(i(a),2);S(l),h(a);var p=d(a,2),g=e=>{var n=V(),r=i(n,!0);h(n),u(()=>y(r,c(J))),t(e,n)},_=e=>{t(e,he())};o(p,e=>{c(J)?e(g):c(be)&&e(_,1)});var v=d(p,2),b=d(i(v)),C=i(b,!0);h(b),x(),h(v);var w=d(v,2),T=e=>{var n=V(),r=i(n,!0);h(n),u(()=>y(r,c(G))),t(e,n)};o(w,e=>{c(G)&&e(T)}),u(()=>{l.disabled=c(W),y(C,c(H))}),m(l,()=>c(U),e=>s(U,e)),t(e,r)},$$slots:{default:!0}})}};o(je,e=>{c(H)!==null&&e(Me)}),u(()=>Q.disabled=!c(R)),r(`keydown`,Z,e=>{e.key===`Enter`&&z()}),m(Z,()=>c(C),e=>s(C,e)),r(`click`,Q,()=>void z()),t(n,we),b()}n([`keydown`,`click`]);export{H as component};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"
|
|
1
|
+
{"version":"1784805669339"}
|
|
Binary file
|
|
Binary file
|
package/build/handler.js
CHANGED
|
@@ -2,9 +2,9 @@ import './shims.js';
|
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import 'node:path';
|
|
4
4
|
import 'node:process';
|
|
5
|
-
export { h as handler } from './server/chunks/handler-
|
|
6
|
-
import './server/chunks/index.js-
|
|
7
|
-
import './server/chunks/manifest.js-
|
|
5
|
+
export { h as handler } from './server/chunks/handler-6UmsR4HY.js';
|
|
6
|
+
import './server/chunks/index.js-CjHZ4kgG.js';
|
|
7
|
+
import './server/chunks/manifest.js-DFh4gv8f.js';
|
|
8
8
|
import './env.js';
|
|
9
9
|
import 'node:buffer';
|
|
10
10
|
import 'node:crypto';
|
|
@@ -12,11 +12,11 @@ import 'node:http';
|
|
|
12
12
|
import 'node:timers';
|
|
13
13
|
import 'node:querystring';
|
|
14
14
|
import 'node:stream';
|
|
15
|
-
import './server/chunks/chunks/shared.js-
|
|
16
|
-
import './server/chunks/chunks/internal.js-
|
|
17
|
-
import './server/chunks/chunks/utils.js-
|
|
15
|
+
import './server/chunks/chunks/shared.js-ClQ0W6xa.js';
|
|
16
|
+
import './server/chunks/chunks/internal.js-xEkkCIRs.js';
|
|
17
|
+
import './server/chunks/chunks/utils.js-_DPNtm3G.js';
|
|
18
18
|
import 'node:url';
|
|
19
19
|
import './server/chunks/chunks/internal2.js-BlXt2rfE.js';
|
|
20
|
-
import './server/chunks/chunks/exports.js-
|
|
20
|
+
import './server/chunks/chunks/exports.js-BTuzD8-J.js';
|
|
21
21
|
import './server/chunks/chunks/routing.js-y-tryuip.js';
|
|
22
22
|
//# sourceMappingURL=handler.js.map
|
package/build/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import http from 'node:http';
|
|
2
2
|
import fs__default from 'node:fs';
|
|
3
3
|
import process from 'node:process';
|
|
4
|
-
import { p as polka, h as handler, f as format_listening_address } from './server/chunks/handler-
|
|
4
|
+
import { p as polka, h as handler, f as format_listening_address } from './server/chunks/handler-6UmsR4HY.js';
|
|
5
5
|
import { env, timeout_env } from './env.js';
|
|
6
6
|
import { rm } from 'node:fs/promises';
|
|
7
7
|
import './shims.js';
|
|
@@ -11,14 +11,14 @@ import 'node:path';
|
|
|
11
11
|
import 'node:timers';
|
|
12
12
|
import 'node:querystring';
|
|
13
13
|
import 'node:stream';
|
|
14
|
-
import './server/chunks/chunks/shared.js-
|
|
15
|
-
import './server/chunks/chunks/internal.js-
|
|
16
|
-
import './server/chunks/chunks/utils.js-
|
|
17
|
-
import './server/chunks/index.js-
|
|
14
|
+
import './server/chunks/chunks/shared.js-ClQ0W6xa.js';
|
|
15
|
+
import './server/chunks/chunks/internal.js-xEkkCIRs.js';
|
|
16
|
+
import './server/chunks/chunks/utils.js-_DPNtm3G.js';
|
|
17
|
+
import './server/chunks/index.js-CjHZ4kgG.js';
|
|
18
18
|
import './server/chunks/chunks/internal2.js-BlXt2rfE.js';
|
|
19
|
-
import './server/chunks/chunks/exports.js-
|
|
19
|
+
import './server/chunks/chunks/exports.js-BTuzD8-J.js';
|
|
20
20
|
import './server/chunks/chunks/routing.js-y-tryuip.js';
|
|
21
|
-
import './server/chunks/manifest.js-
|
|
21
|
+
import './server/chunks/manifest.js-DFh4gv8f.js';
|
|
22
22
|
import 'node:url';
|
|
23
23
|
|
|
24
24
|
const path = env('SOCKET_PATH', false);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as compareCodeUnits,
|
|
2
|
-
import { s as serverPluginsByType, i as isRecord, L as LibraryStore, d as descriptorsByType, m as manifestModuleFileName, l as locateGeneratedAssetDeclaration, a as serializeLibrary, b as serverPluginForType, S as SourceImportError, p as processAssets, g as generateManifestModules, r as readCurrentProxy, e as encodeRelativePathForUrl, c as invalidInput, f as parseLibrary } from './contract.js-
|
|
3
|
-
import { c as collectAllReferences, a as assetIdError, b as computeLibraryMembership, d as allDeliveredAssetIds } from './manifest-membership.js-
|
|
4
|
-
import { v as verifyStableRawFile, c as classifyRawDirectory } from './raw-reconciliation2.js-
|
|
1
|
+
import { c as compareCodeUnits, h as folderOfRawPath, j as rawFileNameOfPath, g as canonicalizeParameters, n as normalizeFolderPath, H as typesForFileName, J as proposeAssetId, k as parentFolderPath, u as portableFolderPathKey } from './core.js-CABVXpby.js';
|
|
2
|
+
import { s as serverPluginsByType, i as isRecord, L as LibraryStore, d as descriptorsByType, m as manifestModuleFileName, l as locateGeneratedAssetDeclaration, a as serializeLibrary, b as serverPluginForType, S as SourceImportError, p as processAssets, g as generateManifestModules, r as readCurrentProxy, e as encodeRelativePathForUrl, c as invalidInput, f as parseLibrary } from './contract.js-BHQbpsFk.js';
|
|
3
|
+
import { c as collectAllReferences, a as assetIdError, b as computeLibraryMembership, d as allDeliveredAssetIds } from './manifest-membership.js-BnSECWpJ.js';
|
|
4
|
+
import { v as verifyStableRawFile, c as classifyRawDirectory } from './raw-reconciliation2.js-CscuoBC2.js';
|
|
5
5
|
import { isAbsolute, resolve, join, extname, relative, sep } from 'node:path';
|
|
6
6
|
import { existsSync } from 'node:fs';
|
|
7
7
|
import { createJiti } from 'jiti';
|
|
@@ -1075,6 +1075,110 @@ function pathsFromRoot(root, target, referencesByAsset, countMemo = /* @__PURE__
|
|
|
1075
1075
|
function usageSnapshotRevision(parts) {
|
|
1076
1076
|
return createHash("sha256").update(parts.join("\0")).digest("hex");
|
|
1077
1077
|
}
|
|
1078
|
+
async function imageFingerprint(filePath, hashSize) {
|
|
1079
|
+
const width = hashSize + 1;
|
|
1080
|
+
const pixels = await sharp(filePath).rotate().trim({
|
|
1081
|
+
background: {
|
|
1082
|
+
r: 0,
|
|
1083
|
+
g: 0,
|
|
1084
|
+
b: 0,
|
|
1085
|
+
alpha: 0
|
|
1086
|
+
},
|
|
1087
|
+
threshold: 0
|
|
1088
|
+
}).resize({
|
|
1089
|
+
width,
|
|
1090
|
+
height: hashSize,
|
|
1091
|
+
fit: "fill"
|
|
1092
|
+
}).ensureAlpha().toColourspace("srgb").raw().toBuffer();
|
|
1093
|
+
const hash = new Uint8Array(Math.ceil(hashSize * hashSize / 8));
|
|
1094
|
+
const alphaHash = new Uint8Array(hash.length);
|
|
1095
|
+
const colorTotals = [
|
|
1096
|
+
0,
|
|
1097
|
+
0,
|
|
1098
|
+
0
|
|
1099
|
+
];
|
|
1100
|
+
let alphaTotal = 0;
|
|
1101
|
+
let bit = 0;
|
|
1102
|
+
for (let row = 0; row < hashSize; row++) for (let column = 0; column < hashSize; column++) {
|
|
1103
|
+
const leftOffset = (row * width + column) * 4;
|
|
1104
|
+
const rightOffset = leftOffset + 4;
|
|
1105
|
+
const leftAlpha = pixels[leftOffset + 3] / 255;
|
|
1106
|
+
const rightAlpha = pixels[rightOffset + 3] / 255;
|
|
1107
|
+
if (visibleLuminance(pixels, leftOffset, leftAlpha) < visibleLuminance(pixels, rightOffset, rightAlpha)) hash[bit >> 3] |= 1 << 7 - (bit & 7);
|
|
1108
|
+
if (leftAlpha < rightAlpha) alphaHash[bit >> 3] |= 1 << 7 - (bit & 7);
|
|
1109
|
+
for (let channel = 0; channel < 3; channel++) colorTotals[channel] += pixels[leftOffset + channel] * leftAlpha;
|
|
1110
|
+
alphaTotal += leftAlpha;
|
|
1111
|
+
bit += 1;
|
|
1112
|
+
}
|
|
1113
|
+
const pixelCount = hashSize * hashSize;
|
|
1114
|
+
return {
|
|
1115
|
+
hash,
|
|
1116
|
+
alphaHash,
|
|
1117
|
+
meanColor: colorTotals.map((total) => alphaTotal === 0 ? 0 : total / alphaTotal),
|
|
1118
|
+
meanAlpha: alphaTotal / pixelCount
|
|
1119
|
+
};
|
|
1120
|
+
}
|
|
1121
|
+
function visibleLuminance(pixels, offset, alpha) {
|
|
1122
|
+
return (pixels[offset] * .2126 + pixels[offset + 1] * .7152 + pixels[offset + 2] * .0722) * alpha + 127 * (1 - alpha);
|
|
1123
|
+
}
|
|
1124
|
+
function colorDistance(left, right) {
|
|
1125
|
+
return Math.hypot(left[0] - right[0], left[1] - right[1], left[2] - right[2]);
|
|
1126
|
+
}
|
|
1127
|
+
/** Count differing bits between two equally sized perceptual hashes. */
|
|
1128
|
+
function hammingDistance(left, right) {
|
|
1129
|
+
if (left.length !== right.length) throw new Error("Image hashes must have the same length.");
|
|
1130
|
+
let distance = 0;
|
|
1131
|
+
for (let index = 0; index < left.length; index++) {
|
|
1132
|
+
let value = left[index] ^ right[index];
|
|
1133
|
+
while (value !== 0) {
|
|
1134
|
+
value &= value - 1;
|
|
1135
|
+
distance += 1;
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
return distance;
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
* Stateful so the editor can reuse fingerprints by content hash between state
|
|
1142
|
+
* snapshots. Unreadable raws are omitted: duplicate detection is advisory and
|
|
1143
|
+
* must not hide the editor or replace the pipeline's canonical diagnostics.
|
|
1144
|
+
*/
|
|
1145
|
+
var ImageDuplicateDetector = class {
|
|
1146
|
+
#fingerprints = /* @__PURE__ */ new Map();
|
|
1147
|
+
async find(library, rawDir) {
|
|
1148
|
+
const images = Object.entries(library.assets).filter(([, record]) => record.type === "image").sort(([left], [right]) => compareCodeUnits(left, right));
|
|
1149
|
+
const activeHashes = new Set(images.map(([, record]) => record.rawHash));
|
|
1150
|
+
for (const hash of this.#fingerprints.keys()) if (!activeHashes.has(hash)) this.#fingerprints.delete(hash);
|
|
1151
|
+
const readable = [];
|
|
1152
|
+
for (const [id, record] of images) {
|
|
1153
|
+
let fingerprint = this.#fingerprints.get(record.rawHash);
|
|
1154
|
+
if (!fingerprint) {
|
|
1155
|
+
fingerprint = imageFingerprint(join(rawDir, record.raw), 8);
|
|
1156
|
+
this.#fingerprints.set(record.rawHash, fingerprint);
|
|
1157
|
+
}
|
|
1158
|
+
try {
|
|
1159
|
+
readable.push({
|
|
1160
|
+
id,
|
|
1161
|
+
fingerprint: await fingerprint
|
|
1162
|
+
});
|
|
1163
|
+
} catch {
|
|
1164
|
+
this.#fingerprints.delete(record.rawHash);
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
const duplicates = /* @__PURE__ */ new Map();
|
|
1168
|
+
for (let leftIndex = 0; leftIndex < readable.length; leftIndex++) for (let rightIndex = leftIndex + 1; rightIndex < readable.length; rightIndex++) {
|
|
1169
|
+
const left = readable[leftIndex];
|
|
1170
|
+
const right = readable[rightIndex];
|
|
1171
|
+
if (hammingDistance(left.fingerprint.hash, right.fingerprint.hash) > 5 || hammingDistance(left.fingerprint.alphaHash, right.fingerprint.alphaHash) > 5 || Math.abs(left.fingerprint.meanAlpha - right.fingerprint.meanAlpha) > .125 || colorDistance(left.fingerprint.meanColor, right.fingerprint.meanColor) > 32) continue;
|
|
1172
|
+
const leftDuplicates = duplicates.get(left.id) ?? [];
|
|
1173
|
+
leftDuplicates.push(right.id);
|
|
1174
|
+
duplicates.set(left.id, leftDuplicates);
|
|
1175
|
+
const rightDuplicates = duplicates.get(right.id) ?? [];
|
|
1176
|
+
rightDuplicates.push(left.id);
|
|
1177
|
+
duplicates.set(right.id, rightDuplicates);
|
|
1178
|
+
}
|
|
1179
|
+
return duplicates;
|
|
1180
|
+
}
|
|
1181
|
+
};
|
|
1078
1182
|
//#endregion
|
|
1079
1183
|
//#region src/lib/server/operations.ts
|
|
1080
1184
|
/**
|
|
@@ -1108,6 +1212,7 @@ var FundusOperations = class {
|
|
|
1108
1212
|
#store;
|
|
1109
1213
|
#importers;
|
|
1110
1214
|
#usageAnalyzer;
|
|
1215
|
+
#duplicateDetector = new ImageDuplicateDetector();
|
|
1111
1216
|
#operationQueue = Promise.resolve();
|
|
1112
1217
|
#pipelineQueue = Promise.resolve();
|
|
1113
1218
|
constructor(config, registry = serverPluginsByType, importerRegistry = serverImporters) {
|
|
@@ -1421,6 +1526,60 @@ var FundusOperations = class {
|
|
|
1421
1526
|
return this.#afterMutation(library);
|
|
1422
1527
|
});
|
|
1423
1528
|
}
|
|
1529
|
+
/** Materialize a new source, then atomically replace an existing asset's raw file. */
|
|
1530
|
+
async replaceRawFromSource(id, options) {
|
|
1531
|
+
const preflight = await this.#enqueueOperation(async () => {
|
|
1532
|
+
if (typeof options.importer !== "string") throw new SourceImportError("invalid-input", "Source replacement requires an importer string.");
|
|
1533
|
+
const library = await this.#store.read();
|
|
1534
|
+
this.#requireAsset(library, id);
|
|
1535
|
+
const record = library.assets[id];
|
|
1536
|
+
try {
|
|
1537
|
+
await verifyStableRawFile(join(this.#config.rawDir, record.raw), record.rawHash);
|
|
1538
|
+
} catch {
|
|
1539
|
+
throw new SourceImportError("stale-import", "The local raw file changed. Apply or discard that edit before replacing it.");
|
|
1540
|
+
}
|
|
1541
|
+
const importer = this.#importers.require(options.importer);
|
|
1542
|
+
const expected = {
|
|
1543
|
+
raw: record.raw,
|
|
1544
|
+
rawHash: record.rawHash,
|
|
1545
|
+
type: record.type,
|
|
1546
|
+
canonicalSource: record.importSource ? canonicalizeParameters(record.importSource) : null
|
|
1547
|
+
};
|
|
1548
|
+
return {
|
|
1549
|
+
importer,
|
|
1550
|
+
input: importer.validateInput(options.input),
|
|
1551
|
+
expected
|
|
1552
|
+
};
|
|
1553
|
+
});
|
|
1554
|
+
const raw = await preflight.importer.importRaw(preflight.input, {
|
|
1555
|
+
config: this.#config,
|
|
1556
|
+
fetch: globalThis.fetch
|
|
1557
|
+
});
|
|
1558
|
+
if (!raw.importSource) throw new SourceImportError("invalid-response", "The source importer did not return provenance for the replacement.");
|
|
1559
|
+
const importSource = raw.importSource;
|
|
1560
|
+
return this.#enqueueOperation(async () => {
|
|
1561
|
+
this.#validateImportedRaw(raw, preflight.importer.kind);
|
|
1562
|
+
const plugin = serverPluginForType(preflight.expected.type, this.#registry);
|
|
1563
|
+
if (!plugin.descriptor.accepts.includes(raw.extension)) throw new SourceImportError("invalid-response", `The ${preflight.expected.type} type does not accept ".${raw.extension}" files.`);
|
|
1564
|
+
const previousName = rawFileNameOfPath(preflight.expected.raw);
|
|
1565
|
+
const dot = previousName.lastIndexOf(".");
|
|
1566
|
+
const stem = dot > 0 ? previousName.slice(0, dot) : previousName;
|
|
1567
|
+
const pixelRatio = figmaSlicePixelRatio(raw, preflight.expected.type);
|
|
1568
|
+
try {
|
|
1569
|
+
const library = await this.#store.replaceRawFileFromSource(id, {
|
|
1570
|
+
fileName: `${stem}.${raw.extension}`,
|
|
1571
|
+
bytes: raw.bytes,
|
|
1572
|
+
importSource,
|
|
1573
|
+
expected: preflight.expected,
|
|
1574
|
+
updateParameters: pixelRatio === void 0 ? void 0 : (parameters) => plugin.descriptor.validateParameters(mergeParameterPatch(parameters, { pixelRatio }))
|
|
1575
|
+
});
|
|
1576
|
+
return this.#afterMutation(library);
|
|
1577
|
+
} catch (cause) {
|
|
1578
|
+
if (cause instanceof Error && cause.message === "stale-import") throw new SourceImportError("stale-import", "The asset or local raw file changed while the source was exporting. Nothing was replaced.");
|
|
1579
|
+
throw cause;
|
|
1580
|
+
}
|
|
1581
|
+
});
|
|
1582
|
+
}
|
|
1424
1583
|
async #createImportedAsset(raw, options) {
|
|
1425
1584
|
this.#validateImportedRaw(raw);
|
|
1426
1585
|
const fileName = raw.suggestedFileName ?? `${options.id}.${raw.extension}`;
|
|
@@ -1695,6 +1854,7 @@ var FundusOperations = class {
|
|
|
1695
1854
|
async #buildState(library, issues, classification) {
|
|
1696
1855
|
const [gitBranch, changedGitAssets] = await Promise.all([currentGitBranch(this.#config.projectRoot), gitAssetChanges(this.#config.projectRoot, this.#config.library, library)]);
|
|
1697
1856
|
const referencesByAsset = collectAllReferences(library, descriptorsByType(this.#registry));
|
|
1857
|
+
const duplicatesByAsset = await this.#duplicateDetector.find(library, this.#config.rawDir);
|
|
1698
1858
|
const membershipByManifest = computeLibraryMembership(library, referencesByAsset);
|
|
1699
1859
|
const delivered = allDeliveredAssetIds(membershipByManifest);
|
|
1700
1860
|
const passiveManifestsByAsset = /* @__PURE__ */ new Map();
|
|
@@ -1748,6 +1908,7 @@ var FundusOperations = class {
|
|
|
1748
1908
|
passiveManifests: passiveManifestsByAsset.get(assetId) ?? [],
|
|
1749
1909
|
proxy,
|
|
1750
1910
|
warnings,
|
|
1911
|
+
duplicateIds: duplicatesByAsset.get(assetId) ?? [],
|
|
1751
1912
|
references: {
|
|
1752
1913
|
outgoing: referencesByAsset[assetId].map((reference) => ({
|
|
1753
1914
|
field: reference.field,
|
|
@@ -1951,4 +2112,4 @@ async function createFundusContext() {
|
|
|
1951
2112
|
}
|
|
1952
2113
|
|
|
1953
2114
|
export { getFundusContext as g, initializeFundusContext as i };
|
|
1954
|
-
//# sourceMappingURL=context.js-
|
|
2115
|
+
//# sourceMappingURL=context.js-6YdbScn_.js.map
|