zudoku 0.0.0-fa903e7 → 0.0.0-fabd0c1
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.
- package/client.d.ts +7 -0
- package/dist/app/demo.js +1 -1
- package/dist/app/demo.js.map +1 -1
- package/dist/app/entry.client.d.ts +1 -0
- package/dist/app/entry.client.js +14 -15
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +1 -0
- package/dist/app/entry.server.js +2 -2
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.d.ts +1 -1
- package/dist/app/main.js +2 -1
- package/dist/app/main.js.map +1 -1
- package/dist/app/sentry.d.ts +3 -0
- package/dist/app/sentry.js +19 -0
- package/dist/app/sentry.js.map +1 -0
- package/dist/app/standalone.js +1 -1
- package/dist/app/standalone.js.map +1 -1
- package/dist/app/tailwind.d.ts +2 -1
- package/dist/app/tailwind.js +64 -52
- package/dist/app/tailwind.js.map +1 -1
- package/dist/cli/cli.js +0 -2
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.js +1 -0
- package/dist/cli/cmds/build.js.map +1 -1
- package/dist/cli/common/outdated.js +2 -1
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/config/common.d.ts +8 -0
- package/dist/config/common.js +2 -0
- package/dist/config/common.js.map +1 -0
- package/dist/config/config.d.ts +3 -2
- package/dist/config/loader.d.ts +20 -0
- package/dist/config/loader.js +154 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/validators/InputSidebarSchema.d.ts +14 -13
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/common.d.ts +4945 -0
- package/dist/config/validators/common.js +280 -0
- package/dist/config/validators/common.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +1 -0
- package/dist/config/validators/icon-types.js +2 -0
- package/dist/config/validators/icon-types.js.map +1 -0
- package/dist/config/validators/validate.d.ts +783 -533
- package/dist/config/validators/validate.js +9 -234
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/SignIn.js +1 -1
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +1 -1
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +7 -0
- package/dist/lib/authentication/providers/openid.js +8 -2
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/AnchorLink.d.ts +1 -1
- package/dist/lib/components/AnchorLink.js +1 -1
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +1 -2
- package/dist/lib/components/Bootstrap.js +3 -3
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/Header.js +2 -2
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +4 -4
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Layout.js +4 -3
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Markdown.js +1 -1
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +1 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +1 -1
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/ReactMarkdown.d.ts +29 -0
- package/dist/lib/components/ReactMarkdown.js +182 -0
- package/dist/lib/components/ReactMarkdown.js.map +1 -0
- package/dist/lib/components/Search.d.ts +3 -1
- package/dist/lib/components/Search.js +3 -3
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/SlotletProvider.d.ts +2 -2
- package/dist/lib/components/SyntaxHighlight.js +0 -4
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +1 -1
- package/dist/lib/components/TopNavigation.js +1 -1
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.js +1 -1
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +1 -1
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +4 -4
- package/dist/lib/components/index.js +1 -1
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
- package/dist/lib/components/navigation/Sidebar.js +2 -2
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarBadge.d.ts +0 -9
- package/dist/lib/components/navigation/SidebarBadge.js +0 -9
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
- package/dist/lib/components/navigation/SidebarCategory.js +4 -5
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +2 -4
- package/dist/lib/components/navigation/SidebarItem.js +6 -11
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/components/navigation/utils.js +1 -1
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +1 -1
- package/dist/lib/core/plugins.d.ts +3 -5
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/RouterError.js +1 -1
- package/dist/lib/errors/RouterError.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +4 -1
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +2 -0
- package/dist/lib/plugins/api-catalog/Catalog.js +36 -0
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
- package/dist/lib/plugins/api-catalog/index.d.ts +30 -0
- package/dist/lib/plugins/api-catalog/index.js +15 -0
- package/dist/lib/plugins/api-catalog/index.js.map +1 -0
- package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +3 -3
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +3 -1
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +24 -3
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +14 -4
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +4 -2
- package/dist/lib/plugins/openapi/Route.js +25 -2
- package/dist/lib/plugins/openapi/Route.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +3 -13
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/context.d.ts +3 -3
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +2 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +13 -13
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +19 -0
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/util/methodToColor.d.ts +20 -0
- package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
- package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
- package/dist/lib/plugins/redirect/index.d.ts +1 -1
- package/dist/lib/plugins/redirect/index.js +1 -1
- package/dist/lib/plugins/redirect/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/index.d.ts +22 -3
- package/dist/lib/plugins/search-inkeep/index.js +41 -5
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +3 -4
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/util/MdxComponents.d.ts +18 -19
- package/dist/lib/util/MdxComponents.js +1 -3
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/createVariantComponent.d.ts +2 -2
- package/dist/lib/util/useExposedProps.js +1 -1
- package/dist/lib/util/useExposedProps.js.map +1 -1
- package/dist/lib/util/useOnScreen.d.ts +1 -1
- package/dist/lib/util/useScrollToAnchor.js +1 -1
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/lib/util/useScrollToTop.js +1 -1
- package/dist/lib/util/useScrollToTop.js.map +1 -1
- package/dist/vite/build.js +15 -3
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +6 -4
- package/dist/vite/config.js +59 -24
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +4 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/css/collect.d.ts +2 -0
- package/dist/vite/css/collect.js +27 -0
- package/dist/vite/css/collect.js.map +1 -0
- package/dist/vite/css/plugin.d.ts +5 -0
- package/dist/vite/css/plugin.js +79 -0
- package/dist/vite/css/plugin.js.map +1 -0
- package/dist/vite/dev-server.js +19 -6
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/output.d.ts +1 -1
- package/dist/vite/output.js +25 -16
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/plugin-api.js +79 -10
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-component.js +1 -0
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +1 -2
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.js +20 -0
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-mdx.js +50 -1
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/{plugin-custom-css.d.ts → plugin-theme-css.d.ts} +2 -2
- package/dist/vite/{plugin-custom-css.js → plugin-theme-css.js} +10 -3
- package/dist/vite/plugin-theme-css.js.map +1 -0
- package/dist/vite/plugin.d.ts +1 -2
- package/dist/vite/plugin.js +6 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.d.ts +2 -1
- package/dist/vite/prerender.js +2 -2
- package/dist/vite/prerender.js.map +1 -1
- package/dist/vite/sitemap.d.ts +1 -1
- package/dist/zuplo/env.d.ts +6 -0
- package/dist/zuplo/env.js +9 -0
- package/dist/zuplo/env.js.map +1 -0
- package/dist/zuplo/with-zuplo.d.ts +2 -2
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/AnchorLink-DFZZbmvr.js +34 -0
- package/lib/AnchorLink-DFZZbmvr.js.map +1 -0
- package/lib/{AuthenticationPlugin-D0Em0SwR.js → AuthenticationPlugin-fB7viE7A.js} +15 -16
- package/lib/AuthenticationPlugin-fB7viE7A.js.map +1 -0
- package/lib/{Button-jK0EsymC.js → Button-DeAoTouo.js} +4 -4
- package/lib/{Button-jK0EsymC.js.map → Button-DeAoTouo.js.map} +1 -1
- package/lib/{CategoryHeading-Bb9dqxD3.js → CategoryHeading-CBconmtI.js} +3 -3
- package/lib/{CategoryHeading-Bb9dqxD3.js.map → CategoryHeading-CBconmtI.js.map} +1 -1
- package/lib/ClientOnly-E7hGysn1.js.map +1 -1
- package/lib/{Dialog-k70Qfukb.js → Dialog-Bxv1yEIg.js} +3 -3
- package/lib/{Dialog-k70Qfukb.js.map → Dialog-Bxv1yEIg.js.map} +1 -1
- package/lib/{Markdown-ievDDhFT.js → Markdown-CZDLNOFc.js} +13227 -13217
- package/lib/Markdown-CZDLNOFc.js.map +1 -0
- package/lib/{MdxPage-B2FpJ9KC.js → MdxPage-CPBw4_lf.js} +82 -77
- package/lib/MdxPage-CPBw4_lf.js.map +1 -0
- package/lib/OperationList-n4U_BHmO.js +5062 -0
- package/lib/OperationList-n4U_BHmO.js.map +1 -0
- package/lib/Route-C8nwd9A2.js +37 -0
- package/lib/Route-C8nwd9A2.js.map +1 -0
- package/lib/{Select-O9ZM3ZgX.js → Select-D3XuKKuH.js} +5 -5
- package/lib/{Select-O9ZM3ZgX.js.map → Select-D3XuKKuH.js.map} +1 -1
- package/lib/SlotletProvider-pfc9oejW.js +221 -0
- package/lib/SlotletProvider-pfc9oejW.js.map +1 -0
- package/lib/{Spinner-3cQDBVGr.js → Spinner-DuxJLLNE.js} +2 -2
- package/lib/{Spinner-3cQDBVGr.js.map → Spinner-DuxJLLNE.js.map} +1 -1
- package/lib/StaggeredRender-DgsamH_G.js +17 -0
- package/lib/StaggeredRender-DgsamH_G.js.map +1 -0
- package/lib/{SyntaxHighlight-DkLOsjHS.js → SyntaxHighlight-Bz-lOJtH.js} +8 -12
- package/lib/{SyntaxHighlight-DkLOsjHS.js.map → SyntaxHighlight-Bz-lOJtH.js.map} +1 -1
- package/lib/assets/{index-B_Jk_Yzp.js → index-C7jnHK4b.js} +218 -197
- package/lib/assets/index-C7jnHK4b.js.map +1 -0
- package/lib/assets/{worker-BHClFO3A.js → worker-D2kRl-cG.js} +5285 -4904
- package/lib/assets/worker-D2kRl-cG.js.map +1 -0
- package/lib/chunk-D52XG6IA-Dl7HLe6j.js +1823 -0
- package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +1 -0
- package/lib/{cn-BmFQLtkS.js → cn-qaFjX9_3.js} +2 -2
- package/lib/cn-qaFjX9_3.js.map +1 -0
- package/lib/{context-D1nXWxm7.js → context-h_UkBLvr.js} +2 -2
- package/lib/context-h_UkBLvr.js.map +1 -0
- package/lib/{createServer-CpJlUPtn.js → createServer-69sLlmQA.js} +4820 -4440
- package/lib/createServer-69sLlmQA.js.map +1 -0
- package/lib/{hook-hEqe7fPB.js → hook-DgGeo5iL.js} +3 -3
- package/lib/{hook-hEqe7fPB.js.map → hook-DgGeo5iL.js.map} +1 -1
- package/lib/{index-CkwDvuPt.js → index-CBXSgjaE.js} +259 -238
- package/lib/index-CBXSgjaE.js.map +1 -0
- package/lib/index-CPNSgwSb.js +36 -0
- package/lib/index-CPNSgwSb.js.map +1 -0
- package/lib/index-DStSNvP-.js +1284 -0
- package/lib/index-DStSNvP-.js.map +1 -0
- package/lib/index-LNp6rxyU.js.map +1 -1
- package/lib/index.esm-BSV1C092.js +692 -0
- package/lib/index.esm-BSV1C092.js.map +1 -0
- package/lib/index.esm-BnnBRKJX.js +1214 -0
- package/lib/index.esm-BnnBRKJX.js.map +1 -0
- package/lib/invariant-Caa8-XvF.js.map +1 -1
- package/lib/jsx-runtime-Dx-03ztt.js +446 -0
- package/lib/jsx-runtime-Dx-03ztt.js.map +1 -0
- package/lib/object_hash-BNWPnMN9.js +787 -0
- package/lib/object_hash-BNWPnMN9.js.map +1 -0
- package/lib/post-processors/removeExtensions.js.map +1 -1
- package/lib/post-processors/removePaths.js.map +1 -1
- package/lib/post-processors/traverse.js.map +1 -1
- package/lib/prism-csharp.min-DUwvItt4.js +63 -0
- package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-DUwvItt4.js.map} +1 -1
- package/lib/prism-java.min-BtgBR4yd.js +35 -0
- package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-BtgBR4yd.js.map} +1 -1
- package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
- package/lib/prism-ruby.min-DeDXCp1r.js +38 -0
- package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-DeDXCp1r.js.map} +1 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js +34 -0
- package/lib/{prism-typescript.min-oSVeWCAd.js.map → prism-typescript.min-CD7H2IYQ.js.map} +1 -1
- package/lib/state-CFQsUZUP.js +202 -0
- package/lib/state-CFQsUZUP.js.map +1 -0
- package/lib/ui/Accordion.js +2 -2
- package/lib/ui/Accordion.js.map +1 -1
- package/lib/ui/ActionButton.js +4 -4
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +3 -3
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js +2 -2
- package/lib/ui/AlertDialog.js.map +1 -1
- package/lib/ui/Badge.js +3 -3
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +2 -2
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js +3 -3
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +2 -2
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +2 -2
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +407 -401
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +2 -2
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/Command.js +111 -108
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +2 -2
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +81 -81
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +2 -2
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/Form.js +3 -3
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/HoverCard.js +2 -2
- package/lib/ui/Input.js +2 -2
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +3 -3
- package/lib/ui/Pagination.js +2 -2
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js +2 -2
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js +2 -2
- package/lib/ui/Progress.js.map +1 -1
- package/lib/ui/RadioGroup.js +2 -2
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js +2 -2
- package/lib/ui/ScrollArea.js.map +1 -1
- package/lib/ui/Select.js +2 -2
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +2 -2
- package/lib/ui/Skeleton.js.map +1 -1
- package/lib/ui/Slider.js +2 -2
- package/lib/ui/Switch.js +2 -2
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/Tabs.js +2 -2
- package/lib/ui/Textarea.js +2 -2
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js +3 -3
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js +2 -2
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js +2 -2
- package/lib/useExposedProps-DE9lR6MF.js +9 -0
- package/lib/useExposedProps-DE9lR6MF.js.map +1 -0
- package/lib/{utils-DcpDOncX.js → utils-B4O1uet5.js} +35 -36
- package/lib/{utils-DcpDOncX.js.map → utils-B4O1uet5.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +382 -374
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +773 -992
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +1 -1
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +123 -0
- package/lib/zudoku.plugin-api-catalog.js.map +1 -0
- package/lib/zudoku.plugin-api-keys.js +15 -16
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +4 -4
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +2 -2
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +5 -5
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +53 -24
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/package.json +59 -47
- package/src/app/demo.tsx +1 -1
- package/src/app/entry.client.tsx +16 -15
- package/src/app/entry.server.tsx +3 -2
- package/src/app/main.tsx +6 -2
- package/src/app/sentry.ts +24 -0
- package/src/app/standalone.tsx +1 -1
- package/src/app/tailwind.ts +67 -52
- package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
- package/src/lib/authentication/components/SignIn.tsx +1 -1
- package/src/lib/authentication/components/SignOut.tsx +1 -1
- package/src/lib/authentication/providers/openid.tsx +12 -5
- package/src/lib/components/AnchorLink.tsx +1 -1
- package/src/lib/components/Bootstrap.tsx +4 -6
- package/src/lib/components/Header.tsx +2 -2
- package/src/lib/components/Heading.tsx +13 -13
- package/src/lib/components/Layout.tsx +10 -5
- package/src/lib/components/Markdown.tsx +1 -1
- package/src/lib/components/MobileTopNavigation.tsx +18 -18
- package/src/lib/components/NotFoundPage.tsx +1 -1
- package/src/lib/components/ReactMarkdown.license.txt +21 -0
- package/src/lib/components/ReactMarkdown.tsx +264 -0
- package/src/lib/components/Search.tsx +3 -3
- package/src/lib/components/SlotletProvider.tsx +1 -1
- package/src/lib/components/SyntaxHighlight.tsx +0 -4
- package/src/lib/components/TopNavigation.tsx +2 -2
- package/src/lib/components/Zudoku.tsx +1 -1
- package/src/lib/components/context/ZudokuContext.ts +1 -1
- package/src/lib/components/index.ts +1 -1
- package/src/lib/components/navigation/Sidebar.tsx +18 -8
- package/src/lib/components/navigation/SidebarBadge.tsx +0 -10
- package/src/lib/components/navigation/SidebarCategory.tsx +11 -10
- package/src/lib/components/navigation/SidebarItem.tsx +11 -14
- package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
- package/src/lib/components/navigation/utils.ts +1 -1
- package/src/lib/core/ZudokuContext.ts +1 -1
- package/src/lib/core/plugins.ts +3 -7
- package/src/lib/errors/RouterError.tsx +1 -1
- package/src/lib/oas/graphql/index.ts +4 -1
- package/src/lib/plugins/api-catalog/Catalog.tsx +123 -0
- package/src/lib/plugins/api-catalog/index.tsx +64 -0
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +1 -1
- package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
- package/src/lib/plugins/api-keys/index.tsx +1 -1
- package/src/lib/plugins/custom-pages/index.tsx +1 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +3 -1
- package/src/lib/plugins/markdown/index.tsx +4 -2
- package/src/lib/plugins/markdown/resolver.ts +2 -4
- package/src/lib/plugins/openapi/OperationList.tsx +64 -8
- package/src/lib/plugins/openapi/OperationListItem.tsx +31 -2
- package/src/lib/plugins/openapi/Route.tsx +45 -9
- package/src/lib/plugins/openapi/Sidecar.tsx +3 -17
- package/src/lib/plugins/openapi/context.tsx +2 -2
- package/src/lib/plugins/openapi/graphql/gql.ts +2 -2
- package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
- package/src/lib/plugins/openapi/index.tsx +35 -28
- package/src/lib/plugins/openapi/interfaces.ts +22 -1
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -0
- package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
- package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
- package/src/lib/plugins/redirect/index.tsx +2 -2
- package/src/lib/plugins/search-inkeep/index.tsx +78 -23
- package/src/lib/plugins/search-inkeep/inkeep.ts +3 -9
- package/src/lib/util/MdxComponents.tsx +3 -8
- package/src/lib/util/createVariantComponent.tsx +2 -2
- package/src/lib/util/useExposedProps.tsx +1 -1
- package/src/lib/util/useScrollToAnchor.ts +1 -1
- package/src/lib/util/useScrollToTop.ts +1 -1
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +0 -2
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +0 -3
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +0 -1
- package/dist/vite/plugin-custom-css.js.map +0 -1
- package/lib/AnchorLink-CDlhr8gL.js +0 -706
- package/lib/AnchorLink-CDlhr8gL.js.map +0 -1
- package/lib/AuthenticationPlugin-D0Em0SwR.js.map +0 -1
- package/lib/InkeepCustomTrigger-CE5-K5ex.js +0 -6
- package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +0 -1
- package/lib/Markdown-ievDDhFT.js.map +0 -1
- package/lib/MdxPage-B2FpJ9KC.js.map +0 -1
- package/lib/OperationList-BkNQEsNs.js +0 -4693
- package/lib/OperationList-BkNQEsNs.js.map +0 -1
- package/lib/Route-DlG_HTMu.js +0 -11
- package/lib/Route-DlG_HTMu.js.map +0 -1
- package/lib/SidebarBadge-DxFJcJ6V.js +0 -51
- package/lib/SidebarBadge-DxFJcJ6V.js.map +0 -1
- package/lib/SlotletProvider-DyomlzGx.js +0 -252
- package/lib/SlotletProvider-DyomlzGx.js.map +0 -1
- package/lib/assets/index-B_Jk_Yzp.js.map +0 -1
- package/lib/assets/worker-BHClFO3A.js.map +0 -1
- package/lib/cn-BmFQLtkS.js.map +0 -1
- package/lib/context-D1nXWxm7.js.map +0 -1
- package/lib/createServer-CpJlUPtn.js.map +0 -1
- package/lib/index-BuAyrJe3.js +0 -46
- package/lib/index-BuAyrJe3.js.map +0 -1
- package/lib/index-C7SaIME0.js +0 -1277
- package/lib/index-C7SaIME0.js.map +0 -1
- package/lib/index-CkwDvuPt.js.map +0 -1
- package/lib/index-Czzd9rjU.js +0 -899
- package/lib/index-Czzd9rjU.js.map +0 -1
- package/lib/index-Yn8c3UWE.js +0 -921
- package/lib/index-Yn8c3UWE.js.map +0 -1
- package/lib/index.esm-C5mr_sKO.js +0 -1193
- package/lib/index.esm-C5mr_sKO.js.map +0 -1
- package/lib/jsx-runtime-B6kdoens.js +0 -635
- package/lib/jsx-runtime-B6kdoens.js.map +0 -1
- package/lib/object_hash-CvlLgU-M.js +0 -785
- package/lib/object_hash-CvlLgU-M.js.map +0 -1
- package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
- package/lib/prism-java.min-d5iT_mOd.js +0 -7
- package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
- package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
- package/lib/prism-php.min-o7FpoMP_.js +0 -11
- package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
- package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
- package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
- package/lib/router-lfyopgBI.js +0 -3024
- package/lib/router-lfyopgBI.js.map +0 -1
- package/lib/state-tsXBLONe.js +0 -203
- package/lib/state-tsXBLONe.js.map +0 -1
- package/lib/useExposedProps-CTPtylCV.js +0 -10
- package/lib/useExposedProps-CTPtylCV.js.map +0 -1
- package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +0 -3
|
@@ -0,0 +1,1284 @@
|
|
|
1
|
+
var Ie = Object.defineProperty;
|
|
2
|
+
var me = (e) => {
|
|
3
|
+
throw TypeError(e);
|
|
4
|
+
};
|
|
5
|
+
var qe = (e, n, s) => n in e ? Ie(e, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[n] = s;
|
|
6
|
+
var W = (e, n, s) => qe(e, typeof n != "symbol" ? n + "" : n, s), pe = (e, n, s) => n.has(e) || me("Cannot " + s);
|
|
7
|
+
var y = (e, n, s) => (pe(e, n, "read from private field"), s ? s.call(e) : n.get(e)), R = (e, n, s) => n.has(e) ? me("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(e) : n.set(e, s), M = (e, n, s, a) => (pe(e, n, "write to private field"), a ? a.call(e, s) : n.set(e, s), s);
|
|
8
|
+
import { j as t } from "./jsx-runtime-Dx-03ztt.js";
|
|
9
|
+
import { m as Re } from "./chunk-D52XG6IA-Dl7HLe6j.js";
|
|
10
|
+
import { i as Me, j as he, k as Ae } from "./utils-B4O1uet5.js";
|
|
11
|
+
import { XIcon as Ve, EraserIcon as Ce, ChevronsUpDownIcon as ze, LogInIcon as Fe, CirclePlayIcon as Le } from "lucide-react";
|
|
12
|
+
import { u as De } from "./hook-DgGeo5iL.js";
|
|
13
|
+
import { Button as E } from "./ui/Button.js";
|
|
14
|
+
import { initializeWorker as Ge } from "zudoku/openapi-worker";
|
|
15
|
+
import { Z as Be } from "./invariant-Caa8-XvF.js";
|
|
16
|
+
import { VisuallyHidden as Je } from "@radix-ui/react-visually-hidden";
|
|
17
|
+
import * as fe from "react";
|
|
18
|
+
import { useRef as $e, useEffect as Te, useState as Ee, useTransition as He, Fragment as Z } from "react";
|
|
19
|
+
import { D as Qe, b as Ue, a as We, c as Ze } from "./Dialog-Bxv1yEIg.js";
|
|
20
|
+
import { u as Ke, S as xe, a as ye, b as ge, c as ve, e as K } from "./Select-D3XuKKuH.js";
|
|
21
|
+
import { b as oe, C as $, u as Xe, a as Ye, F as et } from "./index.esm-BnnBRKJX.js";
|
|
22
|
+
import { a as tt } from "./state-CFQsUZUP.js";
|
|
23
|
+
import { S as je } from "./Spinner-DuxJLLNE.js";
|
|
24
|
+
import { Callout as nt } from "./ui/Callout.js";
|
|
25
|
+
import { Card as ae, CardHeader as st, CardTitle as rt, CardContent as at } from "./ui/Card.js";
|
|
26
|
+
import { Tabs as be, TabsList as Ne, TabsTrigger as A, TabsContent as V } from "./ui/Tabs.js";
|
|
27
|
+
import { z as ot, S as it } from "./SyntaxHighlight-Bz-lOJtH.js";
|
|
28
|
+
import { c as O } from "./cn-qaFjX9_3.js";
|
|
29
|
+
import { Input as H } from "./ui/Input.js";
|
|
30
|
+
import { Slot as lt } from "@radix-ui/react-slot";
|
|
31
|
+
class L extends String {
|
|
32
|
+
constructor(s, a) {
|
|
33
|
+
super(s);
|
|
34
|
+
W(this, "__apiType");
|
|
35
|
+
this.value = s, this.__meta__ = a;
|
|
36
|
+
}
|
|
37
|
+
toString() {
|
|
38
|
+
return this.value;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
const ct = new L(
|
|
42
|
+
`
|
|
43
|
+
fragment OperationsFragment on OperationItem {
|
|
44
|
+
slug
|
|
45
|
+
summary
|
|
46
|
+
method
|
|
47
|
+
description
|
|
48
|
+
operationId
|
|
49
|
+
contentTypes
|
|
50
|
+
path
|
|
51
|
+
parameters {
|
|
52
|
+
name
|
|
53
|
+
in
|
|
54
|
+
description
|
|
55
|
+
required
|
|
56
|
+
schema
|
|
57
|
+
style
|
|
58
|
+
examples {
|
|
59
|
+
name
|
|
60
|
+
description
|
|
61
|
+
externalValue
|
|
62
|
+
value
|
|
63
|
+
summary
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
requestBody {
|
|
67
|
+
content {
|
|
68
|
+
mediaType
|
|
69
|
+
encoding {
|
|
70
|
+
name
|
|
71
|
+
}
|
|
72
|
+
examples {
|
|
73
|
+
name
|
|
74
|
+
description
|
|
75
|
+
externalValue
|
|
76
|
+
value
|
|
77
|
+
summary
|
|
78
|
+
}
|
|
79
|
+
schema
|
|
80
|
+
}
|
|
81
|
+
description
|
|
82
|
+
required
|
|
83
|
+
}
|
|
84
|
+
responses {
|
|
85
|
+
statusCode
|
|
86
|
+
links
|
|
87
|
+
description
|
|
88
|
+
content {
|
|
89
|
+
examples {
|
|
90
|
+
name
|
|
91
|
+
description
|
|
92
|
+
externalValue
|
|
93
|
+
value
|
|
94
|
+
summary
|
|
95
|
+
}
|
|
96
|
+
mediaType
|
|
97
|
+
encoding {
|
|
98
|
+
name
|
|
99
|
+
}
|
|
100
|
+
schema
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
`,
|
|
105
|
+
{ fragmentName: "OperationsFragment" }
|
|
106
|
+
), dt = new L(`
|
|
107
|
+
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
108
|
+
schema(input: $input, type: $type) {
|
|
109
|
+
url
|
|
110
|
+
servers {
|
|
111
|
+
url
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
`), ut = new L(`
|
|
116
|
+
query AllOperations($input: JSON!, $type: SchemaType!) {
|
|
117
|
+
schema(input: $input, type: $type) {
|
|
118
|
+
description
|
|
119
|
+
summary
|
|
120
|
+
title
|
|
121
|
+
url
|
|
122
|
+
version
|
|
123
|
+
tags {
|
|
124
|
+
name
|
|
125
|
+
description
|
|
126
|
+
operations {
|
|
127
|
+
slug
|
|
128
|
+
...OperationsFragment
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
fragment OperationsFragment on OperationItem {
|
|
134
|
+
slug
|
|
135
|
+
summary
|
|
136
|
+
method
|
|
137
|
+
description
|
|
138
|
+
operationId
|
|
139
|
+
contentTypes
|
|
140
|
+
path
|
|
141
|
+
parameters {
|
|
142
|
+
name
|
|
143
|
+
in
|
|
144
|
+
description
|
|
145
|
+
required
|
|
146
|
+
schema
|
|
147
|
+
style
|
|
148
|
+
examples {
|
|
149
|
+
name
|
|
150
|
+
description
|
|
151
|
+
externalValue
|
|
152
|
+
value
|
|
153
|
+
summary
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
requestBody {
|
|
157
|
+
content {
|
|
158
|
+
mediaType
|
|
159
|
+
encoding {
|
|
160
|
+
name
|
|
161
|
+
}
|
|
162
|
+
examples {
|
|
163
|
+
name
|
|
164
|
+
description
|
|
165
|
+
externalValue
|
|
166
|
+
value
|
|
167
|
+
summary
|
|
168
|
+
}
|
|
169
|
+
schema
|
|
170
|
+
}
|
|
171
|
+
description
|
|
172
|
+
required
|
|
173
|
+
}
|
|
174
|
+
responses {
|
|
175
|
+
statusCode
|
|
176
|
+
links
|
|
177
|
+
description
|
|
178
|
+
content {
|
|
179
|
+
examples {
|
|
180
|
+
name
|
|
181
|
+
description
|
|
182
|
+
externalValue
|
|
183
|
+
value
|
|
184
|
+
summary
|
|
185
|
+
}
|
|
186
|
+
mediaType
|
|
187
|
+
encoding {
|
|
188
|
+
name
|
|
189
|
+
}
|
|
190
|
+
schema
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}`), mt = new L(`
|
|
194
|
+
query getServerQuery($input: JSON!, $type: SchemaType!) {
|
|
195
|
+
schema(input: $input, type: $type) {
|
|
196
|
+
url
|
|
197
|
+
servers {
|
|
198
|
+
url
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
`), pt = new L(`
|
|
203
|
+
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
204
|
+
schema(input: $input, type: $type) {
|
|
205
|
+
url
|
|
206
|
+
tags {
|
|
207
|
+
__typename
|
|
208
|
+
name
|
|
209
|
+
operations {
|
|
210
|
+
__typename
|
|
211
|
+
slug
|
|
212
|
+
deprecated
|
|
213
|
+
method
|
|
214
|
+
summary
|
|
215
|
+
operationId
|
|
216
|
+
path
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
`), ht = {
|
|
222
|
+
"\n query ServersQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": dt,
|
|
223
|
+
"\n fragment OperationsFragment on OperationItem {\n slug\n summary\n method\n description\n operationId\n contentTypes\n path\n parameters {\n name\n in\n description\n required\n schema\n style\n examples {\n name\n description\n externalValue\n value\n summary\n }\n }\n requestBody {\n content {\n mediaType\n encoding {\n name\n }\n examples {\n name\n description\n externalValue\n value\n summary\n }\n schema\n }\n description\n required\n }\n responses {\n statusCode\n links\n description\n content {\n examples {\n name\n description\n externalValue\n value\n summary\n }\n mediaType\n encoding {\n name\n }\n schema\n }\n }\n }\n": ct,
|
|
224
|
+
"\n query AllOperations($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n description\n summary\n title\n url\n version\n tags {\n name\n description\n operations {\n slug\n ...OperationsFragment\n }\n }\n }\n }\n": ut,
|
|
225
|
+
"\n query getServerQuery($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n servers {\n url\n }\n }\n }\n": mt,
|
|
226
|
+
"\n query GetCategories($input: JSON!, $type: SchemaType!) {\n schema(input: $input, type: $type) {\n url\n tags {\n __typename\n name\n operations {\n __typename\n slug\n deprecated\n method\n summary\n operationId\n path\n }\n }\n }\n }\n": pt
|
|
227
|
+
};
|
|
228
|
+
function ft(e) {
|
|
229
|
+
return ht[e] ?? {};
|
|
230
|
+
}
|
|
231
|
+
function X(e) {
|
|
232
|
+
if (!ie(e))
|
|
233
|
+
throw new Error("Parameter was not an error");
|
|
234
|
+
}
|
|
235
|
+
function ie(e) {
|
|
236
|
+
return !!e && typeof e == "object" && xt(e) === "[object Error]" || e instanceof Error;
|
|
237
|
+
}
|
|
238
|
+
function xt(e) {
|
|
239
|
+
return Object.prototype.toString.call(e);
|
|
240
|
+
}
|
|
241
|
+
const yt = "Layerr";
|
|
242
|
+
let gt = yt;
|
|
243
|
+
function vt() {
|
|
244
|
+
return gt;
|
|
245
|
+
}
|
|
246
|
+
function jt(e) {
|
|
247
|
+
let n, s = "";
|
|
248
|
+
if (e.length === 0)
|
|
249
|
+
n = {};
|
|
250
|
+
else if (ie(e[0]))
|
|
251
|
+
n = {
|
|
252
|
+
cause: e[0]
|
|
253
|
+
}, s = e.slice(1).join(" ") || "";
|
|
254
|
+
else if (e[0] && typeof e[0] == "object")
|
|
255
|
+
n = Object.assign({}, e[0]), s = e.slice(1).join(" ") || "";
|
|
256
|
+
else if (typeof e[0] == "string")
|
|
257
|
+
n = {}, s = s = e.join(" ") || "";
|
|
258
|
+
else
|
|
259
|
+
throw new Error("Invalid arguments passed to Layerr");
|
|
260
|
+
return {
|
|
261
|
+
options: n,
|
|
262
|
+
shortMessage: s
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
class g extends Error {
|
|
266
|
+
constructor(n, s) {
|
|
267
|
+
const a = [...arguments], { options: r, shortMessage: i } = jt(a);
|
|
268
|
+
let l = i;
|
|
269
|
+
if (r.cause && (l = `${l}: ${r.cause.message}`), super(l), this.message = l, r.name && typeof r.name == "string" ? this.name = r.name : this.name = vt(), r.cause && Object.defineProperty(this, "_cause", { value: r.cause }), Object.defineProperty(this, "_info", { value: {} }), r.info && typeof r.info == "object" && Object.assign(this._info, r.info), Error.captureStackTrace) {
|
|
270
|
+
const u = r.constructorOpt || this.constructor;
|
|
271
|
+
Error.captureStackTrace(this, u);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
static cause(n) {
|
|
275
|
+
return X(n), n._cause && ie(n._cause) ? n._cause : null;
|
|
276
|
+
}
|
|
277
|
+
static fullStack(n) {
|
|
278
|
+
X(n);
|
|
279
|
+
const s = g.cause(n);
|
|
280
|
+
return s ? `${n.stack}
|
|
281
|
+
caused by: ${g.fullStack(s)}` : n.stack ?? "";
|
|
282
|
+
}
|
|
283
|
+
static info(n) {
|
|
284
|
+
X(n);
|
|
285
|
+
const s = {}, a = g.cause(n);
|
|
286
|
+
return a && Object.assign(s, g.info(a)), n._info && Object.assign(s, n._info), s;
|
|
287
|
+
}
|
|
288
|
+
toString() {
|
|
289
|
+
let n = this.name || this.constructor.name || this.constructor.prototype.name;
|
|
290
|
+
return this.message && (n = `${n}: ${this.message}`), n;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
const Oe = "0123456789ABCDEFGHJKMNPQRSTVWXYZ", F = 32, we = 281474976710655, bt = 10, Nt = 16, z = Object.freeze({
|
|
294
|
+
source: "ulid"
|
|
295
|
+
});
|
|
296
|
+
function wt(e) {
|
|
297
|
+
const n = St(), s = n && (n.crypto || n.msCrypto) || null;
|
|
298
|
+
if (typeof (s == null ? void 0 : s.getRandomValues) == "function")
|
|
299
|
+
return () => {
|
|
300
|
+
const a = new Uint8Array(1);
|
|
301
|
+
return s.getRandomValues(a), a[0] / 255;
|
|
302
|
+
};
|
|
303
|
+
if (typeof (s == null ? void 0 : s.randomBytes) == "function")
|
|
304
|
+
return () => s.randomBytes(1).readUInt8() / 255;
|
|
305
|
+
throw new g({
|
|
306
|
+
info: {
|
|
307
|
+
code: "PRNG_DETECT",
|
|
308
|
+
...z
|
|
309
|
+
}
|
|
310
|
+
}, "Failed to find a reliable PRNG");
|
|
311
|
+
}
|
|
312
|
+
function St() {
|
|
313
|
+
return Tt() ? self : typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : null;
|
|
314
|
+
}
|
|
315
|
+
function Ct(e, n) {
|
|
316
|
+
let s = "";
|
|
317
|
+
for (; e > 0; e--)
|
|
318
|
+
s = Et(n) + s;
|
|
319
|
+
return s;
|
|
320
|
+
}
|
|
321
|
+
function $t(e, n) {
|
|
322
|
+
if (isNaN(e))
|
|
323
|
+
throw new g({
|
|
324
|
+
info: {
|
|
325
|
+
code: "ENC_TIME_NAN",
|
|
326
|
+
...z
|
|
327
|
+
}
|
|
328
|
+
}, `Time must be a number: ${e}`);
|
|
329
|
+
if (e > we)
|
|
330
|
+
throw new g({
|
|
331
|
+
info: {
|
|
332
|
+
code: "ENC_TIME_SIZE_EXCEED",
|
|
333
|
+
...z
|
|
334
|
+
}
|
|
335
|
+
}, `Cannot encode a time larger than ${we}: ${e}`);
|
|
336
|
+
if (e < 0)
|
|
337
|
+
throw new g({
|
|
338
|
+
info: {
|
|
339
|
+
code: "ENC_TIME_NEG",
|
|
340
|
+
...z
|
|
341
|
+
}
|
|
342
|
+
}, `Time must be positive: ${e}`);
|
|
343
|
+
if (Number.isInteger(e) === !1)
|
|
344
|
+
throw new g({
|
|
345
|
+
info: {
|
|
346
|
+
code: "ENC_TIME_TYPE",
|
|
347
|
+
...z
|
|
348
|
+
}
|
|
349
|
+
}, `Time must be an integer: ${e}`);
|
|
350
|
+
let s, a = "";
|
|
351
|
+
for (let r = n; r > 0; r--)
|
|
352
|
+
s = e % F, a = Oe.charAt(s) + a, e = (e - s) / F;
|
|
353
|
+
return a;
|
|
354
|
+
}
|
|
355
|
+
function Tt() {
|
|
356
|
+
return typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope;
|
|
357
|
+
}
|
|
358
|
+
function Et(e) {
|
|
359
|
+
let n = Math.floor(e() * F);
|
|
360
|
+
return n === F && (n = F - 1), Oe.charAt(n);
|
|
361
|
+
}
|
|
362
|
+
function Ot(e, n) {
|
|
363
|
+
const s = wt(), a = isNaN(e) ? Date.now() : e;
|
|
364
|
+
return $t(a, bt) + Ct(Nt, s);
|
|
365
|
+
}
|
|
366
|
+
let Y, ee;
|
|
367
|
+
const Pt = async (e) => {
|
|
368
|
+
e && typeof e == "object" && "type" in e && e.type === "file" && "input" in e && typeof e.input == "function" && (e.input = await e.input());
|
|
369
|
+
}, te = (e) => {
|
|
370
|
+
var n;
|
|
371
|
+
if ((n = e.errors) != null && n[0])
|
|
372
|
+
throw new Be(e.errors[0].message, {
|
|
373
|
+
developerHint: "Check your configuration value `apis.type` and `apis.input` in the Zudoku config."
|
|
374
|
+
});
|
|
375
|
+
};
|
|
376
|
+
var T, P, N, Q;
|
|
377
|
+
class kt {
|
|
378
|
+
constructor(n) {
|
|
379
|
+
R(this, T);
|
|
380
|
+
R(this, P, /* @__PURE__ */ new Map());
|
|
381
|
+
R(this, N);
|
|
382
|
+
R(this, Q, () => import("./createServer-69sLlmQA.js").then((n) => n.createServer()));
|
|
383
|
+
W(this, "fetch", async (n, ...[s]) => {
|
|
384
|
+
var i;
|
|
385
|
+
const a = (i = n.match(/query (\w+)/)) == null ? void 0 : i[1];
|
|
386
|
+
await Pt(s);
|
|
387
|
+
const r = JSON.stringify({ query: n, variables: s, operationName: a });
|
|
388
|
+
switch (y(this, T)) {
|
|
389
|
+
case "remote": {
|
|
390
|
+
const l = await fetch(this.config.server, {
|
|
391
|
+
method: "POST",
|
|
392
|
+
body: r,
|
|
393
|
+
headers: { "Content-Type": "application/json" }
|
|
394
|
+
});
|
|
395
|
+
if (!l.ok)
|
|
396
|
+
throw new Error("Network response was not ok");
|
|
397
|
+
const u = await l.json();
|
|
398
|
+
return te(u), u.data;
|
|
399
|
+
}
|
|
400
|
+
case "in-memory": {
|
|
401
|
+
Y || (Y = y(this, Q).call(this));
|
|
402
|
+
const l = await Y;
|
|
403
|
+
if (!l) throw new Error("Local server not initialized");
|
|
404
|
+
const u = await l.fetch(
|
|
405
|
+
new Request("http://localhost/graphql", {
|
|
406
|
+
method: "POST",
|
|
407
|
+
body: r,
|
|
408
|
+
headers: { "Content-Type": "application/json" }
|
|
409
|
+
})
|
|
410
|
+
);
|
|
411
|
+
if (!u.ok)
|
|
412
|
+
throw new Error("Network response was not ok");
|
|
413
|
+
const d = await u.json();
|
|
414
|
+
return te(d), d.data;
|
|
415
|
+
}
|
|
416
|
+
case "worker": {
|
|
417
|
+
if (ee || (ee = Ge()), !y(this, N)) {
|
|
418
|
+
const c = new MessageChannel();
|
|
419
|
+
ee.port.postMessage({ port: c.port2 }, [c.port2]), M(this, N, c.port1), y(this, N).onmessage = (f) => {
|
|
420
|
+
const { id: h, body: j } = f.data, b = y(this, P).get(h);
|
|
421
|
+
if (b) {
|
|
422
|
+
const w = JSON.parse(j);
|
|
423
|
+
b(w), y(this, P).delete(h);
|
|
424
|
+
} else
|
|
425
|
+
console.error(`No pending request found for id: ${h}`);
|
|
426
|
+
}, y(this, N).start();
|
|
427
|
+
}
|
|
428
|
+
const l = Ot(), d = await new Promise(
|
|
429
|
+
(c) => {
|
|
430
|
+
y(this, P).set(l, c), y(this, N).postMessage({ id: l, body: r });
|
|
431
|
+
}
|
|
432
|
+
);
|
|
433
|
+
return te(d), d.data;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
});
|
|
437
|
+
this.config = n, n.server ? M(this, T, "remote") : n.inMemory || typeof SharedWorker > "u" ? M(this, T, "in-memory") : M(this, T, "worker");
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
T = new WeakMap(), P = new WeakMap(), N = new WeakMap(), Q = new WeakMap();
|
|
441
|
+
const ne = (e) => Math.abs(
|
|
442
|
+
isNaN(parseInt(e)) ? e.toLowerCase().charCodeAt(0) - 96 : isNaN(parseInt(e)) ? 0 : parseInt(e)
|
|
443
|
+
), se = (e) => e.length > 1 ? parseInt(e.split("").reduce((n, s) => `${ne(n) + ne(s)}`)) : ne(e), _t = (e, n = {}) => {
|
|
444
|
+
const s = (3 * se(e) + 2 * se(e) + se(e)) % 360, { saturation: a = 75, lightness: r = 60 } = n;
|
|
445
|
+
return `${s}deg ${a}% ${r}%`;
|
|
446
|
+
}, re = "data-linked-param", It = (e) => {
|
|
447
|
+
const { resolvedTheme: n } = ot();
|
|
448
|
+
return _t(
|
|
449
|
+
e,
|
|
450
|
+
n === "light" ? { saturation: 85, lightness: 50 } : void 0
|
|
451
|
+
);
|
|
452
|
+
}, Pe = ({
|
|
453
|
+
name: e,
|
|
454
|
+
className: n,
|
|
455
|
+
backgroundOpacity: s = "100%",
|
|
456
|
+
borderOpacity: a = "100%",
|
|
457
|
+
slug: r,
|
|
458
|
+
children: i,
|
|
459
|
+
onClick: l
|
|
460
|
+
}) => {
|
|
461
|
+
const u = $e(null), d = e.replace(/[{}]/g, ""), c = r == null ? void 0 : r.replace(/[{}]/g, ""), f = It(d), h = `hsl(${f} / ${a})`, j = `hsl(${f} / ${s})`;
|
|
462
|
+
return Te(() => {
|
|
463
|
+
if (!c || !u.current) return;
|
|
464
|
+
const b = () => {
|
|
465
|
+
document.querySelectorAll(`[${re}="${c}"]`).forEach((S) => {
|
|
466
|
+
S instanceof HTMLElement && (S.dataset.active = "true");
|
|
467
|
+
});
|
|
468
|
+
}, w = () => {
|
|
469
|
+
document.querySelectorAll(`[${re}="${c}"]`).forEach((S) => {
|
|
470
|
+
S instanceof HTMLElement && (S.dataset.active = "false");
|
|
471
|
+
});
|
|
472
|
+
}, v = u.current;
|
|
473
|
+
return v.addEventListener("mouseenter", b), v.addEventListener("mouseleave", w), () => {
|
|
474
|
+
v.removeEventListener("mouseenter", b), v.removeEventListener("mouseleave", w);
|
|
475
|
+
};
|
|
476
|
+
}, [c]), /* @__PURE__ */ t.jsx(
|
|
477
|
+
"span",
|
|
478
|
+
{
|
|
479
|
+
[re]: c,
|
|
480
|
+
className: O(
|
|
481
|
+
"relative after:rounded after:absolute after:inset-0 after:-bottom-0.5 after:border-b-2 after:transition-opacity after:duration-200",
|
|
482
|
+
"after:pointer-events-none after:border-[--border-color] after:opacity-30 after:data-[active=true]:opacity-100",
|
|
483
|
+
n
|
|
484
|
+
),
|
|
485
|
+
suppressHydrationWarning: !0,
|
|
486
|
+
ref: u,
|
|
487
|
+
onClick: l,
|
|
488
|
+
style: {
|
|
489
|
+
"--border-color": h,
|
|
490
|
+
"--background-color": j
|
|
491
|
+
},
|
|
492
|
+
children: i ?? e
|
|
493
|
+
}
|
|
494
|
+
);
|
|
495
|
+
}, qt = (e, n, s) => {
|
|
496
|
+
const a = n.replace(/(:\w+|\{\w+})/g, (i) => {
|
|
497
|
+
var d;
|
|
498
|
+
const l = i.replace(/[:{}]/g, "");
|
|
499
|
+
return ((d = s.pathParams.find((c) => c.name === l)) == null ? void 0 : d.value) ?? i;
|
|
500
|
+
}), r = new URL(
|
|
501
|
+
a.replace(/^\//, ""),
|
|
502
|
+
e.endsWith("/") ? e : `${e}/`
|
|
503
|
+
);
|
|
504
|
+
return s.queryParams.filter((i) => i.active).forEach((i) => {
|
|
505
|
+
r.searchParams.set(i.name, i.value);
|
|
506
|
+
}), r;
|
|
507
|
+
}, Rt = ({
|
|
508
|
+
control: e,
|
|
509
|
+
register: n
|
|
510
|
+
}) => {
|
|
511
|
+
const { fields: s, append: a, remove: r } = oe({
|
|
512
|
+
control: e,
|
|
513
|
+
name: "headers"
|
|
514
|
+
});
|
|
515
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
516
|
+
/* @__PURE__ */ t.jsx("table", { className: "w-full [&_td]:border [&_td]:p-1.5 [&_td]:px-2", children: /* @__PURE__ */ t.jsx("tbody", { children: s.map((i, l) => /* @__PURE__ */ t.jsxs(
|
|
517
|
+
"tr",
|
|
518
|
+
{
|
|
519
|
+
className: "group has-[:focus]:bg-muted/50 hover:bg-muted/50",
|
|
520
|
+
children: [
|
|
521
|
+
/* @__PURE__ */ t.jsx("td", { className: "flex gap-2 items-center", children: /* @__PURE__ */ t.jsx(
|
|
522
|
+
H,
|
|
523
|
+
{
|
|
524
|
+
...n(`headers.${l}.name`),
|
|
525
|
+
placeholder: "Name",
|
|
526
|
+
className: "border-0 shadow-none text-xs font-mono",
|
|
527
|
+
autoComplete: "off"
|
|
528
|
+
}
|
|
529
|
+
) }),
|
|
530
|
+
/* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
531
|
+
/* @__PURE__ */ t.jsx(
|
|
532
|
+
H,
|
|
533
|
+
{
|
|
534
|
+
placeholder: "Value",
|
|
535
|
+
className: "border-0 shadow-none text-xs font-mono",
|
|
536
|
+
...n(`headers.${l}.value`),
|
|
537
|
+
autoComplete: "off"
|
|
538
|
+
}
|
|
539
|
+
),
|
|
540
|
+
/* @__PURE__ */ t.jsx(
|
|
541
|
+
E,
|
|
542
|
+
{
|
|
543
|
+
size: "icon",
|
|
544
|
+
variant: "ghost",
|
|
545
|
+
className: "text-muted-foreground opacity-0 group-hover:opacity-100",
|
|
546
|
+
onClick: () => {
|
|
547
|
+
r(l);
|
|
548
|
+
},
|
|
549
|
+
type: "button",
|
|
550
|
+
children: /* @__PURE__ */ t.jsx(Ve, { size: 16 })
|
|
551
|
+
}
|
|
552
|
+
)
|
|
553
|
+
] }) })
|
|
554
|
+
]
|
|
555
|
+
},
|
|
556
|
+
i.id
|
|
557
|
+
)) }) }),
|
|
558
|
+
/* @__PURE__ */ t.jsx("div", { className: "text-end", children: /* @__PURE__ */ t.jsx(
|
|
559
|
+
E,
|
|
560
|
+
{
|
|
561
|
+
className: "",
|
|
562
|
+
onClick: () => a({ name: "", value: "" }),
|
|
563
|
+
type: "button",
|
|
564
|
+
children: "Add header"
|
|
565
|
+
}
|
|
566
|
+
) })
|
|
567
|
+
] });
|
|
568
|
+
}, Mt = ({
|
|
569
|
+
control: e
|
|
570
|
+
}) => {
|
|
571
|
+
const { fields: n } = oe({
|
|
572
|
+
control: e,
|
|
573
|
+
name: "pathParams"
|
|
574
|
+
});
|
|
575
|
+
return /* @__PURE__ */ t.jsx("table", { className: "w-full table-auto [&_td]:border [&_td]:py-1 [&_td]:px-2", children: /* @__PURE__ */ t.jsx("tbody", { children: n.map((s, a) => /* @__PURE__ */ t.jsxs("tr", { className: "hover:bg-accent/40", children: [
|
|
576
|
+
/* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsx(
|
|
577
|
+
$,
|
|
578
|
+
{
|
|
579
|
+
control: e,
|
|
580
|
+
name: `pathParams.${a}.value`,
|
|
581
|
+
render: ({ field: r }) => /* @__PURE__ */ t.jsxs("div", { children: [
|
|
582
|
+
/* @__PURE__ */ t.jsx(
|
|
583
|
+
Pe,
|
|
584
|
+
{
|
|
585
|
+
slug: s.name,
|
|
586
|
+
name: s.name,
|
|
587
|
+
backgroundOpacity: "25%",
|
|
588
|
+
borderOpacity: r.value ? "100%" : "0",
|
|
589
|
+
className: O(
|
|
590
|
+
"font-mono text-xs m-2",
|
|
591
|
+
!r.value && "opacity-60"
|
|
592
|
+
)
|
|
593
|
+
}
|
|
594
|
+
),
|
|
595
|
+
"*"
|
|
596
|
+
] })
|
|
597
|
+
}
|
|
598
|
+
) }),
|
|
599
|
+
/* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
600
|
+
/* @__PURE__ */ t.jsx(
|
|
601
|
+
$,
|
|
602
|
+
{
|
|
603
|
+
control: e,
|
|
604
|
+
name: `pathParams.${a}.value`,
|
|
605
|
+
render: ({ field: r }) => /* @__PURE__ */ t.jsx(
|
|
606
|
+
H,
|
|
607
|
+
{
|
|
608
|
+
...r,
|
|
609
|
+
required: !0,
|
|
610
|
+
placeholder: "Enter value",
|
|
611
|
+
className: "border-0 shadow-none ring-0 font-mono text-xs"
|
|
612
|
+
}
|
|
613
|
+
)
|
|
614
|
+
}
|
|
615
|
+
),
|
|
616
|
+
/* @__PURE__ */ t.jsx(
|
|
617
|
+
$,
|
|
618
|
+
{
|
|
619
|
+
control: e,
|
|
620
|
+
name: `pathParams.${a}.value`,
|
|
621
|
+
render: ({ field: r }) => /* @__PURE__ */ t.jsx(
|
|
622
|
+
E,
|
|
623
|
+
{
|
|
624
|
+
size: "icon",
|
|
625
|
+
type: "button",
|
|
626
|
+
variant: "ghost",
|
|
627
|
+
"aria-label": "Clear value",
|
|
628
|
+
className: O(
|
|
629
|
+
"ms-2",
|
|
630
|
+
r.value.length === 0 ? "opacity-0 pointer-events-none" : "opacity-100"
|
|
631
|
+
),
|
|
632
|
+
title: "Clear value",
|
|
633
|
+
onClick: () => r.onChange(""),
|
|
634
|
+
children: /* @__PURE__ */ t.jsx(Ce, { size: 16 })
|
|
635
|
+
}
|
|
636
|
+
)
|
|
637
|
+
}
|
|
638
|
+
)
|
|
639
|
+
] }) })
|
|
640
|
+
] }, s.id)) }) });
|
|
641
|
+
}, At = (e, n) => {
|
|
642
|
+
const s = fe.forwardRef(({ className: a, asChild: r, ...i }, l) => {
|
|
643
|
+
const u = r ? lt : e;
|
|
644
|
+
return fe.createElement(u, {
|
|
645
|
+
...i,
|
|
646
|
+
ref: l,
|
|
647
|
+
className: O(n, a)
|
|
648
|
+
});
|
|
649
|
+
});
|
|
650
|
+
return s.displayName = `VariantComponent(${e})`, s;
|
|
651
|
+
}, Vt = At(
|
|
652
|
+
"input",
|
|
653
|
+
"px-2 bg-transparent h-6 font-mono text-xs m-2"
|
|
654
|
+
), zt = ({
|
|
655
|
+
control: e,
|
|
656
|
+
queryParams: n
|
|
657
|
+
}) => {
|
|
658
|
+
const { fields: s } = oe({
|
|
659
|
+
control: e,
|
|
660
|
+
name: "queryParams"
|
|
661
|
+
}), a = Xe(), r = n.map((u) => !!u.isRequired), l = a.watch("identity") !== J;
|
|
662
|
+
return /* @__PURE__ */ t.jsx("div", { className: "", children: /* @__PURE__ */ t.jsx("table", { className: "w-full [&_td]:border [&_td]:p-1.5 [&_td]:px-2", children: /* @__PURE__ */ t.jsx("tbody", { children: s.filter(
|
|
663
|
+
// TODO remove this hack for Accu or make it more generic
|
|
664
|
+
(u) => !(l && u.name === "apikey")
|
|
665
|
+
).map((u, d) => /* @__PURE__ */ t.jsxs("tr", { className: "hover:bg-accent/40", children: [
|
|
666
|
+
/* @__PURE__ */ t.jsx("td", { className: "text-center", children: /* @__PURE__ */ t.jsx(
|
|
667
|
+
$,
|
|
668
|
+
{
|
|
669
|
+
control: e,
|
|
670
|
+
name: `queryParams.${d}.active`,
|
|
671
|
+
render: ({ field: c }) => /* @__PURE__ */ t.jsx(
|
|
672
|
+
"input",
|
|
673
|
+
{
|
|
674
|
+
type: "checkbox",
|
|
675
|
+
id: `queryParams.${d}.active`,
|
|
676
|
+
checked: c.value,
|
|
677
|
+
onChange: c.onChange
|
|
678
|
+
}
|
|
679
|
+
)
|
|
680
|
+
}
|
|
681
|
+
) }),
|
|
682
|
+
/* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsx(
|
|
683
|
+
$,
|
|
684
|
+
{
|
|
685
|
+
control: e,
|
|
686
|
+
render: ({ field: c }) => /* @__PURE__ */ t.jsx(Vt, { asChild: !0, children: /* @__PURE__ */ t.jsxs(
|
|
687
|
+
"label",
|
|
688
|
+
{
|
|
689
|
+
className: "flex items-center cursor-pointer",
|
|
690
|
+
htmlFor: `queryParams.${d}.active`,
|
|
691
|
+
title: r[d] ? "Required field" : void 0,
|
|
692
|
+
children: [
|
|
693
|
+
c.value,
|
|
694
|
+
r[d] && /* @__PURE__ */ t.jsx("sup", { children: " *" })
|
|
695
|
+
]
|
|
696
|
+
}
|
|
697
|
+
) }),
|
|
698
|
+
name: `queryParams.${d}.name`
|
|
699
|
+
}
|
|
700
|
+
) }),
|
|
701
|
+
/* @__PURE__ */ t.jsx("td", { children: /* @__PURE__ */ t.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
702
|
+
/* @__PURE__ */ t.jsx(
|
|
703
|
+
$,
|
|
704
|
+
{
|
|
705
|
+
control: e,
|
|
706
|
+
render: ({ field: c }) => /* @__PURE__ */ t.jsx(
|
|
707
|
+
H,
|
|
708
|
+
{
|
|
709
|
+
...c,
|
|
710
|
+
onChange: (f) => {
|
|
711
|
+
c.onChange(f.target.value), f.target.value.length > 0 && a.setValue(`queryParams.${d}.active`, !0);
|
|
712
|
+
},
|
|
713
|
+
placeholder: "Enter value",
|
|
714
|
+
className: "w-full border-0 shadow-none text-xs font-mono"
|
|
715
|
+
}
|
|
716
|
+
),
|
|
717
|
+
name: `queryParams.${d}.value`
|
|
718
|
+
}
|
|
719
|
+
),
|
|
720
|
+
/* @__PURE__ */ t.jsx(
|
|
721
|
+
$,
|
|
722
|
+
{
|
|
723
|
+
control: e,
|
|
724
|
+
render: ({ field: c }) => /* @__PURE__ */ t.jsx(
|
|
725
|
+
E,
|
|
726
|
+
{
|
|
727
|
+
size: "icon",
|
|
728
|
+
type: "button",
|
|
729
|
+
variant: "ghost",
|
|
730
|
+
"aria-label": "Clear value",
|
|
731
|
+
className: O(
|
|
732
|
+
"ms-2",
|
|
733
|
+
c.value.length === 0 ? "opacity-0 pointer-events-none" : "opacity-100"
|
|
734
|
+
),
|
|
735
|
+
title: "Clear value",
|
|
736
|
+
onClick: () => c.onChange(""),
|
|
737
|
+
children: /* @__PURE__ */ t.jsx(Ce, { size: 16 })
|
|
738
|
+
}
|
|
739
|
+
),
|
|
740
|
+
name: `queryParams.${d}.value`
|
|
741
|
+
}
|
|
742
|
+
)
|
|
743
|
+
] }) })
|
|
744
|
+
] }, u.id)) }) }) });
|
|
745
|
+
}, Ft = ({
|
|
746
|
+
value: e,
|
|
747
|
+
onChange: n,
|
|
748
|
+
className: s,
|
|
749
|
+
options: a,
|
|
750
|
+
showChevrons: r = !0
|
|
751
|
+
}) => /* @__PURE__ */ t.jsxs("div", { className: "grid", children: [
|
|
752
|
+
/* @__PURE__ */ t.jsx(
|
|
753
|
+
"select",
|
|
754
|
+
{
|
|
755
|
+
className: O(
|
|
756
|
+
"row-start-1 col-start-1 border border-input text-foreground px-2 py-1 pe-6",
|
|
757
|
+
"rounded-md appearance-none bg-zinc-50 hover:bg-white dark:bg-zinc-800 hover:dark:bg-zinc-800/75",
|
|
758
|
+
s
|
|
759
|
+
),
|
|
760
|
+
value: e,
|
|
761
|
+
onChange: n,
|
|
762
|
+
children: a.map((i) => /* @__PURE__ */ t.jsx("option", { value: i.value, children: i.label }, i.value))
|
|
763
|
+
}
|
|
764
|
+
),
|
|
765
|
+
/* @__PURE__ */ t.jsx(
|
|
766
|
+
"div",
|
|
767
|
+
{
|
|
768
|
+
className: O(
|
|
769
|
+
!r && "hidden",
|
|
770
|
+
"row-start-1 col-start-1 self-center justify-self-end relative end-2 pointer-events-none"
|
|
771
|
+
),
|
|
772
|
+
children: /* @__PURE__ */ t.jsx(ze, { size: 14 })
|
|
773
|
+
}
|
|
774
|
+
)
|
|
775
|
+
] }), Lt = (e) => {
|
|
776
|
+
var s;
|
|
777
|
+
return (s = Object.entries({
|
|
778
|
+
"application/json": "json",
|
|
779
|
+
"text/json": "json",
|
|
780
|
+
"text/html": "html",
|
|
781
|
+
"text/css": "css",
|
|
782
|
+
"text/javascript": "javascript",
|
|
783
|
+
"application/xml": "xml",
|
|
784
|
+
"application/xhtml+xml": "xhtml"
|
|
785
|
+
}).find(
|
|
786
|
+
([a]) => e.includes(a)
|
|
787
|
+
)) == null ? void 0 : s[1];
|
|
788
|
+
}, Dt = (e) => {
|
|
789
|
+
const n = e.get("Content-Type") || "";
|
|
790
|
+
return Lt(n);
|
|
791
|
+
}, Gt = (e) => {
|
|
792
|
+
try {
|
|
793
|
+
return JSON.stringify(JSON.parse(e), null, 2);
|
|
794
|
+
} catch {
|
|
795
|
+
return null;
|
|
796
|
+
}
|
|
797
|
+
}, Bt = ({
|
|
798
|
+
body: e = "",
|
|
799
|
+
headers: n
|
|
800
|
+
}) => {
|
|
801
|
+
const s = Dt(n), a = Gt(e), r = a || e, [i, l] = Ee(
|
|
802
|
+
a ? "formatted" : "raw"
|
|
803
|
+
);
|
|
804
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
805
|
+
/* @__PURE__ */ t.jsx(ae, { className: "shadow-none", children: /* @__PURE__ */ t.jsx(
|
|
806
|
+
it,
|
|
807
|
+
{
|
|
808
|
+
language: i === "raw" ? a ? "plain" : s : "json",
|
|
809
|
+
noBackground: !0,
|
|
810
|
+
className: "overflow-x-auto p-4 text-xs max-h-[calc(83.333vh-180px)]",
|
|
811
|
+
code: i === "raw" ? e : r
|
|
812
|
+
}
|
|
813
|
+
) }),
|
|
814
|
+
a && /* @__PURE__ */ t.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ t.jsx(
|
|
815
|
+
Ft,
|
|
816
|
+
{
|
|
817
|
+
value: i,
|
|
818
|
+
onChange: (u) => l(u.target.value),
|
|
819
|
+
options: [
|
|
820
|
+
{ value: "formatted", label: "Formatted" },
|
|
821
|
+
{ value: "raw", label: "Raw" }
|
|
822
|
+
]
|
|
823
|
+
}
|
|
824
|
+
) })
|
|
825
|
+
] });
|
|
826
|
+
}, J = "__none", Jt = {
|
|
827
|
+
200: "OK",
|
|
828
|
+
201: "Created",
|
|
829
|
+
202: "Accepted",
|
|
830
|
+
204: "No Content",
|
|
831
|
+
400: "Bad Request",
|
|
832
|
+
401: "Unauthorized",
|
|
833
|
+
403: "Forbidden",
|
|
834
|
+
404: "Not Found",
|
|
835
|
+
405: "Method Not Allowed",
|
|
836
|
+
500: "Internal Server Error"
|
|
837
|
+
}, Ht = ({
|
|
838
|
+
server: e,
|
|
839
|
+
servers: n,
|
|
840
|
+
url: s,
|
|
841
|
+
method: a,
|
|
842
|
+
headers: r = [],
|
|
843
|
+
queryParams: i = [],
|
|
844
|
+
pathParams: l = [],
|
|
845
|
+
defaultBody: u = ""
|
|
846
|
+
}) => {
|
|
847
|
+
var de, ue;
|
|
848
|
+
const { selectedServer: d, setSelectedServer: c } = tt(), [, f] = He(), { register: h, control: j, handleSubmit: b, watch: w, setValue: v, ...S } = Ye({
|
|
849
|
+
defaultValues: {
|
|
850
|
+
body: u,
|
|
851
|
+
queryParams: i.map((o) => ({
|
|
852
|
+
name: o.name,
|
|
853
|
+
value: o.defaultValue ?? "",
|
|
854
|
+
active: o.defaultActive ?? !1
|
|
855
|
+
})),
|
|
856
|
+
pathParams: l.map((o) => ({
|
|
857
|
+
name: o.name,
|
|
858
|
+
value: o.defaultValue ?? ""
|
|
859
|
+
})),
|
|
860
|
+
headers: r.map((o) => ({
|
|
861
|
+
name: o.name,
|
|
862
|
+
value: o.defaultValue ?? ""
|
|
863
|
+
})),
|
|
864
|
+
identity: J
|
|
865
|
+
}
|
|
866
|
+
}), C = w(), k = Me(), le = $e(!1);
|
|
867
|
+
Te(() => {
|
|
868
|
+
var x;
|
|
869
|
+
if (le.current) return;
|
|
870
|
+
const o = (x = k.data) == null ? void 0 : x.at(0);
|
|
871
|
+
o && (v("identity", o.id), le.current = !0);
|
|
872
|
+
}, [v, k.data]);
|
|
873
|
+
const p = Ke({
|
|
874
|
+
mutationFn: async (o) => {
|
|
875
|
+
var I, q;
|
|
876
|
+
const x = qt(d ?? e, s, o), _ = performance.now(), D = new Request(x, {
|
|
877
|
+
method: a.toUpperCase(),
|
|
878
|
+
headers: Object.fromEntries(
|
|
879
|
+
o.headers.filter((m) => m.name).map((m) => [m.name, m.value])
|
|
880
|
+
),
|
|
881
|
+
body: o.body ? o.body : void 0
|
|
882
|
+
});
|
|
883
|
+
o.identity !== J && ((q = (I = k.data) == null ? void 0 : I.find((m) => m.id === o.identity)) == null || q.authorizeRequest(D));
|
|
884
|
+
try {
|
|
885
|
+
const m = await fetch(D, {
|
|
886
|
+
signal: AbortSignal.timeout(5e3)
|
|
887
|
+
}), G = performance.now() - _, B = await m.text();
|
|
888
|
+
return {
|
|
889
|
+
status: m.status,
|
|
890
|
+
headers: m.headers,
|
|
891
|
+
size: B.length,
|
|
892
|
+
body: B,
|
|
893
|
+
time: G
|
|
894
|
+
};
|
|
895
|
+
} catch (m) {
|
|
896
|
+
throw m instanceof TypeError ? new Error(
|
|
897
|
+
"The request failed, possibly due to network issues or CORS policy."
|
|
898
|
+
) : m;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}), ke = s.split("/").map((o, x, _) => {
|
|
902
|
+
var G;
|
|
903
|
+
const D = o.startsWith("{") && o.endsWith("}") || o.startsWith(":"), I = o.replace(/[:{}]/g, ""), q = (G = C.pathParams.find((B) => B.name === I)) == null ? void 0 : G.value, m = q ? /* @__PURE__ */ t.jsx(Pe, { backgroundOpacity: "25%", name: o, slug: o, children: encodeURIComponent(q) }) : /* @__PURE__ */ t.jsx(
|
|
904
|
+
"span",
|
|
905
|
+
{
|
|
906
|
+
className: "underline decoration-wavy decoration-red-500",
|
|
907
|
+
title: `Missing value for path parameter \`${I}\``,
|
|
908
|
+
children: o
|
|
909
|
+
}
|
|
910
|
+
);
|
|
911
|
+
return (
|
|
912
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
913
|
+
/* @__PURE__ */ t.jsxs(Z, { children: [
|
|
914
|
+
D ? m : o,
|
|
915
|
+
x < _.length - 1 && "/",
|
|
916
|
+
/* @__PURE__ */ t.jsx("wbr", {})
|
|
917
|
+
] }, o + x)
|
|
918
|
+
);
|
|
919
|
+
}), U = Array.from(((de = p.data) == null ? void 0 : de.headers.entries()) ?? []), ce = C.queryParams.filter((o) => o.active).map((o, x, _) => /* @__PURE__ */ t.jsxs(Z, { children: [
|
|
920
|
+
o.name,
|
|
921
|
+
"=",
|
|
922
|
+
encodeURIComponent(o.value).replaceAll("%20", "+"),
|
|
923
|
+
x < _.length - 1 && "&",
|
|
924
|
+
/* @__PURE__ */ t.jsx("wbr", {})
|
|
925
|
+
] }, o.name)), _e = /* @__PURE__ */ t.jsx("div", { className: "inline-block opacity-50 hover:opacity-100 transition", children: n && n.length > 1 ? /* @__PURE__ */ t.jsxs(
|
|
926
|
+
xe,
|
|
927
|
+
{
|
|
928
|
+
onValueChange: (o) => {
|
|
929
|
+
f(() => {
|
|
930
|
+
c(o);
|
|
931
|
+
});
|
|
932
|
+
},
|
|
933
|
+
value: d,
|
|
934
|
+
children: [
|
|
935
|
+
/* @__PURE__ */ t.jsx(ye, { className: "p-0 border-none flex-row-reverse bg-transparent text-xs gap-0.5 h-auto", children: /* @__PURE__ */ t.jsx(ge, {}) }),
|
|
936
|
+
/* @__PURE__ */ t.jsx(ve, { children: n.map((o) => /* @__PURE__ */ t.jsx(K, { value: o, children: o.replace(/^https?:\/\//, "") }, o)) })
|
|
937
|
+
]
|
|
938
|
+
}
|
|
939
|
+
) : /* @__PURE__ */ t.jsx("span", { children: e.replace(/^https?:\/\//, "") }) });
|
|
940
|
+
return /* @__PURE__ */ t.jsx(
|
|
941
|
+
et,
|
|
942
|
+
{
|
|
943
|
+
register: h,
|
|
944
|
+
control: j,
|
|
945
|
+
handleSubmit: b,
|
|
946
|
+
watch: w,
|
|
947
|
+
setValue: v,
|
|
948
|
+
...S,
|
|
949
|
+
children: /* @__PURE__ */ t.jsx("form", { onSubmit: b((o) => p.mutateAsync(o)), children: /* @__PURE__ */ t.jsxs("div", { className: "grid grid-cols-[8fr_7fr] text-sm h-full", children: [
|
|
950
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-4 p-8 bg-muted/50 after:bg-muted-foreground/20 relative after:absolute after:w-px after:inset-0 after:left-auto", children: [
|
|
951
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex gap-2 items-stretch", children: [
|
|
952
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex flex-1 items-center w-full border rounded-md", children: [
|
|
953
|
+
/* @__PURE__ */ t.jsx("div", { className: "border-r p-2 bg-muted rounded-l-md self-stretch font-semibold font-mono", children: a.toUpperCase() }),
|
|
954
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center flex-wrap p-2 font-mono text-xs", children: [
|
|
955
|
+
_e,
|
|
956
|
+
ke,
|
|
957
|
+
ce.length > 0 ? "?" : "",
|
|
958
|
+
ce
|
|
959
|
+
] })
|
|
960
|
+
] }),
|
|
961
|
+
/* @__PURE__ */ t.jsx(E, { type: "submit", className: "h-auto flex gap-1", children: "Send" })
|
|
962
|
+
] }),
|
|
963
|
+
/* @__PURE__ */ t.jsxs(
|
|
964
|
+
be,
|
|
965
|
+
{
|
|
966
|
+
defaultValue: i.length + l.length > 0 ? "parameters" : "headers",
|
|
967
|
+
children: [
|
|
968
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex flex-wrap gap-1 justify-between", children: [
|
|
969
|
+
/* @__PURE__ */ t.jsxs(Ne, { children: [
|
|
970
|
+
i.length + l.length > 0 && /* @__PURE__ */ t.jsx(A, { value: "parameters", children: "Parameters" }),
|
|
971
|
+
/* @__PURE__ */ t.jsxs(A, { value: "headers", children: [
|
|
972
|
+
"Headers",
|
|
973
|
+
" ",
|
|
974
|
+
C.headers.length > 0 && `(${C.headers.length})`
|
|
975
|
+
] }),
|
|
976
|
+
/* @__PURE__ */ t.jsx(
|
|
977
|
+
A,
|
|
978
|
+
{
|
|
979
|
+
value: "body",
|
|
980
|
+
disabled: !["POST", "PUT", "PATCH", "DELETE"].includes(
|
|
981
|
+
a.toUpperCase()
|
|
982
|
+
),
|
|
983
|
+
children: "Body"
|
|
984
|
+
}
|
|
985
|
+
)
|
|
986
|
+
] }),
|
|
987
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex gap-2 items-center", children: [
|
|
988
|
+
"Auth:",
|
|
989
|
+
/* @__PURE__ */ t.jsxs(
|
|
990
|
+
xe,
|
|
991
|
+
{
|
|
992
|
+
onValueChange: (o) => v("identity", o),
|
|
993
|
+
value: C.identity,
|
|
994
|
+
defaultValue: C.identity,
|
|
995
|
+
children: [
|
|
996
|
+
/* @__PURE__ */ t.jsx(ye, { className: "w-[180px] flex", children: k.isPending ? /* @__PURE__ */ t.jsx(je, {}) : /* @__PURE__ */ t.jsx(ge, {}) }),
|
|
997
|
+
/* @__PURE__ */ t.jsxs(ve, { align: "center", children: [
|
|
998
|
+
/* @__PURE__ */ t.jsx(K, { value: J, children: "None" }),
|
|
999
|
+
(ue = k.data) == null ? void 0 : ue.map((o) => /* @__PURE__ */ t.jsx(K, { value: o.id, children: o.label }, o.id))
|
|
1000
|
+
] })
|
|
1001
|
+
]
|
|
1002
|
+
}
|
|
1003
|
+
)
|
|
1004
|
+
] })
|
|
1005
|
+
] }),
|
|
1006
|
+
/* @__PURE__ */ t.jsx(V, { value: "headers", children: /* @__PURE__ */ t.jsx(Rt, { control: j, register: h }) }),
|
|
1007
|
+
/* @__PURE__ */ t.jsxs(V, { value: "parameters", children: [
|
|
1008
|
+
l.length > 0 && /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1009
|
+
/* @__PURE__ */ t.jsx("span", { className: "font-semibold", children: "Path Parameters" }),
|
|
1010
|
+
/* @__PURE__ */ t.jsx(Mt, { control: j })
|
|
1011
|
+
] }),
|
|
1012
|
+
i.length > 0 && /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-4 my-4", children: [
|
|
1013
|
+
/* @__PURE__ */ t.jsx("span", { className: "font-semibold", children: "Query Parameters" }),
|
|
1014
|
+
/* @__PURE__ */ t.jsx(zt, { control: j, queryParams: i })
|
|
1015
|
+
] })
|
|
1016
|
+
] }),
|
|
1017
|
+
/* @__PURE__ */ t.jsx(V, { value: "body", children: /* @__PURE__ */ t.jsx(
|
|
1018
|
+
"textarea",
|
|
1019
|
+
{
|
|
1020
|
+
...h("body"),
|
|
1021
|
+
className: "border w-full rounded p-2 bg-muted h-40"
|
|
1022
|
+
}
|
|
1023
|
+
) })
|
|
1024
|
+
]
|
|
1025
|
+
}
|
|
1026
|
+
)
|
|
1027
|
+
] }),
|
|
1028
|
+
/* @__PURE__ */ t.jsx("div", { className: "min-w-0 p-8 bg-muted/70", children: p.error ? /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1029
|
+
C.pathParams.some((o) => o.value === "") && /* @__PURE__ */ t.jsx(nt, { type: "caution", children: "Some path parameters are missing values. Please fill them in to ensure the request is sent correctly." }),
|
|
1030
|
+
/* @__PURE__ */ t.jsxs(ae, { children: [
|
|
1031
|
+
/* @__PURE__ */ t.jsx(st, { children: /* @__PURE__ */ t.jsx(rt, { children: "Request failed" }) }),
|
|
1032
|
+
/* @__PURE__ */ t.jsxs(at, { children: [
|
|
1033
|
+
"Error:",
|
|
1034
|
+
" ",
|
|
1035
|
+
p.error.message || String(p.error) || "Unexpected error"
|
|
1036
|
+
] })
|
|
1037
|
+
] })
|
|
1038
|
+
] }) : p.data ? /* @__PURE__ */ t.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1039
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex gap-2", children: /* @__PURE__ */ t.jsxs("div", { className: "flex text-xs gap-6", children: [
|
|
1040
|
+
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
1041
|
+
"Status: ",
|
|
1042
|
+
p.data.status,
|
|
1043
|
+
" ",
|
|
1044
|
+
Jt[p.data.status] ?? ""
|
|
1045
|
+
] }),
|
|
1046
|
+
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
1047
|
+
"Time: ",
|
|
1048
|
+
p.data.time.toFixed(0),
|
|
1049
|
+
"ms"
|
|
1050
|
+
] }),
|
|
1051
|
+
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
1052
|
+
"Size: ",
|
|
1053
|
+
p.data.size,
|
|
1054
|
+
" B"
|
|
1055
|
+
] })
|
|
1056
|
+
] }) }),
|
|
1057
|
+
/* @__PURE__ */ t.jsxs(be, { defaultValue: "response", children: [
|
|
1058
|
+
/* @__PURE__ */ t.jsxs(Ne, { children: [
|
|
1059
|
+
/* @__PURE__ */ t.jsx(A, { value: "response", children: "Response" }),
|
|
1060
|
+
/* @__PURE__ */ t.jsx(A, { value: "headers", children: U.length ? `Headers (${U.length})` : "No headers" })
|
|
1061
|
+
] }),
|
|
1062
|
+
/* @__PURE__ */ t.jsx(V, { value: "response", children: /* @__PURE__ */ t.jsx(
|
|
1063
|
+
Bt,
|
|
1064
|
+
{
|
|
1065
|
+
headers: p.data.headers,
|
|
1066
|
+
body: p.data.body
|
|
1067
|
+
}
|
|
1068
|
+
) }),
|
|
1069
|
+
/* @__PURE__ */ t.jsx(V, { value: "headers", children: /* @__PURE__ */ t.jsxs(
|
|
1070
|
+
ae,
|
|
1071
|
+
{
|
|
1072
|
+
className: "max-h-[calc(83.333vh-140px)] overflow-y-auto grid grid-cols-2 w-full gap-2.5 font-mono text-xs shadow-none p-4",
|
|
1073
|
+
children: [
|
|
1074
|
+
/* @__PURE__ */ t.jsx("div", { className: "font-semibold", children: "Key" }),
|
|
1075
|
+
/* @__PURE__ */ t.jsx("div", { className: "font-semibold", children: "Value" }),
|
|
1076
|
+
U.map(([o, x]) => /* @__PURE__ */ t.jsxs(Z, { children: [
|
|
1077
|
+
/* @__PURE__ */ t.jsx("div", { children: o }),
|
|
1078
|
+
/* @__PURE__ */ t.jsx("div", { className: "break-words", children: x })
|
|
1079
|
+
] }, o))
|
|
1080
|
+
]
|
|
1081
|
+
}
|
|
1082
|
+
) })
|
|
1083
|
+
] })
|
|
1084
|
+
] }) : /* @__PURE__ */ t.jsx("div", { className: "grid place-items-center h-full", children: /* @__PURE__ */ t.jsx("span", { className: "text-[16px] font-semibold text-muted-foreground", children: p.isPending ? /* @__PURE__ */ t.jsx(je, {}) : "Send a request first to see the response here" }) }) })
|
|
1085
|
+
] }) })
|
|
1086
|
+
}
|
|
1087
|
+
);
|
|
1088
|
+
}, Qt = ({
|
|
1089
|
+
className: e,
|
|
1090
|
+
size: n = 16
|
|
1091
|
+
}) => /* @__PURE__ */ t.jsx(
|
|
1092
|
+
"svg",
|
|
1093
|
+
{
|
|
1094
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1095
|
+
viewBox: "0 0 24 24",
|
|
1096
|
+
fill: "currentColor",
|
|
1097
|
+
className: e,
|
|
1098
|
+
width: n,
|
|
1099
|
+
height: n,
|
|
1100
|
+
children: /* @__PURE__ */ t.jsx(
|
|
1101
|
+
"path",
|
|
1102
|
+
{
|
|
1103
|
+
fillRule: "evenodd",
|
|
1104
|
+
d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm14.024-.983a1.125 1.125 0 0 1 0 1.966l-5.603 3.113A1.125 1.125 0 0 1 9 15.113V8.887c0-.857.921-1.4 1.671-.983l5.603 3.113Z",
|
|
1105
|
+
clipRule: "evenodd"
|
|
1106
|
+
}
|
|
1107
|
+
)
|
|
1108
|
+
}
|
|
1109
|
+
), Ut = (e) => {
|
|
1110
|
+
const [n, s] = Ee(!1);
|
|
1111
|
+
return /* @__PURE__ */ t.jsxs(Qe, { onOpenChange: (a) => s(a), children: [
|
|
1112
|
+
/* @__PURE__ */ t.jsx(Ue, { asChild: !0, children: e.children ?? /* @__PURE__ */ t.jsxs("button", { className: "flex gap-1 items-center px-2 py-1 rounded-md bg-primary/80 hover:bg-primary transition text-primary-foreground text-xs", children: [
|
|
1113
|
+
"Test",
|
|
1114
|
+
/* @__PURE__ */ t.jsx(Qt, { className: "", size: 14 })
|
|
1115
|
+
] }) }),
|
|
1116
|
+
/* @__PURE__ */ t.jsxs(
|
|
1117
|
+
We,
|
|
1118
|
+
{
|
|
1119
|
+
className: "max-w-screen-xl w-full h-5/6 overflow-auto p-0",
|
|
1120
|
+
"aria-describedby": void 0,
|
|
1121
|
+
children: [
|
|
1122
|
+
/* @__PURE__ */ t.jsx(Je, { children: /* @__PURE__ */ t.jsx(Ze, { children: "Playground" }) }),
|
|
1123
|
+
n && /* @__PURE__ */ t.jsx(Ht, { ...e })
|
|
1124
|
+
]
|
|
1125
|
+
}
|
|
1126
|
+
)
|
|
1127
|
+
] });
|
|
1128
|
+
}, Se = ft(`
|
|
1129
|
+
query GetCategories($input: JSON!, $type: SchemaType!) {
|
|
1130
|
+
schema(input: $input, type: $type) {
|
|
1131
|
+
url
|
|
1132
|
+
tags {
|
|
1133
|
+
__typename
|
|
1134
|
+
name
|
|
1135
|
+
operations {
|
|
1136
|
+
__typename
|
|
1137
|
+
slug
|
|
1138
|
+
deprecated
|
|
1139
|
+
method
|
|
1140
|
+
summary
|
|
1141
|
+
operationId
|
|
1142
|
+
path
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
`), Wt = {
|
|
1148
|
+
get: "green",
|
|
1149
|
+
post: "blue",
|
|
1150
|
+
put: "yellow",
|
|
1151
|
+
delete: "red",
|
|
1152
|
+
patch: "purple",
|
|
1153
|
+
options: "gray",
|
|
1154
|
+
head: "gray"
|
|
1155
|
+
}, jn = (e) => {
|
|
1156
|
+
const n = he(e.navigationId ?? "/reference"), s = e.type === "file" ? Object.keys(e.input) : [], a = new kt(e);
|
|
1157
|
+
return {
|
|
1158
|
+
getHead: () => {
|
|
1159
|
+
if (e.type === "url" && !e.skipPreload)
|
|
1160
|
+
return /* @__PURE__ */ t.jsx(
|
|
1161
|
+
"link",
|
|
1162
|
+
{
|
|
1163
|
+
rel: "preload",
|
|
1164
|
+
href: e.input,
|
|
1165
|
+
as: "fetch",
|
|
1166
|
+
crossOrigin: "anonymous"
|
|
1167
|
+
}
|
|
1168
|
+
);
|
|
1169
|
+
if (e.server)
|
|
1170
|
+
return /* @__PURE__ */ t.jsx("link", { rel: "preconnect", href: e.server });
|
|
1171
|
+
},
|
|
1172
|
+
getMdxComponents: () => ({
|
|
1173
|
+
OpenPlaygroundButton: ({
|
|
1174
|
+
requireAuth: r,
|
|
1175
|
+
server: i,
|
|
1176
|
+
method: l,
|
|
1177
|
+
url: u,
|
|
1178
|
+
...d
|
|
1179
|
+
}) => {
|
|
1180
|
+
var h;
|
|
1181
|
+
const c = De(), f = Ae({
|
|
1182
|
+
queryFn: () => a.fetch(Se, {
|
|
1183
|
+
type: e.type,
|
|
1184
|
+
input: e.input
|
|
1185
|
+
}),
|
|
1186
|
+
enabled: !i,
|
|
1187
|
+
queryKey: ["playground-server"]
|
|
1188
|
+
});
|
|
1189
|
+
return r && !c.isAuthenticated ? /* @__PURE__ */ t.jsxs(
|
|
1190
|
+
E,
|
|
1191
|
+
{
|
|
1192
|
+
className: "gap-2 items-center",
|
|
1193
|
+
variant: "outline",
|
|
1194
|
+
onClick: c.login,
|
|
1195
|
+
children: [
|
|
1196
|
+
"Login to open in Playground ",
|
|
1197
|
+
/* @__PURE__ */ t.jsx(Fe, { size: 16 })
|
|
1198
|
+
]
|
|
1199
|
+
}
|
|
1200
|
+
) : /* @__PURE__ */ t.jsx(
|
|
1201
|
+
Ut,
|
|
1202
|
+
{
|
|
1203
|
+
url: u ?? "/",
|
|
1204
|
+
method: l ?? "get",
|
|
1205
|
+
server: i ?? ((h = f.data) == null ? void 0 : h.schema.url) ?? "https://example.com",
|
|
1206
|
+
...d,
|
|
1207
|
+
children: /* @__PURE__ */ t.jsxs(E, { className: "gap-2 items-center", variant: "outline", children: [
|
|
1208
|
+
"Open in Playground ",
|
|
1209
|
+
/* @__PURE__ */ t.jsx(Le, { size: 16 })
|
|
1210
|
+
] })
|
|
1211
|
+
}
|
|
1212
|
+
);
|
|
1213
|
+
}
|
|
1214
|
+
}),
|
|
1215
|
+
getSidebar: async (r) => {
|
|
1216
|
+
if (!Re({ path: n, end: !1 }, r))
|
|
1217
|
+
return [];
|
|
1218
|
+
try {
|
|
1219
|
+
const i = s.find((d) => r === he(n, d)) ?? Object.keys(e.input).at(0), u = (await a.fetch(Se, {
|
|
1220
|
+
type: e.type,
|
|
1221
|
+
input: e.type === "file" ? e.input[i] : e.input,
|
|
1222
|
+
version: i
|
|
1223
|
+
})).schema.tags.filter((d) => d.operations.length > 0).map((d) => ({
|
|
1224
|
+
type: "category",
|
|
1225
|
+
label: d.name || "Other endpoints",
|
|
1226
|
+
collapsible: !0,
|
|
1227
|
+
collapsed: !1,
|
|
1228
|
+
items: d.operations.map((c) => ({
|
|
1229
|
+
type: "link",
|
|
1230
|
+
label: c.summary ?? c.path,
|
|
1231
|
+
href: `#${c.slug}`,
|
|
1232
|
+
badge: {
|
|
1233
|
+
label: c.method,
|
|
1234
|
+
color: Wt[c.method.toLowerCase()]
|
|
1235
|
+
}
|
|
1236
|
+
}))
|
|
1237
|
+
}));
|
|
1238
|
+
return u.unshift({
|
|
1239
|
+
type: "link",
|
|
1240
|
+
label: "Overview",
|
|
1241
|
+
href: "#description"
|
|
1242
|
+
}), u;
|
|
1243
|
+
} catch {
|
|
1244
|
+
return [];
|
|
1245
|
+
}
|
|
1246
|
+
},
|
|
1247
|
+
getRoutes: () => [
|
|
1248
|
+
{
|
|
1249
|
+
path: n + "/:version?",
|
|
1250
|
+
async lazy() {
|
|
1251
|
+
const { OpenApiRoute: r } = await import("./Route-C8nwd9A2.js");
|
|
1252
|
+
return {
|
|
1253
|
+
element: /* @__PURE__ */ t.jsx(
|
|
1254
|
+
r,
|
|
1255
|
+
{
|
|
1256
|
+
basePath: n,
|
|
1257
|
+
versions: s,
|
|
1258
|
+
client: a,
|
|
1259
|
+
config: e
|
|
1260
|
+
}
|
|
1261
|
+
)
|
|
1262
|
+
};
|
|
1263
|
+
},
|
|
1264
|
+
children: [
|
|
1265
|
+
{
|
|
1266
|
+
index: !0,
|
|
1267
|
+
async lazy() {
|
|
1268
|
+
const { OperationList: r } = await import("./OperationList-n4U_BHmO.js");
|
|
1269
|
+
return { element: /* @__PURE__ */ t.jsx(r, {}) };
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
]
|
|
1273
|
+
}
|
|
1274
|
+
]
|
|
1275
|
+
};
|
|
1276
|
+
};
|
|
1277
|
+
export {
|
|
1278
|
+
Pe as C,
|
|
1279
|
+
Ut as P,
|
|
1280
|
+
Ft as S,
|
|
1281
|
+
ft as g,
|
|
1282
|
+
jn as o
|
|
1283
|
+
};
|
|
1284
|
+
//# sourceMappingURL=index-DStSNvP-.js.map
|