@engenty/wizards-runtime 0.9.3 → 0.9.4

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 (109) hide show
  1. package/README.md +34 -39
  2. package/apps/runtime/dist/assistant/docs.js +1 -1
  3. package/apps/runtime/dist/assistant/primer.js +2 -2
  4. package/apps/runtime/dist/db/migrations/tenant/0020_project_page.sql +1 -0
  5. package/apps/runtime/dist/db/migrations/tenant/meta/0020_snapshot.json +3475 -0
  6. package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +7 -0
  7. package/apps/runtime/dist/db/schema.js +2 -0
  8. package/apps/runtime/dist/docs/dev/api.md +1 -1
  9. package/apps/runtime/dist/docs/dev/integration/channels.md +4 -4
  10. package/apps/runtime/dist/docs/dev/integration/claude-code-plugin.md +1 -1
  11. package/apps/runtime/dist/docs/dev/integration/embed.md +1 -1
  12. package/apps/runtime/dist/docs/dev/integration/index.md +2 -3
  13. package/apps/runtime/dist/docs/dev/integration/link-and-share.md +1 -1
  14. package/apps/runtime/dist/docs/dev/integration/mcp-apps.md +1 -1
  15. package/apps/runtime/dist/docs/dev/integration/mcp.md +1 -1
  16. package/apps/runtime/dist/docs/dev/integration/meta.json +0 -1
  17. package/apps/runtime/dist/docs/dev/integration/openui.md +1 -1
  18. package/apps/runtime/dist/docs/dev/integration/results.md +1 -3
  19. package/apps/runtime/dist/docs/dev/plugins/routes.md +1 -1
  20. package/apps/runtime/dist/docs/dev/wizard-format/themes.md +2 -2
  21. package/apps/runtime/dist/docs/dev/wizard-format/validate.md +1 -1
  22. package/apps/runtime/dist/docs/meta.json +1 -1
  23. package/apps/runtime/dist/docs/{user → user-guide}/ai-apps.md +4 -5
  24. package/apps/runtime/dist/docs/{user → user-guide}/build-a-wizard.md +27 -28
  25. package/apps/runtime/dist/docs/{user → user-guide}/command-line.md +9 -8
  26. package/apps/runtime/dist/docs/{user → user-guide}/connectors.md +6 -6
  27. package/apps/runtime/dist/docs/{user → user-guide}/create-account.md +10 -11
  28. package/apps/runtime/dist/docs/{user → user-guide}/data.md +5 -5
  29. package/apps/runtime/dist/docs/{user → user-guide}/first-start.md +5 -5
  30. package/apps/runtime/dist/docs/{user → user-guide}/index.md +3 -3
  31. package/apps/runtime/dist/docs/{user → user-guide}/install.md +21 -25
  32. package/apps/runtime/dist/docs/{user → user-guide}/local-only.md +5 -6
  33. package/apps/runtime/dist/docs/{user → user-guide}/meta.json +0 -2
  34. package/apps/runtime/dist/docs/{user → user-guide}/models.md +13 -22
  35. package/apps/runtime/dist/docs/{user → user-guide}/plugins.md +2 -2
  36. package/apps/runtime/dist/docs/{user → user-guide}/run.md +21 -36
  37. package/apps/runtime/dist/docs/{user → user-guide}/server.md +1 -1
  38. package/apps/runtime/dist/docs/{user → user-guide}/space.md +17 -27
  39. package/apps/runtime/dist/docs/{user → user-guide}/steps.md +22 -34
  40. package/apps/runtime/dist/docs/{user → user-guide}/test-and-share.md +32 -75
  41. package/apps/runtime/dist/docs/{user → user-guide}/troubleshooting.md +3 -4
  42. package/apps/runtime/dist/manage.js +7 -0
  43. package/apps/runtime/dist/routes/studio.js +12 -0
  44. package/apps/runtime/dist/services/errors.js +1 -0
  45. package/apps/runtime/dist/services/pages.js +262 -0
  46. package/apps/runtime/dist/services/projects.js +73 -2
  47. package/apps/runtime/dist/services/runs.js +2 -0
  48. package/apps/runtime/dist/services/wizards.js +30 -1
  49. package/apps/web/dist/assets/{AboutDialog-DsGqq2Es.js → AboutDialog-CsqUDxPv.js} +1 -1
  50. package/apps/web/dist/assets/{ChangelogDialog-Hn7oDuyx.js → ChangelogDialog-vV9nXOBV.js} +1 -1
  51. package/apps/web/dist/assets/EditorPage-CfmubDLB.js +4 -0
  52. package/apps/web/dist/assets/{FlowPreview-DZ1XL_o1.js → FlowPreview-DoBlokAp.js} +1 -1
  53. package/apps/web/dist/assets/{Harness-BBpl_EUW.js → Harness-GnlSI4-P.js} +2 -2
  54. package/apps/web/dist/assets/Marketplace-CYsq0K7A.js +2 -0
  55. package/apps/web/dist/assets/NewWizardChannels-DUS3dRCj.js +1 -0
  56. package/apps/web/dist/assets/{NewWizardPage-kpm-UyQC.js → NewWizardPage-Cm9ydfUW.js} +2 -2
  57. package/apps/web/dist/assets/OnboardingPage-xI83C1V1.js +1 -0
  58. package/apps/web/dist/assets/PreviewPane-B-X0rChi.js +4 -0
  59. package/apps/web/dist/assets/ProjectPage-Bu6uD-Kb.js +1 -0
  60. package/apps/web/dist/assets/PublicRunner-BWBE74Kn.js +1 -0
  61. package/apps/web/dist/assets/{ReadOnly-CcW91P4l.js → ReadOnly-DKgWZ_1q.js} +1 -1
  62. package/apps/web/dist/assets/SettingsPage-B9euFl71.js +2 -0
  63. package/apps/web/dist/assets/SetupPage-C3XLbBTO.js +1 -0
  64. package/apps/web/dist/assets/{SharePage-CC7V2TYJ.js → SharePage-CSj1sAVS.js} +1 -1
  65. package/apps/web/dist/assets/changelog-pnMcOVO_.js +1 -0
  66. package/apps/web/dist/assets/{coins-RUupcqZx.js → coins-D0MI0EKw.js} +1 -1
  67. package/apps/web/dist/assets/index-DtjKnB3s.css +1 -0
  68. package/apps/web/dist/assets/index-qc7o4bkp.js +14 -0
  69. package/apps/web/dist/assets/{phone-ChnpShTU.js → phone-BZ-sPZr6.js} +1 -1
  70. package/apps/web/dist/assets/runners-CED2yPuf.js +1 -0
  71. package/apps/web/dist/assets/session-DyndueX0.js +2 -0
  72. package/apps/web/dist/assets/{settings-menu-CLw_oucZ.js → settings-menu-C960R1kx.js} +1 -1
  73. package/apps/web/dist/assets/theme-Zp5g-teI.js +11 -0
  74. package/apps/web/dist/assets/ui-DVkIZqDg.js +137 -0
  75. package/apps/web/dist/assets/{upload-0sFU9K8-.js → upload-HFTtsOaE.js} +1 -1
  76. package/apps/web/dist/assets/{useMutation-1jFwXbI6.js → useMutation-D3zIOVOt.js} +1 -1
  77. package/apps/web/dist/assets/{volume-2-C51sO2X0.js → volume-2-DazUIp6w.js} +1 -1
  78. package/apps/web/dist/assets/{wrench-DdT-nErU.js → wrench-BHe19Ol_.js} +1 -1
  79. package/apps/web/dist/index.html +8 -8
  80. package/apps/web/dist/mcp/flow.html +2 -2
  81. package/node_modules/@engenty/wizards/dist/plugin/studio.d.ts +3 -3
  82. package/node_modules/@engenty/wizards-shared/dist/feature-flags.d.ts +12 -0
  83. package/node_modules/@engenty/wizards-shared/dist/feature-flags.js +12 -0
  84. package/node_modules/@engenty/wizards-shared/dist/projects.d.ts +36 -0
  85. package/node_modules/@engenty/wizards-shared/dist/projects.js +25 -0
  86. package/node_modules/@engenty/wizards-shared/dist/run.d.ts +3 -0
  87. package/node_modules/@engenty/wizards-shared/dist/run.js +6 -0
  88. package/package.json +1 -1
  89. package/plugin/.claude-plugin/plugin.json +1 -1
  90. package/plugin/plugin.json +2 -2
  91. package/apps/runtime/dist/docs/dev/integration/wordpress.md +0 -10
  92. package/apps/runtime/dist/docs/user/assistant.md +0 -77
  93. package/apps/runtime/dist/docs/user/wordpress.md +0 -121
  94. package/apps/web/dist/assets/EditorPage-DsJqhoXy.js +0 -4
  95. package/apps/web/dist/assets/Marketplace-BF0Rx0VR.js +0 -2
  96. package/apps/web/dist/assets/NewWizardChannels-WaAOvmzw.js +0 -1
  97. package/apps/web/dist/assets/OnboardingPage-Birm-hM5.js +0 -1
  98. package/apps/web/dist/assets/ProjectPage-CqtpxOq5.js +0 -1
  99. package/apps/web/dist/assets/PublicRunner-CXTHGYHv.js +0 -1
  100. package/apps/web/dist/assets/RunDrawer-ByvmBv6e.js +0 -4
  101. package/apps/web/dist/assets/RunnerView-DcduYZly.js +0 -1
  102. package/apps/web/dist/assets/SettingsPage-Q2CUb7kK.js +0 -2
  103. package/apps/web/dist/assets/SetupPage-C7mzUoiR.js +0 -1
  104. package/apps/web/dist/assets/changelog-7DN_qWR2.js +0 -1
  105. package/apps/web/dist/assets/index-myC3mJie.css +0 -1
  106. package/apps/web/dist/assets/index-qnpoZzuw.js +0 -14
  107. package/apps/web/dist/assets/session-DekDyd9S.js +0 -2
  108. package/apps/web/dist/assets/theme-DjpqxoRe.js +0 -11
  109. package/apps/web/dist/assets/ui-DRYauuxF.js +0 -137
@@ -524,6 +524,8 @@ export async function listRuns(userId, wizardId) {
524
524
  credits: Math.ceil(r.costMicros / MICROS_PER_CREDIT),
525
525
  assets: assetCounts.find((a) => a.runId === r.id)?.n ?? 0,
526
526
  stepTitle: r.definition.steps.find((s) => s.id === r.cursor)?.title ?? null,
527
+ /** The token of its shared result (`/s/<token>`); null while it is not shared. */
528
+ shareToken: r.status === "done" ? r.shareToken : null,
527
529
  }));
528
530
  }
529
531
  /**
@@ -18,6 +18,7 @@ import { notFound, ServiceError } from "./errors.js";
18
18
  import { copyFiles, draftFiles, sameFiles, seedFiles } from "./files.js";
19
19
  import { forgetWizardLinks } from "./links.js";
20
20
  import { asLang, countInstall, marketplaceWizard } from "./marketplace.js";
21
+ import { pushPages } from "./pages.js";
21
22
  import { defaultProject, ownedProject } from "./projects.js";
22
23
  import { checkRunnerSettings } from "./runners.js";
23
24
  import { saveTheme } from "./themes.js";
@@ -363,6 +364,10 @@ export async function updateWizardSettings(userId, wizardId, patch) {
363
364
  .update(schema.wizard)
364
365
  .set({ ...patch, ...(runners ? { runners } : {}), updatedAt: new Date() })
365
366
  .where(eq(schema.wizard.id, w.id));
367
+ // Switched off, the wizard leaves the team's public page; on, it may return to it.
368
+ if (patch.shareEnabled !== undefined && patch.shareEnabled !== w.shareEnabled) {
369
+ pushPages();
370
+ }
366
371
  return wizardSummary(await ownedWizard(userId, wizardId));
367
372
  }
368
373
  export async function rotateShareLink(userId, wizardId) {
@@ -374,6 +379,8 @@ export async function rotateShareLink(userId, wizardId) {
374
379
  .where(eq(schema.wizard.id, w.id));
375
380
  await dropLinks([w.shareToken]);
376
381
  await putLink(token, "wizard", w.id);
382
+ // The public page's start button leads to the new link.
383
+ pushPages();
377
384
  return { shareToken: token, shareUrl: shareUrl(token) };
378
385
  }
379
386
  export async function duplicateWizard(userId, wizardId) {
@@ -398,11 +405,31 @@ export async function duplicateWizard(userId, wizardId) {
398
405
  }
399
406
  export async function deleteWizard(userId, wizardId) {
400
407
  await requireAdmin();
401
- await writableWizard(userId, wizardId);
408
+ const w = await writableWizard(userId, wizardId);
402
409
  await forgetWizardLinks(wizardId);
403
410
  await db
404
411
  .delete(schema.wizard)
405
412
  .where(and(eq(schema.wizard.id, wizardId), eq(schema.wizard.tenantId, currentTenant())));
413
+ await unlistWizard(w.projectId, wizardId);
414
+ }
415
+ /** A wizard that is gone leaves its space's public page, which is sent again without it. */
416
+ async function unlistWizard(projectId, wizardId) {
417
+ const p = await db.query.project.findFirst({
418
+ where: eq(schema.project.id, projectId),
419
+ columns: { page: true },
420
+ });
421
+ if (!p?.page?.wizards.includes(wizardId)) {
422
+ return;
423
+ }
424
+ const { [wizardId]: _gone, ...examples } = p.page.examples;
425
+ await db
426
+ .update(schema.project)
427
+ .set({
428
+ page: { ...p.page, wizards: p.page.wizards.filter((id) => id !== wizardId), examples },
429
+ updatedAt: new Date(),
430
+ })
431
+ .where(eq(schema.project.id, projectId));
432
+ pushPages();
406
433
  }
407
434
  /** A wizard with validator issues is never published — same rule for studio and MCP. */
408
435
  export async function requireClean(w) {
@@ -424,5 +451,7 @@ export async function publishWizard(userId, wizardId) {
424
451
  .update(schema.wizard)
425
452
  .set({ publishedVersion: version, updatedAt: new Date() })
426
453
  .where(eq(schema.wizard.id, w.id));
454
+ // The team's public page shows the new version's title, results and steps.
455
+ pushPages();
427
456
  return { version, shareUrl: shareUrl(w.shareToken), shareEnabled: w.shareEnabled };
428
457
  }
@@ -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{Bt as r,Dr as i,Gt as a,Jt as o,Lt as s,Nr as c,Rt as l,Xt as u,nr as d,rn as f,zt as p}from"./ui-DRYauuxF.js";import{t as m}from"./preload-helper-CNEI7N0N.js";import{t as h}from"./logo-CGNoptDg.js";import{G as g,nt as _,tt as v}from"./index-qnpoZzuw.js";import{c as y,f as b}from"./settings-menu-CLw_oucZ.js";import{ReleaseNotes as x,loadReleases as S,releaseDate as C,releaseLabel as w}from"./ChangelogDialog-Hn7oDuyx.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,o]=(0,T.useState)(``);(0,T.useEffect)(()=>{if(!e||t)return;let r=!1;return m(()=>import(`./oss-credits-D7izqI_0.js`).then(e=>{r||n(e.default)}),[]),()=>{r=!0}},[e,t]),(0,T.useEffect)(()=>{e||o(``)},[e]);let s=i.trim().toLowerCase(),c=e=>s?e.filter(e=>k(s,e.name,e.license,f(e.description))):e,u=e=>s?e.filter(e=>k(s,e.name,e.license,e.version)):e,d=c(E),p=c(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)(r,{type:`search`,value:i,placeholder:f(`about.search`),onChange:e=>o(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)(a,{})}):h.length>0?(0,O.jsx)(j,{title:f(`about.creditsDeps`),hint:s?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)(l,{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:s}=v(r&&t),[l,d]=(0,T.useState)(null),[p,m]=(0,T.useState)(n);(0,T.useEffect)(()=>m(n),[n]);let E=b(F.indexOf(p)),D=i?.newer&&s?s:_;(0,T.useEffect)(()=>{if(!t)return;let e=!1;return d(null),S(D===`0.9.3`?void 0:D).then(t=>{e||d(t)}),()=>{e=!0}},[t,D]);let k=l?.find(e=>e.version===`v${D}`)??l?.[0]??null,A=l?.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:_}),j?` · ${f(`about.kind.${j}`)}`:``]})]}),r?(0,O.jsx)(`div`,{className:`mt-5`,children:(0,O.jsx)(g,{enabled:t})}):null,(0,O.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,O.jsx)(o,{value:p,onChange:m,options:F.map(e=>({id:e,label:I(e)})),label:f(`about.title`)})}),(0,O.jsxs)(`div`,{className:u(`mt-5`,y(E)),children:[p===`new`?l===null?(0,O.jsx)(`div`,{className:`flex justify-center py-6 text-ink-3`,children:(0,O.jsx)(a,{})}):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,p===`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)(c,{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,p===`credits`?(0,O.jsx)(P,{active:!0}):null]},p)]})}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)(p,{label:f(`common.close`),onClick:t,children:(0,O.jsx)(d,{className:`size-4`})})}),(0,O.jsx)(R,{me:n,active:e})]})}export{z as AboutDialog,R as AboutPanel};
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,Ar as i,Bt as a,Ht as o,Ir as s,Jt as c,Ut as l,Vt as u,Zt as d,ar as f,on as p}from"./ui-DVkIZqDg.js";import{t as m}from"./preload-helper-CNEI7N0N.js";import{t as h}from"./logo-CGNoptDg.js";import{G as g,nt as _,tt as v}from"./index-qc7o4bkp.js";import{c as y,f as b}from"./settings-menu-C960R1kx.js";import{ReleaseNotes as x,loadReleases as S,releaseDate as C,releaseLabel as w}from"./ChangelogDialog-vV9nXOBV.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:p(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),[r,i]=(0,T.useState)(``);(0,T.useEffect)(()=>{if(!e||t)return;let r=!1;return m(()=>import(`./oss-credits-D7izqI_0.js`).then(e=>{r||n(e.default)}),[]),()=>{r=!0}},[e,t]),(0,T.useEffect)(()=>{e||i(``)},[e]);let a=r.trim().toLowerCase(),o=e=>a?e.filter(e=>k(a,e.name,e.license,p(e.description))):e,s=e=>a?e.filter(e=>k(a,e.name,e.license,e.version)):e,d=o(E),f=o(D),h=t?[{id:`shared`,label:p(`about.creditsShared`),packages:s(t.shared)},...t.groups.map(e=>({id:e.id,label:e.label,packages:s(e.packages)}))].filter(e=>e.packages.length>0):[],g=d.length===0&&f.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:p(`about.creditsHint`)}),(0,O.jsx)(l,{type:`search`,value:r,placeholder:p(`about.search`),onChange:e=>i(e.target.value)}),d.length>0?(0,O.jsx)(j,{title:p(`about.creditsProduct`),children:(0,O.jsx)(M,{credits:d})}):null,f.length>0?(0,O.jsx)(j,{title:p(`about.creditsBuiltWith`),children:(0,O.jsx)(M,{credits:f})}):null,t===null?(0,O.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,O.jsx)(c,{})}):h.length>0?(0,O.jsx)(j,{title:p(`about.creditsDeps`),hint:a?void 0:p(`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)(u,{children:p(`about.noMatches`)}):null]})}var F=[`new`,`earlier`,`credits`],I=e=>p(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),L=e=>e===1?p(`about.change`):p(`about.changes`,{n:e});function R({me:e,active:t,initialTab:n=`new`}){let i=e?.mode===`local`,{data:a,latest:o}=v(i&&t),[l,u]=(0,T.useState)(null),[f,m]=(0,T.useState)(n);(0,T.useEffect)(()=>m(n),[n]);let E=b(F.indexOf(f)),D=a?.newer&&o?o:_;(0,T.useEffect)(()=>{if(!t)return;let e=!1;return u(null),S(D===`0.9.4`?void 0:D).then(t=>{e||u(t)}),()=>{e=!0}},[t,D]);let k=l?.find(e=>e.version===`v${D}`)??l?.[0]??null,A=l?.filter(e=>e!==k)??[],j=i?a?.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:[p(`about.version`,{v:_}),j?` · ${p(`about.kind.${j}`)}`:``]})]}),i?(0,O.jsx)(`div`,{className:`mt-5`,children:(0,O.jsx)(g,{enabled:t})}):null,(0,O.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,O.jsx)(d,{value:f,onChange:m,options:F.map(e=>({id:e,label:I(e)})),label:p(`about.title`)})}),(0,O.jsxs)(`div`,{className:r(`mt-5`,y(E)),children:[f===`new`?l===null?(0,O.jsx)(`div`,{className:`flex justify-center py-6 text-ink-3`,children:(0,O.jsx)(c,{})}):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:p(`about.changelogEmpty`)}):null,f===`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)(s,{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,f===`credits`?(0,O.jsx)(P,{active:!0}):null]},f)]})}function z({open:e,onClose:t,me:n}){return(0,O.jsxs)(a,{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:p(`common.close`),onClick:t,children:(0,O.jsx)(f,{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{Bt as r,Gt as i,Lt as a,Rt as o,Xt as s,rn as c}from"./ui-DRYauuxF.js";import{t as l}from"./preload-helper-CNEI7N0N.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-7DN_qWR2.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)(a,{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)(i,{})}):s.length===0?(0,d.jsx)(o,{children:c(`about.changelogEmpty`)}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(r,{type:`search`,value:f,placeholder:c(`about.search`),onChange:e=>h(e.target.value)}),y.length===0?(0,d.jsx)(o,{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{$t as r,Bt as i,Jt as a,Ut as o,Vt as s,on as c}from"./ui-DVkIZqDg.js";import{t as l}from"./preload-helper-CNEI7N0N.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-pnMcOVO_.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};