@clarify-labs/renderer 0.11.3 → 0.11.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/output/{ClarifyShell-D25PYLE0.cjs → ClarifyShell-Cvb7Nk3A.cjs} +3 -3
  2. package/output/{ClarifyShell-D25PYLE0.cjs.map → ClarifyShell-Cvb7Nk3A.cjs.map} +1 -1
  3. package/output/{ClarifyShell-4hlqrEgp.js → ClarifyShell-gzlibEm8.js} +3 -3
  4. package/output/{ClarifyShell-4hlqrEgp.js.map → ClarifyShell-gzlibEm8.js.map} +1 -1
  5. package/output/{MermaidViewer-kbSVqJ_z.cjs → MermaidViewer-CPuTNujY.cjs} +2 -2
  6. package/output/{MermaidViewer-kbSVqJ_z.cjs.map → MermaidViewer-CPuTNujY.cjs.map} +1 -1
  7. package/output/{MermaidViewer-D4h-WEak.js → MermaidViewer-EVuBmrzA.js} +2 -2
  8. package/output/{MermaidViewer-D4h-WEak.js.map → MermaidViewer-EVuBmrzA.js.map} +1 -1
  9. package/output/{OpenApiOperation-BcJYHwft.js → OpenApiOperation-Ddax6Pen.js} +229 -50
  10. package/output/OpenApiOperation-Ddax6Pen.js.map +1 -0
  11. package/output/{OpenApiOperation-HhSjad7q.cjs → OpenApiOperation-QqYCuqve.cjs} +229 -50
  12. package/output/OpenApiOperation-QqYCuqve.cjs.map +1 -0
  13. package/output/{PageActions-Bnz5Bybt.js → PageActions-BBRz0tJ4.js} +5 -5
  14. package/output/{PageActions-Bnz5Bybt.js.map → PageActions-BBRz0tJ4.js.map} +1 -1
  15. package/output/{PageActions-GVAsO16x.cjs → PageActions-ypH6U0Vc.cjs} +8 -8
  16. package/output/{PageActions-GVAsO16x.cjs.map → PageActions-ypH6U0Vc.cjs.map} +1 -1
  17. package/output/{SearchDialog-CFMl0YAZ.cjs → SearchDialog-DCGBhNnW.cjs} +3 -3
  18. package/output/{SearchDialog-CFMl0YAZ.cjs.map → SearchDialog-DCGBhNnW.cjs.map} +1 -1
  19. package/output/{SearchDialog-DL5Y_bQ0.js → SearchDialog-Df6jknma.js} +3 -3
  20. package/output/{SearchDialog-DL5Y_bQ0.js.map → SearchDialog-Df6jknma.js.map} +1 -1
  21. package/output/app/PageActions.d.ts +1 -1
  22. package/output/client.cjs +3 -3
  23. package/output/client.js +3 -3
  24. package/output/core/i18n.d.ts +2 -1
  25. package/output/{i18n-R08i532P.cjs → i18n-Ds-f-qlT.cjs} +9 -1
  26. package/output/i18n-Ds-f-qlT.cjs.map +1 -0
  27. package/output/{i18n-sJUQQLRZ.js → i18n-LXAq0RIC.js} +9 -1
  28. package/output/i18n-LXAq0RIC.js.map +1 -0
  29. package/output/index.cjs +15 -15
  30. package/output/index.cjs.map +1 -1
  31. package/output/index.js +15 -15
  32. package/output/index.js.map +1 -1
  33. package/output/openapi/components/ExamplePanels.d.ts +3 -1
  34. package/output/openapi/components/OpenApiDocumentSection.d.ts +1 -0
  35. package/output/openapi/components/SchemaProperties.d.ts +8 -0
  36. package/output/openapi/components/SchemaSearch.d.ts +20 -0
  37. package/output/openapi/lib/helpers.d.ts +3 -0
  38. package/output/preview.cjs +3 -3
  39. package/output/preview.js +3 -3
  40. package/output/{render-BuWbLXJW.cjs → render-BQkaRYoY.cjs} +2 -2
  41. package/output/{render-BuWbLXJW.cjs.map → render-BQkaRYoY.cjs.map} +1 -1
  42. package/output/{render-tWo_ruCT.js → render-C2rZuVLy.js} +2 -2
  43. package/output/{render-tWo_ruCT.js.map → render-C2rZuVLy.js.map} +1 -1
  44. package/output/renderer.css +63 -12
  45. package/output/server.cjs +2 -2
  46. package/output/server.js +2 -2
  47. package/package.json +1 -1
  48. package/output/OpenApiOperation-BcJYHwft.js.map +0 -1
  49. package/output/OpenApiOperation-HhSjad7q.cjs.map +0 -1
  50. package/output/i18n-R08i532P.cjs.map +0 -1
  51. package/output/i18n-sJUQQLRZ.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
2
- const require_i18n = require("./i18n-R08i532P.cjs");
2
+ const require_i18n = require("./i18n-Ds-f-qlT.cjs");
3
3
  let clsx = require("clsx");
4
4
  clsx = require_rolldown_runtime.__toESM(clsx, 1);
5
5
  let react = require("react");
@@ -98,4 +98,4 @@ function MermaidViewer(arg0) {
98
98
  exports.MermaidViewer = MermaidViewer;
99
99
  exports.default = MermaidViewer;
100
100
 
101
- //# sourceMappingURL=MermaidViewer-kbSVqJ_z.cjs.map
101
+ //# sourceMappingURL=MermaidViewer-CPuTNujY.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MermaidViewer-kbSVqJ_z.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,GAAA,kBAAA,IAAA,CAAC,aAAA,WAAD;KAAW,WAAU;KAAU,eAAY;IAAQ,CAAA;GAC7C,CAAA;EACL;;AAET;AAEA,SAAgB,cAAc,MAAqC;CACjE,MAAM,EAAE,KAAK,cAAc;CAE3B,MAAM,IAAI,aAAA,eAAe;CACzB,MAAM,gBAAA,GAAA,MAAA,OAAA,CAAsC,IAAI;CAChD,MAAM,CAAC,SAAS,eAAA,GAAA,MAAA,SAAA,CAAuB,KAAK;CAE5C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,KAAK;EACL,UAAU;EACV,MAAK;EACL,qBAAqB,aAAa,SAAS,MAAM;EACjD,eAAe,WAAW,IAAI;EAC9B,cAAc,WAAW,KAAK;EAC9B,YAAA,GAAA,KAAA,QAAA,CAAgB,0QAA0Q,SAAS;YAEnS,iBAAA,GAAA,kBAAA,KAAA,CAAC,qBAAA,kBAAD;GACE,UAAU;GACV,UAAU;GACV,cAAc;GACd,cAAA;GACA,QAAA;GACA,OAAO;IAAE,MAAM;IAAM,eAAe,CAAC;IAAS,kBAAkB,CAAC;GAAQ;GACzE,aAAa,EAAE,MAAM,QAAQ;aAP/B;IASE,iBAAA,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
+ {"version":3,"file":"MermaidViewer-CPuTNujY.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,GAAA,kBAAA,IAAA,CAAC,aAAA,WAAD;KAAW,WAAU;KAAU,eAAY;IAAQ,CAAA;GAC7C,CAAA;EACL;;AAET;AAEA,SAAgB,cAAc,MAAqC;CACjE,MAAM,EAAE,KAAK,cAAc;CAE3B,MAAM,IAAI,aAAA,eAAe;CACzB,MAAM,gBAAA,GAAA,MAAA,OAAA,CAAsC,IAAI;CAChD,MAAM,CAAC,SAAS,eAAA,GAAA,MAAA,SAAA,CAAuB,KAAK;CAE5C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,KAAK;EACL,UAAU;EACV,MAAK;EACL,qBAAqB,aAAa,SAAS,MAAM;EACjD,eAAe,WAAW,IAAI;EAC9B,cAAc,WAAW,KAAK;EAC9B,YAAA,GAAA,KAAA,QAAA,CAAgB,0QAA0Q,SAAS;YAEnS,iBAAA,GAAA,kBAAA,KAAA,CAAC,qBAAA,kBAAD;GACE,UAAU;GACV,UAAU;GACV,cAAc;GACd,cAAA;GACA,QAAA;GACA,OAAO;IAAE,MAAM;IAAM,eAAe,CAAC;IAAS,kBAAkB,CAAC;GAAQ;GACzE,aAAa,EAAE,MAAM,QAAQ;aAP/B;IASE,iBAAA,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,4 +1,4 @@
1
- import { t as useBuiltInText } from "./i18n-sJUQQLRZ.js";
1
+ import { t as useBuiltInText } from "./i18n-LXAq0RIC.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-D4h-WEak.js.map
98
+ //# sourceMappingURL=MermaidViewer-EVuBmrzA.js.map
@@ -1 +1 @@
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,SAAS,eAA0B;CACjC,MAAM,EAAE,QAAQ,SAAS,mBAAmB,YAAY;CACxD,MAAM,IAAI,eAAe;CAEzB,MAAM,kBAAkB;CAExB,OACE,qBAAC,OAAD;EAAK,WAAU;YAAf;GACE,oBAAC,UAAD;IAAQ,MAAK;IAAS,cAAY,EAAE,gBAAgB;IAAG,OAAO,EAAE,gBAAgB;IAAG,eAAe,OAAO;IAAG,WAAW;cACrH,oBAAC,QAAD;KAAQ,WAAU;KAAU,eAAY;IAAQ,CAAA;GAC1C,CAAA;GACR,oBAAC,UAAD;IAAQ,MAAK;IAAS,cAAY,EAAE,iBAAiB;IAAG,OAAO,EAAE,iBAAiB;IAAG,eAAe,QAAQ;IAAG,WAAW;cACxH,oBAAC,SAAD;KAAS,WAAU;KAAU,eAAY;IAAQ,CAAA;GAC3C,CAAA;GACR,oBAAC,UAAD;IAAQ,MAAK;IAAS,cAAY,EAAE,mBAAmB;IAAG,OAAO,EAAE,mBAAmB;IAAG,eAAe,eAAe;IAAG,WAAW;cACnI,oBAAC,WAAD;KAAW,WAAU;KAAU,eAAY;IAAQ,CAAA;GAC7C,CAAA;EACL;;AAET;AAEA,SAAgB,cAAc,MAAqC;CACjE,MAAM,EAAE,KAAK,cAAc;CAE3B,MAAM,IAAI,eAAe;CACzB,MAAM,eAAe,OAAuB,IAAI;CAChD,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAE5C,OACE,oBAAC,OAAD;EACE,KAAK;EACL,UAAU;EACV,MAAK;EACL,qBAAqB,aAAa,SAAS,MAAM;EACjD,eAAe,WAAW,IAAI;EAC9B,cAAc,WAAW,KAAK;EAC9B,WAAW,KAAK,0QAA0Q,SAAS;YAEnS,qBAAC,kBAAD;GACE,UAAU;GACV,UAAU;GACV,cAAc;GACd,cAAA;GACA,QAAA;GACA,OAAO;IAAE,MAAM;IAAM,eAAe,CAAC;IAAS,kBAAkB,CAAC;GAAQ;GACzE,aAAa,EAAE,MAAM,QAAQ;aAP/B;IASE,oBAAC,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-EVuBmrzA.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;EAAK,WAAU;YAAf;GACE,oBAAC,UAAD;IAAQ,MAAK;IAAS,cAAY,EAAE,gBAAgB;IAAG,OAAO,EAAE,gBAAgB;IAAG,eAAe,OAAO;IAAG,WAAW;cACrH,oBAAC,QAAD;KAAQ,WAAU;KAAU,eAAY;IAAQ,CAAA;GAC1C,CAAA;GACR,oBAAC,UAAD;IAAQ,MAAK;IAAS,cAAY,EAAE,iBAAiB;IAAG,OAAO,EAAE,iBAAiB;IAAG,eAAe,QAAQ;IAAG,WAAW;cACxH,oBAAC,SAAD;KAAS,WAAU;KAAU,eAAY;IAAQ,CAAA;GAC3C,CAAA;GACR,oBAAC,UAAD;IAAQ,MAAK;IAAS,cAAY,EAAE,mBAAmB;IAAG,OAAO,EAAE,mBAAmB;IAAG,eAAe,eAAe;IAAG,WAAW;cACnI,oBAAC,WAAD;KAAW,WAAU;KAAU,eAAY;IAAQ,CAAA;GAC7C,CAAA;EACL;;AAET;AAEA,SAAgB,cAAc,MAAqC;CACjE,MAAM,EAAE,KAAK,cAAc;CAE3B,MAAM,IAAI,eAAe;CACzB,MAAM,eAAe,OAAuB,IAAI;CAChD,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAE5C,OACE,oBAAC,OAAD;EACE,KAAK;EACL,UAAU;EACV,MAAK;EACL,qBAAqB,aAAa,SAAS,MAAM;EACjD,eAAe,WAAW,IAAI;EAC9B,cAAc,WAAW,KAAK;EAC9B,WAAW,KAAK,0QAA0Q,SAAS;YAEnS,qBAAC,kBAAD;GACE,UAAU;GACV,UAAU;GACV,cAAc;GACd,cAAA;GACA,QAAA;GACA,OAAO;IAAE,MAAM;IAAM,eAAe,CAAC;IAAS,kBAAkB,CAAC;GAAQ;GACzE,aAAa,EAAE,MAAM,QAAQ;aAP/B;IASE,oBAAC,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
- 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";
1
+ import { a as useConfig, s as useLocale, t as useBuiltInText } from "./i18n-LXAq0RIC.js";
2
+ import { C as isExternalHref, E as copyTextToClipboard, c as lucideIconRegistry, h as useTheme, l as resolveLucideIconName, o as useSectionStore, s as remToPx, t as PageActions, w as localizeHref } from "./PageActions-BBRz0tJ4.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-D4h-WEak.js"));
256
+ var MermaidViewer = lazy(() => import("./MermaidViewer-EVuBmrzA.js"));
257
257
  var mermaidModulePromise;
258
258
  async function loadMermaid() {
259
259
  mermaidModulePromise = mermaidModulePromise ?? import("mermaid").then((module) => module.default);
@@ -1265,12 +1265,15 @@ var primitives_exports = /* @__PURE__ */ __exportAll({
1265
1265
  });
1266
1266
  function wrapper(arg0) {
1267
1267
  const { children } = arg0;
1268
- return /* @__PURE__ */ jsx("article", {
1269
- className: "clarify-mdx-page flex h-full min-w-0 flex-col pt-14 pb-10",
1270
- children: /* @__PURE__ */ jsx(Prose, {
1268
+ return /* @__PURE__ */ jsxs("article", {
1269
+ className: "clarify-mdx-page relative flex h-full min-w-0 flex-col pt-14 pb-10",
1270
+ children: [/* @__PURE__ */ jsx("div", {
1271
+ className: "clarify-page-actions mb-4 flex justify-end sm:absolute sm:top-14 sm:right-0 sm:mb-0",
1272
+ children: /* @__PURE__ */ jsx(PageActions, {})
1273
+ }), /* @__PURE__ */ jsx(Prose, {
1271
1274
  className: "flex-auto",
1272
1275
  children
1273
- })
1276
+ })]
1274
1277
  });
1275
1278
  }
1276
1279
  function table(arg0) {
@@ -1292,13 +1295,10 @@ function a(arg0) {
1292
1295
  }
1293
1296
  function h1(arg0) {
1294
1297
  const { children, className, ...props } = arg0;
1295
- return /* @__PURE__ */ jsxs("div", {
1296
- className: "clarify-page-title-row flex flex-col gap-4 pb-4 sm:flex-row sm:items-start sm:justify-between",
1297
- children: [/* @__PURE__ */ jsx("h1", {
1298
- className: clsx("clarify-page-title min-w-0 flex-1", className),
1299
- ...props,
1300
- children
1301
- }), /* @__PURE__ */ jsx(PageTitleActions, {})]
1298
+ return /* @__PURE__ */ jsx("h1", {
1299
+ className: clsx("clarify-page-title min-w-0 flex-1", className),
1300
+ ...props,
1301
+ children
1302
1302
  });
1303
1303
  }
1304
1304
  var code = Code;
@@ -1483,6 +1483,57 @@ function resolveRequestSchema(spec, schema) {
1483
1483
  delete ownSchema.allOf;
1484
1484
  return mergeAllOfSchemas(spec, [...allOf, ownSchema]);
1485
1485
  }
1486
+ function fuzzyMatch(value, query) {
1487
+ const candidate = value.toLocaleLowerCase();
1488
+ const needle = query.trim().toLocaleLowerCase();
1489
+ let candidateIndex = 0;
1490
+ for (const character of needle) {
1491
+ candidateIndex = candidate.indexOf(character, candidateIndex);
1492
+ if (candidateIndex === -1) return false;
1493
+ candidateIndex += 1;
1494
+ }
1495
+ return true;
1496
+ }
1497
+ var noExampleMatch = Symbol("no-example-match");
1498
+ function getSchemaSearchText(name, schema) {
1499
+ if (!isRecord$1(schema)) return name;
1500
+ return [
1501
+ name,
1502
+ schema.type,
1503
+ schema.description,
1504
+ schema.pattern,
1505
+ schema.const,
1506
+ schema.default,
1507
+ schema.minimum,
1508
+ schema.maximum,
1509
+ schema.additionalProperties
1510
+ ].filter((value) => typeof value === "string" || typeof value === "number" || typeof value === "boolean").join(" ");
1511
+ }
1512
+ function filterExampleValue(spec, schema, value, query) {
1513
+ const resolved = resolveRequestSchema(spec, schema);
1514
+ if (Array.isArray(value)) {
1515
+ const itemSchema = isRecord$1(resolved) ? resolved.items : void 0;
1516
+ const items = value.map((item) => filterExampleValue(spec, itemSchema, item, query)).filter((item) => item !== noExampleMatch);
1517
+ return items.length > 0 ? items : noExampleMatch;
1518
+ }
1519
+ if (isRecord$1(value)) {
1520
+ const properties = isRecord$1(resolved) && isRecord$1(resolved.properties) ? resolved.properties : {};
1521
+ const filtered = Object.entries(value).flatMap(([name, propertyValue]) => {
1522
+ const propertySchema = properties[name] ?? (isRecord$1(resolved) && isRecord$1(resolved.additionalProperties) ? resolved.additionalProperties : void 0);
1523
+ if (fuzzyMatch(getSchemaSearchText(name, resolveRequestSchema(spec, propertySchema)), query)) return [[name, propertyValue]];
1524
+ const child = filterExampleValue(spec, propertySchema, propertyValue, query);
1525
+ return child === noExampleMatch ? [] : [[name, child]];
1526
+ });
1527
+ return filtered.length > 0 ? Object.fromEntries(filtered) : noExampleMatch;
1528
+ }
1529
+ return fuzzyMatch(getSchemaSearchText("", resolved), query) ? value : noExampleMatch;
1530
+ }
1531
+ function filterExampleBySchema(spec, schema, value, query) {
1532
+ if (!query.trim()) return value;
1533
+ const filtered = filterExampleValue(spec, schema, value, query);
1534
+ if (filtered !== noExampleMatch) return filtered;
1535
+ return Array.isArray(value) ? [] : isRecord$1(value) ? {} : value;
1536
+ }
1486
1537
  function getPathItem$1(spec, path) {
1487
1538
  return resolveObjectRef(spec, spec.paths?.[path]);
1488
1539
  }
@@ -2530,8 +2581,11 @@ function ApiExampleCodeGroup(arg0) {
2530
2581
  function firstExampleKeyForMediaType(requestContents, mediaType, spec) {
2531
2582
  return getExampleEntries(requestContents.find((content) => content.mediaType === mediaType)?.value, spec)[0]?.key ?? "";
2532
2583
  }
2584
+ function isStructuredMediaType(mediaType) {
2585
+ return mediaType.includes("json") || mediaType.includes("yaml") || mediaType.includes("yml");
2586
+ }
2533
2587
  function useRequestExamplesState(arg0) {
2534
- const { spec, path, method, parameters, requestContents, selectedMediaType, onSelectMediaType, selectedServer, serverVariables, auth, operationSource, sharedExampleKey, onSelectExampleKey } = arg0;
2588
+ const { spec, path, method, parameters, requestContents, selectedMediaType, onSelectMediaType, selectedServer, serverVariables, auth, operationSource, sharedExampleKey, onSelectExampleKey, query = "" } = arg0;
2535
2589
  const selectedContent = requestContents.find((content) => content.mediaType === selectedMediaType) ?? requestContents[0];
2536
2590
  const examples = getExampleEntries(selectedContent?.value, spec);
2537
2591
  const [selectedExampleKey, setSelectedExampleKey] = useState(examples[0]?.key ?? "");
@@ -2539,6 +2593,7 @@ function useRequestExamplesState(arg0) {
2539
2593
  const [selectedClientKey, setSelectedClientKey] = useState("curl");
2540
2594
  const currentExampleKey = (sharedExampleKey && examples.some((example) => example.key === sharedExampleKey) ? sharedExampleKey : void 0) ?? selectedExampleKey;
2541
2595
  const selectedExample = examples.find((example) => example.key === currentExampleKey) ?? examples[0];
2596
+ const requestExample = selectedContent && isStructuredMediaType(selectedContent.mediaType) ? filterExampleBySchema(spec, selectedContent.value.schema, selectedExample?.value, query) : selectedExample?.value;
2542
2597
  const codeOptions = buildRequestCodeExamples({
2543
2598
  spec,
2544
2599
  path,
@@ -2548,7 +2603,7 @@ function useRequestExamplesState(arg0) {
2548
2603
  ...selectedContent,
2549
2604
  value: {
2550
2605
  ...selectedContent.value,
2551
- example: selectedExample?.value,
2606
+ example: requestExample,
2552
2607
  examples: void 0
2553
2608
  }
2554
2609
  } : void 0,
@@ -2583,7 +2638,7 @@ function useRequestExamplesState(arg0) {
2583
2638
  };
2584
2639
  }
2585
2640
  function RequestExamplesPanel(arg0) {
2586
- const { spec, path, method, parameters, requestContents, selectedMediaType, onSelectMediaType, selectedServer, serverVariables, auth, operationSource, sharedExampleKey, onSelectExampleKey } = arg0;
2641
+ const { spec, path, method, parameters, requestContents, selectedMediaType, onSelectMediaType, selectedServer, serverVariables, auth, operationSource, sharedExampleKey, onSelectExampleKey, query } = arg0;
2587
2642
  const t = useBuiltInText();
2588
2643
  const state = useRequestExamplesState({
2589
2644
  spec,
@@ -2598,7 +2653,8 @@ function RequestExamplesPanel(arg0) {
2598
2653
  auth,
2599
2654
  operationSource,
2600
2655
  sharedExampleKey,
2601
- onSelectExampleKey
2656
+ onSelectExampleKey,
2657
+ query
2602
2658
  });
2603
2659
  return /* @__PURE__ */ jsx(ApiExampleCodeGroup, {
2604
2660
  title: t("openapi.request"),
@@ -2623,11 +2679,12 @@ function RequestExamplesPanel(arg0) {
2623
2679
  function firstExampleKeyForResponseContent(content, spec) {
2624
2680
  return getExampleEntries(content?.value, spec)[0]?.key ?? "";
2625
2681
  }
2626
- function getResponseExampleBody(content, example) {
2627
- return content ? stringifyExample(example?.value) : "";
2682
+ function getResponseExampleBody(content, example, spec, query = "") {
2683
+ if (!content) return "";
2684
+ return stringifyExample(spec && isStructuredMediaType(content.mediaType) ? filterExampleBySchema(spec, content.value.schema, example?.value, query) : example?.value);
2628
2685
  }
2629
2686
  function useResponseExamplesState(arg0) {
2630
- const { operation, spec, sharedExampleKey, onSelectExampleKey, selectedStatus, onSelectStatus } = arg0;
2687
+ const { operation, spec, sharedExampleKey, onSelectExampleKey, selectedStatus, onSelectStatus, query = "" } = arg0;
2631
2688
  const orderedResponses = [...getResponseEntries(operation, spec)].sort((left, right) => {
2632
2689
  if (left.status === "default") return -1;
2633
2690
  if (right.status === "default") return 1;
@@ -2662,7 +2719,7 @@ function useResponseExamplesState(arg0) {
2662
2719
  selectedContent,
2663
2720
  examples,
2664
2721
  selectedExample,
2665
- responseBody: getResponseExampleBody(selectedContent, selectedExample),
2722
+ responseBody: getResponseExampleBody(selectedContent, selectedExample, spec, query),
2666
2723
  onSelectStatus: (value) => {
2667
2724
  const nextContents = getMediaTypeEntries(orderedResponses.find(({ status }) => status === value)?.response.content, spec);
2668
2725
  if (typeof selectedStatus === "undefined") setInternalSelectedStatus(value);
@@ -2691,7 +2748,7 @@ function useResponseExamplesState(arg0) {
2691
2748
  };
2692
2749
  }
2693
2750
  function ResponseExamplesPanel(arg0) {
2694
- const { operation, spec, title, sharedExampleKey, onSelectExampleKey, selectedStatus, onSelectStatus } = arg0;
2751
+ const { operation, spec, title, sharedExampleKey, onSelectExampleKey, selectedStatus, onSelectStatus, query } = arg0;
2695
2752
  const t = useBuiltInText();
2696
2753
  const state = useResponseExamplesState({
2697
2754
  operation,
@@ -2699,7 +2756,8 @@ function ResponseExamplesPanel(arg0) {
2699
2756
  sharedExampleKey,
2700
2757
  onSelectExampleKey,
2701
2758
  selectedStatus,
2702
- onSelectStatus
2759
+ onSelectStatus,
2760
+ query
2703
2761
  });
2704
2762
  if (!state.selectedContent || !state.responseBody) return null;
2705
2763
  return /* @__PURE__ */ jsx(ApiExampleCodeGroup, {
@@ -2721,7 +2779,7 @@ function ResponseExamplesPanel(arg0) {
2721
2779
  //#endregion
2722
2780
  //#region source/openapi/components/OpenApiDocumentSection.tsx
2723
2781
  function OpenApiDocumentSection(props) {
2724
- const { title, children, className, bodyClassName, level = 3 } = props;
2782
+ const { title, children, action, className, bodyClassName, level = 3 } = props;
2725
2783
  const heading = level === 3 ? /* @__PURE__ */ jsx("h3", {
2726
2784
  className: "!m-0 text-sm/6 font-semibold text-(--clarify-theme-tokens-colors-foreground)",
2727
2785
  children: title
@@ -2731,7 +2789,10 @@ function OpenApiDocumentSection(props) {
2731
2789
  });
2732
2790
  return /* @__PURE__ */ jsxs("section", {
2733
2791
  className: clsx("clarify-openapi-document-section", className),
2734
- children: [heading, /* @__PURE__ */ jsx("div", {
2792
+ children: [action ? /* @__PURE__ */ jsxs("div", {
2793
+ className: "flex min-w-0 items-center justify-between gap-2",
2794
+ children: [heading, action]
2795
+ }) : heading, /* @__PURE__ */ jsx("div", {
2735
2796
  className: clsx("mt-2", bodyClassName),
2736
2797
  children
2737
2798
  })]
@@ -3040,10 +3101,11 @@ function EnumValueNode(arg0) {
3040
3101
  });
3041
3102
  }
3042
3103
  function SchemaNode(arg0) {
3043
- const { node, depth = 0, defaultExpanded } = arg0;
3104
+ const { node, depth = 0, defaultExpanded, forceExpanded = false } = arg0;
3044
3105
  const t = useBuiltInText();
3045
- const [expanded, setExpanded] = useState(defaultExpanded ?? depth < 1);
3106
+ const [locallyExpanded, setLocallyExpanded] = useState(defaultExpanded ?? depth < 1);
3046
3107
  const hasChildren = node.children.length > 0;
3108
+ const expanded = forceExpanded || locallyExpanded;
3047
3109
  if (node.kind === "enum") return /* @__PURE__ */ jsx(EnumValueNode, {
3048
3110
  node,
3049
3111
  depth
@@ -3083,7 +3145,7 @@ function SchemaNode(arg0) {
3083
3145
  type: "button",
3084
3146
  "aria-label": expanded ? t("openapi.collapse") : t("openapi.expand"),
3085
3147
  "aria-expanded": expanded,
3086
- onClick: () => setExpanded((value) => !value),
3148
+ onClick: () => setLocallyExpanded((value) => !value),
3087
3149
  className: clsx(rowClassName, "cursor-pointer transition hover:bg-(--clarify-ui-hover-background) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--clarify-theme-tokens-colors-primary)"),
3088
3150
  children: content
3089
3151
  }) : /* @__PURE__ */ jsx("div", {
@@ -3091,12 +3153,13 @@ function SchemaNode(arg0) {
3091
3153
  children: content
3092
3154
  }), hasChildren && expanded ? /* @__PURE__ */ jsx(SchemaTree, {
3093
3155
  nodes: node.children,
3094
- depth: depth + 1
3156
+ depth: depth + 1,
3157
+ forceExpanded
3095
3158
  }) : null]
3096
3159
  });
3097
3160
  }
3098
3161
  function SchemaTree(arg0) {
3099
- const { nodes, depth = 0 } = arg0;
3162
+ const { nodes, depth = 0, forceExpanded = false } = arg0;
3100
3163
  if (nodes.length === 0) return null;
3101
3164
  return /* @__PURE__ */ jsx("ul", {
3102
3165
  role: "list",
@@ -3104,19 +3167,44 @@ function SchemaTree(arg0) {
3104
3167
  children: nodes.map((node) => /* @__PURE__ */ jsx(SchemaNode, {
3105
3168
  node,
3106
3169
  depth,
3107
- defaultExpanded: node.defaultExpanded
3170
+ defaultExpanded: node.defaultExpanded,
3171
+ forceExpanded
3108
3172
  }, node.key))
3109
3173
  });
3110
3174
  }
3175
+ function filterSchemaNodes(nodes, query) {
3176
+ if (!query.trim()) return nodes;
3177
+ return nodes.flatMap((node) => {
3178
+ const children = filterSchemaNodes(node.children, query);
3179
+ return fuzzyMatch(getSchemaSearchText(node.name, {
3180
+ type: node.type,
3181
+ description: node.description,
3182
+ pattern: node.details
3183
+ }), query) || children.length > 0 ? [{
3184
+ ...node,
3185
+ children
3186
+ }] : [];
3187
+ });
3188
+ }
3111
3189
  function SchemaProperties(arg0) {
3112
- const { title, schema, spec, defaultExpanded } = arg0;
3190
+ const { title, schema, spec, defaultExpanded, query = "", emptyText } = arg0;
3191
+ const t = useBuiltInText();
3113
3192
  const root = getRootSchemaNode(spec, schema, defaultExpanded);
3114
3193
  if (!root || root.children.length === 0) return null;
3194
+ const filteredNodes = filterSchemaNodes(root.children, query);
3195
+ const hasQuery = Boolean(query.trim());
3196
+ const resolvedEmptyText = emptyText ?? t("openapi.noBodyProperties");
3115
3197
  return /* @__PURE__ */ jsx(OpenApiDocumentSection, {
3116
3198
  title,
3117
3199
  level: 4,
3118
3200
  bodyClassName: "clarify-schema-properties not-prose",
3119
- children: /* @__PURE__ */ jsx(SchemaTree, { nodes: root.children })
3201
+ children: filteredNodes.length > 0 ? /* @__PURE__ */ jsx(SchemaTree, {
3202
+ nodes: filteredNodes,
3203
+ forceExpanded: hasQuery
3204
+ }) : /* @__PURE__ */ jsx("p", {
3205
+ className: "m-0 py-2 text-sm/5 text-(--clarify-ui-text-soft)",
3206
+ children: resolvedEmptyText
3207
+ })
3120
3208
  });
3121
3209
  }
3122
3210
  function ParameterList(arg0) {
@@ -3140,7 +3228,7 @@ function ParameterList(arg0) {
3140
3228
  });
3141
3229
  }
3142
3230
  function ResponseList(arg0) {
3143
- const { title, operation, spec, selectedStatus, onSelectStatus } = arg0;
3231
+ const { title, operation, spec, selectedStatus, onSelectStatus, query = "", search } = arg0;
3144
3232
  const t = useBuiltInText();
3145
3233
  const orderedResponses = [...getResponseEntries(operation, spec)].sort((left, right) => {
3146
3234
  if (left.status === "default") return -1;
@@ -3181,7 +3269,9 @@ function ResponseList(arg0) {
3181
3269
  children: /* @__PURE__ */ jsx(SchemaProperties, {
3182
3270
  title: t("openapi.responseBodyProperties"),
3183
3271
  schema: responseSchema,
3184
- spec
3272
+ spec,
3273
+ query,
3274
+ emptyText: t("openapi.noResponseBodyProperties")
3185
3275
  })
3186
3276
  }) : null
3187
3277
  ]
@@ -3189,18 +3279,20 @@ function ResponseList(arg0) {
3189
3279
  };
3190
3280
  if (orderedResponses.length === 1) {
3191
3281
  const [{ status, response }] = orderedResponses;
3192
- return /* @__PURE__ */ jsx(OpenApiDocumentSection, {
3282
+ return /* @__PURE__ */ jsxs(OpenApiDocumentSection, {
3193
3283
  title: title ?? t("openapi.responses"),
3194
- children: renderResponsePanel({
3284
+ action: search?.action,
3285
+ children: [search?.open ? search.input : null, renderResponsePanel({
3195
3286
  status,
3196
3287
  response
3197
- })
3288
+ })]
3198
3289
  });
3199
3290
  }
3200
- return /* @__PURE__ */ jsx(OpenApiDocumentSection, {
3291
+ return /* @__PURE__ */ jsxs(OpenApiDocumentSection, {
3201
3292
  title: title ?? t("openapi.responses"),
3293
+ action: search?.action,
3202
3294
  bodyClassName: "not-prose",
3203
- children: /* @__PURE__ */ jsx(Tabs, {
3295
+ children: [search?.open ? search.input : null, /* @__PURE__ */ jsx(Tabs, {
3204
3296
  selectedIndex,
3205
3297
  onChange: (index) => {
3206
3298
  onSelectStatus?.(orderedResponses[index]?.status ?? "");
@@ -3215,15 +3307,71 @@ function ResponseList(arg0) {
3215
3307
  })),
3216
3308
  spacingClassName: "m-0",
3217
3309
  panelsClassName: "mt-2"
3310
+ })]
3311
+ });
3312
+ }
3313
+ //#endregion
3314
+ //#region source/openapi/components/SchemaSearch.tsx
3315
+ function useSchemaSearch() {
3316
+ const [open, setOpen] = useState(false);
3317
+ const [query, setQuery] = useState("");
3318
+ return {
3319
+ open,
3320
+ query,
3321
+ onChange: (event) => setQuery(event.target.value),
3322
+ toggle: () => {
3323
+ setOpen((current) => {
3324
+ if (current) setQuery("");
3325
+ return !current;
3326
+ });
3327
+ }
3328
+ };
3329
+ }
3330
+ function SchemaSearchButton(arg0) {
3331
+ const { label, open, onClick } = arg0;
3332
+ return /* @__PURE__ */ jsx("button", {
3333
+ type: "button",
3334
+ "aria-label": label,
3335
+ "aria-pressed": open,
3336
+ onClick,
3337
+ className: clsx("flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-(--clarify-theme-tokens-radius-md) transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--clarify-theme-tokens-colors-primary)", open ? "bg-(--clarify-ui-hover-background) text-(--clarify-theme-tokens-colors-primary)" : "text-(--clarify-ui-text-faint) hover:bg-(--clarify-ui-hover-background) hover:text-(--clarify-theme-tokens-colors-foreground)"),
3338
+ children: /* @__PURE__ */ jsx(SearchIcon, {
3339
+ className: "size-4",
3340
+ "aria-hidden": "true"
3218
3341
  })
3219
3342
  });
3220
3343
  }
3344
+ function SchemaSearchInput(arg0) {
3345
+ const { label, value, onChange } = arg0;
3346
+ return /* @__PURE__ */ jsxs("label", {
3347
+ className: "not-prose mb-3 flex h-9 items-center gap-2 rounded-(--clarify-theme-tokens-radius-md) border border-(--clarify-theme-tokens-colors-border) bg-(--clarify-theme-tokens-colors-surface) px-3 transition focus-within:border-(--clarify-theme-tokens-colors-primary) focus-within:ring-2 focus-within:ring-(--clarify-theme-tokens-colors-primary)/15",
3348
+ children: [
3349
+ /* @__PURE__ */ jsx(SearchIcon, {
3350
+ className: "size-4 shrink-0 text-(--clarify-ui-text-faint)",
3351
+ "aria-hidden": "true"
3352
+ }),
3353
+ /* @__PURE__ */ jsx("span", {
3354
+ className: "sr-only",
3355
+ children: label
3356
+ }),
3357
+ /* @__PURE__ */ jsx("input", {
3358
+ type: "search",
3359
+ value,
3360
+ onChange,
3361
+ placeholder: label,
3362
+ autoFocus: true,
3363
+ className: "min-w-0 flex-1 bg-transparent text-sm text-(--clarify-theme-tokens-colors-foreground) outline-none placeholder:text-(--clarify-ui-text-faint)"
3364
+ })
3365
+ ]
3366
+ });
3367
+ }
3221
3368
  //#endregion
3222
3369
  //#region source/openapi/components/EndpointSections.tsx
3223
3370
  function EndpointRequest(arg0) {
3224
3371
  const { spec, path, method, operationSource = "path", description, groupedParameters, parameters, requestBody, requestContents, requestSchema, selectedRequestMediaType, onSelectRequestMediaType, selectedServer, serverVariables, authOptions, auth, sharedExampleKey, onSelectExampleKey } = arg0;
3225
3372
  const t = useBuiltInText();
3226
3373
  const hasRequestBody = Boolean(requestBody && requestContents.length > 0);
3374
+ const requestBodySearch = useSchemaSearch();
3227
3375
  const renderDescription = () => {
3228
3376
  if (!description) return null;
3229
3377
  return /* @__PURE__ */ jsx(Markdown, { children: description });
@@ -3233,11 +3381,20 @@ function EndpointRequest(arg0) {
3233
3381
  className: "text-sm/5 text-(--clarify-ui-text-soft)",
3234
3382
  children: t("openapi.requestBodyEmpty")
3235
3383
  });
3236
- return /* @__PURE__ */ jsxs(Fragment$1, { children: [typeof requestBody?.description === "string" ? /* @__PURE__ */ jsx(Markdown, { children: requestBody.description }) : null, /* @__PURE__ */ jsx(SchemaProperties, {
3237
- title: t("openapi.bodyProperties"),
3238
- schema: requestSchema,
3239
- spec
3240
- })] });
3384
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
3385
+ requestBodySearch.open ? /* @__PURE__ */ jsx(SchemaSearchInput, {
3386
+ label: t("openapi.searchBodyProperties"),
3387
+ value: requestBodySearch.query,
3388
+ onChange: requestBodySearch.onChange
3389
+ }) : null,
3390
+ typeof requestBody?.description === "string" ? /* @__PURE__ */ jsx(Markdown, { children: requestBody.description }) : null,
3391
+ /* @__PURE__ */ jsx(SchemaProperties, {
3392
+ title: t("openapi.bodyProperties"),
3393
+ schema: requestSchema,
3394
+ spec,
3395
+ query: requestBodySearch.query
3396
+ })
3397
+ ] });
3241
3398
  };
3242
3399
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [renderDescription(), /* @__PURE__ */ jsxs(Row, {
3243
3400
  className: "clarify-openapi-request-workspace relative mt-8 pt-6",
@@ -3259,6 +3416,11 @@ function EndpointRequest(arg0) {
3259
3416
  }),
3260
3417
  /* @__PURE__ */ jsx(OpenApiDocumentSection, {
3261
3418
  title: t("openapi.requestBody"),
3419
+ action: hasRequestBody ? /* @__PURE__ */ jsx(SchemaSearchButton, {
3420
+ label: t("openapi.searchBodyProperties"),
3421
+ open: requestBodySearch.open,
3422
+ onClick: requestBodySearch.toggle
3423
+ }) : null,
3262
3424
  children: renderRequestBody()
3263
3425
  })
3264
3426
  ]
@@ -3279,7 +3441,8 @@ function EndpointRequest(arg0) {
3279
3441
  auth,
3280
3442
  operationSource,
3281
3443
  sharedExampleKey,
3282
- onSelectExampleKey
3444
+ onSelectExampleKey,
3445
+ query: requestBodySearch.query
3283
3446
  })
3284
3447
  })
3285
3448
  })]
@@ -3290,6 +3453,7 @@ function EndpointResponse(arg0) {
3290
3453
  const t = useBuiltInText();
3291
3454
  const responseTitle = operationSource === "webhook" ? t("openapi.webhookResponses") : t("openapi.responses");
3292
3455
  const responseExampleTitle = operationSource === "webhook" ? t("openapi.webhookResponse") : t("openapi.response");
3456
+ const responseBodySearch = useSchemaSearch();
3293
3457
  return /* @__PURE__ */ jsx("div", {
3294
3458
  className: "mt-10 pt-6",
3295
3459
  children: /* @__PURE__ */ jsxs(Row, {
@@ -3301,7 +3465,21 @@ function EndpointResponse(arg0) {
3301
3465
  operation,
3302
3466
  spec,
3303
3467
  selectedStatus,
3304
- onSelectStatus
3468
+ onSelectStatus,
3469
+ query: responseBodySearch.query,
3470
+ search: {
3471
+ open: responseBodySearch.open,
3472
+ action: /* @__PURE__ */ jsx(SchemaSearchButton, {
3473
+ label: t("openapi.searchResponseBodyProperties"),
3474
+ open: responseBodySearch.open,
3475
+ onClick: responseBodySearch.toggle
3476
+ }),
3477
+ input: /* @__PURE__ */ jsx(SchemaSearchInput, {
3478
+ label: t("openapi.searchResponseBodyProperties"),
3479
+ value: responseBodySearch.query,
3480
+ onChange: responseBodySearch.onChange
3481
+ })
3482
+ }
3305
3483
  })
3306
3484
  }) }), /* @__PURE__ */ jsx(Col, {
3307
3485
  sticky: true,
@@ -3314,7 +3492,8 @@ function EndpointResponse(arg0) {
3314
3492
  sharedExampleKey,
3315
3493
  onSelectExampleKey,
3316
3494
  selectedStatus,
3317
- onSelectStatus
3495
+ onSelectStatus,
3496
+ query: responseBodySearch.query
3318
3497
  })
3319
3498
  })
3320
3499
  })]
@@ -5390,4 +5569,4 @@ function OpenApiOperation(arg0) {
5390
5569
  //#endregion
5391
5570
  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 };
5392
5571
 
5393
- //# sourceMappingURL=OpenApiOperation-BcJYHwft.js.map
5572
+ //# sourceMappingURL=OpenApiOperation-Ddax6Pen.js.map