unspaghettit 0.2.0 → 0.4.0
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 +56 -18
- package/build/client/_app/immutable/assets/0.DCOD5ne_.css +1 -0
- package/build/client/_app/immutable/assets/0.DCOD5ne_.css.br +0 -0
- package/build/client/_app/immutable/assets/0.DCOD5ne_.css.gz +0 -0
- package/build/client/_app/immutable/assets/12.nv0I59TU.css.gz +0 -0
- package/build/client/_app/immutable/assets/3.B3akUL9A.css.gz +0 -0
- package/build/client/_app/immutable/assets/BehaviorGraph.Bk0xQRZk.css +1 -0
- package/build/client/_app/immutable/assets/BehaviorGraph.Bk0xQRZk.css.br +0 -0
- package/build/client/_app/immutable/assets/BehaviorGraph.Bk0xQRZk.css.gz +0 -0
- package/build/client/_app/immutable/chunks/B3vnQs252.js +1 -0
- package/build/client/_app/immutable/chunks/B3vnQs252.js.br +0 -0
- package/build/client/_app/immutable/chunks/B3vnQs252.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{CxyLMlpt2.js → BANF9BhQ2.js} +1 -1
- package/build/client/_app/immutable/chunks/BANF9BhQ2.js.br +0 -0
- package/build/client/_app/immutable/chunks/BANF9BhQ2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BJdTO_n6.js +1 -0
- package/build/client/_app/immutable/chunks/BJdTO_n6.js.br +0 -0
- package/build/client/_app/immutable/chunks/BJdTO_n6.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BPl9BITm.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BQ9GodWX2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bcyn5YUg.js +4 -0
- package/build/client/_app/immutable/chunks/Bcyn5YUg.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bcyn5YUg.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bfc9rQXP.js +1 -0
- package/build/client/_app/immutable/chunks/Bfc9rQXP.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bfc9rQXP.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BfMYiIUi.js → BjxqhpPG.js} +1 -1
- package/build/client/_app/immutable/chunks/BjxqhpPG.js.br +0 -0
- package/build/client/_app/immutable/chunks/BjxqhpPG.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ByaoVvNB.js +1 -0
- package/build/client/_app/immutable/chunks/ByaoVvNB.js.br +0 -0
- package/build/client/_app/immutable/chunks/ByaoVvNB.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BzLd0mTH.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C8b3IMj8.js +1 -0
- package/build/client/_app/immutable/chunks/C8b3IMj8.js.br +0 -0
- package/build/client/_app/immutable/chunks/C8b3IMj8.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CXvvf4uQ.js +1 -0
- package/build/client/_app/immutable/chunks/CXvvf4uQ.js.br +0 -0
- package/build/client/_app/immutable/chunks/CXvvf4uQ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Cl7Z3e6-.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ClC4qR7W2.js +2 -0
- package/build/client/_app/immutable/chunks/ClC4qR7W2.js.br +0 -0
- package/build/client/_app/immutable/chunks/ClC4qR7W2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CuGlh1c2.js +1 -0
- package/build/client/_app/immutable/chunks/CuGlh1c2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CuGlh1c2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CwzIdrQR.js +1 -0
- package/build/client/_app/immutable/chunks/CwzIdrQR.js.br +0 -0
- package/build/client/_app/immutable/chunks/CwzIdrQR.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D5speDV82.js +908 -0
- package/build/client/_app/immutable/chunks/D5speDV82.js.br +0 -0
- package/build/client/_app/immutable/chunks/D5speDV82.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D64sGJRN.js +1 -0
- package/build/client/_app/immutable/chunks/D64sGJRN.js.br +0 -0
- package/build/client/_app/immutable/chunks/D64sGJRN.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DNaA4QRO2.js +1 -0
- package/build/client/_app/immutable/chunks/DNaA4QRO2.js.br +0 -0
- package/build/client/_app/immutable/chunks/DNaA4QRO2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Da59TXPe.js +1 -0
- package/build/client/_app/immutable/chunks/Da59TXPe.js.br +2 -0
- package/build/client/_app/immutable/chunks/Da59TXPe.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DhTiE3j02.js +2 -0
- package/build/client/_app/immutable/chunks/DhTiE3j02.js.br +0 -0
- package/build/client/_app/immutable/chunks/DhTiE3j02.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dhqg7r_2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DmyaDy4d2.js +1 -0
- package/build/client/_app/immutable/chunks/DmyaDy4d2.js.br +0 -0
- package/build/client/_app/immutable/chunks/DmyaDy4d2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DryaQyjN2.js +1 -0
- package/build/client/_app/immutable/chunks/DryaQyjN2.js.br +0 -0
- package/build/client/_app/immutable/chunks/DryaQyjN2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DtK8qK5Q2.js +1 -0
- package/build/client/_app/immutable/chunks/DtK8qK5Q2.js.br +0 -0
- package/build/client/_app/immutable/chunks/DtK8qK5Q2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DtblIi6X2.js +1 -0
- package/build/client/_app/immutable/chunks/DtblIi6X2.js.br +1 -0
- package/build/client/_app/immutable/chunks/DtblIi6X2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/UkzDDeO42.js +1 -0
- package/build/client/_app/immutable/chunks/UkzDDeO42.js.br +0 -0
- package/build/client/_app/immutable/chunks/UkzDDeO42.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Vu8LzrwP2.js +1 -0
- package/build/client/_app/immutable/chunks/Vu8LzrwP2.js.br +0 -0
- package/build/client/_app/immutable/chunks/Vu8LzrwP2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/_b612aVb.js +1 -0
- package/build/client/_app/immutable/chunks/_b612aVb.js.br +0 -0
- package/build/client/_app/immutable/chunks/_b612aVb.js.gz +0 -0
- package/build/client/_app/immutable/chunks/aNMRV4sP2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/cMamJTsF.js.gz +0 -0
- package/build/client/_app/immutable/chunks/ib21i2T_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/kNaey6uv.js.gz +0 -0
- package/build/client/_app/immutable/chunks/oVMDLirx.js +1 -0
- package/build/client/_app/immutable/chunks/oVMDLirx.js.br +0 -0
- package/build/client/_app/immutable/chunks/oVMDLirx.js.gz +0 -0
- package/build/client/_app/immutable/chunks/olAc024e.js +1 -0
- package/build/client/_app/immutable/chunks/olAc024e.js.br +0 -0
- package/build/client/_app/immutable/chunks/olAc024e.js.gz +0 -0
- package/build/client/_app/immutable/chunks/suTxxv1t.js.gz +0 -0
- package/build/client/_app/immutable/chunks/wXIHzLMQ2.js +1 -0
- package/build/client/_app/immutable/chunks/wXIHzLMQ2.js.br +0 -0
- package/build/client/_app/immutable/chunks/wXIHzLMQ2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/wrqalH0a.js +1 -0
- package/build/client/_app/immutable/chunks/wrqalH0a.js.br +0 -0
- package/build/client/_app/immutable/chunks/wrqalH0a.js.gz +0 -0
- package/build/client/_app/immutable/chunks/x60Tn5kT.js +1 -0
- package/build/client/_app/immutable/chunks/x60Tn5kT.js.br +0 -0
- package/build/client/_app/immutable/chunks/x60Tn5kT.js.gz +0 -0
- package/build/client/_app/immutable/chunks/xihTtKlq.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{BOrLmFwJ.js → yShDxCNj.js} +1 -1
- package/build/client/_app/immutable/chunks/yShDxCNj.js.br +2 -0
- package/build/client/_app/immutable/chunks/yShDxCNj.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.Etd-exTb.js +2 -0
- package/build/client/_app/immutable/entry/app.Etd-exTb.js.br +0 -0
- package/build/client/_app/immutable/entry/app.Etd-exTb.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.DY2B3u4g.js +1 -0
- package/build/client/_app/immutable/entry/start.DY2B3u4g.js.br +0 -0
- package/build/client/_app/immutable/entry/start.DY2B3u4g.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.tKfYV3__.js +8 -0
- package/build/client/_app/immutable/nodes/0.tKfYV3__.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.tKfYV3__.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.KYdA6ppX.js → 1.CER5ICKt.js} +1 -1
- package/build/client/_app/immutable/nodes/1.CER5ICKt.js.br +1 -0
- package/build/client/_app/immutable/nodes/1.CER5ICKt.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.rT7cD8kX.js +1 -0
- package/build/client/_app/immutable/nodes/10.rT7cD8kX.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.rT7cD8kX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/11.BAnV_Y5Y.js +2 -0
- package/build/client/_app/immutable/nodes/11.BAnV_Y5Y.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.BAnV_Y5Y.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{9.CMW6a2Lg.js → 12.DCTRFMqo.js} +4 -3
- package/build/client/_app/immutable/nodes/12.DCTRFMqo.js.br +0 -0
- package/build/client/_app/immutable/nodes/12.DCTRFMqo.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{2.DBz20KgG.js → 2.CF488WWF.js} +1 -1
- package/build/client/_app/immutable/nodes/2.CF488WWF.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.CF488WWF.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.CP7CPPVH.js +1 -0
- package/build/client/_app/immutable/nodes/3.CP7CPPVH.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.CP7CPPVH.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.D1bxCSiM.js +3 -0
- package/build/client/_app/immutable/nodes/4.D1bxCSiM.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.D1bxCSiM.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.D6jZgh9y.js +48 -0
- package/build/client/_app/immutable/nodes/5.D6jZgh9y.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.D6jZgh9y.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.BrBFUA0s.js +1 -0
- package/build/client/_app/immutable/nodes/6.BrBFUA0s.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.BrBFUA0s.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.pajo8MfM.js +3 -0
- package/build/client/_app/immutable/nodes/7.pajo8MfM.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.pajo8MfM.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.Cc80_Igi.js +5 -0
- package/build/client/_app/immutable/nodes/8.Cc80_Igi.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.Cc80_Igi.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.CemgNJfw.js → 9.D72NaL3l.js} +1 -1
- package/build/client/_app/immutable/nodes/9.D72NaL3l.js.br +1 -0
- package/build/client/_app/immutable/nodes/9.D72NaL3l.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/client/lyriks_logo.svg +148 -0
- package/build/client/lyriks_logo.svg.br +0 -0
- package/build/client/lyriks_logo.svg.gz +0 -0
- package/build/server/chunks/0-8YZc572z.js +15 -0
- package/build/server/chunks/0-8YZc572z.js.map +1 -0
- package/build/server/chunks/1-DxkfSJLu.js +9 -0
- package/build/server/chunks/{1-DPpKAKXV.js.map → 1-DxkfSJLu.js.map} +1 -1
- package/build/server/chunks/10-DkObdGtU.js +9 -0
- package/build/server/chunks/10-DkObdGtU.js.map +1 -0
- package/build/server/chunks/11-DL94HxpZ.js +9 -0
- package/build/server/chunks/11-DL94HxpZ.js.map +1 -0
- package/build/server/chunks/12-CI74sCkt.js +9 -0
- package/build/server/chunks/12-CI74sCkt.js.map +1 -0
- package/build/server/chunks/2-qhWwQ4eL.js +9 -0
- package/build/server/chunks/2-qhWwQ4eL.js.map +1 -0
- package/build/server/chunks/3-CzoZtSTp.js +16 -0
- package/build/server/chunks/3-CzoZtSTp.js.map +1 -0
- package/build/server/chunks/4-CDa9DBsh.js +16 -0
- package/build/server/chunks/4-CDa9DBsh.js.map +1 -0
- package/build/server/chunks/5-qD2xxOrq.js +9 -0
- package/build/server/chunks/5-qD2xxOrq.js.map +1 -0
- package/build/server/chunks/6-B4mWzvDn.js +9 -0
- package/build/server/chunks/6-B4mWzvDn.js.map +1 -0
- package/build/server/chunks/7-zExv-fTN.js +9 -0
- package/build/server/chunks/7-zExv-fTN.js.map +1 -0
- package/build/server/chunks/8-BVrGdQg4.js +9 -0
- package/build/server/chunks/{6-QQ7r8Rd5.js.map → 8-BVrGdQg4.js.map} +1 -1
- package/build/server/chunks/9-BnZLRMYA.js +9 -0
- package/build/server/chunks/9-BnZLRMYA.js.map +1 -0
- package/build/server/chunks/BehaviorGraph-C-9z37Sm.js +788 -0
- package/build/server/chunks/BehaviorGraph-C-9z37Sm.js.map +1 -0
- package/build/server/chunks/Clock-BfMWQpmJ.js +5 -0
- package/build/server/chunks/Clock-BfMWQpmJ.js.map +1 -0
- package/build/server/chunks/DeleteDomain-BvHEgAyp.js +24 -0
- package/build/server/chunks/DeleteDomain-BvHEgAyp.js.map +1 -0
- package/build/server/chunks/{FeatureValidator-B8qEjAUW.js → DeleteFeature-DnK8sBJI.js} +142 -77
- package/build/server/chunks/DeleteFeature-DnK8sBJI.js.map +1 -0
- package/build/server/chunks/DeleteProject-BXZcehHZ.js +41 -0
- package/build/server/chunks/DeleteProject-BXZcehHZ.js.map +1 -0
- package/build/server/chunks/Effect-BJtLR-6l.js +46 -0
- package/build/server/chunks/Effect-BJtLR-6l.js.map +1 -0
- package/build/server/chunks/{FeatureCard-BQOY6gJQ.js → FeatureCard-Bb50FEfp.js} +4 -4
- package/build/server/chunks/{FeatureCard-BQOY6gJQ.js.map → FeatureCard-Bb50FEfp.js.map} +1 -1
- package/build/server/chunks/{FeatureJson-Bv-qiOSf.js → FeatureJson-DYvMEAub.js} +2 -2
- package/build/server/chunks/{FeatureJson-Bv-qiOSf.js.map → FeatureJson-DYvMEAub.js.map} +1 -1
- package/build/server/chunks/{FeatureTransforms-UWDHmWEg.js → FeatureTransforms-B0aI_CJD.js} +10 -3
- package/build/server/chunks/FeatureTransforms-B0aI_CJD.js.map +1 -0
- package/build/server/chunks/{ManageTagsDialog-DBxA3tM2.js → ManageTagsDialog-D5xbAVNB.js} +5 -5
- package/build/server/chunks/ManageTagsDialog-D5xbAVNB.js.map +1 -0
- package/build/server/chunks/{ProgressBar-CfhccQ83.js → ProgressBar-CUC2EZqG.js} +3 -3
- package/build/server/chunks/ProgressBar-CUC2EZqG.js.map +1 -0
- package/build/server/chunks/{ProjectsIndex-CoDrvRya.js → ProjectsIndex-FgIu9dBp.js} +135 -14
- package/build/server/chunks/ProjectsIndex-FgIu9dBp.js.map +1 -0
- package/build/server/chunks/{RenameTag-BuWLMl1m.js → RenameTag-DWIIR4Bx.js} +3 -6
- package/build/server/chunks/RenameTag-DWIIR4Bx.js.map +1 -0
- package/build/server/chunks/ScenarioApplier-YPKECfZe.js +55 -0
- package/build/server/chunks/ScenarioApplier-YPKECfZe.js.map +1 -0
- package/build/server/chunks/SimulatorEngine-DM1F9nCO.js +1391 -0
- package/build/server/chunks/SimulatorEngine-DM1F9nCO.js.map +1 -0
- package/build/server/chunks/StateValue-BBjWox8f.js +105 -0
- package/build/server/chunks/StateValue-BBjWox8f.js.map +1 -0
- package/build/server/chunks/{TagDotStrip-B1XQ0m0Y.js → TagDotStrip-0rn-IJVE.js} +4 -4
- package/build/server/chunks/TagDotStrip-0rn-IJVE.js.map +1 -0
- package/build/server/chunks/{TagFilterSelect-DbO0Qduh.js → TagFilterSelect-Dbu-7Dg4.js} +5 -5
- package/build/server/chunks/{TagFilterSelect-DbO0Qduh.js.map → TagFilterSelect-Dbu-7Dg4.js.map} +1 -1
- package/build/server/chunks/{TagPalette-CtMNYCmu.js → TagPalette-CpdTiC_7.js} +101 -9
- package/build/server/chunks/TagPalette-CpdTiC_7.js.map +1 -0
- package/build/server/chunks/TransitionCatalog-CYXUANy6.js +271 -0
- package/build/server/chunks/TransitionCatalog-CYXUANy6.js.map +1 -0
- package/build/server/chunks/_layout.svelte-pSSG85WT.js +1342 -0
- package/build/server/chunks/_layout.svelte-pSSG85WT.js.map +1 -0
- package/build/server/chunks/{_page.svelte-BKTveFAj.js → _page.svelte-BNH3szkk.js} +22 -17
- package/build/server/chunks/{_page.svelte-BKTveFAj.js.map → _page.svelte-BNH3szkk.js.map} +1 -1
- package/build/server/chunks/_page.svelte-BcuGvUt1.js +37 -0
- package/build/server/chunks/{_page.svelte-B7hT3P8E.js.map → _page.svelte-BcuGvUt1.js.map} +1 -1
- package/build/server/chunks/_page.svelte-BoOMG5Y0.js +37 -0
- package/build/server/chunks/{_page.svelte-De508ek8.js.map → _page.svelte-BoOMG5Y0.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-BqSC-1vK.js → _page.svelte-C4PRh_wP.js} +104 -54
- package/build/server/chunks/_page.svelte-C4PRh_wP.js.map +1 -0
- package/build/server/chunks/_page.svelte-Cqn34NXy.js +74 -0
- package/build/server/chunks/_page.svelte-Cqn34NXy.js.map +1 -0
- package/build/server/chunks/{_page.svelte-B1s7jxaQ.js → _page.svelte-DSCeOGv7.js} +15 -10
- package/build/server/chunks/_page.svelte-DSCeOGv7.js.map +1 -0
- package/build/server/chunks/_page.svelte-DqWdGt48.js +182 -0
- package/build/server/chunks/_page.svelte-DqWdGt48.js.map +1 -0
- package/build/server/chunks/_page.svelte-DsQHSEl4.js +49 -0
- package/build/server/chunks/_page.svelte-DsQHSEl4.js.map +1 -0
- package/build/server/chunks/{_page.svelte-BKKCa9H5.js → _page.svelte-Uioz8hsG.js} +18 -11
- package/build/server/chunks/{_page.svelte-BKKCa9H5.js.map → _page.svelte-Uioz8hsG.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-Zf9H4KOP.js → _page.svelte-p38jot9e.js} +81 -478
- package/build/server/chunks/_page.svelte-p38jot9e.js.map +1 -0
- package/build/server/chunks/{_page.svelte-BtI2zZ_Z.js → _page.svelte-yN5kzgJ9.js} +251 -447
- package/build/server/chunks/_page.svelte-yN5kzgJ9.js.map +1 -0
- package/build/server/chunks/{_server.ts-DsbbVoOn.js → _server.ts-1CtrHhte.js} +4 -4
- package/build/server/chunks/{_server.ts-DsbbVoOn.js.map → _server.ts-1CtrHhte.js.map} +1 -1
- package/build/server/chunks/{_server.ts-CWvU15tL.js → _server.ts-71Qx1lQb.js} +4 -4
- package/build/server/chunks/{_server.ts-CWvU15tL.js.map → _server.ts-71Qx1lQb.js.map} +1 -1
- package/build/server/chunks/_server.ts-BAyekGHB.js +961 -0
- package/build/server/chunks/_server.ts-BAyekGHB.js.map +1 -0
- package/build/server/chunks/{_server.ts-BihpbxOW.js → _server.ts-BLWhU22T.js} +4 -4
- package/build/server/chunks/{_server.ts-BihpbxOW.js.map → _server.ts-BLWhU22T.js.map} +1 -1
- package/build/server/chunks/{_server.ts-YnfXkeMJ.js → _server.ts-C7EVZVxv.js} +22 -13
- package/build/server/chunks/_server.ts-C7EVZVxv.js.map +1 -0
- package/build/server/chunks/{_server.ts-vcaqdwxS.js → _server.ts-CGjYuLmo.js} +12 -7
- package/build/server/chunks/_server.ts-CGjYuLmo.js.map +1 -0
- package/build/server/chunks/{_server.ts-Dy5zQHe2.js → _server.ts-CX6H8fSE.js} +8 -31
- package/build/server/chunks/_server.ts-CX6H8fSE.js.map +1 -0
- package/build/server/chunks/{_server.ts-BuoQ02BW.js → _server.ts-CyEdTCLr.js} +4 -4
- package/build/server/chunks/{_server.ts-BuoQ02BW.js.map → _server.ts-CyEdTCLr.js.map} +1 -1
- package/build/server/chunks/_server.ts-DKVTM9Pj.js +77 -0
- package/build/server/chunks/_server.ts-DKVTM9Pj.js.map +1 -0
- package/build/server/chunks/{_server.ts-0uNTZKwF.js → _server.ts-Dip65hLJ.js} +15 -9
- package/build/server/chunks/_server.ts-Dip65hLJ.js.map +1 -0
- package/build/server/chunks/{_server.ts-D4EO0VHu.js → _server.ts-Dm0tCs2i.js} +5 -5
- package/build/server/chunks/{_server.ts-D4EO0VHu.js.map → _server.ts-Dm0tCs2i.js.map} +1 -1
- package/build/server/chunks/{_server.ts-BIBWjQI-.js → _server.ts-DsYwK_uW.js} +4 -4
- package/build/server/chunks/{_server.ts-BIBWjQI-.js.map → _server.ts-DsYwK_uW.js.map} +1 -1
- package/build/server/chunks/{_server.ts-DDa0Nk_S.js → _server.ts-RCEgegYU.js} +4 -4
- package/build/server/chunks/{_server.ts-DDa0Nk_S.js.map → _server.ts-RCEgegYU.js.map} +1 -1
- package/build/server/chunks/_server.ts-XOLAT4dd.js +146 -0
- package/build/server/chunks/_server.ts-XOLAT4dd.js.map +1 -0
- package/build/server/chunks/_server.ts-afh_zLVi.js +69 -0
- package/build/server/chunks/_server.ts-afh_zLVi.js.map +1 -0
- package/build/server/chunks/{browserContainer-CNX7ANld.js → browserContainer-BdldtueJ.js} +71 -1378
- package/build/server/chunks/browserContainer-BdldtueJ.js.map +1 -0
- package/build/server/chunks/buildSearchDocs-Cyfrnw9G.js +337 -0
- package/build/server/chunks/buildSearchDocs-Cyfrnw9G.js.map +1 -0
- package/build/server/chunks/{builderModeStore.svelte-ihupr-3p.js → builderModeStore.svelte-BEZMQEqn.js} +223 -11
- package/build/server/chunks/builderModeStore.svelte-BEZMQEqn.js.map +1 -0
- package/build/server/chunks/client-C9Cat4DK.js +51 -0
- package/build/server/chunks/{client-DfpLcAZ9.js.map → client-C9Cat4DK.js.map} +1 -1
- package/build/server/chunks/{error.svelte-C35KOpru.js → error.svelte-CzVR_A6P.js} +5 -5
- package/build/server/chunks/{error.svelte-C35KOpru.js.map → error.svelte-CzVR_A6P.js.map} +1 -1
- package/build/server/chunks/featureQueueContext-DuXpyTdC.js +32 -0
- package/build/server/chunks/featureQueueContext-DuXpyTdC.js.map +1 -0
- package/build/server/chunks/featureStore.svelte-DHZf88gu.js +162 -0
- package/build/server/chunks/featureStore.svelte-DHZf88gu.js.map +1 -0
- package/build/server/chunks/{projectsStore.svelte-QDz5PchX.js → featuresStore.svelte-bUyQBg1-.js} +95 -3
- package/build/server/chunks/featuresStore.svelte-bUyQBg1-.js.map +1 -0
- package/build/server/chunks/{hooks.server-Rv301GTB.js → hooks.server-y3jdg_sB.js} +6 -2
- package/build/server/chunks/hooks.server-y3jdg_sB.js.map +1 -0
- package/build/server/chunks/humanize-CkCPfeWi.js +53 -0
- package/build/server/chunks/humanize-CkCPfeWi.js.map +1 -0
- package/build/server/chunks/{index-server-7H0jzj0M.js → index-server-DvBux_Gf.js} +47 -2
- package/build/server/chunks/{index-server-7H0jzj0M.js.map → index-server-DvBux_Gf.js.map} +1 -1
- package/build/server/chunks/{internal-BPKrFkK1.js → internal-BFt8yDlf.js} +5 -5
- package/build/server/chunks/{internal-BPKrFkK1.js.map → internal-BFt8yDlf.js.map} +1 -1
- package/build/server/chunks/projectBundleClient-BtvWPh87.js +168 -0
- package/build/server/chunks/projectBundleClient-BtvWPh87.js.map +1 -0
- package/build/server/chunks/projectContextStore.svelte-jRJGJZ42.js +141 -0
- package/build/server/chunks/projectContextStore.svelte-jRJGJZ42.js.map +1 -0
- package/build/server/chunks/projectFeaturesStore.svelte-BwNEtDIL.js +87 -0
- package/build/server/chunks/projectFeaturesStore.svelte-BwNEtDIL.js.map +1 -0
- package/build/server/chunks/projectStore.svelte-BNuLNxk_.js +230 -0
- package/build/server/chunks/projectStore.svelte-BNuLNxk_.js.map +1 -0
- package/build/server/chunks/{reconcile-Dv7jS3C8.js → reconcile-CVG2LSlW.js} +54 -267
- package/build/server/chunks/reconcile-CVG2LSlW.js.map +1 -0
- package/build/server/chunks/registry-DqAn_hVE.js +21 -0
- package/build/server/chunks/registry-DqAn_hVE.js.map +1 -0
- package/build/server/chunks/{snapshotRepository-BPXCjX92.js → snapshotRepository-8f-2wTrb.js} +30 -5
- package/build/server/chunks/snapshotRepository-8f-2wTrb.js.map +1 -0
- package/build/server/chunks/{state-CpLVNZq7.js → state-CZZtjXLE.js} +3 -3
- package/build/server/chunks/{state-CpLVNZq7.js.map → state-CZZtjXLE.js.map} +1 -1
- package/build/server/chunks/{sync-DZ3dn761.js → sync-Bn6eSUhC.js} +3 -3
- package/build/server/chunks/{sync-DZ3dn761.js.map → sync-Bn6eSUhC.js.map} +1 -1
- package/build/server/chunks/{syncBridge-BwXzPdjJ.js → syncAwareRepositories-DvUjq5Q6.js} +27 -3
- package/build/server/chunks/syncAwareRepositories-DvUjq5Q6.js.map +1 -0
- package/build/server/chunks/{tagPaletteStore.svelte-DfZOBvgY.js → tagPaletteStore.svelte-C71bdzDl.js} +4 -4
- package/build/server/chunks/{tagPaletteStore.svelte-DfZOBvgY.js.map → tagPaletteStore.svelte-C71bdzDl.js.map} +1 -1
- package/build/server/index.js +2 -2
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +74 -29
- package/build/server/manifest.js.map +1 -1
- package/cli/README.md +70 -2
- package/cli/commands/check.ts +190 -0
- package/cli/commands/ci.ts +71 -0
- package/cli/commands/coverage-ingest.ts +112 -0
- package/cli/commands/dashboard.ts +14 -0
- package/cli/commands/init.ts +26 -0
- package/cli/commands/scenarios-adapter.ts +96 -0
- package/cli/commands/theme.ts +62 -0
- package/cli/scenarios/adapter-scaffold.ts +99 -0
- package/cli/scenarios/codegen.ts +7 -1
- package/cli/scenarios/results.ts +85 -0
- package/cli/skills/unspa-audit/SKILL.md +19 -0
- package/cli/skills/unspa-edit/SKILL.md +20 -3
- package/cli/skills/unspa-implement/SKILL.md +28 -0
- package/cli/unspa.ts +136 -2
- package/cli/util/context-files.ts +18 -2
- package/cli/util/theme.ts +34 -0
- package/mcp-server/bin.ts +104 -104
- package/mcp-server/migrate-defaults.ts +164 -164
- package/mcp-server/repo-link.ts +142 -134
- package/mcp-server/resources/guide.ts +24 -4
- package/mcp-server/resources/operations.ts +3 -0
- package/mcp-server/seed-snapshots.ts +22 -22
- package/mcp-server/server.ts +8 -4
- package/mcp-server/sync-aware-repos.ts +79 -79
- package/mcp-server/sync-notifier.ts +180 -127
- package/mcp-server/tools/_codegen.ts +115 -115
- package/mcp-server/tools/_entity_builders.ts +30 -0
- package/mcp-server/tools/_shared.ts +210 -210
- package/mcp-server/tools/action.ts +210 -210
- package/mcp-server/tools/batch.ts +29 -5
- package/mcp-server/tools/effect.ts +139 -135
- package/mcp-server/tools/entity.ts +132 -132
- package/mcp-server/tools/entityField.ts +132 -132
- package/mcp-server/tools/event.ts +116 -116
- package/mcp-server/tools/feature.ts +264 -264
- package/mcp-server/tools/invariant.ts +275 -275
- package/mcp-server/tools/persona.ts +141 -141
- package/mcp-server/tools/project.ts +500 -391
- package/mcp-server/tools/reachabilityGoal.ts +97 -0
- package/mcp-server/tools/read.ts +526 -483
- package/mcp-server/tools/reorder.ts +114 -114
- package/mcp-server/tools/resource.ts +194 -194
- package/mcp-server/tools/rule.ts +302 -302
- package/mcp-server/tools/scenario.ts +4 -1
- package/mcp-server/tools/specGaps.ts +221 -221
- package/mcp-server/tools/state.ts +10 -2
- package/mcp-server/tools/surface.ts +102 -102
- package/mcp-server/tools/transition.ts +96 -96
- package/mcp-server/tools/verification.ts +131 -0
- package/package.json +15 -2
- package/src/app.css +208 -9
- package/src/app.html +15 -1
- package/src/features/behavior-model/application/ports/FeatureRepository.ts +16 -16
- package/src/features/behavior-model/application/use-cases/CreateFeature.ts +24 -24
- package/src/features/behavior-model/application/use-cases/DeleteFeature.ts +8 -8
- package/src/features/behavior-model/application/use-cases/GetFeature.ts +9 -9
- package/src/features/behavior-model/application/use-cases/ListFeatures.ts +10 -10
- package/src/features/behavior-model/application/use-cases/MutateFeature.ts +90 -90
- package/src/features/behavior-model/application/use-cases/SaveFeature.ts +31 -31
- package/src/features/behavior-model/domain/entities/Entity.ts +45 -45
- package/src/features/behavior-model/domain/entities/EventDefinition.ts +35 -35
- package/src/features/behavior-model/domain/entities/Feature.ts +10 -0
- package/src/features/behavior-model/domain/entities/Persona.ts +33 -33
- package/src/features/behavior-model/domain/entities/ReachabilityGoal.ts +39 -0
- package/src/features/behavior-model/domain/entities/Resource.ts +54 -54
- package/src/features/behavior-model/domain/entities/Scenario.ts +15 -0
- package/src/features/behavior-model/domain/entities/StateDefinition.ts +13 -0
- package/src/features/behavior-model/domain/entities/Surface.ts +75 -75
- package/src/features/behavior-model/domain/entities/index.ts +9 -9
- package/src/features/behavior-model/domain/services/BehaviorGraphModel.ts +556 -0
- package/src/features/behavior-model/domain/services/DerivedState.ts +67 -0
- package/src/features/behavior-model/domain/services/EffectApplier.ts +112 -3
- package/src/features/behavior-model/domain/services/EffectiveEntities.ts +166 -166
- package/src/features/behavior-model/domain/services/EntityDeducer.ts +83 -83
- package/src/features/behavior-model/domain/services/EventCatalog.ts +141 -141
- package/src/features/behavior-model/domain/services/FeatureExpressionNormalizer.ts +43 -5
- package/src/features/behavior-model/domain/services/FeatureSharedStateNormalizer.ts +24 -3
- package/src/features/behavior-model/domain/services/FeatureTransforms.ts +33 -0
- package/src/features/behavior-model/domain/services/FeatureValidator.ts +124 -16
- package/src/features/behavior-model/domain/services/PersonaApplier.ts +39 -39
- package/src/features/behavior-model/domain/services/ResourceDeducer.ts +64 -64
- package/src/features/behavior-model/domain/services/ResourceUsage.ts +79 -79
- package/src/features/behavior-model/domain/services/ScenarioApplier.ts +40 -40
- package/src/features/behavior-model/domain/services/SharedStateDefinitions.ts +32 -32
- package/src/features/behavior-model/domain/services/StatePathReferences.ts +249 -217
- package/src/features/behavior-model/domain/services/TransitionCatalog.ts +173 -173
- package/src/features/behavior-model/domain/value-objects/Effect.ts +100 -3
- package/src/features/behavior-model/domain/value-objects/EntityFieldType.ts +57 -57
- package/src/features/behavior-model/domain/value-objects/Expression.ts +22 -2
- package/src/features/behavior-model/domain/value-objects/ParameterType.ts +57 -57
- package/src/features/behavior-model/domain/value-objects/Resource.ts +210 -210
- package/src/features/behavior-model/domain/value-objects/RuleCategory.ts +57 -57
- package/src/features/behavior-model/domain/value-objects/RuleCondition.ts +52 -1
- package/src/features/behavior-model/domain/value-objects/SimulationClock.ts +35 -0
- package/src/features/behavior-model/domain/value-objects/ids.ts +2 -0
- package/src/features/behavior-model/infrastructure/io/FeatureJson.ts +89 -89
- package/src/features/behavior-model/infrastructure/persistence/HttpFeatureRepository.ts +43 -43
- package/src/features/behavior-model/infrastructure/persistence/JsonFolderFeatureRepository.ts +10 -0
- package/src/features/behavior-model/infrastructure/persistence/snapshot-discovery.ts +76 -76
- package/src/features/behavior-model/infrastructure/seed/seedStorefront.ts +967 -967
- package/src/features/behavior-model/presentation/adapters/VisBehaviorGraphRenderer.ts +501 -0
- package/src/features/behavior-model/presentation/components/ActionEditor.svelte +683 -682
- package/src/features/behavior-model/presentation/components/ActionsEditor.svelte +232 -232
- package/src/features/behavior-model/presentation/components/BehaviorGraph.svelte +568 -0
- package/src/features/behavior-model/presentation/components/EffectEditor.svelte +168 -168
- package/src/features/behavior-model/presentation/components/EntityEditor.svelte +241 -248
- package/src/features/behavior-model/presentation/components/EntityFieldRow.svelte +180 -181
- package/src/features/behavior-model/presentation/components/EntityManager.svelte +252 -251
- package/src/features/behavior-model/presentation/components/EventsManager.svelte +373 -372
- package/src/features/behavior-model/presentation/components/FeatureEditor.svelte +396 -348
- package/src/features/behavior-model/presentation/components/FeatureHeader.svelte +165 -148
- package/src/features/behavior-model/presentation/components/FeatureHealthStrip.svelte +110 -110
- package/src/features/behavior-model/presentation/components/HistoryPanel.svelte +154 -154
- package/src/features/behavior-model/presentation/components/NewFeatureForm.svelte +66 -66
- package/src/features/behavior-model/presentation/components/ParameterNameSelect.svelte +84 -84
- package/src/features/behavior-model/presentation/components/ParametersEditor.svelte +411 -411
- package/src/features/behavior-model/presentation/components/PersonaEditor.svelte +244 -244
- package/src/features/behavior-model/presentation/components/PersonasManager.svelte +130 -130
- package/src/features/behavior-model/presentation/components/ReachabilityGoalEditor.svelte +230 -0
- package/src/features/behavior-model/presentation/components/ReachabilityGoalsEditor.svelte +86 -0
- package/src/features/behavior-model/presentation/components/ResourcesManager.svelte +291 -290
- package/src/features/behavior-model/presentation/components/ScenariosEditor.svelte +496 -496
- package/src/features/behavior-model/presentation/components/StateDefinitionsEditor.svelte +356 -356
- package/src/features/behavior-model/presentation/components/SurfaceEntitiesView.svelte +88 -88
- package/src/features/behavior-model/presentation/components/SurfaceInvariantsEditor.svelte +76 -76
- package/src/features/behavior-model/presentation/components/SurfaceList.svelte +300 -300
- package/src/features/behavior-model/presentation/components/SurfaceMetaEditor.svelte +158 -156
- package/src/features/behavior-model/presentation/components/SurfacePanel.svelte +198 -198
- package/src/features/behavior-model/presentation/components/SurfacePersonasView.svelte +122 -122
- package/src/features/behavior-model/presentation/components/SurfaceResourcesView.svelte +113 -113
- package/src/features/behavior-model/presentation/components/SurfaceRulesEditor.svelte +69 -69
- package/src/features/behavior-model/presentation/components/TransitionsManager.svelte +322 -321
- package/src/features/behavior-model/presentation/context/featureQueueContext.ts +78 -0
- package/src/features/behavior-model/presentation/stores/editorStore.svelte.ts +132 -131
- package/src/features/behavior-model/presentation/stores/featureStore.svelte.ts +177 -177
- package/src/features/behavior-model/presentation/stores/featuresStore.svelte.ts +98 -98
- package/src/features/behavior-model/presentation/view-models/BehaviorGraphTheme.ts +44 -0
- package/src/features/behavior-model/presentation/view-models/factories.ts +181 -132
- package/src/features/builder-mode/domain/BuilderModeDashboard.ts +7 -1
- package/src/features/builder-mode/presentation/components/BuilderModeDashboard.svelte +78 -16
- package/src/features/builder-mode/presentation/components/BuilderTagChips.svelte +25 -0
- package/src/features/builder-mode/presentation/stores/builderModeStore.svelte.ts +247 -3
- package/src/features/domains/infrastructure/persistence/JsonFolderDomainRepository.ts +9 -0
- package/src/features/global-search/application/use-cases/LoadSearchIndex.ts +70 -0
- package/src/features/global-search/domain/SearchDoc.ts +111 -0
- package/src/features/global-search/domain/buildSearchDocs.ts +483 -0
- package/src/features/global-search/domain/searchNav.ts +58 -0
- package/src/features/global-search/domain/searchScoring.ts +81 -0
- package/src/features/global-search/infrastructure/adapters/defaultSearchHost.ts +28 -0
- package/src/features/global-search/presentation/components/GlobalSearch.svelte +262 -0
- package/src/features/global-search/presentation/ports/SearchHostPorts.ts +41 -0
- package/src/features/global-search/presentation/searchKindMeta.ts +108 -0
- package/src/features/global-search/presentation/stores/globalSearchStore.svelte.ts +171 -0
- package/src/features/implementation-queue/presentation/components/FloatingQueueWidget.svelte +264 -0
- package/src/features/implementation-queue/presentation/stores/globalQueueStore.svelte.ts +172 -0
- package/src/features/implementation-status/application/ports/ImplementationStatusRepository.ts +8 -8
- package/src/features/implementation-status/application/use-cases/GetImplementationStatus.ts +8 -8
- package/src/features/implementation-status/domain/ApplyCapturedToSpec.ts +323 -322
- package/src/features/implementation-status/domain/FieldDiff.ts +238 -236
- package/src/features/implementation-status/infrastructure/persistence/InMemoryImplementationStatusRepository.ts +21 -21
- package/src/features/implementation-status/presentation/components/ImplementationStatusPanel.svelte +831 -831
- package/src/features/implementation-status/presentation/stores/implementationStatusStore.svelte.ts +97 -97
- package/src/features/library/application/use-cases/ApplyBlueprintsToFeature.ts +33 -33
- package/src/features/library/domain/services/BlueprintApplier.ts +94 -94
- package/src/features/library/infrastructure/blueprints/auth/ResetPasswordBlueprint.ts +332 -332
- package/src/features/library/infrastructure/blueprints/auth/SignInBlueprint.ts +281 -281
- package/src/features/library/infrastructure/blueprints/auth/SignUpBlueprint.ts +299 -299
- package/src/features/library/infrastructure/blueprints/auth/VerifyEmailBlueprint.ts +288 -288
- package/src/features/library/infrastructure/blueprints/auth/shared.ts +146 -146
- package/src/features/library/infrastructure/blueprints/commerce/CartBlueprint.ts +222 -222
- package/src/features/library/infrastructure/blueprints/commerce/CatalogBlueprint.ts +190 -190
- package/src/features/library/infrastructure/blueprints/commerce/CheckoutBlueprint.ts +322 -322
- package/src/features/library/infrastructure/blueprints/commerce/OrderConfirmationBlueprint.ts +172 -172
- package/src/features/library/infrastructure/blueprints/commerce/ProductDetailsBlueprint.ts +290 -290
- package/src/features/library/infrastructure/blueprints/content/ReviewsBlueprint.ts +392 -392
- package/src/features/library/infrastructure/blueprints/onboarding/OnboardingWizardBlueprint.ts +344 -344
- package/src/features/library/infrastructure/blueprints/utility/CanvasBlueprint.ts +419 -419
- package/src/features/library/infrastructure/blueprints/utility/CookieConsentBlueprint.ts +195 -195
- package/src/features/library/infrastructure/blueprints/utility/NotFoundBlueprint.ts +86 -86
- package/src/features/library/infrastructure/blueprints/utility/SearchPaletteBlueprint.ts +192 -192
- package/src/features/library/infrastructure/blueprints/utility/StoreLocatorBlueprint.ts +221 -221
- package/src/features/library/infrastructure/blueprints/utility/TaskBoardBlueprint.ts +196 -196
- package/src/features/maturity/application/use-cases/ScoreFeature.ts +7 -7
- package/src/features/maturity/domain/MaturityReport.ts +70 -70
- package/src/features/maturity/domain/MaturityScorer.ts +1001 -985
- package/src/features/maturity/presentation/components/MaturityPanel.svelte +376 -372
- package/src/features/mcp-tools/application/tools/dryRunSimulate.ts +24 -24
- package/src/features/mcp-tools/application/tools/findStateReferences.ts +19 -19
- package/src/features/mcp-tools/application/tools/generateTypes.ts +0 -1
- package/src/features/mcp-tools/application/tools/getAction.ts +165 -165
- package/src/features/mcp-tools/application/tools/getFeature.ts +5 -5
- package/src/features/mcp-tools/application/tools/getFeatureIndex.ts +79 -79
- package/src/features/mcp-tools/application/tools/getNeighborhood.ts +319 -319
- package/src/features/mcp-tools/application/tools/getSurface.ts +86 -86
- package/src/features/mcp-tools/application/tools/index.ts +56 -56
- package/src/features/mcp-tools/application/tools/listActions.ts +49 -49
- package/src/features/mcp-tools/application/tools/listFeatures.ts +7 -7
- package/src/features/mcp-tools/application/tools/scoreFeature.ts +153 -153
- package/src/features/projects/application/ports/ProjectRepository.ts +14 -14
- package/src/features/projects/application/use-cases/AddFeatureToProject.ts +23 -23
- package/src/features/projects/application/use-cases/CreateProject.ts +16 -16
- package/src/features/projects/application/use-cases/FindProjectContainingFeature.ts +23 -23
- package/src/features/projects/application/use-cases/GetProjectAggregate.ts +131 -131
- package/src/features/projects/application/use-cases/ImportProjectBundle.ts +45 -0
- package/src/features/projects/application/use-cases/MoveFeatureInProject.ts +36 -36
- package/src/features/projects/application/use-cases/RemoveFeatureFromProject.ts +23 -23
- package/src/features/projects/domain/entities/Project.ts +12 -0
- package/src/features/projects/domain/services/InheritedFromProject.ts +130 -130
- package/src/features/projects/infrastructure/persistence/JsonFolderProjectRepository.ts +9 -0
- package/src/features/projects/presentation/components/ProjectCard.svelte +27 -8
- package/src/features/projects/presentation/components/ProjectEditor.svelte +23 -19
- package/src/features/projects/presentation/components/ProjectFeaturesPanel.svelte +433 -433
- package/src/features/projects/presentation/components/ProjectsIndex.svelte +54 -10
- package/src/features/projects/presentation/stores/projectContextStore.svelte.ts +170 -170
- package/src/features/projects/presentation/stores/projectFeaturesStore.svelte.ts +114 -114
- package/src/features/projects/presentation/stores/projectStore.svelte.ts +265 -266
- package/src/features/projects/presentation/stores/projectsStore.svelte.ts +134 -134
- package/src/features/simulator/application/use-cases/RunScenarios.ts +27 -1
- package/src/features/simulator/application/use-cases/SimulateAction.ts +47 -47
- package/src/features/simulator/domain/SimulationResult.ts +79 -79
- package/src/features/simulator/domain/SimulatorEngine.ts +43 -9
- package/src/features/simulator/domain/StateExplorer.ts +369 -0
- package/src/features/simulator/domain/SurfaceReachability.ts +130 -0
- package/src/features/simulator/presentation/components/ParameterInputs.svelte +277 -277
- package/src/features/simulator/presentation/components/PersonaPicker.svelte +52 -52
- package/src/features/simulator/presentation/components/ScenarioPicker.svelte +42 -45
- package/src/features/simulator/presentation/components/SidePanel.svelte +170 -170
- package/src/features/simulator/presentation/components/SimulationResultView.svelte +394 -394
- package/src/features/simulator/presentation/components/SimulatorPanel.svelte +293 -293
- package/src/features/simulator/presentation/components/StateInspector.svelte +101 -101
- package/src/features/simulator/presentation/stores/simulatorStore.svelte.ts +268 -268
- package/src/features/tutorial/presentation/components/CodeBlock.svelte +5 -1
- package/src/features/verification/application/ports/BehavioralIndexReader.ts +12 -0
- package/src/features/verification/application/use-cases/VerifyFeatures.ts +151 -0
- package/src/features/verification/domain/DriftReport.ts +37 -0
- package/src/features/verification/domain/EventCoherenceReport.ts +27 -0
- package/src/features/verification/domain/IndexedImplementation.ts +27 -0
- package/src/features/verification/domain/VerificationReport.ts +59 -0
- package/src/features/verification/domain/VerificationThresholds.ts +52 -0
- package/src/features/verification/domain/VerificationVerdict.ts +43 -0
- package/src/features/verification/domain/aggregateVerdict.ts +244 -0
- package/src/features/verification/domain/analyzeEventCoherence.ts +43 -0
- package/src/features/verification/domain/detectDrift.ts +166 -0
- package/src/features/verification/domain/verifiedCoverage.ts +37 -0
- package/src/features/verification/infrastructure/persistence/FileBehavioralIndexReader.ts +81 -0
- package/src/features/verification/infrastructure/persistence/StaticBehavioralIndexReader.ts +15 -0
- package/src/features/verification/presentation/components/VerifyPanel.svelte +74 -0
- package/src/features/verification/presentation/stores/verificationStore.svelte.ts +64 -0
- package/src/hooks.server.ts +11 -1
- package/src/lib/server/openLocalDirectory.ts +40 -0
- package/src/lib/server/searchIndex.ts +161 -0
- package/src/lib/server/snapshotRepository.ts +37 -37
- package/src/lib/server/sync/YDocManager.ts +391 -391
- package/src/lib/server/sync/historyStore.ts +276 -276
- package/src/lib/server/sync/wsServer.ts +1 -1
- package/src/lib/sync/protocol.ts +147 -147
- package/src/lib/sync/roomId.ts +33 -33
- package/src/lib/theme/registry.ts +77 -0
- package/src/lib/theme/themeStore.svelte.ts +64 -0
- package/src/routes/+layout.svelte +288 -30
- package/src/routes/api/domains/[id]/+server.ts +7 -3
- package/src/routes/api/projects/[id]/+server.ts +14 -4
- package/src/routes/api/projects/import/+server.ts +16 -38
- package/src/routes/api/search-index/+server.ts +16 -0
- package/src/routes/api/snapshots/[id]/+server.ts +56 -44
- package/src/routes/api/snapshots/[id]/implementation-status/+server.ts +13 -13
- package/src/routes/api/snapshots/[id]/verify/+server.ts +37 -0
- package/src/routes/api/sync/reload/+server.ts +157 -157
- package/src/routes/api/system/hub-directory/+server.ts +24 -0
- package/src/routes/features/+page.svelte +484 -484
- package/src/routes/features/[id]/+page.svelte +55 -49
- package/src/routes/features/[id]/graph/+page.svelte +39 -0
- package/src/routes/features/[id]/verify/+page.svelte +89 -0
- package/src/routes/mcp/+page.svelte +16 -1
- package/src/routes/projects/[id]/+page.svelte +70 -70
- package/src/routes/projects/[id]/graph/+page.svelte +79 -0
- package/src/routes/tutorial/+page.svelte +3 -2
- package/src/shared/infrastructure/browserContainer.ts +61 -61
- package/src/shared/presentation/components/KebabMenu.svelte +95 -0
- package/src/shared/presentation/components/MenuItem.svelte +29 -0
- package/src/shared/presentation/components/ProgressBar.svelte +1 -1
- package/src/shared/presentation/toast/SyncToast.svelte +14 -3
- package/src/shared/presentation/toast/viewLinkResolver.ts +32 -0
- package/static/lyriks_logo.svg +148 -0
- package/vite.config.ts +47 -47
- package/build/client/_app/immutable/assets/0.DFMDYAU9.css +0 -1
- package/build/client/_app/immutable/assets/0.DFMDYAU9.css.br +0 -0
- package/build/client/_app/immutable/assets/0.DFMDYAU9.css.gz +0 -0
- package/build/client/_app/immutable/assets/9.nv0I59TU.css.gz +0 -0
- package/build/client/_app/immutable/chunks/BO66rBOa2.js +0 -1
- package/build/client/_app/immutable/chunks/BO66rBOa2.js.br +0 -0
- package/build/client/_app/immutable/chunks/BO66rBOa2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BOrLmFwJ.js.br +0 -0
- package/build/client/_app/immutable/chunks/BOrLmFwJ.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BfMYiIUi.js.br +0 -0
- package/build/client/_app/immutable/chunks/BfMYiIUi.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bp2_Vghh.js +0 -1
- package/build/client/_app/immutable/chunks/Bp2_Vghh.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bp2_Vghh.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Bp8HpEPe2.js +0 -4
- package/build/client/_app/immutable/chunks/Bp8HpEPe2.js.br +0 -0
- package/build/client/_app/immutable/chunks/Bp8HpEPe2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/C8rRKIXT.js +0 -1
- package/build/client/_app/immutable/chunks/C8rRKIXT.js.br +0 -0
- package/build/client/_app/immutable/chunks/C8rRKIXT.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CJjJLwzv2.js +0 -1
- package/build/client/_app/immutable/chunks/CJjJLwzv2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CJjJLwzv2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CxyLMlpt2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CxyLMlpt2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D6jhrpTg.js +0 -1
- package/build/client/_app/immutable/chunks/D6jhrpTg.js.br +0 -0
- package/build/client/_app/immutable/chunks/D6jhrpTg.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D8YEa1po.js +0 -1
- package/build/client/_app/immutable/chunks/D8YEa1po.js.br +0 -0
- package/build/client/_app/immutable/chunks/D8YEa1po.js.gz +0 -0
- package/build/client/_app/immutable/chunks/D9dKmajw.js +0 -1
- package/build/client/_app/immutable/chunks/D9dKmajw.js.br +0 -0
- package/build/client/_app/immutable/chunks/D9dKmajw.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DBJWcC6Y.js +0 -1
- package/build/client/_app/immutable/chunks/DBJWcC6Y.js.br +0 -0
- package/build/client/_app/immutable/chunks/DBJWcC6Y.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DHoA038D.js +0 -1
- package/build/client/_app/immutable/chunks/DHoA038D.js.br +0 -2
- package/build/client/_app/immutable/chunks/DHoA038D.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DKgYpi6_.js +0 -1
- package/build/client/_app/immutable/chunks/DKgYpi6_.js.br +0 -0
- package/build/client/_app/immutable/chunks/DKgYpi6_.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DatGSObE.js +0 -1
- package/build/client/_app/immutable/chunks/DatGSObE.js.br +0 -0
- package/build/client/_app/immutable/chunks/DatGSObE.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dg0acPpT.js +0 -1
- package/build/client/_app/immutable/chunks/Dg0acPpT.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dg0acPpT.js.gz +0 -0
- package/build/client/_app/immutable/chunks/DjWKKtqp.js +0 -1
- package/build/client/_app/immutable/chunks/DjWKKtqp.js.br +0 -1
- package/build/client/_app/immutable/chunks/DjWKKtqp.js.gz +0 -0
- package/build/client/_app/immutable/chunks/Dq0DUAz1.js +0 -1
- package/build/client/_app/immutable/chunks/Dq0DUAz1.js.br +0 -0
- package/build/client/_app/immutable/chunks/Dq0DUAz1.js.gz +0 -0
- package/build/client/_app/immutable/chunks/HKLi1Yz3.js +0 -1
- package/build/client/_app/immutable/chunks/HKLi1Yz3.js.br +0 -0
- package/build/client/_app/immutable/chunks/HKLi1Yz3.js.gz +0 -0
- package/build/client/_app/immutable/chunks/N7PXjlRH.js +0 -1
- package/build/client/_app/immutable/chunks/N7PXjlRH.js.br +0 -0
- package/build/client/_app/immutable/chunks/N7PXjlRH.js.gz +0 -0
- package/build/client/_app/immutable/chunks/hpWJNn0t2.js +0 -2
- package/build/client/_app/immutable/chunks/hpWJNn0t2.js.br +0 -0
- package/build/client/_app/immutable/chunks/hpWJNn0t2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/iQu0D9Ux.js +0 -1
- package/build/client/_app/immutable/chunks/iQu0D9Ux.js.br +0 -0
- package/build/client/_app/immutable/chunks/iQu0D9Ux.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.CLgh6Mx_.js +0 -2
- package/build/client/_app/immutable/entry/app.CLgh6Mx_.js.br +0 -0
- package/build/client/_app/immutable/entry/app.CLgh6Mx_.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.D5GPCQZD.js +0 -1
- package/build/client/_app/immutable/entry/start.D5GPCQZD.js.br +0 -0
- package/build/client/_app/immutable/entry/start.D5GPCQZD.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.BOoI-hsu.js +0 -4
- package/build/client/_app/immutable/nodes/0.BOoI-hsu.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.BOoI-hsu.js.gz +0 -0
- package/build/client/_app/immutable/nodes/1.KYdA6ppX.js.br +0 -2
- package/build/client/_app/immutable/nodes/1.KYdA6ppX.js.gz +0 -0
- package/build/client/_app/immutable/nodes/2.DBz20KgG.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.DBz20KgG.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.19DIoFtw.js +0 -1
- package/build/client/_app/immutable/nodes/3.19DIoFtw.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.19DIoFtw.js.gz +0 -0
- package/build/client/_app/immutable/nodes/4.BvMzqBJj.js +0 -3
- package/build/client/_app/immutable/nodes/4.BvMzqBJj.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.BvMzqBJj.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.Dq6obSGG.js +0 -42
- package/build/client/_app/immutable/nodes/5.Dq6obSGG.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.Dq6obSGG.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.BOHISqs-.js +0 -5
- package/build/client/_app/immutable/nodes/6.BOHISqs-.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.BOHISqs-.js.gz +0 -0
- package/build/client/_app/immutable/nodes/7.CemgNJfw.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.CemgNJfw.js.gz +0 -0
- package/build/client/_app/immutable/nodes/8.DejSfIYh.js +0 -5
- package/build/client/_app/immutable/nodes/8.DejSfIYh.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.DejSfIYh.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.CMW6a2Lg.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.CMW6a2Lg.js.gz +0 -0
- package/build/server/chunks/0-C_o0oz-N.js +0 -15
- package/build/server/chunks/0-C_o0oz-N.js.map +0 -1
- package/build/server/chunks/1-DPpKAKXV.js +0 -9
- package/build/server/chunks/2-AlfFqtL1.js +0 -9
- package/build/server/chunks/2-AlfFqtL1.js.map +0 -1
- package/build/server/chunks/3-vbjUt_51.js +0 -16
- package/build/server/chunks/3-vbjUt_51.js.map +0 -1
- package/build/server/chunks/4-BNow4x6D.js +0 -16
- package/build/server/chunks/4-BNow4x6D.js.map +0 -1
- package/build/server/chunks/5-D7OCJpxD.js +0 -9
- package/build/server/chunks/5-D7OCJpxD.js.map +0 -1
- package/build/server/chunks/6-QQ7r8Rd5.js +0 -9
- package/build/server/chunks/7-CbPLGaIG.js +0 -9
- package/build/server/chunks/7-CbPLGaIG.js.map +0 -1
- package/build/server/chunks/8-CVO-E-sf.js +0 -9
- package/build/server/chunks/8-CVO-E-sf.js.map +0 -1
- package/build/server/chunks/9-DxT1baO5.js +0 -9
- package/build/server/chunks/9-DxT1baO5.js.map +0 -1
- package/build/server/chunks/FeatureTransforms-UWDHmWEg.js.map +0 -1
- package/build/server/chunks/FeatureValidator-B8qEjAUW.js.map +0 -1
- package/build/server/chunks/ManageTagsDialog-DBxA3tM2.js.map +0 -1
- package/build/server/chunks/ProgressBar-CfhccQ83.js.map +0 -1
- package/build/server/chunks/ProjectsIndex-CoDrvRya.js.map +0 -1
- package/build/server/chunks/RenameTag-BuWLMl1m.js.map +0 -1
- package/build/server/chunks/TagDotStrip-B1XQ0m0Y.js.map +0 -1
- package/build/server/chunks/TagPalette-CtMNYCmu.js.map +0 -1
- package/build/server/chunks/_layout.svelte-BREws55o.js +0 -616
- package/build/server/chunks/_layout.svelte-BREws55o.js.map +0 -1
- package/build/server/chunks/_page.svelte-B1s7jxaQ.js.map +0 -1
- package/build/server/chunks/_page.svelte-B7hT3P8E.js +0 -29
- package/build/server/chunks/_page.svelte-BqSC-1vK.js.map +0 -1
- package/build/server/chunks/_page.svelte-BtI2zZ_Z.js.map +0 -1
- package/build/server/chunks/_page.svelte-De508ek8.js +0 -29
- package/build/server/chunks/_page.svelte-Zf9H4KOP.js.map +0 -1
- package/build/server/chunks/_server.ts-0uNTZKwF.js.map +0 -1
- package/build/server/chunks/_server.ts-DcZPhyhK.js +0 -59
- package/build/server/chunks/_server.ts-DcZPhyhK.js.map +0 -1
- package/build/server/chunks/_server.ts-Dy5zQHe2.js.map +0 -1
- package/build/server/chunks/_server.ts-YnfXkeMJ.js.map +0 -1
- package/build/server/chunks/_server.ts-vcaqdwxS.js.map +0 -1
- package/build/server/chunks/browserContainer-CNX7ANld.js.map +0 -1
- package/build/server/chunks/builderModeStore.svelte-ihupr-3p.js.map +0 -1
- package/build/server/chunks/client-DfpLcAZ9.js +0 -24
- package/build/server/chunks/featuresStore.svelte-DR1gYZyu.js +0 -98
- package/build/server/chunks/featuresStore.svelte-DR1gYZyu.js.map +0 -1
- package/build/server/chunks/hooks.server-Rv301GTB.js.map +0 -1
- package/build/server/chunks/identityStore.svelte-IIvW2_3b.js +0 -59
- package/build/server/chunks/identityStore.svelte-IIvW2_3b.js.map +0 -1
- package/build/server/chunks/projectsStore.svelte-QDz5PchX.js.map +0 -1
- package/build/server/chunks/reconcile-Dv7jS3C8.js.map +0 -1
- package/build/server/chunks/snapshotRepository-BPXCjX92.js.map +0 -1
- package/build/server/chunks/syncBridge-BwXzPdjJ.js.map +0 -1
- package/src/features/implementation-queue/presentation/components/QueuePanel.svelte +0 -204
- package/src/features/implementation-queue/presentation/stores/queueStore.svelte.ts +0 -143
- /package/build/client/_app/immutable/assets/{9.nv0I59TU.css → 12.nv0I59TU.css} +0 -0
- /package/build/client/_app/immutable/assets/{9.nv0I59TU.css.br → 12.nv0I59TU.css.br} +0 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { g as attr, h as attr_class, a7 as stringify } from './index-server-DvBux_Gf.js';
|
|
2
|
+
import { b as apiFetch } from './browserContainer-BdldtueJ.js';
|
|
3
|
+
|
|
4
|
+
//#region src/shared/presentation/components/KebabMenu.svelte
|
|
5
|
+
function KebabMenu($$renderer, $$props) {
|
|
6
|
+
$$renderer.component(($$renderer) => {
|
|
7
|
+
/**
|
|
8
|
+
* A small "three-dot" (⋮) overflow menu: a trigger button plus a dropdown
|
|
9
|
+
* panel of actions. The codebase had no shared dropdown — each call site
|
|
10
|
+
* rolled its own open/close/click-outside — so this consolidates that for the
|
|
11
|
+
* project card, the projects page header, and the project detail header.
|
|
12
|
+
*
|
|
13
|
+
* The `children` snippet receives a `close` callback so each action can
|
|
14
|
+
* dismiss the menu before running (e.g. before opening a dialog). Pair it
|
|
15
|
+
* with {@link MenuItem} for consistent item styling.
|
|
16
|
+
*
|
|
17
|
+
* Placement: `up` opens the panel above the trigger — use it inside
|
|
18
|
+
* `overflow-hidden` containers (like a card) where a downward panel would be
|
|
19
|
+
* clipped or spill past the bottom edge.
|
|
20
|
+
*/
|
|
21
|
+
/** Accessible name + tooltip for the trigger. */
|
|
22
|
+
/** Accessible name + tooltip for the trigger. */
|
|
23
|
+
/** Which edge the panel aligns to. */
|
|
24
|
+
/** Open above (`up`) or below (`down`) the trigger. */
|
|
25
|
+
/** Extra classes for the trigger button (sizing/tint per context). */
|
|
26
|
+
let { label = "More actions", align = "right", placement = "down", triggerClass = "", children } = $$props;
|
|
27
|
+
let open = false;
|
|
28
|
+
$$renderer.push(`<div class="relative inline-flex"><button type="button" aria-haspopup="menu"${attr("aria-expanded", open)}${attr("aria-label", label)}${attr("title", label)}${attr_class(`grid h-8 w-8 place-items-center rounded-md text-slate-500 transition hover:bg-slate-100 hover:text-slate-800 ${stringify(triggerClass)}`)}><svg viewBox="0 0 24 24" fill="currentColor" class="h-4 w-4" aria-hidden="true"><circle cx="12" cy="5" r="1.7"></circle><circle cx="12" cy="12" r="1.7"></circle><circle cx="12" cy="19" r="1.7"></circle></svg></button> `);
|
|
29
|
+
$$renderer.push("<!--[-1-->");
|
|
30
|
+
$$renderer.push(`<!--]--></div>`);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/shared/presentation/components/MenuItem.svelte
|
|
35
|
+
function MenuItem($$renderer, $$props) {
|
|
36
|
+
/**
|
|
37
|
+
* One row inside a {@link KebabMenu}. `danger` paints it as a destructive
|
|
38
|
+
* action (e.g. Delete). Keep the label content in the `children` snippet so
|
|
39
|
+
* call sites can prepend a small glyph.
|
|
40
|
+
*/
|
|
41
|
+
let { onclick, danger = false, disabled = false, children } = $$props;
|
|
42
|
+
$$renderer.push(`<button type="button" role="menuitem"${attr("disabled", disabled, true)}${attr_class(`flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm transition disabled:cursor-not-allowed disabled:opacity-50 ${danger ? "text-red-600 hover:bg-red-50" : "text-slate-700 hover:bg-slate-50"}`)}>`);
|
|
43
|
+
children($$renderer);
|
|
44
|
+
$$renderer.push(`<!----></button>`);
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/features/projects/infrastructure/io/bundleCrypto.ts
|
|
48
|
+
/**
|
|
49
|
+
* Client-side encryption for .unspa bundles. Uses the platform-native
|
|
50
|
+
* WebCrypto subtle API (no third-party crypto deps, fully audited stack).
|
|
51
|
+
*
|
|
52
|
+
* - PBKDF2-SHA256 with 600 000 iterations derives a 256-bit AES key
|
|
53
|
+
* from the passphrase + a fresh per-export 16-byte salt. OWASP's
|
|
54
|
+
* 2023 minimum recommendation for PBKDF2-SHA256 is 600k.
|
|
55
|
+
* - AES-GCM-256 encrypts the JSON-encoded plaintext under a fresh
|
|
56
|
+
* 12-byte IV. The 128-bit auth tag is appended to the ciphertext by
|
|
57
|
+
* the spec, so a tampered file (or a wrong passphrase) fails at
|
|
58
|
+
* `subtle.decrypt` instead of returning gibberish.
|
|
59
|
+
*
|
|
60
|
+
* The passphrase never leaves the browser. The dashboard server stores
|
|
61
|
+
* the project / features as ordinary JSON on disk; encryption only
|
|
62
|
+
* applies to the share/backup file the user downloads.
|
|
63
|
+
*/
|
|
64
|
+
var PBKDF2_ITERATIONS = 6e5;
|
|
65
|
+
var SALT_BYTES = 16;
|
|
66
|
+
var IV_BYTES = 12;
|
|
67
|
+
var subtle = () => {
|
|
68
|
+
if (typeof crypto === "undefined" || !crypto.subtle) throw new Error("WebCrypto not available. Use a modern browser served over https or localhost.");
|
|
69
|
+
return crypto.subtle;
|
|
70
|
+
};
|
|
71
|
+
var toBase64 = (bytes) => {
|
|
72
|
+
let binary = "";
|
|
73
|
+
for (const byte of bytes) binary += String.fromCharCode(byte);
|
|
74
|
+
return btoa(binary);
|
|
75
|
+
};
|
|
76
|
+
var deriveKey = async (passphrase, salt) => {
|
|
77
|
+
const enc = new TextEncoder();
|
|
78
|
+
const baseKey = await subtle().importKey("raw", enc.encode(passphrase), { name: "PBKDF2" }, false, ["deriveKey"]);
|
|
79
|
+
return subtle().deriveKey({
|
|
80
|
+
name: "PBKDF2",
|
|
81
|
+
hash: "SHA-256",
|
|
82
|
+
salt,
|
|
83
|
+
iterations: PBKDF2_ITERATIONS
|
|
84
|
+
}, baseKey, {
|
|
85
|
+
name: "AES-GCM",
|
|
86
|
+
length: 256
|
|
87
|
+
}, false, ["encrypt", "decrypt"]);
|
|
88
|
+
};
|
|
89
|
+
var WeakPassphraseError = class extends Error {
|
|
90
|
+
constructor() {
|
|
91
|
+
super("Passphrase must be at least 8 characters.");
|
|
92
|
+
this.name = "WeakPassphraseError";
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Encrypt a JSON string into an .unspa envelope. Generates a fresh salt
|
|
97
|
+
* and iv every call, so the same plaintext + passphrase produces a
|
|
98
|
+
* different envelope every time (anti-replay friendly + harmless). The
|
|
99
|
+
* envelope deliberately carries NO identifier of the contents — a third
|
|
100
|
+
* party seeing the file learns only that it's an Unspaghettit bundle
|
|
101
|
+
* with these crypto parameters, never which project it is. The project
|
|
102
|
+
* name lives ONLY inside the ciphertext.
|
|
103
|
+
*/
|
|
104
|
+
var encryptBundle = async (plaintext, passphrase) => {
|
|
105
|
+
if (passphrase.length < 8) throw new WeakPassphraseError();
|
|
106
|
+
const salt = crypto.getRandomValues(new Uint8Array(SALT_BYTES));
|
|
107
|
+
const iv = crypto.getRandomValues(new Uint8Array(IV_BYTES));
|
|
108
|
+
const key = await deriveKey(passphrase, salt);
|
|
109
|
+
const ciphertext = await subtle().encrypt({
|
|
110
|
+
name: "AES-GCM",
|
|
111
|
+
iv
|
|
112
|
+
}, key, new TextEncoder().encode(plaintext));
|
|
113
|
+
return {
|
|
114
|
+
format: "unspaghettit-encrypted-bundle",
|
|
115
|
+
version: 1,
|
|
116
|
+
algorithm: "AES-GCM",
|
|
117
|
+
kdf: "PBKDF2-SHA256",
|
|
118
|
+
iterations: PBKDF2_ITERATIONS,
|
|
119
|
+
salt: toBase64(salt),
|
|
120
|
+
iv: toBase64(iv),
|
|
121
|
+
ciphertext: toBase64(new Uint8Array(ciphertext))
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region src/features/projects/presentation/services/projectBundleClient.ts
|
|
126
|
+
var slugify = (s) => {
|
|
127
|
+
const base = s.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 64);
|
|
128
|
+
return base.length > 0 ? base : "project";
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Fetch the plaintext bundle for `projectId`, encrypt with `passphrase`,
|
|
132
|
+
* and return both the envelope and the project name (the latter so the
|
|
133
|
+
* caller can build a sensible download filename WITHOUT leaking the
|
|
134
|
+
* name in the envelope itself). The bundle is built server-side
|
|
135
|
+
* (already gathers the project's features + statuses); we just encrypt
|
|
136
|
+
* locally.
|
|
137
|
+
*/
|
|
138
|
+
var exportProjectBundle = async (projectId, passphrase) => {
|
|
139
|
+
const res = await apiFetch(`/api/projects/${encodeURIComponent(String(projectId))}/bundle`);
|
|
140
|
+
if (!res.ok) throw new Error(`Bundle fetch failed (${res.status}): ${await res.text().catch(() => "")}`);
|
|
141
|
+
const bundle = await res.json();
|
|
142
|
+
return {
|
|
143
|
+
envelope: await encryptBundle(JSON.stringify(bundle), passphrase),
|
|
144
|
+
projectName: bundle.project.name
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Trigger a browser download of the envelope. The filename is derived
|
|
149
|
+
* from the caller-supplied `projectName` (held in memory only, never
|
|
150
|
+
* stored in the file itself). Users can override via the browser's
|
|
151
|
+
* save dialog.
|
|
152
|
+
*/
|
|
153
|
+
var downloadEnvelopeAs = (envelope, projectName) => {
|
|
154
|
+
const today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10).replace(/-/g, "");
|
|
155
|
+
const filename = `${slugify(projectName)}-${today}.unspa`;
|
|
156
|
+
const blob = new Blob([JSON.stringify(envelope, null, 2)], { type: "application/octet-stream" });
|
|
157
|
+
const url = URL.createObjectURL(blob);
|
|
158
|
+
const a = document.createElement("a");
|
|
159
|
+
a.href = url;
|
|
160
|
+
a.download = filename;
|
|
161
|
+
document.body.appendChild(a);
|
|
162
|
+
a.click();
|
|
163
|
+
document.body.removeChild(a);
|
|
164
|
+
setTimeout(() => URL.revokeObjectURL(url), 1e3);
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
export { KebabMenu as K, MenuItem as M, WeakPassphraseError as W, downloadEnvelopeAs as d, exportProjectBundle as e };
|
|
168
|
+
//# sourceMappingURL=projectBundleClient-BtvWPh87.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectBundleClient-BtvWPh87.js","sources":["../../../.svelte-kit/adapter-node/chunks/projectBundleClient.js"],"sourcesContent":["import { G as attr, l as derived, m as stringify, o as attr_class } from \"./index-server.js\";\nimport { o as apiFetch } from \"./browserContainer.js\";\n//#region src/shared/presentation/components/KebabMenu.svelte\nfunction KebabMenu($$renderer, $$props) {\n\t$$renderer.component(($$renderer) => {\n\t\t/**\n\t\t* A small \"three-dot\" (⋮) overflow menu: a trigger button plus a dropdown\n\t\t* panel of actions. The codebase had no shared dropdown — each call site\n\t\t* rolled its own open/close/click-outside — so this consolidates that for the\n\t\t* project card, the projects page header, and the project detail header.\n\t\t*\n\t\t* The `children` snippet receives a `close` callback so each action can\n\t\t* dismiss the menu before running (e.g. before opening a dialog). Pair it\n\t\t* with {@link MenuItem} for consistent item styling.\n\t\t*\n\t\t* Placement: `up` opens the panel above the trigger — use it inside\n\t\t* `overflow-hidden` containers (like a card) where a downward panel would be\n\t\t* clipped or spill past the bottom edge.\n\t\t*/\n\t\t/** Accessible name + tooltip for the trigger. */\n\t\t/** Accessible name + tooltip for the trigger. */\n\t\t/** Which edge the panel aligns to. */\n\t\t/** Open above (`up`) or below (`down`) the trigger. */\n\t\t/** Extra classes for the trigger button (sizing/tint per context). */\n\t\tlet { label = \"More actions\", align = \"right\", placement = \"down\", triggerClass = \"\", children } = $$props;\n\t\tlet open = false;\n\t\tconst close = () => {\n\t\t\topen = false;\n\t\t};\n\t\tconst panelPosition = derived(() => `${placement === \"up\" ? \"bottom-full mb-1\" : \"top-full mt-1\"} ${align === \"right\" ? \"right-0\" : \"left-0\"}`);\n\t\t$$renderer.push(`<div class=\"relative inline-flex\"><button type=\"button\" aria-haspopup=\"menu\"${attr(\"aria-expanded\", open)}${attr(\"aria-label\", label)}${attr(\"title\", label)}${attr_class(`grid h-8 w-8 place-items-center rounded-md text-slate-500 transition hover:bg-slate-100 hover:text-slate-800 ${stringify(triggerClass)}`)}><svg viewBox=\"0 0 24 24\" fill=\"currentColor\" class=\"h-4 w-4\" aria-hidden=\"true\"><circle cx=\"12\" cy=\"5\" r=\"1.7\"></circle><circle cx=\"12\" cy=\"12\" r=\"1.7\"></circle><circle cx=\"12\" cy=\"19\" r=\"1.7\"></circle></svg></button> `);\n\t\tif (open) {\n\t\t\t$$renderer.push(\"<!--[0-->\");\n\t\t\t$$renderer.push(`<div role=\"menu\"${attr_class(`absolute z-50 min-w-40 overflow-hidden rounded-lg border border-slate-200 bg-white py-1 shadow-xl shadow-slate-950/10 ${panelPosition()}`)}>`);\n\t\t\tchildren($$renderer, close);\n\t\t\t$$renderer.push(`<!----></div>`);\n\t\t} else $$renderer.push(\"<!--[-1-->\");\n\t\t$$renderer.push(`<!--]--></div>`);\n\t});\n}\n//#endregion\n//#region src/shared/presentation/components/MenuItem.svelte\nfunction MenuItem($$renderer, $$props) {\n\t/**\n\t* One row inside a {@link KebabMenu}. `danger` paints it as a destructive\n\t* action (e.g. Delete). Keep the label content in the `children` snippet so\n\t* call sites can prepend a small glyph.\n\t*/\n\tlet { onclick, danger = false, disabled = false, children } = $$props;\n\t$$renderer.push(`<button type=\"button\" role=\"menuitem\"${attr(\"disabled\", disabled, true)}${attr_class(`flex w-full items-center gap-2 px-3 py-1.5 text-left text-sm transition disabled:cursor-not-allowed disabled:opacity-50 ${danger ? \"text-red-600 hover:bg-red-50\" : \"text-slate-700 hover:bg-slate-50\"}`)}>`);\n\tchildren($$renderer);\n\t$$renderer.push(`<!----></button>`);\n}\n//#endregion\n//#region src/features/projects/infrastructure/io/bundleCrypto.ts\n/**\n* Client-side encryption for .unspa bundles. Uses the platform-native\n* WebCrypto subtle API (no third-party crypto deps, fully audited stack).\n*\n* - PBKDF2-SHA256 with 600 000 iterations derives a 256-bit AES key\n* from the passphrase + a fresh per-export 16-byte salt. OWASP's\n* 2023 minimum recommendation for PBKDF2-SHA256 is 600k.\n* - AES-GCM-256 encrypts the JSON-encoded plaintext under a fresh\n* 12-byte IV. The 128-bit auth tag is appended to the ciphertext by\n* the spec, so a tampered file (or a wrong passphrase) fails at\n* `subtle.decrypt` instead of returning gibberish.\n*\n* The passphrase never leaves the browser. The dashboard server stores\n* the project / features as ordinary JSON on disk; encryption only\n* applies to the share/backup file the user downloads.\n*/\nvar PBKDF2_ITERATIONS = 6e5;\nvar SALT_BYTES = 16;\nvar IV_BYTES = 12;\nvar subtle = () => {\n\tif (typeof crypto === \"undefined\" || !crypto.subtle) throw new Error(\"WebCrypto not available. Use a modern browser served over https or localhost.\");\n\treturn crypto.subtle;\n};\nvar toBase64 = (bytes) => {\n\tlet binary = \"\";\n\tfor (const byte of bytes) binary += String.fromCharCode(byte);\n\treturn btoa(binary);\n};\nvar deriveKey = async (passphrase, salt) => {\n\tconst enc = new TextEncoder();\n\tconst baseKey = await subtle().importKey(\"raw\", enc.encode(passphrase), { name: \"PBKDF2\" }, false, [\"deriveKey\"]);\n\treturn subtle().deriveKey({\n\t\tname: \"PBKDF2\",\n\t\thash: \"SHA-256\",\n\t\tsalt,\n\t\titerations: PBKDF2_ITERATIONS\n\t}, baseKey, {\n\t\tname: \"AES-GCM\",\n\t\tlength: 256\n\t}, false, [\"encrypt\", \"decrypt\"]);\n};\nvar WeakPassphraseError = class extends Error {\n\tconstructor() {\n\t\tsuper(\"Passphrase must be at least 8 characters.\");\n\t\tthis.name = \"WeakPassphraseError\";\n\t}\n};\n/**\n* Encrypt a JSON string into an .unspa envelope. Generates a fresh salt\n* and iv every call, so the same plaintext + passphrase produces a\n* different envelope every time (anti-replay friendly + harmless). The\n* envelope deliberately carries NO identifier of the contents — a third\n* party seeing the file learns only that it's an Unspaghettit bundle\n* with these crypto parameters, never which project it is. The project\n* name lives ONLY inside the ciphertext.\n*/\nvar encryptBundle = async (plaintext, passphrase) => {\n\tif (passphrase.length < 8) throw new WeakPassphraseError();\n\tconst salt = crypto.getRandomValues(new Uint8Array(SALT_BYTES));\n\tconst iv = crypto.getRandomValues(new Uint8Array(IV_BYTES));\n\tconst key = await deriveKey(passphrase, salt);\n\tconst ciphertext = await subtle().encrypt({\n\t\tname: \"AES-GCM\",\n\t\tiv\n\t}, key, new TextEncoder().encode(plaintext));\n\treturn {\n\t\tformat: \"unspaghettit-encrypted-bundle\",\n\t\tversion: 1,\n\t\talgorithm: \"AES-GCM\",\n\t\tkdf: \"PBKDF2-SHA256\",\n\t\titerations: PBKDF2_ITERATIONS,\n\t\tsalt: toBase64(salt),\n\t\tiv: toBase64(iv),\n\t\tciphertext: toBase64(new Uint8Array(ciphertext))\n\t};\n};\n//#endregion\n//#region src/features/projects/presentation/services/projectBundleClient.ts\nvar slugify = (s) => {\n\tconst base = s.toLowerCase().replace(/[^a-z0-9]+/g, \"-\").replace(/^-+|-+$/g, \"\").slice(0, 64);\n\treturn base.length > 0 ? base : \"project\";\n};\n/**\n* Fetch the plaintext bundle for `projectId`, encrypt with `passphrase`,\n* and return both the envelope and the project name (the latter so the\n* caller can build a sensible download filename WITHOUT leaking the\n* name in the envelope itself). The bundle is built server-side\n* (already gathers the project's features + statuses); we just encrypt\n* locally.\n*/\nvar exportProjectBundle = async (projectId, passphrase) => {\n\tconst res = await apiFetch(`/api/projects/${encodeURIComponent(String(projectId))}/bundle`);\n\tif (!res.ok) throw new Error(`Bundle fetch failed (${res.status}): ${await res.text().catch(() => \"\")}`);\n\tconst bundle = await res.json();\n\treturn {\n\t\tenvelope: await encryptBundle(JSON.stringify(bundle), passphrase),\n\t\tprojectName: bundle.project.name\n\t};\n};\n/**\n* Trigger a browser download of the envelope. The filename is derived\n* from the caller-supplied `projectName` (held in memory only, never\n* stored in the file itself). Users can override via the browser's\n* save dialog.\n*/\nvar downloadEnvelopeAs = (envelope, projectName) => {\n\tconst today = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10).replace(/-/g, \"\");\n\tconst filename = `${slugify(projectName)}-${today}.unspa`;\n\tconst blob = new Blob([JSON.stringify(envelope, null, 2)], { type: \"application/octet-stream\" });\n\tconst url = URL.createObjectURL(blob);\n\tconst a = document.createElement(\"a\");\n\ta.href = url;\n\ta.download = filename;\n\tdocument.body.appendChild(a);\n\ta.click();\n\tdocument.body.removeChild(a);\n\tsetTimeout(() => URL.revokeObjectURL(url), 1e3);\n};\n//#endregion\nexport { KebabMenu as a, MenuItem as i, exportProjectBundle as n, WeakPassphraseError as r, downloadEnvelopeAs as t };\n"],"names":[],"mappings":";;;AAEA;AACA,SAAS,SAAS,CAAC,UAAU,EAAE,OAAO,EAAE;AACxC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,UAAU,KAAK;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,IAAI,EAAE,KAAK,GAAG,cAAc,EAAE,KAAK,GAAG,OAAO,EAAE,SAAS,GAAG,MAAM,EAAE,YAAY,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,OAAO;AAC5G,EAAE,IAAI,IAAI,GAAG,KAAK;AAKlB,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,4EAA4E,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,6GAA6G,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,2NAA2N,CAAC,CAAC;AACriB,EAKS,UAAU,CAAC,IAAI,CAAC,YAAY,CAAC;AACtC,EAAE,UAAU,CAAC,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC;AACnC,CAAC,CAAC,CAAC;AACH;AACA;AACA;AACA,SAAS,QAAQ,CAAC,UAAU,EAAE,OAAO,EAAE;AACvC;AACA;AACA;AACA;AACA;AACA,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,KAAK,EAAE,QAAQ,GAAG,KAAK,EAAE,QAAQ,EAAE,GAAG,OAAO;AACtE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,qCAAqC,EAAE,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,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AAM,KAAK,GAAG,iBAAiB,IAAI,IAAI,EAAE,EAAE,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;AACxF,CAAC,MAAM,QAAQ,GAAG,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC;AAC1D,CAAC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,CAAC;AACjG,CAAC,MAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC;AACtC,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC;AACtC,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG;AACb,CAAC,CAAC,CAAC,QAAQ,GAAG,QAAQ;AACtB,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AAC7B,CAAC,CAAC,CAAC,KAAK,EAAE;AACV,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AAC7B,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC;AAChD;;;;"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { R as queueItemKey } from './TagPalette-CpdTiC_7.js';
|
|
2
|
+
import { i as getBrowserContainer } from './browserContainer-BdldtueJ.js';
|
|
3
|
+
|
|
4
|
+
//#region src/features/projects/presentation/stores/projectContextStore.svelte.ts
|
|
5
|
+
var ProjectContextStore = class {
|
|
6
|
+
loading = false;
|
|
7
|
+
project = null;
|
|
8
|
+
siblings = [];
|
|
9
|
+
error = null;
|
|
10
|
+
currentFeatureId = null;
|
|
11
|
+
/** Resolve the project (if any) containing `featureId` and fetch siblings. */
|
|
12
|
+
async load(featureId) {
|
|
13
|
+
this.currentFeatureId = featureId;
|
|
14
|
+
this.loading = true;
|
|
15
|
+
this.error = null;
|
|
16
|
+
try {
|
|
17
|
+
const container = await getBrowserContainer();
|
|
18
|
+
const project = await container.useCases.findProjectContainingFeature(featureId);
|
|
19
|
+
if (this.currentFeatureId !== featureId) return;
|
|
20
|
+
this.project = project;
|
|
21
|
+
if (!project) {
|
|
22
|
+
this.siblings = [];
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const siblingIds = project.featureIds.filter((id) => id !== featureId);
|
|
26
|
+
const siblings = [];
|
|
27
|
+
for (const id of siblingIds) {
|
|
28
|
+
const feature = await container.useCases.getFeature(id);
|
|
29
|
+
if (this.currentFeatureId !== featureId) return;
|
|
30
|
+
if (feature) siblings.push(feature);
|
|
31
|
+
}
|
|
32
|
+
this.siblings = siblings;
|
|
33
|
+
} catch (e) {
|
|
34
|
+
this.error = e.message;
|
|
35
|
+
} finally {
|
|
36
|
+
if (this.currentFeatureId === featureId) this.loading = false;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
reset() {
|
|
40
|
+
this.currentFeatureId = null;
|
|
41
|
+
this.project = null;
|
|
42
|
+
this.siblings = [];
|
|
43
|
+
this.error = null;
|
|
44
|
+
this.loading = false;
|
|
45
|
+
}
|
|
46
|
+
/** Convenience: is the open feature inside a project right now. */
|
|
47
|
+
get isInProject() {
|
|
48
|
+
return this.project !== null;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* True when the containing project's queue already holds an entry for
|
|
52
|
+
* this action. Used to flip the hover button from "+ queue" to "queued".
|
|
53
|
+
* Computed against the local store snapshot so it's synchronous and
|
|
54
|
+
* stays cheap to call from every action row.
|
|
55
|
+
*/
|
|
56
|
+
isActionQueued(featureId, actionId) {
|
|
57
|
+
const queue = this.project?.implementationQueue ?? [];
|
|
58
|
+
const key = `action:${String(featureId)}:${String(actionId)}`;
|
|
59
|
+
return queue.some((q) => queueItemKey(q) === key);
|
|
60
|
+
}
|
|
61
|
+
/** Symmetric to isActionQueued, for surface-kind entries. */
|
|
62
|
+
isSurfaceQueued(featureId, surfaceId) {
|
|
63
|
+
const queue = this.project?.implementationQueue ?? [];
|
|
64
|
+
const key = `surface:${String(featureId)}:${String(surfaceId)}`;
|
|
65
|
+
return queue.some((q) => queueItemKey(q) === key);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Queue an action of the currently-open feature for "implement next".
|
|
69
|
+
* Returns false when there's no project context (e.g. the feature isn't
|
|
70
|
+
* attached to a project) so the caller can no-op gracefully.
|
|
71
|
+
*/
|
|
72
|
+
async enqueueAction(featureId, actionId) {
|
|
73
|
+
const project = this.project;
|
|
74
|
+
if (!project) return false;
|
|
75
|
+
try {
|
|
76
|
+
const result = await (await getBrowserContainer()).useCases.enqueueQueueItem(project.id, {
|
|
77
|
+
kind: "action",
|
|
78
|
+
featureId,
|
|
79
|
+
actionId
|
|
80
|
+
});
|
|
81
|
+
this.project = result.project;
|
|
82
|
+
return true;
|
|
83
|
+
} catch (e) {
|
|
84
|
+
this.error = e.message;
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/** Symmetric to enqueueAction. */
|
|
89
|
+
async enqueueSurface(featureId, surfaceId) {
|
|
90
|
+
const project = this.project;
|
|
91
|
+
if (!project) return false;
|
|
92
|
+
try {
|
|
93
|
+
const result = await (await getBrowserContainer()).useCases.enqueueQueueItem(project.id, {
|
|
94
|
+
kind: "surface",
|
|
95
|
+
featureId,
|
|
96
|
+
surfaceId
|
|
97
|
+
});
|
|
98
|
+
this.project = result.project;
|
|
99
|
+
return true;
|
|
100
|
+
} catch (e) {
|
|
101
|
+
this.error = e.message;
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Remove a queue entry by id. Symmetric with enqueueAction so the
|
|
107
|
+
* action-row toggle can flip both ways from the same store.
|
|
108
|
+
*/
|
|
109
|
+
async dequeueByItemId(itemId) {
|
|
110
|
+
const project = this.project;
|
|
111
|
+
if (!project) return;
|
|
112
|
+
try {
|
|
113
|
+
const next = await (await getBrowserContainer()).useCases.dequeueQueueItem(project.id, itemId);
|
|
114
|
+
this.project = next;
|
|
115
|
+
} catch (e) {
|
|
116
|
+
this.error = e.message;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Find the queue item id for an action so a toggle in ActionEditor can
|
|
121
|
+
* dequeue without re-deriving the id from the (featureId, actionId)
|
|
122
|
+
* tuple at every callsite.
|
|
123
|
+
*/
|
|
124
|
+
findQueueItemIdForAction(featureId, actionId) {
|
|
125
|
+
const queue = this.project?.implementationQueue ?? [];
|
|
126
|
+
const key = `action:${String(featureId)}:${String(actionId)}`;
|
|
127
|
+
const match = queue.find((q) => queueItemKey(q) === key);
|
|
128
|
+
return match ? match.id : null;
|
|
129
|
+
}
|
|
130
|
+
/** Symmetric to findQueueItemIdForAction. */
|
|
131
|
+
findQueueItemIdForSurface(featureId, surfaceId) {
|
|
132
|
+
const queue = this.project?.implementationQueue ?? [];
|
|
133
|
+
const key = `surface:${String(featureId)}:${String(surfaceId)}`;
|
|
134
|
+
const match = queue.find((q) => queueItemKey(q) === key);
|
|
135
|
+
return match ? match.id : null;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
var projectContextStore = new ProjectContextStore();
|
|
139
|
+
|
|
140
|
+
export { projectContextStore as p };
|
|
141
|
+
//# sourceMappingURL=projectContextStore.svelte-jRJGJZ42.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectContextStore.svelte-jRJGJZ42.js","sources":["../../../.svelte-kit/adapter-node/chunks/projectContextStore.svelte.js"],"sourcesContent":["import \"./index-server.js\";\nimport { f as queueItemKey } from \"./TagPalette.js\";\nimport { t as getBrowserContainer } from \"./browserContainer.js\";\n//#region src/features/projects/presentation/stores/projectContextStore.svelte.ts\nvar ProjectContextStore = class {\n\tloading = false;\n\tproject = null;\n\tsiblings = [];\n\terror = null;\n\tcurrentFeatureId = null;\n\t/** Resolve the project (if any) containing `featureId` and fetch siblings. */\n\tasync load(featureId) {\n\t\tthis.currentFeatureId = featureId;\n\t\tthis.loading = true;\n\t\tthis.error = null;\n\t\ttry {\n\t\t\tconst container = await getBrowserContainer();\n\t\t\tconst project = await container.useCases.findProjectContainingFeature(featureId);\n\t\t\tif (this.currentFeatureId !== featureId) return;\n\t\t\tthis.project = project;\n\t\t\tif (!project) {\n\t\t\t\tthis.siblings = [];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst siblingIds = project.featureIds.filter((id) => id !== featureId);\n\t\t\tconst siblings = [];\n\t\t\tfor (const id of siblingIds) {\n\t\t\t\tconst feature = await container.useCases.getFeature(id);\n\t\t\t\tif (this.currentFeatureId !== featureId) return;\n\t\t\t\tif (feature) siblings.push(feature);\n\t\t\t}\n\t\t\tthis.siblings = siblings;\n\t\t} catch (e) {\n\t\t\tthis.error = e.message;\n\t\t} finally {\n\t\t\tif (this.currentFeatureId === featureId) this.loading = false;\n\t\t}\n\t}\n\treset() {\n\t\tthis.currentFeatureId = null;\n\t\tthis.project = null;\n\t\tthis.siblings = [];\n\t\tthis.error = null;\n\t\tthis.loading = false;\n\t}\n\t/** Convenience: is the open feature inside a project right now. */\n\tget isInProject() {\n\t\treturn this.project !== null;\n\t}\n\t/**\n\t* True when the containing project's queue already holds an entry for\n\t* this action. Used to flip the hover button from \"+ queue\" to \"queued\".\n\t* Computed against the local store snapshot so it's synchronous and\n\t* stays cheap to call from every action row.\n\t*/\n\tisActionQueued(featureId, actionId) {\n\t\tconst queue = this.project?.implementationQueue ?? [];\n\t\tconst key = `action:${String(featureId)}:${String(actionId)}`;\n\t\treturn queue.some((q) => queueItemKey(q) === key);\n\t}\n\t/** Symmetric to isActionQueued, for surface-kind entries. */\n\tisSurfaceQueued(featureId, surfaceId) {\n\t\tconst queue = this.project?.implementationQueue ?? [];\n\t\tconst key = `surface:${String(featureId)}:${String(surfaceId)}`;\n\t\treturn queue.some((q) => queueItemKey(q) === key);\n\t}\n\t/**\n\t* Queue an action of the currently-open feature for \"implement next\".\n\t* Returns false when there's no project context (e.g. the feature isn't\n\t* attached to a project) so the caller can no-op gracefully.\n\t*/\n\tasync enqueueAction(featureId, actionId) {\n\t\tconst project = this.project;\n\t\tif (!project) return false;\n\t\ttry {\n\t\t\tconst result = await (await getBrowserContainer()).useCases.enqueueQueueItem(project.id, {\n\t\t\t\tkind: \"action\",\n\t\t\t\tfeatureId,\n\t\t\t\tactionId\n\t\t\t});\n\t\t\tthis.project = result.project;\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\tthis.error = e.message;\n\t\t\treturn false;\n\t\t}\n\t}\n\t/** Symmetric to enqueueAction. */\n\tasync enqueueSurface(featureId, surfaceId) {\n\t\tconst project = this.project;\n\t\tif (!project) return false;\n\t\ttry {\n\t\t\tconst result = await (await getBrowserContainer()).useCases.enqueueQueueItem(project.id, {\n\t\t\t\tkind: \"surface\",\n\t\t\t\tfeatureId,\n\t\t\t\tsurfaceId\n\t\t\t});\n\t\t\tthis.project = result.project;\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\tthis.error = e.message;\n\t\t\treturn false;\n\t\t}\n\t}\n\t/**\n\t* Remove a queue entry by id. Symmetric with enqueueAction so the\n\t* action-row toggle can flip both ways from the same store.\n\t*/\n\tasync dequeueByItemId(itemId) {\n\t\tconst project = this.project;\n\t\tif (!project) return;\n\t\ttry {\n\t\t\tconst next = await (await getBrowserContainer()).useCases.dequeueQueueItem(project.id, itemId);\n\t\t\tthis.project = next;\n\t\t} catch (e) {\n\t\t\tthis.error = e.message;\n\t\t}\n\t}\n\t/**\n\t* Find the queue item id for an action so a toggle in ActionEditor can\n\t* dequeue without re-deriving the id from the (featureId, actionId)\n\t* tuple at every callsite.\n\t*/\n\tfindQueueItemIdForAction(featureId, actionId) {\n\t\tconst queue = this.project?.implementationQueue ?? [];\n\t\tconst key = `action:${String(featureId)}:${String(actionId)}`;\n\t\tconst match = queue.find((q) => queueItemKey(q) === key);\n\t\treturn match ? match.id : null;\n\t}\n\t/** Symmetric to findQueueItemIdForAction. */\n\tfindQueueItemIdForSurface(featureId, surfaceId) {\n\t\tconst queue = this.project?.implementationQueue ?? [];\n\t\tconst key = `surface:${String(featureId)}:${String(surfaceId)}`;\n\t\tconst match = queue.find((q) => queueItemKey(q) === key);\n\t\treturn match ? match.id : null;\n\t}\n};\nvar projectContextStore = new ProjectContextStore();\n//#endregion\nexport { projectContextStore as t };\n"],"names":[],"mappings":";;;AAGA;AACA,IAAI,mBAAmB,GAAG,MAAM;AAChC,CAAC,OAAO,GAAG,KAAK;AAChB,CAAC,OAAO,GAAG,IAAI;AACf,CAAC,QAAQ,GAAG,EAAE;AACd,CAAC,KAAK,GAAG,IAAI;AACb,CAAC,gBAAgB,GAAG,IAAI;AACxB;AACA,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE;AACvB,EAAE,IAAI,CAAC,gBAAgB,GAAG,SAAS;AACnC,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI;AACrB,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI;AACnB,EAAE,IAAI;AACN,GAAG,MAAM,SAAS,GAAG,MAAM,mBAAmB,EAAE;AAChD,GAAG,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,4BAA4B,CAAC,SAAS,CAAC;AACnF,GAAG,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE;AAC5C,GAAG,IAAI,CAAC,OAAO,GAAG,OAAO;AACzB,GAAG,IAAI,CAAC,OAAO,EAAE;AACjB,IAAI,IAAI,CAAC,QAAQ,GAAG,EAAE;AACtB,IAAI;AACJ,GAAG;AACH,GAAG,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,K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CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC;AAC1D,EAAE,OAAO,KAAK,GAAG,KAAK,CAAC,EAAE,GAAG,IAAI;AAChC,CAAC;AACD;AACA,CAAC,yBAAyB,CAAC,SAAS,EAAE,SAAS,EAAE;AACjD,EAAE,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,EAAE,mBAAmB,IAAI,EAAE;AACvD,EAAE,MAAM,GAAG,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;AACjE,EAAE,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC;AAC1D,EAAE,OAAO,KAAK,GAAG,KAAK,CAAC,EAAE,GAAG,IAAI;AAChC,CAAC;AACD,CAAC;AACE,IAAC,mBAAmB,GAAG,IAAI,mBAAmB;;;;"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { i as getBrowserContainer } from './browserContainer-BdldtueJ.js';
|
|
2
|
+
|
|
3
|
+
//#region src/features/projects/presentation/stores/projectFeaturesStore.svelte.ts
|
|
4
|
+
var ProjectFeaturesStore = class {
|
|
5
|
+
loading = false;
|
|
6
|
+
features = [];
|
|
7
|
+
allSummaries = [];
|
|
8
|
+
error = null;
|
|
9
|
+
async load(featureIds) {
|
|
10
|
+
this.loading = true;
|
|
11
|
+
this.error = null;
|
|
12
|
+
try {
|
|
13
|
+
const container = await getBrowserContainer();
|
|
14
|
+
const fetched = await Promise.all(featureIds.map((id) => container.useCases.getFeature(id)));
|
|
15
|
+
this.features = fetched.filter((e) => e !== null);
|
|
16
|
+
} catch (e) {
|
|
17
|
+
this.error = e.message;
|
|
18
|
+
} finally {
|
|
19
|
+
this.loading = false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Bring `features[]` in line with the project's current featureIds[]
|
|
24
|
+
* without toggling `loading`. Existing features keep their reference
|
|
25
|
+
* (Svelte sees no change → no DOM churn). Missing features get fetched
|
|
26
|
+
* and merged in; removed ones are dropped. Out-of-band project edits
|
|
27
|
+
* (MCP add_feature_to_project) flow through here, so the UI gets the
|
|
28
|
+
* new card sliding into the existing list instead of a full redraw.
|
|
29
|
+
*/
|
|
30
|
+
async syncWith(featureIds) {
|
|
31
|
+
const wanted = new Set(featureIds.map(String));
|
|
32
|
+
const have = new Map(this.features.map((f) => [String(f.id), f]));
|
|
33
|
+
const missing = featureIds.filter((id) => !have.has(String(id)));
|
|
34
|
+
let nextHave = have;
|
|
35
|
+
if (missing.length > 0) try {
|
|
36
|
+
const container = await getBrowserContainer();
|
|
37
|
+
const fetched = await Promise.all(missing.map((id) => container.useCases.getFeature(id)));
|
|
38
|
+
nextHave = new Map(have);
|
|
39
|
+
for (const f of fetched) if (f) nextHave.set(String(f.id), f);
|
|
40
|
+
} catch (e) {
|
|
41
|
+
this.error = e.message;
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.features = featureIds.map((id) => nextHave.get(String(id))).filter((f) => f !== void 0 && wanted.has(String(f.id)));
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Re-fetch a single feature the user already owns. Mutates the array
|
|
48
|
+
* in-place at its current index so the keyed `{#each}` re-uses the
|
|
49
|
+
* existing DOM node — no flicker, scroll position preserved.
|
|
50
|
+
*/
|
|
51
|
+
async refetchOne(featureId) {
|
|
52
|
+
try {
|
|
53
|
+
const fresh = await (await getBrowserContainer()).useCases.getFeature(featureId);
|
|
54
|
+
const idx = this.features.findIndex((f) => String(f.id) === String(featureId));
|
|
55
|
+
if (!fresh) {
|
|
56
|
+
if (idx >= 0) this.features = [...this.features.slice(0, idx), ...this.features.slice(idx + 1)];
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (idx >= 0) this.features = [
|
|
60
|
+
...this.features.slice(0, idx),
|
|
61
|
+
fresh,
|
|
62
|
+
...this.features.slice(idx + 1)
|
|
63
|
+
];
|
|
64
|
+
else this.features = [...this.features, fresh];
|
|
65
|
+
} catch (e) {
|
|
66
|
+
this.error = e.message;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async loadAllSummaries() {
|
|
70
|
+
try {
|
|
71
|
+
const container = await getBrowserContainer();
|
|
72
|
+
this.allSummaries = [...await container.useCases.listFeatures()];
|
|
73
|
+
} catch (e) {
|
|
74
|
+
this.error = e.message;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
reset() {
|
|
78
|
+
this.features = [];
|
|
79
|
+
this.allSummaries = [];
|
|
80
|
+
this.loading = false;
|
|
81
|
+
this.error = null;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
var projectFeaturesStore = new ProjectFeaturesStore();
|
|
85
|
+
|
|
86
|
+
export { projectFeaturesStore as p };
|
|
87
|
+
//# sourceMappingURL=projectFeaturesStore.svelte-BwNEtDIL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectFeaturesStore.svelte-BwNEtDIL.js","sources":["../../../.svelte-kit/adapter-node/chunks/projectFeaturesStore.svelte.js"],"sourcesContent":["import \"./index-server.js\";\nimport { t as getBrowserContainer } from \"./browserContainer.js\";\n//#region src/features/projects/presentation/stores/projectFeaturesStore.svelte.ts\nvar ProjectFeaturesStore = class {\n\tloading = false;\n\tfeatures = [];\n\tallSummaries = [];\n\terror = null;\n\tasync load(featureIds) {\n\t\tthis.loading = true;\n\t\tthis.error = null;\n\t\ttry {\n\t\t\tconst container = await getBrowserContainer();\n\t\t\tconst fetched = await Promise.all(featureIds.map((id) => container.useCases.getFeature(id)));\n\t\t\tthis.features = fetched.filter((e) => e !== null);\n\t\t} catch (e) {\n\t\t\tthis.error = e.message;\n\t\t} finally {\n\t\t\tthis.loading = false;\n\t\t}\n\t}\n\t/**\n\t* Bring `features[]` in line with the project's current featureIds[]\n\t* without toggling `loading`. Existing features keep their reference\n\t* (Svelte sees no change → no DOM churn). Missing features get fetched\n\t* and merged in; removed ones are dropped. Out-of-band project edits\n\t* (MCP add_feature_to_project) flow through here, so the UI gets the\n\t* new card sliding into the existing list instead of a full redraw.\n\t*/\n\tasync syncWith(featureIds) {\n\t\tconst wanted = new Set(featureIds.map(String));\n\t\tconst have = new Map(this.features.map((f) => [String(f.id), f]));\n\t\tconst missing = featureIds.filter((id) => !have.has(String(id)));\n\t\tlet nextHave = have;\n\t\tif (missing.length > 0) try {\n\t\t\tconst container = await getBrowserContainer();\n\t\t\tconst fetched = await Promise.all(missing.map((id) => container.useCases.getFeature(id)));\n\t\t\tnextHave = new Map(have);\n\t\t\tfor (const f of fetched) if (f) nextHave.set(String(f.id), f);\n\t\t} catch (e) {\n\t\t\tthis.error = e.message;\n\t\t\treturn;\n\t\t}\n\t\tthis.features = featureIds.map((id) => nextHave.get(String(id))).filter((f) => f !== void 0 && wanted.has(String(f.id)));\n\t}\n\t/**\n\t* Re-fetch a single feature the user already owns. Mutates the array\n\t* in-place at its current index so the keyed `{#each}` re-uses the\n\t* existing DOM node — no flicker, scroll position preserved.\n\t*/\n\tasync refetchOne(featureId) {\n\t\ttry {\n\t\t\tconst fresh = await (await getBrowserContainer()).useCases.getFeature(featureId);\n\t\t\tconst idx = this.features.findIndex((f) => String(f.id) === String(featureId));\n\t\t\tif (!fresh) {\n\t\t\t\tif (idx >= 0) this.features = [...this.features.slice(0, idx), ...this.features.slice(idx + 1)];\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (idx >= 0) this.features = [\n\t\t\t\t...this.features.slice(0, idx),\n\t\t\t\tfresh,\n\t\t\t\t...this.features.slice(idx + 1)\n\t\t\t];\n\t\t\telse this.features = [...this.features, fresh];\n\t\t} catch (e) {\n\t\t\tthis.error = e.message;\n\t\t}\n\t}\n\tasync loadAllSummaries() {\n\t\ttry {\n\t\t\tconst container = await getBrowserContainer();\n\t\t\tthis.allSummaries = [...await container.useCases.listFeatures()];\n\t\t} catch (e) {\n\t\t\tthis.error = e.message;\n\t\t}\n\t}\n\treset() {\n\t\tthis.features = [];\n\t\tthis.allSummaries = [];\n\t\tthis.loading = false;\n\t\tthis.error = null;\n\t}\n};\nvar projectFeaturesStore = new ProjectFeaturesStore();\n//#endregion\nexport { projectFeaturesStore as t };\n"],"names":[],"mappings":";;AAEA;AACA,IAAI,oBAAoB,GAAG,MAAM;AACjC,CAAC,OAAO,GAAG,KAAK;AAChB,CAAC,QAAQ,GAAG,EAAE;AACd,CAAC,YAAY,GAAG,EAAE;AAClB,CAAC,KAAK,GAAG,IAAI;AACb,CAAC,MAAM,IAAI,CAAC,UAAU,EAAE;AACxB,EAAE,IAAI,CAAC,OAAO,GAAG,IAAI;AACrB,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI;AACnB,EAAE,IAAI;AACN,GAAG,MAAM,SAAS,GAAG,MAAM,mBAAmB,EAAE;AAChD,GAAG,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC;AAC/F,GAAG,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;AACpD,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE;AACd,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,OAAO;AACzB,EAAE,CAAC,SAAS;AACZ,GAAG,IAAI,CAAC,OAAO,GAAG,KAAK;AACvB,EAAE;AACF,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,MAAM,QAAQ,CAAC,UAAU,EAAE;AAC5B,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAChD,EAAE,MAAM,I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