@clarify-labs/renderer 0.6.6 → 0.7.0
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/output/{OpenApiOperation-CI_PeMSy.js → OpenApiOperation-CWSOhUVa.js} +84 -19
- package/output/OpenApiOperation-CWSOhUVa.js.map +1 -0
- package/output/{OpenApiOperation-CxQQyEHK.cjs → OpenApiOperation-ZXToVSFC.cjs} +89 -18
- package/output/OpenApiOperation-ZXToVSFC.cjs.map +1 -0
- package/output/{ThemeRoot-BhP5M3Hd.cjs → ThemeRoot-CEvwrGp5.cjs} +29 -186
- package/output/ThemeRoot-CEvwrGp5.cjs.map +1 -0
- package/output/{ThemeRoot-DErmHskn.js → ThemeRoot-C_ZdzSMu.js} +21 -178
- package/output/ThemeRoot-C_ZdzSMu.js.map +1 -0
- package/output/app/AppShell.d.ts +2 -0
- package/output/app/PageFooter.d.ts +5 -1
- package/output/client.cjs +5 -2
- package/output/client.d.ts +1 -0
- package/output/client.js +4 -3
- package/output/components/LocalizedLink.d.ts +6 -0
- package/output/components/WebFrame.d.ts +11 -0
- package/output/components/index.d.ts +4 -0
- package/output/context.d.ts +1 -1
- package/output/core/types.d.ts +7 -1
- package/output/index.cjs +5 -4
- package/output/index.d.ts +2 -2
- package/output/index.js +5 -5
- package/output/mdx/components.d.ts +1 -0
- package/output/mdx/primitives.d.ts +2 -2
- package/output/preview.cjs +61 -23
- package/output/preview.cjs.map +1 -1
- package/output/preview.js +61 -23
- package/output/preview.js.map +1 -1
- package/output/{render-HeCAMIGm.js → render-CnUd0XwZ.js} +6 -5
- package/output/render-CnUd0XwZ.js.map +1 -0
- package/output/{render-C_NHO3rz.cjs → render-zHU25Nm9.cjs} +6 -5
- package/output/render-zHU25Nm9.cjs.map +1 -0
- package/output/renderer.css +220 -29
- package/output/server.cjs +5 -4
- package/output/server.cjs.map +1 -1
- package/output/server.js +5 -4
- package/output/server.js.map +1 -1
- package/output/shell/Search.d.ts +4 -0
- package/output/shell/search/Highlight.d.ts +11 -0
- package/output/shell/search/SearchDialog.d.ts +13 -0
- package/output/shell/search/SearchInput.d.ts +8 -0
- package/output/shell/search/SearchResult.d.ts +10 -0
- package/output/shell/search/items.d.ts +3 -0
- package/output/shell/search/pagefind.d.ts +5 -0
- package/output/shell/search/types.d.ts +37 -0
- package/output/shell/search/useSearchProps.d.ts +10 -0
- package/output/{shell-DvTfFx6M.js → shell-CumiARRe.js} +472 -61
- package/output/shell-CumiARRe.js.map +1 -0
- package/output/{shell-D4tS8Jts.cjs → shell-xxhV0p7k.cjs} +524 -59
- package/output/shell-xxhV0p7k.cjs.map +1 -0
- package/output/theme/variables.d.ts +2 -0
- package/package.json +1 -1
- package/output/OpenApiOperation-CI_PeMSy.js.map +0 -1
- package/output/OpenApiOperation-CxQQyEHK.cjs.map +0 -1
- package/output/ThemeRoot-BhP5M3Hd.cjs.map +0 -1
- package/output/ThemeRoot-DErmHskn.js.map +0 -1
- package/output/render-C_NHO3rz.cjs.map +0 -1
- package/output/render-HeCAMIGm.js.map +0 -1
- package/output/shell-D4tS8Jts.cjs.map +0 -1
- package/output/shell-DvTfFx6M.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as isExternalHref, D as useBuiltInText, E as copyTextToClipboard, S as ContentActions, _ as resolveThemeColorValue, g as cloneTheme, h as clarifyThemePresets, i as SectionProvider, j as useClarifyConfig, k as ClarifyLocaleContext, l as isSameRoutePath, m as applyThemeCssVariables, n as Navigation, p as useTheme, r as safeDecodeURIComponent, t as Header, u as normalizeRoutePath, v as resolveThemeVariableTargets, w as localizeHref, x as themeToCssVariables } from "./shell-CumiARRe.js";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { Component, Suspense, lazy, useEffect, useMemo, useState } from "react";
|
|
4
4
|
import { Link, Route, Routes, useLocation } from "react-router-dom";
|
|
@@ -164,7 +164,7 @@ function BuiltWithClarify() {
|
|
|
164
164
|
/* @__PURE__ */ jsx("img", {
|
|
165
165
|
src: clarify_default,
|
|
166
166
|
alt: "",
|
|
167
|
-
className: "clarify-built-with-logo h-3.5 w-
|
|
167
|
+
className: "clarify-built-with-logo h-3.5 w-auto flex-none object-contain"
|
|
168
168
|
}),
|
|
169
169
|
/* @__PURE__ */ jsx("span", {
|
|
170
170
|
className: "clarify-built-with-brand font-semibold",
|
|
@@ -214,18 +214,23 @@ function SocialLink(arg0) {
|
|
|
214
214
|
children: name
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
|
-
function PageFooter() {
|
|
217
|
+
function PageFooter(props = {}) {
|
|
218
218
|
const config = useClarifyConfig();
|
|
219
219
|
const locale = localeForPath$1(config, useLocation().pathname);
|
|
220
220
|
const footer = config.footer;
|
|
221
|
-
const
|
|
222
|
-
const
|
|
223
|
-
const
|
|
224
|
-
const
|
|
221
|
+
const builtInFooter = footer && typeof footer === "object" ? footer : void 0;
|
|
222
|
+
const CustomFooter = props.component;
|
|
223
|
+
const links = builtInFooter?.links ?? [];
|
|
224
|
+
const socials = Object.entries(builtInFooter?.socials ?? {});
|
|
225
|
+
const copyright = builtInFooter?.copyright ? resolveLocalizedText(builtInFooter.copyright, locale, config.i18n?.defaultLocale) : void 0;
|
|
226
|
+
const hasBuiltInFooter = Boolean(copyright || links.length > 0 || socials.length > 0);
|
|
225
227
|
return /* @__PURE__ */ jsxs("footer", {
|
|
226
|
-
className:
|
|
227
|
-
children: [
|
|
228
|
-
className: "clarify-footer-
|
|
228
|
+
className: "clarify-page-footer mx-auto flex w-full max-w-(--clarify-theme-layout-max-width) flex-col gap-4 border-t border-(--clarify-theme-tokens-colors-border) px-4 py-8 sm:px-6 lg:mt-24 lg:px-5",
|
|
229
|
+
children: [CustomFooter ? /* @__PURE__ */ jsx("div", {
|
|
230
|
+
className: "clarify-footer-custom w-full",
|
|
231
|
+
children: /* @__PURE__ */ jsx(CustomFooter, {})
|
|
232
|
+
}) : hasBuiltInFooter ? /* @__PURE__ */ jsxs("div", {
|
|
233
|
+
className: clsx("clarify-footer-content flex flex-col items-end gap-3 text-right", hasBuiltInFooter && "sm:items-start sm:text-left"),
|
|
229
234
|
children: [copyright ? /* @__PURE__ */ jsx("p", {
|
|
230
235
|
className: "clarify-footer-copyright m-0",
|
|
231
236
|
children: copyright
|
|
@@ -241,7 +246,7 @@ function PageFooter() {
|
|
|
241
246
|
}, name))]
|
|
242
247
|
}) : null]
|
|
243
248
|
}) : null, /* @__PURE__ */ jsx("div", {
|
|
244
|
-
className: "clarify-footer-brand flex justify-end",
|
|
249
|
+
className: "clarify-footer-brand flex justify-end self-end",
|
|
245
250
|
children: /* @__PURE__ */ jsx(BuiltWithClarify, {})
|
|
246
251
|
})]
|
|
247
252
|
});
|
|
@@ -516,7 +521,7 @@ function NotFoundRouteElement(props) {
|
|
|
516
521
|
return /* @__PURE__ */ jsx(RouteComponent, {});
|
|
517
522
|
}
|
|
518
523
|
function AppShell(arg0) {
|
|
519
|
-
const { config, routes, navigation } = arg0;
|
|
524
|
+
const { config, routes, navigation, footerComponent } = arg0;
|
|
520
525
|
const location = useLocation();
|
|
521
526
|
const pathname = normalizeRoutePath(location.pathname);
|
|
522
527
|
const currentRoute = routeForPath(routes, pathname);
|
|
@@ -574,6 +579,7 @@ function AppShell(arg0) {
|
|
|
574
579
|
/* @__PURE__ */ jsxs("div", {
|
|
575
580
|
className: "clarify-layout pb-12 mx-auto grid w-full max-w-(--clarify-theme-layout-max-width) grid-cols-1 lg:grid-cols-(--clarify-layout-sidebar-grid) xl:grid-cols-(--clarify-layout-sidebar-grid-wide)",
|
|
576
581
|
children: [/* @__PURE__ */ jsx("aside", {
|
|
582
|
+
"data-pagefind-ignore": true,
|
|
577
583
|
className: clsx("clarify-sidebar hidden lg:sticky lg:z-30 lg:block lg:h-(--clarify-sidebar-height) lg:self-start lg:overflow-y-auto lg:bg-(--clarify-theme-tokens-colors-background) lg:px-5 lg:pb-8 xl:px-6", hasTabs ? "lg:top-28 lg:h-(--clarify-sidebar-height-with-tabs) lg:pt-6" : "lg:top-14 lg:pt-6"),
|
|
578
584
|
children: /* @__PURE__ */ jsx(Navigation, { navigation: currentNavigation.items })
|
|
579
585
|
}), /* @__PURE__ */ jsxs("div", {
|
|
@@ -586,6 +592,7 @@ function AppShell(arg0) {
|
|
|
586
592
|
}),
|
|
587
593
|
/* @__PURE__ */ jsx("main", {
|
|
588
594
|
className: "clarify-main min-w-0 flex-auto",
|
|
595
|
+
"data-pagefind-body": true,
|
|
589
596
|
children: /* @__PURE__ */ jsx(PageErrorBoundary, {
|
|
590
597
|
title: text("renderError.title"),
|
|
591
598
|
description: text("renderError.description"),
|
|
@@ -619,7 +626,7 @@ function AppShell(arg0) {
|
|
|
619
626
|
]
|
|
620
627
|
})]
|
|
621
628
|
}),
|
|
622
|
-
/* @__PURE__ */ jsx(PageFooter, {})
|
|
629
|
+
/* @__PURE__ */ jsx(PageFooter, { component: footerComponent })
|
|
623
630
|
]
|
|
624
631
|
})
|
|
625
632
|
});
|
|
@@ -1277,170 +1284,6 @@ function createRandomTheme() {
|
|
|
1277
1284
|
};
|
|
1278
1285
|
}
|
|
1279
1286
|
//#endregion
|
|
1280
|
-
//#region source/theme/variables.ts
|
|
1281
|
-
var clarifyThemePresets = {
|
|
1282
|
-
default: {
|
|
1283
|
-
preset: "default",
|
|
1284
|
-
tokens: {
|
|
1285
|
-
colors: {
|
|
1286
|
-
primary: "#047857",
|
|
1287
|
-
accent: "#0D9488",
|
|
1288
|
-
background: "#ffffff",
|
|
1289
|
-
foreground: "#111827",
|
|
1290
|
-
surface: "#ffffff",
|
|
1291
|
-
muted: "#64748b",
|
|
1292
|
-
border: "rgb(15 23 42 / 0.12)",
|
|
1293
|
-
codeBackground: "#f6fbf8"
|
|
1294
|
-
},
|
|
1295
|
-
radius: {
|
|
1296
|
-
sm: "6px",
|
|
1297
|
-
md: "10px",
|
|
1298
|
-
lg: "14px",
|
|
1299
|
-
xl: "18px"
|
|
1300
|
-
}
|
|
1301
|
-
},
|
|
1302
|
-
layout: { maxWidth: "82rem" },
|
|
1303
|
-
editor: false
|
|
1304
|
-
},
|
|
1305
|
-
base: {
|
|
1306
|
-
preset: "base",
|
|
1307
|
-
tokens: {
|
|
1308
|
-
colors: {
|
|
1309
|
-
primary: "#18181b",
|
|
1310
|
-
accent: "#52525b",
|
|
1311
|
-
background: "#ffffff",
|
|
1312
|
-
foreground: "#18181b",
|
|
1313
|
-
surface: "#ffffff",
|
|
1314
|
-
muted: "#71717a",
|
|
1315
|
-
border: "rgb(24 24 27 / 0.12)",
|
|
1316
|
-
codeBackground: "#f4f4f5"
|
|
1317
|
-
},
|
|
1318
|
-
radius: {
|
|
1319
|
-
sm: "6px",
|
|
1320
|
-
md: "8px",
|
|
1321
|
-
lg: "12px",
|
|
1322
|
-
xl: "16px"
|
|
1323
|
-
}
|
|
1324
|
-
},
|
|
1325
|
-
layout: { maxWidth: "80rem" },
|
|
1326
|
-
editor: false
|
|
1327
|
-
}
|
|
1328
|
-
};
|
|
1329
|
-
function cloneThemeColorValue(value) {
|
|
1330
|
-
return typeof value === "string" ? value : { ...value };
|
|
1331
|
-
}
|
|
1332
|
-
function cloneTheme(theme) {
|
|
1333
|
-
return {
|
|
1334
|
-
preset: theme.preset,
|
|
1335
|
-
tokens: {
|
|
1336
|
-
colors: {
|
|
1337
|
-
primary: cloneThemeColorValue(theme.tokens.colors.primary),
|
|
1338
|
-
accent: cloneThemeColorValue(theme.tokens.colors.accent),
|
|
1339
|
-
background: cloneThemeColorValue(theme.tokens.colors.background),
|
|
1340
|
-
foreground: cloneThemeColorValue(theme.tokens.colors.foreground),
|
|
1341
|
-
surface: cloneThemeColorValue(theme.tokens.colors.surface),
|
|
1342
|
-
muted: cloneThemeColorValue(theme.tokens.colors.muted),
|
|
1343
|
-
border: cloneThemeColorValue(theme.tokens.colors.border),
|
|
1344
|
-
codeBackground: cloneThemeColorValue(theme.tokens.colors.codeBackground)
|
|
1345
|
-
},
|
|
1346
|
-
radius: { ...theme.tokens.radius }
|
|
1347
|
-
},
|
|
1348
|
-
layout: { ...theme.layout },
|
|
1349
|
-
editor: theme.editor
|
|
1350
|
-
};
|
|
1351
|
-
}
|
|
1352
|
-
function isModeColorValue(value) {
|
|
1353
|
-
return typeof value === "object" && value !== null;
|
|
1354
|
-
}
|
|
1355
|
-
function resolveThemeColorValue(value, resolvedTheme = "light") {
|
|
1356
|
-
if (!isModeColorValue(value)) return value;
|
|
1357
|
-
return value[resolvedTheme] ?? value.light ?? value.dark ?? "";
|
|
1358
|
-
}
|
|
1359
|
-
function resolveThemeColors(colors, resolvedTheme = "light") {
|
|
1360
|
-
return {
|
|
1361
|
-
primary: resolveThemeColorValue(colors.primary, resolvedTheme),
|
|
1362
|
-
accent: resolveThemeColorValue(colors.accent, resolvedTheme),
|
|
1363
|
-
background: resolveThemeColorValue(colors.background, resolvedTheme),
|
|
1364
|
-
foreground: resolveThemeColorValue(colors.foreground, resolvedTheme),
|
|
1365
|
-
surface: resolveThemeColorValue(colors.surface, resolvedTheme),
|
|
1366
|
-
muted: resolveThemeColorValue(colors.muted, resolvedTheme),
|
|
1367
|
-
border: resolveThemeColorValue(colors.border, resolvedTheme),
|
|
1368
|
-
codeBackground: resolveThemeColorValue(colors.codeBackground, resolvedTheme)
|
|
1369
|
-
};
|
|
1370
|
-
}
|
|
1371
|
-
function matchesPresetTheme(theme) {
|
|
1372
|
-
const preset = clarifyThemePresets[theme.preset];
|
|
1373
|
-
return JSON.stringify({
|
|
1374
|
-
tokens: theme.tokens,
|
|
1375
|
-
layout: theme.layout
|
|
1376
|
-
}) === JSON.stringify({
|
|
1377
|
-
tokens: preset.tokens,
|
|
1378
|
-
layout: preset.layout
|
|
1379
|
-
});
|
|
1380
|
-
}
|
|
1381
|
-
function effectiveTheme(theme, resolvedTheme) {
|
|
1382
|
-
if (resolvedTheme !== "dark" || !matchesPresetTheme(theme)) return theme;
|
|
1383
|
-
return {
|
|
1384
|
-
...theme,
|
|
1385
|
-
tokens: {
|
|
1386
|
-
...theme.tokens,
|
|
1387
|
-
colors: {
|
|
1388
|
-
...theme.tokens.colors,
|
|
1389
|
-
background: "#09090b",
|
|
1390
|
-
foreground: "#ffffff",
|
|
1391
|
-
surface: "#18181b",
|
|
1392
|
-
muted: "#a1a1aa",
|
|
1393
|
-
border: "rgb(255 255 255 / 0.1)",
|
|
1394
|
-
codeBackground: "#18181b"
|
|
1395
|
-
}
|
|
1396
|
-
}
|
|
1397
|
-
};
|
|
1398
|
-
}
|
|
1399
|
-
function themeToCssVariables(theme, resolvedTheme) {
|
|
1400
|
-
const resolved = effectiveTheme(theme, resolvedTheme);
|
|
1401
|
-
const colors = resolveThemeColors(resolved.tokens.colors, resolvedTheme);
|
|
1402
|
-
const { radius } = resolved.tokens;
|
|
1403
|
-
return {
|
|
1404
|
-
"--clarify-theme-tokens-colors-primary": colors.primary,
|
|
1405
|
-
"--clarify-theme-tokens-colors-accent": colors.accent,
|
|
1406
|
-
"--clarify-theme-tokens-colors-background": colors.background,
|
|
1407
|
-
"--clarify-theme-tokens-colors-foreground": colors.foreground,
|
|
1408
|
-
"--clarify-theme-tokens-colors-surface": colors.surface,
|
|
1409
|
-
"--clarify-theme-tokens-colors-muted": colors.muted,
|
|
1410
|
-
"--clarify-theme-tokens-colors-border": colors.border,
|
|
1411
|
-
"--clarify-theme-tokens-colors-code-background": colors.codeBackground,
|
|
1412
|
-
"--clarify-theme-tokens-radius-sm": radius.sm,
|
|
1413
|
-
"--clarify-theme-tokens-radius-md": radius.md,
|
|
1414
|
-
"--clarify-theme-tokens-radius-lg": radius.lg,
|
|
1415
|
-
"--clarify-theme-tokens-radius-xl": radius.xl,
|
|
1416
|
-
"--clarify-theme-layout-max-width": resolved.layout.maxWidth
|
|
1417
|
-
};
|
|
1418
|
-
}
|
|
1419
|
-
function uniqueElements(elements) {
|
|
1420
|
-
return Array.from(new Set(elements));
|
|
1421
|
-
}
|
|
1422
|
-
function resolveThemeVariableTargets(target) {
|
|
1423
|
-
if (typeof document === "undefined") return [];
|
|
1424
|
-
if (target instanceof HTMLElement) return [target];
|
|
1425
|
-
if (typeof target === "string") return Array.from(document.querySelectorAll(target));
|
|
1426
|
-
return uniqueElements([document.documentElement, ...Array.from(document.querySelectorAll(".clarify-app"))]);
|
|
1427
|
-
}
|
|
1428
|
-
function applyThemeCssVariables(variables, targets) {
|
|
1429
|
-
const previousValues = /* @__PURE__ */ new Map();
|
|
1430
|
-
for (const element of targets) {
|
|
1431
|
-
const elementPreviousValues = /* @__PURE__ */ new Map();
|
|
1432
|
-
for (const [property, value] of Object.entries(variables)) {
|
|
1433
|
-
elementPreviousValues.set(property, element.style.getPropertyValue(property));
|
|
1434
|
-
element.style.setProperty(property, value);
|
|
1435
|
-
}
|
|
1436
|
-
previousValues.set(element, elementPreviousValues);
|
|
1437
|
-
}
|
|
1438
|
-
return () => {
|
|
1439
|
-
for (const [element, elementPreviousValues] of previousValues) for (const [property, previousValue] of elementPreviousValues) if (previousValue) element.style.setProperty(property, previousValue);
|
|
1440
|
-
else element.style.removeProperty(property);
|
|
1441
|
-
};
|
|
1442
|
-
}
|
|
1443
|
-
//#endregion
|
|
1444
1287
|
//#region source/theme/ThemeEditor.tsx
|
|
1445
1288
|
var colorTokenFields = [
|
|
1446
1289
|
{
|
|
@@ -1754,4 +1597,4 @@ function ThemeRoot(props) {
|
|
|
1754
1597
|
//#endregion
|
|
1755
1598
|
export { AppShell as a, clarifyThemeEditorPresets as i, ThemeEditor as n, PageFooter as o, applyClarifyThemeVariables as r, BuiltWithClarify as s, ThemeRoot as t };
|
|
1756
1599
|
|
|
1757
|
-
//# sourceMappingURL=ThemeRoot-
|
|
1600
|
+
//# sourceMappingURL=ThemeRoot-C_ZdzSMu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeRoot-C_ZdzSMu.js","names":[],"sources":["../source/app/ErrorBoundary.tsx","../source/assets/clarify.svg?url","../source/app/BuiltWithClarify.tsx","../source/app/PageFooter.tsx","../source/app/PageNavigation.tsx","../source/app/PageSkeleton.tsx","../source/app/AppShell.tsx","../source/theme/randomTheme.ts","../source/theme/ThemeEditor.tsx","../source/theme/ThemeRoot.tsx"],"sourcesContent":["import { Component, useState } from 'react'\nimport type { ErrorInfo, ReactNode } from 'react'\n\nimport { copyTextToClipboard } from '../utils/clipboard'\n\ntype PageErrorBoundaryProps = {\n children: ReactNode;\n title: string;\n description: string;\n reloadLabel: string;\n detailsLabel: string;\n pathLabel: string;\n typeLabel: string;\n messageLabel: string;\n stackLabel: string;\n componentStackLabel: string;\n timestampLabel: string;\n copyLabel: string;\n copiedLabel: string;\n path: string;\n}\n\ntype PageErrorBoundaryState = {\n error?: Error;\n errorInfo?: ErrorInfo;\n occurredAt?: string;\n}\n\ntype PageErrorPanelProps = {\n title: string;\n description: string;\n reloadLabel: string;\n detailsLabel: string;\n pathLabel: string;\n typeLabel: string;\n messageLabel: string;\n stackLabel: string;\n componentStackLabel: string;\n timestampLabel: string;\n copyLabel: string;\n copiedLabel: string;\n path: string;\n error: Error;\n errorInfo?: ErrorInfo;\n occurredAt?: string;\n}\n\nfunction PageErrorPanel(props: PageErrorPanelProps) {\n const {\n title,\n description,\n reloadLabel,\n detailsLabel,\n pathLabel,\n typeLabel,\n messageLabel,\n stackLabel,\n componentStackLabel,\n timestampLabel,\n copyLabel,\n copiedLabel,\n path,\n error,\n errorInfo,\n occurredAt,\n } = props\n const [copiedStack, setCopiedStack] = useState(false)\n const stack = error.stack ?? error.message\n const componentStack = errorInfo?.componentStack?.trim()\n const stackText = componentStack ? `${stack}\\n\\n${componentStackLabel}\\n${componentStack}` : stack\n const capturedAt = occurredAt ?? new Date().toISOString()\n\n async function copyStack() {\n if (!(await copyTextToClipboard(stackText))) return\n setCopiedStack(true)\n window.setTimeout(() => setCopiedStack(false), 1600)\n }\n\n return (\n <section className=\"mx-auto flex min-h-(--clarify-error-page-min-height) w-full max-w-4xl flex-col justify-center py-16 text-(--clarify-theme-tokens-colors-foreground)\" aria-labelledby=\"clarify-render-error-title\" role=\"alert\">\n <div className=\"border-t-2 border-(--clarify-error-accent-text) pt-8\">\n <div className=\"flex flex-col gap-6 sm:flex-row sm:items-start sm:justify-between\">\n <div>\n <p className=\"font-mono text-xs/5 font-semibold uppercase tracking-wide text-(--clarify-error-accent-text)\">Render error</p>\n <h1 id=\"clarify-render-error-title\" className=\"mt-3 text-3xl/9 font-semibold tracking-tight text-(--clarify-theme-tokens-colors-foreground)\">{title}</h1>\n <p className=\"mt-4 max-w-2xl text-sm/6 text-(--clarify-theme-tokens-colors-muted)\">{description}</p>\n </div>\n <button\n type=\"button\"\n className=\"inline-flex shrink-0 items-center rounded-(--clarify-theme-tokens-radius-md) bg-(--clarify-theme-tokens-colors-primary) px-4 py-2 text-sm/5 font-semibold text-white shadow-xs transition hover:opacity-90\"\n onClick={() => window.location.reload()}\n >\n {reloadLabel}\n </button>\n </div>\n\n <dl className=\"mt-8 grid gap-px overflow-hidden rounded-(--clarify-theme-tokens-radius-lg) border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-border) sm:grid-cols-3\">\n {[\n [pathLabel, path],\n [typeLabel, error.name],\n [timestampLabel, capturedAt],\n ].map(([label, value]) => (\n <div key={label} className=\"min-w-0 bg-(--clarify-theme-tokens-colors-surface) px-4 py-3\">\n <dt className=\"text-xs/5 font-semibold uppercase tracking-wide text-(--clarify-ui-text-faint)\">{label}</dt>\n <dd className=\"mt-1 truncate font-mono text-sm/6 text-(--clarify-ui-text-strong)\" title={value}>{value}</dd>\n </div>\n ))}\n </dl>\n\n <div className=\"mt-6 overflow-hidden rounded-(--clarify-theme-tokens-radius-lg) border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-code-background)\">\n <div className=\"flex items-center justify-between gap-3 border-b border-(--clarify-theme-tokens-colors-border) px-4 py-3\">\n <p className=\"text-sm/6 font-semibold text-(--clarify-ui-text-strong)\">{detailsLabel}</p>\n <button\n type=\"button\"\n className=\"rounded-(--clarify-theme-tokens-radius-sm) px-2 py-1 text-xs/5 font-semibold text-(--clarify-ui-text-soft) ring-1 ring-(--clarify-theme-tokens-colors-border) transition hover:bg-(--clarify-ui-hover-background) hover:text-(--clarify-ui-text-strong)\"\n onClick={copyStack}\n >\n {copiedStack ? copiedLabel : copyLabel}\n </button>\n </div>\n <div className=\"px-4 py-4 text-xs/5 text-(--clarify-ui-text)\">\n <p className=\"font-semibold uppercase tracking-wide text-(--clarify-ui-text-faint)\">{messageLabel}</p>\n <p className=\"mt-2 break-words font-mono text-sm/6 font-semibold text-(--clarify-theme-tokens-colors-foreground)\">{error.message}</p>\n <p className=\"mt-6 font-semibold uppercase tracking-wide text-(--clarify-ui-text-faint)\">{stackLabel}</p>\n <pre className=\"mt-2 max-h-(--clarify-error-details-max-height) overflow-auto whitespace-pre-wrap break-words font-mono\">\n {stack}\n </pre>\n {componentStack ? (\n <>\n <p className=\"mt-6 font-semibold uppercase tracking-wide text-(--clarify-ui-text-faint)\">{componentStackLabel}</p>\n <pre className=\"mt-2 max-h-(--clarify-error-component-stack-max-height) overflow-auto whitespace-pre-wrap break-words font-mono\">\n {componentStack}\n </pre>\n </>\n ) : null}\n </div>\n </div>\n </div>\n </section>\n )\n}\n\nexport class PageErrorBoundary extends Component<PageErrorBoundaryProps, PageErrorBoundaryState> {\n state: PageErrorBoundaryState = {}\n\n static getDerivedStateFromError(error: Error): PageErrorBoundaryState {\n return { error, occurredAt: new Date().toISOString() }\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error('[clarify] Failed to render page:', error, errorInfo)\n this.setState({ errorInfo })\n }\n\n render() {\n const { error, errorInfo, occurredAt } = this.state\n if (!error) return this.props.children\n\n return (\n <PageErrorPanel\n title={this.props.title}\n description={this.props.description}\n reloadLabel={this.props.reloadLabel}\n detailsLabel={this.props.detailsLabel}\n pathLabel={this.props.pathLabel}\n typeLabel={this.props.typeLabel}\n messageLabel={this.props.messageLabel}\n stackLabel={this.props.stackLabel}\n componentStackLabel={this.props.componentStackLabel}\n timestampLabel={this.props.timestampLabel}\n copyLabel={this.props.copyLabel}\n copiedLabel={this.props.copiedLabel}\n path={this.props.path}\n error={error}\n errorInfo={errorInfo}\n occurredAt={occurredAt}\n />\n )\n }\n}\n","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='279px'%20height='200px'%20viewBox='0%200%20279%20200'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eclarify%3c/title%3e%3cg%20id='页面-1'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20id='clarify'%20transform='translate(-0,%200.0054)'%3e%3cpath%20d='M44.867217,0.0054376148%20C130.715579,1.00591567%20200,70.9091172%20200,156.994562%20L199.986321,155.127494%20C199.384888,180.009127%20179.026368,199.994562%20154,199.994562%20L46,199.994562%20C20.5949015,199.994562%200,179.399661%200,153.994562%20L0,45.9945624%20C0,21.0975659%2019.7793434,0.820282524%2044.4815926,0.0191499894%20Z'%20fill='%2300D492'%3e%3c/path%3e%3cpath%20d='M123.867217,0.0054376148%20C209.715579,1.00591567%20279,70.9091172%20279,156.994562%20L278.986321,155.127494%20C278.384888,180.009127%20258.026368,199.994562%20233,199.994562%20L125,199.994562%20C99.5949015,199.994562%2079,179.399661%2079,153.994562%20L79,45.9945624%20C79,21.0975659%2098.7793434,0.820282524%20123.481593,0.0191499894%20Z'%20id='clarify-right'%20fill-opacity='0.6'%20fill='%2300F6C9'%20transform='translate(179,%20100)%20rotate(-90)%20translate(-179,%20-100)'%3e%3c/path%3e%3cpath%20d='M199.979267,154.416906%20L199.984438,155.157125%20L199.962366,155.872459%20C198.977251,180.406837%20178.776104,199.994562%20154,199.994562%20L124.372438,199.994125%20L124.249053,199.994081%20C99.6939678,199.603921%2079.8122712,179.973634%2079.01915,155.518407%20L79.0054376,155.132783%20C79.5830823,105.566626%20103.129768,61.5221348%20139.498462,33.1463428%20C175.69419,61.3871018%20199.186123,105.143863%20199.979267,154.416906%20Z'%20id='形状结合'%20fill='%2300F692'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e\"","import clarifyMarkUrl from '../assets/clarify.svg?url'\nimport { useBuiltInText } from '../core/i18n'\n\nexport function BuiltWithClarify() {\n const t = useBuiltInText()\n\n return (\n <a\n href=\"https://clarify.pub\"\n target=\"_blank\"\n rel=\"noreferrer\"\n aria-label={t('builtWith.label')}\n className=\"clarify-built-with inline-flex items-center gap-1.5 rounded-full px-2 py-1 font-medium no-underline transition\"\n >\n <span>{t('builtWith.prefix')}</span>\n <img src={clarifyMarkUrl} alt=\"\" className=\"clarify-built-with-logo h-3.5 w-auto flex-none object-contain\" />\n <span className=\"clarify-built-with-brand font-semibold\">Clarify</span>\n </a>\n )\n}\n","import clsx from 'clsx'\nimport type { ComponentType } from 'react'\nimport { Link, useLocation } from 'react-router-dom'\n\nimport { useClarifyConfig } from '../core/context'\nimport type { ClarifyConfig, ClarifyLocalizedText, ClarifyNavbarLink } from '../core/types'\nimport { isExternalHref, localizeHref } from '../utils/href'\n\nimport { BuiltWithClarify } from './BuiltWithClarify'\n\nfunction resolveLocalizedText(text: ClarifyLocalizedText, locale?: string, fallbackLocale?: string): string {\n if (typeof text === 'string') return text\n return (locale ? text[locale] : undefined) ?? (fallbackLocale ? text[fallbackLocale] : undefined) ?? Object.values(text)[0] ?? ''\n}\n\nfunction localeForPath(config: ClarifyConfig, pathname: string): string | undefined {\n const i18n = config.i18n\n if (!i18n) return undefined\n const firstSegment = pathname.split('/').filter(Boolean)[0]\n return i18n.locales.find((locale) => locale.code === firstSegment)?.code ?? i18n.defaultLocale\n}\n\ntype FooterLinkProps = { link: ClarifyNavbarLink; locale?: string; config: ClarifyConfig }\n\nfunction FooterLink(arg0: FooterLinkProps) {\n const { link, locale, config } = arg0\n const external = link.external ?? isExternalHref(link.href)\n const href = external ? link.href : localizeHref(link.href, config, locale)\n const className = \"clarify-footer-link no-underline transition\"\n const label = resolveLocalizedText(link.label, locale, config.i18n?.defaultLocale)\n\n if (external) {\n return (\n <a href={href} target=\"_blank\" rel=\"noreferrer\" className={className}>\n {label}\n </a>\n )\n }\n\n return (\n <Link to={href} className={className}>\n {label}\n </Link>\n )\n}\n\ntype SocialLinkProps = { name: string; href: string }\n\nfunction SocialLink(arg0: SocialLinkProps) {\n const { name, href } = arg0\n\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"clarify-footer-social capitalize no-underline transition\"\n >\n {name}\n </a>\n )\n}\n\nexport type PageFooterProps = {\n component?: ComponentType\n}\n\nexport function PageFooter(props: PageFooterProps = {}) {\n const config = useClarifyConfig()\n const location = useLocation()\n const locale = localeForPath(config, location.pathname)\n const footer = config.footer\n const builtInFooter = footer && typeof footer === 'object' ? footer : undefined\n const CustomFooter = props.component\n const links = builtInFooter?.links ?? []\n const socials = Object.entries(builtInFooter?.socials ?? {})\n const copyright = builtInFooter?.copyright\n ? resolveLocalizedText(builtInFooter.copyright, locale, config.i18n?.defaultLocale)\n : undefined\n const hasBuiltInFooter = Boolean(copyright || links.length > 0 || socials.length > 0)\n\n return (\n <footer className=\"clarify-page-footer mx-auto flex w-full max-w-(--clarify-theme-layout-max-width) flex-col gap-4 border-t border-(--clarify-theme-tokens-colors-border) px-4 py-8 sm:px-6 lg:mt-24 lg:px-5\">\n {CustomFooter ? (\n <div className=\"clarify-footer-custom w-full\">\n <CustomFooter />\n </div>\n ) : hasBuiltInFooter ? (\n <div\n className={clsx(\n 'clarify-footer-content flex flex-col items-end gap-3 text-right',\n hasBuiltInFooter && 'sm:items-start sm:text-left',\n )}\n >\n {copyright ? (\n <p className=\"clarify-footer-copyright m-0\">{copyright}</p>\n ) : null}\n {links.length > 0 || socials.length > 0 ? (\n <div className=\"clarify-footer-links flex flex-wrap justify-end gap-x-4 gap-y-2 sm:justify-start\">\n {links.map((link) => (\n <FooterLink key={`${link.href}-${resolveLocalizedText(link.label, locale, config.i18n?.defaultLocale)}`} link={link} locale={locale} config={config} />\n ))}\n {socials.map(([name, href]) => (\n <SocialLink key={name} name={name} href={href} />\n ))}\n </div>\n ) : null}\n </div>\n ) : null}\n <div className=\"clarify-footer-brand flex justify-end self-end\">\n <BuiltWithClarify />\n </div>\n </footer>\n )\n}\n","import clsx from 'clsx'\nimport { ChevronLeft, ChevronRight } from 'lucide-react'\nimport { Link } from 'react-router-dom'\n\nimport { useBuiltInText } from '../core/i18n'\nimport type { NavigationNode, RouteItem } from '../core/types'\nimport { isSameRoutePath, normalizeRoutePath } from '../utils/path'\n\nfunction flattenNavigation(nodes: NavigationNode[]): NavigationNode[] {\n return nodes.flatMap((node) => node.children?.length ? flattenNavigation(node.children) : [node])\n}\n\ntype PageNavigationProps = { navigation: NavigationNode[]; currentRoute?: RouteItem }\n\nexport function PageNavigation(arg0: PageNavigationProps) {\n const { navigation, currentRoute } = arg0\n const t = useBuiltInText()\n if (!currentRoute) return null\n\n const pageRoutes = flattenNavigation(navigation)\n const currentIndex = pageRoutes.findIndex((route) => isSameRoutePath(route.path, currentRoute.path))\n if (currentIndex === -1) return null\n\n const previous = pageRoutes[currentIndex - 1]\n const next = pageRoutes[currentIndex + 1]\n if (!previous && !next) return null\n\n return (\n <nav className=\"clarify-page-navigation mt-6 grid gap-3 @3xl:grid-cols-2\" aria-label={t('navigation.previousNext')}>\n <PageNavigationLink direction=\"previous\" route={previous} />\n <PageNavigationLink direction=\"next\" route={next} />\n </nav>\n )\n}\n\ntype PageNavigationLinkProps = { direction: 'previous' | 'next'; route?: NavigationNode }\n\nfunction PageNavigationLink(arg0: PageNavigationLinkProps) {\n const { direction, route } = arg0\n const t = useBuiltInText()\n if (!route) return <div className=\"hidden @3xl:block\" />\n\n const isNext = direction === 'next'\n\n return (\n <Link\n to={normalizeRoutePath(route.path)}\n className={clsx(\n 'group flex min-w-0 items-center gap-3 rounded-lg border border-(--clarify-theme-tokens-colors-border) px-4 py-3 no-underline transition hover:border-(--clarify-theme-tokens-colors-primary) hover:bg-(--clarify-ui-hover-background)',\n isNext && '@3xl:justify-end @3xl:text-right',\n )}\n >\n {!isNext ? <ChevronLeft className=\"h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-muted) transition group-hover:text-(--clarify-theme-tokens-colors-primary)\" /> : null}\n <span className=\"min-w-0 flex-1\">\n <span className=\"clarify-page-navigation-label block font-medium uppercase tracking-wide text-(--clarify-theme-tokens-colors-muted)\">{isNext ? t('navigation.next') : t('navigation.previous')}</span>\n <span className=\"clarify-page-navigation-title mt-0.5 block truncate font-semibold text-(--clarify-theme-tokens-colors-foreground)\">{route.title}</span>\n </span>\n {isNext ? <ChevronRight className=\"h-3.5 w-3.5 shrink-0 text-(--clarify-theme-tokens-colors-muted) transition group-hover:text-(--clarify-theme-tokens-colors-primary)\" /> : null}\n </Link>\n )\n}\n","import clsx from 'clsx'\n\ntype SkeletonBlockProps = {\n className?: string;\n}\n\nconst paragraphLines = ['w-full', 'w-11/12', 'w-4/5']\nconst codeLines = ['w-5/6', 'w-2/3', 'w-3/4', 'w-1/2']\n\nfunction SkeletonBlock(props: SkeletonBlockProps) {\n return <div aria-hidden=\"true\" className={clsx('rounded-(--clarify-skeleton-radius) bg-(--clarify-skeleton-background)', props.className)} />\n}\n\nfunction SkeletonParagraph() {\n return (\n <div className=\"space-y-3\">\n {paragraphLines.map((width) => (\n <SkeletonBlock key={width} className={clsx('h-3', width)} />\n ))}\n </div>\n )\n}\n\nexport function PageSkeleton() {\n return (\n <section className=\"clarify-page-skeleton animate-pulse space-y-10 py-8\" aria-label=\"Loading page\">\n <div className=\"space-y-5\">\n <SkeletonBlock className=\"h-3 w-24 rounded-full bg-(--clarify-skeleton-accent-background)\" />\n <SkeletonBlock className=\"h-11 w-full max-w-(--clarify-skeleton-title-width) rounded-3xl\" />\n <div className=\"max-w-3xl space-y-3\">\n <SkeletonBlock className=\"h-4 w-full\" />\n <SkeletonBlock className=\"h-4 w-5/6\" />\n </div>\n </div>\n\n <div className=\"grid gap-4 xl:grid-cols-2\">\n {[0, 1].map((item) => (\n <div key={item} className=\"rounded-(--clarify-skeleton-card-radius) border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) p-5 shadow-sm shadow-zinc-900/5\">\n <div className=\"flex items-start gap-4\">\n <SkeletonBlock className=\"h-10 w-10 shrink-0 bg-(--clarify-skeleton-accent-background)\" />\n <div className=\"min-w-0 flex-1 space-y-4\">\n <SkeletonBlock className=\"h-5 w-2/3\" />\n <SkeletonParagraph />\n </div>\n </div>\n </div>\n ))}\n </div>\n\n <div className=\"space-y-8\">\n <article className=\"space-y-5\">\n <SkeletonBlock className=\"h-7 w-full max-w-(--clarify-skeleton-heading-width) rounded-2xl\" />\n <SkeletonParagraph />\n <div className=\"rounded-(--clarify-theme-tokens-radius-lg) border border-(--clarify-ui-accent-border) bg-(--clarify-ui-accent-background) p-4\">\n <SkeletonBlock className=\"h-4 w-full max-w-(--clarify-skeleton-line-width) bg-(--clarify-skeleton-accent-background)\" />\n </div>\n </article>\n\n <div className=\"overflow-hidden rounded-(--clarify-skeleton-block-radius) border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-code-background)\">\n <div className=\"flex items-center gap-2 border-b border-(--clarify-theme-tokens-colors-border) px-4 py-3\">\n <SkeletonBlock className=\"h-3 w-3 rounded-full\" />\n <SkeletonBlock className=\"h-3 w-3 rounded-full\" />\n <SkeletonBlock className=\"h-3 w-3 rounded-full\" />\n <SkeletonBlock className=\"ml-3 h-3 w-32\" />\n </div>\n <div className=\"space-y-3 p-4\">\n {codeLines.map((width) => (\n <SkeletonBlock key={width} className={clsx('h-3', width)} />\n ))}\n </div>\n </div>\n\n <article className=\"space-y-5\">\n <SkeletonBlock className=\"h-7 w-full max-w-(--clarify-skeleton-heading-short-width) rounded-2xl\" />\n <div className=\"grid gap-3 sm:grid-cols-2\">\n {[0, 1, 2, 3].map((item) => (\n <div key={item} className=\"rounded-(--clarify-theme-tokens-radius-lg) border border-(--clarify-theme-tokens-colors-border) p-4\">\n <SkeletonBlock className=\"mb-3 h-4 w-1/2\" />\n <SkeletonBlock className=\"h-3 w-4/5\" />\n </div>\n ))}\n </div>\n </article>\n </div>\n </section>\n )\n}\n","import clsx from 'clsx'\nimport { Suspense, lazy, useEffect, useMemo } from 'react'\nimport type { ComponentType } from 'react'\nimport { Link, Routes, Route, useLocation } from 'react-router-dom'\n\nimport { ClarifyLocaleContext } from '../context'\nimport { useBuiltInText } from '../core/i18n'\nimport { ContentActions, Header, Navigation } from '../shell'\nimport type { RouteItem, ClarifyConfig, NavigationNode, NavigationTab, NavigationTree, TabbedNavigation } from '../types'\nimport { safeDecodeURIComponent } from '../utils/hash'\nimport { isSameRoutePath, normalizeRoutePath } from '../utils/path'\n\nimport { PageErrorBoundary } from './ErrorBoundary'\nimport { PageFooter } from './PageFooter'\nimport { PageNavigation } from './PageNavigation'\nimport { PageSkeleton } from './PageSkeleton'\nimport { SectionProvider, type Section } from './SectionProvider'\n\nexport type AppShellProps = {\n config: ClarifyConfig\n routes: RouteItem[]\n navigation: NavigationTree\n footerComponent?: ComponentType\n}\n\nfunction routeForPath(routes: RouteItem[], pathname: string): RouteItem | undefined {\n return routes.find((route) => isSameRoutePath(route.path, pathname))\n}\n\nfunction notFoundRouteForPath(routes: RouteItem[], pathname: string, currentLocale?: string): RouteItem | undefined {\n const localePrefix = currentLocale ? `/${currentLocale}` : undefined\n if (localePrefix && pathname.startsWith(`${localePrefix}/`)) {\n return routeForPath(routes, `${localePrefix}/404`)\n }\n return routeForPath(routes, '/404') ?? routes.find(route => isSameRoutePath(route.basePath, '/404'))\n}\n\nfunction sectionsForRoute(route?: RouteItem): Section[] {\n return (\n route?.sections?.map((section) => ({\n id: section.id,\n title: section.title,\n badge: section.badge,\n tags: section.tags,\n })) ?? []\n )\n}\n\nfunction resolveRouteComponent(route: RouteItem): ComponentType {\n if (route.lazy) return lazy(route.component as () => Promise<{ default: ComponentType }>)\n return route.component as ComponentType\n}\n\nfunction scrollToHash(hash: string) {\n if (!hash) return\n\n const targetId = safeDecodeURIComponent(hash.slice(1))\n window.requestAnimationFrame(() => {\n document.getElementById(targetId)?.scrollIntoView()\n window.requestAnimationFrame(() => {\n window.dispatchEvent(new Event('scroll'))\n })\n })\n}\n\nfunction localeForPath(config: ClarifyConfig, pathname: string, route?: RouteItem): string | undefined {\n if (route?.locale) return route.locale\n const i18n = config.i18n\n if (!i18n) return undefined\n const firstSegment = pathname.split('/').filter(Boolean)[0]\n return i18n.locales.find((locale) => locale.code === firstSegment)?.code ?? i18n.defaultLocale\n}\n\nfunction isTabbedNavigation(navigation: NavigationTree): navigation is TabbedNavigation {\n return !Array.isArray(navigation) && 'tabs' in navigation\n}\n\nfunction hasPath(nodes: NavigationNode[], pathname: string): boolean {\n return nodes.some((node) => isSameRoutePath(node.path, pathname) || hasPath(node.children ?? [], pathname))\n}\n\ntype NavigationState = {\n items: NavigationNode[]\n tabs?: NavigationTab[]\n}\n\nfunction navigationFromTabs(navigation: TabbedNavigation, pathname: string): NavigationState {\n const currentTab = navigation.tabs.find((tab) => isSameRoutePath(tab.path, pathname) || hasPath(tab.children, pathname))\n return {\n items: currentTab?.children ?? navigation.tabs[0]?.children ?? [],\n tabs: navigation.tabs,\n }\n}\n\nfunction navigationForLocale(navigation: NavigationTree, locale: string | undefined, pathname: string): NavigationState {\n if (Array.isArray(navigation)) return { items: navigation }\n if (isTabbedNavigation(navigation)) return navigationFromTabs(navigation, pathname)\n if (!locale) return { items: [] }\n\n const localizedNavigation = navigation[locale]\n if (!localizedNavigation) return { items: [] }\n return Array.isArray(localizedNavigation) ? { items: localizedNavigation } : navigationFromTabs(localizedNavigation, pathname)\n}\n\nfunction pageTitle(config: ClarifyConfig, route?: RouteItem): string {\n const routeTitle = route?.title?.trim()\n if (!routeTitle || routeTitle === config.title) return config.title\n return `${routeTitle} - ${config.title}`\n}\n\nfunction setNamedMeta(name: string, content: string | undefined) {\n const existing = document.head.querySelector<HTMLMetaElement>(`meta[name=\"${name}\"]`)\n if (!content) {\n existing?.remove()\n return\n }\n\n const meta = existing ?? document.createElement('meta')\n meta.name = name\n meta.content = content\n if (!existing) document.head.appendChild(meta)\n}\n\nfunction applyDocumentMetadata(config: ClarifyConfig, route?: RouteItem) {\n document.title = pageTitle(config, route)\n setNamedMeta('description', route?.description ?? config.description)\n setNamedMeta('keywords', route?.keywords?.join(', '))\n}\n\nfunction BuiltInNotFoundPage() {\n const text = useBuiltInText()\n\n return (\n <section className=\"mx-auto flex min-h-(--clarify-error-page-min-height) max-w-2xl flex-col justify-center py-16 text-(--clarify-theme-tokens-colors-foreground)\" aria-labelledby=\"clarify-not-found-title\">\n <p className=\"text-sm/6 font-semibold text-(--clarify-theme-tokens-colors-primary)\">{text('notFound.label')}</p>\n <h1 id=\"clarify-not-found-title\" className=\"mt-3 text-3xl/9 font-semibold tracking-tight text-(--clarify-theme-tokens-colors-foreground)\">{text('notFound.title')}</h1>\n <p className=\"mt-4 text-sm/6 text-(--clarify-theme-tokens-colors-muted)\">{text('notFound.description')}</p>\n <div className=\"mt-8\">\n <Link className=\"inline-flex items-center rounded-(--clarify-theme-tokens-radius-md) bg-(--clarify-theme-tokens-colors-primary) px-3 py-2 text-sm/5 font-semibold text-white shadow-xs transition hover:opacity-90\" to=\"/\">\n {text('notFound.home')}\n </Link>\n </div>\n </section>\n )\n}\n\ntype NotFoundRouteElementProps = {\n component?: ComponentType;\n}\n\nfunction NotFoundRouteElement(props: NotFoundRouteElementProps) {\n const { component: RouteComponent } = props\n if (!RouteComponent) return <BuiltInNotFoundPage />\n return <RouteComponent />\n}\n\nexport function AppShell(arg0: AppShellProps) {\n const { config, routes, navigation, footerComponent } = arg0\n const location = useLocation()\n const pathname = normalizeRoutePath(location.pathname)\n const currentRoute = routeForPath(routes, pathname)\n const currentLocale = localeForPath(config, pathname, currentRoute)\n const currentLocaleConfig = config.i18n?.locales.find((locale) => locale.code === currentLocale)\n const notFoundRoute = currentRoute ? undefined : notFoundRouteForPath(routes, pathname, currentLocale)\n const text = useBuiltInText(currentLocale)\n const currentNavigation = navigationForLocale(navigation, currentLocale, pathname)\n const sections = sectionsForRoute(currentRoute)\n const hasTabs = Boolean(currentNavigation.tabs?.length)\n const renderRoutes = useMemo(\n () => routes.map(route => ({ ...route, component: resolveRouteComponent(route) })),\n [routes],\n )\n const NotFoundRouteComponent = notFoundRoute\n ? renderRoutes.find(route => isSameRoutePath(route.path, notFoundRoute.path))?.component\n : undefined\n\n useEffect(() => {\n if (location.hash) {\n scrollToHash(location.hash)\n return\n }\n\n window.scrollTo({ top: 0, left: 0 })\n window.requestAnimationFrame(() => {\n window.dispatchEvent(new Event('scroll'))\n })\n }, [location.hash, location.pathname])\n\n useEffect(() => {\n if (!currentLocale) return\n document.documentElement.lang = currentLocale\n if (currentLocaleConfig?.dir) {\n document.documentElement.dir = currentLocaleConfig.dir\n } else {\n document.documentElement.removeAttribute('dir')\n }\n }, [currentLocale, currentLocaleConfig?.dir])\n\n useEffect(() => {\n applyDocumentMetadata(config, currentRoute ?? notFoundRoute)\n }, [config, currentRoute, notFoundRoute])\n\n return (\n <ClarifyLocaleContext.Provider value={currentLocale}>\n <SectionProvider sections={sections}>\n <Header\n config={config}\n navigation={currentNavigation.items}\n tabs={currentNavigation.tabs}\n routes={routes}\n currentLocale={currentLocale}\n currentRoute={currentRoute}\n />\n <div className=\"clarify-layout pb-12 mx-auto grid w-full max-w-(--clarify-theme-layout-max-width) grid-cols-1 lg:grid-cols-(--clarify-layout-sidebar-grid) xl:grid-cols-(--clarify-layout-sidebar-grid-wide)\">\n <aside\n data-pagefind-ignore\n className={clsx(\n 'clarify-sidebar hidden lg:sticky lg:z-30 lg:block lg:h-(--clarify-sidebar-height) lg:self-start lg:overflow-y-auto lg:bg-(--clarify-theme-tokens-colors-background) lg:px-5 lg:pb-8 xl:px-6',\n hasTabs ? 'lg:top-28 lg:h-(--clarify-sidebar-height-with-tabs) lg:pt-6' : 'lg:top-14 lg:pt-6',\n )}\n >\n <Navigation navigation={currentNavigation.items} />\n </aside>\n <div className={clsx('clarify-content @container relative flex min-h-screen min-w-0 flex-col px-4 sm:px-6 lg:px-8 xl:px-10', hasTabs ? 'pt-14 lg:pt-28' : 'pt-14')}>\n <ContentActions hasTabs={hasTabs} route={currentRoute} routePrefix={config.routePrefix} />\n <main className=\"clarify-main min-w-0 flex-auto\" data-pagefind-body>\n <PageErrorBoundary\n key={pathname}\n title={text('renderError.title')}\n description={text('renderError.description')}\n reloadLabel={text('renderError.reload')}\n detailsLabel={text('renderError.details')}\n pathLabel={text('renderError.path')}\n typeLabel={text('renderError.type')}\n messageLabel={text('renderError.message')}\n stackLabel={text('renderError.stack')}\n componentStackLabel={text('renderError.componentStack')}\n timestampLabel={text('renderError.timestamp')}\n copyLabel={text('actions.copy')}\n copiedLabel={text('actions.copied')}\n path={pathname}\n >\n <Suspense fallback={<PageSkeleton />}>\n <Routes>\n {renderRoutes.map((route) => (\n <Route key={route.path} path={route.path} element={<route.component />} />\n ))}\n <Route path=\"*\" element={<NotFoundRouteElement component={NotFoundRouteComponent} />} />\n </Routes>\n </Suspense>\n </PageErrorBoundary>\n </main>\n <PageNavigation navigation={currentNavigation.items} currentRoute={currentRoute} />\n </div>\n </div>\n <PageFooter component={footerComponent} />\n </SectionProvider>\n </ClarifyLocaleContext.Provider>\n )\n}\n","import type { ClarifyThemeConfig, ClarifyThemeRadiusTokensConfig } from '../types'\n\ntype RandomThemePalette = {\n primary: string;\n accent: string;\n background: string;\n foreground: string;\n surface: string;\n muted: string;\n borderMix: number;\n codeMix: number;\n}\n\nconst randomThemePalettes = [\n { primary: '#047857', accent: '#0D9488', background: '#ffffff', foreground: '#111827', surface: '#ffffff', muted: '#64748b', borderMix: 0.12, codeMix: 0.04 },\n { primary: '#2563eb', accent: '#7c3aed', background: '#f8fafc', foreground: '#0f172a', surface: '#ffffff', muted: '#64748b', borderMix: 0.12, codeMix: 0.05 },\n { primary: '#9333ea', accent: '#db2777', background: '#fdf4ff', foreground: '#2e1065', surface: '#ffffff', muted: '#7e22ce', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#ea580c', accent: '#ca8a04', background: '#fff7ed', foreground: '#431407', surface: '#fffbeb', muted: '#9a3412', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#0f766e', accent: '#0891b2', background: '#f0fdfa', foreground: '#042f2e', surface: '#ffffff', muted: '#0f766e', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#be123c', accent: '#f97316', background: '#fff1f2', foreground: '#4c0519', surface: '#ffffff', muted: '#9f1239', borderMix: 0.13, codeMix: 0.06 },\n { primary: '#4f46e5', accent: '#06b6d4', background: '#eef2ff', foreground: '#1e1b4b', surface: '#ffffff', muted: '#4338ca', borderMix: 0.12, codeMix: 0.05 },\n { primary: '#0e7490', accent: '#22c55e', background: '#ecfeff', foreground: '#083344', surface: '#ffffff', muted: '#155e75', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#7c2d12', accent: '#dc2626', background: '#fef2f2', foreground: '#450a0a', surface: '#fff7ed', muted: '#991b1b', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#365314', accent: '#84cc16', background: '#f7fee7', foreground: '#1a2e05', surface: '#ffffff', muted: '#4d7c0f', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#0369a1', accent: '#14b8a6', background: '#f0f9ff', foreground: '#082f49', surface: '#ffffff', muted: '#075985', borderMix: 0.12, codeMix: 0.05 },\n { primary: '#a21caf', accent: '#e879f9', background: '#fdf4ff', foreground: '#4a044e', surface: '#ffffff', muted: '#86198f', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#c2410c', accent: '#fb7185', background: '#fff7ed', foreground: '#431407', surface: '#ffffff', muted: '#9a3412', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#1d4ed8', accent: '#f59e0b', background: '#eff6ff', foreground: '#172554', surface: '#ffffff', muted: '#1e40af', borderMix: 0.12, codeMix: 0.05 },\n { primary: '#6d28d9', accent: '#10b981', background: '#faf5ff', foreground: '#2e1065', surface: '#ffffff', muted: '#6b21a8', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#0f172a', accent: '#64748b', background: '#f8fafc', foreground: '#0f172a', surface: '#ffffff', muted: '#475569', borderMix: 0.12, codeMix: 0.04 },\n { primary: '#18181b', accent: '#71717a', background: '#fafafa', foreground: '#18181b', surface: '#ffffff', muted: '#52525b', borderMix: 0.12, codeMix: 0.04 },\n { primary: '#166534', accent: '#06b6d4', background: '#f0fdf4', foreground: '#052e16', surface: '#ffffff', muted: '#15803d', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#9d174d', accent: '#8b5cf6', background: '#fdf2f8', foreground: '#500724', surface: '#ffffff', muted: '#be185d', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#4338ca', accent: '#ec4899', background: '#f5f3ff', foreground: '#312e81', surface: '#ffffff', muted: '#4f46e5', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#92400e', accent: '#65a30d', background: '#fffbeb', foreground: '#451a03', surface: '#ffffff', muted: '#a16207', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#0f766e', accent: '#f43f5e', background: '#f8fafc', foreground: '#134e4a', surface: '#ffffff', muted: '#0f766e', borderMix: 0.12, codeMix: 0.05 },\n { primary: '#1e3a8a', accent: '#0ea5e9', background: '#f8fafc', foreground: '#0f172a', surface: '#ffffff', muted: '#475569', borderMix: 0.12, codeMix: 0.04 },\n { primary: '#581c87', accent: '#f97316', background: '#faf5ff', foreground: '#3b0764', surface: '#ffffff', muted: '#7e22ce', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#991b1b', accent: '#facc15', background: '#fef2f2', foreground: '#450a0a', surface: '#ffffff', muted: '#b91c1c', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#115e59', accent: '#a3e635', background: '#f0fdfa', foreground: '#042f2e', surface: '#ffffff', muted: '#0f766e', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#075985', accent: '#38bdf8', background: '#f0f9ff', foreground: '#082f49', surface: '#ffffff', muted: '#0369a1', borderMix: 0.12, codeMix: 0.05 },\n { primary: '#7e22ce', accent: '#f472b6', background: '#faf5ff', foreground: '#3b0764', surface: '#ffffff', muted: '#9333ea', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#b45309', accent: '#ef4444', background: '#fffbeb', foreground: '#451a03', surface: '#ffffff', muted: '#92400e', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#065f46', accent: '#2dd4bf', background: '#ecfdf5', foreground: '#022c22', surface: '#ffffff', muted: '#047857', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#312e81', accent: '#22d3ee', background: '#eef2ff', foreground: '#1e1b4b', surface: '#ffffff', muted: '#4338ca', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#831843', accent: '#fb923c', background: '#fdf2f8', foreground: '#500724', surface: '#ffffff', muted: '#be185d', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#164e63', accent: '#818cf8', background: '#ecfeff', foreground: '#083344', surface: '#ffffff', muted: '#155e75', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#3f6212', accent: '#f97316', background: '#f7fee7', foreground: '#1a2e05', surface: '#ffffff', muted: '#4d7c0f', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#1e40af', accent: '#fb7185', background: '#eff6ff', foreground: '#172554', surface: '#ffffff', muted: '#2563eb', borderMix: 0.12, codeMix: 0.05 },\n { primary: '#701a75', accent: '#14b8a6', background: '#fdf4ff', foreground: '#4a044e', surface: '#ffffff', muted: '#a21caf', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#713f12', accent: '#eab308', background: '#fefce8', foreground: '#422006', surface: '#ffffff', muted: '#a16207', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#1f2937', accent: '#0ea5e9', background: '#f9fafb', foreground: '#111827', surface: '#ffffff', muted: '#4b5563', borderMix: 0.12, codeMix: 0.04 },\n { primary: '#27272a', accent: '#a855f7', background: '#fafafa', foreground: '#18181b', surface: '#ffffff', muted: '#52525b', borderMix: 0.12, codeMix: 0.04 },\n { primary: '#374151', accent: '#10b981', background: '#f3f4f6', foreground: '#111827', surface: '#ffffff', muted: '#4b5563', borderMix: 0.12, codeMix: 0.04 },\n { primary: '#064e3b', accent: '#f59e0b', background: '#f8fafc', foreground: '#022c22', surface: '#ffffff', muted: '#047857', borderMix: 0.12, codeMix: 0.05 },\n { primary: '#7f1d1d', accent: '#60a5fa', background: '#fff7ed', foreground: '#450a0a', surface: '#ffffff', muted: '#991b1b', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#3730a3', accent: '#34d399', background: '#f8fafc', foreground: '#1e1b4b', surface: '#ffffff', muted: '#4f46e5', borderMix: 0.12, codeMix: 0.05 },\n { primary: '#9f1239', accent: '#22c55e', background: '#fff1f2', foreground: '#4c0519', surface: '#ffffff', muted: '#be123c', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#134e4a', accent: '#8b5cf6', background: '#f0fdfa', foreground: '#042f2e', surface: '#ffffff', muted: '#0f766e', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#1d4ed8', accent: '#dc2626', background: '#f8fafc', foreground: '#0f172a', surface: '#ffffff', muted: '#475569', borderMix: 0.12, codeMix: 0.05 },\n { primary: '#6b21a8', accent: '#fbbf24', background: '#faf5ff', foreground: '#2e1065', surface: '#ffffff', muted: '#7e22ce', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#155e75', accent: '#84cc16', background: '#f0f9ff', foreground: '#083344', surface: '#ffffff', muted: '#0369a1', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#854d0e', accent: '#06b6d4', background: '#fefce8', foreground: '#422006', surface: '#ffffff', muted: '#a16207', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#14532d', accent: '#f43f5e', background: '#f0fdf4', foreground: '#052e16', surface: '#ffffff', muted: '#166534', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#4c1d95', accent: '#2dd4bf', background: '#f5f3ff', foreground: '#2e1065', surface: '#ffffff', muted: '#6d28d9', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#9a3412', accent: '#c084fc', background: '#fff7ed', foreground: '#431407', surface: '#ffffff', muted: '#c2410c', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#0c4a6e', accent: '#f472b6', background: '#f0f9ff', foreground: '#082f49', surface: '#ffffff', muted: '#075985', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#166534', accent: '#facc15', background: '#f7fee7', foreground: '#052e16', surface: '#ffffff', muted: '#15803d', borderMix: 0.13, codeMix: 0.05 },\n { primary: '#be185d', accent: '#38bdf8', background: '#fdf2f8', foreground: '#500724', surface: '#ffffff', muted: '#9d174d', borderMix: 0.14, codeMix: 0.06 },\n { primary: '#5b21b6', accent: '#ef4444', background: '#f5f3ff', foreground: '#2e1065', surface: '#ffffff', muted: '#6d28d9', borderMix: 0.14, codeMix: 0.06 },\n] as const satisfies readonly RandomThemePalette[]\n\nconst randomRadiusSets = [\n { sm: '2px', md: '6px', lg: '10px', xl: '14px' },\n { sm: '4px', md: '8px', lg: '12px', xl: '16px' },\n { sm: '6px', md: '10px', lg: '14px', xl: '18px' },\n { sm: '8px', md: '12px', lg: '18px', xl: '24px' },\n { sm: '10px', md: '14px', lg: '20px', xl: '28px' },\n { sm: '12px', md: '16px', lg: '24px', xl: '32px' },\n] as const satisfies ReadonlyArray<ClarifyThemeRadiusTokensConfig>\n\nconst randomLayoutWidths = ['72rem', '76rem', '78rem', '80rem', '82rem', '86rem', '90rem', '96rem', '104rem', '112rem', '120rem', '128rem', '144rem'] as const\n\nfunction randomItem<T>(items: readonly T[]): T {\n return items[Math.floor(Math.random() * items.length)]\n}\n\nfunction randomRgbMix(color: string, alpha: number): string {\n return `color-mix(in srgb, ${color} ${Math.round(alpha * 100)}%, transparent)`\n}\n\nfunction modeColor(light: string, dark: string): { light: string; dark: string } {\n return { light, dark }\n}\n\nexport function createRandomTheme(): ClarifyThemeConfig {\n const palette = randomItem(randomThemePalettes)\n const radius = randomItem(randomRadiusSets)\n const maxWidth = randomItem(randomLayoutWidths)\n\n return {\n preset: 'default',\n tokens: {\n colors: {\n primary: modeColor(palette.primary, palette.accent),\n accent: modeColor(palette.accent, palette.primary),\n background: modeColor(palette.background, '#09090b'),\n foreground: modeColor(palette.foreground, '#f8fafc'),\n surface: modeColor(palette.surface, '#18181b'),\n muted: modeColor(palette.muted, '#a1a1aa'),\n border: modeColor(randomRgbMix(palette.foreground, palette.borderMix), 'rgb(255 255 255 / 0.1)'),\n codeBackground: modeColor(randomRgbMix(palette.primary, palette.codeMix), '#18181b'),\n },\n radius: { ...radius },\n },\n layout: { maxWidth },\n editor: false,\n }\n}\n","import clsx from 'clsx'\nimport { ChevronDown, Settings, WandSparkles, X } from 'lucide-react'\nimport { useEffect, useMemo, useState } from 'react'\nimport type { ChangeEvent } from 'react'\n\nimport type {\n ClarifyThemeColorTokensConfig,\n ClarifyThemeConfig,\n ClarifyThemeLayoutConfig,\n ClarifyThemePreset,\n ClarifyThemeRadiusTokensConfig,\n} from '../types'\n\nimport { createRandomTheme } from './randomTheme'\nimport { useTheme } from './ThemeProvider'\nimport { applyThemeCssVariables, clarifyThemePresets, cloneTheme, resolveThemeColorValue, resolveThemeVariableTargets, themeToCssVariables } from './variables'\nimport type { ThemeVariableTarget } from './variables'\n\nconst colorTokenFields = [\n { key: 'primary', label: 'Primary' },\n { key: 'accent', label: 'Accent' },\n { key: 'background', label: 'Background' },\n { key: 'foreground', label: 'Foreground' },\n { key: 'surface', label: 'Surface' },\n { key: 'muted', label: 'Muted' },\n { key: 'border', label: 'Border' },\n { key: 'codeBackground', label: 'Code background' },\n] as const satisfies ReadonlyArray<{ key: keyof ClarifyThemeColorTokensConfig; label: string }>\n\nconst radiusTokenFields = [\n { key: 'sm', label: 'Small' },\n { key: 'md', label: 'Medium' },\n { key: 'lg', label: 'Large' },\n { key: 'xl', label: 'Extra large' },\n] as const satisfies ReadonlyArray<{ key: keyof ClarifyThemeRadiusTokensConfig; label: string }>\n\nconst layoutFields = [\n { key: 'maxWidth', label: 'Max width' },\n] as const satisfies ReadonlyArray<{ key: keyof ClarifyThemeLayoutConfig; label: string }>\n\nexport type ThemeEditorProps = {\n /** The resolved theme to use as the editor's initial value. */\n initialTheme?: ClarifyThemeConfig;\n /** Called every time a token changes. */\n onChange?: (theme: ClarifyThemeConfig) => void;\n /** CSS variable target. Defaults to documentElement and every .clarify-app root. */\n target?: ThemeVariableTarget;\n /** Whether the panel is open by default. */\n defaultOpen?: boolean;\n className?: string;\n}\n\nexport const clarifyThemeEditorPresets = clarifyThemePresets\n\nexport function applyClarifyThemeVariables(theme: ClarifyThemeConfig, target?: ThemeVariableTarget): () => void {\n return applyThemeCssVariables(themeToCssVariables(theme), resolveThemeVariableTargets(target))\n}\n\nfunction isHexColor(value: string): boolean {\n return /^#[0-9a-f]{6}$/i.test(value)\n}\n\nfunction updateThemeModeColorValue(value: ClarifyThemeColorTokensConfig[keyof ClarifyThemeColorTokensConfig], resolvedTheme: 'light' | 'dark', nextValue: string): ClarifyThemeColorTokensConfig[keyof ClarifyThemeColorTokensConfig] {\n if (typeof value === 'string') return nextValue\n\n return {\n ...value,\n [resolvedTheme]: nextValue,\n }\n}\n\ntype TextFieldProps = {\n id: string;\n label: string;\n value: string;\n onChange: (value: string) => void;\n withColorInput?: boolean;\n}\n\nfunction TextField(props: TextFieldProps) {\n const { id, label, value, onChange, withColorInput = false } = props\n const canUseColorInput = withColorInput && isHexColor(value)\n\n function handleTextChange(event: ChangeEvent<HTMLInputElement>) {\n onChange(event.target.value)\n }\n\n return (\n <label htmlFor={id} className=\"grid min-w-0 gap-1.5 text-xs/5 font-medium text-(--clarify-ui-text)\">\n <span className=\"flex min-w-0 items-center justify-between gap-3\">\n <span className=\"truncate\">{label}</span>\n {canUseColorInput ? (\n <input\n type=\"color\"\n value={value}\n aria-label={`${label} color`}\n className=\"h-5 w-8 shrink-0 cursor-pointer rounded border border-(--clarify-theme-tokens-colors-border) bg-transparent p-0\"\n onChange={handleTextChange}\n />\n ) : null}\n </span>\n <input\n id={id}\n value={value}\n spellCheck={false}\n className=\"h-9 w-full min-w-0 rounded-(--clarify-theme-tokens-radius-md) border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-background) px-2.5 font-mono text-xs text-(--clarify-theme-tokens-colors-foreground) shadow-xs outline-none transition focus:border-(--clarify-theme-tokens-colors-primary) focus:ring-2 focus:ring-(--clarify-ui-accent-border)\"\n onChange={handleTextChange}\n />\n </label>\n )\n}\n\nfunction themeToConfigSource(theme: ClarifyThemeConfig): string {\n return JSON.stringify(\n {\n theme: {\n preset: theme.preset,\n tokens: theme.tokens,\n layout: theme.layout,\n },\n },\n null,\n 2,\n )\n}\n\nexport function ThemeEditor(props: ThemeEditorProps) {\n const { initialTheme, onChange, target, defaultOpen = false, className } = props\n const { resolvedTheme } = useTheme()\n const [isOpen, setIsOpen] = useState(defaultOpen)\n const [theme, setTheme] = useState<ClarifyThemeConfig>(() => cloneTheme(initialTheme ?? clarifyThemeEditorPresets.default))\n const [copyState, setCopyState] = useState<'idle' | 'copied' | 'failed'>('idle')\n const configSource = useMemo(() => themeToConfigSource(theme), [theme])\n\n useEffect(() => applyThemeCssVariables(themeToCssVariables(theme, resolvedTheme), resolveThemeVariableTargets(target)), [resolvedTheme, target, theme])\n\n function commit(nextTheme: ClarifyThemeConfig) {\n setTheme(nextTheme)\n onChange?.(nextTheme)\n }\n\n function updatePreset(nextPreset: ClarifyThemePreset) {\n commit(cloneTheme(clarifyThemeEditorPresets[nextPreset]))\n }\n\n function updateColorToken(key: keyof ClarifyThemeColorTokensConfig, value: string) {\n commit({\n ...theme,\n tokens: {\n ...theme.tokens,\n colors: {\n ...theme.tokens.colors,\n [key]: updateThemeModeColorValue(theme.tokens.colors[key], resolvedTheme, value),\n },\n },\n })\n }\n\n function updateRadiusToken(key: keyof ClarifyThemeRadiusTokensConfig, value: string) {\n commit({\n ...theme,\n tokens: {\n ...theme.tokens,\n radius: {\n ...theme.tokens.radius,\n [key]: value,\n },\n },\n })\n }\n\n function updateLayoutToken(key: keyof ClarifyThemeLayoutConfig, value: string) {\n commit({\n ...theme,\n layout: {\n ...theme.layout,\n [key]: value,\n },\n })\n }\n\n async function copyConfig() {\n try {\n await navigator.clipboard.writeText(configSource)\n setCopyState('copied')\n window.setTimeout(() => setCopyState('idle'), 1400)\n } catch {\n setCopyState('failed')\n window.setTimeout(() => setCopyState('idle'), 1400)\n }\n }\n\n return (\n <div className={clsx('clarify-theme-editor fixed right-4 bottom-4 z-50 text-(--clarify-theme-tokens-colors-foreground)', className)}>\n {isOpen ? (\n <section\n className=\"mb-3 flex max-h-(--clarify-theme-editor-panel-max-height) w-(--clarify-theme-editor-width) flex-col overflow-hidden rounded-md border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface)/95 shadow-2xl shadow-zinc-900/15 backdrop-blur\"\n aria-label=\"Clarify theme editor\"\n >\n <header className=\"shrink-0 flex items-start justify-between gap-4 border-b border-(--clarify-theme-tokens-colors-border) px-4 py-3\">\n <div>\n <h2 className=\"text-sm/6 font-semibold text-(--clarify-theme-tokens-colors-foreground)\">Theme editor</h2>\n <p className=\"mt-0.5 text-xs/5 text-(--clarify-ui-text-soft)\">Live CSS variable preview for Clarify theme tokens.</p>\n </div>\n <button\n type=\"button\"\n className=\"-mr-1 flex size-8 items-center justify-center rounded-(--clarify-theme-tokens-radius-md) text-(--clarify-ui-text-soft) transition hover:bg-(--clarify-ui-hover-background) hover:text-(--clarify-ui-text-strong)\"\n aria-label=\"Close theme editor\"\n onClick={() => setIsOpen(false)}\n >\n <X className=\"size-4 stroke-current stroke-2\" />\n </button>\n </header>\n\n <div className=\"min-h-0 flex-1 overflow-y-auto px-4 py-4\">\n <div className=\"grid gap-5\">\n <label htmlFor=\"clarify-theme-editor-preset\" className=\"grid gap-1.5 text-xs/5 font-medium text-(--clarify-ui-text)\">\n Preset\n <span className=\"relative block\">\n <select\n id=\"clarify-theme-editor-preset\"\n value={theme.preset}\n className=\"h-9 w-full appearance-none rounded-(--clarify-theme-tokens-radius-md) border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-background) px-2.5 pr-9 text-sm text-(--clarify-theme-tokens-colors-foreground) shadow-xs outline-none transition focus:border-(--clarify-theme-tokens-colors-primary) focus:ring-2 focus:ring-(--clarify-ui-accent-border)\"\n onChange={(event) => updatePreset(event.target.value as ClarifyThemePreset)}\n >\n <option value=\"default\">default</option>\n <option value=\"base\">base</option>\n </select>\n <ChevronDown className=\"pointer-events-none absolute top-1/2 right-3 size-4 -translate-y-1/2 stroke-current stroke-2 text-(--clarify-ui-text-faint)\" />\n </span>\n </label>\n\n <fieldset className=\"grid gap-3\">\n <legend className=\"mb-2 text-xs/5 font-semibold uppercase tracking-wide text-(--clarify-ui-text-faint)\">Colors</legend>\n <div className=\"grid grid-cols-1 gap-3\">\n {colorTokenFields.map((field) => (\n <TextField\n key={field.key}\n id={`clarify-theme-editor-color-${field.key}`}\n label={field.label}\n value={resolveThemeColorValue(theme.tokens.colors[field.key], resolvedTheme)}\n withColorInput\n onChange={(value) => updateColorToken(field.key, value)}\n />\n ))}\n </div>\n </fieldset>\n\n <fieldset className=\"grid gap-3\">\n <legend className=\"mb-2 text-xs/5 font-semibold uppercase tracking-wide text-(--clarify-ui-text-faint)\">Radius</legend>\n <div className=\"grid grid-cols-2 gap-3\">\n {radiusTokenFields.map((field) => (\n <TextField\n key={field.key}\n id={`clarify-theme-editor-radius-${field.key}`}\n label={field.label}\n value={theme.tokens.radius[field.key]}\n onChange={(value) => updateRadiusToken(field.key, value)}\n />\n ))}\n </div>\n </fieldset>\n\n <fieldset className=\"grid gap-3\">\n <legend className=\"mb-2 text-xs/5 font-semibold uppercase tracking-wide text-(--clarify-ui-text-faint)\">Layout</legend>\n {layoutFields.map((field) => (\n <TextField\n key={field.key}\n id={`clarify-theme-editor-layout-${field.key}`}\n label={field.label}\n value={theme.layout[field.key]}\n onChange={(value) => updateLayoutToken(field.key, value)}\n />\n ))}\n </fieldset>\n </div>\n </div>\n\n <footer className=\"shrink-0 flex items-center justify-between gap-3 border-t border-(--clarify-theme-tokens-colors-border) bg-(--clarify-ui-subtle-background) px-4 py-3\">\n <div className=\"flex items-center gap-1.5\">\n <button\n type=\"button\"\n className=\"rounded-(--clarify-theme-tokens-radius-md) px-2.5 py-1.5 text-xs/5 font-semibold text-(--clarify-ui-text) transition hover:bg-(--clarify-ui-hover-background) hover:text-(--clarify-ui-text-strong)\"\n onClick={() => updatePreset(theme.preset)}\n >\n Reset preset\n </button>\n <button\n type=\"button\"\n className=\"inline-flex items-center gap-1.5 rounded-(--clarify-theme-tokens-radius-md) px-2.5 py-1.5 text-xs/5 font-semibold text-(--clarify-ui-text) transition hover:bg-(--clarify-ui-hover-background) hover:text-(--clarify-ui-text-strong)\"\n onClick={() => commit(createRandomTheme())}\n >\n <WandSparkles className=\"size-3.5 stroke-current stroke-2\" />\n Random\n </button>\n </div>\n <button\n type=\"button\"\n className=\"rounded-(--clarify-theme-tokens-radius-md) bg-(--clarify-theme-tokens-colors-primary) px-3 py-1.5 text-xs/5 font-semibold text-white shadow-xs transition hover:opacity-90\"\n onClick={copyConfig}\n >\n {copyState === 'copied' ? 'Copied' : copyState === 'failed' ? 'Copy failed' : 'Copy config'}\n </button>\n </footer>\n </section>\n ) : null}\n\n <button\n type=\"button\"\n className=\"ml-auto flex size-12 items-center justify-center rounded-full border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface)/95 text-(--clarify-theme-tokens-colors-primary) shadow-xl shadow-zinc-900/15 backdrop-blur transition hover:scale-105 hover:bg-(--clarify-ui-accent-background) focus:outline-none focus:ring-2 focus:ring-(--clarify-ui-accent-border)\"\n aria-label={isOpen ? 'Close Clarify theme editor' : 'Open Clarify theme editor'}\n aria-expanded={isOpen}\n onClick={() => setIsOpen((value) => !value)}\n >\n <Settings className=\"size-5 stroke-current stroke-2\" />\n </button>\n </div>\n )\n}\n","import { useEffect, useMemo } from 'react'\nimport type { ReactNode } from 'react'\n\nimport type { ClarifyThemeConfig } from '../types'\n\nimport { ThemeEditor } from './ThemeEditor'\nimport { useTheme } from './ThemeProvider'\nimport { applyThemeCssVariables, resolveThemeVariableTargets, themeToCssVariables } from './variables'\n\ntype ThemeRootProps = {\n children: ReactNode\n theme: ClarifyThemeConfig\n themeEditor?: boolean\n}\n\nexport function ThemeRoot(props: ThemeRootProps) {\n const { children, theme, themeEditor = false } = props\n const { resolvedTheme } = useTheme()\n const themeVariables = useMemo(() => themeToCssVariables(theme, resolvedTheme), [resolvedTheme, theme])\n\n useEffect(() => applyThemeCssVariables(themeVariables, resolveThemeVariableTargets(':root')), [themeVariables])\n\n return (\n <div\n className=\"clarify-app h-full min-h-screen bg-(--clarify-theme-tokens-colors-background) text-(--clarify-theme-tokens-colors-foreground)\"\n data-theme-preset={theme.preset}\n style={themeVariables}\n >\n {children}\n {themeEditor ? <ThemeEditor initialTheme={theme} /> : null}\n </div>\n )\n}\n"],"mappings":";;;;;;;AA+CA,SAAS,eAAe,OAA4B;CAClD,MAAM,EACJ,OACA,aACA,aACA,cACA,WACA,WACA,cACA,YACA,qBACA,gBACA,WACA,aACA,MACA,OACA,WACA,eACE;CACJ,MAAM,CAAC,aAAa,kBAAkB,SAAS,KAAK;CACpD,MAAM,QAAQ,MAAM,SAAS,MAAM;CACnC,MAAM,iBAAiB,WAAW,gBAAgB,KAAK;CACvD,MAAM,YAAY,iBAAiB,GAAG,MAAM,MAAM,oBAAoB,IAAI,mBAAmB;CAC7F,MAAM,aAAa,+BAAc,IAAI,KAAK,GAAE,YAAY;CAExD,eAAe,YAAY;EACzB,IAAI,CAAE,MAAM,oBAAoB,SAAS,GAAI;EAC7C,eAAe,IAAI;EACnB,OAAO,iBAAiB,eAAe,KAAK,GAAG,IAAI;CACrD;CAEA,OACE,oBAAC,WAAD;EAAS,WAAU;EAAsJ,mBAAgB;EAA6B,MAAK;YACzN,qBAAC,OAAD;GAAK,WAAU;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gB,uBAAuB,gBAAgB,4BAA4B,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;CAE9G,OACE,qBAAC,OAAD;EACE,WAAU;EACV,qBAAmB,MAAM;EACzB,OAAO;YAHT,CAKG,UACA,cAAc,oBAAC,aAAD,EAAa,cAAc,MAAQ,CAAA,IAAI,IACnD;;AAET"}
|
package/output/app/AppShell.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
1
2
|
import { RouteItem, ClarifyConfig, NavigationTree } from '../types';
|
|
2
3
|
export type AppShellProps = {
|
|
3
4
|
config: ClarifyConfig;
|
|
4
5
|
routes: RouteItem[];
|
|
5
6
|
navigation: NavigationTree;
|
|
7
|
+
footerComponent?: ComponentType;
|
|
6
8
|
};
|
|
7
9
|
export declare function AppShell(arg0: AppShellProps): import("react").JSX.Element;
|
package/output/client.cjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const
|
|
2
|
+
const require_shell = require("./shell-xxhV0p7k.cjs");
|
|
3
|
+
const require_ThemeRoot = require("./ThemeRoot-CEvwrGp5.cjs");
|
|
4
|
+
const require_render = require("./render-zHU25Nm9.cjs");
|
|
4
5
|
exports.ThemeEditor = require_ThemeRoot.ThemeEditor;
|
|
5
6
|
exports.applyClarifyThemeVariables = require_ThemeRoot.applyClarifyThemeVariables;
|
|
6
7
|
exports.clarifyThemeEditorPresets = require_ThemeRoot.clarifyThemeEditorPresets;
|
|
7
8
|
exports.render = require_render.render;
|
|
9
|
+
exports.themeBootstrapScript = require_shell.themeBootstrapScript;
|
|
10
|
+
exports.themeStorageKey = require_shell.themeStorageKey;
|
package/output/client.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { render } from './runtime/render';
|
|
2
2
|
export { ThemeEditor, applyClarifyThemeVariables, clarifyThemeEditorPresets } from './theme/ThemeEditor';
|
|
3
|
+
export { themeBootstrapScript, themeStorageKey } from './theme/variables';
|
|
3
4
|
export type { ThemeEditorProps } from './theme/ThemeEditor';
|
package/output/client.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { b as themeStorageKey, y as themeBootstrapScript } from "./shell-CumiARRe.js";
|
|
2
|
+
import { i as clarifyThemeEditorPresets, n as ThemeEditor, r as applyClarifyThemeVariables } from "./ThemeRoot-C_ZdzSMu.js";
|
|
3
|
+
import { t as render } from "./render-CnUd0XwZ.js";
|
|
4
|
+
export { ThemeEditor, applyClarifyThemeVariables, clarifyThemeEditorPresets, render, themeBootstrapScript, themeStorageKey };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export declare function useLocalizedHref(href: string): string;
|
|
3
|
+
export type LocalizedLinkProps = ComponentPropsWithoutRef<'a'> & {
|
|
4
|
+
href: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function LocalizedLink(arg0: LocalizedLinkProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CSSProperties, ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
export type WebFrameProps = {
|
|
3
|
+
src?: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
showWindow?: boolean;
|
|
7
|
+
className?: string;
|
|
8
|
+
iframeClassName?: string;
|
|
9
|
+
height?: CSSProperties['height'];
|
|
10
|
+
} & Omit<ComponentPropsWithoutRef<'iframe'>, 'children' | 'className' | 'height' | 'src' | 'title'>;
|
|
11
|
+
export declare function WebFrame(arg0: WebFrameProps): import("react").JSX.Element;
|
|
@@ -9,8 +9,12 @@ export { Collapse } from './Collapse';
|
|
|
9
9
|
export type { CollapseProps } from './Collapse';
|
|
10
10
|
export { Feedback } from './Feedback';
|
|
11
11
|
export { Heading } from './Heading';
|
|
12
|
+
export { LocalizedLink, useLocalizedHref } from './LocalizedLink';
|
|
13
|
+
export type { LocalizedLinkProps } from './LocalizedLink';
|
|
12
14
|
export { Logo } from './Logo';
|
|
13
15
|
export { GridPattern, HeroPattern } from './patterns';
|
|
14
16
|
export { Prose } from './Prose';
|
|
15
17
|
export { Tag } from './Tag';
|
|
16
18
|
export type { TagProps } from './Tag';
|
|
19
|
+
export { WebFrame } from './WebFrame';
|
|
20
|
+
export type { WebFrameProps } from './WebFrame';
|
package/output/context.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ClarifyConfigContext, ClarifyLocaleContext, OpenApisContext, useClarifyConfig, useOpenApis } from './core/context';
|
|
1
|
+
export { ClarifyConfigContext, ClarifyLocaleContext, OpenApisContext, useClarifyConfig, useClarifyLocale, useOpenApis } from './core/context';
|
package/output/core/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
2
|
import { OpenAPISpec } from '../openapi/lib/utils';
|
|
3
|
+
export type ClarifyFooterComponentPath = string;
|
|
3
4
|
export type RouteComponent = ComponentType | (() => Promise<{
|
|
4
5
|
default: ComponentType;
|
|
5
6
|
}>);
|
|
@@ -60,11 +61,12 @@ export type ClarifyBannerConfig = {
|
|
|
60
61
|
content: ClarifyLocalizedText;
|
|
61
62
|
dismissible?: boolean;
|
|
62
63
|
};
|
|
63
|
-
export type
|
|
64
|
+
export type ClarifyFooterLinksConfig = {
|
|
64
65
|
links?: ClarifyNavbarLink[];
|
|
65
66
|
socials?: Record<string, string>;
|
|
66
67
|
copyright?: ClarifyLocalizedText;
|
|
67
68
|
};
|
|
69
|
+
export type ClarifyFooterConfig = ClarifyFooterLinksConfig | ClarifyFooterComponentPath;
|
|
68
70
|
export type ClarifySourceConfig = {
|
|
69
71
|
repository: string;
|
|
70
72
|
branch?: string;
|
|
@@ -171,6 +173,8 @@ export type RenderOptions = {
|
|
|
171
173
|
navigation?: NavigationTree;
|
|
172
174
|
/** 从 virtual:clarify-openapi-registry 导入的 OpenAPI 规范表 */
|
|
173
175
|
openApis?: Record<string, OpenAPISpec>;
|
|
176
|
+
/** Custom footer component imported from a configured footer path. */
|
|
177
|
+
footerComponent?: ComponentType;
|
|
174
178
|
/** Whether to render the live theme editor inside the app tree. */
|
|
175
179
|
themeEditor?: boolean;
|
|
176
180
|
/** 挂载节点,默认 document.getElementById('root') */
|
|
@@ -188,6 +192,8 @@ export type ServerRenderOptions = {
|
|
|
188
192
|
navigation?: NavigationTree;
|
|
189
193
|
/** 从 virtual:clarify-openapi-registry 导入的 OpenAPI 规范表 */
|
|
190
194
|
openApis?: Record<string, OpenAPISpec>;
|
|
195
|
+
/** Custom footer component imported from a configured footer path. */
|
|
196
|
+
footerComponent?: ComponentType;
|
|
191
197
|
/** Whether to render the live theme editor inside the app tree. */
|
|
192
198
|
themeEditor?: boolean;
|
|
193
199
|
/** 当前请求的 URL */
|
package/output/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_shell = require("./shell-
|
|
3
|
-
const require_ThemeRoot = require("./ThemeRoot-
|
|
4
|
-
const require_OpenApiOperation = require("./OpenApiOperation-
|
|
2
|
+
const require_shell = require("./shell-xxhV0p7k.cjs");
|
|
3
|
+
const require_ThemeRoot = require("./ThemeRoot-CEvwrGp5.cjs");
|
|
4
|
+
const require_OpenApiOperation = require("./OpenApiOperation-ZXToVSFC.cjs");
|
|
5
5
|
const require_remark = require("./remark-Dv3owbSH.cjs");
|
|
6
|
-
const require_render = require("./render-
|
|
6
|
+
const require_render = require("./render-zHU25Nm9.cjs");
|
|
7
7
|
let react_router_dom = require("react-router-dom");
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
//#region source/openapi/lib/spec-path.ts
|
|
@@ -241,6 +241,7 @@ exports.Tag = require_OpenApiOperation.Tag;
|
|
|
241
241
|
exports.ThemeEditor = require_ThemeRoot.ThemeEditor;
|
|
242
242
|
exports.ThemeProvider = require_shell.ThemeProvider;
|
|
243
243
|
exports.ThemeToggle = require_shell.ThemeToggle;
|
|
244
|
+
exports.WebFrame = require_OpenApiOperation.WebFrame;
|
|
244
245
|
exports.applyClarifyThemeVariables = require_ThemeRoot.applyClarifyThemeVariables;
|
|
245
246
|
exports.clarifyThemeEditorPresets = require_ThemeRoot.clarifyThemeEditorPresets;
|
|
246
247
|
exports.markdownRemarkPlugins = require_remark.markdownRemarkPlugins;
|