zudoku 0.45.0 → 0.46.0
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/cli.js +8 -2
- package/dist/app/main.js +4 -23
- package/dist/app/main.js.map +1 -1
- package/dist/config/config.d.ts +2 -2
- package/dist/config/file-exists.d.ts +1 -0
- package/dist/config/file-exists.js +5 -0
- package/dist/config/file-exists.js.map +1 -0
- package/dist/config/loader.d.ts +19 -4
- package/dist/config/loader.js +94 -14
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/validate.d.ts +3536 -743
- package/dist/config/validators/validate.js +396 -11
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +7 -2
- package/dist/lib/authentication/AuthenticationPlugin.js +13 -1
- package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +2 -4
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +62 -43
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +7 -12
- package/dist/lib/authentication/providers/openid.js +11 -22
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase.js +3 -5
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/components/Autocomplete.js +1 -1
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +1 -1
- package/dist/lib/components/Footer.js +5 -5
- package/dist/lib/components/Footer.js.map +1 -1
- package/dist/lib/components/Header.js +16 -8
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.js +6 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/InlineCode.js +1 -1
- package/dist/lib/components/InlineCode.js.map +1 -1
- package/dist/lib/components/Layout.js +2 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Main.js +2 -2
- package/dist/lib/components/Main.js.map +1 -1
- package/dist/lib/components/Markdown.js +8 -3
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +3 -2
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +1 -1
- package/dist/lib/components/Pagination.js +1 -1
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/Search.js +1 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/Slot.d.ts +17 -0
- package/dist/lib/components/Slot.js +24 -0
- package/dist/lib/components/Slot.js.map +1 -0
- package/dist/lib/components/Slot.test.js +168 -0
- package/dist/lib/components/Slot.test.js.map +1 -0
- package/dist/lib/components/TopNavigation.d.ts +1 -4
- package/dist/lib/components/TopNavigation.js +3 -11
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.js +2 -2
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/SlotProvider.d.ts +26 -0
- package/dist/lib/components/context/SlotProvider.js +83 -0
- package/dist/lib/components/context/SlotProvider.js.map +1 -0
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/context/ZudokuProvider.js +2 -1
- package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
- package/dist/lib/components/index.d.ts +29 -23
- package/dist/lib/components/index.js +13 -7
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/PoweredByZudoku.js +1 -1
- package/dist/lib/components/navigation/Sidebar.js +3 -3
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarBadge.js +1 -1
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +3 -3
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +0 -5
- package/dist/lib/components/navigation/SidebarItem.js +19 -23
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
- package/dist/lib/components/navigation/Toc.js +1 -1
- package/dist/lib/components/navigation/Toc.js.map +1 -1
- package/dist/lib/components/navigation/utils.d.ts +8 -0
- package/dist/lib/components/navigation/utils.js +34 -6
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +12 -8
- package/dist/lib/core/ZudokuContext.js +6 -5
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +5 -2
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/hooks/index.d.ts +19 -0
- package/dist/lib/hooks/index.js +11 -0
- package/dist/lib/hooks/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.js +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +3 -2
- package/dist/lib/plugins/api-keys/CreateApiKey.js +8 -4
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +54 -23
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +18 -9
- package/dist/lib/plugins/api-keys/index.js +49 -34
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +1 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +1 -1
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +1 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +5 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +2 -4
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -4
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +6 -5
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +8 -0
- package/dist/lib/plugins/openapi/SidecarExamples.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/ResponseContent.d.ts +12 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.js +21 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +2 -0
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/SubmitButton.js +7 -10
- package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +2 -2
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +3 -3
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/redirect/index.d.ts +1 -1
- package/dist/lib/ui/Badge.d.ts +2 -2
- package/dist/lib/ui/Badge.js +1 -1
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/Button.js +8 -6
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Callout.js +1 -1
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Card.js +1 -1
- package/dist/lib/ui/Checkbox.js +1 -1
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +2 -2
- package/dist/lib/ui/Command.js +3 -3
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Dialog.js +1 -1
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/DropdownMenu.js +4 -4
- package/dist/lib/ui/DropdownMenu.js.map +1 -1
- package/dist/lib/ui/HoverCard.js +1 -1
- package/dist/lib/ui/HoverCard.js.map +1 -1
- package/dist/lib/ui/Input.js +1 -1
- package/dist/lib/ui/Input.js.map +1 -1
- package/dist/lib/ui/Popover.js +1 -1
- package/dist/lib/ui/Popover.js.map +1 -1
- package/dist/lib/ui/RadioGroup.js +1 -1
- package/dist/lib/ui/RadioGroup.js.map +1 -1
- package/dist/lib/ui/Select.js +2 -2
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/Slider.js +1 -1
- package/dist/lib/ui/Slider.js.map +1 -1
- package/dist/lib/ui/Switch.js +1 -1
- package/dist/lib/ui/Switch.js.map +1 -1
- package/dist/lib/ui/Tabs.js +2 -2
- package/dist/lib/ui/Tabs.js.map +1 -1
- package/dist/lib/ui/Textarea.js +1 -1
- package/dist/lib/ui/Textarea.js.map +1 -1
- package/dist/lib/ui/Toggle.js +1 -1
- package/dist/lib/ui/Toggle.js.map +1 -1
- package/dist/lib/ui/Tooltip.d.ts +2 -1
- package/dist/lib/ui/Tooltip.js +2 -1
- package/dist/lib/ui/Tooltip.js.map +1 -1
- package/dist/lib/util/useExposedProps.d.ts +8 -1
- package/dist/lib/util/useExposedProps.js.map +1 -1
- package/dist/vite/api/SchemaManager.js +16 -1
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/build.js +44 -6
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +2 -9
- package/dist/vite/config.js +6 -95
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +1 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/css/plugin.d.ts +1 -2
- package/dist/vite/css/plugin.js +3 -2
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.d.ts +0 -1
- package/dist/vite/dev-server.js +10 -12
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/html.d.ts +2 -2
- package/dist/vite/html.js +5 -2
- package/dist/vite/html.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +1 -2
- package/dist/vite/plugin-api-keys.js +9 -3
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +1 -2
- package/dist/vite/plugin-api.js +5 -4
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +1 -2
- package/dist/vite/plugin-auth.js +3 -2
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +1 -2
- package/dist/vite/plugin-component.js +3 -2
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +1 -2
- package/dist/vite/plugin-config-reload.js +21 -22
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +1 -2
- package/dist/vite/plugin-config.js +4 -3
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-configure-tailwind.d.ts +2 -0
- package/dist/vite/plugin-configure-tailwind.js +38 -0
- package/dist/vite/plugin-configure-tailwind.js.map +1 -0
- package/dist/vite/plugin-custom-pages.d.ts +1 -2
- package/dist/vite/plugin-custom-pages.js +3 -2
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +1 -2
- package/dist/vite/plugin-docs.js +4 -3
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +1 -2
- package/dist/vite/plugin-frontmatter.js +3 -2
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +1 -2
- package/dist/vite/plugin-mdx.js +3 -2
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-redirect.d.ts +1 -2
- package/dist/vite/plugin-redirect.js +3 -2
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +1 -2
- package/dist/vite/plugin-search.js +3 -2
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-shiki-register.d.ts +1 -2
- package/dist/vite/plugin-shiki-register.js +2 -1
- package/dist/vite/plugin-shiki-register.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +1 -2
- package/dist/vite/plugin-sidebar.js +3 -2
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin-theme-css.d.ts +1 -2
- package/dist/vite/plugin-theme-css.js +20 -60
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/dist/vite/plugin.d.ts +1 -2
- package/dist/vite/plugin.js +22 -21
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/sitemap.d.ts +1 -1
- package/dist/zuplo/with-zuplo.d.ts +2 -2
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/Button-BE9IVkWV.js +51 -0
- package/lib/Button-BE9IVkWV.js.map +1 -0
- package/lib/{Callout-XadUe37J.js → Callout-BkgOUkoZ.js} +9 -8
- package/lib/Callout-BkgOUkoZ.js.map +1 -0
- package/lib/{Card-BlCYNw5W.js → Card-DPhGbYUM.js} +3 -3
- package/lib/{Card-BlCYNw5W.js.map → Card-DPhGbYUM.js.map} +1 -1
- package/lib/{CategoryHeading-DZi-Szor.js → CategoryHeading-Cu2RwgjC.js} +2 -2
- package/lib/{CategoryHeading-DZi-Szor.js.map → CategoryHeading-Cu2RwgjC.js.map} +1 -1
- package/lib/{Dialog-CNf2oWXG.js → Dialog-Du6WMcIA.js} +8 -7
- package/lib/Dialog-Du6WMcIA.js.map +1 -0
- package/lib/{Drawer-BPBxzel2.js → Drawer-BzkOKwgC.js} +2 -2
- package/lib/{Drawer-BPBxzel2.js.map → Drawer-BzkOKwgC.js.map} +1 -1
- package/lib/Markdown-BRAyzyUJ.js +15348 -0
- package/lib/Markdown-BRAyzyUJ.js.map +1 -0
- package/lib/{MdxPage-Sjv6y3cA.js → MdxPage-B3v1BSKr.js} +11 -11
- package/lib/MdxPage-B3v1BSKr.js.map +1 -0
- package/lib/{OasProvider-CzRXrs_-.js → OasProvider-5jrFuhVk.js} +3 -3
- package/lib/{OasProvider-CzRXrs_-.js.map → OasProvider-5jrFuhVk.js.map} +1 -1
- package/lib/{OperationList-DefCF3ZI.js → OperationList-BmoMLQPO.js} +1039 -1005
- package/lib/OperationList-BmoMLQPO.js.map +1 -0
- package/lib/Pagination-Cr0fWZS3.js +36 -0
- package/lib/Pagination-Cr0fWZS3.js.map +1 -0
- package/lib/RouteGuard-PrSVLbSr.js +55 -0
- package/lib/RouteGuard-PrSVLbSr.js.map +1 -0
- package/lib/{SchemaList-zHQ2Ekyw.js → SchemaList-B4riYLoP.js} +61 -47
- package/lib/SchemaList-B4riYLoP.js.map +1 -0
- package/lib/{SchemaView-CqF4oMU-.js → SchemaView-CPZ6RgsF.js} +100 -95
- package/lib/SchemaView-CPZ6RgsF.js.map +1 -0
- package/lib/{AuthenticationPlugin-UNaAuxNo.js → SignUp-CWaiH0tY.js} +23 -50
- package/lib/SignUp-CWaiH0tY.js.map +1 -0
- package/lib/Slot-Bo6K4tnb.js +160 -0
- package/lib/Slot-Bo6K4tnb.js.map +1 -0
- package/lib/{SyntaxHighlight-UxOF1xNb.js → SyntaxHighlight-DedRjJNr.js} +233 -212
- package/lib/{SyntaxHighlight-UxOF1xNb.js.map → SyntaxHighlight-DedRjJNr.js.map} +1 -1
- package/lib/{Toc-Ax54Pw8S.js → Toc-lL3fzNkl.js} +5 -5
- package/lib/Toc-lL3fzNkl.js.map +1 -0
- package/lib/{circular-B_TODp4H.js → circular-oB4auIIg.js} +2 -2
- package/lib/{circular-B_TODp4H.js.map → circular-oB4auIIg.js.map} +1 -1
- package/lib/clsx-OuTLNxxd.js +17 -0
- package/lib/clsx-OuTLNxxd.js.map +1 -0
- package/lib/{cn-CwJPJKOE.js → cn-wvCW-ho6.js} +1015 -562
- package/lib/cn-wvCW-ho6.js.map +1 -0
- package/lib/{createServer-CXd8q7nF.js → createServer-DCB82j2t.js} +81 -81
- package/lib/{createServer-CXd8q7nF.js.map → createServer-DCB82j2t.js.map} +1 -1
- package/lib/{hook-BwOB_iZo.js → hook-DawSLaZr.js} +323 -300
- package/lib/hook-DawSLaZr.js.map +1 -0
- package/lib/{index-BY8J3gEh.js → index-BXYvD5-7.js} +868 -758
- package/lib/index-BXYvD5-7.js.map +1 -0
- package/lib/{index-Z13x6tPX.js → index-DI5SPFK9.js} +2 -2
- package/lib/{index-Z13x6tPX.js.map → index-DI5SPFK9.js.map} +1 -1
- package/lib/index-QzXzw_ra.js +24 -0
- package/lib/index-QzXzw_ra.js.map +1 -0
- package/lib/{RouteGuard-lkdEJoDV.js → index.esm-BFcSKCe-.js} +232 -281
- package/lib/index.esm-BFcSKCe-.js.map +1 -0
- package/lib/{index.esm-D2ZUREQN.js → index.esm-DSfX_eMP.js} +3 -3
- package/lib/{index.esm-D2ZUREQN.js.map → index.esm-DSfX_eMP.js.map} +1 -1
- package/lib/joinPath-B7kNnUX4.js +8 -0
- package/lib/joinPath-B7kNnUX4.js.map +1 -0
- package/lib/{mutation-CL2MCRQL.js → mutation-oxMvODNQ.js} +2 -2
- package/lib/{mutation-CL2MCRQL.js.map → mutation-oxMvODNQ.js.map} +1 -1
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +2 -2
- package/lib/ui/Alert.js +2 -2
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +3 -3
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Button.js +20 -18
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +6 -5
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +8 -8
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Checkbox.js +7 -7
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +1 -1
- package/lib/ui/Command.js +43 -43
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +2 -2
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/DropdownMenu.js +34 -34
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/Form.js +2 -2
- package/lib/ui/HoverCard.js +5 -5
- package/lib/ui/HoverCard.js.map +1 -1
- package/lib/ui/Input.js +2 -2
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Pagination.js +1 -1
- package/lib/ui/Popover.js +2 -2
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +10 -10
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +31 -31
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +5 -5
- package/lib/ui/Slider.js.map +1 -1
- package/lib/ui/Switch.js +5 -5
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +2 -2
- package/lib/ui/Tabs.js +16 -16
- package/lib/ui/Tabs.js.map +1 -1
- package/lib/ui/Textarea.js +5 -5
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js +7 -7
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +15 -8
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/ui/util.js +1 -1
- package/lib/useExposedProps-DG8J6ewJ.js.map +1 -1
- package/lib/useMutation-C_j3dA_L.js +97 -0
- package/lib/useMutation-C_j3dA_L.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +99 -82
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +246 -216
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +4957 -33
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +21 -12
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +8 -8
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +5022 -214
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +5 -5
- package/lib/zudoku.plugins.js +7 -6
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +15 -16
- package/src/app/defaultTheme.css +54 -0
- package/src/app/font.geist.css +73 -0
- package/src/app/main.css +113 -156
- package/src/app/main.tsx +4 -28
- package/src/lib/authentication/AuthenticationPlugin.tsx +18 -4
- package/src/lib/authentication/authentication.ts +2 -5
- package/src/lib/authentication/providers/auth0.tsx +8 -2
- package/src/lib/authentication/providers/clerk.tsx +72 -48
- package/src/lib/authentication/providers/openid.tsx +19 -26
- package/src/lib/authentication/providers/supabase.tsx +7 -7
- package/src/lib/components/Autocomplete.tsx +1 -1
- package/src/lib/components/Banner.tsx +1 -1
- package/src/lib/components/ErrorPage.tsx +1 -1
- package/src/lib/components/Footer.tsx +7 -10
- package/src/lib/components/Header.tsx +29 -29
- package/src/lib/components/Heading.tsx +9 -5
- package/src/lib/components/InlineCode.tsx +1 -1
- package/src/lib/components/Layout.tsx +3 -3
- package/src/lib/components/Main.tsx +4 -4
- package/src/lib/components/Markdown.tsx +14 -4
- package/src/lib/components/MobileTopNavigation.tsx +3 -2
- package/src/lib/components/NotFoundPage.tsx +1 -1
- package/src/lib/components/Pagination.tsx +3 -9
- package/src/lib/components/Search.tsx +1 -1
- package/src/lib/components/Slot.test.tsx +465 -0
- package/src/lib/components/Slot.tsx +64 -0
- package/src/lib/components/TopNavigation.tsx +5 -17
- package/src/lib/components/Zudoku.tsx +9 -9
- package/src/lib/components/context/SlotProvider.tsx +149 -0
- package/src/lib/components/context/ZudokuProvider.tsx +2 -1
- package/src/lib/components/index.ts +14 -10
- package/src/lib/components/navigation/PoweredByZudoku.tsx +1 -1
- package/src/lib/components/navigation/Sidebar.tsx +3 -3
- package/src/lib/components/navigation/SidebarBadge.tsx +1 -1
- package/src/lib/components/navigation/SidebarCategory.tsx +3 -3
- package/src/lib/components/navigation/SidebarItem.tsx +57 -30
- package/src/lib/components/navigation/SidebarWrapper.tsx +2 -2
- package/src/lib/components/navigation/Toc.tsx +2 -2
- package/src/lib/components/navigation/utils.ts +42 -6
- package/src/lib/core/ZudokuContext.ts +24 -12
- package/src/lib/core/plugins.ts +10 -2
- package/src/lib/errors/ErrorAlert.tsx +1 -1
- package/src/lib/hooks/index.ts +11 -0
- package/src/lib/plugins/api-catalog/Catalog.tsx +1 -1
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +54 -42
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +292 -112
- package/src/lib/plugins/api-keys/index.tsx +101 -55
- package/src/lib/plugins/custom-pages/index.tsx +1 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +2 -2
- package/src/lib/plugins/markdown/index.tsx +2 -2
- package/src/lib/plugins/markdown/resolver.ts +4 -2
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +1 -1
- package/src/lib/plugins/openapi/ColorizedParam.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +2 -2
- package/src/lib/plugins/openapi/OperationListItem.tsx +6 -34
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -1
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +5 -16
- package/src/lib/plugins/openapi/SchemaList.tsx +20 -8
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +6 -0
- package/src/lib/plugins/openapi/components/EnumValues.tsx +1 -1
- package/src/lib/plugins/openapi/components/ResponseContent.tsx +104 -0
- package/src/lib/plugins/openapi/playground/Playground.tsx +7 -1
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/SubmitButton.tsx +24 -29
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +2 -2
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +7 -3
- package/src/lib/plugins/redirect/index.tsx +1 -1
- package/src/lib/ui/Badge.tsx +2 -2
- package/src/lib/ui/Button.tsx +9 -6
- package/src/lib/ui/Callout.tsx +1 -0
- package/src/lib/ui/Card.tsx +1 -1
- package/src/lib/ui/Checkbox.tsx +1 -1
- package/src/lib/ui/Command.tsx +5 -5
- package/src/lib/ui/Dialog.tsx +1 -1
- package/src/lib/ui/DropdownMenu.tsx +4 -4
- package/src/lib/ui/HoverCard.tsx +1 -1
- package/src/lib/ui/Input.tsx +1 -1
- package/src/lib/ui/Popover.tsx +1 -1
- package/src/lib/ui/RadioGroup.tsx +1 -1
- package/src/lib/ui/Select.tsx +3 -3
- package/src/lib/ui/Slider.tsx +1 -1
- package/src/lib/ui/Switch.tsx +1 -1
- package/src/lib/ui/Tabs.tsx +2 -2
- package/src/lib/ui/Textarea.tsx +1 -1
- package/src/lib/ui/Toggle.tsx +1 -1
- package/src/lib/ui/Tooltip.tsx +16 -1
- package/src/lib/util/useExposedProps.tsx +12 -1
- package/dist/app/tailwind.d.ts +0 -4
- package/dist/app/tailwind.js +0 -97
- package/dist/app/tailwind.js.map +0 -1
- package/dist/config/common.d.ts +0 -10
- package/dist/config/common.js +0 -2
- package/dist/config/common.js.map +0 -1
- package/dist/config/validators/common.d.ts +0 -8001
- package/dist/config/validators/common.js +0 -414
- package/dist/config/validators/common.js.map +0 -1
- package/dist/lib/components/SlotletProvider.d.ts +0 -17
- package/dist/lib/components/SlotletProvider.js +0 -18
- package/dist/lib/components/SlotletProvider.js.map +0 -1
- package/dist/vite/plugin-docs.test.js +0 -22
- package/dist/vite/plugin-docs.test.js.map +0 -1
- package/lib/AuthenticationPlugin-UNaAuxNo.js.map +0 -1
- package/lib/Button-Bdk_Ij3U.js +0 -49
- package/lib/Button-Bdk_Ij3U.js.map +0 -1
- package/lib/Callout-XadUe37J.js.map +0 -1
- package/lib/Dialog-CNf2oWXG.js.map +0 -1
- package/lib/Markdown-D96AphCL.js +0 -7691
- package/lib/Markdown-D96AphCL.js.map +0 -1
- package/lib/MdxPage-Sjv6y3cA.js.map +0 -1
- package/lib/OperationList-DefCF3ZI.js.map +0 -1
- package/lib/Pagination-B89j9KJS.js +0 -48
- package/lib/Pagination-B89j9KJS.js.map +0 -1
- package/lib/RouteGuard-lkdEJoDV.js.map +0 -1
- package/lib/SchemaList-zHQ2Ekyw.js.map +0 -1
- package/lib/SchemaView-CqF4oMU-.js.map +0 -1
- package/lib/Select-HTio1oSE.js +0 -211
- package/lib/Select-HTio1oSE.js.map +0 -1
- package/lib/SlotletProvider-CTgIBRWg.js +0 -257
- package/lib/SlotletProvider-CTgIBRWg.js.map +0 -1
- package/lib/Toc-Ax54Pw8S.js.map +0 -1
- package/lib/cn-CwJPJKOE.js.map +0 -1
- package/lib/hook-BwOB_iZo.js.map +0 -1
- package/lib/index-BY8J3gEh.js.map +0 -1
- package/lib/index-CT2PstvH.js +0 -4982
- package/lib/index-CT2PstvH.js.map +0 -1
- package/src/app/tailwind.ts +0 -103
- package/src/lib/components/SlotletProvider.tsx +0 -55
- /package/dist/{vite/plugin-docs.test.d.ts → lib/components/Slot.test.d.ts} +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as S from "react";
|
|
2
|
-
import Y, { createContext as Oe, useContext as
|
|
3
|
-
import { j as
|
|
4
|
-
import { u as
|
|
5
|
-
|
|
2
|
+
import Y, { createContext as Oe, useContext as Re } from "react";
|
|
3
|
+
import { j as Ee } from "./jsx-runtime-C5mzlN2N.js";
|
|
4
|
+
import { u as A, m as X } from "./chunk-BAXFHI7N-C9WnHsLV.js";
|
|
5
|
+
import { c as Ce } from "./index-DI5SPFK9.js";
|
|
6
|
+
var G = class {
|
|
6
7
|
constructor() {
|
|
7
8
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
8
9
|
}
|
|
@@ -27,29 +28,29 @@ function bt(e, t) {
|
|
|
27
28
|
function U(e) {
|
|
28
29
|
return typeof e == "number" && e >= 0 && e !== 1 / 0;
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
+
function oe(e, t) {
|
|
31
32
|
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
+
function k(e, t) {
|
|
34
35
|
return typeof e == "function" ? e(t) : e;
|
|
35
36
|
}
|
|
36
37
|
function w(e, t) {
|
|
37
38
|
return typeof e == "function" ? e(t) : e;
|
|
38
39
|
}
|
|
39
|
-
function
|
|
40
|
+
function gt(e, t) {
|
|
40
41
|
const {
|
|
41
42
|
type: s = "all",
|
|
42
43
|
exact: r,
|
|
43
44
|
fetchStatus: n,
|
|
44
|
-
predicate:
|
|
45
|
-
queryKey:
|
|
45
|
+
predicate: a,
|
|
46
|
+
queryKey: o,
|
|
46
47
|
stale: i
|
|
47
48
|
} = e;
|
|
48
|
-
if (
|
|
49
|
+
if (o) {
|
|
49
50
|
if (r) {
|
|
50
|
-
if (t.queryHash !== Fe(
|
|
51
|
+
if (t.queryHash !== Fe(o, t.options))
|
|
51
52
|
return !1;
|
|
52
|
-
} else if (!
|
|
53
|
+
} else if (!z(t.queryKey, o))
|
|
53
54
|
return !1;
|
|
54
55
|
}
|
|
55
56
|
if (s !== "all") {
|
|
@@ -57,17 +58,17 @@ function mt(e, t) {
|
|
|
57
58
|
if (s === "active" && !u || s === "inactive" && u)
|
|
58
59
|
return !1;
|
|
59
60
|
}
|
|
60
|
-
return !(typeof i == "boolean" && t.isStale() !== i || n && n !== t.state.fetchStatus ||
|
|
61
|
+
return !(typeof i == "boolean" && t.isStale() !== i || n && n !== t.state.fetchStatus || a && !a(t));
|
|
61
62
|
}
|
|
62
|
-
function
|
|
63
|
-
const { exact: s, status: r, predicate: n, mutationKey:
|
|
64
|
-
if (
|
|
63
|
+
function St(e, t) {
|
|
64
|
+
const { exact: s, status: r, predicate: n, mutationKey: a } = e;
|
|
65
|
+
if (a) {
|
|
65
66
|
if (!t.options.mutationKey)
|
|
66
67
|
return !1;
|
|
67
68
|
if (s) {
|
|
68
|
-
if (Q(t.options.mutationKey) !== Q(
|
|
69
|
+
if (Q(t.options.mutationKey) !== Q(a))
|
|
69
70
|
return !1;
|
|
70
|
-
} else if (!
|
|
71
|
+
} else if (!z(t.options.mutationKey, a))
|
|
71
72
|
return !1;
|
|
72
73
|
}
|
|
73
74
|
return !(r && t.state.status !== r || n && !n(t));
|
|
@@ -81,21 +82,21 @@ function Q(e) {
|
|
|
81
82
|
(t, s) => N(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
|
|
82
83
|
);
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
-
return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((s) =>
|
|
85
|
+
function z(e, t) {
|
|
86
|
+
return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((s) => z(e[s], t[s])) : !1;
|
|
86
87
|
}
|
|
87
88
|
function L(e, t) {
|
|
88
89
|
if (e === t)
|
|
89
90
|
return e;
|
|
90
91
|
const s = ee(e) && ee(t);
|
|
91
92
|
if (s || N(e) && N(t)) {
|
|
92
|
-
const r = s ? e : Object.keys(e), n = r.length,
|
|
93
|
+
const r = s ? e : Object.keys(e), n = r.length, a = s ? t : Object.keys(t), o = a.length, i = s ? [] : {};
|
|
93
94
|
let u = 0;
|
|
94
|
-
for (let l = 0; l <
|
|
95
|
-
const h = s ? l :
|
|
95
|
+
for (let l = 0; l < o; l++) {
|
|
96
|
+
const h = s ? l : a[l];
|
|
96
97
|
(!s && r.includes(h) || s) && e[h] === void 0 && t[h] === void 0 ? (i[h] = void 0, u++) : (i[h] = L(e[h], t[h]), i[h] === e[h] && e[h] !== void 0 && u++);
|
|
97
98
|
}
|
|
98
|
-
return n ===
|
|
99
|
+
return n === o && u === n ? e : i;
|
|
99
100
|
}
|
|
100
101
|
return t;
|
|
101
102
|
}
|
|
@@ -143,10 +144,10 @@ function _(e, t, s) {
|
|
|
143
144
|
}
|
|
144
145
|
return t;
|
|
145
146
|
}
|
|
146
|
-
function
|
|
147
|
+
function wt(e) {
|
|
147
148
|
return e;
|
|
148
149
|
}
|
|
149
|
-
function
|
|
150
|
+
function Ot(e, t, s = 0) {
|
|
150
151
|
const r = [...e, t];
|
|
151
152
|
return s && r.length > s ? r.slice(1) : r;
|
|
152
153
|
}
|
|
@@ -154,13 +155,13 @@ function Rt(e, t, s = 0) {
|
|
|
154
155
|
const r = [t, ...e];
|
|
155
156
|
return s && r.length > s ? r.slice(0, -1) : r;
|
|
156
157
|
}
|
|
157
|
-
var
|
|
158
|
+
var x = Symbol();
|
|
158
159
|
function Pe(e, t) {
|
|
159
|
-
return process.env.NODE_ENV !== "production" && e.queryFn ===
|
|
160
|
+
return process.env.NODE_ENV !== "production" && e.queryFn === x && console.error(
|
|
160
161
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`
|
|
161
|
-
), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn ===
|
|
162
|
+
), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === x ? () => Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
|
|
162
163
|
}
|
|
163
|
-
var Te = class extends
|
|
164
|
+
var Te = class extends G {
|
|
164
165
|
#t;
|
|
165
166
|
#e;
|
|
166
167
|
#s;
|
|
@@ -197,7 +198,7 @@ var Te = class extends $ {
|
|
|
197
198
|
isFocused() {
|
|
198
199
|
return typeof this.#t == "boolean" ? this.#t : globalThis.document?.visibilityState !== "hidden";
|
|
199
200
|
}
|
|
200
|
-
},
|
|
201
|
+
}, ue = new Te(), De = class extends G {
|
|
201
202
|
#t = !0;
|
|
202
203
|
#e;
|
|
203
204
|
#s;
|
|
@@ -228,11 +229,11 @@ var Te = class extends $ {
|
|
|
228
229
|
isOnline() {
|
|
229
230
|
return this.#t;
|
|
230
231
|
}
|
|
231
|
-
},
|
|
232
|
+
}, ce = new De();
|
|
232
233
|
function H() {
|
|
233
234
|
let e, t;
|
|
234
|
-
const s = new Promise((n,
|
|
235
|
-
e = n, t =
|
|
235
|
+
const s = new Promise((n, a) => {
|
|
236
|
+
e = n, t = a;
|
|
236
237
|
});
|
|
237
238
|
s.status = "pending", s.catch(() => {
|
|
238
239
|
});
|
|
@@ -251,83 +252,83 @@ function H() {
|
|
|
251
252
|
}), t(n);
|
|
252
253
|
}, s;
|
|
253
254
|
}
|
|
254
|
-
function
|
|
255
|
+
function ke(e) {
|
|
255
256
|
return Math.min(1e3 * 2 ** e, 3e4);
|
|
256
257
|
}
|
|
257
|
-
function
|
|
258
|
-
return (e ?? "online") === "online" ?
|
|
258
|
+
function he(e) {
|
|
259
|
+
return (e ?? "online") === "online" ? ce.isOnline() : !0;
|
|
259
260
|
}
|
|
260
|
-
var
|
|
261
|
+
var le = class extends Error {
|
|
261
262
|
constructor(e) {
|
|
262
263
|
super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
|
|
263
264
|
}
|
|
264
265
|
};
|
|
265
|
-
function
|
|
266
|
-
return e instanceof
|
|
266
|
+
function j(e) {
|
|
267
|
+
return e instanceof le;
|
|
267
268
|
}
|
|
268
|
-
function
|
|
269
|
+
function xe(e) {
|
|
269
270
|
let t = !1, s = 0, r = !1, n;
|
|
270
|
-
const
|
|
271
|
-
r || (d(new
|
|
271
|
+
const a = H(), o = (c) => {
|
|
272
|
+
r || (d(new le(c)), e.abort?.());
|
|
272
273
|
}, i = () => {
|
|
273
274
|
t = !0;
|
|
274
275
|
}, u = () => {
|
|
275
276
|
t = !1;
|
|
276
|
-
}, l = () =>
|
|
277
|
-
r || (r = !0, e.onSuccess?.(c), n?.(),
|
|
277
|
+
}, l = () => ue.isFocused() && (e.networkMode === "always" || ce.isOnline()) && e.canRun(), h = () => he(e.networkMode) && e.canRun(), p = (c) => {
|
|
278
|
+
r || (r = !0, e.onSuccess?.(c), n?.(), a.resolve(c));
|
|
278
279
|
}, d = (c) => {
|
|
279
|
-
r || (r = !0, e.onError?.(c), n?.(),
|
|
280
|
-
},
|
|
281
|
-
n = (
|
|
282
|
-
(r || l()) && c(
|
|
280
|
+
r || (r = !0, e.onError?.(c), n?.(), a.reject(c));
|
|
281
|
+
}, m = () => new Promise((c) => {
|
|
282
|
+
n = (b) => {
|
|
283
|
+
(r || l()) && c(b);
|
|
283
284
|
}, e.onPause?.();
|
|
284
285
|
}).then(() => {
|
|
285
286
|
n = void 0, r || e.onContinue?.();
|
|
286
|
-
}),
|
|
287
|
+
}), R = () => {
|
|
287
288
|
if (r)
|
|
288
289
|
return;
|
|
289
290
|
let c;
|
|
290
|
-
const
|
|
291
|
+
const b = s === 0 ? e.initialPromise : void 0;
|
|
291
292
|
try {
|
|
292
|
-
c =
|
|
293
|
+
c = b ?? e.fn();
|
|
293
294
|
} catch (v) {
|
|
294
295
|
c = Promise.reject(v);
|
|
295
296
|
}
|
|
296
297
|
Promise.resolve(c).then(p).catch((v) => {
|
|
297
298
|
if (r)
|
|
298
299
|
return;
|
|
299
|
-
const f = e.retry ?? (C ? 0 : 3), y = e.retryDelay ??
|
|
300
|
-
if (t || !
|
|
300
|
+
const f = e.retry ?? (C ? 0 : 3), y = e.retryDelay ?? ke, E = typeof y == "function" ? y(s, v) : y, I = f === !0 || typeof f == "number" && s < f || typeof f == "function" && f(s, v);
|
|
301
|
+
if (t || !I) {
|
|
301
302
|
d(v);
|
|
302
303
|
return;
|
|
303
304
|
}
|
|
304
|
-
s++, e.onFail?.(s, v), Ie(E).then(() => l() ? void 0 :
|
|
305
|
-
t ? d(v) :
|
|
305
|
+
s++, e.onFail?.(s, v), Ie(E).then(() => l() ? void 0 : m()).then(() => {
|
|
306
|
+
t ? d(v) : R();
|
|
306
307
|
});
|
|
307
308
|
});
|
|
308
309
|
};
|
|
309
310
|
return {
|
|
310
|
-
promise:
|
|
311
|
-
cancel:
|
|
312
|
-
continue: () => (n?.(),
|
|
311
|
+
promise: a,
|
|
312
|
+
cancel: o,
|
|
313
|
+
continue: () => (n?.(), a),
|
|
313
314
|
cancelRetry: i,
|
|
314
315
|
continueRetry: u,
|
|
315
316
|
canStart: h,
|
|
316
|
-
start: () => (h() ?
|
|
317
|
+
start: () => (h() ? R() : m().then(R), a)
|
|
317
318
|
};
|
|
318
319
|
}
|
|
319
|
-
var
|
|
320
|
-
function
|
|
320
|
+
var Ae = (e) => setTimeout(e, 0);
|
|
321
|
+
function je() {
|
|
321
322
|
let e = [], t = 0, s = (i) => {
|
|
322
323
|
i();
|
|
323
324
|
}, r = (i) => {
|
|
324
325
|
i();
|
|
325
|
-
}, n =
|
|
326
|
-
const
|
|
326
|
+
}, n = Ae;
|
|
327
|
+
const a = (i) => {
|
|
327
328
|
t ? e.push(i) : n(() => {
|
|
328
329
|
s(i);
|
|
329
330
|
});
|
|
330
|
-
},
|
|
331
|
+
}, o = () => {
|
|
331
332
|
const i = e;
|
|
332
333
|
e = [], i.length && n(() => {
|
|
333
334
|
r(() => {
|
|
@@ -344,7 +345,7 @@ function Ae() {
|
|
|
344
345
|
try {
|
|
345
346
|
u = i();
|
|
346
347
|
} finally {
|
|
347
|
-
t--, t ||
|
|
348
|
+
t--, t || o();
|
|
348
349
|
}
|
|
349
350
|
return u;
|
|
350
351
|
},
|
|
@@ -352,11 +353,11 @@ function Ae() {
|
|
|
352
353
|
* All calls to the wrapped function will be batched.
|
|
353
354
|
*/
|
|
354
355
|
batchCalls: (i) => (...u) => {
|
|
355
|
-
|
|
356
|
+
a(() => {
|
|
356
357
|
i(...u);
|
|
357
358
|
});
|
|
358
359
|
},
|
|
359
|
-
schedule:
|
|
360
|
+
schedule: a,
|
|
360
361
|
/**
|
|
361
362
|
* Use this method to set a custom notify function.
|
|
362
363
|
* This can be used to for example wrap notifications with `React.act` while running tests.
|
|
@@ -376,7 +377,7 @@ function Ae() {
|
|
|
376
377
|
}
|
|
377
378
|
};
|
|
378
379
|
}
|
|
379
|
-
var
|
|
380
|
+
var $ = je(), qe = class {
|
|
380
381
|
#t;
|
|
381
382
|
destroy() {
|
|
382
383
|
this.clearGcTimeout();
|
|
@@ -395,16 +396,16 @@ var z = Ae(), qe = class {
|
|
|
395
396
|
clearGcTimeout() {
|
|
396
397
|
this.#t && (clearTimeout(this.#t), this.#t = void 0);
|
|
397
398
|
}
|
|
398
|
-
},
|
|
399
|
+
}, Et = class extends qe {
|
|
399
400
|
#t;
|
|
400
401
|
#e;
|
|
401
402
|
#s;
|
|
402
403
|
#n;
|
|
403
404
|
#r;
|
|
404
|
-
#a;
|
|
405
405
|
#o;
|
|
406
|
+
#a;
|
|
406
407
|
constructor(e) {
|
|
407
|
-
super(), this.#
|
|
408
|
+
super(), this.#a = !1, this.#o = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#n = e.client, this.#s = this.#n.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#t = Ue(this.options), this.state = e.state ?? this.#t, this.scheduleGc();
|
|
408
409
|
}
|
|
409
410
|
get meta() {
|
|
410
411
|
return this.options.meta;
|
|
@@ -413,7 +414,7 @@ var z = Ae(), qe = class {
|
|
|
413
414
|
return this.#r?.promise;
|
|
414
415
|
}
|
|
415
416
|
setOptions(e) {
|
|
416
|
-
this.options = { ...this.#
|
|
417
|
+
this.options = { ...this.#o, ...e }, this.updateGcTime(this.options.gcTime);
|
|
417
418
|
}
|
|
418
419
|
optionalRemove() {
|
|
419
420
|
!this.observers.length && this.state.fetchStatus === "idle" && this.#s.remove(this);
|
|
@@ -446,7 +447,7 @@ var z = Ae(), qe = class {
|
|
|
446
447
|
);
|
|
447
448
|
}
|
|
448
449
|
isDisabled() {
|
|
449
|
-
return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn ===
|
|
450
|
+
return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === x || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
|
|
450
451
|
}
|
|
451
452
|
isStale() {
|
|
452
453
|
return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
|
|
@@ -454,7 +455,7 @@ var z = Ae(), qe = class {
|
|
|
454
455
|
) : this.state.data === void 0;
|
|
455
456
|
}
|
|
456
457
|
isStaleByTime(e = 0) {
|
|
457
|
-
return this.state.isInvalidated || this.state.data === void 0 || !
|
|
458
|
+
return this.state.isInvalidated || this.state.data === void 0 || !oe(this.state.dataUpdatedAt, e);
|
|
458
459
|
}
|
|
459
460
|
onFocus() {
|
|
460
461
|
this.observers.find((t) => t.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
|
|
@@ -466,7 +467,7 @@ var z = Ae(), qe = class {
|
|
|
466
467
|
this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), this.#s.notify({ type: "observerAdded", query: this, observer: e }));
|
|
467
468
|
}
|
|
468
469
|
removeObserver(e) {
|
|
469
|
-
this.observers.includes(e) && (this.observers = this.observers.filter((t) => t !== e), this.observers.length || (this.#r && (this.#
|
|
470
|
+
this.observers.includes(e) && (this.observers = this.observers.filter((t) => t !== e), this.observers.length || (this.#r && (this.#a ? this.#r.cancel({ revert: !0 }) : this.#r.cancelRetry()), this.scheduleGc()), this.#s.notify({ type: "observerRemoved", query: this, observer: e }));
|
|
470
471
|
}
|
|
471
472
|
getObserversCount() {
|
|
472
473
|
return this.observers.length;
|
|
@@ -491,7 +492,7 @@ var z = Ae(), qe = class {
|
|
|
491
492
|
const s = new AbortController(), r = (i) => {
|
|
492
493
|
Object.defineProperty(i, "signal", {
|
|
493
494
|
enumerable: !0,
|
|
494
|
-
get: () => (this.#
|
|
495
|
+
get: () => (this.#a = !0, s.signal)
|
|
495
496
|
});
|
|
496
497
|
}, n = () => {
|
|
497
498
|
const i = Pe(this.options, t), u = {
|
|
@@ -499,12 +500,12 @@ var z = Ae(), qe = class {
|
|
|
499
500
|
queryKey: this.queryKey,
|
|
500
501
|
meta: this.meta
|
|
501
502
|
};
|
|
502
|
-
return r(u), this.#
|
|
503
|
+
return r(u), this.#a = !1, this.options.persister ? this.options.persister(
|
|
503
504
|
i,
|
|
504
505
|
u,
|
|
505
506
|
this
|
|
506
507
|
) : i(u);
|
|
507
|
-
},
|
|
508
|
+
}, a = {
|
|
508
509
|
fetchOptions: t,
|
|
509
510
|
options: this.options,
|
|
510
511
|
queryKey: this.queryKey,
|
|
@@ -512,15 +513,15 @@ var z = Ae(), qe = class {
|
|
|
512
513
|
state: this.state,
|
|
513
514
|
fetchFn: n
|
|
514
515
|
};
|
|
515
|
-
r(
|
|
516
|
-
|
|
516
|
+
r(a), this.options.behavior?.onFetch(
|
|
517
|
+
a,
|
|
517
518
|
this
|
|
518
|
-
), this.#e = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !==
|
|
519
|
-
const
|
|
520
|
-
|
|
519
|
+
), this.#e = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== a.fetchOptions?.meta) && this.#i({ type: "fetch", meta: a.fetchOptions?.meta });
|
|
520
|
+
const o = (i) => {
|
|
521
|
+
j(i) && i.silent || this.#i({
|
|
521
522
|
type: "error",
|
|
522
523
|
error: i
|
|
523
|
-
}),
|
|
524
|
+
}), j(i) || (this.#s.config.onError?.(
|
|
524
525
|
i,
|
|
525
526
|
this
|
|
526
527
|
), this.#s.config.onSettled?.(
|
|
@@ -529,21 +530,21 @@ var z = Ae(), qe = class {
|
|
|
529
530
|
this
|
|
530
531
|
)), this.scheduleGc();
|
|
531
532
|
};
|
|
532
|
-
return this.#r =
|
|
533
|
+
return this.#r = xe({
|
|
533
534
|
initialPromise: t?.initialPromise,
|
|
534
|
-
fn:
|
|
535
|
+
fn: a.fetchFn,
|
|
535
536
|
abort: s.abort.bind(s),
|
|
536
537
|
onSuccess: (i) => {
|
|
537
538
|
if (i === void 0) {
|
|
538
539
|
process.env.NODE_ENV !== "production" && console.error(
|
|
539
540
|
`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
|
|
540
|
-
),
|
|
541
|
+
), o(new Error(`${this.queryHash} data is undefined`));
|
|
541
542
|
return;
|
|
542
543
|
}
|
|
543
544
|
try {
|
|
544
545
|
this.setData(i);
|
|
545
546
|
} catch (u) {
|
|
546
|
-
|
|
547
|
+
o(u);
|
|
547
548
|
return;
|
|
548
549
|
}
|
|
549
550
|
this.#s.config.onSuccess?.(i, this), this.#s.config.onSettled?.(
|
|
@@ -552,7 +553,7 @@ var z = Ae(), qe = class {
|
|
|
552
553
|
this
|
|
553
554
|
), this.scheduleGc();
|
|
554
555
|
},
|
|
555
|
-
onError:
|
|
556
|
+
onError: o,
|
|
556
557
|
onFail: (i, u) => {
|
|
557
558
|
this.#i({ type: "failed", failureCount: i, error: u });
|
|
558
559
|
},
|
|
@@ -562,9 +563,9 @@ var z = Ae(), qe = class {
|
|
|
562
563
|
onContinue: () => {
|
|
563
564
|
this.#i({ type: "continue" });
|
|
564
565
|
},
|
|
565
|
-
retry:
|
|
566
|
-
retryDelay:
|
|
567
|
-
networkMode:
|
|
566
|
+
retry: a.options.retry,
|
|
567
|
+
retryDelay: a.options.retryDelay,
|
|
568
|
+
networkMode: a.options.networkMode,
|
|
568
569
|
canRun: () => !0
|
|
569
570
|
}), this.#r.start();
|
|
570
571
|
}
|
|
@@ -590,7 +591,7 @@ var z = Ae(), qe = class {
|
|
|
590
591
|
case "fetch":
|
|
591
592
|
return {
|
|
592
593
|
...s,
|
|
593
|
-
...
|
|
594
|
+
...de(s.data, this.options),
|
|
594
595
|
fetchMeta: e.meta ?? null
|
|
595
596
|
};
|
|
596
597
|
case "success":
|
|
@@ -610,7 +611,7 @@ var z = Ae(), qe = class {
|
|
|
610
611
|
};
|
|
611
612
|
case "error":
|
|
612
613
|
const r = e.error;
|
|
613
|
-
return
|
|
614
|
+
return j(r) && r.revert && this.#e ? { ...this.#e, fetchStatus: "idle" } : {
|
|
614
615
|
...s,
|
|
615
616
|
error: r,
|
|
616
617
|
errorUpdateCount: s.errorUpdateCount + 1,
|
|
@@ -632,18 +633,18 @@ var z = Ae(), qe = class {
|
|
|
632
633
|
};
|
|
633
634
|
}
|
|
634
635
|
};
|
|
635
|
-
this.state = t(this.state),
|
|
636
|
+
this.state = t(this.state), $.batch(() => {
|
|
636
637
|
this.observers.forEach((s) => {
|
|
637
638
|
s.onQueryUpdate();
|
|
638
639
|
}), this.#s.notify({ query: this, type: "updated", action: e });
|
|
639
640
|
});
|
|
640
641
|
}
|
|
641
642
|
};
|
|
642
|
-
function
|
|
643
|
+
function de(e, t) {
|
|
643
644
|
return {
|
|
644
645
|
fetchFailureCount: 0,
|
|
645
646
|
fetchFailureReason: null,
|
|
646
|
-
fetchStatus:
|
|
647
|
+
fetchStatus: he(t.networkMode) ? "fetching" : "paused",
|
|
647
648
|
...e === void 0 && {
|
|
648
649
|
error: null,
|
|
649
650
|
status: "pending"
|
|
@@ -667,9 +668,9 @@ function Ue(e) {
|
|
|
667
668
|
fetchStatus: "idle"
|
|
668
669
|
};
|
|
669
670
|
}
|
|
670
|
-
var
|
|
671
|
+
var fe = class extends G {
|
|
671
672
|
constructor(e, t) {
|
|
672
|
-
super(), this.options = t, this.#t = e, this.#i = null, this.#
|
|
673
|
+
super(), this.options = t, this.#t = e, this.#i = null, this.#a = H(), this.options.experimental_prefetchInRender || this.#a.reject(
|
|
673
674
|
new Error("experimental_prefetchInRender feature flag is not enabled")
|
|
674
675
|
), this.bindMethods(), this.setOptions(t);
|
|
675
676
|
}
|
|
@@ -678,8 +679,8 @@ var pe = class extends $ {
|
|
|
678
679
|
#s = void 0;
|
|
679
680
|
#n = void 0;
|
|
680
681
|
#r;
|
|
681
|
-
#a;
|
|
682
682
|
#o;
|
|
683
|
+
#a;
|
|
683
684
|
#i;
|
|
684
685
|
#y;
|
|
685
686
|
#d;
|
|
@@ -722,7 +723,7 @@ var pe = class extends $ {
|
|
|
722
723
|
throw new Error(
|
|
723
724
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
724
725
|
);
|
|
725
|
-
this.#
|
|
726
|
+
this.#O(), this.#e.setOptions(this.options), t._defaulted && !M(this.options, t) && this.#t.getQueryCache().notify({
|
|
726
727
|
type: "observerOptionsUpdated",
|
|
727
728
|
query: this.#e,
|
|
728
729
|
observer: this
|
|
@@ -733,13 +734,13 @@ var pe = class extends $ {
|
|
|
733
734
|
s,
|
|
734
735
|
this.options,
|
|
735
736
|
t
|
|
736
|
-
) && this.#l(), this.updateResult(), r && (this.#e !== s || w(this.options.enabled, this.#e) !== w(t.enabled, this.#e) ||
|
|
737
|
-
const n = this.#
|
|
738
|
-
r && (this.#e !== s || w(this.options.enabled, this.#e) !== w(t.enabled, this.#e) || n !== this.#u) && this.#
|
|
737
|
+
) && this.#l(), this.updateResult(), r && (this.#e !== s || w(this.options.enabled, this.#e) !== w(t.enabled, this.#e) || k(this.options.staleTime, this.#e) !== k(t.staleTime, this.#e)) && this.#v();
|
|
738
|
+
const n = this.#m();
|
|
739
|
+
r && (this.#e !== s || w(this.options.enabled, this.#e) !== w(t.enabled, this.#e) || n !== this.#u) && this.#b(n);
|
|
739
740
|
}
|
|
740
741
|
getOptimisticResult(e) {
|
|
741
742
|
const t = this.#t.getQueryCache().build(this.#t, e), s = this.createResult(t, e);
|
|
742
|
-
return Le(this, s) && (this.#n = s, this.#
|
|
743
|
+
return Le(this, s) && (this.#n = s, this.#o = this.options, this.#r = this.#e.state), s;
|
|
743
744
|
}
|
|
744
745
|
getCurrentResult() {
|
|
745
746
|
return this.#n;
|
|
@@ -776,7 +777,7 @@ var pe = class extends $ {
|
|
|
776
777
|
}).then(() => (this.updateResult(), this.#n));
|
|
777
778
|
}
|
|
778
779
|
#l(e) {
|
|
779
|
-
this.#
|
|
780
|
+
this.#O();
|
|
780
781
|
let t = this.#e.fetch(
|
|
781
782
|
this.options,
|
|
782
783
|
e
|
|
@@ -785,27 +786,27 @@ var pe = class extends $ {
|
|
|
785
786
|
}
|
|
786
787
|
#v() {
|
|
787
788
|
this.#S();
|
|
788
|
-
const e =
|
|
789
|
+
const e = k(
|
|
789
790
|
this.options.staleTime,
|
|
790
791
|
this.#e
|
|
791
792
|
);
|
|
792
793
|
if (C || this.#n.isStale || !U(e))
|
|
793
794
|
return;
|
|
794
|
-
const s =
|
|
795
|
+
const s = oe(this.#n.dataUpdatedAt, e) + 1;
|
|
795
796
|
this.#c = setTimeout(() => {
|
|
796
797
|
this.#n.isStale || this.updateResult();
|
|
797
798
|
}, s);
|
|
798
799
|
}
|
|
799
|
-
#
|
|
800
|
+
#m() {
|
|
800
801
|
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#e) : this.options.refetchInterval) ?? !1;
|
|
801
802
|
}
|
|
802
|
-
#
|
|
803
|
+
#b(e) {
|
|
803
804
|
this.#w(), this.#u = e, !(C || w(this.options.enabled, this.#e) === !1 || !U(this.#u) || this.#u === 0) && (this.#h = setInterval(() => {
|
|
804
|
-
(this.options.refetchIntervalInBackground ||
|
|
805
|
+
(this.options.refetchIntervalInBackground || ue.isFocused()) && this.#l();
|
|
805
806
|
}, this.#u));
|
|
806
807
|
}
|
|
807
808
|
#g() {
|
|
808
|
-
this.#v(), this.#
|
|
809
|
+
this.#v(), this.#b(this.#m());
|
|
809
810
|
}
|
|
810
811
|
#S() {
|
|
811
812
|
this.#c && (clearTimeout(this.#c), this.#c = void 0);
|
|
@@ -814,21 +815,21 @@ var pe = class extends $ {
|
|
|
814
815
|
this.#h && (clearInterval(this.#h), this.#h = void 0);
|
|
815
816
|
}
|
|
816
817
|
createResult(e, t) {
|
|
817
|
-
const s = this.#e, r = this.options, n = this.#n,
|
|
818
|
+
const s = this.#e, r = this.options, n = this.#n, a = this.#r, o = this.#o, u = e !== s ? e.state : this.#s, { state: l } = e;
|
|
818
819
|
let h = { ...l }, p = !1, d;
|
|
819
820
|
if (t._optimisticResults) {
|
|
820
|
-
const g = this.hasListeners(), T = !g && se(e, t),
|
|
821
|
-
(T ||
|
|
821
|
+
const g = this.hasListeners(), T = !g && se(e, t), P = g && re(e, s, t, r);
|
|
822
|
+
(T || P) && (h = {
|
|
822
823
|
...h,
|
|
823
|
-
...
|
|
824
|
+
...de(l.data, e.options)
|
|
824
825
|
}), t._optimisticResults === "isRestoring" && (h.fetchStatus = "idle");
|
|
825
826
|
}
|
|
826
|
-
let { error:
|
|
827
|
+
let { error: m, errorUpdatedAt: R, status: c } = h;
|
|
827
828
|
d = h.data;
|
|
828
|
-
let
|
|
829
|
+
let b = !1;
|
|
829
830
|
if (t.placeholderData !== void 0 && d === void 0 && c === "pending") {
|
|
830
831
|
let g;
|
|
831
|
-
n?.isPlaceholderData && t.placeholderData ===
|
|
832
|
+
n?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (g = n.data, b = !0) : g = typeof t.placeholderData == "function" ? t.placeholderData(
|
|
832
833
|
this.#f?.state.data,
|
|
833
834
|
this.#f
|
|
834
835
|
) : t.placeholderData, g !== void 0 && (c = "success", d = _(
|
|
@@ -837,8 +838,8 @@ var pe = class extends $ {
|
|
|
837
838
|
t
|
|
838
839
|
), p = !0);
|
|
839
840
|
}
|
|
840
|
-
if (t.select && d !== void 0 && !
|
|
841
|
-
if (n && d ===
|
|
841
|
+
if (t.select && d !== void 0 && !b)
|
|
842
|
+
if (n && d === a?.data && t.select === this.#y)
|
|
842
843
|
d = this.#d;
|
|
843
844
|
else
|
|
844
845
|
try {
|
|
@@ -846,8 +847,8 @@ var pe = class extends $ {
|
|
|
846
847
|
} catch (g) {
|
|
847
848
|
this.#i = g;
|
|
848
849
|
}
|
|
849
|
-
this.#i && (
|
|
850
|
-
const v = h.fetchStatus === "fetching", f = c === "pending", y = c === "error", E = f && v,
|
|
850
|
+
this.#i && (m = this.#i, d = this.#d, R = Date.now(), c = "error");
|
|
851
|
+
const v = h.fetchStatus === "fetching", f = c === "pending", y = c === "error", E = f && v, I = d !== void 0, O = {
|
|
851
852
|
status: c,
|
|
852
853
|
fetchStatus: h.fetchStatus,
|
|
853
854
|
isPending: f,
|
|
@@ -857,8 +858,8 @@ var pe = class extends $ {
|
|
|
857
858
|
isLoading: E,
|
|
858
859
|
data: d,
|
|
859
860
|
dataUpdatedAt: h.dataUpdatedAt,
|
|
860
|
-
error:
|
|
861
|
-
errorUpdatedAt:
|
|
861
|
+
error: m,
|
|
862
|
+
errorUpdatedAt: R,
|
|
862
863
|
failureCount: h.fetchFailureCount,
|
|
863
864
|
failureReason: h.fetchFailureReason,
|
|
864
865
|
errorUpdateCount: h.errorUpdateCount,
|
|
@@ -866,38 +867,38 @@ var pe = class extends $ {
|
|
|
866
867
|
isFetchedAfterMount: h.dataUpdateCount > u.dataUpdateCount || h.errorUpdateCount > u.errorUpdateCount,
|
|
867
868
|
isFetching: v,
|
|
868
869
|
isRefetching: v && !f,
|
|
869
|
-
isLoadingError: y && !
|
|
870
|
+
isLoadingError: y && !I,
|
|
870
871
|
isPaused: h.fetchStatus === "paused",
|
|
871
872
|
isPlaceholderData: p,
|
|
872
|
-
isRefetchError: y &&
|
|
873
|
+
isRefetchError: y && I,
|
|
873
874
|
isStale: V(e, t),
|
|
874
875
|
refetch: this.refetch,
|
|
875
|
-
promise: this.#
|
|
876
|
+
promise: this.#a
|
|
876
877
|
};
|
|
877
878
|
if (this.options.experimental_prefetchInRender) {
|
|
878
|
-
const g = (
|
|
879
|
-
|
|
879
|
+
const g = (D) => {
|
|
880
|
+
O.status === "error" ? D.reject(O.error) : O.data !== void 0 && D.resolve(O.data);
|
|
880
881
|
}, T = () => {
|
|
881
|
-
const
|
|
882
|
-
g(
|
|
883
|
-
},
|
|
884
|
-
switch (
|
|
882
|
+
const D = this.#a = O.promise = H();
|
|
883
|
+
g(D);
|
|
884
|
+
}, P = this.#a;
|
|
885
|
+
switch (P.status) {
|
|
885
886
|
case "pending":
|
|
886
|
-
e.queryHash === s.queryHash && g(
|
|
887
|
+
e.queryHash === s.queryHash && g(P);
|
|
887
888
|
break;
|
|
888
889
|
case "fulfilled":
|
|
889
|
-
(
|
|
890
|
+
(O.status === "error" || O.data !== P.value) && T();
|
|
890
891
|
break;
|
|
891
892
|
case "rejected":
|
|
892
|
-
(
|
|
893
|
+
(O.status !== "error" || O.error !== P.reason) && T();
|
|
893
894
|
break;
|
|
894
895
|
}
|
|
895
896
|
}
|
|
896
|
-
return
|
|
897
|
+
return O;
|
|
897
898
|
}
|
|
898
899
|
updateResult() {
|
|
899
900
|
const e = this.#n, t = this.createResult(this.#e, this.options);
|
|
900
|
-
if (this.#r = this.#e.state, this.#
|
|
901
|
+
if (this.#r = this.#e.state, this.#o = this.options, this.#r.data !== void 0 && (this.#f = this.#e), M(t, e))
|
|
901
902
|
return;
|
|
902
903
|
this.#n = t;
|
|
903
904
|
const s = () => {
|
|
@@ -906,17 +907,17 @@ var pe = class extends $ {
|
|
|
906
907
|
const { notifyOnChangeProps: r } = this.options, n = typeof r == "function" ? r() : r;
|
|
907
908
|
if (n === "all" || !n && !this.#p.size)
|
|
908
909
|
return !0;
|
|
909
|
-
const
|
|
910
|
+
const a = new Set(
|
|
910
911
|
n ?? this.#p
|
|
911
912
|
);
|
|
912
|
-
return this.options.throwOnError &&
|
|
913
|
-
const i =
|
|
914
|
-
return this.#n[i] !== e[i] &&
|
|
913
|
+
return this.options.throwOnError && a.add("error"), Object.keys(this.#n).some((o) => {
|
|
914
|
+
const i = o;
|
|
915
|
+
return this.#n[i] !== e[i] && a.has(i);
|
|
915
916
|
});
|
|
916
917
|
};
|
|
917
|
-
this.#
|
|
918
|
+
this.#R({ listeners: s() });
|
|
918
919
|
}
|
|
919
|
-
#
|
|
920
|
+
#O() {
|
|
920
921
|
const e = this.#t.getQueryCache().build(this.#t, this.options);
|
|
921
922
|
if (e === this.#e)
|
|
922
923
|
return;
|
|
@@ -926,8 +927,8 @@ var pe = class extends $ {
|
|
|
926
927
|
onQueryUpdate() {
|
|
927
928
|
this.updateResult(), this.hasListeners() && this.#g();
|
|
928
929
|
}
|
|
929
|
-
#
|
|
930
|
-
|
|
930
|
+
#R(e) {
|
|
931
|
+
$.batch(() => {
|
|
931
932
|
e.listeners && this.listeners.forEach((t) => {
|
|
932
933
|
t(this.#n);
|
|
933
934
|
}), this.#t.getQueryCache().notify({
|
|
@@ -954,27 +955,27 @@ function re(e, t, s, r) {
|
|
|
954
955
|
return (e !== t || w(r.enabled, e) === !1) && (!s.suspense || e.state.status !== "error") && V(e, s);
|
|
955
956
|
}
|
|
956
957
|
function V(e, t) {
|
|
957
|
-
return w(t.enabled, e) !== !1 && e.isStaleByTime(
|
|
958
|
+
return w(t.enabled, e) !== !1 && e.isStaleByTime(k(t.staleTime, e));
|
|
958
959
|
}
|
|
959
960
|
function Le(e, t) {
|
|
960
961
|
return !M(e.getCurrentResult(), t);
|
|
961
962
|
}
|
|
962
|
-
var
|
|
963
|
+
var pe = S.createContext(
|
|
963
964
|
void 0
|
|
964
|
-
),
|
|
965
|
-
const t = S.useContext(
|
|
965
|
+
), ye = (e) => {
|
|
966
|
+
const t = S.useContext(pe);
|
|
966
967
|
if (e)
|
|
967
968
|
return e;
|
|
968
969
|
if (!t)
|
|
969
970
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
970
971
|
return t;
|
|
971
|
-
},
|
|
972
|
+
}, Ct = ({
|
|
972
973
|
client: e,
|
|
973
974
|
children: t
|
|
974
975
|
}) => (S.useEffect(() => (e.mount(), () => {
|
|
975
976
|
e.unmount();
|
|
976
|
-
}), [e]), /* @__PURE__ */
|
|
977
|
-
|
|
977
|
+
}), [e]), /* @__PURE__ */ Ee.jsx(pe.Provider, { value: e, children: t })), ve = S.createContext(!1), Me = () => S.useContext(ve);
|
|
978
|
+
ve.Provider;
|
|
978
979
|
function Ne() {
|
|
979
980
|
let e = !1;
|
|
980
981
|
return {
|
|
@@ -995,17 +996,17 @@ function ne() {
|
|
|
995
996
|
}
|
|
996
997
|
var Be = (e, t) => {
|
|
997
998
|
(e.suspense || e.throwOnError || e.experimental_prefetchInRender) && (t.isReset() || (e.retryOnMount = !1));
|
|
998
|
-
},
|
|
999
|
+
}, Ge = (e) => {
|
|
999
1000
|
S.useEffect(() => {
|
|
1000
1001
|
e.clearReset();
|
|
1001
1002
|
}, [e]);
|
|
1002
|
-
},
|
|
1003
|
+
}, ze = ({
|
|
1003
1004
|
result: e,
|
|
1004
1005
|
errorResetBoundary: t,
|
|
1005
1006
|
throwOnError: s,
|
|
1006
1007
|
query: r,
|
|
1007
1008
|
suspense: n
|
|
1008
|
-
}) => e.isError && !t.isReset() && !e.isFetching && r && (n && e.data === void 0 || Ke(s, [e.error, r])),
|
|
1009
|
+
}) => e.isError && !t.isReset() && !e.isFetching && r && (n && e.data === void 0 || Ke(s, [e.error, r])), $e = (e, t) => t.state.data === void 0, Ve = (e) => {
|
|
1009
1010
|
const t = e.staleTime;
|
|
1010
1011
|
e.suspense && (e.staleTime = typeof t == "function" ? (...s) => Math.max(t(...s), 1e3) : Math.max(t ?? 1e3, 1e3), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, 1e3)));
|
|
1011
1012
|
}, Je = (e, t) => e.isLoading && e.isFetching && !t, Ze = (e, t) => e?.suspense && t.isPending, ie = (e, t, s) => t.fetchOptimistic(e).catch(() => {
|
|
@@ -1016,22 +1017,22 @@ function me(e, t, s) {
|
|
|
1016
1017
|
throw new Error(
|
|
1017
1018
|
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
|
1018
1019
|
);
|
|
1019
|
-
const r =
|
|
1020
|
+
const r = ye(s), n = Me(), a = He(), o = r.defaultQueryOptions(e);
|
|
1020
1021
|
r.getDefaultOptions().queries?._experimental_beforeQuery?.(
|
|
1021
|
-
|
|
1022
|
-
), process.env.NODE_ENV !== "production" && (
|
|
1023
|
-
`[${
|
|
1024
|
-
)),
|
|
1025
|
-
const i = !r.getQueryCache().get(
|
|
1022
|
+
o
|
|
1023
|
+
), process.env.NODE_ENV !== "production" && (o.queryFn || console.error(
|
|
1024
|
+
`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
|
|
1025
|
+
)), o._optimisticResults = n ? "isRestoring" : "optimistic", Ve(o), Be(o, a), Ge(a);
|
|
1026
|
+
const i = !r.getQueryCache().get(o.queryHash), [u] = S.useState(
|
|
1026
1027
|
() => new t(
|
|
1027
1028
|
r,
|
|
1028
|
-
|
|
1029
|
+
o
|
|
1029
1030
|
)
|
|
1030
|
-
), l = u.getOptimisticResult(
|
|
1031
|
+
), l = u.getOptimisticResult(o), h = !n && e.subscribed !== !1;
|
|
1031
1032
|
if (S.useSyncExternalStore(
|
|
1032
1033
|
S.useCallback(
|
|
1033
1034
|
(p) => {
|
|
1034
|
-
const d = h ? u.subscribe(
|
|
1035
|
+
const d = h ? u.subscribe($.batchCalls(p)) : ne;
|
|
1035
1036
|
return u.updateResult(), d;
|
|
1036
1037
|
},
|
|
1037
1038
|
[u, h]
|
|
@@ -1039,43 +1040,43 @@ function me(e, t, s) {
|
|
|
1039
1040
|
() => u.getCurrentResult(),
|
|
1040
1041
|
() => u.getCurrentResult()
|
|
1041
1042
|
), S.useEffect(() => {
|
|
1042
|
-
u.setOptions(
|
|
1043
|
-
}, [
|
|
1044
|
-
throw ie(
|
|
1045
|
-
if (
|
|
1043
|
+
u.setOptions(o);
|
|
1044
|
+
}, [o, u]), Ze(o, l))
|
|
1045
|
+
throw ie(o, u, a);
|
|
1046
|
+
if (ze({
|
|
1046
1047
|
result: l,
|
|
1047
|
-
errorResetBoundary:
|
|
1048
|
-
throwOnError:
|
|
1049
|
-
query: r.getQueryCache().get(
|
|
1050
|
-
suspense:
|
|
1048
|
+
errorResetBoundary: a,
|
|
1049
|
+
throwOnError: o.throwOnError,
|
|
1050
|
+
query: r.getQueryCache().get(o.queryHash),
|
|
1051
|
+
suspense: o.suspense
|
|
1051
1052
|
}))
|
|
1052
1053
|
throw l.error;
|
|
1053
1054
|
return r.getDefaultOptions().queries?._experimental_afterQuery?.(
|
|
1054
|
-
|
|
1055
|
+
o,
|
|
1055
1056
|
l
|
|
1056
|
-
),
|
|
1057
|
+
), o.experimental_prefetchInRender && !C && Je(l, n) && (i ? (
|
|
1057
1058
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
1058
|
-
ie(
|
|
1059
|
+
ie(o, u, a)
|
|
1059
1060
|
) : (
|
|
1060
1061
|
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
1061
|
-
r.getQueryCache().get(
|
|
1062
|
+
r.getQueryCache().get(o.queryHash)?.promise
|
|
1062
1063
|
))?.catch(ne).finally(() => {
|
|
1063
1064
|
u.updateResult();
|
|
1064
|
-
}),
|
|
1065
|
+
}), o.notifyOnChangeProps ? l : u.trackResult(l);
|
|
1065
1066
|
}
|
|
1066
1067
|
function We(e, t) {
|
|
1067
|
-
return me(e,
|
|
1068
|
+
return me(e, fe, t);
|
|
1068
1069
|
}
|
|
1069
1070
|
function Ye(e, t) {
|
|
1070
|
-
return process.env.NODE_ENV !== "production" && e.queryFn ===
|
|
1071
|
+
return process.env.NODE_ENV !== "production" && e.queryFn === x && console.error("skipToken is not allowed for useSuspenseQuery"), me(
|
|
1071
1072
|
{
|
|
1072
1073
|
...e,
|
|
1073
1074
|
enabled: !0,
|
|
1074
1075
|
suspense: !0,
|
|
1075
|
-
throwOnError:
|
|
1076
|
+
throwOnError: $e,
|
|
1076
1077
|
placeholderData: void 0
|
|
1077
1078
|
},
|
|
1078
|
-
|
|
1079
|
+
fe,
|
|
1079
1080
|
t
|
|
1080
1081
|
);
|
|
1081
1082
|
}
|
|
@@ -1091,22 +1092,19 @@ const Xe = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, et = (e) => e.filter(
|
|
|
1091
1092
|
const { prefix: t, pathname: s } = e;
|
|
1092
1093
|
let r = t;
|
|
1093
1094
|
return s.length > 0 ? (r ? r += "/" : r = "/", r += s.join("/")) : r || (r = "/"), r;
|
|
1094
|
-
},
|
|
1095
|
+
}, F = (...e) => {
|
|
1095
1096
|
const t = et(e), s = tt(t);
|
|
1096
1097
|
return st(s);
|
|
1097
|
-
},
|
|
1098
|
+
}, be = Object.freeze({
|
|
1098
1099
|
API_IDENTITIES: ["api-identities"]
|
|
1099
|
-
}),
|
|
1100
|
-
const e =
|
|
1100
|
+
}), Ft = () => {
|
|
1101
|
+
const e = ye();
|
|
1101
1102
|
return {
|
|
1102
1103
|
invalidateCache: async (t) => {
|
|
1103
|
-
await e.invalidateQueries({ queryKey:
|
|
1104
|
+
await e.invalidateQueries({ queryKey: be[t] });
|
|
1104
1105
|
}
|
|
1105
1106
|
};
|
|
1106
|
-
},
|
|
1107
|
-
const t = e.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
|
|
1108
|
-
return t ? `/${t}` : "/";
|
|
1109
|
-
}, J = (e, t) => {
|
|
1107
|
+
}, It = "no-dehydrate", J = (e, t) => {
|
|
1110
1108
|
for (const s of e) {
|
|
1111
1109
|
const r = Z(s, t);
|
|
1112
1110
|
if (r !== void 0) return r;
|
|
@@ -1116,54 +1114,75 @@ const Xe = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, et = (e) => e.filter(
|
|
|
1116
1114
|
if (r !== void 0) return r;
|
|
1117
1115
|
if (e.type === "category")
|
|
1118
1116
|
for (const n of e.items) {
|
|
1119
|
-
const
|
|
1117
|
+
const a = Z(n, t, [
|
|
1120
1118
|
...s,
|
|
1121
1119
|
e
|
|
1122
1120
|
]);
|
|
1123
|
-
if (
|
|
1121
|
+
if (a !== void 0) return a;
|
|
1124
1122
|
}
|
|
1125
|
-
},
|
|
1126
|
-
const e =
|
|
1123
|
+
}, Pt = () => {
|
|
1124
|
+
const e = A(), s = ge().sidebar;
|
|
1127
1125
|
return J(s, (r) => {
|
|
1128
|
-
if (r.type === "doc" &&
|
|
1126
|
+
if (r.type === "doc" && F(r.id) === e.pathname)
|
|
1129
1127
|
return r;
|
|
1130
1128
|
});
|
|
1131
|
-
},
|
|
1132
|
-
const t =
|
|
1129
|
+
}, Tt = (e) => {
|
|
1130
|
+
const t = A();
|
|
1133
1131
|
return Z(e, (s) => {
|
|
1134
|
-
if (s.type === "category" && s.link &&
|
|
1132
|
+
if (s.type === "category" && s.link && F(s.link.id) === t.pathname || s.type === "doc" && F(s.id) === t.pathname)
|
|
1135
1133
|
return !0;
|
|
1136
1134
|
});
|
|
1137
|
-
},
|
|
1138
|
-
const e =
|
|
1139
|
-
let r, n,
|
|
1140
|
-
return J(s, (
|
|
1141
|
-
const i =
|
|
1135
|
+
}, Dt = () => {
|
|
1136
|
+
const e = A().pathname, s = ge().sidebar;
|
|
1137
|
+
let r, n, a = !1;
|
|
1138
|
+
return J(s, (o) => {
|
|
1139
|
+
const i = o.type === "doc" ? F(o.id) : o.type === "category" && o.link ? F(o.link.id) : void 0;
|
|
1142
1140
|
if (i) {
|
|
1143
|
-
if (
|
|
1144
|
-
return n = { label:
|
|
1145
|
-
e === i ?
|
|
1141
|
+
if (a)
|
|
1142
|
+
return n = { label: o.label, id: i }, !0;
|
|
1143
|
+
e === i ? a = !0 : r = { label: o.label, id: i };
|
|
1146
1144
|
}
|
|
1147
1145
|
}), { prev: r, next: n };
|
|
1148
|
-
},
|
|
1146
|
+
}, kt = Ce(
|
|
1147
|
+
"relative flex items-center gap-2 px-(--padding-nav-item) my-0.5 py-1.5 rounded-lg hover:bg-accent tabular-nums",
|
|
1148
|
+
{
|
|
1149
|
+
variants: {
|
|
1150
|
+
isActive: {
|
|
1151
|
+
true: "bg-accent font-medium",
|
|
1152
|
+
false: "text-foreground/80"
|
|
1153
|
+
},
|
|
1154
|
+
isMuted: {
|
|
1155
|
+
true: "text-foreground/30",
|
|
1156
|
+
false: ""
|
|
1157
|
+
},
|
|
1158
|
+
isPending: {
|
|
1159
|
+
true: "bg-accent animate-pulse",
|
|
1160
|
+
false: ""
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1163
|
+
defaultVariants: {
|
|
1164
|
+
isActive: !1
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
), xt = (e) => (t) => t.display === "hide" ? !1 : t.display === "auth" && e || t.display === "anon" && !e || !t.display || t.display === "always", rt = Oe(
|
|
1149
1168
|
void 0
|
|
1150
1169
|
), W = () => {
|
|
1151
|
-
const e =
|
|
1170
|
+
const e = Re(rt);
|
|
1152
1171
|
if (!e)
|
|
1153
1172
|
throw new Error("useZudoku must be used within a ZudokuProvider.");
|
|
1154
1173
|
return e;
|
|
1155
|
-
},
|
|
1174
|
+
}, At = () => {
|
|
1156
1175
|
const { getApiIdentities: e } = W();
|
|
1157
1176
|
return We({
|
|
1158
1177
|
queryFn: e,
|
|
1159
|
-
queryKey:
|
|
1178
|
+
queryKey: be.API_IDENTITIES
|
|
1160
1179
|
});
|
|
1161
|
-
},
|
|
1162
|
-
const { getPluginSidebar: e, sidebars: t, topNavigation: s, options: r } = W(), n =
|
|
1180
|
+
}, ge = () => {
|
|
1181
|
+
const { getPluginSidebar: e, sidebars: t, topNavigation: s, options: r } = W(), n = A(), a = dt(), o = r.protectedRoutes?.some(
|
|
1163
1182
|
(p) => X(p, n.pathname)
|
|
1164
1183
|
);
|
|
1165
1184
|
let i = Object.entries(t).find(([, p]) => J(p, (d) => {
|
|
1166
|
-
if ((d.type === "doc" ?
|
|
1185
|
+
if ((d.type === "doc" ? F(d.id) : d.type === "category" && d.link ? F(d.link.id) : void 0) === n.pathname)
|
|
1167
1186
|
return d;
|
|
1168
1187
|
}));
|
|
1169
1188
|
const u = s.find((p) => p.id === i?.[0]) ?? s.find((p) => X(p.id, n.pathname));
|
|
@@ -1173,7 +1192,7 @@ const Xe = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, et = (e) => e.filter(
|
|
|
1173
1192
|
queryKey: ["plugin-sidebar", n.pathname]
|
|
1174
1193
|
});
|
|
1175
1194
|
return {
|
|
1176
|
-
sidebar:
|
|
1195
|
+
sidebar: a.isAuthEnabled && !a.isAuthenticated && o ? [] : [...i ? i[1] : [], ...l],
|
|
1177
1196
|
topNavItem: u
|
|
1178
1197
|
};
|
|
1179
1198
|
}, ae = (e) => {
|
|
@@ -1182,12 +1201,12 @@ const Xe = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, et = (e) => e.filter(
|
|
|
1182
1201
|
const p = typeof l == "function" ? l(t) : l;
|
|
1183
1202
|
if (!Object.is(p, t)) {
|
|
1184
1203
|
const d = t;
|
|
1185
|
-
t = h ?? (typeof p != "object" || p === null) ? p : Object.assign({}, t, p), s.forEach((
|
|
1204
|
+
t = h ?? (typeof p != "object" || p === null) ? p : Object.assign({}, t, p), s.forEach((m) => m(t, d));
|
|
1186
1205
|
}
|
|
1187
1206
|
}, n = () => t, i = { setState: r, getState: n, getInitialState: () => u, subscribe: (l) => (s.add(l), () => s.delete(l)) }, u = t = e(r, n, i);
|
|
1188
1207
|
return i;
|
|
1189
1208
|
}, nt = (e) => e ? ae(e) : ae, it = (e) => e;
|
|
1190
|
-
function
|
|
1209
|
+
function at(e, t = it) {
|
|
1191
1210
|
const s = Y.useSyncExternalStore(
|
|
1192
1211
|
e.subscribe,
|
|
1193
1212
|
() => t(e.getState()),
|
|
@@ -1195,11 +1214,11 @@ function ot(e, t = it) {
|
|
|
1195
1214
|
);
|
|
1196
1215
|
return Y.useDebugValue(s), s;
|
|
1197
1216
|
}
|
|
1198
|
-
const
|
|
1199
|
-
const t = nt(e), s = (r) =>
|
|
1217
|
+
const ot = (e) => {
|
|
1218
|
+
const t = nt(e), s = (r) => at(t, r);
|
|
1200
1219
|
return Object.assign(s, t), s;
|
|
1201
|
-
}, ut = (e) =>
|
|
1202
|
-
function
|
|
1220
|
+
}, ut = (e) => ot;
|
|
1221
|
+
function Se(e, t) {
|
|
1203
1222
|
let s;
|
|
1204
1223
|
try {
|
|
1205
1224
|
s = e();
|
|
@@ -1208,13 +1227,13 @@ function we(e, t) {
|
|
|
1208
1227
|
}
|
|
1209
1228
|
return {
|
|
1210
1229
|
getItem: (n) => {
|
|
1211
|
-
var
|
|
1212
|
-
const
|
|
1213
|
-
return i instanceof Promise ? i.then(
|
|
1230
|
+
var a;
|
|
1231
|
+
const o = (u) => u === null ? null : JSON.parse(u, void 0), i = (a = s.getItem(n)) != null ? a : null;
|
|
1232
|
+
return i instanceof Promise ? i.then(o) : o(i);
|
|
1214
1233
|
},
|
|
1215
|
-
setItem: (n,
|
|
1234
|
+
setItem: (n, a) => s.setItem(
|
|
1216
1235
|
n,
|
|
1217
|
-
JSON.stringify(
|
|
1236
|
+
JSON.stringify(a, void 0)
|
|
1218
1237
|
),
|
|
1219
1238
|
removeItem: (n) => s.removeItem(n)
|
|
1220
1239
|
};
|
|
@@ -1241,37 +1260,37 @@ const B = (e) => (t) => {
|
|
|
1241
1260
|
};
|
|
1242
1261
|
}
|
|
1243
1262
|
}, ct = (e, t) => (s, r, n) => {
|
|
1244
|
-
let
|
|
1245
|
-
storage:
|
|
1263
|
+
let a = {
|
|
1264
|
+
storage: Se(() => localStorage),
|
|
1246
1265
|
partialize: (c) => c,
|
|
1247
1266
|
version: 0,
|
|
1248
|
-
merge: (c,
|
|
1249
|
-
...
|
|
1267
|
+
merge: (c, b) => ({
|
|
1268
|
+
...b,
|
|
1250
1269
|
...c
|
|
1251
1270
|
}),
|
|
1252
1271
|
...t
|
|
1253
|
-
},
|
|
1272
|
+
}, o = !1;
|
|
1254
1273
|
const i = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
|
|
1255
|
-
let l =
|
|
1274
|
+
let l = a.storage;
|
|
1256
1275
|
if (!l)
|
|
1257
1276
|
return e(
|
|
1258
1277
|
(...c) => {
|
|
1259
1278
|
console.warn(
|
|
1260
|
-
`[zustand persist middleware] Unable to update item '${
|
|
1279
|
+
`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`
|
|
1261
1280
|
), s(...c);
|
|
1262
1281
|
},
|
|
1263
1282
|
r,
|
|
1264
1283
|
n
|
|
1265
1284
|
);
|
|
1266
1285
|
const h = () => {
|
|
1267
|
-
const c =
|
|
1268
|
-
return l.setItem(
|
|
1286
|
+
const c = a.partialize({ ...r() });
|
|
1287
|
+
return l.setItem(a.name, {
|
|
1269
1288
|
state: c,
|
|
1270
|
-
version:
|
|
1289
|
+
version: a.version
|
|
1271
1290
|
});
|
|
1272
1291
|
}, p = n.setState;
|
|
1273
|
-
n.setState = (c,
|
|
1274
|
-
p(c,
|
|
1292
|
+
n.setState = (c, b) => {
|
|
1293
|
+
p(c, b), h();
|
|
1275
1294
|
};
|
|
1276
1295
|
const d = e(
|
|
1277
1296
|
(...c) => {
|
|
@@ -1281,20 +1300,20 @@ const B = (e) => (t) => {
|
|
|
1281
1300
|
n
|
|
1282
1301
|
);
|
|
1283
1302
|
n.getInitialState = () => d;
|
|
1284
|
-
let
|
|
1285
|
-
const
|
|
1286
|
-
var c,
|
|
1303
|
+
let m;
|
|
1304
|
+
const R = () => {
|
|
1305
|
+
var c, b;
|
|
1287
1306
|
if (!l) return;
|
|
1288
|
-
|
|
1307
|
+
o = !1, i.forEach((f) => {
|
|
1289
1308
|
var y;
|
|
1290
1309
|
return f((y = r()) != null ? y : d);
|
|
1291
1310
|
});
|
|
1292
|
-
const v = ((
|
|
1293
|
-
return B(l.getItem.bind(l))(
|
|
1311
|
+
const v = ((b = a.onRehydrateStorage) == null ? void 0 : b.call(a, (c = r()) != null ? c : d)) || void 0;
|
|
1312
|
+
return B(l.getItem.bind(l))(a.name).then((f) => {
|
|
1294
1313
|
if (f)
|
|
1295
|
-
if (typeof f.version == "number" && f.version !==
|
|
1296
|
-
if (
|
|
1297
|
-
const y =
|
|
1314
|
+
if (typeof f.version == "number" && f.version !== a.version) {
|
|
1315
|
+
if (a.migrate) {
|
|
1316
|
+
const y = a.migrate(
|
|
1298
1317
|
f.state,
|
|
1299
1318
|
f.version
|
|
1300
1319
|
);
|
|
@@ -1308,38 +1327,38 @@ const B = (e) => (t) => {
|
|
|
1308
1327
|
return [!1, void 0];
|
|
1309
1328
|
}).then((f) => {
|
|
1310
1329
|
var y;
|
|
1311
|
-
const [E,
|
|
1312
|
-
if (
|
|
1313
|
-
|
|
1330
|
+
const [E, I] = f;
|
|
1331
|
+
if (m = a.merge(
|
|
1332
|
+
I,
|
|
1314
1333
|
(y = r()) != null ? y : d
|
|
1315
|
-
), s(
|
|
1334
|
+
), s(m, !0), E)
|
|
1316
1335
|
return h();
|
|
1317
1336
|
}).then(() => {
|
|
1318
|
-
v?.(
|
|
1337
|
+
v?.(m, void 0), m = r(), o = !0, u.forEach((f) => f(m));
|
|
1319
1338
|
}).catch((f) => {
|
|
1320
1339
|
v?.(void 0, f);
|
|
1321
1340
|
});
|
|
1322
1341
|
};
|
|
1323
1342
|
return n.persist = {
|
|
1324
1343
|
setOptions: (c) => {
|
|
1325
|
-
|
|
1326
|
-
...
|
|
1344
|
+
a = {
|
|
1345
|
+
...a,
|
|
1327
1346
|
...c
|
|
1328
1347
|
}, c.storage && (l = c.storage);
|
|
1329
1348
|
},
|
|
1330
1349
|
clearStorage: () => {
|
|
1331
|
-
l?.removeItem(
|
|
1350
|
+
l?.removeItem(a.name);
|
|
1332
1351
|
},
|
|
1333
|
-
getOptions: () =>
|
|
1334
|
-
rehydrate: () =>
|
|
1335
|
-
hasHydrated: () =>
|
|
1352
|
+
getOptions: () => a,
|
|
1353
|
+
rehydrate: () => R(),
|
|
1354
|
+
hasHydrated: () => o,
|
|
1336
1355
|
onHydrate: (c) => (i.add(c), () => {
|
|
1337
1356
|
i.delete(c);
|
|
1338
1357
|
}),
|
|
1339
1358
|
onFinishHydration: (c) => (u.add(c), () => {
|
|
1340
1359
|
u.delete(c);
|
|
1341
1360
|
})
|
|
1342
|
-
},
|
|
1361
|
+
}, a.skipHydration || R(), m || d;
|
|
1343
1362
|
}, ht = ct, lt = (e) => {
|
|
1344
1363
|
const t = (s) => {
|
|
1345
1364
|
s.key === e.persist.getOptions().name && s.newValue && e.persist.rehydrate();
|
|
@@ -1347,7 +1366,7 @@ const B = (e) => (t) => {
|
|
|
1347
1366
|
return window.addEventListener("storage", t), () => {
|
|
1348
1367
|
window.removeEventListener("storage", t);
|
|
1349
1368
|
};
|
|
1350
|
-
},
|
|
1369
|
+
}, we = ut()(
|
|
1351
1370
|
ht(
|
|
1352
1371
|
(e) => ({
|
|
1353
1372
|
isAuthenticated: !1,
|
|
@@ -1362,13 +1381,13 @@ const B = (e) => (t) => {
|
|
|
1362
1381
|
...typeof e == "object" ? e : {}
|
|
1363
1382
|
}),
|
|
1364
1383
|
name: "auth-state",
|
|
1365
|
-
storage:
|
|
1384
|
+
storage: Se(() => localStorage)
|
|
1366
1385
|
}
|
|
1367
1386
|
)
|
|
1368
1387
|
);
|
|
1369
|
-
typeof window < "u" && lt(
|
|
1388
|
+
typeof window < "u" && lt(we);
|
|
1370
1389
|
const dt = () => {
|
|
1371
|
-
const { authentication: e } = W(), t =
|
|
1390
|
+
const { authentication: e } = W(), t = we(), s = typeof e < "u";
|
|
1372
1391
|
return {
|
|
1373
1392
|
isAuthEnabled: s,
|
|
1374
1393
|
...t,
|
|
@@ -1394,49 +1413,53 @@ const dt = () => {
|
|
|
1394
1413
|
};
|
|
1395
1414
|
};
|
|
1396
1415
|
export {
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1416
|
+
ue as A,
|
|
1417
|
+
ce as B,
|
|
1418
|
+
be as C,
|
|
1419
|
+
k as D,
|
|
1420
|
+
bt as E,
|
|
1421
|
+
z as F,
|
|
1422
|
+
x as G,
|
|
1404
1423
|
Ct as H,
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1424
|
+
xt as I,
|
|
1425
|
+
ge as J,
|
|
1426
|
+
J as K,
|
|
1427
|
+
ut as L,
|
|
1428
|
+
ht as M,
|
|
1410
1429
|
It as N,
|
|
1411
|
-
|
|
1430
|
+
Se as O,
|
|
1431
|
+
At as P,
|
|
1432
|
+
Et as Q,
|
|
1412
1433
|
qe as R,
|
|
1413
|
-
|
|
1434
|
+
G as S,
|
|
1435
|
+
Tt as T,
|
|
1436
|
+
kt as U,
|
|
1414
1437
|
rt as Z,
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1438
|
+
Pt as a,
|
|
1439
|
+
Dt as b,
|
|
1440
|
+
xe as c,
|
|
1418
1441
|
Ye as d,
|
|
1419
1442
|
W as e,
|
|
1420
|
-
|
|
1421
|
-
|
|
1443
|
+
dt as f,
|
|
1444
|
+
Ft as g,
|
|
1422
1445
|
Q as h,
|
|
1423
|
-
|
|
1424
|
-
|
|
1446
|
+
ye as i,
|
|
1447
|
+
ne as j,
|
|
1425
1448
|
Ke as k,
|
|
1426
|
-
|
|
1449
|
+
F as l,
|
|
1427
1450
|
We as m,
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1451
|
+
$ as n,
|
|
1452
|
+
wt as o,
|
|
1453
|
+
nt as p,
|
|
1454
|
+
at as q,
|
|
1455
|
+
Fe as r,
|
|
1433
1456
|
M as s,
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1457
|
+
gt as t,
|
|
1458
|
+
we as u,
|
|
1459
|
+
St as v,
|
|
1460
|
+
q as w,
|
|
1461
|
+
Pe as x,
|
|
1462
|
+
Rt as y,
|
|
1463
|
+
Ot as z
|
|
1441
1464
|
};
|
|
1442
|
-
//# sourceMappingURL=hook-
|
|
1465
|
+
//# sourceMappingURL=hook-DawSLaZr.js.map
|