zudoku 0.66.2 → 0.66.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/dist/config/validators/validate.d.ts +32 -3
  2. package/dist/config/validators/validate.js +1 -1
  3. package/dist/config/validators/validate.js.map +1 -1
  4. package/dist/flat-config.d.ts +1 -1
  5. package/dist/lib/auth/issuer.js +1 -1
  6. package/dist/lib/auth/issuer.js.map +1 -1
  7. package/dist/lib/authentication/authentication.d.ts +3 -2
  8. package/dist/lib/authentication/components/SignIn.js +4 -2
  9. package/dist/lib/authentication/components/SignIn.js.map +1 -1
  10. package/dist/lib/authentication/components/SignUp.js +4 -2
  11. package/dist/lib/authentication/components/SignUp.js.map +1 -1
  12. package/dist/lib/authentication/hook.d.ts +2 -0
  13. package/dist/lib/authentication/hook.js +10 -0
  14. package/dist/lib/authentication/hook.js.map +1 -1
  15. package/dist/lib/authentication/providers/firebase.js +67 -9
  16. package/dist/lib/authentication/providers/firebase.js.map +1 -1
  17. package/dist/lib/authentication/ui/EmailVerificationUi.d.ts +4 -0
  18. package/dist/lib/authentication/ui/EmailVerificationUi.js +34 -0
  19. package/dist/lib/authentication/ui/EmailVerificationUi.js.map +1 -0
  20. package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +7 -2
  21. package/dist/lib/authentication/ui/ZudokuAuthUi.js +43 -11
  22. package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -1
  23. package/dist/lib/authentication/utils/relativeRedirectUrl.d.ts +1 -0
  24. package/dist/lib/authentication/utils/relativeRedirectUrl.js +8 -0
  25. package/dist/lib/authentication/utils/relativeRedirectUrl.js.map +1 -0
  26. package/dist/lib/components/index.d.ts +2 -0
  27. package/dist/lib/errors/ErrorMessage.d.ts +3 -0
  28. package/dist/lib/errors/ErrorMessage.js +16 -0
  29. package/dist/lib/errors/ErrorMessage.js.map +1 -0
  30. package/dist/lib/hooks/index.d.ts +2 -0
  31. package/dist/lib/oas/graphql/index.js +7 -3
  32. package/dist/lib/oas/graphql/index.js.map +1 -1
  33. package/dist/lib/plugins/api-keys/SettingsApiKeys.js +9 -172
  34. package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
  35. package/dist/lib/plugins/api-keys/index.d.ts +4 -1
  36. package/dist/lib/plugins/api-keys/index.js +21 -17
  37. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  38. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.d.ts +12 -0
  39. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js +133 -0
  40. package/dist/lib/plugins/api-keys/settings/ApiKeyItem.js.map +1 -0
  41. package/dist/lib/plugins/api-keys/settings/ApiKeyList.d.ts +4 -0
  42. package/dist/lib/plugins/api-keys/settings/ApiKeyList.js +30 -0
  43. package/dist/lib/plugins/api-keys/settings/ApiKeyList.js.map +1 -0
  44. package/dist/lib/plugins/api-keys/settings/RevealApiKey.d.ts +6 -0
  45. package/dist/lib/plugins/api-keys/settings/RevealApiKey.js +39 -0
  46. package/dist/lib/plugins/api-keys/settings/RevealApiKey.js.map +1 -0
  47. package/dist/lib/plugins/openapi/ParamInfos.js +1 -0
  48. package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
  49. package/dist/lib/plugins/openapi/Sidecar.js +3 -2
  50. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  51. package/dist/lib/plugins/openapi/schema/SchemaView.js +1 -1
  52. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
  53. package/dist/lib/plugins/openapi/util/createHttpSnippet.js +24 -1
  54. package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -1
  55. package/dist/lib/ui/Button.js +1 -1
  56. package/dist/lib/ui/Button.js.map +1 -1
  57. package/dist/vite/config.js +7 -0
  58. package/dist/vite/config.js.map +1 -1
  59. package/dist/vite/plugin-api-keys.js +4 -1
  60. package/dist/vite/plugin-api-keys.js.map +1 -1
  61. package/dist/vite/plugin-markdown-export.js +1 -1
  62. package/dist/vite/plugin-markdown-export.js.map +1 -1
  63. package/dist/vite/prerender/worker.js +3 -0
  64. package/dist/vite/prerender/worker.js.map +1 -1
  65. package/dist/vite/zuplo.d.ts +13 -0
  66. package/dist/vite/zuplo.js +15 -0
  67. package/dist/vite/zuplo.js.map +1 -0
  68. package/lib/{ActionButton-DUgvSylL.js → ActionButton-BSM2oNHF.js} +2 -2
  69. package/lib/{ActionButton-DUgvSylL.js.map → ActionButton-BSM2oNHF.js.map} +1 -1
  70. package/lib/{Button-CynVW1JV.js → Button-IOAeVaIH.js} +7 -6
  71. package/lib/{Button-CynVW1JV.js.map → Button-IOAeVaIH.js.map} +1 -1
  72. package/lib/{ClaudeLogo-CGRfGTk2.js → ClaudeLogo-DgjivS8A.js} +3 -3
  73. package/lib/{ClaudeLogo-CGRfGTk2.js.map → ClaudeLogo-DgjivS8A.js.map} +1 -1
  74. package/lib/{Drawer-Ci7XwhqT.js → Drawer-BRMcpfuF.js} +6 -6
  75. package/lib/{Drawer-Ci7XwhqT.js.map → Drawer-BRMcpfuF.js.map} +1 -1
  76. package/lib/Frame-DxlznfVd.js +205 -0
  77. package/lib/Frame-DxlznfVd.js.map +1 -0
  78. package/lib/{IndexingDialog-B5zCiUKr.js → IndexingDialog-DZWj_3cU.js} +2 -2
  79. package/lib/{IndexingDialog-B5zCiUKr.js.map → IndexingDialog-DZWj_3cU.js.map} +1 -1
  80. package/lib/{useMutation-C6RqWmTS.js → Input-D-kqEQ5M.js} +41 -23
  81. package/lib/Input-D-kqEQ5M.js.map +1 -0
  82. package/lib/{MdxPage-Bjf72BP3.js → MdxPage-BL-HbZrv.js} +9 -9
  83. package/lib/{MdxPage-Bjf72BP3.js.map → MdxPage-BL-HbZrv.js.map} +1 -1
  84. package/lib/{Mermaid-D_VSX7_Q.js → Mermaid-BjSczjLW.js} +3 -3
  85. package/lib/{Mermaid-D_VSX7_Q.js.map → Mermaid-BjSczjLW.js.map} +1 -1
  86. package/lib/{OAuthErrorPage-1Ekji0PK.js → OAuthErrorPage-DQtg28Go.js} +20 -21
  87. package/lib/{OAuthErrorPage-1Ekji0PK.js.map → OAuthErrorPage-DQtg28Go.js.map} +1 -1
  88. package/lib/{OasProvider-BZxmTyMM.js → OasProvider--qcZwrKS.js} +4 -4
  89. package/lib/{OasProvider-BZxmTyMM.js.map → OasProvider--qcZwrKS.js.map} +1 -1
  90. package/lib/{OperationList-B7nPIFB8.js → OperationList-CSJYzxQY.js} +1101 -1087
  91. package/lib/{OperationList-B7nPIFB8.js.map → OperationList-CSJYzxQY.js.map} +1 -1
  92. package/lib/{RouteGuard-9wjejsKm.js → RouteGuard-D0f743SM.js} +5 -5
  93. package/lib/{RouteGuard-9wjejsKm.js.map → RouteGuard-D0f743SM.js.map} +1 -1
  94. package/lib/{SchemaList-16_obkku.js → SchemaList-DtyuDrQA.js} +8 -8
  95. package/lib/{SchemaList-16_obkku.js.map → SchemaList-DtyuDrQA.js.map} +1 -1
  96. package/lib/SchemaView-G-SVXxAG.js +435 -0
  97. package/lib/SchemaView-G-SVXxAG.js.map +1 -0
  98. package/lib/{Select-CkxXP5I7.js → Secret-BxGpIhDP.js} +121 -121
  99. package/lib/Secret-BxGpIhDP.js.map +1 -0
  100. package/lib/SignUp-CDl7bQj3.js +50 -0
  101. package/lib/SignUp-CDl7bQj3.js.map +1 -0
  102. package/lib/{SyntaxHighlight-j_HRSPCU.js → SyntaxHighlight-Dgd0AaaX.js} +2 -2
  103. package/lib/{SyntaxHighlight-j_HRSPCU.js.map → SyntaxHighlight-Dgd0AaaX.js.map} +1 -1
  104. package/lib/{Toc-z05x698-.js → Toc-D_Rj4jVx.js} +2 -2
  105. package/lib/{Toc-z05x698-.js.map → Toc-D_Rj4jVx.js.map} +1 -1
  106. package/lib/{ZudokuContext-BXldanA8.js → ZudokuContext-DNHMZfcP.js} +33 -33
  107. package/lib/{ZudokuContext-BXldanA8.js.map → ZudokuContext-DNHMZfcP.js.map} +1 -1
  108. package/lib/{chunk-PVWAREVJ-dLIqswPy.js → chunk-PVWAREVJ-ClM0m2aJ.js} +19 -19
  109. package/lib/{chunk-PVWAREVJ-dLIqswPy.js.map → chunk-PVWAREVJ-ClM0m2aJ.js.map} +1 -1
  110. package/lib/{circular-D5sYCIWL.js → circular-BxODTa7z.js} +2 -2
  111. package/lib/{circular-D5sYCIWL.js.map → circular-BxODTa7z.js.map} +1 -1
  112. package/lib/{createServer-BlwU7lIr.js → createServer-BpreIXp6.js} +10 -10
  113. package/lib/{createServer-BlwU7lIr.js.map → createServer-BpreIXp6.js.map} +1 -1
  114. package/lib/createVariantComponent-CQVt-H3r.js +18 -0
  115. package/lib/createVariantComponent-CQVt-H3r.js.map +1 -0
  116. package/lib/{errors-BtC4Kn2j.js → errors-DliW1dED.js} +2 -2
  117. package/lib/{errors-BtC4Kn2j.js.map → errors-DliW1dED.js.map} +1 -1
  118. package/lib/{firebase-Ibm_tv3G.js → firebase-D4tbaCYB.js} +1588 -1342
  119. package/lib/firebase-D4tbaCYB.js.map +1 -0
  120. package/lib/hook-CHw_R_xu.js +52 -0
  121. package/lib/hook-CHw_R_xu.js.map +1 -0
  122. package/lib/{index-eKVhlB94.js → index-1TbL0HXQ.js} +2 -2
  123. package/lib/{index-eKVhlB94.js.map → index-1TbL0HXQ.js.map} +1 -1
  124. package/lib/{index-CeVTNcfF.js → index-9MxNUgg4.js} +99 -100
  125. package/lib/{index-CeVTNcfF.js.map → index-9MxNUgg4.js.map} +1 -1
  126. package/lib/{ErrorAlert-BUlG32M9.js → index-CboxZOVW.js} +5373 -4335
  127. package/lib/index-CboxZOVW.js.map +1 -0
  128. package/lib/index-CrcNWbel.js.map +1 -1
  129. package/lib/{index-Css56y3F.js → index-DXXZDuSJ.js} +4 -4
  130. package/lib/{index-Css56y3F.js.map → index-DXXZDuSJ.js.map} +1 -1
  131. package/lib/index.esm-BYObtETB.js.map +1 -1
  132. package/lib/index.esm-DtzT_KoE.js.map +1 -1
  133. package/lib/{index.esm-BoKBnRoT.js → index.esm-ti5zvZS_.js} +16 -14
  134. package/lib/index.esm-ti5zvZS_.js.map +1 -0
  135. package/lib/jsx-runtime-BzflLqGi.js.map +1 -1
  136. package/lib/{mutation-BoVlx8yA.js → mutation-DMHWqmFp.js} +2 -2
  137. package/lib/{mutation-BoVlx8yA.js.map → mutation-DMHWqmFp.js.map} +1 -1
  138. package/lib/ui/ActionButton.js +1 -1
  139. package/lib/ui/Button.js +6 -5
  140. package/lib/ui/Button.js.map +1 -1
  141. package/lib/ui/Carousel.js.map +1 -1
  142. package/lib/ui/Drawer.js +2 -2
  143. package/lib/ui/SyntaxHighlight.js +2 -2
  144. package/lib/zudoku.__internal.js +507 -479
  145. package/lib/zudoku.__internal.js.map +1 -1
  146. package/lib/zudoku.auth-auth0.js +1 -1
  147. package/lib/zudoku.auth-azureb2c.js +4 -4
  148. package/lib/zudoku.auth-clerk.js +2 -2
  149. package/lib/zudoku.auth-firebase.js +6 -5
  150. package/lib/zudoku.auth-firebase.js.map +1 -1
  151. package/lib/zudoku.auth-openid.js +4 -4
  152. package/lib/zudoku.auth-supabase.js +5 -5
  153. package/lib/zudoku.components.js +20 -21
  154. package/lib/zudoku.components.js.map +1 -1
  155. package/lib/zudoku.hooks.js +3 -3
  156. package/lib/zudoku.mermaid.js +3 -3
  157. package/lib/zudoku.plugin-api-catalog.js +8 -9
  158. package/lib/zudoku.plugin-api-catalog.js.map +1 -1
  159. package/lib/zudoku.plugin-api-keys.js +579 -544
  160. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  161. package/lib/zudoku.plugin-custom-pages.js +1 -1
  162. package/lib/zudoku.plugin-markdown.js +1 -1
  163. package/lib/zudoku.plugin-openapi.js +3 -3
  164. package/lib/zudoku.plugin-redirect.js +1 -1
  165. package/lib/zudoku.plugin-search-pagefind.js +5 -5
  166. package/lib/zudoku.router.js +2 -2
  167. package/lib/zudoku.router.js.map +1 -1
  168. package/package.json +7 -5
  169. package/src/lib/auth/issuer.ts +1 -1
  170. package/src/lib/authentication/authentication.ts +8 -2
  171. package/src/lib/authentication/components/SignIn.tsx +5 -2
  172. package/src/lib/authentication/components/SignUp.tsx +5 -2
  173. package/src/lib/authentication/hook.ts +16 -0
  174. package/src/lib/authentication/providers/firebase.tsx +98 -6
  175. package/src/lib/authentication/ui/EmailVerificationUi.tsx +129 -0
  176. package/src/lib/authentication/ui/ZudokuAuthUi.tsx +170 -38
  177. package/src/lib/authentication/utils/relativeRedirectUrl.ts +12 -0
  178. package/src/lib/errors/ErrorMessage.tsx +38 -0
  179. package/src/lib/oas/graphql/index.ts +7 -3
  180. package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +36 -476
  181. package/src/lib/plugins/api-keys/index.tsx +35 -21
  182. package/src/lib/plugins/api-keys/settings/ApiKeyItem.tsx +342 -0
  183. package/src/lib/plugins/api-keys/settings/ApiKeyList.tsx +64 -0
  184. package/src/lib/plugins/api-keys/settings/RevealApiKey.tsx +124 -0
  185. package/src/lib/plugins/openapi/ParamInfos.tsx +1 -0
  186. package/src/lib/plugins/openapi/Sidecar.tsx +3 -2
  187. package/src/lib/plugins/openapi/schema/SchemaView.tsx +6 -4
  188. package/src/lib/plugins/openapi/util/createHttpSnippet.ts +29 -1
  189. package/src/lib/ui/Button.tsx +1 -0
  190. package/lib/ErrorAlert-BUlG32M9.js.map +0 -1
  191. package/lib/RouterError-DfTZblpv.js +0 -42
  192. package/lib/RouterError-DfTZblpv.js.map +0 -1
  193. package/lib/SchemaView-eyvR4bRt.js +0 -597
  194. package/lib/SchemaView-eyvR4bRt.js.map +0 -1
  195. package/lib/Select-CkxXP5I7.js.map +0 -1
  196. package/lib/SignUp-D54_QWFy.js +0 -50
  197. package/lib/SignUp-D54_QWFy.js.map +0 -1
  198. package/lib/createVariantComponent-B9_dVBvu.js +0 -35
  199. package/lib/createVariantComponent-B9_dVBvu.js.map +0 -1
  200. package/lib/firebase-Ibm_tv3G.js.map +0 -1
  201. package/lib/hook-BNxidGQq.js +0 -40
  202. package/lib/hook-BNxidGQq.js.map +0 -1
  203. package/lib/index-DSOi7zVM.js +0 -1059
  204. package/lib/index-DSOi7zVM.js.map +0 -1
  205. package/lib/index.esm-BoKBnRoT.js.map +0 -1
  206. package/lib/useMutation-C6RqWmTS.js.map +0 -1
@@ -1,42 +0,0 @@
1
- import { j as e } from "./jsx-runtime-BzflLqGi.js";
2
- import { c as s, L as t, d as a, i as n } from "./chunk-PVWAREVJ-dLIqswPy.js";
3
- import { UnlinkIcon as i } from "lucide-react";
4
- import { C as c } from "./CategoryHeading-DhmodDcq.js";
5
- import { T as d, H as m, D as l, E as p } from "./ErrorAlert-BUlG32M9.js";
6
- import { c as h } from "./cn-dYga0KKN.js";
7
- const x = () => {
8
- const r = s();
9
- return /* @__PURE__ */ e.jsxs(d, { className: "h-full pt-(--padding-content-top)", children: [
10
- /* @__PURE__ */ e.jsx(c, { children: "404" }),
11
- /* @__PURE__ */ e.jsxs(m, { level: 1, className: "flex gap-3.5 items-center", children: [
12
- "Page not found",
13
- /* @__PURE__ */ e.jsx(i, { size: 24 })
14
- ] }),
15
- /* @__PURE__ */ e.jsxs(l, { children: [
16
- "Start by adding a file at",
17
- " ",
18
- /* @__PURE__ */ e.jsxs("code", { children: [
19
- "{DOCUMENT_ROOT}",
20
- "/",
21
- r["*"],
22
- ".mdx"
23
- ] }),
24
- " ",
25
- "and add some content to make this error go away. By default",
26
- " ",
27
- /* @__PURE__ */ e.jsx("code", { children: "DOCUMENT_ROOT" }),
28
- " is the `pages` directory."
29
- ] }),
30
- /* @__PURE__ */ e.jsx("p", { children: "It seems that the page you are looking for does not exist or may have been moved. Please check the URL for any typos or use the navigation menu to find the correct page." }),
31
- /* @__PURE__ */ e.jsx(t, { to: "/", children: "Go back home" })
32
- ] });
33
- };
34
- function E({ className: r }) {
35
- const o = a();
36
- return n(o) && o.status === 404 ? /* @__PURE__ */ e.jsx(x, {}) : /* @__PURE__ */ e.jsx("div", { className: h("mx-4 max-w-2xl", r), children: /* @__PURE__ */ e.jsx(p, { error: o }) });
37
- }
38
- export {
39
- x as N,
40
- E as R
41
- };
42
- //# sourceMappingURL=RouterError-DfTZblpv.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RouterError-DfTZblpv.js","sources":["../src/lib/components/NotFoundPage.tsx","../src/lib/errors/RouterError.tsx"],"sourcesContent":["import { UnlinkIcon } from \"lucide-react\";\nimport { Link, useParams } from \"react-router\";\nimport { CategoryHeading } from \"./CategoryHeading.js\";\nimport { DeveloperHint } from \"./DeveloperHint.js\";\nimport { Heading } from \"./Heading.js\";\nimport { Typography } from \"./Typography.js\";\n\nexport const NotFoundPage = () => {\n const params = useParams();\n\n return (\n <Typography className=\"h-full pt-(--padding-content-top)\">\n <CategoryHeading>404</CategoryHeading>\n <Heading level={1} className=\"flex gap-3.5 items-center\">\n Page not found\n <UnlinkIcon size={24} />\n </Heading>\n <DeveloperHint>\n Start by adding a file at{\" \"}\n <code>\n {\"{DOCUMENT_ROOT}\"}/{params[\"*\"]}.mdx\n </code>{\" \"}\n and add some content to make this error go away. By default{\" \"}\n <code>DOCUMENT_ROOT</code> is the `pages` directory.\n </DeveloperHint>\n <p>\n It seems that the page you are looking for does not exist or may have\n been moved. Please check the URL for any typos or use the navigation\n menu to find the correct page.\n </p>\n <Link to=\"/\">Go back home</Link>\n </Typography>\n );\n};\n","import { isRouteErrorResponse, useRouteError } from \"react-router\";\nimport { NotFoundPage } from \"../components/NotFoundPage.js\";\nimport { cn } from \"../util/cn.js\";\nimport { ErrorAlert } from \"./ErrorAlert.js\";\n\nexport function RouterError({ className }: { className?: string }) {\n const error = useRouteError();\n\n if (isRouteErrorResponse(error) && error.status === 404) {\n return <NotFoundPage />;\n }\n\n return (\n <div className={cn(\"mx-4 max-w-2xl\", className)}>\n <ErrorAlert error={error} />\n </div>\n );\n}\n"],"names":["NotFoundPage","params","useParams","jsxs","Typography","jsx","CategoryHeading","Heading","UnlinkIcon","DeveloperHint","Link","RouterError","className","error","useRouteError","isRouteErrorResponse","cn","ErrorAlert"],"mappings":";;;;;;AAOO,MAAMA,IAAe,MAAM;AAChC,QAAMC,IAASC,EAAA;AAEf,SACEC,gBAAAA,EAAAA,KAACC,GAAA,EAAW,WAAU,qCACpB,UAAA;AAAA,IAAAC,gBAAAA,EAAAA,IAACC,KAAgB,UAAA,MAAA,CAAG;AAAA,IACpBH,gBAAAA,EAAAA,KAACI,GAAA,EAAQ,OAAO,GAAG,WAAU,6BAA4B,UAAA;AAAA,MAAA;AAAA,MAEvDF,gBAAAA,EAAAA,IAACG,GAAA,EAAW,MAAM,GAAA,CAAI;AAAA,IAAA,GACxB;AAAA,2BACCC,GAAA,EAAc,UAAA;AAAA,MAAA;AAAA,MACa;AAAA,6BACzB,QAAA,EACE,UAAA;AAAA,QAAA;AAAA,QAAkB;AAAA,QAAER,EAAO,GAAG;AAAA,QAAE;AAAA,MAAA,GACnC;AAAA,MAAQ;AAAA,MAAI;AAAA,MACgD;AAAA,MAC5DI,gBAAAA,EAAAA,IAAC,UAAK,UAAA,gBAAA,CAAa;AAAA,MAAO;AAAA,IAAA,GAC5B;AAAA,IACAA,gBAAAA,EAAAA,IAAC,OAAE,UAAA,4KAAA,CAIH;AAAA,IACAA,gBAAAA,EAAAA,IAACK,GAAA,EAAK,IAAG,KAAI,UAAA,eAAA,CAAY;AAAA,EAAA,GAC3B;AAEJ;AC5BO,SAASC,EAAY,EAAE,WAAAC,KAAqC;AACjE,QAAMC,IAAQC,EAAA;AAEd,SAAIC,EAAqBF,CAAK,KAAKA,EAAM,WAAW,4BAC1Cb,GAAA,EAAa,IAIrBK,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAWW,EAAG,kBAAkBJ,CAAS,GAC5C,UAAAP,gBAAAA,EAAAA,IAACY,GAAA,EAAW,OAAAJ,EAAA,CAAc,EAAA,CAC5B;AAEJ;"}
@@ -1,597 +0,0 @@
1
- import { j as t } from "./jsx-runtime-BzflLqGi.js";
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
- import { c as a } from "./cn-dYga0KKN.js";
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-BUlG32M9.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-D5sYCIWL.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;
22
- },
23
- {}
24
- );
25
- function N({ className: e, ...r }) {
26
- return /* @__PURE__ */ t.jsx(
27
- "div",
28
- {
29
- "data-slot": "frame",
30
- className: a(
31
- "relative flex flex-col rounded-2xl bg-muted p-1",
32
- e
33
- ),
34
- ...r
35
- }
36
- );
37
- }
38
- function b({ className: e, ...r }) {
39
- return /* @__PURE__ */ t.jsx(
40
- "div",
41
- {
42
- "data-slot": "frame-panel",
43
- className: a(
44
- "relative bg-clip-padding rounded-xl border bg-card p-5 shadow-xs",
45
- "before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-xl)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-clip-border dark:before:shadow-[0_-1px_--theme(--color-white/8%)]",
46
- e
47
- ),
48
- ...r
49
- }
50
- );
51
- }
52
- function oe({ className: e, ...r }) {
53
- return /* @__PURE__ */ t.jsx(
54
- "header",
55
- {
56
- "data-slot": "frame-panel-header",
57
- className: a("flex flex-col p-4", e),
58
- ...r
59
- }
60
- );
61
- }
62
- function le({
63
- className: e,
64
- ...r
65
- }) {
66
- return /* @__PURE__ */ t.jsx(
67
- "div",
68
- {
69
- "data-slot": "frame-panel-description",
70
- className: a("text-sm text-muted-foreground", e),
71
- ...r
72
- }
73
- );
74
- }
75
- function ae({ className: e, ...r }) {
76
- return /* @__PURE__ */ t.jsx(
77
- "footer",
78
- {
79
- "data-slot": "frame-panel-footer",
80
- className: a("flex flex-col gap-1 px-5 py-4", e),
81
- ...r
82
- }
83
- );
84
- }
85
- function de({ className: e, ...r }) {
86
- return /* @__PURE__ */ t.jsx(
87
- "div",
88
- {
89
- role: "list",
90
- "data-slot": "item-group",
91
- className: a("group/item-group flex flex-col", e),
92
- ...r
93
- }
94
- );
95
- }
96
- function S({
97
- className: e,
98
- ...r
99
- }) {
100
- return /* @__PURE__ */ t.jsx(
101
- Z,
102
- {
103
- "data-slot": "item-separator",
104
- orientation: "horizontal",
105
- className: a("my-0", e),
106
- ...r
107
- }
108
- );
109
- }
110
- const ce = Y(
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]",
112
- {
113
- variants: {
114
- variant: {
115
- default: "bg-transparent",
116
- outline: "border-border",
117
- muted: "bg-muted/50"
118
- },
119
- size: {
120
- default: "p-4 gap-4 ",
121
- sm: "py-3 px-4 gap-2.5"
122
- }
123
- },
124
- defaultVariants: {
125
- variant: "default",
126
- size: "default"
127
- }
128
- }
129
- );
130
- function $({
131
- className: e,
132
- variant: r = "default",
133
- size: n = "default",
134
- asChild: i = !1,
135
- ...o
136
- }) {
137
- const s = i ? X : "div";
138
- return /* @__PURE__ */ t.jsx(
139
- s,
140
- {
141
- "data-slot": "item",
142
- "data-variant": r,
143
- "data-size": n,
144
- className: a(ce({ variant: r, size: n, className: e })),
145
- ...o
146
- }
147
- );
148
- }
149
- function g({ className: e, ...r }) {
150
- return /* @__PURE__ */ t.jsx(
151
- "div",
152
- {
153
- "data-slot": "item-content",
154
- className: a(
155
- "flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none",
156
- e
157
- ),
158
- ...r
159
- }
160
- );
161
- }
162
- function w({ className: e, ...r }) {
163
- return /* @__PURE__ */ t.jsx(
164
- "div",
165
- {
166
- "data-slot": "item-title",
167
- className: a(
168
- "flex w-fit items-center gap-2 text-sm leading-snug font-medium",
169
- e
170
- ),
171
- ...r
172
- }
173
- );
174
- }
175
- function pe({ className: e, ...r }) {
176
- return /* @__PURE__ */ t.jsx(
177
- "div",
178
- {
179
- "data-slot": "item-actions",
180
- className: a("flex items-center gap-2", e),
181
- ...r
182
- }
183
- );
184
- }
185
- const z = ({
186
- schema: e,
187
- hideDescription: r = !1
188
- }) => /* @__PURE__ */ t.jsx("div", { className: "flex flex-col gap-1", children: /* @__PURE__ */ t.jsxs("div", { children: [
189
- /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Const value: " }),
190
- /* @__PURE__ */ t.jsx(m, { className: "border rounded px-1 font-mono", children: e.const }),
191
- !r && e.description && /* @__PURE__ */ t.jsx("div", { className: "text-muted-foreground", children: e.description })
192
- ] }) }), v = ({
193
- values: e,
194
- className: r,
195
- maxVisibleValues: n = 8
196
- }) => {
197
- const [i, o] = j(!1);
198
- if (!e.length) return null;
199
- const s = e.length > n, l = s && !i ? e.slice(0, n) : e;
200
- return /* @__PURE__ */ t.jsxs("div", { className: a("flex flex-wrap gap-1.5", r), children: [
201
- /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Enum values:" }),
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,
205
- {
206
- variant: "ghost",
207
- size: "sm",
208
- className: "h-fit px-0",
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 }),
212
- /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "show less" })
213
- ] }) : /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-1", children: [
214
- /* @__PURE__ */ t.jsx(_, { size: 12 }),
215
- /* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground", children: [
216
- "show ",
217
- e.length - n,
218
- " more"
219
- ] })
220
- ] })
221
- }
222
- )
223
- ] });
224
- }, xe = ({ pattern: e }) => {
225
- const [r, n] = j(!1), i = e.length > 20, o = i ? `${e.slice(0, 20)}…` : e;
226
- return /* @__PURE__ */ t.jsxs(
227
- q,
228
- {
229
- className: a("text-xs", i && "cursor-pointer"),
230
- onClick: () => n(!r),
231
- selectOnClick: !1,
232
- children: [
233
- r ? e : o,
234
- i && /* @__PURE__ */ t.jsx("button", { type: "button", className: "p-1 translate-y-[2px]", children: !r && /* @__PURE__ */ t.jsx(J, { size: 12 }) })
235
- ]
236
- }
237
- );
238
- }, ue = (e) => e ? [
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,
240
- e.enum && "enum",
241
- e.const && "const",
242
- e.format,
243
- e.minimum !== void 0 && `min: ${e.minimum}`,
244
- e.maximum !== void 0 && `max: ${e.maximum}`,
245
- e.minLength !== void 0 && `minLength: ${e.minLength}`,
246
- e.maxLength !== void 0 && `maxLength: ${e.maxLength}`,
247
- e.minItems !== void 0 && `minItems: ${e.minItems}`,
248
- e.maxItems !== void 0 && `maxItems: ${e.maxItems}`,
249
- e.minProperties !== void 0 && `minProps: ${e.minProperties}`,
250
- e.maxProperties !== void 0 && `maxProps: ${e.maxProperties}`,
251
- e.uniqueItems && "unique",
252
- e.readOnly && "readOnly",
253
- e.writeOnly && "writeOnly",
254
- e.deprecated && "deprecated",
255
- e.pattern && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
256
- "pattern: ",
257
- /* @__PURE__ */ t.jsx(xe, { pattern: e.pattern })
258
- ] })
259
- ] : [], h = ({
260
- schema: e,
261
- extraItems: r = [],
262
- className: n
263
- }) => {
264
- const i = [...ue(e), ...r].flatMap(
265
- (o) => typeof o == "string" || Q(o) ? o : []
266
- );
267
- return /* @__PURE__ */ t.jsx("span", { className: n, children: i.map((o, s) => (
268
- // biome-ignore lint/suspicious/noArrayIndexKey: index should be stable
269
- /* @__PURE__ */ t.jsxs("span", { className: "text-muted-foreground", children: [
270
- o,
271
- s < i.length - 1 && /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground/50", children: " · " })
272
- ] }, s)
273
- )) });
274
- }, I = ({
275
- schema: e
276
- }) => {
277
- const r = e.examples?.at(0), n = e.default;
278
- return r === void 0 && n === void 0 ? null : /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-1", children: [
279
- r !== void 0 && /* @__PURE__ */ t.jsxs("div", { children: [
280
- /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Example: " }),
281
- /* @__PURE__ */ t.jsx(m, { className: "border rounded-sm px-1 font-mono", children: typeof r == "object" || typeof r == "boolean" ? JSON.stringify(r) : r })
282
- ] }),
283
- n !== void 0 && /* @__PURE__ */ t.jsxs("div", { children: [
284
- /* @__PURE__ */ t.jsx("span", { className: "text-muted-foreground", children: "Default: " }),
285
- /* @__PURE__ */ t.jsx(m, { className: "border rounded-sm px-1 font-mono", children: typeof n == "object" || typeof n == "boolean" ? JSON.stringify(n) : n })
286
- ] })
287
- ] });
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,
291
- {
292
- className: "inline-flex items-center gap-1.5 text-xs translate-y-0.5",
293
- selectOnClick: !1,
294
- children: [
295
- /* @__PURE__ */ t.jsx(K, { size: 13 }),
296
- /* @__PURE__ */ t.jsx("span", { children: e ? `${e} (circular)` : "circular" })
297
- ]
298
- }
299
- ), fe = ({
300
- name: e,
301
- schema: r,
302
- group: n,
303
- defaultOpen: i = !1,
304
- showCollapseButton: o = !0
305
- }) => {
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: [
309
- /* @__PURE__ */ t.jsxs("div", { children: [
310
- /* @__PURE__ */ t.jsx(w, { className: "inline me-2", children: /* @__PURE__ */ t.jsx("code", { children: e }) }),
311
- /* @__PURE__ */ t.jsx(
312
- h,
313
- {
314
- className: "inline",
315
- schema: r,
316
- extraItems: [
317
- n !== "optional" && /* @__PURE__ */ t.jsx("span", { className: "text-primary", children: "required" }),
318
- /* @__PURE__ */ t.jsx(V, {}, "circular-ref")
319
- ]
320
- }
321
- )
322
- ] }),
323
- /* @__PURE__ */ t.jsx(I, { schema: r })
324
- ] }) });
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);
326
- return /* @__PURE__ */ t.jsxs($, { children: [
327
- /* @__PURE__ */ t.jsxs(g, { className: "gap-y-2", children: [
328
- /* @__PURE__ */ t.jsxs("div", { children: [
329
- /* @__PURE__ */ t.jsx(w, { className: "inline me-2", children: c ? /* @__PURE__ */ t.jsx(
330
- "button",
331
- {
332
- onClick: () => l(!s),
333
- type: "button",
334
- className: "hover:underline",
335
- children: /* @__PURE__ */ t.jsx("code", { children: e })
336
- }
337
- ) : /* @__PURE__ */ t.jsx("code", { children: e }) }),
338
- /* @__PURE__ */ t.jsx(
339
- h,
340
- {
341
- className: "inline",
342
- schema: r,
343
- extraItems: [
344
- n !== "optional" && /* @__PURE__ */ t.jsx("span", { className: "text-primary", children: "required" }),
345
- F(r) && /* @__PURE__ */ t.jsx(
346
- V,
347
- {
348
- circularProp: me(r.items)
349
- }
350
- )
351
- ]
352
- }
353
- )
354
- ] }),
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 })
361
- ] })
362
- ] }),
363
- c && o && /* @__PURE__ */ t.jsx(pe, { className: "self-start", children: /* @__PURE__ */ t.jsx(
364
- ee,
365
- {
366
- variant: "ghost",
367
- size: "icon",
368
- className: "rounded-full",
369
- onClick: () => l(!s),
370
- "aria-label": "Toggle properties",
371
- children: s ? /* @__PURE__ */ t.jsx(U, { size: 16 }) : /* @__PURE__ */ t.jsx(G, { size: 16 })
372
- }
373
- ) }),
374
- c && /* @__PURE__ */ t.jsx(
375
- P.Root,
376
- {
377
- defaultOpen: i,
378
- open: s,
379
- onOpenChange: l,
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 }) })
382
- }
383
- )
384
- ] });
385
- }, M = (e) => {
386
- const r = e.oneOf ?? e.anyOf ?? [];
387
- return e.properties && Object.keys(e.properties).length > 0 ? r.map((n) => !n.properties && !n.type && !n.oneOf && !n.anyOf ? {
388
- ...n,
389
- type: "object",
390
- properties: e.properties,
391
- required: n.required ?? e.required
392
- } : n) : r;
393
- }, je = (e) => {
394
- if (Array.isArray(e.oneOf)) return "exactly-one";
395
- const r = e.discriminator?.propertyName;
396
- if (!r) return "at-least-one";
397
- const n = M(e), i = /* @__PURE__ */ new Set();
398
- for (const o of n) {
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));
402
- }
403
- return "exactly-one";
404
- }, O = (e, r) => r.title?.trim() || `Variant ${e + 1}`, ye = (e, r) => {
405
- const n = [];
406
- e.type && n.push(
407
- `type = ${Array.isArray(e.type) ? e.type.join("|") : e.type}`
408
- );
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)}`);
413
- }
414
- const o = (e.required ?? []).filter((s) => s !== i);
415
- if (o.length) {
416
- const s = o.slice(0, 3).join(", "), l = o.length > 3 ? ` +${o.length - 3} more` : "";
417
- n.push(`requires: ${s}${l}`);
418
- }
419
- return n;
420
- }, ge = ({
421
- variants: e,
422
- schema: r,
423
- selectedVariant: n,
424
- onSelectVariant: i
425
- }) => {
426
- const o = e.map((s, l) => ({
427
- label: O(l, s),
428
- guards: ye(s, r)
429
- }));
430
- return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2 text-sm", children: [
431
- /* @__PURE__ */ t.jsx("h4", { className: "font-medium", children: "Decision Table" }),
432
- /* @__PURE__ */ t.jsx("div", { className: "border rounded-md overflow-hidden", children: /* @__PURE__ */ t.jsxs("table", { className: "w-full", children: [
433
- /* @__PURE__ */ t.jsx("thead", { children: /* @__PURE__ */ t.jsxs("tr", { className: "border-b bg-muted/50", children: [
434
- /* @__PURE__ */ t.jsx("th", { className: "text-left p-2 font-medium", children: "Variant" }),
435
- /* @__PURE__ */ t.jsx("th", { className: "text-left p-2 font-medium", children: "Matching Criteria" })
436
- ] }) }),
437
- /* @__PURE__ */ t.jsx("tbody", { className: "divide-y", children: o.map((s) => /* @__PURE__ */ t.jsxs("tr", { className: "hover:bg-muted/30", children: [
438
- /* @__PURE__ */ t.jsx("td", { className: "p-2 font-medium", children: /* @__PURE__ */ t.jsx(
439
- "button",
440
- {
441
- type: "button",
442
- className: a(
443
- "hover:underline",
444
- n === s.label && "text-primary"
445
- ),
446
- onClick: () => i(s.label),
447
- children: s.label
448
- }
449
- ) }),
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)) })
452
- ] }) })
453
- ] });
454
- }, Ne = ({
455
- schema: e,
456
- cardHeader: r
457
- }) => {
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]) : ""
460
- );
461
- if (!n) return null;
462
- const c = je(e) === "exactly-one" ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
463
- "Exactly one variant ",
464
- /* @__PURE__ */ t.jsx("b", { children: "must match" }),
465
- "."
466
- ] }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
467
- "At least one variant ",
468
- /* @__PURE__ */ t.jsx("b", { children: "must match" }),
469
- ". Multiple variants",
470
- " ",
471
- /* @__PURE__ */ t.jsx("i", { children: "may match" }),
472
- " simultaneously."
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: [
477
- r,
478
- /* @__PURE__ */ t.jsxs(ne, { className: "text-sm flex flex-col gap-4", children: [
479
- /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
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 }) })
482
- ] }),
483
- /* @__PURE__ */ t.jsx(
484
- ge,
485
- {
486
- variants: i,
487
- schema: e,
488
- selectedVariant: o,
489
- onSelectVariant: s
490
- }
491
- ),
492
- /* @__PURE__ */ t.jsxs("strong", { children: [
493
- "Properties for ",
494
- o,
495
- ":"
496
- ] }),
497
- d && /* @__PURE__ */ t.jsx(u, { schema: d })
498
- ] })
499
- ] });
500
- }, be = (e) => e && /* @__PURE__ */ t.jsx(
501
- E,
502
- {
503
- className: "text-sm leading-normal line-clamp-4",
504
- content: e
505
- }
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 })
512
- ] });
513
- return n ? /* @__PURE__ */ t.jsx("div", { className: "space-y-2 p-4", children: i }) : /* @__PURE__ */ t.jsxs(N, { children: [
514
- r,
515
- /* @__PURE__ */ t.jsx(b, { className: "space-y-2", children: i })
516
- ] });
517
- }, u = ({
518
- schema: e,
519
- defaultOpen: r = !1,
520
- cardHeader: n,
521
- embedded: i
522
- }) => {
523
- if (!e || Object.keys(e).length === 0)
524
- return /* @__PURE__ */ t.jsxs(N, { children: [
525
- n,
526
- /* @__PURE__ */ t.jsx(b, { children: /* @__PURE__ */ t.jsx("div", { className: "text-sm text-muted-foreground italic", children: "No data returned" }) })
527
- ] });
528
- if (e.const)
529
- return /* @__PURE__ */ t.jsx(z, { schema: e });
530
- if (Array.isArray(e.oneOf) || Array.isArray(e.anyOf))
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 });
542
- if (e.type === "object") {
543
- const s = ie(
544
- Object.entries(e.properties ?? {}),
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: [
565
- n,
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
570
- ] }),
571
- e.additionalProperties === !0 && /* @__PURE__ */ t.jsx(ae, { children: /* @__PURE__ */ t.jsxs(
572
- "a",
573
- {
574
- className: "text-sm flex items-center gap-1 hover:underline",
575
- href: "https://swagger.io/docs/specification/v3_0/data-models/dictionaries/",
576
- rel: "noopener noreferrer",
577
- target: "_blank",
578
- children: [
579
- "Additional properties are allowed",
580
- /* @__PURE__ */ t.jsx(W, { size: 14 })
581
- ]
582
- }
583
- ) })
584
- ] });
585
- }
586
- };
587
- export {
588
- v as E,
589
- Ee as P,
590
- u as S,
591
- h as a,
592
- I as b,
593
- B as c,
594
- ie as g,
595
- f as i
596
- };
597
- //# sourceMappingURL=SchemaView-eyvR4bRt.js.map