@clarify-labs/renderer 0.10.2 → 0.11.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.
Files changed (90) hide show
  1. package/output/{ClarifyShell-C6li72Ce.cjs → ClarifyShell-BAjq876Z.cjs} +113 -90
  2. package/output/ClarifyShell-BAjq876Z.cjs.map +1 -0
  3. package/output/{ClarifyShell-1LuBliwt.js → ClarifyShell-GoSXvgMg.js} +114 -91
  4. package/output/ClarifyShell-GoSXvgMg.js.map +1 -0
  5. package/output/{MermaidViewer-B6-BMCJG.cjs → MermaidViewer-BZ8ghcFP.cjs} +2 -2
  6. package/output/{MermaidViewer-B6-BMCJG.cjs.map → MermaidViewer-BZ8ghcFP.cjs.map} +1 -1
  7. package/output/{MermaidViewer-dXsomvM7.js → MermaidViewer-CkIxyqtf.js} +2 -2
  8. package/output/{MermaidViewer-dXsomvM7.js.map → MermaidViewer-CkIxyqtf.js.map} +1 -1
  9. package/output/{OpenApiOperation-DgrqzeiS.js → OpenApiOperation-C2vJztWZ.js} +1983 -365
  10. package/output/OpenApiOperation-C2vJztWZ.js.map +1 -0
  11. package/output/{OpenApiOperation-B52IWlKb.cjs → OpenApiOperation-D-5uE5v7.cjs} +2009 -361
  12. package/output/OpenApiOperation-D-5uE5v7.cjs.map +1 -0
  13. package/output/{PageActions-BjB6PYmL.cjs → PageActions-DJRXlGhz.cjs} +532 -358
  14. package/output/PageActions-DJRXlGhz.cjs.map +1 -0
  15. package/output/{PageActions-D7K9LDGf.js → PageActions-bugd7GZh.js} +535 -361
  16. package/output/PageActions-bugd7GZh.js.map +1 -0
  17. package/output/{SearchDialog-CIPvXMT3.cjs → SearchDialog-8AdCRp6K.cjs} +3 -3
  18. package/output/{SearchDialog-CIPvXMT3.cjs.map → SearchDialog-8AdCRp6K.cjs.map} +1 -1
  19. package/output/{SearchDialog-CxYLjRi5.js → SearchDialog-CBJjDs_9.js} +3 -3
  20. package/output/{SearchDialog-CxYLjRi5.js.map → SearchDialog-CBJjDs_9.js.map} +1 -1
  21. package/output/app/ContentDiagnostic.d.ts +2 -1
  22. package/output/app/PageFooter.d.ts +1 -1
  23. package/output/client.cjs +3 -3
  24. package/output/client.js +3 -3
  25. package/output/components/AccordionGroup.d.ts +7 -0
  26. package/output/components/Collapse.d.ts +2 -0
  27. package/output/components/FileTree.d.ts +10 -0
  28. package/output/components/Image.d.ts +6 -0
  29. package/output/components/Steps.d.ts +12 -0
  30. package/output/components/Tabs.d.ts +12 -5
  31. package/output/components/Tooltip.d.ts +8 -0
  32. package/output/components/index.d.ts +10 -1
  33. package/output/core/i18n.d.ts +1 -1
  34. package/output/core/types.d.ts +37 -19
  35. package/output/{i18n-DnqZHFT7.js → i18n-BPrC45nD.js} +102 -2
  36. package/output/i18n-BPrC45nD.js.map +1 -0
  37. package/output/{i18n-b4iTLeia.cjs → i18n-wXINKKV0.cjs} +102 -2
  38. package/output/i18n-wXINKKV0.cjs.map +1 -0
  39. package/output/index.cjs +38 -8
  40. package/output/index.cjs.map +1 -1
  41. package/output/index.d.ts +8 -7
  42. package/output/index.js +34 -9
  43. package/output/index.js.map +1 -1
  44. package/output/mdx/components.d.ts +11 -1
  45. package/output/mdx/primitives.d.ts +4 -2
  46. package/output/openapi/components/CodeDisplay.d.ts +1 -0
  47. package/output/openapi/components/EndpointMethodBadge.d.ts +6 -0
  48. package/output/openapi/components/EndpointSections.d.ts +2 -2
  49. package/output/openapi/components/ExamplePanels.d.ts +2 -2
  50. package/output/openapi/components/InlineListbox.d.ts +31 -0
  51. package/output/openapi/components/OpenApiAuthPanel.d.ts +12 -0
  52. package/output/openapi/components/OpenApiOperation.d.ts +1 -9
  53. package/output/openapi/components/OpenApiOperation.state.d.ts +4 -2
  54. package/output/openapi/components/OpenApiRequest.d.ts +18 -0
  55. package/output/openapi/components/OpenApiRequestFields.d.ts +25 -0
  56. package/output/openapi/components/OpenApiResponseViewer.d.ts +8 -0
  57. package/output/openapi/components/SendRequestButton.d.ts +9 -0
  58. package/output/openapi/components/helpers.d.ts +6 -1
  59. package/output/openapi/components/useOpenApiRequestState.d.ts +41 -0
  60. package/output/openapi/entry.d.ts +2 -0
  61. package/output/openapi/index.d.ts +2 -2
  62. package/output/openapi/lib/api-exchange-code.d.ts +8 -0
  63. package/output/openapi/lib/api-exchange.d.ts +30 -0
  64. package/output/openapi/lib/api-request.d.ts +24 -0
  65. package/output/openapi/lib/request-code.d.ts +2 -2
  66. package/output/openapi/lib/request-parameters.d.ts +5 -0
  67. package/output/openapi/store.d.ts +10 -0
  68. package/output/openapi/types.d.ts +4 -0
  69. package/output/preview.cjs +37 -27
  70. package/output/preview.cjs.map +1 -1
  71. package/output/preview.js +37 -27
  72. package/output/preview.js.map +1 -1
  73. package/output/{render-Di5B6Zc0.cjs → render-FICIzeXz.cjs} +2 -2
  74. package/output/{render-Di5B6Zc0.cjs.map → render-FICIzeXz.cjs.map} +1 -1
  75. package/output/{render-DKj24Jqw.js → render-XQiw_48i.js} +2 -2
  76. package/output/{render-DKj24Jqw.js.map → render-XQiw_48i.js.map} +1 -1
  77. package/output/renderer.css +1310 -318
  78. package/output/server.cjs +2 -2
  79. package/output/server.js +2 -2
  80. package/output/theme/ThemeEditor.d.ts +8 -4
  81. package/output/theme/variables.d.ts +8 -4
  82. package/package.json +1 -1
  83. package/output/ClarifyShell-1LuBliwt.js.map +0 -1
  84. package/output/ClarifyShell-C6li72Ce.cjs.map +0 -1
  85. package/output/OpenApiOperation-B52IWlKb.cjs.map +0 -1
  86. package/output/OpenApiOperation-DgrqzeiS.js.map +0 -1
  87. package/output/PageActions-BjB6PYmL.cjs.map +0 -1
  88. package/output/PageActions-D7K9LDGf.js.map +0 -1
  89. package/output/i18n-DnqZHFT7.js.map +0 -1
  90. package/output/i18n-b4iTLeia.cjs.map +0 -1
@@ -1,9 +1,9 @@
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-DnqZHFT7.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-D7K9LDGf.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-BPrC45nD.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-bugd7GZh.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";
6
- import { ChevronDown, ChevronLeft, ChevronRight, Settings, WandSparkles, X } from "lucide-react";
6
+ import { ArrowRight, ChevronDown, ChevronLeft, ChevronRight, Settings, WandSparkles, X } from "lucide-react";
7
7
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
8
  //#region source/slots/context.tsx
9
9
  var UISlotContextValue = createContext(null);
@@ -330,25 +330,36 @@ function PageBannerLink(props) {
330
330
  const { href, label, external: externalProp, config, locale } = props;
331
331
  const external = externalProp ?? isExternalHref(href);
332
332
  const resolvedHref = external ? href : localizeHref(href, config, locale);
333
- const className = "clarify-banner-link shrink-0 rounded-full bg-(--clarify-theme-tokens-colors-primary) px-3 py-1 text-xs/5 font-semibold text-white no-underline transition hover:opacity-90";
333
+ const className = "clarify-banner-link inline-flex h-7 shrink-0 items-center gap-1 rounded-(--clarify-theme-tokens-radius-md) px-2 text-xs/5 font-semibold text-(--clarify-ui-accent-text) no-underline transition hover:bg-(--clarify-ui-hover-background) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--clarify-theme-tokens-colors-primary)";
334
+ const children = /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
335
+ className: "hidden sm:inline",
336
+ children: label
337
+ }), /* @__PURE__ */ jsx(ArrowRight, {
338
+ className: "size-3.5",
339
+ "aria-hidden": "true"
340
+ })] });
334
341
  if (external) return /* @__PURE__ */ jsx("a", {
335
342
  href: resolvedHref,
336
343
  target: "_blank",
337
344
  rel: "noreferrer",
338
345
  className,
339
- children: label
346
+ "aria-label": label,
347
+ title: label,
348
+ children
340
349
  });
341
350
  return /* @__PURE__ */ jsx(Link, {
342
351
  to: resolvedHref,
343
352
  className,
344
- children: label
353
+ "aria-label": label,
354
+ title: label,
355
+ children
345
356
  });
346
357
  }
347
358
  function PageBanner(props) {
348
359
  const { currentLocale, onDismiss } = props;
349
360
  const config = useConfig();
350
361
  const banner = config.banner;
351
- const content = banner ? resolveLocalizedText(banner.content, currentLocale, config.i18n?.defaultLocale) : "";
362
+ const content = banner ? resolveLocalizedText(banner.content, currentLocale, config.locales?.default) : "";
352
363
  const storageKey = useMemo(() => {
353
364
  if (!banner || !content) return "";
354
365
  return bannerStorageKey(config, content);
@@ -368,13 +379,13 @@ function PageBanner(props) {
368
379
  if (!content) return null;
369
380
  if (dismissed) return null;
370
381
  const link = banner.link;
371
- const linkLabel = link ? resolveLocalizedText(link.label, currentLocale, config.i18n?.defaultLocale) : "";
382
+ const linkLabel = link ? resolveLocalizedText(link.label, currentLocale, config.locales?.default) : "";
372
383
  return /* @__PURE__ */ jsxs("div", {
373
- className: "clarify-banner relative flex min-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",
384
+ 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",
374
385
  children: [/* @__PURE__ */ jsxs("div", {
375
- className: "mx-auto flex w-full max-w-(--clarify-theme-layout-max-width) items-center justify-center gap-3 pr-8 sm:pr-0",
386
+ className: "mx-auto flex min-w-0 w-full max-w-(--clarify-theme-layout-max-width) items-center justify-center gap-1 pr-9 sm:gap-2",
376
387
  children: [/* @__PURE__ */ jsx("p", {
377
- className: "clarify-banner-content m-0 text-center font-medium",
388
+ className: "clarify-banner-content m-0 min-w-0 truncate text-left font-medium sm:text-center",
378
389
  children: content
379
390
  }), link ? /* @__PURE__ */ jsx(PageBannerLink, {
380
391
  href: link.href,
@@ -385,7 +396,7 @@ function PageBanner(props) {
385
396
  }) : null]
386
397
  }), banner.dismissible ? /* @__PURE__ */ jsx("button", {
387
398
  type: "button",
388
- className: "clarify-banner-dismiss absolute right-3 inline-flex size-8 items-center justify-center rounded-full text-(--clarify-ui-text-soft) transition hover:bg-(--clarify-ui-hover-background) hover:text-(--clarify-ui-text-strong)",
399
+ className: "clarify-banner-dismiss absolute right-2 inline-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) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--clarify-theme-tokens-colors-primary) sm:right-3",
389
400
  "aria-label": "Dismiss announcement",
390
401
  onClick: () => {
391
402
  if (storageKey && typeof window !== "undefined") window.localStorage.setItem(storageKey, "1");
@@ -401,17 +412,17 @@ function PageBanner(props) {
401
412
  //#endregion
402
413
  //#region source/app/PageFooter.tsx
403
414
  function localeForPath(config, pathname) {
404
- const i18n = config.i18n;
405
- if (!i18n) return void 0;
415
+ const locales = config.locales;
416
+ if (!locales) return void 0;
406
417
  const firstSegment = pathname.split("/").filter(Boolean)[0];
407
- return i18n.locales.find((locale) => locale.code === firstSegment)?.code ?? i18n.defaultLocale;
418
+ return locales.locales.find((locale) => locale.code === firstSegment)?.code ?? locales.default;
408
419
  }
409
420
  function FooterLink(arg0) {
410
421
  const { link, locale, config } = arg0;
411
422
  const external = link.external ?? isExternalHref(link.href);
412
423
  const href = external ? link.href : localizeHref(link.href, config, locale);
413
424
  const className = "clarify-footer-link no-underline transition";
414
- const label = resolveLocalizedText(link.label, locale, config.i18n?.defaultLocale);
425
+ const label = resolveLocalizedText(link.label, locale, config.locales?.default);
415
426
  if (external) return /* @__PURE__ */ jsx("a", {
416
427
  href,
417
428
  target: "_blank",
@@ -441,25 +452,22 @@ function PageFooter() {
441
452
  const footer = config.footer;
442
453
  const links = footer?.links ?? [];
443
454
  const socials = Object.entries(footer?.socials ?? {});
444
- const copyright = footer?.copyright ? resolveLocalizedText(footer.copyright, locale, config.i18n?.defaultLocale) : void 0;
445
- if (!Boolean(copyright || links.length > 0 || socials.length > 0)) return /* @__PURE__ */ jsx("footer", {
446
- "aria-hidden": "true",
447
- className: "clarify-page-footer mt-16 w-full border-t border-(--clarify-theme-tokens-colors-border) pt-8 lg:mt-24"
448
- });
455
+ const copyright = footer?.copyright ? resolveLocalizedText(footer.copyright, locale, config.locales?.default) : void 0;
456
+ if (!Boolean(copyright || links.length > 0 || socials.length > 0)) return null;
449
457
  return /* @__PURE__ */ jsx("footer", {
450
- 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",
458
+ className: "clarify-page-footer w-full",
451
459
  children: /* @__PURE__ */ jsxs("div", {
452
- className: clsx("clarify-footer-content flex flex-col items-end gap-3 text-right", "sm:items-start sm:text-left"),
460
+ className: clsx("clarify-footer-content flex flex-col items-start gap-2.5 text-left"),
453
461
  children: [copyright ? /* @__PURE__ */ jsx("p", {
454
462
  className: "clarify-footer-copyright m-0",
455
463
  children: copyright
456
464
  }) : null, links.length > 0 || socials.length > 0 ? /* @__PURE__ */ jsxs("div", {
457
- className: "clarify-footer-links flex flex-wrap justify-end gap-x-4 gap-y-2 sm:justify-start",
465
+ className: "clarify-footer-links flex flex-wrap justify-start gap-x-4 gap-y-2",
458
466
  children: [links.map((link) => /* @__PURE__ */ jsx(FooterLink, {
459
467
  link,
460
468
  locale,
461
469
  config
462
- }, `${link.href}-${resolveLocalizedText(link.label, locale, config.i18n?.defaultLocale)}`)), socials.map(([name, href]) => /* @__PURE__ */ jsx(SocialLink, {
470
+ }, `${link.href}-${resolveLocalizedText(link.label, locale, config.locales?.default)}`)), socials.map(([name, href]) => /* @__PURE__ */ jsx(SocialLink, {
463
471
  name,
464
472
  href
465
473
  }, name))]
@@ -482,40 +490,42 @@ function PageNavigation(arg0) {
482
490
  const previous = pageRoutes[currentIndex - 1];
483
491
  const next = pageRoutes[currentIndex + 1];
484
492
  if (!previous && !next) return null;
493
+ const hasBothDirections = Boolean(previous && next);
485
494
  return /* @__PURE__ */ jsxs("nav", {
486
- className: "clarify-page-navigation mt-6 grid gap-3 @3xl:grid-cols-2",
495
+ className: clsx("clarify-page-navigation mt-12 grid border-t border-(--clarify-theme-tokens-colors-border)", hasBothDirections && "@3xl:grid-cols-2"),
487
496
  "aria-label": t("navigation.previousNext"),
488
- children: [/* @__PURE__ */ jsx(PageNavigationLink, {
497
+ children: [previous ? /* @__PURE__ */ jsx(PageNavigationLink, {
489
498
  direction: "previous",
490
- route: previous
491
- }), /* @__PURE__ */ jsx(PageNavigationLink, {
499
+ route: previous,
500
+ separated: hasBothDirections
501
+ }) : null, next ? /* @__PURE__ */ jsx(PageNavigationLink, {
492
502
  direction: "next",
493
- route: next
494
- })]
503
+ route: next,
504
+ separated: hasBothDirections
505
+ }) : null]
495
506
  });
496
507
  }
497
508
  function PageNavigationLink(arg0) {
498
- const { direction, route } = arg0;
509
+ const { direction, route, separated } = arg0;
499
510
  const t = useBuiltInText();
500
- if (!route) return /* @__PURE__ */ jsx("div", { className: "hidden @3xl:block" });
501
511
  const isNext = direction === "next";
502
- return /* @__PURE__ */ jsxs(Link, {
512
+ return /* @__PURE__ */ jsx(Link, {
503
513
  to: normalizeRoutePath(route.path),
504
- 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"),
505
- children: [
506
- !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,
507
- /* @__PURE__ */ jsxs("span", {
508
- className: "min-w-0 flex-1",
509
- children: [/* @__PURE__ */ jsx("span", {
510
- className: "clarify-page-navigation-label block font-medium uppercase tracking-wide text-(--clarify-theme-tokens-colors-muted)",
511
- children: isNext ? t("navigation.next") : t("navigation.previous")
512
- }), /* @__PURE__ */ jsx("span", {
513
- className: "clarify-page-navigation-title mt-0.5 block truncate font-semibold text-(--clarify-theme-tokens-colors-foreground)",
514
- children: route.title
515
- })]
516
- }),
517
- 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
518
- ]
514
+ 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"),
515
+ children: /* @__PURE__ */ jsxs("span", {
516
+ className: clsx("min-w-0", isNext && "ml-auto"),
517
+ children: [/* @__PURE__ */ jsxs("span", {
518
+ 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"),
519
+ children: [
520
+ !isNext ? /* @__PURE__ */ jsx(ChevronLeft, { className: "size-3.5 transition-transform group-hover:-translate-x-0.5" }) : null,
521
+ isNext ? t("navigation.next") : t("navigation.previous"),
522
+ isNext ? /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5 transition-transform group-hover:translate-x-0.5" }) : null
523
+ ]
524
+ }), /* @__PURE__ */ jsx("span", {
525
+ 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)",
526
+ children: route.title
527
+ })]
528
+ })
519
529
  });
520
530
  }
521
531
  //#endregion
@@ -660,12 +670,19 @@ function useReleaseHashSyncOnManualScroll(hashScrollSuppressedUntilRef) {
660
670
  function SectionHashSync(arg0) {
661
671
  const { hashScrollSuppressedUntilRef } = arg0;
662
672
  const location = useLocation();
673
+ const pathnameRef = useRef(location.pathname);
663
674
  const hashUpdateTimeoutRef = useRef(void 0);
664
675
  const sections = useSectionStore((state) => state.sections);
665
676
  const visibleSections = useSectionStore((state) => state.visibleSections);
677
+ useEffect(() => {
678
+ if (pathnameRef.current === location.pathname) return;
679
+ pathnameRef.current = location.pathname;
680
+ hashScrollSuppressedUntilRef.current = Date.now() + 1200;
681
+ }, [hashScrollSuppressedUntilRef, location.pathname]);
666
682
  useReleaseHashSyncOnManualScroll(hashScrollSuppressedUntilRef);
667
683
  useEffect(() => {
668
684
  if (!sections.length || !visibleSections.length) return;
685
+ if (!location.hash && Date.now() < hashScrollSuppressedUntilRef.current) return;
669
686
  const visibleSectionId = visibleSections.find((id) => id !== "_top" && sections.some((section) => section.id === id));
670
687
  const hashSectionId = location.hash ? safeDecodeURIComponent(location.hash.slice(1)) : void 0;
671
688
  if (hashSectionId && Date.now() < hashScrollSuppressedUntilRef.current && !visibleSections.includes(hashSectionId)) return;
@@ -751,19 +768,19 @@ function scrollToHash(hash) {
751
768
  });
752
769
  }
753
770
  function explicitLocaleForPath(config, pathname) {
754
- const i18n = config.i18n;
755
- if (!i18n) return void 0;
771
+ const locales = config.locales;
772
+ if (!locales) return void 0;
756
773
  const firstSegment = pathname.split("/").filter(Boolean)[0];
757
- return i18n.locales.find((locale) => locale.code === firstSegment)?.code;
774
+ return locales.locales.find((locale) => locale.code === firstSegment)?.code;
758
775
  }
759
776
  function fallbackLocale(config) {
760
- return config.i18n?.defaultLocale;
777
+ return config.locales?.default;
761
778
  }
762
779
  function storedLocaleForConfig(config) {
763
- return getStoredLocalePreference(config.i18n?.locales.map((locale) => locale.code));
780
+ return getStoredLocalePreference(config.locales?.locales.map((locale) => locale.code));
764
781
  }
765
782
  function isDefaultLocale(config, locale) {
766
- return Boolean(locale && config.i18n?.defaultLocale === locale);
783
+ return Boolean(locale && config.locales?.default === locale);
767
784
  }
768
785
  function hasPath(nodes, pathname, locale) {
769
786
  return nodes.some((node) => isSameRoutePath(node.path, pathname, locale) || hasPath(node.children ?? [], pathname, locale));
@@ -813,7 +830,7 @@ function useRouteState(config, routes, navigation, pathname) {
813
830
  explicitLocale,
814
831
  storedLocale,
815
832
  currentLocale,
816
- currentLocaleConfig: config.i18n?.locales.find((locale) => locale.code === currentLocale),
833
+ currentLocaleConfig: config.locales?.locales.find((locale) => locale.code === currentLocale),
817
834
  notFoundRoute: currentRoute ? void 0 : notFoundRouteForPath(routes, pathname, currentLocale),
818
835
  currentNavigation: navigationForLocale(navigation, currentLocale, pathname),
819
836
  sections: sectionsForRoute(currentRoute)
@@ -837,7 +854,7 @@ function useStoredBannerDismissed(storageKey) {
837
854
  }
838
855
  function useBannerState(config, currentLocale) {
839
856
  const banner = config.banner;
840
- const bannerContent = banner ? resolveLocalizedText(banner.content, currentLocale, config.i18n?.defaultLocale) : "";
857
+ const bannerContent = banner ? resolveLocalizedText(banner.content, currentLocale, config.locales?.default) : "";
841
858
  const bannerStorageKey = banner && bannerContent ? `clarify:banner:dismissed:${config.title}:${bannerContent}` : void 0;
842
859
  const storedBannerDismissed = useStoredBannerDismissed(banner?.dismissible ? bannerStorageKey : void 0);
843
860
  const [dismissedBannerKey, setDismissedBannerKey] = useState();
@@ -877,9 +894,11 @@ function useAppShellNavigationEffects(arg0) {
877
894
  scrollToHash(location.hash);
878
895
  return;
879
896
  }
897
+ hashScrollSuppressedUntilRef.current = Date.now() + 1200;
880
898
  window.scrollTo({
881
899
  top: 0,
882
- left: 0
900
+ left: 0,
901
+ behavior: "instant"
883
902
  });
884
903
  window.requestAnimationFrame(() => {
885
904
  window.dispatchEvent(new Event("scroll"));
@@ -1068,17 +1087,19 @@ function AppShell(arg0) {
1068
1087
  });
1069
1088
  }
1070
1089
  function renderFooter() {
1071
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [
1072
- /* @__PURE__ */ jsx(RuntimeSlot, { name: "page.footer.before" }),
1073
- /* @__PURE__ */ jsx(RuntimeSlot, {
1074
- name: "page.footer.replace",
1075
- default: DefaultFooterComponent
1076
- }),
1077
- /* @__PURE__ */ jsx("div", {
1078
- className: "flex justify-end",
1090
+ return /* @__PURE__ */ jsxs("div", {
1091
+ 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",
1092
+ children: [/* @__PURE__ */ jsxs("div", {
1093
+ className: "clarify-page-footer-slot min-w-0",
1094
+ children: [/* @__PURE__ */ jsx(RuntimeSlot, { name: "page.footer.before" }), /* @__PURE__ */ jsx(RuntimeSlot, {
1095
+ name: "page.footer.replace",
1096
+ default: DefaultFooterComponent
1097
+ })]
1098
+ }), /* @__PURE__ */ jsx("div", {
1099
+ className: "clarify-page-attribution flex justify-end sm:self-end",
1079
1100
  children: /* @__PURE__ */ jsx(BuiltWithClarify, {})
1080
- })
1081
- ] });
1101
+ })]
1102
+ });
1082
1103
  }
1083
1104
  function renderContent() {
1084
1105
  return /* @__PURE__ */ jsx("div", {
@@ -1821,8 +1842,7 @@ function createRandomTheme() {
1821
1842
  colors: createRandomThemeColors(selection),
1822
1843
  radius: { ...selection.radius }
1823
1844
  },
1824
- layout: { maxWidth: selection.maxWidth },
1825
- editor: false
1845
+ layout: { maxWidth: selection.maxWidth }
1826
1846
  };
1827
1847
  }
1828
1848
  //#endregion
@@ -1833,42 +1853,47 @@ var themePresets = {
1833
1853
  preset: "default",
1834
1854
  tokens: {
1835
1855
  colors: {
1836
- primary: "#047857",
1837
- accent: "#0D9488",
1856
+ primary: {
1857
+ light: "#047857",
1858
+ dark: "#34d399"
1859
+ },
1860
+ accent: {
1861
+ light: "#0f766e",
1862
+ dark: "#5eead4"
1863
+ },
1838
1864
  background: {
1839
- light: "#ffffff",
1840
- dark: "#09090b"
1865
+ light: "#f8fafc",
1866
+ dark: "#0a0a0b"
1841
1867
  },
1842
1868
  foreground: {
1843
- light: "#111827",
1844
- dark: "#ffffff"
1869
+ light: "#172033",
1870
+ dark: "#f4f4f5"
1845
1871
  },
1846
1872
  surface: {
1847
1873
  light: "#ffffff",
1848
1874
  dark: "#18181b"
1849
1875
  },
1850
1876
  muted: {
1851
- light: "#64748b",
1877
+ light: "#667085",
1852
1878
  dark: "#a1a1aa"
1853
1879
  },
1854
1880
  border: {
1855
- light: "rgb(15 23 42 / 0.12)",
1856
- dark: "rgb(255 255 255 / 0.1)"
1881
+ light: "rgb(15 23 42 / 0.11)",
1882
+ dark: "rgb(255 255 255 / 0.11)"
1857
1883
  },
1858
1884
  codeBackground: {
1859
- light: "#f6fbf8",
1860
- dark: "#18181b"
1885
+ light: "#f1f5f3",
1886
+ dark: "#171719"
1861
1887
  }
1862
1888
  },
1863
1889
  radius: {
1864
1890
  sm: "6px",
1865
- md: "10px",
1866
- lg: "14px",
1867
- xl: "18px"
1891
+ md: "8px",
1892
+ lg: "12px",
1893
+ xl: "16px"
1868
1894
  }
1869
1895
  },
1870
- layout: { maxWidth: "82rem" },
1871
- editor: false
1896
+ layout: { maxWidth: "82rem" }
1872
1897
  },
1873
1898
  base: {
1874
1899
  preset: "base",
@@ -1908,8 +1933,7 @@ var themePresets = {
1908
1933
  xl: "16px"
1909
1934
  }
1910
1935
  },
1911
- layout: { maxWidth: "80rem" },
1912
- editor: false
1936
+ layout: { maxWidth: "80rem" }
1913
1937
  }
1914
1938
  };
1915
1939
  function cloneThemeColorValue(value) {
@@ -1931,8 +1955,7 @@ function cloneTheme(theme) {
1931
1955
  },
1932
1956
  radius: { ...theme.tokens.radius }
1933
1957
  },
1934
- layout: { ...theme.layout },
1935
- editor: theme.editor
1958
+ layout: { ...theme.layout }
1936
1959
  };
1937
1960
  }
1938
1961
  function isModeColorValue(value) {
@@ -2439,4 +2462,4 @@ function ClarifyShell(props) {
2439
2462
  //#endregion
2440
2463
  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 };
2441
2464
 
2442
- //# sourceMappingURL=ClarifyShell-1LuBliwt.js.map
2465
+ //# sourceMappingURL=ClarifyShell-GoSXvgMg.js.map