unspaghettit 0.2.0 → 0.3.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/build/client/_app/immutable/assets/0.DSctqr5I.css +1 -0
- package/build/client/_app/immutable/assets/0.DSctqr5I.css.br +0 -0
- package/build/client/_app/immutable/assets/0.DSctqr5I.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/9nXQ5qrY2.js +1 -0
- package/build/client/_app/immutable/chunks/9nXQ5qrY2.js.br +0 -0
- package/build/client/_app/immutable/chunks/9nXQ5qrY2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B439_FLv.js +1 -0
- package/build/client/_app/immutable/chunks/B439_FLv.js.br +0 -0
- package/build/client/_app/immutable/chunks/B439_FLv.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BCEY79Dw.js +1 -0
- package/build/client/_app/immutable/chunks/BCEY79Dw.js.br +2 -0
- package/build/client/_app/immutable/chunks/BCEY79Dw.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DBJWcC6Y.js → BYIrIC5L.js} +1 -1
- package/build/client/_app/immutable/chunks/BYIrIC5L.js.br +0 -0
- package/build/client/_app/immutable/chunks/BYIrIC5L.js.gz +0 -0
- package/build/client/_app/immutable/chunks/B_9TWPrx2.js +1 -0
- package/build/client/_app/immutable/chunks/B_9TWPrx2.js.br +0 -0
- package/build/client/_app/immutable/chunks/B_9TWPrx2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/BvOhVtZg.js +1 -0
- package/build/client/_app/immutable/chunks/BvOhVtZg.js.br +1 -0
- package/build/client/_app/immutable/chunks/BvOhVtZg.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CY3em1ma2.js +1 -0
- package/build/client/_app/immutable/chunks/CY3em1ma2.js.br +0 -0
- package/build/client/_app/immutable/chunks/CY3em1ma2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/CgdRZPgI.js +1 -0
- package/build/client/_app/immutable/chunks/CgdRZPgI.js.br +0 -0
- package/build/client/_app/immutable/chunks/CgdRZPgI.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/DkxwAIfJ2.js +1 -0
- package/build/client/_app/immutable/chunks/DkxwAIfJ2.js.br +0 -0
- package/build/client/_app/immutable/chunks/DkxwAIfJ2.js.gz +0 -0
- package/build/client/_app/immutable/chunks/{DatGSObE.js → OJscNS3T.js} +1 -1
- package/build/client/_app/immutable/chunks/OJscNS3T.js.br +0 -0
- package/build/client/_app/immutable/chunks/OJscNS3T.js.gz +0 -0
- package/build/client/_app/immutable/chunks/U9p9CtKG2.js +2 -0
- package/build/client/_app/immutable/chunks/U9p9CtKG2.js.br +0 -0
- package/build/client/_app/immutable/chunks/U9p9CtKG2.js.gz +0 -0
- package/build/client/_app/immutable/entry/app.Cd4S3giu.js +2 -0
- package/build/client/_app/immutable/entry/app.Cd4S3giu.js.br +0 -0
- package/build/client/_app/immutable/entry/app.Cd4S3giu.js.gz +0 -0
- package/build/client/_app/immutable/entry/start.C3xXQVkq.js +1 -0
- package/build/client/_app/immutable/entry/start.C3xXQVkq.js.br +0 -0
- package/build/client/_app/immutable/entry/start.C3xXQVkq.js.gz +0 -0
- package/build/client/_app/immutable/nodes/0.dIOlQ-0y.js +4 -0
- package/build/client/_app/immutable/nodes/0.dIOlQ-0y.js.br +0 -0
- package/build/client/_app/immutable/nodes/0.dIOlQ-0y.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{1.KYdA6ppX.js → 1.Dyte3Ggf.js} +1 -1
- package/build/client/_app/immutable/nodes/1.Dyte3Ggf.js.br +2 -0
- package/build/client/_app/immutable/nodes/1.Dyte3Ggf.js.gz +0 -0
- package/build/client/_app/immutable/nodes/10.ivxAosDg.js +2 -0
- package/build/client/_app/immutable/nodes/10.ivxAosDg.js.br +0 -0
- package/build/client/_app/immutable/nodes/10.ivxAosDg.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{9.CMW6a2Lg.js → 11.wvMfJKC2.js} +1 -1
- package/build/client/_app/immutable/nodes/11.wvMfJKC2.js.br +0 -0
- package/build/client/_app/immutable/nodes/11.wvMfJKC2.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{2.DBz20KgG.js → 2.CmPPom9Z.js} +1 -1
- package/build/client/_app/immutable/nodes/2.CmPPom9Z.js.br +0 -0
- package/build/client/_app/immutable/nodes/2.CmPPom9Z.js.gz +0 -0
- package/build/client/_app/immutable/nodes/3.D-iCGCEx.js +1 -0
- package/build/client/_app/immutable/nodes/3.D-iCGCEx.js.br +0 -0
- package/build/client/_app/immutable/nodes/3.D-iCGCEx.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{4.BvMzqBJj.js → 4.DbfAvO8Z.js} +1 -1
- package/build/client/_app/immutable/nodes/4.DbfAvO8Z.js.br +0 -0
- package/build/client/_app/immutable/nodes/4.DbfAvO8Z.js.gz +0 -0
- package/build/client/_app/immutable/nodes/5.CC5Q7lVw.js +42 -0
- package/build/client/_app/immutable/nodes/5.CC5Q7lVw.js.br +0 -0
- package/build/client/_app/immutable/nodes/5.CC5Q7lVw.js.gz +0 -0
- package/build/client/_app/immutable/nodes/6.CHIjlzpO.js +1 -0
- package/build/client/_app/immutable/nodes/6.CHIjlzpO.js.br +0 -0
- package/build/client/_app/immutable/nodes/6.CHIjlzpO.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{6.BOHISqs-.js → 7.Ejs18ZUc.js} +1 -1
- package/build/client/_app/immutable/nodes/7.Ejs18ZUc.js.br +0 -0
- package/build/client/_app/immutable/nodes/7.Ejs18ZUc.js.gz +0 -0
- package/build/client/_app/immutable/nodes/{7.CemgNJfw.js → 8.B-HweAc8.js} +1 -1
- package/build/client/_app/immutable/nodes/8.B-HweAc8.js.br +0 -0
- package/build/client/_app/immutable/nodes/8.B-HweAc8.js.gz +0 -0
- package/build/client/_app/immutable/nodes/9.CKPeM6tx.js +5 -0
- package/build/client/_app/immutable/nodes/9.CKPeM6tx.js.br +0 -0
- package/build/client/_app/immutable/nodes/9.CKPeM6tx.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-C_o0oz-N.js → 0-Co8kcANG.js} +4 -4
- package/build/server/chunks/{0-C_o0oz-N.js.map → 0-Co8kcANG.js.map} +1 -1
- package/build/server/chunks/1-BSUItTig.js +9 -0
- package/build/server/chunks/{1-DPpKAKXV.js.map → 1-BSUItTig.js.map} +1 -1
- package/build/server/chunks/10-BygvxrZp.js +9 -0
- package/build/server/chunks/10-BygvxrZp.js.map +1 -0
- package/build/server/chunks/11-DRx0tRx2.js +9 -0
- package/build/server/chunks/11-DRx0tRx2.js.map +1 -0
- package/build/server/chunks/{2-AlfFqtL1.js → 2-BQT3m1vc.js} +3 -3
- package/build/server/chunks/{2-AlfFqtL1.js.map → 2-BQT3m1vc.js.map} +1 -1
- package/build/server/chunks/{3-vbjUt_51.js → 3-DPZ9BquJ.js} +3 -3
- package/build/server/chunks/{3-vbjUt_51.js.map → 3-DPZ9BquJ.js.map} +1 -1
- package/build/server/chunks/{4-BNow4x6D.js → 4-DHo47YX6.js} +3 -3
- package/build/server/chunks/{4-BNow4x6D.js.map → 4-DHo47YX6.js.map} +1 -1
- package/build/server/chunks/5-Cp9evBAG.js +9 -0
- package/build/server/chunks/5-Cp9evBAG.js.map +1 -0
- package/build/server/chunks/6-DiBq3bOV.js +9 -0
- package/build/server/chunks/6-DiBq3bOV.js.map +1 -0
- package/build/server/chunks/{6-QQ7r8Rd5.js → 7-C4hmS0dG.js} +3 -3
- package/build/server/chunks/{6-QQ7r8Rd5.js.map → 7-C4hmS0dG.js.map} +1 -1
- package/build/server/chunks/{7-CbPLGaIG.js → 8-CFFuDzBC.js} +4 -4
- package/build/server/chunks/{7-CbPLGaIG.js.map → 8-CFFuDzBC.js.map} +1 -1
- package/build/server/chunks/9-nhhKZJrs.js +9 -0
- package/build/server/chunks/9-nhhKZJrs.js.map +1 -0
- package/build/server/chunks/BehaviorGraph-m5kYj5HH.js +757 -0
- package/build/server/chunks/BehaviorGraph-m5kYj5HH.js.map +1 -0
- package/build/server/chunks/{FeatureCard-BQOY6gJQ.js → FeatureCard-CfbXNYe8.js} +2 -2
- package/build/server/chunks/{FeatureCard-BQOY6gJQ.js.map → FeatureCard-CfbXNYe8.js.map} +1 -1
- package/build/server/chunks/{ProgressBar-CfhccQ83.js → ProgressBar-DDoQJ_C9.js} +2 -2
- package/build/server/chunks/ProgressBar-DDoQJ_C9.js.map +1 -0
- package/build/server/chunks/{ProjectsIndex-CoDrvRya.js → ProjectsIndex-DUVJ3hyL.js} +2 -2
- package/build/server/chunks/{ProjectsIndex-CoDrvRya.js.map → ProjectsIndex-DUVJ3hyL.js.map} +1 -1
- package/build/server/chunks/TransitionCatalog-B8zHs-2E.js +271 -0
- package/build/server/chunks/TransitionCatalog-B8zHs-2E.js.map +1 -0
- package/build/server/chunks/{_layout.svelte-BREws55o.js → _layout.svelte-CLTmk0xU.js} +66 -15
- package/build/server/chunks/_layout.svelte-CLTmk0xU.js.map +1 -0
- package/build/server/chunks/{_page.svelte-De508ek8.js → _page.svelte-B1nG3PKn.js} +4 -4
- package/build/server/chunks/{_page.svelte-De508ek8.js.map → _page.svelte-B1nG3PKn.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-Zf9H4KOP.js → _page.svelte-BW_nbAAH.js} +11 -315
- package/build/server/chunks/_page.svelte-BW_nbAAH.js.map +1 -0
- package/build/server/chunks/{_page.svelte-BqSC-1vK.js → _page.svelte-Caq7J0jU.js} +91 -47
- package/build/server/chunks/_page.svelte-Caq7J0jU.js.map +1 -0
- package/build/server/chunks/{_page.svelte-B7hT3P8E.js → _page.svelte-Cham-dsM.js} +4 -4
- package/build/server/chunks/{_page.svelte-B7hT3P8E.js.map → _page.svelte-Cham-dsM.js.map} +1 -1
- package/build/server/chunks/_page.svelte-Dhwjwph_.js +41 -0
- package/build/server/chunks/_page.svelte-Dhwjwph_.js.map +1 -0
- package/build/server/chunks/{_page.svelte-BKKCa9H5.js → _page.svelte-DlFVT40-.js} +3 -3
- package/build/server/chunks/{_page.svelte-BKKCa9H5.js.map → _page.svelte-DlFVT40-.js.map} +1 -1
- package/build/server/chunks/{_page.svelte-BtI2zZ_Z.js → _page.svelte-NVT2dzpG.js} +176 -327
- package/build/server/chunks/_page.svelte-NVT2dzpG.js.map +1 -0
- package/build/server/chunks/{_page.svelte-BKTveFAj.js → _page.svelte-Oj-W7G5s.js} +5 -5
- package/build/server/chunks/{_page.svelte-BKTveFAj.js.map → _page.svelte-Oj-W7G5s.js.map} +1 -1
- package/build/server/chunks/_page.svelte-Z_kK2lHY.js +68 -0
- package/build/server/chunks/_page.svelte-Z_kK2lHY.js.map +1 -0
- package/build/server/chunks/{builderModeStore.svelte-ihupr-3p.js → builderModeStore.svelte-BpRIU_zP.js} +217 -6
- package/build/server/chunks/builderModeStore.svelte-BpRIU_zP.js.map +1 -0
- package/build/server/chunks/client-DeX3TC3s.js +51 -0
- package/build/server/chunks/{client-DfpLcAZ9.js.map → client-DeX3TC3s.js.map} +1 -1
- package/build/server/chunks/{error.svelte-C35KOpru.js → error.svelte-Cdjeq3L2.js} +4 -4
- package/build/server/chunks/{error.svelte-C35KOpru.js.map → error.svelte-Cdjeq3L2.js.map} +1 -1
- package/build/server/chunks/featureStore.svelte-DIYgPBVm.js +161 -0
- package/build/server/chunks/featureStore.svelte-DIYgPBVm.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/{internal-BPKrFkK1.js → internal-KYK0WpL7.js} +4 -4
- package/build/server/chunks/{internal-BPKrFkK1.js.map → internal-KYK0WpL7.js.map} +1 -1
- package/build/server/chunks/projectFeaturesStore.svelte-2o-72_vr.js +313 -0
- package/build/server/chunks/projectFeaturesStore.svelte-2o-72_vr.js.map +1 -0
- package/build/server/chunks/{reconcile-Dv7jS3C8.js → reconcile-B5xqb6-s.js} +3 -272
- package/build/server/chunks/reconcile-B5xqb6-s.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/{state-CpLVNZq7.js → state-DBjl9lhV.js} +2 -2
- package/build/server/chunks/{state-CpLVNZq7.js.map → state-DBjl9lhV.js.map} +1 -1
- package/build/server/index.js +1 -1
- package/build/server/index.js.map +1 -1
- package/build/server/manifest.js +33 -17
- package/build/server/manifest.js.map +1 -1
- package/cli/commands/dashboard.ts +14 -0
- package/cli/commands/init.ts +26 -0
- package/cli/commands/theme.ts +62 -0
- package/cli/unspa.ts +38 -2
- package/cli/util/context-files.ts +5 -0
- package/cli/util/theme.ts +34 -0
- package/mcp-server/sync-notifier.ts +88 -35
- package/package.json +2 -1
- package/src/app.css +187 -0
- package/src/app.html +15 -1
- package/src/features/behavior-model/domain/services/BehaviorGraphModel.ts +531 -0
- package/src/features/behavior-model/presentation/adapters/VisBehaviorGraphRenderer.ts +492 -0
- package/src/features/behavior-model/presentation/components/BehaviorGraph.svelte +370 -0
- package/src/features/behavior-model/presentation/components/FeatureHeader.svelte +13 -5
- package/src/features/behavior-model/presentation/view-models/BehaviorGraphTheme.ts +43 -0
- 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/projects/presentation/components/ProjectEditor.svelte +7 -0
- package/src/features/simulator/application/use-cases/RunScenarios.ts +15 -1
- package/src/hooks.server.ts +11 -1
- package/src/lib/theme/registry.ts +77 -0
- package/src/lib/theme/themeStore.svelte.ts +64 -0
- package/src/routes/+layout.svelte +184 -30
- package/src/routes/features/[id]/graph/+page.svelte +34 -0
- package/src/routes/projects/[id]/graph/+page.svelte +79 -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/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/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/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/DatGSObE.js.br +0 -0
- package/build/client/_app/immutable/chunks/DatGSObE.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/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.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.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/1-DPpKAKXV.js +0 -9
- package/build/server/chunks/5-D7OCJpxD.js +0 -9
- package/build/server/chunks/5-D7OCJpxD.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/ProgressBar-CfhccQ83.js.map +0 -1
- package/build/server/chunks/_layout.svelte-BREws55o.js.map +0 -1
- 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-Zf9H4KOP.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/hooks.server-Rv301GTB.js.map +0 -1
- package/build/server/chunks/reconcile-Dv7jS3C8.js.map +0 -1
- /package/build/client/_app/immutable/assets/{9.nv0I59TU.css → 11.nv0I59TU.css} +0 -0
- /package/build/client/_app/immutable/assets/{9.nv0I59TU.css.br → 11.nv0I59TU.css.br} +0 -0
- /package/build/client/_app/immutable/assets/{9.nv0I59TU.css.gz → 11.nv0I59TU.css.gz} +0 -0
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
import { q as derived } from './index-server-7H0jzj0M.js';
|
|
2
|
+
import { h as getBrowserContainer } from './browserContainer-CNX7ANld.js';
|
|
3
|
+
import { e as emit } from './eventBus-B9k-Vzso.js';
|
|
4
|
+
import { r as reconcileInPlace, g as getRoomClient } from './reconcile-B5xqb6-s.js';
|
|
5
|
+
|
|
6
|
+
//#region src/features/projects/presentation/stores/projectStore.svelte.ts
|
|
7
|
+
var ProjectStore = class {
|
|
8
|
+
loading = true;
|
|
9
|
+
project = null;
|
|
10
|
+
#id = derived(() => this.project ? String(this.project.id) : "");
|
|
11
|
+
get id() {
|
|
12
|
+
return this.#id();
|
|
13
|
+
}
|
|
14
|
+
set id($$value) {
|
|
15
|
+
return this.#id($$value);
|
|
16
|
+
}
|
|
17
|
+
#name = derived(() => this.project?.name ?? "");
|
|
18
|
+
get name() {
|
|
19
|
+
return this.#name();
|
|
20
|
+
}
|
|
21
|
+
set name($$value) {
|
|
22
|
+
return this.#name($$value);
|
|
23
|
+
}
|
|
24
|
+
#featureIds = derived(() => this.project ? this.project.featureIds.map(String) : []);
|
|
25
|
+
get featureIds() {
|
|
26
|
+
return this.#featureIds();
|
|
27
|
+
}
|
|
28
|
+
set featureIds($$value) {
|
|
29
|
+
return this.#featureIds($$value);
|
|
30
|
+
}
|
|
31
|
+
error = null;
|
|
32
|
+
saveError = null;
|
|
33
|
+
saving = false;
|
|
34
|
+
dirty = false;
|
|
35
|
+
lastSavedAt = "";
|
|
36
|
+
activePanel = "features";
|
|
37
|
+
selectedFeatureId = "";
|
|
38
|
+
search = "";
|
|
39
|
+
historyEntries = [];
|
|
40
|
+
historyCursor = -1;
|
|
41
|
+
currentId = null;
|
|
42
|
+
client = null;
|
|
43
|
+
clientUnsubscribe = null;
|
|
44
|
+
historyUnsubscribe = null;
|
|
45
|
+
async load(id) {
|
|
46
|
+
try {
|
|
47
|
+
this.loading = true;
|
|
48
|
+
this.error = null;
|
|
49
|
+
this.currentId = id;
|
|
50
|
+
const fresh = await (await getBrowserContainer()).useCases.getProject(id);
|
|
51
|
+
this.project = fresh;
|
|
52
|
+
this.dirty = false;
|
|
53
|
+
this.lastSavedAt = fresh?.updatedAt ?? "";
|
|
54
|
+
this.subscribeRoom(id);
|
|
55
|
+
} catch (e) {
|
|
56
|
+
this.error = e.message;
|
|
57
|
+
} finally {
|
|
58
|
+
this.loading = false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
setActivePanel(panel) {
|
|
62
|
+
this.activePanel = panel;
|
|
63
|
+
emit("project.panel_switched", { panel });
|
|
64
|
+
}
|
|
65
|
+
setSearch(query) {
|
|
66
|
+
this.search = query;
|
|
67
|
+
emit("project.editor_search_updated", { query });
|
|
68
|
+
}
|
|
69
|
+
setSelectedFeature(id) {
|
|
70
|
+
this.selectedFeatureId = id;
|
|
71
|
+
if (id) emit("project.feature_opened", { featureId: id });
|
|
72
|
+
}
|
|
73
|
+
async addFeature(featureId) {
|
|
74
|
+
if (!this.project || !this.currentId) return;
|
|
75
|
+
this.saving = true;
|
|
76
|
+
this.saveError = null;
|
|
77
|
+
try {
|
|
78
|
+
const next = await (await getBrowserContainer()).useCases.addFeatureToProject(this.currentId, featureId);
|
|
79
|
+
this.applyProject(next);
|
|
80
|
+
emit("project.feature_added", {
|
|
81
|
+
projectId: String(this.currentId),
|
|
82
|
+
featureId: String(featureId)
|
|
83
|
+
});
|
|
84
|
+
} catch (e) {
|
|
85
|
+
this.saveError = e.message;
|
|
86
|
+
} finally {
|
|
87
|
+
this.saving = false;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
async removeFeature(featureId) {
|
|
91
|
+
if (!this.project || !this.currentId) return;
|
|
92
|
+
this.saving = true;
|
|
93
|
+
this.saveError = null;
|
|
94
|
+
try {
|
|
95
|
+
const next = await (await getBrowserContainer()).useCases.removeFeatureFromProject(this.currentId, featureId);
|
|
96
|
+
this.applyProject(next);
|
|
97
|
+
emit("project.feature_removed", {
|
|
98
|
+
projectId: String(this.currentId),
|
|
99
|
+
featureId: String(featureId)
|
|
100
|
+
});
|
|
101
|
+
} catch (e) {
|
|
102
|
+
this.saveError = e.message;
|
|
103
|
+
} finally {
|
|
104
|
+
this.saving = false;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
async rename(name) {
|
|
108
|
+
if (!this.project) return;
|
|
109
|
+
this.saving = true;
|
|
110
|
+
this.saveError = null;
|
|
111
|
+
try {
|
|
112
|
+
const next = await (await getBrowserContainer()).useCases.saveProject({
|
|
113
|
+
...this.project,
|
|
114
|
+
name: name.trim()
|
|
115
|
+
});
|
|
116
|
+
this.applyProject(next);
|
|
117
|
+
} catch (e) {
|
|
118
|
+
this.saveError = e.message;
|
|
119
|
+
} finally {
|
|
120
|
+
this.saving = false;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
async updateMetadata(name, description) {
|
|
124
|
+
if (!this.project) return;
|
|
125
|
+
const trimmedName = name.trim();
|
|
126
|
+
if (trimmedName.length === 0) return;
|
|
127
|
+
this.saving = true;
|
|
128
|
+
this.saveError = null;
|
|
129
|
+
try {
|
|
130
|
+
const container = await getBrowserContainer();
|
|
131
|
+
const trimmedDescription = description.trim();
|
|
132
|
+
const next = await container.useCases.saveProject({
|
|
133
|
+
...this.project,
|
|
134
|
+
name: trimmedName,
|
|
135
|
+
description: trimmedDescription.length > 0 ? trimmedDescription : void 0
|
|
136
|
+
});
|
|
137
|
+
this.applyProject(next);
|
|
138
|
+
emit("project.saved", {
|
|
139
|
+
id: String(next.id),
|
|
140
|
+
name: next.name
|
|
141
|
+
});
|
|
142
|
+
} catch (e) {
|
|
143
|
+
this.saveError = e.message;
|
|
144
|
+
} finally {
|
|
145
|
+
this.saving = false;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
async setDescription(description) {
|
|
149
|
+
if (!this.project) return;
|
|
150
|
+
this.saving = true;
|
|
151
|
+
this.saveError = null;
|
|
152
|
+
try {
|
|
153
|
+
const container = await getBrowserContainer();
|
|
154
|
+
const trimmed = description.trim();
|
|
155
|
+
const next = await container.useCases.saveProject({
|
|
156
|
+
...this.project,
|
|
157
|
+
description: trimmed.length > 0 ? trimmed : void 0
|
|
158
|
+
});
|
|
159
|
+
this.applyProject(next);
|
|
160
|
+
} catch (e) {
|
|
161
|
+
this.saveError = e.message;
|
|
162
|
+
} finally {
|
|
163
|
+
this.saving = false;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
dismissSaveError() {
|
|
167
|
+
this.saveError = null;
|
|
168
|
+
}
|
|
169
|
+
reset() {
|
|
170
|
+
if (this.clientUnsubscribe) {
|
|
171
|
+
this.clientUnsubscribe();
|
|
172
|
+
this.clientUnsubscribe = null;
|
|
173
|
+
}
|
|
174
|
+
if (this.historyUnsubscribe) {
|
|
175
|
+
this.historyUnsubscribe();
|
|
176
|
+
this.historyUnsubscribe = null;
|
|
177
|
+
}
|
|
178
|
+
this.client = null;
|
|
179
|
+
this.currentId = null;
|
|
180
|
+
this.project = null;
|
|
181
|
+
this.historyEntries = [];
|
|
182
|
+
this.historyCursor = -1;
|
|
183
|
+
this.error = null;
|
|
184
|
+
this.saveError = null;
|
|
185
|
+
this.loading = true;
|
|
186
|
+
this.saving = false;
|
|
187
|
+
this.dirty = false;
|
|
188
|
+
this.lastSavedAt = "";
|
|
189
|
+
this.activePanel = "features";
|
|
190
|
+
this.selectedFeatureId = "";
|
|
191
|
+
this.search = "";
|
|
192
|
+
}
|
|
193
|
+
applyProject(next) {
|
|
194
|
+
if (this.project) reconcileInPlace(this.project, next);
|
|
195
|
+
else this.project = next;
|
|
196
|
+
this.dirty = false;
|
|
197
|
+
this.lastSavedAt = next.updatedAt;
|
|
198
|
+
}
|
|
199
|
+
subscribeRoom(id) {
|
|
200
|
+
if (this.clientUnsubscribe) {
|
|
201
|
+
this.clientUnsubscribe();
|
|
202
|
+
this.clientUnsubscribe = null;
|
|
203
|
+
}
|
|
204
|
+
if (this.historyUnsubscribe) {
|
|
205
|
+
this.historyUnsubscribe();
|
|
206
|
+
this.historyUnsubscribe = null;
|
|
207
|
+
}
|
|
208
|
+
const client = getRoomClient("project", id);
|
|
209
|
+
this.client = client;
|
|
210
|
+
this.clientUnsubscribe = client.observe((next, origin) => {
|
|
211
|
+
if (origin === "local") return;
|
|
212
|
+
if (!next) return;
|
|
213
|
+
if (this.currentId !== id) return;
|
|
214
|
+
if (this.project) reconcileInPlace(this.project, next);
|
|
215
|
+
else this.project = next;
|
|
216
|
+
this.lastSavedAt = next.updatedAt;
|
|
217
|
+
});
|
|
218
|
+
this.historyEntries = client.history.entries;
|
|
219
|
+
this.historyCursor = client.history.cursor;
|
|
220
|
+
this.historyUnsubscribe = client.observeHistory((view) => {
|
|
221
|
+
if (this.currentId !== id) return;
|
|
222
|
+
this.historyEntries = view.entries;
|
|
223
|
+
this.historyCursor = view.cursor;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
var projectStore = new ProjectStore();
|
|
228
|
+
//#endregion
|
|
229
|
+
//#region src/features/projects/presentation/stores/projectFeaturesStore.svelte.ts
|
|
230
|
+
var ProjectFeaturesStore = class {
|
|
231
|
+
loading = false;
|
|
232
|
+
features = [];
|
|
233
|
+
allSummaries = [];
|
|
234
|
+
error = null;
|
|
235
|
+
async load(featureIds) {
|
|
236
|
+
this.loading = true;
|
|
237
|
+
this.error = null;
|
|
238
|
+
try {
|
|
239
|
+
const container = await getBrowserContainer();
|
|
240
|
+
const fetched = await Promise.all(featureIds.map((id) => container.useCases.getFeature(id)));
|
|
241
|
+
this.features = fetched.filter((e) => e !== null);
|
|
242
|
+
} catch (e) {
|
|
243
|
+
this.error = e.message;
|
|
244
|
+
} finally {
|
|
245
|
+
this.loading = false;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Bring `features[]` in line with the project's current featureIds[]
|
|
250
|
+
* without toggling `loading`. Existing features keep their reference
|
|
251
|
+
* (Svelte sees no change → no DOM churn). Missing features get fetched
|
|
252
|
+
* and merged in; removed ones are dropped. Out-of-band project edits
|
|
253
|
+
* (MCP add_feature_to_project) flow through here, so the UI gets the
|
|
254
|
+
* new card sliding into the existing list instead of a full redraw.
|
|
255
|
+
*/
|
|
256
|
+
async syncWith(featureIds) {
|
|
257
|
+
const wanted = new Set(featureIds.map(String));
|
|
258
|
+
const have = new Map(this.features.map((f) => [String(f.id), f]));
|
|
259
|
+
const missing = featureIds.filter((id) => !have.has(String(id)));
|
|
260
|
+
let nextHave = have;
|
|
261
|
+
if (missing.length > 0) try {
|
|
262
|
+
const container = await getBrowserContainer();
|
|
263
|
+
const fetched = await Promise.all(missing.map((id) => container.useCases.getFeature(id)));
|
|
264
|
+
nextHave = new Map(have);
|
|
265
|
+
for (const f of fetched) if (f) nextHave.set(String(f.id), f);
|
|
266
|
+
} catch (e) {
|
|
267
|
+
this.error = e.message;
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
this.features = featureIds.map((id) => nextHave.get(String(id))).filter((f) => f !== void 0 && wanted.has(String(f.id)));
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Re-fetch a single feature the user already owns. Mutates the array
|
|
274
|
+
* in-place at its current index so the keyed `{#each}` re-uses the
|
|
275
|
+
* existing DOM node — no flicker, scroll position preserved.
|
|
276
|
+
*/
|
|
277
|
+
async refetchOne(featureId) {
|
|
278
|
+
try {
|
|
279
|
+
const fresh = await (await getBrowserContainer()).useCases.getFeature(featureId);
|
|
280
|
+
const idx = this.features.findIndex((f) => String(f.id) === String(featureId));
|
|
281
|
+
if (!fresh) {
|
|
282
|
+
if (idx >= 0) this.features = [...this.features.slice(0, idx), ...this.features.slice(idx + 1)];
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
if (idx >= 0) this.features = [
|
|
286
|
+
...this.features.slice(0, idx),
|
|
287
|
+
fresh,
|
|
288
|
+
...this.features.slice(idx + 1)
|
|
289
|
+
];
|
|
290
|
+
else this.features = [...this.features, fresh];
|
|
291
|
+
} catch (e) {
|
|
292
|
+
this.error = e.message;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
async loadAllSummaries() {
|
|
296
|
+
try {
|
|
297
|
+
const container = await getBrowserContainer();
|
|
298
|
+
this.allSummaries = [...await container.useCases.listFeatures()];
|
|
299
|
+
} catch (e) {
|
|
300
|
+
this.error = e.message;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
reset() {
|
|
304
|
+
this.features = [];
|
|
305
|
+
this.allSummaries = [];
|
|
306
|
+
this.loading = false;
|
|
307
|
+
this.error = null;
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
var projectFeaturesStore = new ProjectFeaturesStore();
|
|
311
|
+
|
|
312
|
+
export { projectStore as a, projectFeaturesStore as p };
|
|
313
|
+
//# sourceMappingURL=projectFeaturesStore.svelte-2o-72_vr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectFeaturesStore.svelte-2o-72_vr.js","sources":["../../../.svelte-kit/adapter-node/chunks/projectFeaturesStore.svelte.js"],"sourcesContent":["import { l as derived } from \"./index-server.js\";\nimport { t as getBrowserContainer } from \"./browserContainer.js\";\nimport { t as emit } from \"./eventBus.js\";\nimport { n as reconcileInPlace, r as getRoomClient } from \"./reconcile.js\";\n//#region src/features/projects/presentation/stores/projectStore.svelte.ts\nvar ProjectStore = class {\n\tloading = true;\n\tproject = null;\n\t#id = derived(() => this.project ? String(this.project.id) : \"\");\n\tget id() {\n\t\treturn this.#id();\n\t}\n\tset id($$value) {\n\t\treturn this.#id($$value);\n\t}\n\t#name = derived(() => this.project?.name ?? \"\");\n\tget name() {\n\t\treturn this.#name();\n\t}\n\tset name($$value) {\n\t\treturn this.#name($$value);\n\t}\n\t#featureIds = derived(() => this.project ? this.project.featureIds.map(String) : []);\n\tget featureIds() {\n\t\treturn this.#featureIds();\n\t}\n\tset featureIds($$value) {\n\t\treturn this.#featureIds($$value);\n\t}\n\terror = null;\n\tsaveError = null;\n\tsaving = false;\n\tdirty = false;\n\tlastSavedAt = \"\";\n\tactivePanel = \"features\";\n\tselectedFeatureId = \"\";\n\tsearch = \"\";\n\thistoryEntries = [];\n\thistoryCursor = -1;\n\tcurrentId = null;\n\tclient = null;\n\tclientUnsubscribe = null;\n\thistoryUnsubscribe = null;\n\tasync load(id) {\n\t\ttry {\n\t\t\tthis.loading = true;\n\t\t\tthis.error = null;\n\t\t\tthis.currentId = id;\n\t\t\tconst fresh = await (await getBrowserContainer()).useCases.getProject(id);\n\t\t\tthis.project = fresh;\n\t\t\tthis.dirty = false;\n\t\t\tthis.lastSavedAt = fresh?.updatedAt ?? \"\";\n\t\t\tthis.subscribeRoom(id);\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\tsetActivePanel(panel) {\n\t\tthis.activePanel = panel;\n\t\temit(\"project.panel_switched\", { panel });\n\t}\n\tsetSearch(query) {\n\t\tthis.search = query;\n\t\temit(\"project.editor_search_updated\", { query });\n\t}\n\tsetSelectedFeature(id) {\n\t\tthis.selectedFeatureId = id;\n\t\tif (id) emit(\"project.feature_opened\", { featureId: id });\n\t}\n\tasync addFeature(featureId) {\n\t\tif (!this.project || !this.currentId) return;\n\t\tthis.saving = true;\n\t\tthis.saveError = null;\n\t\ttry {\n\t\t\tconst next = await (await getBrowserContainer()).useCases.addFeatureToProject(this.currentId, featureId);\n\t\t\tthis.applyProject(next);\n\t\t\temit(\"project.feature_added\", {\n\t\t\t\tprojectId: String(this.currentId),\n\t\t\t\tfeatureId: String(featureId)\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tthis.saveError = e.message;\n\t\t} finally {\n\t\t\tthis.saving = false;\n\t\t}\n\t}\n\tasync removeFeature(featureId) {\n\t\tif (!this.project || !this.currentId) return;\n\t\tthis.saving = true;\n\t\tthis.saveError = null;\n\t\ttry {\n\t\t\tconst next = await (await getBrowserContainer()).useCases.removeFeatureFromProject(this.currentId, featureId);\n\t\t\tthis.applyProject(next);\n\t\t\temit(\"project.feature_removed\", {\n\t\t\t\tprojectId: String(this.currentId),\n\t\t\t\tfeatureId: String(featureId)\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tthis.saveError = e.message;\n\t\t} finally {\n\t\t\tthis.saving = false;\n\t\t}\n\t}\n\tasync rename(name) {\n\t\tif (!this.project) return;\n\t\tthis.saving = true;\n\t\tthis.saveError = null;\n\t\ttry {\n\t\t\tconst next = await (await getBrowserContainer()).useCases.saveProject({\n\t\t\t\t...this.project,\n\t\t\t\tname: name.trim()\n\t\t\t});\n\t\t\tthis.applyProject(next);\n\t\t} catch (e) {\n\t\t\tthis.saveError = e.message;\n\t\t} finally {\n\t\t\tthis.saving = false;\n\t\t}\n\t}\n\tasync updateMetadata(name, description) {\n\t\tif (!this.project) return;\n\t\tconst trimmedName = name.trim();\n\t\tif (trimmedName.length === 0) return;\n\t\tthis.saving = true;\n\t\tthis.saveError = null;\n\t\ttry {\n\t\t\tconst container = await getBrowserContainer();\n\t\t\tconst trimmedDescription = description.trim();\n\t\t\tconst next = await container.useCases.saveProject({\n\t\t\t\t...this.project,\n\t\t\t\tname: trimmedName,\n\t\t\t\tdescription: trimmedDescription.length > 0 ? trimmedDescription : void 0\n\t\t\t});\n\t\t\tthis.applyProject(next);\n\t\t\temit(\"project.saved\", {\n\t\t\t\tid: String(next.id),\n\t\t\t\tname: next.name\n\t\t\t});\n\t\t} catch (e) {\n\t\t\tthis.saveError = e.message;\n\t\t} finally {\n\t\t\tthis.saving = false;\n\t\t}\n\t}\n\tasync setDescription(description) {\n\t\tif (!this.project) return;\n\t\tthis.saving = true;\n\t\tthis.saveError = null;\n\t\ttry {\n\t\t\tconst container = await getBrowserContainer();\n\t\t\tconst trimmed = description.trim();\n\t\t\tconst next = await container.useCases.saveProject({\n\t\t\t\t...this.project,\n\t\t\t\tdescription: trimmed.length > 0 ? trimmed : void 0\n\t\t\t});\n\t\t\tthis.applyProject(next);\n\t\t} catch (e) {\n\t\t\tthis.saveError = e.message;\n\t\t} finally {\n\t\t\tthis.saving = false;\n\t\t}\n\t}\n\tdismissSaveError() {\n\t\tthis.saveError = null;\n\t}\n\treset() {\n\t\tif (this.clientUnsubscribe) {\n\t\t\tthis.clientUnsubscribe();\n\t\t\tthis.clientUnsubscribe = null;\n\t\t}\n\t\tif (this.historyUnsubscribe) {\n\t\t\tthis.historyUnsubscribe();\n\t\t\tthis.historyUnsubscribe = null;\n\t\t}\n\t\tthis.client = null;\n\t\tthis.currentId = null;\n\t\tthis.project = null;\n\t\tthis.historyEntries = [];\n\t\tthis.historyCursor = -1;\n\t\tthis.error = null;\n\t\tthis.saveError = null;\n\t\tthis.loading = true;\n\t\tthis.saving = false;\n\t\tthis.dirty = false;\n\t\tthis.lastSavedAt = \"\";\n\t\tthis.activePanel = \"features\";\n\t\tthis.selectedFeatureId = \"\";\n\t\tthis.search = \"\";\n\t}\n\tapplyProject(next) {\n\t\tif (this.project) reconcileInPlace(this.project, next);\n\t\telse this.project = next;\n\t\tthis.dirty = false;\n\t\tthis.lastSavedAt = next.updatedAt;\n\t}\n\tsubscribeRoom(id) {\n\t\tif (this.clientUnsubscribe) {\n\t\t\tthis.clientUnsubscribe();\n\t\t\tthis.clientUnsubscribe = null;\n\t\t}\n\t\tif (this.historyUnsubscribe) {\n\t\t\tthis.historyUnsubscribe();\n\t\t\tthis.historyUnsubscribe = null;\n\t\t}\n\t\tconst client = getRoomClient(\"project\", id);\n\t\tthis.client = client;\n\t\tthis.clientUnsubscribe = client.observe((next, origin) => {\n\t\t\tif (origin === \"local\") return;\n\t\t\tif (!next) return;\n\t\t\tif (this.currentId !== id) return;\n\t\t\tif (this.project) reconcileInPlace(this.project, next);\n\t\t\telse this.project = next;\n\t\t\tthis.lastSavedAt = next.updatedAt;\n\t\t});\n\t\tthis.historyEntries = client.history.entries;\n\t\tthis.historyCursor = client.history.cursor;\n\t\tthis.historyUnsubscribe = client.observeHistory((view) => {\n\t\t\tif (this.currentId !== id) return;\n\t\t\tthis.historyEntries = view.entries;\n\t\t\tthis.historyCursor = view.cursor;\n\t\t});\n\t}\n};\nvar projectStore = new ProjectStore();\n//#endregion\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 { projectStore as n, projectFeaturesStore as t };\n"],"names":[],"mappings":";;;;;AAIA;AACA,IAAI,YAAY,GAAG,MAAM;AACzB,CAAC,OAAO,GAAG,IAAI;AACf,CAAC,OAAO,GAAG,IAAI;AACf,CAAC,GAAG,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;AACjE,CAAC,IAAI,EAAE,GAAG;AACV,EAAE,OAAO,IAAI,CAAC,GAAG,EAAE;AACnB,CAAC;AACD,CAAC,IAAI,EAAE,CAAC,OAAO,EAAE;AACjB,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;AAC1B,CAAC;AACD,CAAC,KAAK,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,OAAO,EAAE,IAAI,IAAI,EA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G,EAAE;AACxB,EAAE,IAAI,CAAC,OAAO,GAAG,KAAK;AACtB,EAAE,IAAI,CAAC,KAAK,GAAG,IAAI;AACnB,CAAC;AACD,CAAC;AACE,IAAC,oBAAoB,GAAG,IAAI,oBAAoB;;;;"}
|
|
@@ -1,277 +1,8 @@
|
|
|
1
|
-
import './client-DfpLcAZ9.js';
|
|
2
|
-
import { i as humanizeStatePath, a as authStore } from './browserContainer-CNX7ANld.js';
|
|
3
1
|
import { m as makeRoomId, a as ROOM_DOC_MAP, e as encode, R as ROOM_DOC_FIELD, d as decode } from './protocol-3LlFyPP_.js';
|
|
2
|
+
import { a as authStore } from './browserContainer-CNX7ANld.js';
|
|
4
3
|
import { i as identityStore } from './identityStore.svelte-IIvW2_3b.js';
|
|
5
4
|
import * as Y from 'yjs';
|
|
6
5
|
|
|
7
|
-
//#endregion
|
|
8
|
-
//#region src/features/behavior-model/domain/services/EffectiveEntities.ts
|
|
9
|
-
var capitalize = (s) => s.length === 0 ? s : s.charAt(0).toUpperCase() + s.slice(1);
|
|
10
|
-
var fieldNameFromPath = (path) => {
|
|
11
|
-
const segments = path.split(".");
|
|
12
|
-
if (segments.length <= 1) return path;
|
|
13
|
-
return segments[segments.length - 1];
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Produce the list of all Entity entities visible in the feature. Every
|
|
17
|
-
* state-path namespace, enriched with metadata from any matching authored
|
|
18
|
-
* `Entity` record. Authored entries with no matching state paths still appear
|
|
19
|
-
* (so the user doesn't lose explicit work).
|
|
20
|
-
*/
|
|
21
|
-
var getEffectiveEntities = (feature) => {
|
|
22
|
-
const deduced = /* @__PURE__ */ new Map();
|
|
23
|
-
for (const surface of feature.surfaces) for (const def of surface.stateDefinitions) {
|
|
24
|
-
const namespace = def.path.split(".")[0] ?? def.path;
|
|
25
|
-
let acc = deduced.get(namespace);
|
|
26
|
-
if (!acc) {
|
|
27
|
-
acc = {
|
|
28
|
-
fields: /* @__PURE__ */ new Map(),
|
|
29
|
-
surfaces: /* @__PURE__ */ new Set()
|
|
30
|
-
};
|
|
31
|
-
deduced.set(namespace, acc);
|
|
32
|
-
}
|
|
33
|
-
if (!acc.fields.has(def.path)) acc.fields.set(def.path, {
|
|
34
|
-
name: fieldNameFromPath(def.path),
|
|
35
|
-
path: def.path,
|
|
36
|
-
type: def.type,
|
|
37
|
-
source: "deduced"
|
|
38
|
-
});
|
|
39
|
-
acc.surfaces.add(surface.name);
|
|
40
|
-
}
|
|
41
|
-
const declaredByNamespace = /* @__PURE__ */ new Map();
|
|
42
|
-
for (const data of feature.entities) declaredByNamespace.set(data.namespace, data);
|
|
43
|
-
const namespaces = new Set([...deduced.keys(), ...declaredByNamespace.keys()]);
|
|
44
|
-
const results = [];
|
|
45
|
-
for (const namespace of namespaces) {
|
|
46
|
-
const declared = declaredByNamespace.get(namespace);
|
|
47
|
-
const acc = deduced.get(namespace);
|
|
48
|
-
const fieldByPath = /* @__PURE__ */ new Map();
|
|
49
|
-
if (acc) for (const [path, f] of acc.fields) fieldByPath.set(path, f);
|
|
50
|
-
if (declared) for (const f of declared.fields) {
|
|
51
|
-
if (!f.path) continue;
|
|
52
|
-
fieldByPath.set(String(f.path), {
|
|
53
|
-
id: f.id,
|
|
54
|
-
name: f.name,
|
|
55
|
-
path: f.path,
|
|
56
|
-
type: f.type,
|
|
57
|
-
source: "declared",
|
|
58
|
-
fields: f.fields,
|
|
59
|
-
items: f.items
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
const fields = Array.from(fieldByPath.values()).sort((a, b) => a.path.localeCompare(b.path));
|
|
63
|
-
results.push({
|
|
64
|
-
id: declared?.id,
|
|
65
|
-
name: capitalize(humanizeStatePath(namespace)),
|
|
66
|
-
namespace,
|
|
67
|
-
description: declared?.description,
|
|
68
|
-
resourceId: declared?.resourceId,
|
|
69
|
-
fields,
|
|
70
|
-
isMaterialized: declared !== void 0,
|
|
71
|
-
usedBySurfaces: acc ? Array.from(acc.surfaces).sort() : []
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
results.sort((a, b) => a.namespace.localeCompare(b.namespace));
|
|
75
|
-
return results;
|
|
76
|
-
};
|
|
77
|
-
//#endregion
|
|
78
|
-
//#region src/features/behavior-model/domain/services/EventCatalog.ts
|
|
79
|
-
var groupOf = (name) => {
|
|
80
|
-
const seg = name.split(".")[0];
|
|
81
|
-
return seg && seg.length > 0 ? seg : "_root";
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Walk the feature and collect every event emitted across:
|
|
85
|
-
* - action.emittedEvents (intent-level declarations)
|
|
86
|
-
* - action.effects (emit_event default effects)
|
|
87
|
-
* - action.rules.effect (emit_event when a rule fires)
|
|
88
|
-
* - surface.rules.effect (emit_event surface-level rules)
|
|
89
|
-
*
|
|
90
|
-
* Output is grouped by the event's namespace and sorted alphabetically. Each
|
|
91
|
-
* unique event collapses every occurrence into a single entry with all its
|
|
92
|
-
* emission sources, so the user sees "order.placed (3 places)" once instead
|
|
93
|
-
* of three times.
|
|
94
|
-
*/
|
|
95
|
-
var buildEventCatalog = (feature) => {
|
|
96
|
-
const byName = /* @__PURE__ */ new Map();
|
|
97
|
-
const push = (name, source) => {
|
|
98
|
-
let list = byName.get(name);
|
|
99
|
-
if (!list) {
|
|
100
|
-
list = [];
|
|
101
|
-
byName.set(name, list);
|
|
102
|
-
}
|
|
103
|
-
list.push(source);
|
|
104
|
-
};
|
|
105
|
-
for (const surface of feature.surfaces) {
|
|
106
|
-
for (const cap of surface.actions) {
|
|
107
|
-
for (const evt of cap.emittedEvents) push(String(evt), {
|
|
108
|
-
surfaceId: surface.id,
|
|
109
|
-
surfaceName: surface.name,
|
|
110
|
-
actionId: cap.id,
|
|
111
|
-
actionName: cap.name,
|
|
112
|
-
origin: "action_default"
|
|
113
|
-
});
|
|
114
|
-
for (const effect of cap.effects) if (effect.type === "emit_event") push(String(effect.event), {
|
|
115
|
-
surfaceId: surface.id,
|
|
116
|
-
surfaceName: surface.name,
|
|
117
|
-
actionId: cap.id,
|
|
118
|
-
actionName: cap.name,
|
|
119
|
-
origin: "action_effect",
|
|
120
|
-
description: effect.description
|
|
121
|
-
});
|
|
122
|
-
for (const rule of cap.rules) if (rule.effect.type === "emit_event") push(String(rule.effect.event), {
|
|
123
|
-
surfaceId: surface.id,
|
|
124
|
-
surfaceName: surface.name,
|
|
125
|
-
actionId: cap.id,
|
|
126
|
-
actionName: cap.name,
|
|
127
|
-
origin: "action_rule_effect",
|
|
128
|
-
description: rule.description
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
for (const rule of surface.rules) if (rule.effect.type === "emit_event") push(String(rule.effect.event), {
|
|
132
|
-
surfaceId: surface.id,
|
|
133
|
-
surfaceName: surface.name,
|
|
134
|
-
origin: "surface_rule_effect",
|
|
135
|
-
description: rule.description
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
const entries = [];
|
|
139
|
-
for (const [name, emissions] of byName) entries.push({
|
|
140
|
-
name,
|
|
141
|
-
group: groupOf(name),
|
|
142
|
-
emissions
|
|
143
|
-
});
|
|
144
|
-
entries.sort((a, b) => {
|
|
145
|
-
if (a.group !== b.group) return a.group.localeCompare(b.group);
|
|
146
|
-
return String(a.name).localeCompare(String(b.name));
|
|
147
|
-
});
|
|
148
|
-
return entries;
|
|
149
|
-
};
|
|
150
|
-
var groupEventCatalog = (entries) => {
|
|
151
|
-
const map = /* @__PURE__ */ new Map();
|
|
152
|
-
for (const entry of entries) {
|
|
153
|
-
let list = map.get(entry.group);
|
|
154
|
-
if (!list) {
|
|
155
|
-
list = [];
|
|
156
|
-
map.set(entry.group, list);
|
|
157
|
-
}
|
|
158
|
-
list.push(entry);
|
|
159
|
-
}
|
|
160
|
-
return Array.from(map.entries()).map(([group, events]) => ({
|
|
161
|
-
group,
|
|
162
|
-
events
|
|
163
|
-
})).sort((a, b) => a.group.localeCompare(b.group));
|
|
164
|
-
};
|
|
165
|
-
//#endregion
|
|
166
|
-
//#region src/features/behavior-model/domain/services/TransitionCatalog.ts
|
|
167
|
-
/**
|
|
168
|
-
* Walk every surface and collect every authored transition between two
|
|
169
|
-
* surfaces, regardless of where it lives in the model:
|
|
170
|
-
* - `surface.transitions` (declared navigation hints)
|
|
171
|
-
* - action default effects of type `transition_surface`
|
|
172
|
-
* - action rule effects of type `transition_surface`
|
|
173
|
-
* - surface-level rule effects of type `transition_surface`
|
|
174
|
-
*
|
|
175
|
-
* Edges with the same (from, to) pair collapse into one entry whose
|
|
176
|
-
* `sources` lists every contribution. Output is sorted by source surface
|
|
177
|
-
* order (matches the feature editor's surface list), then by target surface name.
|
|
178
|
-
*/
|
|
179
|
-
var buildTransitionCatalog = (feature) => {
|
|
180
|
-
const surfaceById = /* @__PURE__ */ new Map();
|
|
181
|
-
feature.surfaces.forEach((s, index) => {
|
|
182
|
-
surfaceById.set(s.id, {
|
|
183
|
-
name: s.name,
|
|
184
|
-
index
|
|
185
|
-
});
|
|
186
|
-
});
|
|
187
|
-
const byEdge = /* @__PURE__ */ new Map();
|
|
188
|
-
const targetExists = (id) => id !== void 0 && surfaceById.has(id);
|
|
189
|
-
const push = (fromId, toId, source) => {
|
|
190
|
-
if (!targetExists(toId)) return;
|
|
191
|
-
const key = `${fromId}__${toId}`;
|
|
192
|
-
let acc = byEdge.get(key);
|
|
193
|
-
if (!acc) {
|
|
194
|
-
acc = {
|
|
195
|
-
sources: [],
|
|
196
|
-
fromIndex: surfaceById.get(fromId)?.index ?? 0
|
|
197
|
-
};
|
|
198
|
-
byEdge.set(key, acc);
|
|
199
|
-
}
|
|
200
|
-
acc.sources.push(source);
|
|
201
|
-
};
|
|
202
|
-
for (const surface of feature.surfaces) {
|
|
203
|
-
const fromId = surface.id;
|
|
204
|
-
const fromName = surface.name;
|
|
205
|
-
for (const transition of surface.transitions) push(fromId, transition.target, {
|
|
206
|
-
surfaceId: fromId,
|
|
207
|
-
surfaceName: fromName,
|
|
208
|
-
origin: "declared",
|
|
209
|
-
description: transition.label ?? transition.description
|
|
210
|
-
});
|
|
211
|
-
for (const cap of surface.actions) {
|
|
212
|
-
for (const effect of cap.effects) if (effect.type === "transition_surface") push(fromId, effect.target, {
|
|
213
|
-
surfaceId: fromId,
|
|
214
|
-
surfaceName: fromName,
|
|
215
|
-
actionId: cap.id,
|
|
216
|
-
actionName: cap.name,
|
|
217
|
-
origin: "action_effect",
|
|
218
|
-
description: effect.description
|
|
219
|
-
});
|
|
220
|
-
for (const rule of cap.rules) if (rule.effect.type === "transition_surface") push(fromId, rule.effect.target, {
|
|
221
|
-
surfaceId: fromId,
|
|
222
|
-
surfaceName: fromName,
|
|
223
|
-
actionId: cap.id,
|
|
224
|
-
actionName: cap.name,
|
|
225
|
-
origin: "action_rule_effect",
|
|
226
|
-
description: rule.description
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
for (const rule of surface.rules) if (rule.effect.type === "transition_surface") push(fromId, rule.effect.target, {
|
|
230
|
-
surfaceId: fromId,
|
|
231
|
-
surfaceName: fromName,
|
|
232
|
-
origin: "surface_rule_effect",
|
|
233
|
-
description: rule.description
|
|
234
|
-
});
|
|
235
|
-
}
|
|
236
|
-
const entries = [];
|
|
237
|
-
for (const [key, acc] of byEdge) {
|
|
238
|
-
const [fromId, toId] = key.split("__");
|
|
239
|
-
const from = surfaceById.get(fromId);
|
|
240
|
-
const to = surfaceById.get(toId);
|
|
241
|
-
if (!from || !to) continue;
|
|
242
|
-
entries.push({
|
|
243
|
-
fromSurfaceId: fromId,
|
|
244
|
-
fromSurfaceName: from.name,
|
|
245
|
-
toSurfaceId: toId,
|
|
246
|
-
toSurfaceName: to.name,
|
|
247
|
-
sources: acc.sources
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
entries.sort((a, b) => {
|
|
251
|
-
const fa = surfaceById.get(a.fromSurfaceId)?.index ?? 0;
|
|
252
|
-
const fb = surfaceById.get(b.fromSurfaceId)?.index ?? 0;
|
|
253
|
-
if (fa !== fb) return fa - fb;
|
|
254
|
-
return (surfaceById.get(a.toSurfaceId)?.index ?? 0) - (surfaceById.get(b.toSurfaceId)?.index ?? 0);
|
|
255
|
-
});
|
|
256
|
-
return entries;
|
|
257
|
-
};
|
|
258
|
-
var groupTransitionCatalog = (entries) => {
|
|
259
|
-
const map = /* @__PURE__ */ new Map();
|
|
260
|
-
for (const entry of entries) {
|
|
261
|
-
let group = map.get(entry.fromSurfaceId);
|
|
262
|
-
if (!group) {
|
|
263
|
-
group = {
|
|
264
|
-
fromSurfaceId: entry.fromSurfaceId,
|
|
265
|
-
fromSurfaceName: entry.fromSurfaceName,
|
|
266
|
-
transitions: []
|
|
267
|
-
};
|
|
268
|
-
map.set(entry.fromSurfaceId, group);
|
|
269
|
-
}
|
|
270
|
-
group.transitions.push(entry);
|
|
271
|
-
}
|
|
272
|
-
return Array.from(map.values());
|
|
273
|
-
};
|
|
274
|
-
|
|
275
6
|
//#region src/lib/client/sync/YDocClient.ts
|
|
276
7
|
/**
|
|
277
8
|
* Browser-side per-room sync client. Lazy-connects a WebSocket to /sync/<roomId>,
|
|
@@ -602,5 +333,5 @@ var reconcileInPlace = (target, next) => {
|
|
|
602
333
|
*/
|
|
603
334
|
var deepClonePlain = (value) => JSON.parse(JSON.stringify(value));
|
|
604
335
|
|
|
605
|
-
export {
|
|
606
|
-
//# sourceMappingURL=reconcile-
|
|
336
|
+
export { deepClonePlain as d, getRoomClient as g, reconcileInPlace as r };
|
|
337
|
+
//# sourceMappingURL=reconcile-B5xqb6-s.js.map
|