@clarify-labs/renderer 0.6.7 → 0.7.1
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/{OpenApiOperation-CxQQyEHK.cjs → OpenApiOperation-C4xZu4i0.cjs} +154 -79
- package/output/OpenApiOperation-C4xZu4i0.cjs.map +1 -0
- package/output/{OpenApiOperation-CI_PeMSy.js → OpenApiOperation-LIL7bqxW.js} +129 -60
- package/output/OpenApiOperation-LIL7bqxW.js.map +1 -0
- package/output/{shell-D4tS8Jts.cjs → PageActions-1RDCHcUY.cjs} +597 -160
- package/output/PageActions-1RDCHcUY.cjs.map +1 -0
- package/output/{shell-DvTfFx6M.js → PageActions-yoDRjkq8.js} +531 -148
- package/output/PageActions-yoDRjkq8.js.map +1 -0
- package/output/{ThemeRoot-DErmHskn.js → ThemeRoot-CLa0yvRQ.js} +302 -106
- package/output/ThemeRoot-CLa0yvRQ.js.map +1 -0
- package/output/{ThemeRoot-BhP5M3Hd.cjs → ThemeRoot-DYS-lcK-.cjs} +349 -129
- package/output/ThemeRoot-DYS-lcK-.cjs.map +1 -0
- package/output/app/AppShell.d.ts +5 -2
- package/output/app/PageActions.d.ts +12 -0
- package/output/app/PageBanner.d.ts +7 -0
- package/output/app/PageFooter.d.ts +5 -1
- package/output/app/SectionProvider.d.ts +1 -0
- package/output/client.cjs +14 -4
- package/output/client.d.ts +4 -1
- package/output/client.js +4 -3
- package/output/components/LocalizedLink.d.ts +6 -0
- package/output/components/WebFrame.d.ts +11 -0
- package/output/components/index.d.ts +4 -0
- package/output/context.d.ts +1 -1
- package/output/core/context.d.ts +5 -5
- package/output/core/index.d.ts +1 -1
- package/output/core/types.d.ts +74 -59
- package/output/index.cjs +57 -28
- package/output/index.cjs.map +1 -1
- package/output/index.d.ts +9 -7
- package/output/index.js +37 -12
- package/output/index.js.map +1 -1
- package/output/mdx/components.d.ts +2 -0
- package/output/mdx/primitives.d.ts +3 -2
- package/output/preview.cjs +66 -28
- package/output/preview.cjs.map +1 -1
- package/output/preview.js +63 -25
- package/output/preview.js.map +1 -1
- package/output/{render-C_NHO3rz.cjs → render-CRTqZzyY.cjs} +10 -8
- package/output/render-CRTqZzyY.cjs.map +1 -0
- package/output/{render-HeCAMIGm.js → render-D0ls3d2j.js} +8 -6
- package/output/render-D0ls3d2j.js.map +1 -0
- package/output/renderer.css +575 -280
- package/output/server.cjs +10 -8
- package/output/server.cjs.map +1 -1
- package/output/server.js +7 -5
- package/output/server.js.map +1 -1
- package/output/shell/ContentActions.d.ts +0 -1
- package/output/shell/Header.d.ts +3 -2
- package/output/shell/Search.d.ts +4 -0
- package/output/shell/SiteLogo.d.ts +2 -2
- package/output/shell/mobile.d.ts +2 -2
- package/output/shell/search/Highlight.d.ts +11 -0
- package/output/shell/search/SearchDialog.d.ts +13 -0
- package/output/shell/search/SearchInput.d.ts +8 -0
- package/output/shell/search/SearchResult.d.ts +10 -0
- package/output/shell/search/items.d.ts +3 -0
- package/output/shell/search/pagefind.d.ts +5 -0
- package/output/shell/search/types.d.ts +37 -0
- package/output/shell/search/useSearchProps.d.ts +10 -0
- package/output/theme/ThemeEditor.d.ts +53 -17
- package/output/theme/ThemeProvider.d.ts +2 -1
- package/output/theme/ThemeRoot.d.ts +2 -2
- package/output/theme/cookies.d.ts +11 -0
- package/output/theme/randomTheme.d.ts +2 -2
- package/output/theme/variables.d.ts +58 -18
- package/output/utils/href.d.ts +3 -3
- package/package.json +1 -1
- package/output/OpenApiOperation-CI_PeMSy.js.map +0 -1
- package/output/OpenApiOperation-CxQQyEHK.cjs.map +0 -1
- package/output/ThemeRoot-BhP5M3Hd.cjs.map +0 -1
- package/output/ThemeRoot-DErmHskn.js.map +0 -1
- package/output/render-C_NHO3rz.cjs.map +0 -1
- package/output/render-HeCAMIGm.js.map +0 -1
- package/output/shell-D4tS8Jts.cjs.map +0 -1
- package/output/shell-DvTfFx6M.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as isExternalHref, D as useBuiltInText, E as copyTextToClipboard, M as useLocale, c as remToPx, j as useConfig, l as lucideIconRegistry, n as PageTitleActions, s as useSectionStore, u as resolveLucideIconName, w as localizeHref } from "./PageActions-yoDRjkq8.js";
|
|
2
2
|
import { t as markdownRemarkPlugins } from "./remark-Dd2WU50s.js";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { Children, createContext, createElement, forwardRef, isValidElement, useContext, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
5
5
|
import { Link } from "react-router-dom";
|
|
6
6
|
import { Listbox, ListboxButton, ListboxOption, ListboxOptions, Tab, TabGroup, TabList, TabPanel, TabPanels, Transition } from "@headlessui/react";
|
|
7
|
-
import { AlertTriangle, ArrowRight, CheckCircle2, CheckIcon, ChevronDown, ChevronDownIcon, ChevronRight, ChevronsUpDownIcon, CircleCheck, Clipboard, ClipboardIcon, CodeIcon, Info, Lightbulb, LinkIcon, LockKeyholeIcon, PackageIcon, ServerIcon, UnlockKeyholeIcon, XCircle } from "lucide-react";
|
|
7
|
+
import { AlertTriangle, ArrowRight, Check, CheckCircle2, CheckIcon, ChevronDown, ChevronDownIcon, ChevronRight, ChevronsUpDownIcon, CircleCheck, Clipboard, ClipboardIcon, CodeIcon, Info, Lightbulb, LinkIcon, LockKeyholeIcon, PackageIcon, ServerIcon, UnlockKeyholeIcon, XCircle } from "lucide-react";
|
|
8
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import { useInView } from "framer-motion";
|
|
10
10
|
import { create } from "zustand";
|
|
@@ -23,6 +23,23 @@ var __exportAll = (all, no_symbols) => {
|
|
|
23
23
|
return target;
|
|
24
24
|
};
|
|
25
25
|
//#endregion
|
|
26
|
+
//#region source/components/LocalizedLink.tsx
|
|
27
|
+
function useLocalizedHref(href) {
|
|
28
|
+
return localizeHref(href, useConfig(), useLocale());
|
|
29
|
+
}
|
|
30
|
+
function LocalizedLink(arg0) {
|
|
31
|
+
const { href, ...props } = arg0;
|
|
32
|
+
const localizedHref = useLocalizedHref(href);
|
|
33
|
+
if (!isExternalHref(localizedHref) && !localizedHref.startsWith("#")) return /* @__PURE__ */ jsx(Link, {
|
|
34
|
+
to: localizedHref,
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
return /* @__PURE__ */ jsx("a", {
|
|
38
|
+
href: localizedHref,
|
|
39
|
+
...props
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
26
43
|
//#region source/components/Button.tsx
|
|
27
44
|
var buttonVariantStyles = {
|
|
28
45
|
primary: "rounded-full bg-(--clarify-theme-tokens-colors-foreground) px-3 py-1 text-(--clarify-theme-tokens-colors-background) hover:opacity-80 dark:bg-(--clarify-theme-tokens-colors-primary)/10 dark:text-(--clarify-theme-tokens-colors-primary) dark:ring-1 dark:ring-inset dark:ring-(--clarify-theme-tokens-colors-primary)/20 dark:hover:opacity-80",
|
|
@@ -33,11 +50,17 @@ var buttonVariantStyles = {
|
|
|
33
50
|
};
|
|
34
51
|
function Button(arg0) {
|
|
35
52
|
const { variant = "primary", className, children, arrow, ...props } = arg0;
|
|
36
|
-
const classes = clsx("clarify-button inline-flex justify-center gap-
|
|
37
|
-
const arrowIcon = /* @__PURE__ */ jsx(ArrowRight, {
|
|
53
|
+
const classes = clsx("clarify-button not-prose inline-flex w-fit max-w-full items-center justify-center gap-1 overflow-hidden align-middle text-sm leading-6 font-medium whitespace-nowrap no-underline transition", buttonVariantStyles[variant], className);
|
|
54
|
+
const arrowIcon = /* @__PURE__ */ jsx(ArrowRight, {
|
|
55
|
+
"aria-hidden": "true",
|
|
56
|
+
className: clsx("h-4 w-4 shrink-0", variant === "text" && "relative top-px", arrow === "left" && "-ml-0.5 rotate-180", arrow === "right" && "-mr-0.5")
|
|
57
|
+
});
|
|
38
58
|
const inner = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
39
59
|
arrow === "left" ? arrowIcon : null,
|
|
40
|
-
|
|
60
|
+
/* @__PURE__ */ jsx("span", {
|
|
61
|
+
className: "truncate",
|
|
62
|
+
children
|
|
63
|
+
}),
|
|
41
64
|
arrow === "right" ? arrowIcon : null
|
|
42
65
|
] });
|
|
43
66
|
if (typeof props.href === "undefined") return /* @__PURE__ */ jsx("button", {
|
|
@@ -45,7 +68,7 @@ function Button(arg0) {
|
|
|
45
68
|
...props,
|
|
46
69
|
children: inner
|
|
47
70
|
});
|
|
48
|
-
return /* @__PURE__ */ jsx(
|
|
71
|
+
return /* @__PURE__ */ jsx(LocalizedLink, {
|
|
49
72
|
className: classes,
|
|
50
73
|
...props,
|
|
51
74
|
children: inner
|
|
@@ -176,13 +199,7 @@ function Card(arg0) {
|
|
|
176
199
|
className: classes,
|
|
177
200
|
children: content
|
|
178
201
|
});
|
|
179
|
-
|
|
180
|
-
to: href,
|
|
181
|
-
className: classes,
|
|
182
|
-
...props,
|
|
183
|
-
children: content
|
|
184
|
-
});
|
|
185
|
-
return /* @__PURE__ */ jsx("a", {
|
|
202
|
+
return /* @__PURE__ */ jsx(LocalizedLink, {
|
|
186
203
|
href,
|
|
187
204
|
className: classes,
|
|
188
205
|
...props,
|
|
@@ -230,38 +247,30 @@ function CopyButton(arg0) {
|
|
|
230
247
|
return () => window.clearTimeout(timeout);
|
|
231
248
|
}, [copyCount]);
|
|
232
249
|
if (!code) return null;
|
|
233
|
-
return /* @__PURE__ */
|
|
250
|
+
return /* @__PURE__ */ jsx("button", {
|
|
234
251
|
type: "button",
|
|
235
|
-
className: clsx("clarify-code-copy group/button absolute top-3.5 right-4 overflow-hidden rounded-full py-1 pr-3 pl-2 text-2xs font-medium opacity-
|
|
252
|
+
className: clsx("clarify-code-copy group/button absolute top-3.5 right-4 inline-flex items-center gap-1 overflow-hidden rounded-full border border-(--clarify-code-border) py-1 pr-3 pl-2 text-2xs font-medium whitespace-nowrap opacity-100 shadow-sm backdrop-blur-sm transition sm:opacity-0 sm:group-hover:opacity-100 focus:opacity-100", copied ? "clarify-code-copy-copied text-(--clarify-code-text)" : "bg-(--clarify-code-control-background) text-(--clarify-code-text) hover:bg-(--clarify-code-control-background-hover)"),
|
|
236
253
|
onClick: () => {
|
|
237
254
|
copyTextToClipboard(code).then((ok) => {
|
|
238
255
|
if (ok) setCopyCount((count) => count + 1);
|
|
239
256
|
});
|
|
240
257
|
},
|
|
241
|
-
children: [/* @__PURE__ */ jsxs("
|
|
242
|
-
"aria-hidden": copied,
|
|
243
|
-
className: clsx("pointer-events-none flex items-center gap-0.5 text-zinc-400 transition duration-300", copied && "-translate-y-1.5 opacity-0"),
|
|
244
|
-
children: [/* @__PURE__ */ jsx(Clipboard, { className: "h-5 w-5 stroke-zinc-500 transition-colors group-hover/button:stroke-zinc-400" }), t("actions.copy")]
|
|
245
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
246
|
-
"aria-hidden": !copied,
|
|
247
|
-
className: clsx("pointer-events-none absolute inset-0 flex items-center justify-center text-(--clarify-theme-tokens-colors-primary) transition duration-300", !copied && "translate-y-1.5 opacity-0"),
|
|
248
|
-
children: t("actions.copied")
|
|
249
|
-
})]
|
|
258
|
+
children: copied ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5 stroke-(--clarify-theme-tokens-colors-primary)" }), t("actions.copied")] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Clipboard, { className: "h-3.5 w-3.5 stroke-(--clarify-code-muted) transition-colors group-hover/button:stroke-(--clarify-code-text)" }), t("actions.copy")] })
|
|
250
259
|
});
|
|
251
260
|
}
|
|
252
261
|
function CodePanelHeader(arg0) {
|
|
253
262
|
const { tag, label } = arg0;
|
|
254
263
|
if (!tag && !label) return null;
|
|
255
264
|
return /* @__PURE__ */ jsxs("div", {
|
|
256
|
-
className: "clarify-code-panel-header flex h-9 items-center gap-2 border-y border-
|
|
265
|
+
className: "clarify-code-panel-header flex h-9 items-center gap-2 border-y border-(--clarify-code-border) border-t-transparent bg-(--clarify-code-background) px-4",
|
|
257
266
|
children: [
|
|
258
267
|
tag ? /* @__PURE__ */ jsx("span", {
|
|
259
268
|
className: "clarify-code-panel-tag font-semibold text-(--clarify-theme-tokens-colors-primary)",
|
|
260
269
|
children: tag
|
|
261
270
|
}) : null,
|
|
262
|
-
tag && label ? /* @__PURE__ */ jsx("span", { className: "h-0.5 w-0.5 rounded-full bg-
|
|
271
|
+
tag && label ? /* @__PURE__ */ jsx("span", { className: "h-0.5 w-0.5 rounded-full bg-(--clarify-code-faint)" }) : null,
|
|
263
272
|
label ? /* @__PURE__ */ jsx("span", {
|
|
264
|
-
className: "text-xs text-
|
|
273
|
+
className: "truncate text-xs text-(--clarify-code-muted)",
|
|
265
274
|
children: label
|
|
266
275
|
}) : null
|
|
267
276
|
]
|
|
@@ -279,14 +288,14 @@ function CodePanel(arg0) {
|
|
|
279
288
|
}
|
|
280
289
|
const copyText = code ?? getNodeText(children);
|
|
281
290
|
return /* @__PURE__ */ jsxs("div", {
|
|
282
|
-
className: "clarify-code-panel group
|
|
291
|
+
className: "clarify-code-panel group bg-(--clarify-code-background)",
|
|
283
292
|
children: [/* @__PURE__ */ jsx(CodePanelHeader, {
|
|
284
293
|
tag,
|
|
285
294
|
label
|
|
286
295
|
}), /* @__PURE__ */ jsxs("div", {
|
|
287
296
|
className: "relative",
|
|
288
297
|
children: [/* @__PURE__ */ jsx("pre", {
|
|
289
|
-
className: "clarify-code-pre overflow-x-auto p-4 text-xs text-
|
|
298
|
+
className: "clarify-code-pre overflow-x-auto p-4 text-xs text-(--clarify-code-text)",
|
|
290
299
|
children
|
|
291
300
|
}), /* @__PURE__ */ jsx(CopyButton, { code: copyText })]
|
|
292
301
|
})]
|
|
@@ -298,14 +307,14 @@ function CodeGroupHeader(arg0) {
|
|
|
298
307
|
const hasTabs = Children.count(children) > 1;
|
|
299
308
|
if (!title && !hasTabs) return null;
|
|
300
309
|
return /* @__PURE__ */ jsxs("div", {
|
|
301
|
-
className: "clarify-code-group-header flex min-h-(--clarify-code-header-min-height) flex-wrap items-start gap-x-4 border-b border-
|
|
310
|
+
className: "clarify-code-group-header flex min-h-(--clarify-code-header-min-height) flex-wrap items-start gap-x-4 border-b border-(--clarify-code-border) bg-(--clarify-code-header-background) px-4",
|
|
302
311
|
children: [title ? /* @__PURE__ */ jsx("h3", {
|
|
303
|
-
className: "mr-auto pt-3 text-xs font-semibold text-
|
|
312
|
+
className: "mr-auto pt-3 text-xs font-semibold text-(--clarify-code-text)",
|
|
304
313
|
children: title
|
|
305
314
|
}) : null, hasTabs ? /* @__PURE__ */ jsx(TabList, {
|
|
306
315
|
className: "clarify-code-tabs -mb-px flex gap-4 text-xs font-medium",
|
|
307
316
|
children: Children.map(children, (child, childIndex) => /* @__PURE__ */ jsx(Tab, {
|
|
308
|
-
className: clsx("clarify-code-tab border-b py-3 transition data-selected:not-data-focus:outline-hidden", childIndex === selectedIndex ? "border-(--clarify-theme-tokens-colors-primary) text-(--clarify-theme-tokens-colors-primary)" : "border-transparent text-
|
|
317
|
+
className: clsx("clarify-code-tab border-b py-3 transition data-selected:not-data-focus:outline-hidden", childIndex === selectedIndex ? "border-(--clarify-theme-tokens-colors-primary) text-(--clarify-theme-tokens-colors-primary)" : "border-transparent text-(--clarify-code-muted) hover:text-(--clarify-code-text)"),
|
|
309
318
|
children: getPanelTitle({
|
|
310
319
|
...isValidElement(child) ? child.props : {},
|
|
311
320
|
fallbackTitle: t("actions.code")
|
|
@@ -379,7 +388,7 @@ function CodeGroup(arg0) {
|
|
|
379
388
|
fallbackTitle: t("actions.code")
|
|
380
389
|
})) ?? []);
|
|
381
390
|
const hasTabs = Children.count(children) > 1;
|
|
382
|
-
const containerClassName = "clarify-code-group my-6 overflow-hidden rounded-2xl bg-
|
|
391
|
+
const containerClassName = "clarify-code-group my-6 overflow-hidden rounded-2xl bg-(--clarify-code-background) shadow-md ring-1 ring-(--clarify-code-border)";
|
|
383
392
|
const header = /* @__PURE__ */ jsx(CodeGroupHeader, {
|
|
384
393
|
title,
|
|
385
394
|
selectedIndex: tabGroupProps.selectedIndex,
|
|
@@ -440,7 +449,7 @@ function Collapse(arg0) {
|
|
|
440
449
|
setMaxHeight(open ? `${contentRef.current.scrollHeight}px` : "0px");
|
|
441
450
|
}, [open, children]);
|
|
442
451
|
return /* @__PURE__ */ jsxs("div", {
|
|
443
|
-
className: clsx("clarify-collapse my-6 overflow-hidden rounded-(--clarify-theme-tokens-radius-xl) border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface)
|
|
452
|
+
className: clsx("clarify-collapse my-6 overflow-hidden rounded-(--clarify-theme-tokens-radius-xl) border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface)", className),
|
|
444
453
|
...props,
|
|
445
454
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
446
455
|
type: "button",
|
|
@@ -743,6 +752,57 @@ function Prose(arg0) {
|
|
|
743
752
|
});
|
|
744
753
|
}
|
|
745
754
|
//#endregion
|
|
755
|
+
//#region source/components/WebFrame.tsx
|
|
756
|
+
function WebFrame(arg0) {
|
|
757
|
+
const { src, title = "Embedded content", children, showWindow = true, className, iframeClassName, height = 420, style, ...props } = arg0;
|
|
758
|
+
const frame = src ? /* @__PURE__ */ jsx("iframe", {
|
|
759
|
+
src,
|
|
760
|
+
title,
|
|
761
|
+
loading: "lazy",
|
|
762
|
+
className: clsx("block w-full flex-1 border-0 bg-white", iframeClassName),
|
|
763
|
+
style: {
|
|
764
|
+
height,
|
|
765
|
+
...style
|
|
766
|
+
},
|
|
767
|
+
...props
|
|
768
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
769
|
+
className: clsx("min-h-0 flex-1 overflow-auto bg-white text-zinc-950", iframeClassName),
|
|
770
|
+
style: {
|
|
771
|
+
height,
|
|
772
|
+
...style
|
|
773
|
+
},
|
|
774
|
+
children
|
|
775
|
+
});
|
|
776
|
+
if (!showWindow) return /* @__PURE__ */ jsx("div", {
|
|
777
|
+
className: clsx("clarify-web-frame not-prose my-10 overflow-hidden rounded-(--clarify-theme-tokens-radius-xl) border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) shadow-(--clarify-ui-accent-glow)", className),
|
|
778
|
+
children: frame
|
|
779
|
+
});
|
|
780
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
781
|
+
className: clsx("clarify-web-frame not-prose my-10 overflow-hidden rounded-(--clarify-theme-tokens-radius-xl) border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) shadow-(--clarify-ui-accent-glow)", className),
|
|
782
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
783
|
+
className: "flex h-10 items-center gap-2 border-b border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-code-background) px-4",
|
|
784
|
+
children: [
|
|
785
|
+
/* @__PURE__ */ jsx("span", {
|
|
786
|
+
className: "size-3 rounded-full bg-red-400",
|
|
787
|
+
"aria-hidden": "true"
|
|
788
|
+
}),
|
|
789
|
+
/* @__PURE__ */ jsx("span", {
|
|
790
|
+
className: "size-3 rounded-full bg-yellow-400",
|
|
791
|
+
"aria-hidden": "true"
|
|
792
|
+
}),
|
|
793
|
+
/* @__PURE__ */ jsx("span", {
|
|
794
|
+
className: "size-3 rounded-full bg-green-400",
|
|
795
|
+
"aria-hidden": "true"
|
|
796
|
+
}),
|
|
797
|
+
/* @__PURE__ */ jsx("span", {
|
|
798
|
+
className: "sr-only",
|
|
799
|
+
children: title
|
|
800
|
+
})
|
|
801
|
+
]
|
|
802
|
+
}), frame]
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
//#endregion
|
|
746
806
|
//#region source/mdx/primitives.tsx
|
|
747
807
|
var primitives_exports = /* @__PURE__ */ __exportAll({
|
|
748
808
|
Button: () => Button,
|
|
@@ -755,8 +815,10 @@ var primitives_exports = /* @__PURE__ */ __exportAll({
|
|
|
755
815
|
Properties: () => Properties,
|
|
756
816
|
Property: () => Property,
|
|
757
817
|
Row: () => Row,
|
|
818
|
+
WebFrame: () => WebFrame,
|
|
758
819
|
a: () => a,
|
|
759
820
|
code: () => code,
|
|
821
|
+
h1: () => h1,
|
|
760
822
|
h2: () => h2,
|
|
761
823
|
h3: () => h3,
|
|
762
824
|
pre: () => pre,
|
|
@@ -765,7 +827,7 @@ var primitives_exports = /* @__PURE__ */ __exportAll({
|
|
|
765
827
|
function wrapper(arg0) {
|
|
766
828
|
const { children } = arg0;
|
|
767
829
|
return /* @__PURE__ */ jsx("article", {
|
|
768
|
-
className: "clarify-mdx-page flex h-full flex-col pt-
|
|
830
|
+
className: "clarify-mdx-page flex h-full flex-col pt-14 pb-10",
|
|
769
831
|
children: /* @__PURE__ */ jsx(Prose, {
|
|
770
832
|
className: "flex-auto",
|
|
771
833
|
children
|
|
@@ -774,15 +836,22 @@ function wrapper(arg0) {
|
|
|
774
836
|
}
|
|
775
837
|
function a(arg0) {
|
|
776
838
|
const { href = "", ...props } = arg0;
|
|
777
|
-
|
|
778
|
-
to: href,
|
|
779
|
-
...props
|
|
780
|
-
});
|
|
781
|
-
return /* @__PURE__ */ jsx("a", {
|
|
839
|
+
return /* @__PURE__ */ jsx(LocalizedLink, {
|
|
782
840
|
href,
|
|
783
841
|
...props
|
|
784
842
|
});
|
|
785
843
|
}
|
|
844
|
+
function h1(arg0) {
|
|
845
|
+
const { children, className, ...props } = arg0;
|
|
846
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
847
|
+
className: "clarify-page-title-row flex flex-col gap-4 pb-4 sm:flex-row sm:items-start sm:justify-between",
|
|
848
|
+
children: [/* @__PURE__ */ jsx("h1", {
|
|
849
|
+
className: clsx("clarify-page-title min-w-0 flex-1", className),
|
|
850
|
+
...props,
|
|
851
|
+
children
|
|
852
|
+
}), /* @__PURE__ */ jsx(PageTitleActions, {})]
|
|
853
|
+
});
|
|
854
|
+
}
|
|
786
855
|
var code = Code;
|
|
787
856
|
var pre = Pre;
|
|
788
857
|
function h2(props) {
|
|
@@ -1487,26 +1556,26 @@ function SelectControl(arg0) {
|
|
|
1487
1556
|
className: wrapperClassName,
|
|
1488
1557
|
children: [/* @__PURE__ */ jsxs(ListboxButton, {
|
|
1489
1558
|
"aria-label": label,
|
|
1490
|
-
className: `clarify-api-select-button flex ${buttonSizeClassName} items-center justify-between gap-2 rounded-lg bg-
|
|
1559
|
+
className: `clarify-api-select-button flex ${buttonSizeClassName} items-center justify-between gap-2 rounded-lg bg-(--clarify-code-control-background) px-2 py-1 text-xs font-medium whitespace-nowrap text-(--clarify-code-text) outline-hidden transition hover:bg-(--clarify-code-control-background-hover) focus:ring-2 focus:ring-(--clarify-ui-accent-border) data-open:bg-(--clarify-code-control-background-hover) data-open:ring-2 data-open:ring-(--clarify-ui-accent-border)`,
|
|
1491
1560
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
1492
1561
|
className: "flex min-w-0 items-center gap-1.5 overflow-hidden",
|
|
1493
1562
|
children: [icon ? /* @__PURE__ */ jsx("span", {
|
|
1494
|
-
className: "shrink-0 text-
|
|
1563
|
+
className: "shrink-0 text-(--clarify-code-faint)",
|
|
1495
1564
|
children: icon
|
|
1496
1565
|
}) : null, /* @__PURE__ */ jsx("span", {
|
|
1497
1566
|
className: "truncate",
|
|
1498
1567
|
children: selectedOption?.label ?? value
|
|
1499
1568
|
})]
|
|
1500
1569
|
}), /* @__PURE__ */ jsx(ChevronsUpDownIcon, {
|
|
1501
|
-
className: "h-3.5 w-3.5 shrink-0 text-
|
|
1570
|
+
className: "h-3.5 w-3.5 shrink-0 text-(--clarify-code-faint)",
|
|
1502
1571
|
"aria-hidden": "true"
|
|
1503
1572
|
})]
|
|
1504
1573
|
}), /* @__PURE__ */ jsx(ListboxOptions, {
|
|
1505
1574
|
anchor: "bottom end",
|
|
1506
|
-
className: "clarify-api-select-options z-30 mt-1 max-h-64 w-max min-w-(--button-width) max-w-(--clarify-popover-max-width) overflow-auto rounded-xl bg-
|
|
1575
|
+
className: "clarify-api-select-options z-30 mt-1 max-h-64 w-max min-w-(--button-width) max-w-(--clarify-popover-max-width) overflow-auto rounded-xl bg-(--clarify-code-surface) p-1 text-xs shadow-lg shadow-black/20 ring-1 ring-(--clarify-code-border) [--anchor-gap:--spacing(1)] focus:outline-none",
|
|
1507
1576
|
children: normalizedOptions.map((option) => /* @__PURE__ */ jsxs(ListboxOption, {
|
|
1508
1577
|
value: option.value,
|
|
1509
|
-
className: "clarify-api-select-option group flex cursor-default items-center justify-between gap-3 rounded-lg px-2.5 py-2 text-xs whitespace-nowrap text-
|
|
1578
|
+
className: "clarify-api-select-option group flex cursor-default items-center justify-between gap-3 rounded-lg px-2.5 py-2 text-xs whitespace-nowrap text-(--clarify-code-muted) select-none data-focus:bg-(--clarify-code-control-background-hover) data-focus:text-(--clarify-code-text) data-selected:text-(--clarify-theme-tokens-colors-primary)",
|
|
1510
1579
|
children: [/* @__PURE__ */ jsx("span", { children: option.label }), /* @__PURE__ */ jsx(CheckIcon, {
|
|
1511
1580
|
className: "h-3.5 w-3.5 shrink-0 opacity-0 group-data-selected:opacity-100",
|
|
1512
1581
|
"aria-hidden": "true"
|
|
@@ -1592,12 +1661,12 @@ function CopyCodeButton(arg0) {
|
|
|
1592
1661
|
window.setTimeout(() => setCopied(false), 1e3);
|
|
1593
1662
|
});
|
|
1594
1663
|
},
|
|
1595
|
-
className: "flex items-center gap-1.5 rounded-full bg-
|
|
1664
|
+
className: "flex items-center gap-1.5 rounded-full bg-(--clarify-code-control-background) px-2.5 py-1.5 text-2xs font-medium text-(--clarify-code-muted) transition hover:bg-(--clarify-code-control-background-hover) hover:text-(--clarify-code-text) focus:bg-(--clarify-code-control-background-hover) focus:text-(--clarify-code-text)",
|
|
1596
1665
|
children: [copied ? /* @__PURE__ */ jsx(CheckIcon, {
|
|
1597
|
-
className: "h-3.5 w-3.5 text-
|
|
1666
|
+
className: "h-3.5 w-3.5 text-(--clarify-theme-tokens-colors-primary)",
|
|
1598
1667
|
"aria-hidden": "true"
|
|
1599
1668
|
}) : /* @__PURE__ */ jsx(ClipboardIcon, {
|
|
1600
|
-
className: "h-3.5 w-3.5 text-
|
|
1669
|
+
className: "h-3.5 w-3.5 text-(--clarify-code-faint)",
|
|
1601
1670
|
"aria-hidden": "true"
|
|
1602
1671
|
}), /* @__PURE__ */ jsx("span", { children: copied ? t("actions.copied") : t("actions.copy") })]
|
|
1603
1672
|
});
|
|
@@ -1647,16 +1716,16 @@ function CodeToolbar(arg0) {
|
|
|
1647
1716
|
function ApiExampleCodeGroup(arg0) {
|
|
1648
1717
|
const { title, tag, tagOptions, onSelectTag, label, labelOptions, onSelectLabel, comfortableMeta = false, code, language, mediaTypes, selectedMediaType, onSelectMediaType, examples, selectedExampleKey, onSelectExample, languageOptions, selectedLanguageKey, onSelectLanguage, clientOptions, selectedClientKey, onSelectClient } = arg0;
|
|
1649
1718
|
const t = useBuiltInText();
|
|
1650
|
-
const metaClassName = comfortableMeta ? "flex min-h-11 min-w-0 items-center gap-2 border-y border-
|
|
1719
|
+
const metaClassName = comfortableMeta ? "flex min-h-11 min-w-0 items-center gap-2 border-y border-(--clarify-code-border) border-t-transparent bg-(--clarify-code-background) px-4 py-2" : "flex h-9 min-w-0 items-center gap-2 border-y border-(--clarify-code-border) border-t-transparent bg-(--clarify-code-background) px-4";
|
|
1651
1720
|
return /* @__PURE__ */ jsx("div", {
|
|
1652
|
-
className: "clarify-api-example my-6 overflow-hidden rounded-2xl bg-
|
|
1721
|
+
className: "clarify-api-example my-6 overflow-hidden rounded-2xl bg-(--clarify-code-background) shadow-md ring-1 ring-(--clarify-code-border)",
|
|
1653
1722
|
children: /* @__PURE__ */ jsxs("div", {
|
|
1654
1723
|
className: "not-prose",
|
|
1655
1724
|
children: [
|
|
1656
1725
|
/* @__PURE__ */ jsxs("div", {
|
|
1657
|
-
className: "clarify-api-example-header flex min-h-(--clarify-code-header-min-height) items-center gap-3 border-b border-
|
|
1726
|
+
className: "clarify-api-example-header flex min-h-(--clarify-code-header-min-height) items-center gap-3 border-b border-(--clarify-code-border) bg-(--clarify-code-header-background) px-4 py-2",
|
|
1658
1727
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
1659
|
-
className: "mr-auto min-w-16 truncate py-1 text-xs font-semibold text-
|
|
1728
|
+
className: "mr-auto min-w-16 truncate py-1 text-xs font-semibold text-(--clarify-code-text)",
|
|
1660
1729
|
children: title
|
|
1661
1730
|
}), /* @__PURE__ */ jsxs("div", {
|
|
1662
1731
|
className: "ml-auto flex min-w-0 items-center gap-2 whitespace-nowrap",
|
|
@@ -1688,18 +1757,18 @@ function ApiExampleCodeGroup(arg0) {
|
|
|
1688
1757
|
onChange: onSelectTag,
|
|
1689
1758
|
className: "clarify-api-example-status font-semibold text-emerald-400"
|
|
1690
1759
|
}) : null,
|
|
1691
|
-
tag && label ? /* @__PURE__ */ jsx("span", { className: "h-0.5 w-0.5 shrink-0 rounded-full bg-
|
|
1760
|
+
tag && label ? /* @__PURE__ */ jsx("span", { className: "h-0.5 w-0.5 shrink-0 rounded-full bg-(--clarify-code-faint)" }) : null,
|
|
1692
1761
|
label ? /* @__PURE__ */ jsx(ExampleMetaValue, {
|
|
1693
1762
|
label: t("openapi.mediaType"),
|
|
1694
1763
|
value: label,
|
|
1695
1764
|
options: labelOptions,
|
|
1696
1765
|
onChange: onSelectLabel,
|
|
1697
|
-
className: "min-w-0 truncate text-xs text-
|
|
1766
|
+
className: "min-w-0 truncate text-xs text-(--clarify-code-muted)"
|
|
1698
1767
|
}) : null
|
|
1699
1768
|
]
|
|
1700
1769
|
}) : null,
|
|
1701
1770
|
/* @__PURE__ */ jsxs("div", {
|
|
1702
|
-
className: "clarify-api-example-code group relative",
|
|
1771
|
+
className: "clarify-api-example-code group relative bg-(--clarify-code-background)",
|
|
1703
1772
|
children: [/* @__PURE__ */ jsx(CodeToolbar, {
|
|
1704
1773
|
code,
|
|
1705
1774
|
languageOptions,
|
|
@@ -1709,7 +1778,7 @@ function ApiExampleCodeGroup(arg0) {
|
|
|
1709
1778
|
selectedClientKey,
|
|
1710
1779
|
onSelectClient
|
|
1711
1780
|
}), /* @__PURE__ */ jsx("pre", {
|
|
1712
|
-
className: `max-h-128 overflow-auto overscroll-contain p-4 text-xs text-
|
|
1781
|
+
className: `max-h-128 overflow-auto overscroll-contain p-4 text-xs text-(--clarify-code-text) ${languageOptions && languageOptions.length > 1 ? "pt-14" : ""}`,
|
|
1713
1782
|
children: /* @__PURE__ */ jsx("code", {
|
|
1714
1783
|
className: `language-${language}`,
|
|
1715
1784
|
children: code
|
|
@@ -2153,7 +2222,7 @@ function ServerUrlValue(arg0) {
|
|
|
2153
2222
|
"aria-expanded": open,
|
|
2154
2223
|
"aria-label": "Server",
|
|
2155
2224
|
onClick: onToggle,
|
|
2156
|
-
className: clsx("flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-(--clarify-ui-subtle-background) text-(--clarify-ui-text-
|
|
2225
|
+
className: clsx("flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-(--clarify-ui-subtle-background) text-(--clarify-ui-text-foreground) transition hover:bg-(--clarify-ui-hover-background) hover:text-(--clarify-theme-tokens-colors-foreground) sm:w-auto sm:min-w-16 sm:max-w-(--clarify-server-url-max-width) sm:px-1.5", open ? "bg-(--clarify-ui-active-background) text-(--clarify-theme-tokens-colors-foreground)" : null),
|
|
2157
2226
|
children: [/* @__PURE__ */ jsx("span", {
|
|
2158
2227
|
className: "sm:hidden",
|
|
2159
2228
|
children: /* @__PURE__ */ jsx(ServerIcon, {
|
|
@@ -2163,7 +2232,7 @@ function ServerUrlValue(arg0) {
|
|
|
2163
2232
|
}), /* @__PURE__ */ jsxs("span", {
|
|
2164
2233
|
className: "hidden min-w-0 items-center gap-1 overflow-hidden sm:flex",
|
|
2165
2234
|
children: [/* @__PURE__ */ jsx("span", {
|
|
2166
|
-
className: "truncate text-xs",
|
|
2235
|
+
className: "truncate font-semibold text-xs",
|
|
2167
2236
|
children: url
|
|
2168
2237
|
}), /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
2169
2238
|
className: "h-3.5 w-3.5 shrink-0 text-zinc-400",
|
|
@@ -2468,6 +2537,6 @@ function OpenApiOperation(arg0) {
|
|
|
2468
2537
|
});
|
|
2469
2538
|
}
|
|
2470
2539
|
//#endregion
|
|
2471
|
-
export {
|
|
2540
|
+
export { Code as C, CardGroup as D, Card as E, Callout as O, Collapse as S, Pre as T, HeroPattern as _, authPlaceholder as a, Tag as b, getServerKey as c, getRequestBody$1 as d, Markdown as f, GridPattern as g, Prose as h, ResponseExamplesPanel as i, Button as k, getServers as l, WebFrame as m, OpenApiOperation as n, defaultServerVariables as o, primitives_exports as p, RequestExamplesPanel as r, getAuthOptions as s, EndpointIdentity as t, getMediaTypeEntries as u, Logo as v, CodeGroup as w, Feedback as x, Heading as y };
|
|
2472
2541
|
|
|
2473
|
-
//# sourceMappingURL=OpenApiOperation-
|
|
2542
|
+
//# sourceMappingURL=OpenApiOperation-LIL7bqxW.js.map
|