zudoku 0.0.0-ec20d13 → 0.0.0-ec4a6db
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/README.md +2 -2
- package/dist/app/ZuploBuildConfig.d.ts +11 -121
- package/dist/app/ZuploBuildConfig.js +8 -8
- package/dist/app/ZuploBuildConfig.js.map +1 -1
- package/dist/app/demo.js +21 -5
- package/dist/app/demo.js.map +1 -1
- package/dist/app/entry.client.d.ts +0 -2
- package/dist/app/entry.client.js +0 -2
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +0 -2
- package/dist/app/entry.server.js +0 -2
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/env.d.ts +7 -7
- package/dist/app/env.js +8 -0
- package/dist/app/env.js.map +1 -1
- package/dist/app/main.d.ts +1 -0
- package/dist/app/main.js +13 -18
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +7 -6
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/build/handler.js +9 -1
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/config/loader.js +4 -8
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/BuildSchema.d.ts +20 -44
- package/dist/config/validators/BuildSchema.js +8 -14
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +7369 -0
- package/dist/config/validators/InputNavigationSchema.js +74 -0
- package/dist/config/validators/InputNavigationSchema.js.map +1 -0
- package/dist/config/validators/InputNavigationSchema.test-d.d.ts +1 -0
- package/dist/config/validators/InputNavigationSchema.test-d.js +146 -0
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -0
- package/dist/config/validators/NavigationSchema.d.ts +44 -0
- package/dist/config/validators/NavigationSchema.js +95 -0
- package/dist/config/validators/NavigationSchema.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +2 -1
- package/dist/config/validators/icon-types.js +1813 -1
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +464 -5669
- package/dist/config/validators/validate.js +80 -71
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +65 -4
- package/dist/config/validators/validate.test.js.map +1 -1
- package/dist/flat-config.d.ts +325 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/auth/issuer.js +1 -1
- package/dist/lib/auth/issuer.js.map +1 -1
- package/dist/lib/auth/issuer.test.js +1 -1
- package/dist/lib/auth/issuer.test.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +2 -0
- 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 +4 -3
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +4 -2
- package/dist/lib/authentication/providers/openid.js +11 -5
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/Autocomplete.js +2 -2
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Banner.js +2 -2
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/BuildCheck.js +1 -1
- package/dist/lib/components/BuildCheck.js.map +1 -1
- package/dist/lib/components/CategoryHeading.js +1 -1
- package/dist/lib/components/CategoryHeading.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +2 -2
- package/dist/lib/components/ErrorPage.js.map +1 -1
- package/dist/lib/components/Footer.js +1 -1
- package/dist/lib/components/Footer.js.map +1 -1
- package/dist/lib/components/Framed.d.ts +7 -0
- package/dist/lib/components/Framed.js +26 -0
- package/dist/lib/components/Framed.js.map +1 -0
- package/dist/lib/components/Header.js +19 -18
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +6 -2
- package/dist/lib/components/Heading.js +2 -2
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Main.js +4 -4
- package/dist/lib/components/Main.js.map +1 -1
- package/dist/lib/components/Markdown.d.ts +0 -1
- package/dist/lib/components/Markdown.js +2 -3
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +11 -7
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +2 -2
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/PageProgress.d.ts +1 -0
- package/dist/lib/components/PageProgress.js +20 -0
- package/dist/lib/components/PageProgress.js.map +1 -0
- package/dist/lib/components/Pagination.js +1 -1
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/StatusPage.js +4 -0
- package/dist/lib/components/StatusPage.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +7 -3
- package/dist/lib/components/TopNavigation.js +49 -44
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +5 -0
- package/dist/lib/components/Typography.js +8 -0
- package/dist/lib/components/Typography.js.map +1 -0
- package/dist/lib/components/context/ZudokuContext.d.ts +3 -7
- package/dist/lib/components/context/ZudokuContext.js +44 -26
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +4 -0
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Navigation.d.ts +5 -0
- package/dist/lib/components/navigation/Navigation.js +12 -0
- package/dist/lib/components/navigation/Navigation.js.map +1 -0
- package/dist/lib/components/navigation/{SidebarBadge.d.ts → NavigationBadge.d.ts} +1 -1
- package/dist/lib/components/navigation/{SidebarBadge.js → NavigationBadge.js} +2 -2
- package/dist/lib/components/navigation/NavigationBadge.js.map +1 -0
- package/dist/lib/components/navigation/NavigationCategory.d.ts +5 -0
- package/dist/lib/components/navigation/{SidebarCategory.js → NavigationCategory.js} +14 -12
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -0
- package/dist/lib/components/navigation/NavigationItem.d.ts +6 -0
- package/dist/lib/components/navigation/NavigationItem.js +47 -0
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -0
- package/dist/lib/components/navigation/{SidebarWrapper.d.ts → NavigationWrapper.d.ts} +1 -1
- package/dist/lib/components/navigation/{SidebarWrapper.js → NavigationWrapper.js} +5 -5
- package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -0
- package/dist/lib/components/navigation/utils.d.ts +7 -9
- package/dist/lib/components/navigation/utils.js +17 -17
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +12 -13
- package/dist/lib/core/ZudokuContext.js +21 -10
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +2 -2
- package/dist/lib/errors/ErrorAlert.js +2 -3
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/hooks/useEvent.test.js +5 -3
- package/dist/lib/hooks/useEvent.test.js.map +1 -1
- package/dist/lib/hooks/useHotkey.d.ts +4 -0
- package/dist/lib/hooks/useHotkey.js +58 -0
- package/dist/lib/hooks/useHotkey.js.map +1 -0
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +1 -1
- package/dist/lib/plugins/api-catalog/index.d.ts +6 -6
- package/dist/lib/plugins/api-catalog/index.js +10 -10
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +13 -16
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.js +23 -2
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +4 -6
- package/dist/lib/plugins/custom-pages/index.js +15 -10
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -2
- package/dist/lib/plugins/markdown/MdxPage.js +30 -10
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +10 -2
- package/dist/lib/plugins/markdown/index.js +9 -26
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +2 -3
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -2
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +2 -3
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- 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 +3 -3
- package/dist/lib/plugins/openapi/graphql/graphql.js +2 -2
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +3 -3
- package/dist/lib/plugins/openapi/index.js +10 -10
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +3 -3
- package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +16 -12
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/Headers.js +52 -30
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +2 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +1 -2
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +47 -34
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/QueryParams.js +38 -23
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Spinner.d.ts +2 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.d.ts +3 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +69 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +7 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +25 -32
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +4 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +8 -10
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +3 -3
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +2 -3
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +4 -4
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.js +3 -2
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/util/createNavigationCategory.d.ts +9 -0
- package/dist/lib/plugins/openapi/util/{createSidebarCategory.js → createNavigationCategory.js} +5 -4
- package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -0
- package/dist/lib/plugins/openapi/util/getRoutes.js +2 -2
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +1 -1
- package/dist/lib/plugins/search-inkeep/index.d.ts +5 -22
- package/dist/lib/plugins/search-inkeep/index.js +35 -29
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
- package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +12 -5
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/ui/Alert.d.ts +6 -5
- package/dist/lib/ui/Alert.js +12 -10
- package/dist/lib/ui/Alert.js.map +1 -1
- package/dist/lib/ui/CodeBlock.d.ts +1 -2
- package/dist/lib/ui/CodeBlock.js +10 -11
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Dialog.js +1 -1
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.d.ts +15 -0
- package/dist/lib/ui/EmbeddedCodeBlock.js +18 -0
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -0
- package/dist/lib/ui/Select.js +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +3 -1
- package/dist/lib/ui/SyntaxHighlight.js +3 -2
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +9 -1
- package/dist/lib/util/MdxComponents.js +4 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/os.d.ts +2 -0
- package/dist/lib/util/os.js +21 -0
- package/dist/lib/util/os.js.map +1 -0
- package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
- package/dist/lib/util/useCopyToClipboard.js +11 -0
- package/dist/lib/util/useCopyToClipboard.js.map +1 -0
- package/dist/lib/util/useScrollToAnchor.js +3 -3
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/api/SchemaManager.d.ts +4 -4
- package/dist/vite/api/SchemaManager.js +25 -21
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +4 -4
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/api/schema-codegen.js +42 -11
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +82 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/build.js +8 -2
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +12 -2
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/css/plugin.js +11 -0
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.js +1 -1
- package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
- package/dist/vite/mdx/remark-last-modified.js +29 -0
- package/dist/vite/mdx/remark-last-modified.js.map +1 -0
- package/dist/vite/mdx/utils.d.ts +2 -0
- package/dist/vite/mdx/utils.js +31 -0
- package/dist/vite/mdx/utils.js.map +1 -0
- package/dist/vite/plugin-api.js +8 -8
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-config-reload.js +2 -0
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-custom-pages.js +2 -2
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.js +61 -59
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.js +6 -2
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.js +17 -38
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/{plugin-sidebar.d.ts → plugin-navigation.d.ts} +1 -1
- package/dist/vite/{plugin-sidebar.js → plugin-navigation.js} +20 -19
- package/dist/vite/plugin-navigation.js.map +1 -0
- package/dist/vite/plugin-theme.d.ts +8 -0
- package/dist/vite/plugin-theme.js +235 -0
- package/dist/vite/plugin-theme.js.map +1 -0
- package/dist/vite/plugin-theme.test.d.ts +1 -0
- package/dist/vite/plugin-theme.test.js +291 -0
- package/dist/vite/plugin-theme.test.js.map +1 -0
- package/dist/vite/plugin.js +4 -6
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/shadcn-registry.d.ts +45 -0
- package/dist/vite/shadcn-registry.js +29 -0
- package/dist/vite/shadcn-registry.js.map +1 -0
- package/lib/Alert-FYKbqjIt.js +161 -0
- package/lib/Alert-FYKbqjIt.js.map +1 -0
- package/lib/CodeBlock-DAKxs_Tu.js +85 -0
- package/lib/CodeBlock-DAKxs_Tu.js.map +1 -0
- package/lib/Command-xsbs2uhf.js +140 -0
- package/lib/Command-xsbs2uhf.js.map +1 -0
- package/lib/{Dialog-BxpuVLh9.js → Dialog-CiIdyz6a.js} +5 -5
- package/lib/Dialog-CiIdyz6a.js.map +1 -0
- package/lib/Drawer-BzkOKwgC.js.map +1 -1
- package/lib/MdxPage-DyRuoE_F.js +110 -0
- package/lib/MdxPage-DyRuoE_F.js.map +1 -0
- package/lib/OasProvider-CUA-DFGE.js +35 -0
- package/lib/OasProvider-CUA-DFGE.js.map +1 -0
- package/lib/{OperationList-Bi9ufpnW.js → OperationList-CRMvWoTv.js} +583 -570
- package/lib/OperationList-CRMvWoTv.js.map +1 -0
- package/lib/Pagination-HZKe5ncg.js +37 -0
- package/lib/Pagination-HZKe5ncg.js.map +1 -0
- package/lib/RouteGuard-CbKd7_9h.js +737 -0
- package/lib/RouteGuard-CbKd7_9h.js.map +1 -0
- package/lib/{SchemaList-Dx3pkSpp.js → SchemaList-B792ORza.js} +32 -43
- package/lib/SchemaList-B792ORza.js.map +1 -0
- package/lib/{SchemaView-DFs4gzhN.js → SchemaView-Bo53TeMb.js} +94 -103
- package/lib/SchemaView-Bo53TeMb.js.map +1 -0
- package/lib/SignUp-DfVvOCYB.js +56 -0
- package/lib/SignUp-DfVvOCYB.js.map +1 -0
- package/lib/{Markdown-r4buN85T.js → Slot-BpO_AGKJ.js} +3328 -2937
- package/lib/Slot-BpO_AGKJ.js.map +1 -0
- package/lib/{SyntaxHighlight-CqKHkyEy.js → SyntaxHighlight-CZgjJ7-f.js} +1152 -1151
- package/lib/SyntaxHighlight-CZgjJ7-f.js.map +1 -0
- package/lib/{Toc-lxYQEOzX.js → Toc-DYMzDvOa.js} +2 -2
- package/lib/{Toc-lxYQEOzX.js.map → Toc-DYMzDvOa.js.map} +1 -1
- package/lib/{chunk-DQRVZFIR-BblmKnHy.js → chunk-DQRVZFIR-DHK7_Ilc.js} +7 -7
- package/lib/{chunk-DQRVZFIR-BblmKnHy.js.map → chunk-DQRVZFIR-DHK7_Ilc.js.map} +1 -1
- package/lib/{circular-Dcv3tia6.js → circular-CLdQ0oUd.js} +2 -2
- package/lib/{circular-Dcv3tia6.js.map → circular-CLdQ0oUd.js.map} +1 -1
- package/lib/clerk-BDZ31hjU.js +25190 -0
- package/lib/clerk-BDZ31hjU.js.map +1 -0
- package/lib/{createServer-Bq93MdwG.js → createServer-Co4BBP-i.js} +4 -4
- package/lib/createServer-Co4BBP-i.js.map +1 -0
- package/lib/{errors-D27ZTQgx.js → errors-DE1gK7ms.js} +12 -12
- package/lib/{errors-D27ZTQgx.js.map → errors-DE1gK7ms.js.map} +1 -1
- package/lib/hook-Bd0yS8M0.js +1503 -0
- package/lib/hook-Bd0yS8M0.js.map +1 -0
- package/lib/index-ClhS5TxS.js +107 -0
- package/lib/index-ClhS5TxS.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/index-DLshv89l.js +3979 -0
- package/lib/index-DLshv89l.js.map +1 -0
- package/lib/{index-BvvmIczU.js → index-DLzZDv8_.js} +2 -2
- package/lib/{index-BvvmIczU.js.map → index-DLzZDv8_.js.map} +1 -1
- package/lib/index-DYP-V0jG.js +3469 -0
- package/lib/index-DYP-V0jG.js.map +1 -0
- package/lib/ui/Alert.js +54 -38
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/CodeBlock.js +6 -81
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Command.js +1 -1
- package/lib/ui/Dialog.js +23 -23
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +80 -0
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -0
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +5 -4
- package/lib/ui/SyntaxHighlight.js.map +1 -1
- package/lib/{useExposedProps-BZQkZneR.js → useExposedProps-BIYjecPD.js} +2 -2
- package/lib/{useExposedProps-BZQkZneR.js.map → useExposedProps-BIYjecPD.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +1553 -1556
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +3 -3
- package/lib/zudoku.auth-openid.js +115 -106
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +33 -4201
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +10 -11
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +47 -47
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +257 -217
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +12 -18
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +19 -69
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +6 -6
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +54 -57
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +211 -117
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +29 -24
- package/src/app/ZuploBuildConfig.ts +8 -8
- package/src/app/defaultTheme.css +68 -49
- package/src/app/demo.tsx +24 -6
- package/src/app/entry.client.tsx +0 -2
- package/src/app/entry.server.tsx +0 -2
- package/src/app/env.ts +8 -0
- package/src/app/main.css +10 -53
- package/src/app/main.tsx +17 -23
- package/src/app/standalone.tsx +7 -6
- package/src/lib/auth/issuer.test.ts +1 -1
- package/src/lib/auth/issuer.ts +1 -1
- package/src/lib/authentication/authentication.ts +2 -2
- package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
- package/src/lib/authentication/components/SignIn.tsx +5 -12
- package/src/lib/authentication/providers/openid.tsx +23 -4
- package/src/lib/components/Autocomplete.tsx +2 -1
- package/src/lib/components/Banner.tsx +1 -2
- package/src/lib/components/BuildCheck.tsx +1 -1
- package/src/lib/components/CategoryHeading.tsx +4 -1
- package/src/lib/components/ErrorPage.tsx +3 -3
- package/src/lib/components/Footer.tsx +1 -1
- package/src/lib/components/Framed.tsx +51 -0
- package/src/lib/components/Header.tsx +24 -21
- package/src/lib/components/Heading.tsx +7 -3
- package/src/lib/components/Main.tsx +9 -9
- package/src/lib/components/Markdown.tsx +3 -5
- package/src/lib/components/MobileTopNavigation.tsx +69 -15
- package/src/lib/components/NotFoundPage.tsx +3 -3
- package/src/lib/components/PageProgress.tsx +28 -0
- package/src/lib/components/Pagination.tsx +5 -4
- package/src/lib/components/StatusPage.tsx +5 -0
- package/src/lib/components/TopNavigation.tsx +75 -68
- package/src/lib/components/Typography.tsx +14 -0
- package/src/lib/components/context/ZudokuContext.ts +50 -32
- package/src/lib/components/index.ts +2 -0
- package/src/lib/components/navigation/{Sidebar.tsx → Navigation.tsx} +18 -16
- package/src/lib/components/navigation/{SidebarBadge.tsx → NavigationBadge.tsx} +1 -1
- package/src/lib/components/navigation/{SidebarCategory.tsx → NavigationCategory.tsx} +16 -14
- package/src/lib/components/navigation/{SidebarItem.tsx → NavigationItem.tsx} +23 -17
- package/src/lib/components/navigation/{SidebarWrapper.tsx → NavigationWrapper.tsx} +7 -4
- package/src/lib/components/navigation/utils.ts +27 -28
- package/src/lib/core/ZudokuContext.ts +35 -20
- package/src/lib/core/plugins.ts +2 -2
- package/src/lib/errors/ErrorAlert.tsx +3 -9
- package/src/lib/hooks/useEvent.test.tsx +7 -5
- package/src/lib/hooks/useHotkey.ts +70 -0
- package/src/lib/plugins/api-catalog/Catalog.tsx +1 -1
- package/src/lib/plugins/api-catalog/index.tsx +19 -19
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +52 -29
- package/src/lib/plugins/api-keys/index.tsx +26 -4
- package/src/lib/plugins/custom-pages/index.tsx +21 -16
- package/src/lib/plugins/markdown/MdxPage.tsx +76 -21
- package/src/lib/plugins/markdown/index.tsx +28 -41
- package/src/lib/plugins/openapi/OperationList.tsx +9 -19
- package/src/lib/plugins/openapi/OperationListItem.tsx +3 -3
- package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -0
- package/src/lib/plugins/openapi/SchemaList.tsx +5 -11
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -0
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -0
- package/src/lib/plugins/openapi/graphql/gql.ts +5 -5
- package/src/lib/plugins/openapi/graphql/graphql.ts +6 -6
- package/src/lib/plugins/openapi/index.tsx +12 -12
- package/src/lib/plugins/openapi/interfaces.ts +3 -3
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +40 -31
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +7 -3
- package/src/lib/plugins/openapi/playground/Headers.tsx +187 -89
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +3 -2
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +7 -12
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
- package/src/lib/plugins/openapi/playground/PathParams.tsx +4 -5
- package/src/lib/plugins/openapi/playground/Playground.tsx +174 -125
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +104 -58
- package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
- package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +115 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +103 -97
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +68 -92
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +3 -3
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +2 -3
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +5 -10
- package/src/lib/plugins/openapi/schema/utils.ts +3 -2
- package/src/lib/plugins/openapi/util/{createSidebarCategory.tsx → createNavigationCategory.tsx} +6 -5
- package/src/lib/plugins/openapi/util/getRoutes.tsx +2 -2
- package/src/lib/plugins/openapi/util/methodColorMap.tsx +1 -1
- package/src/lib/plugins/search-inkeep/index.tsx +54 -58
- package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +1 -0
- package/src/lib/plugins/search-pagefind/ResultList.tsx +13 -4
- package/src/lib/ui/Alert.tsx +45 -39
- package/src/lib/ui/CodeBlock.tsx +40 -55
- package/src/lib/ui/Dialog.tsx +2 -2
- package/src/lib/ui/EmbeddedCodeBlock.tsx +94 -0
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/ui/SyntaxHighlight.tsx +11 -3
- package/src/lib/util/MdxComponents.tsx +13 -2
- package/src/lib/util/os.ts +18 -0
- package/src/lib/util/useCopyToClipboard.ts +17 -0
- package/src/lib/util/useScrollToAnchor.ts +3 -3
- package/dist/config/validators/InputSidebarSchema.d.ts +0 -220
- package/dist/config/validators/InputSidebarSchema.js +0 -63
- package/dist/config/validators/InputSidebarSchema.js.map +0 -1
- package/dist/config/validators/SidebarSchema.d.ts +0 -46
- package/dist/config/validators/SidebarSchema.js +0 -118
- package/dist/config/validators/SidebarSchema.js.map +0 -1
- package/dist/lib/components/navigation/Sidebar.d.ts +0 -5
- package/dist/lib/components/navigation/Sidebar.js +0 -10
- package/dist/lib/components/navigation/Sidebar.js.map +0 -1
- package/dist/lib/components/navigation/SidebarBadge.js.map +0 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +0 -5
- package/dist/lib/components/navigation/SidebarCategory.js.map +0 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +0 -6
- package/dist/lib/components/navigation/SidebarItem.js +0 -44
- package/dist/lib/components/navigation/SidebarItem.js.map +0 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +0 -1
- package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
- package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
- package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +0 -32
- package/dist/lib/plugins/markdown/resolver.js +0 -46
- package/dist/lib/plugins/markdown/resolver.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
- package/dist/lib/plugins/openapi/util/createSidebarCategory.d.ts +0 -9
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +0 -1
- package/dist/vite/plugin-configure-tailwind.d.ts +0 -2
- package/dist/vite/plugin-configure-tailwind.js +0 -38
- package/dist/vite/plugin-configure-tailwind.js.map +0 -1
- package/dist/vite/plugin-sidebar.js.map +0 -1
- package/dist/vite/plugin-theme-css.d.ts +0 -5
- package/dist/vite/plugin-theme-css.js +0 -77
- package/dist/vite/plugin-theme-css.js.map +0 -1
- package/lib/Callout-CoVxYafP.js +0 -231
- package/lib/Callout-CoVxYafP.js.map +0 -1
- package/lib/CategoryHeading-Cu2RwgjC.js +0 -10
- package/lib/CategoryHeading-Cu2RwgjC.js.map +0 -1
- package/lib/Dialog-BxpuVLh9.js.map +0 -1
- package/lib/Markdown-r4buN85T.js.map +0 -1
- package/lib/MdxPage-DYKsTerz.js +0 -84
- package/lib/MdxPage-DYKsTerz.js.map +0 -1
- package/lib/OasProvider-C499U3sP.js +0 -33
- package/lib/OasProvider-C499U3sP.js.map +0 -1
- package/lib/OperationList-Bi9ufpnW.js.map +0 -1
- package/lib/Pagination-CCxhL836.js +0 -36
- package/lib/Pagination-CCxhL836.js.map +0 -1
- package/lib/RouteGuard-B7GVW4oL.js +0 -55
- package/lib/RouteGuard-B7GVW4oL.js.map +0 -1
- package/lib/SchemaList-Dx3pkSpp.js.map +0 -1
- package/lib/SchemaView-DFs4gzhN.js.map +0 -1
- package/lib/SignUp-CRIKdWt9.js +0 -63
- package/lib/SignUp-CRIKdWt9.js.map +0 -1
- package/lib/Slot-B5qSAnwR.js +0 -160
- package/lib/Slot-B5qSAnwR.js.map +0 -1
- package/lib/SyntaxHighlight-CqKHkyEy.js.map +0 -1
- package/lib/clerk-yAKDC3Qz.js +0 -24812
- package/lib/clerk-yAKDC3Qz.js.map +0 -1
- package/lib/createServer-Bq93MdwG.js.map +0 -1
- package/lib/hook-7wZANGJP.js +0 -1483
- package/lib/hook-7wZANGJP.js.map +0 -1
- package/lib/index--oeBayMa.js +0 -86
- package/lib/index--oeBayMa.js.map +0 -1
- package/lib/index-BgPFzhG_.js +0 -3226
- package/lib/index-BgPFzhG_.js.map +0 -1
- package/lib/index-Bn6Lc9tq.js +0 -9
- package/lib/index-Bn6Lc9tq.js.map +0 -1
- package/lib/index-QzXzw_ra.js +0 -24
- package/lib/index-QzXzw_ra.js.map +0 -1
- package/lib/index.esm-BFcSKCe-.js +0 -683
- package/lib/index.esm-BFcSKCe-.js.map +0 -1
- package/lib/joinPath-B7kNnUX4.js +0 -8
- package/lib/joinPath-B7kNnUX4.js.map +0 -1
- package/lib/mutation-C1XCQTQL.js +0 -196
- package/lib/mutation-C1XCQTQL.js.map +0 -1
- package/lib/objectEntries-yMIkr2mI.js +0 -5
- package/lib/objectEntries-yMIkr2mI.js.map +0 -1
- package/lib/react-nprogress.esm-C2MPXjiJ.js +0 -389
- package/lib/react-nprogress.esm-C2MPXjiJ.js.map +0 -1
- package/lib/useLatest-hmRS46UF.js +0 -11
- package/lib/useLatest-hmRS46UF.js.map +0 -1
- package/lib/useMutation-BKvPttRn.js +0 -97
- package/lib/useMutation-BKvPttRn.js.map +0 -1
- package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
- package/src/lib/plugins/markdown/resolver.ts +0 -59
- package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { CheckIcon as
|
|
3
|
-
import { D as
|
|
4
|
-
import { i as
|
|
5
|
-
import { O as
|
|
6
|
-
import {
|
|
2
|
+
import { CircleSlashIcon as M, CheckIcon as W, XIcon as ae, PencilLineIcon as oe, RefreshCwIcon as le, EyeOffIcon as ce, EyeIcon as de, CopyIcon as ue, TrashIcon as he, KeyRoundIcon as fe } from "lucide-react";
|
|
3
|
+
import { D as pe, a as B, R as me } from "./Slot-BpO_AGKJ.js";
|
|
4
|
+
import { i as D } from "./invariant-DAFpPywt.js";
|
|
5
|
+
import { O as xe, L as J } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
|
|
6
|
+
import { e as ye, d as ge, g as je, c as Ce } from "./hook-Bd0yS8M0.js";
|
|
7
7
|
import { Button as j } from "./ui/Button.js";
|
|
8
|
-
import { u as
|
|
9
|
-
import * as
|
|
10
|
-
import
|
|
11
|
-
import { C as
|
|
12
|
-
import { D as
|
|
13
|
-
import { Input as
|
|
14
|
-
import { c as
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
import { u as S, A as q, a as L } from "./Alert-FYKbqjIt.js";
|
|
9
|
+
import * as F from "react";
|
|
10
|
+
import we, { createContext as O, useRef as N, useLayoutEffect as ve, useEffect as X, useId as Q, useContext as H, useInsertionEffect as ke, useMemo as $, useCallback as be, Children as Ee, isValidElement as Ne, useState as P } from "react";
|
|
11
|
+
import { C as Pe, a as De } from "./Card-DPhGbYUM.js";
|
|
12
|
+
import { D as Y, e as G, a as V, c as Z, b as ee, d as te, f as se, g as R } from "./Dialog-CiIdyz6a.js";
|
|
13
|
+
import { Input as Ie } from "./ui/Input.js";
|
|
14
|
+
import { c as E } from "./cn-wvCW-ho6.js";
|
|
15
|
+
import { u as Ke } from "./CodeBlock-DAKxs_Tu.js";
|
|
16
|
+
const Ae = () => {
|
|
17
|
+
const t = ye();
|
|
18
|
+
return t.isAuthEnabled && t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(xe, {}) : t.isAuthEnabled ? /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: [
|
|
18
19
|
"Please login first to view this page",
|
|
19
20
|
/* @__PURE__ */ e.jsx(j, { onClick: () => t.login(), children: "Login" })
|
|
20
|
-
] }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: /* @__PURE__ */ e.jsxs(
|
|
21
|
+
] }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: /* @__PURE__ */ e.jsxs(pe, { className: "max-w-[600px]", children: [
|
|
21
22
|
"Authentication needs to be enabled for API keys to work. Enable it in your Zudoku configuration under ",
|
|
22
23
|
/* @__PURE__ */ e.jsx("code", { children: "authentication" }),
|
|
23
24
|
"."
|
|
24
25
|
] }) });
|
|
25
|
-
},
|
|
26
|
-
function
|
|
27
|
-
const i =
|
|
26
|
+
}, Re = O({});
|
|
27
|
+
function ne(t) {
|
|
28
|
+
const i = N(null);
|
|
28
29
|
return i.current === null && (i.current = t()), i.current;
|
|
29
30
|
}
|
|
30
|
-
const
|
|
31
|
-
function Ke(t) {
|
|
32
|
-
return typeof t == "object" && t !== null;
|
|
33
|
-
}
|
|
34
|
-
function Re(t) {
|
|
35
|
-
return Ke(t) && "offsetHeight" in t;
|
|
36
|
-
}
|
|
37
|
-
const Ae = q({
|
|
31
|
+
const Te = typeof window < "u", ze = Te ? ve : X, ie = /* @__PURE__ */ O(null), Me = O({
|
|
38
32
|
transformPagePoint: (t) => t,
|
|
39
33
|
isStatic: !1,
|
|
40
34
|
reducedMotion: "never"
|
|
41
35
|
});
|
|
42
|
-
|
|
36
|
+
function Se(t) {
|
|
37
|
+
return typeof t == "object" && t !== null;
|
|
38
|
+
}
|
|
39
|
+
function qe(t) {
|
|
40
|
+
return Se(t) && "offsetHeight" in t;
|
|
41
|
+
}
|
|
42
|
+
class Le extends F.Component {
|
|
43
43
|
getSnapshotBeforeUpdate(i) {
|
|
44
44
|
const s = this.props.childRef.current;
|
|
45
45
|
if (s && i.isPresent && !this.props.isPresent) {
|
|
46
|
-
const n = s.offsetParent, o =
|
|
46
|
+
const n = s.offsetParent, o = qe(n) && n.offsetWidth || 0, r = this.props.sizeRef.current;
|
|
47
47
|
r.height = s.offsetHeight || 0, r.width = s.offsetWidth || 0, r.top = s.offsetTop, r.left = s.offsetLeft, r.right = o - r.width - r.left;
|
|
48
48
|
}
|
|
49
49
|
return null;
|
|
@@ -57,223 +57,234 @@ class Te extends S.Component {
|
|
|
57
57
|
return this.props.children;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
const n =
|
|
60
|
+
function $e({ children: t, isPresent: i, anchorX: s }) {
|
|
61
|
+
const n = Q(), o = N(null), r = N({
|
|
62
62
|
width: 0,
|
|
63
63
|
height: 0,
|
|
64
64
|
top: 0,
|
|
65
65
|
left: 0,
|
|
66
66
|
right: 0
|
|
67
|
-
}), { nonce:
|
|
68
|
-
return
|
|
69
|
-
const { width:
|
|
70
|
-
if (i || !o.current || !
|
|
67
|
+
}), { nonce: f } = H(Me);
|
|
68
|
+
return ke(() => {
|
|
69
|
+
const { width: x, height: u, top: h, left: d, right: l } = r.current;
|
|
70
|
+
if (i || !o.current || !x || !u)
|
|
71
71
|
return;
|
|
72
|
-
const y = s === "left" ? `left: ${d}` : `right: ${
|
|
72
|
+
const y = s === "left" ? `left: ${d}` : `right: ${l}`;
|
|
73
73
|
o.current.dataset.motionPopId = n;
|
|
74
|
-
const
|
|
75
|
-
return
|
|
74
|
+
const p = document.createElement("style");
|
|
75
|
+
return f && (p.nonce = f), document.head.appendChild(p), p.sheet && p.sheet.insertRule(`
|
|
76
76
|
[data-motion-pop-id="${n}"] {
|
|
77
77
|
position: absolute !important;
|
|
78
|
-
width: ${
|
|
79
|
-
height: ${
|
|
78
|
+
width: ${x}px !important;
|
|
79
|
+
height: ${u}px !important;
|
|
80
80
|
${y}px !important;
|
|
81
|
-
top: ${
|
|
81
|
+
top: ${h}px !important;
|
|
82
82
|
}
|
|
83
83
|
`), () => {
|
|
84
|
-
document.head.contains(
|
|
84
|
+
document.head.contains(p) && document.head.removeChild(p);
|
|
85
85
|
};
|
|
86
|
-
}, [i]), e.jsx(
|
|
86
|
+
}, [i]), e.jsx(Le, { isPresent: i, childRef: o, sizeRef: r, children: F.cloneElement(t, { ref: o }) });
|
|
87
87
|
}
|
|
88
|
-
const
|
|
89
|
-
const
|
|
90
|
-
let d = !0,
|
|
91
|
-
id:
|
|
88
|
+
const Fe = ({ children: t, initial: i, isPresent: s, onExitComplete: n, custom: o, presenceAffectsLayout: r, mode: f, anchorX: x }) => {
|
|
89
|
+
const u = ne(Oe), h = Q();
|
|
90
|
+
let d = !0, l = $(() => (d = !1, {
|
|
91
|
+
id: h,
|
|
92
92
|
initial: i,
|
|
93
93
|
isPresent: s,
|
|
94
94
|
custom: o,
|
|
95
95
|
onExitComplete: (y) => {
|
|
96
|
-
|
|
97
|
-
for (const
|
|
98
|
-
if (!
|
|
96
|
+
u.set(y, !0);
|
|
97
|
+
for (const p of u.values())
|
|
98
|
+
if (!p)
|
|
99
99
|
return;
|
|
100
100
|
n && n();
|
|
101
101
|
},
|
|
102
|
-
register: (y) => (
|
|
103
|
-
}), [s,
|
|
104
|
-
return r && d && (
|
|
105
|
-
|
|
106
|
-
}, [s]),
|
|
107
|
-
!s && !
|
|
108
|
-
}, [s]),
|
|
102
|
+
register: (y) => (u.set(y, !1), () => u.delete(y))
|
|
103
|
+
}), [s, u, n]);
|
|
104
|
+
return r && d && (l = { ...l }), $(() => {
|
|
105
|
+
u.forEach((y, p) => u.set(p, !1));
|
|
106
|
+
}, [s]), F.useEffect(() => {
|
|
107
|
+
!s && !u.size && n && n();
|
|
108
|
+
}, [s]), f === "popLayout" && (t = e.jsx($e, { isPresent: s, anchorX: x, children: t })), e.jsx(ie.Provider, { value: l, children: t });
|
|
109
109
|
};
|
|
110
|
-
function
|
|
110
|
+
function Oe() {
|
|
111
111
|
return /* @__PURE__ */ new Map();
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
const i =
|
|
113
|
+
function Qe(t = !0) {
|
|
114
|
+
const i = H(ie);
|
|
115
115
|
if (i === null)
|
|
116
116
|
return [!0, null];
|
|
117
|
-
const { isPresent: s, onExitComplete: n, register: o } = i, r =
|
|
118
|
-
|
|
117
|
+
const { isPresent: s, onExitComplete: n, register: o } = i, r = Q();
|
|
118
|
+
X(() => {
|
|
119
119
|
if (t)
|
|
120
120
|
return o(r);
|
|
121
121
|
}, [t]);
|
|
122
|
-
const
|
|
123
|
-
return !s && n ? [!1,
|
|
122
|
+
const f = be(() => t && n && n(r), [r, n, t]);
|
|
123
|
+
return !s && n ? [!1, f] : [!0];
|
|
124
124
|
}
|
|
125
125
|
const I = (t) => t.key || "";
|
|
126
|
-
function
|
|
126
|
+
function U(t) {
|
|
127
127
|
const i = [];
|
|
128
|
-
return
|
|
129
|
-
|
|
128
|
+
return Ee.forEach(t, (s) => {
|
|
129
|
+
Ne(s) && i.push(s);
|
|
130
130
|
}), i;
|
|
131
131
|
}
|
|
132
|
-
const
|
|
133
|
-
const [
|
|
134
|
-
|
|
135
|
-
y.current = !1,
|
|
136
|
-
for (let
|
|
137
|
-
const g = I(
|
|
138
|
-
|
|
132
|
+
const He = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presenceAffectsLayout: o = !0, mode: r = "sync", propagate: f = !1, anchorX: x = "left" }) => {
|
|
133
|
+
const [u, h] = Qe(f), d = $(() => U(t), [t]), l = f && !u ? [] : d.map(I), y = N(!0), p = N(d), k = ne(() => /* @__PURE__ */ new Map()), [a, c] = P(d), [m, w] = P(d);
|
|
134
|
+
ze(() => {
|
|
135
|
+
y.current = !1, p.current = d;
|
|
136
|
+
for (let v = 0; v < m.length; v++) {
|
|
137
|
+
const g = I(m[v]);
|
|
138
|
+
l.includes(g) ? k.delete(g) : k.get(g) !== !0 && k.set(g, !1);
|
|
139
139
|
}
|
|
140
|
-
}, [
|
|
140
|
+
}, [m, l.length, l.join("-")]);
|
|
141
141
|
const C = [];
|
|
142
142
|
if (d !== a) {
|
|
143
|
-
let
|
|
144
|
-
for (let g = 0; g <
|
|
145
|
-
const b =
|
|
146
|
-
|
|
143
|
+
let v = [...d];
|
|
144
|
+
for (let g = 0; g < m.length; g++) {
|
|
145
|
+
const b = m[g], z = I(b);
|
|
146
|
+
l.includes(z) || (v.splice(g, 0, b), C.push(b));
|
|
147
147
|
}
|
|
148
|
-
return r === "wait" && C.length && (
|
|
148
|
+
return r === "wait" && C.length && (v = C), w(U(v)), c(d), null;
|
|
149
149
|
}
|
|
150
|
-
process.env.NODE_ENV !== "production" && r === "wait" &&
|
|
151
|
-
const { forceRender:
|
|
152
|
-
return e.jsx(e.Fragment, { children:
|
|
153
|
-
const g = I(
|
|
150
|
+
process.env.NODE_ENV !== "production" && r === "wait" && m.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
151
|
+
const { forceRender: T } = H(Re);
|
|
152
|
+
return e.jsx(e.Fragment, { children: m.map((v) => {
|
|
153
|
+
const g = I(v), b = f && !u ? !1 : d === m || l.includes(g), z = () => {
|
|
154
154
|
if (k.has(g))
|
|
155
155
|
k.set(g, !0);
|
|
156
156
|
else
|
|
157
157
|
return;
|
|
158
|
-
let
|
|
159
|
-
k.forEach((
|
|
160
|
-
|
|
161
|
-
}),
|
|
158
|
+
let _ = !0;
|
|
159
|
+
k.forEach((re) => {
|
|
160
|
+
re || (_ = !1);
|
|
161
|
+
}), _ && (T?.(), w(p.current), f && h?.(), n && n());
|
|
162
162
|
};
|
|
163
|
-
return e.jsx(
|
|
163
|
+
return e.jsx(Fe, { isPresent: b, initial: !y.current || s ? void 0 : !1, custom: i, presenceAffectsLayout: o, mode: r, onExitComplete: b ? void 0 : z, anchorX: x, children: v }, g);
|
|
164
164
|
}) });
|
|
165
|
-
},
|
|
166
|
-
const i =
|
|
165
|
+
}, _e = ({ service: t }) => {
|
|
166
|
+
const i = ge(), s = je(), [n, o] = P(
|
|
167
167
|
null
|
|
168
|
-
), [r,
|
|
168
|
+
), [r, f] = P(""), { data: x, isFetching: u } = Ce({
|
|
169
169
|
queryFn: () => t.getConsumers(i),
|
|
170
170
|
queryKey: ["api-keys"],
|
|
171
171
|
retry: !1
|
|
172
|
-
}),
|
|
172
|
+
}), h = S({
|
|
173
173
|
mutationFn: ({
|
|
174
174
|
consumerId: a,
|
|
175
|
-
keyId:
|
|
175
|
+
keyId: c
|
|
176
176
|
}) => {
|
|
177
177
|
if (!t.deleteKey)
|
|
178
178
|
throw new Error("deleteKey not implemented");
|
|
179
|
-
return t.deleteKey(a,
|
|
179
|
+
return t.deleteKey(a, c, i);
|
|
180
180
|
},
|
|
181
|
-
onMutate: async ({ consumerId: a, keyId:
|
|
181
|
+
onMutate: async ({ consumerId: a, keyId: c }) => {
|
|
182
182
|
await s.cancelQueries({ queryKey: ["api-keys"] });
|
|
183
|
-
const
|
|
183
|
+
const m = s.getQueryData([
|
|
184
184
|
"api-keys"
|
|
185
185
|
]);
|
|
186
|
-
return s.setQueryData(["api-keys"], (
|
|
186
|
+
return s.setQueryData(["api-keys"], (w) => w && w.map((C) => C.id === a ? {
|
|
187
187
|
...C,
|
|
188
|
-
apiKeys: C.apiKeys.filter((
|
|
189
|
-
} : C)), { previousData:
|
|
188
|
+
apiKeys: C.apiKeys.filter((T) => T.id !== c)
|
|
189
|
+
} : C)), { previousData: m };
|
|
190
190
|
},
|
|
191
|
-
onError: (a,
|
|
192
|
-
|
|
191
|
+
onError: (a, c, m) => {
|
|
192
|
+
m?.previousData && s.setQueryData(["api-keys"], m.previousData);
|
|
193
193
|
},
|
|
194
194
|
onSuccess: () => {
|
|
195
195
|
s.invalidateQueries({ queryKey: ["api-keys"] });
|
|
196
196
|
}
|
|
197
|
-
}), d =
|
|
197
|
+
}), d = S({
|
|
198
198
|
mutationFn: ({
|
|
199
199
|
consumerId: a,
|
|
200
|
-
label:
|
|
200
|
+
label: c
|
|
201
201
|
}) => {
|
|
202
202
|
if (!t.updateConsumer)
|
|
203
203
|
throw new Error("updateConsumer not implemented");
|
|
204
|
-
return t.updateConsumer({ id: a, label:
|
|
204
|
+
return t.updateConsumer({ id: a, label: c }, i);
|
|
205
205
|
},
|
|
206
|
-
onMutate: async ({ consumerId: a, label:
|
|
206
|
+
onMutate: async ({ consumerId: a, label: c }) => {
|
|
207
207
|
await s.cancelQueries({ queryKey: ["api-keys"] });
|
|
208
|
-
const
|
|
209
|
-
return s.setQueryData(["api-keys"], (
|
|
208
|
+
const m = s.getQueryData(["api-keys"]);
|
|
209
|
+
return s.setQueryData(["api-keys"], (w) => w && w.map((C) => C.id === a ? {
|
|
210
210
|
...C,
|
|
211
|
-
label:
|
|
212
|
-
} : C)), { previousData:
|
|
211
|
+
label: c
|
|
212
|
+
} : C)), { previousData: m };
|
|
213
213
|
},
|
|
214
|
-
onError: (a,
|
|
215
|
-
|
|
214
|
+
onError: (a, c, m) => {
|
|
215
|
+
m?.previousData && s.setQueryData(["api-keys"], m.previousData);
|
|
216
216
|
},
|
|
217
217
|
onSuccess: () => {
|
|
218
218
|
s.invalidateQueries({ queryKey: ["api-keys"] });
|
|
219
219
|
}
|
|
220
|
-
}),
|
|
220
|
+
}), l = S({
|
|
221
221
|
mutationFn: (a) => {
|
|
222
222
|
if (!t.rollKey)
|
|
223
223
|
throw new Error("rollKey not implemented");
|
|
224
224
|
return t.rollKey(a, i);
|
|
225
225
|
},
|
|
226
226
|
onSuccess: () => s.invalidateQueries({ queryKey: ["api-keys"] })
|
|
227
|
-
}), y = (a,
|
|
228
|
-
o(a),
|
|
229
|
-
},
|
|
227
|
+
}), y = (a, c) => {
|
|
228
|
+
o(a), f(c);
|
|
229
|
+
}, p = (a) => {
|
|
230
230
|
r.trim() && d.mutate({
|
|
231
231
|
consumerId: a,
|
|
232
232
|
label: r.trim()
|
|
233
|
-
}), o(null),
|
|
233
|
+
}), o(null), f("");
|
|
234
234
|
}, k = () => {
|
|
235
|
-
o(null),
|
|
235
|
+
o(null), f("");
|
|
236
236
|
};
|
|
237
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-
|
|
238
|
-
/* @__PURE__ */ e.jsx(
|
|
237
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-md h-full pt-(--padding-content-top) pb-(--padding-content-bottom)", children: [
|
|
238
|
+
/* @__PURE__ */ e.jsx(B.Target, { name: "api-keys-list-page" }),
|
|
239
239
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between pb-3", children: [
|
|
240
240
|
/* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "API Keys" }),
|
|
241
|
-
t.createKey && /* @__PURE__ */ e.jsx(j, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
241
|
+
t.createKey && /* @__PURE__ */ e.jsx(j, { asChild: !0, children: /* @__PURE__ */ e.jsx(J, { to: "/settings/api-keys/new", children: "Create API Key" }) })
|
|
242
242
|
] }),
|
|
243
243
|
/* @__PURE__ */ e.jsx("p", { children: "Create, manage, and monitor your API keys" }),
|
|
244
|
-
/* @__PURE__ */ e.jsx(
|
|
244
|
+
/* @__PURE__ */ e.jsx(B.Target, { name: "api-keys-list-page-before-keys" }),
|
|
245
245
|
/* @__PURE__ */ e.jsx("div", { className: "h-8" }),
|
|
246
|
-
/* @__PURE__ */ e.
|
|
246
|
+
l.isError && /* @__PURE__ */ e.jsxs(q, { variant: "destructive", className: "mb-4", children: [
|
|
247
|
+
/* @__PURE__ */ e.jsx(M, { size: 16 }),
|
|
248
|
+
/* @__PURE__ */ e.jsx(L, { children: l.error.message })
|
|
249
|
+
] }),
|
|
250
|
+
d.isError && /* @__PURE__ */ e.jsxs(q, { variant: "destructive", className: "mb-4", children: [
|
|
251
|
+
/* @__PURE__ */ e.jsx(M, { size: 16 }),
|
|
252
|
+
/* @__PURE__ */ e.jsx(L, { children: d.error.message })
|
|
253
|
+
] }),
|
|
254
|
+
h.isError && /* @__PURE__ */ e.jsxs(q, { variant: "destructive", className: "mb-4", children: [
|
|
255
|
+
/* @__PURE__ */ e.jsx(M, { size: 16 }),
|
|
256
|
+
/* @__PURE__ */ e.jsx(L, { children: h.error.message })
|
|
257
|
+
] }),
|
|
258
|
+
/* @__PURE__ */ e.jsx("div", { className: "", children: x.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "flex col-span-full flex-col justify-center gap-4 items-center p-8 border rounded-sm bg-muted/30 text-muted-foreground", children: [
|
|
247
259
|
/* @__PURE__ */ e.jsxs("p", { className: "text-center", children: [
|
|
248
260
|
"You have no API keys yet.",
|
|
249
261
|
/* @__PURE__ */ e.jsx("br", {}),
|
|
250
262
|
t.createKey && "Get started and create your first key."
|
|
251
263
|
] }),
|
|
252
|
-
t.createKey && /* @__PURE__ */ e.jsx(j, { asChild: !0, variant: "outline", children: /* @__PURE__ */ e.jsx(
|
|
264
|
+
t.createKey && /* @__PURE__ */ e.jsx(j, { asChild: !0, variant: "outline", children: /* @__PURE__ */ e.jsx(J, { to: "/settings/api-keys/new", children: "Create API Key" }) })
|
|
253
265
|
] }) : /* @__PURE__ */ e.jsx(
|
|
254
266
|
"ul",
|
|
255
267
|
{
|
|
256
|
-
className:
|
|
257
|
-
"grid grid-cols-
|
|
258
|
-
"lg:grid-cols-[1fr_min-content]"
|
|
268
|
+
className: E(
|
|
269
|
+
"grid grid-cols-[1fr_min-content] divide-y divide-border col-span-6"
|
|
259
270
|
),
|
|
260
|
-
children:
|
|
261
|
-
|
|
271
|
+
children: x.map((a) => /* @__PURE__ */ e.jsxs(
|
|
272
|
+
Pe,
|
|
262
273
|
{
|
|
263
274
|
className: "grid grid-cols-subgrid col-span-full items-center mb-4 group",
|
|
264
275
|
children: [
|
|
265
|
-
/* @__PURE__ */ e.jsxs(
|
|
276
|
+
/* @__PURE__ */ e.jsxs(De, { className: "border-b col-span-full grid-cols-subgrid grid", children: [
|
|
266
277
|
/* @__PURE__ */ e.jsxs("div", { className: "h-10 flex flex-col text-sm justify-center", children: [
|
|
267
278
|
/* @__PURE__ */ e.jsxs("div", { className: "font-medium text-lg flex items-center gap-2", children: [
|
|
268
279
|
n === a.id ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
269
280
|
/* @__PURE__ */ e.jsx(
|
|
270
|
-
|
|
281
|
+
Ie,
|
|
271
282
|
{
|
|
272
283
|
maxLength: 32,
|
|
273
284
|
value: r,
|
|
274
|
-
onChange: (
|
|
275
|
-
onKeyDown: (
|
|
276
|
-
|
|
285
|
+
onChange: (c) => f(c.target.value),
|
|
286
|
+
onKeyDown: (c) => {
|
|
287
|
+
c.key === "Enter" ? p(a.id) : c.key === "Escape" && k();
|
|
277
288
|
},
|
|
278
289
|
className: "text-lg font-medium",
|
|
279
290
|
autoFocus: !0
|
|
@@ -285,9 +296,9 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
285
296
|
{
|
|
286
297
|
size: "icon",
|
|
287
298
|
variant: "ghost",
|
|
288
|
-
onClick: () =>
|
|
299
|
+
onClick: () => p(a.id),
|
|
289
300
|
disabled: !r.trim(),
|
|
290
|
-
children: /* @__PURE__ */ e.jsx(
|
|
301
|
+
children: /* @__PURE__ */ e.jsx(W, { size: 16 })
|
|
291
302
|
}
|
|
292
303
|
),
|
|
293
304
|
/* @__PURE__ */ e.jsx(
|
|
@@ -296,7 +307,7 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
296
307
|
size: "icon",
|
|
297
308
|
variant: "ghost",
|
|
298
309
|
onClick: k,
|
|
299
|
-
children: /* @__PURE__ */ e.jsx(
|
|
310
|
+
children: /* @__PURE__ */ e.jsx(ae, { size: 16 })
|
|
300
311
|
}
|
|
301
312
|
)
|
|
302
313
|
] })
|
|
@@ -317,43 +328,54 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
317
328
|
] })
|
|
318
329
|
] }),
|
|
319
330
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-end", children: [
|
|
320
|
-
t.updateConsumer && /* @__PURE__ */ e.
|
|
331
|
+
t.updateConsumer && /* @__PURE__ */ e.jsxs(
|
|
321
332
|
j,
|
|
322
333
|
{
|
|
323
|
-
size: "icon",
|
|
324
334
|
variant: "ghost",
|
|
325
335
|
onClick: () => y(a.id, a.label),
|
|
326
|
-
className:
|
|
336
|
+
className: E(
|
|
337
|
+
"flex gap-2",
|
|
327
338
|
n === a.id && "opacity-0! pointer-events-none"
|
|
328
339
|
),
|
|
329
340
|
disabled: n === a.id,
|
|
330
|
-
children:
|
|
341
|
+
children: [
|
|
342
|
+
/* @__PURE__ */ e.jsx(oe, { size: 16 }),
|
|
343
|
+
/* @__PURE__ */ e.jsx("span", { className: "hidden md:block", children: "Edit label" })
|
|
344
|
+
]
|
|
331
345
|
}
|
|
332
346
|
),
|
|
333
|
-
t.rollKey && /* @__PURE__ */ e.jsxs(
|
|
334
|
-
/* @__PURE__ */ e.jsx(
|
|
347
|
+
t.rollKey && /* @__PURE__ */ e.jsxs(Y, { children: [
|
|
348
|
+
/* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
335
349
|
j,
|
|
336
350
|
{
|
|
337
|
-
size: "icon",
|
|
338
351
|
title: "Roll this key",
|
|
339
352
|
variant: "ghost",
|
|
340
|
-
disabled:
|
|
341
|
-
className:
|
|
342
|
-
children:
|
|
353
|
+
disabled: l.isPending,
|
|
354
|
+
className: "flex items-center gap-2",
|
|
355
|
+
children: [
|
|
356
|
+
/* @__PURE__ */ e.jsx(
|
|
357
|
+
le,
|
|
358
|
+
{
|
|
359
|
+
size: 16,
|
|
360
|
+
className: l.isPending ? "animate-spin" : void 0
|
|
361
|
+
}
|
|
362
|
+
),
|
|
363
|
+
/* @__PURE__ */ e.jsx("span", { className: "hidden md:block", children: "Roll key" })
|
|
364
|
+
]
|
|
343
365
|
}
|
|
344
366
|
) }),
|
|
345
|
-
/* @__PURE__ */ e.jsxs(
|
|
346
|
-
/* @__PURE__ */ e.jsxs(
|
|
347
|
-
/* @__PURE__ */ e.jsx(
|
|
348
|
-
/* @__PURE__ */ e.jsx(
|
|
367
|
+
/* @__PURE__ */ e.jsxs(V, { children: [
|
|
368
|
+
/* @__PURE__ */ e.jsxs(Z, { children: [
|
|
369
|
+
/* @__PURE__ */ e.jsx(ee, { children: "Roll API Key" }),
|
|
370
|
+
/* @__PURE__ */ e.jsx(te, { children: "Are you sure you want to roll this API key?" })
|
|
349
371
|
] }),
|
|
350
|
-
/* @__PURE__ */ e.jsxs(
|
|
351
|
-
/* @__PURE__ */ e.jsx(
|
|
352
|
-
/* @__PURE__ */ e.jsx(
|
|
372
|
+
/* @__PURE__ */ e.jsxs(se, { children: [
|
|
373
|
+
/* @__PURE__ */ e.jsx(R, { asChild: !0, children: /* @__PURE__ */ e.jsx(j, { variant: "outline", children: "Cancel" }) }),
|
|
374
|
+
/* @__PURE__ */ e.jsx(R, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
353
375
|
j,
|
|
354
376
|
{
|
|
355
377
|
onClick: () => {
|
|
356
|
-
|
|
378
|
+
l.mutate(a.id);
|
|
357
379
|
},
|
|
358
380
|
children: "Roll Key"
|
|
359
381
|
}
|
|
@@ -363,22 +385,22 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
363
385
|
] })
|
|
364
386
|
] })
|
|
365
387
|
] }),
|
|
366
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(
|
|
388
|
+
/* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(He, { children: a.apiKeys.map((c) => /* @__PURE__ */ e.jsxs(we.Fragment, { children: [
|
|
367
389
|
/* @__PURE__ */ e.jsx(
|
|
368
|
-
|
|
390
|
+
Je,
|
|
369
391
|
{
|
|
370
|
-
apiKey:
|
|
392
|
+
apiKey: c,
|
|
371
393
|
onDeleteKey: () => {
|
|
372
|
-
|
|
394
|
+
h.mutate({
|
|
373
395
|
consumerId: a.id,
|
|
374
|
-
keyId:
|
|
396
|
+
keyId: c.id
|
|
375
397
|
});
|
|
376
398
|
},
|
|
377
|
-
className:
|
|
399
|
+
className: h.variables?.keyId === c.id && (h.isPending || u) ? "opacity-10!" : void 0
|
|
378
400
|
}
|
|
379
401
|
),
|
|
380
402
|
/* @__PURE__ */ e.jsx("div", { className: "col-span-full h-px bg-border" })
|
|
381
|
-
] },
|
|
403
|
+
] }, c.id)) }) })
|
|
382
404
|
]
|
|
383
405
|
},
|
|
384
406
|
a.id
|
|
@@ -386,89 +408,94 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
386
408
|
}
|
|
387
409
|
) })
|
|
388
410
|
] });
|
|
389
|
-
},
|
|
411
|
+
}, Be = (t) => {
|
|
390
412
|
const i = /* @__PURE__ */ new Date(), s = new Date(t), n = Math.floor((i.getTime() - s.getTime()) / 1e3), o = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
|
|
391
413
|
return n < 60 ? o.format(-n, "second") : n < 3600 ? o.format(-Math.floor(n / 60), "minute") : n < 86400 ? o.format(-Math.floor(n / 3600), "hour") : n < 2592e3 ? o.format(-Math.floor(n / 86400), "day") : n < 31536e3 ? o.format(-Math.floor(n / 2592e3), "month") : o.format(-Math.floor(n / 31536e3), "year");
|
|
392
|
-
},
|
|
414
|
+
}, Je = ({
|
|
393
415
|
apiKey: t,
|
|
394
416
|
onDeleteKey: i,
|
|
395
417
|
className: s
|
|
396
418
|
}) => {
|
|
397
|
-
const [n, o] =
|
|
398
|
-
(new Date(
|
|
399
|
-
) : 1 / 0, y =
|
|
400
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
419
|
+
const [n, o] = P(!1), [r, f] = Ke(), { key: x, createdOn: u, expiresOn: h } = t, d = h && new Date(h) < /* @__PURE__ */ new Date(), l = h ? Math.ceil(
|
|
420
|
+
(new Date(h).getTime() - (/* @__PURE__ */ new Date()).getTime()) / (1e3 * 60 * 60 * 24)
|
|
421
|
+
) : 1 / 0, y = l <= 7 && !d;
|
|
422
|
+
return /* @__PURE__ */ e.jsxs("div", { className: E("grid col-span-full grid-cols-subgrid p-6", s), children: [
|
|
401
423
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
402
|
-
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center text-sm border rounded-md w-fit px-1", children: [
|
|
403
|
-
/* @__PURE__ */ e.jsxs("div", { className: "font-mono
|
|
424
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 items-center text-sm border rounded-md w-full max-w-fit px-1", children: [
|
|
425
|
+
/* @__PURE__ */ e.jsxs("div", { className: "font-mono w-full h-9 items-center flex px-2 text-xs gap-2", children: [
|
|
404
426
|
/* @__PURE__ */ e.jsx(
|
|
405
427
|
"div",
|
|
406
428
|
{
|
|
407
|
-
className:
|
|
429
|
+
className: E(
|
|
408
430
|
"rounded-full w-2 h-2 bg-emerald-400 mr-2",
|
|
409
431
|
(y || d) && "bg-neutral-200"
|
|
410
432
|
)
|
|
411
433
|
}
|
|
412
434
|
),
|
|
413
|
-
/* @__PURE__ */ e.jsxs("span", { children: [
|
|
414
|
-
/* @__PURE__ */ e.jsx(
|
|
415
|
-
|
|
435
|
+
/* @__PURE__ */ e.jsxs("span", { className: "w-full truncate", children: [
|
|
436
|
+
/* @__PURE__ */ e.jsx(
|
|
437
|
+
"div",
|
|
438
|
+
{
|
|
439
|
+
className: E(
|
|
440
|
+
"w-40 inline-block md:w-full truncate",
|
|
441
|
+
n ? "" : "opacity-20"
|
|
442
|
+
),
|
|
443
|
+
children: n ? x.slice(0, -5) : "**** ".repeat(x.slice(0, -5).length / 5) + "*".repeat(x.slice(0, -5).length % 5)
|
|
444
|
+
}
|
|
445
|
+
),
|
|
446
|
+
/* @__PURE__ */ e.jsx("span", { children: x.slice(-5) })
|
|
416
447
|
] })
|
|
417
448
|
] }),
|
|
418
449
|
/* @__PURE__ */ e.jsx(
|
|
419
450
|
j,
|
|
420
451
|
{
|
|
421
452
|
variant: "ghost",
|
|
422
|
-
onClick: () => o((
|
|
453
|
+
onClick: () => o((p) => !p),
|
|
423
454
|
size: "icon",
|
|
424
|
-
children: n ? /* @__PURE__ */ e.jsx(
|
|
455
|
+
children: n ? /* @__PURE__ */ e.jsx(ce, { size: 16 }) : /* @__PURE__ */ e.jsx(de, { size: 16 })
|
|
425
456
|
}
|
|
426
457
|
),
|
|
427
458
|
/* @__PURE__ */ e.jsx(
|
|
428
459
|
j,
|
|
429
460
|
{
|
|
430
461
|
variant: "ghost",
|
|
431
|
-
onClick: () =>
|
|
432
|
-
navigator.clipboard.writeText(m).then(() => {
|
|
433
|
-
u(!0), setTimeout(() => u(!1), 2e3);
|
|
434
|
-
});
|
|
435
|
-
},
|
|
462
|
+
onClick: () => f(x),
|
|
436
463
|
size: "icon",
|
|
437
|
-
children: r ? /* @__PURE__ */ e.jsx(
|
|
464
|
+
children: r ? /* @__PURE__ */ e.jsx(W, { size: 16 }) : /* @__PURE__ */ e.jsx(ue, { size: 16 })
|
|
438
465
|
}
|
|
439
466
|
)
|
|
440
467
|
] }),
|
|
441
468
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 mt-0.5 text-nowrap", children: [
|
|
442
|
-
|
|
469
|
+
u && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
443
470
|
"Created ",
|
|
444
|
-
|
|
471
|
+
Be(u),
|
|
445
472
|
"."
|
|
446
473
|
] }),
|
|
447
474
|
" ",
|
|
448
|
-
|
|
475
|
+
h && y && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
|
|
449
476
|
"Expires in ",
|
|
450
|
-
|
|
477
|
+
l,
|
|
451
478
|
" ",
|
|
452
|
-
|
|
479
|
+
l === 1 ? "day" : "days",
|
|
453
480
|
"."
|
|
454
481
|
] }),
|
|
455
|
-
|
|
482
|
+
h && d && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
|
|
456
483
|
"Expired",
|
|
457
484
|
" ",
|
|
458
|
-
|
|
485
|
+
l === 0 ? "today." : `${l * -1} days ago.`
|
|
459
486
|
] })
|
|
460
487
|
] })
|
|
461
488
|
] }),
|
|
462
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children:
|
|
463
|
-
/* @__PURE__ */ e.jsx(
|
|
464
|
-
/* @__PURE__ */ e.jsxs(
|
|
465
|
-
/* @__PURE__ */ e.jsxs(
|
|
466
|
-
/* @__PURE__ */ e.jsx(
|
|
467
|
-
/* @__PURE__ */ e.jsx(
|
|
489
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: h && i && /* @__PURE__ */ e.jsxs(Y, { children: [
|
|
490
|
+
/* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsx(j, { variant: "ghost", size: "icon", children: /* @__PURE__ */ e.jsx(he, { size: 16 }) }) }),
|
|
491
|
+
/* @__PURE__ */ e.jsxs(V, { children: [
|
|
492
|
+
/* @__PURE__ */ e.jsxs(Z, { children: [
|
|
493
|
+
/* @__PURE__ */ e.jsx(ee, { children: "Delete API Key" }),
|
|
494
|
+
/* @__PURE__ */ e.jsx(te, { children: "Are you sure you want to delete this API key?" })
|
|
468
495
|
] }),
|
|
469
|
-
/* @__PURE__ */ e.jsxs(
|
|
470
|
-
/* @__PURE__ */ e.jsx(
|
|
471
|
-
/* @__PURE__ */ e.jsx(
|
|
496
|
+
/* @__PURE__ */ e.jsxs(se, { children: [
|
|
497
|
+
/* @__PURE__ */ e.jsx(R, { asChild: !0, children: /* @__PURE__ */ e.jsx(j, { variant: "outline", children: "Cancel" }) }),
|
|
498
|
+
/* @__PURE__ */ e.jsx(R, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
472
499
|
j,
|
|
473
500
|
{
|
|
474
501
|
onClick: () => {
|
|
@@ -481,23 +508,36 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
481
508
|
] })
|
|
482
509
|
] }) })
|
|
483
510
|
] });
|
|
484
|
-
},
|
|
511
|
+
}, K = "https://api.zuploedge.com/v2/client", Ue = async (t) => {
|
|
512
|
+
try {
|
|
513
|
+
return await t.json();
|
|
514
|
+
} catch {
|
|
515
|
+
return;
|
|
516
|
+
}
|
|
517
|
+
}, A = async (t) => {
|
|
518
|
+
const i = t.headers.get("content-type");
|
|
519
|
+
if (!t.ok && i?.includes("application/problem+json")) {
|
|
520
|
+
const s = await Ue(t);
|
|
521
|
+
if (s.type && s.title)
|
|
522
|
+
throw new Error(s.detail ?? s.title);
|
|
523
|
+
}
|
|
524
|
+
}, We = (t) => ({
|
|
485
525
|
deleteKey: async (i, s, n) => {
|
|
486
526
|
const o = new Request(
|
|
487
|
-
|
|
527
|
+
K + `/${t}/consumers/${i}/keys/${s}`,
|
|
488
528
|
{
|
|
489
529
|
method: "DELETE"
|
|
490
530
|
}
|
|
491
531
|
);
|
|
492
532
|
await n.signRequest(o);
|
|
493
533
|
const r = await fetch(o);
|
|
494
|
-
|
|
534
|
+
await A(r), D(r.ok, "Failed to delete API key");
|
|
495
535
|
},
|
|
496
536
|
updateConsumer: async (i, s) => {
|
|
497
537
|
const n = await fetch(
|
|
498
538
|
await s.signRequest(
|
|
499
539
|
new Request(
|
|
500
|
-
|
|
540
|
+
K + `/${t}/consumers/${i.id}`,
|
|
501
541
|
{
|
|
502
542
|
method: "PATCH",
|
|
503
543
|
headers: {
|
|
@@ -510,13 +550,13 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
510
550
|
)
|
|
511
551
|
)
|
|
512
552
|
);
|
|
513
|
-
|
|
553
|
+
await A(n), D(n.ok, "Failed to update API key description");
|
|
514
554
|
},
|
|
515
555
|
rollKey: async (i, s) => {
|
|
516
556
|
const n = await fetch(
|
|
517
557
|
await s.signRequest(
|
|
518
558
|
new Request(
|
|
519
|
-
|
|
559
|
+
K + `/${t}/consumers/${i}/roll-key`,
|
|
520
560
|
{
|
|
521
561
|
method: "POST",
|
|
522
562
|
headers: {
|
|
@@ -527,30 +567,30 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
527
567
|
)
|
|
528
568
|
)
|
|
529
569
|
);
|
|
530
|
-
|
|
570
|
+
await A(n), D(n.ok, "Failed to delete API key");
|
|
531
571
|
},
|
|
532
572
|
getConsumers: async (i) => {
|
|
533
573
|
const s = new Request(
|
|
534
|
-
|
|
574
|
+
K + `/${t}/consumers`
|
|
535
575
|
);
|
|
536
576
|
await i.signRequest(s);
|
|
537
577
|
const n = await fetch(s);
|
|
538
|
-
return
|
|
578
|
+
return await A(n), D(n.ok, "Failed to fetch API keys"), (await n.json()).data.map((r) => ({
|
|
539
579
|
id: r.id,
|
|
540
|
-
label: r.label || "API Key",
|
|
580
|
+
label: r.label || r.subject || "API Key",
|
|
541
581
|
apiKeys: r.apiKeys.data,
|
|
542
582
|
key: r.apiKeys.data.at(0)
|
|
543
583
|
}));
|
|
544
584
|
}
|
|
545
|
-
}),
|
|
546
|
-
const i = "deploymentName" in t ?
|
|
585
|
+
}), ct = (t) => t, dt = (t) => {
|
|
586
|
+
const i = "deploymentName" in t ? We(t.deploymentName) : t;
|
|
547
587
|
return {
|
|
548
588
|
getProfileMenuItems: () => [
|
|
549
589
|
{
|
|
550
590
|
label: "API Keys",
|
|
551
591
|
path: "/settings/api-keys",
|
|
552
592
|
category: "middle",
|
|
553
|
-
icon:
|
|
593
|
+
icon: fe
|
|
554
594
|
}
|
|
555
595
|
],
|
|
556
596
|
getIdentities: async (s) => {
|
|
@@ -561,7 +601,7 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
561
601
|
`Bearer ${o.apiKeys.at(0)?.key}`
|
|
562
602
|
), r),
|
|
563
603
|
id: o.id,
|
|
564
|
-
label: o.
|
|
604
|
+
label: o.label
|
|
565
605
|
}));
|
|
566
606
|
} catch {
|
|
567
607
|
return [];
|
|
@@ -569,12 +609,12 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
569
609
|
},
|
|
570
610
|
getRoutes: () => [
|
|
571
611
|
{
|
|
572
|
-
element: /* @__PURE__ */ e.jsx(
|
|
573
|
-
errorElement: /* @__PURE__ */ e.jsx(
|
|
612
|
+
element: /* @__PURE__ */ e.jsx(Ae, {}),
|
|
613
|
+
errorElement: /* @__PURE__ */ e.jsx(me, {}),
|
|
574
614
|
children: [
|
|
575
615
|
{
|
|
576
616
|
path: "/settings/api-keys",
|
|
577
|
-
element: /* @__PURE__ */ e.jsx(
|
|
617
|
+
element: /* @__PURE__ */ e.jsx(_e, { service: i })
|
|
578
618
|
}
|
|
579
619
|
// {
|
|
580
620
|
// path: "/settings/api-keys/new",
|
|
@@ -586,7 +626,7 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
586
626
|
};
|
|
587
627
|
};
|
|
588
628
|
export {
|
|
589
|
-
|
|
590
|
-
|
|
629
|
+
dt as apiKeyPlugin,
|
|
630
|
+
ct as createApiKeyService
|
|
591
631
|
};
|
|
592
632
|
//# sourceMappingURL=zudoku.plugin-api-keys.js.map
|