zudoku 0.0.0-f90a252 → 0.0.0-f9211eb
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/cli.js +3 -0
- package/dist/app/entry.client.d.ts +5 -0
- package/dist/app/entry.client.js +1 -0
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +8 -6
- package/dist/app/entry.server.js +12 -8
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.js +3 -1
- package/dist/app/main.js.map +1 -1
- package/dist/app/tailwind.js +20 -0
- package/dist/app/tailwind.js.map +1 -1
- package/dist/cli/build/handler.d.ts +1 -3
- package/dist/cli/build/handler.js +9 -1
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/cli.js +5 -0
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.d.ts +11 -3
- package/dist/cli/cmds/build.js +20 -13
- package/dist/cli/cmds/build.js.map +1 -1
- package/dist/cli/cmds/dev.d.ts +1 -1
- package/dist/cli/cmds/dev.js.map +1 -1
- package/dist/cli/cmds/preview.d.ts +16 -0
- package/dist/cli/cmds/preview.js +25 -0
- package/dist/cli/cmds/preview.js.map +1 -0
- package/dist/cli/dev/handler.js +2 -1
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/cli/preview/handler.d.ts +3 -0
- package/dist/cli/preview/handler.js +35 -0
- package/dist/cli/preview/handler.js.map +1 -0
- package/dist/config/common.d.ts +5 -3
- package/dist/config/config.d.ts +15 -15
- package/dist/config/loader.d.ts +6 -6
- package/dist/config/loader.js +20 -28
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +15 -15
- package/dist/config/validators/InputSidebarSchema.js +10 -1
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/common.d.ts +2993 -599
- package/dist/config/validators/common.js +107 -12
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/validate.d.ts +1127 -284
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +1 -0
- package/dist/lib/authentication/hook.d.ts +1 -0
- package/dist/lib/authentication/hook.js +11 -1
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.d.ts +2 -2
- package/dist/lib/authentication/providers/auth0.js +1 -0
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.d.ts +2 -2
- package/dist/lib/authentication/providers/clerk.js +25 -6
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +5 -3
- package/dist/lib/authentication/providers/openid.js +24 -10
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase.d.ts +4 -0
- package/dist/lib/authentication/providers/supabase.js +117 -0
- package/dist/lib/authentication/providers/supabase.js.map +1 -0
- package/dist/lib/authentication/state.d.ts +0 -26
- package/dist/lib/authentication/state.js +9 -18
- package/dist/lib/authentication/state.js.map +1 -1
- package/dist/lib/components/AnchorLink.d.ts +2 -2
- package/dist/lib/components/AnchorLink.js +5 -4
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +2 -1
- package/dist/lib/components/Bootstrap.js +3 -2
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/Footer.d.ts +1 -0
- package/dist/lib/components/Footer.js +32 -0
- package/dist/lib/components/Footer.js.map +1 -0
- package/dist/lib/components/Header.js +4 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +2 -2
- package/dist/lib/components/InlineCode.d.ts +2 -1
- package/dist/lib/components/InlineCode.js +2 -9
- package/dist/lib/components/InlineCode.js.map +1 -1
- package/dist/lib/components/Layout.js +8 -29
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Main.d.ts +2 -0
- package/dist/lib/components/Main.js +17 -0
- package/dist/lib/components/Main.js.map +1 -0
- package/dist/lib/components/MobileTopNavigation.js +6 -3
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/Pagination.d.ts +11 -0
- package/dist/lib/components/Pagination.js +10 -0
- package/dist/lib/components/Pagination.js.map +1 -0
- package/dist/lib/components/ThemeSwitch.js +1 -1
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +3 -2
- package/dist/lib/components/TopNavigation.js +28 -14
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.d.ts +1 -1
- package/dist/lib/components/Zudoku.js +15 -8
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/cache.d.ts +7 -0
- package/dist/lib/components/cache.js +7 -0
- package/dist/lib/components/cache.js.map +1 -1
- package/dist/lib/components/context/BypassProtectedRoutesContext.d.ts +1 -0
- package/dist/lib/components/context/BypassProtectedRoutesContext.js +3 -0
- package/dist/lib/components/context/BypassProtectedRoutesContext.js.map +1 -0
- package/dist/lib/components/context/RouterEventsEmitter.d.ts +1 -0
- package/dist/lib/components/context/RouterEventsEmitter.js +17 -0
- package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -0
- package/dist/lib/components/context/ViewportAnchorContext.d.ts +2 -4
- package/dist/lib/components/context/ViewportAnchorContext.js +5 -10
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +2 -2
- package/dist/lib/components/context/ZudokuContext.js +13 -7
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +7 -3
- package/dist/lib/components/index.js +2 -0
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/PoweredByZudoku.d.ts +3 -0
- package/dist/lib/components/navigation/PoweredByZudoku.js +6 -0
- package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -0
- package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
- package/dist/lib/components/navigation/Sidebar.js +1 -12
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarBadge.d.ts +2 -0
- package/dist/lib/components/navigation/SidebarBadge.js +3 -1
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
- package/dist/lib/components/navigation/SidebarCategory.js +10 -6
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +1 -0
- package/dist/lib/components/navigation/SidebarItem.js +17 -11
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.d.ts +7 -6
- package/dist/lib/components/navigation/SidebarWrapper.js +18 -3
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/{plugins/markdown → components/navigation}/Toc.js +5 -7
- package/dist/lib/components/navigation/Toc.js.map +1 -0
- package/dist/lib/components/navigation/ZudokuLogo.d.ts +6 -0
- package/dist/lib/components/navigation/ZudokuLogo.js +5 -0
- package/dist/lib/components/navigation/ZudokuLogo.js.map +1 -0
- package/dist/lib/core/RouteGuard.d.ts +2 -1
- package/dist/lib/core/RouteGuard.js +31 -11
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +32 -6
- package/dist/lib/core/ZudokuContext.js +29 -6
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +15 -7
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +6 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/hooks/index.d.ts +3 -0
- package/dist/lib/hooks/index.js +5 -0
- package/dist/lib/hooks/index.js.map +1 -0
- package/dist/lib/hooks/useEvent.d.ts +11 -0
- package/dist/lib/hooks/useEvent.js +19 -0
- package/dist/lib/hooks/useEvent.js.map +1 -0
- package/dist/lib/hooks/useEvent.test.js +100 -0
- package/dist/lib/hooks/useEvent.test.js.map +1 -0
- package/dist/lib/oas/graphql/index.d.ts +17 -4
- package/dist/lib/oas/graphql/index.js +151 -39
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/index.js +2 -0
- package/dist/lib/oas/parser/dereference/index.js.map +1 -1
- package/dist/lib/oas/parser/index.d.ts +5 -3
- package/dist/lib/oas/parser/index.js +0 -22
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +4 -2
- package/dist/lib/plugins/api-catalog/Catalog.js +16 -26
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-catalog/index.d.ts +1 -0
- package/dist/lib/plugins/api-catalog/index.js +39 -8
- package/dist/lib/plugins/api-catalog/index.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +7 -3
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +3 -9
- package/dist/lib/plugins/markdown/MdxPage.js.map +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/Endpoint.js +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.d.ts +2 -2
- package/dist/lib/plugins/openapi/OperationList.js +63 -18
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +7 -12
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.d.ts +6 -0
- package/dist/lib/plugins/openapi/ParamInfos.js +42 -0
- package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -0
- package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -1
- package/dist/lib/plugins/openapi/ParameterList.js +3 -2
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +9 -4
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.d.ts +1 -0
- package/dist/lib/plugins/openapi/SchemaList.js +52 -0
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -0
- package/dist/lib/plugins/openapi/Sidecar.js +39 -10
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +2 -2
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/SimpleSelect.js +1 -1
- package/dist/lib/plugins/openapi/SimpleSelect.js.map +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLClient.d.ts +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLClient.js +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.d.ts +6 -2
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +6 -5
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.d.ts +5 -0
- package/dist/lib/plugins/openapi/components/EnumValues.js +15 -0
- package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -0
- package/dist/lib/plugins/openapi/components/SelectOnClick.d.ts +5 -0
- package/dist/lib/plugins/openapi/components/SelectOnClick.js +16 -0
- package/dist/lib/plugins/openapi/components/SelectOnClick.js.map +1 -0
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +9 -5
- package/dist/lib/plugins/openapi/graphql/gql.js +5 -15
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +108 -55
- package/dist/lib/plugins/openapi/graphql/graphql.js +59 -34
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +6 -11
- package/dist/lib/plugins/openapi/index.js +41 -60
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +36 -10
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +1 -5
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +11 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js +14 -0
- package/dist/lib/plugins/openapi/playground/IdentityDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js +10 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js +3 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +13 -2
- package/dist/lib/plugins/openapi/playground/Playground.js +81 -27
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js +8 -0
- package/dist/lib/plugins/openapi/playground/RequestLoginDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +17 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js +11 -0
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +20 -14
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +6 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +4 -3
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +1 -2
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +2 -2
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +2 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +2 -2
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.d.ts +0 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +1 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.d.ts +4 -0
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +12 -0
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +2 -4
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +18 -13
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +1 -2
- package/dist/lib/plugins/openapi/schema/SchemaView.js +33 -48
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +1 -0
- package/dist/lib/plugins/openapi/schema/utils.js +3 -1
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/state.d.ts +25 -0
- package/dist/lib/plugins/openapi/state.js +18 -0
- package/dist/lib/plugins/openapi/state.js.map +1 -0
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js +5 -7
- package/dist/lib/plugins/openapi/util/createSidebarCategory.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js +9 -3
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.d.ts +6 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +80 -0
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +8 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js +32 -0
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/get-results.d.ts +10 -0
- package/dist/lib/plugins/search-pagefind/get-results.js +42 -0
- package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/index.d.ts +6 -0
- package/dist/lib/plugins/search-pagefind/index.js +9 -0
- package/dist/lib/plugins/search-pagefind/index.js.map +1 -0
- package/dist/lib/plugins/search-pagefind/types.d.ts +85 -0
- package/dist/lib/plugins/search-pagefind/types.js +2 -0
- package/dist/lib/plugins/search-pagefind/types.js.map +1 -0
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/Button.js +2 -1
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Callout.d.ts +2 -1
- package/dist/lib/ui/Callout.js +3 -2
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Checkbox.d.ts +2 -8
- package/dist/lib/ui/Checkbox.js +1 -13
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +7 -1
- package/dist/lib/ui/Command.js +2 -2
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Select.js +1 -1
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/Stepper.d.ts +3 -0
- package/dist/lib/ui/Stepper.js +7 -0
- package/dist/lib/ui/Stepper.js.map +1 -0
- package/dist/lib/ui/SyntaxHighlight.d.ts +15 -0
- package/dist/lib/ui/SyntaxHighlight.js +62 -0
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -0
- package/dist/lib/ui/util.d.ts +2 -0
- package/dist/lib/ui/util.js +3 -0
- package/dist/lib/ui/util.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +5 -2
- package/dist/lib/util/MdxComponents.js +6 -3
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/joinPath.d.ts +3 -0
- package/dist/lib/util/joinPath.js +3 -0
- package/dist/lib/util/joinPath.js.map +1 -1
- package/dist/lib/util/traverse.d.ts +2 -8
- package/dist/lib/util/traverse.js +2 -2
- package/dist/lib/util/traverse.js.map +1 -1
- package/dist/lib/util/types.d.ts +7 -0
- package/dist/lib/util/types.js +2 -0
- package/dist/lib/util/types.js.map +1 -0
- package/dist/lib/util/useOnScreen.d.ts +3 -2
- package/dist/lib/util/useOnScreen.js +3 -3
- package/dist/lib/util/useOnScreen.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js +26 -20
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/api/schema-codegen.d.ts +1 -1
- package/dist/vite/api/schema-codegen.js +31 -9
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +66 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/build.js +2 -0
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +2 -5
- package/dist/vite/config.js +39 -56
- 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/create-pagefind-index.d.ts +4 -0
- package/dist/vite/create-pagefind-index.js +12 -0
- package/dist/vite/create-pagefind-index.js.map +1 -0
- package/dist/vite/css/plugin.d.ts +2 -2
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.js +12 -4
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +2 -2
- package/dist/vite/plugin-api-keys.js +3 -3
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +2 -2
- package/dist/vite/plugin-api.js +42 -35
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +2 -2
- package/dist/vite/plugin-auth.js +3 -3
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +2 -2
- package/dist/vite/plugin-component.js +7 -2
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +4 -3
- package/dist/vite/plugin-config-reload.js +13 -6
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +2 -2
- package/dist/vite/plugin-config.js +7 -4
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +2 -2
- package/dist/vite/plugin-custom-pages.js +3 -3
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +3 -3
- package/dist/vite/plugin-docs.js +23 -6
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +2 -2
- package/dist/vite/plugin-frontmatter.js +5 -4
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +2 -2
- package/dist/vite/plugin-mdx.js +1 -1
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-redirect.d.ts +2 -2
- package/dist/vite/plugin-redirect.js +3 -3
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +2 -2
- package/dist/vite/plugin-search.js +5 -1
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +2 -2
- package/dist/vite/plugin-sidebar.js +2 -2
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin-theme-css.d.ts +2 -2
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/dist/vite/plugin.d.ts +2 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender/FileWritingResponse.d.ts +11 -6
- package/dist/vite/prerender/FileWritingResponse.js +9 -6
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
- package/dist/vite/prerender/InMemoryResponse.d.ts +16 -0
- package/dist/vite/prerender/InMemoryResponse.js +32 -0
- package/dist/vite/prerender/InMemoryResponse.js.map +1 -0
- package/dist/vite/prerender/PrerenderResponse.d.ts +10 -0
- package/dist/vite/prerender/PrerenderResponse.js +2 -0
- package/dist/vite/prerender/PrerenderResponse.js.map +1 -0
- package/dist/vite/prerender/prerender.d.ts +1 -0
- package/dist/vite/prerender/prerender.js +34 -28
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/prerender/worker.d.ts +1 -1
- package/dist/vite/prerender/worker.js +42 -12
- package/dist/vite/prerender/worker.js.map +1 -1
- package/dist/vite/sitemap.js +2 -1
- package/dist/vite/sitemap.js.map +1 -1
- package/dist/zuplo/with-zuplo.js +4 -0
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/{AuthenticationPlugin-_YVa673u.js → AuthenticationPlugin-foqdvvkf.js} +4 -4
- package/lib/{AuthenticationPlugin-_YVa673u.js.map → AuthenticationPlugin-foqdvvkf.js.map} +1 -1
- package/lib/Button-Fp19CMUr.js +49 -0
- package/lib/Button-Fp19CMUr.js.map +1 -0
- package/lib/Callout-B2vsR09t.js +229 -0
- package/lib/Callout-B2vsR09t.js.map +1 -0
- package/lib/{CategoryHeading-MYL1u_6K.js → CategoryHeading-DpB47wvk.js} +3 -3
- package/lib/{CategoryHeading-MYL1u_6K.js.map → CategoryHeading-DpB47wvk.js.map} +1 -1
- package/lib/Dialog-sbgekbjb.js +98 -0
- package/lib/Dialog-sbgekbjb.js.map +1 -0
- package/lib/Drawer-kDAfOq_2.js +1133 -0
- package/lib/Drawer-kDAfOq_2.js.map +1 -0
- package/lib/{Markdown-8mv9nhGd.js → Markdown-aF5FdsNi.js} +7822 -6052
- package/lib/Markdown-aF5FdsNi.js.map +1 -0
- package/lib/MdxPage-Vw_dc9Yz.js +85 -0
- package/lib/MdxPage-Vw_dc9Yz.js.map +1 -0
- package/lib/{OasProvider-IS9wBrb7.js → OasProvider-CjXTP-nz.js} +6 -6
- package/lib/{OasProvider-IS9wBrb7.js.map → OasProvider-CjXTP-nz.js.map} +1 -1
- package/lib/OperationList-BYemrDYk.js +5068 -0
- package/lib/OperationList-BYemrDYk.js.map +1 -0
- package/lib/Pagination-SdlocK96.js +48 -0
- package/lib/Pagination-SdlocK96.js.map +1 -0
- package/lib/{index.esm-9-TF9KQB.js → RouteGuard-CqZPoZYJ.js} +196 -144
- package/lib/RouteGuard-CqZPoZYJ.js.map +1 -0
- package/lib/SchemaList-CAeKy9pV.js +148 -0
- package/lib/SchemaList-CAeKy9pV.js.map +1 -0
- package/lib/SchemaView-B3fOPR4V.js +357 -0
- package/lib/SchemaView-B3fOPR4V.js.map +1 -0
- package/lib/{Select-D9CKL33X.js → Select-DVFRKf1R.js} +71 -71
- package/lib/{Select-D9CKL33X.js.map → Select-DVFRKf1R.js.map} +1 -1
- package/lib/SlotletProvider-DXvc0aY6.js +338 -0
- package/lib/SlotletProvider-DXvc0aY6.js.map +1 -0
- package/lib/Spinner-CE68iCm0.js +7 -0
- package/lib/Spinner-CE68iCm0.js.map +1 -0
- package/lib/{SyntaxHighlight-B0L4SC_N.js → SyntaxHighlight-BEoSoPEo.js} +496 -592
- package/lib/SyntaxHighlight-BEoSoPEo.js.map +1 -0
- package/lib/Toc-YBsgI72s.js +92 -0
- package/lib/Toc-YBsgI72s.js.map +1 -0
- package/lib/{chunk-SYFQ2XB5-QijJrSf0.js → chunk-HA7DTUK3-C4gP41vD.js} +560 -560
- package/lib/chunk-HA7DTUK3-C4gP41vD.js.map +1 -0
- package/lib/{circular-DxaIIlWD.js → circular-ByJI6Mci.js} +5461 -4993
- package/lib/circular-ByJI6Mci.js.map +1 -0
- package/lib/context-DLCwaMXN.js +22 -0
- package/lib/{context-rwLGh-6_.js.map → context-DLCwaMXN.js.map} +1 -1
- package/lib/{createServer-DSQiPwjN.js → createServer-mYvGvmc0.js} +5062 -5209
- package/lib/createServer-mYvGvmc0.js.map +1 -0
- package/lib/{hook-C_t2ISLC.js → hook-CqpVYDqN.js} +495 -467
- package/lib/hook-CqpVYDqN.js.map +1 -0
- package/lib/index-Bn6Lc9tq.js +9 -0
- package/lib/index-Bn6Lc9tq.js.map +1 -0
- package/lib/index-C1OzjGUK.js +2227 -0
- package/lib/index-C1OzjGUK.js.map +1 -0
- package/lib/index-CPNSgwSb.js +36 -0
- package/lib/{index-Djenk2Hj.js.map → index-CPNSgwSb.js.map} +1 -1
- package/lib/index-D48iOQvJ.js +1973 -0
- package/lib/index-D48iOQvJ.js.map +1 -0
- package/lib/index-DwT-v3zK.js +86 -0
- package/lib/index-DwT-v3zK.js.map +1 -0
- package/lib/{index-CjJS0l4l.js → index-LNp6rxyU.js} +2 -2
- package/lib/{index-CjJS0l4l.js.map → index-LNp6rxyU.js.map} +1 -1
- package/lib/index-gQD2h1wX.js +447 -0
- package/lib/index-gQD2h1wX.js.map +1 -0
- package/lib/{index.esm-CrSoEshU.js → index.esm--gIChbWs.js} +3 -3
- package/lib/{index.esm-CrSoEshU.js.map → index.esm--gIChbWs.js.map} +1 -1
- package/lib/{jsx-runtime-Bdg6XQ1m.js → jsx-runtime-CYK1ROHF.js} +99 -99
- package/lib/{jsx-runtime-Bdg6XQ1m.js.map → jsx-runtime-CYK1ROHF.js.map} +1 -1
- package/lib/{mutation-Cm3O9f3X.js → mutation-8LjrN7uz.js} +26 -26
- package/lib/{mutation-Cm3O9f3X.js.map → mutation-8LjrN7uz.js.map} +1 -1
- package/lib/objectEntries-yMIkr2mI.js +5 -0
- package/lib/objectEntries-yMIkr2mI.js.map +1 -0
- package/lib/post-processors/removeExtensions.js +4 -4
- package/lib/post-processors/traverse.js +2 -2
- package/lib/post-processors/traverse.js.map +1 -1
- package/lib/prism-bash.min-HHIMdNJ_.js.map +1 -1
- package/lib/prism-csharp.min-bQAo2pmx.js.map +1 -1
- package/lib/prism-java.min-BpvsOuIa.js.map +1 -1
- package/lib/prism-javascript.min-CEqHqgbm.js.map +1 -1
- package/lib/prism-json.min-B1GJqK1k.js.map +1 -1
- package/lib/prism-jsstacktrace.min-BfobCF2F.js +2 -0
- package/lib/prism-jsstacktrace.min-BfobCF2F.js.map +1 -0
- package/lib/prism-markdown.min-C0Qn0m-5.js.map +1 -1
- package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
- package/lib/prism-objectivec.min-BXSWqpJJ.js.map +1 -1
- package/lib/prism-ruby.min-Dx9KO9ds.js.map +1 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js.map +1 -1
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +11 -10
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +2 -2
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +2 -2
- package/lib/ui/Breadcrumb.js +4 -4
- package/lib/ui/Button.js +13 -12
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +39 -21
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Checkbox.js +16 -26
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/Command.js +105 -78
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +1 -1
- package/lib/ui/Drawer.js +14 -1151
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/Form.js +5 -5
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Pagination.js +10 -10
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +2 -2
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Stepper.js +6 -0
- package/lib/ui/Stepper.js.map +1 -0
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/SyntaxHighlight.js +11 -0
- package/lib/ui/SyntaxHighlight.js.map +1 -0
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +2 -2
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/util.js +6 -0
- package/lib/ui/util.js.map +1 -0
- package/lib/{useExposedProps-Bbf99zic.js → useExposedProps-B9qXJedG.js} +2 -2
- package/lib/{useExposedProps-Bbf99zic.js.map → useExposedProps-B9qXJedG.js.map} +1 -1
- package/lib/useLatest-hmRS46UF.js +11 -0
- package/lib/useLatest-hmRS46UF.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +15 -14
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +67 -49
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +370 -404
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +32 -1334
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +19 -0
- package/lib/zudoku.hooks.js.map +1 -0
- package/lib/zudoku.icons.js +1 -1
- package/lib/zudoku.plugin-api-catalog.js +106 -111
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +108 -106
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +3 -3
- package/lib/zudoku.plugin-markdown.js +2 -2
- package/lib/zudoku.plugin-openapi.js +6 -8
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +9 -9
- package/lib/zudoku.plugin-search-pagefind.js +233 -0
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
- package/lib/zudoku.plugins.js +9 -8
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +76 -56
- package/src/app/entry.client.tsx +8 -0
- package/src/app/entry.server.tsx +23 -13
- package/src/app/main.css +98 -57
- package/src/app/main.tsx +3 -1
- package/src/app/tailwind.ts +20 -0
- package/src/lib/authentication/authentication.ts +2 -0
- package/src/lib/authentication/hook.ts +12 -1
- package/src/lib/authentication/providers/auth0.tsx +3 -2
- package/src/lib/authentication/providers/clerk.tsx +32 -8
- package/src/lib/authentication/providers/openid.tsx +31 -15
- package/src/lib/authentication/providers/supabase.tsx +157 -0
- package/src/lib/authentication/state.ts +9 -37
- package/src/lib/components/AnchorLink.tsx +9 -7
- package/src/lib/components/Banner.tsx +1 -0
- package/src/lib/components/Bootstrap.tsx +13 -6
- package/src/lib/components/Footer.tsx +136 -0
- package/src/lib/components/Header.tsx +12 -8
- package/src/lib/components/Heading.tsx +1 -1
- package/src/lib/components/InlineCode.tsx +13 -16
- package/src/lib/components/Layout.tsx +22 -67
- package/src/lib/components/Main.tsx +50 -0
- package/src/lib/components/MobileTopNavigation.tsx +27 -18
- package/src/lib/components/Pagination.tsx +50 -0
- package/src/lib/components/ThemeSwitch.tsx +1 -1
- package/src/lib/components/TopNavigation.tsx +51 -24
- package/src/lib/components/Zudoku.tsx +20 -7
- package/src/lib/components/cache.ts +8 -0
- package/src/lib/components/context/BypassProtectedRoutesContext.ts +3 -0
- package/src/lib/components/context/RouterEventsEmitter.tsx +19 -0
- package/src/lib/components/context/ViewportAnchorContext.tsx +6 -15
- package/src/lib/components/context/ZudokuContext.ts +17 -8
- package/src/lib/components/index.ts +2 -0
- package/src/lib/components/navigation/PoweredByZudoku.tsx +23 -0
- package/src/lib/components/navigation/Sidebar.tsx +30 -44
- package/src/lib/components/navigation/SidebarBadge.tsx +4 -1
- package/src/lib/components/navigation/SidebarCategory.tsx +15 -12
- package/src/lib/components/navigation/SidebarItem.tsx +22 -29
- package/src/lib/components/navigation/SidebarWrapper.tsx +42 -23
- package/src/lib/{plugins/markdown → components/navigation}/Toc.tsx +5 -14
- package/src/lib/components/navigation/ZudokuLogo.tsx +25 -0
- package/src/lib/core/RouteGuard.tsx +69 -12
- package/src/lib/core/ZudokuContext.ts +63 -12
- package/src/lib/core/plugins.ts +21 -7
- package/src/lib/errors/ErrorAlert.tsx +24 -17
- package/src/lib/hooks/index.ts +5 -0
- package/src/lib/hooks/useEvent.test.tsx +149 -0
- package/src/lib/hooks/useEvent.ts +41 -0
- package/src/lib/oas/graphql/index.ts +206 -55
- package/src/lib/oas/parser/dereference/index.ts +2 -0
- package/src/lib/oas/parser/index.ts +7 -29
- package/src/lib/plugins/api-catalog/Catalog.tsx +50 -100
- package/src/lib/plugins/api-catalog/index.tsx +66 -15
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +7 -3
- package/src/lib/plugins/markdown/MdxPage.tsx +15 -47
- package/src/lib/plugins/openapi/ColorizedParam.tsx +1 -1
- package/src/lib/plugins/openapi/Endpoint.tsx +1 -1
- package/src/lib/plugins/openapi/OperationList.tsx +171 -81
- package/src/lib/plugins/openapi/OperationListItem.tsx +118 -104
- package/src/lib/plugins/openapi/ParamInfos.tsx +87 -0
- package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
- package/src/lib/plugins/openapi/ParameterListItem.tsx +35 -23
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -0
- package/src/lib/plugins/openapi/SchemaList.tsx +151 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +50 -13
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -2
- package/src/lib/plugins/openapi/SimpleSelect.tsx +1 -1
- package/src/lib/plugins/openapi/client/GraphQLClient.tsx +1 -1
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +13 -5
- package/src/lib/plugins/openapi/components/EnumValues.tsx +58 -0
- package/src/lib/plugins/openapi/components/SelectOnClick.tsx +29 -0
- package/src/lib/plugins/openapi/graphql/gql.ts +34 -17
- package/src/lib/plugins/openapi/graphql/graphql.ts +172 -86
- package/src/lib/plugins/openapi/index.tsx +55 -87
- package/src/lib/plugins/openapi/interfaces.ts +44 -15
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +30 -32
- package/src/lib/plugins/openapi/playground/Headers.tsx +0 -1
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +74 -0
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +54 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +8 -2
- package/src/lib/plugins/openapi/playground/Playground.tsx +176 -89
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +0 -1
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
- package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +25 -5
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +67 -45
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +1 -8
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.tsx +3 -0
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.tsx +6 -3
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +36 -0
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +47 -50
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +84 -138
- package/src/lib/plugins/openapi/schema/utils.ts +7 -1
- package/src/lib/plugins/openapi/state.ts +36 -0
- package/src/lib/plugins/openapi/util/createSidebarCategory.tsx +5 -7
- package/src/lib/plugins/openapi/util/getRoutes.tsx +9 -6
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +164 -0
- package/src/lib/plugins/search-pagefind/ResultList.tsx +105 -0
- package/src/lib/plugins/search-pagefind/get-results.tsx +75 -0
- package/src/lib/plugins/search-pagefind/index.tsx +21 -0
- package/src/lib/plugins/search-pagefind/types.ts +118 -0
- package/src/lib/ui/Button.tsx +4 -2
- package/src/lib/ui/Callout.tsx +28 -10
- package/src/lib/ui/Checkbox.tsx +8 -24
- package/src/lib/ui/Command.tsx +25 -3
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/ui/Stepper.tsx +8 -0
- package/src/lib/ui/SyntaxHighlight.tsx +186 -0
- package/src/lib/ui/util.tsx +3 -0
- package/src/lib/util/MdxComponents.tsx +7 -4
- package/src/lib/util/joinPath.tsx +3 -0
- package/src/lib/util/traverse.ts +4 -8
- package/src/lib/util/types.ts +7 -0
- package/src/lib/util/useOnScreen.ts +6 -4
- package/src/lib/util/useScrollToAnchor.ts +30 -20
- package/dist/lib/components/SyntaxHighlight.d.ts +0 -12
- package/dist/lib/components/SyntaxHighlight.js +0 -53
- package/dist/lib/components/SyntaxHighlight.js.map +0 -1
- package/dist/lib/components/context/PluginSystem.js +0 -2
- package/dist/lib/components/context/PluginSystem.js.map +0 -1
- package/dist/lib/plugins/markdown/Toc.js.map +0 -1
- package/lib/Markdown-8mv9nhGd.js.map +0 -1
- package/lib/MdxPage-GM1T5jmO.js +0 -193
- package/lib/MdxPage-GM1T5jmO.js.map +0 -1
- package/lib/OperationList-BTmRbbXk.js +0 -5179
- package/lib/OperationList-BTmRbbXk.js.map +0 -1
- package/lib/SlotletProvider-D0mFmGJu.js +0 -221
- package/lib/SlotletProvider-D0mFmGJu.js.map +0 -1
- package/lib/Spinner-BlzrEEk1.js +0 -51
- package/lib/Spinner-BlzrEEk1.js.map +0 -1
- package/lib/SyntaxHighlight-B0L4SC_N.js.map +0 -1
- package/lib/chunk-SYFQ2XB5-QijJrSf0.js.map +0 -1
- package/lib/circular-DxaIIlWD.js.map +0 -1
- package/lib/context-rwLGh-6_.js +0 -22
- package/lib/createServer-DSQiPwjN.js.map +0 -1
- package/lib/hook-C_t2ISLC.js.map +0 -1
- package/lib/index-B7mqiOei.js +0 -509
- package/lib/index-B7mqiOei.js.map +0 -1
- package/lib/index-BANyVRgL.js +0 -2098
- package/lib/index-BANyVRgL.js.map +0 -1
- package/lib/index-Djenk2Hj.js +0 -36
- package/lib/index.esm-9-TF9KQB.js.map +0 -1
- package/lib/joinUrl-nLx9pD-Z.js +0 -20
- package/lib/joinUrl-nLx9pD-Z.js.map +0 -1
- package/lib/useScrollToAnchor-BGEcH3HM.js +0 -286
- package/lib/useScrollToAnchor-BGEcH3HM.js.map +0 -1
- package/src/lib/components/SyntaxHighlight.tsx +0 -171
- package/src/lib/components/context/PluginSystem.ts +0 -0
- /package/dist/lib/{plugins/markdown → components/navigation}/Toc.d.ts +0 -0
- /package/dist/lib/{components/context/PluginSystem.d.ts → hooks/useEvent.test.d.ts} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
1
|
+
var $e = (t) => {
|
|
2
2
|
throw TypeError(t);
|
|
3
3
|
};
|
|
4
|
-
var me = (t, e, s) => e.has(t) ||
|
|
5
|
-
var n = (t, e, s) => (me(t, e, "read from private field"), s ? s.call(t) : e.get(t)), g = (t, e, s) => e.has(t) ?
|
|
6
|
-
import * as
|
|
7
|
-
import Ge, { createContext as
|
|
8
|
-
import { j as
|
|
9
|
-
import { u as
|
|
4
|
+
var me = (t, e, s) => e.has(t) || $e("Cannot " + s);
|
|
5
|
+
var n = (t, e, s) => (me(t, e, "read from private field"), s ? s.call(t) : e.get(t)), g = (t, e, s) => e.has(t) ? $e("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), d = (t, e, s, r) => (me(t, e, "write to private field"), r ? r.call(t, s) : e.set(t, s), s), w = (t, e, s) => (me(t, e, "access private method"), s);
|
|
6
|
+
import * as j from "react";
|
|
7
|
+
import Ge, { createContext as Et, useContext as Ct } from "react";
|
|
8
|
+
import { j as Ot } from "./jsx-runtime-CYK1ROHF.js";
|
|
9
|
+
import { u as ve, m as ze } from "./chunk-HA7DTUK3-C4gP41vD.js";
|
|
10
10
|
var qe = class {
|
|
11
11
|
constructor() {
|
|
12
12
|
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
@@ -23,38 +23,38 @@ var qe = class {
|
|
|
23
23
|
}
|
|
24
24
|
onUnsubscribe() {
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
function
|
|
26
|
+
}, V = typeof window > "u" || "Deno" in globalThis;
|
|
27
|
+
function Se() {
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function bs(t, e) {
|
|
30
30
|
return typeof t == "function" ? t(e) : t;
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function we(t) {
|
|
33
33
|
return typeof t == "number" && t >= 0 && t !== 1 / 0;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function ot(t, e) {
|
|
36
36
|
return Math.max(t + (e || 0) - Date.now(), 0);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function ye(t, e) {
|
|
39
39
|
return typeof t == "function" ? t(e) : t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function x(t, e) {
|
|
42
42
|
return typeof t == "function" ? t(e) : t;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function ms(t, e) {
|
|
45
45
|
const {
|
|
46
46
|
type: s = "all",
|
|
47
47
|
exact: r,
|
|
48
48
|
fetchStatus: i,
|
|
49
49
|
predicate: a,
|
|
50
|
-
queryKey:
|
|
51
|
-
stale:
|
|
50
|
+
queryKey: u,
|
|
51
|
+
stale: o
|
|
52
52
|
} = t;
|
|
53
|
-
if (
|
|
53
|
+
if (u) {
|
|
54
54
|
if (r) {
|
|
55
|
-
if (e.queryHash !==
|
|
55
|
+
if (e.queryHash !== It(u, e.options))
|
|
56
56
|
return !1;
|
|
57
|
-
} else if (!
|
|
57
|
+
} else if (!Le(e.queryKey, u))
|
|
58
58
|
return !1;
|
|
59
59
|
}
|
|
60
60
|
if (s !== "all") {
|
|
@@ -62,45 +62,45 @@ function fs(t, e) {
|
|
|
62
62
|
if (s === "active" && !l || s === "inactive" && l)
|
|
63
63
|
return !1;
|
|
64
64
|
}
|
|
65
|
-
return !(typeof
|
|
65
|
+
return !(typeof o == "boolean" && e.isStale() !== o || i && i !== e.state.fetchStatus || a && !a(e));
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function gs(t, e) {
|
|
68
68
|
const { exact: s, status: r, predicate: i, mutationKey: a } = t;
|
|
69
69
|
if (a) {
|
|
70
70
|
if (!e.options.mutationKey)
|
|
71
71
|
return !1;
|
|
72
72
|
if (s) {
|
|
73
|
-
if (
|
|
73
|
+
if (Re(e.options.mutationKey) !== Re(a))
|
|
74
74
|
return !1;
|
|
75
|
-
} else if (!
|
|
75
|
+
} else if (!Le(e.options.mutationKey, a))
|
|
76
76
|
return !1;
|
|
77
77
|
}
|
|
78
78
|
return !(r && e.state.status !== r || i && !i(e));
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
return ((e == null ? void 0 : e.queryKeyHashFn) ||
|
|
80
|
+
function It(t, e) {
|
|
81
|
+
return ((e == null ? void 0 : e.queryKeyHashFn) || Re)(t);
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Re(t) {
|
|
84
84
|
return JSON.stringify(
|
|
85
85
|
t,
|
|
86
|
-
(e, s) =>
|
|
86
|
+
(e, s) => Oe(s) ? Object.keys(s).sort().reduce((r, i) => (r[i] = s[i], r), {}) : s
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
|
-
function
|
|
90
|
-
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !
|
|
89
|
+
function Le(t, e) {
|
|
90
|
+
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? !Object.keys(e).some((s) => !Le(t[s], e[s])) : !1;
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function Ee(t, e) {
|
|
93
93
|
if (t === e)
|
|
94
94
|
return t;
|
|
95
|
-
const s =
|
|
96
|
-
if (s ||
|
|
97
|
-
const r = s ? t : Object.keys(t), i = r.length, a = s ? e : Object.keys(e),
|
|
95
|
+
const s = Je(t) && Je(e);
|
|
96
|
+
if (s || Oe(t) && Oe(e)) {
|
|
97
|
+
const r = s ? t : Object.keys(t), i = r.length, a = s ? e : Object.keys(e), u = a.length, o = s ? [] : {};
|
|
98
98
|
let l = 0;
|
|
99
|
-
for (let f = 0; f <
|
|
100
|
-
const
|
|
101
|
-
(!s && r.includes(
|
|
99
|
+
for (let f = 0; f < u; f++) {
|
|
100
|
+
const m = s ? f : a[f];
|
|
101
|
+
(!s && r.includes(m) || s) && t[m] === void 0 && e[m] === void 0 ? (o[m] = void 0, l++) : (o[m] = Ee(t[m], e[m]), o[m] === t[m] && t[m] !== void 0 && l++);
|
|
102
102
|
}
|
|
103
|
-
return i ===
|
|
103
|
+
return i === u && l === i ? t : o;
|
|
104
104
|
}
|
|
105
105
|
return e;
|
|
106
106
|
}
|
|
@@ -112,64 +112,67 @@ function Ce(t, e) {
|
|
|
112
112
|
return !1;
|
|
113
113
|
return !0;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function Je(t) {
|
|
116
116
|
return Array.isArray(t) && t.length === Object.keys(t).length;
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
if (!
|
|
118
|
+
function Oe(t) {
|
|
119
|
+
if (!Ve(t))
|
|
120
120
|
return !1;
|
|
121
121
|
const e = t.constructor;
|
|
122
122
|
if (e === void 0)
|
|
123
123
|
return !0;
|
|
124
124
|
const s = e.prototype;
|
|
125
|
-
return !(!
|
|
125
|
+
return !(!Ve(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function Ve(t) {
|
|
128
128
|
return Object.prototype.toString.call(t) === "[object Object]";
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function Ft(t) {
|
|
131
131
|
return new Promise((e) => {
|
|
132
132
|
setTimeout(e, t);
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function Ie(t, e, s) {
|
|
136
136
|
if (typeof s.structuralSharing == "function")
|
|
137
137
|
return s.structuralSharing(t, e);
|
|
138
138
|
if (s.structuralSharing !== !1) {
|
|
139
139
|
if (process.env.NODE_ENV !== "production")
|
|
140
140
|
try {
|
|
141
|
-
return
|
|
141
|
+
return Ee(t, e);
|
|
142
142
|
} catch (r) {
|
|
143
143
|
console.error(
|
|
144
144
|
`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${r}`
|
|
145
145
|
);
|
|
146
146
|
}
|
|
147
|
-
return
|
|
147
|
+
return Ee(t, e);
|
|
148
148
|
}
|
|
149
149
|
return e;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function Ss(t) {
|
|
152
|
+
return t;
|
|
153
|
+
}
|
|
154
|
+
function ws(t, e, s = 0) {
|
|
152
155
|
const r = [...t, e];
|
|
153
156
|
return s && r.length > s ? r.slice(1) : r;
|
|
154
157
|
}
|
|
155
|
-
function
|
|
158
|
+
function Rs(t, e, s = 0) {
|
|
156
159
|
const r = [e, ...t];
|
|
157
160
|
return s && r.length > s ? r.slice(0, -1) : r;
|
|
158
161
|
}
|
|
159
|
-
var
|
|
160
|
-
function
|
|
161
|
-
return process.env.NODE_ENV !== "production" && t.queryFn ===
|
|
162
|
+
var pe = Symbol();
|
|
163
|
+
function Pt(t, e) {
|
|
164
|
+
return process.env.NODE_ENV !== "production" && t.queryFn === pe && console.error(
|
|
162
165
|
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
|
|
163
|
-
), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn ===
|
|
166
|
+
), !t.queryFn && (e != null && e.initialPromise) ? () => e.initialPromise : !t.queryFn || t.queryFn === pe ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
|
|
164
167
|
}
|
|
165
|
-
var H, L, X,
|
|
168
|
+
var H, L, X, st, Tt = (st = class extends qe {
|
|
166
169
|
constructor() {
|
|
167
170
|
super();
|
|
168
171
|
g(this, H);
|
|
169
172
|
g(this, L);
|
|
170
173
|
g(this, X);
|
|
171
174
|
d(this, X, (e) => {
|
|
172
|
-
if (!
|
|
175
|
+
if (!V && window.addEventListener) {
|
|
173
176
|
const s = () => e();
|
|
174
177
|
return window.addEventListener("visibilitychange", s, !1), () => {
|
|
175
178
|
window.removeEventListener("visibilitychange", s);
|
|
@@ -203,14 +206,14 @@ var H, L, X, et, Dt = (et = class extends qe {
|
|
|
203
206
|
var e;
|
|
204
207
|
return typeof n(this, H) == "boolean" ? n(this, H) : ((e = globalThis.document) == null ? void 0 : e.visibilityState) !== "hidden";
|
|
205
208
|
}
|
|
206
|
-
}, H = new WeakMap(), L = new WeakMap(), X = new WeakMap(),
|
|
209
|
+
}, H = new WeakMap(), L = new WeakMap(), X = new WeakMap(), st), ut = new Tt(), ee, M, te, rt, Dt = (rt = class extends qe {
|
|
207
210
|
constructor() {
|
|
208
211
|
super();
|
|
209
212
|
g(this, ee, !0);
|
|
210
213
|
g(this, M);
|
|
211
214
|
g(this, te);
|
|
212
215
|
d(this, te, (e) => {
|
|
213
|
-
if (!
|
|
216
|
+
if (!V && window.addEventListener) {
|
|
214
217
|
const s = () => e(!0), r = () => e(!1);
|
|
215
218
|
return window.addEventListener("online", s, !1), window.addEventListener("offline", r, !1), () => {
|
|
216
219
|
window.removeEventListener("online", s), window.removeEventListener("offline", r);
|
|
@@ -237,8 +240,8 @@ var H, L, X, et, Dt = (et = class extends qe {
|
|
|
237
240
|
isOnline() {
|
|
238
241
|
return n(this, ee);
|
|
239
242
|
}
|
|
240
|
-
}, ee = new WeakMap(), M = new WeakMap(), te = new WeakMap(),
|
|
241
|
-
function
|
|
243
|
+
}, ee = new WeakMap(), M = new WeakMap(), te = new WeakMap(), rt), ct = new Dt();
|
|
244
|
+
function Fe() {
|
|
242
245
|
let t, e;
|
|
243
246
|
const s = new Promise((i, a) => {
|
|
244
247
|
t = i, e = a;
|
|
@@ -263,111 +266,111 @@ function Ie() {
|
|
|
263
266
|
function jt(t) {
|
|
264
267
|
return Math.min(1e3 * 2 ** t, 3e4);
|
|
265
268
|
}
|
|
266
|
-
function
|
|
267
|
-
return (t ?? "online") === "online" ?
|
|
269
|
+
function ht(t) {
|
|
270
|
+
return (t ?? "online") === "online" ? ct.isOnline() : !0;
|
|
268
271
|
}
|
|
269
|
-
var
|
|
272
|
+
var lt = class extends Error {
|
|
270
273
|
constructor(t) {
|
|
271
274
|
super("CancelledError"), this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent;
|
|
272
275
|
}
|
|
273
276
|
};
|
|
274
|
-
function
|
|
275
|
-
return t instanceof
|
|
277
|
+
function ge(t) {
|
|
278
|
+
return t instanceof lt;
|
|
276
279
|
}
|
|
277
|
-
function
|
|
280
|
+
function At(t) {
|
|
278
281
|
let e = !1, s = 0, r = !1, i;
|
|
279
|
-
const a =
|
|
280
|
-
var
|
|
281
|
-
r || (p(new
|
|
282
|
-
},
|
|
282
|
+
const a = Fe(), u = (h) => {
|
|
283
|
+
var v;
|
|
284
|
+
r || (p(new lt(h)), (v = t.abort) == null || v.call(t));
|
|
285
|
+
}, o = () => {
|
|
283
286
|
e = !0;
|
|
284
287
|
}, l = () => {
|
|
285
288
|
e = !1;
|
|
286
|
-
}, f = () =>
|
|
287
|
-
var
|
|
288
|
-
r || (r = !0, (
|
|
289
|
+
}, f = () => ut.isFocused() && (t.networkMode === "always" || ct.isOnline()) && t.canRun(), m = () => ht(t.networkMode) && t.canRun(), c = (h) => {
|
|
290
|
+
var v;
|
|
291
|
+
r || (r = !0, (v = t.onSuccess) == null || v.call(t, h), i == null || i(), a.resolve(h));
|
|
289
292
|
}, p = (h) => {
|
|
290
|
-
var
|
|
291
|
-
r || (r = !0, (
|
|
293
|
+
var v;
|
|
294
|
+
r || (r = !0, (v = t.onError) == null || v.call(t, h), i == null || i(), a.reject(h));
|
|
292
295
|
}, y = () => new Promise((h) => {
|
|
293
|
-
var
|
|
294
|
-
i = (
|
|
295
|
-
(r || f()) && h(
|
|
296
|
-
}, (
|
|
296
|
+
var v;
|
|
297
|
+
i = (E) => {
|
|
298
|
+
(r || f()) && h(E);
|
|
299
|
+
}, (v = t.onPause) == null || v.call(t);
|
|
297
300
|
}).then(() => {
|
|
298
301
|
var h;
|
|
299
302
|
i = void 0, r || (h = t.onContinue) == null || h.call(t);
|
|
300
|
-
}),
|
|
303
|
+
}), C = () => {
|
|
301
304
|
if (r)
|
|
302
305
|
return;
|
|
303
306
|
let h;
|
|
304
|
-
const
|
|
307
|
+
const v = s === 0 ? t.initialPromise : void 0;
|
|
305
308
|
try {
|
|
306
|
-
h =
|
|
307
|
-
} catch (
|
|
308
|
-
h = Promise.reject(
|
|
309
|
+
h = v ?? t.fn();
|
|
310
|
+
} catch (E) {
|
|
311
|
+
h = Promise.reject(E);
|
|
309
312
|
}
|
|
310
|
-
Promise.resolve(h).then(c).catch((
|
|
313
|
+
Promise.resolve(h).then(c).catch((E) => {
|
|
311
314
|
var be;
|
|
312
315
|
if (r)
|
|
313
316
|
return;
|
|
314
|
-
const R = t.retry ?? (
|
|
317
|
+
const R = t.retry ?? (V ? 0 : 3), O = t.retryDelay ?? jt, q = typeof O == "function" ? O(s, E) : O, Z = R === !0 || typeof R == "number" && s < R || typeof R == "function" && R(s, E);
|
|
315
318
|
if (e || !Z) {
|
|
316
|
-
p(
|
|
319
|
+
p(E);
|
|
317
320
|
return;
|
|
318
321
|
}
|
|
319
|
-
s++, (be = t.onFail) == null || be.call(t, s,
|
|
320
|
-
e ? p(
|
|
322
|
+
s++, (be = t.onFail) == null || be.call(t, s, E), Ft(q).then(() => f() ? void 0 : y()).then(() => {
|
|
323
|
+
e ? p(E) : C();
|
|
321
324
|
});
|
|
322
325
|
});
|
|
323
326
|
};
|
|
324
327
|
return {
|
|
325
328
|
promise: a,
|
|
326
|
-
cancel:
|
|
329
|
+
cancel: u,
|
|
327
330
|
continue: () => (i == null || i(), a),
|
|
328
|
-
cancelRetry:
|
|
331
|
+
cancelRetry: o,
|
|
329
332
|
continueRetry: l,
|
|
330
|
-
canStart:
|
|
331
|
-
start: () => (
|
|
333
|
+
canStart: m,
|
|
334
|
+
start: () => (m() ? C() : y().then(C), a)
|
|
332
335
|
};
|
|
333
336
|
}
|
|
334
337
|
function xt() {
|
|
335
|
-
let t = [], e = 0, s = (
|
|
336
|
-
|
|
337
|
-
}, r = (
|
|
338
|
-
|
|
339
|
-
}, i = (
|
|
340
|
-
const a = (
|
|
341
|
-
e ? t.push(
|
|
342
|
-
s(
|
|
338
|
+
let t = [], e = 0, s = (o) => {
|
|
339
|
+
o();
|
|
340
|
+
}, r = (o) => {
|
|
341
|
+
o();
|
|
342
|
+
}, i = (o) => setTimeout(o, 0);
|
|
343
|
+
const a = (o) => {
|
|
344
|
+
e ? t.push(o) : i(() => {
|
|
345
|
+
s(o);
|
|
343
346
|
});
|
|
344
|
-
},
|
|
345
|
-
const
|
|
346
|
-
t = [],
|
|
347
|
+
}, u = () => {
|
|
348
|
+
const o = t;
|
|
349
|
+
t = [], o.length && i(() => {
|
|
347
350
|
r(() => {
|
|
348
|
-
|
|
351
|
+
o.forEach((l) => {
|
|
349
352
|
s(l);
|
|
350
353
|
});
|
|
351
354
|
});
|
|
352
355
|
});
|
|
353
356
|
};
|
|
354
357
|
return {
|
|
355
|
-
batch: (
|
|
358
|
+
batch: (o) => {
|
|
356
359
|
let l;
|
|
357
360
|
e++;
|
|
358
361
|
try {
|
|
359
|
-
l =
|
|
362
|
+
l = o();
|
|
360
363
|
} finally {
|
|
361
|
-
e--, e ||
|
|
364
|
+
e--, e || u();
|
|
362
365
|
}
|
|
363
366
|
return l;
|
|
364
367
|
},
|
|
365
368
|
/**
|
|
366
369
|
* All calls to the wrapped function will be batched.
|
|
367
370
|
*/
|
|
368
|
-
batchCalls: (
|
|
371
|
+
batchCalls: (o) => (...l) => {
|
|
369
372
|
a(() => {
|
|
370
|
-
|
|
373
|
+
o(...l);
|
|
371
374
|
});
|
|
372
375
|
},
|
|
373
376
|
schedule: a,
|
|
@@ -375,22 +378,22 @@ function xt() {
|
|
|
375
378
|
* Use this method to set a custom notify function.
|
|
376
379
|
* This can be used to for example wrap notifications with `React.act` while running tests.
|
|
377
380
|
*/
|
|
378
|
-
setNotifyFunction: (
|
|
379
|
-
s =
|
|
381
|
+
setNotifyFunction: (o) => {
|
|
382
|
+
s = o;
|
|
380
383
|
},
|
|
381
384
|
/**
|
|
382
385
|
* Use this method to set a custom function to batch notifications together into a single tick.
|
|
383
386
|
* By default React Query will use the batch function provided by ReactDOM or React Native.
|
|
384
387
|
*/
|
|
385
|
-
setBatchNotifyFunction: (
|
|
386
|
-
r =
|
|
388
|
+
setBatchNotifyFunction: (o) => {
|
|
389
|
+
r = o;
|
|
387
390
|
},
|
|
388
|
-
setScheduler: (
|
|
389
|
-
i =
|
|
391
|
+
setScheduler: (o) => {
|
|
392
|
+
i = o;
|
|
390
393
|
}
|
|
391
394
|
};
|
|
392
395
|
}
|
|
393
|
-
var
|
|
396
|
+
var Me = xt(), K, nt, kt = (nt = class {
|
|
394
397
|
constructor() {
|
|
395
398
|
g(this, K);
|
|
396
399
|
}
|
|
@@ -398,30 +401,31 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
398
401
|
this.clearGcTimeout();
|
|
399
402
|
}
|
|
400
403
|
scheduleGc() {
|
|
401
|
-
this.clearGcTimeout(),
|
|
404
|
+
this.clearGcTimeout(), we(this.gcTime) && d(this, K, setTimeout(() => {
|
|
402
405
|
this.optionalRemove();
|
|
403
406
|
}, this.gcTime));
|
|
404
407
|
}
|
|
405
408
|
updateGcTime(t) {
|
|
406
409
|
this.gcTime = Math.max(
|
|
407
410
|
this.gcTime || 0,
|
|
408
|
-
t ?? (
|
|
411
|
+
t ?? (V ? 1 / 0 : 5 * 60 * 1e3)
|
|
409
412
|
);
|
|
410
413
|
}
|
|
411
414
|
clearGcTimeout() {
|
|
412
415
|
n(this, K) && (clearTimeout(n(this, K)), d(this, K, void 0));
|
|
413
416
|
}
|
|
414
|
-
}, K = new WeakMap(),
|
|
417
|
+
}, K = new WeakMap(), nt), se, re, D, B, I, he, $, A, Q, it, Es = (it = class extends kt {
|
|
415
418
|
constructor(e) {
|
|
416
419
|
super();
|
|
417
|
-
g(this,
|
|
420
|
+
g(this, A);
|
|
418
421
|
g(this, se);
|
|
419
422
|
g(this, re);
|
|
420
423
|
g(this, D);
|
|
421
|
-
g(this, I);
|
|
422
|
-
g(this, ce);
|
|
423
424
|
g(this, B);
|
|
424
|
-
|
|
425
|
+
g(this, I);
|
|
426
|
+
g(this, he);
|
|
427
|
+
g(this, $);
|
|
428
|
+
d(this, $, !1), d(this, he, e.defaultOptions), this.setOptions(e.options), this.observers = [], d(this, B, e.client), d(this, D, n(this, B).getQueryCache()), this.queryKey = e.queryKey, this.queryHash = e.queryHash, d(this, se, Ut(this.options)), this.state = e.state ?? n(this, se), this.scheduleGc();
|
|
425
429
|
}
|
|
426
430
|
get meta() {
|
|
427
431
|
return this.options.meta;
|
|
@@ -431,14 +435,14 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
431
435
|
return (e = n(this, I)) == null ? void 0 : e.promise;
|
|
432
436
|
}
|
|
433
437
|
setOptions(e) {
|
|
434
|
-
this.options = { ...n(this,
|
|
438
|
+
this.options = { ...n(this, he), ...e }, this.updateGcTime(this.options.gcTime);
|
|
435
439
|
}
|
|
436
440
|
optionalRemove() {
|
|
437
441
|
!this.observers.length && this.state.fetchStatus === "idle" && n(this, D).remove(this);
|
|
438
442
|
}
|
|
439
443
|
setData(e, s) {
|
|
440
|
-
const r =
|
|
441
|
-
return w(this,
|
|
444
|
+
const r = Ie(this.state.data, e, this.options);
|
|
445
|
+
return w(this, A, Q).call(this, {
|
|
442
446
|
data: r,
|
|
443
447
|
type: "success",
|
|
444
448
|
dataUpdatedAt: s == null ? void 0 : s.updatedAt,
|
|
@@ -446,12 +450,12 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
446
450
|
}), r;
|
|
447
451
|
}
|
|
448
452
|
setState(e, s) {
|
|
449
|
-
w(this,
|
|
453
|
+
w(this, A, Q).call(this, { type: "setState", state: e, setStateOptions: s });
|
|
450
454
|
}
|
|
451
455
|
cancel(e) {
|
|
452
456
|
var r, i;
|
|
453
457
|
const s = (r = n(this, I)) == null ? void 0 : r.promise;
|
|
454
|
-
return (i = n(this, I)) == null || i.cancel(e), s ? s.then(
|
|
458
|
+
return (i = n(this, I)) == null || i.cancel(e), s ? s.then(Se).catch(Se) : Promise.resolve();
|
|
455
459
|
}
|
|
456
460
|
destroy() {
|
|
457
461
|
super.destroy(), this.cancel({ silent: !0 });
|
|
@@ -461,11 +465,11 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
461
465
|
}
|
|
462
466
|
isActive() {
|
|
463
467
|
return this.observers.some(
|
|
464
|
-
(e) =>
|
|
468
|
+
(e) => x(e.options.enabled, this) !== !1
|
|
465
469
|
);
|
|
466
470
|
}
|
|
467
471
|
isDisabled() {
|
|
468
|
-
return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn ===
|
|
472
|
+
return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === pe || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
|
|
469
473
|
}
|
|
470
474
|
isStale() {
|
|
471
475
|
return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
|
|
@@ -473,7 +477,7 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
473
477
|
) : this.state.data === void 0;
|
|
474
478
|
}
|
|
475
479
|
isStaleByTime(e = 0) {
|
|
476
|
-
return this.state.isInvalidated || this.state.data === void 0 || !
|
|
480
|
+
return this.state.isInvalidated || this.state.data === void 0 || !ot(this.state.dataUpdatedAt, e);
|
|
477
481
|
}
|
|
478
482
|
onFocus() {
|
|
479
483
|
var s;
|
|
@@ -489,16 +493,16 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
489
493
|
this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), n(this, D).notify({ type: "observerAdded", query: this, observer: e }));
|
|
490
494
|
}
|
|
491
495
|
removeObserver(e) {
|
|
492
|
-
this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (n(this, I) && (n(this,
|
|
496
|
+
this.observers.includes(e) && (this.observers = this.observers.filter((s) => s !== e), this.observers.length || (n(this, I) && (n(this, $) ? n(this, I).cancel({ revert: !0 }) : n(this, I).cancelRetry()), this.scheduleGc()), n(this, D).notify({ type: "observerRemoved", query: this, observer: e }));
|
|
493
497
|
}
|
|
494
498
|
getObserversCount() {
|
|
495
499
|
return this.observers.length;
|
|
496
500
|
}
|
|
497
501
|
invalidate() {
|
|
498
|
-
this.state.isInvalidated || w(this,
|
|
502
|
+
this.state.isInvalidated || w(this, A, Q).call(this, { type: "invalidate" });
|
|
499
503
|
}
|
|
500
504
|
fetch(e, s) {
|
|
501
|
-
var l, f,
|
|
505
|
+
var l, f, m;
|
|
502
506
|
if (this.state.fetchStatus !== "idle") {
|
|
503
507
|
if (this.state.data !== void 0 && (s != null && s.cancelRefetch))
|
|
504
508
|
this.cancel({ silent: !0 });
|
|
@@ -515,87 +519,89 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
515
519
|
const r = new AbortController(), i = (c) => {
|
|
516
520
|
Object.defineProperty(c, "signal", {
|
|
517
521
|
enumerable: !0,
|
|
518
|
-
get: () => (d(this,
|
|
522
|
+
get: () => (d(this, $, !0), r.signal)
|
|
519
523
|
});
|
|
520
524
|
}, a = () => {
|
|
521
|
-
const c =
|
|
525
|
+
const c = Pt(this.options, s), p = {
|
|
526
|
+
client: n(this, B),
|
|
522
527
|
queryKey: this.queryKey,
|
|
523
528
|
meta: this.meta
|
|
524
529
|
};
|
|
525
|
-
return i(p), d(this,
|
|
530
|
+
return i(p), d(this, $, !1), this.options.persister ? this.options.persister(
|
|
526
531
|
c,
|
|
527
532
|
p,
|
|
528
533
|
this
|
|
529
534
|
) : c(p);
|
|
530
|
-
},
|
|
535
|
+
}, u = {
|
|
531
536
|
fetchOptions: s,
|
|
532
537
|
options: this.options,
|
|
533
538
|
queryKey: this.queryKey,
|
|
539
|
+
client: n(this, B),
|
|
534
540
|
state: this.state,
|
|
535
541
|
fetchFn: a
|
|
536
542
|
};
|
|
537
|
-
i(
|
|
538
|
-
|
|
543
|
+
i(u), (l = this.options.behavior) == null || l.onFetch(
|
|
544
|
+
u,
|
|
539
545
|
this
|
|
540
|
-
), d(this, re, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((f =
|
|
541
|
-
const
|
|
542
|
-
var p, y,
|
|
543
|
-
|
|
546
|
+
), d(this, re, this.state), (this.state.fetchStatus === "idle" || this.state.fetchMeta !== ((f = u.fetchOptions) == null ? void 0 : f.meta)) && w(this, A, Q).call(this, { type: "fetch", meta: (m = u.fetchOptions) == null ? void 0 : m.meta });
|
|
547
|
+
const o = (c) => {
|
|
548
|
+
var p, y, C, h;
|
|
549
|
+
ge(c) && c.silent || w(this, A, Q).call(this, {
|
|
544
550
|
type: "error",
|
|
545
551
|
error: c
|
|
546
|
-
}),
|
|
552
|
+
}), ge(c) || ((y = (p = n(this, D).config).onError) == null || y.call(
|
|
547
553
|
p,
|
|
548
554
|
c,
|
|
549
555
|
this
|
|
550
|
-
), (h = (
|
|
551
|
-
|
|
556
|
+
), (h = (C = n(this, D).config).onSettled) == null || h.call(
|
|
557
|
+
C,
|
|
552
558
|
this.state.data,
|
|
553
559
|
c,
|
|
554
560
|
this
|
|
555
561
|
)), this.scheduleGc();
|
|
556
562
|
};
|
|
557
|
-
return d(this, I,
|
|
563
|
+
return d(this, I, At({
|
|
558
564
|
initialPromise: s == null ? void 0 : s.initialPromise,
|
|
559
|
-
fn:
|
|
565
|
+
fn: u.fetchFn,
|
|
560
566
|
abort: r.abort.bind(r),
|
|
561
567
|
onSuccess: (c) => {
|
|
562
|
-
var p, y,
|
|
568
|
+
var p, y, C, h;
|
|
563
569
|
if (c === void 0) {
|
|
564
570
|
process.env.NODE_ENV !== "production" && console.error(
|
|
565
571
|
`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
|
|
566
|
-
),
|
|
572
|
+
), o(new Error(`${this.queryHash} data is undefined`));
|
|
567
573
|
return;
|
|
568
574
|
}
|
|
569
575
|
try {
|
|
570
576
|
this.setData(c);
|
|
571
|
-
} catch (
|
|
572
|
-
|
|
577
|
+
} catch (v) {
|
|
578
|
+
o(v);
|
|
573
579
|
return;
|
|
574
580
|
}
|
|
575
|
-
(y = (p = n(this, D).config).onSuccess) == null || y.call(p, c, this), (h = (
|
|
576
|
-
|
|
581
|
+
(y = (p = n(this, D).config).onSuccess) == null || y.call(p, c, this), (h = (C = n(this, D).config).onSettled) == null || h.call(
|
|
582
|
+
C,
|
|
577
583
|
c,
|
|
578
584
|
this.state.error,
|
|
579
585
|
this
|
|
580
586
|
), this.scheduleGc();
|
|
581
587
|
},
|
|
582
|
-
onError:
|
|
588
|
+
onError: o,
|
|
583
589
|
onFail: (c, p) => {
|
|
584
|
-
w(this,
|
|
590
|
+
w(this, A, Q).call(this, { type: "failed", failureCount: c, error: p });
|
|
585
591
|
},
|
|
586
592
|
onPause: () => {
|
|
587
|
-
w(this,
|
|
593
|
+
w(this, A, Q).call(this, { type: "pause" });
|
|
588
594
|
},
|
|
589
595
|
onContinue: () => {
|
|
590
|
-
w(this,
|
|
596
|
+
w(this, A, Q).call(this, { type: "continue" });
|
|
591
597
|
},
|
|
592
|
-
retry:
|
|
593
|
-
retryDelay:
|
|
594
|
-
networkMode:
|
|
598
|
+
retry: u.options.retry,
|
|
599
|
+
retryDelay: u.options.retryDelay,
|
|
600
|
+
networkMode: u.options.networkMode,
|
|
595
601
|
canRun: () => !0
|
|
596
602
|
})), n(this, I).start();
|
|
597
603
|
}
|
|
598
|
-
}, se = new WeakMap(), re = new WeakMap(), D = new WeakMap(), I = new WeakMap(),
|
|
604
|
+
}, se = new WeakMap(), re = new WeakMap(), D = new WeakMap(), B = new WeakMap(), I = new WeakMap(), he = new WeakMap(), $ = new WeakMap(), A = new WeakSet(), Q = function(e) {
|
|
599
605
|
const s = (r) => {
|
|
600
606
|
switch (e.type) {
|
|
601
607
|
case "failed":
|
|
@@ -617,7 +623,7 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
617
623
|
case "fetch":
|
|
618
624
|
return {
|
|
619
625
|
...r,
|
|
620
|
-
...
|
|
626
|
+
...dt(r.data, this.options),
|
|
621
627
|
fetchMeta: e.meta ?? null
|
|
622
628
|
};
|
|
623
629
|
case "success":
|
|
@@ -637,7 +643,7 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
637
643
|
};
|
|
638
644
|
case "error":
|
|
639
645
|
const i = e.error;
|
|
640
|
-
return
|
|
646
|
+
return ge(i) && i.revert && n(this, re) ? { ...n(this, re), fetchStatus: "idle" } : {
|
|
641
647
|
...r,
|
|
642
648
|
error: i,
|
|
643
649
|
errorUpdateCount: r.errorUpdateCount + 1,
|
|
@@ -659,24 +665,24 @@ var Le = xt(), K, st, Ut = (st = class {
|
|
|
659
665
|
};
|
|
660
666
|
}
|
|
661
667
|
};
|
|
662
|
-
this.state = s(this.state),
|
|
668
|
+
this.state = s(this.state), Me.batch(() => {
|
|
663
669
|
this.observers.forEach((r) => {
|
|
664
670
|
r.onQueryUpdate();
|
|
665
671
|
}), n(this, D).notify({ query: this, type: "updated", action: e });
|
|
666
672
|
});
|
|
667
|
-
},
|
|
668
|
-
function
|
|
673
|
+
}, it);
|
|
674
|
+
function dt(t, e) {
|
|
669
675
|
return {
|
|
670
676
|
fetchFailureCount: 0,
|
|
671
677
|
fetchFailureReason: null,
|
|
672
|
-
fetchStatus:
|
|
678
|
+
fetchStatus: ht(e.networkMode) ? "fetching" : "paused",
|
|
673
679
|
...t === void 0 && {
|
|
674
680
|
error: null,
|
|
675
681
|
status: "pending"
|
|
676
682
|
}
|
|
677
683
|
};
|
|
678
684
|
}
|
|
679
|
-
function
|
|
685
|
+
function Ut(t) {
|
|
680
686
|
const e = typeof t.initialData == "function" ? t.initialData() : t.initialData, s = e !== void 0, r = s ? typeof t.initialDataUpdatedAt == "function" ? t.initialDataUpdatedAt() : t.initialDataUpdatedAt : 0;
|
|
681
687
|
return {
|
|
682
688
|
data: e,
|
|
@@ -693,28 +699,28 @@ function qt(t) {
|
|
|
693
699
|
fetchStatus: "idle"
|
|
694
700
|
};
|
|
695
701
|
}
|
|
696
|
-
var T,
|
|
702
|
+
var T, b, le, P, G, ne, N, U, de, ie, ae, z, J, _, oe, S, ue, Pe, Te, De, je, Ae, xe, ke, yt, at, ft = (at = class extends qe {
|
|
697
703
|
constructor(e, s) {
|
|
698
704
|
super();
|
|
699
705
|
g(this, S);
|
|
700
706
|
g(this, T);
|
|
701
|
-
g(this,
|
|
702
|
-
g(this,
|
|
707
|
+
g(this, b);
|
|
708
|
+
g(this, le);
|
|
703
709
|
g(this, P);
|
|
704
710
|
g(this, G);
|
|
705
711
|
g(this, ne);
|
|
706
712
|
g(this, N);
|
|
707
713
|
g(this, U);
|
|
708
|
-
g(this,
|
|
714
|
+
g(this, de);
|
|
709
715
|
g(this, ie);
|
|
710
716
|
// This property keeps track of the last query with defined data.
|
|
711
717
|
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
712
718
|
g(this, ae);
|
|
713
|
-
g(this, $);
|
|
714
719
|
g(this, z);
|
|
720
|
+
g(this, J);
|
|
715
721
|
g(this, _);
|
|
716
722
|
g(this, oe, /* @__PURE__ */ new Set());
|
|
717
|
-
this.options = s, d(this, T, e), d(this, U, null), d(this, N,
|
|
723
|
+
this.options = s, d(this, T, e), d(this, U, null), d(this, N, Fe()), this.options.experimental_prefetchInRender || n(this, N).reject(
|
|
718
724
|
new Error("experimental_prefetchInRender feature flag is not enabled")
|
|
719
725
|
), this.bindMethods(), this.setOptions(s);
|
|
720
726
|
}
|
|
@@ -722,52 +728,52 @@ var T, m, he, P, G, ne, N, U, le, ie, ae, $, z, _, oe, S, ue, Fe, Pe, Te, De, Ae
|
|
|
722
728
|
this.refetch = this.refetch.bind(this);
|
|
723
729
|
}
|
|
724
730
|
onSubscribe() {
|
|
725
|
-
this.listeners.size === 1 && (n(this,
|
|
731
|
+
this.listeners.size === 1 && (n(this, b).addObserver(this), Ze(n(this, b), this.options) ? w(this, S, ue).call(this) : this.updateResult(), w(this, S, je).call(this));
|
|
726
732
|
}
|
|
727
733
|
onUnsubscribe() {
|
|
728
734
|
this.hasListeners() || this.destroy();
|
|
729
735
|
}
|
|
730
736
|
shouldFetchOnReconnect() {
|
|
731
|
-
return
|
|
732
|
-
n(this,
|
|
737
|
+
return Ue(
|
|
738
|
+
n(this, b),
|
|
733
739
|
this.options,
|
|
734
740
|
this.options.refetchOnReconnect
|
|
735
741
|
);
|
|
736
742
|
}
|
|
737
743
|
shouldFetchOnWindowFocus() {
|
|
738
|
-
return
|
|
739
|
-
n(this,
|
|
744
|
+
return Ue(
|
|
745
|
+
n(this, b),
|
|
740
746
|
this.options,
|
|
741
747
|
this.options.refetchOnWindowFocus
|
|
742
748
|
);
|
|
743
749
|
}
|
|
744
750
|
destroy() {
|
|
745
|
-
this.listeners = /* @__PURE__ */ new Set(), w(this, S, Ae).call(this), w(this, S,
|
|
751
|
+
this.listeners = /* @__PURE__ */ new Set(), w(this, S, Ae).call(this), w(this, S, xe).call(this), n(this, b).removeObserver(this);
|
|
746
752
|
}
|
|
747
753
|
setOptions(e, s) {
|
|
748
|
-
const r = this.options, i = n(this,
|
|
749
|
-
if (this.options = n(this, T).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof
|
|
754
|
+
const r = this.options, i = n(this, b);
|
|
755
|
+
if (this.options = n(this, T).defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof x(this.options.enabled, n(this, b)) != "boolean")
|
|
750
756
|
throw new Error(
|
|
751
757
|
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
752
758
|
);
|
|
753
|
-
w(this, S, ke).call(this), n(this,
|
|
759
|
+
w(this, S, ke).call(this), n(this, b).setOptions(this.options), r._defaulted && !Ce(this.options, r) && n(this, T).getQueryCache().notify({
|
|
754
760
|
type: "observerOptionsUpdated",
|
|
755
|
-
query: n(this,
|
|
761
|
+
query: n(this, b),
|
|
756
762
|
observer: this
|
|
757
763
|
});
|
|
758
764
|
const a = this.hasListeners();
|
|
759
|
-
a &&
|
|
760
|
-
n(this,
|
|
765
|
+
a && We(
|
|
766
|
+
n(this, b),
|
|
761
767
|
i,
|
|
762
768
|
this.options,
|
|
763
769
|
r
|
|
764
|
-
) && w(this, S, ue).call(this), this.updateResult(s), a && (n(this,
|
|
765
|
-
const
|
|
766
|
-
a && (n(this,
|
|
770
|
+
) && w(this, S, ue).call(this), this.updateResult(s), a && (n(this, b) !== i || x(this.options.enabled, n(this, b)) !== x(r.enabled, n(this, b)) || ye(this.options.staleTime, n(this, b)) !== ye(r.staleTime, n(this, b))) && w(this, S, Pe).call(this);
|
|
771
|
+
const u = w(this, S, Te).call(this);
|
|
772
|
+
a && (n(this, b) !== i || x(this.options.enabled, n(this, b)) !== x(r.enabled, n(this, b)) || u !== n(this, _)) && w(this, S, De).call(this, u);
|
|
767
773
|
}
|
|
768
774
|
getOptimisticResult(e) {
|
|
769
775
|
const s = n(this, T).getQueryCache().build(n(this, T), e), r = this.createResult(s, e);
|
|
770
|
-
return
|
|
776
|
+
return qt(this, r) && (d(this, P, r), d(this, ne, this.options), d(this, G, n(this, b).state)), r;
|
|
771
777
|
}
|
|
772
778
|
getCurrentResult() {
|
|
773
779
|
return n(this, P);
|
|
@@ -786,7 +792,7 @@ var T, m, he, P, G, ne, N, U, le, ie, ae, $, z, _, oe, S, ue, Fe, Pe, Te, De, Ae
|
|
|
786
792
|
n(this, oe).add(e);
|
|
787
793
|
}
|
|
788
794
|
getCurrentQuery() {
|
|
789
|
-
return n(this,
|
|
795
|
+
return n(this, b);
|
|
790
796
|
}
|
|
791
797
|
refetch({ ...e } = {}) {
|
|
792
798
|
return this.fetch({
|
|
@@ -804,34 +810,34 @@ var T, m, he, P, G, ne, N, U, le, ie, ae, $, z, _, oe, S, ue, Fe, Pe, Te, De, Ae
|
|
|
804
810
|
}).then(() => (this.updateResult(), n(this, P)));
|
|
805
811
|
}
|
|
806
812
|
createResult(e, s) {
|
|
807
|
-
var
|
|
808
|
-
const r = n(this,
|
|
809
|
-
let c = { ...
|
|
813
|
+
var Be;
|
|
814
|
+
const r = n(this, b), i = this.options, a = n(this, P), u = n(this, G), o = n(this, ne), f = e !== r ? e.state : n(this, le), { state: m } = e;
|
|
815
|
+
let c = { ...m }, p = !1, y;
|
|
810
816
|
if (s._optimisticResults) {
|
|
811
|
-
const F = this.hasListeners(), W = !F &&
|
|
817
|
+
const F = this.hasListeners(), W = !F && Ze(e, s), Y = F && We(e, r, s, i);
|
|
812
818
|
(W || Y) && (c = {
|
|
813
819
|
...c,
|
|
814
|
-
...
|
|
820
|
+
...dt(m.data, e.options)
|
|
815
821
|
}), s._optimisticResults === "isRestoring" && (c.fetchStatus = "idle");
|
|
816
822
|
}
|
|
817
|
-
let { error:
|
|
823
|
+
let { error: C, errorUpdatedAt: h, status: v } = c;
|
|
818
824
|
if (s.select && c.data !== void 0)
|
|
819
|
-
if (a && c.data === (
|
|
825
|
+
if (a && c.data === (u == null ? void 0 : u.data) && s.select === n(this, de))
|
|
820
826
|
y = n(this, ie);
|
|
821
827
|
else
|
|
822
828
|
try {
|
|
823
|
-
d(this,
|
|
829
|
+
d(this, de, s.select), y = s.select(c.data), y = Ie(a == null ? void 0 : a.data, y, s), d(this, ie, y), d(this, U, null);
|
|
824
830
|
} catch (F) {
|
|
825
831
|
d(this, U, F);
|
|
826
832
|
}
|
|
827
833
|
else
|
|
828
834
|
y = c.data;
|
|
829
|
-
if (s.placeholderData !== void 0 && y === void 0 &&
|
|
835
|
+
if (s.placeholderData !== void 0 && y === void 0 && v === "pending") {
|
|
830
836
|
let F;
|
|
831
|
-
if (a != null && a.isPlaceholderData && s.placeholderData === (
|
|
837
|
+
if (a != null && a.isPlaceholderData && s.placeholderData === (o == null ? void 0 : o.placeholderData))
|
|
832
838
|
F = a.data;
|
|
833
839
|
else if (F = typeof s.placeholderData == "function" ? s.placeholderData(
|
|
834
|
-
(
|
|
840
|
+
(Be = n(this, ae)) == null ? void 0 : Be.state.data,
|
|
835
841
|
n(this, ae)
|
|
836
842
|
) : s.placeholderData, s.select && F !== void 0)
|
|
837
843
|
try {
|
|
@@ -839,171 +845,171 @@ var T, m, he, P, G, ne, N, U, le, ie, ae, $, z, _, oe, S, ue, Fe, Pe, Te, De, Ae
|
|
|
839
845
|
} catch (W) {
|
|
840
846
|
d(this, U, W);
|
|
841
847
|
}
|
|
842
|
-
F !== void 0 && (
|
|
848
|
+
F !== void 0 && (v = "success", y = Ie(
|
|
843
849
|
a == null ? void 0 : a.data,
|
|
844
850
|
F,
|
|
845
851
|
s
|
|
846
852
|
), p = !0);
|
|
847
853
|
}
|
|
848
|
-
n(this, U) && (
|
|
849
|
-
const
|
|
850
|
-
status:
|
|
854
|
+
n(this, U) && (C = n(this, U), y = n(this, ie), h = Date.now(), v = "error");
|
|
855
|
+
const E = c.fetchStatus === "fetching", R = v === "pending", O = v === "error", q = R && E, Z = y !== void 0, k = {
|
|
856
|
+
status: v,
|
|
851
857
|
fetchStatus: c.fetchStatus,
|
|
852
858
|
isPending: R,
|
|
853
|
-
isSuccess:
|
|
859
|
+
isSuccess: v === "success",
|
|
854
860
|
isError: O,
|
|
855
|
-
isInitialLoading:
|
|
856
|
-
isLoading:
|
|
861
|
+
isInitialLoading: q,
|
|
862
|
+
isLoading: q,
|
|
857
863
|
data: y,
|
|
858
864
|
dataUpdatedAt: c.dataUpdatedAt,
|
|
859
|
-
error:
|
|
865
|
+
error: C,
|
|
860
866
|
errorUpdatedAt: h,
|
|
861
867
|
failureCount: c.fetchFailureCount,
|
|
862
868
|
failureReason: c.fetchFailureReason,
|
|
863
869
|
errorUpdateCount: c.errorUpdateCount,
|
|
864
870
|
isFetched: c.dataUpdateCount > 0 || c.errorUpdateCount > 0,
|
|
865
871
|
isFetchedAfterMount: c.dataUpdateCount > f.dataUpdateCount || c.errorUpdateCount > f.errorUpdateCount,
|
|
866
|
-
isFetching:
|
|
867
|
-
isRefetching:
|
|
872
|
+
isFetching: E,
|
|
873
|
+
isRefetching: E && !R,
|
|
868
874
|
isLoadingError: O && !Z,
|
|
869
875
|
isPaused: c.fetchStatus === "paused",
|
|
870
876
|
isPlaceholderData: p,
|
|
871
877
|
isRefetchError: O && Z,
|
|
872
|
-
isStale:
|
|
878
|
+
isStale: Ne(e, s),
|
|
873
879
|
refetch: this.refetch,
|
|
874
880
|
promise: n(this, N)
|
|
875
881
|
};
|
|
876
882
|
if (this.options.experimental_prefetchInRender) {
|
|
877
|
-
const F = (
|
|
878
|
-
|
|
883
|
+
const F = (fe) => {
|
|
884
|
+
k.status === "error" ? fe.reject(k.error) : k.data !== void 0 && fe.resolve(k.data);
|
|
879
885
|
}, W = () => {
|
|
880
|
-
const
|
|
881
|
-
F(
|
|
886
|
+
const fe = d(this, N, k.promise = Fe());
|
|
887
|
+
F(fe);
|
|
882
888
|
}, Y = n(this, N);
|
|
883
889
|
switch (Y.status) {
|
|
884
890
|
case "pending":
|
|
885
891
|
e.queryHash === r.queryHash && F(Y);
|
|
886
892
|
break;
|
|
887
893
|
case "fulfilled":
|
|
888
|
-
(
|
|
894
|
+
(k.status === "error" || k.data !== Y.value) && W();
|
|
889
895
|
break;
|
|
890
896
|
case "rejected":
|
|
891
|
-
(
|
|
897
|
+
(k.status !== "error" || k.error !== Y.reason) && W();
|
|
892
898
|
break;
|
|
893
899
|
}
|
|
894
900
|
}
|
|
895
|
-
return
|
|
901
|
+
return k;
|
|
896
902
|
}
|
|
897
903
|
updateResult(e) {
|
|
898
|
-
const s = n(this, P), r = this.createResult(n(this,
|
|
899
|
-
if (d(this, G, n(this,
|
|
904
|
+
const s = n(this, P), r = this.createResult(n(this, b), this.options);
|
|
905
|
+
if (d(this, G, n(this, b).state), d(this, ne, this.options), n(this, G).data !== void 0 && d(this, ae, n(this, b)), Ce(r, s))
|
|
900
906
|
return;
|
|
901
907
|
d(this, P, r);
|
|
902
908
|
const i = {}, a = () => {
|
|
903
909
|
if (!s)
|
|
904
910
|
return !0;
|
|
905
|
-
const { notifyOnChangeProps:
|
|
906
|
-
if (
|
|
911
|
+
const { notifyOnChangeProps: u } = this.options, o = typeof u == "function" ? u() : u;
|
|
912
|
+
if (o === "all" || !o && !n(this, oe).size)
|
|
907
913
|
return !0;
|
|
908
914
|
const l = new Set(
|
|
909
|
-
|
|
915
|
+
o ?? n(this, oe)
|
|
910
916
|
);
|
|
911
917
|
return this.options.throwOnError && l.add("error"), Object.keys(n(this, P)).some((f) => {
|
|
912
|
-
const
|
|
913
|
-
return n(this, P)[
|
|
918
|
+
const m = f;
|
|
919
|
+
return n(this, P)[m] !== s[m] && l.has(m);
|
|
914
920
|
});
|
|
915
921
|
};
|
|
916
|
-
(e == null ? void 0 : e.listeners) !== !1 && a() && (i.listeners = !0), w(this, S,
|
|
922
|
+
(e == null ? void 0 : e.listeners) !== !1 && a() && (i.listeners = !0), w(this, S, yt).call(this, { ...i, ...e });
|
|
917
923
|
}
|
|
918
924
|
onQueryUpdate() {
|
|
919
|
-
this.updateResult(), this.hasListeners() && w(this, S,
|
|
925
|
+
this.updateResult(), this.hasListeners() && w(this, S, je).call(this);
|
|
920
926
|
}
|
|
921
|
-
}, T = new WeakMap(),
|
|
927
|
+
}, T = new WeakMap(), b = new WeakMap(), le = new WeakMap(), P = new WeakMap(), G = new WeakMap(), ne = new WeakMap(), N = new WeakMap(), U = new WeakMap(), de = new WeakMap(), ie = new WeakMap(), ae = new WeakMap(), z = new WeakMap(), J = new WeakMap(), _ = new WeakMap(), oe = new WeakMap(), S = new WeakSet(), ue = function(e) {
|
|
922
928
|
w(this, S, ke).call(this);
|
|
923
|
-
let s = n(this,
|
|
929
|
+
let s = n(this, b).fetch(
|
|
924
930
|
this.options,
|
|
925
931
|
e
|
|
926
932
|
);
|
|
927
|
-
return e != null && e.throwOnError || (s = s.catch(
|
|
928
|
-
},
|
|
933
|
+
return e != null && e.throwOnError || (s = s.catch(Se)), s;
|
|
934
|
+
}, Pe = function() {
|
|
929
935
|
w(this, S, Ae).call(this);
|
|
930
|
-
const e =
|
|
936
|
+
const e = ye(
|
|
931
937
|
this.options.staleTime,
|
|
932
|
-
n(this,
|
|
938
|
+
n(this, b)
|
|
933
939
|
);
|
|
934
|
-
if (
|
|
940
|
+
if (V || n(this, P).isStale || !we(e))
|
|
935
941
|
return;
|
|
936
|
-
const r =
|
|
937
|
-
d(this,
|
|
942
|
+
const r = ot(n(this, P).dataUpdatedAt, e) + 1;
|
|
943
|
+
d(this, z, setTimeout(() => {
|
|
938
944
|
n(this, P).isStale || this.updateResult();
|
|
939
945
|
}, r));
|
|
940
|
-
},
|
|
941
|
-
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this,
|
|
942
|
-
},
|
|
943
|
-
w(this, S,
|
|
944
|
-
(this.options.refetchIntervalInBackground ||
|
|
946
|
+
}, Te = function() {
|
|
947
|
+
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(n(this, b)) : this.options.refetchInterval) ?? !1;
|
|
948
|
+
}, De = function(e) {
|
|
949
|
+
w(this, S, xe).call(this), d(this, _, e), !(V || x(this.options.enabled, n(this, b)) === !1 || !we(n(this, _)) || n(this, _) === 0) && d(this, J, setInterval(() => {
|
|
950
|
+
(this.options.refetchIntervalInBackground || ut.isFocused()) && w(this, S, ue).call(this);
|
|
945
951
|
}, n(this, _)));
|
|
946
|
-
}, De = function() {
|
|
947
|
-
w(this, S, Fe).call(this), w(this, S, Te).call(this, w(this, S, Pe).call(this));
|
|
948
|
-
}, Ae = function() {
|
|
949
|
-
n(this, $) && (clearTimeout(n(this, $)), d(this, $, void 0));
|
|
950
952
|
}, je = function() {
|
|
951
|
-
|
|
953
|
+
w(this, S, Pe).call(this), w(this, S, De).call(this, w(this, S, Te).call(this));
|
|
954
|
+
}, Ae = function() {
|
|
955
|
+
n(this, z) && (clearTimeout(n(this, z)), d(this, z, void 0));
|
|
956
|
+
}, xe = function() {
|
|
957
|
+
n(this, J) && (clearInterval(n(this, J)), d(this, J, void 0));
|
|
952
958
|
}, ke = function() {
|
|
953
959
|
const e = n(this, T).getQueryCache().build(n(this, T), this.options);
|
|
954
|
-
if (e === n(this,
|
|
960
|
+
if (e === n(this, b))
|
|
955
961
|
return;
|
|
956
|
-
const s = n(this,
|
|
957
|
-
d(this,
|
|
958
|
-
},
|
|
959
|
-
|
|
962
|
+
const s = n(this, b);
|
|
963
|
+
d(this, b, e), d(this, le, e.state), this.hasListeners() && (s == null || s.removeObserver(this), e.addObserver(this));
|
|
964
|
+
}, yt = function(e) {
|
|
965
|
+
Me.batch(() => {
|
|
960
966
|
e.listeners && this.listeners.forEach((s) => {
|
|
961
967
|
s(n(this, P));
|
|
962
968
|
}), n(this, T).getQueryCache().notify({
|
|
963
|
-
query: n(this,
|
|
969
|
+
query: n(this, b),
|
|
964
970
|
type: "observerResultsUpdated"
|
|
965
971
|
});
|
|
966
972
|
});
|
|
967
|
-
},
|
|
973
|
+
}, at);
|
|
968
974
|
function Qt(t, e) {
|
|
969
|
-
return
|
|
975
|
+
return x(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
|
|
970
976
|
}
|
|
971
|
-
function
|
|
972
|
-
return Qt(t, e) || t.state.data !== void 0 &&
|
|
977
|
+
function Ze(t, e) {
|
|
978
|
+
return Qt(t, e) || t.state.data !== void 0 && Ue(t, e, e.refetchOnMount);
|
|
973
979
|
}
|
|
974
|
-
function
|
|
975
|
-
if (
|
|
980
|
+
function Ue(t, e, s) {
|
|
981
|
+
if (x(e.enabled, t) !== !1) {
|
|
976
982
|
const r = typeof s == "function" ? s(t) : s;
|
|
977
|
-
return r === "always" || r !== !1 &&
|
|
983
|
+
return r === "always" || r !== !1 && Ne(t, e);
|
|
978
984
|
}
|
|
979
985
|
return !1;
|
|
980
986
|
}
|
|
981
|
-
function
|
|
982
|
-
return (t !== e ||
|
|
987
|
+
function We(t, e, s, r) {
|
|
988
|
+
return (t !== e || x(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Ne(t, s);
|
|
983
989
|
}
|
|
984
|
-
function
|
|
985
|
-
return
|
|
990
|
+
function Ne(t, e) {
|
|
991
|
+
return x(e.enabled, t) !== !1 && t.isStaleByTime(ye(e.staleTime, t));
|
|
986
992
|
}
|
|
987
|
-
function
|
|
993
|
+
function qt(t, e) {
|
|
988
994
|
return !Ce(t.getCurrentResult(), e);
|
|
989
995
|
}
|
|
990
|
-
var
|
|
996
|
+
var pt = j.createContext(
|
|
991
997
|
void 0
|
|
992
|
-
),
|
|
993
|
-
const e =
|
|
998
|
+
), vt = (t) => {
|
|
999
|
+
const e = j.useContext(pt);
|
|
994
1000
|
if (t)
|
|
995
1001
|
return t;
|
|
996
1002
|
if (!e)
|
|
997
1003
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
998
1004
|
return e;
|
|
999
|
-
},
|
|
1005
|
+
}, Cs = ({
|
|
1000
1006
|
client: t,
|
|
1001
1007
|
children: e
|
|
1002
|
-
}) => (
|
|
1008
|
+
}) => (j.useEffect(() => (t.mount(), () => {
|
|
1003
1009
|
t.unmount();
|
|
1004
|
-
}), [t]), /* @__PURE__ */
|
|
1005
|
-
|
|
1006
|
-
function
|
|
1010
|
+
}), [t]), /* @__PURE__ */ Ot.jsx(pt.Provider, { value: t, children: e })), bt = j.createContext(!1), Lt = () => j.useContext(bt);
|
|
1011
|
+
bt.Provider;
|
|
1012
|
+
function Mt() {
|
|
1007
1013
|
let t = !1;
|
|
1008
1014
|
return {
|
|
1009
1015
|
clearReset: () => {
|
|
@@ -1015,192 +1021,214 @@ function Nt() {
|
|
|
1015
1021
|
isReset: () => t
|
|
1016
1022
|
};
|
|
1017
1023
|
}
|
|
1018
|
-
var
|
|
1019
|
-
function
|
|
1024
|
+
var Nt = j.createContext(Mt()), _t = () => j.useContext(Nt);
|
|
1025
|
+
function Ht(t, e) {
|
|
1020
1026
|
return typeof t == "function" ? t(...e) : !!t;
|
|
1021
1027
|
}
|
|
1022
|
-
function
|
|
1028
|
+
function Ye() {
|
|
1023
1029
|
}
|
|
1024
|
-
var
|
|
1030
|
+
var Kt = (t, e) => {
|
|
1025
1031
|
(t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
|
|
1026
|
-
},
|
|
1027
|
-
|
|
1032
|
+
}, Bt = (t) => {
|
|
1033
|
+
j.useEffect(() => {
|
|
1028
1034
|
t.clearReset();
|
|
1029
1035
|
}, [t]);
|
|
1030
1036
|
}, $t = ({
|
|
1031
1037
|
result: t,
|
|
1032
1038
|
errorResetBoundary: e,
|
|
1033
1039
|
throwOnError: s,
|
|
1034
|
-
query: r
|
|
1035
|
-
|
|
1040
|
+
query: r,
|
|
1041
|
+
suspense: i
|
|
1042
|
+
}) => t.isError && !e.isReset() && !t.isFetching && r && (i && t.data === void 0 || Ht(s, [t.error, r])), Gt = (t, e) => e.state.data === void 0, zt = (t) => {
|
|
1036
1043
|
const e = t.staleTime;
|
|
1037
1044
|
t.suspense && (t.staleTime = typeof e == "function" ? (...s) => Math.max(e(...s), 1e3) : Math.max(e ?? 1e3, 1e3), typeof t.gcTime == "number" && (t.gcTime = Math.max(t.gcTime, 1e3)));
|
|
1038
|
-
},
|
|
1045
|
+
}, Jt = (t, e) => t.isLoading && t.isFetching && !e, Vt = (t, e) => (t == null ? void 0 : t.suspense) && e.isPending, Xe = (t, e, s) => e.fetchOptimistic(t).catch(() => {
|
|
1039
1046
|
s.clearReset();
|
|
1040
1047
|
});
|
|
1041
|
-
function
|
|
1042
|
-
var c, p, y,
|
|
1048
|
+
function mt(t, e, s) {
|
|
1049
|
+
var c, p, y, C, h;
|
|
1043
1050
|
if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
|
|
1044
1051
|
throw new Error(
|
|
1045
1052
|
'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'
|
|
1046
1053
|
);
|
|
1047
|
-
const r =
|
|
1054
|
+
const r = vt(s), i = Lt(), a = _t(), u = r.defaultQueryOptions(t);
|
|
1048
1055
|
(p = (c = r.getDefaultOptions().queries) == null ? void 0 : c._experimental_beforeQuery) == null || p.call(
|
|
1049
1056
|
c,
|
|
1050
|
-
|
|
1051
|
-
),
|
|
1052
|
-
const
|
|
1057
|
+
u
|
|
1058
|
+
), u._optimisticResults = i ? "isRestoring" : "optimistic", zt(u), Kt(u, a), Bt(a);
|
|
1059
|
+
const o = !r.getQueryCache().get(u.queryHash), [l] = j.useState(
|
|
1053
1060
|
() => new e(
|
|
1054
1061
|
r,
|
|
1055
|
-
|
|
1062
|
+
u
|
|
1056
1063
|
)
|
|
1057
|
-
), f = l.getOptimisticResult(
|
|
1058
|
-
if (
|
|
1059
|
-
|
|
1060
|
-
(
|
|
1061
|
-
const
|
|
1062
|
-
return l.updateResult(),
|
|
1064
|
+
), f = l.getOptimisticResult(u), m = !i && t.subscribed !== !1;
|
|
1065
|
+
if (j.useSyncExternalStore(
|
|
1066
|
+
j.useCallback(
|
|
1067
|
+
(v) => {
|
|
1068
|
+
const E = m ? l.subscribe(Me.batchCalls(v)) : Ye;
|
|
1069
|
+
return l.updateResult(), E;
|
|
1063
1070
|
},
|
|
1064
|
-
[l,
|
|
1071
|
+
[l, m]
|
|
1065
1072
|
),
|
|
1066
1073
|
() => l.getCurrentResult(),
|
|
1067
1074
|
() => l.getCurrentResult()
|
|
1068
|
-
),
|
|
1069
|
-
l.setOptions(
|
|
1070
|
-
}, [
|
|
1071
|
-
throw
|
|
1075
|
+
), j.useEffect(() => {
|
|
1076
|
+
l.setOptions(u, { listeners: !1 });
|
|
1077
|
+
}, [u, l]), Vt(u, f))
|
|
1078
|
+
throw Xe(u, l, a);
|
|
1072
1079
|
if ($t({
|
|
1073
1080
|
result: f,
|
|
1074
1081
|
errorResetBoundary: a,
|
|
1075
|
-
throwOnError:
|
|
1076
|
-
query: r.getQueryCache().get(
|
|
1082
|
+
throwOnError: u.throwOnError,
|
|
1083
|
+
query: r.getQueryCache().get(u.queryHash),
|
|
1084
|
+
suspense: u.suspense
|
|
1077
1085
|
}))
|
|
1078
1086
|
throw f.error;
|
|
1079
|
-
if ((
|
|
1087
|
+
if ((C = (y = r.getDefaultOptions().queries) == null ? void 0 : y._experimental_afterQuery) == null || C.call(
|
|
1080
1088
|
y,
|
|
1081
|
-
|
|
1089
|
+
u,
|
|
1082
1090
|
f
|
|
1083
|
-
),
|
|
1084
|
-
const
|
|
1091
|
+
), u.experimental_prefetchInRender && !V && Jt(f, i)) {
|
|
1092
|
+
const v = o ? (
|
|
1085
1093
|
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
1086
|
-
|
|
1094
|
+
Xe(u, l, a)
|
|
1087
1095
|
) : (
|
|
1088
1096
|
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
1089
|
-
(h = r.getQueryCache().get(
|
|
1097
|
+
(h = r.getQueryCache().get(u.queryHash)) == null ? void 0 : h.promise
|
|
1090
1098
|
);
|
|
1091
|
-
|
|
1099
|
+
v == null || v.catch(Ye).finally(() => {
|
|
1092
1100
|
l.updateResult();
|
|
1093
1101
|
});
|
|
1094
1102
|
}
|
|
1095
|
-
return
|
|
1103
|
+
return u.notifyOnChangeProps ? f : l.trackResult(f);
|
|
1096
1104
|
}
|
|
1097
|
-
function
|
|
1098
|
-
return
|
|
1105
|
+
function Zt(t, e) {
|
|
1106
|
+
return mt(t, ft, e);
|
|
1099
1107
|
}
|
|
1100
|
-
function
|
|
1101
|
-
return process.env.NODE_ENV !== "production" && t.queryFn ===
|
|
1108
|
+
function Wt(t, e) {
|
|
1109
|
+
return process.env.NODE_ENV !== "production" && t.queryFn === pe && console.error("skipToken is not allowed for useSuspenseQuery"), mt(
|
|
1102
1110
|
{
|
|
1103
1111
|
...t,
|
|
1104
1112
|
enabled: !0,
|
|
1105
1113
|
suspense: !0,
|
|
1106
|
-
throwOnError:
|
|
1114
|
+
throwOnError: Gt,
|
|
1107
1115
|
placeholderData: void 0
|
|
1108
1116
|
},
|
|
1109
|
-
|
|
1117
|
+
ft,
|
|
1110
1118
|
e
|
|
1111
1119
|
);
|
|
1112
1120
|
}
|
|
1113
|
-
const
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1121
|
+
const Yt = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, Xt = (t) => t.filter(
|
|
1122
|
+
(e) => e != null && e !== !1 && (typeof e == "string" || typeof e == "number")
|
|
1123
|
+
).map((e) => `${e}`).filter((e) => e), es = (t) => {
|
|
1124
|
+
const e = t.join("/"), [, s = "", r = ""] = e.match(Yt) ?? [];
|
|
1125
|
+
return {
|
|
1126
|
+
prefix: s,
|
|
1127
|
+
pathname: r.split("/").filter((i) => i !== "")
|
|
1128
|
+
};
|
|
1129
|
+
}, ts = (t) => {
|
|
1130
|
+
const { prefix: e, pathname: s } = t;
|
|
1131
|
+
let r = e;
|
|
1132
|
+
return s.length > 0 ? (r ? r += "/" : r = "/", r += s.join("/")) : r || (r = "/"), r;
|
|
1133
|
+
}, et = (...t) => {
|
|
1134
|
+
const e = Xt(t), s = es(e);
|
|
1135
|
+
return ts(s);
|
|
1136
|
+
}, gt = Object.freeze({
|
|
1117
1137
|
API_IDENTITIES: ["api-identities"]
|
|
1118
|
-
}),
|
|
1119
|
-
const t =
|
|
1138
|
+
}), Os = () => {
|
|
1139
|
+
const t = vt();
|
|
1120
1140
|
return {
|
|
1121
1141
|
invalidateCache: async (e) => {
|
|
1122
|
-
await t.invalidateQueries({ queryKey:
|
|
1142
|
+
await t.invalidateQueries({ queryKey: gt[e] });
|
|
1123
1143
|
}
|
|
1124
1144
|
};
|
|
1125
|
-
},
|
|
1145
|
+
}, ss = "no-dehydrate", ce = (...t) => {
|
|
1146
|
+
const e = t.filter((s) => !!s).map((s) => s.replace(/(^\/+|\/+$)/g, "")).join("/").replace(/(^\/+|\/+$)/g, "");
|
|
1147
|
+
return e ? `/${e}` : "/";
|
|
1148
|
+
}, _e = (t, e) => {
|
|
1126
1149
|
for (const s of t) {
|
|
1127
|
-
const r =
|
|
1150
|
+
const r = He(s, e);
|
|
1128
1151
|
if (r !== void 0) return r;
|
|
1129
1152
|
}
|
|
1130
|
-
},
|
|
1153
|
+
}, He = (t, e, s = []) => {
|
|
1131
1154
|
const r = e(t, s);
|
|
1132
1155
|
if (r !== void 0) return r;
|
|
1133
1156
|
if (t.type === "category")
|
|
1134
1157
|
for (const i of t.items) {
|
|
1135
|
-
const a =
|
|
1158
|
+
const a = He(i, e, [
|
|
1136
1159
|
...s,
|
|
1137
1160
|
t
|
|
1138
1161
|
]);
|
|
1139
1162
|
if (a !== void 0) return a;
|
|
1140
1163
|
}
|
|
1141
|
-
},
|
|
1142
|
-
const t =
|
|
1143
|
-
return
|
|
1144
|
-
if (r.type === "doc" &&
|
|
1164
|
+
}, Is = () => {
|
|
1165
|
+
const t = ve(), s = St().sidebar;
|
|
1166
|
+
return _e(s, (r) => {
|
|
1167
|
+
if (r.type === "doc" && ce(r.id) === t.pathname)
|
|
1145
1168
|
return r;
|
|
1146
1169
|
});
|
|
1147
|
-
},
|
|
1148
|
-
const e =
|
|
1149
|
-
return
|
|
1150
|
-
if (s.type === "category" && s.link &&
|
|
1170
|
+
}, Fs = (t) => {
|
|
1171
|
+
const e = ve();
|
|
1172
|
+
return He(t, (s) => {
|
|
1173
|
+
if (s.type === "category" && s.link && ce(s.link.id) === e.pathname || s.type === "doc" && ce(s.id) === e.pathname)
|
|
1151
1174
|
return !0;
|
|
1152
1175
|
});
|
|
1153
|
-
},
|
|
1154
|
-
const t =
|
|
1176
|
+
}, Ps = () => {
|
|
1177
|
+
const t = ve().pathname, s = St().sidebar;
|
|
1155
1178
|
let r, i, a = !1;
|
|
1156
|
-
return
|
|
1157
|
-
const
|
|
1158
|
-
if (
|
|
1179
|
+
return _e(s, (u) => {
|
|
1180
|
+
const o = u.type === "doc" ? ce(u.id) : u.type === "category" && u.link ? ce(u.link.id) : void 0;
|
|
1181
|
+
if (o) {
|
|
1159
1182
|
if (a)
|
|
1160
|
-
return i = { label:
|
|
1161
|
-
t ===
|
|
1183
|
+
return i = { label: u.label, id: o }, !0;
|
|
1184
|
+
t === o ? a = !0 : r = { label: u.label, id: o };
|
|
1162
1185
|
}
|
|
1163
1186
|
}), { prev: r, next: i };
|
|
1164
|
-
},
|
|
1187
|
+
}, rs = Et(
|
|
1165
1188
|
void 0
|
|
1166
|
-
),
|
|
1167
|
-
const t =
|
|
1189
|
+
), Ke = () => {
|
|
1190
|
+
const t = Ct(rs);
|
|
1168
1191
|
if (!t)
|
|
1169
1192
|
throw new Error("useZudoku must be used within a ZudokuProvider.");
|
|
1170
1193
|
return t;
|
|
1171
|
-
},
|
|
1172
|
-
const { getApiIdentities: t } =
|
|
1173
|
-
return
|
|
1194
|
+
}, Ts = () => {
|
|
1195
|
+
const { getApiIdentities: t } = Ke();
|
|
1196
|
+
return Zt({
|
|
1174
1197
|
queryFn: t,
|
|
1175
|
-
queryKey:
|
|
1198
|
+
queryKey: gt.API_IDENTITIES
|
|
1176
1199
|
});
|
|
1177
|
-
},
|
|
1200
|
+
}, St = () => {
|
|
1178
1201
|
var c;
|
|
1179
|
-
const { getPluginSidebar: t, sidebars: e, topNavigation: s, options: r } =
|
|
1180
|
-
(p) =>
|
|
1181
|
-
)
|
|
1182
|
-
|
|
1202
|
+
const { getPluginSidebar: t, sidebars: e, topNavigation: s, options: r } = Ke(), i = ve(), a = ds(), u = (c = r.protectedRoutes) == null ? void 0 : c.some(
|
|
1203
|
+
(p) => ze(p, i.pathname)
|
|
1204
|
+
);
|
|
1205
|
+
let o = Object.entries(e).find(([, p]) => _e(p, (y) => {
|
|
1206
|
+
if ((y.type === "doc" ? et(y.id) : y.type === "category" && y.link ? et(y.link.id) : void 0) === i.pathname)
|
|
1183
1207
|
return y;
|
|
1184
|
-
}))
|
|
1208
|
+
}));
|
|
1209
|
+
const l = s.find((p) => p.id === (o == null ? void 0 : o[0])) ?? s.find((p) => ze(p.id, i.pathname));
|
|
1210
|
+
l && !o && l.id in e && (o = ["", e[l.id]]);
|
|
1211
|
+
const { data: f } = Wt({
|
|
1185
1212
|
queryFn: () => t(i.pathname),
|
|
1186
|
-
|
|
1213
|
+
// We just want to suspend here and don't store in SSR dehydrated state
|
|
1214
|
+
queryKey: ["plugin-sidebar", ss, i.pathname]
|
|
1187
1215
|
});
|
|
1188
1216
|
return {
|
|
1189
|
-
sidebar: a.isAuthEnabled && !a.isAuthenticated &&
|
|
1217
|
+
sidebar: a.isAuthEnabled && !a.isAuthenticated && u ? [] : [...o ? o[1] : [], ...f],
|
|
1190
1218
|
topNavItem: l
|
|
1191
1219
|
};
|
|
1192
|
-
},
|
|
1220
|
+
}, tt = (t) => {
|
|
1193
1221
|
let e;
|
|
1194
|
-
const s = /* @__PURE__ */ new Set(), r = (f,
|
|
1222
|
+
const s = /* @__PURE__ */ new Set(), r = (f, m) => {
|
|
1195
1223
|
const c = typeof f == "function" ? f(e) : f;
|
|
1196
1224
|
if (!Object.is(c, e)) {
|
|
1197
1225
|
const p = e;
|
|
1198
|
-
e =
|
|
1226
|
+
e = m ?? (typeof c != "object" || c === null) ? c : Object.assign({}, e, c), s.forEach((y) => y(e, p));
|
|
1199
1227
|
}
|
|
1200
|
-
}, i = () => e,
|
|
1201
|
-
return
|
|
1202
|
-
},
|
|
1203
|
-
function
|
|
1228
|
+
}, i = () => e, o = { setState: r, getState: i, getInitialState: () => l, subscribe: (f) => (s.add(f), () => s.delete(f)) }, l = e = t(r, i, o);
|
|
1229
|
+
return o;
|
|
1230
|
+
}, ns = (t) => t ? tt(t) : tt, is = (t) => t;
|
|
1231
|
+
function as(t, e = is) {
|
|
1204
1232
|
const s = Ge.useSyncExternalStore(
|
|
1205
1233
|
t.subscribe,
|
|
1206
1234
|
() => e(t.getState()),
|
|
@@ -1208,11 +1236,11 @@ function ss(t, e = ts) {
|
|
|
1208
1236
|
);
|
|
1209
1237
|
return Ge.useDebugValue(s), s;
|
|
1210
1238
|
}
|
|
1211
|
-
const
|
|
1212
|
-
const e =
|
|
1239
|
+
const os = (t) => {
|
|
1240
|
+
const e = ns(t), s = (r) => as(e, r);
|
|
1213
1241
|
return Object.assign(s, e), s;
|
|
1214
|
-
},
|
|
1215
|
-
function
|
|
1242
|
+
}, us = (t) => os;
|
|
1243
|
+
function wt(t, e) {
|
|
1216
1244
|
let s;
|
|
1217
1245
|
try {
|
|
1218
1246
|
s = t();
|
|
@@ -1222,8 +1250,8 @@ function St(t, e) {
|
|
|
1222
1250
|
return {
|
|
1223
1251
|
getItem: (i) => {
|
|
1224
1252
|
var a;
|
|
1225
|
-
const
|
|
1226
|
-
return
|
|
1253
|
+
const u = (l) => l === null ? null : JSON.parse(l, void 0), o = (a = s.getItem(i)) != null ? a : null;
|
|
1254
|
+
return o instanceof Promise ? o.then(u) : u(o);
|
|
1227
1255
|
},
|
|
1228
1256
|
setItem: (i, a) => s.setItem(
|
|
1229
1257
|
i,
|
|
@@ -1232,12 +1260,12 @@ function St(t, e) {
|
|
|
1232
1260
|
removeItem: (i) => s.removeItem(i)
|
|
1233
1261
|
};
|
|
1234
1262
|
}
|
|
1235
|
-
const
|
|
1263
|
+
const Qe = (t) => (e) => {
|
|
1236
1264
|
try {
|
|
1237
1265
|
const s = t(e);
|
|
1238
1266
|
return s instanceof Promise ? s : {
|
|
1239
1267
|
then(r) {
|
|
1240
|
-
return
|
|
1268
|
+
return Qe(r)(s);
|
|
1241
1269
|
},
|
|
1242
1270
|
catch(r) {
|
|
1243
1271
|
return this;
|
|
@@ -1249,22 +1277,22 @@ const Ue = (t) => (e) => {
|
|
|
1249
1277
|
return this;
|
|
1250
1278
|
},
|
|
1251
1279
|
catch(r) {
|
|
1252
|
-
return
|
|
1280
|
+
return Qe(r)(s);
|
|
1253
1281
|
}
|
|
1254
1282
|
};
|
|
1255
1283
|
}
|
|
1256
|
-
},
|
|
1284
|
+
}, cs = (t, e) => (s, r, i) => {
|
|
1257
1285
|
let a = {
|
|
1258
|
-
storage:
|
|
1286
|
+
storage: wt(() => localStorage),
|
|
1259
1287
|
partialize: (h) => h,
|
|
1260
1288
|
version: 0,
|
|
1261
|
-
merge: (h,
|
|
1262
|
-
...
|
|
1289
|
+
merge: (h, v) => ({
|
|
1290
|
+
...v,
|
|
1263
1291
|
...h
|
|
1264
1292
|
}),
|
|
1265
1293
|
...e
|
|
1266
|
-
},
|
|
1267
|
-
const
|
|
1294
|
+
}, u = !1;
|
|
1295
|
+
const o = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
|
|
1268
1296
|
let f = a.storage;
|
|
1269
1297
|
if (!f)
|
|
1270
1298
|
return t(
|
|
@@ -1276,34 +1304,34 @@ const Ue = (t) => (e) => {
|
|
|
1276
1304
|
r,
|
|
1277
1305
|
i
|
|
1278
1306
|
);
|
|
1279
|
-
const
|
|
1307
|
+
const m = () => {
|
|
1280
1308
|
const h = a.partialize({ ...r() });
|
|
1281
1309
|
return f.setItem(a.name, {
|
|
1282
1310
|
state: h,
|
|
1283
1311
|
version: a.version
|
|
1284
1312
|
});
|
|
1285
1313
|
}, c = i.setState;
|
|
1286
|
-
i.setState = (h,
|
|
1287
|
-
c(h,
|
|
1314
|
+
i.setState = (h, v) => {
|
|
1315
|
+
c(h, v), m();
|
|
1288
1316
|
};
|
|
1289
1317
|
const p = t(
|
|
1290
1318
|
(...h) => {
|
|
1291
|
-
s(...h),
|
|
1319
|
+
s(...h), m();
|
|
1292
1320
|
},
|
|
1293
1321
|
r,
|
|
1294
1322
|
i
|
|
1295
1323
|
);
|
|
1296
1324
|
i.getInitialState = () => p;
|
|
1297
1325
|
let y;
|
|
1298
|
-
const
|
|
1299
|
-
var h,
|
|
1326
|
+
const C = () => {
|
|
1327
|
+
var h, v;
|
|
1300
1328
|
if (!f) return;
|
|
1301
|
-
|
|
1329
|
+
u = !1, o.forEach((R) => {
|
|
1302
1330
|
var O;
|
|
1303
1331
|
return R((O = r()) != null ? O : p);
|
|
1304
1332
|
});
|
|
1305
|
-
const
|
|
1306
|
-
return
|
|
1333
|
+
const E = ((v = a.onRehydrateStorage) == null ? void 0 : v.call(a, (h = r()) != null ? h : p)) || void 0;
|
|
1334
|
+
return Qe(f.getItem.bind(f))(a.name).then((R) => {
|
|
1307
1335
|
if (R)
|
|
1308
1336
|
if (typeof R.version == "number" && R.version !== a.version) {
|
|
1309
1337
|
if (a.migrate) {
|
|
@@ -1311,7 +1339,7 @@ const Ue = (t) => (e) => {
|
|
|
1311
1339
|
R.state,
|
|
1312
1340
|
R.version
|
|
1313
1341
|
);
|
|
1314
|
-
return O instanceof Promise ? O.then((
|
|
1342
|
+
return O instanceof Promise ? O.then((q) => [!0, q]) : [!0, O];
|
|
1315
1343
|
}
|
|
1316
1344
|
console.error(
|
|
1317
1345
|
"State loaded from storage couldn't be migrated since no migrate function was provided"
|
|
@@ -1321,16 +1349,16 @@ const Ue = (t) => (e) => {
|
|
|
1321
1349
|
return [!1, void 0];
|
|
1322
1350
|
}).then((R) => {
|
|
1323
1351
|
var O;
|
|
1324
|
-
const [
|
|
1352
|
+
const [q, Z] = R;
|
|
1325
1353
|
if (y = a.merge(
|
|
1326
1354
|
Z,
|
|
1327
1355
|
(O = r()) != null ? O : p
|
|
1328
|
-
), s(y, !0),
|
|
1329
|
-
return
|
|
1356
|
+
), s(y, !0), q)
|
|
1357
|
+
return m();
|
|
1330
1358
|
}).then(() => {
|
|
1331
|
-
|
|
1359
|
+
E == null || E(y, void 0), y = r(), u = !0, l.forEach((R) => R(y));
|
|
1332
1360
|
}).catch((R) => {
|
|
1333
|
-
|
|
1361
|
+
E == null || E(void 0, R);
|
|
1334
1362
|
});
|
|
1335
1363
|
};
|
|
1336
1364
|
return i.persist = {
|
|
@@ -1344,112 +1372,112 @@ const Ue = (t) => (e) => {
|
|
|
1344
1372
|
f == null || f.removeItem(a.name);
|
|
1345
1373
|
},
|
|
1346
1374
|
getOptions: () => a,
|
|
1347
|
-
rehydrate: () =>
|
|
1348
|
-
hasHydrated: () =>
|
|
1349
|
-
onHydrate: (h) => (
|
|
1350
|
-
|
|
1375
|
+
rehydrate: () => C(),
|
|
1376
|
+
hasHydrated: () => u,
|
|
1377
|
+
onHydrate: (h) => (o.add(h), () => {
|
|
1378
|
+
o.delete(h);
|
|
1351
1379
|
}),
|
|
1352
1380
|
onFinishHydration: (h) => (l.add(h), () => {
|
|
1353
1381
|
l.delete(h);
|
|
1354
1382
|
})
|
|
1355
|
-
}, a.skipHydration ||
|
|
1356
|
-
},
|
|
1383
|
+
}, a.skipHydration || C(), y || p;
|
|
1384
|
+
}, hs = cs, ls = (t) => {
|
|
1357
1385
|
const e = (s) => {
|
|
1358
1386
|
s.key === t.persist.getOptions().name && s.newValue && t.persist.rehydrate();
|
|
1359
1387
|
};
|
|
1360
1388
|
return window.addEventListener("storage", e), () => {
|
|
1361
1389
|
window.removeEventListener("storage", e);
|
|
1362
1390
|
};
|
|
1363
|
-
}, Rt =
|
|
1364
|
-
|
|
1391
|
+
}, Rt = us()(
|
|
1392
|
+
hs(
|
|
1365
1393
|
(t) => ({
|
|
1366
1394
|
isAuthenticated: !1,
|
|
1367
|
-
isPending: !
|
|
1395
|
+
isPending: !0,
|
|
1368
1396
|
profile: null,
|
|
1369
1397
|
providerData: null
|
|
1370
1398
|
}),
|
|
1371
1399
|
{
|
|
1400
|
+
merge: (t, e) => ({
|
|
1401
|
+
...e,
|
|
1402
|
+
isPending: !1,
|
|
1403
|
+
...typeof t == "object" ? t : {}
|
|
1404
|
+
}),
|
|
1372
1405
|
name: "auth-state",
|
|
1373
|
-
storage:
|
|
1374
|
-
// partialize: (s) => ({ state: s }),
|
|
1406
|
+
storage: wt(() => localStorage)
|
|
1375
1407
|
}
|
|
1376
1408
|
)
|
|
1377
1409
|
);
|
|
1378
|
-
typeof window < "u" &&
|
|
1379
|
-
const
|
|
1380
|
-
|
|
1381
|
-
(t) => ({
|
|
1382
|
-
selectedServer: void 0,
|
|
1383
|
-
setSelectedServer: (e) => t({ selectedServer: e })
|
|
1384
|
-
}),
|
|
1385
|
-
{ name: "zudoku-selected-server" }
|
|
1386
|
-
)
|
|
1387
|
-
), Es = (t) => {
|
|
1388
|
-
const { selectedServer: e, setSelectedServer: s } = as();
|
|
1389
|
-
return { selectedServer: Ot(
|
|
1390
|
-
() => {
|
|
1391
|
-
var i;
|
|
1392
|
-
return e && t.some((a) => a.url === e) ? e : ((i = t.at(0)) == null ? void 0 : i.url) ?? "";
|
|
1393
|
-
},
|
|
1394
|
-
[e, t]
|
|
1395
|
-
), setSelectedServer: s };
|
|
1396
|
-
}, os = () => {
|
|
1397
|
-
const { authentication: t } = He(), e = Rt(), s = typeof t < "u";
|
|
1410
|
+
typeof window < "u" && ls(Rt);
|
|
1411
|
+
const ds = () => {
|
|
1412
|
+
const { authentication: t } = Ke(), e = Rt(), s = typeof t < "u";
|
|
1398
1413
|
return {
|
|
1399
1414
|
isAuthEnabled: s,
|
|
1400
1415
|
...e,
|
|
1401
1416
|
login: async () => {
|
|
1402
1417
|
if (!s)
|
|
1403
1418
|
throw new Error("Authentication is not enabled.");
|
|
1404
|
-
await t.signIn(
|
|
1419
|
+
await t.signIn({
|
|
1420
|
+
redirectTo: window.location.href
|
|
1421
|
+
});
|
|
1405
1422
|
},
|
|
1406
1423
|
logout: async () => {
|
|
1407
1424
|
if (!s)
|
|
1408
1425
|
throw new Error("Authentication is not enabled.");
|
|
1409
1426
|
await t.signOut(), window.location.href = "/";
|
|
1427
|
+
},
|
|
1428
|
+
signup: async () => {
|
|
1429
|
+
if (!s)
|
|
1430
|
+
throw new Error("Authentication is not enabled.");
|
|
1431
|
+
await t.signUp({
|
|
1432
|
+
redirectTo: window.location.href
|
|
1433
|
+
});
|
|
1410
1434
|
}
|
|
1411
1435
|
};
|
|
1412
1436
|
};
|
|
1413
1437
|
export {
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1438
|
+
Rs as A,
|
|
1439
|
+
ws as B,
|
|
1440
|
+
ut as C,
|
|
1441
|
+
ct as D,
|
|
1442
|
+
ye as E,
|
|
1443
|
+
bs as F,
|
|
1444
|
+
Le as G,
|
|
1445
|
+
pe as H,
|
|
1446
|
+
Cs as I,
|
|
1447
|
+
St as J,
|
|
1448
|
+
_e as K,
|
|
1449
|
+
Os as L,
|
|
1450
|
+
gt as M,
|
|
1451
|
+
Fs as N,
|
|
1452
|
+
Es as Q,
|
|
1453
|
+
kt as R,
|
|
1426
1454
|
qe as S,
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1455
|
+
rs as Z,
|
|
1456
|
+
Is as a,
|
|
1457
|
+
Ps as b,
|
|
1458
|
+
At as c,
|
|
1459
|
+
Wt as d,
|
|
1460
|
+
Ke as e,
|
|
1461
|
+
et as f,
|
|
1462
|
+
vt as g,
|
|
1463
|
+
Re as h,
|
|
1464
|
+
Ye as i,
|
|
1465
|
+
ce as j,
|
|
1466
|
+
Ht as k,
|
|
1467
|
+
ds as l,
|
|
1468
|
+
Zt as m,
|
|
1469
|
+
Me as n,
|
|
1470
|
+
Ss as o,
|
|
1471
|
+
us as p,
|
|
1472
|
+
hs as q,
|
|
1473
|
+
wt as r,
|
|
1446
1474
|
Ce as s,
|
|
1447
|
-
|
|
1475
|
+
Ts as t,
|
|
1448
1476
|
Rt as u,
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1477
|
+
It as v,
|
|
1478
|
+
ms as w,
|
|
1479
|
+
gs as x,
|
|
1480
|
+
Se as y,
|
|
1481
|
+
Pt as z
|
|
1454
1482
|
};
|
|
1455
|
-
//# sourceMappingURL=hook-
|
|
1483
|
+
//# sourceMappingURL=hook-CqpVYDqN.js.map
|