zudoku 0.65.3 → 0.66.0

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 (256) hide show
  1. package/dist/app/sentry.js +1 -1
  2. package/dist/config/validators/BuildSchema.js +18 -3
  3. package/dist/config/validators/BuildSchema.js.map +1 -1
  4. package/dist/config/validators/validate.d.ts +45 -3
  5. package/dist/config/validators/validate.js +7 -1
  6. package/dist/config/validators/validate.js.map +1 -1
  7. package/dist/flat-config.d.ts +9 -2
  8. package/dist/lib/components/Mermaid.d.ts +7 -0
  9. package/dist/lib/components/Mermaid.js +42 -0
  10. package/dist/lib/components/Mermaid.js.map +1 -0
  11. package/dist/lib/components/PagefindSearchMeta.d.ts +8 -0
  12. package/dist/lib/components/PagefindSearchMeta.js +7 -0
  13. package/dist/lib/components/PagefindSearchMeta.js.map +1 -0
  14. package/dist/lib/components/Zudoku.js +2 -5
  15. package/dist/lib/components/Zudoku.js.map +1 -1
  16. package/dist/lib/core/RouteGuard.js +1 -1
  17. package/dist/lib/core/RouteGuard.js.map +1 -1
  18. package/dist/lib/core/plugins.d.ts +3 -3
  19. package/dist/lib/oas/parser/index.d.ts +1 -0
  20. package/dist/lib/oas/parser/index.js.map +1 -1
  21. package/dist/lib/plugins/openapi/DownloadSchemaButton.d.ts +3 -0
  22. package/dist/lib/plugins/openapi/DownloadSchemaButton.js +47 -0
  23. package/dist/lib/plugins/openapi/DownloadSchemaButton.js.map +1 -0
  24. package/dist/lib/plugins/openapi/Endpoint.js +3 -6
  25. package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
  26. package/dist/lib/plugins/openapi/OasProvider.js +22 -13
  27. package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
  28. package/dist/lib/plugins/openapi/OperationList.js +12 -6
  29. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  30. package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
  31. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  32. package/dist/lib/plugins/openapi/SchemaList.js +2 -1
  33. package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
  34. package/dist/lib/plugins/openapi/index.js +11 -5
  35. package/dist/lib/plugins/openapi/index.js.map +1 -1
  36. package/dist/lib/plugins/openapi/interfaces.d.ts +16 -13
  37. package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
  38. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  39. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
  40. package/dist/lib/plugins/openapi/schema/SchemaView.js +14 -6
  41. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  42. package/dist/lib/plugins/openapi/schema/utils.d.ts +2 -2
  43. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  44. package/dist/lib/plugins/openapi/util/getRoutes.d.ts +6 -1
  45. package/dist/lib/plugins/openapi/util/getRoutes.js +29 -2
  46. package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
  47. package/dist/lib/plugins/search-pagefind/IndexingDialog.d.ts +3 -0
  48. package/dist/lib/plugins/search-pagefind/IndexingDialog.js +64 -0
  49. package/dist/lib/plugins/search-pagefind/IndexingDialog.js.map +1 -0
  50. package/dist/lib/plugins/search-pagefind/PagefindSearch.js +22 -5
  51. package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
  52. package/dist/lib/plugins/search-pagefind/ResultList.js +5 -4
  53. package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
  54. package/dist/lib/shiki.d.ts +1 -1
  55. package/dist/lib/shiki.js +18 -12
  56. package/dist/lib/shiki.js.map +1 -1
  57. package/dist/lib/ui/Button.d.ts +2 -2
  58. package/dist/lib/ui/Button.js +9 -8
  59. package/dist/lib/ui/Button.js.map +1 -1
  60. package/dist/lib/ui/ButtonGroup.d.ts +11 -0
  61. package/dist/lib/ui/ButtonGroup.js +28 -0
  62. package/dist/lib/ui/ButtonGroup.js.map +1 -0
  63. package/dist/lib/ui/Command.js +2 -2
  64. package/dist/lib/ui/Command.js.map +1 -1
  65. package/dist/lib/ui/DropdownMenu.d.ts +21 -23
  66. package/dist/lib/ui/DropdownMenu.js +47 -32
  67. package/dist/lib/ui/DropdownMenu.js.map +1 -1
  68. package/dist/lib/ui/Kbd.d.ts +3 -0
  69. package/dist/lib/ui/Kbd.js +10 -0
  70. package/dist/lib/ui/Kbd.js.map +1 -0
  71. package/dist/lib/util/MdxComponents.d.ts +1 -0
  72. package/dist/lib/util/MdxComponents.js +2 -0
  73. package/dist/lib/util/MdxComponents.js.map +1 -1
  74. package/dist/lib/util/flattenAllOf.js +27 -4
  75. package/dist/lib/util/flattenAllOf.js.map +1 -1
  76. package/dist/lib/util/flattenAllOf.test.js +67 -12
  77. package/dist/lib/util/flattenAllOf.test.js.map +1 -1
  78. package/dist/vite/api/SchemaManager.d.ts +5 -0
  79. package/dist/vite/api/SchemaManager.js +24 -0
  80. package/dist/vite/api/SchemaManager.js.map +1 -1
  81. package/dist/vite/api/SchemaManager.test.js +67 -0
  82. package/dist/vite/api/SchemaManager.test.js.map +1 -1
  83. package/dist/vite/config.js +8 -2
  84. package/dist/vite/config.js.map +1 -1
  85. package/dist/vite/dev-server.js +25 -0
  86. package/dist/vite/dev-server.js.map +1 -1
  87. package/dist/vite/pagefind-dev-index.d.ts +16 -0
  88. package/dist/vite/pagefind-dev-index.js +68 -0
  89. package/dist/vite/pagefind-dev-index.js.map +1 -0
  90. package/dist/vite/plugin-api.js +41 -3
  91. package/dist/vite/plugin-api.js.map +1 -1
  92. package/dist/vite/prerender/prerender.js +1 -19
  93. package/dist/vite/prerender/prerender.js.map +1 -1
  94. package/dist/vite/prerender/utils.d.ts +2 -0
  95. package/dist/vite/prerender/utils.js +24 -0
  96. package/dist/vite/prerender/utils.js.map +1 -0
  97. package/lib/Button-CynVW1JV.js +53 -0
  98. package/lib/Button-CynVW1JV.js.map +1 -0
  99. package/lib/ClaudeLogo-PxFjou9w.js +69 -0
  100. package/lib/ClaudeLogo-PxFjou9w.js.map +1 -0
  101. package/lib/{Command-CUcrW3qs.js → Command-BpT1iBE6.js} +25 -25
  102. package/lib/Command-BpT1iBE6.js.map +1 -0
  103. package/lib/Drawer-Ci7XwhqT.js.map +1 -1
  104. package/lib/DropdownMenu-C8SX_-S_.js +104 -0
  105. package/lib/DropdownMenu-C8SX_-S_.js.map +1 -0
  106. package/lib/{ErrorAlert-D5LKLFOd.js → ErrorAlert-BqjbNHIn.js} +1017 -1015
  107. package/lib/{ErrorAlert-D5LKLFOd.js.map → ErrorAlert-BqjbNHIn.js.map} +1 -1
  108. package/lib/IndexingDialog-B5zCiUKr.js +100 -0
  109. package/lib/IndexingDialog-B5zCiUKr.js.map +1 -0
  110. package/lib/MdxPage-CVFatbHw.js +210 -0
  111. package/lib/MdxPage-CVFatbHw.js.map +1 -0
  112. package/lib/Mermaid-CIFixY6C.js +102 -0
  113. package/lib/Mermaid-CIFixY6C.js.map +1 -0
  114. package/lib/{OAuthErrorPage-oXnxcJg4.js → OAuthErrorPage-Dup79DJk.js} +7 -7
  115. package/lib/{OAuthErrorPage-oXnxcJg4.js.map → OAuthErrorPage-Dup79DJk.js.map} +1 -1
  116. package/lib/OasProvider-BJeMq29o.js +40 -0
  117. package/lib/OasProvider-BJeMq29o.js.map +1 -0
  118. package/lib/{OperationList-CmMoKpGu.js → OperationList-ff3ZvQsO.js} +1701 -1585
  119. package/lib/OperationList-ff3ZvQsO.js.map +1 -0
  120. package/lib/{RouteGuard-Brz95MSt.js → RouteGuard-BXy13JSz.js} +19 -19
  121. package/lib/{RouteGuard-Brz95MSt.js.map → RouteGuard-BXy13JSz.js.map} +1 -1
  122. package/lib/{RouterError-VGZB_wg4.js → RouterError-CKOZTsDD.js} +3 -3
  123. package/lib/{RouterError-VGZB_wg4.js.map → RouterError-CKOZTsDD.js.map} +1 -1
  124. package/lib/{SchemaList-BykD27ga.js → SchemaList-BSC1KM3v.js} +28 -27
  125. package/lib/SchemaList-BSC1KM3v.js.map +1 -0
  126. package/lib/{SchemaView-Dt6hbCAt.js → SchemaView-CgwJ9gtb.js} +198 -187
  127. package/lib/SchemaView-CgwJ9gtb.js.map +1 -0
  128. package/lib/Select-VmDZ-nKe.js +337 -0
  129. package/lib/Select-VmDZ-nKe.js.map +1 -0
  130. package/lib/{SignUp-D2mmQOkg.js → SignUp-Pm_LGm6T.js} +13 -13
  131. package/lib/{SignUp-D2mmQOkg.js.map → SignUp-Pm_LGm6T.js.map} +1 -1
  132. package/lib/{SyntaxHighlight-C19vH0V_.js → SyntaxHighlight-bkmst3oV.js} +654 -622
  133. package/lib/SyntaxHighlight-bkmst3oV.js.map +1 -0
  134. package/lib/{Toc-CBWfFCVf.js → Toc-TUXNFbKl.js} +2 -2
  135. package/lib/{Toc-CBWfFCVf.js.map → Toc-TUXNFbKl.js.map} +1 -1
  136. package/lib/{ZudokuContext-BUZ5hkWB.js → ZudokuContext-np1wheDl.js} +8 -8
  137. package/lib/{ZudokuContext-BUZ5hkWB.js.map → ZudokuContext-np1wheDl.js.map} +1 -1
  138. package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js +9 -0
  139. package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js.map +1 -0
  140. package/lib/{chunk-PVWAREVJ-BMhpCH5D.js → chunk-PVWAREVJ-dLIqswPy.js} +5 -5
  141. package/lib/{chunk-PVWAREVJ-BMhpCH5D.js.map → chunk-PVWAREVJ-dLIqswPy.js.map} +1 -1
  142. package/lib/{circular-CNHs4gAz.js → circular-XPj_dwqA.js} +2 -2
  143. package/lib/{circular-CNHs4gAz.js.map → circular-XPj_dwqA.js.map} +1 -1
  144. package/lib/createServer-D01nCTNp.js +16693 -0
  145. package/lib/createServer-D01nCTNp.js.map +1 -0
  146. package/lib/{errors-D7xzOd8X.js → errors-B0hNTPFO.js} +3 -3
  147. package/lib/{errors-D7xzOd8X.js.map → errors-B0hNTPFO.js.map} +1 -1
  148. package/lib/{hook-CMeoxziF.js → hook-CvSwcbk6.js} +3 -3
  149. package/lib/{hook-CMeoxziF.js.map → hook-CvSwcbk6.js.map} +1 -1
  150. package/lib/{index-unv8c40u.js → index-Bjc_QsUR.js} +754 -738
  151. package/lib/{index-unv8c40u.js.map → index-Bjc_QsUR.js.map} +1 -1
  152. package/lib/index-CrcNWbel.js.map +1 -1
  153. package/lib/index-DnMgJWrI.js +133 -0
  154. package/lib/index-DnMgJWrI.js.map +1 -0
  155. package/lib/{index-CF7_erXq.js → index-DscsS121.js} +2 -2
  156. package/lib/{index-CF7_erXq.js.map → index-DscsS121.js.map} +1 -1
  157. package/lib/{index-CPws05Tb.js → index-mfkNWYG-.js} +10 -10
  158. package/lib/{index-CPws05Tb.js.map → index-mfkNWYG-.js.map} +1 -1
  159. package/lib/{index.esm-BnYHxCYC.js → index.esm-DtzT_KoE.js} +20 -20
  160. package/lib/{index.esm-BnYHxCYC.js.map → index.esm-DtzT_KoE.js.map} +1 -1
  161. package/lib/{invariant-Bm-FVUQE.js → invariant-CGOLuIIz.js} +3 -3
  162. package/lib/{invariant-Bm-FVUQE.js.map → invariant-CGOLuIIz.js.map} +1 -1
  163. package/lib/{mutation-BSU0xu4m.js → mutation-BlmnL5qL.js} +2 -2
  164. package/lib/{mutation-BSU0xu4m.js.map → mutation-BlmnL5qL.js.map} +1 -1
  165. package/lib/ui/ActionButton.js +1 -1
  166. package/lib/ui/Button.js +25 -24
  167. package/lib/ui/Button.js.map +1 -1
  168. package/lib/ui/ButtonGroup.js +77 -0
  169. package/lib/ui/ButtonGroup.js.map +1 -0
  170. package/lib/ui/Command.js +3 -3
  171. package/lib/ui/Command.js.map +1 -1
  172. package/lib/ui/DropdownMenu.js +227 -140
  173. package/lib/ui/DropdownMenu.js.map +1 -1
  174. package/lib/ui/Kbd.js +32 -0
  175. package/lib/ui/Kbd.js.map +1 -0
  176. package/lib/ui/SyntaxHighlight.js +3 -3
  177. package/lib/zudoku.__internal.js +8 -8
  178. package/lib/zudoku.auth-auth0.js +1 -1
  179. package/lib/zudoku.auth-azureb2c.js +4 -4
  180. package/lib/zudoku.auth-clerk.js +2 -2
  181. package/lib/zudoku.auth-openid.js +5 -5
  182. package/lib/zudoku.auth-supabase.js +5 -5
  183. package/lib/zudoku.components.js +7 -7
  184. package/lib/zudoku.hooks.js +11 -24
  185. package/lib/zudoku.hooks.js.map +1 -1
  186. package/lib/zudoku.mermaid.js +10 -0
  187. package/lib/zudoku.mermaid.js.map +1 -0
  188. package/lib/zudoku.plugin-api-catalog.js +6 -6
  189. package/lib/zudoku.plugin-api-keys.js +223 -198
  190. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  191. package/lib/zudoku.plugin-custom-pages.js +1 -1
  192. package/lib/zudoku.plugin-markdown.js +1 -1
  193. package/lib/zudoku.plugin-openapi.js +3 -3
  194. package/lib/zudoku.plugin-redirect.js +1 -1
  195. package/lib/zudoku.plugin-search-pagefind.js +184 -226
  196. package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
  197. package/lib/zudoku.plugins.js.map +1 -1
  198. package/lib/zudoku.router.js +2 -2
  199. package/package.json +29 -21
  200. package/src/app/sentry.ts +1 -1
  201. package/src/lib/components/Mermaid.tsx +68 -0
  202. package/src/lib/components/PagefindSearchMeta.tsx +14 -0
  203. package/src/lib/components/Zudoku.tsx +4 -7
  204. package/src/lib/core/RouteGuard.tsx +1 -1
  205. package/src/lib/core/plugins.ts +2 -2
  206. package/src/lib/oas/parser/index.ts +2 -0
  207. package/src/lib/plugins/openapi/DownloadSchemaButton.tsx +115 -0
  208. package/src/lib/plugins/openapi/Endpoint.tsx +20 -27
  209. package/src/lib/plugins/openapi/OasProvider.tsx +30 -17
  210. package/src/lib/plugins/openapi/OperationList.tsx +39 -21
  211. package/src/lib/plugins/openapi/OperationListItem.tsx +5 -5
  212. package/src/lib/plugins/openapi/SchemaList.tsx +4 -0
  213. package/src/lib/plugins/openapi/index.tsx +16 -7
  214. package/src/lib/plugins/openapi/interfaces.ts +16 -7
  215. package/src/lib/plugins/openapi/playground/Playground.tsx +1 -1
  216. package/src/lib/plugins/openapi/schema/SchemaView.tsx +36 -27
  217. package/src/lib/plugins/openapi/schema/utils.ts +5 -2
  218. package/src/lib/plugins/openapi/util/getRoutes.tsx +35 -3
  219. package/src/lib/plugins/search-pagefind/IndexingDialog.tsx +163 -0
  220. package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +61 -22
  221. package/src/lib/plugins/search-pagefind/ResultList.tsx +8 -3
  222. package/src/lib/shiki.ts +21 -12
  223. package/src/lib/ui/Button.tsx +10 -10
  224. package/src/lib/ui/ButtonGroup.tsx +82 -0
  225. package/src/lib/ui/Command.tsx +3 -3
  226. package/src/lib/ui/DropdownMenu.tsx +226 -170
  227. package/src/lib/ui/Kbd.tsx +28 -0
  228. package/src/lib/util/MdxComponents.tsx +2 -0
  229. package/src/lib/util/flattenAllOf.test.ts +71 -19
  230. package/src/lib/util/flattenAllOf.ts +29 -8
  231. package/src/shiki/langs/markdown-nix.js +1 -0
  232. package/src/shiki/langs/openscad.js +1 -0
  233. package/dist/vite/create-pagefind-index.d.ts +0 -4
  234. package/dist/vite/create-pagefind-index.js +0 -12
  235. package/dist/vite/create-pagefind-index.js.map +0 -1
  236. package/lib/Button-B3ucvvQw.js +0 -52
  237. package/lib/Button-B3ucvvQw.js.map +0 -1
  238. package/lib/Command-CUcrW3qs.js.map +0 -1
  239. package/lib/DropdownMenu-BZ2NKQ3K.js +0 -126
  240. package/lib/DropdownMenu-BZ2NKQ3K.js.map +0 -1
  241. package/lib/MdxPage-hOCN-u-L.js +0 -240
  242. package/lib/MdxPage-hOCN-u-L.js.map +0 -1
  243. package/lib/OasProvider-CpniNNrW.js +0 -36
  244. package/lib/OasProvider-CpniNNrW.js.map +0 -1
  245. package/lib/OperationList-CmMoKpGu.js.map +0 -1
  246. package/lib/Pagination-lLSoHnxa.js +0 -37
  247. package/lib/Pagination-lLSoHnxa.js.map +0 -1
  248. package/lib/SchemaList-BykD27ga.js.map +0 -1
  249. package/lib/SchemaView-Dt6hbCAt.js.map +0 -1
  250. package/lib/Select-DFRCS31-.js +0 -399
  251. package/lib/Select-DFRCS31-.js.map +0 -1
  252. package/lib/SyntaxHighlight-C19vH0V_.js.map +0 -1
  253. package/lib/createServer-BmcVQAOQ.js +0 -13018
  254. package/lib/createServer-BmcVQAOQ.js.map +0 -1
  255. package/lib/useExposedProps-U3pmsHaG.js +0 -113
  256. package/lib/useExposedProps-U3pmsHaG.js.map +0 -1
@@ -1,25 +1,28 @@
1
1
  import { j as t } from "./jsx-runtime-BzflLqGi.js";
2
- import { ChevronUpIcon as L, ChevronDownIcon as M, ChevronsLeftRightIcon as T, MinusIcon as _, PlusIcon as J, RefreshCcwDotIcon as U, InfoIcon as G } from "lucide-react";
3
- import { useState as f, isValidElement as K, Fragment as A } from "react";
2
+ import { ChevronUpIcon as T, ChevronDownIcon as _, ChevronsLeftRightIcon as J, MinusIcon as U, PlusIcon as G, RefreshCcwDotIcon as K, InfoIcon as W } from "lucide-react";
3
+ import { useState as j, isValidElement as Q, Fragment as C } from "react";
4
4
  import { c as a } from "./cn-dYga0KKN.js";
5
- import { Slot as W } from "@radix-ui/react-slot";
6
- import { c as Q } from "./index-DI5SPFK9.js";
7
- import { Separator as X } from "./ui/Separator.js";
8
- import { S as m, I as V, M as q } from "./ErrorAlert-D5LKLFOd.js";
9
- import { B as Y } from "./Button-B3ucvvQw.js";
10
- import * as C from "@radix-ui/react-collapsible";
11
- import { Button as Z } from "./ui/Button.js";
12
- import { Badge as H } from "./ui/Badge.js";
13
- import { Frame as ee, FramePanel as te } from "./ui/Frame.js";
14
- import { C as re } from "./circular-CNHs4gAz.js";
15
- const ne = (e, r) => e.reduce(
16
- (n, s) => {
17
- const o = r(s);
18
- return n[o] || (n[o] = []), n[o].push(s), n;
5
+ import { Slot as X } from "@radix-ui/react-slot";
6
+ import { c as Y } from "./index-DI5SPFK9.js";
7
+ import { Separator as Z } from "./ui/Separator.js";
8
+ import { S as m, I as q, M as E } from "./ErrorAlert-BqjbNHIn.js";
9
+ import { B as H } from "./Button-CynVW1JV.js";
10
+ import * as P from "@radix-ui/react-collapsible";
11
+ import { Button as ee } from "./ui/Button.js";
12
+ import { Badge as te } from "./ui/Badge.js";
13
+ import { Frame as re, FramePanel as ne } from "./ui/Frame.js";
14
+ import { C as se } from "./circular-XPj_dwqA.js";
15
+ const Ee = ({
16
+ name: e,
17
+ children: r
18
+ }) => /* @__PURE__ */ t.jsx("span", { "data-pagefind-meta": e, className: "sr-only", children: r }), ie = (e, r) => e.reduce(
19
+ (n, i) => {
20
+ const o = r(i);
21
+ return n[o] || (n[o] = []), n[o].push(i), n;
19
22
  },
20
23
  {}
21
24
  );
22
- function g({ className: e, ...r }) {
25
+ function N({ className: e, ...r }) {
23
26
  return /* @__PURE__ */ t.jsx(
24
27
  "div",
25
28
  {
@@ -32,7 +35,7 @@ function g({ className: e, ...r }) {
32
35
  }
33
36
  );
34
37
  }
35
- function N({ className: e, ...r }) {
38
+ function b({ className: e, ...r }) {
36
39
  return /* @__PURE__ */ t.jsx(
37
40
  "div",
38
41
  {
@@ -46,7 +49,7 @@ function N({ className: e, ...r }) {
46
49
  }
47
50
  );
48
51
  }
49
- function se({ className: e, ...r }) {
52
+ function oe({ className: e, ...r }) {
50
53
  return /* @__PURE__ */ t.jsx(
51
54
  "header",
52
55
  {
@@ -56,7 +59,7 @@ function se({ className: e, ...r }) {
56
59
  }
57
60
  );
58
61
  }
59
- function ie({
62
+ function le({
60
63
  className: e,
61
64
  ...r
62
65
  }) {
@@ -69,7 +72,7 @@ function ie({
69
72
  }
70
73
  );
71
74
  }
72
- function oe({ className: e, ...r }) {
75
+ function ae({ className: e, ...r }) {
73
76
  return /* @__PURE__ */ t.jsx(
74
77
  "footer",
75
78
  {
@@ -79,7 +82,7 @@ function oe({ className: e, ...r }) {
79
82
  }
80
83
  );
81
84
  }
82
- function le({ className: e, ...r }) {
85
+ function de({ className: e, ...r }) {
83
86
  return /* @__PURE__ */ t.jsx(
84
87
  "div",
85
88
  {
@@ -90,12 +93,12 @@ function le({ className: e, ...r }) {
90
93
  }
91
94
  );
92
95
  }
93
- function P({
96
+ function S({
94
97
  className: e,
95
98
  ...r
96
99
  }) {
97
100
  return /* @__PURE__ */ t.jsx(
98
- X,
101
+ Z,
99
102
  {
100
103
  "data-slot": "item-separator",
101
104
  orientation: "horizontal",
@@ -104,7 +107,7 @@ function P({
104
107
  }
105
108
  );
106
109
  }
107
- const ae = Q(
110
+ const ce = Y(
108
111
  "group/item flex items-center border border-transparent text-sm rounded-md transition-colors [a]:hover:bg-accent/50 [a]:transition-colors duration-100 flex-wrap outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
109
112
  {
110
113
  variants: {
@@ -128,22 +131,22 @@ function $({
128
131
  className: e,
129
132
  variant: r = "default",
130
133
  size: n = "default",
131
- asChild: s = !1,
134
+ asChild: i = !1,
132
135
  ...o
133
136
  }) {
134
- const i = s ? W : "div";
137
+ const s = i ? X : "div";
135
138
  return /* @__PURE__ */ t.jsx(
136
- i,
139
+ s,
137
140
  {
138
141
  "data-slot": "item",
139
142
  "data-variant": r,
140
143
  "data-size": n,
141
- className: a(ae({ variant: r, size: n, className: e })),
144
+ className: a(ce({ variant: r, size: n, className: e })),
142
145
  ...o
143
146
  }
144
147
  );
145
148
  }
146
- function y({ className: e, ...r }) {
149
+ function g({ className: e, ...r }) {
147
150
  return /* @__PURE__ */ t.jsx(
148
151
  "div",
149
152
  {
@@ -156,7 +159,7 @@ function y({ className: e, ...r }) {
156
159
  }
157
160
  );
158
161
  }
159
- function S({ className: e, ...r }) {
162
+ function w({ className: e, ...r }) {
160
163
  return /* @__PURE__ */ t.jsx(
161
164
  "div",
162
165
  {
@@ -169,7 +172,7 @@ function S({ className: e, ...r }) {
169
172
  }
170
173
  );
171
174
  }
172
- function de({ className: e, ...r }) {
175
+ function pe({ className: e, ...r }) {
173
176
  return /* @__PURE__ */ t.jsx(
174
177
  "div",
175
178
  {
@@ -179,36 +182,36 @@ function de({ className: e, ...r }) {
179
182
  }
180
183
  );
181
184
  }
182
- const E = ({
185
+ const z = ({
183
186
  schema: e,
184
187
  hideDescription: r = !1
185
188
  }) => /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-1", children: /* @__PURE__ */ t.jsxs("div", { children: [
186
189
  /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Const value: " }),
187
190
  /* @__PURE__ */ t.jsx(m, { className: "border rounded px-1 font-mono", children: e.const }),
188
191
  !r && e.description && /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground", children: e.description })
189
- ] }) }), b = ({
192
+ ] }) }), v = ({
190
193
  values: e,
191
194
  className: r,
192
195
  maxVisibleValues: n = 8
193
196
  }) => {
194
- const [s, o] = f(!1);
197
+ const [i, o] = j(!1);
195
198
  if (!e.length) return null;
196
- const i = e.length > n, l = i && !s ? e.slice(0, n) : e;
199
+ const s = e.length > n, l = s && !i ? e.slice(0, n) : e;
197
200
  return /* @__PURE__ */ t.jsxs("div", { className: a("flex flex-wrap gap-1.5", r), children: [
198
201
  /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Enum values:" }),
199
- l.map((d) => /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(m, { className: "border rounded-sm px-1 font-mono", children: d }) }, d)),
200
- i && /* @__PURE__ */ t.jsx(
201
- Y,
202
+ l.map((c) => /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(m, { className: "border rounded-sm px-1 font-mono", children: c }) }, c)),
203
+ s && /* @__PURE__ */ t.jsx(
204
+ H,
202
205
  {
203
206
  variant: "ghost",
204
207
  size: "sm",
205
208
  className: "h-fit px-0",
206
- onClick: () => o(!s),
207
- children: s ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-1", children: [
208
- /* @__PURE__ */ t.jsx(L, { size: 12 }),
209
+ onClick: () => o(!i),
210
+ children: i ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-1", children: [
211
+ /* @__PURE__ */ t.jsx(T, { size: 12 }),
209
212
  /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "show less" })
210
213
  ] }) : /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-1", children: [
211
- /* @__PURE__ */ t.jsx(M, { size: 12 }),
214
+ /* @__PURE__ */ t.jsx(_, { size: 12 }),
212
215
  /* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground", children: [
213
216
  "show ",
214
217
  e.length - n,
@@ -218,21 +221,21 @@ const E = ({
218
221
  }
219
222
  )
220
223
  ] });
221
- }, ce = ({ pattern: e }) => {
222
- const [r, n] = f(!1), s = e.length > 20, o = s ? `${e.slice(0, 20)}…` : e;
224
+ }, xe = ({ pattern: e }) => {
225
+ const [r, n] = j(!1), i = e.length > 20, o = i ? `${e.slice(0, 20)}…` : e;
223
226
  return /* @__PURE__ */ t.jsxs(
224
- V,
227
+ q,
225
228
  {
226
- className: a("text-xs", s && "cursor-pointer"),
229
+ className: a("text-xs", i && "cursor-pointer"),
227
230
  onClick: () => n(!r),
228
231
  selectOnClick: !1,
229
232
  children: [
230
233
  r ? e : o,
231
- s && /* @__PURE__ */ t.jsx("button", { type: "button", className: "p-1 translate-y-[2px]", children: !r && /* @__PURE__ */ t.jsx(T, { size: 12 }) })
234
+ i && /* @__PURE__ */ t.jsx("button", { type: "button", className: "p-1 translate-y-[2px]", children: !r && /* @__PURE__ */ t.jsx(J, { size: 12 }) })
232
235
  ]
233
236
  }
234
237
  );
235
- }, xe = (e) => e ? [
238
+ }, ue = (e) => e ? [
236
239
  e.type === "array" && e.items.type ? Array.isArray(e.items.type) ? `(${e.items.type.join(" | ")})[]` : `${e.items.type}[]` : Array.isArray(e.type) ? e.type.join(" | ") : e.type,
237
240
  e.enum && "enum",
238
241
  e.const && "const",
@@ -251,24 +254,24 @@ const E = ({
251
254
  e.deprecated && "deprecated",
252
255
  e.pattern && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
253
256
  "pattern: ",
254
- /* @__PURE__ */ t.jsx(ce, { pattern: e.pattern })
257
+ /* @__PURE__ */ t.jsx(xe, { pattern: e.pattern })
255
258
  ] })
256
- ] : [], v = ({
259
+ ] : [], h = ({
257
260
  schema: e,
258
261
  extraItems: r = [],
259
262
  className: n
260
263
  }) => {
261
- const s = [...xe(e), ...r].flatMap(
262
- (o) => typeof o == "string" || K(o) ? o : []
264
+ const i = [...ue(e), ...r].flatMap(
265
+ (o) => typeof o == "string" || Q(o) ? o : []
263
266
  );
264
- return /* @__PURE__ */ t.jsx("span", { className: n, children: s.map((o, i) => (
267
+ return /* @__PURE__ */ t.jsx("span", { className: n, children: i.map((o, s) => (
265
268
  // biome-ignore lint/suspicious/noArrayIndexKey: index should be stable
266
269
  /* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground", children: [
267
270
  o,
268
- i < s.length - 1 && /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground/50", children: " · " })
269
- ] }, i)
271
+ s < i.length - 1 && /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground/50", children: " · " })
272
+ ] }, s)
270
273
  )) });
271
- }, h = ({
274
+ }, I = ({
272
275
  schema: e
273
276
  }) => {
274
277
  const r = e.examples?.at(0), n = e.default;
@@ -282,104 +285,104 @@ const E = ({
282
285
  /* @__PURE__ */ t.jsx(m, { className: "border rounded-sm px-1 font-mono", children: typeof n == "object" || typeof n == "boolean" ? JSON.stringify(n) : n })
283
286
  ] })
284
287
  ] });
285
- }, z = (e) => typeof e == "string" && ["string", "number", "boolean", "integer", "null"].includes(e) || Array.isArray(e) && e.every(z), I = (e) => e.type === "array" || // schema.type might be an array of types, so we need to check if "array" is one of them
286
- Array.isArray(e.type) && e.type.includes("array"), w = (e) => e && (e.type === "object" && Object.keys(e.properties ?? {}).length > 0 || e.type === "array" && typeof e.items == "object" && (!e.items.type || e.items.type === "object")), R = (e) => typeof e == "string" && e.startsWith(re), k = (e) => I(e) && "items" in e && R(e.items), pe = (e) => typeof e == "string" ? e.split(":")[1] : void 0, F = ({ circularProp: e }) => /* @__PURE__ */ t.jsxs(
287
- V,
288
+ }, R = (e) => typeof e == "string" && ["string", "number", "boolean", "integer", "null"].includes(e) || Array.isArray(e) && e.every(R), f = (e) => e.type === "array" || // schema.type might be an array of types, so we need to check if "array" is one of them
289
+ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "object" && Object.keys(e.properties ?? {}).length > 0 || e.type === "array" && typeof e.items == "object" && (!e.items.type || e.items.type === "object")), B = (e) => typeof e == "string" && e.startsWith(se), F = (e) => f(e) && "items" in e && B(e.items), me = (e) => typeof e == "string" ? e.split(":")[1] : void 0, V = ({ circularProp: e }) => /* @__PURE__ */ t.jsxs(
290
+ q,
288
291
  {
289
292
  className: "inline-flex items-center gap-1.5 text-xs translate-y-0.5",
290
293
  selectOnClick: !1,
291
294
  children: [
292
- /* @__PURE__ */ t.jsx(U, { size: 13 }),
295
+ /* @__PURE__ */ t.jsx(K, { size: 13 }),
293
296
  /* @__PURE__ */ t.jsx("span", { children: e ? `${e} (circular)` : "circular" })
294
297
  ]
295
298
  }
296
- ), ue = ({
299
+ ), fe = ({
297
300
  name: e,
298
301
  schema: r,
299
302
  group: n,
300
- defaultOpen: s = !1,
303
+ defaultOpen: i = !1,
301
304
  showCollapseButton: o = !0
302
305
  }) => {
303
- const [i, l] = f(s);
304
- if (R(r))
305
- return /* @__PURE__ */ t.jsx($, { children: /* @__PURE__ */ t.jsxs(y, { className: "gap-y-2", children: [
306
+ const [s, l] = j(i);
307
+ if (B(r))
308
+ return /* @__PURE__ */ t.jsx($, { children: /* @__PURE__ */ t.jsxs(g, { className: "gap-y-2", children: [
306
309
  /* @__PURE__ */ t.jsxs("div", { children: [
307
- /* @__PURE__ */ t.jsx(S, { className: "inline me-2", children: /* @__PURE__ */ t.jsx("code", { children: e }) }),
310
+ /* @__PURE__ */ t.jsx(w, { className: "inline me-2", children: /* @__PURE__ */ t.jsx("code", { children: e }) }),
308
311
  /* @__PURE__ */ t.jsx(
309
- v,
312
+ h,
310
313
  {
311
314
  className: "inline",
312
315
  schema: r,
313
316
  extraItems: [
314
317
  n !== "optional" && /* @__PURE__ */ t.jsx("span", { className: "text-primary", children: "required" }),
315
- /* @__PURE__ */ t.jsx(F, {}, "circular-ref")
318
+ /* @__PURE__ */ t.jsx(V, {}, "circular-ref")
316
319
  ]
317
320
  }
318
321
  )
319
322
  ] }),
320
- /* @__PURE__ */ t.jsx(h, { schema: r })
323
+ /* @__PURE__ */ t.jsx(I, { schema: r })
321
324
  ] }) });
322
- const d = !!((r.allOf || r.anyOf || r.oneOf || w(r) || I(r) && "items" in r && w(r.items) || r.additionalProperties) && !k(r)), c = !!(r.description || "items" in r && r.items?.enum || r.const || r.enum || r.example !== void 0 || r.default !== void 0);
325
+ const c = !!((r.allOf || r.anyOf || r.oneOf || k(r) || f(r) && "items" in r && k(r.items) || r.additionalProperties) && !F(r)), x = !!(r.description || "items" in r && r.items?.enum || r.const || r.enum || r.example !== void 0 || r.default !== void 0);
323
326
  return /* @__PURE__ */ t.jsxs($, { children: [
324
- /* @__PURE__ */ t.jsxs(y, { className: "gap-y-2", children: [
327
+ /* @__PURE__ */ t.jsxs(g, { className: "gap-y-2", children: [
325
328
  /* @__PURE__ */ t.jsxs("div", { children: [
326
- /* @__PURE__ */ t.jsx(S, { className: "inline me-2", children: d ? /* @__PURE__ */ t.jsx(
329
+ /* @__PURE__ */ t.jsx(w, { className: "inline me-2", children: c ? /* @__PURE__ */ t.jsx(
327
330
  "button",
328
331
  {
329
- onClick: () => l(!i),
332
+ onClick: () => l(!s),
330
333
  type: "button",
331
334
  className: "hover:underline",
332
335
  children: /* @__PURE__ */ t.jsx("code", { children: e })
333
336
  }
334
337
  ) : /* @__PURE__ */ t.jsx("code", { children: e }) }),
335
338
  /* @__PURE__ */ t.jsx(
336
- v,
339
+ h,
337
340
  {
338
341
  className: "inline",
339
342
  schema: r,
340
343
  extraItems: [
341
344
  n !== "optional" && /* @__PURE__ */ t.jsx("span", { className: "text-primary", children: "required" }),
342
- k(r) && /* @__PURE__ */ t.jsx(
343
- F,
345
+ F(r) && /* @__PURE__ */ t.jsx(
346
+ V,
344
347
  {
345
- circularProp: pe(r.items)
348
+ circularProp: me(r.items)
346
349
  }
347
350
  )
348
351
  ]
349
352
  }
350
353
  )
351
354
  ] }),
352
- c && /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-1.5", children: [
353
- r.description && /* @__PURE__ */ t.jsx(q, { className: "prose-sm", content: r.description }),
354
- "items" in r && r.items?.enum && /* @__PURE__ */ t.jsx(b, { values: r.items.enum }),
355
- r.const && /* @__PURE__ */ t.jsx(E, { schema: r, hideDescription: !0 }),
356
- r.enum && /* @__PURE__ */ t.jsx(b, { values: r.enum }),
357
- /* @__PURE__ */ t.jsx(h, { schema: r })
355
+ x && /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-1.5", children: [
356
+ r.description && /* @__PURE__ */ t.jsx(E, { className: "prose-sm", content: r.description }),
357
+ "items" in r && r.items?.enum && /* @__PURE__ */ t.jsx(v, { values: r.items.enum }),
358
+ r.const && /* @__PURE__ */ t.jsx(z, { schema: r, hideDescription: !0 }),
359
+ r.enum && /* @__PURE__ */ t.jsx(v, { values: r.enum }),
360
+ /* @__PURE__ */ t.jsx(I, { schema: r })
358
361
  ] })
359
362
  ] }),
360
- d && o && /* @__PURE__ */ t.jsx(de, { className: "self-start", children: /* @__PURE__ */ t.jsx(
361
- Z,
363
+ c && o && /* @__PURE__ */ t.jsx(pe, { className: "self-start", children: /* @__PURE__ */ t.jsx(
364
+ ee,
362
365
  {
363
366
  variant: "ghost",
364
367
  size: "icon",
365
368
  className: "rounded-full",
366
- onClick: () => l(!i),
369
+ onClick: () => l(!s),
367
370
  "aria-label": "Toggle properties",
368
- children: i ? /* @__PURE__ */ t.jsx(_, { size: 16 }) : /* @__PURE__ */ t.jsx(J, { size: 16 })
371
+ children: s ? /* @__PURE__ */ t.jsx(U, { size: 16 }) : /* @__PURE__ */ t.jsx(G, { size: 16 })
369
372
  }
370
373
  ) }),
371
- d && /* @__PURE__ */ t.jsx(
372
- C.Root,
374
+ c && /* @__PURE__ */ t.jsx(
375
+ P.Root,
373
376
  {
374
- defaultOpen: s,
375
- open: i,
377
+ defaultOpen: i,
378
+ open: s,
376
379
  onOpenChange: l,
377
- className: a("w-full", !i && "contents"),
378
- children: /* @__PURE__ */ t.jsx(C.Content, { asChild: !0, children: /* @__PURE__ */ t.jsx(y, { children: r.anyOf || r.oneOf || r.type === "object" ? /* @__PURE__ */ t.jsx(p, { schema: r }) : I(r) && "items" in r ? /* @__PURE__ */ t.jsx(p, { schema: r.items }) : null }) })
380
+ className: a("w-full", !s && "contents"),
381
+ children: /* @__PURE__ */ t.jsx(P.Content, { asChild: !0, children: /* @__PURE__ */ t.jsx(g, { children: r.anyOf || r.oneOf || r.type === "object" ? /* @__PURE__ */ t.jsx(u, { schema: r }) : f(r) && "items" in r ? /* @__PURE__ */ t.jsx(u, { schema: r.items }) : null }) })
379
382
  }
380
383
  )
381
384
  ] });
382
- }, B = (e) => {
385
+ }, M = (e) => {
383
386
  const r = e.oneOf ?? e.anyOf ?? [];
384
387
  return e.properties && Object.keys(e.properties).length > 0 ? r.map((n) => !n.properties && !n.type && !n.oneOf && !n.anyOf ? {
385
388
  ...n,
@@ -387,42 +390,42 @@ Array.isArray(e.type) && e.type.includes("array"), w = (e) => e && (e.type === "
387
390
  properties: e.properties,
388
391
  required: n.required ?? e.required
389
392
  } : n) : r;
390
- }, me = (e) => {
393
+ }, je = (e) => {
391
394
  if (Array.isArray(e.oneOf)) return "exactly-one";
392
395
  const r = e.discriminator?.propertyName;
393
396
  if (!r) return "at-least-one";
394
- const n = B(e), s = /* @__PURE__ */ new Set();
397
+ const n = M(e), i = /* @__PURE__ */ new Set();
395
398
  for (const o of n) {
396
- const i = o.properties?.[r], l = i?.const ?? (Array.isArray(i?.enum) && i.enum.length === 1 ? String(i.enum[0]) : void 0);
397
- if (l == null || s.has(String(l))) return "at-least-one";
398
- s.add(String(l));
399
+ const s = o.properties?.[r], l = s?.const ?? (Array.isArray(s?.enum) && s.enum.length === 1 ? String(s.enum[0]) : void 0);
400
+ if (l == null || i.has(String(l))) return "at-least-one";
401
+ i.add(String(l));
399
402
  }
400
403
  return "exactly-one";
401
- }, O = (e, r) => r.title?.trim() || `Variant ${e + 1}`, fe = (e, r) => {
404
+ }, O = (e, r) => r.title?.trim() || `Variant ${e + 1}`, ye = (e, r) => {
402
405
  const n = [];
403
406
  e.type && n.push(
404
407
  `type = ${Array.isArray(e.type) ? e.type.join("|") : e.type}`
405
408
  );
406
- const s = r?.discriminator?.propertyName;
407
- if (s) {
408
- const i = e.properties?.[s], l = i?.const ?? (Array.isArray(i?.enum) && i.enum.length === 1 ? i.enum[0] : void 0);
409
- l !== void 0 && n.push(`${s}=${JSON.stringify(l)}`);
409
+ const i = r?.discriminator?.propertyName;
410
+ if (i) {
411
+ const s = e.properties?.[i], l = s?.const ?? (Array.isArray(s?.enum) && s.enum.length === 1 ? s.enum[0] : void 0);
412
+ l !== void 0 && n.push(`${i}=${JSON.stringify(l)}`);
410
413
  }
411
- const o = (e.required ?? []).filter((i) => i !== s);
414
+ const o = (e.required ?? []).filter((s) => s !== i);
412
415
  if (o.length) {
413
- const i = o.slice(0, 3).join(", "), l = o.length > 3 ? ` +${o.length - 3} more` : "";
414
- n.push(`requires: ${i}${l}`);
416
+ const s = o.slice(0, 3).join(", "), l = o.length > 3 ? ` +${o.length - 3} more` : "";
417
+ n.push(`requires: ${s}${l}`);
415
418
  }
416
419
  return n;
417
- }, je = ({
420
+ }, ge = ({
418
421
  variants: e,
419
422
  schema: r,
420
423
  selectedVariant: n,
421
- onSelectVariant: s
424
+ onSelectVariant: i
422
425
  }) => {
423
- const o = e.map((i, l) => ({
424
- label: O(l, i),
425
- guards: fe(i, r)
426
+ const o = e.map((s, l) => ({
427
+ label: O(l, s),
428
+ guards: ye(s, r)
426
429
  }));
427
430
  return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2 text-sm", children: [
428
431
  /* @__PURE__ */ t.jsx("h4", { className: "font-medium", children: "Decision Table" }),
@@ -431,32 +434,32 @@ Array.isArray(e.type) && e.type.includes("array"), w = (e) => e && (e.type === "
431
434
  /* @__PURE__ */ t.jsx("th", { className: "text-left p-2 font-medium", children: "Variant" }),
432
435
  /* @__PURE__ */ t.jsx("th", { className: "text-left p-2 font-medium", children: "Matching Criteria" })
433
436
  ] }) }),
434
- /* @__PURE__ */ t.jsx("tbody", { className: "divide-y", children: o.map((i) => /* @__PURE__ */ t.jsxs("tr", { className: "hover:bg-muted/30", children: [
437
+ /* @__PURE__ */ t.jsx("tbody", { className: "divide-y", children: o.map((s) => /* @__PURE__ */ t.jsxs("tr", { className: "hover:bg-muted/30", children: [
435
438
  /* @__PURE__ */ t.jsx("td", { className: "p-2 font-medium", children: /* @__PURE__ */ t.jsx(
436
439
  "button",
437
440
  {
438
441
  type: "button",
439
442
  className: a(
440
443
  "hover:underline",
441
- n === i.label && "text-primary"
444
+ n === s.label && "text-primary"
442
445
  ),
443
- onClick: () => s(i.label),
444
- children: i.label
446
+ onClick: () => i(s.label),
447
+ children: s.label
445
448
  }
446
449
  ) }),
447
- /* @__PURE__ */ t.jsx("td", { className: "p-2 text-muted-foreground text-xs", children: i.guards.length > 0 ? i.guards.join(" · ") : "No specific criteria" })
448
- ] }, i.label)) })
450
+ /* @__PURE__ */ t.jsx("td", { className: "p-2 text-muted-foreground text-xs", children: s.guards.length > 0 ? s.guards.join(" · ") : "No specific criteria" })
451
+ ] }, s.label)) })
449
452
  ] }) })
450
453
  ] });
451
- }, ye = ({
454
+ }, Ne = ({
452
455
  schema: e,
453
456
  cardHeader: r
454
457
  }) => {
455
- const n = Array.isArray(e.oneOf) ? "oneOf" : Array.isArray(e.anyOf) ? "anyOf" : void 0, s = n ? B(e) : [], [o, i] = f(
456
- () => s[0] ? O(0, s[0]) : ""
458
+ const n = Array.isArray(e.oneOf) ? "oneOf" : Array.isArray(e.anyOf) ? "anyOf" : void 0, i = n ? M(e) : [], [o, s] = j(
459
+ () => i[0] ? O(0, i[0]) : ""
457
460
  );
458
461
  if (!n) return null;
459
- const d = me(e) === "exactly-one" ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
462
+ const c = je(e) === "exactly-one" ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
460
463
  "Exactly one variant ",
461
464
  /* @__PURE__ */ t.jsx("b", { children: "must match" }),
462
465
  "."
@@ -467,23 +470,23 @@ Array.isArray(e.type) && e.type.includes("array"), w = (e) => e && (e.type === "
467
470
  " ",
468
471
  /* @__PURE__ */ t.jsx("i", { children: "may match" }),
469
472
  " simultaneously."
470
- ] }), c = s.findIndex(
471
- (u, j) => O(j, u) === o
472
- ), x = c >= 0 ? s[c] : null;
473
- return /* @__PURE__ */ t.jsxs(ee, { children: [
473
+ ] }), x = i.findIndex(
474
+ (p, y) => O(y, p) === o
475
+ ), d = x >= 0 ? i[x] : null;
476
+ return /* @__PURE__ */ t.jsxs(re, { children: [
474
477
  r,
475
- /* @__PURE__ */ t.jsxs(te, { className: "text-sm flex flex-col gap-4", children: [
478
+ /* @__PURE__ */ t.jsxs(ne, { className: "text-sm flex flex-col gap-4", children: [
476
479
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
477
- /* @__PURE__ */ t.jsx(H, { variant: "outline", children: n }),
478
- /* @__PURE__ */ t.jsx("div", { className: "flex-1 p-2", children: /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: d }) })
480
+ /* @__PURE__ */ t.jsx(te, { variant: "outline", children: n }),
481
+ /* @__PURE__ */ t.jsx("div", { className: "flex-1 p-2", children: /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: c }) })
479
482
  ] }),
480
483
  /* @__PURE__ */ t.jsx(
481
- je,
484
+ ge,
482
485
  {
483
- variants: s,
486
+ variants: i,
484
487
  schema: e,
485
488
  selectedVariant: o,
486
- onSelectVariant: i
489
+ onSelectVariant: s
487
490
  }
488
491
  ),
489
492
  /* @__PURE__ */ t.jsxs("strong", { children: [
@@ -491,74 +494,81 @@ Array.isArray(e.type) && e.type.includes("array"), w = (e) => e && (e.type === "
491
494
  o,
492
495
  ":"
493
496
  ] }),
494
- x && /* @__PURE__ */ t.jsx(p, { schema: x })
497
+ d && /* @__PURE__ */ t.jsx(u, { schema: d })
495
498
  ] })
496
499
  ] });
497
- }, ge = (e) => e && /* @__PURE__ */ t.jsx(
498
- q,
500
+ }, be = (e) => e && /* @__PURE__ */ t.jsx(
501
+ E,
499
502
  {
500
503
  className: "text-sm leading-normal line-clamp-4",
501
504
  content: e
502
505
  }
503
- ), Ne = (e, r, n) => {
504
- const s = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
505
- /* @__PURE__ */ t.jsx("span", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ t.jsx(v, { schema: e }) }),
506
- e.enum && /* @__PURE__ */ t.jsx(b, { values: e.enum }),
507
- ge(e.description),
508
- /* @__PURE__ */ t.jsx(h, { schema: e })
506
+ ), ve = (e, r, n) => {
507
+ const i = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
508
+ /* @__PURE__ */ t.jsx("span", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ t.jsx(h, { schema: e }) }),
509
+ e.enum && /* @__PURE__ */ t.jsx(v, { values: e.enum }),
510
+ be(e.description),
511
+ /* @__PURE__ */ t.jsx(I, { schema: e })
509
512
  ] });
510
- return n ? /* @__PURE__ */ t.jsx("div", { className: "space-y-2 p-4", children: s }) : /* @__PURE__ */ t.jsxs(g, { children: [
513
+ return n ? /* @__PURE__ */ t.jsx("div", { className: "space-y-2 p-4", children: i }) : /* @__PURE__ */ t.jsxs(N, { children: [
511
514
  r,
512
- /* @__PURE__ */ t.jsx(N, { className: "space-y-2", children: s })
515
+ /* @__PURE__ */ t.jsx(b, { className: "space-y-2", children: i })
513
516
  ] });
514
- }, p = ({
517
+ }, u = ({
515
518
  schema: e,
516
519
  defaultOpen: r = !1,
517
520
  cardHeader: n,
518
- embedded: s
521
+ embedded: i
519
522
  }) => {
520
523
  if (!e || Object.keys(e).length === 0)
521
- return /* @__PURE__ */ t.jsxs(g, { children: [
524
+ return /* @__PURE__ */ t.jsxs(N, { children: [
522
525
  n,
523
- /* @__PURE__ */ t.jsx(N, { children: /* @__PURE__ */ t.jsx("div", { className: "text-sm text-muted-foreground italic", children: "No data returned" }) })
526
+ /* @__PURE__ */ t.jsx(b, { children: /* @__PURE__ */ t.jsx("div", { className: "text-sm text-muted-foreground italic", children: "No data returned" }) })
524
527
  ] });
525
528
  if (e.const)
526
- return /* @__PURE__ */ t.jsx(E, { schema: e });
529
+ return /* @__PURE__ */ t.jsx(z, { schema: e });
527
530
  if (Array.isArray(e.oneOf) || Array.isArray(e.anyOf))
528
- return /* @__PURE__ */ t.jsx(ye, { schema: e, cardHeader: n });
529
- if (z(e.type))
530
- return Ne(e, n, s);
531
- if (e.type === "array" && typeof e.items == "object")
532
- return /* @__PURE__ */ t.jsx(p, { schema: e.items, cardHeader: n });
531
+ return /* @__PURE__ */ t.jsx(Ne, { schema: e, cardHeader: n });
532
+ if (R(e.type))
533
+ return ve(e, n, i);
534
+ if (f(e) && typeof e.items == "object") {
535
+ const s = {
536
+ type: "object",
537
+ properties: { "": e }
538
+ };
539
+ return /* @__PURE__ */ t.jsx(u, { schema: s, cardHeader: n, defaultOpen: !0 });
540
+ }
541
+ const o = typeof e.additionalProperties == "object" && /* @__PURE__ */ t.jsx(u, { schema: e.additionalProperties, embedded: !0 });
533
542
  if (e.type === "object") {
534
- const o = ne(
543
+ const s = ie(
535
544
  Object.entries(e.properties ?? {}),
536
- ([c, x]) => x.deprecated ? "deprecated" : e.required?.includes(c) ? "required" : "optional"
537
- ), i = ["required", "optional", "deprecated"], l = typeof e.additionalProperties == "object" && /* @__PURE__ */ t.jsx(p, { schema: e.additionalProperties, embedded: !0 }), d = i.map(
538
- (c, x) => o[c] && /* @__PURE__ */ t.jsxs(A, { children: [
539
- x > 0 && /* @__PURE__ */ t.jsx(P, {}),
540
- /* @__PURE__ */ t.jsx(le, { className: "overflow-clip", children: o[c].map(([u, j], D) => /* @__PURE__ */ t.jsxs(A, { children: [
541
- D > 0 && /* @__PURE__ */ t.jsx(P, {}),
542
- /* @__PURE__ */ t.jsx(
543
- ue,
544
- {
545
- name: u,
546
- schema: j,
547
- group: c,
548
- defaultOpen: r
549
- }
550
- )
551
- ] }, u)) })
552
- ] }, c)
553
- );
554
- return s ? d : /* @__PURE__ */ t.jsxs(g, { children: [
545
+ ([d, p]) => p.deprecated ? "deprecated" : e.required?.includes(d) ? "required" : "optional"
546
+ ), x = ["required", "optional", "deprecated"].flatMap((d) => {
547
+ const p = s[d];
548
+ return p ? { group: d, properties: p } : [];
549
+ }).map(({ group: d, properties: p }, y) => /* @__PURE__ */ t.jsxs(C, { children: [
550
+ y > 0 && /* @__PURE__ */ t.jsx(S, {}),
551
+ /* @__PURE__ */ t.jsx(de, { className: "overflow-clip", children: p.map(([A, D], L) => /* @__PURE__ */ t.jsxs(C, { children: [
552
+ L > 0 && /* @__PURE__ */ t.jsx(S, {}),
553
+ /* @__PURE__ */ t.jsx(
554
+ fe,
555
+ {
556
+ name: A,
557
+ schema: D,
558
+ group: d,
559
+ defaultOpen: r
560
+ }
561
+ )
562
+ ] }, A)) })
563
+ ] }, d));
564
+ return i ? x : /* @__PURE__ */ t.jsxs(N, { children: [
555
565
  n,
556
- e.description && /* @__PURE__ */ t.jsx(se, { children: /* @__PURE__ */ t.jsx(ie, { children: e.description }) }),
557
- /* @__PURE__ */ t.jsxs(N, { className: "p-0!", children: [
558
- d,
559
- l
566
+ e.description && /* @__PURE__ */ t.jsx(oe, { children: /* @__PURE__ */ t.jsx(le, { children: e.description }) }),
567
+ /* @__PURE__ */ t.jsxs(b, { className: "p-0!", children: [
568
+ x,
569
+ o
560
570
  ] }),
561
- e.additionalProperties === !0 && /* @__PURE__ */ t.jsx(oe, { children: /* @__PURE__ */ t.jsxs(
571
+ e.additionalProperties === !0 && /* @__PURE__ */ t.jsx(ae, { children: /* @__PURE__ */ t.jsxs(
562
572
  "a",
563
573
  {
564
574
  className: "text-sm flex items-center gap-1 hover:underline",
@@ -567,7 +577,7 @@ Array.isArray(e.type) && e.type.includes("array"), w = (e) => e && (e.type === "
567
577
  target: "_blank",
568
578
  children: [
569
579
  "Additional properties are allowed",
570
- /* @__PURE__ */ t.jsx(G, { size: 14 })
580
+ /* @__PURE__ */ t.jsx(W, { size: 14 })
571
581
  ]
572
582
  }
573
583
  ) })
@@ -575,12 +585,13 @@ Array.isArray(e.type) && e.type.includes("array"), w = (e) => e && (e.type === "
575
585
  }
576
586
  };
577
587
  export {
578
- b as E,
579
- v as P,
580
- p as S,
588
+ v as E,
589
+ Ee as P,
590
+ u as S,
581
591
  h as a,
582
- R as b,
583
- ne as g,
584
- I as i
592
+ I as b,
593
+ B as c,
594
+ ie as g,
595
+ f as i
585
596
  };
586
- //# sourceMappingURL=SchemaView-Dt6hbCAt.js.map
597
+ //# sourceMappingURL=SchemaView-CgwJ9gtb.js.map