zudoku 0.0.0-fix-downgrade-openapi-parser.aac00796 → 0.0.0-fix-firebase-export.2e421fda
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/dist/app/main.d.ts +91 -1
- package/dist/app/main.js +5 -1
- package/dist/app/main.js.map +1 -1
- package/dist/app/sentry.js +1 -1
- package/dist/config/config.d.ts +15 -46
- package/dist/config/validators/BuildSchema.js +18 -3
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +61 -61
- package/dist/config/validators/NavigationSchema.js +2 -4
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +203 -5
- package/dist/config/validators/validate.js +44 -1
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +43 -0
- package/dist/config/validators/validate.test.js.map +1 -1
- package/dist/flat-config.d.ts +31 -2
- package/dist/lib/auth/issuer.js +3 -0
- package/dist/lib/auth/issuer.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +1 -1
- package/dist/lib/authentication/providers/auth0.js +6 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/firebase.d.ts +4 -0
- package/dist/lib/authentication/providers/firebase.js +215 -0
- package/dist/lib/authentication/providers/firebase.js.map +1 -0
- package/dist/lib/authentication/providers/supabase.js +1 -6
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/authentication/ui/ZudokuAuthUi.d.ts +24 -0
- package/dist/lib/authentication/ui/ZudokuAuthUi.js +124 -0
- package/dist/lib/authentication/ui/ZudokuAuthUi.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Apple.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Apple.js +4 -0
- package/dist/lib/authentication/ui/icons/Apple.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Facebook.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Facebook.js +4 -0
- package/dist/lib/authentication/ui/icons/Facebook.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Github.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Github.js +4 -0
- package/dist/lib/authentication/ui/icons/Github.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Google.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Google.js +4 -0
- package/dist/lib/authentication/ui/icons/Google.js.map +1 -0
- package/dist/lib/authentication/ui/icons/Microsoft.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/Microsoft.js +4 -0
- package/dist/lib/authentication/ui/icons/Microsoft.js.map +1 -0
- package/dist/lib/authentication/ui/icons/X.d.ts +3 -0
- package/dist/lib/authentication/ui/icons/X.js +4 -0
- package/dist/lib/authentication/ui/icons/X.js.map +1 -0
- package/dist/lib/components/Autocomplete.d.ts +3 -1
- package/dist/lib/components/Autocomplete.js +6 -2
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/Layout.js +3 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Mermaid.d.ts +7 -0
- package/dist/lib/components/Mermaid.js +42 -0
- package/dist/lib/components/Mermaid.js.map +1 -0
- package/dist/lib/components/PagefindSearchMeta.d.ts +8 -0
- package/dist/lib/components/PagefindSearchMeta.js +7 -0
- package/dist/lib/components/PagefindSearchMeta.js.map +1 -0
- package/dist/lib/components/Zudoku.js +2 -5
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +2 -2
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/core/RouteGuard.js +7 -7
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +3 -3
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/errors/RouterError.d.ts +3 -1
- package/dist/lib/errors/RouterError.js +3 -2
- package/dist/lib/errors/RouterError.js.map +1 -1
- package/dist/lib/oas/parser/index.d.ts +1 -0
- package/dist/lib/oas/parser/index.js +7 -3
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js +4 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.d.ts +1 -0
- package/dist/lib/plugins/openapi/CollapsibleCode.js +2 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js.map +1 -1
- package/dist/lib/plugins/openapi/DownloadSchemaButton.d.ts +3 -0
- package/dist/lib/plugins/openapi/DownloadSchemaButton.js +47 -0
- package/dist/lib/plugins/openapi/DownloadSchemaButton.js.map +1 -0
- package/dist/lib/plugins/openapi/Endpoint.js +3 -6
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.d.ts +5 -0
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js +10 -0
- package/dist/lib/plugins/openapi/GeneratedExampleSidecarBox.js.map +1 -0
- package/dist/lib/plugins/openapi/OasProvider.js +22 -13
- package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +16 -6
- 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 +4 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +7 -4
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +17 -6
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +9 -2
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js +5 -2
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +4 -2
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +26 -4
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +2 -1
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.d.ts +2 -2
- package/dist/lib/plugins/openapi/Sidecar.js +61 -26
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarBox.js +4 -4
- package/dist/lib/plugins/openapi/SidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.d.ts +9 -2
- package/dist/lib/plugins/openapi/SidecarExamples.js +24 -43
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.js +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
- package/dist/lib/plugins/openapi/components/NonHighlightedCode.d.ts +4 -0
- package/dist/lib/plugins/openapi/components/NonHighlightedCode.js +5 -0
- package/dist/lib/plugins/openapi/components/NonHighlightedCode.js.map +1 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.js +5 -6
- package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +11 -5
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +29 -13
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +67 -15
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +2 -2
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +23 -83
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +10 -2
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +8 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +2 -3
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +58 -26
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -2
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +16 -40
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js +19 -0
- package/dist/lib/plugins/openapi/playground/request-panel/MultipartField.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js +540 -0
- package/dist/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.d.ts +40 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js +205 -0
- package/dist/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +2 -2
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +17 -8
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +31 -16
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/UnionView.js +2 -5
- package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/union-helpers.js +0 -1
- package/dist/lib/plugins/openapi/schema/union-helpers.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +2 -2
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +9 -11
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.d.ts +6 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js +29 -2
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/IndexingDialog.d.ts +3 -0
- package/dist/lib/plugins/search-pagefind/IndexingDialog.js +64 -0
- package/dist/lib/plugins/search-pagefind/IndexingDialog.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +22 -5
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +5 -4
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/shiki.d.ts +1 -1
- package/dist/lib/shiki.js +18 -12
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +3 -3
- package/dist/lib/ui/Badge.js +9 -7
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/Button.js +9 -7
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/ButtonGroup.d.ts +11 -0
- package/dist/lib/ui/ButtonGroup.js +28 -0
- package/dist/lib/ui/ButtonGroup.js.map +1 -0
- package/dist/lib/ui/Checkbox.d.ts +2 -2
- package/dist/lib/ui/Checkbox.js +4 -4
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/CodeBlock.d.ts +0 -1
- package/dist/lib/ui/CodeBlock.js +1 -1
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Collapsible.d.ts +4 -4
- package/dist/lib/ui/Collapsible.js +11 -4
- package/dist/lib/ui/Collapsible.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +3 -3
- package/dist/lib/ui/Command.js +2 -2
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/DropdownMenu.d.ts +21 -23
- package/dist/lib/ui/DropdownMenu.js +47 -32
- package/dist/lib/ui/DropdownMenu.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.d.ts +0 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +3 -2
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/Frame.d.ts +8 -0
- package/dist/lib/ui/Frame.js +22 -0
- package/dist/lib/ui/Frame.js.map +1 -0
- package/dist/lib/ui/Item.d.ts +23 -0
- package/dist/lib/ui/Item.js +67 -0
- package/dist/lib/ui/Item.js.map +1 -0
- package/dist/lib/ui/Kbd.d.ts +3 -0
- package/dist/lib/ui/Kbd.js +10 -0
- package/dist/lib/ui/Kbd.js.map +1 -0
- package/dist/lib/ui/NativeSelect.d.ts +5 -0
- package/dist/lib/ui/NativeSelect.js +14 -0
- package/dist/lib/ui/NativeSelect.js.map +1 -0
- package/dist/lib/ui/Select.d.ts +13 -11
- package/dist/lib/ui/Select.js +34 -23
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/Separator.d.ts +4 -0
- package/dist/lib/ui/Separator.js +8 -0
- package/dist/lib/ui/Separator.js.map +1 -0
- package/dist/lib/ui/Tooltip.d.ts +7 -7
- package/dist/lib/ui/Tooltip.js +16 -10
- package/dist/lib/ui/Tooltip.js.map +1 -1
- package/dist/lib/util/MdxComponents.d.ts +1 -0
- package/dist/lib/util/MdxComponents.js +2 -0
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/createVariantComponent.d.ts +5 -2
- package/dist/lib/util/createVariantComponent.js +5 -2
- package/dist/lib/util/createVariantComponent.js.map +1 -1
- package/dist/lib/util/flattenAllOf.d.ts +4 -0
- package/dist/lib/util/flattenAllOf.js +88 -0
- package/dist/lib/util/flattenAllOf.js.map +1 -0
- package/dist/lib/util/flattenAllOf.test.d.ts +1 -0
- package/dist/lib/util/flattenAllOf.test.js +587 -0
- package/dist/lib/util/flattenAllOf.test.js.map +1 -0
- package/dist/lib/util/readFrontmatter.d.ts +6 -0
- package/dist/lib/util/readFrontmatter.js +12 -0
- package/dist/lib/util/readFrontmatter.js.map +1 -0
- package/dist/vite/api/SchemaManager.d.ts +5 -0
- package/dist/vite/api/SchemaManager.js +30 -18
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/SchemaManager.test.js +67 -0
- package/dist/vite/api/SchemaManager.test.js.map +1 -1
- package/dist/vite/config.js +8 -2
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.js +25 -0
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/mdx/remark-last-modified.js +57 -3
- package/dist/vite/mdx/remark-last-modified.js.map +1 -1
- package/dist/vite/pagefind-dev-index.d.ts +16 -0
- package/dist/vite/pagefind-dev-index.js +68 -0
- package/dist/vite/pagefind-dev-index.js.map +1 -0
- package/dist/vite/plugin-api.js +41 -3
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-frontmatter.js +3 -5
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-markdown-export.js +3 -4
- package/dist/vite/plugin-markdown-export.js.map +1 -1
- package/dist/vite/plugin-theme.js +10 -1
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/prerender/prerender.js +1 -19
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/prerender/utils.d.ts +2 -0
- package/dist/vite/prerender/utils.js +24 -0
- package/dist/vite/prerender/utils.js.map +1 -0
- package/lib/ActionButton-DUgvSylL.js +25 -0
- package/lib/ActionButton-DUgvSylL.js.map +1 -0
- package/lib/Button-CynVW1JV.js +53 -0
- package/lib/Button-CynVW1JV.js.map +1 -0
- package/lib/ClaudeLogo-B4Xxt-x_.js +69 -0
- package/lib/ClaudeLogo-B4Xxt-x_.js.map +1 -0
- package/lib/{Command-CUcrW3qs.js → Command-BpT1iBE6.js} +25 -25
- package/lib/Command-BpT1iBE6.js.map +1 -0
- package/lib/Drawer-Ci7XwhqT.js.map +1 -1
- package/lib/DropdownMenu-C8SX_-S_.js +104 -0
- package/lib/DropdownMenu-C8SX_-S_.js.map +1 -0
- package/lib/{ErrorAlert-DE3Sf66a.js → ErrorAlert-DrOR8w3f.js} +475 -456
- package/lib/ErrorAlert-DrOR8w3f.js.map +1 -0
- package/lib/IndexingDialog-B5zCiUKr.js +100 -0
- package/lib/IndexingDialog-B5zCiUKr.js.map +1 -0
- package/lib/MdxPage-BagO2c-n.js +210 -0
- package/lib/MdxPage-BagO2c-n.js.map +1 -0
- package/lib/Mermaid-D_VSX7_Q.js +102 -0
- package/lib/Mermaid-D_VSX7_Q.js.map +1 -0
- package/lib/{OAuthErrorPage-BycMozgn.js → OAuthErrorPage-Fq54RLgt.js} +7 -7
- package/lib/{OAuthErrorPage-BycMozgn.js.map → OAuthErrorPage-Fq54RLgt.js.map} +1 -1
- package/lib/OasProvider-DPH8mwDa.js +40 -0
- package/lib/OasProvider-DPH8mwDa.js.map +1 -0
- package/lib/OperationList-C0jiEaG5.js +5805 -0
- package/lib/OperationList-C0jiEaG5.js.map +1 -0
- package/lib/RouteGuard-9wjejsKm.js +77 -0
- package/lib/RouteGuard-9wjejsKm.js.map +1 -0
- package/lib/RouterError-DSLXagd5.js +42 -0
- package/lib/RouterError-DSLXagd5.js.map +1 -0
- package/lib/{SchemaList-xZSf3IMh.js → SchemaList-BU0zCHn9.js} +28 -27
- package/lib/SchemaList-BU0zCHn9.js.map +1 -0
- package/lib/SchemaView-DVae4RO2.js +597 -0
- package/lib/SchemaView-DVae4RO2.js.map +1 -0
- package/lib/Select-CkxXP5I7.js +243 -0
- package/lib/Select-CkxXP5I7.js.map +1 -0
- package/lib/Separator-CTPSeW1S.js +27 -0
- package/lib/Separator-CTPSeW1S.js.map +1 -0
- package/lib/{SignUp-6SGx9Yyq.js → SignUp-BjS4ozA7.js} +13 -13
- package/lib/{SignUp-6SGx9Yyq.js.map → SignUp-BjS4ozA7.js.map} +1 -1
- package/lib/{SyntaxHighlight-zvlnSnHB.js → SyntaxHighlight-Kdyskw3C.js} +710 -662
- package/lib/{SyntaxHighlight-zvlnSnHB.js.map → SyntaxHighlight-Kdyskw3C.js.map} +1 -1
- package/lib/{Toc-Da9yp7lo.js → Toc-DJxFPfcS.js} +2 -2
- package/lib/{Toc-Da9yp7lo.js.map → Toc-DJxFPfcS.js.map} +1 -1
- package/lib/{ZudokuContext-BUZ5hkWB.js → ZudokuContext-BXldanA8.js} +11 -11
- package/lib/{ZudokuContext-BUZ5hkWB.js.map → ZudokuContext-BXldanA8.js.map} +1 -1
- package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js +9 -0
- package/lib/___vite-browser-external_commonjs-proxy-Cga3HsWk.js.map +1 -0
- package/lib/{chunk-PVWAREVJ-BMhpCH5D.js → chunk-PVWAREVJ-dLIqswPy.js} +5 -5
- package/lib/{chunk-PVWAREVJ-BMhpCH5D.js.map → chunk-PVWAREVJ-dLIqswPy.js.map} +1 -1
- package/lib/{circular-DvuimBGQ.js → circular-CzWF1hj5.js} +6360 -5953
- package/lib/circular-CzWF1hj5.js.map +1 -0
- package/lib/createServer-BIr2_tGn.js +16693 -0
- package/lib/createServer-BIr2_tGn.js.map +1 -0
- package/lib/createVariantComponent-B9_dVBvu.js +35 -0
- package/lib/createVariantComponent-B9_dVBvu.js.map +1 -0
- package/lib/{errors-CuGgh3hf.js → errors-Bs4duWDy.js} +3 -3
- package/lib/{errors-CuGgh3hf.js.map → errors-Bs4duWDy.js.map} +1 -1
- package/lib/firebase-Cax7HPzn.js +7360 -0
- package/lib/firebase-Cax7HPzn.js.map +1 -0
- package/lib/{hook-CMeoxziF.js → hook-BNxidGQq.js} +3 -3
- package/lib/{hook-CMeoxziF.js.map → hook-BNxidGQq.js.map} +1 -1
- package/lib/index-0oT9beQN.js +3676 -0
- package/lib/index-0oT9beQN.js.map +1 -0
- package/lib/{index-rYHsvtTo.js → index-Bh-MffiL.js} +2 -2
- package/lib/{index-rYHsvtTo.js.map → index-Bh-MffiL.js.map} +1 -1
- package/lib/{index-B1rmok4X.js → index-CCmMJp02.js} +10 -10
- package/lib/{index-B1rmok4X.js.map → index-CCmMJp02.js.map} +1 -1
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/index-Css56y3F.js +133 -0
- package/lib/index-Css56y3F.js.map +1 -0
- package/lib/index.esm-DDENMN4y.js +32 -0
- package/lib/index.esm-DDENMN4y.js.map +1 -0
- package/lib/{index.esm-BnYHxCYC.js → index.esm-DtzT_KoE.js} +20 -20
- package/lib/{index.esm-BnYHxCYC.js.map → index.esm-DtzT_KoE.js.map} +1 -1
- package/lib/{invariant-Bm-FVUQE.js → invariant-CGOLuIIz.js} +3 -3
- package/lib/{invariant-Bm-FVUQE.js.map → invariant-CGOLuIIz.js.map} +1 -1
- package/lib/{mutation-BSU0xu4m.js → mutation-BoVlx8yA.js} +2 -2
- package/lib/{mutation-BSU0xu4m.js.map → mutation-BoVlx8yA.js.map} +1 -1
- package/lib/ui/ActionButton.js +1 -1
- package/lib/ui/Badge.js +27 -13
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Button.js +26 -24
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/ButtonGroup.js +77 -0
- package/lib/ui/ButtonGroup.js.map +1 -0
- package/lib/ui/Checkbox.js +29 -26
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +7 -7
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Collapsible.js +32 -5
- package/lib/ui/Collapsible.js.map +1 -1
- package/lib/ui/Command.js +3 -3
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/DropdownMenu.js +227 -140
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +26 -25
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Frame.js +81 -0
- package/lib/ui/Frame.js.map +1 -0
- package/lib/ui/Item.js +188 -0
- package/lib/ui/Item.js.map +1 -0
- package/lib/ui/Kbd.js +32 -0
- package/lib/ui/Kbd.js.map +1 -0
- package/lib/ui/NativeSelect.js +57 -0
- package/lib/ui/NativeSelect.js.map +1 -0
- package/lib/ui/Select.js +166 -116
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Separator.js +27 -0
- package/lib/ui/Separator.js.map +1 -0
- package/lib/ui/SyntaxHighlight.js +3 -3
- package/lib/ui/Tabs.js +10 -10
- package/lib/ui/Tooltip.js +55 -28
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/useMutation-C6RqWmTS.js +97 -0
- package/lib/useMutation-C6RqWmTS.js.map +1 -0
- package/lib/zudoku.__internal.js +349 -349
- package/lib/zudoku.__internal.js.map +1 -1
- package/lib/zudoku.auth-auth0.js +7 -7
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +4 -4
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-firebase.js +9 -0
- package/lib/zudoku.auth-firebase.js.map +1 -0
- package/lib/zudoku.auth-openid.js +5 -5
- package/lib/zudoku.auth-supabase.js +31 -34
- package/lib/zudoku.auth-supabase.js.map +1 -1
- package/lib/zudoku.components.js +7 -7
- package/lib/zudoku.hooks.js +11 -24
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.mermaid.js +10 -0
- package/lib/zudoku.mermaid.js.map +1 -0
- package/lib/zudoku.plugin-api-catalog.js +6 -6
- package/lib/zudoku.plugin-api-keys.js +225 -216
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +184 -226
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/lib/zudoku.router.js +2 -2
- package/package.json +44 -27
- package/src/app/main.css +1 -1
- package/src/app/main.tsx +5 -1
- package/src/app/sentry.ts +1 -1
- package/src/lib/auth/issuer.ts +3 -0
- package/src/lib/authentication/authentication.ts +1 -1
- package/src/lib/authentication/providers/auth0.tsx +6 -1
- package/src/lib/authentication/providers/firebase.tsx +284 -0
- package/src/lib/authentication/providers/supabase.tsx +2 -7
- package/src/lib/authentication/ui/ZudokuAuthUi.tsx +335 -0
- package/src/lib/authentication/ui/icons/Apple.tsx +10 -0
- package/src/lib/authentication/ui/icons/Facebook.tsx +15 -0
- package/src/lib/authentication/ui/icons/Github.tsx +16 -0
- package/src/lib/authentication/ui/icons/Google.tsx +16 -0
- package/src/lib/authentication/ui/icons/Microsoft.tsx +12 -0
- package/src/lib/authentication/ui/icons/X.tsx +10 -0
- package/src/lib/components/Autocomplete.tsx +11 -2
- package/src/lib/components/Layout.tsx +3 -2
- package/src/lib/components/Mermaid.tsx +68 -0
- package/src/lib/components/PagefindSearchMeta.tsx +14 -0
- package/src/lib/components/Zudoku.tsx +4 -7
- package/src/lib/components/navigation/NavigationItem.tsx +7 -20
- package/src/lib/core/RouteGuard.tsx +9 -9
- package/src/lib/core/plugins.ts +2 -2
- package/src/lib/errors/ErrorAlert.tsx +1 -1
- package/src/lib/errors/RouterError.tsx +7 -2
- package/src/lib/oas/parser/index.ts +10 -3
- package/src/lib/plugins/api-keys/ProtectedRoute.tsx +11 -7
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +5 -3
- package/src/lib/plugins/openapi/DownloadSchemaButton.tsx +115 -0
- package/src/lib/plugins/openapi/Endpoint.tsx +20 -27
- package/src/lib/plugins/openapi/GeneratedExampleSidecarBox.tsx +52 -0
- package/src/lib/plugins/openapi/OasProvider.tsx +30 -17
- package/src/lib/plugins/openapi/OperationList.tsx +46 -21
- package/src/lib/plugins/openapi/OperationListItem.tsx +15 -12
- package/src/lib/plugins/openapi/ParameterList.tsx +37 -23
- package/src/lib/plugins/openapi/ParameterListItem.tsx +105 -54
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +48 -7
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +101 -33
- package/src/lib/plugins/openapi/SchemaList.tsx +4 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +145 -65
- package/src/lib/plugins/openapi/SidecarBox.tsx +26 -4
- package/src/lib/plugins/openapi/SidecarExamples.tsx +91 -79
- package/src/lib/plugins/openapi/components/ConstValue.tsx +1 -1
- package/src/lib/plugins/openapi/components/EnumValues.tsx +2 -2
- package/src/lib/plugins/openapi/components/NonHighlightedCode.tsx +22 -0
- package/src/lib/plugins/openapi/components/ResponseContent.tsx +63 -53
- package/src/lib/plugins/openapi/index.tsx +16 -7
- package/src/lib/plugins/openapi/interfaces.ts +28 -7
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +246 -30
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +10 -6
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +3 -2
- package/src/lib/plugins/openapi/playground/Headers.tsx +103 -219
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +33 -1
- package/src/lib/plugins/openapi/playground/PathParams.tsx +26 -34
- package/src/lib/plugins/openapi/playground/Playground.tsx +75 -33
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +9 -30
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +82 -136
- package/src/lib/plugins/openapi/playground/request-panel/MultipartField.tsx +91 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/request-panel/fieldManager/useKeyValueFieldManager.test.tsx +872 -0
- package/src/lib/plugins/openapi/playground/request-panel/useKeyValueFieldManager.ts +349 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +2 -6
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +1 -1
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +89 -55
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +98 -60
- package/src/lib/plugins/openapi/schema/UnionView.tsx +6 -17
- package/src/lib/plugins/openapi/schema/union-helpers.ts +0 -1
- package/src/lib/plugins/openapi/schema/utils.ts +5 -2
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +11 -11
- package/src/lib/plugins/openapi/util/getRoutes.tsx +35 -3
- package/src/lib/plugins/search-pagefind/IndexingDialog.tsx +163 -0
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +61 -22
- package/src/lib/plugins/search-pagefind/ResultList.tsx +8 -3
- package/src/lib/shiki.ts +21 -12
- package/src/lib/ui/Badge.tsx +21 -12
- package/src/lib/ui/Button.tsx +10 -9
- package/src/lib/ui/ButtonGroup.tsx +82 -0
- package/src/lib/ui/Checkbox.tsx +23 -24
- package/src/lib/ui/CodeBlock.tsx +3 -4
- package/src/lib/ui/Collapsible.tsx +26 -4
- package/src/lib/ui/Command.tsx +3 -3
- package/src/lib/ui/DropdownMenu.tsx +226 -170
- package/src/lib/ui/EmbeddedCodeBlock.tsx +21 -19
- package/src/lib/ui/Frame.tsx +81 -0
- package/src/lib/ui/Item.tsx +192 -0
- package/src/lib/ui/Kbd.tsx +28 -0
- package/src/lib/ui/NativeSelect.tsx +47 -0
- package/src/lib/ui/Select.tsx +153 -126
- package/src/lib/ui/Separator.tsx +25 -0
- package/src/lib/ui/Tooltip.tsx +54 -32
- package/src/lib/util/MdxComponents.tsx +2 -0
- package/src/lib/util/createVariantComponent.tsx +31 -5
- package/src/lib/util/flattenAllOf.test.ts +689 -0
- package/src/lib/util/flattenAllOf.ts +122 -0
- package/src/lib/util/readFrontmatter.ts +13 -0
- package/src/shiki/langs/markdown-nix.js +1 -0
- package/src/shiki/langs/openscad.js +1 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/InlineInput.js +0 -3
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.d.ts +0 -5
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js +0 -7
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.d.ts +0 -4
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js +0 -10
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.d.ts +0 -5
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js +0 -16
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js.map +0 -1
- package/dist/vite/create-pagefind-index.d.ts +0 -4
- package/dist/vite/create-pagefind-index.js +0 -12
- package/dist/vite/create-pagefind-index.js.map +0 -1
- package/lib/Button-DmS4u8Lj.js +0 -51
- package/lib/Button-DmS4u8Lj.js.map +0 -1
- package/lib/Command-CUcrW3qs.js.map +0 -1
- package/lib/DropdownMenu-BZ2NKQ3K.js +0 -126
- package/lib/DropdownMenu-BZ2NKQ3K.js.map +0 -1
- package/lib/ErrorAlert-DE3Sf66a.js.map +0 -1
- package/lib/MdxPage-DZfeC0QY.js +0 -240
- package/lib/MdxPage-DZfeC0QY.js.map +0 -1
- package/lib/OasProvider-Bf5zBDBY.js +0 -36
- package/lib/OasProvider-Bf5zBDBY.js.map +0 -1
- package/lib/OperationList-Cmiw1xm2.js +0 -5446
- package/lib/OperationList-Cmiw1xm2.js.map +0 -1
- package/lib/Pagination-CJszmeSA.js +0 -37
- package/lib/Pagination-CJszmeSA.js.map +0 -1
- package/lib/RouteGuard-DhU3LRr1.js +0 -81
- package/lib/RouteGuard-DhU3LRr1.js.map +0 -1
- package/lib/RouterError-VDLnrFqF.js +0 -41
- package/lib/RouterError-VDLnrFqF.js.map +0 -1
- package/lib/SchemaList-xZSf3IMh.js.map +0 -1
- package/lib/SchemaView-tHXTm5oM.js +0 -458
- package/lib/SchemaView-tHXTm5oM.js.map +0 -1
- package/lib/Select-C1DeCqKv.js +0 -372
- package/lib/Select-C1DeCqKv.js.map +0 -1
- package/lib/circular-DvuimBGQ.js.map +0 -1
- package/lib/createServer-D9UvCoDf.js +0 -12559
- package/lib/createServer-D9UvCoDf.js.map +0 -1
- package/lib/index-Cr9_YzOZ.js +0 -3364
- package/lib/index-Cr9_YzOZ.js.map +0 -1
- package/lib/useExposedProps-U3pmsHaG.js +0 -113
- package/lib/useExposedProps-U3pmsHaG.js.map +0 -1
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +0 -6
- package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.tsx +0 -36
- package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.tsx +0 -25
- package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.tsx +0 -42
|
@@ -1,55 +1,80 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-BzflLqGi.js";
|
|
2
|
-
import { CircleSlashIcon as
|
|
3
|
-
import { R as ye } from "./RouterError-
|
|
4
|
-
import { i as
|
|
5
|
-
import { O as ge, u as je } from "./chunk-PVWAREVJ-
|
|
6
|
-
import { u as Ce } from "./hook-
|
|
7
|
-
import { D as ve, a as Y } from "./ErrorAlert-
|
|
8
|
-
import { Button as
|
|
9
|
-
import { a as
|
|
10
|
-
import { u as
|
|
11
|
-
import * as
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { c as
|
|
2
|
+
import { CircleSlashIcon as $, CheckIcon as ue, XIcon as fe, PencilLineIcon as he, RefreshCwIcon as pe, TrashIcon as me, KeyRoundIcon as xe } from "lucide-react";
|
|
3
|
+
import { R as ye } from "./RouterError-DSLXagd5.js";
|
|
4
|
+
import { i as A } from "./invariant-CGOLuIIz.js";
|
|
5
|
+
import { O as ge, u as je } from "./chunk-PVWAREVJ-dLIqswPy.js";
|
|
6
|
+
import { u as Ce } from "./hook-BNxidGQq.js";
|
|
7
|
+
import { D as ve, a as Y } from "./ErrorAlert-DrOR8w3f.js";
|
|
8
|
+
import { Button as v } from "./ui/Button.js";
|
|
9
|
+
import { a as ne, f as ie, e as we } from "./ZudokuContext-BXldanA8.js";
|
|
10
|
+
import { u as T } from "./useMutation-C6RqWmTS.js";
|
|
11
|
+
import * as q from "react";
|
|
12
|
+
import ke, { createContext as Q, useRef as N, useLayoutEffect as be, useEffect as re, useId as _, useContext as H, useInsertionEffect as Ke, useMemo as F, useCallback as Ee, Children as De, isValidElement as Ne, useState as D } from "react";
|
|
13
|
+
import { A as O, a as M, b as Pe } from "./Mermaid-D_VSX7_Q.js";
|
|
14
|
+
import { C as Ae, a as Ie } from "./Card-KFniaZn5.js";
|
|
15
|
+
import { e as V, f as P, D as B, g as G, a as J, b as U, c as W, d as ae } from "./Dialog-BQciPiHN.js";
|
|
16
|
+
import { S as Re, a as Se, b as Te, c as Oe, d as Me, e as Z, f as qe } from "./Select-CkxXP5I7.js";
|
|
17
|
+
import { Input as oe } from "./ui/Input.js";
|
|
18
|
+
import { c as L } from "./cn-dYga0KKN.js";
|
|
17
19
|
import { a as ze } from "./index.esm-BYObtETB.js";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
const _e = () => {
|
|
20
|
+
import { A as $e } from "./ActionButton-DUgvSylL.js";
|
|
21
|
+
import { b as Fe } from "./index-Css56y3F.js";
|
|
22
|
+
const Le = () => {
|
|
22
23
|
const t = Ce();
|
|
23
|
-
return t.isAuthEnabled && t.isPending ? null : t.isAuthenticated ? /* @__PURE__ */ e.jsx(ge, {}) :
|
|
24
|
+
return t.isAuthEnabled && t.isPending ? null : t.isAuthEnabled ? t.isAuthenticated ? /* @__PURE__ */ e.jsx(ge, {}) : /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: [
|
|
24
25
|
"Please login first to view this page",
|
|
25
|
-
/* @__PURE__ */ e.jsx(
|
|
26
|
+
/* @__PURE__ */ e.jsx(v, { onClick: () => t.login(), children: "Login" })
|
|
26
27
|
] }) : /* @__PURE__ */ e.jsx("div", { className: "flex flex-col justify-center gap-2 items-center h-1/2", children: /* @__PURE__ */ e.jsxs(ve, { className: "max-w-[600px]", children: [
|
|
27
28
|
"Authentication needs to be enabled for API keys to work. Enable it in your Zudoku configuration under ",
|
|
28
29
|
/* @__PURE__ */ e.jsx("code", { children: "authentication" }),
|
|
29
30
|
"."
|
|
30
31
|
] }) });
|
|
31
|
-
},
|
|
32
|
-
function
|
|
33
|
-
const r =
|
|
32
|
+
}, Qe = Q({});
|
|
33
|
+
function le(t) {
|
|
34
|
+
const r = N(null);
|
|
34
35
|
return r.current === null && (r.current = t()), r.current;
|
|
35
36
|
}
|
|
36
|
-
const
|
|
37
|
-
function
|
|
37
|
+
const _e = typeof window < "u", He = _e ? be : re, ce = /* @__PURE__ */ Q(null);
|
|
38
|
+
function Ve(t) {
|
|
38
39
|
return typeof t == "object" && t !== null;
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
-
return
|
|
41
|
+
function Be(t) {
|
|
42
|
+
return Ve(t) && "offsetHeight" in t;
|
|
42
43
|
}
|
|
43
|
-
const
|
|
44
|
+
const Ge = Q({
|
|
44
45
|
transformPagePoint: (t) => t,
|
|
45
46
|
isStatic: !1,
|
|
46
47
|
reducedMotion: "never"
|
|
47
48
|
});
|
|
48
|
-
|
|
49
|
+
function ee(t, r) {
|
|
50
|
+
if (typeof t == "function")
|
|
51
|
+
return t(r);
|
|
52
|
+
t != null && (t.current = r);
|
|
53
|
+
}
|
|
54
|
+
function Je(...t) {
|
|
55
|
+
return (r) => {
|
|
56
|
+
let s = !1;
|
|
57
|
+
const n = t.map((i) => {
|
|
58
|
+
const a = ee(i, r);
|
|
59
|
+
return !s && typeof a == "function" && (s = !0), a;
|
|
60
|
+
});
|
|
61
|
+
if (s)
|
|
62
|
+
return () => {
|
|
63
|
+
for (let i = 0; i < n.length; i++) {
|
|
64
|
+
const a = n[i];
|
|
65
|
+
typeof a == "function" ? a() : ee(t[i], null);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function Ue(...t) {
|
|
71
|
+
return q.useCallback(Je(...t), t);
|
|
72
|
+
}
|
|
73
|
+
class We extends q.Component {
|
|
49
74
|
getSnapshotBeforeUpdate(r) {
|
|
50
75
|
const s = this.props.childRef.current;
|
|
51
76
|
if (s && r.isPresent && !this.props.isPresent) {
|
|
52
|
-
const n = s.offsetParent, i =
|
|
77
|
+
const n = s.offsetParent, i = Be(n) && n.offsetWidth || 0, a = this.props.sizeRef.current;
|
|
53
78
|
a.height = s.offsetHeight || 0, a.width = s.offsetWidth || 0, a.top = s.offsetTop, a.left = s.offsetLeft, a.right = i - a.width - a.left;
|
|
54
79
|
}
|
|
55
80
|
return null;
|
|
@@ -64,62 +89,62 @@ class We extends L.Component {
|
|
|
64
89
|
}
|
|
65
90
|
}
|
|
66
91
|
function Xe({ children: t, isPresent: r, anchorX: s, root: n }) {
|
|
67
|
-
const i = _(), a =
|
|
92
|
+
const i = _(), a = N(null), l = N({
|
|
68
93
|
width: 0,
|
|
69
94
|
height: 0,
|
|
70
95
|
top: 0,
|
|
71
96
|
left: 0,
|
|
72
97
|
right: 0
|
|
73
|
-
}), { nonce: u } =
|
|
74
|
-
return
|
|
75
|
-
const { width:
|
|
76
|
-
if (r || !a.current || !
|
|
98
|
+
}), { nonce: u } = H(Ge), f = Ue(a, t?.ref);
|
|
99
|
+
return Ke(() => {
|
|
100
|
+
const { width: d, height: y, top: h, left: x, right: p } = l.current;
|
|
101
|
+
if (r || !a.current || !d || !y)
|
|
77
102
|
return;
|
|
78
|
-
const
|
|
103
|
+
const k = s === "left" ? `left: ${x}` : `right: ${p}`;
|
|
79
104
|
a.current.dataset.motionPopId = i;
|
|
80
|
-
const
|
|
81
|
-
u && (
|
|
82
|
-
const
|
|
83
|
-
return
|
|
105
|
+
const m = document.createElement("style");
|
|
106
|
+
u && (m.nonce = u);
|
|
107
|
+
const K = n ?? document.head;
|
|
108
|
+
return K.appendChild(m), m.sheet && m.sheet.insertRule(`
|
|
84
109
|
[data-motion-pop-id="${i}"] {
|
|
85
110
|
position: absolute !important;
|
|
86
|
-
width: ${
|
|
87
|
-
height: ${
|
|
88
|
-
${
|
|
89
|
-
top: ${
|
|
111
|
+
width: ${d}px !important;
|
|
112
|
+
height: ${y}px !important;
|
|
113
|
+
${k}px !important;
|
|
114
|
+
top: ${h}px !important;
|
|
90
115
|
}
|
|
91
116
|
`), () => {
|
|
92
|
-
|
|
117
|
+
K.contains(m) && K.removeChild(m);
|
|
93
118
|
};
|
|
94
|
-
}, [r]), e.jsx(We, { isPresent: r, childRef: a, sizeRef: l, children:
|
|
119
|
+
}, [r]), e.jsx(We, { isPresent: r, childRef: a, sizeRef: l, children: q.cloneElement(t, { ref: f }) });
|
|
95
120
|
}
|
|
96
|
-
const Ye = ({ children: t, initial: r, isPresent: s, onExitComplete: n, custom: i, presenceAffectsLayout: a, mode: l, anchorX: u, root:
|
|
97
|
-
const d =
|
|
98
|
-
let
|
|
99
|
-
id:
|
|
121
|
+
const Ye = ({ children: t, initial: r, isPresent: s, onExitComplete: n, custom: i, presenceAffectsLayout: a, mode: l, anchorX: u, root: f }) => {
|
|
122
|
+
const d = le(Ze), y = _();
|
|
123
|
+
let h = !0, x = F(() => (h = !1, {
|
|
124
|
+
id: y,
|
|
100
125
|
initial: r,
|
|
101
126
|
isPresent: s,
|
|
102
127
|
custom: i,
|
|
103
128
|
onExitComplete: (p) => {
|
|
104
129
|
d.set(p, !0);
|
|
105
|
-
for (const
|
|
106
|
-
if (!
|
|
130
|
+
for (const k of d.values())
|
|
131
|
+
if (!k)
|
|
107
132
|
return;
|
|
108
133
|
n && n();
|
|
109
134
|
},
|
|
110
135
|
register: (p) => (d.set(p, !1), () => d.delete(p))
|
|
111
136
|
}), [s, d, n]);
|
|
112
|
-
return a &&
|
|
113
|
-
d.forEach((p,
|
|
114
|
-
}, [s]),
|
|
137
|
+
return a && h && (x = { ...x }), F(() => {
|
|
138
|
+
d.forEach((p, k) => d.set(k, !1));
|
|
139
|
+
}, [s]), q.useEffect(() => {
|
|
115
140
|
!s && !d.size && n && n();
|
|
116
|
-
}, [s]), l === "popLayout" && (t = e.jsx(Xe, { isPresent: s, anchorX: u, root:
|
|
141
|
+
}, [s]), l === "popLayout" && (t = e.jsx(Xe, { isPresent: s, anchorX: u, root: f, children: t })), e.jsx(ce.Provider, { value: x, children: t });
|
|
117
142
|
};
|
|
118
143
|
function Ze() {
|
|
119
144
|
return /* @__PURE__ */ new Map();
|
|
120
145
|
}
|
|
121
146
|
function et(t = !0) {
|
|
122
|
-
const r =
|
|
147
|
+
const r = H(ce);
|
|
123
148
|
if (r === null)
|
|
124
149
|
return [!0, null];
|
|
125
150
|
const { isPresent: s, onExitComplete: n, register: i } = r, a = _();
|
|
@@ -127,82 +152,66 @@ function et(t = !0) {
|
|
|
127
152
|
if (t)
|
|
128
153
|
return i(a);
|
|
129
154
|
}, [t]);
|
|
130
|
-
const l =
|
|
155
|
+
const l = Ee(() => t && n && n(a), [a, n, t]);
|
|
131
156
|
return !s && n ? [!1, l] : [!0];
|
|
132
157
|
}
|
|
133
|
-
const
|
|
134
|
-
function
|
|
158
|
+
const I = (t) => t.key || "";
|
|
159
|
+
function te(t) {
|
|
135
160
|
const r = [];
|
|
136
|
-
return
|
|
137
|
-
|
|
161
|
+
return De.forEach(t, (s) => {
|
|
162
|
+
Ne(s) && r.push(s);
|
|
138
163
|
}), r;
|
|
139
164
|
}
|
|
140
|
-
const tt = ({ children: t, custom: r, initial: s = !0, onExitComplete: n, presenceAffectsLayout: i = !0, mode: a = "sync", propagate: l = !1, anchorX: u = "left", root:
|
|
141
|
-
const [d,
|
|
142
|
-
|
|
143
|
-
p.current = !1,
|
|
144
|
-
for (let
|
|
145
|
-
const
|
|
146
|
-
|
|
165
|
+
const tt = ({ children: t, custom: r, initial: s = !0, onExitComplete: n, presenceAffectsLayout: i = !0, mode: a = "sync", propagate: l = !1, anchorX: u = "left", root: f }) => {
|
|
166
|
+
const [d, y] = et(l), h = F(() => te(t), [t]), x = l && !d ? [] : h.map(I), p = N(!0), k = N(h), m = le(() => /* @__PURE__ */ new Map()), [K, o] = D(h), [c, j] = D(h);
|
|
167
|
+
He(() => {
|
|
168
|
+
p.current = !1, k.current = h;
|
|
169
|
+
for (let C = 0; C < c.length; C++) {
|
|
170
|
+
const g = I(c[C]);
|
|
171
|
+
x.includes(g) ? m.delete(g) : m.get(g) !== !0 && m.set(g, !1);
|
|
147
172
|
}
|
|
148
|
-
}, [c,
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
let
|
|
152
|
-
for (let
|
|
153
|
-
const
|
|
154
|
-
|
|
173
|
+
}, [c, x.length, x.join("-")]);
|
|
174
|
+
const w = [];
|
|
175
|
+
if (h !== K) {
|
|
176
|
+
let C = [...h];
|
|
177
|
+
for (let g = 0; g < c.length; g++) {
|
|
178
|
+
const E = c[g], z = I(E);
|
|
179
|
+
x.includes(z) || (C.splice(g, 0, E), w.push(E));
|
|
155
180
|
}
|
|
156
|
-
return a === "wait" &&
|
|
181
|
+
return a === "wait" && w.length && (C = w), j(te(C)), o(h), null;
|
|
157
182
|
}
|
|
158
183
|
process.env.NODE_ENV !== "production" && a === "wait" && c.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.`);
|
|
159
|
-
const { forceRender: b } =
|
|
160
|
-
return e.jsx(e.Fragment, { children: c.map((
|
|
161
|
-
const
|
|
162
|
-
if (
|
|
163
|
-
|
|
184
|
+
const { forceRender: b } = H(Qe);
|
|
185
|
+
return e.jsx(e.Fragment, { children: c.map((C) => {
|
|
186
|
+
const g = I(C), E = l && !d ? !1 : h === c || x.includes(g), z = () => {
|
|
187
|
+
if (m.has(g))
|
|
188
|
+
m.set(g, !0);
|
|
164
189
|
else
|
|
165
190
|
return;
|
|
166
191
|
let X = !0;
|
|
167
|
-
|
|
192
|
+
m.forEach((de) => {
|
|
168
193
|
de || (X = !1);
|
|
169
|
-
}), X && (b?.(),
|
|
194
|
+
}), X && (b?.(), j(k.current), l && y?.(), n && n());
|
|
170
195
|
};
|
|
171
|
-
return e.jsx(Ye, { isPresent:
|
|
196
|
+
return e.jsx(Ye, { isPresent: E, initial: !p.current || s ? void 0 : !1, custom: r, presenceAffectsLayout: i, mode: a, root: f, onExitComplete: E ? void 0 : z, anchorX: u, children: C }, g);
|
|
172
197
|
}) });
|
|
173
|
-
},
|
|
174
|
-
({ isPending: t, children: r, className: s, ...n }, i) => /* @__PURE__ */ e.jsxs(
|
|
175
|
-
Fe,
|
|
176
|
-
{
|
|
177
|
-
ref: i,
|
|
178
|
-
disabled: t,
|
|
179
|
-
...n,
|
|
180
|
-
className: A("relative", s),
|
|
181
|
-
children: [
|
|
182
|
-
t && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 grid place-items-center", children: /* @__PURE__ */ e.jsx(Le, {}) }),
|
|
183
|
-
/* @__PURE__ */ e.jsx("span", { className: A("block", t && "invisible"), children: r })
|
|
184
|
-
]
|
|
185
|
-
}
|
|
186
|
-
)
|
|
187
|
-
);
|
|
188
|
-
ce.displayName = "ActionButton";
|
|
189
|
-
const st = ({
|
|
198
|
+
}, st = ({
|
|
190
199
|
service: t,
|
|
191
200
|
onOpenChange: r
|
|
192
201
|
}) => {
|
|
193
|
-
const s =
|
|
202
|
+
const s = ne(), n = ie(), i = je(), a = ze({
|
|
194
203
|
defaultValues: {
|
|
195
204
|
expiresOn: "30"
|
|
196
205
|
}
|
|
197
|
-
}), l =
|
|
198
|
-
mutationFn: ({ description:
|
|
206
|
+
}), l = Fe(), u = T({
|
|
207
|
+
mutationFn: ({ description: f, expiresOn: d }) => {
|
|
199
208
|
if (!t.createKey)
|
|
200
209
|
throw new Error("createKey not implemented");
|
|
201
|
-
const
|
|
210
|
+
const y = d !== "never" ? nt(Number(d)) : void 0;
|
|
202
211
|
return t.createKey({
|
|
203
212
|
apiKey: {
|
|
204
|
-
description:
|
|
205
|
-
expiresOn:
|
|
213
|
+
description: f || "Secret Key",
|
|
214
|
+
expiresOn: y
|
|
206
215
|
},
|
|
207
216
|
context: s,
|
|
208
217
|
auth: l
|
|
@@ -216,42 +225,42 @@ const st = ({
|
|
|
216
225
|
"form",
|
|
217
226
|
{
|
|
218
227
|
onSubmit: a.handleSubmit(
|
|
219
|
-
(
|
|
220
|
-
{ ...
|
|
228
|
+
(f) => u.mutate(
|
|
229
|
+
{ ...f },
|
|
221
230
|
{
|
|
222
231
|
onSuccess: () => r(!1)
|
|
223
232
|
}
|
|
224
233
|
)
|
|
225
234
|
),
|
|
226
235
|
children: [
|
|
227
|
-
u.error && /* @__PURE__ */ e.jsxs(
|
|
228
|
-
/* @__PURE__ */ e.jsx(
|
|
229
|
-
/* @__PURE__ */ e.jsx(
|
|
236
|
+
u.error && /* @__PURE__ */ e.jsxs(O, { variant: "destructive", className: "mb-4", children: [
|
|
237
|
+
/* @__PURE__ */ e.jsx(M, { children: "Error" }),
|
|
238
|
+
/* @__PURE__ */ e.jsx(Pe, { children: u.error.message })
|
|
230
239
|
] }),
|
|
231
240
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 flex-col text-sm font-medium", children: [
|
|
232
241
|
"Name",
|
|
233
|
-
/* @__PURE__ */ e.jsx(
|
|
242
|
+
/* @__PURE__ */ e.jsx(oe, { ...a.register("description") }),
|
|
234
243
|
"Expiration",
|
|
235
244
|
/* @__PURE__ */ e.jsxs(
|
|
236
|
-
|
|
245
|
+
Re,
|
|
237
246
|
{
|
|
238
|
-
onValueChange: (
|
|
247
|
+
onValueChange: (f) => a.setValue("expiresOn", f),
|
|
239
248
|
defaultValue: a.getValues("expiresOn"),
|
|
240
249
|
children: [
|
|
241
|
-
/* @__PURE__ */ e.jsx(
|
|
242
|
-
/* @__PURE__ */ e.jsx(
|
|
243
|
-
[7, 30, 60, 90].map((
|
|
244
|
-
|
|
250
|
+
/* @__PURE__ */ e.jsx(Se, { children: /* @__PURE__ */ e.jsx(Te, {}) }),
|
|
251
|
+
/* @__PURE__ */ e.jsx(Oe, { children: /* @__PURE__ */ e.jsxs(Me, { children: [
|
|
252
|
+
[7, 30, 60, 90].map((f) => /* @__PURE__ */ e.jsxs(Z, { value: String(f), children: [
|
|
253
|
+
f,
|
|
245
254
|
" days"
|
|
246
|
-
] },
|
|
255
|
+
] }, f)),
|
|
247
256
|
/* @__PURE__ */ e.jsx(Z, { value: "never", children: "Never" })
|
|
248
257
|
] }) })
|
|
249
258
|
]
|
|
250
259
|
}
|
|
251
260
|
),
|
|
252
|
-
/* @__PURE__ */ e.jsxs(
|
|
253
|
-
/* @__PURE__ */ e.jsx(
|
|
254
|
-
/* @__PURE__ */ e.jsx(
|
|
261
|
+
/* @__PURE__ */ e.jsxs(V, { children: [
|
|
262
|
+
/* @__PURE__ */ e.jsx(P, { asChild: !0, children: /* @__PURE__ */ e.jsx(v, { variant: "outline", children: "Cancel" }) }),
|
|
263
|
+
/* @__PURE__ */ e.jsx($e, { isPending: u.isPending, children: "Generate Key" })
|
|
255
264
|
] })
|
|
256
265
|
] })
|
|
257
266
|
]
|
|
@@ -260,29 +269,29 @@ const st = ({
|
|
|
260
269
|
}, nt = (t) => {
|
|
261
270
|
const r = /* @__PURE__ */ new Date();
|
|
262
271
|
return r.setDate(r.getDate() + t), r.toISOString();
|
|
263
|
-
},
|
|
272
|
+
}, se = ({
|
|
264
273
|
service: t,
|
|
265
274
|
isOpen: r,
|
|
266
275
|
onOpenChange: s,
|
|
267
276
|
trigger: n,
|
|
268
277
|
buttonVariant: i = "outline"
|
|
269
278
|
}) => {
|
|
270
|
-
const a = /* @__PURE__ */ e.jsx(
|
|
271
|
-
return /* @__PURE__ */ e.jsxs(
|
|
279
|
+
const a = /* @__PURE__ */ e.jsx(v, { variant: i, children: "Create API Key" });
|
|
280
|
+
return /* @__PURE__ */ e.jsxs(B, { open: r, onOpenChange: s, children: [
|
|
272
281
|
/* @__PURE__ */ e.jsx(G, { asChild: !0, children: n ?? a }),
|
|
273
282
|
/* @__PURE__ */ e.jsxs(J, { children: [
|
|
274
283
|
/* @__PURE__ */ e.jsx(U, { children: /* @__PURE__ */ e.jsx(W, { children: "Create API Key" }) }),
|
|
275
284
|
/* @__PURE__ */ e.jsx(st, { service: t, onOpenChange: s })
|
|
276
285
|
] })
|
|
277
286
|
] });
|
|
278
|
-
},
|
|
279
|
-
const r =
|
|
287
|
+
}, it = ({ service: t }) => {
|
|
288
|
+
const r = ne(), s = ie(), [n, i] = D(
|
|
280
289
|
null
|
|
281
|
-
), [a, l] =
|
|
290
|
+
), [a, l] = D(""), { data: u, isFetching: f } = we({
|
|
282
291
|
queryFn: () => t.getConsumers(r),
|
|
283
292
|
queryKey: ["api-keys"],
|
|
284
293
|
retry: !1
|
|
285
|
-
}), [d,
|
|
294
|
+
}), [d, y] = D(!1), h = T({
|
|
286
295
|
mutationFn: ({
|
|
287
296
|
consumerId: o,
|
|
288
297
|
keyId: c
|
|
@@ -293,21 +302,21 @@ const st = ({
|
|
|
293
302
|
},
|
|
294
303
|
onMutate: async ({ consumerId: o, keyId: c }) => {
|
|
295
304
|
await s.cancelQueries({ queryKey: ["api-keys"] });
|
|
296
|
-
const
|
|
305
|
+
const j = s.getQueryData([
|
|
297
306
|
"api-keys"
|
|
298
307
|
]);
|
|
299
|
-
return s.setQueryData(["api-keys"], (
|
|
308
|
+
return s.setQueryData(["api-keys"], (w) => w && w.map((b) => b.id === o ? {
|
|
300
309
|
...b,
|
|
301
|
-
apiKeys: b.apiKeys.filter((
|
|
302
|
-
} : b)), { previousData:
|
|
310
|
+
apiKeys: b.apiKeys.filter((C) => C.id !== c)
|
|
311
|
+
} : b)), { previousData: j };
|
|
303
312
|
},
|
|
304
|
-
onError: (o, c,
|
|
305
|
-
|
|
313
|
+
onError: (o, c, j) => {
|
|
314
|
+
j?.previousData && s.setQueryData(["api-keys"], j.previousData);
|
|
306
315
|
},
|
|
307
316
|
onSuccess: () => {
|
|
308
317
|
s.invalidateQueries({ queryKey: ["api-keys"] });
|
|
309
318
|
}
|
|
310
|
-
}),
|
|
319
|
+
}), x = T({
|
|
311
320
|
mutationFn: ({
|
|
312
321
|
consumerId: o,
|
|
313
322
|
label: c
|
|
@@ -318,33 +327,33 @@ const st = ({
|
|
|
318
327
|
},
|
|
319
328
|
onMutate: async ({ consumerId: o, label: c }) => {
|
|
320
329
|
await s.cancelQueries({ queryKey: ["api-keys"] });
|
|
321
|
-
const
|
|
322
|
-
return s.setQueryData(["api-keys"], (
|
|
330
|
+
const j = s.getQueryData(["api-keys"]);
|
|
331
|
+
return s.setQueryData(["api-keys"], (w) => w && w.map((b) => b.id === o ? {
|
|
323
332
|
...b,
|
|
324
333
|
label: c
|
|
325
|
-
} : b)), { previousData:
|
|
334
|
+
} : b)), { previousData: j };
|
|
326
335
|
},
|
|
327
|
-
onError: (o, c,
|
|
328
|
-
|
|
336
|
+
onError: (o, c, j) => {
|
|
337
|
+
j?.previousData && s.setQueryData(["api-keys"], j.previousData);
|
|
329
338
|
},
|
|
330
339
|
onSuccess: () => {
|
|
331
340
|
s.invalidateQueries({ queryKey: ["api-keys"] });
|
|
332
341
|
}
|
|
333
|
-
}), p =
|
|
342
|
+
}), p = T({
|
|
334
343
|
mutationFn: (o) => {
|
|
335
344
|
if (!t.rollKey)
|
|
336
345
|
throw new Error("rollKey not implemented");
|
|
337
346
|
return t.rollKey(o, r);
|
|
338
347
|
},
|
|
339
348
|
onSuccess: () => s.invalidateQueries({ queryKey: ["api-keys"] })
|
|
340
|
-
}),
|
|
349
|
+
}), k = (o, c) => {
|
|
341
350
|
i(o), l(c);
|
|
342
|
-
},
|
|
343
|
-
a.trim() &&
|
|
351
|
+
}, m = (o) => {
|
|
352
|
+
a.trim() && x.mutate({
|
|
344
353
|
consumerId: o,
|
|
345
354
|
label: a.trim()
|
|
346
355
|
}), i(null), l("");
|
|
347
|
-
},
|
|
356
|
+
}, K = () => {
|
|
348
357
|
i(null), l("");
|
|
349
358
|
};
|
|
350
359
|
return /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-md h-full pt-(--padding-content-top) pb-(--padding-content-bottom)", children: [
|
|
@@ -352,28 +361,28 @@ const st = ({
|
|
|
352
361
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between pb-3", children: [
|
|
353
362
|
/* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "API Keys" }),
|
|
354
363
|
t.createKey && /* @__PURE__ */ e.jsx(
|
|
355
|
-
|
|
364
|
+
se,
|
|
356
365
|
{
|
|
357
366
|
service: t,
|
|
358
367
|
isOpen: d,
|
|
359
|
-
onOpenChange:
|
|
368
|
+
onOpenChange: y
|
|
360
369
|
}
|
|
361
370
|
)
|
|
362
371
|
] }),
|
|
363
372
|
/* @__PURE__ */ e.jsx("p", { children: "Create, manage, and monitor your API keys" }),
|
|
364
373
|
/* @__PURE__ */ e.jsx(Y.Target, { name: "api-keys-list-page-before-keys" }),
|
|
365
374
|
/* @__PURE__ */ e.jsx("div", { className: "h-8" }),
|
|
366
|
-
p.isError && /* @__PURE__ */ e.jsxs(
|
|
367
|
-
/* @__PURE__ */ e.jsx(
|
|
368
|
-
/* @__PURE__ */ e.jsx(
|
|
375
|
+
p.isError && /* @__PURE__ */ e.jsxs(O, { variant: "destructive", className: "mb-4", children: [
|
|
376
|
+
/* @__PURE__ */ e.jsx($, { size: 16 }),
|
|
377
|
+
/* @__PURE__ */ e.jsx(M, { children: p.error.message })
|
|
369
378
|
] }),
|
|
370
|
-
|
|
371
|
-
/* @__PURE__ */ e.jsx(
|
|
372
|
-
/* @__PURE__ */ e.jsx(
|
|
379
|
+
x.isError && /* @__PURE__ */ e.jsxs(O, { variant: "destructive", className: "mb-4", children: [
|
|
380
|
+
/* @__PURE__ */ e.jsx($, { size: 16 }),
|
|
381
|
+
/* @__PURE__ */ e.jsx(M, { children: x.error.message })
|
|
373
382
|
] }),
|
|
374
|
-
|
|
375
|
-
/* @__PURE__ */ e.jsx(
|
|
376
|
-
/* @__PURE__ */ e.jsx(
|
|
383
|
+
h.isError && /* @__PURE__ */ e.jsxs(O, { variant: "destructive", className: "mb-4", children: [
|
|
384
|
+
/* @__PURE__ */ e.jsx($, { size: 16 }),
|
|
385
|
+
/* @__PURE__ */ e.jsx(M, { children: h.error.message })
|
|
377
386
|
] }),
|
|
378
387
|
/* @__PURE__ */ e.jsx("div", { className: "", children: u.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: [
|
|
379
388
|
/* @__PURE__ */ e.jsxs("p", { className: "text-center", children: [
|
|
@@ -382,36 +391,36 @@ const st = ({
|
|
|
382
391
|
t.createKey && "Get started and create your first key."
|
|
383
392
|
] }),
|
|
384
393
|
t.createKey && /* @__PURE__ */ e.jsx(
|
|
385
|
-
|
|
394
|
+
se,
|
|
386
395
|
{
|
|
387
396
|
service: t,
|
|
388
397
|
isOpen: d,
|
|
389
|
-
onOpenChange:
|
|
398
|
+
onOpenChange: y
|
|
390
399
|
}
|
|
391
400
|
)
|
|
392
401
|
] }) : /* @__PURE__ */ e.jsx(
|
|
393
402
|
"ul",
|
|
394
403
|
{
|
|
395
|
-
className:
|
|
404
|
+
className: L(
|
|
396
405
|
"grid grid-cols-[1fr_min-content] divide-y divide-border col-span-6"
|
|
397
406
|
),
|
|
398
407
|
children: u.map((o) => /* @__PURE__ */ e.jsxs(
|
|
399
|
-
|
|
408
|
+
Ae,
|
|
400
409
|
{
|
|
401
410
|
className: "grid grid-cols-subgrid col-span-full items-center mb-4 group",
|
|
402
411
|
children: [
|
|
403
|
-
/* @__PURE__ */ e.jsxs(
|
|
412
|
+
/* @__PURE__ */ e.jsxs(Ie, { className: "border-b col-span-full grid-cols-subgrid grid", children: [
|
|
404
413
|
/* @__PURE__ */ e.jsxs("div", { className: "h-10 flex flex-col text-sm justify-center", children: [
|
|
405
414
|
/* @__PURE__ */ e.jsxs("div", { className: "font-medium text-lg flex items-center gap-2", children: [
|
|
406
415
|
n === o.id ? /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 w-full", children: [
|
|
407
416
|
/* @__PURE__ */ e.jsx(
|
|
408
|
-
|
|
417
|
+
oe,
|
|
409
418
|
{
|
|
410
419
|
maxLength: 32,
|
|
411
420
|
value: a,
|
|
412
421
|
onChange: (c) => l(c.target.value),
|
|
413
422
|
onKeyDown: (c) => {
|
|
414
|
-
c.key === "Enter" ?
|
|
423
|
+
c.key === "Enter" ? m(o.id) : c.key === "Escape" && K();
|
|
415
424
|
},
|
|
416
425
|
className: "text-lg font-medium",
|
|
417
426
|
autoFocus: !0
|
|
@@ -419,22 +428,22 @@ const st = ({
|
|
|
419
428
|
),
|
|
420
429
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
421
430
|
/* @__PURE__ */ e.jsx(
|
|
422
|
-
|
|
431
|
+
v,
|
|
423
432
|
{
|
|
424
433
|
size: "icon",
|
|
425
434
|
variant: "ghost",
|
|
426
|
-
onClick: () =>
|
|
435
|
+
onClick: () => m(o.id),
|
|
427
436
|
disabled: !a.trim(),
|
|
428
437
|
children: /* @__PURE__ */ e.jsx(ue, { size: 16 })
|
|
429
438
|
}
|
|
430
439
|
),
|
|
431
440
|
/* @__PURE__ */ e.jsx(
|
|
432
|
-
|
|
441
|
+
v,
|
|
433
442
|
{
|
|
434
443
|
size: "icon",
|
|
435
444
|
variant: "ghost",
|
|
436
|
-
onClick:
|
|
437
|
-
children: /* @__PURE__ */ e.jsx(
|
|
445
|
+
onClick: K,
|
|
446
|
+
children: /* @__PURE__ */ e.jsx(fe, { size: 16 })
|
|
438
447
|
}
|
|
439
448
|
)
|
|
440
449
|
] })
|
|
@@ -456,24 +465,24 @@ const st = ({
|
|
|
456
465
|
] }),
|
|
457
466
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-end", children: [
|
|
458
467
|
t.updateConsumer && /* @__PURE__ */ e.jsxs(
|
|
459
|
-
|
|
468
|
+
v,
|
|
460
469
|
{
|
|
461
470
|
variant: "ghost",
|
|
462
|
-
onClick: () =>
|
|
463
|
-
className:
|
|
471
|
+
onClick: () => k(o.id, o.label),
|
|
472
|
+
className: L(
|
|
464
473
|
"flex gap-2",
|
|
465
474
|
n === o.id && "opacity-0! pointer-events-none"
|
|
466
475
|
),
|
|
467
476
|
disabled: n === o.id,
|
|
468
477
|
children: [
|
|
469
|
-
/* @__PURE__ */ e.jsx(
|
|
478
|
+
/* @__PURE__ */ e.jsx(he, { size: 16 }),
|
|
470
479
|
/* @__PURE__ */ e.jsx("span", { className: "hidden md:block", children: "Edit label" })
|
|
471
480
|
]
|
|
472
481
|
}
|
|
473
482
|
),
|
|
474
|
-
t.rollKey && /* @__PURE__ */ e.jsxs(
|
|
483
|
+
t.rollKey && /* @__PURE__ */ e.jsxs(B, { children: [
|
|
475
484
|
/* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
476
|
-
|
|
485
|
+
v,
|
|
477
486
|
{
|
|
478
487
|
title: "Roll this key",
|
|
479
488
|
variant: "ghost",
|
|
@@ -494,12 +503,12 @@ const st = ({
|
|
|
494
503
|
/* @__PURE__ */ e.jsxs(J, { children: [
|
|
495
504
|
/* @__PURE__ */ e.jsxs(U, { children: [
|
|
496
505
|
/* @__PURE__ */ e.jsx(W, { children: "Roll API Key" }),
|
|
497
|
-
/* @__PURE__ */ e.jsx(
|
|
506
|
+
/* @__PURE__ */ e.jsx(ae, { children: "Are you sure you want to roll this API key?" })
|
|
498
507
|
] }),
|
|
499
|
-
/* @__PURE__ */ e.jsxs(
|
|
500
|
-
/* @__PURE__ */ e.jsx(
|
|
501
|
-
/* @__PURE__ */ e.jsx(
|
|
502
|
-
|
|
508
|
+
/* @__PURE__ */ e.jsxs(V, { children: [
|
|
509
|
+
/* @__PURE__ */ e.jsx(P, { asChild: !0, children: /* @__PURE__ */ e.jsx(v, { variant: "outline", children: "Cancel" }) }),
|
|
510
|
+
/* @__PURE__ */ e.jsx(P, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
511
|
+
v,
|
|
503
512
|
{
|
|
504
513
|
onClick: () => {
|
|
505
514
|
p.mutate(o.id);
|
|
@@ -512,18 +521,18 @@ const st = ({
|
|
|
512
521
|
] })
|
|
513
522
|
] })
|
|
514
523
|
] }),
|
|
515
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(tt, { children: o.apiKeys.map((c) => /* @__PURE__ */ e.jsxs(
|
|
524
|
+
/* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(tt, { children: o.apiKeys.map((c) => /* @__PURE__ */ e.jsxs(ke.Fragment, { children: [
|
|
516
525
|
/* @__PURE__ */ e.jsx(
|
|
517
526
|
at,
|
|
518
527
|
{
|
|
519
528
|
apiKey: c,
|
|
520
529
|
onDeleteKey: () => {
|
|
521
|
-
|
|
530
|
+
h.mutate({
|
|
522
531
|
consumerId: o.id,
|
|
523
532
|
keyId: c.id
|
|
524
533
|
});
|
|
525
534
|
},
|
|
526
|
-
className:
|
|
535
|
+
className: h.variables?.keyId === c.id && (h.isPending || f) ? "opacity-10!" : void 0
|
|
527
536
|
}
|
|
528
537
|
),
|
|
529
538
|
/* @__PURE__ */ e.jsx("div", { className: "col-span-full h-px bg-border" })
|
|
@@ -535,7 +544,7 @@ const st = ({
|
|
|
535
544
|
}
|
|
536
545
|
) })
|
|
537
546
|
] });
|
|
538
|
-
},
|
|
547
|
+
}, rt = (t) => {
|
|
539
548
|
const r = /* @__PURE__ */ new Date(), s = new Date(t), n = Math.floor((r.getTime() - s.getTime()) / 1e3), i = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
|
|
540
549
|
return n < 60 ? i.format(-n, "second") : n < 3600 ? i.format(-Math.floor(n / 60), "minute") : n < 86400 ? i.format(-Math.floor(n / 3600), "hour") : n < 2592e3 ? i.format(-Math.floor(n / 86400), "day") : n < 31536e3 ? i.format(-Math.floor(n / 2592e3), "month") : i.format(-Math.floor(n / 31536e3), "year");
|
|
541
550
|
}, at = ({
|
|
@@ -543,17 +552,17 @@ const st = ({
|
|
|
543
552
|
onDeleteKey: r,
|
|
544
553
|
className: s
|
|
545
554
|
}) => {
|
|
546
|
-
const [n, i] =
|
|
555
|
+
const [n, i] = D(!1), { key: a, createdOn: l, expiresOn: u } = t, f = u && new Date(u) < /* @__PURE__ */ new Date(), d = u ? Math.ceil(
|
|
547
556
|
(new Date(u).getTime() - Date.now()) / (1e3 * 60 * 60 * 24)
|
|
548
|
-
) : 1 / 0,
|
|
549
|
-
return /* @__PURE__ */ e.jsxs("div", { className:
|
|
557
|
+
) : 1 / 0, y = d <= 7 && !f;
|
|
558
|
+
return /* @__PURE__ */ e.jsxs("div", { className: L("grid col-span-full grid-cols-subgrid p-6", s), children: [
|
|
550
559
|
/* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
551
560
|
/* @__PURE__ */ e.jsx(
|
|
552
|
-
|
|
561
|
+
qe,
|
|
553
562
|
{
|
|
554
563
|
className: "max-w-fit w-full",
|
|
555
564
|
secret: a,
|
|
556
|
-
status:
|
|
565
|
+
status: f ? "expired" : y ? "expiring" : "active",
|
|
557
566
|
revealed: n,
|
|
558
567
|
onReveal: i
|
|
559
568
|
}
|
|
@@ -561,35 +570,35 @@ const st = ({
|
|
|
561
570
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 mt-0.5 text-nowrap", children: [
|
|
562
571
|
l && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
563
572
|
"Created ",
|
|
564
|
-
|
|
573
|
+
rt(l),
|
|
565
574
|
"."
|
|
566
575
|
] }),
|
|
567
576
|
" ",
|
|
568
|
-
u &&
|
|
577
|
+
u && y && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
|
|
569
578
|
"Expires in ",
|
|
570
579
|
d,
|
|
571
580
|
" ",
|
|
572
581
|
d === 1 ? "day" : "days",
|
|
573
582
|
"."
|
|
574
583
|
] }),
|
|
575
|
-
u &&
|
|
584
|
+
u && f && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-primary", children: [
|
|
576
585
|
"Expired",
|
|
577
586
|
" ",
|
|
578
587
|
d === 0 ? "today." : `${d * -1} days ago.`
|
|
579
588
|
] })
|
|
580
589
|
] })
|
|
581
590
|
] }),
|
|
582
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: u && r && /* @__PURE__ */ e.jsxs(
|
|
583
|
-
/* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
591
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: u && r && /* @__PURE__ */ e.jsxs(B, { children: [
|
|
592
|
+
/* @__PURE__ */ e.jsx(G, { asChild: !0, children: /* @__PURE__ */ e.jsx(v, { variant: "ghost", size: "icon", children: /* @__PURE__ */ e.jsx(me, { size: 16 }) }) }),
|
|
584
593
|
/* @__PURE__ */ e.jsxs(J, { children: [
|
|
585
594
|
/* @__PURE__ */ e.jsxs(U, { children: [
|
|
586
595
|
/* @__PURE__ */ e.jsx(W, { children: "Delete API Key" }),
|
|
587
|
-
/* @__PURE__ */ e.jsx(
|
|
596
|
+
/* @__PURE__ */ e.jsx(ae, { children: "Are you sure you want to delete this API key?" })
|
|
588
597
|
] }),
|
|
589
|
-
/* @__PURE__ */ e.jsxs(
|
|
590
|
-
/* @__PURE__ */ e.jsx(
|
|
591
|
-
/* @__PURE__ */ e.jsx(
|
|
592
|
-
|
|
598
|
+
/* @__PURE__ */ e.jsxs(V, { children: [
|
|
599
|
+
/* @__PURE__ */ e.jsx(P, { asChild: !0, children: /* @__PURE__ */ e.jsx(v, { variant: "outline", children: "Cancel" }) }),
|
|
600
|
+
/* @__PURE__ */ e.jsx(P, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
601
|
+
v,
|
|
593
602
|
{
|
|
594
603
|
onClick: () => {
|
|
595
604
|
r();
|
|
@@ -601,13 +610,13 @@ const st = ({
|
|
|
601
610
|
] })
|
|
602
611
|
] }) })
|
|
603
612
|
] });
|
|
604
|
-
},
|
|
613
|
+
}, R = "https://api.zuploedge.com/v2/client", ot = async (t) => {
|
|
605
614
|
try {
|
|
606
615
|
return await t.json();
|
|
607
616
|
} catch {
|
|
608
617
|
return;
|
|
609
618
|
}
|
|
610
|
-
},
|
|
619
|
+
}, S = async (t) => {
|
|
611
620
|
const r = t.headers.get("content-type");
|
|
612
621
|
if (!t.ok && r?.includes("application/problem+json")) {
|
|
613
622
|
const s = await ot(t);
|
|
@@ -617,20 +626,20 @@ const st = ({
|
|
|
617
626
|
}, lt = (t, r) => ({
|
|
618
627
|
deleteKey: async (s, n, i) => {
|
|
619
628
|
const a = new Request(
|
|
620
|
-
|
|
629
|
+
R + `/${t}/consumers/${s}/keys/${n}`,
|
|
621
630
|
{
|
|
622
631
|
method: "DELETE"
|
|
623
632
|
}
|
|
624
633
|
);
|
|
625
634
|
await i.signRequest(a);
|
|
626
635
|
const l = await fetch(a);
|
|
627
|
-
await
|
|
636
|
+
await S(l), A(l.ok, "Failed to delete API key");
|
|
628
637
|
},
|
|
629
638
|
updateConsumer: async (s, n) => {
|
|
630
639
|
const i = await fetch(
|
|
631
640
|
await n.signRequest(
|
|
632
641
|
new Request(
|
|
633
|
-
|
|
642
|
+
R + `/${t}/consumers/${s.id}`,
|
|
634
643
|
{
|
|
635
644
|
method: "PATCH",
|
|
636
645
|
headers: {
|
|
@@ -643,13 +652,13 @@ const st = ({
|
|
|
643
652
|
)
|
|
644
653
|
)
|
|
645
654
|
);
|
|
646
|
-
await
|
|
655
|
+
await S(i), A(i.ok, "Failed to update API key description");
|
|
647
656
|
},
|
|
648
657
|
rollKey: async (s, n) => {
|
|
649
658
|
const i = await fetch(
|
|
650
659
|
await n.signRequest(
|
|
651
660
|
new Request(
|
|
652
|
-
|
|
661
|
+
R + `/${t}/consumers/${s}/roll-key`,
|
|
653
662
|
{
|
|
654
663
|
method: "POST",
|
|
655
664
|
headers: {
|
|
@@ -660,15 +669,15 @@ const st = ({
|
|
|
660
669
|
)
|
|
661
670
|
)
|
|
662
671
|
);
|
|
663
|
-
await
|
|
672
|
+
await S(i), A(i.ok, "Failed to delete API key");
|
|
664
673
|
},
|
|
665
674
|
getConsumers: async (s) => {
|
|
666
675
|
const n = new Request(
|
|
667
|
-
`${
|
|
676
|
+
`${R}/${t}/consumers`
|
|
668
677
|
);
|
|
669
678
|
await s.signRequest(n);
|
|
670
679
|
const i = await fetch(n);
|
|
671
|
-
return await
|
|
680
|
+
return await S(i), A(i.ok, "Failed to fetch API keys"), (await i.json()).data.map((l) => ({
|
|
672
681
|
id: l.id,
|
|
673
682
|
label: l.label || l.subject || "API Key",
|
|
674
683
|
apiKeys: l.apiKeys.data,
|
|
@@ -676,7 +685,7 @@ const st = ({
|
|
|
676
685
|
}));
|
|
677
686
|
},
|
|
678
687
|
...r
|
|
679
|
-
}),
|
|
688
|
+
}), Pt = (t) => t, At = (t) => {
|
|
680
689
|
const r = "deploymentName" in t ? lt(t.deploymentName, t) : t;
|
|
681
690
|
return {
|
|
682
691
|
getProfileMenuItems: () => [
|
|
@@ -703,12 +712,12 @@ const st = ({
|
|
|
703
712
|
},
|
|
704
713
|
getRoutes: () => [
|
|
705
714
|
{
|
|
706
|
-
element: /* @__PURE__ */ e.jsx(
|
|
715
|
+
element: /* @__PURE__ */ e.jsx(Le, {}),
|
|
707
716
|
errorElement: /* @__PURE__ */ e.jsx(ye, {}),
|
|
708
717
|
children: [
|
|
709
718
|
{
|
|
710
719
|
path: "/settings/api-keys",
|
|
711
|
-
element: /* @__PURE__ */ e.jsx(
|
|
720
|
+
element: /* @__PURE__ */ e.jsx(it, { service: r })
|
|
712
721
|
}
|
|
713
722
|
]
|
|
714
723
|
}
|
|
@@ -717,6 +726,6 @@ const st = ({
|
|
|
717
726
|
};
|
|
718
727
|
export {
|
|
719
728
|
At as apiKeyPlugin,
|
|
720
|
-
|
|
729
|
+
Pt as createApiKeyService
|
|
721
730
|
};
|
|
722
731
|
//# sourceMappingURL=zudoku.plugin-api-keys.js.map
|