@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,4 +1,4 @@
1
- import { t as useBuiltInText } from "./i18n-DjRcGSuU.js";
1
+ import { t as useBuiltInText } from "./i18n-sJUQQLRZ.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-Dby0ylNr.js.map
98
+ //# sourceMappingURL=MermaidViewer-D4h-WEak.js.map
@@ -1 +1 @@
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,SAA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cAAD,CAAe,CAAA;IACf,oBAAC,oBAAD;KACE,cAAa;KACb,cAAa;KACb,cAAc,EAAE,QAAQ,mBAAmB;eAE3C,oBAAC,OAAD;MAAK,WAAU;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
+ {"version":3,"file":"MermaidViewer-D4h-WEak.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,SAA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cAAD,CAAe,CAAA;IACf,oBAAC,oBAAD;KACE,cAAa;KACb,cAAa;KACb,cAAc,EAAE,QAAQ,mBAAmB;eAE3C,oBAAC,OAAD;MAAK,WAAU;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-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");
@@ -98,4 +98,4 @@ function MermaidViewer(arg0) {
98
98
  exports.MermaidViewer = MermaidViewer;
99
99
  exports.default = MermaidViewer;
100
100
 
101
- //# sourceMappingURL=MermaidViewer-EZjolX08.cjs.map
101
+ //# sourceMappingURL=MermaidViewer-kbSVqJ_z.cjs.map
@@ -1 +1 @@
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,W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","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;cACr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AAA,GAAA,kBAAA,IAAA,CAAC,cAAD,CAAe,CAAA;IACf,iBAAA,GAAA,kBAAA,IAAA,CAAC,qBAAA,oBAAD;KACE,cAAa;KACb,cAAa;KACb,cAAc,EAAE,QAAQ,mBAAmB;eAE3C,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;MAAK,WAAU;MAAqD,yBAAyB,EAAE,QAAQ,IAAI;KAAI,CAAA;IAC7F,CAAA;IACpB,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;KACE,YAAA,GAAA,KAAA,QAAA,CACE,oSACA,UAAU,cAAc,mCAC1B;eAEC,EAAE,oBAAoB;IACtB,CAAA;GACa;;CACf,CAAA;AAET"}
@@ -1,5 +1,5 @@
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";
1
+ import { a as useConfig, s as useLocale, t as useBuiltInText } from "./i18n-sJUQQLRZ.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-Bnz5Bybt.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-Dby0ylNr.js"));
256
+ var MermaidViewer = lazy(() => import("./MermaidViewer-D4h-WEak.js"));
257
257
  var mermaidModulePromise;
258
258
  async function loadMermaid() {
259
259
  mermaidModulePromise = mermaidModulePromise ?? import("mermaid").then((module) => module.default);
@@ -1014,7 +1014,7 @@ function TabItem(_props) {
1014
1014
  return null;
1015
1015
  }
1016
1016
  function Tabs(arg0) {
1017
- const { items, children, defaultValue, selectedIndex, onChange, className, listClassName, panelsClassName } = arg0;
1017
+ const { items, children, defaultValue, selectedIndex, onChange, className, spacingClassName = "my-6", listClassName, panelsClassName, actions, variant = "content" } = arg0;
1018
1018
  const childItems = Children.toArray(children).filter((child) => isValidElement(child) && child.type === TabItem).map((child, index) => ({
1019
1019
  id: child.props.value ?? `tab-${index}`,
1020
1020
  label: child.props.title,
@@ -1031,23 +1031,26 @@ function Tabs(arg0) {
1031
1031
  return /* @__PURE__ */ jsxs(TabGroup, {
1032
1032
  selectedIndex: resolvedIndex,
1033
1033
  onChange: handleChange,
1034
- className: clsx("clarify-tabs my-6", className),
1035
- children: [/* @__PURE__ */ jsx(TabList, {
1036
- className: clsx("flex max-w-full items-stretch gap-1 overflow-x-auto border-b border-(--clarify-theme-tokens-colors-border)", listClassName),
1037
- children: resolvedItems.map((item) => /* @__PURE__ */ jsx(Tab, {
1038
- className: ({ selected }) => clsx("clarify-content-tab clarify-ui-tab relative my-1 inline-flex h-9 shrink-0 items-center rounded-(--clarify-theme-tokens-radius-md) px-2.5 transition focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--clarify-theme-tokens-colors-primary)", selected && "clarify-ui-tab-active"),
1034
+ className: clsx("clarify-tabs", spacingClassName, className),
1035
+ children: [/* @__PURE__ */ jsxs(TabList, {
1036
+ className: clsx("flex max-w-full items-stretch overflow-x-auto border-b", variant === "content" ? "gap-1 border-(--clarify-theme-tokens-colors-border)" : "h-10 gap-0 border-(--clarify-code-border) px-3", listClassName),
1037
+ children: [resolvedItems.map((item) => /* @__PURE__ */ jsx(Tab, {
1038
+ className: ({ selected }) => clsx("relative inline-flex shrink-0 items-center px-2.5 transition focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-(--clarify-theme-tokens-colors-primary)", variant === "content" ? "clarify-content-tab clarify-ui-tab my-1 h-9 rounded-(--clarify-theme-tokens-radius-md)" : "text-2xs font-semibold", selected && (variant === "content" ? "clarify-ui-tab-active" : "text-(--clarify-code-text)"), variant === "code" && !selected && "text-(--clarify-code-muted)"),
1039
1039
  children: ({ selected }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", { children: item.label }), selected ? /* @__PURE__ */ jsx(motion.span, {
1040
1040
  layoutId: indicatorLayoutId,
1041
- className: "absolute inset-x-2.5 -bottom-1 h-0.5 rounded-full bg-(--clarify-ui-tab-indicator)",
1041
+ className: clsx("absolute inset-x-2.5 h-0.5 bg-(--clarify-ui-tab-indicator)", variant === "content" ? "-bottom-1 rounded-full" : "-bottom-px"),
1042
1042
  transition: {
1043
1043
  type: "tween",
1044
1044
  duration: .16,
1045
1045
  ease: "easeOut"
1046
1046
  }
1047
1047
  }) : null] })
1048
- }, item.id))
1048
+ }, item.id)), actions ? /* @__PURE__ */ jsx("div", {
1049
+ className: "sticky right-0 ml-auto flex shrink-0 items-center bg-(--clarify-code-background)",
1050
+ children: actions
1051
+ }) : null]
1049
1052
  }), /* @__PURE__ */ jsx(TabPanels, {
1050
- className: clsx("mt-5", panelsClassName),
1053
+ className: panelsClassName ?? "mt-5",
1051
1054
  children: resolvedItems.map((item) => /* @__PURE__ */ jsx(TabPanel, {
1052
1055
  className: "focus:outline-none focus-visible:ring-2 focus-visible:ring-(--clarify-theme-tokens-colors-primary)",
1053
1056
  children: item.panel
@@ -1338,9 +1341,9 @@ function Col(arg0) {
1338
1341
  });
1339
1342
  }
1340
1343
  function Properties(arg0) {
1341
- const { children } = arg0;
1344
+ const { children, className, spacingClassName = "my-6" } = arg0;
1342
1345
  return /* @__PURE__ */ jsx("div", {
1343
- className: "clarify-properties my-6",
1346
+ className: clsx("clarify-properties", spacingClassName, className),
1344
1347
  children: /* @__PURE__ */ jsx("ul", {
1345
1348
  role: "list",
1346
1349
  className: "m-0 list-none divide-y divide-(--clarify-theme-tokens-colors-border) p-0",
@@ -2716,6 +2719,25 @@ function ResponseExamplesPanel(arg0) {
2716
2719
  });
2717
2720
  }
2718
2721
  //#endregion
2722
+ //#region source/openapi/components/OpenApiDocumentSection.tsx
2723
+ function OpenApiDocumentSection(props) {
2724
+ const { title, children, className, bodyClassName, level = 3 } = props;
2725
+ const heading = level === 3 ? /* @__PURE__ */ jsx("h3", {
2726
+ className: "!m-0 text-sm/6 font-semibold text-(--clarify-theme-tokens-colors-foreground)",
2727
+ children: title
2728
+ }) : /* @__PURE__ */ jsx("h4", {
2729
+ className: "!m-0 text-xs/5 font-semibold text-(--clarify-ui-text-soft)",
2730
+ children: title
2731
+ });
2732
+ return /* @__PURE__ */ jsxs("section", {
2733
+ className: clsx("clarify-openapi-document-section", className),
2734
+ children: [heading, /* @__PURE__ */ jsx("div", {
2735
+ className: clsx("mt-2", bodyClassName),
2736
+ children
2737
+ })]
2738
+ });
2739
+ }
2740
+ //#endregion
2719
2741
  //#region source/openapi/components/OpenApiAuthDocumentation.tsx
2720
2742
  function authSchemeType(option, apiKeyLabel) {
2721
2743
  const { scheme } = option;
@@ -2725,73 +2747,73 @@ function authSchemeType(option, apiKeyLabel) {
2725
2747
  if (scheme.type === "openIdConnect") return "OPENID CONNECT";
2726
2748
  return scheme.type?.toUpperCase() || "AUTH";
2727
2749
  }
2728
- function OpenApiAuthDocumentation({ options }) {
2750
+ function OpenApiAuthDocumentation(props) {
2751
+ const { options } = props;
2729
2752
  const t = useBuiltInText();
2730
2753
  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
- })] });
2754
+ const renderOption = (option) => option.schemes.length === 0 ? /* @__PURE__ */ jsx("div", {
2755
+ className: "border-b border-(--clarify-theme-tokens-colors-border) pt-2 pb-4 text-sm/6 font-medium text-(--clarify-theme-tokens-colors-foreground)",
2756
+ children: t("openapi.authNoAuth")
2757
+ }) : /* @__PURE__ */ jsx("div", {
2758
+ className: "divide-y divide-(--clarify-theme-tokens-colors-border) border-b border-(--clarify-theme-tokens-colors-border)",
2759
+ children: option.schemes.map((schemeOption, schemeIndex) => {
2760
+ const { scheme } = schemeOption;
2761
+ const details = [
2762
+ scheme.type === "apiKey" && scheme.in && scheme.name ? t("openapi.authLocation", {
2763
+ in: scheme.in,
2764
+ name: scheme.name
2765
+ }) : void 0,
2766
+ scheme.type === "http" && scheme.bearerFormat ? t("openapi.authBearerFormat", { format: scheme.bearerFormat }) : void 0,
2767
+ scheme.type === "openIdConnect" ? scheme.openIdConnectUrl : void 0,
2768
+ schemeOption.scopes.length > 0 ? t("openapi.authScopes", { scopes: schemeOption.scopes.join(", ") }) : void 0
2769
+ ].filter((value) => Boolean(value));
2770
+ return /* @__PURE__ */ jsxs("div", { children: [schemeIndex > 0 ? /* @__PURE__ */ jsx("div", {
2771
+ className: "relative h-0",
2772
+ children: /* @__PURE__ */ jsx("span", {
2773
+ 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)",
2774
+ children: t("openapi.authAnd")
2775
+ })
2776
+ }) : null, /* @__PURE__ */ jsxs("div", {
2777
+ className: "py-4 first:pt-2",
2778
+ children: [
2779
+ /* @__PURE__ */ jsxs("div", {
2780
+ className: "flex flex-wrap items-center gap-2",
2781
+ children: [/* @__PURE__ */ jsx("span", {
2782
+ className: "font-mono text-sm/6 font-semibold text-(--clarify-theme-tokens-colors-foreground)",
2783
+ children: schemeOption.name
2784
+ }), /* @__PURE__ */ jsx("span", {
2785
+ className: "rounded bg-(--clarify-ui-subtle-background) px-1.5 py-0.5 text-2xs font-semibold text-(--clarify-ui-text-soft)",
2786
+ children: authSchemeType(schemeOption, t("openapi.authApiKey"))
2787
+ })]
2788
+ }),
2789
+ scheme.description ? /* @__PURE__ */ jsx(Markdown, {
2790
+ className: "mt-2 text-sm/6 text-(--clarify-ui-text-soft) *:first:mt-0 *:last:mb-0",
2791
+ children: scheme.description
2792
+ }) : null,
2793
+ details.length > 0 ? /* @__PURE__ */ jsx("div", {
2794
+ className: "mt-2 flex min-w-0 flex-wrap gap-x-4 gap-y-1 text-xs/5 text-(--clarify-ui-text-faint)",
2795
+ children: details.map((detail) => /* @__PURE__ */ jsx("span", {
2796
+ className: "min-w-0 break-all font-mono",
2797
+ children: detail
2798
+ }, detail))
2799
+ }) : null
2800
+ ]
2801
+ })] }, schemeOption.name);
2802
+ })
2803
+ });
2804
+ return /* @__PURE__ */ jsx(OpenApiDocumentSection, {
2805
+ title: t("openapi.authentication"),
2806
+ bodyClassName: "not-prose",
2807
+ children: options.length === 1 ? renderOption(options[0]) : /* @__PURE__ */ jsx(Tabs, {
2808
+ items: options.map((option) => ({
2809
+ id: option.key,
2810
+ label: option.label || t("openapi.none"),
2811
+ panel: renderOption(option)
2812
+ })),
2813
+ spacingClassName: "m-0",
2814
+ panelsClassName: "mt-2"
2815
+ })
2816
+ });
2795
2817
  }
2796
2818
  //#endregion
2797
2819
  //#region source/openapi/components/SchemaProperties.tsx
@@ -3090,23 +3112,32 @@ function SchemaProperties(arg0) {
3090
3112
  const { title, schema, spec, defaultExpanded } = arg0;
3091
3113
  const root = getRootSchemaNode(spec, schema, defaultExpanded);
3092
3114
  if (!root || root.children.length === 0) return null;
3093
- return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", { children: title }), /* @__PURE__ */ jsx("div", {
3094
- className: "clarify-schema-properties not-prose my-6",
3115
+ return /* @__PURE__ */ jsx(OpenApiDocumentSection, {
3116
+ title,
3117
+ level: 4,
3118
+ bodyClassName: "clarify-schema-properties not-prose",
3095
3119
  children: /* @__PURE__ */ jsx(SchemaTree, { nodes: root.children })
3096
- })] });
3120
+ });
3097
3121
  }
3098
3122
  function ParameterList(arg0) {
3099
3123
  const t = useBuiltInText();
3100
3124
  const { title, parameters } = arg0;
3101
3125
  if (parameters.length === 0) return null;
3102
- return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", { children: title }), /* @__PURE__ */ jsx(Properties, { children: parameters.map((parameter) => /* @__PURE__ */ jsx(Property, {
3103
- name: parameter.name ?? t("openapi.parameter"),
3104
- type: [schemaToType(parameter.schema), parameter.required ? t("openapi.requiredBadge") : void 0].filter(Boolean).join(", ") || void 0,
3105
- children: parameter.description ? /* @__PURE__ */ jsx(Markdown, {
3106
- className: "*:first:mt-0 *:last:mb-0",
3107
- children: parameter.description
3108
- }) : t("openapi.operationParameter")
3109
- }, `${parameter.in}-${parameter.name}`)) })] });
3126
+ return /* @__PURE__ */ jsx(OpenApiDocumentSection, {
3127
+ title,
3128
+ bodyClassName: "not-prose",
3129
+ children: /* @__PURE__ */ jsx(Properties, {
3130
+ spacingClassName: "m-0",
3131
+ children: parameters.map((parameter) => /* @__PURE__ */ jsx(Property, {
3132
+ name: parameter.name ?? t("openapi.parameter"),
3133
+ type: [schemaToType(parameter.schema), parameter.required ? t("openapi.requiredBadge") : void 0].filter(Boolean).join(", ") || void 0,
3134
+ children: parameter.description ? /* @__PURE__ */ jsx(Markdown, {
3135
+ className: "*:first:mt-0 *:last:mb-0",
3136
+ children: parameter.description
3137
+ }) : t("openapi.operationParameter")
3138
+ }, `${parameter.in}-${parameter.name}`))
3139
+ })
3140
+ });
3110
3141
  }
3111
3142
  function ResponseList(arg0) {
3112
3143
  const { title, operation, spec, selectedStatus, onSelectStatus } = arg0;
@@ -3146,7 +3177,7 @@ function ResponseList(arg0) {
3146
3177
  }) : `${t("openapi.response")}.`
3147
3178
  }),
3148
3179
  responseSchema && spec ? /* @__PURE__ */ jsx("div", {
3149
- className: "mt-4",
3180
+ className: "mt-6",
3150
3181
  children: /* @__PURE__ */ jsx(SchemaProperties, {
3151
3182
  title: t("openapi.responseBodyProperties"),
3152
3183
  schema: responseSchema,
@@ -3158,27 +3189,34 @@ function ResponseList(arg0) {
3158
3189
  };
3159
3190
  if (orderedResponses.length === 1) {
3160
3191
  const [{ status, response }] = orderedResponses;
3161
- return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", { children: title ?? t("openapi.responses") }), renderResponsePanel({
3162
- status,
3163
- response
3164
- })] });
3165
- }
3166
- return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", { children: title ?? t("openapi.responses") }), /* @__PURE__ */ jsx(Tabs, {
3167
- selectedIndex,
3168
- onChange: (index) => {
3169
- onSelectStatus?.(orderedResponses[index]?.status ?? "");
3170
- },
3171
- items: orderedResponses.map(({ status, response }) => ({
3172
- id: status,
3173
- label: status,
3174
- panel: renderResponsePanel({
3192
+ return /* @__PURE__ */ jsx(OpenApiDocumentSection, {
3193
+ title: title ?? t("openapi.responses"),
3194
+ children: renderResponsePanel({
3175
3195
  status,
3176
3196
  response
3177
3197
  })
3178
- })),
3179
- className: "mt-4 mb-6",
3180
- panelsClassName: "mt-5"
3181
- })] });
3198
+ });
3199
+ }
3200
+ return /* @__PURE__ */ jsx(OpenApiDocumentSection, {
3201
+ title: title ?? t("openapi.responses"),
3202
+ bodyClassName: "not-prose",
3203
+ children: /* @__PURE__ */ jsx(Tabs, {
3204
+ selectedIndex,
3205
+ onChange: (index) => {
3206
+ onSelectStatus?.(orderedResponses[index]?.status ?? "");
3207
+ },
3208
+ items: orderedResponses.map(({ status, response }) => ({
3209
+ id: status,
3210
+ label: status,
3211
+ panel: renderResponsePanel({
3212
+ status,
3213
+ response
3214
+ })
3215
+ })),
3216
+ spacingClassName: "m-0",
3217
+ panelsClassName: "mt-2"
3218
+ })
3219
+ });
3182
3220
  }
3183
3221
  //#endregion
3184
3222
  //#region source/openapi/components/EndpointSections.tsx
@@ -3204,7 +3242,7 @@ function EndpointRequest(arg0) {
3204
3242
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [renderDescription(), /* @__PURE__ */ jsxs(Row, {
3205
3243
  className: "clarify-openapi-request-workspace relative mt-8 pt-6",
3206
3244
  children: [/* @__PURE__ */ jsx(Col, { children: /* @__PURE__ */ jsxs("div", {
3207
- className: "w-full",
3245
+ className: "flex w-full flex-col gap-6",
3208
3246
  children: [
3209
3247
  /* @__PURE__ */ jsx(OpenApiAuthDocumentation, { options: authOptions }),
3210
3248
  /* @__PURE__ */ jsx(ParameterList, {
@@ -3219,7 +3257,10 @@ function EndpointRequest(arg0) {
3219
3257
  title: t("openapi.headers"),
3220
3258
  parameters: groupedParameters.header
3221
3259
  }),
3222
- /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", { children: t("openapi.requestBody") }), renderRequestBody()] })
3260
+ /* @__PURE__ */ jsx(OpenApiDocumentSection, {
3261
+ title: t("openapi.requestBody"),
3262
+ children: renderRequestBody()
3263
+ })
3223
3264
  ]
3224
3265
  }) }), /* @__PURE__ */ jsx(Col, {
3225
3266
  sticky: true,
@@ -4299,6 +4340,7 @@ function OpenApiResponseViewer(arg0) {
4299
4340
  const previewAvailable = exchange ? canPreviewResponse(exchange.contentType) : false;
4300
4341
  const selectedBodyMode = bodyModeSelection && bodyModeSelection.exchange === exchange ? bodyModeSelection.mode : "preview";
4301
4342
  const activeBodyMode = previewAvailable ? selectedBodyMode : "raw";
4343
+ const bodyModes = ["preview", "raw"].filter((mode) => mode === "raw" || previewAvailable);
4302
4344
  function downloadBody() {
4303
4345
  if (!exchange) return;
4304
4346
  const url = URL.createObjectURL(exchange.blob);
@@ -4373,48 +4415,37 @@ function OpenApiResponseViewer(arg0) {
4373
4415
  className: "font-mono text-2xs font-normal text-(--clarify-code-faint)",
4374
4416
  children: exchange.contentType || t("openapi.unknownContentType")
4375
4417
  }),
4376
- children: /* @__PURE__ */ jsxs("div", {
4377
- className: "min-h-72",
4378
- children: [/* @__PURE__ */ jsxs("div", {
4379
- className: "flex h-10 items-center justify-between border-b border-(--clarify-code-border) px-3",
4380
- children: [/* @__PURE__ */ jsx("div", {
4381
- role: "tablist",
4382
- className: "flex",
4383
- children: ["preview", "raw"].filter((mode) => mode === "raw" || previewAvailable).map((mode) => /* @__PURE__ */ jsx("button", {
4384
- type: "button",
4385
- role: "tab",
4386
- "aria-selected": activeBodyMode === mode,
4387
- onClick: () => setBodyModeSelection({
4388
- exchange,
4389
- mode
4390
- }),
4391
- className: clsx("border-b-2 px-2.5 py-1 text-2xs font-semibold", activeBodyMode === mode ? "border-(--clarify-theme-tokens-colors-primary) text-(--clarify-code-text)" : "border-transparent text-(--clarify-code-muted)"),
4392
- children: mode === "preview" ? t("openapi.preview") : t("openapi.raw")
4393
- }, mode))
4394
- }), /* @__PURE__ */ jsxs("div", {
4395
- className: "flex",
4396
- children: [/* @__PURE__ */ jsx(CopyButton, { value: exchange.body }), /* @__PURE__ */ jsx("button", {
4397
- type: "button",
4398
- onClick: downloadBody,
4399
- "aria-label": t("openapi.downloadBody"),
4400
- title: t("openapi.downloadBody"),
4401
- className: "grid size-8 shrink-0 place-items-center rounded-(--clarify-theme-tokens-radius-md) text-(--clarify-code-muted) transition hover:bg-(--clarify-code-control-background-hover) hover:text-(--clarify-code-text) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--clarify-theme-tokens-colors-primary)",
4402
- children: /* @__PURE__ */ jsx(DownloadIcon, {
4403
- className: "size-4",
4404
- "aria-hidden": "true"
4405
- })
4406
- })]
4407
- })]
4408
- }), /* @__PURE__ */ jsx("div", {
4409
- className: "p-4",
4410
- children: activeBodyMode === "preview" ? /* @__PURE__ */ jsx(ResponsePreview, { exchange }) : exchange.size ? /* @__PURE__ */ jsx("pre", {
4418
+ children: /* @__PURE__ */ jsx(Tabs, {
4419
+ items: bodyModes.map((mode) => ({
4420
+ id: mode,
4421
+ label: mode === "preview" ? t("openapi.preview") : t("openapi.raw"),
4422
+ panel: mode === "preview" ? /* @__PURE__ */ jsx(ResponsePreview, { exchange }) : exchange.size ? /* @__PURE__ */ jsx("pre", {
4411
4423
  className: "max-h-128 overflow-auto whitespace-pre-wrap wrap-break-word font-mono text-xs/5",
4412
4424
  children: exchange.body
4413
4425
  }) : /* @__PURE__ */ jsx("div", {
4414
4426
  className: "py-8 text-center text-xs text-(--clarify-code-faint)",
4415
4427
  children: t("openapi.responseBodyEmpty")
4416
4428
  })
4417
- })]
4429
+ })),
4430
+ selectedIndex: bodyModes.indexOf(activeBodyMode),
4431
+ onChange: (index) => setBodyModeSelection({
4432
+ exchange,
4433
+ mode: bodyModes[index] ?? "raw"
4434
+ }),
4435
+ spacingClassName: "m-0 min-h-72",
4436
+ panelsClassName: "p-4",
4437
+ variant: "code",
4438
+ actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(CopyButton, { value: exchange.body }), /* @__PURE__ */ jsx("button", {
4439
+ type: "button",
4440
+ onClick: downloadBody,
4441
+ "aria-label": t("openapi.downloadBody"),
4442
+ title: t("openapi.downloadBody"),
4443
+ className: "grid size-8 shrink-0 place-items-center rounded-(--clarify-theme-tokens-radius-md) text-(--clarify-code-muted) transition hover:bg-(--clarify-code-control-background-hover) hover:text-(--clarify-code-text) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--clarify-theme-tokens-colors-primary)",
4444
+ children: /* @__PURE__ */ jsx(DownloadIcon, {
4445
+ className: "size-4",
4446
+ "aria-hidden": "true"
4447
+ })
4448
+ })] })
4418
4449
  })
4419
4450
  })
4420
4451
  ]
@@ -5177,7 +5208,8 @@ function ServerVariableControl(arg0) {
5177
5208
  label: option
5178
5209
  })),
5179
5210
  onChange,
5180
- compact
5211
+ compact,
5212
+ buttonClassName: "inline-flex min-h-8 w-full min-w-0 items-center justify-between gap-1 rounded-md border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) px-2.5 py-1.5 text-xs font-semibold text-(--clarify-theme-tokens-colors-foreground) shadow-xs outline-hidden transition hover:border-(--clarify-ui-text-faint) hover:bg-(--clarify-ui-hover-background) focus:ring-2 focus:ring-inset focus:ring-(--clarify-theme-tokens-colors-primary) data-open:bg-(--clarify-ui-active-background)"
5181
5213
  });
5182
5214
  return /* @__PURE__ */ jsx("input", {
5183
5215
  "aria-label": name,
@@ -5207,7 +5239,8 @@ function ServerPanel(arg0) {
5207
5239
  label: getServerLabel(server, index),
5208
5240
  description: server.description
5209
5241
  })),
5210
- onChange: onSelectServer
5242
+ onChange: onSelectServer,
5243
+ buttonClassName: "inline-flex min-h-8 w-full min-w-0 items-center justify-between gap-1 rounded-md border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) px-2.5 py-1.5 text-xs font-semibold text-(--clarify-theme-tokens-colors-foreground) shadow-xs outline-hidden transition hover:border-(--clarify-ui-text-faint) hover:bg-(--clarify-ui-hover-background) focus:ring-2 focus:ring-inset focus:ring-(--clarify-theme-tokens-colors-primary) data-open:bg-(--clarify-ui-active-background)"
5211
5244
  })]
5212
5245
  }) : null, variableEntries.length > 0 ? /* @__PURE__ */ jsx("div", {
5213
5246
  className: "grid gap-3 sm:grid-cols-(--clarify-openapi-variable-grid)",
@@ -5357,4 +5390,4 @@ function OpenApiOperation(arg0) {
5357
5390
  //#endregion
5358
5391
  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 };
5359
5392
 
5360
- //# sourceMappingURL=OpenApiOperation-Cr8TxLjl.js.map
5393
+ //# sourceMappingURL=OpenApiOperation-BcJYHwft.js.map