wizards 0.5.11 → 0.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/runtime/dist/browser/fast/action-space.js +0 -2
- package/apps/runtime/dist/cli/mcp.js +2 -15
- package/apps/runtime/dist/cli/report.js +2 -15
- package/apps/runtime/dist/cli/start.js +28 -14
- package/apps/runtime/dist/cli/status.js +1 -1
- package/apps/runtime/dist/credits/credits.js +0 -3
- package/apps/runtime/dist/db/client.js +0 -7
- package/apps/runtime/dist/docs/user/build-a-wizard.md +1 -1
- package/apps/runtime/dist/engine/runner.js +12 -7
- package/apps/runtime/dist/harness/index.js +0 -4
- package/apps/runtime/dist/manage.js +7 -7
- package/apps/runtime/dist/plugins/pro.js +0 -6
- package/apps/runtime/dist/render/convert.js +0 -3
- package/apps/runtime/dist/routes/studio.js +42 -6
- package/apps/runtime/dist/services/api.js +8 -6
- package/apps/runtime/dist/store/index.js +0 -11
- package/apps/runtime/dist/texts.js +45 -39
- package/apps/web/dist/assets/{AboutDialog-L1hcshAX.js → AboutDialog-DvkE9J4h.js} +1 -1
- package/apps/web/dist/assets/{ChangelogDialog-DZLYVOkl.js → ChangelogDialog-BZ8i3wt_.js} +1 -1
- package/apps/web/dist/assets/{ChatView-GNHi9ZnZ.js → ChatView-DIDIR0mb.js} +1 -1
- package/apps/web/dist/assets/{EditorPage-COJunH8K.js → EditorPage-BYysznX3.js} +1 -1
- package/apps/web/dist/assets/{FlowPreview-CTEJi5TQ.js → FlowPreview-DG23aI89.js} +1 -1
- package/apps/web/dist/assets/{Harness-CApAHvJE.js → Harness-CFh04TZ3.js} +1 -1
- package/apps/web/dist/assets/{NewWizardChannels-tst10rkV.js → NewWizardChannels-Bmo5yRCv.js} +1 -1
- package/apps/web/dist/assets/{NewWizardPage-BAKaUY1g.js → NewWizardPage-4n9-ZmHt.js} +1 -1
- package/apps/web/dist/assets/OnboardingPage-DpZv9qEO.js +1 -0
- package/apps/web/dist/assets/{ProjectPage-DaerYm8A.js → ProjectPage-IQb9RFlm.js} +1 -1
- package/apps/web/dist/assets/{PublicRunner-Hms0Vi88.js → PublicRunner-Da0klKj-.js} +1 -1
- package/apps/web/dist/assets/{ReadOnly-Bb8khbuH.js → ReadOnly-C_jD7KjW.js} +1 -1
- package/apps/web/dist/assets/{RunDrawer-DWaC_ryo.js → RunDrawer-FwLK67Yn.js} +1 -1
- package/apps/web/dist/assets/{RunnerView-D5BQ99ah.js → RunnerView-BBuphCkK.js} +1 -1
- package/apps/web/dist/assets/{SettingsPage-CQX6fKsa.js → SettingsPage-CZx52Ubk.js} +1 -1
- package/apps/web/dist/assets/{SetupPage-BZkbpN_V.js → SetupPage-B-o7VhbI.js} +1 -1
- package/apps/web/dist/assets/{SharePage-Bb-BIvAX.js → SharePage-k2OMGOWU.js} +1 -1
- package/apps/web/dist/assets/changelog-9oSWVuP-.js +1 -0
- package/apps/web/dist/assets/{esm-pbWES-Cu.js → esm-Dzqe3TT4.js} +1 -1
- package/apps/web/dist/assets/{index-BVWLhiGX.js → index-93fPRTxr.js} +4 -4
- package/apps/web/dist/assets/index-DaKjB676.css +1 -0
- package/apps/web/dist/assets/{lock-C6LaSCq_.js → lock-a8rDnyg5.js} +1 -1
- package/apps/web/dist/assets/{phone-BUWpzNWn.js → phone-CitA6oZn.js} +1 -1
- package/apps/web/dist/assets/{settings-menu-yO8b8LjQ.js → settings-menu-COgM8CgB.js} +1 -1
- package/apps/web/dist/assets/{ui-i5saQjmD.js → ui-CeZNNuaK.js} +1 -1
- package/apps/web/dist/assets/{upload-D89fyY2-.js → upload-CcKFwoPd.js} +1 -1
- package/apps/web/dist/index.html +3 -3
- package/apps/web/dist/mcp/flow.html +2 -2
- package/node_modules/@engenty-wizards/plugin-sdk/dist/thread.js +34 -34
- package/node_modules/@engenty-wizards/shared/dist/definition.d.ts +0 -6
- package/node_modules/@engenty-wizards/shared/dist/definition.js +0 -10
- package/node_modules/@engenty-wizards/shared/dist/features.d.ts +0 -1
- package/node_modules/@engenty-wizards/shared/dist/features.js +0 -1
- package/node_modules/@engenty-wizards/shared/dist/marketplace.d.ts +0 -5
- package/node_modules/@engenty-wizards/shared/dist/marketplace.js +0 -5
- package/node_modules/@engenty-wizards/shared/dist/providers.d.ts +1 -1
- package/node_modules/@engenty-wizards/shared/dist/providers.js +1 -1
- package/node_modules/@engenty-wizards/shared/dist/run.js +1 -1
- package/package.json +1 -1
- package/apps/web/dist/assets/OnboardingPage-Di8AuZj_.js +0 -1
- package/apps/web/dist/assets/changelog-BUHje4CT.js +0 -1
- package/apps/web/dist/assets/index-DmQEcSlY.css +0 -1
|
@@ -14,27 +14,27 @@ const texts = {
|
|
|
14
14
|
nothing: "Hier ist noch kein Wizard verbunden.",
|
|
15
15
|
which: "Welcher Wizard soll es sein?",
|
|
16
16
|
choose: "Auswählen",
|
|
17
|
-
over: "Dieser
|
|
18
|
-
stopped: "Abgebrochen. Mit dem Stichwort
|
|
19
|
-
optional: "(freiwillig – „weiter“
|
|
20
|
-
pickOne: "
|
|
17
|
+
over: "Dieser Lauf ist beendet. Mit dem Stichwort startest du einen neuen.",
|
|
18
|
+
stopped: "Abgebrochen. Mit dem Stichwort startest du einen neuen Lauf.",
|
|
19
|
+
optional: "(freiwillig – mit „weiter“ überspringst du es)",
|
|
20
|
+
pickOne: "Wähl eine der Möglichkeiten.",
|
|
21
21
|
picked: "Gewählt: {list}",
|
|
22
22
|
more: "Noch etwas?",
|
|
23
23
|
done: "Fertig",
|
|
24
24
|
yes: "Ja",
|
|
25
25
|
no: "Nein",
|
|
26
|
-
yesOrNo: "
|
|
27
|
-
asText: "
|
|
28
|
-
asDate: "
|
|
29
|
-
sendPhoto: "
|
|
30
|
-
sendFile: "
|
|
31
|
-
sendVoice: "
|
|
26
|
+
yesOrNo: "Antworte mit Ja oder Nein.",
|
|
27
|
+
asText: "Antworte mit einem Text.",
|
|
28
|
+
asDate: "Schick ein Datum, zum Beispiel 24.12.2026.",
|
|
29
|
+
sendPhoto: "Schick ein Foto.",
|
|
30
|
+
sendFile: "Schick eine Datei.",
|
|
31
|
+
sendVoice: "Schick eine Sprachnachricht.",
|
|
32
32
|
another: "Noch eins",
|
|
33
|
-
whereAre: "
|
|
34
|
-
needed: "
|
|
35
|
-
screen: "
|
|
33
|
+
whereAre: "Teil deinen Standort oder schreib die Adresse.",
|
|
34
|
+
needed: "Dafür brauche ich eine Antwort.",
|
|
35
|
+
screen: "Dieser Teil braucht einen Bildschirm. Danach geht es hier weiter.",
|
|
36
36
|
open: "Öffnen",
|
|
37
|
-
working: "{step}
|
|
37
|
+
working: "{step} – das dauert einen Moment.",
|
|
38
38
|
reviewAsk: "Passt das so?",
|
|
39
39
|
reviewOk: "Passt",
|
|
40
40
|
reviewRedo: "Neue Version",
|
|
@@ -42,43 +42,43 @@ const texts = {
|
|
|
42
42
|
reviewNote: "Was soll anders sein?",
|
|
43
43
|
allow: "Erlauben",
|
|
44
44
|
skip: "Überspringen",
|
|
45
|
-
finished: "Fertig
|
|
46
|
-
failed: "Der Wizard ist
|
|
45
|
+
finished: "Fertig. Alles liegt hier:",
|
|
46
|
+
failed: "Der Wizard ist stehen geblieben. Hier geht es weiter:",
|
|
47
47
|
},
|
|
48
48
|
en: {
|
|
49
49
|
nothing: "No wizard is connected here yet.",
|
|
50
50
|
which: "Which wizard?",
|
|
51
51
|
choose: "Choose",
|
|
52
|
-
over: "This run is over.
|
|
53
|
-
stopped: "Stopped.
|
|
54
|
-
optional: "(optional – “skip”
|
|
55
|
-
pickOne: "
|
|
56
|
-
picked: "
|
|
52
|
+
over: "This run is over. Send the keyword to start a new one.",
|
|
53
|
+
stopped: "Stopped. Send the keyword to start a new run.",
|
|
54
|
+
optional: "(optional – reply “skip” to leave it out)",
|
|
55
|
+
pickOne: "Choose one of the options.",
|
|
56
|
+
picked: "Chosen: {list}",
|
|
57
57
|
more: "Anything else?",
|
|
58
58
|
done: "Done",
|
|
59
59
|
yes: "Yes",
|
|
60
60
|
no: "No",
|
|
61
|
-
yesOrNo: "
|
|
62
|
-
asText: "
|
|
63
|
-
asDate: "
|
|
64
|
-
sendPhoto: "
|
|
65
|
-
sendFile: "
|
|
66
|
-
sendVoice: "
|
|
61
|
+
yesOrNo: "Answer yes or no.",
|
|
62
|
+
asText: "Reply with text.",
|
|
63
|
+
asDate: "Send a date, for example 24/12/2026.",
|
|
64
|
+
sendPhoto: "Send a photo.",
|
|
65
|
+
sendFile: "Send a file.",
|
|
66
|
+
sendVoice: "Send a voice message.",
|
|
67
67
|
another: "One more",
|
|
68
|
-
whereAre: "
|
|
69
|
-
needed: "
|
|
70
|
-
screen: "This needs
|
|
68
|
+
whereAre: "Share your location or type the address.",
|
|
69
|
+
needed: "I need an answer for this one.",
|
|
70
|
+
screen: "This part needs a screen. You carry on here afterwards.",
|
|
71
71
|
open: "Open",
|
|
72
|
-
working: "{step}
|
|
72
|
+
working: "{step} – this takes a moment.",
|
|
73
73
|
reviewAsk: "Is this right?",
|
|
74
74
|
reviewOk: "Looks good",
|
|
75
75
|
reviewRedo: "New version",
|
|
76
|
-
reviewWhich: "What should be
|
|
76
|
+
reviewWhich: "What should be redone?",
|
|
77
77
|
reviewNote: "What should be different?",
|
|
78
78
|
allow: "Allow",
|
|
79
79
|
skip: "Skip",
|
|
80
|
-
finished: "Done
|
|
81
|
-
failed: "The wizard stopped.
|
|
80
|
+
finished: "Done. Everything is here:",
|
|
81
|
+
failed: "The wizard stopped. You can carry on here:",
|
|
82
82
|
},
|
|
83
83
|
};
|
|
84
84
|
function say(lang, key, vars = {}) {
|
|
@@ -2549,12 +2549,6 @@ export declare const wizardSchema: z.ZodObject<{
|
|
|
2549
2549
|
}, z.core.$strip>;
|
|
2550
2550
|
export type WizardDefinition = z.infer<typeof wizardSchema>;
|
|
2551
2551
|
export declare const INTERACTIVE: ReadonlySet<StepType>;
|
|
2552
|
-
/**
|
|
2553
|
-
* A wizard with a film step runs only where an AI client is installed and signed in, on the
|
|
2554
|
-
* person's own subscription: one film takes a client many minutes and many tokens.
|
|
2555
|
-
*/
|
|
2556
|
-
export declare function needsInstalledClient(def: WizardDefinition): boolean;
|
|
2557
|
-
export declare function isInteractive(step: Step): boolean;
|
|
2558
2552
|
/** Which formats each producing step can be downloaded in. */
|
|
2559
2553
|
export declare function formatsFor(step: Step): Format[];
|
|
2560
2554
|
/** Formats a stored list can be downloaded in; zip = the kept files its rows name, with the list. */
|
|
@@ -716,16 +716,6 @@ export const wizardSchema = z.object({
|
|
|
716
716
|
steps: z.array(stepSchema).min(1),
|
|
717
717
|
});
|
|
718
718
|
export const INTERACTIVE = new Set(["page", "review", "result"]);
|
|
719
|
-
/**
|
|
720
|
-
* A wizard with a film step runs only where an AI client is installed and signed in, on the
|
|
721
|
-
* person's own subscription: one film takes a client many minutes and many tokens.
|
|
722
|
-
*/
|
|
723
|
-
export function needsInstalledClient(def) {
|
|
724
|
-
return def.steps.some((s) => s.type === "film");
|
|
725
|
-
}
|
|
726
|
-
export function isInteractive(step) {
|
|
727
|
-
return INTERACTIVE.has(step.type);
|
|
728
|
-
}
|
|
729
719
|
/** Which formats each producing step can be downloaded in. */
|
|
730
720
|
export function formatsFor(step) {
|
|
731
721
|
if (step.type === "generate") {
|
|
@@ -11,7 +11,6 @@ export type FeatureKind = (typeof FEATURES)[FeatureName]["kind"];
|
|
|
11
11
|
export type Features = Record<string, boolean>;
|
|
12
12
|
/** `teamPlans`, `contacts.leadScoring`. */
|
|
13
13
|
export declare const FEATURE_NAME: RegExp;
|
|
14
|
-
export declare const FEATURE_NAMES: FeatureName[];
|
|
15
14
|
/** What a manifest declares for one switch; what is left out is a release switch, off, named by its key. */
|
|
16
15
|
export interface FeatureDeclarationInput {
|
|
17
16
|
kind?: "release" | "plan";
|
|
@@ -7,7 +7,6 @@ import { FEATURES } from "./feature-flags.js";
|
|
|
7
7
|
export { FEATURES };
|
|
8
8
|
/** `teamPlans`, `contacts.leadScoring`. */
|
|
9
9
|
export const FEATURE_NAME = /^[a-z][a-zA-Z0-9]*(\.[a-z][a-zA-Z0-9]*)?$/;
|
|
10
|
-
export const FEATURE_NAMES = Object.keys(FEATURES);
|
|
11
10
|
/** A plugin's declarations under its id: `contacts` + `leadScoring` → `contacts.leadScoring`. */
|
|
12
11
|
export function declaredByPlugin(pluginId, features) {
|
|
13
12
|
const out = {};
|
|
@@ -109,11 +109,6 @@ export interface Effort {
|
|
|
109
109
|
export declare function effortOf(def: WizardDefinition): Effort;
|
|
110
110
|
/** How expensive a run is, where no price in credits is known: by what it makes and uses. */
|
|
111
111
|
export declare function costTierOf(capabilities: Capability[]): CostTier;
|
|
112
|
-
/**
|
|
113
|
-
* The link that opens an entry in a local install at its default address — in the browser, or
|
|
114
|
-
* in the studio installed as a Chrome app.
|
|
115
|
-
*/
|
|
116
|
-
export declare const entryLocalLink: (id: string) => string;
|
|
117
112
|
/** One entry as the marketplace lists it, in a language. */
|
|
118
113
|
export interface MarketplaceSummary {
|
|
119
114
|
id: string;
|
|
@@ -352,8 +352,3 @@ export function costTierOf(capabilities) {
|
|
|
352
352
|
? "medium"
|
|
353
353
|
: "low";
|
|
354
354
|
}
|
|
355
|
-
/**
|
|
356
|
-
* The link that opens an entry in a local install at its default address — in the browser, or
|
|
357
|
-
* in the studio installed as a Chrome app.
|
|
358
|
-
*/
|
|
359
|
-
export const entryLocalLink = (id) => `http://localhost:24368/studio/new?starter=${encodeURIComponent(id)}`;
|
|
@@ -61,7 +61,7 @@ declare const PROVIDER_EN: {
|
|
|
61
61
|
readonly expressive: "expressive";
|
|
62
62
|
readonly veryAccurate: "very accurate";
|
|
63
63
|
readonly "about.replicate": "Open image and video models, billed per run.";
|
|
64
|
-
readonly "about.gateway": "One key for many providers
|
|
64
|
+
readonly "about.gateway": "One key for many providers’ models, billed by Vercel.";
|
|
65
65
|
};
|
|
66
66
|
/** A line about a provider or one of its models, in `PROVIDER_TEXTS`. */
|
|
67
67
|
export type ProviderWords = keyof typeof PROVIDER_EN;
|
|
@@ -69,7 +69,7 @@ const PROVIDER_EN = {
|
|
|
69
69
|
expressive: "expressive",
|
|
70
70
|
veryAccurate: "very accurate",
|
|
71
71
|
"about.replicate": "Open image and video models, billed per run.",
|
|
72
|
-
"about.gateway": "One key for many providers
|
|
72
|
+
"about.gateway": "One key for many providers’ models, billed by Vercel.",
|
|
73
73
|
};
|
|
74
74
|
const PROVIDER_DE = {
|
|
75
75
|
"about.openai": "GPT-Modelle, GPT Image und Stimmen.",
|
|
@@ -489,7 +489,7 @@ const NOTES_DE = {
|
|
|
489
489
|
one: "Ein Space hat höchstens {count} Tabelle.",
|
|
490
490
|
other: "Ein Space hat höchstens {count} Tabellen.",
|
|
491
491
|
},
|
|
492
|
-
tableBelongsOneWizard: "Diese Tabelle gehört zu einer Liste des Wizards.
|
|
492
|
+
tableBelongsOneWizard: "Diese Tabelle gehört zu einer Liste des Wizards. Die Spalten kommen aus dem Wizard.",
|
|
493
493
|
entryAlreadyExists: "Diesen Eintrag gibt es schon.",
|
|
494
494
|
tableMostRows: {
|
|
495
495
|
one: "Eine Tabelle hat höchstens {count} Zeile.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wizards",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.12",
|
|
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{Gr as r,Ut as i,W as a,Yt as o,ar as s,gr as c,nr as l,qn as u}from"./ui-i5saQjmD.js";import{t as d}from"./upload-D89fyY2-.js";import{V as f,Zt as p,gt as m,mt as h,ot as g,rt as _,ut as v,yt as y}from"./index-BVWLhiGX.js";var b=e(t(),1),x=e(n(),1),S=`oklch(50% 0.2 262)`,C=`oklch(32% 0.15 262)`,w={"--on":`white`,"--dot":`oklch(90% 0.1 80)`,"--ink-2":`oklch(96% 0.02 262)`,"--ink-3":`oklch(90% 0.035 262)`,"--moss":`oklch(90% 0.14 150)`,"--rose":`oklch(89% 0.09 45)`},T=`w-full rounded-[18px] border border-white/30 bg-white/15 px-6 py-5 text-[1.375rem] text-white outline-none placeholder:text-white/55 focus:border-white/60`;function E(){return(0,x.jsxs)(`span`,{className:`inline-flex items-center gap-2.5`,children:[(0,x.jsx)(y,{size:28}),(0,x.jsxs)(`span`,{className:`font-display font-semibold text-[1.0625rem] tracking-tight`,children:[`engenty`,(0,x.jsx)(`span`,{className:`mr-[0.09em] ml-[0.06em] text-(color:--dot)`,children:`.`}),(0,x.jsx)(`span`,{className:`font-normal text-white/70`,children:`wizards`})]})]})}function D({children:e,busy:t,onClick:n,type:r=`button`}){return(0,x.jsxs)(`button`,{type:r,disabled:t,onClick:n,className:`inline-flex h-13 cursor-pointer items-center gap-2.5 rounded-full bg-white px-7 font-semibold text-[1rem] transition hover:bg-white/90 disabled:cursor-default disabled:opacity-70`,style:{color:C},children:[e,(0,x.jsx)(s,{className:`size-[18px]`})]})}function O({children:e,onClick:t}){return(0,x.jsx)(`button`,{type:`button`,onClick:t,className:`cursor-pointer font-semibold text-[0.9375rem] text-white/85 transition hover:text-white`,children:e})}function k({step:e}){return(0,x.jsx)(`span`,{className:`ml-auto inline-flex gap-1.5`,role:`img`,"aria-label":o(`onboard.step`,{n:e}),children:[1,2,3,4].map(t=>(0,x.jsx)(`span`,{className:i(`size-2 rounded-full`,t===e?`bg-white`:`bg-white/40`)},t))})}function A(){m(S);let e=v(),t=r(),n=c(),{project:s}=g(),[y,A]=(0,b.useState)(1),[j,M]=(0,b.useState)(``),[N,P]=(0,b.useState)(``),[F,I]=(0,b.useState)(null),[L,R]=(0,b.useState)(null),[z,B]=(0,b.useState)([]),V=(0,b.useRef)(null),[H]=(0,b.useState)(_),U=p({mutationFn:e=>a.put(`/api/studio/team`,{name:e}),onSuccess:()=>t.invalidateQueries({queryKey:[`team`]})}),W=p({mutationFn:e=>a.post(`/api/studio/projects/${s?.id}/website`,{url:e}),onSuccess:async e=>{R(e),await t.invalidateQueries({queryKey:[`projects`]})}}),G=p({mutationFn:e=>a.patch(`/api/studio/projects/${s?.id}`,{brand:{about:e}}),onSuccess:()=>t.invalidateQueries({queryKey:[`projects`]})}),K=p({mutationFn:()=>a.post(`/api/studio/onboarding/done`),onSuccess:async()=>{await t.invalidateQueries({queryKey:[`me`]}),n(`/new`,{replace:!0})}}),q=e.data?.user.name??``,J=q.includes(`@`)?``:q.split(` `)[0],Y=async e=>{if(e&&s){for(let t of Array.from(e)){B(e=>[...e,{name:t.name,state:`uploading`}]);try{await a.upload(`/api/studio/projects/${s.id}/files?kind=document`,t),B(e=>e.map(e=>e.name===t.name?{...e,state:`done`}:e))}catch{B(e=>e.map(e=>e.name===t.name?{...e,state:`failed`}:e))}}await t.invalidateQueries({queryKey:[`projects`]})}},X=L?[L.about?o(`onboard.readAbout`):``,L.colors?o(`onboard.readColors`,{n:L.colors}):``,L.logo?o(`onboard.readLogo`):``].join(``):``;return(0,x.jsxs)(`div`,{className:`flex min-h-dvh flex-col px-6 text-white sm:px-10`,style:{...w,background:S},children:[(0,x.jsxs)(`header`,{className:`flex items-center justify-between pt-6 sm:pt-8`,children:[(0,x.jsx)(E,{}),(0,x.jsx)(f,{tone:`ground`,ink:C})]}),(0,x.jsxs)(`main`,{className:`mx-auto grid w-full max-w-6xl flex-1 items-center gap-10 py-10 lg:grid-cols-[5fr_7fr] lg:gap-12`,children:[(0,x.jsxs)(`div`,{className:`flex flex-col items-center gap-8 max-lg:order-first`,children:[(0,x.jsx)(h,{kind:`drop`,size:240,fluffy:!0,coat:`fur`}),H?(0,x.jsxs)(`figure`,{className:`w-full max-w-sm rounded-[18px] bg-white/15 px-5 py-4`,children:[(0,x.jsx)(`figcaption`,{className:`font-medium text-[0.75rem] text-white/85 uppercase tracking-[0.14em]`,children:o(`onboard.wish`)}),(0,x.jsx)(`blockquote`,{className:`mt-1.5 line-clamp-6 whitespace-pre-line break-words text-[1rem] leading-relaxed`,children:H}),(0,x.jsx)(`p`,{className:`mt-2 text-[0.8125rem] text-white/75`,children:o(`onboard.wishNext`)})]}):null]}),(0,x.jsxs)(`div`,{className:`flex min-w-0 max-w-2xl animate-rise flex-col gap-5`,children:[y===1?(0,x.jsxs)(`form`,{className:`contents`,onSubmit:e=>{e.preventDefault();let t=j.trim();t?U.mutate(t,{onSuccess:()=>A(2)}):A(2)},children:[(0,x.jsx)(`p`,{className:`font-medium text-[0.75rem] text-white/85 uppercase tracking-[0.14em]`,children:J?o(`onboard.kicker1`,{name:J}):o(`onboard.kicker1Anon`)}),(0,x.jsx)(`h1`,{className:`font-display font-bold text-[2.5rem] leading-[1.05] tracking-[-0.02em] sm:text-[3.25rem]`,children:o(`onboard.team`)}),(0,x.jsx)(`p`,{className:`text-[1.0625rem] text-white/90 leading-relaxed`,children:o(`onboard.teamSub`)}),(0,x.jsx)(`input`,{value:j,onChange:e=>M(e.target.value),placeholder:o(`onboard.teamPlaceholder`),maxLength:80,"aria-label":o(`onboard.team`),className:T}),(0,x.jsxs)(`div`,{className:`flex flex-wrap items-center gap-5`,children:[(0,x.jsx)(D,{type:`submit`,busy:U.isPending,children:o(`onboard.continue`)}),(0,x.jsx)(k,{step:1})]})]}):null,y===2?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`p`,{className:`font-medium text-[0.75rem] text-white/85 uppercase tracking-[0.14em]`,children:o(`onboard.kicker2`)}),(0,x.jsx)(`h1`,{className:`font-display font-bold text-[2.5rem] leading-[1.05] tracking-[-0.02em] sm:text-[3.25rem]`,children:o(`onboard.site`)}),(0,x.jsx)(`p`,{className:`text-[1.0625rem] text-white/90 leading-relaxed`,children:o(`onboard.siteSub`)}),F===null?(0,x.jsxs)(`form`,{className:`contents`,onSubmit:e=>{e.preventDefault(),N.trim()&&!W.isPending&&W.mutate(N.trim())},children:[(0,x.jsx)(`input`,{value:N,onChange:e=>P(e.target.value),placeholder:o(`onboard.sitePlaceholder`),inputMode:`url`,autoCapitalize:`none`,"aria-label":o(`onboard.site`),className:T}),L?(0,x.jsxs)(`p`,{className:`flex items-center gap-2 text-[0.9375rem] text-(color:--moss)`,children:[(0,x.jsx)(l,{className:`size-4`}),o(`onboard.readDone`,{name:L.name,details:X})]}):W.isError?(0,x.jsx)(`p`,{className:`text-[0.9375rem] text-(color:--rose)`,children:o(`onboard.readFailed`)}):null,(0,x.jsxs)(`div`,{className:`flex flex-wrap items-center gap-5`,children:[L?(0,x.jsx)(D,{onClick:()=>A(3),children:o(`onboard.continue`)}):(0,x.jsx)(D,{type:`submit`,busy:W.isPending,children:W.isPending?o(`onboard.reading`):o(`onboard.read`)}),(0,x.jsx)(O,{onClick:()=>I(``),children:o(`onboard.line`)}),(0,x.jsx)(O,{onClick:()=>A(3),children:o(`onboard.skip`)}),(0,x.jsx)(k,{step:2})]})]}):(0,x.jsxs)(`form`,{className:`contents`,onSubmit:e=>{e.preventDefault();let t=F.trim();t?G.mutate(t,{onSuccess:()=>A(3)}):A(3)},children:[(0,x.jsx)(`textarea`,{value:F,onChange:e=>I(e.target.value),placeholder:o(`onboard.linePlaceholder`),rows:3,maxLength:8e3,"aria-label":o(`onboard.line`),className:i(T,`resize-none text-[1.125rem] leading-relaxed`)}),(0,x.jsxs)(`div`,{className:`flex flex-wrap items-center gap-5`,children:[(0,x.jsx)(D,{type:`submit`,busy:G.isPending,children:o(`onboard.continue`)}),(0,x.jsx)(O,{onClick:()=>I(null),children:o(`onboard.site`)}),(0,x.jsx)(O,{onClick:()=>A(3),children:o(`onboard.skip`)}),(0,x.jsx)(k,{step:2})]})]})]}):null,y===3?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`p`,{className:`font-medium text-[0.75rem] text-white/85 uppercase tracking-[0.14em]`,children:o(`onboard.kicker3`)}),(0,x.jsx)(`h1`,{className:`font-display font-bold text-[2.5rem] leading-[1.05] tracking-[-0.02em] sm:text-[3.25rem]`,children:o(`onboard.know`)}),(0,x.jsx)(`p`,{className:`text-[1.0625rem] text-white/90 leading-relaxed`,children:o(`onboard.knowSub`)}),(0,x.jsxs)(`button`,{type:`button`,onClick:()=>V.current?.click(),onDragOver:e=>e.preventDefault(),onDrop:e=>{e.preventDefault(),Y(e.dataTransfer.files)},className:`flex cursor-pointer flex-col items-center gap-2 rounded-[18px] border-2 border-white/45 border-dashed bg-white/10 px-6 py-7 text-center transition hover:bg-white/15`,children:[(0,x.jsx)(d,{className:`size-7`}),(0,x.jsx)(`span`,{className:`font-semibold text-[1.0625rem]`,children:o(`onboard.drop`)}),(0,x.jsx)(`span`,{className:`text-[0.875rem] text-white/80`,children:`PDF · Word · Excel · Markdown`}),(0,x.jsx)(`input`,{ref:V,type:`file`,multiple:!0,className:`sr-only`,onChange:e=>{Y(e.target.files),e.target.value=``}})]}),z.length?(0,x.jsx)(`ul`,{className:`flex flex-col gap-2`,children:z.map(e=>(0,x.jsxs)(`li`,{className:`flex items-center gap-2.5 rounded-xl bg-white/15 px-3.5 py-2.5 text-[0.875rem]`,children:[(0,x.jsx)(u,{className:`size-4 shrink-0`}),(0,x.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name}),(0,x.jsx)(`span`,{className:i(`text-white/80`,e.state===`failed`?`text-(color:--rose)`:``),children:e.state===`uploading`?o(`onboard.uploading`):e.state===`done`?o(`onboard.uploaded`):o(`onboard.uploadFailed`)})]},e.name))}):null,(0,x.jsxs)(`div`,{className:`flex flex-wrap items-center gap-5`,children:[(0,x.jsx)(D,{busy:z.some(e=>e.state===`uploading`),onClick:()=>A(4),children:o(`onboard.continue`)}),z.length?null:(0,x.jsx)(O,{onClick:()=>A(4),children:o(`onboard.skip`)}),(0,x.jsx)(k,{step:3})]})]}):null,y===4?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`p`,{className:`font-medium text-[0.75rem] text-white/85 uppercase tracking-[0.14em]`,children:o(`onboard.kicker4`)}),(0,x.jsx)(`h1`,{className:`font-display font-bold text-[2.5rem] leading-[1.05] tracking-[-0.02em] sm:text-[3.25rem]`,children:o(`onboard.space`)}),(0,x.jsx)(`p`,{className:`text-[1.0625rem] text-white/90 leading-relaxed`,children:o(`onboard.spaceSub`,{space:s?.name??``})}),(0,x.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[[`partInfo`,`partInfoText`,!!(L||F)],[`partKnow`,`partKnowText`,z.some(e=>e.state===`done`)],[`partData`,`partDataText`,!1],[`partResults`,`partResultsText`,!1]].map(([e,t,n])=>(0,x.jsxs)(`div`,{className:`flex flex-col gap-1.5 rounded-2xl border border-white/20 bg-white/10 px-4.5 py-4`,children:[(0,x.jsxs)(`span`,{className:`flex items-center gap-2 font-semibold text-[1rem]`,children:[n?(0,x.jsx)(l,{className:`size-4 text-(color:--moss)`}):null,o(`onboard.${e}`)]}),(0,x.jsx)(`span`,{className:`text-[0.84375rem] text-white/85 leading-snug`,children:o(`onboard.${t}`)})]},e))}),(0,x.jsxs)(`div`,{className:`flex flex-wrap items-center gap-5`,children:[(0,x.jsx)(D,{busy:K.isPending,onClick:()=>K.mutate(),children:o(`onboard.build`)}),(0,x.jsx)(k,{step:4})]})]}):null]},y)]}),(0,x.jsxs)(`footer`,{className:`mx-auto flex w-full max-w-6xl items-center justify-between pb-6 text-[0.75rem] text-white/55 sm:pb-8`,children:[(0,x.jsx)(`span`,{children:`engenty`}),(0,x.jsx)(`span`,{"aria-hidden":`true`,className:`size-[3px] bg-(color:--dot)`})]})]})}export{A as OnboardingPage};
|