wizards 0.3.4 → 0.3.6

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 (74) 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 +55 -49
  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/routes/studio.js +15 -2
  11. package/apps/runtime/dist/services/runners.js +27 -3
  12. package/apps/runtime/dist/services/wizards.js +25 -0
  13. package/apps/web/dist/assets/AboutDialog-Dz_tYBSU.js +1 -0
  14. package/apps/web/dist/assets/{ChangelogDialog-CnCeRFkR.js → ChangelogDialog-m2M7gZiB.js} +1 -1
  15. package/apps/web/dist/assets/{ChatView-_k7wJYub.js → ChatView-D21o-lq8.js} +4 -4
  16. package/apps/web/dist/assets/EditorPage-D6j3dQpu.js +3 -0
  17. package/apps/web/dist/assets/{FlowPreview-BlaTL3Q5.js → FlowPreview-BdRy7FO7.js} +1 -1
  18. package/apps/web/dist/assets/{Harness-DfwXxN7O.js → Harness-DmJkTwOO.js} +1 -1
  19. package/apps/web/dist/assets/{Marketplace-Cm0GtMfe.js → Marketplace-B-gy2onK.js} +2 -2
  20. package/apps/web/dist/assets/NewWizardChannels-B3FEpsJ-.js +1 -0
  21. package/apps/web/dist/assets/NewWizardPage-CT1lThNM.js +7 -0
  22. package/apps/web/dist/assets/ProjectPage-BIanCF0m.js +2 -0
  23. package/apps/web/dist/assets/PublicRunner-H1fXa9BK.js +1 -0
  24. package/apps/web/dist/assets/{ReadOnly-D5yjDrcZ.js → ReadOnly-CaGzgOPe.js} +1 -1
  25. package/apps/web/dist/assets/RunDrawer-8sjkAbm5.js +4 -0
  26. package/apps/web/dist/assets/{RunnerView-5vuR0e1A.js → RunnerView-CJ4cLA_0.js} +1 -1
  27. package/apps/web/dist/assets/SettingsPage-BsdwE1OA.js +1 -0
  28. package/apps/web/dist/assets/SetupPage-sqrv7Auf.js +1 -0
  29. package/apps/web/dist/assets/{SharePage-CC7bLW3F.js → SharePage-B6ets1ot.js} +1 -1
  30. package/apps/web/dist/assets/{brand-DWV3he4_.js → brand-BRw18WJF.js} +1 -1
  31. package/apps/web/dist/assets/{changelog-BXmIXuLq.js → changelog-BOFdRjx2.js} +1 -1
  32. package/apps/web/dist/assets/{circle-alert-DbM8qXuP.js → circle-alert-CpuMIhbH.js} +1 -1
  33. package/apps/web/dist/assets/{esm-CUTQmLIn.js → esm-DRaZAcXQ.js} +1 -1
  34. package/apps/web/dist/assets/index-DY9CslcT.css +1 -0
  35. package/apps/web/dist/assets/index-DkDBEMwz.js +11 -0
  36. package/apps/web/dist/assets/{lock-DtzL98Xo.js → lock-BGotwAyN.js} +1 -1
  37. package/apps/web/dist/assets/{phone-CwgJEPhS.js → phone-CA2A8W7I.js} +1 -1
  38. package/apps/web/dist/assets/{session-Cv1rnTuW.js → session-DBOQL_bg.js} +1 -1
  39. package/apps/web/dist/assets/{settings-menu-ByDquXGe.js → settings-menu-DxswVOqQ.js} +1 -1
  40. package/apps/web/dist/assets/{ui-DvVx6UaI.js → ui-DAHMnAVc.js} +2 -2
  41. package/apps/web/dist/assets/{upload-C5dPn7iT.js → upload-DLbJVvfd.js} +1 -1
  42. package/apps/web/dist/assets/{volume-2-BYk2L8r1.js → volume-2-KaKQ4zMJ.js} +1 -1
  43. package/apps/web/dist/index.html +7 -7
  44. package/apps/web/dist/mcp/flow.html +2 -2
  45. package/modules/sms/dist/client.css +1 -1
  46. package/modules/sms/dist/client.js +1 -1
  47. package/modules/sms/package.json +0 -1
  48. package/modules/sms/src/plugin.ts +5 -0
  49. package/modules/sms/ui/Share.tsx +26 -44
  50. package/modules/sms/ui/messages.ts +0 -2
  51. package/modules/whatsapp/dist/client.css +1 -1
  52. package/modules/whatsapp/dist/client.js +1 -1
  53. package/modules/whatsapp/package.json +0 -1
  54. package/modules/whatsapp/src/plugin.ts +5 -0
  55. package/modules/whatsapp/ui/Share.tsx +26 -44
  56. package/modules/whatsapp/ui/messages.ts +0 -2
  57. package/node_modules/@engenty-wizards/plugin-sdk/dist/index.d.ts +22 -0
  58. package/node_modules/@engenty-wizards/plugin-sdk/dist/studio.d.ts +3 -2
  59. package/node_modules/@engenty-wizards/shared/dist/changes.d.ts +22 -0
  60. package/node_modules/@engenty-wizards/shared/dist/changes.js +61 -0
  61. package/node_modules/@engenty-wizards/shared/dist/definition.d.ts +8 -8
  62. package/node_modules/@engenty-wizards/shared/dist/marketplace.d.ts +1 -1
  63. package/node_modules/@engenty-wizards/shared/dist/wizard-package.d.ts +1 -1
  64. package/package.json +1 -1
  65. package/apps/web/dist/assets/AboutDialog-Dns0PM5q.js +0 -1
  66. package/apps/web/dist/assets/EditorPage-B6dB3kY9.js +0 -3
  67. package/apps/web/dist/assets/NewWizardPage-0_ri8UDV.js +0 -7
  68. package/apps/web/dist/assets/ProjectPage-DYTyw26k.js +0 -2
  69. package/apps/web/dist/assets/PublicRunner-BNqXEj7z.js +0 -1
  70. package/apps/web/dist/assets/RunDrawer-CjqXvRGl.js +0 -4
  71. package/apps/web/dist/assets/SettingsPage-CLqZCmvY.js +0 -1
  72. package/apps/web/dist/assets/SetupPage-C7ke4Bwb.js +0 -1
  73. package/apps/web/dist/assets/index-CfPcXmew.css +0 -1
  74. 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. */
@@ -0,0 +1,22 @@
1
+ import type { WizardDefinition } from "./definition.js";
2
+ import type { WorkspaceFile } from "./workspace.js";
3
+ /**
4
+ * What changed in a draft since the version people run: the wizard's own settings, each step
5
+ * by its title, the steps' order, the workspace's files. "Änderungen live schalten" lists it.
6
+ */
7
+ export interface VersionChange {
8
+ kind: "wizard" | "step" | "order" | "file";
9
+ change: "added" | "removed" | "changed";
10
+ /** The step's title or the file's path. */
11
+ name?: string;
12
+ /** What of a changed step or of the wizard itself: the definition's keys (`instructions`, `fields`). */
13
+ parts?: string[];
14
+ }
15
+ /** A version as it runs: its definition and its workspace. */
16
+ interface Version {
17
+ definition: WizardDefinition;
18
+ files: Pick<WorkspaceFile, "path" | "hash">[];
19
+ }
20
+ /** What `after` changes of `before`: the wizard first, then its steps in their new order, then its files. */
21
+ export declare function versionChanges(before: Version, after: Version): VersionChange[];
22
+ export {};
@@ -0,0 +1,61 @@
1
+ const same = (a, b) => JSON.stringify(a) === JSON.stringify(b);
2
+ /** The keys whose values differ, in the order the newer one has them. */
3
+ function keysChanged(before, after) {
4
+ const was = before;
5
+ const now = after;
6
+ const keys = [...new Set([...Object.keys(now), ...Object.keys(was)])];
7
+ return keys.filter((k) => !same(was[k], now[k]));
8
+ }
9
+ /** What `after` changes of `before`: the wizard first, then its steps in their new order, then its files. */
10
+ export function versionChanges(before, after) {
11
+ const changes = [];
12
+ const { steps: oldSteps, ...oldWizard } = before.definition;
13
+ const { steps: newSteps, ...newWizard } = after.definition;
14
+ const parts = keysChanged(oldWizard, newWizard);
15
+ if (parts.length) {
16
+ changes.push({ kind: "wizard", change: "changed", parts });
17
+ }
18
+ const old = new Map(oldSteps.map((s) => [s.id, s]));
19
+ const now = new Set(newSteps.map((s) => s.id));
20
+ for (const step of newSteps) {
21
+ const was = old.get(step.id);
22
+ if (!was) {
23
+ changes.push({ kind: "step", change: "added", name: step.title });
24
+ }
25
+ else if (!same(was, step)) {
26
+ changes.push({
27
+ kind: "step",
28
+ change: "changed",
29
+ name: step.title,
30
+ parts: keysChanged(was, step).filter((k) => k !== "id"),
31
+ });
32
+ }
33
+ }
34
+ for (const step of oldSteps) {
35
+ if (!now.has(step.id)) {
36
+ changes.push({ kind: "step", change: "removed", name: step.title });
37
+ }
38
+ }
39
+ // The steps both have, in each one's order: a move is one change, however many steps moved.
40
+ const kept = (steps) => steps.map((s) => s.id).filter((id) => old.has(id) && now.has(id));
41
+ if (!same(kept(oldSteps), kept(newSteps))) {
42
+ changes.push({ kind: "order", change: "changed" });
43
+ }
44
+ const oldFiles = new Map(before.files.map((f) => [f.path, f.hash]));
45
+ const newFiles = new Map(after.files.map((f) => [f.path, f.hash]));
46
+ for (const [path, hash] of newFiles) {
47
+ const was = oldFiles.get(path);
48
+ if (was === undefined) {
49
+ changes.push({ kind: "file", change: "added", name: path });
50
+ }
51
+ else if (was !== hash) {
52
+ changes.push({ kind: "file", change: "changed", name: path });
53
+ }
54
+ }
55
+ for (const path of oldFiles.keys()) {
56
+ if (!newFiles.has(path)) {
57
+ changes.push({ kind: "file", change: "removed", name: path });
58
+ }
59
+ }
60
+ return changes;
61
+ }
@@ -285,12 +285,12 @@ export declare const outputFieldSchema: z.ZodObject<{
285
285
  id: z.ZodString;
286
286
  kind: z.ZodEnum<{
287
287
  number: "number";
288
- choice: "choice";
289
- score: "score";
290
288
  text: "text";
291
289
  list: "list";
292
290
  table: "table";
293
291
  yesno: "yesno";
292
+ choice: "choice";
293
+ score: "score";
294
294
  }>;
295
295
  description: z.ZodOptional<z.ZodString>;
296
296
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -460,12 +460,12 @@ export declare const agentStepSchema: z.ZodObject<{
460
460
  id: z.ZodString;
461
461
  kind: z.ZodEnum<{
462
462
  number: "number";
463
- choice: "choice";
464
- score: "score";
465
463
  text: "text";
466
464
  list: "list";
467
465
  table: "table";
468
466
  yesno: "yesno";
467
+ choice: "choice";
468
+ score: "score";
469
469
  }>;
470
470
  description: z.ZodOptional<z.ZodString>;
471
471
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1142,12 +1142,12 @@ export declare const stepSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1142
1142
  id: z.ZodString;
1143
1143
  kind: z.ZodEnum<{
1144
1144
  number: "number";
1145
- choice: "choice";
1146
- score: "score";
1147
1145
  text: "text";
1148
1146
  list: "list";
1149
1147
  table: "table";
1150
1148
  yesno: "yesno";
1149
+ choice: "choice";
1150
+ score: "score";
1151
1151
  }>;
1152
1152
  description: z.ZodOptional<z.ZodString>;
1153
1153
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -2076,12 +2076,12 @@ export declare const wizardSchema: z.ZodObject<{
2076
2076
  id: z.ZodString;
2077
2077
  kind: z.ZodEnum<{
2078
2078
  number: "number";
2079
- choice: "choice";
2080
- score: "score";
2081
2079
  text: "text";
2082
2080
  list: "list";
2083
2081
  table: "table";
2084
2082
  yesno: "yesno";
2083
+ choice: "choice";
2084
+ score: "score";
2085
2085
  }>;
2086
2086
  description: z.ZodOptional<z.ZodString>;
2087
2087
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -214,7 +214,7 @@ export type MarketplacePlan = keyof typeof MARKETPLACE_PLANS;
214
214
  export declare const ITEM_FORMAT_IDS: ("text" | "image" | "audio" | "video" | "document" | "dashboard" | "table")[];
215
215
  export declare const INDUSTRY_IDS: ("any" | "trades" | "gastronomy" | "hospitality" | "realEstate" | "retail" | "health" | "professional" | "agency" | "events" | "publicSector")[];
216
216
  export declare const USE_CASE_IDS: ("marketing" | "sales" | "accounting" | "service" | "research" | "hr" | "operations" | "website" | "visuals" | "inquiries" | "advice")[];
217
- export declare const CAPABILITY_IDS: ("code" | "text" | "image" | "browser" | "video" | "speech" | "film" | "web" | "documents" | "listening" | "connectors")[];
217
+ export declare const CAPABILITY_IDS: ("text" | "code" | "image" | "browser" | "video" | "speech" | "film" | "web" | "documents" | "listening" | "connectors")[];
218
218
  export declare const MARKETPLACE_PLAN_IDS: ("free" | "pro")[];
219
219
  /** The formats a run hands over, read from what the result step offers. */
220
220
  export declare function formatsOf(def: WizardDefinition): ItemFormat[];
@@ -32,8 +32,8 @@ export declare const manifestSchema: z.ZodObject<{
32
32
  name: z.ZodString;
33
33
  domain: z.ZodOptional<z.ZodString>;
34
34
  sourceKind: z.ZodOptional<z.ZodEnum<{
35
- openapi: "openapi";
36
35
  mcp: "mcp";
36
+ openapi: "openapi";
37
37
  }>>;
38
38
  }, z.core.$strip>>>;
39
39
  mcpServers: z.ZodDefault<z.ZodArray<z.ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wizards",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
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};