@engenty/wizards-runtime 0.9.8 → 0.11.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.
Files changed (102) hide show
  1. package/apps/runtime/dist/app.js +34 -1
  2. package/apps/runtime/dist/auth/index.js +10 -1
  3. package/apps/runtime/dist/db/client.js +9 -1
  4. package/apps/runtime/dist/db/live-triggers.js +144 -0
  5. package/apps/runtime/dist/db/migrations/tenant/0022_sync.sql +247 -0
  6. package/apps/runtime/dist/db/migrations/tenant/0023_live_change.sql +167 -0
  7. package/apps/runtime/dist/db/migrations/tenant/0024_live_presence.sql +28 -0
  8. package/apps/runtime/dist/db/migrations/tenant/meta/0022_snapshot.json +3792 -0
  9. package/apps/runtime/dist/db/migrations/tenant/meta/0023_snapshot.json +3860 -0
  10. package/apps/runtime/dist/db/migrations/tenant/meta/0024_snapshot.json +3967 -0
  11. package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +21 -0
  12. package/apps/runtime/dist/db/schema.js +101 -0
  13. package/apps/runtime/dist/docs/user-guide/cloud-sync.md +85 -0
  14. package/apps/runtime/dist/docs/user-guide/data.md +4 -4
  15. package/apps/runtime/dist/docs/user-guide/meta.json +2 -0
  16. package/apps/runtime/dist/docs/user-guide/test-and-share.md +4 -14
  17. package/apps/runtime/dist/docs/user-guide/together.md +60 -0
  18. package/apps/runtime/dist/files/blobs.js +13 -0
  19. package/apps/runtime/dist/index.js +11 -1
  20. package/apps/runtime/dist/live/feed.js +34 -0
  21. package/apps/runtime/dist/live/hub.js +200 -0
  22. package/apps/runtime/dist/live/origin.js +53 -0
  23. package/apps/runtime/dist/live/views.js +146 -0
  24. package/apps/runtime/dist/mcp/handler.js +7 -1
  25. package/apps/runtime/dist/mcp/tools.js +51 -2
  26. package/apps/runtime/dist/plugins/jobs.js +7 -0
  27. package/apps/runtime/dist/routes/api.js +177 -1
  28. package/apps/runtime/dist/routes/live.js +85 -0
  29. package/apps/runtime/dist/routes/studio.js +109 -85
  30. package/apps/runtime/dist/services/cloud.js +39 -5
  31. package/apps/runtime/dist/services/presence.js +132 -0
  32. package/apps/runtime/dist/services/projects.js +11 -0
  33. package/apps/runtime/dist/services/space-data.js +33 -6
  34. package/apps/runtime/dist/sync/apply.js +43 -0
  35. package/apps/runtime/dist/sync/client.js +973 -0
  36. package/apps/runtime/dist/sync/hub.js +324 -0
  37. package/apps/runtime/dist/sync/log.js +74 -0
  38. package/apps/runtime/dist/sync/records.js +943 -0
  39. package/apps/runtime/dist/sync/state.js +17 -0
  40. package/apps/runtime/dist/texts.js +2 -0
  41. package/apps/web/dist/assets/AboutDialog-9VcgySrQ.js +1 -0
  42. package/apps/web/dist/assets/{ChangelogDialog-BpEIbAZ8.js → ChangelogDialog-BXvT2VMU.js} +1 -1
  43. package/apps/web/dist/assets/EditorPage-Cvzd0nah.js +4 -0
  44. package/apps/web/dist/assets/{FlowPreview-APXdRflR.js → FlowPreview-BV1NJ0rF.js} +1 -1
  45. package/apps/web/dist/assets/{Harness-BsGXMlLg.js → Harness-DYviBlHB.js} +2 -2
  46. package/apps/web/dist/assets/Marketplace-DTSg7_U7.js +2 -0
  47. package/apps/web/dist/assets/{NewWizardChannels-0JrRdUFd.js → NewWizardChannels-DiujJzOR.js} +1 -1
  48. package/apps/web/dist/assets/NewWizardPage-CngUh9g-.js +7 -0
  49. package/apps/web/dist/assets/OnboardingPage-DFKJnWtw.js +1 -0
  50. package/apps/web/dist/assets/PreviewPane-C0E9OLzB.js +9 -0
  51. package/apps/web/dist/assets/ProjectPage-CYDX-JYc.js +1 -0
  52. package/apps/web/dist/assets/PublicRunner-CkRO_Pw-.js +1 -0
  53. package/apps/web/dist/assets/{ReadOnly-BraZbEG_.js → ReadOnly-E-h9y_QO.js} +1 -1
  54. package/apps/web/dist/assets/SettingsPage-BMgP3aRV.js +2 -0
  55. package/apps/web/dist/assets/SetupPage-DBO_rzj7.js +1 -0
  56. package/apps/web/dist/assets/{SharePage-Dk7zC5Zo.js → SharePage-BvvmYB5N.js} +1 -1
  57. package/apps/web/dist/assets/changelog-zllICQ4q.js +1 -0
  58. package/apps/web/dist/assets/{coins-391m1e4_.js → coins-DQ91VJAB.js} +1 -1
  59. package/apps/web/dist/assets/index-Bjn557f1.js +20 -0
  60. package/apps/web/dist/assets/index-DN0VMwsS.css +1 -0
  61. package/apps/web/dist/assets/{phone-DvgrtyNO.js → phone-jIuRIwyg.js} +1 -1
  62. package/apps/web/dist/assets/{runners-4OBelIgF.js → runners-DloOxEbh.js} +1 -1
  63. package/apps/web/dist/assets/session-BpsCkDv6.js +2 -0
  64. package/apps/web/dist/assets/{settings-menu-xK9A-gaP.js → settings-menu-CoLUNJGQ.js} +1 -1
  65. package/apps/web/dist/assets/theme-2XjIQXH3.js +11 -0
  66. package/apps/web/dist/assets/{ui-BVQk2DtW.js → ui-BIWmkPh6.js} +3 -3
  67. package/apps/web/dist/assets/{upload-BgXbzG6C.js → upload-BcOvBWHS.js} +1 -1
  68. package/apps/web/dist/assets/{useMutation-DkwSQWoD.js → useMutation-CD7HmAxR.js} +1 -1
  69. package/apps/web/dist/assets/{volume-2-DHGoe3Cg.js → volume-2-D2To9w5D.js} +1 -1
  70. package/apps/web/dist/assets/{wrench-Cf_aE3O0.js → wrench-B98ubRvB.js} +1 -1
  71. package/apps/web/dist/index.html +8 -8
  72. package/apps/web/dist/mcp/flow.html +2 -2
  73. package/node_modules/@engenty/wizards-shared/dist/feature-flags.d.ts +12 -0
  74. package/node_modules/@engenty/wizards-shared/dist/feature-flags.js +12 -0
  75. package/node_modules/@engenty/wizards-shared/dist/live.d.ts +46 -0
  76. package/node_modules/@engenty/wizards-shared/dist/live.js +9 -0
  77. package/node_modules/@engenty/wizards-shared/dist/run.d.ts +7 -0
  78. package/node_modules/@engenty/wizards-shared/dist/run.js +14 -0
  79. package/node_modules/@engenty/wizards-shared/dist/sync-merge.d.ts +55 -0
  80. package/node_modules/@engenty/wizards-shared/dist/sync-merge.js +214 -0
  81. package/node_modules/@engenty/wizards-shared/dist/sync.d.ts +166 -0
  82. package/node_modules/@engenty/wizards-shared/dist/sync.js +40 -0
  83. package/node_modules/@engenty/wizards-shared/dist/text-merge.d.ts +14 -0
  84. package/node_modules/@engenty/wizards-shared/dist/text-merge.js +137 -0
  85. package/package.json +1 -1
  86. package/plugin/.claude-plugin/plugin.json +1 -1
  87. package/plugin/plugin.json +1 -1
  88. package/apps/web/dist/assets/AboutDialog-B_Ixp_Tb.js +0 -1
  89. package/apps/web/dist/assets/EditorPage-CKHY4hn4.js +0 -4
  90. package/apps/web/dist/assets/Marketplace-Dr-Qnb-F.js +0 -2
  91. package/apps/web/dist/assets/NewWizardPage-9igFL5O8.js +0 -7
  92. package/apps/web/dist/assets/OnboardingPage-BcK9FUnU.js +0 -1
  93. package/apps/web/dist/assets/PreviewPane-X4LBqA0D.js +0 -4
  94. package/apps/web/dist/assets/ProjectPage-CG0i-KhR.js +0 -1
  95. package/apps/web/dist/assets/PublicRunner-CZR1ziQ4.js +0 -1
  96. package/apps/web/dist/assets/SettingsPage-Bw4tdoV7.js +0 -2
  97. package/apps/web/dist/assets/SetupPage-CvkE2aKx.js +0 -1
  98. package/apps/web/dist/assets/changelog-DDXnAaHm.js +0 -1
  99. package/apps/web/dist/assets/index-BTUtot4r.js +0 -14
  100. package/apps/web/dist/assets/index-DcUL6teA.css +0 -1
  101. package/apps/web/dist/assets/session-DvnGHbDz.js +0 -2
  102. package/apps/web/dist/assets/theme-D3yDT4QT.js +0 -11
@@ -0,0 +1,17 @@
1
+ /**
2
+ * What other parts of the runtime ask about the two-way sync without loading it: whether it
3
+ * runs on this install, and how many spaces the organization in the cloud allows. Set by
4
+ * sync/client.ts.
5
+ */
6
+ let active = false;
7
+ let spaceLimit;
8
+ /** The two-way sync runs on this install: an account is linked and the switch is on. */
9
+ export const twoWayActive = () => active;
10
+ export function setTwoWayActive(on) {
11
+ active = on;
12
+ }
13
+ /** The organization's number of spaces, as the cloud last said; `undefined` while it has not. */
14
+ export const cloudSpaceLimit = () => spaceLimit;
15
+ export function setCloudSpaceLimit(limit) {
16
+ spaceLimit = limit;
17
+ }
@@ -84,6 +84,7 @@ const EN = {
84
84
  notSignedIn: "You’re not signed in.",
85
85
  accountSuspended: "This account is suspended.",
86
86
  tooLarge: "That is too large.",
87
+ tooManyStreams: "Too many studio windows are open. Close one, or reload in a moment.",
87
88
  tooManyTriesWait: "Too many tries. Wait a moment and try again.",
88
89
  tooManyTransfersTry: "Too many transfers. Try again later.",
89
90
  pluginNotPartPlan: "This plugin is not part of your plan. It comes with Pro.",
@@ -260,6 +261,7 @@ const DE = {
260
261
  notSignedIn: "Du bist nicht angemeldet.",
261
262
  accountSuspended: "Dieses Konto ist gesperrt.",
262
263
  tooLarge: "Das ist zu groß.",
264
+ tooManyStreams: "Zu viele Fenster des Studios sind offen. Schließ eines, oder lade gleich neu.",
263
265
  tooManyTriesWait: "Zu viele Versuche. Warte kurz und versuch es noch einmal.",
264
266
  tooManyTransfersTry: "Zu viele Übertragungen. Versuch es später noch einmal.",
265
267
  pluginNotPartPlan: "Dieses Plugin gehört nicht zu deinem Paket. Mit Pro ist es dabei.",
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{Ht as r,Nr as i,Qt as a,Ut as o,Vt as s,Wt as c,Yt as l,cr as u,en as d,sn as f,zr as p}from"./ui-BIWmkPh6.js";import{t as m}from"./preload-helper-DpV6A1kQ.js";import{t as h}from"./logo-CGNoptDg.js";import{ht as g,mt as _,tt as v}from"./index-Bjn557f1.js";import{c as y,f as b}from"./settings-menu-CoLUNJGQ.js";import{ReleaseNotes as x,loadReleases as S,releaseDate as C,releaseLabel as w}from"./ChangelogDialog-BXvT2VMU.js";var T=e(t(),1),E=[{name:`engenty wizards`,description:`credit.engenty-wizards`,homepage:`https://github.com/engenty/wizards`,license:`FSL-1.1-MIT`},{name:`engenty`,description:`credit.engenty`,homepage:`https://github.com/engenty/engenty`,license:`FSL-1.1-MIT`}],D=[{name:`Mastra`,description:`credit.mastra`,homepage:`https://github.com/mastra-ai/mastra`,license:`Apache-2.0`},{name:`AI SDK`,description:`credit.ai-sdk`,homepage:`https://github.com/vercel/ai`,license:`Apache-2.0`},{name:`Model Context Protocol`,description:`credit.model-context-protocol`,homepage:`https://github.com/modelcontextprotocol/typescript-sdk`,license:`MIT`},{name:`Hono`,description:`credit.hono`,homepage:`https://github.com/honojs/hono`,license:`MIT`},{name:`Drizzle ORM`,description:`credit.drizzle-orm`,homepage:`https://github.com/drizzle-team/drizzle-orm`,license:`Apache-2.0`},{name:`libSQL`,description:`credit.libsql`,homepage:`https://github.com/tursodatabase/libsql`,license:`MIT`},{name:`Playwright`,description:`credit.playwright`,homepage:`https://github.com/microsoft/playwright`,license:`Apache-2.0`},{name:`React`,description:`credit.react`,homepage:`https://github.com/facebook/react`,license:`MIT`},{name:`Vite`,description:`credit.vite`,homepage:`https://github.com/vitejs/vite`,license:`MIT`},{name:`Tailwind CSS`,description:`credit.tailwind-css`,homepage:`https://github.com/tailwindlabs/tailwindcss`,license:`MIT`},{name:`React Flow`,description:`credit.react-flow`,homepage:`https://github.com/xyflow/xyflow`,license:`MIT`},{name:`TanStack Query`,description:`credit.tanstack-query`,homepage:`https://github.com/TanStack/query`,license:`MIT`},{name:`xterm.js`,description:`credit.xterm-js`,homepage:`https://github.com/xtermjs/xterm.js`,license:`MIT`},{name:`Lucide`,description:`credit.lucide`,homepage:`https://github.com/lucide-icons/lucide`,license:`ISC`},{name:`Geist & Geist Mono`,description:`credit.geist-geist-mono`,homepage:`https://github.com/vercel/geist-font`,license:`OFL-1.1`},{name:`Space Grotesk`,description:`credit.space-grotesk`,homepage:`https://github.com/floriankarsten/space-grotesk`,license:`OFL-1.1`},{name:`git-cliff`,description:`credit.git-cliff`,homepage:`https://github.com/orhun/git-cliff`,license:`MIT OR Apache-2.0`}],O=e(n(),1),k=(e,...t)=>t.some(t=>t?.toLowerCase().includes(e));function A({name:e,homepage:t,version:n,license:r,description:a}){return(0,O.jsxs)(`li`,{className:`py-2.5`,children:[(0,O.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5`,children:[t?(0,O.jsxs)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 font-medium text-[0.875rem] text-ink underline-offset-4 hover:underline`,children:[e,(0,O.jsx)(i,{"aria-hidden":!0,className:`size-3 text-ink-4`})]}):(0,O.jsx)(`span`,{className:`font-medium text-[0.875rem] text-ink`,children:e}),n?(0,O.jsx)(`span`,{className:`text-[0.75rem] text-ink-3 tabular-nums`,children:n}):null,(0,O.jsx)(`span`,{className:`text-[0.75rem] text-ink-3`,children:r})]}),a?(0,O.jsx)(`p`,{className:`mt-0.5 text-[0.8125rem] text-ink-3`,children:a}):null]})}function j({title:e,hint:t,children:n}){return(0,O.jsxs)(`section`,{className:`mt-6`,children:[(0,O.jsx)(`h3`,{className:`border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:e}),t?(0,O.jsx)(`p`,{className:`mt-2 text-[0.8125rem] text-ink-3`,children:t}):null,n]})}function M({credits:e}){return(0,O.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:e.map(e=>(0,O.jsx)(A,{name:e.name,homepage:e.homepage,license:e.license,description:f(e.description)},e.name))})}function N({label:e,packages:t}){return(0,O.jsxs)(`div`,{className:`mt-4`,children:[(0,O.jsx)(`h4`,{className:`font-medium text-[0.75rem] text-ink-3 tracking-wide`,children:e}),(0,O.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:t.map(e=>(0,O.jsx)(A,{...e},e.name))})]})}function P({active:e}){let[t,n]=(0,T.useState)(null),[i,a]=(0,T.useState)(``);(0,T.useEffect)(()=>{if(!e||t)return;let r=!1;return m(()=>import(`./oss-credits-C2JUsf2d.js`).then(e=>{r||n(e.default)}),[]),()=>{r=!0}},[e,t]),(0,T.useEffect)(()=>{e||a(``)},[e]);let o=i.trim().toLowerCase(),s=e=>o?e.filter(e=>k(o,e.name,e.license,f(e.description))):e,u=e=>o?e.filter(e=>k(o,e.name,e.license,e.version)):e,d=s(E),p=s(D),h=t?[{id:`shared`,label:f(`about.creditsShared`),packages:u(t.shared)},...t.groups.map(e=>({id:e.id,label:e.label,packages:u(e.packages)}))].filter(e=>e.packages.length>0):[],g=d.length===0&&p.length===0&&h.length===0;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`p`,{className:`mb-4 text-[0.875rem] text-ink-3`,children:f(`about.creditsHint`)}),(0,O.jsx)(c,{type:`search`,value:i,placeholder:f(`about.search`),onChange:e=>a(e.target.value)}),d.length>0?(0,O.jsx)(j,{title:f(`about.creditsProduct`),children:(0,O.jsx)(M,{credits:d})}):null,p.length>0?(0,O.jsx)(j,{title:f(`about.creditsBuiltWith`),children:(0,O.jsx)(M,{credits:p})}):null,t===null?(0,O.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,O.jsx)(l,{})}):h.length>0?(0,O.jsx)(j,{title:f(`about.creditsDeps`),hint:o?void 0:f(`about.creditsDepsHint`),children:h.map(e=>(0,O.jsx)(N,{label:e.label,packages:e.packages},e.id))}):null,t!==null&&g?(0,O.jsx)(r,{children:f(`about.noMatches`)}):null]})}var F=[`new`,`earlier`,`credits`],I=e=>f(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),L=e=>e===1?f(`about.change`):f(`about.changes`,{n:e});function R({me:e,active:t,initialTab:n=`new`}){let r=e?.mode===`local`,{data:i,latest:o}=_(r&&t),[s,c]=(0,T.useState)(null),[u,m]=(0,T.useState)(n);(0,T.useEffect)(()=>m(n),[n]);let E=b(F.indexOf(u)),D=i?.newer&&o?o:g;(0,T.useEffect)(()=>{if(!t)return;let e=!1;return c(null),S(D===`0.11.0`?void 0:D).then(t=>{e||c(t)}),()=>{e=!0}},[t,D]);let k=s?.find(e=>e.version===`v${D}`)??s?.[0]??null,A=s?.filter(e=>e!==k)??[],j=r?i?.kind??null:`cloud`;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`div`,{className:`flex flex-col items-center pt-4 text-center`,children:[(0,O.jsx)(h,{size:96}),(0,O.jsxs)(`div`,{className:`mt-4 font-display font-semibold text-[1.5rem] tracking-tight`,children:[`engenty`,(0,O.jsx)(`span`,{className:`text-ember`,children:`.`}),(0,O.jsx)(`span`,{className:`ml-1.5 font-normal text-ink-3`,children:`wizards`})]}),(0,O.jsxs)(`div`,{className:`mt-1 text-[0.9375rem] text-ink-3 tabular-nums`,children:[f(`about.version`,{v:g}),j?` · ${f(`about.kind.${j}`)}`:``]})]}),r?(0,O.jsx)(`div`,{className:`mt-5`,children:(0,O.jsx)(v,{enabled:t})}):null,(0,O.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,O.jsx)(a,{value:u,onChange:m,options:F.map(e=>({id:e,label:I(e)})),label:f(`about.title`)})}),(0,O.jsxs)(`div`,{className:d(`mt-5`,y(E)),children:[u===`new`?s===null?(0,O.jsx)(`div`,{className:`flex justify-center py-6 text-ink-3`,children:(0,O.jsx)(l,{})}):k?(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[w(k),(0,O.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:C(k)})]}),(0,O.jsx)(`div`,{className:`mt-3`,children:(0,O.jsx)(x,{release:k})})]}):(0,O.jsx)(`p`,{className:`text-[0.875rem] text-ink-3`,children:f(`about.changelogEmpty`)}):null,u===`earlier`?(0,O.jsx)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:A.map(e=>(0,O.jsxs)(`details`,{className:`group/r py-2`,children:[(0,O.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-baseline gap-3 text-[0.875rem] [&::-webkit-details-marker]:hidden`,children:[(0,O.jsx)(p,{className:`size-3.5 shrink-0 self-center text-ink-4 transition group-open/r:rotate-90`}),(0,O.jsx)(`span`,{className:`font-medium text-ink tabular-nums`,children:w(e)}),(0,O.jsx)(`span`,{className:`text-[0.8125rem] text-ink-3 tabular-nums`,children:C(e)}),(0,O.jsx)(`span`,{className:`ml-auto text-[0.8125rem] text-ink-4`,children:L(e.commits.length)})]}),(0,O.jsx)(`div`,{className:`mt-2 pl-6`,children:(0,O.jsx)(x,{release:e})})]},e.version??`unreleased`))}):null,u===`credits`?(0,O.jsx)(P,{active:!0}):null]},u)]})}function z({open:e,onClose:t,me:n}){return(0,O.jsxs)(s,{open:e,onClose:t,wide:!0,height:`tall`,children:[(0,O.jsx)(`div`,{className:`-mt-2 -mr-2 sticky top-0 z-10 flex h-0 justify-end`,children:(0,O.jsx)(o,{label:f(`common.close`),onClick:t,children:(0,O.jsx)(u,{className:`size-4`})})}),(0,O.jsx)(R,{me:n,active:e})]})}export{z as AboutDialog,R as AboutPanel};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{$t as r,Bt as i,Jt as a,Ut as o,Vt as s,on as c}from"./ui-BVQk2DtW.js";import{t as l}from"./preload-helper-DpV6A1kQ.js";var u=e(t(),1),d=e(n(),1);function f(e){switch(e.group){case`Added`:return{label:`NEW`,dot:`bg-moss`};case`Fixed`:return{label:`FIXED`,dot:`bg-amber`};case`Changed`:return{label:`CHANGED`,dot:`bg-cobalt`};case`Performance`:return{label:`PERFORMANCE`,dot:`bg-ember`};case`Deploy`:return{label:`DEPLOY`,dot:`bg-ink-4`};case`Docs`:return{label:`DOCS`,dot:`bg-ink-4`};default:return{label:`OTHER`,dot:`bg-ink-4`}}}var p=e=>e.version?e.version.replace(/^v/,``):c(`about.unreleased`),m=e=>e.timestamp?new Date(e.timestamp*1e3).toISOString().slice(0,10):``,h=e=>e.charAt(0).toUpperCase()+e.slice(1);function g(e,t){let n=t.trim().toLowerCase();if(!n)return e;let r=[];for(let t of e){if(`${p(t)} ${m(t)}`.toLowerCase().includes(n)){r.push(t);continue}let e=t.commits.filter(e=>`${f(e).label} ${e.scope??``} ${e.message}`.toLowerCase().includes(n));e.length>0&&r.push({...t,commits:e})}return r}async function _(e){if(e)try{let t=await fetch(`https://raw.githubusercontent.com/engenty/wizards/v${e}/apps/web/src/about/changelog.json`,{signal:AbortSignal.timeout(5e3)});if(t.ok)return await t.json()}catch{}return(await l(async()=>{let{default:e}=await import(`./changelog-DDXnAaHm.js`);return{default:e}},[])).default}function v({release:e}){return(0,d.jsx)(`ul`,{className:`flex flex-col gap-2`,children:e.commits.map(e=>{let t=f(e);return(0,d.jsxs)(`li`,{className:`flex items-start gap-2.5 text-[0.875rem]`,children:[(0,d.jsx)(`span`,{className:r(`mt-[7px] size-1.5 shrink-0 rounded-full`,t.dot)}),(0,d.jsxs)(`span`,{className:`min-w-0 text-ink-2`,children:[(0,d.jsxs)(`span`,{className:`font-semibold text-[0.75rem] text-ink tracking-wide`,children:[t.label,e.scope?` [${e.scope}]`:``]}),` `,h(e.message),e.breaking?(0,d.jsx)(`span`,{className:`ml-1.5 rounded-full bg-rose-tint px-1.5 py-0.5 font-medium text-[0.75rem] text-rose`,children:c(`about.breaking`)}):null]})]},e.id)})})}function y({open:e,onClose:t,version:n}){let[r,l]=(0,u.useState)(null),[f,h]=(0,u.useState)(``);(0,u.useEffect)(()=>{if(!e||r)return;let t=!1;return _(n).then(e=>{t||l(e)}),()=>{t=!0}},[e,r,n]),(0,u.useEffect)(()=>{e||h(``)},[e]);let y=r?g(r,f):[];return(0,d.jsxs)(i,{open:e,onClose:t,title:c(`about.changelog`),wide:!0,height:`tall`,children:[(0,d.jsx)(`p`,{className:`-mt-3 mb-4 text-[0.875rem] text-ink-3`,children:c(`about.changelogHint`)}),r===null?(0,d.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,d.jsx)(a,{})}):r.length===0?(0,d.jsx)(s,{children:c(`about.changelogEmpty`)}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(o,{type:`search`,value:f,placeholder:c(`about.search`),onChange:e=>h(e.target.value)}),y.length===0?(0,d.jsx)(s,{children:c(`about.noMatches`)}):null,y.map(e=>(0,d.jsxs)(`section`,{className:`mt-6`,children:[(0,d.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[p(e),(0,d.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:m(e)})]}),(0,d.jsx)(`div`,{className:`mt-3`,children:(0,d.jsx)(v,{release:e})})]},e.version??`unreleased`))]})]})}export{y as ChangelogDialog,v as ReleaseNotes,_ as loadReleases,m as releaseDate,p as releaseLabel};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{n as t,t as n}from"./jsx-runtime-BNakU3Ej.js";import{Ht as r,Vt as i,Wt as a,Yt as o,en as s,sn as c}from"./ui-BIWmkPh6.js";import{t as l}from"./preload-helper-DpV6A1kQ.js";var u=e(t(),1),d=e(n(),1);function f(e){switch(e.group){case`Added`:return{label:`NEW`,dot:`bg-moss`};case`Fixed`:return{label:`FIXED`,dot:`bg-amber`};case`Changed`:return{label:`CHANGED`,dot:`bg-cobalt`};case`Performance`:return{label:`PERFORMANCE`,dot:`bg-ember`};case`Deploy`:return{label:`DEPLOY`,dot:`bg-ink-4`};case`Docs`:return{label:`DOCS`,dot:`bg-ink-4`};default:return{label:`OTHER`,dot:`bg-ink-4`}}}var p=e=>e.version?e.version.replace(/^v/,``):c(`about.unreleased`),m=e=>e.timestamp?new Date(e.timestamp*1e3).toISOString().slice(0,10):``,h=e=>e.charAt(0).toUpperCase()+e.slice(1);function g(e,t){let n=t.trim().toLowerCase();if(!n)return e;let r=[];for(let t of e){if(`${p(t)} ${m(t)}`.toLowerCase().includes(n)){r.push(t);continue}let e=t.commits.filter(e=>`${f(e).label} ${e.scope??``} ${e.message}`.toLowerCase().includes(n));e.length>0&&r.push({...t,commits:e})}return r}async function _(e){if(e)try{let t=await fetch(`https://raw.githubusercontent.com/engenty/wizards/v${e}/apps/web/src/about/changelog.json`,{signal:AbortSignal.timeout(5e3)});if(t.ok)return await t.json()}catch{}return(await l(async()=>{let{default:e}=await import(`./changelog-zllICQ4q.js`);return{default:e}},[])).default}function v({release:e}){return(0,d.jsx)(`ul`,{className:`flex flex-col gap-2`,children:e.commits.map(e=>{let t=f(e);return(0,d.jsxs)(`li`,{className:`flex items-start gap-2.5 text-[0.875rem]`,children:[(0,d.jsx)(`span`,{className:s(`mt-[7px] size-1.5 shrink-0 rounded-full`,t.dot)}),(0,d.jsxs)(`span`,{className:`min-w-0 text-ink-2`,children:[(0,d.jsxs)(`span`,{className:`font-semibold text-[0.75rem] text-ink tracking-wide`,children:[t.label,e.scope?` [${e.scope}]`:``]}),` `,h(e.message),e.breaking?(0,d.jsx)(`span`,{className:`ml-1.5 rounded-full bg-rose-tint px-1.5 py-0.5 font-medium text-[0.75rem] text-rose`,children:c(`about.breaking`)}):null]})]},e.id)})})}function y({open:e,onClose:t,version:n}){let[s,l]=(0,u.useState)(null),[f,h]=(0,u.useState)(``);(0,u.useEffect)(()=>{if(!e||s)return;let t=!1;return _(n).then(e=>{t||l(e)}),()=>{t=!0}},[e,s,n]),(0,u.useEffect)(()=>{e||h(``)},[e]);let y=s?g(s,f):[];return(0,d.jsxs)(i,{open:e,onClose:t,title:c(`about.changelog`),wide:!0,height:`tall`,children:[(0,d.jsx)(`p`,{className:`-mt-3 mb-4 text-[0.875rem] text-ink-3`,children:c(`about.changelogHint`)}),s===null?(0,d.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,d.jsx)(o,{})}):s.length===0?(0,d.jsx)(r,{children:c(`about.changelogEmpty`)}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(a,{type:`search`,value:f,placeholder:c(`about.search`),onChange:e=>h(e.target.value)}),y.length===0?(0,d.jsx)(r,{children:c(`about.noMatches`)}):null,y.map(e=>(0,d.jsxs)(`section`,{className:`mt-6`,children:[(0,d.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[p(e),(0,d.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:m(e)})]}),(0,d.jsx)(`div`,{className:`mt-3`,children:(0,d.jsx)(v,{release:e})})]},e.version??`unreleased`))]})]})}export{y as ChangelogDialog,v as ReleaseNotes,_ as loadReleases,m as releaseDate,p as releaseLabel};