@clarify-labs/renderer 0.10.3 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/output/{ClarifyShell-UsefuuLS.cjs → ClarifyShell-C2XnkFQ6.cjs} +119 -100
  2. package/output/ClarifyShell-C2XnkFQ6.cjs.map +1 -0
  3. package/output/{ClarifyShell-Cq5Af46F.js → ClarifyShell-CwRtof1h.js} +119 -100
  4. package/output/ClarifyShell-CwRtof1h.js.map +1 -0
  5. package/output/{MermaidViewer-Db7qsyVk.cjs → MermaidViewer-CTvMCE19.cjs} +2 -2
  6. package/output/{MermaidViewer-Db7qsyVk.cjs.map → MermaidViewer-CTvMCE19.cjs.map} +1 -1
  7. package/output/{MermaidViewer-Bc9H25yK.js → MermaidViewer-CwkiQ2gO.js} +2 -2
  8. package/output/{MermaidViewer-Bc9H25yK.js.map → MermaidViewer-CwkiQ2gO.js.map} +1 -1
  9. package/output/{OpenApiOperation-BZWeCbvy.js → OpenApiOperation-CFo6_otd.js} +1964 -292
  10. package/output/OpenApiOperation-CFo6_otd.js.map +1 -0
  11. package/output/{OpenApiOperation-DbZjxIuj.cjs → OpenApiOperation-D1WNrj5X.cjs} +1967 -289
  12. package/output/OpenApiOperation-D1WNrj5X.cjs.map +1 -0
  13. package/output/{PageActions-BQeEmXbT.js → PageActions-3eo05fb_.js} +60 -19
  14. package/output/PageActions-3eo05fb_.js.map +1 -0
  15. package/output/{PageActions-Dg1l9KB1.cjs → PageActions-Lp_NeIKr.cjs} +59 -18
  16. package/output/PageActions-Lp_NeIKr.cjs.map +1 -0
  17. package/output/{SearchDialog-B67VA0Ut.js → SearchDialog-BvCBIFqs.js} +3 -3
  18. package/output/{SearchDialog-B67VA0Ut.js.map → SearchDialog-BvCBIFqs.js.map} +1 -1
  19. package/output/{SearchDialog-DjKvqN7p.cjs → SearchDialog-CM9DrE2Y.cjs} +3 -3
  20. package/output/{SearchDialog-DjKvqN7p.cjs.map → SearchDialog-CM9DrE2Y.cjs.map} +1 -1
  21. package/output/app/PageFooter.d.ts +1 -1
  22. package/output/client.cjs +3 -3
  23. package/output/client.js +3 -3
  24. package/output/components/Tooltip.d.ts +1 -0
  25. package/output/core/i18n.d.ts +1 -1
  26. package/output/core/types.d.ts +37 -19
  27. package/output/{i18n-Bqth9d6Q.js → i18n-BxXpRSFX.js} +106 -2
  28. package/output/i18n-BxXpRSFX.js.map +1 -0
  29. package/output/{i18n-C-fReCj-.cjs → i18n-DsjZ51U1.cjs} +106 -2
  30. package/output/i18n-DsjZ51U1.cjs.map +1 -0
  31. package/output/index.cjs +26 -5
  32. package/output/index.cjs.map +1 -1
  33. package/output/index.d.ts +3 -3
  34. package/output/index.js +26 -6
  35. package/output/index.js.map +1 -1
  36. package/output/mdx/components.d.ts +2 -1
  37. package/output/openapi/components/EndpointMethodBadge.d.ts +6 -0
  38. package/output/openapi/components/EndpointSections.d.ts +2 -2
  39. package/output/openapi/components/ExamplePanels.d.ts +2 -2
  40. package/output/openapi/components/InlineListbox.d.ts +14 -0
  41. package/output/openapi/components/OpenApiAuthPanel.d.ts +12 -0
  42. package/output/openapi/components/OpenApiOperation.d.ts +1 -9
  43. package/output/openapi/components/OpenApiOperation.state.d.ts +4 -2
  44. package/output/openapi/components/OpenApiRequest.d.ts +18 -0
  45. package/output/openapi/components/OpenApiRequestBodyEditor.d.ts +14 -0
  46. package/output/openapi/components/OpenApiRequestFields.d.ts +25 -0
  47. package/output/openapi/components/OpenApiResponseViewer.d.ts +14 -0
  48. package/output/openapi/components/SendRequestButton.d.ts +9 -0
  49. package/output/openapi/components/helpers.d.ts +6 -1
  50. package/output/openapi/components/useOpenApiRequestState.d.ts +48 -0
  51. package/output/openapi/entry.d.ts +2 -0
  52. package/output/openapi/index.d.ts +2 -2
  53. package/output/openapi/lib/api-exchange-code.d.ts +8 -0
  54. package/output/openapi/lib/api-exchange.d.ts +30 -0
  55. package/output/openapi/lib/api-request.d.ts +25 -0
  56. package/output/openapi/lib/helpers.d.ts +8 -0
  57. package/output/openapi/lib/request-code.d.ts +2 -2
  58. package/output/openapi/lib/request-parameters.d.ts +5 -0
  59. package/output/openapi/store.d.ts +10 -0
  60. package/output/openapi/types.d.ts +6 -0
  61. package/output/preview.cjs +46 -40
  62. package/output/preview.cjs.map +1 -1
  63. package/output/preview.js +46 -40
  64. package/output/preview.js.map +1 -1
  65. package/output/{render-Dc9wxg_r.cjs → render-CKG4X-me.cjs} +2 -2
  66. package/output/{render-Dc9wxg_r.cjs.map → render-CKG4X-me.cjs.map} +1 -1
  67. package/output/{render-aS-w4fK4.js → render-vlp3hwW3.js} +2 -2
  68. package/output/{render-aS-w4fK4.js.map → render-vlp3hwW3.js.map} +1 -1
  69. package/output/renderer.css +630 -152
  70. package/output/server.cjs +2 -2
  71. package/output/server.js +2 -2
  72. package/output/theme/ThemeEditor.d.ts +8 -4
  73. package/output/theme/variables.d.ts +8 -4
  74. package/package.json +2 -1
  75. package/output/ClarifyShell-Cq5Af46F.js.map +0 -1
  76. package/output/ClarifyShell-UsefuuLS.cjs.map +0 -1
  77. package/output/OpenApiOperation-BZWeCbvy.js.map +0 -1
  78. package/output/OpenApiOperation-DbZjxIuj.cjs.map +0 -1
  79. package/output/PageActions-BQeEmXbT.js.map +0 -1
  80. package/output/PageActions-Dg1l9KB1.cjs.map +0 -1
  81. package/output/core/index.d.ts +0 -3
  82. package/output/i18n-Bqth9d6Q.js.map +0 -1
  83. package/output/i18n-C-fReCj-.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
- import { a as useConfig, i as OpenApiSpecsContext, n as ConfigContext, o as useConfigOptional, r as LocaleContext, s as useLocale, t as useBuiltInText } from "./i18n-Bqth9d6Q.js";
2
- import { C as isExternalHref, E as copyTextToClipboard, S as themeCookieName, a as SectionProvider, b as storeLocalePreference, d as normalizeRoutePath, f as resolveLocalizedText, g as getStoredLocalePreference, h as useTheme, i as Navigation, m as ThemeProvider, o as useSectionStore, r as Header, t as PageActionsProvider, u as isSameRoutePath, w as localizeHref } from "./PageActions-BQeEmXbT.js";
1
+ import { a as useConfig, i as OpenApiSpecsContext, n as ConfigContext, o as useConfigOptional, r as LocaleContext, s as useLocale, t as useBuiltInText } from "./i18n-BxXpRSFX.js";
2
+ import { C as isExternalHref, E as copyTextToClipboard, S as themeCookieName, a as SectionProvider, b as storeLocalePreference, d as normalizeRoutePath, f as resolveLocalizedText, g as getStoredLocalePreference, h as useTheme, i as Navigation, m as ThemeProvider, o as useSectionStore, r as Header, t as PageActionsProvider, u as isSameRoutePath, w as localizeHref } from "./PageActions-3eo05fb_.js";
3
3
  import clsx from "clsx";
4
4
  import { Component, Suspense, createContext, lazy, useContext, useEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
5
5
  import { Link, Route, Routes, useLocation, useNavigate } from "react-router-dom";
@@ -122,26 +122,42 @@ function safeDecodeURIComponent(value) {
122
122
  var clarify_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";
123
123
  //#endregion
124
124
  //#region source/app/BuiltWithClarify.tsx
125
+ var CLARIFY_TRACKING_URL = "https://clarify.pub/api/track";
125
126
  function BuiltWithClarify() {
126
127
  const t = useBuiltInText();
127
- return /* @__PURE__ */ jsxs("a", {
128
- href: "https://clarify.pub",
129
- target: "_blank",
130
- rel: "noreferrer",
131
- "aria-label": t("builtWith.label"),
132
- className: "clarify-built-with inline-flex items-center gap-1.5 rounded-full px-2 py-1 font-medium no-underline transition",
133
- children: [
134
- /* @__PURE__ */ jsx("span", { children: t("builtWith.prefix") }),
135
- /* @__PURE__ */ jsx("img", {
136
- src: clarify_default,
137
- alt: "",
138
- className: "clarify-built-with-logo h-3.5 w-auto flex-none object-contain"
139
- }),
140
- /* @__PURE__ */ jsx("span", {
141
- className: "clarify-built-with-brand font-semibold",
142
- children: "Clarify"
143
- })
144
- ]
128
+ return /* @__PURE__ */ jsxs("div", {
129
+ className: "clarify-built-with inline-flex items-center gap-1.5",
130
+ children: [/* @__PURE__ */ jsx("iframe", {
131
+ tabIndex: -1,
132
+ "aria-hidden": "true",
133
+ title: t("builtWith.label"),
134
+ src: CLARIFY_TRACKING_URL,
135
+ style: {
136
+ position: "absolute",
137
+ width: 0,
138
+ height: 0,
139
+ border: 0,
140
+ overflow: "hidden"
141
+ }
142
+ }), /* @__PURE__ */ jsxs("a", {
143
+ href: "https://clarify.pub",
144
+ target: "_blank",
145
+ rel: "noreferrer",
146
+ "aria-label": t("builtWith.label"),
147
+ className: "clarify-built-with inline-flex items-center gap-1.5 rounded-full px-2 py-1 font-medium no-underline transition",
148
+ children: [
149
+ /* @__PURE__ */ jsx("span", { children: t("builtWith.prefix") }),
150
+ /* @__PURE__ */ jsx("img", {
151
+ src: clarify_default,
152
+ alt: "",
153
+ className: "clarify-built-with-logo h-3.5 w-auto flex-none object-contain"
154
+ }),
155
+ /* @__PURE__ */ jsx("span", {
156
+ className: "clarify-built-with-brand font-semibold",
157
+ children: "Clarify"
158
+ })
159
+ ]
160
+ })]
145
161
  });
146
162
  }
147
163
  //#endregion
@@ -359,7 +375,7 @@ function PageBanner(props) {
359
375
  const { currentLocale, onDismiss } = props;
360
376
  const config = useConfig();
361
377
  const banner = config.banner;
362
- const content = banner ? resolveLocalizedText(banner.content, currentLocale, config.i18n?.defaultLocale) : "";
378
+ const content = banner ? resolveLocalizedText(banner.content, currentLocale, config.locales?.default) : "";
363
379
  const storageKey = useMemo(() => {
364
380
  if (!banner || !content) return "";
365
381
  return bannerStorageKey(config, content);
@@ -379,7 +395,7 @@ function PageBanner(props) {
379
395
  if (!content) return null;
380
396
  if (dismissed) return null;
381
397
  const link = banner.link;
382
- const linkLabel = link ? resolveLocalizedText(link.label, currentLocale, config.i18n?.defaultLocale) : "";
398
+ const linkLabel = link ? resolveLocalizedText(link.label, currentLocale, config.locales?.default) : "";
383
399
  return /* @__PURE__ */ jsxs("div", {
384
400
  className: "clarify-banner relative flex h-12 items-center border-b border-(--clarify-ui-accent-border) bg-(--clarify-ui-accent-background) px-4 text-sm text-(--clarify-ui-text) dark:border-white/10",
385
401
  children: [/* @__PURE__ */ jsxs("div", {
@@ -412,17 +428,17 @@ function PageBanner(props) {
412
428
  //#endregion
413
429
  //#region source/app/PageFooter.tsx
414
430
  function localeForPath(config, pathname) {
415
- const i18n = config.i18n;
416
- if (!i18n) return void 0;
431
+ const locales = config.locales;
432
+ if (!locales) return void 0;
417
433
  const firstSegment = pathname.split("/").filter(Boolean)[0];
418
- return i18n.locales.find((locale) => locale.code === firstSegment)?.code ?? i18n.defaultLocale;
434
+ return locales.locales.find((locale) => locale.code === firstSegment)?.code ?? locales.default;
419
435
  }
420
436
  function FooterLink(arg0) {
421
437
  const { link, locale, config } = arg0;
422
438
  const external = link.external ?? isExternalHref(link.href);
423
439
  const href = external ? link.href : localizeHref(link.href, config, locale);
424
440
  const className = "clarify-footer-link no-underline transition";
425
- const label = resolveLocalizedText(link.label, locale, config.i18n?.defaultLocale);
441
+ const label = resolveLocalizedText(link.label, locale, config.locales?.default);
426
442
  if (external) return /* @__PURE__ */ jsx("a", {
427
443
  href,
428
444
  target: "_blank",
@@ -452,25 +468,22 @@ function PageFooter() {
452
468
  const footer = config.footer;
453
469
  const links = footer?.links ?? [];
454
470
  const socials = Object.entries(footer?.socials ?? {});
455
- const copyright = footer?.copyright ? resolveLocalizedText(footer.copyright, locale, config.i18n?.defaultLocale) : void 0;
456
- if (!Boolean(copyright || links.length > 0 || socials.length > 0)) return /* @__PURE__ */ jsx("footer", {
457
- "aria-hidden": "true",
458
- className: "clarify-page-footer mt-16 w-full border-t border-(--clarify-theme-tokens-colors-border) pt-8 lg:mt-24"
459
- });
471
+ const copyright = footer?.copyright ? resolveLocalizedText(footer.copyright, locale, config.locales?.default) : void 0;
472
+ if (!Boolean(copyright || links.length > 0 || socials.length > 0)) return null;
460
473
  return /* @__PURE__ */ jsx("footer", {
461
- className: "clarify-page-footer mt-16 flex w-full flex-col gap-4 border-t border-(--clarify-theme-tokens-colors-border) py-8 lg:mt-24",
474
+ className: "clarify-page-footer w-full",
462
475
  children: /* @__PURE__ */ jsxs("div", {
463
- className: clsx("clarify-footer-content flex flex-col items-end gap-3 text-right", "sm:items-start sm:text-left"),
476
+ className: clsx("clarify-footer-content flex flex-col items-start gap-2.5 text-left"),
464
477
  children: [copyright ? /* @__PURE__ */ jsx("p", {
465
478
  className: "clarify-footer-copyright m-0",
466
479
  children: copyright
467
480
  }) : null, links.length > 0 || socials.length > 0 ? /* @__PURE__ */ jsxs("div", {
468
- className: "clarify-footer-links flex flex-wrap justify-end gap-x-4 gap-y-2 sm:justify-start",
481
+ className: "clarify-footer-links flex flex-wrap justify-start gap-x-4 gap-y-2",
469
482
  children: [links.map((link) => /* @__PURE__ */ jsx(FooterLink, {
470
483
  link,
471
484
  locale,
472
485
  config
473
- }, `${link.href}-${resolveLocalizedText(link.label, locale, config.i18n?.defaultLocale)}`)), socials.map(([name, href]) => /* @__PURE__ */ jsx(SocialLink, {
486
+ }, `${link.href}-${resolveLocalizedText(link.label, locale, config.locales?.default)}`)), socials.map(([name, href]) => /* @__PURE__ */ jsx(SocialLink, {
474
487
  name,
475
488
  href
476
489
  }, name))]
@@ -493,40 +506,42 @@ function PageNavigation(arg0) {
493
506
  const previous = pageRoutes[currentIndex - 1];
494
507
  const next = pageRoutes[currentIndex + 1];
495
508
  if (!previous && !next) return null;
509
+ const hasBothDirections = Boolean(previous && next);
496
510
  return /* @__PURE__ */ jsxs("nav", {
497
- className: "clarify-page-navigation mt-6 grid gap-3 @3xl:grid-cols-2",
511
+ className: clsx("clarify-page-navigation mt-12 grid border-t border-(--clarify-theme-tokens-colors-border)", hasBothDirections && "@3xl:grid-cols-2"),
498
512
  "aria-label": t("navigation.previousNext"),
499
- children: [/* @__PURE__ */ jsx(PageNavigationLink, {
513
+ children: [previous ? /* @__PURE__ */ jsx(PageNavigationLink, {
500
514
  direction: "previous",
501
- route: previous
502
- }), /* @__PURE__ */ jsx(PageNavigationLink, {
515
+ route: previous,
516
+ separated: hasBothDirections
517
+ }) : null, next ? /* @__PURE__ */ jsx(PageNavigationLink, {
503
518
  direction: "next",
504
- route: next
505
- })]
519
+ route: next,
520
+ separated: hasBothDirections
521
+ }) : null]
506
522
  });
507
523
  }
508
524
  function PageNavigationLink(arg0) {
509
- const { direction, route } = arg0;
525
+ const { direction, route, separated } = arg0;
510
526
  const t = useBuiltInText();
511
- if (!route) return /* @__PURE__ */ jsx("div", { className: "hidden @3xl:block" });
512
527
  const isNext = direction === "next";
513
- return /* @__PURE__ */ jsxs(Link, {
528
+ return /* @__PURE__ */ jsx(Link, {
514
529
  to: normalizeRoutePath(route.path),
515
- className: clsx("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)", isNext && "@3xl:justify-end @3xl:text-right"),
516
- children: [
517
- !isNext ? /* @__PURE__ */ jsx(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,
518
- /* @__PURE__ */ jsxs("span", {
519
- className: "min-w-0 flex-1",
520
- children: [/* @__PURE__ */ jsx("span", {
521
- className: "clarify-page-navigation-label block font-medium uppercase tracking-wide text-(--clarify-theme-tokens-colors-muted)",
522
- children: isNext ? t("navigation.next") : t("navigation.previous")
523
- }), /* @__PURE__ */ jsx("span", {
524
- className: "clarify-page-navigation-title mt-0.5 block truncate font-semibold text-(--clarify-theme-tokens-colors-foreground)",
525
- children: route.title
526
- })]
527
- }),
528
- isNext ? /* @__PURE__ */ jsx(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
529
- ]
530
+ className: clsx("group flex min-w-0 py-5 no-underline outline-none focus-visible:bg-(--clarify-ui-hover-background)", !isNext && "@3xl:pr-8", isNext && "@3xl:justify-end @3xl:pl-8 @3xl:text-right", isNext && separated && "border-t border-(--clarify-theme-tokens-colors-border) @3xl:border-t-0 @3xl:border-l"),
531
+ children: /* @__PURE__ */ jsxs("span", {
532
+ className: clsx("min-w-0", isNext && "ml-auto"),
533
+ children: [/* @__PURE__ */ jsxs("span", {
534
+ className: clsx("clarify-page-navigation-label flex items-center gap-1.5 text-xs/5 font-medium text-(--clarify-theme-tokens-colors-muted)", isNext && "justify-end"),
535
+ children: [
536
+ !isNext ? /* @__PURE__ */ jsx(ChevronLeft, { className: "size-3.5 transition-transform group-hover:-translate-x-0.5" }) : null,
537
+ isNext ? t("navigation.next") : t("navigation.previous"),
538
+ isNext ? /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5 transition-transform group-hover:translate-x-0.5" }) : null
539
+ ]
540
+ }), /* @__PURE__ */ jsx("span", {
541
+ className: "clarify-page-navigation-title mt-1 block truncate text-base/6 font-semibold text-(--clarify-theme-tokens-colors-foreground) transition-colors group-hover:text-(--clarify-theme-tokens-colors-primary)",
542
+ children: route.title
543
+ })]
544
+ })
530
545
  });
531
546
  }
532
547
  //#endregion
@@ -769,19 +784,19 @@ function scrollToHash(hash) {
769
784
  });
770
785
  }
771
786
  function explicitLocaleForPath(config, pathname) {
772
- const i18n = config.i18n;
773
- if (!i18n) return void 0;
787
+ const locales = config.locales;
788
+ if (!locales) return void 0;
774
789
  const firstSegment = pathname.split("/").filter(Boolean)[0];
775
- return i18n.locales.find((locale) => locale.code === firstSegment)?.code;
790
+ return locales.locales.find((locale) => locale.code === firstSegment)?.code;
776
791
  }
777
792
  function fallbackLocale(config) {
778
- return config.i18n?.defaultLocale;
793
+ return config.locales?.default;
779
794
  }
780
795
  function storedLocaleForConfig(config) {
781
- return getStoredLocalePreference(config.i18n?.locales.map((locale) => locale.code));
796
+ return getStoredLocalePreference(config.locales?.locales.map((locale) => locale.code));
782
797
  }
783
798
  function isDefaultLocale(config, locale) {
784
- return Boolean(locale && config.i18n?.defaultLocale === locale);
799
+ return Boolean(locale && config.locales?.default === locale);
785
800
  }
786
801
  function hasPath(nodes, pathname, locale) {
787
802
  return nodes.some((node) => isSameRoutePath(node.path, pathname, locale) || hasPath(node.children ?? [], pathname, locale));
@@ -831,7 +846,7 @@ function useRouteState(config, routes, navigation, pathname) {
831
846
  explicitLocale,
832
847
  storedLocale,
833
848
  currentLocale,
834
- currentLocaleConfig: config.i18n?.locales.find((locale) => locale.code === currentLocale),
849
+ currentLocaleConfig: config.locales?.locales.find((locale) => locale.code === currentLocale),
835
850
  notFoundRoute: currentRoute ? void 0 : notFoundRouteForPath(routes, pathname, currentLocale),
836
851
  currentNavigation: navigationForLocale(navigation, currentLocale, pathname),
837
852
  sections: sectionsForRoute(currentRoute)
@@ -855,7 +870,7 @@ function useStoredBannerDismissed(storageKey) {
855
870
  }
856
871
  function useBannerState(config, currentLocale) {
857
872
  const banner = config.banner;
858
- const bannerContent = banner ? resolveLocalizedText(banner.content, currentLocale, config.i18n?.defaultLocale) : "";
873
+ const bannerContent = banner ? resolveLocalizedText(banner.content, currentLocale, config.locales?.default) : "";
859
874
  const bannerStorageKey = banner && bannerContent ? `clarify:banner:dismissed:${config.title}:${bannerContent}` : void 0;
860
875
  const storedBannerDismissed = useStoredBannerDismissed(banner?.dismissible ? bannerStorageKey : void 0);
861
876
  const [dismissedBannerKey, setDismissedBannerKey] = useState();
@@ -1088,17 +1103,19 @@ function AppShell(arg0) {
1088
1103
  });
1089
1104
  }
1090
1105
  function renderFooter() {
1091
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
1092
- /* @__PURE__ */ jsx(RuntimeSlot, { name: "page.footer.before" }),
1093
- /* @__PURE__ */ jsx(RuntimeSlot, {
1094
- name: "page.footer.replace",
1095
- default: DefaultFooterComponent
1096
- }),
1097
- /* @__PURE__ */ jsx("div", {
1098
- className: "flex justify-end",
1106
+ return /* @__PURE__ */ jsxs("div", {
1107
+ className: "clarify-page-footer-region mt-8 grid gap-5 border-t border-(--clarify-theme-tokens-colors-border) pt-6 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-end",
1108
+ children: [/* @__PURE__ */ jsxs("div", {
1109
+ className: "clarify-page-footer-slot min-w-0",
1110
+ children: [/* @__PURE__ */ jsx(RuntimeSlot, { name: "page.footer.before" }), /* @__PURE__ */ jsx(RuntimeSlot, {
1111
+ name: "page.footer.replace",
1112
+ default: DefaultFooterComponent
1113
+ })]
1114
+ }), /* @__PURE__ */ jsx("div", {
1115
+ className: "clarify-page-attribution flex justify-end sm:self-end",
1099
1116
  children: /* @__PURE__ */ jsx(BuiltWithClarify, {})
1100
- })
1101
- ] });
1117
+ })]
1118
+ });
1102
1119
  }
1103
1120
  function renderContent() {
1104
1121
  return /* @__PURE__ */ jsx("div", {
@@ -1841,8 +1858,7 @@ function createRandomTheme() {
1841
1858
  colors: createRandomThemeColors(selection),
1842
1859
  radius: { ...selection.radius }
1843
1860
  },
1844
- layout: { maxWidth: selection.maxWidth },
1845
- editor: false
1861
+ layout: { maxWidth: selection.maxWidth }
1846
1862
  };
1847
1863
  }
1848
1864
  //#endregion
@@ -1853,42 +1869,47 @@ var themePresets = {
1853
1869
  preset: "default",
1854
1870
  tokens: {
1855
1871
  colors: {
1856
- primary: "#047857",
1857
- accent: "#0D9488",
1872
+ primary: {
1873
+ light: "#047857",
1874
+ dark: "#34d399"
1875
+ },
1876
+ accent: {
1877
+ light: "#0f766e",
1878
+ dark: "#5eead4"
1879
+ },
1858
1880
  background: {
1859
- light: "#ffffff",
1860
- dark: "#09090b"
1881
+ light: "#f8fafc",
1882
+ dark: "#0a0a0b"
1861
1883
  },
1862
1884
  foreground: {
1863
- light: "#111827",
1864
- dark: "#ffffff"
1885
+ light: "#172033",
1886
+ dark: "#f4f4f5"
1865
1887
  },
1866
1888
  surface: {
1867
1889
  light: "#ffffff",
1868
1890
  dark: "#18181b"
1869
1891
  },
1870
1892
  muted: {
1871
- light: "#64748b",
1893
+ light: "#667085",
1872
1894
  dark: "#a1a1aa"
1873
1895
  },
1874
1896
  border: {
1875
- light: "rgb(15 23 42 / 0.12)",
1876
- dark: "rgb(255 255 255 / 0.1)"
1897
+ light: "rgb(15 23 42 / 0.11)",
1898
+ dark: "rgb(255 255 255 / 0.11)"
1877
1899
  },
1878
1900
  codeBackground: {
1879
- light: "#f6fbf8",
1880
- dark: "#18181b"
1901
+ light: "#f1f5f3",
1902
+ dark: "#171719"
1881
1903
  }
1882
1904
  },
1883
1905
  radius: {
1884
1906
  sm: "6px",
1885
- md: "10px",
1886
- lg: "14px",
1887
- xl: "18px"
1907
+ md: "8px",
1908
+ lg: "12px",
1909
+ xl: "16px"
1888
1910
  }
1889
1911
  },
1890
- layout: { maxWidth: "82rem" },
1891
- editor: false
1912
+ layout: { maxWidth: "82rem" }
1892
1913
  },
1893
1914
  base: {
1894
1915
  preset: "base",
@@ -1928,8 +1949,7 @@ var themePresets = {
1928
1949
  xl: "16px"
1929
1950
  }
1930
1951
  },
1931
- layout: { maxWidth: "80rem" },
1932
- editor: false
1952
+ layout: { maxWidth: "80rem" }
1933
1953
  }
1934
1954
  };
1935
1955
  function cloneThemeColorValue(value) {
@@ -1951,8 +1971,7 @@ function cloneTheme(theme) {
1951
1971
  },
1952
1972
  radius: { ...theme.tokens.radius }
1953
1973
  },
1954
- layout: { ...theme.layout },
1955
- editor: theme.editor
1974
+ layout: { ...theme.layout }
1956
1975
  };
1957
1976
  }
1958
1977
  function isModeColorValue(value) {
@@ -2459,4 +2478,4 @@ function ClarifyShell(props) {
2459
2478
  //#endregion
2460
2479
  export { themeBootstrapScript as a, AppShell as c, RenderErrorPanel as d, BuiltWithClarify as f, useSlot as g, SlotProvider as h, themeEditorPresets as i, PageFooter as l, RuntimeSlotsProvider as m, ThemeEditor as n, themePresets as o, RuntimeSlot as p, applyThemeVariables as r, themeStorageKey as s, ClarifyShell as t, PageBanner as u };
2461
2480
 
2462
- //# sourceMappingURL=ClarifyShell-Cq5Af46F.js.map
2481
+ //# sourceMappingURL=ClarifyShell-CwRtof1h.js.map