visual-living-plan 0.1.0 → 2.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN.md +213 -0
- package/README.md +155 -28
- package/dist/AuthScreen.d.ts +9 -0
- package/dist/AuthScreen.js +7 -0
- package/dist/DesktopModeSwitch.d.ts +13 -0
- package/dist/DesktopModeSwitch.js +14 -0
- package/dist/OAuthMark.d.ts +6 -0
- package/dist/OAuthMark.js +8 -0
- package/dist/accountInitials.d.ts +5 -0
- package/dist/accountInitials.js +20 -0
- package/dist/accountLinking.d.ts +26 -0
- package/dist/accountLinking.js +46 -0
- package/dist/agentEvents.d.ts +31 -0
- package/dist/agentEvents.js +260 -0
- package/dist/agentPresence.d.ts +42 -0
- package/dist/agentPresence.js +69 -0
- package/dist/agentSkills.d.ts +35 -0
- package/dist/agentSkills.js +89 -0
- package/dist/agentStream.d.ts +35 -0
- package/dist/agentStream.js +133 -0
- package/dist/appearanceDom.d.ts +13 -0
- package/dist/appearanceDom.js +24 -0
- package/dist/appearanceSettings.d.ts +29 -0
- package/dist/appearanceSettings.js +293 -0
- package/dist/assets.d.ts +14 -0
- package/dist/assets.js +72 -0
- package/dist/authSearch.d.ts +11 -0
- package/dist/authSearch.js +30 -0
- package/dist/changelog.d.ts +11 -0
- package/dist/changelog.js +63 -0
- package/dist/changelogParse.d.ts +53 -0
- package/dist/changelogParse.js +226 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +1684 -0
- package/dist/cliLauncher.d.ts +40 -0
- package/dist/cliLauncher.js +170 -0
- package/dist/cliToken.d.ts +11 -0
- package/dist/cliToken.js +15 -0
- package/dist/client/.vite/manifest.json +1780 -0
- package/dist/client/assets/BarChart-DtV3dIq4.js +1 -0
- package/dist/client/assets/BlockEditor-BklSUBjk.js +168 -0
- package/dist/client/assets/BlockEditor-K5h6xc4_.css +1 -0
- package/dist/client/assets/CodeBlock-BbI08MlQ.js +1 -0
- package/dist/client/assets/CodeBlock-BxRMnldw.js +175 -0
- package/dist/client/assets/LineChart-CQYMEbD6.js +1 -0
- package/dist/client/assets/Mermaid-Ciu9eIoG.js +1 -0
- package/dist/client/assets/Mermaid-jPWLXX7e.js +1 -0
- package/dist/client/assets/Popover-DbE4vUPG.js +1 -0
- package/dist/client/assets/ReactFlowExecutionCanvas-BhVs-adc.js +7 -0
- package/dist/client/assets/ReactFlowExecutionCanvas-DLioOiRN.css +1 -0
- package/dist/client/assets/StatusIcon-C_-Lm9b4.js +1 -0
- package/dist/client/assets/Workflow-C92OpLyf.js +1 -0
- package/dist/client/assets/agentPresence-D8asHrTp.js +1 -0
- package/dist/client/assets/andromeeda-DW8vo71h.js +1 -0
- package/dist/client/assets/andromeeda-vGVdxbeo.js +1 -0
- package/dist/client/assets/arrow-up-CEVVOXD5.js +1 -0
- package/dist/client/assets/arrow-up-down-BSjnQK2I.js +1 -0
- package/dist/client/assets/aurora-x-CDeNXAV0.js +1 -0
- package/dist/client/assets/aurora-x-rMvKqtYI.js +1 -0
- package/dist/client/assets/ayu-dark-CwczpL8O.js +1 -0
- package/dist/client/assets/ayu-dark-DluEY0Gj.js +1 -0
- package/dist/client/assets/ayu-light-C3h-C4tm.js +1 -0
- package/dist/client/assets/ayu-light-DSh22xiD.js +1 -0
- package/dist/client/assets/ayu-mirage-Bqwy1Gya.js +1 -0
- package/dist/client/assets/ayu-mirage-JE6hAyHG.js +1 -0
- package/dist/client/assets/browserStore-BDGKYoJj.js +435 -0
- package/dist/client/assets/button-BI07wqbi.css +1 -0
- package/dist/client/assets/button-DJWAGApe.js +1 -0
- package/dist/client/assets/catppuccin-frappe-C9Q5zVZY.js +1 -0
- package/dist/client/assets/catppuccin-frappe-pyXErRRU.js +1 -0
- package/dist/client/assets/catppuccin-latte-BILSUICr.js +1 -0
- package/dist/client/assets/catppuccin-latte-CtsyrtPq.js +1 -0
- package/dist/client/assets/catppuccin-macchiato-Ck60ZZQE.js +1 -0
- package/dist/client/assets/catppuccin-macchiato-R8nAf1vR.js +1 -0
- package/dist/client/assets/catppuccin-mocha-C_2G67cS.js +1 -0
- package/dist/client/assets/catppuccin-mocha-DjuaAJKi.js +1 -0
- package/dist/client/assets/ccount-nzzEXTrh.js +1 -0
- package/dist/client/assets/chartRows-CNjjLsAH.js +2 -0
- package/dist/client/assets/circle-x-BLGxA3gi.js +1 -0
- package/dist/client/assets/client-BsE_buVT.js +9 -0
- package/dist/client/assets/constants-CmGPilXJ.js +1 -0
- package/dist/client/assets/dark-plus-CHgc6GYj.js +1 -0
- package/dist/client/assets/dark-plus-Cs2F2srj.js +1 -0
- package/dist/client/assets/default-5FplaXL4.js +7 -0
- package/dist/client/assets/diffsTheme-PJJTu2Rq.js +1 -0
- package/dist/client/assets/dracula-BHWKrbxM.js +1 -0
- package/dist/client/assets/dracula-Cf1PG3MT.js +1 -0
- package/dist/client/assets/dracula-soft-5eyTD99u.js +1 -0
- package/dist/client/assets/dracula-soft-DXuNm1Kq.js +1 -0
- package/dist/client/assets/editSource-DQfw4nRm.js +1 -0
- package/dist/client/assets/editSource-U5AoD-Wo.js +14 -0
- package/dist/client/assets/engine-CLTPZlti.js +1 -0
- package/dist/client/assets/engine-DUyaiAMV.js +2 -0
- package/dist/client/assets/everforest-dark-CjdfwUBe.js +1 -0
- package/dist/client/assets/everforest-dark-sB-x3p7T.js +1 -0
- package/dist/client/assets/everforest-light-CfVwwCBP.js +1 -0
- package/dist/client/assets/everforest-light-Df2xbC6M.js +1 -0
- package/dist/client/assets/forgetDocuments-CIUBitCs.js +1 -0
- package/dist/client/assets/formatCSSVariablePrefix-KRh9vnZf.js +1 -0
- package/dist/client/assets/github-dark-BL6HSl_n.js +1 -0
- package/dist/client/assets/github-dark-C-LZuMrd.js +1 -0
- package/dist/client/assets/github-dark-default-DXG-b-1a.js +1 -0
- package/dist/client/assets/github-dark-default-zacuWV-M.js +1 -0
- package/dist/client/assets/github-dark-dimmed-Bx1FflLF.js +1 -0
- package/dist/client/assets/github-dark-dimmed-Mc0P9idi.js +1 -0
- package/dist/client/assets/github-dark-high-contrast-B_tTalzw.js +1 -0
- package/dist/client/assets/github-dark-high-contrast-IMKX2AVF.js +1 -0
- package/dist/client/assets/github-light-EUqPIrTm.js +1 -0
- package/dist/client/assets/github-light-default-BXViO-2h.js +1 -0
- package/dist/client/assets/github-light-default-DVlCqP3X.js +1 -0
- package/dist/client/assets/github-light-high-contrast-B68TUdTA.js +1 -0
- package/dist/client/assets/github-light-high-contrast-Dj6zTyWR.js +1 -0
- package/dist/client/assets/github-light-mYhEBkPo.js +1 -0
- package/dist/client/assets/gruvbox-dark-hard-C820rvS2.js +1 -0
- package/dist/client/assets/gruvbox-dark-hard-QTgQQZn-.js +1 -0
- package/dist/client/assets/gruvbox-dark-medium-9d5YdCTx.js +1 -0
- package/dist/client/assets/gruvbox-dark-medium-BPjhmG05.js +1 -0
- package/dist/client/assets/gruvbox-dark-soft-MrdJrrXF.js +1 -0
- package/dist/client/assets/gruvbox-dark-soft-XCkqeBhR.js +1 -0
- package/dist/client/assets/gruvbox-light-hard--5-nXqNp.js +1 -0
- package/dist/client/assets/gruvbox-light-hard-BC_s9l72.js +1 -0
- package/dist/client/assets/gruvbox-light-medium-BAWPOn9u.js +1 -0
- package/dist/client/assets/gruvbox-light-medium-COA1PZW2.js +1 -0
- package/dist/client/assets/gruvbox-light-soft-BSMLrYjP.js +1 -0
- package/dist/client/assets/gruvbox-light-soft-CIJpzjAO.js +1 -0
- package/dist/client/assets/hastToHtml-Dj8rXue9.js +11 -0
- package/dist/client/assets/highlight-cB-PkhyE.js +1 -0
- package/dist/client/assets/highlights-LLBF1DTm.js +1 -0
- package/dist/client/assets/horizon-Ba2cwkSy.js +1 -0
- package/dist/client/assets/horizon-CE9ld1lL.js +1 -0
- package/dist/client/assets/horizon-bright-DSNQnXHK.js +1 -0
- package/dist/client/assets/horizon-bright-DaEDgBmR.js +1 -0
- package/dist/client/assets/houston-B6x0XVpU.js +1 -0
- package/dist/client/assets/houston-CsvMBhTu.js +1 -0
- package/dist/client/assets/jsx-runtime-DKj5X9O4.js +1 -0
- package/dist/client/assets/kanagawa-dragon-Bozd7klA.js +1 -0
- package/dist/client/assets/kanagawa-dragon-DhTFvBMT.js +1 -0
- package/dist/client/assets/kanagawa-lotus--m8sdOxn.js +1 -0
- package/dist/client/assets/kanagawa-lotus-BmuOG9ZW.js +1 -0
- package/dist/client/assets/kanagawa-wave-BML5mF2J.js +1 -0
- package/dist/client/assets/kanagawa-wave-D-tTv4k2.js +1 -0
- package/dist/client/assets/laserwave-C_8bwKvT.js +1 -0
- package/dist/client/assets/laserwave-HSLx0L75.js +1 -0
- package/dist/client/assets/lib-COgu-QLX.js +33 -0
- package/dist/client/assets/lib-CdRiGVUZ.js +1 -0
- package/dist/client/assets/light-plus-CUjWrTSi.js +1 -0
- package/dist/client/assets/light-plus-DVQuIRkW.js +1 -0
- package/dist/client/assets/loader-CjL04K29.js +1 -0
- package/dist/client/assets/main-BGMX_GnZ.js +2 -0
- package/dist/client/assets/main-BTko4EvJ.css +1 -0
- package/dist/client/assets/material-theme-Bm3Qr25_.js +1 -0
- package/dist/client/assets/material-theme-CnthUGfg.js +1 -0
- package/dist/client/assets/material-theme-darker-2IIEA8gg.js +1 -0
- package/dist/client/assets/material-theme-darker-DUi03Qre.js +1 -0
- package/dist/client/assets/material-theme-lighter-D2-qr5Vw.js +1 -0
- package/dist/client/assets/material-theme-lighter-uhdI0v04.js +1 -0
- package/dist/client/assets/material-theme-ocean-CHQ94UKr.js +1 -0
- package/dist/client/assets/material-theme-ocean-CWR-LogA.js +1 -0
- package/dist/client/assets/material-theme-palenight-B5W6OYN7.js +1 -0
- package/dist/client/assets/material-theme-palenight-Cnv8m1ra.js +1 -0
- package/dist/client/assets/mdxEntries-BNTMP8ct.css +1 -0
- package/dist/client/assets/mdxEntries-L-V7bB6i.js +1 -0
- package/dist/client/assets/mermaid-Bjhs-krb.js +1 -0
- package/dist/client/assets/mermaid-Di4j-zgD.js +146 -0
- package/dist/client/assets/min-dark-BSWPekZh.js +1 -0
- package/dist/client/assets/min-dark-EXoM-6Xo.js +1 -0
- package/dist/client/assets/min-light-DDpmG2fV.js +1 -0
- package/dist/client/assets/min-light-DVOTDhnA.js +1 -0
- package/dist/client/assets/monokai-BscAjiQZ.js +1 -0
- package/dist/client/assets/monokai-DkggTbGy.js +1 -0
- package/dist/client/assets/mountChrome-BVWpsDCy.js +122 -0
- package/dist/client/assets/mountChrome-DhTDH3YM.css +1 -0
- package/dist/client/assets/night-owl-Bdcs0PMi.js +1 -0
- package/dist/client/assets/night-owl-DhmEMT88.js +1 -0
- package/dist/client/assets/night-owl-light-RoU30LE0.js +1 -0
- package/dist/client/assets/night-owl-light-eJ-hLW7d.js +1 -0
- package/dist/client/assets/noShiki-DB8hQ_W3.js +1 -0
- package/dist/client/assets/noShiki-GTG3tT8x.js +1 -0
- package/dist/client/assets/nord-Cb4Vim4T.js +1 -0
- package/dist/client/assets/nord-u7hMircQ.js +1 -0
- package/dist/client/assets/offlineSync-Cv3FVIlJ.js +1 -0
- package/dist/client/assets/one-dark-pro-08PdtLzi.js +1 -0
- package/dist/client/assets/one-dark-pro-C6YyR8OD.js +1 -0
- package/dist/client/assets/one-light-D7Lr4KcI.js +1 -0
- package/dist/client/assets/one-light-DgvUEtgI.js +1 -0
- package/dist/client/assets/opfs-worker-DuTOCgWR.js +5919 -0
- package/dist/client/assets/pierre-dark-B2jZWvHG.js +1 -0
- package/dist/client/assets/pierre-dark-CpLgRqie.js +1 -0
- package/dist/client/assets/pierre-dark-protanopia-deuteranopia-B35FxJx-.js +1 -0
- package/dist/client/assets/pierre-dark-protanopia-deuteranopia-CebgQdRf.js +1 -0
- package/dist/client/assets/pierre-dark-soft-DdE7dyP3.js +1 -0
- package/dist/client/assets/pierre-dark-soft-kZQmAZld.js +1 -0
- package/dist/client/assets/pierre-dark-tritanopia-CXimiT7X.js +1 -0
- package/dist/client/assets/pierre-dark-tritanopia-CpjhbsIL.js +1 -0
- package/dist/client/assets/pierre-dark-vibrant-CpQYzh95.js +1 -0
- package/dist/client/assets/pierre-dark-vibrant-DzBsxHvQ.js +1 -0
- package/dist/client/assets/pierre-light-CoaEpmwp.js +1 -0
- package/dist/client/assets/pierre-light-Vf__O3ev.js +1 -0
- package/dist/client/assets/pierre-light-protanopia-deuteranopia-0fSaH845.js +1 -0
- package/dist/client/assets/pierre-light-protanopia-deuteranopia-BUtWcCQC.js +1 -0
- package/dist/client/assets/pierre-light-soft-C3QCXKvN.js +1 -0
- package/dist/client/assets/pierre-light-soft-lWLdNTOI.js +1 -0
- package/dist/client/assets/pierre-light-tritanopia-CEbqgOJL.js +1 -0
- package/dist/client/assets/pierre-light-tritanopia-CKLy6XvA.js +1 -0
- package/dist/client/assets/pierre-light-vibrant-D80Fkn33.js +1 -0
- package/dist/client/assets/pierre-light-vibrant-DDuTEIhH.js +1 -0
- package/dist/client/assets/planEditButton-CbWGczbi.js +45 -0
- package/dist/client/assets/planEvents-cuzv9ELr.js +1 -0
- package/dist/client/assets/planMdx-Db1ze_nN.js +110 -0
- package/dist/client/assets/plastic-B8mE6BxX.js +1 -0
- package/dist/client/assets/plastic-DQwYfKfQ.js +1 -0
- package/dist/client/assets/poimandres-DRFjx7u4.js +1 -0
- package/dist/client/assets/poimandres-DUFjrgxT.js +1 -0
- package/dist/client/assets/preload-helper-Dx0-lKy1.js +1 -0
- package/dist/client/assets/queryClient-Bs5tSUJh.js +1 -0
- package/dist/client/assets/react-dom-DpzJPrWF.js +1 -0
- package/dist/client/assets/rebaseDraft-B2--cj1c.js +19 -0
- package/dist/client/assets/red-BJvdDEUx.js +1 -0
- package/dist/client/assets/red-CYlAq2b0.js +1 -0
- package/dist/client/assets/register-hZEIk3A9.css +1 -0
- package/dist/client/assets/register-htm5s8o9.js +1 -0
- package/dist/client/assets/rolldown-runtime-Dd_uD5pT.js +1 -0
- package/dist/client/assets/rose-pine-BSqRqUae.js +1 -0
- package/dist/client/assets/rose-pine-aMsaMD1D.js +1 -0
- package/dist/client/assets/rose-pine-dawn-8PwUyIlP.js +1 -0
- package/dist/client/assets/rose-pine-dawn-U6TBE82u.js +1 -0
- package/dist/client/assets/rose-pine-moon-CAU7u1h4.js +1 -0
- package/dist/client/assets/rose-pine-moon-DO-qXg-I.js +1 -0
- package/dist/client/assets/routeEdges-B2z8v0di.js +24 -0
- package/dist/client/assets/selector-CDsXW7SO.css +1 -0
- package/dist/client/assets/selector-tlBGWtQl.js +1 -0
- package/dist/client/assets/settingsChrome-NGUDtEIp.js +1 -0
- package/dist/client/assets/shiki-BOXJeUHI.js +2 -0
- package/dist/client/assets/slack-dark-CMu0smFa.js +1 -0
- package/dist/client/assets/slack-dark-DnToyrRv.js +1 -0
- package/dist/client/assets/slack-ochin-B2OO5cIa.js +1 -0
- package/dist/client/assets/slack-ochin-BBne7cjw.js +1 -0
- package/dist/client/assets/snazzy-light-4G7pJPwS.js +1 -0
- package/dist/client/assets/snazzy-light-CV8HUEmk.js +1 -0
- package/dist/client/assets/solarized-dark-CmYmhSgI.js +1 -0
- package/dist/client/assets/solarized-dark-b97czJOk.js +1 -0
- package/dist/client/assets/solarized-light-CjLLwxRp.js +1 -0
- package/dist/client/assets/solarized-light-DFPxpIYQ.js +1 -0
- package/dist/client/assets/stampPlanParts-DVXYCykw.js +15 -0
- package/dist/client/assets/stampPlanParts-ctZzxWdw.css +1 -0
- package/dist/client/assets/stream-tokenizer-C3n8hi1h.js +4 -0
- package/dist/client/assets/synthwave-84-nFMaYfgc.js +1 -0
- package/dist/client/assets/synthwave-84-wQeDKbzQ.js +1 -0
- package/dist/client/assets/textChildren-ZDSs1dod.js +1 -0
- package/dist/client/assets/themes-CdTJhjZf.js +2 -0
- package/dist/client/assets/tokyo-night-D4ZgDiA7.js +1 -0
- package/dist/client/assets/tokyo-night-oM2G3aXe.js +1 -0
- package/dist/client/assets/triangle-alert-C9Sgr3jF.js +1 -0
- package/dist/client/assets/unwrapDefault-ByDmBtHB.js +1 -0
- package/dist/client/assets/utils-C9Glzetk.js +2 -0
- package/dist/client/assets/versionView-zkSROPw7.js +1 -0
- package/dist/client/assets/vesper-DdrHHSXu.js +1 -0
- package/dist/client/assets/vesper-sUHevyKv.js +1 -0
- package/dist/client/assets/vitesse-black-CfklMpOb.js +1 -0
- package/dist/client/assets/vitesse-black-fwtXNY1n.js +1 -0
- package/dist/client/assets/vitesse-dark-BZCL-v6S.js +1 -0
- package/dist/client/assets/vitesse-dark-CJkzwmKT.js +1 -0
- package/dist/client/assets/vitesse-light-BxMp8E1Y.js +1 -0
- package/dist/client/assets/vitesse-light-VbXTXTou.js +1 -0
- package/dist/client/assets/wa-sqlite-Ba70bhIr.wasm +0 -0
- package/dist/client/assets/warmPlans-CYFrLwcX.js +1 -0
- package/dist/client/assets/with-selector-HIcjK0_d.js +1 -0
- package/dist/client/assets/workflowSource-LMsRuqF_.js +3 -0
- package/dist/client/favicon.png +0 -0
- package/dist/client/icons/apple-touch-icon-180x180.png +0 -0
- package/dist/client/icons/favicon.ico +0 -0
- package/dist/client/icons/maskable-icon-192x192.png +0 -0
- package/dist/client/icons/maskable-icon-512x512.png +0 -0
- package/dist/client/icons/pwa-16x16.png +0 -0
- package/dist/client/icons/pwa-192x192.png +0 -0
- package/dist/client/icons/pwa-32x32.png +0 -0
- package/dist/client/icons/pwa-512x512.png +0 -0
- package/dist/client/icons/pwa-64x64.png +0 -0
- package/dist/clientLog.d.ts +5 -0
- package/dist/clientLog.js +64 -0
- package/dist/cloudClient.d.ts +38 -0
- package/dist/cloudClient.js +185 -0
- package/dist/cloudCommand.d.ts +23 -0
- package/dist/cloudCommand.js +159 -0
- package/dist/cloudFrontmatter.d.ts +4 -0
- package/dist/cloudFrontmatter.js +30 -0
- package/dist/cloudStore.d.ts +28 -0
- package/dist/cloudStore.js +70 -0
- package/dist/cloudWatch.d.ts +12 -0
- package/dist/cloudWatch.js +103 -0
- package/dist/commentReply.d.ts +25 -0
- package/dist/commentReply.js +17 -0
- package/dist/configHome.d.ts +34 -0
- package/dist/configHome.js +136 -0
- package/dist/dashboard.d.ts +67 -0
- package/dist/dashboard.js +86 -0
- package/dist/dashboardClientScript.d.ts +2 -0
- package/dist/dashboardClientScript.js +1006 -0
- package/dist/dashboardDocument.d.ts +13 -0
- package/dist/dashboardDocument.js +40 -0
- package/dist/dashboardFormat.d.ts +98 -0
- package/dist/dashboardFormat.js +199 -0
- package/dist/dashboardLoading.d.ts +19 -0
- package/dist/dashboardLoading.js +94 -0
- package/dist/dashboardOverview.d.ts +28 -0
- package/dist/dashboardOverview.js +333 -0
- package/dist/dashboardPage.d.ts +2 -0
- package/dist/dashboardPage.js +11 -0
- package/dist/dashboardParts.d.ts +4 -0
- package/dist/dashboardParts.js +367 -0
- package/dist/dashboardSearchView.d.ts +38 -0
- package/dist/dashboardSearchView.js +255 -0
- package/dist/desktopApp.d.ts +23 -0
- package/dist/desktopApp.js +110 -0
- package/dist/desktopBridge.d.ts +21 -0
- package/dist/desktopBridge.js +78 -0
- package/dist/desktopCommand.d.ts +61 -0
- package/dist/desktopCommand.js +172 -0
- package/dist/desktopConfig.d.ts +54 -0
- package/dist/desktopConfig.js +164 -0
- package/dist/desktopNotices.d.ts +105 -0
- package/dist/desktopNotices.js +427 -0
- package/dist/diff.d.ts +2 -0
- package/dist/diff.js +46 -0
- package/dist/diffsTheme.d.ts +51 -0
- package/dist/diffsTheme.js +86 -0
- package/dist/diffsThemeCatalog.d.ts +3 -0
- package/dist/diffsThemeCatalog.js +78 -0
- package/dist/elkRuntime.node.d.ts +7 -0
- package/dist/elkRuntime.node.js +63 -0
- package/dist/execution.d.ts +78 -0
- package/dist/execution.js +139 -0
- package/dist/expectedWorkflow.d.ts +11 -0
- package/dist/expectedWorkflow.js +99 -0
- package/dist/favicon.d.ts +4 -0
- package/dist/favicon.js +40 -0
- package/dist/favicon.png +0 -0
- package/dist/faviconBase64.d.ts +1 -0
- package/dist/faviconBase64.js +1 -0
- package/dist/fileVersion.d.ts +8 -0
- package/dist/fileVersion.js +20 -0
- package/dist/formatBytes.d.ts +2 -0
- package/dist/formatBytes.js +13 -0
- package/dist/gitStatus.d.ts +12 -0
- package/dist/gitStatus.js +88 -0
- package/dist/hostToolbar.d.ts +38 -0
- package/dist/hostToolbar.js +249 -0
- package/dist/http.d.ts +8 -0
- package/dist/http.js +38 -0
- package/dist/httpServer.d.ts +13 -0
- package/dist/httpServer.js +40 -0
- package/dist/icons/apple-touch-icon-180x180.png +0 -0
- package/dist/icons/favicon.ico +0 -0
- package/dist/icons/maskable-icon-192x192.png +0 -0
- package/dist/icons/maskable-icon-512x512.png +0 -0
- package/dist/icons/pwa-16x16.png +0 -0
- package/dist/icons/pwa-192x192.png +0 -0
- package/dist/icons/pwa-32x32.png +0 -0
- package/dist/icons/pwa-512x512.png +0 -0
- package/dist/icons/pwa-64x64.png +0 -0
- package/dist/lanAccess.d.ts +31 -0
- package/dist/lanAccess.js +110 -0
- package/dist/lanAddress.d.ts +24 -0
- package/dist/lanAddress.js +174 -0
- package/dist/lanCommand.d.ts +25 -0
- package/dist/lanCommand.js +159 -0
- package/dist/lanConfig.d.ts +40 -0
- package/dist/lanConfig.js +130 -0
- package/dist/lanFirewall.d.ts +17 -0
- package/dist/lanFirewall.js +221 -0
- package/dist/layoutGraph.d.ts +13 -0
- package/dist/layoutGraph.js +55 -0
- package/dist/localName.d.ts +9 -0
- package/dist/localName.js +28 -0
- package/dist/lockBanner.d.ts +2 -0
- package/dist/lockBanner.js +2 -0
- package/dist/mdnsPacket.d.ts +44 -0
- package/dist/mdnsPacket.js +384 -0
- package/dist/mdnsPublish.d.ts +12 -0
- package/dist/mdnsPublish.js +290 -0
- package/dist/offlineSync.d.ts +249 -0
- package/dist/offlineSync.js +477 -0
- package/dist/openUrl.d.ts +40 -0
- package/dist/openUrl.js +147 -0
- package/dist/openedPages.d.ts +14 -0
- package/dist/openedPages.js +48 -0
- package/dist/pageEditPull.d.ts +9 -0
- package/dist/pageEditPull.js +29 -0
- package/dist/pageRoutes.d.ts +3 -0
- package/dist/pageRoutes.js +34 -0
- package/dist/parse.d.ts +7 -0
- package/dist/parse.js +100 -0
- package/dist/pid.d.ts +2 -0
- package/dist/pid.js +13 -0
- package/dist/planArchive.d.ts +4 -0
- package/dist/planArchive.js +28 -0
- package/dist/planEntries.d.ts +12 -0
- package/dist/planEntries.js +117 -0
- package/dist/planHost.d.ts +31 -0
- package/dist/planHost.js +286 -0
- package/dist/planId.d.ts +2 -0
- package/dist/planId.js +6 -0
- package/dist/planMdx/blockEdit.d.ts +41 -0
- package/dist/planMdx/blockEdit.js +60 -0
- package/dist/planMdx/cellPart.d.ts +14 -0
- package/dist/planMdx/cellPart.js +26 -0
- package/dist/planMdx/compilePlanMdx.d.ts +3 -0
- package/dist/planMdx/compilePlanMdx.js +22 -0
- package/dist/planMdx/editSource.d.ts +39 -0
- package/dist/planMdx/editSource.js +327 -0
- package/dist/planMdx/frontmatter.d.ts +5 -0
- package/dist/planMdx/frontmatter.js +15 -0
- package/dist/planMdx/markdown.d.ts +6 -0
- package/dist/planMdx/markdown.js +470 -0
- package/dist/planMdx/outline.d.ts +8 -0
- package/dist/planMdx/outline.js +548 -0
- package/dist/planMdx/payload.d.ts +4 -0
- package/dist/planMdx/payload.js +18 -0
- package/dist/planMdx/rebaseDraft.d.ts +54 -0
- package/dist/planMdx/rebaseDraft.js +675 -0
- package/dist/planMdx/recmaPlanComponents.d.ts +18 -0
- package/dist/planMdx/recmaPlanComponents.js +52 -0
- package/dist/planMdx/remarkBlockRanges.d.ts +104 -0
- package/dist/planMdx/remarkBlockRanges.js +275 -0
- package/dist/planMdx/remarkCodeMeta.d.ts +16 -0
- package/dist/planMdx/remarkCodeMeta.js +25 -0
- package/dist/planMdx/remarkGfmTable.d.ts +5 -0
- package/dist/planMdx/remarkGfmTable.js +15 -0
- package/dist/planMdx/remarkGfmTaskList.d.ts +5 -0
- package/dist/planMdx/remarkGfmTaskList.js +15 -0
- package/dist/planMdx/remarkMermaid.d.ts +16 -0
- package/dist/planMdx/remarkMermaid.js +56 -0
- package/dist/planMdx/source.d.ts +11 -0
- package/dist/planMdx/source.js +131 -0
- package/dist/planMdx/titleEdit.d.ts +35 -0
- package/dist/planMdx/titleEdit.js +112 -0
- package/dist/planPage.css +2125 -0
- package/dist/planProgress.d.ts +17 -0
- package/dist/planProgress.js +78 -0
- package/dist/planReady.d.ts +8 -0
- package/dist/planReady.js +20 -0
- package/dist/planRefNavigation.d.ts +4 -0
- package/dist/planRefNavigation.js +8 -0
- package/dist/planRoutes.d.ts +12 -0
- package/dist/planRoutes.js +141 -0
- package/dist/planSearch.d.ts +166 -0
- package/dist/planSearch.js +462 -0
- package/dist/planSession.d.ts +130 -0
- package/dist/planSession.js +1182 -0
- package/dist/planSnapshots.d.ts +34 -0
- package/dist/planSnapshots.js +113 -0
- package/dist/planStatus.d.ts +26 -0
- package/dist/planStatus.js +46 -0
- package/dist/planStepHeading.d.ts +16 -0
- package/dist/planStepHeading.js +34 -0
- package/dist/planTarget.d.ts +16 -0
- package/dist/planTarget.js +92 -0
- package/dist/planToc.d.ts +24 -0
- package/dist/planToc.js +258 -0
- package/dist/planVersionMenu.d.ts +12 -0
- package/dist/planVersionMenu.js +23 -0
- package/dist/processRecord.d.ts +108 -0
- package/dist/processRecord.js +68 -0
- package/dist/processesPanel.d.ts +7 -0
- package/dist/processesPanel.js +636 -0
- package/dist/pwaIconFile.d.ts +2 -0
- package/dist/pwaIconFile.js +42 -0
- package/dist/pwaIcons.d.ts +28 -0
- package/dist/pwaIcons.js +46 -0
- package/dist/registerServiceWorker.d.ts +25 -0
- package/dist/registerServiceWorker.js +26 -0
- package/dist/registryClient.d.ts +94 -0
- package/dist/registryClient.js +490 -0
- package/dist/registryConstants.d.ts +9 -0
- package/dist/registryConstants.js +9 -0
- package/dist/registryLock.d.ts +19 -0
- package/dist/registryLock.js +48 -0
- package/dist/registryPage.d.ts +2 -0
- package/dist/registryPage.js +284 -0
- package/dist/registryService.d.ts +21 -0
- package/dist/registryService.js +562 -0
- package/dist/registryStore.d.ts +63 -0
- package/dist/registryStore.js +398 -0
- package/dist/releaseNotes.d.ts +35 -0
- package/dist/releaseNotes.js +62 -0
- package/dist/render.d.ts +50 -0
- package/dist/render.js +1506 -0
- package/dist/requestGuard.d.ts +21 -0
- package/dist/requestGuard.js +42 -0
- package/dist/reviewRound.d.ts +12 -0
- package/dist/reviewRound.js +19 -0
- package/dist/runFollow.d.ts +28 -0
- package/dist/runFollow.js +33 -0
- package/dist/searchMatch.d.ts +35 -0
- package/dist/searchMatch.js +270 -0
- package/dist/server.d.ts +24 -0
- package/dist/server.js +114 -0
- package/dist/serviceLog.d.ts +56 -0
- package/dist/serviceLog.js +481 -0
- package/dist/shellCache.d.ts +69 -0
- package/dist/shellCache.js +289 -0
- package/dist/shellWorker.js +322 -0
- package/dist/shellWorkerResponse.d.ts +4 -0
- package/dist/shellWorkerResponse.js +15 -0
- package/dist/startServer.d.ts +2 -0
- package/dist/startServer.js +2 -0
- package/dist/store/meta.d.ts +53 -0
- package/dist/store/meta.js +140 -0
- package/dist/store/migrate.d.ts +3 -0
- package/dist/store/migrate.js +408 -0
- package/dist/store/rows.d.ts +4 -0
- package/dist/store/rows.js +100 -0
- package/dist/store/schema.d.ts +5 -0
- package/dist/store/schema.js +5 -0
- package/dist/store/sqlite.d.ts +19 -0
- package/dist/store/sqlite.js +57 -0
- package/dist/store/tables.d.ts +1892 -0
- package/dist/store/tables.js +136 -0
- package/dist/theme.d.ts +174 -0
- package/dist/theme.js +444 -0
- package/dist/themeBootstrap.d.ts +2 -0
- package/dist/themeBootstrap.js +11 -0
- package/dist/tui/DashboardApp.d.ts +19 -0
- package/dist/tui/DashboardApp.js +237 -0
- package/dist/tui/PaletteProvider.d.ts +12 -0
- package/dist/tui/PaletteProvider.js +36 -0
- package/dist/tui/PlanActions.d.ts +7 -0
- package/dist/tui/PlanActions.js +9 -0
- package/dist/tui/PlanCard.d.ts +13 -0
- package/dist/tui/PlanCard.js +31 -0
- package/dist/tui/PlanRow.d.ts +13 -0
- package/dist/tui/PlanRow.js +31 -0
- package/dist/tui/PlanTable.d.ts +13 -0
- package/dist/tui/PlanTable.js +24 -0
- package/dist/tui/ProcessCard.d.ts +9 -0
- package/dist/tui/ProcessCard.js +24 -0
- package/dist/tui/ProcessList.d.ts +9 -0
- package/dist/tui/ProcessList.js +12 -0
- package/dist/tui/SegmentButton.d.ts +7 -0
- package/dist/tui/SegmentButton.js +18 -0
- package/dist/tui/StatCard.d.ts +6 -0
- package/dist/tui/StatCard.js +17 -0
- package/dist/tui/dashboardView.d.ts +45 -0
- package/dist/tui/dashboardView.js +192 -0
- package/dist/tui/openExternal.d.ts +2 -0
- package/dist/tui/openExternal.js +5 -0
- package/dist/tui/palette.d.ts +27 -0
- package/dist/tui/palette.js +66 -0
- package/dist/tui/planColumns.d.ts +38 -0
- package/dist/tui/planColumns.js +14 -0
- package/dist/tui/readDashboard.d.ts +3 -0
- package/dist/tui/readDashboard.js +15 -0
- package/dist/tui/readProcesses.d.ts +3 -0
- package/dist/tui/readProcesses.js +23 -0
- package/dist/tui/registryView.d.ts +11 -0
- package/dist/tui/registryView.js +56 -0
- package/dist/tui/runTui.d.ts +21 -0
- package/dist/tui/runTui.js +86 -0
- package/dist/tui/systemTheme.d.ts +28 -0
- package/dist/tui/systemTheme.js +141 -0
- package/dist/types.d.ts +191 -0
- package/dist/types.js +0 -0
- package/dist/webManifest.d.ts +39 -0
- package/dist/webManifest.js +48 -0
- package/dist/workflow.d.ts +8 -0
- package/dist/workflow.js +42 -0
- package/dist/workflowLayoutShared.d.ts +25 -0
- package/dist/workflowLayoutShared.js +33 -0
- package/dist/workflowSource.d.ts +31 -0
- package/dist/workflowSource.js +90 -0
- package/docs/changelogs/changelog-2026-10-27.md +203 -0
- package/docs/changelogs/changelog-2026-10-28.md +181 -0
- package/docs/changelogs/changelog-2026-10-29.md +349 -0
- package/docs/changelogs/changelog-2026-10-30.md +303 -0
- package/docs/changelogs/changelog-2026-10-31.md +129 -0
- package/docs/changelogs/changelog-2026-11-01.md +155 -0
- package/docs/changelogs/changelog-2026-11-02.md +195 -0
- package/docs/changelogs/changelog-2026-11-03.md +209 -0
- package/docs/changelogs/changelog-2026-11-04.md +243 -0
- package/docs/changelogs/changelog-2026-11-05.md +172 -0
- package/docs/changelogs/changelog-2026-11-06.md +123 -0
- package/docs/changelogs/changelog-2026-11-07.md +138 -0
- package/docs/changelogs/changelog-2026-11-08.md +47 -0
- package/docs/changelogs/changelog-2026-11-10.md +219 -0
- package/docs/changelogs/changelog-2026-11-11.md +205 -0
- package/docs/changelogs/changelog-2026-11-12.md +44 -0
- package/docs/changelogs/changelog-2026-11-13.md +48 -0
- package/docs/changelogs/changelog-2026-11-14.md +116 -0
- package/docs/changelogs/changelog-2026-11-15.md +31 -0
- package/docs/changelogs/changelog-2026-11-16.md +41 -0
- package/docs/changelogs/changelog-2026-11-17.md +25 -0
- package/docs/changelogs/changelog-2026-11-18.md +71 -0
- package/docs/changelogs/changelog-2026-11-19.md +19 -0
- package/examples/cloud-showcase.plan.md +181 -0
- package/examples/component-showcase.plan.md +378 -0
- package/examples/component-tour.plan.md +168 -0
- package/examples/data-table.plan.md +917 -0
- package/examples/execution-graph.json +15 -5
- package/examples/form-controls.plan.md +51 -0
- package/examples/live-plan.config.json +5 -0
- package/examples/rate-limit.plan.md +110 -78
- package/examples/submission-delivery-runbook.md +122 -0
- package/examples/submission-delivery.plan.md +107 -0
- package/examples/tables.plan.md +61 -0
- package/package.json +86 -15
- package/skills/live-plan/SKILL.md +381 -0
- package/skills/live-plan/primitives.md +738 -0
- package/skills/living-plan/SKILL.md +0 -71
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { AgentStreamRefused, readAgentEvents } from './agentEvents';
|
|
2
|
+
/** A line that has shown it pings, then goes this long without a word, is treated as dead. */
|
|
3
|
+
export const STREAM_STALE_MS = 70_000;
|
|
4
|
+
const STALE_CHECK_MS = 5_000;
|
|
5
|
+
const MAX_RETRY_DELAY_MS = 30_000;
|
|
6
|
+
/** Quick retry after a stream that worked closes. Most closes are the service restarting. */
|
|
7
|
+
const RECONNECT_AFTER_CLOSE_MS = 1_000;
|
|
8
|
+
/** A stream that never connected in this process fails after this many tries, so a wrong URL still fails fast. */
|
|
9
|
+
export const FIRST_CONNECT_TRIES = 4;
|
|
10
|
+
/** Failed tries in a row before `revive` is asked to bring the service back. */
|
|
11
|
+
const REVIVE_AFTER_FAILURES = 2;
|
|
12
|
+
/** Wait before try `attempt` (0 based): 1s, 2s, 4s, up to 30s, with a little spread so clients do not reconnect in step. */
|
|
13
|
+
export function retryDelay(attempt, random = Math.random) {
|
|
14
|
+
const base = Math.min(MAX_RETRY_DELAY_MS, 1_000 * 2 ** Math.max(0, attempt));
|
|
15
|
+
return Math.round(base * (0.8 + random() * 0.4));
|
|
16
|
+
}
|
|
17
|
+
function errorText(error) {
|
|
18
|
+
if (error instanceof Error)
|
|
19
|
+
return error.message || error.name;
|
|
20
|
+
return String(error);
|
|
21
|
+
}
|
|
22
|
+
function pause(ms, signal) {
|
|
23
|
+
return new Promise((resolve) => {
|
|
24
|
+
if (signal.aborted) {
|
|
25
|
+
resolve();
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const timer = setTimeout(done, ms);
|
|
29
|
+
function done() {
|
|
30
|
+
clearTimeout(timer);
|
|
31
|
+
signal.removeEventListener('abort', done);
|
|
32
|
+
resolve();
|
|
33
|
+
}
|
|
34
|
+
signal.addEventListener('abort', done);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Read a plan's agent stream until `signal` aborts.
|
|
39
|
+
*
|
|
40
|
+
* A closed stream, a service restart, a crash, or a network change is retried with a growing wait.
|
|
41
|
+
* Every connect starts with a `hello` that carries the submissions still pending on the server, so a
|
|
42
|
+
* gap loses nothing. `ping` frames are swallowed here and only keep the line alive.
|
|
43
|
+
*
|
|
44
|
+
* It throws only for a refusal that a retry does not change (`AgentStreamRefused`), or when the stream
|
|
45
|
+
* never connected in this process after `FIRST_CONNECT_TRIES` tries.
|
|
46
|
+
*/
|
|
47
|
+
export async function followAgentEvents(planUrl, token, onEvent, signal, notices = {}) {
|
|
48
|
+
let connected = false;
|
|
49
|
+
let failures = 0;
|
|
50
|
+
let outage = false;
|
|
51
|
+
let revived = false;
|
|
52
|
+
while (!signal.aborted) {
|
|
53
|
+
const line = new AbortController();
|
|
54
|
+
const stopLine = () => line.abort();
|
|
55
|
+
signal.addEventListener('abort', stopLine, { once: true });
|
|
56
|
+
let heard = false;
|
|
57
|
+
let pings = false;
|
|
58
|
+
let stale = false;
|
|
59
|
+
let lastHeard = Date.now();
|
|
60
|
+
const watchdog = setInterval(() => {
|
|
61
|
+
if (!pings || Date.now() - lastHeard <= STREAM_STALE_MS)
|
|
62
|
+
return;
|
|
63
|
+
stale = true;
|
|
64
|
+
line.abort();
|
|
65
|
+
}, STALE_CHECK_MS);
|
|
66
|
+
let reason = 'The plan service closed the stream.';
|
|
67
|
+
let refusal = null;
|
|
68
|
+
try {
|
|
69
|
+
await readAgentEvents(planUrl, token.current, (event) => {
|
|
70
|
+
lastHeard = Date.now();
|
|
71
|
+
if (event.event === 'ping') {
|
|
72
|
+
pings = true;
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (event.event === 'hello') {
|
|
76
|
+
heard = true;
|
|
77
|
+
connected = true;
|
|
78
|
+
failures = 0;
|
|
79
|
+
revived = false;
|
|
80
|
+
if (outage) {
|
|
81
|
+
outage = false;
|
|
82
|
+
notices.restored?.();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
onEvent(event);
|
|
86
|
+
}, line.signal);
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
if (error instanceof AgentStreamRefused)
|
|
90
|
+
refusal = error;
|
|
91
|
+
else
|
|
92
|
+
reason = errorText(error);
|
|
93
|
+
}
|
|
94
|
+
finally {
|
|
95
|
+
clearInterval(watchdog);
|
|
96
|
+
signal.removeEventListener('abort', stopLine);
|
|
97
|
+
}
|
|
98
|
+
if (signal.aborted)
|
|
99
|
+
return;
|
|
100
|
+
if (stale)
|
|
101
|
+
reason = 'No word from the plan service for over a minute.';
|
|
102
|
+
if (refusal) {
|
|
103
|
+
if (refusal.status === 401 && notices.retoken) {
|
|
104
|
+
const next = await notices.retoken().catch(() => undefined);
|
|
105
|
+
if (next && next !== token.current) {
|
|
106
|
+
token.current = next;
|
|
107
|
+
continue;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
throw refusal;
|
|
111
|
+
}
|
|
112
|
+
if (heard) {
|
|
113
|
+
// The line worked and then closed. Try again soon; a failure from here on counts as an outage.
|
|
114
|
+
await pause(RECONNECT_AFTER_CLOSE_MS, signal);
|
|
115
|
+
continue;
|
|
116
|
+
}
|
|
117
|
+
failures += 1;
|
|
118
|
+
if (!connected && failures >= FIRST_CONNECT_TRIES)
|
|
119
|
+
throw new Error(reason);
|
|
120
|
+
if (failures >= REVIVE_AFTER_FAILURES && !revived && notices.revive) {
|
|
121
|
+
revived = true;
|
|
122
|
+
await notices.revive().catch(() => undefined);
|
|
123
|
+
if (signal.aborted)
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const delay = retryDelay(failures - 1);
|
|
127
|
+
if (!outage) {
|
|
128
|
+
outage = true;
|
|
129
|
+
notices.lost?.(reason, delay, connected);
|
|
130
|
+
}
|
|
131
|
+
await pause(delay, signal);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type Appearance = {
|
|
2
|
+
accent: string;
|
|
3
|
+
pageWidth: string;
|
|
4
|
+
diffsTheme: string;
|
|
5
|
+
wrapCode: boolean;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Put appearance settings on the page: the root data attributes the styles read and the body layout class.
|
|
9
|
+
* Returns whether anything changed. With `notify`, a change is announced as `living-plan-theme` so code blocks and the canvas follow.
|
|
10
|
+
*/
|
|
11
|
+
export declare function applyAppearance(appearance: Appearance, options?: {
|
|
12
|
+
notify?: boolean;
|
|
13
|
+
}): boolean;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Put appearance settings on the page: the root data attributes the styles read and the body layout class.
|
|
3
|
+
* Returns whether anything changed. With `notify`, a change is announced as `living-plan-theme` so code blocks and the canvas follow.
|
|
4
|
+
*/
|
|
5
|
+
export function applyAppearance(appearance, options = {}) {
|
|
6
|
+
if (typeof document === 'undefined')
|
|
7
|
+
return false;
|
|
8
|
+
const root = document.documentElement;
|
|
9
|
+
const wrapCode = appearance.wrapCode ? 'true' : 'false';
|
|
10
|
+
const changed = root.dataset.accent !== appearance.accent ||
|
|
11
|
+
root.dataset.layout !== appearance.pageWidth ||
|
|
12
|
+
root.dataset.diffsTheme !== appearance.diffsTheme ||
|
|
13
|
+
root.dataset.wrapCode !== wrapCode;
|
|
14
|
+
root.dataset.accent = appearance.accent;
|
|
15
|
+
root.dataset.layout = appearance.pageWidth;
|
|
16
|
+
root.dataset.diffsTheme = appearance.diffsTheme;
|
|
17
|
+
root.dataset.wrapCode = wrapCode;
|
|
18
|
+
document.body.classList.remove('layout-default', 'layout-wide', 'layout-full');
|
|
19
|
+
document.body.classList.add(`layout-${appearance.pageWidth}`);
|
|
20
|
+
if (changed && options.notify) {
|
|
21
|
+
window.dispatchEvent(new CustomEvent('living-plan-theme', { detail: { ...appearance } }));
|
|
22
|
+
}
|
|
23
|
+
return changed;
|
|
24
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type AppearancePreset = {
|
|
2
|
+
label: string;
|
|
3
|
+
accent: string;
|
|
4
|
+
};
|
|
5
|
+
export type AppearanceWidth = {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
};
|
|
9
|
+
export type AppearanceSettingsInput = {
|
|
10
|
+
accent: string;
|
|
11
|
+
pageWidth: string;
|
|
12
|
+
diffsTheme: string;
|
|
13
|
+
wrapCode: boolean;
|
|
14
|
+
presets: AppearancePreset[];
|
|
15
|
+
widths: AppearanceWidth[];
|
|
16
|
+
/** Replaces the accent explanation. The plan page uses the theme-file sentence. */
|
|
17
|
+
accentCopy?: string;
|
|
18
|
+
/** Trusted HTML for the line under each control. */
|
|
19
|
+
accentNote: string;
|
|
20
|
+
widthNote: string;
|
|
21
|
+
wrapNote: string;
|
|
22
|
+
diffsNote: string;
|
|
23
|
+
};
|
|
24
|
+
/** Appearance controls from the plan Settings tab. Local and cloud both render this. */
|
|
25
|
+
export declare function appearanceSettingsHtml(input: AppearanceSettingsInput): string;
|
|
26
|
+
/** Saves the shared appearance controls. The plan page keeps its own live theme script. */
|
|
27
|
+
export declare function appearanceSettingsScript(endpoint: string): string;
|
|
28
|
+
/** Document tokens and cards for the cloud settings page. Matches the plan Settings tab. */
|
|
29
|
+
export declare const settingsDocumentCss = "\n:root {\n color-scheme: light;\n --brand-blue: #2563eb;\n --brand-blue-deep: #0094fc;\n --brand-blue-200: #dbeafe;\n --canvas: #ffffff;\n --surface: #f5f5f5;\n --hairline: #e9e9e9;\n --hairline-strong: #d4d4d8;\n --hairline-strong-hover: #a1a1aa;\n --ink: #181e25;\n --charcoal: #34393f;\n --steel: #666666;\n --primary: #171717;\n --primary-hover: #242424;\n --on-primary: #ffffff;\n --paper: var(--canvas);\n --line: var(--hairline);\n --muted: var(--steel);\n --accent: var(--brand-blue-deep);\n --radius: 16px;\n --space-sm: 12px;\n --space-md: 16px;\n --space-xl: 24px;\n --space-xxl: 32px;\n --space-section: 64px;\n --font-display: \"DM Sans\", Inter, \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n --font-mono: \"JetBrains Mono\", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n --ease-out: cubic-bezier(0.23, 1, 0.32, 1);\n --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);\n --chip-bg: var(--surface);\n --tabs-bg: var(--surface);\n --control-solid: var(--canvas);\n --tab-active-bg: var(--primary);\n --tab-active-fg: var(--on-primary);\n --accent-soft: var(--brand-blue-200);\n --accent-hover-border: var(--brand-blue);\n --code-inline-bg: var(--brand-blue-200);\n --focus: var(--brand-blue-deep);\n}\n@media (prefers-color-scheme: dark) {\n :root {\n color-scheme: dark;\n --canvas: #171717;\n --surface: #1c1c1c;\n --hairline: #2c2c2c;\n --hairline-strong: #4a4a4a;\n --hairline-strong-hover: #666666;\n --ink: #ededed;\n --charcoal: #ededed;\n --steel: #949494;\n --primary: #ffffff;\n --primary-hover: #f5f5f5;\n --on-primary: #171717;\n --accent: #0094fc;\n --accent-soft: rgba(147, 197, 253, 0.14);\n --accent-hover-border: #0094fc;\n --code-inline-bg: rgba(147, 197, 253, 0.16);\n }\n}\n* { box-sizing: border-box; }\nbody {\n margin: 0;\n background: var(--canvas);\n color: var(--charcoal);\n font-family: var(--font-display);\n font-size: 16px;\n line-height: 1.5;\n}\nmain.settings-page {\n width: min(720px, calc(100% - var(--space-xxl) * 2));\n margin: var(--space-xxl) auto var(--space-section);\n}\nbody.layout-wide main.settings-page { width: min(1120px, calc(100% - var(--space-xxl) * 2)); }\nbody.layout-full main.settings-page { width: calc(100% - var(--space-xxl) * 2); }\n.settings-back {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n height: 36px;\n margin: 0 0 var(--space-md);\n padding: 0 16px;\n border: 1px solid var(--hairline-strong);\n border-radius: 9999px;\n background: transparent;\n color: var(--ink);\n font: inherit;\n font-size: 14px;\n font-weight: 600;\n line-height: 1.4;\n cursor: pointer;\n}\n.settings-back svg { width: 16px; height: 16px; display: block; flex: none; }\n.settings-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }\n.settings-back { transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease, border-color 150ms ease; }\n.settings-back:active { transform: scale(0.97); }\n@media (prefers-reduced-motion: reduce) {\n .settings-back { transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease; }\n .settings-back:active { transform: none; }\n}\n.kicker {\n margin: 0 0 var(--space-sm);\n letter-spacing: 0.08em;\n text-transform: uppercase;\n font-size: 12px;\n font-weight: 600;\n color: var(--accent);\n}\nh1 {\n margin: 0 0 var(--space-md);\n color: var(--ink);\n font-size: 24px;\n font-weight: 600;\n line-height: 1.3;\n}\n.nav { display: flex; gap: var(--space-sm); align-items: center; flex-wrap: wrap; margin: 0 0 var(--space-md); }\n.nav a { color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; }\n.nav a[aria-current=\"page\"] { text-decoration: underline; }\n.nav button.secondary,\n.nav .plan-btn-secondary {\n padding: 8px 12px;\n border: 1px solid var(--hairline-strong);\n border-radius: 9999px;\n background: transparent;\n color: var(--ink);\n font: inherit;\n font-size: 14px;\n font-weight: 600;\n line-height: 1.4;\n cursor: pointer;\n}\n.block {\n background: var(--surface);\n border: 1px solid var(--hairline);\n border-radius: var(--radius);\n padding: var(--space-md);\n box-shadow: none;\n}\n";
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { DEFAULT_DIFFS_THEME, normalizeDiffsTheme } from './diffsTheme';
|
|
2
|
+
function escapeHtml(value) {
|
|
3
|
+
return value.replaceAll('&', '&').replaceAll('<', '<').replaceAll('>', '>').replaceAll('"', '"');
|
|
4
|
+
}
|
|
5
|
+
/** Appearance controls from the plan Settings tab. Local and cloud both render this. */
|
|
6
|
+
export function appearanceSettingsHtml(input) {
|
|
7
|
+
const swatches = input.presets
|
|
8
|
+
.map((preset) => {
|
|
9
|
+
const selected = preset.accent === input.accent;
|
|
10
|
+
return `<button
|
|
11
|
+
type="button"
|
|
12
|
+
class="theme-swatch"
|
|
13
|
+
style="--swatch:${escapeHtml(preset.accent)}"
|
|
14
|
+
data-accent-swatch="${escapeHtml(preset.accent)}"
|
|
15
|
+
aria-label="${escapeHtml(preset.label)} accent"
|
|
16
|
+
aria-checked="${selected ? 'true' : 'false'}"
|
|
17
|
+
title="${escapeHtml(preset.label)}"
|
|
18
|
+
>${escapeHtml(preset.label)}</button>`;
|
|
19
|
+
})
|
|
20
|
+
.join('');
|
|
21
|
+
const widthChoices = input.widths
|
|
22
|
+
.map((option) => {
|
|
23
|
+
const selected = option.id === input.pageWidth;
|
|
24
|
+
return `<button type="button" class="width-choice" role="radio" data-page-width="${escapeHtml(option.id)}" aria-checked="${selected ? 'true' : 'false'}">${escapeHtml(option.label)}</button>`;
|
|
25
|
+
})
|
|
26
|
+
.join('');
|
|
27
|
+
const diffsThemeId = normalizeDiffsTheme(input.diffsTheme || DEFAULT_DIFFS_THEME);
|
|
28
|
+
const wrapCode = input.wrapCode === true;
|
|
29
|
+
return ` <section class="block settings-section" data-section>
|
|
30
|
+
<h3>Accent color</h3>
|
|
31
|
+
<p class="settings-copy">${escapeHtml(input.accentCopy ?? 'Pick one of eight presets tuned for light and dark mode, or set a custom hex. Changes save to the theme config and update the page live.')}</p>
|
|
32
|
+
<div class="settings-preview">
|
|
33
|
+
<span class="chip"><span class="live-dot"></span> Preview</span>
|
|
34
|
+
<span class="chip">Accent <strong id="theme-accent-hex">${escapeHtml(input.accent)}</strong></span>
|
|
35
|
+
</div>
|
|
36
|
+
<div class="theme-swatches" role="radiogroup" aria-label="Accent presets">
|
|
37
|
+
${swatches}
|
|
38
|
+
</div>
|
|
39
|
+
<label class="theme-custom">
|
|
40
|
+
<span>Custom</span>
|
|
41
|
+
<input id="theme-accent-picker" type="color" value="${escapeHtml(input.accent)}" aria-label="Custom accent color" />
|
|
42
|
+
<code id="theme-accent-custom-hex">${escapeHtml(input.accent)}</code>
|
|
43
|
+
</label>
|
|
44
|
+
<p class="settings-meta">${input.accentNote}</p>
|
|
45
|
+
</section>
|
|
46
|
+
<section class="block settings-section" data-section>
|
|
47
|
+
<h3>Page width</h3>
|
|
48
|
+
<p class="settings-copy">Choose the document column. Default, wide, and full apply to Plan, Workflow, and Settings. Full uses the available width.</p>
|
|
49
|
+
<div class="width-choices" role="radiogroup" aria-label="Page width">
|
|
50
|
+
${widthChoices}
|
|
51
|
+
</div>
|
|
52
|
+
<p class="settings-meta">${input.widthNote}</p>
|
|
53
|
+
</section>
|
|
54
|
+
<section class="block settings-section" data-section>
|
|
55
|
+
<div class="code-wrap-setting">
|
|
56
|
+
<div class="code-wrap-copy">
|
|
57
|
+
<h3 id="code-wrap-label">Wrap text in code</h3>
|
|
58
|
+
<p class="settings-copy">Long lines wrap inside code blocks, in light and dark. Turn this off to scroll sideways.</p>
|
|
59
|
+
</div>
|
|
60
|
+
<button
|
|
61
|
+
type="button"
|
|
62
|
+
class="plan-switch"
|
|
63
|
+
data-size="default"
|
|
64
|
+
data-code-wrap
|
|
65
|
+
role="switch"
|
|
66
|
+
aria-checked="${wrapCode ? 'true' : 'false'}"
|
|
67
|
+
aria-labelledby="code-wrap-label"
|
|
68
|
+
>
|
|
69
|
+
<span class="plan-switch-thumb"${wrapCode ? ' data-checked=""' : ''}></span>
|
|
70
|
+
</button>
|
|
71
|
+
</div>
|
|
72
|
+
<p class="settings-meta">${input.wrapNote}</p>
|
|
73
|
+
<h3>Syntax theme</h3>
|
|
74
|
+
<p class="settings-copy">Choose the theme for code blocks and diffs in each color mode. Only the chosen themes load.</p>
|
|
75
|
+
<div class="diffs-theme-picker-host" data-diffs-theme-picker data-value="${escapeHtml(diffsThemeId)}">
|
|
76
|
+
<div class="diffs-theme-picker" aria-hidden="true"><div class="diffs-theme-list"></div></div>
|
|
77
|
+
</div>
|
|
78
|
+
<p class="settings-meta" style="margin-top:0.85rem">${input.diffsNote}</p>
|
|
79
|
+
</section>`;
|
|
80
|
+
}
|
|
81
|
+
/** Saves the shared appearance controls. The plan page keeps its own live theme script. */
|
|
82
|
+
export function appearanceSettingsScript(endpoint) {
|
|
83
|
+
const target = JSON.stringify(endpoint);
|
|
84
|
+
return `<script>
|
|
85
|
+
if (!window.__livingPlanAppearanceBound) {
|
|
86
|
+
window.__livingPlanAppearanceBound = true
|
|
87
|
+
async function saveAppearance(partial) {
|
|
88
|
+
const error = document.querySelector('[data-settings-error]')
|
|
89
|
+
if (error) error.textContent = ''
|
|
90
|
+
const response = await fetch(${target}, {
|
|
91
|
+
method: 'PUT',
|
|
92
|
+
credentials: 'include',
|
|
93
|
+
headers: { 'content-type': 'application/json' },
|
|
94
|
+
body: JSON.stringify(partial),
|
|
95
|
+
})
|
|
96
|
+
if (!response.ok) {
|
|
97
|
+
if (error) error.textContent = 'Could not save those settings.'
|
|
98
|
+
return
|
|
99
|
+
}
|
|
100
|
+
location.reload()
|
|
101
|
+
}
|
|
102
|
+
document.querySelectorAll('[data-accent-swatch]').forEach((button) => {
|
|
103
|
+
button.addEventListener('click', () => {
|
|
104
|
+
const accent = button.getAttribute('data-accent-swatch')
|
|
105
|
+
if (!accent || accent === document.documentElement.dataset.accent) return
|
|
106
|
+
void saveAppearance({ accent })
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
const picker = document.getElementById('theme-accent-picker')
|
|
110
|
+
if (picker) {
|
|
111
|
+
picker.addEventListener('change', () => {
|
|
112
|
+
if (!('value' in picker)) return
|
|
113
|
+
void saveAppearance({ accent: picker.value })
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
document.querySelectorAll('[data-page-width]').forEach((button) => {
|
|
117
|
+
button.addEventListener('click', () => {
|
|
118
|
+
const pageWidth = button.getAttribute('data-page-width')
|
|
119
|
+
if (!pageWidth || pageWidth === document.documentElement.dataset.layout) return
|
|
120
|
+
void saveAppearance({ pageWidth })
|
|
121
|
+
})
|
|
122
|
+
})
|
|
123
|
+
document.querySelector('[data-code-wrap]')?.addEventListener('click', () => {
|
|
124
|
+
void saveAppearance({ wrapCode: document.documentElement.dataset.wrapCode !== 'true' })
|
|
125
|
+
})
|
|
126
|
+
document.querySelectorAll('[data-accordion]').forEach((accordion) => {
|
|
127
|
+
const trigger = accordion.querySelector('[data-accordion-trigger]')
|
|
128
|
+
const panel = accordion.querySelector('[data-accordion-panel]')
|
|
129
|
+
if (!trigger) return
|
|
130
|
+
const setOpen = (next) => {
|
|
131
|
+
accordion.setAttribute('data-open', next ? 'true' : 'false')
|
|
132
|
+
trigger.setAttribute('aria-expanded', next ? 'true' : 'false')
|
|
133
|
+
if (panel) {
|
|
134
|
+
if (next) panel.removeAttribute('inert')
|
|
135
|
+
else panel.setAttribute('inert', '')
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
trigger.addEventListener('click', () => {
|
|
139
|
+
setOpen(accordion.getAttribute('data-open') !== 'true')
|
|
140
|
+
})
|
|
141
|
+
})
|
|
142
|
+
document.addEventListener('click', (event) => {
|
|
143
|
+
const target = event.target
|
|
144
|
+
const button = target instanceof Element ? target.closest('[data-diffs-theme]') : null
|
|
145
|
+
if (!(button instanceof HTMLElement)) return
|
|
146
|
+
const diffsTheme = button.getAttribute('data-diffs-theme')
|
|
147
|
+
if (!diffsTheme || diffsTheme === document.documentElement.dataset.diffsTheme) return
|
|
148
|
+
void saveAppearance({ diffsTheme })
|
|
149
|
+
})
|
|
150
|
+
}
|
|
151
|
+
</script>`;
|
|
152
|
+
}
|
|
153
|
+
/** Document tokens and cards for the cloud settings page. Matches the plan Settings tab. */
|
|
154
|
+
export const settingsDocumentCss = `
|
|
155
|
+
:root {
|
|
156
|
+
color-scheme: light;
|
|
157
|
+
--brand-blue: #2563eb;
|
|
158
|
+
--brand-blue-deep: #0094fc;
|
|
159
|
+
--brand-blue-200: #dbeafe;
|
|
160
|
+
--canvas: #ffffff;
|
|
161
|
+
--surface: #f5f5f5;
|
|
162
|
+
--hairline: #e9e9e9;
|
|
163
|
+
--hairline-strong: #d4d4d8;
|
|
164
|
+
--hairline-strong-hover: #a1a1aa;
|
|
165
|
+
--ink: #181e25;
|
|
166
|
+
--charcoal: #34393f;
|
|
167
|
+
--steel: #666666;
|
|
168
|
+
--primary: #171717;
|
|
169
|
+
--primary-hover: #242424;
|
|
170
|
+
--on-primary: #ffffff;
|
|
171
|
+
--paper: var(--canvas);
|
|
172
|
+
--line: var(--hairline);
|
|
173
|
+
--muted: var(--steel);
|
|
174
|
+
--accent: var(--brand-blue-deep);
|
|
175
|
+
--radius: 16px;
|
|
176
|
+
--space-sm: 12px;
|
|
177
|
+
--space-md: 16px;
|
|
178
|
+
--space-xl: 24px;
|
|
179
|
+
--space-xxl: 32px;
|
|
180
|
+
--space-section: 64px;
|
|
181
|
+
--font-display: "DM Sans", Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
182
|
+
--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
183
|
+
--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
|
|
184
|
+
--ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
|
|
185
|
+
--chip-bg: var(--surface);
|
|
186
|
+
--tabs-bg: var(--surface);
|
|
187
|
+
--control-solid: var(--canvas);
|
|
188
|
+
--tab-active-bg: var(--primary);
|
|
189
|
+
--tab-active-fg: var(--on-primary);
|
|
190
|
+
--accent-soft: var(--brand-blue-200);
|
|
191
|
+
--accent-hover-border: var(--brand-blue);
|
|
192
|
+
--code-inline-bg: var(--brand-blue-200);
|
|
193
|
+
--focus: var(--brand-blue-deep);
|
|
194
|
+
}
|
|
195
|
+
@media (prefers-color-scheme: dark) {
|
|
196
|
+
:root {
|
|
197
|
+
color-scheme: dark;
|
|
198
|
+
--canvas: #171717;
|
|
199
|
+
--surface: #1c1c1c;
|
|
200
|
+
--hairline: #2c2c2c;
|
|
201
|
+
--hairline-strong: #4a4a4a;
|
|
202
|
+
--hairline-strong-hover: #666666;
|
|
203
|
+
--ink: #ededed;
|
|
204
|
+
--charcoal: #ededed;
|
|
205
|
+
--steel: #949494;
|
|
206
|
+
--primary: #ffffff;
|
|
207
|
+
--primary-hover: #f5f5f5;
|
|
208
|
+
--on-primary: #171717;
|
|
209
|
+
--accent: #0094fc;
|
|
210
|
+
--accent-soft: rgba(147, 197, 253, 0.14);
|
|
211
|
+
--accent-hover-border: #0094fc;
|
|
212
|
+
--code-inline-bg: rgba(147, 197, 253, 0.16);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
* { box-sizing: border-box; }
|
|
216
|
+
body {
|
|
217
|
+
margin: 0;
|
|
218
|
+
background: var(--canvas);
|
|
219
|
+
color: var(--charcoal);
|
|
220
|
+
font-family: var(--font-display);
|
|
221
|
+
font-size: 16px;
|
|
222
|
+
line-height: 1.5;
|
|
223
|
+
}
|
|
224
|
+
main.settings-page {
|
|
225
|
+
width: min(720px, calc(100% - var(--space-xxl) * 2));
|
|
226
|
+
margin: var(--space-xxl) auto var(--space-section);
|
|
227
|
+
}
|
|
228
|
+
body.layout-wide main.settings-page { width: min(1120px, calc(100% - var(--space-xxl) * 2)); }
|
|
229
|
+
body.layout-full main.settings-page { width: calc(100% - var(--space-xxl) * 2); }
|
|
230
|
+
.settings-back {
|
|
231
|
+
display: inline-flex;
|
|
232
|
+
align-items: center;
|
|
233
|
+
gap: 8px;
|
|
234
|
+
height: 36px;
|
|
235
|
+
margin: 0 0 var(--space-md);
|
|
236
|
+
padding: 0 16px;
|
|
237
|
+
border: 1px solid var(--hairline-strong);
|
|
238
|
+
border-radius: 9999px;
|
|
239
|
+
background: transparent;
|
|
240
|
+
color: var(--ink);
|
|
241
|
+
font: inherit;
|
|
242
|
+
font-size: 14px;
|
|
243
|
+
font-weight: 600;
|
|
244
|
+
line-height: 1.4;
|
|
245
|
+
cursor: pointer;
|
|
246
|
+
}
|
|
247
|
+
.settings-back svg { width: 16px; height: 16px; display: block; flex: none; }
|
|
248
|
+
.settings-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
249
|
+
.settings-back { transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease, border-color 150ms ease; }
|
|
250
|
+
.settings-back:active { transform: scale(0.97); }
|
|
251
|
+
@media (prefers-reduced-motion: reduce) {
|
|
252
|
+
.settings-back { transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease; }
|
|
253
|
+
.settings-back:active { transform: none; }
|
|
254
|
+
}
|
|
255
|
+
.kicker {
|
|
256
|
+
margin: 0 0 var(--space-sm);
|
|
257
|
+
letter-spacing: 0.08em;
|
|
258
|
+
text-transform: uppercase;
|
|
259
|
+
font-size: 12px;
|
|
260
|
+
font-weight: 600;
|
|
261
|
+
color: var(--accent);
|
|
262
|
+
}
|
|
263
|
+
h1 {
|
|
264
|
+
margin: 0 0 var(--space-md);
|
|
265
|
+
color: var(--ink);
|
|
266
|
+
font-size: 24px;
|
|
267
|
+
font-weight: 600;
|
|
268
|
+
line-height: 1.3;
|
|
269
|
+
}
|
|
270
|
+
.nav { display: flex; gap: var(--space-sm); align-items: center; flex-wrap: wrap; margin: 0 0 var(--space-md); }
|
|
271
|
+
.nav a { color: var(--accent); font-size: 14px; font-weight: 600; text-decoration: none; }
|
|
272
|
+
.nav a[aria-current="page"] { text-decoration: underline; }
|
|
273
|
+
.nav button.secondary,
|
|
274
|
+
.nav .plan-btn-secondary {
|
|
275
|
+
padding: 8px 12px;
|
|
276
|
+
border: 1px solid var(--hairline-strong);
|
|
277
|
+
border-radius: 9999px;
|
|
278
|
+
background: transparent;
|
|
279
|
+
color: var(--ink);
|
|
280
|
+
font: inherit;
|
|
281
|
+
font-size: 14px;
|
|
282
|
+
font-weight: 600;
|
|
283
|
+
line-height: 1.4;
|
|
284
|
+
cursor: pointer;
|
|
285
|
+
}
|
|
286
|
+
.block {
|
|
287
|
+
background: var(--surface);
|
|
288
|
+
border: 1px solid var(--hairline);
|
|
289
|
+
border-radius: var(--radius);
|
|
290
|
+
padding: var(--space-md);
|
|
291
|
+
box-shadow: none;
|
|
292
|
+
}
|
|
293
|
+
`;
|
package/dist/assets.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ClientAssets = {
|
|
2
|
+
jsHref: string;
|
|
3
|
+
cssHrefs: string[];
|
|
4
|
+
mermaidHref: string | null;
|
|
5
|
+
mermaidCssHrefs: string[];
|
|
6
|
+
highlightHref: string | null;
|
|
7
|
+
highlightCssHrefs: string[];
|
|
8
|
+
selectorHref: string | null;
|
|
9
|
+
selectorCssHrefs: string[];
|
|
10
|
+
planMdxHref: string | null;
|
|
11
|
+
planMdxCssHrefs: string[];
|
|
12
|
+
};
|
|
13
|
+
export declare function loadClientAssets(): Promise<ClientAssets | null>;
|
|
14
|
+
export declare function clientDistDir(): string;
|
package/dist/assets.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import { dirname, join } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
5
|
+
function manifestEntry(manifest, names) {
|
|
6
|
+
for (const name of names) {
|
|
7
|
+
const entry = manifest[name];
|
|
8
|
+
if (entry)
|
|
9
|
+
return entry;
|
|
10
|
+
}
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Stylesheets an entry needs: its own and those of every chunk it imports statically. The build
|
|
15
|
+
* moves CSS shared with a lazy chunk (such as the editor) into that shared chunk, so the entry's
|
|
16
|
+
* own `css` list alone can miss the plan's card styles.
|
|
17
|
+
*/
|
|
18
|
+
function cssOf(manifest, entry) {
|
|
19
|
+
const files = [];
|
|
20
|
+
const seen = new Set();
|
|
21
|
+
const visit = (item) => {
|
|
22
|
+
if (!item)
|
|
23
|
+
return;
|
|
24
|
+
for (const key of item.imports ?? []) {
|
|
25
|
+
if (seen.has(key))
|
|
26
|
+
continue;
|
|
27
|
+
seen.add(key);
|
|
28
|
+
visit(manifest[key]);
|
|
29
|
+
}
|
|
30
|
+
files.push(...(item.css ?? []));
|
|
31
|
+
};
|
|
32
|
+
visit(entry);
|
|
33
|
+
return [...new Set(files)].map((file) => `/client/${file}`);
|
|
34
|
+
}
|
|
35
|
+
export async function loadClientAssets() {
|
|
36
|
+
const manifestPath = join(here, '../dist/client/.vite/manifest.json');
|
|
37
|
+
try {
|
|
38
|
+
const raw = await readFile(manifestPath, 'utf8');
|
|
39
|
+
const manifest = JSON.parse(raw);
|
|
40
|
+
const entry = manifestEntry(manifest, ['client/main.tsx', 'main']) ??
|
|
41
|
+
Object.values(manifest).find((item) => item.isEntry &&
|
|
42
|
+
item.name !== 'mermaid' &&
|
|
43
|
+
item.name !== 'highlight' &&
|
|
44
|
+
item.name !== 'selector' &&
|
|
45
|
+
item.name !== 'settingsChrome' &&
|
|
46
|
+
item.name !== 'planMdx');
|
|
47
|
+
if (!entry)
|
|
48
|
+
return null;
|
|
49
|
+
const mermaid = manifestEntry(manifest, ['client/mermaid.ts', 'mermaid']);
|
|
50
|
+
const highlight = manifestEntry(manifest, ['client/highlight.tsx', 'highlight']);
|
|
51
|
+
const selector = manifestEntry(manifest, ['client/PlanSelector.tsx', 'selector']);
|
|
52
|
+
const planMdx = manifestEntry(manifest, ['client/planMdx.tsx', 'planMdx']);
|
|
53
|
+
return {
|
|
54
|
+
jsHref: `/client/${entry.file}`,
|
|
55
|
+
cssHrefs: cssOf(manifest, entry),
|
|
56
|
+
mermaidHref: mermaid ? `/client/${mermaid.file}` : null,
|
|
57
|
+
mermaidCssHrefs: cssOf(manifest, mermaid),
|
|
58
|
+
highlightHref: highlight ? `/client/${highlight.file}` : null,
|
|
59
|
+
highlightCssHrefs: cssOf(manifest, highlight),
|
|
60
|
+
selectorHref: selector ? `/client/${selector.file}` : null,
|
|
61
|
+
selectorCssHrefs: cssOf(manifest, selector),
|
|
62
|
+
planMdxHref: planMdx ? `/client/${planMdx.file}` : null,
|
|
63
|
+
planMdxCssHrefs: cssOf(manifest, planMdx),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
catch {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
export function clientDistDir() {
|
|
71
|
+
return join(here, '../dist/client');
|
|
72
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type AuthSearch = {
|
|
2
|
+
next?: string;
|
|
3
|
+
cli?: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
};
|
|
6
|
+
/** Keep an in-app return path, the CLI callback, and an OAuth error code. Drop anything else. */
|
|
7
|
+
export declare function authSearch(search: Record<string, unknown>): AuthSearch;
|
|
8
|
+
export declare function authPath(path: '/login' | '/signup', search: AuthSearch): string;
|
|
9
|
+
/** Where email sign-in and GitHub OAuth land after a session exists. */
|
|
10
|
+
export declare function authReturnPath(search: AuthSearch): string;
|
|
11
|
+
export declare function finishAuth(search: AuthSearch): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Keep an in-app return path, the CLI callback, and an OAuth error code. Drop anything else. */
|
|
2
|
+
export function authSearch(search) {
|
|
3
|
+
const next = typeof search.next === 'string' && search.next.startsWith('/') && !search.next.startsWith('//')
|
|
4
|
+
? search.next
|
|
5
|
+
: undefined;
|
|
6
|
+
const cli = typeof search.cli === 'string' && search.cli ? search.cli : undefined;
|
|
7
|
+
const error = typeof search.error === 'string' && search.error ? search.error : undefined;
|
|
8
|
+
return { ...(next ? { next } : {}), ...(cli ? { cli } : {}), ...(error ? { error } : {}) };
|
|
9
|
+
}
|
|
10
|
+
export function authPath(path, search) {
|
|
11
|
+
const params = new URLSearchParams();
|
|
12
|
+
if (search.next)
|
|
13
|
+
params.set('next', search.next);
|
|
14
|
+
if (search.cli)
|
|
15
|
+
params.set('cli', search.cli);
|
|
16
|
+
const query = params.toString();
|
|
17
|
+
return query ? `${path}?${query}` : path;
|
|
18
|
+
}
|
|
19
|
+
/** Where email sign-in and GitHub OAuth land after a session exists. */
|
|
20
|
+
export function authReturnPath(search) {
|
|
21
|
+
if (search.cli)
|
|
22
|
+
return `/api/auth/cli-session?redirect=${encodeURIComponent(search.cli)}`;
|
|
23
|
+
return search.next ?? '/dashboard';
|
|
24
|
+
}
|
|
25
|
+
export function finishAuth(search) {
|
|
26
|
+
if (typeof navigator !== 'undefined') {
|
|
27
|
+
navigator.serviceWorker?.controller?.postMessage({ type: 'forget-documents', all: true });
|
|
28
|
+
}
|
|
29
|
+
window.location.assign(authReturnPath(search));
|
|
30
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ChangelogRelease, type VersionNotes } from './changelogParse';
|
|
2
|
+
export * from './changelogParse';
|
|
3
|
+
/** Directory of changelog files next to a source or dist entry file. */
|
|
4
|
+
export declare function changelogDirectory(entryFile: string): string;
|
|
5
|
+
/** Newest `changelog-yyyy-mm-dd.md` by the date in the name. */
|
|
6
|
+
export declare function latestChangelogPath(directory: string): string | null;
|
|
7
|
+
export declare function loadLatestChangelog(entryFile: string): ChangelogRelease | null;
|
|
8
|
+
/** Every version section in every `changelog-yyyy-mm-dd.md` of a directory, newest file first. */
|
|
9
|
+
export declare function loadVersionNotes(directory: string): VersionNotes[];
|
|
10
|
+
/** `version` from the package.json next to a source or dist entry file. */
|
|
11
|
+
export declare function loadPackageVersion(entryFile: string): string | null;
|