@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,4 +1,4 @@
|
|
|
1
|
-
import { t as useBuiltInText } from "./i18n-
|
|
1
|
+
import { t as useBuiltInText } from "./i18n-LXAq0RIC.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
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
theme
|
|
521
|
-
|
|
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-
|
|
1174
|
+
var SearchDialog = lazy(() => import("./SearchDialog-Df6jknma.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 ";
|
|
@@ -1645,7 +1662,7 @@ function PageActionsProvider(props) {
|
|
|
1645
1662
|
children
|
|
1646
1663
|
});
|
|
1647
1664
|
}
|
|
1648
|
-
function
|
|
1665
|
+
function PageActions() {
|
|
1649
1666
|
const { route, routePrefix } = useContext(PageActionsContext);
|
|
1650
1667
|
return /* @__PURE__ */ jsx(ContentActions, {
|
|
1651
1668
|
route,
|
|
@@ -1653,6 +1670,6 @@ function PageTitleActions() {
|
|
|
1653
1670
|
});
|
|
1654
1671
|
}
|
|
1655
1672
|
//#endregion
|
|
1656
|
-
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,
|
|
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, PageActionsProvider as n, useSectionStore as o, ThemeToggle as p, Header as r, remToPx as s, PageActions as t, isSameRoutePath as u, localeCookieName as v, localizeHref as w, storeThemePreference as x, readLocaleCookie as y };
|
|
1657
1674
|
|
|
1658
|
-
//# sourceMappingURL=PageActions-
|
|
1675
|
+
//# sourceMappingURL=PageActions-BBRz0tJ4.js.map
|