@clarify-labs/renderer 0.11.1 → 0.11.2
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-C2XnkFQ6.cjs → ClarifyShell-Cn48irqj.cjs} +3 -3
- package/output/{ClarifyShell-C2XnkFQ6.cjs.map → ClarifyShell-Cn48irqj.cjs.map} +1 -1
- package/output/{ClarifyShell-CwRtof1h.js → ClarifyShell-D_HluctW.js} +3 -3
- package/output/{ClarifyShell-CwRtof1h.js.map → ClarifyShell-D_HluctW.js.map} +1 -1
- package/output/{MermaidViewer-CwkiQ2gO.js → MermaidViewer-Dby0ylNr.js} +2 -2
- package/output/{MermaidViewer-CwkiQ2gO.js.map → MermaidViewer-Dby0ylNr.js.map} +1 -1
- package/output/{MermaidViewer-CTvMCE19.cjs → MermaidViewer-EZjolX08.cjs} +2 -2
- package/output/{MermaidViewer-CTvMCE19.cjs.map → MermaidViewer-EZjolX08.cjs.map} +1 -1
- package/output/{OpenApiOperation-CFo6_otd.js → OpenApiOperation-Cr8TxLjl.js} +87 -6
- package/output/OpenApiOperation-Cr8TxLjl.js.map +1 -0
- package/output/{OpenApiOperation-D1WNrj5X.cjs → OpenApiOperation-bdALspAY.cjs} +87 -6
- package/output/OpenApiOperation-bdALspAY.cjs.map +1 -0
- package/output/{PageActions-3eo05fb_.js → PageActions-BLzCasvB.js} +3 -3
- package/output/{PageActions-3eo05fb_.js.map → PageActions-BLzCasvB.js.map} +1 -1
- package/output/{PageActions-Lp_NeIKr.cjs → PageActions-Bw9SAHLl.cjs} +3 -3
- package/output/{PageActions-Lp_NeIKr.cjs.map → PageActions-Bw9SAHLl.cjs.map} +1 -1
- package/output/{SearchDialog-BvCBIFqs.js → SearchDialog-DWYp1c6c.js} +3 -3
- package/output/{SearchDialog-BvCBIFqs.js.map → SearchDialog-DWYp1c6c.js.map} +1 -1
- package/output/{SearchDialog-CM9DrE2Y.cjs → SearchDialog-j_4Y9WY_.cjs} +3 -3
- package/output/{SearchDialog-CM9DrE2Y.cjs.map → SearchDialog-j_4Y9WY_.cjs.map} +1 -1
- package/output/client.cjs +3 -3
- package/output/client.js +3 -3
- package/output/core/i18n.d.ts +1 -1
- package/output/{i18n-BxXpRSFX.js → i18n-DjRcGSuU.js} +15 -1
- package/output/i18n-DjRcGSuU.js.map +1 -0
- package/output/{i18n-DsjZ51U1.cjs → i18n-L1XX-y6M.cjs} +15 -1
- package/output/i18n-L1XX-y6M.cjs.map +1 -0
- package/output/index.cjs +5 -5
- package/output/index.js +5 -5
- package/output/openapi/components/EndpointSections.d.ts +2 -0
- package/output/openapi/components/OpenApiAuthDocumentation.d.ts +7 -0
- package/output/openapi/components/helpers.d.ts +1 -0
- package/output/openapi/types.d.ts +1 -0
- package/output/preview.cjs +3 -3
- package/output/preview.js +3 -3
- package/output/{render-vlp3hwW3.js → render-CYQmEacg.js} +2 -2
- package/output/{render-vlp3hwW3.js.map → render-CYQmEacg.js.map} +1 -1
- package/output/{render-CKG4X-me.cjs → render-hq20DPxe.cjs} +2 -2
- package/output/{render-CKG4X-me.cjs.map → render-hq20DPxe.cjs.map} +1 -1
- package/output/renderer.css +16 -0
- package/output/server.cjs +2 -2
- package/output/server.js +2 -2
- package/package.json +1 -1
- package/output/OpenApiOperation-CFo6_otd.js.map +0 -1
- package/output/OpenApiOperation-D1WNrj5X.cjs.map +0 -1
- package/output/i18n-BxXpRSFX.js.map +0 -1
- package/output/i18n-DsjZ51U1.cjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as useBuiltInText } from "./i18n-
|
|
1
|
+
import { t as useBuiltInText } from "./i18n-DjRcGSuU.js";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import { useRef, useState } from "react";
|
|
4
4
|
import { Maximize2, ZoomIn, ZoomOut } from "lucide-react";
|
|
@@ -95,4 +95,4 @@ function MermaidViewer(arg0) {
|
|
|
95
95
|
//#endregion
|
|
96
96
|
export { MermaidViewer, MermaidViewer as default };
|
|
97
97
|
|
|
98
|
-
//# sourceMappingURL=MermaidViewer-
|
|
98
|
+
//# sourceMappingURL=MermaidViewer-Dby0ylNr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MermaidViewer-
|
|
1
|
+
{"version":3,"file":"MermaidViewer-Dby0ylNr.js","names":[],"sources":["../source/components/MermaidViewer.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport { Maximize2, ZoomIn, ZoomOut } from 'lucide-react'\nimport { useRef, useState, type ReactNode } from 'react'\nimport { TransformComponent, TransformWrapper, useControls } from 'react-zoom-pan-pinch'\n\nimport { useBuiltInText } from '../core/i18n'\n\ntype MermaidViewerProps = {\n svg: string\n className?: string\n}\n\nfunction ZoomControls(): ReactNode {\n const { zoomIn, zoomOut, resetTransform } = useControls()\n const t = useBuiltInText()\n\n const buttonClassName = 'flex h-7 w-7 items-center justify-center rounded-md bg-(--clarify-theme-tokens-colors-surface) text-(--clarify-ui-text-soft) shadow-xs ring-1 ring-(--clarify-theme-tokens-colors-border) transition hover:bg-(--clarify-ui-hover-background) hover:text-(--clarify-theme-tokens-colors-foreground)'\n\n return (\n <div className=\"clarify-mermaid-controls absolute top-2 right-2 z-10 flex gap-1 opacity-0 transition group-hover:opacity-100 focus-within:opacity-100\">\n <button type=\"button\" aria-label={t('mermaid.zoomIn')} title={t('mermaid.zoomIn')} onClick={() => zoomIn()} className={buttonClassName}>\n <ZoomIn className=\"h-4 w-4\" aria-hidden=\"true\" />\n </button>\n <button type=\"button\" aria-label={t('mermaid.zoomOut')} title={t('mermaid.zoomOut')} onClick={() => zoomOut()} className={buttonClassName}>\n <ZoomOut className=\"h-4 w-4\" aria-hidden=\"true\" />\n </button>\n <button type=\"button\" aria-label={t('mermaid.resetZoom')} title={t('mermaid.resetZoom')} onClick={() => resetTransform()} className={buttonClassName}>\n <Maximize2 className=\"h-4 w-4\" aria-hidden=\"true\" />\n </button>\n </div>\n )\n}\n\nexport function MermaidViewer(arg0: MermaidViewerProps): ReactNode {\n const { svg, className } = arg0\n\n const t = useBuiltInText()\n const containerRef = useRef<HTMLDivElement>(null)\n const [focused, setFocused] = useState(false)\n\n return (\n <div\n ref={containerRef}\n tabIndex={0}\n role=\"group\"\n onPointerDown={() => containerRef.current?.focus()}\n onFocus={() => setFocused(true)}\n onBlur={() => setFocused(false)}\n className={clsx('clarify-mermaid group not-prose relative my-6 overflow-hidden rounded-2xl border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) outline-none focus-visible:ring-2 focus-visible:ring-(--clarify-theme-tokens-colors-primary)', className)}\n >\n <TransformWrapper\n minScale={0.5}\n maxScale={8}\n initialScale={1}\n centerOnInit\n smooth\n wheel={{ step: 0.05, wheelDisabled: !focused, touchPadDisabled: !focused }}\n doubleClick={{ mode: 'reset' }}\n >\n <ZoomControls />\n <TransformComponent\n wrapperClass=\"!w-full !cursor-grab active:!cursor-grabbing\"\n contentClass=\"!w-full justify-center [&_svg]:h-auto [&_svg]:max-w-full\"\n wrapperStyle={{ height: 'min(70vh, 32rem)' }}\n >\n <div className=\"flex h-full w-full items-center justify-center p-4\" dangerouslySetInnerHTML={{ __html: svg }} />\n </TransformComponent>\n <p\n className={clsx(\n 'clarify-mermaid-hint pointer-events-none absolute bottom-2 left-1/2 z-10 -translate-x-1/2 rounded-full bg-(--clarify-theme-tokens-colors-surface)/90 px-2.5 py-1 text-2xs text-(--clarify-ui-text-soft) shadow-xs ring-1 ring-(--clarify-theme-tokens-colors-border) backdrop-blur-sm transition',\n focused ? 'opacity-0' : 'opacity-0 group-hover:opacity-100',\n )}\n >\n {t('mermaid.scrollHint')}\n </p>\n </TransformWrapper>\n </div>\n )\n}\n\nexport default MermaidViewer\n"],"mappings":";;;;;;;AAYA,SAAS,eAA0B;CACjC,MAAM,EAAE,QAAQ,SAAS,mBAAmB,YAAY;CACxD,MAAM,IAAI,eAAe;CAEzB,MAAM,kBAAkB;CAExB,OACE,qBAAC,OAAD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MAAqD,yBAAyB,EAAE,QAAQ,IAAI;KAAI,CAAA;IAC7F,CAAA;IACpB,oBAAC,KAAD;KACE,WAAW,KACT,oSACA,UAAU,cAAc,mCAC1B;eAEC,EAAE,oBAAoB;IACtB,CAAA;GACa;;CACf,CAAA;AAET"}
|
|
@@ -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-L1XX-y6M.cjs");
|
|
3
3
|
let clsx = require("clsx");
|
|
4
4
|
clsx = require_rolldown_runtime.__toESM(clsx, 1);
|
|
5
5
|
let react = require("react");
|
|
@@ -98,4 +98,4 @@ function MermaidViewer(arg0) {
|
|
|
98
98
|
exports.MermaidViewer = MermaidViewer;
|
|
99
99
|
exports.default = MermaidViewer;
|
|
100
100
|
|
|
101
|
-
//# sourceMappingURL=MermaidViewer-
|
|
101
|
+
//# sourceMappingURL=MermaidViewer-EZjolX08.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MermaidViewer-
|
|
1
|
+
{"version":3,"file":"MermaidViewer-EZjolX08.cjs","names":[],"sources":["../source/components/MermaidViewer.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport { Maximize2, ZoomIn, ZoomOut } from 'lucide-react'\nimport { useRef, useState, type ReactNode } from 'react'\nimport { TransformComponent, TransformWrapper, useControls } from 'react-zoom-pan-pinch'\n\nimport { useBuiltInText } from '../core/i18n'\n\ntype MermaidViewerProps = {\n svg: string\n className?: string\n}\n\nfunction ZoomControls(): ReactNode {\n const { zoomIn, zoomOut, resetTransform } = useControls()\n const t = useBuiltInText()\n\n const buttonClassName = 'flex h-7 w-7 items-center justify-center rounded-md bg-(--clarify-theme-tokens-colors-surface) text-(--clarify-ui-text-soft) shadow-xs ring-1 ring-(--clarify-theme-tokens-colors-border) transition hover:bg-(--clarify-ui-hover-background) hover:text-(--clarify-theme-tokens-colors-foreground)'\n\n return (\n <div className=\"clarify-mermaid-controls absolute top-2 right-2 z-10 flex gap-1 opacity-0 transition group-hover:opacity-100 focus-within:opacity-100\">\n <button type=\"button\" aria-label={t('mermaid.zoomIn')} title={t('mermaid.zoomIn')} onClick={() => zoomIn()} className={buttonClassName}>\n <ZoomIn className=\"h-4 w-4\" aria-hidden=\"true\" />\n </button>\n <button type=\"button\" aria-label={t('mermaid.zoomOut')} title={t('mermaid.zoomOut')} onClick={() => zoomOut()} className={buttonClassName}>\n <ZoomOut className=\"h-4 w-4\" aria-hidden=\"true\" />\n </button>\n <button type=\"button\" aria-label={t('mermaid.resetZoom')} title={t('mermaid.resetZoom')} onClick={() => resetTransform()} className={buttonClassName}>\n <Maximize2 className=\"h-4 w-4\" aria-hidden=\"true\" />\n </button>\n </div>\n )\n}\n\nexport function MermaidViewer(arg0: MermaidViewerProps): ReactNode {\n const { svg, className } = arg0\n\n const t = useBuiltInText()\n const containerRef = useRef<HTMLDivElement>(null)\n const [focused, setFocused] = useState(false)\n\n return (\n <div\n ref={containerRef}\n tabIndex={0}\n role=\"group\"\n onPointerDown={() => containerRef.current?.focus()}\n onFocus={() => setFocused(true)}\n onBlur={() => setFocused(false)}\n className={clsx('clarify-mermaid group not-prose relative my-6 overflow-hidden rounded-2xl border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) outline-none focus-visible:ring-2 focus-visible:ring-(--clarify-theme-tokens-colors-primary)', className)}\n >\n <TransformWrapper\n minScale={0.5}\n maxScale={8}\n initialScale={1}\n centerOnInit\n smooth\n wheel={{ step: 0.05, wheelDisabled: !focused, touchPadDisabled: !focused }}\n doubleClick={{ mode: 'reset' }}\n >\n <ZoomControls />\n <TransformComponent\n wrapperClass=\"!w-full !cursor-grab active:!cursor-grabbing\"\n contentClass=\"!w-full justify-center [&_svg]:h-auto [&_svg]:max-w-full\"\n wrapperStyle={{ height: 'min(70vh, 32rem)' }}\n >\n <div className=\"flex h-full w-full items-center justify-center p-4\" dangerouslySetInnerHTML={{ __html: svg }} />\n </TransformComponent>\n <p\n className={clsx(\n 'clarify-mermaid-hint pointer-events-none absolute bottom-2 left-1/2 z-10 -translate-x-1/2 rounded-full bg-(--clarify-theme-tokens-colors-surface)/90 px-2.5 py-1 text-2xs text-(--clarify-ui-text-soft) shadow-xs ring-1 ring-(--clarify-theme-tokens-colors-border) backdrop-blur-sm transition',\n focused ? 'opacity-0' : 'opacity-0 group-hover:opacity-100',\n )}\n >\n {t('mermaid.scrollHint')}\n </p>\n </TransformWrapper>\n </div>\n )\n}\n\nexport default MermaidViewer\n"],"mappings":";;;;;;;;;AAYA,SAAS,eAA0B;CACjC,MAAM,EAAE,QAAQ,SAAS,oBAAA,GAAA,qBAAA,YAAA,CAA+B;CACxD,MAAM,IAAI,aAAA,eAAe;CAEzB,MAAM,kBAAkB;CAExB,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAU;YAAf;GACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;IAAQ,MAAK;IAAS,cAAY,EAAE,gBAAgB;IAAG,OAAO,EAAE,gBAAgB;IAAG,eAAe,OAAO;IAAG,WAAW;cACrH,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,QAAD;KAAQ,WAAU;KAAU,eAAY;IAAQ,CAAA;GAC1C,CAAA;GACR,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;IAAQ,MAAK;IAAS,cAAY,EAAE,iBAAiB;IAAG,OAAO,EAAE,iBAAiB;IAAG,eAAe,QAAQ;IAAG,WAAW;cACxH,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAA,SAAD;KAAS,WAAU;KAAU,eAAY;IAAQ,CAAA;GAC3C,CAAA;GACR,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;IAAQ,MAAK;IAAS,cAAY,EAAE,mBAAmB;IAAG,OAAO,EAAE,mBAAmB;IAAG,eAAe,eAAe;IAAG,WAAW;cACnI,iBAAA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as useBuiltInText } from "./i18n-
|
|
2
|
-
import { C as isExternalHref, E as copyTextToClipboard, c as lucideIconRegistry, h as useTheme, l as resolveLucideIconName, n as PageTitleActions, o as useSectionStore, s as remToPx, w as localizeHref } from "./PageActions-
|
|
1
|
+
import { a as useConfig, s as useLocale, t as useBuiltInText } from "./i18n-DjRcGSuU.js";
|
|
2
|
+
import { C as isExternalHref, E as copyTextToClipboard, c as lucideIconRegistry, h as useTheme, l as resolveLucideIconName, n as PageTitleActions, o as useSectionStore, s as remToPx, w as localizeHref } from "./PageActions-BLzCasvB.js";
|
|
3
3
|
import { t as markdownRemarkPlugins } from "./remark-C9iRQM0R.js";
|
|
4
4
|
import clsx from "clsx";
|
|
5
5
|
import { Children, Suspense, cloneElement, createContext, createElement, forwardRef, isValidElement, lazy, useContext, useEffect, useId, useLayoutEffect, useRef, useState } from "react";
|
|
@@ -253,7 +253,7 @@ function Card(arg0) {
|
|
|
253
253
|
}
|
|
254
254
|
//#endregion
|
|
255
255
|
//#region source/components/Mermaid.tsx
|
|
256
|
-
var MermaidViewer = lazy(() => import("./MermaidViewer-
|
|
256
|
+
var MermaidViewer = lazy(() => import("./MermaidViewer-Dby0ylNr.js"));
|
|
257
257
|
var mermaidModulePromise;
|
|
258
258
|
async function loadMermaid() {
|
|
259
259
|
mermaidModulePromise = mermaidModulePromise ?? import("mermaid").then((module) => module.default);
|
|
@@ -2408,7 +2408,8 @@ function getAuthOptions(spec, operation) {
|
|
|
2408
2408
|
return getSecurityRequirements(spec, operation).map((requirement, index) => {
|
|
2409
2409
|
const requirementSchemes = Object.keys(requirement).map((name) => ({
|
|
2410
2410
|
name,
|
|
2411
|
-
scheme: schemes[name]
|
|
2411
|
+
scheme: schemes[name],
|
|
2412
|
+
scopes: requirement[name] ?? []
|
|
2412
2413
|
})).filter((option) => Boolean(option.scheme));
|
|
2413
2414
|
return {
|
|
2414
2415
|
key: `requirement:${index}`,
|
|
@@ -2715,6 +2716,84 @@ function ResponseExamplesPanel(arg0) {
|
|
|
2715
2716
|
});
|
|
2716
2717
|
}
|
|
2717
2718
|
//#endregion
|
|
2719
|
+
//#region source/openapi/components/OpenApiAuthDocumentation.tsx
|
|
2720
|
+
function authSchemeType(option, apiKeyLabel) {
|
|
2721
|
+
const { scheme } = option;
|
|
2722
|
+
if (scheme.type === "http") return scheme.scheme?.toUpperCase() || "HTTP";
|
|
2723
|
+
if (scheme.type === "apiKey") return apiKeyLabel;
|
|
2724
|
+
if (scheme.type === "oauth2") return "OAUTH 2.0";
|
|
2725
|
+
if (scheme.type === "openIdConnect") return "OPENID CONNECT";
|
|
2726
|
+
return scheme.type?.toUpperCase() || "AUTH";
|
|
2727
|
+
}
|
|
2728
|
+
function OpenApiAuthDocumentation({ options }) {
|
|
2729
|
+
const t = useBuiltInText();
|
|
2730
|
+
if (options.length === 0) return null;
|
|
2731
|
+
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", { children: t("openapi.authentication") }), /* @__PURE__ */ jsx("div", {
|
|
2732
|
+
className: "not-prose my-6 border-y border-(--clarify-theme-tokens-colors-border)",
|
|
2733
|
+
children: options.map((option, index) => /* @__PURE__ */ jsxs("div", { children: [index > 0 ? /* @__PURE__ */ jsxs("div", {
|
|
2734
|
+
className: "flex items-center gap-3 py-1",
|
|
2735
|
+
"aria-label": t("openapi.authOr"),
|
|
2736
|
+
children: [
|
|
2737
|
+
/* @__PURE__ */ jsx("span", { className: "h-px flex-1 bg-(--clarify-theme-tokens-colors-border)" }),
|
|
2738
|
+
/* @__PURE__ */ jsx("span", {
|
|
2739
|
+
className: "text-2xs font-semibold text-(--clarify-ui-text-faint)",
|
|
2740
|
+
children: t("openapi.authOr")
|
|
2741
|
+
}),
|
|
2742
|
+
/* @__PURE__ */ jsx("span", { className: "h-px flex-1 bg-(--clarify-theme-tokens-colors-border)" })
|
|
2743
|
+
]
|
|
2744
|
+
}) : null, option.schemes.length === 0 ? /* @__PURE__ */ jsx("div", {
|
|
2745
|
+
className: "py-4 text-sm/6 font-medium text-(--clarify-theme-tokens-colors-foreground)",
|
|
2746
|
+
children: t("openapi.authNoAuth")
|
|
2747
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
2748
|
+
className: "divide-y divide-(--clarify-theme-tokens-colors-border)",
|
|
2749
|
+
children: option.schemes.map((schemeOption, schemeIndex) => {
|
|
2750
|
+
const { scheme } = schemeOption;
|
|
2751
|
+
const details = [
|
|
2752
|
+
scheme.type === "apiKey" && scheme.in && scheme.name ? t("openapi.authLocation", {
|
|
2753
|
+
in: scheme.in,
|
|
2754
|
+
name: scheme.name
|
|
2755
|
+
}) : void 0,
|
|
2756
|
+
scheme.type === "http" && scheme.bearerFormat ? t("openapi.authBearerFormat", { format: scheme.bearerFormat }) : void 0,
|
|
2757
|
+
scheme.type === "openIdConnect" ? scheme.openIdConnectUrl : void 0,
|
|
2758
|
+
schemeOption.scopes.length > 0 ? t("openapi.authScopes", { scopes: schemeOption.scopes.join(", ") }) : void 0
|
|
2759
|
+
].filter((value) => Boolean(value));
|
|
2760
|
+
return /* @__PURE__ */ jsxs("div", { children: [schemeIndex > 0 ? /* @__PURE__ */ jsx("div", {
|
|
2761
|
+
className: "relative h-0",
|
|
2762
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
2763
|
+
className: "absolute top-0 left-4 -translate-y-1/2 bg-(--clarify-theme-tokens-colors-background) px-1.5 text-2xs font-semibold text-(--clarify-ui-text-faint)",
|
|
2764
|
+
children: t("openapi.authAnd")
|
|
2765
|
+
})
|
|
2766
|
+
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
2767
|
+
className: "py-4",
|
|
2768
|
+
children: [
|
|
2769
|
+
/* @__PURE__ */ jsxs("div", {
|
|
2770
|
+
className: "flex flex-wrap items-center gap-2",
|
|
2771
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
2772
|
+
className: "font-mono text-sm/6 font-semibold text-(--clarify-theme-tokens-colors-foreground)",
|
|
2773
|
+
children: schemeOption.name
|
|
2774
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
2775
|
+
className: "rounded bg-(--clarify-ui-subtle-background) px-1.5 py-0.5 text-2xs font-semibold text-(--clarify-ui-text-soft)",
|
|
2776
|
+
children: authSchemeType(schemeOption, t("openapi.authApiKey"))
|
|
2777
|
+
})]
|
|
2778
|
+
}),
|
|
2779
|
+
scheme.description ? /* @__PURE__ */ jsx(Markdown, {
|
|
2780
|
+
className: "mt-2 text-sm/6 text-(--clarify-ui-text-soft) *:first:mt-0 *:last:mb-0",
|
|
2781
|
+
children: scheme.description
|
|
2782
|
+
}) : null,
|
|
2783
|
+
details.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
2784
|
+
className: "mt-2 flex min-w-0 flex-wrap gap-x-4 gap-y-1 text-xs/5 text-(--clarify-ui-text-faint)",
|
|
2785
|
+
children: details.map((detail) => /* @__PURE__ */ jsx("span", {
|
|
2786
|
+
className: "min-w-0 break-all font-mono",
|
|
2787
|
+
children: detail
|
|
2788
|
+
}, detail))
|
|
2789
|
+
}) : null
|
|
2790
|
+
]
|
|
2791
|
+
})] }, schemeOption.name);
|
|
2792
|
+
})
|
|
2793
|
+
})] }, option.key))
|
|
2794
|
+
})] });
|
|
2795
|
+
}
|
|
2796
|
+
//#endregion
|
|
2718
2797
|
//#region source/openapi/components/SchemaProperties.tsx
|
|
2719
2798
|
function getEnumDescriptions(schema) {
|
|
2720
2799
|
const descriptions = schema["x-enumDescriptions"];
|
|
@@ -3104,7 +3183,7 @@ function ResponseList(arg0) {
|
|
|
3104
3183
|
//#endregion
|
|
3105
3184
|
//#region source/openapi/components/EndpointSections.tsx
|
|
3106
3185
|
function EndpointRequest(arg0) {
|
|
3107
|
-
const { spec, path, method, operationSource = "path", description, groupedParameters, parameters, requestBody, requestContents, requestSchema, selectedRequestMediaType, onSelectRequestMediaType, selectedServer, serverVariables, auth, sharedExampleKey, onSelectExampleKey } = arg0;
|
|
3186
|
+
const { spec, path, method, operationSource = "path", description, groupedParameters, parameters, requestBody, requestContents, requestSchema, selectedRequestMediaType, onSelectRequestMediaType, selectedServer, serverVariables, authOptions, auth, sharedExampleKey, onSelectExampleKey } = arg0;
|
|
3108
3187
|
const t = useBuiltInText();
|
|
3109
3188
|
const hasRequestBody = Boolean(requestBody && requestContents.length > 0);
|
|
3110
3189
|
const renderDescription = () => {
|
|
@@ -3127,6 +3206,7 @@ function EndpointRequest(arg0) {
|
|
|
3127
3206
|
children: [/* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsxs("div", {
|
|
3128
3207
|
className: "w-full",
|
|
3129
3208
|
children: [
|
|
3209
|
+
/* @__PURE__ */ jsx(OpenApiAuthDocumentation, { options: authOptions }),
|
|
3130
3210
|
/* @__PURE__ */ jsx(ParameterList, {
|
|
3131
3211
|
title: t("openapi.pathParameters"),
|
|
3132
3212
|
parameters: groupedParameters.path
|
|
@@ -5257,6 +5337,7 @@ function OpenApiOperation(arg0) {
|
|
|
5257
5337
|
onSelectRequestMediaType: requestState.setSelectedRequestMediaType,
|
|
5258
5338
|
selectedServer: serverState.selectedServer,
|
|
5259
5339
|
serverVariables: serverState.serverVariables,
|
|
5340
|
+
authOptions: authState.authOptions,
|
|
5260
5341
|
auth: authState.authInput,
|
|
5261
5342
|
sharedExampleKey: linkedExampleKey,
|
|
5262
5343
|
onSelectExampleKey: setLinkedExampleKey
|
|
@@ -5276,4 +5357,4 @@ function OpenApiOperation(arg0) {
|
|
|
5276
5357
|
//#endregion
|
|
5277
5358
|
export { Code as A, GridPattern as C, Tag as D, Heading as E, CardGroup as F, Callout as I, Button as L, Pre as M, Mermaid as N, Feedback as O, Card as P, Prose as S, Logo as T, WebFrame as _, ResponseExamplesPanel as a, Step as b, getAuthOptions as c, getOpenApiOperationEntry as d, listOpenApiOperations as f, primitives_exports as g, Markdown as h, RequestExamplesPanel as i, CodeGroup as j, Collapse as k, getServerKey as l, getRequestBody$1 as m, OpenApiOperation as n, authPlaceholder as o, getMediaTypeEntries as p, OpenApiRequestWorkbench as r, defaultServerVariables as s, EndpointIdentity as t, getServers as u, TabItem as v, HeroPattern as w, Steps as x, Tabs as y };
|
|
5278
5359
|
|
|
5279
|
-
//# sourceMappingURL=OpenApiOperation-
|
|
5360
|
+
//# sourceMappingURL=OpenApiOperation-Cr8TxLjl.js.map
|