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,271 @@
|
|
|
1
|
+
import { i as humanizeStatePath } from './browserContainer-CNX7ANld.js';
|
|
2
|
+
|
|
3
|
+
//#region src/features/behavior-model/domain/services/EffectiveEntities.ts
|
|
4
|
+
var capitalize = (s) => s.length === 0 ? s : s.charAt(0).toUpperCase() + s.slice(1);
|
|
5
|
+
var fieldNameFromPath = (path) => {
|
|
6
|
+
const segments = path.split(".");
|
|
7
|
+
if (segments.length <= 1) return path;
|
|
8
|
+
return segments[segments.length - 1];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Produce the list of all Entity entities visible in the feature. Every
|
|
12
|
+
* state-path namespace, enriched with metadata from any matching authored
|
|
13
|
+
* `Entity` record. Authored entries with no matching state paths still appear
|
|
14
|
+
* (so the user doesn't lose explicit work).
|
|
15
|
+
*/
|
|
16
|
+
var getEffectiveEntities = (feature) => {
|
|
17
|
+
const deduced = /* @__PURE__ */ new Map();
|
|
18
|
+
for (const surface of feature.surfaces) for (const def of surface.stateDefinitions) {
|
|
19
|
+
const namespace = def.path.split(".")[0] ?? def.path;
|
|
20
|
+
let acc = deduced.get(namespace);
|
|
21
|
+
if (!acc) {
|
|
22
|
+
acc = {
|
|
23
|
+
fields: /* @__PURE__ */ new Map(),
|
|
24
|
+
surfaces: /* @__PURE__ */ new Set()
|
|
25
|
+
};
|
|
26
|
+
deduced.set(namespace, acc);
|
|
27
|
+
}
|
|
28
|
+
if (!acc.fields.has(def.path)) acc.fields.set(def.path, {
|
|
29
|
+
name: fieldNameFromPath(def.path),
|
|
30
|
+
path: def.path,
|
|
31
|
+
type: def.type,
|
|
32
|
+
source: "deduced"
|
|
33
|
+
});
|
|
34
|
+
acc.surfaces.add(surface.name);
|
|
35
|
+
}
|
|
36
|
+
const declaredByNamespace = /* @__PURE__ */ new Map();
|
|
37
|
+
for (const data of feature.entities) declaredByNamespace.set(data.namespace, data);
|
|
38
|
+
const namespaces = new Set([...deduced.keys(), ...declaredByNamespace.keys()]);
|
|
39
|
+
const results = [];
|
|
40
|
+
for (const namespace of namespaces) {
|
|
41
|
+
const declared = declaredByNamespace.get(namespace);
|
|
42
|
+
const acc = deduced.get(namespace);
|
|
43
|
+
const fieldByPath = /* @__PURE__ */ new Map();
|
|
44
|
+
if (acc) for (const [path, f] of acc.fields) fieldByPath.set(path, f);
|
|
45
|
+
if (declared) for (const f of declared.fields) {
|
|
46
|
+
if (!f.path) continue;
|
|
47
|
+
fieldByPath.set(String(f.path), {
|
|
48
|
+
id: f.id,
|
|
49
|
+
name: f.name,
|
|
50
|
+
path: f.path,
|
|
51
|
+
type: f.type,
|
|
52
|
+
source: "declared",
|
|
53
|
+
fields: f.fields,
|
|
54
|
+
items: f.items
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
const fields = Array.from(fieldByPath.values()).sort((a, b) => a.path.localeCompare(b.path));
|
|
58
|
+
results.push({
|
|
59
|
+
id: declared?.id,
|
|
60
|
+
name: capitalize(humanizeStatePath(namespace)),
|
|
61
|
+
namespace,
|
|
62
|
+
description: declared?.description,
|
|
63
|
+
resourceId: declared?.resourceId,
|
|
64
|
+
fields,
|
|
65
|
+
isMaterialized: declared !== void 0,
|
|
66
|
+
usedBySurfaces: acc ? Array.from(acc.surfaces).sort() : []
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
results.sort((a, b) => a.namespace.localeCompare(b.namespace));
|
|
70
|
+
return results;
|
|
71
|
+
};
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/features/behavior-model/domain/services/EventCatalog.ts
|
|
74
|
+
var groupOf = (name) => {
|
|
75
|
+
const seg = name.split(".")[0];
|
|
76
|
+
return seg && seg.length > 0 ? seg : "_root";
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Walk the feature and collect every event emitted across:
|
|
80
|
+
* - action.emittedEvents (intent-level declarations)
|
|
81
|
+
* - action.effects (emit_event default effects)
|
|
82
|
+
* - action.rules.effect (emit_event when a rule fires)
|
|
83
|
+
* - surface.rules.effect (emit_event surface-level rules)
|
|
84
|
+
*
|
|
85
|
+
* Output is grouped by the event's namespace and sorted alphabetically. Each
|
|
86
|
+
* unique event collapses every occurrence into a single entry with all its
|
|
87
|
+
* emission sources, so the user sees "order.placed (3 places)" once instead
|
|
88
|
+
* of three times.
|
|
89
|
+
*/
|
|
90
|
+
var buildEventCatalog = (feature) => {
|
|
91
|
+
const byName = /* @__PURE__ */ new Map();
|
|
92
|
+
const push = (name, source) => {
|
|
93
|
+
let list = byName.get(name);
|
|
94
|
+
if (!list) {
|
|
95
|
+
list = [];
|
|
96
|
+
byName.set(name, list);
|
|
97
|
+
}
|
|
98
|
+
list.push(source);
|
|
99
|
+
};
|
|
100
|
+
for (const surface of feature.surfaces) {
|
|
101
|
+
for (const cap of surface.actions) {
|
|
102
|
+
for (const evt of cap.emittedEvents) push(String(evt), {
|
|
103
|
+
surfaceId: surface.id,
|
|
104
|
+
surfaceName: surface.name,
|
|
105
|
+
actionId: cap.id,
|
|
106
|
+
actionName: cap.name,
|
|
107
|
+
origin: "action_default"
|
|
108
|
+
});
|
|
109
|
+
for (const effect of cap.effects) if (effect.type === "emit_event") push(String(effect.event), {
|
|
110
|
+
surfaceId: surface.id,
|
|
111
|
+
surfaceName: surface.name,
|
|
112
|
+
actionId: cap.id,
|
|
113
|
+
actionName: cap.name,
|
|
114
|
+
origin: "action_effect",
|
|
115
|
+
description: effect.description
|
|
116
|
+
});
|
|
117
|
+
for (const rule of cap.rules) if (rule.effect.type === "emit_event") push(String(rule.effect.event), {
|
|
118
|
+
surfaceId: surface.id,
|
|
119
|
+
surfaceName: surface.name,
|
|
120
|
+
actionId: cap.id,
|
|
121
|
+
actionName: cap.name,
|
|
122
|
+
origin: "action_rule_effect",
|
|
123
|
+
description: rule.description
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
for (const rule of surface.rules) if (rule.effect.type === "emit_event") push(String(rule.effect.event), {
|
|
127
|
+
surfaceId: surface.id,
|
|
128
|
+
surfaceName: surface.name,
|
|
129
|
+
origin: "surface_rule_effect",
|
|
130
|
+
description: rule.description
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
const entries = [];
|
|
134
|
+
for (const [name, emissions] of byName) entries.push({
|
|
135
|
+
name,
|
|
136
|
+
group: groupOf(name),
|
|
137
|
+
emissions
|
|
138
|
+
});
|
|
139
|
+
entries.sort((a, b) => {
|
|
140
|
+
if (a.group !== b.group) return a.group.localeCompare(b.group);
|
|
141
|
+
return String(a.name).localeCompare(String(b.name));
|
|
142
|
+
});
|
|
143
|
+
return entries;
|
|
144
|
+
};
|
|
145
|
+
var groupEventCatalog = (entries) => {
|
|
146
|
+
const map = /* @__PURE__ */ new Map();
|
|
147
|
+
for (const entry of entries) {
|
|
148
|
+
let list = map.get(entry.group);
|
|
149
|
+
if (!list) {
|
|
150
|
+
list = [];
|
|
151
|
+
map.set(entry.group, list);
|
|
152
|
+
}
|
|
153
|
+
list.push(entry);
|
|
154
|
+
}
|
|
155
|
+
return Array.from(map.entries()).map(([group, events]) => ({
|
|
156
|
+
group,
|
|
157
|
+
events
|
|
158
|
+
})).sort((a, b) => a.group.localeCompare(b.group));
|
|
159
|
+
};
|
|
160
|
+
//#endregion
|
|
161
|
+
//#region src/features/behavior-model/domain/services/TransitionCatalog.ts
|
|
162
|
+
/**
|
|
163
|
+
* Walk every surface and collect every authored transition between two
|
|
164
|
+
* surfaces, regardless of where it lives in the model:
|
|
165
|
+
* - `surface.transitions` (declared navigation hints)
|
|
166
|
+
* - action default effects of type `transition_surface`
|
|
167
|
+
* - action rule effects of type `transition_surface`
|
|
168
|
+
* - surface-level rule effects of type `transition_surface`
|
|
169
|
+
*
|
|
170
|
+
* Edges with the same (from, to) pair collapse into one entry whose
|
|
171
|
+
* `sources` lists every contribution. Output is sorted by source surface
|
|
172
|
+
* order (matches the feature editor's surface list), then by target surface name.
|
|
173
|
+
*/
|
|
174
|
+
var buildTransitionCatalog = (feature) => {
|
|
175
|
+
const surfaceById = /* @__PURE__ */ new Map();
|
|
176
|
+
feature.surfaces.forEach((s, index) => {
|
|
177
|
+
surfaceById.set(s.id, {
|
|
178
|
+
name: s.name,
|
|
179
|
+
index
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
const byEdge = /* @__PURE__ */ new Map();
|
|
183
|
+
const targetExists = (id) => id !== void 0 && surfaceById.has(id);
|
|
184
|
+
const push = (fromId, toId, source) => {
|
|
185
|
+
if (!targetExists(toId)) return;
|
|
186
|
+
const key = `${fromId}__${toId}`;
|
|
187
|
+
let acc = byEdge.get(key);
|
|
188
|
+
if (!acc) {
|
|
189
|
+
acc = {
|
|
190
|
+
sources: [],
|
|
191
|
+
fromIndex: surfaceById.get(fromId)?.index ?? 0
|
|
192
|
+
};
|
|
193
|
+
byEdge.set(key, acc);
|
|
194
|
+
}
|
|
195
|
+
acc.sources.push(source);
|
|
196
|
+
};
|
|
197
|
+
for (const surface of feature.surfaces) {
|
|
198
|
+
const fromId = surface.id;
|
|
199
|
+
const fromName = surface.name;
|
|
200
|
+
for (const transition of surface.transitions) push(fromId, transition.target, {
|
|
201
|
+
surfaceId: fromId,
|
|
202
|
+
surfaceName: fromName,
|
|
203
|
+
origin: "declared",
|
|
204
|
+
description: transition.label ?? transition.description
|
|
205
|
+
});
|
|
206
|
+
for (const cap of surface.actions) {
|
|
207
|
+
for (const effect of cap.effects) if (effect.type === "transition_surface") push(fromId, effect.target, {
|
|
208
|
+
surfaceId: fromId,
|
|
209
|
+
surfaceName: fromName,
|
|
210
|
+
actionId: cap.id,
|
|
211
|
+
actionName: cap.name,
|
|
212
|
+
origin: "action_effect",
|
|
213
|
+
description: effect.description
|
|
214
|
+
});
|
|
215
|
+
for (const rule of cap.rules) if (rule.effect.type === "transition_surface") push(fromId, rule.effect.target, {
|
|
216
|
+
surfaceId: fromId,
|
|
217
|
+
surfaceName: fromName,
|
|
218
|
+
actionId: cap.id,
|
|
219
|
+
actionName: cap.name,
|
|
220
|
+
origin: "action_rule_effect",
|
|
221
|
+
description: rule.description
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
for (const rule of surface.rules) if (rule.effect.type === "transition_surface") push(fromId, rule.effect.target, {
|
|
225
|
+
surfaceId: fromId,
|
|
226
|
+
surfaceName: fromName,
|
|
227
|
+
origin: "surface_rule_effect",
|
|
228
|
+
description: rule.description
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
const entries = [];
|
|
232
|
+
for (const [key, acc] of byEdge) {
|
|
233
|
+
const [fromId, toId] = key.split("__");
|
|
234
|
+
const from = surfaceById.get(fromId);
|
|
235
|
+
const to = surfaceById.get(toId);
|
|
236
|
+
if (!from || !to) continue;
|
|
237
|
+
entries.push({
|
|
238
|
+
fromSurfaceId: fromId,
|
|
239
|
+
fromSurfaceName: from.name,
|
|
240
|
+
toSurfaceId: toId,
|
|
241
|
+
toSurfaceName: to.name,
|
|
242
|
+
sources: acc.sources
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
entries.sort((a, b) => {
|
|
246
|
+
const fa = surfaceById.get(a.fromSurfaceId)?.index ?? 0;
|
|
247
|
+
const fb = surfaceById.get(b.fromSurfaceId)?.index ?? 0;
|
|
248
|
+
if (fa !== fb) return fa - fb;
|
|
249
|
+
return (surfaceById.get(a.toSurfaceId)?.index ?? 0) - (surfaceById.get(b.toSurfaceId)?.index ?? 0);
|
|
250
|
+
});
|
|
251
|
+
return entries;
|
|
252
|
+
};
|
|
253
|
+
var groupTransitionCatalog = (entries) => {
|
|
254
|
+
const map = /* @__PURE__ */ new Map();
|
|
255
|
+
for (const entry of entries) {
|
|
256
|
+
let group = map.get(entry.fromSurfaceId);
|
|
257
|
+
if (!group) {
|
|
258
|
+
group = {
|
|
259
|
+
fromSurfaceId: entry.fromSurfaceId,
|
|
260
|
+
fromSurfaceName: entry.fromSurfaceName,
|
|
261
|
+
transitions: []
|
|
262
|
+
};
|
|
263
|
+
map.set(entry.fromSurfaceId, group);
|
|
264
|
+
}
|
|
265
|
+
group.transitions.push(entry);
|
|
266
|
+
}
|
|
267
|
+
return Array.from(map.values());
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
export { buildTransitionCatalog as a, buildEventCatalog as b, groupEventCatalog as c, groupTransitionCatalog as d, getEffectiveEntities as g };
|
|
271
|
+
//# sourceMappingURL=TransitionCatalog-B8zHs-2E.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransitionCatalog-B8zHs-2E.js","sources":["../../../.svelte-kit/adapter-node/chunks/TransitionCatalog.js"],"sourcesContent":["import { c as humanizeStatePath } from \"./browserContainer.js\";\n//#region src/features/behavior-model/domain/services/EffectiveEntities.ts\nvar capitalize = (s) => s.length === 0 ? s : s.charAt(0).toUpperCase() + s.slice(1);\nvar fieldNameFromPath = (path) => {\n\tconst segments = path.split(\".\");\n\tif (segments.length <= 1) return path;\n\treturn segments[segments.length - 1];\n};\n/**\n* Produce the list of all Entity entities visible in the feature. Every\n* state-path namespace, enriched with metadata from any matching authored\n* `Entity` record. Authored entries with no matching state paths still appear\n* (so the user doesn't lose explicit work).\n*/\nvar getEffectiveEntities = (feature) => {\n\tconst deduced = /* @__PURE__ */ new Map();\n\tfor (const surface of feature.surfaces) for (const def of surface.stateDefinitions) {\n\t\tconst namespace = def.path.split(\".\")[0] ?? def.path;\n\t\tlet acc = deduced.get(namespace);\n\t\tif (!acc) {\n\t\t\tacc = {\n\t\t\t\tfields: /* @__PURE__ */ new Map(),\n\t\t\t\tsurfaces: /* @__PURE__ */ new Set()\n\t\t\t};\n\t\t\tdeduced.set(namespace, acc);\n\t\t}\n\t\tif (!acc.fields.has(def.path)) acc.fields.set(def.path, {\n\t\t\tname: fieldNameFromPath(def.path),\n\t\t\tpath: def.path,\n\t\t\ttype: def.type,\n\t\t\tsource: \"deduced\"\n\t\t});\n\t\tacc.surfaces.add(surface.name);\n\t}\n\tconst declaredByNamespace = /* @__PURE__ */ new Map();\n\tfor (const data of feature.entities) declaredByNamespace.set(data.namespace, data);\n\tconst namespaces = new Set([...deduced.keys(), ...declaredByNamespace.keys()]);\n\tconst results = [];\n\tfor (const namespace of namespaces) {\n\t\tconst declared = declaredByNamespace.get(namespace);\n\t\tconst acc = deduced.get(namespace);\n\t\tconst fieldByPath = /* @__PURE__ */ new Map();\n\t\tif (acc) for (const [path, f] of acc.fields) fieldByPath.set(path, f);\n\t\tif (declared) for (const f of declared.fields) {\n\t\t\tif (!f.path) continue;\n\t\t\tfieldByPath.set(String(f.path), {\n\t\t\t\tid: f.id,\n\t\t\t\tname: f.name,\n\t\t\t\tpath: f.path,\n\t\t\t\ttype: f.type,\n\t\t\t\tsource: \"declared\",\n\t\t\t\tfields: f.fields,\n\t\t\t\titems: f.items\n\t\t\t});\n\t\t}\n\t\tconst fields = Array.from(fieldByPath.values()).sort((a, b) => a.path.localeCompare(b.path));\n\t\tresults.push({\n\t\t\tid: declared?.id,\n\t\t\tname: capitalize(humanizeStatePath(namespace)),\n\t\t\tnamespace,\n\t\t\tdescription: declared?.description,\n\t\t\tresourceId: declared?.resourceId,\n\t\t\tfields,\n\t\t\tisMaterialized: declared !== void 0,\n\t\t\tusedBySurfaces: acc ? Array.from(acc.surfaces).sort() : []\n\t\t});\n\t}\n\tresults.sort((a, b) => a.namespace.localeCompare(b.namespace));\n\treturn results;\n};\n//#endregion\n//#region src/features/behavior-model/domain/services/EventCatalog.ts\nvar groupOf = (name) => {\n\tconst seg = name.split(\".\")[0];\n\treturn seg && seg.length > 0 ? seg : \"_root\";\n};\n/**\n* Walk the feature and collect every event emitted across:\n* - action.emittedEvents (intent-level declarations)\n* - action.effects (emit_event default effects)\n* - action.rules.effect (emit_event when a rule fires)\n* - surface.rules.effect (emit_event surface-level rules)\n*\n* Output is grouped by the event's namespace and sorted alphabetically. Each\n* unique event collapses every occurrence into a single entry with all its\n* emission sources, so the user sees \"order.placed (3 places)\" once instead\n* of three times.\n*/\nvar buildEventCatalog = (feature) => {\n\tconst byName = /* @__PURE__ */ new Map();\n\tconst push = (name, source) => {\n\t\tlet list = byName.get(name);\n\t\tif (!list) {\n\t\t\tlist = [];\n\t\t\tbyName.set(name, list);\n\t\t}\n\t\tlist.push(source);\n\t};\n\tfor (const surface of feature.surfaces) {\n\t\tfor (const cap of surface.actions) {\n\t\t\tfor (const evt of cap.emittedEvents) push(String(evt), {\n\t\t\t\tsurfaceId: surface.id,\n\t\t\t\tsurfaceName: surface.name,\n\t\t\t\tactionId: cap.id,\n\t\t\t\tactionName: cap.name,\n\t\t\t\torigin: \"action_default\"\n\t\t\t});\n\t\t\tfor (const effect of cap.effects) if (effect.type === \"emit_event\") push(String(effect.event), {\n\t\t\t\tsurfaceId: surface.id,\n\t\t\t\tsurfaceName: surface.name,\n\t\t\t\tactionId: cap.id,\n\t\t\t\tactionName: cap.name,\n\t\t\t\torigin: \"action_effect\",\n\t\t\t\tdescription: effect.description\n\t\t\t});\n\t\t\tfor (const rule of cap.rules) if (rule.effect.type === \"emit_event\") push(String(rule.effect.event), {\n\t\t\t\tsurfaceId: surface.id,\n\t\t\t\tsurfaceName: surface.name,\n\t\t\t\tactionId: cap.id,\n\t\t\t\tactionName: cap.name,\n\t\t\t\torigin: \"action_rule_effect\",\n\t\t\t\tdescription: rule.description\n\t\t\t});\n\t\t}\n\t\tfor (const rule of surface.rules) if (rule.effect.type === \"emit_event\") push(String(rule.effect.event), {\n\t\t\tsurfaceId: surface.id,\n\t\t\tsurfaceName: surface.name,\n\t\t\torigin: \"surface_rule_effect\",\n\t\t\tdescription: rule.description\n\t\t});\n\t}\n\tconst entries = [];\n\tfor (const [name, emissions] of byName) entries.push({\n\t\tname,\n\t\tgroup: groupOf(name),\n\t\temissions\n\t});\n\tentries.sort((a, b) => {\n\t\tif (a.group !== b.group) return a.group.localeCompare(b.group);\n\t\treturn String(a.name).localeCompare(String(b.name));\n\t});\n\treturn entries;\n};\nvar groupEventCatalog = (entries) => {\n\tconst map = /* @__PURE__ */ new Map();\n\tfor (const entry of entries) {\n\t\tlet list = map.get(entry.group);\n\t\tif (!list) {\n\t\t\tlist = [];\n\t\t\tmap.set(entry.group, list);\n\t\t}\n\t\tlist.push(entry);\n\t}\n\treturn Array.from(map.entries()).map(([group, events]) => ({\n\t\tgroup,\n\t\tevents\n\t})).sort((a, b) => a.group.localeCompare(b.group));\n};\n//#endregion\n//#region src/features/behavior-model/domain/services/TransitionCatalog.ts\n/**\n* Walk every surface and collect every authored transition between two\n* surfaces, regardless of where it lives in the model:\n* - `surface.transitions` (declared navigation hints)\n* - action default effects of type `transition_surface`\n* - action rule effects of type `transition_surface`\n* - surface-level rule effects of type `transition_surface`\n*\n* Edges with the same (from, to) pair collapse into one entry whose\n* `sources` lists every contribution. Output is sorted by source surface\n* order (matches the feature editor's surface list), then by target surface name.\n*/\nvar buildTransitionCatalog = (feature) => {\n\tconst surfaceById = /* @__PURE__ */ new Map();\n\tfeature.surfaces.forEach((s, index) => {\n\t\tsurfaceById.set(s.id, {\n\t\t\tname: s.name,\n\t\t\tindex\n\t\t});\n\t});\n\tconst byEdge = /* @__PURE__ */ new Map();\n\tconst targetExists = (id) => id !== void 0 && surfaceById.has(id);\n\tconst push = (fromId, toId, source) => {\n\t\tif (!targetExists(toId)) return;\n\t\tconst key = `${fromId}__${toId}`;\n\t\tlet acc = byEdge.get(key);\n\t\tif (!acc) {\n\t\t\tacc = {\n\t\t\t\tsources: [],\n\t\t\t\tfromIndex: surfaceById.get(fromId)?.index ?? 0\n\t\t\t};\n\t\t\tbyEdge.set(key, acc);\n\t\t}\n\t\tacc.sources.push(source);\n\t};\n\tfor (const surface of feature.surfaces) {\n\t\tconst fromId = surface.id;\n\t\tconst fromName = surface.name;\n\t\tfor (const transition of surface.transitions) push(fromId, transition.target, {\n\t\t\tsurfaceId: fromId,\n\t\t\tsurfaceName: fromName,\n\t\t\torigin: \"declared\",\n\t\t\tdescription: transition.label ?? transition.description\n\t\t});\n\t\tfor (const cap of surface.actions) {\n\t\t\tfor (const effect of cap.effects) if (effect.type === \"transition_surface\") push(fromId, effect.target, {\n\t\t\t\tsurfaceId: fromId,\n\t\t\t\tsurfaceName: fromName,\n\t\t\t\tactionId: cap.id,\n\t\t\t\tactionName: cap.name,\n\t\t\t\torigin: \"action_effect\",\n\t\t\t\tdescription: effect.description\n\t\t\t});\n\t\t\tfor (const rule of cap.rules) if (rule.effect.type === \"transition_surface\") push(fromId, rule.effect.target, {\n\t\t\t\tsurfaceId: fromId,\n\t\t\t\tsurfaceName: fromName,\n\t\t\t\tactionId: cap.id,\n\t\t\t\tactionName: cap.name,\n\t\t\t\torigin: \"action_rule_effect\",\n\t\t\t\tdescription: rule.description\n\t\t\t});\n\t\t}\n\t\tfor (const rule of surface.rules) if (rule.effect.type === \"transition_surface\") push(fromId, rule.effect.target, {\n\t\t\tsurfaceId: fromId,\n\t\t\tsurfaceName: fromName,\n\t\t\torigin: \"surface_rule_effect\",\n\t\t\tdescription: rule.description\n\t\t});\n\t}\n\tconst entries = [];\n\tfor (const [key, acc] of byEdge) {\n\t\tconst [fromId, toId] = key.split(\"__\");\n\t\tconst from = surfaceById.get(fromId);\n\t\tconst to = surfaceById.get(toId);\n\t\tif (!from || !to) continue;\n\t\tentries.push({\n\t\t\tfromSurfaceId: fromId,\n\t\t\tfromSurfaceName: from.name,\n\t\t\ttoSurfaceId: toId,\n\t\t\ttoSurfaceName: to.name,\n\t\t\tsources: acc.sources\n\t\t});\n\t}\n\tentries.sort((a, b) => {\n\t\tconst fa = surfaceById.get(a.fromSurfaceId)?.index ?? 0;\n\t\tconst fb = surfaceById.get(b.fromSurfaceId)?.index ?? 0;\n\t\tif (fa !== fb) return fa - fb;\n\t\treturn (surfaceById.get(a.toSurfaceId)?.index ?? 0) - (surfaceById.get(b.toSurfaceId)?.index ?? 0);\n\t});\n\treturn entries;\n};\nvar groupTransitionCatalog = (entries) => {\n\tconst map = /* @__PURE__ */ new Map();\n\tfor (const entry of entries) {\n\t\tlet group = map.get(entry.fromSurfaceId);\n\t\tif (!group) {\n\t\t\tgroup = {\n\t\t\t\tfromSurfaceId: entry.fromSurfaceId,\n\t\t\t\tfromSurfaceName: entry.fromSurfaceName,\n\t\t\t\ttransitions: []\n\t\t\t};\n\t\t\tmap.set(entry.fromSurfaceId, group);\n\t\t}\n\t\tgroup.transitions.push(entry);\n\t}\n\treturn Array.from(map.values());\n};\n//#endregion\nexport { getEffectiveEntities as a, groupEventCatalog as i, groupTransitionCatalog as n, buildEventCatalog as r, buildTransitionCatalog as t };\n"],"names":[],"mappings":";;AACA;AACA,IAAI,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;AACnF,IAAI,iBAAiB,GAAG,CAAC,IAAI,KAAK;AAClC,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC;AACjC,CAAC,IAAI,QAAQ,CAAC,MAAM,IAAI,CAAC,EAAE,OAAO,IAAI;AACtC,CAAC,OAAO,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;AACrC,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACG,IAAC,oBAAoB,GAAG,CAAC,OAAO,KAAK;AACxC,CAAC,MAAM,OAAO,mBAAmB,IAAI,GAAG,EAAE;AAC1C,CAAC,KAAK,MAAM,OAAO,IAAI,OAAO,CAAC,QAAQ,EAAE,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,gBAAgB,EAAE;AACrF,EAAE,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI;AACtD,EAAE,IAAI,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;AAClC,EAAE,IAAI,CAAC,GAAG,EAAE;AACZ,GAAG,GAAG,GAAG;AACT,IAAI,MAAM,kBAAkB,IAAI,GAAG,EAAE;AACrC,IAAI,Q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aAAa,CAAC,EAAE,KAAK,IAAI,CAAC;AACzD,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,KAAK,IAAI,CAAC;AACzD,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE;AAC/B,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,KAAK,IAAI,CAAC,KAAK,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC;AACpG,CAAC,CAAC,CAAC;AACH,CAAC,OAAO,OAAO;AACf;AACG,IAAC,sBAAsB,GAAG,CAAC,OAAO,KAAK;AAC1C,CAAC,MAAM,GAAG,mBAAmB,IAAI,GAAG,EAAE;AACtC,CAAC,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE;AAC9B,EAAE,IAAI,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,aAAa,CAAC;AAC1C,EAAE,IAAI,CAAC,KAAK,EAAE;AACd,GAAG,KAAK,GAAG;AACX,IAAI,aAAa,EAAE,KAAK,CAAC,aAAa;AACtC,IAAI,eAAe,EAAE,KAAK,CAAC,eAAe;AAC1C,IAAI,WAAW,EAAE;AACjB,IAAI;AACJ,GAAG,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC;AACtC,EAAE;AACF,EAAE,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;AAC/B,CAAC;AACD,CAAC,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;AAChC;;;;"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { h as attr_class,
|
|
2
|
-
import './
|
|
3
|
-
import
|
|
1
|
+
import { h as attr_class, g as attr, l as clsx$1, r as ensure_array_like, t as escape_html, q as derived, a6 as stringify, i as attr_style } from './index-server-7H0jzj0M.js';
|
|
2
|
+
import { p as public_env } from './shared-server-CCs2CV3b.js';
|
|
3
|
+
import './client-DeX3TC3s.js';
|
|
4
|
+
import { p as page } from './state-DBjl9lhV.js';
|
|
4
5
|
import { g as dialogStore } from './browserContainer-CNX7ANld.js';
|
|
5
|
-
import { b as builderModeStore, s as subscribeSyncEvents } from './builderModeStore.svelte-
|
|
6
|
+
import { b as builderModeStore, s as subscribeSyncEvents, r as resolveViewLink } from './builderModeStore.svelte-BpRIU_zP.js';
|
|
6
7
|
import { t as tourStore } from './tourStore.svelte-CYs4oLjF.js';
|
|
7
|
-
import { p as
|
|
8
|
+
import { p as parseThemeId } from './registry-DqAn_hVE.js';
|
|
8
9
|
import { i as identityStore } from './identityStore.svelte-IIvW2_3b.js';
|
|
9
|
-
import './internal-
|
|
10
|
+
import './internal-KYK0WpL7.js';
|
|
10
11
|
import './index-DBqjc0Yf.js';
|
|
11
12
|
import './TagPalette-CtMNYCmu.js';
|
|
12
13
|
import './FeatureValidator-B8qEjAUW.js';
|
|
@@ -295,6 +296,10 @@ function SyncToast($$renderer, $$props) {
|
|
|
295
296
|
if (cleaned.length === 0) cleaned.push(toast.entityId);
|
|
296
297
|
return cleaned;
|
|
297
298
|
}
|
|
299
|
+
function viewHref(toast) {
|
|
300
|
+
if (toast.op === "delete") return void 0;
|
|
301
|
+
return resolveViewLink(toast.kind, toast.entityId) ?? toast.href;
|
|
302
|
+
}
|
|
298
303
|
if (syncToastStore.toasts.length > 0) {
|
|
299
304
|
$$renderer.push("<!--[0-->");
|
|
300
305
|
$$renderer.push(`<div class="pointer-events-none fixed top-20 right-4 z-50 flex w-full max-w-md flex-col gap-2" role="status" aria-live="polite"><!--[-->`);
|
|
@@ -302,6 +307,7 @@ function SyncToast($$renderer, $$props) {
|
|
|
302
307
|
for (let $$index_1 = 0, $$length = each_array.length; $$index_1 < $$length; $$index_1++) {
|
|
303
308
|
let toast = each_array[$$index_1];
|
|
304
309
|
const crumbs = breadcrumb(toast);
|
|
310
|
+
const target = viewHref(toast);
|
|
305
311
|
$$renderer.push(`<div${attr_class(`pointer-events-auto flex items-start gap-3 rounded-lg border px-3 py-2 shadow-md shadow-slate-950/10 ${stringify(kindAccent(toast.kind))}`)}><div class="min-w-0 flex-1"><div class="flex flex-wrap items-center gap-x-1.5 gap-y-0.5 text-[10px] font-semibold uppercase tracking-wide"><span class="text-slate-500">MCP · ${escape_html(opLabel(toast))} ${escape_html(kindLabel(toast.kind))}</span> `);
|
|
306
312
|
if (toast.actingFor) {
|
|
307
313
|
$$renderer.push("<!--[0-->");
|
|
@@ -323,11 +329,11 @@ function SyncToast($$renderer, $$props) {
|
|
|
323
329
|
$$renderer.push(`<div class="mt-0.5 truncate text-[11px] text-slate-500">was “${escape_html(toast.previousName)}”</div>`);
|
|
324
330
|
} else $$renderer.push("<!--[-1-->");
|
|
325
331
|
$$renderer.push(`<!--]--></div> <div class="flex shrink-0 items-center gap-1">`);
|
|
326
|
-
if (
|
|
332
|
+
if (target) {
|
|
327
333
|
$$renderer.push("<!--[0-->");
|
|
328
|
-
$$renderer.push(`<a${attr("href",
|
|
334
|
+
$$renderer.push(`<a${attr("href", target)} class="rounded-md bg-white/70 px-2 py-1 text-xs font-medium text-slate-700 hover:bg-white hover:text-brand-800">View</a>`);
|
|
329
335
|
} else $$renderer.push("<!--[-1-->");
|
|
330
|
-
$$renderer.push(`<!--]--> <button type="button" class="rounded-md px-1.5 py-1 text-xs text-slate-500 hover:bg-white/70 hover:text-slate-900" aria-label="Dismiss"
|
|
336
|
+
$$renderer.push(`<!--]--> <button type="button" class="rounded-md px-1.5 py-1 text-xs text-slate-500 hover:bg-white/70 hover:text-slate-900" aria-label="Dismiss">×</button></div></div>`);
|
|
331
337
|
}
|
|
332
338
|
$$renderer.push(`<!--]--></div>`);
|
|
333
339
|
} else $$renderer.push("<!--[-1-->");
|
|
@@ -533,21 +539,64 @@ function TourOverlay($$renderer, $$props) {
|
|
|
533
539
|
});
|
|
534
540
|
}
|
|
535
541
|
//#endregion
|
|
542
|
+
//#region src/lib/theme/themeStore.svelte.ts
|
|
543
|
+
var STORAGE_KEY = "unspa.theme";
|
|
544
|
+
var ThemeStore = class {
|
|
545
|
+
/** The currently applied theme id. */
|
|
546
|
+
current = parseThemeId(public_env.PUBLIC_UNSPA_THEME);
|
|
547
|
+
initialized = false;
|
|
548
|
+
/**
|
|
549
|
+
* Hydrate from the `data-theme` attribute already on <html> (server default,
|
|
550
|
+
* possibly overridden by the inline head script from localStorage). Idempotent.
|
|
551
|
+
*/
|
|
552
|
+
init() {
|
|
553
|
+
if (this.initialized) return;
|
|
554
|
+
this.initialized = true;
|
|
555
|
+
if (typeof document === "undefined") return;
|
|
556
|
+
this.current = parseThemeId(document.documentElement.dataset.theme);
|
|
557
|
+
}
|
|
558
|
+
/** Apply a theme live: reactive state + the <html> attribute + localStorage. */
|
|
559
|
+
setTheme(next) {
|
|
560
|
+
const id = parseThemeId(next);
|
|
561
|
+
this.current = id;
|
|
562
|
+
if (typeof document !== "undefined") document.documentElement.dataset.theme = id;
|
|
563
|
+
if (typeof localStorage === "undefined") return;
|
|
564
|
+
if (id === "default") localStorage.removeItem(STORAGE_KEY);
|
|
565
|
+
else localStorage.setItem(STORAGE_KEY, id);
|
|
566
|
+
}
|
|
567
|
+
/** Convenience flag for the layout's chrome conditionals. */
|
|
568
|
+
get isLyriks() {
|
|
569
|
+
return this.current === "lyriks";
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
var themeStore = new ThemeStore();
|
|
573
|
+
//#endregion
|
|
536
574
|
//#region src/routes/+layout.svelte
|
|
537
575
|
function _layout($$renderer, $$props) {
|
|
538
576
|
$$renderer.component(($$renderer) => {
|
|
539
577
|
const initial = derived(() => identityStore.name.trim().charAt(0).toUpperCase());
|
|
540
578
|
let identityMenuOpen = false;
|
|
541
579
|
let settingsMenuOpen = false;
|
|
580
|
+
let themeMenuOpen = false;
|
|
542
581
|
let { children } = $$props;
|
|
543
582
|
const views = derived(enabledViews);
|
|
544
|
-
const showViewSwitcher = derived(() => views().length > 1);
|
|
583
|
+
const showViewSwitcher = derived(() => views().length > 1 && !themeStore.isLyriks);
|
|
545
584
|
const builderActive = derived(() => isEnabled("builder") && page.url.pathname.startsWith("/builder-mode"));
|
|
546
585
|
const mcpActive = derived(() => page.url.pathname.startsWith("/mcp"));
|
|
547
|
-
const
|
|
586
|
+
const wideContent = derived(() => page.url.pathname.startsWith("/features/"));
|
|
587
|
+
const lyriks = derived(() => themeStore.isLyriks);
|
|
588
|
+
const dark = derived(() => builderActive() || lyriks());
|
|
548
589
|
const builderProject = derived(() => builderActive() ? builderModeStore.selectedProject : null);
|
|
549
590
|
const builderSearch = derived(() => builderModeStore.search);
|
|
550
|
-
$$renderer.push(`<div
|
|
591
|
+
$$renderer.push(`<div${attr_class(`flex min-h-full flex-col text-ink ${lyriks() ? "bg-[linear-gradient(180deg,#e6ddfa_0%,#eeeafb_220px,#eeeafb_100%)]" : "bg-[linear-gradient(180deg,#f0fdfa_0%,#f8fafc_220px,#f8fafc_100%)]"}`)}><header${attr_class(`sticky top-0 z-30 border-b backdrop-blur transition-colors ${lyriks() ? "border-transparent bg-[linear-gradient(90deg,#6d28d9_0%,#a21caf_55%,#db2777_100%)]" : dark() ? "border-slate-800 bg-slate-950/90" : "border-slate-200 bg-white/95"}`)}><div${attr_class(`mx-auto flex h-16 items-center justify-between px-4 sm:px-6 ${wideContent() ? "max-w-400" : "max-w-7xl"}`)}><div class="flex min-w-0 items-center gap-3"><a href="/" class="flex shrink-0 items-center gap-2.5"><img${attr("src", lyriks() ? "/lyriks_logo.svg" : "/unspaghettit_logo.png")}${attr("alt", lyriks() ? "Lyriks" : "Unspaghettit")}${attr_class(clsx$1(lyriks() ? "h-9 w-9 shrink-0" : "h-12 w-auto"))}/> `);
|
|
592
|
+
if (lyriks()) {
|
|
593
|
+
$$renderer.push("<!--[0-->");
|
|
594
|
+
$$renderer.push(`<span class="hidden flex-col items-start leading-none sm:flex"><span${attr_class(`font-brand text-2xl font-bold tracking-tight ${dark() ? "text-white" : "text-slate-950"}`)}>Lyriks.io</span> <span${attr_class(`mt-1 pl-px text-[9px] font-semibold uppercase tracking-[0.18em] ${dark() ? "text-white/75" : "text-slate-500"}`)}>Community Edition</span></span>`);
|
|
595
|
+
} else {
|
|
596
|
+
$$renderer.push("<!--[-1-->");
|
|
597
|
+
$$renderer.push(`<span${attr_class(`relative hidden font-brand text-3xl font-semibold leading-none sm:inline-block ${dark() ? "text-white" : "text-slate-950"}`)}>Unspaghettit <span${attr_class(`font-grotesk absolute right-0 -bottom-2 text-[10px] font-medium tracking-wide ${dark() ? "text-white/70" : "text-slate-500"}`)}>by Lyriks.io</span></span>`);
|
|
598
|
+
}
|
|
599
|
+
$$renderer.push(`<!--]--></a> `);
|
|
551
600
|
if (showViewSwitcher()) {
|
|
552
601
|
$$renderer.push("<!--[0-->");
|
|
553
602
|
$$renderer.push(`<div role="group" aria-label="View mode"${attr_class(`flex shrink-0 items-center rounded-full border p-0.5 text-[11px] font-medium ${dark() ? "border-slate-700/70 bg-slate-800/60" : "border-slate-200 bg-slate-100"}`)}><!--[-->`);
|
|
@@ -574,9 +623,11 @@ function _layout($$renderer, $$props) {
|
|
|
574
623
|
} else $$renderer.push("<!--[-1-->");
|
|
575
624
|
$$renderer.push(`<!--]--></div></div>`);
|
|
576
625
|
} else $$renderer.push("<!--[-1-->");
|
|
577
|
-
$$renderer.push(`<!--]--> <div class="flex shrink-0 items-center gap-1.5"><div class="relative"><button type="button" aria-haspopup="menu"${attr("aria-expanded",
|
|
626
|
+
$$renderer.push(`<!--]--> <div class="flex shrink-0 items-center gap-1.5"><div class="relative"><button type="button" aria-haspopup="menu"${attr("aria-expanded", themeMenuOpen)} aria-label="Switch dashboard theme" title="Switch theme"${attr_class(`grid h-9 w-9 place-items-center rounded-md transition ${lyriks() ? "bg-white/15 text-white hover:bg-white/25" : dark() ? "text-slate-300 hover:bg-white/10 hover:text-white" : "text-slate-600 hover:bg-slate-100 hover:text-slate-950"}`)}><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" class="h-5 w-5" aria-hidden="true"><circle cx="13.5" cy="6.5" r="2.5"></circle><circle cx="17.5" cy="10.5" r="2.5"></circle><circle cx="8.5" cy="7.5" r="2.5"></circle><path d="M12 21a9 9 0 1 1 0-18c4.97 0 9 3.58 9 8 0 2.5-2 3.5-3.5 3.5H15a2 2 0 0 0-1.4 3.42A1.5 1.5 0 0 1 12 21z"></path></svg></button> `);
|
|
627
|
+
$$renderer.push("<!--[-1-->");
|
|
628
|
+
$$renderer.push(`<!--]--></div> <div class="relative"><button type="button" aria-haspopup="menu"${attr("aria-expanded", settingsMenuOpen)} aria-label="Open app menu" title="App menu"${attr_class(`grid h-9 w-9 place-items-center rounded-md transition ${mcpActive() ? lyriks() ? "bg-white/30 text-white" : dark() ? "bg-slate-800 text-white" : "bg-slate-900 text-white" : lyriks() ? "bg-white/15 text-white hover:bg-white/25" : dark() ? "text-slate-400 hover:bg-slate-800 hover:text-white" : "text-slate-600 hover:bg-slate-100 hover:text-slate-950"}`)}><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" class="h-5 w-5" aria-hidden="true"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></button> `);
|
|
578
629
|
$$renderer.push("<!--[-1-->");
|
|
579
|
-
$$renderer.push(`<!--]--></div> <a href="/tutorial" aria-label="Help & tutorial" title="Help & tutorial"${attr_class(`grid h-9 w-9 place-items-center rounded-md transition ${dark() ? "text-slate-400 hover:bg-slate-800 hover:text-white" : "text-slate-600 hover:bg-slate-100 hover:text-slate-950"}`)}><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" class="h-5 w-5" aria-hidden="true"><circle cx="12" cy="12" r="9"></circle><path d="M9.4 9a2.6 2.6 0 0 1 5 1c0 1.6-2.4 2-2.4 3.4"></path><line x1="12" y1="17.5" x2="12.01" y2="17.5"></line></svg></a> <div class="relative flex items-center gap-1.5"><button type="button" aria-haspopup="menu"${attr("aria-expanded", identityMenuOpen)}${attr("aria-label", identityStore.name ? `Signed in as ${identityStore.name}. Open identity menu.` : "Set your display name")}${attr("title", identityStore.name ? `Signed in as ${identityStore.name}` : "Set a display name so your edits are recognisable in history")}${attr_class(`group relative flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-sm font-semibold shadow-sm shadow-slate-950/5 ring-1 ring-transparent transition focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 ${identityStore.name ? "bg-linear-to-br from-brand-600 to-brand-800 text-white hover:from-brand-500 hover:to-brand-700" : "border border-dashed border-slate-300 bg-white text-slate-400 hover:border-brand-400 hover:text-brand-700"}`)}>`);
|
|
630
|
+
$$renderer.push(`<!--]--></div> <a href="/tutorial" aria-label="Help & tutorial" title="Help & tutorial"${attr_class(`grid h-9 w-9 place-items-center rounded-md transition ${lyriks() ? "bg-white/15 text-white hover:bg-white/25" : dark() ? "text-slate-400 hover:bg-slate-800 hover:text-white" : "text-slate-600 hover:bg-slate-100 hover:text-slate-950"}`)}><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" class="h-5 w-5" aria-hidden="true"><circle cx="12" cy="12" r="9"></circle><path d="M9.4 9a2.6 2.6 0 0 1 5 1c0 1.6-2.4 2-2.4 3.4"></path><line x1="12" y1="17.5" x2="12.01" y2="17.5"></line></svg></a> <div class="relative flex items-center gap-1.5"><button type="button" aria-haspopup="menu"${attr("aria-expanded", identityMenuOpen)}${attr("aria-label", identityStore.name ? `Signed in as ${identityStore.name}. Open identity menu.` : "Set your display name")}${attr("title", identityStore.name ? `Signed in as ${identityStore.name}` : "Set a display name so your edits are recognisable in history")}${attr_class(`group relative flex h-10 w-10 shrink-0 items-center justify-center rounded-full text-sm font-semibold shadow-sm shadow-slate-950/5 ring-1 ring-transparent transition focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-300 ${identityStore.name ? "bg-linear-to-br from-brand-600 to-brand-800 text-white hover:from-brand-500 hover:to-brand-700" : "border border-dashed border-slate-300 bg-white text-slate-400 hover:border-brand-400 hover:text-brand-700"}`)}>`);
|
|
580
631
|
if (identityStore.name) {
|
|
581
632
|
$$renderer.push("<!--[0-->");
|
|
582
633
|
$$renderer.push(`<span aria-hidden="true">${escape_html(initial())}</span>`);
|
|
@@ -613,4 +664,4 @@ function _layout($$renderer, $$props) {
|
|
|
613
664
|
}
|
|
614
665
|
|
|
615
666
|
export { _layout as default };
|
|
616
|
-
//# sourceMappingURL=_layout.svelte-
|
|
667
|
+
//# sourceMappingURL=_layout.svelte-CLTmk0xU.js.map
|