@clarify-labs/renderer 0.11.2 → 0.11.4
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/{ClarifyShell-Cn48irqj.cjs → ClarifyShell-Cvb7Nk3A.cjs} +3 -3
- package/output/{ClarifyShell-Cn48irqj.cjs.map → ClarifyShell-Cvb7Nk3A.cjs.map} +1 -1
- package/output/{ClarifyShell-D_HluctW.js → ClarifyShell-gzlibEm8.js} +3 -3
- package/output/{ClarifyShell-D_HluctW.js.map → ClarifyShell-gzlibEm8.js.map} +1 -1
- package/output/{MermaidViewer-EZjolX08.cjs → MermaidViewer-CPuTNujY.cjs} +2 -2
- package/output/{MermaidViewer-EZjolX08.cjs.map → MermaidViewer-CPuTNujY.cjs.map} +1 -1
- package/output/{MermaidViewer-Dby0ylNr.js → MermaidViewer-EVuBmrzA.js} +2 -2
- package/output/{MermaidViewer-Dby0ylNr.js.map → MermaidViewer-EVuBmrzA.js.map} +1 -1
- package/output/{OpenApiOperation-Cr8TxLjl.js → OpenApiOperation-Ddax6Pen.js} +401 -189
- package/output/OpenApiOperation-Ddax6Pen.js.map +1 -0
- package/output/{OpenApiOperation-bdALspAY.cjs → OpenApiOperation-QqYCuqve.cjs} +401 -189
- package/output/OpenApiOperation-QqYCuqve.cjs.map +1 -0
- package/output/{PageActions-BLzCasvB.js → PageActions-BBRz0tJ4.js} +46 -29
- package/output/{PageActions-BLzCasvB.js.map → PageActions-BBRz0tJ4.js.map} +1 -1
- package/output/{PageActions-Bw9SAHLl.cjs → PageActions-ypH6U0Vc.cjs} +49 -32
- package/output/{PageActions-Bw9SAHLl.cjs.map → PageActions-ypH6U0Vc.cjs.map} +1 -1
- package/output/{SearchDialog-j_4Y9WY_.cjs → SearchDialog-DCGBhNnW.cjs} +3 -3
- package/output/{SearchDialog-j_4Y9WY_.cjs.map → SearchDialog-DCGBhNnW.cjs.map} +1 -1
- package/output/{SearchDialog-DWYp1c6c.js → SearchDialog-Df6jknma.js} +3 -3
- package/output/{SearchDialog-DWYp1c6c.js.map → SearchDialog-Df6jknma.js.map} +1 -1
- package/output/app/PageActions.d.ts +1 -1
- package/output/client.cjs +3 -3
- package/output/client.js +3 -3
- package/output/components/Tabs.d.ts +3 -0
- package/output/core/i18n.d.ts +2 -1
- package/output/{i18n-L1XX-y6M.cjs → i18n-Ds-f-qlT.cjs} +17 -1
- package/output/i18n-Ds-f-qlT.cjs.map +1 -0
- package/output/{i18n-DjRcGSuU.js → i18n-LXAq0RIC.js} +17 -1
- package/output/i18n-LXAq0RIC.js.map +1 -0
- package/output/index.cjs +15 -17
- package/output/index.cjs.map +1 -1
- package/output/index.d.ts +1 -2
- package/output/index.js +16 -17
- package/output/index.js.map +1 -1
- package/output/mdx/components.d.ts +2 -2
- package/output/mdx/primitives.d.ts +2 -0
- package/output/openapi/components/ExamplePanels.d.ts +3 -1
- package/output/openapi/components/OpenApiAuthDocumentation.d.ts +1 -1
- package/output/openapi/components/OpenApiDocumentSection.d.ts +11 -0
- package/output/openapi/components/SchemaProperties.d.ts +8 -0
- package/output/openapi/components/SchemaSearch.d.ts +20 -0
- package/output/openapi/lib/helpers.d.ts +3 -0
- package/output/preview.cjs +3 -3
- package/output/preview.js +3 -3
- package/output/{render-hq20DPxe.cjs → render-BQkaRYoY.cjs} +2 -2
- package/output/{render-hq20DPxe.cjs.map → render-BQkaRYoY.cjs.map} +1 -1
- package/output/{render-CYQmEacg.js → render-C2rZuVLy.js} +2 -2
- package/output/{render-CYQmEacg.js.map → render-C2rZuVLy.js.map} +1 -1
- package/output/renderer.css +75 -29
- package/output/server.cjs +2 -2
- package/output/server.js +2 -2
- package/package.json +1 -1
- package/output/OpenApiOperation-Cr8TxLjl.js.map +0 -1
- package/output/OpenApiOperation-bdALspAY.cjs.map +0 -1
- package/output/i18n-DjRcGSuU.js.map +0 -1
- 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-
|
|
2
|
+
const require_i18n = require("./i18n-Ds-f-qlT.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
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
theme
|
|
523
|
-
|
|
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-
|
|
1176
|
+
var SearchDialog = (0, react.lazy)(() => Promise.resolve().then(() => require("./SearchDialog-DCGBhNnW.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 ";
|
|
@@ -1647,7 +1664,7 @@ function PageActionsProvider(props) {
|
|
|
1647
1664
|
children
|
|
1648
1665
|
});
|
|
1649
1666
|
}
|
|
1650
|
-
function
|
|
1667
|
+
function PageActions() {
|
|
1651
1668
|
const { route, routePrefix } = (0, react.useContext)(PageActionsContext);
|
|
1652
1669
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContentActions, {
|
|
1653
1670
|
route,
|
|
@@ -1667,16 +1684,16 @@ Object.defineProperty(exports, "Navigation", {
|
|
|
1667
1684
|
return Navigation;
|
|
1668
1685
|
}
|
|
1669
1686
|
});
|
|
1670
|
-
Object.defineProperty(exports, "
|
|
1687
|
+
Object.defineProperty(exports, "PageActions", {
|
|
1671
1688
|
enumerable: true,
|
|
1672
1689
|
get: function() {
|
|
1673
|
-
return
|
|
1690
|
+
return PageActions;
|
|
1674
1691
|
}
|
|
1675
1692
|
});
|
|
1676
|
-
Object.defineProperty(exports, "
|
|
1693
|
+
Object.defineProperty(exports, "PageActionsProvider", {
|
|
1677
1694
|
enumerable: true,
|
|
1678
1695
|
get: function() {
|
|
1679
|
-
return
|
|
1696
|
+
return PageActionsProvider;
|
|
1680
1697
|
}
|
|
1681
1698
|
});
|
|
1682
1699
|
Object.defineProperty(exports, "SectionProvider", {
|
|
@@ -1812,4 +1829,4 @@ Object.defineProperty(exports, "useTheme", {
|
|
|
1812
1829
|
}
|
|
1813
1830
|
});
|
|
1814
1831
|
|
|
1815
|
-
//# sourceMappingURL=PageActions-
|
|
1832
|
+
//# sourceMappingURL=PageActions-ypH6U0Vc.cjs.map
|