wizards 0.3.4 → 0.3.5

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 (68) hide show
  1. package/apps/runtime/dist/docs/dev/plugins/reference.md +10 -2
  2. package/apps/runtime/dist/docs/dev/plugins/runners.md +11 -8
  3. package/apps/runtime/dist/docs/dev/plugins/studio.md +2 -2
  4. package/apps/runtime/dist/docs/user/build-a-wizard.md +4 -4
  5. package/apps/runtime/dist/docs/user/plugins.md +2 -2
  6. package/apps/runtime/dist/docs/user/test-and-share.md +38 -42
  7. package/apps/runtime/dist/docs/user/troubleshooting.md +2 -2
  8. package/apps/runtime/dist/docs/user/wordpress.md +4 -4
  9. package/apps/runtime/dist/plugins/loader.js +6 -1
  10. package/apps/runtime/dist/services/runners.js +27 -3
  11. package/apps/web/dist/assets/AboutDialog-D1N4-3FE.js +1 -0
  12. package/apps/web/dist/assets/{ChangelogDialog-CnCeRFkR.js → ChangelogDialog-VEBTlC3f.js} +1 -1
  13. package/apps/web/dist/assets/{ChatView-_k7wJYub.js → ChatView-DSRUEpb6.js} +4 -4
  14. package/apps/web/dist/assets/EditorPage-UkaHDklX.js +3 -0
  15. package/apps/web/dist/assets/{FlowPreview-BlaTL3Q5.js → FlowPreview-86xWWfdk.js} +1 -1
  16. package/apps/web/dist/assets/{Harness-DfwXxN7O.js → Harness-CF6H2TYJ.js} +1 -1
  17. package/apps/web/dist/assets/{Marketplace-Cm0GtMfe.js → Marketplace-C-Vz3yEk.js} +2 -2
  18. package/apps/web/dist/assets/NewWizardChannels-Cc7gDitg.js +1 -0
  19. package/apps/web/dist/assets/NewWizardPage-sY5q-l99.js +7 -0
  20. package/apps/web/dist/assets/ProjectPage-iSdpJAZS.js +2 -0
  21. package/apps/web/dist/assets/PublicRunner-BgRXMUxS.js +1 -0
  22. package/apps/web/dist/assets/{ReadOnly-D5yjDrcZ.js → ReadOnly-mhKW496R.js} +1 -1
  23. package/apps/web/dist/assets/RunDrawer-B0gJzdxH.js +4 -0
  24. package/apps/web/dist/assets/{RunnerView-5vuR0e1A.js → RunnerView-CTRFgyu5.js} +1 -1
  25. package/apps/web/dist/assets/SettingsPage-CBF8i6j6.js +1 -0
  26. package/apps/web/dist/assets/SetupPage-Fpz9aSLN.js +1 -0
  27. package/apps/web/dist/assets/{SharePage-CC7bLW3F.js → SharePage-Dv3Csh4A.js} +1 -1
  28. package/apps/web/dist/assets/{brand-DWV3he4_.js → brand-BamUjXVr.js} +1 -1
  29. package/apps/web/dist/assets/changelog-ViHoNW7e.js +1 -0
  30. package/apps/web/dist/assets/{circle-alert-DbM8qXuP.js → circle-alert-CYs622_r.js} +1 -1
  31. package/apps/web/dist/assets/{esm-CUTQmLIn.js → esm-B52LIMhP.js} +1 -1
  32. package/apps/web/dist/assets/index-Bdx1Qity.js +11 -0
  33. package/apps/web/dist/assets/index-CDdJDojq.css +1 -0
  34. package/apps/web/dist/assets/{lock-DtzL98Xo.js → lock-BvSWZOin.js} +1 -1
  35. package/apps/web/dist/assets/{phone-CwgJEPhS.js → phone-CI2Flerg.js} +1 -1
  36. package/apps/web/dist/assets/{session-Cv1rnTuW.js → session-BEHF6g4Y.js} +1 -1
  37. package/apps/web/dist/assets/{settings-menu-ByDquXGe.js → settings-menu-BOOPxcJH.js} +1 -1
  38. package/apps/web/dist/assets/{ui-DvVx6UaI.js → ui-CMdSOoUZ.js} +2 -2
  39. package/apps/web/dist/assets/{upload-C5dPn7iT.js → upload-Cz9HgBT9.js} +1 -1
  40. package/apps/web/dist/assets/{volume-2-BYk2L8r1.js → volume-2-CyQuz1nn.js} +1 -1
  41. package/apps/web/dist/index.html +7 -7
  42. package/apps/web/dist/mcp/flow.html +2 -2
  43. package/modules/sms/dist/client.css +1 -1
  44. package/modules/sms/dist/client.js +1 -1
  45. package/modules/sms/package.json +0 -1
  46. package/modules/sms/src/plugin.ts +5 -0
  47. package/modules/sms/ui/Share.tsx +26 -44
  48. package/modules/sms/ui/messages.ts +0 -2
  49. package/modules/whatsapp/dist/client.css +1 -1
  50. package/modules/whatsapp/dist/client.js +1 -1
  51. package/modules/whatsapp/package.json +0 -1
  52. package/modules/whatsapp/src/plugin.ts +5 -0
  53. package/modules/whatsapp/ui/Share.tsx +26 -44
  54. package/modules/whatsapp/ui/messages.ts +0 -2
  55. package/node_modules/@engenty-wizards/plugin-sdk/dist/index.d.ts +22 -0
  56. package/node_modules/@engenty-wizards/plugin-sdk/dist/studio.d.ts +3 -2
  57. package/package.json +1 -1
  58. package/apps/web/dist/assets/AboutDialog-Dns0PM5q.js +0 -1
  59. package/apps/web/dist/assets/EditorPage-B6dB3kY9.js +0 -3
  60. package/apps/web/dist/assets/NewWizardPage-0_ri8UDV.js +0 -7
  61. package/apps/web/dist/assets/ProjectPage-DYTyw26k.js +0 -2
  62. package/apps/web/dist/assets/PublicRunner-BNqXEj7z.js +0 -1
  63. package/apps/web/dist/assets/RunDrawer-CjqXvRGl.js +0 -4
  64. package/apps/web/dist/assets/SettingsPage-CLqZCmvY.js +0 -1
  65. package/apps/web/dist/assets/SetupPage-C7ke4Bwb.js +0 -1
  66. package/apps/web/dist/assets/changelog-BXmIXuLq.js +0 -1
  67. package/apps/web/dist/assets/index-CfPcXmew.css +0 -1
  68. package/apps/web/dist/assets/index-el4ca54i.js +0 -11
@@ -19,7 +19,6 @@
19
19
  "lucide-react": "^1.49.0",
20
20
  "react": "19.3.0",
21
21
  "typescript": "~6.0.3",
22
- "uqr": "0.1.3",
23
22
  "zod": "4.6.5"
24
23
  }
25
24
  }
@@ -184,6 +184,11 @@ export default definePlugin((wizards) => {
184
184
  },
185
185
  problem: async () =>
186
186
  (await getAccount(db())) ? null : "Keine Nummer verbunden (Einstellungen → WhatsApp)",
187
+ // The share dialog's row: the number, the keyword and the link that writes it.
188
+ address: async (wizard) => {
189
+ const b = await bindingView(wizard.id);
190
+ return b.number ? { number: `+${b.number}`, keyword: b.keyword, link: b.link } : null;
191
+ },
187
192
  });
188
193
 
189
194
  // Meta checks the address once, with the verify token the settings show.
@@ -1,12 +1,13 @@
1
1
  import type { StudioShareSectionProps } from "@engenty-wizards/plugin-sdk/studio";
2
2
  import { Input } from "@engenty-wizards/web/ui";
3
3
  import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
4
- import { useMemo, useState } from "react";
5
- import { renderSVG } from "uqr";
4
+ import { useState } from "react";
6
5
  import { api, type Binding, errorText, KEY, t } from "./app";
7
- import { CopyButton } from "./parts";
8
6
 
9
- /** Under the WhatsApp row of the share dialog: the keyword, the link that writes it, its QR code. */
7
+ /**
8
+ * In the share dialog's settings, while WhatsApp is on: the keyword that picks the wizard. Its
9
+ * number, its link and the QR code the dialog shows itself, from the runner's address.
10
+ */
10
11
  export function ShareSection({ wizard }: StudioShareSectionProps) {
11
12
  const cache = useQueryClient();
12
13
  const binding = useQuery({
@@ -18,14 +19,13 @@ export function ShareSection({ wizard }: StudioShareSectionProps) {
18
19
  mutationFn: (keyword: string) => api().put<Binding>(`/binding/${wizard.id}`, { keyword }),
19
20
  onSuccess: async () => {
20
21
  setDraft(null);
21
- await cache.invalidateQueries({ queryKey: [KEY, "binding", wizard.id] });
22
+ // The dialog's row shows the keyword and the link that writes it.
23
+ await Promise.all([
24
+ cache.invalidateQueries({ queryKey: [KEY, "binding", wizard.id] }),
25
+ cache.invalidateQueries({ queryKey: ["wizard-runners", wizard.id] }),
26
+ ]);
22
27
  },
23
28
  });
24
- const link = binding.data?.link ?? null;
25
- const svg = useMemo(
26
- () => (link ? renderSVG(link, { ecc: "M", border: 1, pixelSize: 6 }) : ""),
27
- [link],
28
- );
29
29
  if (!binding.data) {
30
30
  return null;
31
31
  }
@@ -38,41 +38,23 @@ export function ShareSection({ wizard }: StudioShareSectionProps) {
38
38
  }
39
39
  };
40
40
  return (
41
- <div className="flex items-start gap-3 rounded-lg bg-paper-2 p-3 text-[0.8125rem]">
42
- {svg ? (
43
- <div
44
- role="img"
45
- aria-label={t("link")}
46
- className="size-20 shrink-0 overflow-hidden rounded bg-white [&>svg]:size-full"
47
- // uqr writes the SVG from the link alone: no markup of anyone else's goes in.
48
- // biome-ignore lint/security/noDangerouslySetInnerHtml: generated from the URL only
49
- dangerouslySetInnerHTML={{ __html: svg }}
41
+ <div className="flex flex-col gap-1.5">
42
+ <label className="flex flex-col gap-1.5">
43
+ <span className="font-medium text-[0.875rem]">{t("keyword")}</span>
44
+ <Input
45
+ value={keyword}
46
+ onChange={(e) => setDraft(e.target.value)}
47
+ onBlur={commit}
48
+ onKeyDown={(e) => {
49
+ if (e.key === "Enter") {
50
+ e.currentTarget.blur();
51
+ }
52
+ }}
53
+ className="max-w-xs"
50
54
  />
51
- ) : null}
52
- <div className="flex min-w-0 flex-1 flex-col gap-1.5">
53
- <label className="flex items-center gap-2">
54
- <span className="shrink-0 text-ink-3">{t("keyword")}</span>
55
- <Input
56
- value={keyword}
57
- onChange={(e) => setDraft(e.target.value)}
58
- onBlur={commit}
59
- onKeyDown={(e) => {
60
- if (e.key === "Enter") {
61
- e.currentTarget.blur();
62
- }
63
- }}
64
- className="h-8 max-w-xs text-[0.8125rem]"
65
- />
66
- </label>
67
- {link ? (
68
- <div className="flex min-w-0 items-center gap-1">
69
- <span className="select-all truncate text-ink-3">{link}</span>
70
- <CopyButton text={link} />
71
- </div>
72
- ) : null}
73
- <p className="text-ink-3">{t("keywordHint")}</p>
74
- {save.error ? <p className="text-rose">{errorText(save.error)}</p> : null}
75
- </div>
55
+ </label>
56
+ <p className="text-[0.8125rem] text-ink-3">{t("keywordHint")}</p>
57
+ {save.error ? <p className="text-[0.8125rem] text-rose">{errorText(save.error)}</p> : null}
76
58
  </div>
77
59
  );
78
60
  }
@@ -32,7 +32,6 @@ export const messages = {
32
32
  keyword: "Stichwort",
33
33
  keywordHint:
34
34
  "Wer dieses Wort an die Nummer schreibt, startet den Wizard. Der Link und der QR-Code schreiben es vor.",
35
- link: "Link",
36
35
  error_bad_keyword:
37
36
  "Ein Stichwort besteht aus Buchstaben, Ziffern, Leerzeichen und Bindestrichen, bis zu 40.",
38
37
  error_keyword_taken: "Ein anderer Wizard hat dieses Stichwort schon.",
@@ -72,7 +71,6 @@ export const messages = {
72
71
  keyword: "Keyword",
73
72
  keywordHint:
74
73
  "Whoever writes this word to the number starts the wizard. The link and the QR code write it for them.",
75
- link: "Link",
76
74
  error_bad_keyword: "A keyword is letters, digits, spaces and dashes, up to 40.",
77
75
  error_keyword_taken: "Another wizard has this keyword already.",
78
76
  error_no_token: "An access token is needed.",
@@ -640,6 +640,19 @@ export interface PluginRunnerRequest {
640
640
  path: string;
641
641
  query: URLSearchParams;
642
642
  }
643
+ /**
644
+ * Where a person reaches a wizard through a channel runner, as the share dialog shows it: the
645
+ * number with the keyword that picks the wizard there, and the link that opens the channel with
646
+ * the keyword written.
647
+ */
648
+ export interface PluginRunnerAddress {
649
+ /** The number people write to or call, with the country code: `+43660…`. */
650
+ number?: string | null;
651
+ /** The word that picks this wizard on that number. */
652
+ keyword?: string | null;
653
+ /** Opens the channel with the keyword written (`sms:…`, `https://wa.me/…`): copied, and as a QR code. */
654
+ link?: string | null;
655
+ }
643
656
  /**
644
657
  * A runner: a door a wizard runs through, beside the built-in page and chat. A `page` runner is
645
658
  * served at `/w/<token>/<id>` for every wizard that switched it on; a `channel` runner has an
@@ -662,6 +675,15 @@ export interface PluginRunner {
662
675
  * studio lists the runners; a runner with a problem cannot be switched on.
663
676
  */
664
677
  problem?(): string | null | Promise<string | null>;
678
+ /**
679
+ * A channel runner: where a person reaches the wizard, for the share dialog; null while the
680
+ * runner is not set up. Asked inside the tenant for each wizard that has the runner on.
681
+ */
682
+ address?(wizard: {
683
+ id: string;
684
+ title: string;
685
+ token: string;
686
+ }): PluginRunnerAddress | null | Promise<PluginRunnerAddress | null>;
665
687
  }
666
688
  /** How a run answers a review: accept it, with edited texts where the review allows, or ask for one of the shown steps again. */
667
689
  export type PluginReviewAction = {
@@ -64,8 +64,9 @@ export interface StudioShareSectionProps {
64
64
  };
65
65
  }
66
66
  /**
67
- * A runner's own part of the share dialog, under the runner's row once it is switched on for
68
- * the wizard: the keyword, the number, the link and its QR code. One per runner.
67
+ * A runner's own settings for a wizard, in the share dialog's settings while the runner is on:
68
+ * the keyword that picks it, say. Its address and link the dialog shows itself, from the
69
+ * runner's `address`. One per runner.
69
70
  */
70
71
  export interface StudioShareSection {
71
72
  /** The runner's id, as the server half registered it. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wizards",
3
- "version": "0.3.4",
3
+ "version": "0.3.5",
4
4
  "description": "Make a wish. Get your wizard. It guides you step by step. Let AI do the work. Runs on your machine, on the AI subscription you already have.",
5
5
  "license": "FSL-1.1-MIT",
6
6
  "homepage": "https://engenty.ai",
@@ -1 +0,0 @@
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}from"./logo-C4V2_3Ar.js";import{t as i}from"./preload-helper-CNEI7N0N.js";import{Ct as a,Dt as o,Tt as s,Xt as c,bt as l,ft as u,ht as d,jt as f,kt as p,mt as m,pt as h,tn as g}from"./ui-DvVx6UaI.js";import{H as _,U as v,et as y}from"./index-el4ca54i.js";import{c as b,f as x}from"./settings-menu-ByDquXGe.js";import{ReleaseNotes as S,loadReleases as C,releaseDate as w,releaseLabel as T}from"./ChangelogDialog-CnCeRFkR.js";var E=e(t(),1),D=[{name:`engenty wizards`,description:{de:`KI-Wizards aus einer Beschreibung, mit einem Link geteilt.`,en:`AI wizards built from a description, shared with a link.`},homepage:`https://github.com/engenty/wizards`,license:`FSL-1.1-MIT`},{name:`engenty`,description:{de:`Konnektoren, Datentabellen, Suche und die Engenties stammen aus dem engenty-Framework.`,en:`Connectors, data tables, search and the engenties come from the engenty framework.`},homepage:`https://github.com/engenty/engenty`,license:`FSL-1.1-MIT`}],O=[{name:`Mastra`,description:{de:`Agent-Framework hinter den KI-Schritten.`,en:`Agent framework behind the AI steps.`},homepage:`https://github.com/mastra-ai/mastra`,license:`Apache-2.0`},{name:`AI SDK`,description:{de:`Modell-Aufrufe für Text, Bild, Video und Sprache.`,en:`Model calls for text, image, video and speech.`},homepage:`https://github.com/vercel/ai`,license:`Apache-2.0`},{name:`Model Context Protocol`,description:{de:`MCP-Server zum Bauen von Wizards, MCP-Client für Werkzeuge der Schritte.`,en:`MCP server for building wizards, MCP client for the steps' tools.`},homepage:`https://github.com/modelcontextprotocol/typescript-sdk`,license:`MIT`},{name:`Hono`,description:{de:`HTTP-API der Runtime.`,en:`The runtime's HTTP API.`},homepage:`https://github.com/honojs/hono`,license:`MIT`},{name:`Drizzle ORM`,description:{de:`Schema und Migrationen der Datenbanken.`,en:`Schema and migrations of the databases.`},homepage:`https://github.com/drizzle-team/drizzle-orm`,license:`Apache-2.0`},{name:`libSQL`,description:{de:`Eine Datenbank je Mandant, lokal als Datei oder bei Turso.`,en:`One database per tenant, a local file or at Turso.`},homepage:`https://github.com/tursodatabase/libsql`,license:`MIT`},{name:`Playwright`,description:{de:`Browser-Schritte sowie PDF- und PNG-Export.`,en:`Browser steps and the PDF and PNG export.`},homepage:`https://github.com/microsoft/playwright`,license:`Apache-2.0`},{name:`agentOS`,description:{de:`Sandbox für Code-Schritte ohne Docker.`,en:`Sandbox for code steps without Docker.`},homepage:`https://github.com/rivet-dev/agentos`,license:`Apache-2.0`},{name:`React`,description:{de:`UI-Bibliothek der Web-App.`,en:`UI library of the web app.`},homepage:`https://github.com/facebook/react`,license:`MIT`},{name:`Vite`,description:{de:`Build-Werkzeug der Web-App.`,en:`Build tool of the web app.`},homepage:`https://github.com/vitejs/vite`,license:`MIT`},{name:`Tailwind CSS`,description:{de:`Styling der Oberfläche.`,en:`Styling of the interface.`},homepage:`https://github.com/tailwindlabs/tailwindcss`,license:`MIT`},{name:`React Flow`,description:{de:`Das Diagramm der Schritte im Editor.`,en:`The diagram of steps in the editor.`},homepage:`https://github.com/xyflow/xyflow`,license:`MIT`},{name:`TanStack Query`,description:{de:`Server-Daten in der Web-App.`,en:`Server data in the web app.`},homepage:`https://github.com/TanStack/query`,license:`MIT`},{name:`xterm.js`,description:{de:`Das Terminal auf der Seite, in dem sich KI-Clients anmelden.`,en:`The terminal on the page where AI clients sign in.`},homepage:`https://github.com/xtermjs/xterm.js`,license:`MIT`},{name:`Lucide`,description:{de:`Icons.`,en:`Icons.`},homepage:`https://github.com/lucide-icons/lucide`,license:`ISC`},{name:`Geist & Geist Mono`,description:{de:`Schrift der Oberfläche.`,en:`Typeface of the interface.`},homepage:`https://github.com/vercel/geist-font`,license:`OFL-1.1`},{name:`Space Grotesk`,description:{de:`Schrift der Überschriften.`,en:`Typeface of the headings.`},homepage:`https://github.com/floriankarsten/space-grotesk`,license:`OFL-1.1`},{name:`git-cliff`,description:{de:`Erzeugt den Changelog aus den Commits.`,en:`Generates the changelog from the commits.`},homepage:`https://github.com/orhun/git-cliff`,license:`MIT OR Apache-2.0`}],k=e(n(),1),A=(e,...t)=>t.some(t=>t?.toLowerCase().includes(e));function j({name:e,homepage:t,version:n,license:r,description:i}){return(0,k.jsxs)(`li`,{className:`py-2.5`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-x-2.5 gap-y-0.5`,children:[t?(0,k.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,k.jsx)(c,{"aria-hidden":!0,className:`size-3 text-ink-4`})]}):(0,k.jsx)(`span`,{className:`font-medium text-[0.875rem] text-ink`,children:e}),n?(0,k.jsx)(`span`,{className:`text-[0.75rem] text-ink-3 tabular-nums`,children:n}):null,(0,k.jsx)(`span`,{className:`text-[0.75rem] text-ink-3`,children:r})]}),i?(0,k.jsx)(`p`,{className:`mt-0.5 text-[0.8125rem] text-ink-3`,children:i}):null]})}function M({title:e,hint:t,children:n}){return(0,k.jsxs)(`section`,{className:`mt-6`,children:[(0,k.jsx)(`h3`,{className:`border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:e}),t?(0,k.jsx)(`p`,{className:`mt-2 text-[0.8125rem] text-ink-3`,children:t}):null,n]})}function N({credits:e}){return(0,k.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:e.map(e=>(0,k.jsx)(j,{name:e.name,homepage:e.homepage,license:e.license,description:e.description[o]},e.name))})}function P({label:e,packages:t}){return(0,k.jsxs)(`div`,{className:`mt-4`,children:[(0,k.jsx)(`h4`,{className:`font-medium text-[0.75rem] text-ink-3 tracking-wide`,children:e}),(0,k.jsx)(`ul`,{className:`divide-y divide-border-soft`,children:t.map(e=>(0,k.jsx)(j,{...e},e.name))})]})}function F({active:e}){let[t,n]=(0,E.useState)(null),[r,a]=(0,E.useState)(``);(0,E.useEffect)(()=>{if(!e||t)return;let r=!1;return i(()=>import(`./oss-credits-BQQX0kvk.js`).then(e=>{r||n(e.default)}),[]),()=>{r=!0}},[e,t]),(0,E.useEffect)(()=>{e||a(``)},[e]);let o=r.trim().toLowerCase(),s=e=>o?e.filter(e=>A(o,e.name,e.license,e.description.de,e.description.en)):e,c=e=>o?e.filter(e=>A(o,e.name,e.license,e.version)):e,u=s(D),f=s(O),m=t?[{id:`shared`,label:p(`about.creditsShared`),packages:c(t.shared)},...t.groups.map(e=>({id:e.id,label:e.label,packages:c(e.packages)}))].filter(e=>e.packages.length>0):[],g=u.length===0&&f.length===0&&m.length===0;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`p`,{className:`mb-4 text-[0.875rem] text-ink-3`,children:p(`about.creditsHint`)}),(0,k.jsx)(d,{type:`search`,value:r,placeholder:p(`about.search`),onChange:e=>a(e.target.value)}),u.length>0?(0,k.jsx)(M,{title:p(`about.creditsProduct`),children:(0,k.jsx)(N,{credits:u})}):null,f.length>0?(0,k.jsx)(M,{title:p(`about.creditsBuiltWith`),children:(0,k.jsx)(N,{credits:f})}):null,t===null?(0,k.jsx)(`div`,{className:`flex justify-center py-10 text-ink-3`,children:(0,k.jsx)(l,{})}):m.length>0?(0,k.jsx)(M,{title:p(`about.creditsDeps`),hint:o?void 0:p(`about.creditsDepsHint`),children:m.map(e=>(0,k.jsx)(P,{label:e.label,packages:e.packages},e.id))}):null,t!==null&&g?(0,k.jsx)(h,{children:p(`about.noMatches`)}):null]})}var I=[`new`,`earlier`,`credits`],L=e=>p(e===`new`?`about.tab.new`:e===`earlier`?`about.tab.earlier`:`about.credits`),R=e=>e===1?p(`about.change`):p(`about.changes`,{n:e});function z({open:e,onClose:t,me:n}){let i=n?.mode===`local`,{data:o,latest:c}=v(i&&e),[d,h]=(0,E.useState)(null),[D,O]=(0,E.useState)(`new`),A=x(I.indexOf(D)),j=o?.newer&&c?c:y;(0,E.useEffect)(()=>{if(!e)return;let t=!1;return h(null),C(j===`0.3.4`?void 0:j).then(e=>{t||h(e)}),()=>{t=!0}},[e,j]);let M=d?.find(e=>e.version===`v${j}`)??d?.[0]??null,N=d?.filter(e=>e!==M)??[],P=i?o?.kind??null:`cloud`;return(0,k.jsxs)(u,{open:e,onClose:t,wide:!0,height:`tall`,children:[(0,k.jsx)(`div`,{className:`-mt-2 -mr-2 sticky top-0 z-10 flex h-0 justify-end`,children:(0,k.jsx)(m,{label:p(`common.close`),onClick:t,children:(0,k.jsx)(f,{className:`size-4`})})}),(0,k.jsxs)(`div`,{className:`flex flex-col items-center pt-4 text-center`,children:[(0,k.jsx)(r,{size:96}),(0,k.jsxs)(`div`,{className:`mt-4 font-display font-semibold text-[1.5rem] tracking-tight`,children:[`engenty`,(0,k.jsx)(`span`,{className:`text-ember`,children:`.`}),(0,k.jsx)(`span`,{className:`ml-1.5 font-normal text-ink-3`,children:`wizards`})]}),(0,k.jsxs)(`div`,{className:`mt-1 text-[0.9375rem] text-ink-3 tabular-nums`,children:[p(`about.version`,{v:y}),P?` · ${p(`about.kind.${P}`)}`:``]})]}),i?(0,k.jsx)(`div`,{className:`mt-5`,children:(0,k.jsx)(_,{enabled:e})}):null,(0,k.jsx)(`div`,{className:`mt-6 flex justify-center`,children:(0,k.jsx)(a,{value:D,onChange:O,options:I.map(e=>({id:e,label:L(e)})),label:p(`about.title`)})}),(0,k.jsxs)(`div`,{className:s(`mt-5`,b(A)),children:[D===`new`?d===null?(0,k.jsx)(`div`,{className:`flex justify-center py-6 text-ink-3`,children:(0,k.jsx)(l,{})}):M?(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(`h3`,{className:`flex items-baseline gap-3 border-border-soft border-b pb-2 font-display font-semibold text-[1rem]`,children:[T(M),(0,k.jsx)(`span`,{className:`font-normal font-sans text-[0.8125rem] text-ink-3 tabular-nums`,children:w(M)})]}),(0,k.jsx)(`div`,{className:`mt-3`,children:(0,k.jsx)(S,{release:M})})]}):(0,k.jsx)(`p`,{className:`text-[0.875rem] text-ink-3`,children:p(`about.changelogEmpty`)}):null,D===`earlier`?(0,k.jsx)(`div`,{className:`flex flex-col divide-y divide-border-soft`,children:N.map(e=>(0,k.jsxs)(`details`,{className:`group/r py-2`,children:[(0,k.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-baseline gap-3 text-[0.875rem] [&::-webkit-details-marker]:hidden`,children:[(0,k.jsx)(g,{className:`size-3.5 shrink-0 self-center text-ink-4 transition group-open/r:rotate-90`}),(0,k.jsx)(`span`,{className:`font-medium text-ink tabular-nums`,children:T(e)}),(0,k.jsx)(`span`,{className:`text-[0.8125rem] text-ink-3 tabular-nums`,children:w(e)}),(0,k.jsx)(`span`,{className:`ml-auto text-[0.8125rem] text-ink-4`,children:R(e.commits.length)})]}),(0,k.jsx)(`div`,{className:`mt-2 pl-6`,children:(0,k.jsx)(S,{release:e})})]},e.version??`unreleased`))}):null,D===`credits`?(0,k.jsx)(F,{active:!0}):null]},D)]})}export{z as AboutDialog};