@clarify-labs/renderer 0.11.1 → 0.11.3

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 (54) hide show
  1. package/output/{ClarifyShell-CwRtof1h.js → ClarifyShell-4hlqrEgp.js} +3 -3
  2. package/output/{ClarifyShell-CwRtof1h.js.map → ClarifyShell-4hlqrEgp.js.map} +1 -1
  3. package/output/{ClarifyShell-C2XnkFQ6.cjs → ClarifyShell-D25PYLE0.cjs} +3 -3
  4. package/output/{ClarifyShell-C2XnkFQ6.cjs.map → ClarifyShell-D25PYLE0.cjs.map} +1 -1
  5. package/output/{MermaidViewer-CwkiQ2gO.js → MermaidViewer-D4h-WEak.js} +2 -2
  6. package/output/{MermaidViewer-CwkiQ2gO.js.map → MermaidViewer-D4h-WEak.js.map} +1 -1
  7. package/output/{MermaidViewer-CTvMCE19.cjs → MermaidViewer-kbSVqJ_z.cjs} +2 -2
  8. package/output/{MermaidViewer-CTvMCE19.cjs.map → MermaidViewer-kbSVqJ_z.cjs.map} +1 -1
  9. package/output/{OpenApiOperation-CFo6_otd.js → OpenApiOperation-BcJYHwft.js} +201 -87
  10. package/output/OpenApiOperation-BcJYHwft.js.map +1 -0
  11. package/output/{OpenApiOperation-D1WNrj5X.cjs → OpenApiOperation-HhSjad7q.cjs} +201 -87
  12. package/output/OpenApiOperation-HhSjad7q.cjs.map +1 -0
  13. package/output/{PageActions-3eo05fb_.js → PageActions-Bnz5Bybt.js} +44 -27
  14. package/output/{PageActions-3eo05fb_.js.map → PageActions-Bnz5Bybt.js.map} +1 -1
  15. package/output/{PageActions-Lp_NeIKr.cjs → PageActions-GVAsO16x.cjs} +44 -27
  16. package/output/{PageActions-Lp_NeIKr.cjs.map → PageActions-GVAsO16x.cjs.map} +1 -1
  17. package/output/{SearchDialog-CM9DrE2Y.cjs → SearchDialog-CFMl0YAZ.cjs} +3 -3
  18. package/output/{SearchDialog-CM9DrE2Y.cjs.map → SearchDialog-CFMl0YAZ.cjs.map} +1 -1
  19. package/output/{SearchDialog-BvCBIFqs.js → SearchDialog-DL5Y_bQ0.js} +3 -3
  20. package/output/{SearchDialog-BvCBIFqs.js.map → SearchDialog-DL5Y_bQ0.js.map} +1 -1
  21. package/output/client.cjs +3 -3
  22. package/output/client.js +3 -3
  23. package/output/components/Tabs.d.ts +3 -0
  24. package/output/core/i18n.d.ts +1 -1
  25. package/output/{i18n-DsjZ51U1.cjs → i18n-R08i532P.cjs} +23 -1
  26. package/output/i18n-R08i532P.cjs.map +1 -0
  27. package/output/{i18n-BxXpRSFX.js → i18n-sJUQQLRZ.js} +23 -1
  28. package/output/i18n-sJUQQLRZ.js.map +1 -0
  29. package/output/index.cjs +5 -7
  30. package/output/index.cjs.map +1 -1
  31. package/output/index.d.ts +1 -2
  32. package/output/index.js +6 -7
  33. package/output/index.js.map +1 -1
  34. package/output/mdx/components.d.ts +2 -2
  35. package/output/mdx/primitives.d.ts +2 -0
  36. package/output/openapi/components/EndpointSections.d.ts +2 -0
  37. package/output/openapi/components/OpenApiAuthDocumentation.d.ts +7 -0
  38. package/output/openapi/components/OpenApiDocumentSection.d.ts +10 -0
  39. package/output/openapi/components/helpers.d.ts +1 -0
  40. package/output/openapi/types.d.ts +1 -0
  41. package/output/preview.cjs +3 -3
  42. package/output/preview.js +3 -3
  43. package/output/{render-CKG4X-me.cjs → render-BuWbLXJW.cjs} +2 -2
  44. package/output/{render-CKG4X-me.cjs.map → render-BuWbLXJW.cjs.map} +1 -1
  45. package/output/{render-vlp3hwW3.js → render-tWo_ruCT.js} +2 -2
  46. package/output/{render-vlp3hwW3.js.map → render-tWo_ruCT.js.map} +1 -1
  47. package/output/renderer.css +24 -13
  48. package/output/server.cjs +2 -2
  49. package/output/server.js +2 -2
  50. package/package.json +1 -1
  51. package/output/OpenApiOperation-CFo6_otd.js.map +0 -1
  52. package/output/OpenApiOperation-D1WNrj5X.cjs.map +0 -1
  53. package/output/i18n-BxXpRSFX.js.map +0 -1
  54. package/output/i18n-DsjZ51U1.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { t as useBuiltInText } from "./i18n-BxXpRSFX.js";
1
+ import { t as useBuiltInText } from "./i18n-sJUQQLRZ.js";
2
2
  import clsx from "clsx";
3
3
  import { Suspense, createContext, forwardRef, lazy, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState } from "react";
4
4
  import { Link, useLocation } from "react-router-dom";
@@ -503,35 +503,52 @@ function useTheme() {
503
503
  }
504
504
  //#endregion
505
505
  //#region source/theme/ThemeToggle.tsx
506
+ var themeOptions = [
507
+ {
508
+ value: "light",
509
+ label: "theme.light",
510
+ icon: Sun
511
+ },
512
+ {
513
+ value: "dark",
514
+ label: "theme.dark",
515
+ icon: Moon
516
+ },
517
+ {
518
+ value: "system",
519
+ label: "theme.system",
520
+ icon: Monitor
521
+ }
522
+ ];
506
523
  function ThemeToggle() {
507
524
  const { theme, setTheme } = useTheme();
508
525
  const t = useBuiltInText();
509
- const nextTheme = getNextTheme(theme);
510
- const label = getThemeLabel(nextTheme, t);
511
- return /* @__PURE__ */ jsxs("button", {
512
- type: "button",
513
- className: "clarify-theme-toggle clarify-ui-control relative flex size-9 items-center justify-center rounded-(--clarify-theme-tokens-radius-md) transition",
514
- "aria-label": label,
515
- title: label,
516
- onClick: () => setTheme(nextTheme),
517
- children: [
518
- /* @__PURE__ */ jsx("span", { className: "absolute size-11 pointer-fine:hidden" }),
519
- theme === "system" ? /* @__PURE__ */ jsx(Monitor, { className: "h-5 w-5 stroke-(--clarify-theme-tokens-colors-foreground)" }) : null,
520
- theme === "light" ? /* @__PURE__ */ jsx(Sun, { className: "h-5 w-5 stroke-(--clarify-theme-tokens-colors-foreground)" }) : null,
521
- theme === "dark" ? /* @__PURE__ */ jsx(Moon, { className: "h-5 w-5 stroke-white" }) : null
522
- ]
526
+ const SelectedIcon = (themeOptions.find((option) => option.value === theme) ?? themeOptions[2]).icon;
527
+ return /* @__PURE__ */ jsxs(Menu, {
528
+ as: "div",
529
+ className: "clarify-theme-toggle relative",
530
+ children: [/* @__PURE__ */ jsxs(MenuButton, {
531
+ className: "clarify-theme-toggle-button clarify-ui-control relative flex size-9 items-center justify-center rounded-(--clarify-theme-tokens-radius-md) transition",
532
+ "aria-label": t("theme.switch"),
533
+ children: [/* @__PURE__ */ jsx("span", { className: "absolute size-11 pointer-fine:hidden" }), /* @__PURE__ */ jsx(SelectedIcon, { className: "h-5 w-5 stroke-current" })]
534
+ }), /* @__PURE__ */ jsx(MenuItems, {
535
+ transition: true,
536
+ modal: false,
537
+ className: "clarify-theme-toggle-menu clarify-ui-menu absolute right-0 z-50 mt-2 w-(--clarify-ui-menu-width) rounded-(--clarify-theme-tokens-radius-xl) bg-(--clarify-theme-tokens-colors-surface) p-1 shadow-lg ring-1 shadow-zinc-900/5 ring-(--clarify-theme-tokens-colors-border) transition data-closed:scale-95 data-closed:opacity-0 data-enter:duration-100 data-enter:ease-out data-leave:duration-75 data-leave:ease-in dark:bg-zinc-900 dark:ring-white/10",
538
+ children: themeOptions.map((option) => {
539
+ const Icon = option.icon;
540
+ const selected = option.value === theme;
541
+ return /* @__PURE__ */ jsx(MenuItem, { children: ({ focus }) => /* @__PURE__ */ jsxs("button", {
542
+ type: "button",
543
+ onClick: () => setTheme(option.value),
544
+ className: clsx("clarify-theme-toggle-item clarify-ui-menu-item flex w-full items-center gap-2 rounded-(--clarify-theme-tokens-radius-lg) px-3 py-2 text-left transition", focus && "clarify-ui-menu-item-focus", selected && "clarify-ui-menu-item-active"),
545
+ "aria-pressed": selected,
546
+ children: [/* @__PURE__ */ jsx(Icon, { className: "h-4 w-4 stroke-current" }), /* @__PURE__ */ jsx("span", { children: t(option.label) })]
547
+ }) }, option.value);
548
+ })
549
+ })]
523
550
  });
524
551
  }
525
- function getNextTheme(theme) {
526
- if (theme === "system") return "light";
527
- if (theme === "light") return "dark";
528
- return "system";
529
- }
530
- function getThemeLabel(theme, t) {
531
- if (theme === "dark") return t("theme.switchToDark");
532
- if (theme === "light") return t("theme.switchToLight");
533
- return t("theme.switchToSystem");
534
- }
535
552
  //#endregion
536
553
  //#region source/utils/localized-text.ts
537
554
  /**
@@ -1154,7 +1171,7 @@ function useSearchProps() {
1154
1171
  }
1155
1172
  //#endregion
1156
1173
  //#region source/shell/Search.tsx
1157
- var SearchDialog = lazy(() => import("./SearchDialog-BvCBIFqs.js"));
1174
+ var SearchDialog = lazy(() => import("./SearchDialog-DL5Y_bQ0.js"));
1158
1175
  function getModifierKey() {
1159
1176
  if (typeof navigator === "undefined") return "Ctrl ";
1160
1177
  return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘" : "Ctrl ";
@@ -1655,4 +1672,4 @@ function PageTitleActions() {
1655
1672
  //#endregion
1656
1673
  export { isExternalHref as C, copyTextToClipboard as E, themeCookieName as S, prefixHref as T, getStoredThemePreference as _, SectionProvider as a, storeLocalePreference as b, lucideIconRegistry as c, normalizeRoutePath as d, resolveLocalizedText as f, getStoredLocalePreference as g, useTheme as h, Navigation as i, resolveLucideIconName as l, ThemeProvider as m, PageTitleActions as n, useSectionStore as o, ThemeToggle as p, Header as r, remToPx as s, PageActionsProvider as t, isSameRoutePath as u, localeCookieName as v, localizeHref as w, storeThemePreference as x, readLocaleCookie as y };
1657
1674
 
1658
- //# sourceMappingURL=PageActions-3eo05fb_.js.map
1675
+ //# sourceMappingURL=PageActions-Bnz5Bybt.js.map