zudoku 0.66.4 → 0.66.6

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 (216) hide show
  1. package/dist/app/main.d.ts +6 -6
  2. package/dist/config/validators/InputNavigationSchema.d.ts +2 -0
  3. package/dist/config/validators/InputNavigationSchema.js +1 -0
  4. package/dist/config/validators/InputNavigationSchema.js.map +1 -1
  5. package/dist/config/validators/NavigationSchema.js +6 -1
  6. package/dist/config/validators/NavigationSchema.js.map +1 -1
  7. package/dist/flat-config.d.ts +1 -0
  8. package/dist/lib/authentication/components/CallbackHandler.js +1 -1
  9. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  10. package/dist/lib/authentication/providers/auth0.js +11 -7
  11. package/dist/lib/authentication/providers/auth0.js.map +1 -1
  12. package/dist/lib/authentication/providers/clerk.js +0 -22
  13. package/dist/lib/authentication/providers/clerk.js.map +1 -1
  14. package/dist/lib/authentication/providers/supabase.js +6 -15
  15. package/dist/lib/authentication/providers/supabase.js.map +1 -1
  16. package/dist/lib/core/RouteGuard.js +12 -7
  17. package/dist/lib/core/RouteGuard.js.map +1 -1
  18. package/dist/lib/oas/graphql/circular.d.ts +1 -0
  19. package/dist/lib/oas/graphql/circular.js +20 -5
  20. package/dist/lib/oas/graphql/circular.js.map +1 -1
  21. package/dist/lib/plugins/api-keys/index.d.ts +9 -5
  22. package/dist/lib/plugins/api-keys/index.js +18 -8
  23. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  24. package/dist/lib/plugins/api-keys/settings/ApiKeyList.js +3 -0
  25. package/dist/lib/plugins/api-keys/settings/ApiKeyList.js.map +1 -1
  26. package/dist/lib/plugins/openapi/OperationList.js +5 -1
  27. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  28. package/dist/lib/plugins/openapi/schema/utils.js +11 -3
  29. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
  30. package/dist/lib/util/invariant.d.ts +1 -1
  31. package/dist/lib/util/invariant.js +2 -2
  32. package/dist/lib/util/invariant.js.map +1 -1
  33. package/dist/vite/api/SchemaManager.d.ts +1 -0
  34. package/dist/vite/api/SchemaManager.js +9 -3
  35. package/dist/vite/api/SchemaManager.js.map +1 -1
  36. package/dist/vite/mdx/remark-link-rewrite.js +1 -1
  37. package/dist/vite/plugin-api-keys.js +1 -0
  38. package/dist/vite/plugin-api-keys.js.map +1 -1
  39. package/dist/vite/prerender/utils.js +9 -3
  40. package/dist/vite/prerender/utils.js.map +1 -1
  41. package/lib/{ActionButton-BSM2oNHF.js → ActionButton-B0CXL1Lq.js} +3 -3
  42. package/lib/{ActionButton-BSM2oNHF.js.map → ActionButton-B0CXL1Lq.js.map} +1 -1
  43. package/lib/{Button-IOAeVaIH.js → Button-GUVe7pmt.js} +2 -2
  44. package/lib/{Button-IOAeVaIH.js.map → Button-GUVe7pmt.js.map} +1 -1
  45. package/lib/{Card-KFniaZn5.js → Card-DCdq37aA.js} +2 -2
  46. package/lib/{Card-KFniaZn5.js.map → Card-DCdq37aA.js.map} +1 -1
  47. package/lib/{ClaudeLogo-DgjivS8A.js → ClaudeLogo-BpqHBMS8.js} +4 -4
  48. package/lib/{ClaudeLogo-DgjivS8A.js.map → ClaudeLogo-BpqHBMS8.js.map} +1 -1
  49. package/lib/{Command-BpT1iBE6.js → Command-N6VujV30.js} +3 -3
  50. package/lib/{Command-BpT1iBE6.js.map → Command-N6VujV30.js.map} +1 -1
  51. package/lib/{Dialog-BQciPiHN.js → Dialog-hlvmmQ_c.js} +2 -2
  52. package/lib/{Dialog-BQciPiHN.js.map → Dialog-hlvmmQ_c.js.map} +1 -1
  53. package/lib/{Drawer-BRMcpfuF.js → Drawer-Ch7927PF.js} +2 -2
  54. package/lib/{Drawer-BRMcpfuF.js.map → Drawer-Ch7927PF.js.map} +1 -1
  55. package/lib/{DropdownMenu-C8SX_-S_.js → DropdownMenu-DN0jNrjj.js} +2 -2
  56. package/lib/{DropdownMenu-C8SX_-S_.js.map → DropdownMenu-DN0jNrjj.js.map} +1 -1
  57. package/lib/{Frame-DxlznfVd.js → Frame-DKlOmSkU.js} +2 -2
  58. package/lib/{Frame-DxlznfVd.js.map → Frame-DKlOmSkU.js.map} +1 -1
  59. package/lib/{IndexingDialog-DZWj_3cU.js → IndexingDialog-D0YdGfbn.js} +3 -3
  60. package/lib/{IndexingDialog-DZWj_3cU.js.map → IndexingDialog-D0YdGfbn.js.map} +1 -1
  61. package/lib/{Input-D-kqEQ5M.js → Input-B6YcAPv-.js} +39 -18
  62. package/lib/Input-B6YcAPv-.js.map +1 -0
  63. package/lib/{MdxPage-BL-HbZrv.js → MdxPage-CeFSxGb_.js} +11 -11
  64. package/lib/{MdxPage-BL-HbZrv.js.map → MdxPage-CeFSxGb_.js.map} +1 -1
  65. package/lib/{Mermaid-BjSczjLW.js → Mermaid-COVtAqcZ.js} +4 -4
  66. package/lib/{Mermaid-BjSczjLW.js.map → Mermaid-COVtAqcZ.js.map} +1 -1
  67. package/lib/{OAuthErrorPage-DQtg28Go.js → OAuthErrorPage-XTPBOMN8.js} +9 -9
  68. package/lib/OAuthErrorPage-XTPBOMN8.js.map +1 -0
  69. package/lib/{OasProvider--qcZwrKS.js → OasProvider-BS4rdzZC.js} +4 -4
  70. package/lib/{OasProvider--qcZwrKS.js.map → OasProvider-BS4rdzZC.js.map} +1 -1
  71. package/lib/{OperationList-CSJYzxQY.js → OperationList-Dg0Nm1tg.js} +136 -133
  72. package/lib/{OperationList-CSJYzxQY.js.map → OperationList-Dg0Nm1tg.js.map} +1 -1
  73. package/lib/RouteGuard-kCicqF3x.js +77 -0
  74. package/lib/RouteGuard-kCicqF3x.js.map +1 -0
  75. package/lib/{SchemaList-DtyuDrQA.js → SchemaList-DZKBH2WC.js} +9 -9
  76. package/lib/{SchemaList-DtyuDrQA.js.map → SchemaList-DZKBH2WC.js.map} +1 -1
  77. package/lib/{SchemaView-G-SVXxAG.js → SchemaView-DBaqV2yU.js} +95 -92
  78. package/lib/SchemaView-DBaqV2yU.js.map +1 -0
  79. package/lib/{Secret-BxGpIhDP.js → Secret-BDBqq4p3.js} +2 -2
  80. package/lib/{Secret-BxGpIhDP.js.map → Secret-BDBqq4p3.js.map} +1 -1
  81. package/lib/{Separator-CTPSeW1S.js → Separator-BXt1LYnm.js} +2 -2
  82. package/lib/{Separator-CTPSeW1S.js.map → Separator-BXt1LYnm.js.map} +1 -1
  83. package/lib/{SignUp-CDl7bQj3.js → SignUp-DNmOFbLD.js} +5 -5
  84. package/lib/{SignUp-CDl7bQj3.js.map → SignUp-DNmOFbLD.js.map} +1 -1
  85. package/lib/{SyntaxHighlight-Dgd0AaaX.js → SyntaxHighlight-C75W8uCn.js} +374 -365
  86. package/lib/SyntaxHighlight-C75W8uCn.js.map +1 -0
  87. package/lib/{Toc-D_Rj4jVx.js → Toc-ICilS65g.js} +3 -3
  88. package/lib/{Toc-D_Rj4jVx.js.map → Toc-ICilS65g.js.map} +1 -1
  89. package/lib/{ZudokuContext-DNHMZfcP.js → ZudokuContext-Ea7gxmGq.js} +542 -469
  90. package/lib/ZudokuContext-Ea7gxmGq.js.map +1 -0
  91. package/lib/{___vite-browser-external_commonjs-proxy-Cga3HsWk.js → ___vite-browser-external_commonjs-proxy-BttVsNON.js} +2 -2
  92. package/lib/___vite-browser-external_commonjs-proxy-BttVsNON.js.map +1 -0
  93. package/lib/chunk-EPOLDU6W-C6C8jAwd.js +8558 -0
  94. package/lib/chunk-EPOLDU6W-C6C8jAwd.js.map +1 -0
  95. package/lib/{circular-BxODTa7z.js → circular-DleWPaPP.js} +767 -747
  96. package/lib/{circular-BxODTa7z.js.map → circular-DleWPaPP.js.map} +1 -1
  97. package/lib/{cn-dYga0KKN.js → cn-5-Gd1Dss.js} +531 -498
  98. package/lib/cn-5-Gd1Dss.js.map +1 -0
  99. package/lib/{createServer-BpreIXp6.js → createServer-nqMW9kro.js} +6 -6
  100. package/lib/{createServer-BpreIXp6.js.map → createServer-nqMW9kro.js.map} +1 -1
  101. package/lib/{createVariantComponent-CQVt-H3r.js → createVariantComponent-Dc0vtOvr.js} +2 -2
  102. package/lib/{createVariantComponent-CQVt-H3r.js.map → createVariantComponent-Dc0vtOvr.js.map} +1 -1
  103. package/lib/{errors-DliW1dED.js → errors-D2FbERKl.js} +3 -3
  104. package/lib/{errors-DliW1dED.js.map → errors-D2FbERKl.js.map} +1 -1
  105. package/lib/{firebase-D4tbaCYB.js → firebase-Cn9CmB6h.js} +21 -21
  106. package/lib/{firebase-D4tbaCYB.js.map → firebase-Cn9CmB6h.js.map} +1 -1
  107. package/lib/{hook-CHw_R_xu.js → hook-B2nmfmYN.js} +3 -3
  108. package/lib/{hook-CHw_R_xu.js.map → hook-B2nmfmYN.js.map} +1 -1
  109. package/lib/{index-DXXZDuSJ.js → index-CC4L3gtM.js} +4 -4
  110. package/lib/{index-DXXZDuSJ.js.map → index-CC4L3gtM.js.map} +1 -1
  111. package/lib/{index-9MxNUgg4.js → index-CSDW7CHl.js} +21 -21
  112. package/lib/{index-9MxNUgg4.js.map → index-CSDW7CHl.js.map} +1 -1
  113. package/lib/{index-CboxZOVW.js → index-D5NeW2z6.js} +12 -12
  114. package/lib/{index-CboxZOVW.js.map → index-D5NeW2z6.js.map} +1 -1
  115. package/lib/{index-1TbL0HXQ.js → index-DSKBOdpT.js} +2 -2
  116. package/lib/{index-1TbL0HXQ.js.map → index-DSKBOdpT.js.map} +1 -1
  117. package/lib/{index.esm-ti5zvZS_.js → index.esm-B35e7P83.js} +2 -2
  118. package/lib/index.esm-B35e7P83.js.map +1 -0
  119. package/lib/{index.esm-DtzT_KoE.js → index.esm-B_0dvNjB.js} +2 -2
  120. package/lib/{index.esm-DtzT_KoE.js.map → index.esm-B_0dvNjB.js.map} +1 -1
  121. package/lib/{invariant-CGOLuIIz.js → invariant-BJAl77rw.js} +4 -4
  122. package/lib/invariant-BJAl77rw.js.map +1 -0
  123. package/lib/{mutation-DMHWqmFp.js → mutation-BOYnEDf6.js} +70 -44
  124. package/lib/mutation-BOYnEDf6.js.map +1 -0
  125. package/lib/ui/Accordion.js +1 -1
  126. package/lib/ui/ActionButton.js +2 -2
  127. package/lib/ui/Alert.js +1 -1
  128. package/lib/ui/AlertDialog.js +1 -1
  129. package/lib/ui/Badge.js +1 -1
  130. package/lib/ui/Breadcrumb.js +1 -1
  131. package/lib/ui/Button.js +1 -1
  132. package/lib/ui/ButtonGroup.js +1 -1
  133. package/lib/ui/Callout.js +1 -1
  134. package/lib/ui/Card.js +1 -1
  135. package/lib/ui/Carousel.js +1 -1
  136. package/lib/ui/Checkbox.js +1 -1
  137. package/lib/ui/CodeBlock.js +1 -1
  138. package/lib/ui/Command.js +2 -2
  139. package/lib/ui/Dialog.js +1 -1
  140. package/lib/ui/Drawer.js +2 -2
  141. package/lib/ui/DropdownMenu.js +1 -1
  142. package/lib/ui/EmbeddedCodeBlock.js +1 -1
  143. package/lib/ui/Form.js +1 -1
  144. package/lib/ui/Frame.js +1 -1
  145. package/lib/ui/HoverCard.js +1 -1
  146. package/lib/ui/Input.js +1 -1
  147. package/lib/ui/Item.js +1 -1
  148. package/lib/ui/Label.js +1 -1
  149. package/lib/ui/NativeSelect.js +1 -1
  150. package/lib/ui/Pagination.js +1 -1
  151. package/lib/ui/Popover.js +1 -1
  152. package/lib/ui/Progress.js +1 -1
  153. package/lib/ui/RadioGroup.js +1 -1
  154. package/lib/ui/ScrollArea.js +1 -1
  155. package/lib/ui/Secret.js +1 -1
  156. package/lib/ui/Separator.js +1 -1
  157. package/lib/ui/Skeleton.js +1 -1
  158. package/lib/ui/Slider.js +1 -1
  159. package/lib/ui/Switch.js +1 -1
  160. package/lib/ui/SyntaxHighlight.js +3 -3
  161. package/lib/ui/Tabs.js +1 -1
  162. package/lib/ui/Textarea.js +1 -1
  163. package/lib/ui/Toggle.js +1 -1
  164. package/lib/ui/ToggleGroup.js +1 -1
  165. package/lib/ui/Value.js +1 -1
  166. package/lib/ui/util.js +1 -1
  167. package/lib/zudoku.__internal.js +604 -602
  168. package/lib/zudoku.__internal.js.map +1 -1
  169. package/lib/zudoku.auth-auth0.js +16 -16
  170. package/lib/zudoku.auth-auth0.js.map +1 -1
  171. package/lib/zudoku.auth-azureb2c.js +4 -4
  172. package/lib/zudoku.auth-clerk.js +52 -75
  173. package/lib/zudoku.auth-clerk.js.map +1 -1
  174. package/lib/zudoku.auth-firebase.js +5 -5
  175. package/lib/zudoku.auth-openid.js +5 -5
  176. package/lib/zudoku.auth-supabase.js +31 -40
  177. package/lib/zudoku.auth-supabase.js.map +1 -1
  178. package/lib/zudoku.components.js +6 -6
  179. package/lib/zudoku.hooks.js +3 -3
  180. package/lib/zudoku.mermaid.js +3 -3
  181. package/lib/zudoku.plugin-api-catalog.js +5 -5
  182. package/lib/zudoku.plugin-api-keys.js +258 -240
  183. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  184. package/lib/zudoku.plugin-custom-pages.js +1 -1
  185. package/lib/zudoku.plugin-markdown.js +1 -1
  186. package/lib/zudoku.plugin-openapi.js +3 -3
  187. package/lib/zudoku.plugin-redirect.js +1 -1
  188. package/lib/zudoku.plugin-search-pagefind.js +7 -7
  189. package/lib/zudoku.router.js +1130 -1404
  190. package/lib/zudoku.router.js.map +1 -1
  191. package/package.json +12 -12
  192. package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
  193. package/src/lib/authentication/providers/auth0.tsx +15 -9
  194. package/src/lib/authentication/providers/clerk.tsx +0 -26
  195. package/src/lib/authentication/providers/supabase.tsx +6 -15
  196. package/src/lib/core/RouteGuard.tsx +30 -24
  197. package/src/lib/oas/graphql/circular.ts +36 -3
  198. package/src/lib/plugins/api-keys/index.tsx +46 -16
  199. package/src/lib/plugins/api-keys/settings/ApiKeyList.tsx +3 -0
  200. package/src/lib/plugins/openapi/OperationList.tsx +6 -1
  201. package/src/lib/plugins/openapi/schema/utils.ts +15 -4
  202. package/src/lib/util/invariant.ts +2 -1
  203. package/lib/Input-D-kqEQ5M.js.map +0 -1
  204. package/lib/OAuthErrorPage-DQtg28Go.js.map +0 -1
  205. package/lib/RouteGuard-D0f743SM.js +0 -77
  206. package/lib/RouteGuard-D0f743SM.js.map +0 -1
  207. package/lib/SchemaView-G-SVXxAG.js.map +0 -1
  208. package/lib/SyntaxHighlight-Dgd0AaaX.js.map +0 -1
  209. package/lib/ZudokuContext-DNHMZfcP.js.map +0 -1
  210. package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js.map +0 -1
  211. package/lib/chunk-PVWAREVJ-ClM0m2aJ.js +0 -7965
  212. package/lib/chunk-PVWAREVJ-ClM0m2aJ.js.map +0 -1
  213. package/lib/cn-dYga0KKN.js.map +0 -1
  214. package/lib/index.esm-ti5zvZS_.js.map +0 -1
  215. package/lib/invariant-CGOLuIIz.js.map +0 -1
  216. package/lib/mutation-DMHWqmFp.js.map +0 -1
@@ -0,0 +1,77 @@
1
+ import { j as t } from "./jsx-runtime-BzflLqGi.js";
2
+ import { H as f } from "./index.esm-B_0dvNjB.js";
3
+ import { createContext as x, use as g } from "react";
4
+ import { u as j, a as v, m as C, O as h } from "./chunk-EPOLDU6W-C6C8jAwd.js";
5
+ import { B as a } from "./Button-GUVe7pmt.js";
6
+ import { D as R, a as D, b as w, c as E, d as T, e as b } from "./Dialog-hlvmmQ_c.js";
7
+ import { u as k } from "./hook-B2nmfmYN.js";
8
+ import { a as y } from "./ZudokuContext-Ea7gxmGq.js";
9
+ import { Z as P } from "./invariant-BJAl77rw.js";
10
+ import { u as O } from "./useLatest-hmRS46UF.js";
11
+ const A = x(!1), B = "protected", U = () => {
12
+ const n = k(), e = y(), o = j(), r = v(), c = O(r.pathname), m = g(A), { protectedRoutes: u } = e.options, d = u ? Object.entries(u).find(
13
+ ([s]) => C({ path: s, end: !0 }, r.pathname)
14
+ ) : void 0, i = d !== void 0;
15
+ if (m)
16
+ return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
17
+ i && /* @__PURE__ */ t.jsx(f, { children: /* @__PURE__ */ t.jsx(
18
+ "meta",
19
+ {
20
+ name: "pagefind",
21
+ "data-pagefind-filter": `section:${B}`,
22
+ content: "true"
23
+ }
24
+ ) }),
25
+ /* @__PURE__ */ t.jsx(h, {})
26
+ ] });
27
+ if (i && !n.isAuthEnabled)
28
+ throw new P("Authentication is not enabled", {
29
+ title: "Authentication is not enabled",
30
+ developerHint: "To use protectedRoutes you need authentication to be enabled"
31
+ });
32
+ const p = d?.[1], l = i && !p?.({ auth: n, context: e });
33
+ return l && n.isPending && typeof window < "u" ? null : l ? /* @__PURE__ */ t.jsx(
34
+ R,
35
+ {
36
+ open: !0,
37
+ onOpenChange: (s) => {
38
+ s || o(-1);
39
+ },
40
+ children: /* @__PURE__ */ t.jsxs(D, { children: [
41
+ /* @__PURE__ */ t.jsx(w, { children: /* @__PURE__ */ t.jsx(E, { children: "Login to continue" }) }),
42
+ /* @__PURE__ */ t.jsx(T, { children: "Please wait while we log you in." }),
43
+ /* @__PURE__ */ t.jsxs(b, { children: [
44
+ /* @__PURE__ */ t.jsx(a, { variant: "outline", onClick: () => void o(-1), children: "Cancel" }),
45
+ /* @__PURE__ */ t.jsx("div", { className: "w-full" }),
46
+ /* @__PURE__ */ t.jsx(
47
+ a,
48
+ {
49
+ variant: "secondary",
50
+ onClick: () => void e.authentication?.signUp(
51
+ { navigate: o },
52
+ { redirectTo: c.current }
53
+ ),
54
+ children: "Register"
55
+ }
56
+ ),
57
+ /* @__PURE__ */ t.jsx(
58
+ a,
59
+ {
60
+ onClick: () => void e.authentication?.signIn(
61
+ { navigate: o },
62
+ { redirectTo: c.current }
63
+ ),
64
+ children: "Login"
65
+ }
66
+ )
67
+ ] })
68
+ ] })
69
+ }
70
+ ) : /* @__PURE__ */ t.jsx(h, {});
71
+ };
72
+ export {
73
+ A as B,
74
+ U as R,
75
+ B as S
76
+ };
77
+ //# sourceMappingURL=RouteGuard-kCicqF3x.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RouteGuard-kCicqF3x.js","sources":["../src/lib/components/context/BypassProtectedRoutesContext.ts","../src/lib/core/RouteGuard.tsx"],"sourcesContent":["import { createContext } from \"react\";\n\nexport const BypassProtectedRoutesContext = createContext(false);\n","import { Helmet } from \"@zudoku/react-helmet-async\";\nimport { use } from \"react\";\nimport { matchPath, Outlet, useLocation, useNavigate } from \"react-router\";\nimport { Button } from \"zudoku/ui/Button.js\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n} from \"zudoku/ui/Dialog.js\";\nimport { useAuth } from \"../authentication/hook.js\";\nimport { BypassProtectedRoutesContext } from \"../components/context/BypassProtectedRoutesContext.js\";\nimport { useZudoku } from \"../components/context/ZudokuContext.js\";\nimport { ZudokuError } from \"../util/invariant.js\";\nimport { useLatest } from \"../util/useLatest.js\";\n\nexport const SEARCH_PROTECTED_SECTION = \"protected\";\n\nexport const RouteGuard = () => {\n const auth = useAuth();\n const zudoku = useZudoku();\n const navigate = useNavigate();\n const location = useLocation();\n const latestPath = useLatest(location.pathname);\n const shouldBypass = use(BypassProtectedRoutesContext);\n const { protectedRoutes } = zudoku.options;\n\n const protectedRouteEntry = protectedRoutes\n ? Object.entries(protectedRoutes).find(([path]) =>\n matchPath({ path, end: true }, location.pathname),\n )\n : undefined;\n\n const isProtectedRoute = protectedRouteEntry !== undefined;\n\n // SSR/prerendering mode: render content with search meta tag, skip all auth\n if (shouldBypass) {\n return (\n <>\n {isProtectedRoute && (\n <Helmet>\n <meta\n name=\"pagefind\"\n data-pagefind-filter={`section:${SEARCH_PROTECTED_SECTION}`}\n content=\"true\"\n />\n </Helmet>\n )}\n <Outlet />\n </>\n );\n }\n\n if (isProtectedRoute && !auth.isAuthEnabled) {\n throw new ZudokuError(\"Authentication is not enabled\", {\n title: \"Authentication is not enabled\",\n developerHint:\n \"To use protectedRoutes you need authentication to be enabled\",\n });\n }\n\n const authCheckFn = protectedRouteEntry?.[1];\n const needsToSignIn =\n isProtectedRoute && !authCheckFn?.({ auth, context: zudoku });\n\n if (needsToSignIn && auth.isPending && typeof window !== \"undefined\") {\n return null;\n }\n\n if (needsToSignIn) {\n return (\n <Dialog\n open={true}\n onOpenChange={(open) => {\n if (!open) {\n void navigate(-1);\n }\n }}\n >\n <DialogContent>\n <DialogHeader>\n <DialogTitle>Login to continue</DialogTitle>\n </DialogHeader>\n <DialogDescription>\n Please wait while we log you in.\n </DialogDescription>\n <DialogFooter>\n <Button variant=\"outline\" onClick={() => void navigate(-1)}>\n Cancel\n </Button>\n <div className=\"w-full\"></div>\n <Button\n variant=\"secondary\"\n onClick={() =>\n void zudoku.authentication?.signUp(\n { navigate },\n { redirectTo: latestPath.current },\n )\n }\n >\n Register\n </Button>\n <Button\n onClick={() =>\n void zudoku.authentication?.signIn(\n { navigate },\n { redirectTo: latestPath.current },\n )\n }\n >\n Login\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n );\n }\n\n return <Outlet />;\n};\n"],"names":["BypassProtectedRoutesContext","createContext","SEARCH_PROTECTED_SECTION","RouteGuard","auth","useAuth","zudoku","useZudoku","navigate","useNavigate","location","useLocation","latestPath","useLatest","shouldBypass","use","protectedRoutes","protectedRouteEntry","path","matchPath","isProtectedRoute","jsxs","Fragment","Helmet","jsx","Outlet","ZudokuError","authCheckFn","needsToSignIn","Dialog","open","DialogContent","DialogHeader","DialogTitle","DialogDescription","DialogFooter","Button"],"mappings":";;;;;;;;;;AAEO,MAAMA,IAA+BC,EAAc,EAAK,GCgBlDC,IAA2B,aAE3BC,IAAa,MAAM;AAC9B,QAAMC,IAAOC,EAAA,GACPC,IAASC,EAAA,GACTC,IAAWC,EAAA,GACXC,IAAWC,EAAA,GACXC,IAAaC,EAAUH,EAAS,QAAQ,GACxCI,IAAeC,EAAIf,CAA4B,GAC/C,EAAE,iBAAAgB,MAAoBV,EAAO,SAE7BW,IAAsBD,IACxB,OAAO,QAAQA,CAAe,EAAE;AAAA,IAAK,CAAC,CAACE,CAAI,MACzCC,EAAU,EAAE,MAAAD,GAAM,KAAK,MAAQR,EAA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Y;AAAA,YAAA;AAAA,cACC,SAAQ;AAAA,cACR,SAAS,MACP,KAAK9B,EAAO,gBAAgB;AAAA,gBAC1B,EAAE,UAAAE,EAAA;AAAA,gBACF,EAAE,YAAYI,EAAW,QAAA;AAAA,cAAQ;AAAA,cAGtC,UAAA;AAAA,YAAA;AAAA,UAAA;AAAA,UAGDY,gBAAAA,EAAAA;AAAAA,YAACY;AAAA,YAAA;AAAA,cACC,SAAS,MACP,KAAK9B,EAAO,gBAAgB;AAAA,gBAC1B,EAAE,UAAAE,EAAA;AAAA,gBACF,EAAE,YAAYI,EAAW,QAAA;AAAA,cAAQ;AAAA,cAGtC,UAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAED,EAAA,CACF;AAAA,MAAA,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,0BAKEa,GAAA,EAAO;AACjB;"}
@@ -1,14 +1,14 @@
1
1
  import { j as e } from "./jsx-runtime-BzflLqGi.js";
2
- import { s as o } from "./index-1TbL0HXQ.js";
3
- import { e as j } from "./ZudokuContext-DNHMZfcP.js";
4
- import { H as c } from "./index.esm-DtzT_KoE.js";
2
+ import { s as o } from "./index-DSKBOdpT.js";
3
+ import { e as j } from "./ZudokuContext-Ea7gxmGq.js";
4
+ import { H as c } from "./index.esm-B_0dvNjB.js";
5
5
  import { ChevronsUpDownIcon as y, ChevronsDownUpIcon as N, ChevronRightIcon as b } from "lucide-react";
6
- import { B as v } from "./Button-IOAeVaIH.js";
7
- import { u as C, a as w, C as m, b as l, c as d, d as S } from "./index-9MxNUgg4.js";
6
+ import { B as v } from "./Button-GUVe7pmt.js";
7
+ import { u as C, a as w, C as m, b as l, c as d, d as S } from "./index-CSDW7CHl.js";
8
8
  import { C as A } from "./CategoryHeading-DhmodDcq.js";
9
- import { H as p, M as H } from "./index-CboxZOVW.js";
10
- import { T as I } from "./Toc-D_Rj4jVx.js";
11
- import { P as z, S as M } from "./SchemaView-G-SVXxAG.js";
9
+ import { H as p, M as H } from "./index-D5NeW2z6.js";
10
+ import { T as I } from "./Toc-ICilS65g.js";
11
+ import { P as z, S as M } from "./SchemaView-DBaqV2yU.js";
12
12
  const P = S(
13
13
  /* GraphQL */
14
14
  `
@@ -148,4 +148,4 @@ function R() {
148
148
  export {
149
149
  R as SchemaList
150
150
  };
151
- //# sourceMappingURL=SchemaList-DtyuDrQA.js.map
151
+ //# sourceMappingURL=SchemaList-DZKBH2WC.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SchemaList-DtyuDrQA.js","sources":["../src/lib/plugins/openapi/SchemaList.tsx"],"sourcesContent":["import slugify from \"@sindresorhus/slugify\";\nimport { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Helmet } from \"@zudoku/react-helmet-async\";\nimport {\n ChevronRightIcon,\n ChevronsDownUpIcon,\n ChevronsUpDownIcon,\n} from \"lucide-react\";\nimport { Button } from \"zudoku/ui/Button.js\";\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"zudoku/ui/Collapsible.js\";\nimport { CategoryHeading } from \"../../components/CategoryHeading.js\";\nimport { Heading } from \"../../components/Heading.js\";\nimport { Markdown } from \"../../components/Markdown.js\";\nimport { Toc } from \"../../components/navigation/Toc.js\";\nimport { PagefindSearchMeta } from \"../../components/PagefindSearchMeta.js\";\nimport { useCreateQuery } from \"./client/useCreateQuery.js\";\nimport { useOasConfig } from \"./context.js\";\nimport { graphql } from \"./graphql/gql.js\";\nimport { SchemaView } from \"./schema/SchemaView.js\";\n\nconst GET_SCHEMAS = graphql(/* GraphQL */ `\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n`);\n\nexport function SchemaList() {\n const { input, type, versions, version, options } = useOasConfig();\n const schemasQuery = useCreateQuery(GET_SCHEMAS, {\n input,\n type,\n });\n const { data } = useSuspenseQuery(schemasQuery);\n\n const schemas = data.schema.components?.schemas ?? [];\n const hasMultipleVersions = Object.entries(versions).length > 1;\n const showVersions =\n options?.showVersionSelect === \"always\" ||\n (hasMultipleVersions && options?.showVersionSelect !== \"hide\");\n\n if (!schemas.length) {\n return (\n <div>\n <Helmet>\n <title>Schemas {showVersions ? version : \"\"}</title>\n <meta name=\"description\" content=\"List of schemas used by the API.\" />\n </Helmet>\n No schemas found\n </div>\n );\n }\n\n return (\n <div\n className=\"grid grid-cols-(--sidecar-grid-cols) gap-8 justify-between\"\n data-pagefind-filter=\"section:openapi\"\n data-pagefind-meta=\"section:openapi\"\n >\n <PagefindSearchMeta name=\"category\">\n {data.schema.title}\n </PagefindSearchMeta>\n <Helmet>\n <title>Schemas {showVersions ? version : \"\"}</title>\n <meta name=\"description\" content=\"List of schemas used by the API.\" />\n </Helmet>\n <div className=\"pt-(--padding-content-top) pb-(--padding-content-bottom)\">\n <Collapsible className=\"w-full\">\n <div className=\"flex flex-col gap-y-4 sm:flex-row justify-around items-start sm:items-end\">\n <div className=\"flex-1\">\n <CategoryHeading>{data.schema.title}</CategoryHeading>\n <Heading\n level={1}\n id=\"schemas\"\n registerNavigationAnchor\n className=\"mb-0\"\n >\n Schemas\n {showVersions && (\n <span className=\"text-xl text-muted-foreground ms-1.5\">\n ({version})\n </span>\n )}\n </Heading>\n </div>\n {data.schema.description && (\n <CollapsibleTrigger className=\"flex items-center gap-1 text-sm font-medium text-muted-foreground group\">\n <span>API information</span>\n <ChevronsUpDownIcon\n className=\"group-data-[state=open]:hidden translate-y-px\"\n size={14}\n />\n <ChevronsDownUpIcon\n className=\"group-data-[state=closed]:hidden translate-y-px\"\n size={13}\n />\n </CollapsibleTrigger>\n )}\n </div>\n {data.schema.description && (\n <CollapsibleContent className=\"CollapsibleContent\">\n <div className=\"mt-4 max-w-full border rounded-sm bg-muted/25\">\n <Markdown\n className=\"max-w-full prose-img:max-w-prose border-border p-3 lg:p-5\"\n content={data.schema.description}\n />\n </div>\n </CollapsibleContent>\n )}\n </Collapsible>\n <hr className=\"my-8\" />\n <div className=\"flex flex-col gap-y-5\">\n {schemas.map((schema) => (\n <Collapsible key={schema.name} className=\"group\" defaultOpen>\n <Heading\n registerNavigationAnchor\n level={2}\n className=\"flex items-center gap-1 justify-between w-fit\"\n id={slugify(schema.name)}\n >\n {schema.name}{\" \"}\n <CollapsibleTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" className=\"size-6\">\n <ChevronRightIcon\n size={16}\n className=\"group-data-[state=open]:rotate-90 transition cursor-pointer\"\n />\n </Button>\n </CollapsibleTrigger>\n </Heading>\n <CollapsibleContent className=\"mt-4 CollapsibleContent\">\n <SchemaView schema={schema.schema} />\n </CollapsibleContent>\n </Collapsible>\n ))}\n </div>\n </div>\n <Toc\n entries={schemas.map((schema) => ({\n id: slugify(schema.name),\n value: schema.name,\n depth: 1,\n }))}\n />\n </div>\n );\n}\n"],"names":["GET_SCHEMAS","graphql","SchemaList","input","type","versions","version","options","useOasConfig","schemasQuery","useCreateQuery","data","useSuspenseQuery","schemas","hasMultipleVersions","showVersions","jsxs","jsx","PagefindSearchMeta","Helmet","Collapsible","CategoryHeading","Heading","CollapsibleTrigger","ChevronsUpDownIcon","ChevronsDownUpIcon","CollapsibleContent","Markdown","schema","slugify","Button","ChevronRightIcon","SchemaView","Toc"],"mappings":";;;;;;;;;;;AAwBA,MAAMA,IAAcC;AAAA;AAAA,EAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAezC;AAEM,SAASC,IAAa;AAC3B,QAAM,EAAE,OAAAC,GAAO,MAAAC,GAAM,UAAAC,GAAU,SAAAC,GAAS,SAAAC,EAAA,IAAYC,EAAA,GAC9CC,IAAeC,EAAeV,GAAa;AAAA,IAC/C,OAAAG;AAAA,IACA,MAAAC;AAAA,EAAA,CACD,GACK,EAAE,MAAAO,EAAA,IAASC,EAAiBH,CAAY,GAExCI,IAAUF,EAAK,OAAO,YAAY,WAAW,CAAA,GAC7CG,IA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AN,gBAAAA,EAAAA,IAACa,GAAA,EAAO,SAAQ,SAAQ,MAAK,QAAO,WAAU,UAC5C,UAAAb,gBAAAA,EAAAA;AAAAA,oBAACc;AAAA,oBAAA;AAAA,sBACC,MAAM;AAAA,sBACN,WAAU;AAAA,oBAAA;AAAA,kBAAA,GAEd,EAAA,CACF;AAAA,gBAAA;AAAA,cAAA;AAAA,YAAA;AAAA,YAEFd,gBAAAA,EAAAA,IAACS,KAAmB,WAAU,2BAC5B,gCAACM,GAAA,EAAW,QAAQJ,EAAO,OAAA,CAAQ,EAAA,CACrC;AAAA,UAAA,KAnBgBA,EAAO,IAoBzB,CACD,EAAA,CACH;AAAA,QAAA,GACF;AAAA,QACAX,gBAAAA,EAAAA;AAAAA,UAACgB;AAAA,UAAA;AAAA,YACC,SAASpB,EAAQ,IAAI,CAACe,OAAY;AAAA,cAChC,IAAIC,EAAQD,EAAO,IAAI;AAAA,cACvB,OAAOA,EAAO;AAAA,cACd,OAAO;AAAA,YAAA,EACP;AAAA,UAAA;AAAA,QAAA;AAAA,MACJ;AAAA,IAAA;AAAA,EAAA,2BApGC,OAAA,EACC,UAAA;AAAA,IAAAZ,gBAAAA,OAACG,GAAA,EACC,UAAA;AAAA,MAAAH,gBAAAA,OAAC,SAAA,EAAM,UAAA;AAAA,QAAA;AAAA,QAASD,IAAeT,IAAU;AAAA,MAAA,GAAG;AAAA,MAC5CW,gBAAAA,EAAAA,IAAC,QAAA,EAAK,MAAK,eAAc,SAAQ,mCAAA,CAAmC;AAAA,IAAA,GACtE;AAAA,IAAS;AAAA,EAAA,GAEX;AAiGN;"}
1
+ {"version":3,"file":"SchemaList-DZKBH2WC.js","sources":["../src/lib/plugins/openapi/SchemaList.tsx"],"sourcesContent":["import slugify from \"@sindresorhus/slugify\";\nimport { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { Helmet } from \"@zudoku/react-helmet-async\";\nimport {\n ChevronRightIcon,\n ChevronsDownUpIcon,\n ChevronsUpDownIcon,\n} from \"lucide-react\";\nimport { Button } from \"zudoku/ui/Button.js\";\nimport {\n Collapsible,\n CollapsibleContent,\n CollapsibleTrigger,\n} from \"zudoku/ui/Collapsible.js\";\nimport { CategoryHeading } from \"../../components/CategoryHeading.js\";\nimport { Heading } from \"../../components/Heading.js\";\nimport { Markdown } from \"../../components/Markdown.js\";\nimport { Toc } from \"../../components/navigation/Toc.js\";\nimport { PagefindSearchMeta } from \"../../components/PagefindSearchMeta.js\";\nimport { useCreateQuery } from \"./client/useCreateQuery.js\";\nimport { useOasConfig } from \"./context.js\";\nimport { graphql } from \"./graphql/gql.js\";\nimport { SchemaView } from \"./schema/SchemaView.js\";\n\nconst GET_SCHEMAS = graphql(/* GraphQL */ `\n query GetSchemas($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n title\n description\n summary\n components {\n schemas {\n name\n schema\n extensions\n }\n }\n }\n }\n`);\n\nexport function SchemaList() {\n const { input, type, versions, version, options } = useOasConfig();\n const schemasQuery = useCreateQuery(GET_SCHEMAS, {\n input,\n type,\n });\n const { data } = useSuspenseQuery(schemasQuery);\n\n const schemas = data.schema.components?.schemas ?? [];\n const hasMultipleVersions = Object.entries(versions).length > 1;\n const showVersions =\n options?.showVersionSelect === \"always\" ||\n (hasMultipleVersions && options?.showVersionSelect !== \"hide\");\n\n if (!schemas.length) {\n return (\n <div>\n <Helmet>\n <title>Schemas {showVersions ? version : \"\"}</title>\n <meta name=\"description\" content=\"List of schemas used by the API.\" />\n </Helmet>\n No schemas found\n </div>\n );\n }\n\n return (\n <div\n className=\"grid grid-cols-(--sidecar-grid-cols) gap-8 justify-between\"\n data-pagefind-filter=\"section:openapi\"\n data-pagefind-meta=\"section:openapi\"\n >\n <PagefindSearchMeta name=\"category\">\n {data.schema.title}\n </PagefindSearchMeta>\n <Helmet>\n <title>Schemas {showVersions ? version : \"\"}</title>\n <meta name=\"description\" content=\"List of schemas used by the API.\" />\n </Helmet>\n <div className=\"pt-(--padding-content-top) pb-(--padding-content-bottom)\">\n <Collapsible className=\"w-full\">\n <div className=\"flex flex-col gap-y-4 sm:flex-row justify-around items-start sm:items-end\">\n <div className=\"flex-1\">\n <CategoryHeading>{data.schema.title}</CategoryHeading>\n <Heading\n level={1}\n id=\"schemas\"\n registerNavigationAnchor\n className=\"mb-0\"\n >\n Schemas\n {showVersions && (\n <span className=\"text-xl text-muted-foreground ms-1.5\">\n ({version})\n </span>\n )}\n </Heading>\n </div>\n {data.schema.description && (\n <CollapsibleTrigger className=\"flex items-center gap-1 text-sm font-medium text-muted-foreground group\">\n <span>API information</span>\n <ChevronsUpDownIcon\n className=\"group-data-[state=open]:hidden translate-y-px\"\n size={14}\n />\n <ChevronsDownUpIcon\n className=\"group-data-[state=closed]:hidden translate-y-px\"\n size={13}\n />\n </CollapsibleTrigger>\n )}\n </div>\n {data.schema.description && (\n <CollapsibleContent className=\"CollapsibleContent\">\n <div className=\"mt-4 max-w-full border rounded-sm bg-muted/25\">\n <Markdown\n className=\"max-w-full prose-img:max-w-prose border-border p-3 lg:p-5\"\n content={data.schema.description}\n />\n </div>\n </CollapsibleContent>\n )}\n </Collapsible>\n <hr className=\"my-8\" />\n <div className=\"flex flex-col gap-y-5\">\n {schemas.map((schema) => (\n <Collapsible key={schema.name} className=\"group\" defaultOpen>\n <Heading\n registerNavigationAnchor\n level={2}\n className=\"flex items-center gap-1 justify-between w-fit\"\n id={slugify(schema.name)}\n >\n {schema.name}{\" \"}\n <CollapsibleTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" className=\"size-6\">\n <ChevronRightIcon\n size={16}\n className=\"group-data-[state=open]:rotate-90 transition cursor-pointer\"\n />\n </Button>\n </CollapsibleTrigger>\n </Heading>\n <CollapsibleContent className=\"mt-4 CollapsibleContent\">\n <SchemaView schema={schema.schema} />\n </CollapsibleContent>\n </Collapsible>\n ))}\n </div>\n </div>\n <Toc\n entries={schemas.map((schema) => ({\n id: slugify(schema.name),\n value: schema.name,\n depth: 1,\n }))}\n />\n </div>\n );\n}\n"],"names":["GET_SCHEMAS","graphql","SchemaList","input","type","versions","version","options","useOasConfig","schemasQuery","useCreateQuery","data","useSuspenseQuery","schemas","hasMultipleVersions","showVersions","jsxs","jsx","PagefindSearchMeta","Helmet","Collapsible","CategoryHeading","Heading","CollapsibleTrigger","ChevronsUpDownIcon","ChevronsDownUpIcon","CollapsibleContent","Markdown","schema","slugify","Button","ChevronRightIcon","SchemaView","Toc"],"mappings":";;;;;;;;;;;AAwBA,MAAMA,IAAcC;AAAA;AAAA,EAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAezC;AAEM,SAASC,IAAa;AAC3B,QAAM,EAAE,OAAAC,GAAO,MAAAC,GAAM,UAAAC,GAAU,SAAAC,GAAS,SAAAC,EAAA,IAAYC,EAAA,GAC9CC,IAAeC,EAAeV,GAAa;AAAA,IAC/C,OAAAG;AAAA,IACA,MAAAC;AAAA,EAAA,CACD,GACK,EAAE,MAAAO,EAAA,IAASC,EAAiBH,CAAY,GAExCI,IAAUF,EAAK,OAAO,YAAY,WAAW,CAAA,GAC7CG,IAAsB,OAAO,QAAQT,CAAQ,EAAE,SAAS,GACxDU,IACJR,GAAS,sBAAsB,YAC9BO,KAAuBP,GAAS,sBAAsB;AAEzD,SAAKM,EAAQ,SAaXG,gBAAAA,EAAAA;AAAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,wBAAqB;AAAA,MACrB,sBAAmB;AAAA,MAEnB,UAAA;AAAA,QAAAC,gBAAAA,MAACC,GAAA,EAAmB,MAAK,YACtB,UAAAP,EAAK,OAAO,OACf;AAAA,+BACCQ,GAAA,EACC,UAAA;AAAA,UAAAH,gBAAAA,OAAC,SAAA,EAAM,UAAA;AAAA,YAAA;AAAA,YAASD,IAAeT,IAAU;AAAA,UAAA,GAAG;AAAA,UAC5CW,gBAAAA,EAAAA,IAAC,QAAA,EAAK,MAAK,eAAc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AI,CAACe,OAAY;AAAA,cAChC,IAAIC,EAAQD,EAAO,IAAI;AAAA,cACvB,OAAOA,EAAO;AAAA,cACd,OAAO;AAAA,YAAA,EACP;AAAA,UAAA;AAAA,QAAA;AAAA,MACJ;AAAA,IAAA;AAAA,EAAA,2BApGC,OAAA,EACC,UAAA;AAAA,IAAAZ,gBAAAA,OAACG,GAAA,EACC,UAAA;AAAA,MAAAH,gBAAAA,OAAC,SAAA,EAAM,UAAA;AAAA,QAAA;AAAA,QAASD,IAAeT,IAAU;AAAA,MAAA,GAAG;AAAA,MAC5CW,gBAAAA,EAAAA,IAAC,QAAA,EAAK,MAAK,eAAc,SAAQ,mCAAA,CAAmC;AAAA,IAAA,GACtE;AAAA,IAAS;AAAA,EAAA,GAEX;AAiGN;"}
@@ -1,32 +1,32 @@
1
1
  import { j as t } from "./jsx-runtime-BzflLqGi.js";
2
- import { ChevronUpIcon as T, ChevronDownIcon as J, ChevronsLeftRightIcon as U, MinusIcon as _, PlusIcon as G, RefreshCcwDotIcon as K, InfoIcon as W } from "lucide-react";
3
- import { useState as f, isValidElement as Q, Fragment as C } from "react";
4
- import { I as P, a as g, b as $, c as X, F as N, d as b, e as S, f as Y, g as Z, h as H, i as ee } from "./Frame-DxlznfVd.js";
5
- import { b as u, I as E, M as V } from "./index-CboxZOVW.js";
6
- import { B as te } from "./Button-IOAeVaIH.js";
7
- import { c as j } from "./cn-dYga0KKN.js";
8
- import * as F from "@radix-ui/react-collapsible";
9
- import { Button as re } from "./ui/Button.js";
10
- import { Badge as se } from "./ui/Badge.js";
11
- import { Frame as ne, FramePanel as ie } from "./ui/Frame.js";
12
- import { C as oe } from "./circular-BxODTa7z.js";
13
- const Se = ({
2
+ import { ChevronUpIcon as _, ChevronDownIcon as J, ChevronsLeftRightIcon as U, MinusIcon as W, PlusIcon as G, RefreshCcwDotIcon as K, InfoIcon as X } from "lucide-react";
3
+ import { useState as f, isValidElement as Q, Fragment as P } from "react";
4
+ import { I as S, a as g, b as $, c as Y, F as N, d as h, e as F, f as Z, g as H, h as ee, i as te } from "./Frame-DKlOmSkU.js";
5
+ import { b as u, I as R, M as V } from "./index-D5NeW2z6.js";
6
+ import { B as re } from "./Button-GUVe7pmt.js";
7
+ import { c as j } from "./cn-5-Gd1Dss.js";
8
+ import * as E from "@radix-ui/react-collapsible";
9
+ import { Button as se } from "./ui/Button.js";
10
+ import { Badge as ne } from "./ui/Badge.js";
11
+ import { Frame as ie, FramePanel as oe } from "./ui/Frame.js";
12
+ import { C as le, S as b } from "./circular-DleWPaPP.js";
13
+ const Fe = ({
14
14
  name: e,
15
15
  children: r
16
- }) => /* @__PURE__ */ t.jsx("span", { "data-pagefind-meta": e, className: "sr-only", children: r }), le = (e, r) => e.reduce(
16
+ }) => /* @__PURE__ */ t.jsx("span", { "data-pagefind-meta": e, className: "sr-only", children: r }), ae = (e, r) => e.reduce(
17
17
  (s, i) => {
18
18
  const o = r(i);
19
19
  return s[o] || (s[o] = []), s[o].push(i), s;
20
20
  },
21
21
  {}
22
- ), R = ({
22
+ ), M = ({
23
23
  schema: e,
24
24
  hideDescription: r = !1
25
25
  }) => /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-1", children: /* @__PURE__ */ t.jsxs("div", { children: [
26
26
  /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Const value: " }),
27
27
  /* @__PURE__ */ t.jsx(u, { className: "border rounded px-1 font-mono", children: e.const }),
28
28
  !r && e.description && /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground", children: e.description })
29
- ] }) }), h = ({
29
+ ] }) }), v = ({
30
30
  values: e,
31
31
  className: r,
32
32
  maxVisibleValues: s = 8
@@ -38,14 +38,14 @@ const Se = ({
38
38
  /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Enum values:" }),
39
39
  l.map((d) => /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(u, { className: "border rounded-sm px-1 font-mono", children: d }) }, d)),
40
40
  n && /* @__PURE__ */ t.jsx(
41
- te,
41
+ re,
42
42
  {
43
43
  variant: "ghost",
44
44
  size: "sm",
45
45
  className: "h-fit px-0",
46
46
  onClick: () => o(!i),
47
47
  children: i ? /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-1", children: [
48
- /* @__PURE__ */ t.jsx(T, { size: 12 }),
48
+ /* @__PURE__ */ t.jsx(_, { size: 12 }),
49
49
  /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "show less" })
50
50
  ] }) : /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-1", children: [
51
51
  /* @__PURE__ */ t.jsx(J, { size: 12 }),
@@ -58,10 +58,10 @@ const Se = ({
58
58
  }
59
59
  )
60
60
  ] });
61
- }, ae = ({ pattern: e }) => {
61
+ }, de = ({ pattern: e }) => {
62
62
  const [r, s] = f(!1), i = e.length > 20, o = i ? `${e.slice(0, 20)}…` : e;
63
63
  return /* @__PURE__ */ t.jsxs(
64
- E,
64
+ R,
65
65
  {
66
66
  className: j("text-xs", i && "cursor-pointer"),
67
67
  onClick: () => s(!r),
@@ -72,7 +72,7 @@ const Se = ({
72
72
  ]
73
73
  }
74
74
  );
75
- }, de = (e) => e ? [
75
+ }, ce = (e) => e ? [
76
76
  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,
77
77
  e.enum && "enum",
78
78
  e.const && "const",
@@ -92,14 +92,14 @@ const Se = ({
92
92
  e.deprecated && "deprecated",
93
93
  e.pattern && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
94
94
  "pattern: ",
95
- /* @__PURE__ */ t.jsx(ae, { pattern: e.pattern })
95
+ /* @__PURE__ */ t.jsx(de, { pattern: e.pattern })
96
96
  ] })
97
- ] : [], v = ({
97
+ ] : [], I = ({
98
98
  schema: e,
99
99
  extraItems: r = [],
100
100
  className: s
101
101
  }) => {
102
- const i = [...de(e), ...r].flatMap(
102
+ const i = [...ce(e), ...r].flatMap(
103
103
  (o) => typeof o == "string" || Q(o) ? o : []
104
104
  );
105
105
  return /* @__PURE__ */ t.jsx("span", { className: s, children: i.map((o, n) => (
@@ -109,7 +109,7 @@ const Se = ({
109
109
  n < i.length - 1 && /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground/50", children: " · " })
110
110
  ] }, n)
111
111
  )) });
112
- }, I = ({
112
+ }, O = ({
113
113
  schema: e
114
114
  }) => {
115
115
  const r = e.examples?.at(0), s = e.default;
@@ -123,9 +123,12 @@ const Se = ({
123
123
  /* @__PURE__ */ t.jsx(u, { className: "border rounded-sm px-1 font-mono", children: typeof s == "object" || typeof s == "boolean" ? JSON.stringify(s) : s })
124
124
  ] })
125
125
  ] });
126
- }, M = (e) => typeof e == "string" && ["string", "number", "boolean", "integer", "null"].includes(e) || Array.isArray(e) && e.every(M), m = (e) => e.type === "array" || // schema.type might be an array of types, so we need to check if "array" is one of them
127
- 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(oe), w = (e) => m(e) && "items" in e && B(e.items), ce = (e) => typeof e == "string" ? e.split(":")[1] : void 0, q = ({ circularProp: e }) => /* @__PURE__ */ t.jsxs(
128
- E,
126
+ }, B = (e) => typeof e == "string" && ["string", "number", "boolean", "integer", "null"].includes(e) || Array.isArray(e) && e.every(B), m = (e) => e.type === "array" || // schema.type might be an array of types, so we need to check if "array" is one of them
127
+ 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")), z = (e) => typeof e == "string" && (e.startsWith(le) || e.startsWith(b)), w = (e) => m(e) && "items" in e && z(e.items), pe = (e) => {
128
+ if (typeof e == "string")
129
+ return e.startsWith(b) ? e.slice(b.length).split("/").pop() : e.split(":")[1];
130
+ }, q = ({ circularProp: e }) => /* @__PURE__ */ t.jsxs(
131
+ R,
129
132
  {
130
133
  className: "inline-flex items-center gap-1.5 text-xs translate-y-0.5",
131
134
  selectOnClick: !1,
@@ -134,7 +137,7 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
134
137
  /* @__PURE__ */ t.jsx("span", { children: e ? `${e} (circular)` : "circular" })
135
138
  ]
136
139
  }
137
- ), pe = ({
140
+ ), xe = ({
138
141
  name: e,
139
142
  schema: r,
140
143
  group: s,
@@ -142,12 +145,12 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
142
145
  showCollapseButton: o = !0
143
146
  }) => {
144
147
  const [n, l] = f(i);
145
- if (B(r))
146
- return /* @__PURE__ */ t.jsx(P, { children: /* @__PURE__ */ t.jsxs(g, { className: "gap-y-2", children: [
148
+ if (z(r))
149
+ return /* @__PURE__ */ t.jsx(S, { children: /* @__PURE__ */ t.jsxs(g, { className: "gap-y-2", children: [
147
150
  /* @__PURE__ */ t.jsxs("div", { children: [
148
151
  /* @__PURE__ */ t.jsx($, { className: "inline me-2", children: /* @__PURE__ */ t.jsx("code", { children: e }) }),
149
152
  /* @__PURE__ */ t.jsx(
150
- v,
153
+ I,
151
154
  {
152
155
  className: "inline",
153
156
  schema: r,
@@ -158,10 +161,10 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
158
161
  }
159
162
  )
160
163
  ] }),
161
- /* @__PURE__ */ t.jsx(I, { schema: r })
164
+ /* @__PURE__ */ t.jsx(O, { schema: r })
162
165
  ] }) });
163
166
  const d = !!((r.allOf || r.anyOf || r.oneOf || k(r) || m(r) && "items" in r && k(r.items) || r.additionalProperties) && !w(r)), c = !!(r.description || "items" in r && r.items?.enum || r.const || r.enum || r.example !== void 0 || r.default !== void 0);
164
- return /* @__PURE__ */ t.jsxs(P, { children: [
167
+ return /* @__PURE__ */ t.jsxs(S, { children: [
165
168
  /* @__PURE__ */ t.jsxs(g, { className: "gap-y-2", children: [
166
169
  /* @__PURE__ */ t.jsxs("div", { children: [
167
170
  /* @__PURE__ */ t.jsx($, { className: "inline me-2", children: d ? /* @__PURE__ */ t.jsx(
@@ -174,7 +177,7 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
174
177
  }
175
178
  ) : /* @__PURE__ */ t.jsx("code", { children: e }) }),
176
179
  /* @__PURE__ */ t.jsx(
177
- v,
180
+ I,
178
181
  {
179
182
  className: "inline",
180
183
  schema: r,
@@ -183,7 +186,7 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
183
186
  w(r) && /* @__PURE__ */ t.jsx(
184
187
  q,
185
188
  {
186
- circularProp: ce(r.items)
189
+ circularProp: pe(r.items)
187
190
  }
188
191
  )
189
192
  ]
@@ -192,35 +195,35 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
192
195
  ] }),
193
196
  c && /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-1.5", children: [
194
197
  r.description && /* @__PURE__ */ t.jsx(V, { className: "prose-sm", content: r.description }),
195
- "items" in r && r.items?.enum && /* @__PURE__ */ t.jsx(h, { values: r.items.enum }),
196
- r.const && /* @__PURE__ */ t.jsx(R, { schema: r, hideDescription: !0 }),
197
- r.enum && /* @__PURE__ */ t.jsx(h, { values: r.enum }),
198
- /* @__PURE__ */ t.jsx(I, { schema: r })
198
+ "items" in r && r.items?.enum && /* @__PURE__ */ t.jsx(v, { values: r.items.enum }),
199
+ r.const && /* @__PURE__ */ t.jsx(M, { schema: r, hideDescription: !0 }),
200
+ r.enum && /* @__PURE__ */ t.jsx(v, { values: r.enum }),
201
+ /* @__PURE__ */ t.jsx(O, { schema: r })
199
202
  ] })
200
203
  ] }),
201
- d && o && /* @__PURE__ */ t.jsx(X, { className: "self-start", children: /* @__PURE__ */ t.jsx(
202
- re,
204
+ d && o && /* @__PURE__ */ t.jsx(Y, { className: "self-start", children: /* @__PURE__ */ t.jsx(
205
+ se,
203
206
  {
204
207
  variant: "ghost",
205
208
  size: "icon",
206
209
  className: "rounded-full",
207
210
  onClick: () => l(!n),
208
211
  "aria-label": "Toggle properties",
209
- children: n ? /* @__PURE__ */ t.jsx(_, { size: 16 }) : /* @__PURE__ */ t.jsx(G, { size: 16 })
212
+ children: n ? /* @__PURE__ */ t.jsx(W, { size: 16 }) : /* @__PURE__ */ t.jsx(G, { size: 16 })
210
213
  }
211
214
  ) }),
212
215
  d && /* @__PURE__ */ t.jsx(
213
- F.Root,
216
+ E.Root,
214
217
  {
215
218
  defaultOpen: i,
216
219
  open: n,
217
220
  onOpenChange: l,
218
221
  className: j("w-full", !n && "contents"),
219
- children: /* @__PURE__ */ t.jsx(F.Content, { asChild: !0, children: /* @__PURE__ */ t.jsx(g, { children: r.anyOf || r.oneOf || r.type === "object" ? /* @__PURE__ */ t.jsx(x, { schema: r }) : m(r) && "items" in r ? /* @__PURE__ */ t.jsx(x, { schema: r.items }) : null }) })
222
+ children: /* @__PURE__ */ t.jsx(E.Content, { asChild: !0, children: /* @__PURE__ */ t.jsx(g, { children: r.anyOf || r.oneOf || r.type === "object" ? /* @__PURE__ */ t.jsx(x, { schema: r }) : m(r) && "items" in r ? /* @__PURE__ */ t.jsx(x, { schema: r.items }) : null }) })
220
223
  }
221
224
  )
222
225
  ] });
223
- }, z = (e) => {
226
+ }, D = (e) => {
224
227
  const r = e.oneOf ?? e.anyOf ?? [];
225
228
  return e.properties && Object.keys(e.properties).length > 0 ? r.map((s) => !s.properties && !s.type && !s.oneOf && !s.anyOf ? {
226
229
  ...s,
@@ -228,18 +231,18 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
228
231
  properties: e.properties,
229
232
  required: s.required ?? e.required
230
233
  } : s) : r;
231
- }, xe = (e) => {
234
+ }, ue = (e) => {
232
235
  if (Array.isArray(e.oneOf)) return "exactly-one";
233
236
  const r = e.discriminator?.propertyName;
234
237
  if (!r) return "at-least-one";
235
- const s = z(e), i = /* @__PURE__ */ new Set();
238
+ const s = D(e), i = /* @__PURE__ */ new Set();
236
239
  for (const o of s) {
237
240
  const n = o.properties?.[r], l = n?.const ?? (Array.isArray(n?.enum) && n.enum.length === 1 ? String(n.enum[0]) : void 0);
238
241
  if (l == null || i.has(String(l))) return "at-least-one";
239
242
  i.add(String(l));
240
243
  }
241
244
  return "exactly-one";
242
- }, O = (e, r) => r.title?.trim() || `Variant ${e + 1}`, ue = (e, r) => {
245
+ }, A = (e, r) => r.title?.trim() || `Variant ${e + 1}`, me = (e, r) => {
243
246
  const s = [];
244
247
  e.type && s.push(
245
248
  `type = ${Array.isArray(e.type) ? e.type.join("|") : e.type}`
@@ -255,15 +258,15 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
255
258
  s.push(`requires: ${n}${l}`);
256
259
  }
257
260
  return s;
258
- }, me = ({
261
+ }, fe = ({
259
262
  variants: e,
260
263
  schema: r,
261
264
  selectedVariant: s,
262
265
  onSelectVariant: i
263
266
  }) => {
264
267
  const o = e.map((n, l) => ({
265
- label: O(l, n),
266
- guards: ue(n, r)
268
+ label: A(l, n),
269
+ guards: me(n, r)
267
270
  }));
268
271
  return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2 text-sm", children: [
269
272
  /* @__PURE__ */ t.jsx("h4", { className: "font-medium", children: "Decision Table" }),
@@ -289,15 +292,15 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
289
292
  ] }, n.label)) })
290
293
  ] }) })
291
294
  ] });
292
- }, fe = ({
295
+ }, je = ({
293
296
  schema: e,
294
297
  cardHeader: r
295
298
  }) => {
296
- const s = Array.isArray(e.oneOf) ? "oneOf" : Array.isArray(e.anyOf) ? "anyOf" : void 0, i = s ? z(e) : [], [o, n] = f(
297
- () => i[0] ? O(0, i[0]) : ""
299
+ const s = Array.isArray(e.oneOf) ? "oneOf" : Array.isArray(e.anyOf) ? "anyOf" : void 0, i = s ? D(e) : [], [o, n] = f(
300
+ () => i[0] ? A(0, i[0]) : ""
298
301
  );
299
302
  if (!s) return null;
300
- const d = xe(e) === "exactly-one" ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
303
+ const d = ue(e) === "exactly-one" ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
301
304
  "Exactly one variant ",
302
305
  /* @__PURE__ */ t.jsx("b", { children: "must match" }),
303
306
  "."
@@ -309,17 +312,17 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
309
312
  /* @__PURE__ */ t.jsx("i", { children: "may match" }),
310
313
  " simultaneously."
311
314
  ] }), c = i.findIndex(
312
- (p, y) => O(y, p) === o
315
+ (p, y) => A(y, p) === o
313
316
  ), a = c >= 0 ? i[c] : null;
314
- return /* @__PURE__ */ t.jsxs(ne, { children: [
317
+ return /* @__PURE__ */ t.jsxs(ie, { children: [
315
318
  r,
316
- /* @__PURE__ */ t.jsxs(ie, { className: "text-sm flex flex-col gap-4", children: [
319
+ /* @__PURE__ */ t.jsxs(oe, { className: "text-sm flex flex-col gap-4", children: [
317
320
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
318
- /* @__PURE__ */ t.jsx(se, { variant: "outline", children: s }),
321
+ /* @__PURE__ */ t.jsx(ne, { variant: "outline", children: s }),
319
322
  /* @__PURE__ */ t.jsx("div", { className: "flex-1 p-2", children: /* @__PURE__ */ t.jsx("span", { className: "text-sm", children: d }) })
320
323
  ] }),
321
324
  /* @__PURE__ */ t.jsx(
322
- me,
325
+ fe,
323
326
  {
324
327
  variants: i,
325
328
  schema: e,
@@ -335,22 +338,22 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
335
338
  a && /* @__PURE__ */ t.jsx(x, { schema: a })
336
339
  ] })
337
340
  ] });
338
- }, je = (e) => e && /* @__PURE__ */ t.jsx(
341
+ }, ye = (e) => e && /* @__PURE__ */ t.jsx(
339
342
  V,
340
343
  {
341
344
  className: "text-sm leading-normal line-clamp-4",
342
345
  content: e
343
346
  }
344
- ), ye = (e, r, s) => {
347
+ ), ge = (e, r, s) => {
345
348
  const i = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
346
- /* @__PURE__ */ t.jsx("span", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ t.jsx(v, { schema: e }) }),
347
- e.enum && /* @__PURE__ */ t.jsx(h, { values: e.enum }),
348
- je(e.description),
349
- /* @__PURE__ */ t.jsx(I, { schema: e })
349
+ /* @__PURE__ */ t.jsx("span", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ t.jsx(I, { schema: e }) }),
350
+ e.enum && /* @__PURE__ */ t.jsx(v, { values: e.enum }),
351
+ ye(e.description),
352
+ /* @__PURE__ */ t.jsx(O, { schema: e })
350
353
  ] });
351
354
  return s ? /* @__PURE__ */ t.jsx("div", { className: "space-y-2 p-4", children: i }) : /* @__PURE__ */ t.jsxs(N, { children: [
352
355
  r,
353
- /* @__PURE__ */ t.jsx(b, { className: "space-y-2", children: i })
356
+ /* @__PURE__ */ t.jsx(h, { className: "space-y-2", children: i })
354
357
  ] });
355
358
  }, x = ({
356
359
  schema: e,
@@ -361,14 +364,14 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
361
364
  if (!e || Object.keys(e).length === 0)
362
365
  return /* @__PURE__ */ t.jsxs(N, { children: [
363
366
  s,
364
- /* @__PURE__ */ t.jsx(b, { children: /* @__PURE__ */ t.jsx("div", { className: "text-sm text-muted-foreground italic", children: "No data returned" }) })
367
+ /* @__PURE__ */ t.jsx(h, { children: /* @__PURE__ */ t.jsx("div", { className: "text-sm text-muted-foreground italic", children: "No data returned" }) })
365
368
  ] });
366
369
  if (e.const)
367
- return /* @__PURE__ */ t.jsx(R, { schema: e });
370
+ return /* @__PURE__ */ t.jsx(M, { schema: e });
368
371
  if (Array.isArray(e.oneOf) || Array.isArray(e.anyOf))
369
- return /* @__PURE__ */ t.jsx(fe, { schema: e, cardHeader: s });
370
- if (M(e.type))
371
- return ye(e, s, i);
372
+ return /* @__PURE__ */ t.jsx(je, { schema: e, cardHeader: s });
373
+ if (B(e.type))
374
+ return ge(e, s, i);
372
375
  if (m(e) && typeof e.items == "object") {
373
376
  const n = {
374
377
  type: "object",
@@ -378,35 +381,35 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
378
381
  }
379
382
  const o = typeof e.additionalProperties == "object" && /* @__PURE__ */ t.jsx(x, { schema: e.additionalProperties, embedded: !0 });
380
383
  if (e.type === "object") {
381
- const n = le(
384
+ const n = ae(
382
385
  Object.entries(e.properties ?? {}),
383
386
  ([a, p]) => p.deprecated ? "deprecated" : e.required?.includes(a) ? "required" : "optional"
384
387
  ), c = ["required", "optional", "deprecated"].flatMap((a) => {
385
388
  const p = n[a];
386
389
  return p ? { group: a, properties: p } : [];
387
- }).map(({ group: a, properties: p }, y) => /* @__PURE__ */ t.jsxs(C, { children: [
388
- y > 0 && /* @__PURE__ */ t.jsx(S, {}),
389
- /* @__PURE__ */ t.jsx(Y, { className: "overflow-clip", children: p.map(([A, D], L) => /* @__PURE__ */ t.jsxs(C, { children: [
390
- L > 0 && /* @__PURE__ */ t.jsx(S, {}),
390
+ }).map(({ group: a, properties: p }, y) => /* @__PURE__ */ t.jsxs(P, { children: [
391
+ y > 0 && /* @__PURE__ */ t.jsx(F, {}),
392
+ /* @__PURE__ */ t.jsx(Z, { className: "overflow-clip", children: p.map(([C, L], T) => /* @__PURE__ */ t.jsxs(P, { children: [
393
+ T > 0 && /* @__PURE__ */ t.jsx(F, {}),
391
394
  /* @__PURE__ */ t.jsx(
392
- pe,
395
+ xe,
393
396
  {
394
- name: A,
395
- schema: D,
397
+ name: C,
398
+ schema: L,
396
399
  group: a,
397
400
  defaultOpen: r
398
401
  }
399
402
  )
400
- ] }, A)) })
403
+ ] }, C)) })
401
404
  ] }, a));
402
405
  return i ? c : /* @__PURE__ */ t.jsxs(N, { children: [
403
406
  s,
404
- e.description && /* @__PURE__ */ t.jsx(Z, { children: /* @__PURE__ */ t.jsx(H, { children: e.description }) }),
405
- (c.length > 0 || o) && /* @__PURE__ */ t.jsxs(b, { className: "p-0!", children: [
407
+ e.description && /* @__PURE__ */ t.jsx(H, { children: /* @__PURE__ */ t.jsx(ee, { children: e.description }) }),
408
+ (c.length > 0 || o) && /* @__PURE__ */ t.jsxs(h, { className: "p-0!", children: [
406
409
  c,
407
410
  o
408
411
  ] }),
409
- e.additionalProperties === !0 && /* @__PURE__ */ t.jsx(ee, { children: /* @__PURE__ */ t.jsxs(
412
+ e.additionalProperties === !0 && /* @__PURE__ */ t.jsx(te, { children: /* @__PURE__ */ t.jsxs(
410
413
  "a",
411
414
  {
412
415
  className: "text-sm flex items-center gap-1 hover:underline",
@@ -415,7 +418,7 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
415
418
  target: "_blank",
416
419
  children: [
417
420
  "Additional properties are allowed",
418
- /* @__PURE__ */ t.jsx(W, { size: 14 })
421
+ /* @__PURE__ */ t.jsx(X, { size: 14 })
419
422
  ]
420
423
  }
421
424
  ) })
@@ -423,13 +426,13 @@ Array.isArray(e.type) && e.type.includes("array"), k = (e) => e && (e.type === "
423
426
  }
424
427
  };
425
428
  export {
426
- h as E,
427
- Se as P,
429
+ v as E,
430
+ Fe as P,
428
431
  x as S,
429
- v as a,
430
- I as b,
431
- B as c,
432
- le as g,
432
+ I as a,
433
+ O as b,
434
+ z as c,
435
+ ae as g,
433
436
  m as i
434
437
  };
435
- //# sourceMappingURL=SchemaView-G-SVXxAG.js.map
438
+ //# sourceMappingURL=SchemaView-DBaqV2yU.js.map