zudoku 0.0.0-fix-downgrade-openapi-parser.aac00796 → 0.0.0-fix-prevent-full-deref-allof.b02efbe5
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/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 +57 -25
- 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 +532 -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/config.js +7 -1
- 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/Button-CynVW1JV.js +53 -0
- package/lib/Button-CynVW1JV.js.map +1 -0
- package/lib/ClaudeLogo-PxFjou9w.js +69 -0
- package/lib/ClaudeLogo-PxFjou9w.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-BqjbNHIn.js} +475 -456
- package/lib/ErrorAlert-BqjbNHIn.js.map +1 -0
- package/lib/IndexingDialog-B5zCiUKr.js +100 -0
- package/lib/IndexingDialog-B5zCiUKr.js.map +1 -0
- package/lib/MdxPage-CVFatbHw.js +210 -0
- package/lib/MdxPage-CVFatbHw.js.map +1 -0
- package/lib/Mermaid-CIFixY6C.js +102 -0
- package/lib/Mermaid-CIFixY6C.js.map +1 -0
- package/lib/{OAuthErrorPage-BycMozgn.js → OAuthErrorPage-Dup79DJk.js} +7 -7
- package/lib/{OAuthErrorPage-BycMozgn.js.map → OAuthErrorPage-Dup79DJk.js.map} +1 -1
- package/lib/OasProvider-C10RPbY8.js +40 -0
- package/lib/OasProvider-C10RPbY8.js.map +1 -0
- package/lib/OperationList--zX7OAlH.js +5824 -0
- package/lib/OperationList--zX7OAlH.js.map +1 -0
- package/lib/RouteGuard-BXy13JSz.js +77 -0
- package/lib/RouteGuard-BXy13JSz.js.map +1 -0
- package/lib/RouterError-CKOZTsDD.js +42 -0
- package/lib/RouterError-CKOZTsDD.js.map +1 -0
- package/lib/{SchemaList-xZSf3IMh.js → SchemaList-CxafJA_P.js} +28 -27
- package/lib/SchemaList-CxafJA_P.js.map +1 -0
- package/lib/SchemaView-j0PtjY8U.js +597 -0
- package/lib/SchemaView-j0PtjY8U.js.map +1 -0
- package/lib/Select-VmDZ-nKe.js +337 -0
- package/lib/Select-VmDZ-nKe.js.map +1 -0
- package/lib/{SignUp-6SGx9Yyq.js → SignUp-Pm_LGm6T.js} +13 -13
- package/lib/{SignUp-6SGx9Yyq.js.map → SignUp-Pm_LGm6T.js.map} +1 -1
- package/lib/{SyntaxHighlight-zvlnSnHB.js → SyntaxHighlight-bkmst3oV.js} +710 -662
- package/lib/{SyntaxHighlight-zvlnSnHB.js.map → SyntaxHighlight-bkmst3oV.js.map} +1 -1
- package/lib/{Toc-Da9yp7lo.js → Toc-TUXNFbKl.js} +2 -2
- package/lib/{Toc-Da9yp7lo.js.map → Toc-TUXNFbKl.js.map} +1 -1
- package/lib/{ZudokuContext-BUZ5hkWB.js → ZudokuContext-np1wheDl.js} +8 -8
- package/lib/{ZudokuContext-BUZ5hkWB.js.map → ZudokuContext-np1wheDl.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-GQ_uaom2.js} +6360 -5953
- package/lib/circular-GQ_uaom2.js.map +1 -0
- package/lib/createServer-sU0O9wfJ.js +16693 -0
- package/lib/createServer-sU0O9wfJ.js.map +1 -0
- package/lib/{errors-CuGgh3hf.js → errors-B0hNTPFO.js} +3 -3
- package/lib/{errors-CuGgh3hf.js.map → errors-B0hNTPFO.js.map} +1 -1
- package/lib/{hook-CMeoxziF.js → hook-CvSwcbk6.js} +3 -3
- package/lib/{hook-CMeoxziF.js.map → hook-CvSwcbk6.js.map} +1 -1
- package/lib/index-B6SRNBIt.js +3700 -0
- package/lib/index-B6SRNBIt.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/index-DnMgJWrI.js +133 -0
- package/lib/index-DnMgJWrI.js.map +1 -0
- package/lib/{index-rYHsvtTo.js → index-DscsS121.js} +2 -2
- package/lib/{index-rYHsvtTo.js.map → index-DscsS121.js.map} +1 -1
- package/lib/{index-B1rmok4X.js → index-mfkNWYG-.js} +10 -10
- package/lib/{index-B1rmok4X.js.map → index-mfkNWYG-.js.map} +1 -1
- 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-BlmnL5qL.js} +2 -2
- package/lib/{mutation-BSU0xu4m.js.map → mutation-BlmnL5qL.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/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-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 +223 -198
- 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 +36 -23
- package/src/app/main.css +1 -1
- package/src/app/main.tsx +5 -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 +74 -32
- 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 +637 -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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zudoku.plugins.js","sources":["../src/lib/core/plugins.ts"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\nimport type {
|
|
1
|
+
{"version":3,"file":"zudoku.plugins.js","sources":["../src/lib/core/plugins.ts"],"sourcesContent":["import type { LucideIcon } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport type { Location, RouteObject } from \"react-router\";\nimport type { Navigation } from \"../../config/validators/NavigationSchema.js\";\nimport type { ProtectedRoutesInput } from \"../../config/validators/ProtectedRoutesSchema.js\";\nimport type { AuthenticationPlugin } from \"../authentication/authentication.js\";\nimport type { MdxComponentsType } from \"../util/MdxComponents.js\";\nimport type {\n ApiIdentity,\n ZudokuContext,\n ZudokuEvents,\n} from \"./ZudokuContext.js\";\n\nexport type ZudokuPlugin =\n | CommonPlugin\n | ProfileMenuPlugin\n | NavigationPlugin\n | ApiIdentityPlugin\n | SearchProviderPlugin\n | EventConsumerPlugin\n | AuthenticationPlugin;\n\nexport type { AuthenticationPlugin, RouteObject };\n\nexport interface NavigationPlugin {\n getRoutes: () => RouteObject[];\n getNavigation?: (path: string, context: ZudokuContext) => Promise<Navigation>;\n getProtectedRoutes?: () => ProtectedRoutesInput;\n}\n\nexport const createApiIdentityPlugin = (\n plugin: ApiIdentityPlugin,\n): ApiIdentityPlugin => plugin;\n\nexport const createProfileMenuPlugin = (\n plugin: ProfileMenuPlugin,\n): ProfileMenuPlugin => plugin;\n\nexport interface ApiIdentityPlugin {\n getIdentities: (context: ZudokuContext) => Promise<ApiIdentity[]>;\n}\n\nexport interface SearchProviderPlugin {\n renderSearch: (o: {\n isOpen: boolean;\n onClose: () => void;\n }) => React.JSX.Element | null;\n}\n\nexport interface ProfileMenuPlugin {\n getProfileMenuItems: (context: ZudokuContext) => ProfileNavigationItem[];\n}\n\nexport type ProfileNavigationItem = {\n label: string;\n path?: string;\n weight?: number;\n category?: \"top\" | \"middle\" | \"bottom\";\n children?: ProfileNavigationItem[];\n icon?: LucideIcon;\n};\n\nexport interface CommonPlugin {\n initialize?: (\n context: ZudokuContext,\n ) => Promise<void | boolean> | void | boolean;\n getHead?: (args: { location: Location }) => ReactNode | undefined;\n getMdxComponents?: () => MdxComponentsType;\n}\n\nexport type EventConsumerPlugin<Event extends ZudokuEvents = ZudokuEvents> = {\n events: { [K in keyof Event]?: Event[K] };\n};\n\nexport const isEventConsumerPlugin = (\n obj: ZudokuPlugin,\n): obj is EventConsumerPlugin =>\n \"events\" in obj && typeof obj.events === \"object\";\n\nexport const isProfileMenuPlugin = (\n obj: ZudokuPlugin,\n): obj is ProfileMenuPlugin =>\n \"getProfileMenuItems\" in obj && typeof obj.getProfileMenuItems === \"function\";\n\nexport const isNavigationPlugin = (\n obj: ZudokuPlugin,\n): obj is NavigationPlugin =>\n \"getRoutes\" in obj && typeof obj.getRoutes === \"function\";\n\nexport const isAuthenticationPlugin = (\n obj: ZudokuPlugin,\n): obj is AuthenticationPlugin =>\n \"signUp\" in obj && typeof obj.signUp === \"function\";\n\nexport const isSearchPlugin = (\n obj: ZudokuPlugin,\n): obj is SearchProviderPlugin =>\n \"renderSearch\" in obj && typeof obj.renderSearch === \"function\";\n\nexport const needsInitialization = (obj: ZudokuPlugin): obj is CommonPlugin =>\n \"initialize\" in obj && typeof obj.initialize === \"function\";\n\nexport const hasHead = (obj: ZudokuPlugin): obj is CommonPlugin =>\n \"getHead\" in obj && typeof obj.getHead === \"function\";\n\nexport const isMdxProviderPlugin = (obj: ZudokuPlugin): obj is CommonPlugin =>\n \"getMdxComponents\" in obj && typeof obj.getMdxComponents === \"function\";\n\nexport const isApiIdentityPlugin = (\n obj: ZudokuPlugin,\n): obj is ApiIdentityPlugin =>\n \"getIdentities\" in obj && typeof obj.getIdentities === \"function\";\n"],"names":["createApiIdentityPlugin","plugin","createProfileMenuPlugin","isEventConsumerPlugin","obj","isProfileMenuPlugin","isNavigationPlugin","isAuthenticationPlugin","isSearchPlugin","needsInitialization","hasHead","isMdxProviderPlugin","isApiIdentityPlugin"],"mappings":"AA8BO,MAAMA,IAA0B,CACrCC,MACsBA,GAEXC,IAA0B,CACrCD,MACsBA,GAsCXE,IAAwB,CACnCC,MAEA,YAAYA,KAAO,OAAOA,EAAI,UAAW,UAE9BC,IAAsB,CACjCD,MAEA,yBAAyBA,KAAO,OAAOA,EAAI,uBAAwB,YAExDE,IAAqB,CAChCF,MAEA,eAAeA,KAAO,OAAOA,EAAI,aAAc,YAEpCG,IAAyB,CACpCH,MAEA,YAAYA,KAAO,OAAOA,EAAI,UAAW,YAE9BI,IAAiB,CAC5BJ,MAEA,kBAAkBA,KAAO,OAAOA,EAAI,gBAAiB,YAE1CK,IAAsB,CAACL,MAClC,gBAAgBA,KAAO,OAAOA,EAAI,cAAe,YAEtCM,IAAU,CAACN,MACtB,aAAaA,KAAO,OAAOA,EAAI,WAAY,YAEhCO,IAAsB,CAACP,MAClC,sBAAsBA,KAAO,OAAOA,EAAI,oBAAqB,YAElDQ,IAAsB,CACjCR,MAEA,mBAAmBA,KAAO,OAAOA,EAAI,iBAAkB;"}
|
package/lib/zudoku.router.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { f as We, s as $, g as ve, F as j, R as qe, S as Se, h as Ge,
|
|
2
|
-
import { a2 as Ur, a3 as Mr, a4 as Nr, a5 as Or, a6 as zr, a7 as Br, a8 as $r, L as jr, a9 as Vr, aa as Wr, ab as qr, ac as Gr, N as Xr, ad as Yr, ae as Jr, af as Kr, ag as Qr, ah as Zr, ai as ea, aj as ta, ak as ra, al as aa, am as na, an as oa, ao as sa, ap as ia, aq as la, ar as ua, as as da, at as ca, au as fa, av as ha, aw as pa, ax as ma, ay as ya, az as Ra, aA as wa, aB as ga, aC as va, aD as Sa, aE as Ea, aF as _a, aG as ba, aH as Ca, aI as Da, aJ as Aa, aK as xa, aL as Fa, m as ka, aM as La, aN as Ta, aO as Ha, aP as Ia, aQ as Pa, aR as Ua, aS as Ma, aT as Na, aU as Oa, aV as za, aW as Ba, aX as $a, aY as ja, aZ as Va, a_ as Wa, a$ as qa, b0 as Ga,
|
|
1
|
+
import { f as We, s as $, g as ve, F as j, R as qe, S as Se, h as Ge, d as Xe, E as D, j as Ee, k as X, l as U, n as Ye, o as oe, p as Je, q as Ke, t as _e, v as Qe, w as be, x as Ce, i as A, y as De, z as Ze, A as C, B as et, C as tt, D as rt, G as at, O as nt, H as L, I as ot, J as st, K as it, M as lt, P as T, Q as ut, T as dt, r as ct, U as Z, V as ft, W as ht, X as pt, Y as mt, Z as yt, _ as Rt, $ as wt, a0 as gt, a1 as vt } from "./chunk-PVWAREVJ-dLIqswPy.js";
|
|
2
|
+
import { a2 as Ur, a3 as Mr, a4 as Nr, a5 as Or, a6 as zr, a7 as Br, a8 as $r, L as jr, a9 as Vr, aa as Wr, ab as qr, ac as Gr, N as Xr, ad as Yr, ae as Jr, af as Kr, ag as Qr, ah as Zr, ai as ea, aj as ta, ak as ra, al as aa, am as na, an as oa, ao as sa, ap as ia, aq as la, ar as ua, as as da, at as ca, au as fa, av as ha, aw as pa, ax as ma, ay as ya, az as Ra, aA as wa, aB as ga, aC as va, aD as Sa, aE as Ea, aF as _a, aG as ba, aH as Ca, aI as Da, aJ as Aa, aK as xa, aL as Fa, m as ka, aM as La, aN as Ta, aO as Ha, aP as Ia, aQ as Pa, aR as Ua, aS as Ma, aT as Na, aU as Oa, aV as za, aW as Ba, aX as $a, aY as ja, aZ as Va, a_ as Wa, a$ as qa, b0 as Ga, a as Xa, e as Ya, b1 as Ja, u as Ka, b2 as Qa, b3 as Za, b4 as en, b5 as tn, c as rn, b6 as an, b7 as nn, b8 as on, b9 as sn, b as ln, ba as un, bb as dn } from "./chunk-PVWAREVJ-dLIqswPy.js";
|
|
3
3
|
import * as g from "react";
|
|
4
4
|
import E from "react";
|
|
5
5
|
import * as St from "react-dom";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zudoku",
|
|
3
|
-
"version": "0.0.0-fix-
|
|
3
|
+
"version": "0.0.0-fix-prevent-full-deref-allof.b02efbe5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"homepage": "https://zudoku.dev",
|
|
6
6
|
"repository": {
|
|
@@ -103,6 +103,10 @@
|
|
|
103
103
|
"import": "./lib/zudoku.components.js",
|
|
104
104
|
"types": "./dist/lib/components/index.d.ts"
|
|
105
105
|
},
|
|
106
|
+
"./mermaid": {
|
|
107
|
+
"import": "./lib/zudoku.mermaid.js",
|
|
108
|
+
"types": "./dist/lib/components/Mermaid.d.ts"
|
|
109
|
+
},
|
|
106
110
|
"./__internal": {
|
|
107
111
|
"import": "./lib/zudoku.__internal.js",
|
|
108
112
|
"types": "./dist/lib/__internal.d.ts"
|
|
@@ -161,6 +165,7 @@
|
|
|
161
165
|
"@radix-ui/react-radio-group": "1.3.8",
|
|
162
166
|
"@radix-ui/react-scroll-area": "1.2.10",
|
|
163
167
|
"@radix-ui/react-select": "2.2.6",
|
|
168
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
164
169
|
"@radix-ui/react-slider": "1.3.6",
|
|
165
170
|
"@radix-ui/react-slot": "1.2.4",
|
|
166
171
|
"@radix-ui/react-switch": "1.2.6",
|
|
@@ -169,26 +174,26 @@
|
|
|
169
174
|
"@radix-ui/react-toggle-group": "1.1.11",
|
|
170
175
|
"@radix-ui/react-tooltip": "1.2.8",
|
|
171
176
|
"@radix-ui/react-visually-hidden": "1.2.4",
|
|
172
|
-
"@scalar/openapi-parser": "0.
|
|
177
|
+
"@scalar/openapi-parser": "0.23.2",
|
|
173
178
|
"@sentry/node": "9.26.0",
|
|
174
|
-
"@shikijs/engine-javascript": "3.
|
|
175
|
-
"@shikijs/langs": "3.
|
|
176
|
-
"@shikijs/rehype": "3.
|
|
177
|
-
"@shikijs/themes": "3.
|
|
178
|
-
"@shikijs/transformers": "3.
|
|
179
|
+
"@shikijs/engine-javascript": "3.17.0",
|
|
180
|
+
"@shikijs/langs": "3.17.0",
|
|
181
|
+
"@shikijs/rehype": "3.17.0",
|
|
182
|
+
"@shikijs/themes": "3.17.0",
|
|
183
|
+
"@shikijs/transformers": "3.17.0",
|
|
179
184
|
"@sindresorhus/slugify": "3.0.0",
|
|
180
185
|
"@stefanprobst/rehype-extract-toc": "3.0.0",
|
|
181
186
|
"@tailwindcss/typography": "0.5.19",
|
|
182
187
|
"@tailwindcss/vite": "4.1.16",
|
|
183
188
|
"@tanem/react-nprogress": "5.0.56",
|
|
184
189
|
"@tanstack/react-query": "5.85.5",
|
|
185
|
-
"@types/react": "19.2.
|
|
190
|
+
"@types/react": "19.2.7",
|
|
186
191
|
"@types/react-dom": "19.2.0",
|
|
187
192
|
"@vitejs/plugin-react": "5.1.0",
|
|
193
|
+
"@x0k/json-schema-merge": "1.0.2",
|
|
188
194
|
"@zudoku/httpsnippet": "10.0.9",
|
|
189
195
|
"@zudoku/react-helmet-async": "2.0.5",
|
|
190
196
|
"@zuplo/mcp": "^0.0.22",
|
|
191
|
-
"allof-merge": "0.6.7",
|
|
192
197
|
"class-variance-authority": "0.7.1",
|
|
193
198
|
"clsx": "2.1.1",
|
|
194
199
|
"cmdk": "1.1.1",
|
|
@@ -196,9 +201,9 @@
|
|
|
196
201
|
"estree-util-value-to-estree": "3.4.1",
|
|
197
202
|
"express": "5.1.0",
|
|
198
203
|
"fast-equals": "5.2.2",
|
|
199
|
-
"glob": "
|
|
204
|
+
"glob": "13.0.0",
|
|
200
205
|
"glob-parent": "6.0.2",
|
|
201
|
-
"graphql": "16.
|
|
206
|
+
"graphql": "16.12.0",
|
|
202
207
|
"graphql-type-json": "0.3.2",
|
|
203
208
|
"graphql-yoga": "5.16.0",
|
|
204
209
|
"gray-matter": "4.0.3",
|
|
@@ -209,14 +214,14 @@
|
|
|
209
214
|
"json-schema-to-typescript-lite": "15.0.0",
|
|
210
215
|
"loglevel": "1.9.2",
|
|
211
216
|
"lucide-react": "0.548.0",
|
|
212
|
-
"motion": "12.23.
|
|
217
|
+
"motion": "12.23.24",
|
|
213
218
|
"nanoevents": "^9.1.0",
|
|
214
219
|
"next-themes": "0.4.6",
|
|
215
220
|
"oauth4webapi": "2.17.0",
|
|
216
221
|
"openapi-types": "12.1.3",
|
|
217
|
-
"pagefind": "1.4.0
|
|
222
|
+
"pagefind": "1.4.0",
|
|
218
223
|
"picocolors": "1.1.1",
|
|
219
|
-
"piscina": "5.1.
|
|
224
|
+
"piscina": "5.1.4",
|
|
220
225
|
"posthog-node": "5.7.0",
|
|
221
226
|
"react-error-boundary": "6.0.0",
|
|
222
227
|
"react-hook-form": "7.66.0",
|
|
@@ -234,8 +239,8 @@
|
|
|
234
239
|
"remark-mdx-frontmatter": "5.2.0",
|
|
235
240
|
"rollup": "4.52.5",
|
|
236
241
|
"semver": "7.7.2",
|
|
237
|
-
"shiki": "3.
|
|
238
|
-
"sitemap": "
|
|
242
|
+
"shiki": "3.17.0",
|
|
243
|
+
"sitemap": "9.0.0",
|
|
239
244
|
"strip-ansi": "7.1.2",
|
|
240
245
|
"tailwind-merge": "3.3.1",
|
|
241
246
|
"tailwindcss": "4.1.16",
|
|
@@ -251,13 +256,13 @@
|
|
|
251
256
|
"zustand": "5.0.8"
|
|
252
257
|
},
|
|
253
258
|
"devDependencies": {
|
|
254
|
-
"@graphql-codegen/cli": "6.0
|
|
259
|
+
"@graphql-codegen/cli": "6.1.0",
|
|
255
260
|
"@inkeep/cxkit-types": "0.5.101",
|
|
256
261
|
"@testing-library/dom": "10.4.1",
|
|
257
262
|
"@testing-library/jest-dom": "6.9.1",
|
|
258
263
|
"@testing-library/react": "16.3.0",
|
|
259
264
|
"@types/estree": "1.0.8",
|
|
260
|
-
"@types/express": "5.0.
|
|
265
|
+
"@types/express": "5.0.5",
|
|
261
266
|
"@types/glob-parent": "5.1.3",
|
|
262
267
|
"@types/har-format": "1.2.16",
|
|
263
268
|
"@types/hast": "^3.0.4",
|
|
@@ -268,15 +273,15 @@
|
|
|
268
273
|
"@types/react-is": "19.2.0",
|
|
269
274
|
"@types/semver": "7.7.0",
|
|
270
275
|
"@types/unist": "^3.0.3",
|
|
271
|
-
"@types/yargs": "17.0.
|
|
276
|
+
"@types/yargs": "17.0.35",
|
|
272
277
|
"@vitest/coverage-v8": "3.2.4",
|
|
273
|
-
"esbuild": "0.
|
|
278
|
+
"esbuild": "0.27.0",
|
|
274
279
|
"happy-dom": "20.0.10",
|
|
275
280
|
"mdast-util-mdx": "3.0.0",
|
|
276
281
|
"react": "19.2.0",
|
|
277
282
|
"react-dom": "19.2.0",
|
|
278
|
-
"rollup-plugin-visualizer": "6.0.
|
|
279
|
-
"tsx": "4.20.
|
|
283
|
+
"rollup-plugin-visualizer": "6.0.5",
|
|
284
|
+
"tsx": "4.20.6",
|
|
280
285
|
"typescript": "5.9.3",
|
|
281
286
|
"vitest": "4.0.6"
|
|
282
287
|
},
|
|
@@ -284,9 +289,11 @@
|
|
|
284
289
|
"@azure/msal-browser": "^4.13.0",
|
|
285
290
|
"@clerk/clerk-js": "^5.63.1",
|
|
286
291
|
"@sentry/react": "^9.12.0",
|
|
287
|
-
"@supabase/supabase-js": "^2.49.4",
|
|
288
292
|
"@supabase/auth-ui-react": "^0.4.0",
|
|
289
293
|
"@supabase/auth-ui-shared": "^0.1.0",
|
|
294
|
+
"@supabase/supabase-js": "^2.49.4",
|
|
295
|
+
"firebase": "^12.6.0",
|
|
296
|
+
"mermaid": "^11.0.0",
|
|
290
297
|
"react": ">=19.2.0",
|
|
291
298
|
"react-dom": ">=19.2.0"
|
|
292
299
|
},
|
|
@@ -308,6 +315,12 @@
|
|
|
308
315
|
},
|
|
309
316
|
"@supabase/auth-ui-shared": {
|
|
310
317
|
"optional": true
|
|
318
|
+
},
|
|
319
|
+
"firebase": {
|
|
320
|
+
"optional": true
|
|
321
|
+
},
|
|
322
|
+
"mermaid": {
|
|
323
|
+
"optional": true
|
|
311
324
|
}
|
|
312
325
|
},
|
|
313
326
|
"scripts": {
|
package/src/app/main.css
CHANGED
package/src/app/main.tsx
CHANGED
|
@@ -90,7 +90,11 @@ export const getRoutesByOptions = (
|
|
|
90
90
|
}))
|
|
91
91
|
: [],
|
|
92
92
|
)
|
|
93
|
-
.concat([{ path: "*", element: <StatusPage statusCode={404} /> }])
|
|
93
|
+
.concat([{ path: "*", element: <StatusPage statusCode={404} /> }])
|
|
94
|
+
.map((route) => ({
|
|
95
|
+
...route,
|
|
96
|
+
errorElement: <RouterError className="w-full m-0" />,
|
|
97
|
+
}));
|
|
94
98
|
|
|
95
99
|
// @TODO Detect conflicts in routes and log warning
|
|
96
100
|
|
package/src/lib/auth/issuer.ts
CHANGED
|
@@ -28,9 +28,14 @@ class Auth0AuthenticationProvider
|
|
|
28
28
|
url: URL,
|
|
29
29
|
{ isSignUp }: { isSignUp: boolean },
|
|
30
30
|
) => {
|
|
31
|
-
if (this.options?.
|
|
31
|
+
if (this.options?.prompt !== undefined) {
|
|
32
|
+
if (this.options.prompt !== "") {
|
|
33
|
+
url.searchParams.set("prompt", this.options.prompt);
|
|
34
|
+
}
|
|
35
|
+
} else if (this.options?.alwaysPromptLogin !== false) {
|
|
32
36
|
url.searchParams.set("prompt", "login");
|
|
33
37
|
}
|
|
38
|
+
|
|
34
39
|
if (isSignUp) {
|
|
35
40
|
url.searchParams.set("screen_hint", "signup");
|
|
36
41
|
}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { type FirebaseApp, initializeApp } from "firebase/app";
|
|
2
|
+
import {
|
|
3
|
+
type Auth,
|
|
4
|
+
createUserWithEmailAndPassword,
|
|
5
|
+
getAuth,
|
|
6
|
+
signInWithEmailAndPassword,
|
|
7
|
+
signInWithPopup,
|
|
8
|
+
signOut,
|
|
9
|
+
type User,
|
|
10
|
+
} from "firebase/auth";
|
|
11
|
+
import type { FirebaseAuthenticationConfig } from "../../../config/config.js";
|
|
12
|
+
import { CoreAuthenticationPlugin } from "../AuthenticationPlugin.js";
|
|
13
|
+
import type {
|
|
14
|
+
AuthActionContext,
|
|
15
|
+
AuthActionOptions,
|
|
16
|
+
AuthenticationPlugin,
|
|
17
|
+
AuthenticationProviderInitializer,
|
|
18
|
+
} from "../authentication.js";
|
|
19
|
+
import { SignOut } from "../components/SignOut.js";
|
|
20
|
+
import { AuthorizationError } from "../errors.js";
|
|
21
|
+
import { useAuthState } from "../state.js";
|
|
22
|
+
import { ZudokuSignInUi, ZudokuSignUpUi } from "../ui/ZudokuAuthUi.js";
|
|
23
|
+
|
|
24
|
+
class FirebaseAuthenticationProvider
|
|
25
|
+
extends CoreAuthenticationPlugin
|
|
26
|
+
implements AuthenticationPlugin
|
|
27
|
+
{
|
|
28
|
+
private readonly app: FirebaseApp;
|
|
29
|
+
private readonly auth: Auth;
|
|
30
|
+
private readonly providers: string[];
|
|
31
|
+
|
|
32
|
+
constructor(config: FirebaseAuthenticationConfig) {
|
|
33
|
+
super();
|
|
34
|
+
|
|
35
|
+
this.app = initializeApp({
|
|
36
|
+
apiKey: config.apiKey,
|
|
37
|
+
authDomain: config.authDomain,
|
|
38
|
+
projectId: config.projectId,
|
|
39
|
+
storageBucket: config.storageBucket,
|
|
40
|
+
messagingSenderId: config.messagingSenderId,
|
|
41
|
+
appId: config.appId,
|
|
42
|
+
measurementId: config.measurementId,
|
|
43
|
+
});
|
|
44
|
+
this.auth = getAuth(this.app);
|
|
45
|
+
this.providers = config.providers ?? [];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async signRequest(request: Request): Promise<Request> {
|
|
49
|
+
const accessToken = await this.auth.currentUser?.getIdToken();
|
|
50
|
+
if (!accessToken) {
|
|
51
|
+
throw new AuthorizationError("User is not authenticated");
|
|
52
|
+
}
|
|
53
|
+
request.headers.set("Authorization", `Bearer ${accessToken}`);
|
|
54
|
+
return request;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
signUp = async (
|
|
58
|
+
{ navigate }: AuthActionContext,
|
|
59
|
+
{ redirectTo }: AuthActionOptions,
|
|
60
|
+
) => {
|
|
61
|
+
void navigate(
|
|
62
|
+
redirectTo
|
|
63
|
+
? `/signup?redirectTo=${encodeURIComponent(redirectTo)}`
|
|
64
|
+
: `/signup`,
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
signIn = async (
|
|
69
|
+
{ navigate }: AuthActionContext,
|
|
70
|
+
{ redirectTo }: AuthActionOptions,
|
|
71
|
+
) => {
|
|
72
|
+
void navigate(
|
|
73
|
+
redirectTo
|
|
74
|
+
? `/signin?redirectTo=${encodeURIComponent(redirectTo)}`
|
|
75
|
+
: `/signin`,
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
getRoutes = () => {
|
|
80
|
+
return [
|
|
81
|
+
{
|
|
82
|
+
path: "/signin",
|
|
83
|
+
element: (
|
|
84
|
+
<ZudokuSignInUi
|
|
85
|
+
providers={this.providers}
|
|
86
|
+
onOAuthSignIn={async (providerId: string) => {
|
|
87
|
+
useAuthState.setState({ isPending: true });
|
|
88
|
+
const provider = await getProviderForId(providerId);
|
|
89
|
+
if (!provider) {
|
|
90
|
+
throw new AuthorizationError(
|
|
91
|
+
`Provider ${providerId} not found`,
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
const result = await signInWithPopup(this.auth, provider);
|
|
95
|
+
useAuthState.setState({ isPending: false });
|
|
96
|
+
useAuthState.getState().setLoggedIn({
|
|
97
|
+
providerData: { user: result.user },
|
|
98
|
+
profile: {
|
|
99
|
+
sub: result.user.uid,
|
|
100
|
+
email: result.user.email ?? undefined,
|
|
101
|
+
name: result.user.displayName ?? undefined,
|
|
102
|
+
emailVerified: result.user.emailVerified,
|
|
103
|
+
pictureUrl: result.user.photoURL ?? undefined,
|
|
104
|
+
},
|
|
105
|
+
});
|
|
106
|
+
}}
|
|
107
|
+
onUsernamePasswordSignIn={async (
|
|
108
|
+
email: string,
|
|
109
|
+
password: string,
|
|
110
|
+
) => {
|
|
111
|
+
try {
|
|
112
|
+
await signInWithEmailAndPassword(this.auth, email, password);
|
|
113
|
+
} catch (error) {
|
|
114
|
+
throw Error(getFirebaseErrorMessage(error), { cause: error });
|
|
115
|
+
}
|
|
116
|
+
}}
|
|
117
|
+
/>
|
|
118
|
+
),
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
path: "/signup",
|
|
122
|
+
element: (
|
|
123
|
+
<ZudokuSignUpUi
|
|
124
|
+
providers={this.providers}
|
|
125
|
+
onOAuthSignUp={async (providerId: string) => {
|
|
126
|
+
const provider = await getProviderForId(providerId);
|
|
127
|
+
if (!provider) {
|
|
128
|
+
throw new AuthorizationError(
|
|
129
|
+
`Provider ${providerId} not found`,
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
await signInWithPopup(this.auth, provider);
|
|
133
|
+
}}
|
|
134
|
+
onUsernamePasswordSignUp={async (
|
|
135
|
+
email: string,
|
|
136
|
+
password: string,
|
|
137
|
+
) => {
|
|
138
|
+
await createUserWithEmailAndPassword(this.auth, email, password);
|
|
139
|
+
}}
|
|
140
|
+
/>
|
|
141
|
+
),
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
path: "/signout",
|
|
145
|
+
element: <SignOut />,
|
|
146
|
+
},
|
|
147
|
+
];
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
signOut = async () => {
|
|
151
|
+
await signOut(this.auth);
|
|
152
|
+
|
|
153
|
+
useAuthState.setState({
|
|
154
|
+
isAuthenticated: false,
|
|
155
|
+
isPending: false,
|
|
156
|
+
profile: undefined,
|
|
157
|
+
providerData: undefined,
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
onPageLoad = async () => {
|
|
162
|
+
const user = this.auth.currentUser;
|
|
163
|
+
|
|
164
|
+
if (user) {
|
|
165
|
+
await this.updateUserState(user);
|
|
166
|
+
} else {
|
|
167
|
+
useAuthState.setState({ isPending: false });
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
private async updateUserState(user: User) {
|
|
172
|
+
useAuthState.getState().setLoggedIn({
|
|
173
|
+
profile: {
|
|
174
|
+
sub: user.uid,
|
|
175
|
+
email: user.email ?? undefined,
|
|
176
|
+
name: user.displayName ?? undefined,
|
|
177
|
+
emailVerified: user.emailVerified,
|
|
178
|
+
pictureUrl: user.photoURL ?? undefined,
|
|
179
|
+
},
|
|
180
|
+
providerData: { user },
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const supabaseAuth: AuthenticationProviderInitializer<
|
|
186
|
+
FirebaseAuthenticationConfig
|
|
187
|
+
> = (options) => new FirebaseAuthenticationProvider(options);
|
|
188
|
+
|
|
189
|
+
export default supabaseAuth;
|
|
190
|
+
|
|
191
|
+
const getProviderForId = async (providerId: string) => {
|
|
192
|
+
switch (providerId) {
|
|
193
|
+
case "google": {
|
|
194
|
+
const { GoogleAuthProvider } = await import("firebase/auth");
|
|
195
|
+
return new GoogleAuthProvider();
|
|
196
|
+
}
|
|
197
|
+
case "github": {
|
|
198
|
+
const { GithubAuthProvider } = await import("firebase/auth");
|
|
199
|
+
return new GithubAuthProvider();
|
|
200
|
+
}
|
|
201
|
+
case "facebook": {
|
|
202
|
+
const { FacebookAuthProvider } = await import("firebase/auth");
|
|
203
|
+
return new FacebookAuthProvider();
|
|
204
|
+
}
|
|
205
|
+
case "twitter": {
|
|
206
|
+
const { TwitterAuthProvider } = await import("firebase/auth");
|
|
207
|
+
return new TwitterAuthProvider();
|
|
208
|
+
}
|
|
209
|
+
case "microsoft": {
|
|
210
|
+
const { OAuthProvider } = await import("firebase/auth");
|
|
211
|
+
return new OAuthProvider("microsoft.com");
|
|
212
|
+
}
|
|
213
|
+
case "apple": {
|
|
214
|
+
const { OAuthProvider } = await import("firebase/auth");
|
|
215
|
+
return new OAuthProvider("apple.com");
|
|
216
|
+
}
|
|
217
|
+
case "yahoo": {
|
|
218
|
+
const { OAuthProvider } = await import("firebase/auth");
|
|
219
|
+
return new OAuthProvider("yahoo.com");
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
throw new AuthorizationError(`Provider ${providerId} not found`);
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
const getFirebaseErrorMessage = (error: unknown): string => {
|
|
227
|
+
if (!(error instanceof Error)) {
|
|
228
|
+
return "An unexpected error occurred. Please try again.";
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
const errorCode = (error as { code?: string }).code;
|
|
232
|
+
|
|
233
|
+
switch (errorCode) {
|
|
234
|
+
case "auth/email-already-in-use":
|
|
235
|
+
return "The email address is already used by another account.";
|
|
236
|
+
case "auth/invalid-email":
|
|
237
|
+
return "That email address isn't correct.";
|
|
238
|
+
case "auth/operation-not-allowed":
|
|
239
|
+
return "This sign-in method is not enabled. Please contact support.";
|
|
240
|
+
case "auth/weak-password":
|
|
241
|
+
return "The password must be at least 6 characters long.";
|
|
242
|
+
case "auth/user-disabled":
|
|
243
|
+
return "This account has been disabled. Please contact support.";
|
|
244
|
+
case "auth/user-not-found":
|
|
245
|
+
return "That email address doesn't match an existing account.";
|
|
246
|
+
case "auth/wrong-password":
|
|
247
|
+
return "The email and password you entered don't match.";
|
|
248
|
+
case "auth/too-many-requests":
|
|
249
|
+
return "You have entered an incorrect password too many times. Please try again in a few minutes.";
|
|
250
|
+
case "auth/popup-blocked":
|
|
251
|
+
return "The sign-in popup was blocked by your browser. Please allow popups and try again.";
|
|
252
|
+
case "auth/popup-closed-by-user":
|
|
253
|
+
return "The sign-in popup was closed before completing. Please try again.";
|
|
254
|
+
case "auth/network-request-failed":
|
|
255
|
+
return "A network error has occurred. Please check your connection and try again.";
|
|
256
|
+
case "auth/requires-recent-login":
|
|
257
|
+
return "Please login again to perform this operation.";
|
|
258
|
+
case "auth/invalid-credential":
|
|
259
|
+
return "The credential is invalid or has expired. Please try again.";
|
|
260
|
+
case "auth/account-exists-with-different-credential":
|
|
261
|
+
return "An account already exists with the same email address but different sign-in credentials.";
|
|
262
|
+
case "auth/credential-already-in-use":
|
|
263
|
+
return "This credential is already associated with a different user account.";
|
|
264
|
+
case "auth/invalid-verification-code":
|
|
265
|
+
return "Wrong code. Try again.";
|
|
266
|
+
case "auth/invalid-verification-id":
|
|
267
|
+
return "The verification ID is invalid.";
|
|
268
|
+
case "auth/missing-verification-code":
|
|
269
|
+
return "Please enter the verification code.";
|
|
270
|
+
case "auth/user-cancelled":
|
|
271
|
+
return "Please authorize the required permissions to sign in.";
|
|
272
|
+
case "auth/expired-action-code":
|
|
273
|
+
return "This code has expired.";
|
|
274
|
+
case "auth/invalid-action-code":
|
|
275
|
+
return "The action code is invalid. This can happen if the code is malformed or has already been used.";
|
|
276
|
+
case "auth/unauthorized-domain":
|
|
277
|
+
return "This domain is not authorized for OAuth operations.";
|
|
278
|
+
default:
|
|
279
|
+
return (
|
|
280
|
+
error.message ||
|
|
281
|
+
"An error occurred during authentication. Please try again."
|
|
282
|
+
);
|
|
283
|
+
}
|
|
284
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createClient,
|
|
3
|
-
type Provider,
|
|
4
3
|
type Session,
|
|
5
4
|
type SupabaseClient,
|
|
6
5
|
} from "@supabase/supabase-js";
|
|
@@ -22,16 +21,12 @@ class SupabaseAuthenticationProvider
|
|
|
22
21
|
implements AuthenticationPlugin
|
|
23
22
|
{
|
|
24
23
|
private readonly client: SupabaseClient;
|
|
25
|
-
private readonly providers: Provider[];
|
|
26
24
|
private readonly config: SupabaseAuthenticationConfig;
|
|
27
25
|
|
|
28
26
|
constructor(config: SupabaseAuthenticationConfig) {
|
|
29
|
-
const {
|
|
27
|
+
const { supabaseUrl, supabaseKey } = config;
|
|
30
28
|
super();
|
|
31
|
-
|
|
32
|
-
if (this.providers.length === 0) {
|
|
33
|
-
throw new Error("At least one provider must be provided");
|
|
34
|
-
}
|
|
29
|
+
|
|
35
30
|
this.client = createClient(supabaseUrl, supabaseKey, {
|
|
36
31
|
auth: {
|
|
37
32
|
autoRefreshToken: true,
|