@clarify-labs/renderer 0.11.2 → 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 (51) hide show
  1. package/output/{ClarifyShell-D_HluctW.js → ClarifyShell-4hlqrEgp.js} +3 -3
  2. package/output/{ClarifyShell-D_HluctW.js.map → ClarifyShell-4hlqrEgp.js.map} +1 -1
  3. package/output/{ClarifyShell-Cn48irqj.cjs → ClarifyShell-D25PYLE0.cjs} +3 -3
  4. package/output/{ClarifyShell-Cn48irqj.cjs.map → ClarifyShell-D25PYLE0.cjs.map} +1 -1
  5. package/output/{MermaidViewer-Dby0ylNr.js → MermaidViewer-D4h-WEak.js} +2 -2
  6. package/output/{MermaidViewer-Dby0ylNr.js.map → MermaidViewer-D4h-WEak.js.map} +1 -1
  7. package/output/{MermaidViewer-EZjolX08.cjs → MermaidViewer-kbSVqJ_z.cjs} +2 -2
  8. package/output/{MermaidViewer-EZjolX08.cjs.map → MermaidViewer-kbSVqJ_z.cjs.map} +1 -1
  9. package/output/{OpenApiOperation-Cr8TxLjl.js → OpenApiOperation-BcJYHwft.js} +183 -150
  10. package/output/OpenApiOperation-BcJYHwft.js.map +1 -0
  11. package/output/{OpenApiOperation-bdALspAY.cjs → OpenApiOperation-HhSjad7q.cjs} +183 -150
  12. package/output/OpenApiOperation-HhSjad7q.cjs.map +1 -0
  13. package/output/{PageActions-BLzCasvB.js → PageActions-Bnz5Bybt.js} +44 -27
  14. package/output/{PageActions-BLzCasvB.js.map → PageActions-Bnz5Bybt.js.map} +1 -1
  15. package/output/{PageActions-Bw9SAHLl.cjs → PageActions-GVAsO16x.cjs} +44 -27
  16. package/output/{PageActions-Bw9SAHLl.cjs.map → PageActions-GVAsO16x.cjs.map} +1 -1
  17. package/output/{SearchDialog-j_4Y9WY_.cjs → SearchDialog-CFMl0YAZ.cjs} +3 -3
  18. package/output/{SearchDialog-j_4Y9WY_.cjs.map → SearchDialog-CFMl0YAZ.cjs.map} +1 -1
  19. package/output/{SearchDialog-DWYp1c6c.js → SearchDialog-DL5Y_bQ0.js} +3 -3
  20. package/output/{SearchDialog-DWYp1c6c.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-L1XX-y6M.cjs → i18n-R08i532P.cjs} +9 -1
  26. package/output/i18n-R08i532P.cjs.map +1 -0
  27. package/output/{i18n-DjRcGSuU.js → i18n-sJUQQLRZ.js} +9 -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/OpenApiAuthDocumentation.d.ts +1 -1
  37. package/output/openapi/components/OpenApiDocumentSection.d.ts +10 -0
  38. package/output/preview.cjs +3 -3
  39. package/output/preview.js +3 -3
  40. package/output/{render-hq20DPxe.cjs → render-BuWbLXJW.cjs} +2 -2
  41. package/output/{render-hq20DPxe.cjs.map → render-BuWbLXJW.cjs.map} +1 -1
  42. package/output/{render-CYQmEacg.js → render-tWo_ruCT.js} +2 -2
  43. package/output/{render-CYQmEacg.js.map → render-tWo_ruCT.js.map} +1 -1
  44. package/output/renderer.css +12 -17
  45. package/output/server.cjs +2 -2
  46. package/output/server.js +2 -2
  47. package/package.json +1 -1
  48. package/output/OpenApiOperation-Cr8TxLjl.js.map +0 -1
  49. package/output/OpenApiOperation-bdALspAY.cjs.map +0 -1
  50. package/output/i18n-DjRcGSuU.js.map +0 -1
  51. package/output/i18n-L1XX-y6M.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
2
- const require_i18n = require("./i18n-L1XX-y6M.cjs");
2
+ const require_i18n = require("./i18n-R08i532P.cjs");
3
3
  let clsx = require("clsx");
4
4
  clsx = require_rolldown_runtime.__toESM(clsx, 1);
5
5
  let react = require("react");
@@ -505,35 +505,52 @@ function useTheme() {
505
505
  }
506
506
  //#endregion
507
507
  //#region source/theme/ThemeToggle.tsx
508
+ var themeOptions = [
509
+ {
510
+ value: "light",
511
+ label: "theme.light",
512
+ icon: lucide_react.Sun
513
+ },
514
+ {
515
+ value: "dark",
516
+ label: "theme.dark",
517
+ icon: lucide_react.Moon
518
+ },
519
+ {
520
+ value: "system",
521
+ label: "theme.system",
522
+ icon: lucide_react.Monitor
523
+ }
524
+ ];
508
525
  function ThemeToggle() {
509
526
  const { theme, setTheme } = useTheme();
510
527
  const t = require_i18n.useBuiltInText();
511
- const nextTheme = getNextTheme(theme);
512
- const label = getThemeLabel(nextTheme, t);
513
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
514
- type: "button",
515
- className: "clarify-theme-toggle clarify-ui-control relative flex size-9 items-center justify-center rounded-(--clarify-theme-tokens-radius-md) transition",
516
- "aria-label": label,
517
- title: label,
518
- onClick: () => setTheme(nextTheme),
519
- children: [
520
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "absolute size-11 pointer-fine:hidden" }),
521
- theme === "system" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Monitor, { className: "h-5 w-5 stroke-(--clarify-theme-tokens-colors-foreground)" }) : null,
522
- theme === "light" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Sun, { className: "h-5 w-5 stroke-(--clarify-theme-tokens-colors-foreground)" }) : null,
523
- theme === "dark" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Moon, { className: "h-5 w-5 stroke-white" }) : null
524
- ]
528
+ const SelectedIcon = (themeOptions.find((option) => option.value === theme) ?? themeOptions[2]).icon;
529
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_headlessui_react.Menu, {
530
+ as: "div",
531
+ className: "clarify-theme-toggle relative",
532
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_headlessui_react.MenuButton, {
533
+ className: "clarify-theme-toggle-button clarify-ui-control relative flex size-9 items-center justify-center rounded-(--clarify-theme-tokens-radius-md) transition",
534
+ "aria-label": t("theme.switch"),
535
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: "absolute size-11 pointer-fine:hidden" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectedIcon, { className: "h-5 w-5 stroke-current" })]
536
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_headlessui_react.MenuItems, {
537
+ transition: true,
538
+ modal: false,
539
+ 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",
540
+ children: themeOptions.map((option) => {
541
+ const Icon = option.icon;
542
+ const selected = option.value === theme;
543
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_headlessui_react.MenuItem, { children: ({ focus }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
544
+ type: "button",
545
+ onClick: () => setTheme(option.value),
546
+ className: (0, clsx.default)("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"),
547
+ "aria-pressed": selected,
548
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Icon, { className: "h-4 w-4 stroke-current" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(option.label) })]
549
+ }) }, option.value);
550
+ })
551
+ })]
525
552
  });
526
553
  }
527
- function getNextTheme(theme) {
528
- if (theme === "system") return "light";
529
- if (theme === "light") return "dark";
530
- return "system";
531
- }
532
- function getThemeLabel(theme, t) {
533
- if (theme === "dark") return t("theme.switchToDark");
534
- if (theme === "light") return t("theme.switchToLight");
535
- return t("theme.switchToSystem");
536
- }
537
554
  //#endregion
538
555
  //#region source/utils/localized-text.ts
539
556
  /**
@@ -1156,7 +1173,7 @@ function useSearchProps() {
1156
1173
  }
1157
1174
  //#endregion
1158
1175
  //#region source/shell/Search.tsx
1159
- var SearchDialog = (0, react.lazy)(() => Promise.resolve().then(() => require("./SearchDialog-j_4Y9WY_.cjs")));
1176
+ var SearchDialog = (0, react.lazy)(() => Promise.resolve().then(() => require("./SearchDialog-CFMl0YAZ.cjs")));
1160
1177
  function getModifierKey() {
1161
1178
  if (typeof navigator === "undefined") return "Ctrl ";
1162
1179
  return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform) ? "⌘" : "Ctrl ";
@@ -1812,4 +1829,4 @@ Object.defineProperty(exports, "useTheme", {
1812
1829
  }
1813
1830
  });
1814
1831
 
1815
- //# sourceMappingURL=PageActions-Bw9SAHLl.cjs.map
1832
+ //# sourceMappingURL=PageActions-GVAsO16x.cjs.map