@engenty/wizards-runtime 0.9.3 → 0.9.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.
- package/README.md +34 -39
- package/apps/runtime/dist/assistant/docs.js +1 -1
- package/apps/runtime/dist/assistant/primer.js +2 -2
- package/apps/runtime/dist/cli/main.js +2 -0
- package/apps/runtime/dist/credits/credits.js +9 -3
- package/apps/runtime/dist/db/migrations/tenant/0020_project_page.sql +1 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0020_snapshot.json +3475 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +7 -0
- package/apps/runtime/dist/db/schema.js +2 -0
- package/apps/runtime/dist/docs/dev/api.md +1 -1
- package/apps/runtime/dist/docs/dev/integration/channels.md +4 -4
- package/apps/runtime/dist/docs/dev/integration/claude-code-plugin.md +1 -1
- package/apps/runtime/dist/docs/dev/integration/embed.md +1 -1
- package/apps/runtime/dist/docs/dev/integration/index.md +2 -3
- package/apps/runtime/dist/docs/dev/integration/link-and-share.md +1 -1
- package/apps/runtime/dist/docs/dev/integration/mcp-apps.md +1 -1
- package/apps/runtime/dist/docs/dev/integration/mcp.md +1 -1
- package/apps/runtime/dist/docs/dev/integration/meta.json +0 -1
- package/apps/runtime/dist/docs/dev/integration/openui.md +1 -1
- package/apps/runtime/dist/docs/dev/integration/results.md +1 -3
- package/apps/runtime/dist/docs/dev/plugins/routes.md +1 -1
- package/apps/runtime/dist/docs/dev/wizard-format/themes.md +2 -2
- package/apps/runtime/dist/docs/dev/wizard-format/validate.md +1 -1
- package/apps/runtime/dist/docs/meta.json +1 -1
- package/apps/runtime/dist/docs/{user → user-guide}/ai-apps.md +4 -5
- package/apps/runtime/dist/docs/{user → user-guide}/build-a-wizard.md +27 -28
- package/apps/runtime/dist/docs/{user → user-guide}/command-line.md +9 -8
- package/apps/runtime/dist/docs/{user → user-guide}/connectors.md +6 -6
- package/apps/runtime/dist/docs/{user → user-guide}/create-account.md +10 -11
- package/apps/runtime/dist/docs/{user → user-guide}/data.md +5 -5
- package/apps/runtime/dist/docs/{user → user-guide}/first-start.md +5 -5
- package/apps/runtime/dist/docs/{user → user-guide}/index.md +3 -3
- package/apps/runtime/dist/docs/{user → user-guide}/install.md +21 -25
- package/apps/runtime/dist/docs/{user → user-guide}/local-only.md +5 -6
- package/apps/runtime/dist/docs/{user → user-guide}/meta.json +0 -2
- package/apps/runtime/dist/docs/{user → user-guide}/models.md +13 -22
- package/apps/runtime/dist/docs/{user → user-guide}/plugins.md +2 -2
- package/apps/runtime/dist/docs/{user → user-guide}/run.md +21 -36
- package/apps/runtime/dist/docs/{user → user-guide}/server.md +1 -1
- package/apps/runtime/dist/docs/{user → user-guide}/space.md +17 -27
- package/apps/runtime/dist/docs/{user → user-guide}/steps.md +22 -34
- package/apps/runtime/dist/docs/{user → user-guide}/test-and-share.md +32 -75
- package/apps/runtime/dist/docs/{user → user-guide}/troubleshooting.md +3 -4
- package/apps/runtime/dist/engine/runner.js +11 -1
- package/apps/runtime/dist/manage.js +15 -2
- package/apps/runtime/dist/plugins/runs.js +4 -1
- package/apps/runtime/dist/routes/runs.js +4 -1
- package/apps/runtime/dist/routes/studio.js +12 -0
- package/apps/runtime/dist/services/errors.js +1 -0
- package/apps/runtime/dist/services/pages.js +262 -0
- package/apps/runtime/dist/services/projects.js +73 -2
- package/apps/runtime/dist/services/runs.js +2 -0
- package/apps/runtime/dist/services/wizards.js +30 -1
- package/apps/web/dist/assets/{AboutDialog-DsGqq2Es.js → AboutDialog-lUBGgvKu.js} +1 -1
- package/apps/web/dist/assets/{ChangelogDialog-Hn7oDuyx.js → ChangelogDialog-B2IJbKX8.js} +1 -1
- package/apps/web/dist/assets/EditorPage-B1syriTz.js +4 -0
- package/apps/web/dist/assets/{FlowPreview-DZ1XL_o1.js → FlowPreview-BUKI8h6o.js} +1 -1
- package/apps/web/dist/assets/{Harness-BBpl_EUW.js → Harness-D35I3Jlp.js} +2 -2
- package/apps/web/dist/assets/Marketplace-C-ft5u_6.js +2 -0
- package/apps/web/dist/assets/NewWizardChannels-PDeL4f5D.js +1 -0
- package/apps/web/dist/assets/{NewWizardPage-kpm-UyQC.js → NewWizardPage-BHw086HN.js} +2 -2
- package/apps/web/dist/assets/OnboardingPage-BYa8Xekc.js +1 -0
- package/apps/web/dist/assets/PreviewPane-Cuatuhi-.js +4 -0
- package/apps/web/dist/assets/ProjectPage-DTbTN9rE.js +1 -0
- package/apps/web/dist/assets/PublicRunner-BnT-zZrI.js +1 -0
- package/apps/web/dist/assets/{ReadOnly-CcW91P4l.js → ReadOnly-C5fdw_kg.js} +1 -1
- package/apps/web/dist/assets/SettingsPage-Bkd5LuRn.js +2 -0
- package/apps/web/dist/assets/SetupPage-CHnbGccO.js +1 -0
- package/apps/web/dist/assets/{SharePage-CC7V2TYJ.js → SharePage-BiPJsotS.js} +1 -1
- package/apps/web/dist/assets/changelog-Do_saoEi.js +1 -0
- package/apps/web/dist/assets/{coins-RUupcqZx.js → coins-DVGgwSrK.js} +1 -1
- package/apps/web/dist/assets/index-C-u3ZXBZ.js +14 -0
- package/apps/web/dist/assets/index-DtjKnB3s.css +1 -0
- package/apps/web/dist/assets/{phone-ChnpShTU.js → phone-DD2g0U0Q.js} +1 -1
- package/apps/web/dist/assets/runners-D6mK0B73.js +1 -0
- package/apps/web/dist/assets/session-BHCBxqVb.js +2 -0
- package/apps/web/dist/assets/{settings-menu-CLw_oucZ.js → settings-menu-DGDn2688.js} +1 -1
- package/apps/web/dist/assets/theme-DQ10nO_L.js +11 -0
- package/apps/web/dist/assets/ui-BV4KP5n2.js +137 -0
- package/apps/web/dist/assets/{upload-0sFU9K8-.js → upload-uc9uftDy.js} +1 -1
- package/apps/web/dist/assets/{useMutation-1jFwXbI6.js → useMutation-BfQIRblT.js} +1 -1
- package/apps/web/dist/assets/{volume-2-C51sO2X0.js → volume-2-BlaOos9n.js} +1 -1
- package/apps/web/dist/assets/{wrench-DdT-nErU.js → wrench-Cfpkphyw.js} +1 -1
- package/apps/web/dist/index.html +8 -8
- package/apps/web/dist/install.ps1 +1 -1
- package/apps/web/dist/install.sh +1 -1
- package/apps/web/dist/mcp/flow.html +2 -2
- package/node_modules/@engenty/wizards/dist/plugin/studio.d.ts +3 -3
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.d.ts +12 -0
- package/node_modules/@engenty/wizards-shared/dist/feature-flags.js +12 -0
- package/node_modules/@engenty/wizards-shared/dist/projects.d.ts +36 -0
- package/node_modules/@engenty/wizards-shared/dist/projects.js +25 -0
- package/node_modules/@engenty/wizards-shared/dist/run.d.ts +4 -0
- package/node_modules/@engenty/wizards-shared/dist/run.js +8 -0
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/plugin.json +2 -2
- package/apps/runtime/dist/docs/dev/integration/wordpress.md +0 -10
- package/apps/runtime/dist/docs/user/assistant.md +0 -77
- package/apps/runtime/dist/docs/user/wordpress.md +0 -121
- package/apps/web/dist/assets/EditorPage-DsJqhoXy.js +0 -4
- package/apps/web/dist/assets/Marketplace-BF0Rx0VR.js +0 -2
- package/apps/web/dist/assets/NewWizardChannels-WaAOvmzw.js +0 -1
- package/apps/web/dist/assets/OnboardingPage-Birm-hM5.js +0 -1
- package/apps/web/dist/assets/ProjectPage-CqtpxOq5.js +0 -1
- package/apps/web/dist/assets/PublicRunner-CXTHGYHv.js +0 -1
- package/apps/web/dist/assets/RunDrawer-ByvmBv6e.js +0 -4
- package/apps/web/dist/assets/RunnerView-DcduYZly.js +0 -1
- package/apps/web/dist/assets/SettingsPage-Q2CUb7kK.js +0 -2
- package/apps/web/dist/assets/SetupPage-C7mzUoiR.js +0 -1
- package/apps/web/dist/assets/changelog-7DN_qWR2.js +0 -1
- package/apps/web/dist/assets/index-myC3mJie.css +0 -1
- package/apps/web/dist/assets/index-qnpoZzuw.js +0 -14
- package/apps/web/dist/assets/session-DekDyd9S.js +0 -2
- package/apps/web/dist/assets/theme-DjpqxoRe.js +0 -11
- package/apps/web/dist/assets/ui-DRYauuxF.js +0 -137
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { COLOR_SECTION_KINDS, cleanAssetSections, cleanLogoSections, FACT_TYPES, FONT_USES, FONT_WEIGHTS, GRADIENT_TYPES, orderColors, PROJECT_LIMITS, RULE_MARKS, } from "@engenty/wizards-shared/projects";
|
|
1
|
+
import { COLOR_SECTION_KINDS, cleanAssetSections, cleanLogoSections, FACT_TYPES, FONT_USES, FONT_WEIGHTS, GRADIENT_TYPES, orderColors, PAGE_LANGS, PAGE_LIMITS, PAGE_SLUG, PROJECT_LIMITS, RULE_MARKS, } from "@engenty/wizards-shared/projects";
|
|
2
2
|
import { note } from "@engenty/wizards-shared/run";
|
|
3
|
-
import { and, count, eq, isNull } from "drizzle-orm";
|
|
3
|
+
import { and, count, eq, isNull, ne } from "drizzle-orm";
|
|
4
4
|
import { nanoid } from "nanoid";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { db, schema } from "../db/client.js";
|
|
@@ -13,6 +13,7 @@ import { serverText } from "../texts.js";
|
|
|
13
13
|
import { mayBuild, requireAdmin, requireBuild, requireWritable } from "./access.js";
|
|
14
14
|
import { notFound, ServiceError } from "./errors.js";
|
|
15
15
|
import { forgetWizardLinks } from "./links.js";
|
|
16
|
+
import { pushPages } from "./pages.js";
|
|
16
17
|
import { removeProjectFiles } from "./project-files.js";
|
|
17
18
|
const MASK = "••••";
|
|
18
19
|
export const mcpServerSchema = z.object({
|
|
@@ -103,8 +104,28 @@ export const projectFactSchema = z.object({
|
|
|
103
104
|
value: z.string().max(4000),
|
|
104
105
|
type: z.enum(FACT_TYPES).optional(),
|
|
105
106
|
});
|
|
107
|
+
const trimmed = (max) => z
|
|
108
|
+
.string()
|
|
109
|
+
.trim()
|
|
110
|
+
.max(max)
|
|
111
|
+
.transform((v) => v || undefined)
|
|
112
|
+
.optional();
|
|
113
|
+
/** The space's public page as the studio sends it, whole. */
|
|
114
|
+
export const projectPageSchema = z.object({
|
|
115
|
+
on: z.boolean(),
|
|
116
|
+
slug: z.string().trim().toLowerCase().max(PAGE_LIMITS.slug),
|
|
117
|
+
title: z.string().trim().min(1).max(PAGE_LIMITS.title),
|
|
118
|
+
headline: trimmed(PAGE_LIMITS.headline),
|
|
119
|
+
intro: trimmed(PAGE_LIMITS.intro),
|
|
120
|
+
lang: z.enum(PAGE_LANGS),
|
|
121
|
+
form: z.enum(["du", "sie"]).optional(),
|
|
122
|
+
wizards: z.array(z.string().max(40)).max(60),
|
|
123
|
+
examples: z.record(z.string().max(40), z.string().regex(/^[A-Za-z0-9_-]{1,40}$/)),
|
|
124
|
+
slugs: z.record(z.string().max(40), z.string().regex(PAGE_SLUG)).optional(),
|
|
125
|
+
});
|
|
106
126
|
export const projectPatchSchema = z.object({
|
|
107
127
|
name: z.string().min(1).max(80).optional(),
|
|
128
|
+
page: projectPageSchema.optional(),
|
|
108
129
|
brand: z
|
|
109
130
|
.object({
|
|
110
131
|
name: z.string().max(120).optional(),
|
|
@@ -270,6 +291,7 @@ export async function updateProject(userId, projectId, patch) {
|
|
|
270
291
|
if (patch.brand?.fonts) {
|
|
271
292
|
await linkFontFiles(p.id, patch.brand.fonts);
|
|
272
293
|
}
|
|
294
|
+
const page = patch.page ? await checkedPage(p, patch.page) : undefined;
|
|
273
295
|
await db
|
|
274
296
|
.update(schema.project)
|
|
275
297
|
.set({
|
|
@@ -277,10 +299,58 @@ export async function updateProject(userId, projectId, patch) {
|
|
|
277
299
|
...(patch.brand ? { brand: brandAfter(p.brand, patch.brand) } : {}),
|
|
278
300
|
...(patch.facts ? { facts: patch.facts } : {}),
|
|
279
301
|
...(mcpServers ? { mcpServers } : {}),
|
|
302
|
+
...(page ? { page } : {}),
|
|
280
303
|
updatedAt: new Date(),
|
|
281
304
|
})
|
|
282
305
|
.where(eq(schema.project.id, p.id));
|
|
283
306
|
spaceChanged("space.updated", p.id);
|
|
307
|
+
// The page itself, and what it is drawn from: the brand, the facts as the imprint.
|
|
308
|
+
if (page || patch.brand || patch.facts) {
|
|
309
|
+
pushPages();
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* The page as it is kept: its address made of the allowed characters and taken by no other space
|
|
314
|
+
* of the tenant, only this tenant's wizards of this space on it, and the page on in one space at
|
|
315
|
+
* most (`409 page_taken`, naming that space). The form is German's alone.
|
|
316
|
+
*/
|
|
317
|
+
async function checkedPage(p, page) {
|
|
318
|
+
if (!PAGE_SLUG.test(page.slug)) {
|
|
319
|
+
throw new ServiceError("invalid", note("pageSlugInvalid"));
|
|
320
|
+
}
|
|
321
|
+
const others = await db.query.project.findMany({
|
|
322
|
+
where: and(eq(schema.project.tenantId, currentTenant()), ne(schema.project.id, p.id)),
|
|
323
|
+
columns: { id: true, name: true, page: true },
|
|
324
|
+
});
|
|
325
|
+
if (others.some((o) => o.page?.slug === page.slug)) {
|
|
326
|
+
throw new ServiceError("invalid", note("pageSlugTaken"));
|
|
327
|
+
}
|
|
328
|
+
const holder = page.on ? others.find((o) => o.page?.on) : undefined;
|
|
329
|
+
if (holder) {
|
|
330
|
+
throw new ServiceError("page_taken", note("pageTaken", { space: holder.name }), {
|
|
331
|
+
project: { id: holder.id, name: holder.name },
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
const own = new Set((await db.query.wizard.findMany({
|
|
335
|
+
where: eq(schema.wizard.projectId, p.id),
|
|
336
|
+
columns: { id: true },
|
|
337
|
+
})).map((w) => w.id));
|
|
338
|
+
const wizards = [...new Set(page.wizards)].filter((id) => own.has(id));
|
|
339
|
+
const examples = Object.fromEntries(Object.entries(page.examples).filter(([id]) => own.has(id)));
|
|
340
|
+
// The wizards' addresses are kept as made (pages.ts); a wizard that is gone frees its address.
|
|
341
|
+
const slugs = Object.fromEntries(Object.entries({ ...p.page?.slugs, ...page.slugs }).filter(([id]) => own.has(id)));
|
|
342
|
+
return {
|
|
343
|
+
on: page.on,
|
|
344
|
+
slug: page.slug,
|
|
345
|
+
title: page.title,
|
|
346
|
+
...(page.headline ? { headline: page.headline } : {}),
|
|
347
|
+
...(page.intro ? { intro: page.intro } : {}),
|
|
348
|
+
lang: page.lang,
|
|
349
|
+
...(page.lang === "de" && page.form ? { form: page.form } : {}),
|
|
350
|
+
wizards,
|
|
351
|
+
examples,
|
|
352
|
+
...(Object.keys(slugs).length ? { slugs } : {}),
|
|
353
|
+
};
|
|
284
354
|
}
|
|
285
355
|
/**
|
|
286
356
|
* A brand font's own file is a font of the space; run pages ask for it by its id, before the
|
|
@@ -418,4 +488,5 @@ export async function removeProject(projectId) {
|
|
|
418
488
|
.delete(schema.project)
|
|
419
489
|
.where(and(eq(schema.project.id, projectId), eq(schema.project.tenantId, currentTenant())));
|
|
420
490
|
spaceChanged("space.deleted", projectId);
|
|
491
|
+
pushPages();
|
|
421
492
|
}
|
|
@@ -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{
|
|
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-BV4KP5n2.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-C-u3ZXBZ.js";import{c as y,f as b}from"./settings-menu-DGDn2688.js";import{ReleaseNotes as x,loadReleases as S,releaseDate as C,releaseLabel as w}from"./ChangelogDialog-B2IJbKX8.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.5`?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{
|
|
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-BV4KP5n2.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-Do_saoEi.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};
|