zudoku 0.0.0-ec30b50 → 0.0.0-ec4a6db
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/cli.js +9 -0
- package/dist/app/ZuploBuildConfig.d.ts +45 -0
- package/dist/app/ZuploBuildConfig.js +29 -0
- package/dist/app/ZuploBuildConfig.js.map +1 -0
- package/dist/app/demo.js +21 -5
- package/dist/app/demo.js.map +1 -1
- package/dist/app/entry.client.d.ts +5 -2
- package/dist/app/entry.client.js +37 -2
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +8 -8
- package/dist/app/entry.server.js +12 -10
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/env.d.ts +33 -0
- package/dist/app/env.js +37 -0
- package/dist/app/env.js.map +1 -0
- package/dist/app/main.d.ts +1 -0
- package/dist/app/main.js +36 -46
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +7 -6
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/build/handler.d.ts +1 -3
- package/dist/cli/build/handler.js +18 -2
- package/dist/cli/build/handler.js.map +1 -1
- package/dist/cli/cli.js +17 -1
- 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/common/machine-id/lib.js +1 -0
- package/dist/cli/common/machine-id/lib.js.map +1 -1
- package/dist/cli/common/utils/ports.d.ts +1 -1
- package/dist/cli/common/utils/ports.js +16 -15
- package/dist/cli/common/utils/ports.js.map +1 -1
- package/dist/cli/dev/handler.js +10 -12
- 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/config.d.ts +27 -14
- package/dist/config/file-exists.d.ts +1 -0
- package/dist/config/file-exists.js +5 -0
- package/dist/config/file-exists.js.map +1 -0
- package/dist/config/loader.d.ts +19 -18
- package/dist/config/loader.js +104 -117
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/BuildSchema.d.ts +36 -0
- package/dist/config/validators/BuildSchema.js +25 -0
- package/dist/config/validators/BuildSchema.js.map +1 -0
- package/dist/config/validators/InputNavigationSchema.d.ts +7369 -0
- package/dist/config/validators/InputNavigationSchema.js +74 -0
- package/dist/config/validators/InputNavigationSchema.js.map +1 -0
- package/dist/config/validators/InputNavigationSchema.test-d.js +146 -0
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -0
- package/dist/config/validators/NavigationSchema.d.ts +44 -0
- package/dist/config/validators/NavigationSchema.js +95 -0
- package/dist/config/validators/NavigationSchema.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +2 -1
- package/dist/config/validators/icon-types.js +1813 -1
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +643 -1918
- package/dist/config/validators/validate.js +433 -16
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +141 -0
- package/dist/config/validators/validate.test.js.map +1 -0
- package/dist/flat-config.d.ts +325 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/MissingIcon.d.ts +2 -0
- package/dist/lib/MissingIcon.js +7 -0
- package/dist/lib/MissingIcon.js.map +1 -0
- package/dist/lib/auth/issuer.d.ts +2 -0
- package/dist/lib/auth/issuer.js +37 -0
- package/dist/lib/auth/issuer.js.map +1 -0
- package/dist/lib/auth/issuer.test.js +94 -0
- package/dist/lib/auth/issuer.test.js.map +1 -0
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +2 -2
- package/dist/lib/authentication/AuthenticationPlugin.js +1 -1
- package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +5 -4
- package/dist/lib/authentication/components/CallbackHandler.js +6 -2
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/SignIn.d.ts +1 -1
- package/dist/lib/authentication/components/SignIn.js +5 -1
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignUp.d.ts +1 -1
- package/dist/lib/authentication/components/SignUp.js +4 -1
- package/dist/lib/authentication/components/SignUp.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +7 -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 +3 -2
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.d.ts +28 -0
- package/dist/lib/authentication/providers/azureb2c.js +145 -0
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -0
- package/dist/lib/authentication/providers/clerk.d.ts +2 -2
- package/dist/lib/authentication/providers/clerk.js +92 -55
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +20 -21
- package/dist/lib/authentication/providers/openid.js +88 -47
- 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 +108 -0
- package/dist/lib/authentication/providers/supabase.js.map +1 -0
- package/dist/lib/authentication/state.d.ts +6 -31
- package/dist/lib/authentication/state.js +28 -24
- 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/Autocomplete.js +3 -3
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Banner.js +2 -2
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/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/BuildCheck.d.ts +4 -0
- package/dist/lib/components/BuildCheck.js +38 -0
- package/dist/lib/components/BuildCheck.js.map +1 -0
- package/dist/lib/components/CategoryHeading.js +1 -1
- package/dist/lib/components/CategoryHeading.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +2 -2
- package/dist/lib/components/ErrorPage.js.map +1 -1
- package/dist/lib/components/Footer.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/Framed.d.ts +7 -0
- package/dist/lib/components/Framed.js +26 -0
- package/dist/lib/components/Framed.js.map +1 -0
- package/dist/lib/components/Header.js +25 -16
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +9 -5
- package/dist/lib/components/Heading.js +7 -2
- package/dist/lib/components/Heading.js.map +1 -1
- 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 +9 -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 +18 -0
- package/dist/lib/components/Main.js.map +1 -0
- package/dist/lib/components/Markdown.d.ts +3 -2
- package/dist/lib/components/Markdown.js +14 -16
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +13 -5
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +2 -2
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/PageProgress.d.ts +1 -0
- package/dist/lib/components/PageProgress.js +20 -0
- package/dist/lib/components/PageProgress.js.map +1 -0
- package/dist/lib/components/Pagination.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/Search.js +7 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/Slot.d.ts +17 -0
- package/dist/lib/components/Slot.js +24 -0
- package/dist/lib/components/Slot.js.map +1 -0
- package/dist/lib/components/Slot.test.js +168 -0
- package/dist/lib/components/Slot.test.js.map +1 -0
- package/dist/lib/components/StatusPage.js +4 -0
- package/dist/lib/components/StatusPage.js.map +1 -1
- package/dist/lib/components/ThemeSwitch.js +8 -5
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +7 -5
- package/dist/lib/components/TopNavigation.js +52 -41
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +5 -0
- package/dist/lib/components/Typography.js +8 -0
- package/dist/lib/components/Typography.js.map +1 -0
- package/dist/lib/components/Zudoku.d.ts +1 -1
- package/dist/lib/components/Zudoku.js +14 -9
- 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/SlotProvider.d.ts +26 -0
- package/dist/lib/components/context/SlotProvider.js +83 -0
- package/dist/lib/components/context/SlotProvider.js.map +1 -0
- package/dist/lib/components/context/ViewportAnchorContext.d.ts +2 -4
- package/dist/lib/components/context/ViewportAnchorContext.js +13 -19
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +4 -8
- package/dist/lib/components/context/ZudokuContext.js +50 -21
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuProvider.d.ts +1 -1
- package/dist/lib/components/context/ZudokuProvider.js +2 -1
- package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
- package/dist/lib/components/index.d.ts +50 -25
- package/dist/lib/components/index.js +18 -6
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Navigation.d.ts +5 -0
- package/dist/lib/components/navigation/Navigation.js +12 -0
- package/dist/lib/components/navigation/Navigation.js.map +1 -0
- package/dist/lib/components/navigation/NavigationBadge.d.ts +26 -0
- package/dist/lib/components/navigation/NavigationBadge.js +26 -0
- package/dist/lib/components/navigation/NavigationBadge.js.map +1 -0
- package/dist/lib/components/navigation/NavigationCategory.d.ts +5 -0
- package/dist/lib/components/navigation/NavigationCategory.js +61 -0
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -0
- package/dist/lib/components/navigation/NavigationItem.d.ts +6 -0
- package/dist/lib/components/navigation/NavigationItem.js +47 -0
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -0
- package/dist/lib/components/navigation/NavigationWrapper.d.ts +7 -0
- package/dist/lib/components/navigation/NavigationWrapper.js +21 -0
- package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -0
- package/dist/lib/components/navigation/PoweredByZudoku.d.ts +3 -0
- package/dist/lib/components/navigation/PoweredByZudoku.js +7 -0
- package/dist/lib/components/navigation/PoweredByZudoku.js.map +1 -0
- package/dist/lib/components/navigation/Toc.js +46 -0
- 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/components/navigation/ZuploLogo.d.ts +3 -0
- package/dist/lib/components/navigation/ZuploLogo.js +4 -0
- package/dist/lib/components/navigation/ZuploLogo.js.map +1 -0
- package/dist/lib/components/navigation/utils.d.ts +12 -6
- package/dist/lib/components/navigation/utils.js +46 -18
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/RouteGuard.d.ts +2 -1
- package/dist/lib/core/RouteGuard.js +35 -11
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +60 -22
- package/dist/lib/core/ZudokuContext.js +52 -17
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +22 -9
- package/dist/lib/core/plugins.js +4 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +5 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/hooks/index.d.ts +28 -0
- package/dist/lib/hooks/index.js +16 -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 +102 -0
- package/dist/lib/hooks/useEvent.test.js.map +1 -0
- package/dist/lib/hooks/useHotkey.d.ts +4 -0
- package/dist/lib/hooks/useHotkey.js +58 -0
- package/dist/lib/hooks/useHotkey.js.map +1 -0
- package/dist/lib/icons.d.ts +1 -0
- package/dist/lib/icons.js +1 -0
- package/dist/lib/icons.js.map +1 -1
- package/dist/lib/oas/graphql/circular.js +23 -18
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/graphql/index.d.ts +17 -4
- package/dist/lib/oas/graphql/index.js +151 -38
- 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 +8 -3
- package/dist/lib/oas/parser/index.js +7 -23
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/oas/parser/upgrade/index.d.ts +1 -0
- package/dist/lib/oas/parser/upgrade/index.js +76 -23
- package/dist/lib/oas/parser/upgrade/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 +7 -6
- 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.d.ts +3 -2
- package/dist/lib/plugins/api-keys/CreateApiKey.js +15 -7
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +150 -27
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +21 -11
- package/dist/lib/plugins/api-keys/index.js +67 -32
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +4 -6
- package/dist/lib/plugins/custom-pages/index.js +15 -10
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +2 -3
- package/dist/lib/plugins/markdown/MdxPage.js +32 -18
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +11 -3
- package/dist/lib/plugins/markdown/index.js +9 -26
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.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/OasProvider.d.ts +8 -0
- package/dist/lib/plugins/openapi/OasProvider.js +29 -0
- package/dist/lib/plugins/openapi/OasProvider.js.map +1 -0
- package/dist/lib/plugins/openapi/OperationList.d.ts +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +68 -22
- 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 +10 -14
- 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 +45 -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 +16 -4
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +2 -2
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +8 -2
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +2 -4
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -4
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.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 +47 -68
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +10 -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 +11 -2
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +14 -7
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ConstValue.d.ts +5 -0
- package/dist/lib/plugins/openapi/components/ConstValue.js +6 -0
- package/dist/lib/plugins/openapi/components/ConstValue.js.map +1 -0
- 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/ResponseContent.d.ts +12 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.js +21 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -0
- package/dist/lib/plugins/openapi/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 +10 -8
- package/dist/lib/plugins/openapi/index.js +59 -143
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +38 -11
- package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +5 -0
- package/dist/lib/plugins/openapi/playground/BodyPanel.js +26 -0
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js +11 -0
- package/dist/lib/plugins/openapi/playground/CollapsibleHeader.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +2 -5
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +5 -4
- package/dist/lib/plugins/openapi/playground/Headers.js +54 -32
- 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 +15 -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 +7 -0
- package/dist/lib/plugins/openapi/playground/IdentitySelector.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/InlineInput.js +1 -1
- package/dist/lib/plugins/openapi/playground/InlineInput.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +2 -2
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.d.ts +3 -2
- package/dist/lib/plugins/openapi/playground/PathParams.js +3 -3
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +9 -3
- package/dist/lib/plugins/openapi/playground/Playground.js +150 -76
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +3 -3
- package/dist/lib/plugins/openapi/playground/QueryParams.js +38 -23
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/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/Spinner.d.ts +2 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js +63 -0
- package/dist/lib/plugins/openapi/playground/Spinner.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.d.ts +2 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.js +22 -0
- package/dist/lib/plugins/openapi/playground/fileUtils.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/request-panel/UrlPath.d.ts +3 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js +13 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlPath.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js +12 -0
- package/dist/lib/plugins/openapi/playground/request-panel/UrlQueryParams.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.d.ts +12 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/Highlight.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +69 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +10 -4
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +41 -33
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +9 -5
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +9 -10
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.d.ts +16 -0
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js +10 -0
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.js.map +1 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.d.ts +8 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.js +16 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.js.map +1 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.test.js +194 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.d.ts +12 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.js +66 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.js.map +1 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.test.js +159 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -0
- package/dist/lib/plugins/openapi/processors/removePaths.d.ts +13 -0
- package/dist/lib/plugins/openapi/processors/removePaths.js +33 -0
- package/dist/lib/plugins/openapi/processors/removePaths.js.map +1 -0
- package/dist/lib/plugins/openapi/processors/removePaths.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/processors/removePaths.test.js +144 -0
- package/dist/lib/plugins/openapi/processors/removePaths.test.js.map +1 -0
- package/dist/lib/plugins/openapi/processors/traverse.js.map +1 -0
- 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 +15 -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 +25 -18
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -2
- package/dist/lib/plugins/openapi/schema/SchemaView.js +39 -51
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/utils.d.ts +7 -1
- package/dist/lib/plugins/openapi/schema/utils.js +15 -5
- 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/createHttpSnippet.d.ts +11 -0
- package/dist/lib/plugins/openapi/util/createHttpSnippet.js +89 -0
- package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -0
- package/dist/lib/plugins/openapi/util/createNavigationCategory.d.ts +9 -0
- package/dist/lib/plugins/openapi/util/createNavigationCategory.js +24 -0
- package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +44 -0
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.d.ts +10 -0
- package/dist/lib/plugins/openapi/util/getRoutes.js +117 -0
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -0
- package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +2 -0
- package/dist/lib/plugins/openapi/util/methodColorMap.js +10 -0
- package/dist/lib/plugins/openapi/util/methodColorMap.js.map +1 -0
- package/dist/lib/plugins/redirect/index.d.ts +1 -1
- package/dist/lib/plugins/search-inkeep/index.d.ts +5 -22
- package/dist/lib/plugins/search-inkeep/index.js +35 -29
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +5 -21
- package/dist/lib/plugins/search-inkeep/inkeep.js +10 -19
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.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 +39 -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/shiki.d.ts +31 -0
- package/dist/lib/shiki.js +101 -0
- package/dist/lib/shiki.js.map +1 -0
- package/dist/lib/ui/Alert.d.ts +6 -5
- package/dist/lib/ui/Alert.js +12 -10
- package/dist/lib/ui/Alert.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +2 -2
- package/dist/lib/ui/Badge.js +1 -1
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +3 -3
- package/dist/lib/ui/Button.js +9 -6
- 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/Card.js +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/CodeBlock.d.ts +15 -0
- package/dist/lib/ui/CodeBlock.js +17 -0
- package/dist/lib/ui/CodeBlock.js.map +1 -0
- package/dist/lib/ui/Command.d.ts +8 -2
- package/dist/lib/ui/Command.js +5 -5
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Dialog.d.ts +3 -1
- package/dist/lib/ui/Dialog.js +2 -2
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/DropdownMenu.js +4 -4
- package/dist/lib/ui/DropdownMenu.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.d.ts +15 -0
- package/dist/lib/ui/EmbeddedCodeBlock.js +18 -0
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -0
- package/dist/lib/ui/Form.d.ts +1 -1
- package/dist/lib/ui/HoverCard.js +1 -1
- package/dist/lib/ui/HoverCard.js.map +1 -1
- package/dist/lib/ui/Input.js +1 -1
- package/dist/lib/ui/Input.js.map +1 -1
- package/dist/lib/ui/Popover.js +1 -1
- package/dist/lib/ui/Popover.js.map +1 -1
- package/dist/lib/ui/RadioGroup.js +1 -1
- package/dist/lib/ui/RadioGroup.js.map +1 -1
- package/dist/lib/ui/Select.js +2 -2
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/Slider.js +1 -1
- package/dist/lib/ui/Slider.js.map +1 -1
- package/dist/lib/ui/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/Switch.js +1 -1
- package/dist/lib/ui/Switch.js.map +1 -1
- package/dist/lib/ui/SyntaxHighlight.d.ts +12 -0
- package/dist/lib/ui/SyntaxHighlight.js +15 -0
- package/dist/lib/ui/SyntaxHighlight.js.map +1 -0
- package/dist/lib/ui/Tabs.js +2 -2
- package/dist/lib/ui/Tabs.js.map +1 -1
- package/dist/lib/ui/Textarea.js +1 -1
- package/dist/lib/ui/Textarea.js.map +1 -1
- package/dist/lib/ui/Toggle.js +1 -1
- package/dist/lib/ui/Toggle.js.map +1 -1
- package/dist/lib/ui/Tooltip.d.ts +2 -1
- package/dist/lib/ui/Tooltip.js +2 -1
- package/dist/lib/ui/Tooltip.js.map +1 -1
- package/dist/lib/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 +22 -4
- package/dist/lib/util/MdxComponents.js +21 -15
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/detectOS.d.ts +1 -0
- package/dist/lib/util/detectOS.js +11 -0
- package/dist/lib/util/detectOS.js.map +1 -0
- package/dist/lib/util/ensureArray.d.ts +1 -0
- package/dist/lib/util/ensureArray.js +2 -0
- package/dist/lib/util/ensureArray.js.map +1 -0
- package/dist/lib/util/humanFileSize.d.ts +6 -0
- package/dist/lib/util/humanFileSize.js +14 -0
- package/dist/lib/util/humanFileSize.js.map +1 -0
- package/dist/lib/util/humanFileSize.test.d.ts +1 -0
- package/dist/lib/util/humanFileSize.test.js +22 -0
- package/dist/lib/util/humanFileSize.test.js.map +1 -0
- 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/os.d.ts +2 -0
- package/dist/lib/util/os.js +21 -0
- package/dist/lib/util/os.js.map +1 -0
- package/dist/lib/util/traverse.d.ts +3 -9
- package/dist/lib/util/traverse.js +7 -6
- 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/url.d.ts +4 -0
- package/dist/lib/util/url.js +13 -0
- package/dist/lib/util/url.js.map +1 -0
- package/dist/lib/util/url.test.d.ts +1 -0
- package/dist/lib/util/url.test.js +26 -0
- package/dist/lib/util/url.test.js.map +1 -0
- package/dist/lib/util/useCopyToClipboard.d.ts +1 -0
- package/dist/lib/util/useCopyToClipboard.js +11 -0
- package/dist/lib/util/useCopyToClipboard.js.map +1 -0
- package/dist/lib/util/useExposedProps.d.ts +8 -1
- package/dist/lib/util/useExposedProps.js.map +1 -1
- package/dist/lib/util/useLatest.d.ts +1 -0
- package/dist/lib/util/useLatest.js +15 -0
- package/dist/lib/util/useLatest.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 +27 -21
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/api/SchemaManager.d.ts +36 -0
- package/dist/vite/api/SchemaManager.js +141 -0
- package/dist/vite/api/SchemaManager.js.map +1 -0
- package/dist/vite/api/SchemaManager.test.d.ts +1 -0
- package/dist/vite/api/SchemaManager.test.js +106 -0
- package/dist/vite/api/SchemaManager.test.js.map +1 -0
- package/dist/vite/api/schema-codegen.d.ts +1 -1
- package/dist/vite/api/schema-codegen.js +73 -19
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +148 -0
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/build.js +48 -22
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +2 -12
- package/dist/vite/config.js +101 -150
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +2 -2
- 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 +1 -2
- package/dist/vite/css/plugin.js +14 -2
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.d.ts +4 -3
- package/dist/vite/dev-server.js +53 -22
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/error-handler.d.ts +1 -1
- package/dist/vite/error-handler.js +1 -1
- package/dist/vite/error-handler.js.map +1 -1
- package/dist/vite/html.d.ts +7 -3
- package/dist/vite/html.js +15 -9
- package/dist/vite/html.js.map +1 -1
- package/dist/vite/mdx/remark-last-modified.d.ts +3 -0
- package/dist/vite/mdx/remark-last-modified.js +29 -0
- package/dist/vite/mdx/remark-last-modified.js.map +1 -0
- package/dist/vite/mdx/utils.d.ts +2 -0
- package/dist/vite/mdx/utils.js +31 -0
- package/dist/vite/mdx/utils.js.map +1 -0
- package/dist/vite/output.d.ts +14 -2
- package/dist/vite/output.js +12 -14
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +1 -2
- package/dist/vite/plugin-api-keys.js +13 -7
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +1 -2
- package/dist/vite/plugin-api.js +79 -112
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +1 -2
- package/dist/vite/plugin-auth.js +6 -5
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +1 -2
- package/dist/vite/plugin-component.js +10 -4
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +3 -3
- package/dist/vite/plugin-config-reload.js +31 -23
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +1 -2
- package/dist/vite/plugin-config.js +11 -6
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +1 -2
- package/dist/vite/plugin-custom-pages.js +7 -6
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +2 -3
- package/dist/vite/plugin-docs.js +66 -46
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +1 -2
- package/dist/vite/plugin-frontmatter.js +13 -7
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +1 -2
- package/dist/vite/plugin-mdx.js +49 -71
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-navigation.d.ts +4 -0
- package/dist/vite/plugin-navigation.js +64 -0
- package/dist/vite/plugin-navigation.js.map +1 -0
- package/dist/vite/plugin-redirect.d.ts +1 -2
- package/dist/vite/plugin-redirect.js +6 -5
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +1 -2
- package/dist/vite/plugin-search.js +8 -3
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-shiki-register.d.ts +2 -0
- package/dist/vite/plugin-shiki-register.js +39 -0
- package/dist/vite/plugin-shiki-register.js.map +1 -0
- package/dist/vite/plugin-theme.d.ts +8 -0
- package/dist/vite/plugin-theme.js +235 -0
- package/dist/vite/plugin-theme.js.map +1 -0
- package/dist/vite/plugin-theme.test.d.ts +1 -0
- package/dist/vite/plugin-theme.test.js +291 -0
- package/dist/vite/plugin-theme.test.js.map +1 -0
- package/dist/vite/plugin.d.ts +1 -2
- package/dist/vite/plugin.js +23 -22
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender/FileWritingResponse.d.ts +25 -0
- package/dist/vite/prerender/FileWritingResponse.js +51 -0
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -0
- 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 +15 -0
- package/dist/vite/prerender/prerender.js +109 -0
- package/dist/vite/prerender/prerender.js.map +1 -0
- package/dist/vite/prerender/worker.d.ts +13 -0
- package/dist/vite/prerender/worker.js +59 -0
- package/dist/vite/prerender/worker.js.map +1 -0
- package/dist/vite/reporter.d.ts +3 -0
- package/dist/vite/reporter.js +33 -0
- package/dist/vite/reporter.js.map +1 -0
- package/dist/vite/shadcn-registry.d.ts +45 -0
- package/dist/vite/shadcn-registry.js +29 -0
- package/dist/vite/shadcn-registry.js.map +1 -0
- package/dist/vite/sitemap.d.ts +1 -1
- package/dist/vite/sitemap.js +2 -1
- package/dist/vite/sitemap.js.map +1 -1
- package/dist/zuplo/enrich-with-zuplo.d.ts +3 -3
- package/dist/zuplo/enrich-with-zuplo.js +18 -17
- package/dist/zuplo/enrich-with-zuplo.js.map +1 -1
- package/dist/zuplo/with-zuplo-processors.d.ts +2 -2
- package/dist/zuplo/with-zuplo-processors.js +7 -7
- package/dist/zuplo/with-zuplo-processors.js.map +1 -1
- package/dist/zuplo/with-zuplo.d.ts +5 -2
- package/dist/zuplo/with-zuplo.js +6 -5
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/Alert-FYKbqjIt.js +161 -0
- package/lib/Alert-FYKbqjIt.js.map +1 -0
- package/lib/Button-BE9IVkWV.js +51 -0
- package/lib/Button-BE9IVkWV.js.map +1 -0
- package/lib/Card-DPhGbYUM.js +61 -0
- package/lib/Card-DPhGbYUM.js.map +1 -0
- package/lib/CodeBlock-DAKxs_Tu.js +85 -0
- package/lib/CodeBlock-DAKxs_Tu.js.map +1 -0
- package/lib/Command-xsbs2uhf.js +140 -0
- package/lib/Command-xsbs2uhf.js.map +1 -0
- package/lib/Dialog-CiIdyz6a.js +99 -0
- package/lib/Dialog-CiIdyz6a.js.map +1 -0
- package/lib/Drawer-BzkOKwgC.js +1133 -0
- package/lib/Drawer-BzkOKwgC.js.map +1 -0
- package/lib/MdxPage-DyRuoE_F.js +110 -0
- package/lib/MdxPage-DyRuoE_F.js.map +1 -0
- package/lib/OasProvider-CUA-DFGE.js +35 -0
- package/lib/OasProvider-CUA-DFGE.js.map +1 -0
- package/lib/OperationList-CRMvWoTv.js +5166 -0
- package/lib/OperationList-CRMvWoTv.js.map +1 -0
- package/lib/Pagination-HZKe5ncg.js +37 -0
- package/lib/Pagination-HZKe5ncg.js.map +1 -0
- package/lib/RouteGuard-CbKd7_9h.js +737 -0
- package/lib/RouteGuard-CbKd7_9h.js.map +1 -0
- package/lib/SchemaList-B792ORza.js +149 -0
- package/lib/SchemaList-B792ORza.js.map +1 -0
- package/lib/SchemaView-Bo53TeMb.js +366 -0
- package/lib/SchemaView-Bo53TeMb.js.map +1 -0
- package/lib/SignUp-DfVvOCYB.js +56 -0
- package/lib/SignUp-DfVvOCYB.js.map +1 -0
- package/lib/Slot-BpO_AGKJ.js +15743 -0
- package/lib/Slot-BpO_AGKJ.js.map +1 -0
- package/lib/Spinner-mNLZ6awP.js +7 -0
- package/lib/Spinner-mNLZ6awP.js.map +1 -0
- package/lib/SyntaxHighlight-CZgjJ7-f.js +10306 -0
- package/lib/SyntaxHighlight-CZgjJ7-f.js.map +1 -0
- package/lib/Toc-DYMzDvOa.js +92 -0
- package/lib/Toc-DYMzDvOa.js.map +1 -0
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.js +1839 -0
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.js.map +1 -0
- package/lib/circular-CLdQ0oUd.js +14934 -0
- package/lib/circular-CLdQ0oUd.js.map +1 -0
- package/lib/clerk-BDZ31hjU.js +25190 -0
- package/lib/clerk-BDZ31hjU.js.map +1 -0
- package/lib/clsx-OuTLNxxd.js +17 -0
- package/lib/clsx-OuTLNxxd.js.map +1 -0
- package/lib/cn-wvCW-ho6.js +2731 -0
- package/lib/cn-wvCW-ho6.js.map +1 -0
- package/lib/createServer-Co4BBP-i.js +12659 -0
- package/lib/createServer-Co4BBP-i.js.map +1 -0
- package/lib/errors-DE1gK7ms.js +78 -0
- package/lib/errors-DE1gK7ms.js.map +1 -0
- package/lib/hook-Bd0yS8M0.js +1503 -0
- package/lib/hook-Bd0yS8M0.js.map +1 -0
- package/lib/index-ClhS5TxS.js +107 -0
- package/lib/index-ClhS5TxS.js.map +1 -0
- package/lib/index-CrcNWbel.js +316 -0
- package/lib/index-CrcNWbel.js.map +1 -0
- package/lib/index-DI5SPFK9.js +36 -0
- package/lib/index-DI5SPFK9.js.map +1 -0
- package/lib/index-DLshv89l.js +3979 -0
- package/lib/index-DLshv89l.js.map +1 -0
- package/lib/index-DLzZDv8_.js +2094 -0
- package/lib/index-DLzZDv8_.js.map +1 -0
- package/lib/index-DYP-V0jG.js +3469 -0
- package/lib/index-DYP-V0jG.js.map +1 -0
- package/lib/index-DmNq2fbN.js +4827 -0
- package/lib/index-DmNq2fbN.js.map +1 -0
- package/lib/index.esm-Cp4wkyud.js +1236 -0
- package/lib/index.esm-Cp4wkyud.js.map +1 -0
- package/lib/invariant-DAFpPywt.js +48 -0
- package/lib/invariant-DAFpPywt.js.map +1 -0
- package/lib/jsx-runtime-C5mzlN2N.js +285 -0
- package/lib/jsx-runtime-C5mzlN2N.js.map +1 -0
- package/lib/processors/removeExtensions.js +11 -0
- package/lib/processors/removeExtensions.js.map +1 -0
- package/lib/processors/removeParameters.js +47 -0
- package/lib/processors/removeParameters.js.map +1 -0
- package/lib/processors/removePaths.js +28 -0
- package/lib/processors/removePaths.js.map +1 -0
- package/lib/processors/traverse.js +17 -0
- package/lib/processors/traverse.js.map +1 -0
- package/lib/ui/Accordion.js +2 -2
- package/lib/ui/ActionButton.js +11 -10
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +55 -39
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js +2 -2
- package/lib/ui/Badge.js +4 -4
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +5 -5
- package/lib/ui/Button.js +22 -19
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +40 -20
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +9 -9
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +348 -348
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +16 -26
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +9 -0
- package/lib/ui/CodeBlock.js.map +1 -0
- package/lib/ui/Command.js +102 -75
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +41 -41
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +14 -1151
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +35 -35
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +80 -0
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -0
- package/lib/ui/Form.js +6 -6
- package/lib/ui/HoverCard.js +6 -6
- package/lib/ui/HoverCard.js.map +1 -1
- package/lib/ui/Input.js +3 -3
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +3 -3
- package/lib/ui/Pagination.js +11 -11
- package/lib/ui/Popover.js +3 -3
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js +2 -2
- package/lib/ui/RadioGroup.js +11 -11
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js +2 -2
- package/lib/ui/Select.js +32 -32
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +2 -2
- package/lib/ui/Slider.js +6 -6
- package/lib/ui/Slider.js.map +1 -1
- package/lib/ui/Stepper.js +6 -0
- package/lib/ui/Stepper.js.map +1 -0
- package/lib/ui/Switch.js +6 -6
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +11 -0
- package/lib/ui/SyntaxHighlight.js.map +1 -0
- package/lib/ui/Tabs.js +17 -17
- package/lib/ui/Tabs.js.map +1 -1
- package/lib/ui/Textarea.js +6 -6
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js +8 -8
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js +2 -2
- package/lib/ui/Tooltip.js +15 -8
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/ui/util.js +6 -0
- package/lib/ui/util.js.map +1 -0
- package/lib/useExposedProps-BIYjecPD.js +9 -0
- package/lib/useExposedProps-BIYjecPD.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +34 -36
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +9971 -0
- package/lib/zudoku.auth-azureb2c.js.map +1 -0
- package/lib/zudoku.auth-clerk.js +104 -84
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +535 -566
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +33 -1303
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +27 -0
- package/lib/zudoku.hooks.js.map +1 -0
- package/lib/zudoku.icons.js +10 -0
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +108 -114
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +556 -205
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +12 -18
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +20 -94
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -7
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +54 -58
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +324 -0
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -0
- package/lib/zudoku.plugins.js +15 -0
- package/lib/zudoku.plugins.js.map +1 -0
- package/package.json +149 -91
- package/src/app/ZuploBuildConfig.ts +33 -0
- package/src/app/defaultTheme.css +73 -0
- package/src/app/demo.html +1 -1
- package/src/app/demo.tsx +24 -6
- package/src/app/entry.client.tsx +51 -2
- package/src/app/entry.server.tsx +23 -15
- package/src/app/env.ts +43 -0
- package/src/app/font.geist.css +73 -0
- package/src/app/main.css +156 -143
- package/src/app/main.tsx +47 -52
- package/src/app/standalone.tsx +7 -6
- package/src/lib/MissingIcon.tsx +22 -0
- package/src/lib/auth/issuer.test.ts +120 -0
- package/src/lib/auth/issuer.ts +41 -0
- package/src/lib/authentication/AuthenticationPlugin.tsx +4 -4
- package/src/lib/authentication/authentication.ts +6 -7
- package/src/lib/authentication/components/CallbackHandler.tsx +12 -2
- package/src/lib/authentication/components/SignIn.tsx +27 -1
- package/src/lib/authentication/components/SignUp.tsx +35 -1
- package/src/lib/authentication/hook.ts +12 -1
- package/src/lib/authentication/providers/auth0.tsx +12 -5
- package/src/lib/authentication/providers/azureb2c.tsx +196 -0
- package/src/lib/authentication/providers/clerk.tsx +105 -62
- package/src/lib/authentication/providers/openid.tsx +135 -61
- package/src/lib/authentication/providers/supabase.tsx +150 -0
- package/src/lib/authentication/state.ts +46 -44
- package/src/lib/components/AnchorLink.tsx +9 -7
- package/src/lib/components/Autocomplete.tsx +3 -2
- package/src/lib/components/Banner.tsx +3 -3
- package/src/lib/components/Bootstrap.tsx +13 -6
- package/src/lib/components/BuildCheck.tsx +75 -0
- package/src/lib/components/CategoryHeading.tsx +4 -1
- package/src/lib/components/ErrorPage.tsx +3 -3
- package/src/lib/components/Footer.tsx +136 -0
- package/src/lib/components/Framed.tsx +51 -0
- package/src/lib/components/Header.tsx +51 -44
- package/src/lib/components/Heading.tsx +18 -10
- package/src/lib/components/InlineCode.tsx +13 -16
- package/src/lib/components/Layout.tsx +30 -71
- package/src/lib/components/Main.tsx +51 -0
- package/src/lib/components/Markdown.tsx +40 -27
- package/src/lib/components/MobileTopNavigation.tsx +86 -22
- package/src/lib/components/NotFoundPage.tsx +3 -3
- package/src/lib/components/PageProgress.tsx +28 -0
- package/src/lib/components/Pagination.tsx +45 -0
- package/src/lib/components/Search.tsx +15 -4
- package/src/lib/components/Slot.test.tsx +465 -0
- package/src/lib/components/Slot.tsx +64 -0
- package/src/lib/components/StatusPage.tsx +5 -0
- package/src/lib/components/ThemeSwitch.tsx +28 -8
- package/src/lib/components/TopNavigation.tsx +88 -66
- package/src/lib/components/Typography.tsx +14 -0
- package/src/lib/components/Zudoku.tsx +27 -16
- 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/SlotProvider.tsx +149 -0
- package/src/lib/components/context/ViewportAnchorContext.tsx +14 -30
- package/src/lib/components/context/ZudokuContext.ts +62 -25
- package/src/lib/components/context/ZudokuProvider.tsx +3 -2
- package/src/lib/components/index.ts +19 -9
- package/src/lib/components/navigation/Navigation.tsx +50 -0
- package/src/lib/components/navigation/NavigationBadge.tsx +48 -0
- package/src/lib/components/navigation/NavigationCategory.tsx +146 -0
- package/src/lib/components/navigation/NavigationItem.tsx +151 -0
- package/src/lib/components/navigation/NavigationWrapper.tsx +49 -0
- package/src/lib/components/navigation/PoweredByZudoku.tsx +33 -0
- package/src/lib/components/navigation/Toc.tsx +126 -0
- package/src/lib/components/navigation/ZudokuLogo.tsx +25 -0
- package/src/lib/components/navigation/ZuploLogo.tsx +14 -0
- package/src/lib/components/navigation/utils.ts +63 -28
- package/src/lib/core/RouteGuard.tsx +73 -12
- package/src/lib/core/ZudokuContext.ts +114 -30
- package/src/lib/core/plugins.ts +39 -9
- package/src/lib/errors/ErrorAlert.tsx +19 -18
- package/src/lib/hooks/index.ts +16 -0
- package/src/lib/hooks/useEvent.test.tsx +151 -0
- package/src/lib/hooks/useEvent.ts +41 -0
- package/src/lib/hooks/useHotkey.ts +70 -0
- package/src/lib/icons.ts +1 -0
- package/src/lib/oas/graphql/circular.ts +27 -19
- package/src/lib/oas/graphql/index.ts +206 -54
- package/src/lib/oas/parser/dereference/index.ts +2 -0
- package/src/lib/oas/parser/index.ts +14 -30
- package/src/lib/oas/parser/upgrade/index.ts +97 -26
- package/src/lib/plugins/api-catalog/Catalog.tsx +50 -100
- package/src/lib/plugins/api-catalog/index.tsx +72 -21
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +61 -45
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +463 -115
- package/src/lib/plugins/api-keys/index.tsx +134 -58
- package/src/lib/plugins/custom-pages/index.tsx +21 -16
- package/src/lib/plugins/markdown/MdxPage.tsx +88 -65
- package/src/lib/plugins/markdown/index.tsx +29 -42
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +8 -5
- package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -3
- package/src/lib/plugins/openapi/Endpoint.tsx +1 -1
- package/src/lib/plugins/openapi/OasProvider.tsx +51 -0
- package/src/lib/plugins/openapi/OperationList.tsx +179 -87
- package/src/lib/plugins/openapi/OperationListItem.tsx +105 -110
- package/src/lib/plugins/openapi/ParamInfos.tsx +90 -0
- package/src/lib/plugins/openapi/ParameterList.tsx +4 -0
- package/src/lib/plugins/openapi/ParameterListItem.tsx +71 -23
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +16 -3
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +5 -16
- package/src/lib/plugins/openapi/SchemaList.tsx +157 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +62 -78
- package/src/lib/plugins/openapi/SidecarExamples.tsx +10 -4
- 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 +34 -7
- package/src/lib/plugins/openapi/components/ConstValue.tsx +24 -0
- package/src/lib/plugins/openapi/components/EnumValues.tsx +58 -0
- package/src/lib/plugins/openapi/components/ResponseContent.tsx +104 -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 +85 -179
- package/src/lib/plugins/openapi/interfaces.ts +46 -16
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +55 -0
- package/src/lib/plugins/openapi/playground/CollapsibleHeader.tsx +47 -0
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +37 -32
- package/src/lib/plugins/openapi/playground/Headers.tsx +217 -116
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +75 -0
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +38 -0
- package/src/lib/plugins/openapi/playground/InlineInput.tsx +1 -1
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +2 -2
- package/src/lib/plugins/openapi/playground/PathParams.tsx +12 -7
- package/src/lib/plugins/openapi/playground/Playground.tsx +340 -280
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +3 -2
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +105 -60
- package/src/lib/plugins/openapi/playground/RequestLoginDialog.tsx +51 -0
- package/src/lib/plugins/openapi/playground/Spinner.tsx +87 -0
- package/src/lib/plugins/openapi/playground/fileUtils.ts +32 -0
- package/src/lib/plugins/openapi/playground/rememberedIdentity.ts +26 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +31 -0
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +25 -0
- package/src/lib/plugins/openapi/playground/result-panel/Highlight.tsx +26 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +115 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +150 -89
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +79 -78
- package/src/lib/plugins/openapi/playground/useRememberSkipLoginDialog.tsx +20 -0
- package/src/lib/plugins/openapi/processors/removeExtensions.test.ts +222 -0
- package/src/lib/plugins/openapi/processors/removeExtensions.ts +29 -0
- package/src/lib/plugins/openapi/processors/removeParameters.test.ts +182 -0
- package/src/lib/plugins/openapi/processors/removeParameters.ts +103 -0
- package/src/lib/plugins/openapi/processors/removePaths.test.ts +167 -0
- package/src/lib/plugins/openapi/processors/removePaths.ts +57 -0
- 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 +39 -0
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +71 -63
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +99 -143
- package/src/lib/plugins/openapi/schema/utils.ts +30 -6
- package/src/lib/plugins/openapi/state.ts +36 -0
- package/src/lib/plugins/openapi/util/createHttpSnippet.ts +107 -0
- package/src/lib/plugins/openapi/util/createNavigationCategory.tsx +38 -0
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +51 -1
- package/src/lib/plugins/openapi/util/getRoutes.tsx +198 -0
- package/src/lib/plugins/openapi/util/methodColorMap.tsx +11 -0
- package/src/lib/plugins/redirect/index.tsx +1 -1
- package/src/lib/plugins/search-inkeep/index.tsx +54 -58
- package/src/lib/plugins/search-inkeep/inkeep.ts +19 -21
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +165 -0
- package/src/lib/plugins/search-pagefind/ResultList.tsx +114 -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/shiki.ts +132 -0
- package/src/lib/ui/Alert.tsx +45 -39
- package/src/lib/ui/Badge.tsx +2 -2
- package/src/lib/ui/Button.tsx +12 -7
- package/src/lib/ui/Callout.tsx +30 -10
- package/src/lib/ui/Card.tsx +1 -1
- package/src/lib/ui/Checkbox.tsx +8 -24
- package/src/lib/ui/CodeBlock.tsx +88 -0
- package/src/lib/ui/Command.tsx +29 -7
- package/src/lib/ui/Dialog.tsx +11 -7
- package/src/lib/ui/DropdownMenu.tsx +4 -4
- package/src/lib/ui/EmbeddedCodeBlock.tsx +94 -0
- package/src/lib/ui/HoverCard.tsx +1 -1
- package/src/lib/ui/Input.tsx +1 -1
- package/src/lib/ui/Popover.tsx +1 -1
- package/src/lib/ui/RadioGroup.tsx +1 -1
- package/src/lib/ui/Select.tsx +3 -3
- package/src/lib/ui/Slider.tsx +1 -1
- package/src/lib/ui/Stepper.tsx +8 -0
- package/src/lib/ui/Switch.tsx +1 -1
- package/src/lib/ui/SyntaxHighlight.tsx +35 -0
- package/src/lib/ui/Tabs.tsx +2 -2
- package/src/lib/ui/Textarea.tsx +1 -1
- package/src/lib/ui/Toggle.tsx +1 -1
- package/src/lib/ui/Tooltip.tsx +16 -1
- package/src/lib/ui/util.tsx +3 -0
- package/src/lib/util/MdxComponents.tsx +49 -20
- package/src/lib/util/detectOS.ts +9 -0
- package/src/lib/util/ensureArray.ts +3 -0
- package/src/lib/util/humanFileSize.test.ts +24 -0
- package/src/lib/util/humanFileSize.ts +16 -0
- package/src/lib/util/joinPath.tsx +3 -0
- package/src/lib/util/os.ts +18 -0
- package/src/lib/util/traverse.ts +12 -13
- package/src/lib/util/types.ts +7 -0
- package/src/lib/util/url.test.ts +51 -0
- package/src/lib/util/url.ts +18 -0
- package/src/lib/util/useCopyToClipboard.ts +17 -0
- package/src/lib/util/useExposedProps.tsx +12 -1
- package/src/lib/util/useLatest.ts +18 -0
- package/src/lib/util/useOnScreen.ts +6 -4
- package/src/lib/util/useScrollToAnchor.ts +31 -21
- package/src/shiki/langs/abap.js +1 -0
- package/src/shiki/langs/actionscript-3.js +1 -0
- package/src/shiki/langs/ada.js +1 -0
- package/src/shiki/langs/angular-expression.js +1 -0
- package/src/shiki/langs/angular-html.js +1 -0
- package/src/shiki/langs/angular-inline-style.js +1 -0
- package/src/shiki/langs/angular-inline-template.js +1 -0
- package/src/shiki/langs/angular-let-declaration.js +1 -0
- package/src/shiki/langs/angular-template-blocks.js +1 -0
- package/src/shiki/langs/angular-template.js +1 -0
- package/src/shiki/langs/angular-ts.js +1 -0
- package/src/shiki/langs/apache.js +1 -0
- package/src/shiki/langs/apex.js +1 -0
- package/src/shiki/langs/apl.js +1 -0
- package/src/shiki/langs/applescript.js +1 -0
- package/src/shiki/langs/ara.js +1 -0
- package/src/shiki/langs/asciidoc.js +1 -0
- package/src/shiki/langs/asm.js +1 -0
- package/src/shiki/langs/astro.js +1 -0
- package/src/shiki/langs/awk.js +1 -0
- package/src/shiki/langs/ballerina.js +1 -0
- package/src/shiki/langs/bat.js +1 -0
- package/src/shiki/langs/beancount.js +1 -0
- package/src/shiki/langs/berry.js +1 -0
- package/src/shiki/langs/bibtex.js +1 -0
- package/src/shiki/langs/bicep.js +1 -0
- package/src/shiki/langs/blade.js +1 -0
- package/src/shiki/langs/bsl.js +1 -0
- package/src/shiki/langs/c.js +1 -0
- package/src/shiki/langs/cadence.js +1 -0
- package/src/shiki/langs/cairo.js +1 -0
- package/src/shiki/langs/clarity.js +1 -0
- package/src/shiki/langs/clojure.js +1 -0
- package/src/shiki/langs/cmake.js +1 -0
- package/src/shiki/langs/cobol.js +1 -0
- package/src/shiki/langs/codeowners.js +1 -0
- package/src/shiki/langs/codeql.js +1 -0
- package/src/shiki/langs/coffee.js +1 -0
- package/src/shiki/langs/common-lisp.js +1 -0
- package/src/shiki/langs/coq.js +1 -0
- package/src/shiki/langs/cpp-macro.js +1 -0
- package/src/shiki/langs/cpp.js +1 -0
- package/src/shiki/langs/crystal.js +1 -0
- package/src/shiki/langs/csharp.js +1 -0
- package/src/shiki/langs/css.js +1 -0
- package/src/shiki/langs/csv.js +1 -0
- package/src/shiki/langs/cue.js +1 -0
- package/src/shiki/langs/cypher.js +1 -0
- package/src/shiki/langs/d.js +1 -0
- package/src/shiki/langs/dart.js +1 -0
- package/src/shiki/langs/dax.js +1 -0
- package/src/shiki/langs/desktop.js +1 -0
- package/src/shiki/langs/diff.js +1 -0
- package/src/shiki/langs/docker.js +1 -0
- package/src/shiki/langs/dotenv.js +1 -0
- package/src/shiki/langs/dream-maker.js +1 -0
- package/src/shiki/langs/edge.js +1 -0
- package/src/shiki/langs/elixir.js +1 -0
- package/src/shiki/langs/elm.js +1 -0
- package/src/shiki/langs/emacs-lisp.js +1 -0
- package/src/shiki/langs/erb.js +1 -0
- package/src/shiki/langs/erlang.js +1 -0
- package/src/shiki/langs/es-tag-css.js +1 -0
- package/src/shiki/langs/es-tag-glsl.js +1 -0
- package/src/shiki/langs/es-tag-html.js +1 -0
- package/src/shiki/langs/es-tag-sql.js +1 -0
- package/src/shiki/langs/es-tag-xml.js +1 -0
- package/src/shiki/langs/fennel.js +1 -0
- package/src/shiki/langs/fish.js +1 -0
- package/src/shiki/langs/fluent.js +1 -0
- package/src/shiki/langs/fortran-fixed-form.js +1 -0
- package/src/shiki/langs/fortran-free-form.js +1 -0
- package/src/shiki/langs/fsharp.js +1 -0
- package/src/shiki/langs/gdresource.js +1 -0
- package/src/shiki/langs/gdscript.js +1 -0
- package/src/shiki/langs/gdshader.js +1 -0
- package/src/shiki/langs/genie.js +1 -0
- package/src/shiki/langs/gherkin.js +1 -0
- package/src/shiki/langs/git-commit.js +1 -0
- package/src/shiki/langs/git-rebase.js +1 -0
- package/src/shiki/langs/gleam.js +1 -0
- package/src/shiki/langs/glimmer-js.js +1 -0
- package/src/shiki/langs/glimmer-ts.js +1 -0
- package/src/shiki/langs/glsl.js +1 -0
- package/src/shiki/langs/gnuplot.js +1 -0
- package/src/shiki/langs/go.js +1 -0
- package/src/shiki/langs/graphql.js +1 -0
- package/src/shiki/langs/groovy.js +1 -0
- package/src/shiki/langs/hack.js +1 -0
- package/src/shiki/langs/haml.js +1 -0
- package/src/shiki/langs/handlebars.js +1 -0
- package/src/shiki/langs/haskell.js +1 -0
- package/src/shiki/langs/haxe.js +1 -0
- package/src/shiki/langs/hcl.js +1 -0
- package/src/shiki/langs/hjson.js +1 -0
- package/src/shiki/langs/hlsl.js +1 -0
- package/src/shiki/langs/html-derivative.js +1 -0
- package/src/shiki/langs/html.js +1 -0
- package/src/shiki/langs/http.js +1 -0
- package/src/shiki/langs/hxml.js +1 -0
- package/src/shiki/langs/hy.js +1 -0
- package/src/shiki/langs/imba.js +1 -0
- package/src/shiki/langs/ini.js +1 -0
- package/src/shiki/langs/java.js +1 -0
- package/src/shiki/langs/javascript.js +1 -0
- package/src/shiki/langs/jinja-html.js +1 -0
- package/src/shiki/langs/jinja.js +1 -0
- package/src/shiki/langs/jison.js +1 -0
- package/src/shiki/langs/json.js +1 -0
- package/src/shiki/langs/json5.js +1 -0
- package/src/shiki/langs/jsonc.js +1 -0
- package/src/shiki/langs/jsonl.js +1 -0
- package/src/shiki/langs/jsonnet.js +1 -0
- package/src/shiki/langs/jssm.js +1 -0
- package/src/shiki/langs/jsx.js +1 -0
- package/src/shiki/langs/julia.js +1 -0
- package/src/shiki/langs/kotlin.js +1 -0
- package/src/shiki/langs/kusto.js +1 -0
- package/src/shiki/langs/latex.js +1 -0
- package/src/shiki/langs/lean.js +1 -0
- package/src/shiki/langs/less.js +1 -0
- package/src/shiki/langs/liquid.js +1 -0
- package/src/shiki/langs/llvm.js +1 -0
- package/src/shiki/langs/log.js +1 -0
- package/src/shiki/langs/logo.js +1 -0
- package/src/shiki/langs/lua.js +1 -0
- package/src/shiki/langs/luau.js +1 -0
- package/src/shiki/langs/make.js +1 -0
- package/src/shiki/langs/markdown-vue.js +1 -0
- package/src/shiki/langs/markdown.js +1 -0
- package/src/shiki/langs/marko.js +1 -0
- package/src/shiki/langs/matlab.js +1 -0
- package/src/shiki/langs/mdc.js +1 -0
- package/src/shiki/langs/mdx.js +1 -0
- package/src/shiki/langs/mermaid.js +1 -0
- package/src/shiki/langs/mipsasm.js +1 -0
- package/src/shiki/langs/mojo.js +1 -0
- package/src/shiki/langs/move.js +1 -0
- package/src/shiki/langs/narrat.js +1 -0
- package/src/shiki/langs/nextflow.js +1 -0
- package/src/shiki/langs/nginx.js +1 -0
- package/src/shiki/langs/nim.js +1 -0
- package/src/shiki/langs/nix.js +1 -0
- package/src/shiki/langs/nushell.js +1 -0
- package/src/shiki/langs/objective-c.js +1 -0
- package/src/shiki/langs/objective-cpp.js +1 -0
- package/src/shiki/langs/ocaml.js +1 -0
- package/src/shiki/langs/pascal.js +1 -0
- package/src/shiki/langs/perl.js +1 -0
- package/src/shiki/langs/php.js +1 -0
- package/src/shiki/langs/plsql.js +1 -0
- package/src/shiki/langs/po.js +1 -0
- package/src/shiki/langs/polar.js +1 -0
- package/src/shiki/langs/postcss.js +1 -0
- package/src/shiki/langs/powerquery.js +1 -0
- package/src/shiki/langs/powershell.js +1 -0
- package/src/shiki/langs/prisma.js +1 -0
- package/src/shiki/langs/prolog.js +1 -0
- package/src/shiki/langs/proto.js +1 -0
- package/src/shiki/langs/pug.js +1 -0
- package/src/shiki/langs/puppet.js +1 -0
- package/src/shiki/langs/purescript.js +1 -0
- package/src/shiki/langs/python.js +1 -0
- package/src/shiki/langs/qml.js +1 -0
- package/src/shiki/langs/qmldir.js +1 -0
- package/src/shiki/langs/qss.js +1 -0
- package/src/shiki/langs/r.js +1 -0
- package/src/shiki/langs/racket.js +1 -0
- package/src/shiki/langs/raku.js +1 -0
- package/src/shiki/langs/razor.js +1 -0
- package/src/shiki/langs/reg.js +1 -0
- package/src/shiki/langs/regexp.js +1 -0
- package/src/shiki/langs/rel.js +1 -0
- package/src/shiki/langs/riscv.js +1 -0
- package/src/shiki/langs/rst.js +1 -0
- package/src/shiki/langs/ruby.js +1 -0
- package/src/shiki/langs/rust.js +1 -0
- package/src/shiki/langs/sas.js +1 -0
- package/src/shiki/langs/sass.js +1 -0
- package/src/shiki/langs/scala.js +1 -0
- package/src/shiki/langs/scheme.js +1 -0
- package/src/shiki/langs/scss.js +1 -0
- package/src/shiki/langs/sdbl.js +1 -0
- package/src/shiki/langs/shaderlab.js +1 -0
- package/src/shiki/langs/shellscript.js +1 -0
- package/src/shiki/langs/shellsession.js +1 -0
- package/src/shiki/langs/smalltalk.js +1 -0
- package/src/shiki/langs/solidity.js +1 -0
- package/src/shiki/langs/soy.js +1 -0
- package/src/shiki/langs/sparql.js +1 -0
- package/src/shiki/langs/splunk.js +1 -0
- package/src/shiki/langs/sql.js +1 -0
- package/src/shiki/langs/ssh-config.js +1 -0
- package/src/shiki/langs/stata.js +1 -0
- package/src/shiki/langs/stylus.js +1 -0
- package/src/shiki/langs/svelte.js +1 -0
- package/src/shiki/langs/swift.js +1 -0
- package/src/shiki/langs/system-verilog.js +1 -0
- package/src/shiki/langs/systemd.js +1 -0
- package/src/shiki/langs/talonscript.js +1 -0
- package/src/shiki/langs/tasl.js +1 -0
- package/src/shiki/langs/tcl.js +1 -0
- package/src/shiki/langs/templ.js +1 -0
- package/src/shiki/langs/terraform.js +1 -0
- package/src/shiki/langs/tex.js +1 -0
- package/src/shiki/langs/toml.js +1 -0
- package/src/shiki/langs/ts-tags.js +1 -0
- package/src/shiki/langs/tsv.js +1 -0
- package/src/shiki/langs/tsx.js +1 -0
- package/src/shiki/langs/turtle.js +1 -0
- package/src/shiki/langs/twig.js +1 -0
- package/src/shiki/langs/typescript.js +1 -0
- package/src/shiki/langs/typespec.js +1 -0
- package/src/shiki/langs/typst.js +1 -0
- package/src/shiki/langs/v.js +1 -0
- package/src/shiki/langs/vala.js +1 -0
- package/src/shiki/langs/vb.js +1 -0
- package/src/shiki/langs/verilog.js +1 -0
- package/src/shiki/langs/vhdl.js +1 -0
- package/src/shiki/langs/viml.js +1 -0
- package/src/shiki/langs/vue-directives.js +1 -0
- package/src/shiki/langs/vue-html.js +1 -0
- package/src/shiki/langs/vue-interpolations.js +1 -0
- package/src/shiki/langs/vue-sfc-style-variable-injection.js +1 -0
- package/src/shiki/langs/vue.js +1 -0
- package/src/shiki/langs/vyper.js +1 -0
- package/src/shiki/langs/wasm.js +1 -0
- package/src/shiki/langs/wenyan.js +1 -0
- package/src/shiki/langs/wgsl.js +1 -0
- package/src/shiki/langs/wikitext.js +1 -0
- package/src/shiki/langs/wit.js +1 -0
- package/src/shiki/langs/wolfram.js +1 -0
- package/src/shiki/langs/xml.js +1 -0
- package/src/shiki/langs/xsl.js +1 -0
- package/src/shiki/langs/yaml.js +1 -0
- package/src/shiki/langs/zenscript.js +1 -0
- package/src/shiki/langs/zig.js +1 -0
- package/src/shiki/themes/andromeeda.js +1 -0
- package/src/shiki/themes/aurora-x.js +1 -0
- package/src/shiki/themes/ayu-dark.js +1 -0
- package/src/shiki/themes/catppuccin-frappe.js +1 -0
- package/src/shiki/themes/catppuccin-latte.js +1 -0
- package/src/shiki/themes/catppuccin-macchiato.js +1 -0
- package/src/shiki/themes/catppuccin-mocha.js +1 -0
- package/src/shiki/themes/dark-plus.js +1 -0
- package/src/shiki/themes/dracula-soft.js +1 -0
- package/src/shiki/themes/dracula.js +1 -0
- package/src/shiki/themes/everforest-dark.js +1 -0
- package/src/shiki/themes/everforest-light.js +1 -0
- package/src/shiki/themes/github-dark-default.js +1 -0
- package/src/shiki/themes/github-dark-dimmed.js +1 -0
- package/src/shiki/themes/github-dark-high-contrast.js +1 -0
- package/src/shiki/themes/github-dark.js +1 -0
- package/src/shiki/themes/github-light-default.js +1 -0
- package/src/shiki/themes/github-light-high-contrast.js +1 -0
- package/src/shiki/themes/github-light.js +1 -0
- package/src/shiki/themes/gruvbox-dark-hard.js +1 -0
- package/src/shiki/themes/gruvbox-dark-medium.js +1 -0
- package/src/shiki/themes/gruvbox-dark-soft.js +1 -0
- package/src/shiki/themes/gruvbox-light-hard.js +1 -0
- package/src/shiki/themes/gruvbox-light-medium.js +1 -0
- package/src/shiki/themes/gruvbox-light-soft.js +1 -0
- package/src/shiki/themes/houston.js +1 -0
- package/src/shiki/themes/kanagawa-dragon.js +1 -0
- package/src/shiki/themes/kanagawa-lotus.js +1 -0
- package/src/shiki/themes/kanagawa-wave.js +1 -0
- package/src/shiki/themes/laserwave.js +1 -0
- package/src/shiki/themes/light-plus.js +1 -0
- package/src/shiki/themes/material-theme-darker.js +1 -0
- package/src/shiki/themes/material-theme-lighter.js +1 -0
- package/src/shiki/themes/material-theme-ocean.js +1 -0
- package/src/shiki/themes/material-theme-palenight.js +1 -0
- package/src/shiki/themes/material-theme.js +1 -0
- package/src/shiki/themes/min-dark.js +1 -0
- package/src/shiki/themes/min-light.js +1 -0
- package/src/shiki/themes/monokai.js +1 -0
- package/src/shiki/themes/night-owl.js +1 -0
- package/src/shiki/themes/nord.js +1 -0
- package/src/shiki/themes/one-dark-pro.js +1 -0
- package/src/shiki/themes/one-light.js +1 -0
- package/src/shiki/themes/plastic.js +1 -0
- package/src/shiki/themes/poimandres.js +1 -0
- package/src/shiki/themes/red.js +1 -0
- package/src/shiki/themes/rose-pine-dawn.js +1 -0
- package/src/shiki/themes/rose-pine-moon.js +1 -0
- package/src/shiki/themes/rose-pine.js +1 -0
- package/src/shiki/themes/slack-dark.js +1 -0
- package/src/shiki/themes/slack-ochin.js +1 -0
- package/src/shiki/themes/snazzy-light.js +1 -0
- package/src/shiki/themes/solarized-dark.js +1 -0
- package/src/shiki/themes/solarized-light.js +1 -0
- package/src/shiki/themes/synthwave-84.js +1 -0
- package/src/shiki/themes/tokyo-night.js +1 -0
- package/src/shiki/themes/vesper.js +1 -0
- package/src/shiki/themes/vitesse-black.js +1 -0
- package/src/shiki/themes/vitesse-dark.js +1 -0
- package/src/shiki/themes/vitesse-light.js +1 -0
- package/client.d.ts +0 -8
- package/dist/app/tailwind.d.ts +0 -4
- package/dist/app/tailwind.js +0 -77
- package/dist/app/tailwind.js.map +0 -1
- package/dist/config/common.d.ts +0 -8
- package/dist/config/common.js +0 -2
- package/dist/config/common.js.map +0 -1
- package/dist/config/validators/InputSidebarSchema.d.ts +0 -217
- package/dist/config/validators/InputSidebarSchema.js +0 -53
- package/dist/config/validators/InputSidebarSchema.js.map +0 -1
- package/dist/config/validators/SidebarSchema.d.ts +0 -46
- package/dist/config/validators/SidebarSchema.js +0 -118
- package/dist/config/validators/SidebarSchema.js.map +0 -1
- package/dist/config/validators/common.d.ts +0 -5145
- package/dist/config/validators/common.js +0 -290
- package/dist/config/validators/common.js.map +0 -1
- package/dist/lib/components/SlotletProvider.d.ts +0 -17
- package/dist/lib/components/SlotletProvider.js +0 -18
- package/dist/lib/components/SlotletProvider.js.map +0 -1
- package/dist/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/components/navigation/Sidebar.d.ts +0 -3
- package/dist/lib/components/navigation/Sidebar.js +0 -19
- package/dist/lib/components/navigation/Sidebar.js.map +0 -1
- package/dist/lib/components/navigation/SidebarBadge.d.ts +0 -24
- package/dist/lib/components/navigation/SidebarBadge.js +0 -24
- package/dist/lib/components/navigation/SidebarBadge.js.map +0 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +0 -5
- package/dist/lib/components/navigation/SidebarCategory.js +0 -51
- package/dist/lib/components/navigation/SidebarCategory.js.map +0 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +0 -10
- package/dist/lib/components/navigation/SidebarItem.js +0 -44
- package/dist/lib/components/navigation/SidebarItem.js.map +0 -1
- package/dist/lib/components/navigation/SidebarWrapper.d.ts +0 -6
- package/dist/lib/components/navigation/SidebarWrapper.js +0 -6
- package/dist/lib/components/navigation/SidebarWrapper.js.map +0 -1
- package/dist/lib/plugins/custom-pages/CustomPage.d.ts +0 -2
- package/dist/lib/plugins/custom-pages/CustomPage.js +0 -11
- package/dist/lib/plugins/custom-pages/CustomPage.js.map +0 -1
- package/dist/lib/plugins/markdown/Toc.js +0 -48
- package/dist/lib/plugins/markdown/Toc.js.map +0 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +0 -38
- package/dist/lib/plugins/markdown/resolver.js +0 -75
- package/dist/lib/plugins/markdown/resolver.js.map +0 -1
- package/dist/lib/plugins/openapi/OpenApiRoute.d.ts +0 -9
- package/dist/lib/plugins/openapi/OpenApiRoute.js +0 -25
- package/dist/lib/plugins/openapi/OpenApiRoute.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +0 -7
- package/dist/lib/plugins/openapi/playground/SubmitButton.js +0 -22
- package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/UrlDisplay.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js +0 -22
- package/dist/lib/plugins/openapi/playground/UrlDisplay.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +0 -7
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +0 -11
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +0 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +0 -7
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +0 -16
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +0 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +0 -174
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +0 -1
- package/dist/lib/plugins/openapi/post-processors/removeParameters.d.ts +0 -10
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js +0 -66
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +0 -1
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js +0 -131
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +0 -1
- package/dist/lib/plugins/openapi/post-processors/removePaths.d.ts +0 -11
- package/dist/lib/plugins/openapi/post-processors/removePaths.js +0 -33
- package/dist/lib/plugins/openapi/post-processors/removePaths.js.map +0 -1
- package/dist/lib/plugins/openapi/post-processors/removePaths.test.js +0 -104
- package/dist/lib/plugins/openapi/post-processors/removePaths.test.js.map +0 -1
- package/dist/lib/plugins/openapi/post-processors/traverse.js.map +0 -1
- package/dist/vite/plugin-docs.test.js +0 -22
- package/dist/vite/plugin-docs.test.js.map +0 -1
- package/dist/vite/plugin-sidebar.d.ts +0 -3
- package/dist/vite/plugin-sidebar.js +0 -47
- package/dist/vite/plugin-sidebar.js.map +0 -1
- package/dist/vite/plugin-theme-css.d.ts +0 -6
- package/dist/vite/plugin-theme-css.js +0 -117
- package/dist/vite/plugin-theme-css.js.map +0 -1
- package/dist/vite/prerender.d.ts +0 -22
- package/dist/vite/prerender.js +0 -89
- package/dist/vite/prerender.js.map +0 -1
- package/dist/zuplo/env.d.ts +0 -7
- package/dist/zuplo/env.js +0 -12
- package/dist/zuplo/env.js.map +0 -1
- package/lib/AuthenticationPlugin-DeEA69mE.js +0 -58
- package/lib/AuthenticationPlugin-DeEA69mE.js.map +0 -1
- package/lib/CategoryHeading-MYL1u_6K.js +0 -10
- package/lib/CategoryHeading-MYL1u_6K.js.map +0 -1
- package/lib/Markdown-8mv9nhGd.js +0 -15190
- package/lib/Markdown-8mv9nhGd.js.map +0 -1
- package/lib/MdxPage-BalfwlsD.js +0 -193
- package/lib/MdxPage-BalfwlsD.js.map +0 -1
- package/lib/OpenApiRoute-ULLXjfro.js +0 -36
- package/lib/OpenApiRoute-ULLXjfro.js.map +0 -1
- package/lib/OperationList-B3VX94x4.js +0 -5179
- package/lib/OperationList-B3VX94x4.js.map +0 -1
- package/lib/Select-BcAbBUmk.js +0 -223
- package/lib/Select-BcAbBUmk.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 +0 -2986
- package/lib/SyntaxHighlight-B0L4SC_N.js.map +0 -1
- package/lib/ZudokuContext-dUyBGMap.js +0 -1229
- package/lib/ZudokuContext-dUyBGMap.js.map +0 -1
- package/lib/__vite-browser-external-BYRIRx8p.js +0 -9
- package/lib/__vite-browser-external-BYRIRx8p.js.map +0 -1
- package/lib/_commonjsHelpers-BkfeUUK-.js +0 -29
- package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
- package/lib/chunk-SYFQ2XB5-QijJrSf0.js +0 -1821
- package/lib/chunk-SYFQ2XB5-QijJrSf0.js.map +0 -1
- package/lib/circular-DxaIIlWD.js +0 -15409
- package/lib/circular-DxaIIlWD.js.map +0 -1
- package/lib/cn-qaFjX9_3.js +0 -2279
- package/lib/cn-qaFjX9_3.js.map +0 -1
- package/lib/context-rwLGh-6_.js +0 -22
- package/lib/context-rwLGh-6_.js.map +0 -1
- package/lib/createServer-E3cXjB0P.js +0 -12604
- package/lib/createServer-E3cXjB0P.js.map +0 -1
- package/lib/hook-NIpDSpau.js +0 -227
- package/lib/hook-NIpDSpau.js.map +0 -1
- package/lib/index-B7mqiOei.js +0 -509
- package/lib/index-B7mqiOei.js.map +0 -1
- package/lib/index-CjJS0l4l.js +0 -2094
- package/lib/index-CjJS0l4l.js.map +0 -1
- package/lib/index-Djenk2Hj.js +0 -36
- package/lib/index-Djenk2Hj.js.map +0 -1
- package/lib/index-Dl3Yl0yb.js +0 -4837
- package/lib/index-Dl3Yl0yb.js.map +0 -1
- package/lib/index-P0YUtHIb.js +0 -2065
- package/lib/index-P0YUtHIb.js.map +0 -1
- package/lib/index.esm-9-TF9KQB.js +0 -692
- package/lib/index.esm-9-TF9KQB.js.map +0 -1
- package/lib/index.esm-CrSoEshU.js +0 -1207
- package/lib/index.esm-CrSoEshU.js.map +0 -1
- package/lib/invariant-Caa8-XvF.js +0 -26
- package/lib/invariant-Caa8-XvF.js.map +0 -1
- package/lib/joinUrl-nLx9pD-Z.js +0 -20
- package/lib/joinUrl-nLx9pD-Z.js.map +0 -1
- package/lib/jsx-runtime-Bdg6XQ1m.js +0 -446
- package/lib/jsx-runtime-Bdg6XQ1m.js.map +0 -1
- package/lib/post-processors/removeExtensions.js +0 -11
- package/lib/post-processors/removeExtensions.js.map +0 -1
- package/lib/post-processors/removeParameters.js +0 -48
- package/lib/post-processors/removeParameters.js.map +0 -1
- package/lib/post-processors/removePaths.js +0 -28
- package/lib/post-processors/removePaths.js.map +0 -1
- package/lib/post-processors/traverse.js +0 -15
- package/lib/post-processors/traverse.js.map +0 -1
- package/lib/prism-bash.min-HHIMdNJ_.js +0 -7
- package/lib/prism-bash.min-HHIMdNJ_.js.map +0 -1
- package/lib/prism-csharp.min-bQAo2pmx.js +0 -63
- package/lib/prism-csharp.min-bQAo2pmx.js.map +0 -1
- package/lib/prism-java.min-BpvsOuIa.js +0 -35
- package/lib/prism-java.min-BpvsOuIa.js.map +0 -1
- package/lib/prism-javascript.min-CEqHqgbm.js +0 -9
- package/lib/prism-javascript.min-CEqHqgbm.js.map +0 -1
- package/lib/prism-json.min-B1GJqK1k.js +0 -2
- package/lib/prism-json.min-B1GJqK1k.js.map +0 -1
- package/lib/prism-markdown.min-C0Qn0m-5.js +0 -61
- package/lib/prism-markdown.min-C0Qn0m-5.js.map +0 -1
- package/lib/prism-markup-BNGj0Tvm.js +0 -174
- package/lib/prism-markup-BNGj0Tvm.js.map +0 -1
- package/lib/prism-objectivec.min-BXSWqpJJ.js +0 -2
- package/lib/prism-objectivec.min-BXSWqpJJ.js.map +0 -1
- package/lib/prism-ruby.min-Dx9KO9ds.js +0 -38
- package/lib/prism-ruby.min-Dx9KO9ds.js.map +0 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js +0 -34
- package/lib/prism-typescript.min-CD7H2IYQ.js.map +0 -1
- package/lib/state-bfQxaDxU.js +0 -211
- package/lib/state-bfQxaDxU.js.map +0 -1
- package/lib/useExposedProps-Bbf99zic.js +0 -9
- package/lib/useExposedProps-Bbf99zic.js.map +0 -1
- package/lib/useScrollToAnchor-BVCQSeKB.js +0 -286
- package/lib/useScrollToAnchor-BVCQSeKB.js.map +0 -1
- package/src/app/tailwind.ts +0 -83
- package/src/lib/components/SlotletProvider.tsx +0 -55
- package/src/lib/components/SyntaxHighlight.tsx +0 -171
- package/src/lib/components/context/PluginSystem.ts +0 -0
- package/src/lib/components/navigation/Sidebar.tsx +0 -55
- package/src/lib/components/navigation/SidebarBadge.tsx +0 -45
- package/src/lib/components/navigation/SidebarCategory.tsx +0 -137
- package/src/lib/components/navigation/SidebarItem.tsx +0 -125
- package/src/lib/components/navigation/SidebarWrapper.tsx +0 -27
- package/src/lib/plugins/custom-pages/CustomPage.tsx +0 -18
- package/src/lib/plugins/markdown/Toc.tsx +0 -135
- package/src/lib/plugins/markdown/resolver.ts +0 -90
- package/src/lib/plugins/openapi/OpenApiRoute.tsx +0 -51
- package/src/lib/plugins/openapi/playground/SubmitButton.tsx +0 -75
- package/src/lib/plugins/openapi/playground/UrlDisplay.tsx +0 -32
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +0 -73
- package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +0 -202
- package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +0 -27
- package/src/lib/plugins/openapi/post-processors/removeParameters.test.ts +0 -148
- package/src/lib/plugins/openapi/post-processors/removeParameters.ts +0 -101
- package/src/lib/plugins/openapi/post-processors/removePaths.test.ts +0 -126
- package/src/lib/plugins/openapi/post-processors/removePaths.ts +0 -55
- /package/dist/{lib/components/context/PluginSystem.d.ts → config/validators/InputNavigationSchema.test-d.d.ts} +0 -0
- /package/dist/{lib/plugins/openapi/post-processors/removeExtensions.test.d.ts → config/validators/validate.test.d.ts} +0 -0
- /package/dist/lib/{plugins/openapi/post-processors/removeParameters.test.d.ts → auth/issuer.test.d.ts} +0 -0
- /package/dist/lib/{plugins/openapi/post-processors/removePaths.test.d.ts → components/Slot.test.d.ts} +0 -0
- /package/dist/lib/{plugins/markdown → components/navigation}/Toc.d.ts +0 -0
- /package/dist/{vite/plugin-docs.test.d.ts → lib/hooks/useEvent.test.d.ts} +0 -0
- /package/dist/lib/plugins/openapi/{post-processors → processors}/traverse.d.ts +0 -0
- /package/dist/lib/plugins/openapi/{post-processors → processors}/traverse.js +0 -0
- /package/src/lib/plugins/openapi/{post-processors → processors}/traverse.ts +0 -0
|
@@ -0,0 +1,1503 @@
|
|
|
1
|
+
import * as S from "react";
|
|
2
|
+
import tt, { createContext as Rt, useContext as Et } from "react";
|
|
3
|
+
import { j as Ct } from "./jsx-runtime-C5mzlN2N.js";
|
|
4
|
+
import { u as x, m as j } from "./chunk-DQRVZFIR-DHK7_Ilc.js";
|
|
5
|
+
import { c as Ft } from "./index-DI5SPFK9.js";
|
|
6
|
+
var $ = class {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
9
|
+
}
|
|
10
|
+
subscribe(t) {
|
|
11
|
+
return this.listeners.add(t), this.onSubscribe(), () => {
|
|
12
|
+
this.listeners.delete(t), this.onUnsubscribe();
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
hasListeners() {
|
|
16
|
+
return this.listeners.size > 0;
|
|
17
|
+
}
|
|
18
|
+
onSubscribe() {
|
|
19
|
+
}
|
|
20
|
+
onUnsubscribe() {
|
|
21
|
+
}
|
|
22
|
+
}, C = typeof window > "u" || "Deno" in globalThis;
|
|
23
|
+
function Q() {
|
|
24
|
+
}
|
|
25
|
+
function be(t, e) {
|
|
26
|
+
return typeof t == "function" ? t(e) : t;
|
|
27
|
+
}
|
|
28
|
+
function N(t) {
|
|
29
|
+
return typeof t == "number" && t >= 0 && t !== 1 / 0;
|
|
30
|
+
}
|
|
31
|
+
function ut(t, e) {
|
|
32
|
+
return Math.max(t + (e || 0) - Date.now(), 0);
|
|
33
|
+
}
|
|
34
|
+
function A(t, e) {
|
|
35
|
+
return typeof t == "function" ? t(e) : t;
|
|
36
|
+
}
|
|
37
|
+
function w(t, e) {
|
|
38
|
+
return typeof t == "function" ? t(e) : t;
|
|
39
|
+
}
|
|
40
|
+
function Se(t, e) {
|
|
41
|
+
const {
|
|
42
|
+
type: s = "all",
|
|
43
|
+
exact: r,
|
|
44
|
+
fetchStatus: n,
|
|
45
|
+
predicate: i,
|
|
46
|
+
queryKey: o,
|
|
47
|
+
stale: a
|
|
48
|
+
} = t;
|
|
49
|
+
if (o) {
|
|
50
|
+
if (r) {
|
|
51
|
+
if (e.queryHash !== It(o, e.options))
|
|
52
|
+
return !1;
|
|
53
|
+
} else if (!V(e.queryKey, o))
|
|
54
|
+
return !1;
|
|
55
|
+
}
|
|
56
|
+
if (s !== "all") {
|
|
57
|
+
const u = e.isActive();
|
|
58
|
+
if (s === "active" && !u || s === "inactive" && u)
|
|
59
|
+
return !1;
|
|
60
|
+
}
|
|
61
|
+
return !(typeof a == "boolean" && e.isStale() !== a || n && n !== e.state.fetchStatus || i && !i(e));
|
|
62
|
+
}
|
|
63
|
+
function we(t, e) {
|
|
64
|
+
const { exact: s, status: r, predicate: n, mutationKey: i } = t;
|
|
65
|
+
if (i) {
|
|
66
|
+
if (!e.options.mutationKey)
|
|
67
|
+
return !1;
|
|
68
|
+
if (s) {
|
|
69
|
+
if (L(e.options.mutationKey) !== L(i))
|
|
70
|
+
return !1;
|
|
71
|
+
} else if (!V(e.options.mutationKey, i))
|
|
72
|
+
return !1;
|
|
73
|
+
}
|
|
74
|
+
return !(r && e.state.status !== r || n && !n(e));
|
|
75
|
+
}
|
|
76
|
+
function It(t, e) {
|
|
77
|
+
return (e?.queryKeyHashFn || L)(t);
|
|
78
|
+
}
|
|
79
|
+
function L(t) {
|
|
80
|
+
return JSON.stringify(
|
|
81
|
+
t,
|
|
82
|
+
(e, s) => H(s) ? Object.keys(s).sort().reduce((r, n) => (r[n] = s[n], r), {}) : s
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
function V(t, e) {
|
|
86
|
+
return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? Object.keys(e).every((s) => V(t[s], e[s])) : !1;
|
|
87
|
+
}
|
|
88
|
+
function M(t, e) {
|
|
89
|
+
if (t === e)
|
|
90
|
+
return t;
|
|
91
|
+
const s = et(t) && et(e);
|
|
92
|
+
if (s || H(t) && H(e)) {
|
|
93
|
+
const r = s ? t : Object.keys(t), n = r.length, i = s ? e : Object.keys(e), o = i.length, a = s ? [] : {};
|
|
94
|
+
let u = 0;
|
|
95
|
+
for (let f = 0; f < o; f++) {
|
|
96
|
+
const c = s ? f : i[f];
|
|
97
|
+
(!s && r.includes(c) || s) && t[c] === void 0 && e[c] === void 0 ? (a[c] = void 0, u++) : (a[c] = M(t[c], e[c]), a[c] === t[c] && t[c] !== void 0 && u++);
|
|
98
|
+
}
|
|
99
|
+
return n === o && u === n ? t : a;
|
|
100
|
+
}
|
|
101
|
+
return e;
|
|
102
|
+
}
|
|
103
|
+
function _(t, e) {
|
|
104
|
+
if (!e || Object.keys(t).length !== Object.keys(e).length)
|
|
105
|
+
return !1;
|
|
106
|
+
for (const s in t)
|
|
107
|
+
if (t[s] !== e[s])
|
|
108
|
+
return !1;
|
|
109
|
+
return !0;
|
|
110
|
+
}
|
|
111
|
+
function et(t) {
|
|
112
|
+
return Array.isArray(t) && t.length === Object.keys(t).length;
|
|
113
|
+
}
|
|
114
|
+
function H(t) {
|
|
115
|
+
if (!st(t))
|
|
116
|
+
return !1;
|
|
117
|
+
const e = t.constructor;
|
|
118
|
+
if (e === void 0)
|
|
119
|
+
return !0;
|
|
120
|
+
const s = e.prototype;
|
|
121
|
+
return !(!st(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
|
|
122
|
+
}
|
|
123
|
+
function st(t) {
|
|
124
|
+
return Object.prototype.toString.call(t) === "[object Object]";
|
|
125
|
+
}
|
|
126
|
+
function Pt(t) {
|
|
127
|
+
return new Promise((e) => {
|
|
128
|
+
setTimeout(e, t);
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function K(t, e, s) {
|
|
132
|
+
if (typeof s.structuralSharing == "function")
|
|
133
|
+
return s.structuralSharing(t, e);
|
|
134
|
+
if (s.structuralSharing !== !1) {
|
|
135
|
+
if (process.env.NODE_ENV !== "production")
|
|
136
|
+
try {
|
|
137
|
+
return M(t, e);
|
|
138
|
+
} catch (r) {
|
|
139
|
+
throw console.error(
|
|
140
|
+
`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}`
|
|
141
|
+
), r;
|
|
142
|
+
}
|
|
143
|
+
return M(t, e);
|
|
144
|
+
}
|
|
145
|
+
return e;
|
|
146
|
+
}
|
|
147
|
+
function Oe(t) {
|
|
148
|
+
return t;
|
|
149
|
+
}
|
|
150
|
+
function Re(t, e, s = 0) {
|
|
151
|
+
const r = [...t, e];
|
|
152
|
+
return s && r.length > s ? r.slice(1) : r;
|
|
153
|
+
}
|
|
154
|
+
function Ee(t, e, s = 0) {
|
|
155
|
+
const r = [e, ...t];
|
|
156
|
+
return s && r.length > s ? r.slice(0, -1) : r;
|
|
157
|
+
}
|
|
158
|
+
var k = Symbol();
|
|
159
|
+
function Tt(t, e) {
|
|
160
|
+
return process.env.NODE_ENV !== "production" && t.queryFn === k && console.error(
|
|
161
|
+
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`
|
|
162
|
+
), !t.queryFn && e?.initialPromise ? () => e.initialPromise : !t.queryFn || t.queryFn === k ? () => Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)) : t.queryFn;
|
|
163
|
+
}
|
|
164
|
+
var Dt = class extends $ {
|
|
165
|
+
#e;
|
|
166
|
+
#t;
|
|
167
|
+
#s;
|
|
168
|
+
constructor() {
|
|
169
|
+
super(), this.#s = (t) => {
|
|
170
|
+
if (!C && window.addEventListener) {
|
|
171
|
+
const e = () => t();
|
|
172
|
+
return window.addEventListener("visibilitychange", e, !1), () => {
|
|
173
|
+
window.removeEventListener("visibilitychange", e);
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
onSubscribe() {
|
|
179
|
+
this.#t || this.setEventListener(this.#s);
|
|
180
|
+
}
|
|
181
|
+
onUnsubscribe() {
|
|
182
|
+
this.hasListeners() || (this.#t?.(), this.#t = void 0);
|
|
183
|
+
}
|
|
184
|
+
setEventListener(t) {
|
|
185
|
+
this.#s = t, this.#t?.(), this.#t = t((e) => {
|
|
186
|
+
typeof e == "boolean" ? this.setFocused(e) : this.onFocus();
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
setFocused(t) {
|
|
190
|
+
this.#e !== t && (this.#e = t, this.onFocus());
|
|
191
|
+
}
|
|
192
|
+
onFocus() {
|
|
193
|
+
const t = this.isFocused();
|
|
194
|
+
this.listeners.forEach((e) => {
|
|
195
|
+
e(t);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
isFocused() {
|
|
199
|
+
return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
|
|
200
|
+
}
|
|
201
|
+
}, ct = new Dt(), At = class extends $ {
|
|
202
|
+
#e = !0;
|
|
203
|
+
#t;
|
|
204
|
+
#s;
|
|
205
|
+
constructor() {
|
|
206
|
+
super(), this.#s = (t) => {
|
|
207
|
+
if (!C && window.addEventListener) {
|
|
208
|
+
const e = () => t(!0), s = () => t(!1);
|
|
209
|
+
return window.addEventListener("online", e, !1), window.addEventListener("offline", s, !1), () => {
|
|
210
|
+
window.removeEventListener("online", e), window.removeEventListener("offline", s);
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
onSubscribe() {
|
|
216
|
+
this.#t || this.setEventListener(this.#s);
|
|
217
|
+
}
|
|
218
|
+
onUnsubscribe() {
|
|
219
|
+
this.hasListeners() || (this.#t?.(), this.#t = void 0);
|
|
220
|
+
}
|
|
221
|
+
setEventListener(t) {
|
|
222
|
+
this.#s = t, this.#t?.(), this.#t = t(this.setOnline.bind(this));
|
|
223
|
+
}
|
|
224
|
+
setOnline(t) {
|
|
225
|
+
this.#e !== t && (this.#e = t, this.listeners.forEach((s) => {
|
|
226
|
+
s(t);
|
|
227
|
+
}));
|
|
228
|
+
}
|
|
229
|
+
isOnline() {
|
|
230
|
+
return this.#e;
|
|
231
|
+
}
|
|
232
|
+
}, ht = new At();
|
|
233
|
+
function B() {
|
|
234
|
+
let t, e;
|
|
235
|
+
const s = new Promise((n, i) => {
|
|
236
|
+
t = n, e = i;
|
|
237
|
+
});
|
|
238
|
+
s.status = "pending", s.catch(() => {
|
|
239
|
+
});
|
|
240
|
+
function r(n) {
|
|
241
|
+
Object.assign(s, n), delete s.resolve, delete s.reject;
|
|
242
|
+
}
|
|
243
|
+
return s.resolve = (n) => {
|
|
244
|
+
r({
|
|
245
|
+
status: "fulfilled",
|
|
246
|
+
value: n
|
|
247
|
+
}), t(n);
|
|
248
|
+
}, s.reject = (n) => {
|
|
249
|
+
r({
|
|
250
|
+
status: "rejected",
|
|
251
|
+
reason: n
|
|
252
|
+
}), e(n);
|
|
253
|
+
}, s;
|
|
254
|
+
}
|
|
255
|
+
function kt(t) {
|
|
256
|
+
return Math.min(1e3 * 2 ** t, 3e4);
|
|
257
|
+
}
|
|
258
|
+
function lt(t) {
|
|
259
|
+
return (t ?? "online") === "online" ? ht.isOnline() : !0;
|
|
260
|
+
}
|
|
261
|
+
var ft = class extends Error {
|
|
262
|
+
constructor(t) {
|
|
263
|
+
super("CancelledError"), this.revert = t?.revert, this.silent = t?.silent;
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
function q(t) {
|
|
267
|
+
return t instanceof ft;
|
|
268
|
+
}
|
|
269
|
+
function xt(t) {
|
|
270
|
+
let e = !1, s = 0, r = !1, n;
|
|
271
|
+
const i = B(), o = (h) => {
|
|
272
|
+
r || (l(new ft(h)), t.abort?.());
|
|
273
|
+
}, a = () => {
|
|
274
|
+
e = !0;
|
|
275
|
+
}, u = () => {
|
|
276
|
+
e = !1;
|
|
277
|
+
}, f = () => ct.isFocused() && (t.networkMode === "always" || ht.isOnline()) && t.canRun(), c = () => lt(t.networkMode) && t.canRun(), d = (h) => {
|
|
278
|
+
r || (r = !0, t.onSuccess?.(h), n?.(), i.resolve(h));
|
|
279
|
+
}, l = (h) => {
|
|
280
|
+
r || (r = !0, t.onError?.(h), n?.(), i.reject(h));
|
|
281
|
+
}, g = () => new Promise((h) => {
|
|
282
|
+
n = (m) => {
|
|
283
|
+
(r || f()) && h(m);
|
|
284
|
+
}, t.onPause?.();
|
|
285
|
+
}).then(() => {
|
|
286
|
+
n = void 0, r || t.onContinue?.();
|
|
287
|
+
}), R = () => {
|
|
288
|
+
if (r)
|
|
289
|
+
return;
|
|
290
|
+
let h;
|
|
291
|
+
const m = s === 0 ? t.initialPromise : void 0;
|
|
292
|
+
try {
|
|
293
|
+
h = m ?? t.fn();
|
|
294
|
+
} catch (v) {
|
|
295
|
+
h = Promise.reject(v);
|
|
296
|
+
}
|
|
297
|
+
Promise.resolve(h).then(d).catch((v) => {
|
|
298
|
+
if (r)
|
|
299
|
+
return;
|
|
300
|
+
const p = t.retry ?? (C ? 0 : 3), y = t.retryDelay ?? kt, E = typeof y == "function" ? y(s, v) : y, I = p === !0 || typeof p == "number" && s < p || typeof p == "function" && p(s, v);
|
|
301
|
+
if (e || !I) {
|
|
302
|
+
l(v);
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
s++, t.onFail?.(s, v), Pt(E).then(() => f() ? void 0 : g()).then(() => {
|
|
306
|
+
e ? l(v) : R();
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
};
|
|
310
|
+
return {
|
|
311
|
+
promise: i,
|
|
312
|
+
cancel: o,
|
|
313
|
+
continue: () => (n?.(), i),
|
|
314
|
+
cancelRetry: a,
|
|
315
|
+
continueRetry: u,
|
|
316
|
+
canStart: c,
|
|
317
|
+
start: () => (c() ? R() : g().then(R), i)
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
var jt = (t) => setTimeout(t, 0);
|
|
321
|
+
function qt() {
|
|
322
|
+
let t = [], e = 0, s = (a) => {
|
|
323
|
+
a();
|
|
324
|
+
}, r = (a) => {
|
|
325
|
+
a();
|
|
326
|
+
}, n = jt;
|
|
327
|
+
const i = (a) => {
|
|
328
|
+
e ? t.push(a) : n(() => {
|
|
329
|
+
s(a);
|
|
330
|
+
});
|
|
331
|
+
}, o = () => {
|
|
332
|
+
const a = t;
|
|
333
|
+
t = [], a.length && n(() => {
|
|
334
|
+
r(() => {
|
|
335
|
+
a.forEach((u) => {
|
|
336
|
+
s(u);
|
|
337
|
+
});
|
|
338
|
+
});
|
|
339
|
+
});
|
|
340
|
+
};
|
|
341
|
+
return {
|
|
342
|
+
batch: (a) => {
|
|
343
|
+
let u;
|
|
344
|
+
e++;
|
|
345
|
+
try {
|
|
346
|
+
u = a();
|
|
347
|
+
} finally {
|
|
348
|
+
e--, e || o();
|
|
349
|
+
}
|
|
350
|
+
return u;
|
|
351
|
+
},
|
|
352
|
+
/**
|
|
353
|
+
* All calls to the wrapped function will be batched.
|
|
354
|
+
*/
|
|
355
|
+
batchCalls: (a) => (...u) => {
|
|
356
|
+
i(() => {
|
|
357
|
+
a(...u);
|
|
358
|
+
});
|
|
359
|
+
},
|
|
360
|
+
schedule: i,
|
|
361
|
+
/**
|
|
362
|
+
* Use this method to set a custom notify function.
|
|
363
|
+
* This can be used to for example wrap notifications with `React.act` while running tests.
|
|
364
|
+
*/
|
|
365
|
+
setNotifyFunction: (a) => {
|
|
366
|
+
s = a;
|
|
367
|
+
},
|
|
368
|
+
/**
|
|
369
|
+
* Use this method to set a custom function to batch notifications together into a single tick.
|
|
370
|
+
* By default React Query will use the batch function provided by ReactDOM or React Native.
|
|
371
|
+
*/
|
|
372
|
+
setBatchNotifyFunction: (a) => {
|
|
373
|
+
r = a;
|
|
374
|
+
},
|
|
375
|
+
setScheduler: (a) => {
|
|
376
|
+
n = a;
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
var J = qt(), Ut = class {
|
|
381
|
+
#e;
|
|
382
|
+
destroy() {
|
|
383
|
+
this.clearGcTimeout();
|
|
384
|
+
}
|
|
385
|
+
scheduleGc() {
|
|
386
|
+
this.clearGcTimeout(), N(this.gcTime) && (this.#e = setTimeout(() => {
|
|
387
|
+
this.optionalRemove();
|
|
388
|
+
}, this.gcTime));
|
|
389
|
+
}
|
|
390
|
+
updateGcTime(t) {
|
|
391
|
+
this.gcTime = Math.max(
|
|
392
|
+
this.gcTime || 0,
|
|
393
|
+
t ?? (C ? 1 / 0 : 5 * 60 * 1e3)
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
clearGcTimeout() {
|
|
397
|
+
this.#e && (clearTimeout(this.#e), this.#e = void 0);
|
|
398
|
+
}
|
|
399
|
+
}, Ce = class extends Ut {
|
|
400
|
+
#e;
|
|
401
|
+
#t;
|
|
402
|
+
#s;
|
|
403
|
+
#n;
|
|
404
|
+
#r;
|
|
405
|
+
#o;
|
|
406
|
+
#a;
|
|
407
|
+
constructor(t) {
|
|
408
|
+
super(), this.#a = !1, this.#o = t.defaultOptions, this.setOptions(t.options), this.observers = [], this.#n = t.client, this.#s = this.#n.getQueryCache(), this.queryKey = t.queryKey, this.queryHash = t.queryHash, this.#e = Qt(this.options), this.state = t.state ?? this.#e, this.scheduleGc();
|
|
409
|
+
}
|
|
410
|
+
get meta() {
|
|
411
|
+
return this.options.meta;
|
|
412
|
+
}
|
|
413
|
+
get promise() {
|
|
414
|
+
return this.#r?.promise;
|
|
415
|
+
}
|
|
416
|
+
setOptions(t) {
|
|
417
|
+
this.options = { ...this.#o, ...t }, this.updateGcTime(this.options.gcTime);
|
|
418
|
+
}
|
|
419
|
+
optionalRemove() {
|
|
420
|
+
!this.observers.length && this.state.fetchStatus === "idle" && this.#s.remove(this);
|
|
421
|
+
}
|
|
422
|
+
setData(t, e) {
|
|
423
|
+
const s = K(this.state.data, t, this.options);
|
|
424
|
+
return this.#i({
|
|
425
|
+
data: s,
|
|
426
|
+
type: "success",
|
|
427
|
+
dataUpdatedAt: e?.updatedAt,
|
|
428
|
+
manual: e?.manual
|
|
429
|
+
}), s;
|
|
430
|
+
}
|
|
431
|
+
setState(t, e) {
|
|
432
|
+
this.#i({ type: "setState", state: t, setStateOptions: e });
|
|
433
|
+
}
|
|
434
|
+
cancel(t) {
|
|
435
|
+
const e = this.#r?.promise;
|
|
436
|
+
return this.#r?.cancel(t), e ? e.then(Q).catch(Q) : Promise.resolve();
|
|
437
|
+
}
|
|
438
|
+
destroy() {
|
|
439
|
+
super.destroy(), this.cancel({ silent: !0 });
|
|
440
|
+
}
|
|
441
|
+
reset() {
|
|
442
|
+
this.destroy(), this.setState(this.#e);
|
|
443
|
+
}
|
|
444
|
+
isActive() {
|
|
445
|
+
return this.observers.some(
|
|
446
|
+
(t) => w(t.options.enabled, this) !== !1
|
|
447
|
+
);
|
|
448
|
+
}
|
|
449
|
+
isDisabled() {
|
|
450
|
+
return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === k || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
|
|
451
|
+
}
|
|
452
|
+
isStale() {
|
|
453
|
+
return this.state.isInvalidated ? !0 : this.getObserversCount() > 0 ? this.observers.some(
|
|
454
|
+
(t) => t.getCurrentResult().isStale
|
|
455
|
+
) : this.state.data === void 0;
|
|
456
|
+
}
|
|
457
|
+
isStaleByTime(t = 0) {
|
|
458
|
+
return this.state.isInvalidated || this.state.data === void 0 || !ut(this.state.dataUpdatedAt, t);
|
|
459
|
+
}
|
|
460
|
+
onFocus() {
|
|
461
|
+
this.observers.find((e) => e.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
|
|
462
|
+
}
|
|
463
|
+
onOnline() {
|
|
464
|
+
this.observers.find((e) => e.shouldFetchOnReconnect())?.refetch({ cancelRefetch: !1 }), this.#r?.continue();
|
|
465
|
+
}
|
|
466
|
+
addObserver(t) {
|
|
467
|
+
this.observers.includes(t) || (this.observers.push(t), this.clearGcTimeout(), this.#s.notify({ type: "observerAdded", query: this, observer: t }));
|
|
468
|
+
}
|
|
469
|
+
removeObserver(t) {
|
|
470
|
+
this.observers.includes(t) && (this.observers = this.observers.filter((e) => e !== t), this.observers.length || (this.#r && (this.#a ? this.#r.cancel({ revert: !0 }) : this.#r.cancelRetry()), this.scheduleGc()), this.#s.notify({ type: "observerRemoved", query: this, observer: t }));
|
|
471
|
+
}
|
|
472
|
+
getObserversCount() {
|
|
473
|
+
return this.observers.length;
|
|
474
|
+
}
|
|
475
|
+
invalidate() {
|
|
476
|
+
this.state.isInvalidated || this.#i({ type: "invalidate" });
|
|
477
|
+
}
|
|
478
|
+
fetch(t, e) {
|
|
479
|
+
if (this.state.fetchStatus !== "idle") {
|
|
480
|
+
if (this.state.data !== void 0 && e?.cancelRefetch)
|
|
481
|
+
this.cancel({ silent: !0 });
|
|
482
|
+
else if (this.#r)
|
|
483
|
+
return this.#r.continueRetry(), this.#r.promise;
|
|
484
|
+
}
|
|
485
|
+
if (t && this.setOptions(t), !this.options.queryFn) {
|
|
486
|
+
const a = this.observers.find((u) => u.options.queryFn);
|
|
487
|
+
a && this.setOptions(a.options);
|
|
488
|
+
}
|
|
489
|
+
process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error(
|
|
490
|
+
"As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"
|
|
491
|
+
));
|
|
492
|
+
const s = new AbortController(), r = (a) => {
|
|
493
|
+
Object.defineProperty(a, "signal", {
|
|
494
|
+
enumerable: !0,
|
|
495
|
+
get: () => (this.#a = !0, s.signal)
|
|
496
|
+
});
|
|
497
|
+
}, n = () => {
|
|
498
|
+
const a = Tt(this.options, e), u = {
|
|
499
|
+
client: this.#n,
|
|
500
|
+
queryKey: this.queryKey,
|
|
501
|
+
meta: this.meta
|
|
502
|
+
};
|
|
503
|
+
return r(u), this.#a = !1, this.options.persister ? this.options.persister(
|
|
504
|
+
a,
|
|
505
|
+
u,
|
|
506
|
+
this
|
|
507
|
+
) : a(u);
|
|
508
|
+
}, i = {
|
|
509
|
+
fetchOptions: e,
|
|
510
|
+
options: this.options,
|
|
511
|
+
queryKey: this.queryKey,
|
|
512
|
+
client: this.#n,
|
|
513
|
+
state: this.state,
|
|
514
|
+
fetchFn: n
|
|
515
|
+
};
|
|
516
|
+
r(i), this.options.behavior?.onFetch(
|
|
517
|
+
i,
|
|
518
|
+
this
|
|
519
|
+
), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== i.fetchOptions?.meta) && this.#i({ type: "fetch", meta: i.fetchOptions?.meta });
|
|
520
|
+
const o = (a) => {
|
|
521
|
+
q(a) && a.silent || this.#i({
|
|
522
|
+
type: "error",
|
|
523
|
+
error: a
|
|
524
|
+
}), q(a) || (this.#s.config.onError?.(
|
|
525
|
+
a,
|
|
526
|
+
this
|
|
527
|
+
), this.#s.config.onSettled?.(
|
|
528
|
+
this.state.data,
|
|
529
|
+
a,
|
|
530
|
+
this
|
|
531
|
+
)), this.scheduleGc();
|
|
532
|
+
};
|
|
533
|
+
return this.#r = xt({
|
|
534
|
+
initialPromise: e?.initialPromise,
|
|
535
|
+
fn: i.fetchFn,
|
|
536
|
+
abort: s.abort.bind(s),
|
|
537
|
+
onSuccess: (a) => {
|
|
538
|
+
if (a === void 0) {
|
|
539
|
+
process.env.NODE_ENV !== "production" && console.error(
|
|
540
|
+
`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
|
|
541
|
+
), o(new Error(`${this.queryHash} data is undefined`));
|
|
542
|
+
return;
|
|
543
|
+
}
|
|
544
|
+
try {
|
|
545
|
+
this.setData(a);
|
|
546
|
+
} catch (u) {
|
|
547
|
+
o(u);
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
this.#s.config.onSuccess?.(a, this), this.#s.config.onSettled?.(
|
|
551
|
+
a,
|
|
552
|
+
this.state.error,
|
|
553
|
+
this
|
|
554
|
+
), this.scheduleGc();
|
|
555
|
+
},
|
|
556
|
+
onError: o,
|
|
557
|
+
onFail: (a, u) => {
|
|
558
|
+
this.#i({ type: "failed", failureCount: a, error: u });
|
|
559
|
+
},
|
|
560
|
+
onPause: () => {
|
|
561
|
+
this.#i({ type: "pause" });
|
|
562
|
+
},
|
|
563
|
+
onContinue: () => {
|
|
564
|
+
this.#i({ type: "continue" });
|
|
565
|
+
},
|
|
566
|
+
retry: i.options.retry,
|
|
567
|
+
retryDelay: i.options.retryDelay,
|
|
568
|
+
networkMode: i.options.networkMode,
|
|
569
|
+
canRun: () => !0
|
|
570
|
+
}), this.#r.start();
|
|
571
|
+
}
|
|
572
|
+
#i(t) {
|
|
573
|
+
const e = (s) => {
|
|
574
|
+
switch (t.type) {
|
|
575
|
+
case "failed":
|
|
576
|
+
return {
|
|
577
|
+
...s,
|
|
578
|
+
fetchFailureCount: t.failureCount,
|
|
579
|
+
fetchFailureReason: t.error
|
|
580
|
+
};
|
|
581
|
+
case "pause":
|
|
582
|
+
return {
|
|
583
|
+
...s,
|
|
584
|
+
fetchStatus: "paused"
|
|
585
|
+
};
|
|
586
|
+
case "continue":
|
|
587
|
+
return {
|
|
588
|
+
...s,
|
|
589
|
+
fetchStatus: "fetching"
|
|
590
|
+
};
|
|
591
|
+
case "fetch":
|
|
592
|
+
return {
|
|
593
|
+
...s,
|
|
594
|
+
...dt(s.data, this.options),
|
|
595
|
+
fetchMeta: t.meta ?? null
|
|
596
|
+
};
|
|
597
|
+
case "success":
|
|
598
|
+
return {
|
|
599
|
+
...s,
|
|
600
|
+
data: t.data,
|
|
601
|
+
dataUpdateCount: s.dataUpdateCount + 1,
|
|
602
|
+
dataUpdatedAt: t.dataUpdatedAt ?? Date.now(),
|
|
603
|
+
error: null,
|
|
604
|
+
isInvalidated: !1,
|
|
605
|
+
status: "success",
|
|
606
|
+
...!t.manual && {
|
|
607
|
+
fetchStatus: "idle",
|
|
608
|
+
fetchFailureCount: 0,
|
|
609
|
+
fetchFailureReason: null
|
|
610
|
+
}
|
|
611
|
+
};
|
|
612
|
+
case "error":
|
|
613
|
+
const r = t.error;
|
|
614
|
+
return q(r) && r.revert && this.#t ? { ...this.#t, fetchStatus: "idle" } : {
|
|
615
|
+
...s,
|
|
616
|
+
error: r,
|
|
617
|
+
errorUpdateCount: s.errorUpdateCount + 1,
|
|
618
|
+
errorUpdatedAt: Date.now(),
|
|
619
|
+
fetchFailureCount: s.fetchFailureCount + 1,
|
|
620
|
+
fetchFailureReason: r,
|
|
621
|
+
fetchStatus: "idle",
|
|
622
|
+
status: "error"
|
|
623
|
+
};
|
|
624
|
+
case "invalidate":
|
|
625
|
+
return {
|
|
626
|
+
...s,
|
|
627
|
+
isInvalidated: !0
|
|
628
|
+
};
|
|
629
|
+
case "setState":
|
|
630
|
+
return {
|
|
631
|
+
...s,
|
|
632
|
+
...t.state
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
};
|
|
636
|
+
this.state = e(this.state), J.batch(() => {
|
|
637
|
+
this.observers.forEach((s) => {
|
|
638
|
+
s.onQueryUpdate();
|
|
639
|
+
}), this.#s.notify({ query: this, type: "updated", action: t });
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
};
|
|
643
|
+
function dt(t, e) {
|
|
644
|
+
return {
|
|
645
|
+
fetchFailureCount: 0,
|
|
646
|
+
fetchFailureReason: null,
|
|
647
|
+
fetchStatus: lt(e.networkMode) ? "fetching" : "paused",
|
|
648
|
+
...t === void 0 && {
|
|
649
|
+
error: null,
|
|
650
|
+
status: "pending"
|
|
651
|
+
}
|
|
652
|
+
};
|
|
653
|
+
}
|
|
654
|
+
function Qt(t) {
|
|
655
|
+
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;
|
|
656
|
+
return {
|
|
657
|
+
data: e,
|
|
658
|
+
dataUpdateCount: 0,
|
|
659
|
+
dataUpdatedAt: s ? r ?? Date.now() : 0,
|
|
660
|
+
error: null,
|
|
661
|
+
errorUpdateCount: 0,
|
|
662
|
+
errorUpdatedAt: 0,
|
|
663
|
+
fetchFailureCount: 0,
|
|
664
|
+
fetchFailureReason: null,
|
|
665
|
+
fetchMeta: null,
|
|
666
|
+
isInvalidated: !1,
|
|
667
|
+
status: s ? "success" : "pending",
|
|
668
|
+
fetchStatus: "idle"
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
var pt = class extends $ {
|
|
672
|
+
constructor(t, e) {
|
|
673
|
+
super(), this.options = e, this.#e = t, this.#i = null, this.#a = B(), this.options.experimental_prefetchInRender || this.#a.reject(
|
|
674
|
+
new Error("experimental_prefetchInRender feature flag is not enabled")
|
|
675
|
+
), this.bindMethods(), this.setOptions(e);
|
|
676
|
+
}
|
|
677
|
+
#e;
|
|
678
|
+
#t = void 0;
|
|
679
|
+
#s = void 0;
|
|
680
|
+
#n = void 0;
|
|
681
|
+
#r;
|
|
682
|
+
#o;
|
|
683
|
+
#a;
|
|
684
|
+
#i;
|
|
685
|
+
#y;
|
|
686
|
+
#f;
|
|
687
|
+
// This property keeps track of the last query with defined data.
|
|
688
|
+
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
689
|
+
#d;
|
|
690
|
+
#c;
|
|
691
|
+
#h;
|
|
692
|
+
#u;
|
|
693
|
+
#p = /* @__PURE__ */ new Set();
|
|
694
|
+
bindMethods() {
|
|
695
|
+
this.refetch = this.refetch.bind(this);
|
|
696
|
+
}
|
|
697
|
+
onSubscribe() {
|
|
698
|
+
this.listeners.size === 1 && (this.#t.addObserver(this), rt(this.#t, this.options) ? this.#l() : this.updateResult(), this.#b());
|
|
699
|
+
}
|
|
700
|
+
onUnsubscribe() {
|
|
701
|
+
this.hasListeners() || this.destroy();
|
|
702
|
+
}
|
|
703
|
+
shouldFetchOnReconnect() {
|
|
704
|
+
return G(
|
|
705
|
+
this.#t,
|
|
706
|
+
this.options,
|
|
707
|
+
this.options.refetchOnReconnect
|
|
708
|
+
);
|
|
709
|
+
}
|
|
710
|
+
shouldFetchOnWindowFocus() {
|
|
711
|
+
return G(
|
|
712
|
+
this.#t,
|
|
713
|
+
this.options,
|
|
714
|
+
this.options.refetchOnWindowFocus
|
|
715
|
+
);
|
|
716
|
+
}
|
|
717
|
+
destroy() {
|
|
718
|
+
this.listeners = /* @__PURE__ */ new Set(), this.#S(), this.#w(), this.#t.removeObserver(this);
|
|
719
|
+
}
|
|
720
|
+
setOptions(t) {
|
|
721
|
+
const e = this.options, s = this.#t;
|
|
722
|
+
if (this.options = this.#e.defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof w(this.options.enabled, this.#t) != "boolean")
|
|
723
|
+
throw new Error(
|
|
724
|
+
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
725
|
+
);
|
|
726
|
+
this.#O(), this.#t.setOptions(this.options), e._defaulted && !_(this.options, e) && this.#e.getQueryCache().notify({
|
|
727
|
+
type: "observerOptionsUpdated",
|
|
728
|
+
query: this.#t,
|
|
729
|
+
observer: this
|
|
730
|
+
});
|
|
731
|
+
const r = this.hasListeners();
|
|
732
|
+
r && nt(
|
|
733
|
+
this.#t,
|
|
734
|
+
s,
|
|
735
|
+
this.options,
|
|
736
|
+
e
|
|
737
|
+
) && this.#l(), this.updateResult(), r && (this.#t !== s || w(this.options.enabled, this.#t) !== w(e.enabled, this.#t) || A(this.options.staleTime, this.#t) !== A(e.staleTime, this.#t)) && this.#v();
|
|
738
|
+
const n = this.#g();
|
|
739
|
+
r && (this.#t !== s || w(this.options.enabled, this.#t) !== w(e.enabled, this.#t) || n !== this.#u) && this.#m(n);
|
|
740
|
+
}
|
|
741
|
+
getOptimisticResult(t) {
|
|
742
|
+
const e = this.#e.getQueryCache().build(this.#e, t), s = this.createResult(e, t);
|
|
743
|
+
return Lt(this, s) && (this.#n = s, this.#o = this.options, this.#r = this.#t.state), s;
|
|
744
|
+
}
|
|
745
|
+
getCurrentResult() {
|
|
746
|
+
return this.#n;
|
|
747
|
+
}
|
|
748
|
+
trackResult(t, e) {
|
|
749
|
+
const s = {};
|
|
750
|
+
return Object.keys(t).forEach((r) => {
|
|
751
|
+
Object.defineProperty(s, r, {
|
|
752
|
+
configurable: !1,
|
|
753
|
+
enumerable: !0,
|
|
754
|
+
get: () => (this.trackProp(r), e?.(r), t[r])
|
|
755
|
+
});
|
|
756
|
+
}), s;
|
|
757
|
+
}
|
|
758
|
+
trackProp(t) {
|
|
759
|
+
this.#p.add(t);
|
|
760
|
+
}
|
|
761
|
+
getCurrentQuery() {
|
|
762
|
+
return this.#t;
|
|
763
|
+
}
|
|
764
|
+
refetch({ ...t } = {}) {
|
|
765
|
+
return this.fetch({
|
|
766
|
+
...t
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
fetchOptimistic(t) {
|
|
770
|
+
const e = this.#e.defaultQueryOptions(t), s = this.#e.getQueryCache().build(this.#e, e);
|
|
771
|
+
return s.fetch().then(() => this.createResult(s, e));
|
|
772
|
+
}
|
|
773
|
+
fetch(t) {
|
|
774
|
+
return this.#l({
|
|
775
|
+
...t,
|
|
776
|
+
cancelRefetch: t.cancelRefetch ?? !0
|
|
777
|
+
}).then(() => (this.updateResult(), this.#n));
|
|
778
|
+
}
|
|
779
|
+
#l(t) {
|
|
780
|
+
this.#O();
|
|
781
|
+
let e = this.#t.fetch(
|
|
782
|
+
this.options,
|
|
783
|
+
t
|
|
784
|
+
);
|
|
785
|
+
return t?.throwOnError || (e = e.catch(Q)), e;
|
|
786
|
+
}
|
|
787
|
+
#v() {
|
|
788
|
+
this.#S();
|
|
789
|
+
const t = A(
|
|
790
|
+
this.options.staleTime,
|
|
791
|
+
this.#t
|
|
792
|
+
);
|
|
793
|
+
if (C || this.#n.isStale || !N(t))
|
|
794
|
+
return;
|
|
795
|
+
const s = ut(this.#n.dataUpdatedAt, t) + 1;
|
|
796
|
+
this.#c = setTimeout(() => {
|
|
797
|
+
this.#n.isStale || this.updateResult();
|
|
798
|
+
}, s);
|
|
799
|
+
}
|
|
800
|
+
#g() {
|
|
801
|
+
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
|
|
802
|
+
}
|
|
803
|
+
#m(t) {
|
|
804
|
+
this.#w(), this.#u = t, !(C || w(this.options.enabled, this.#t) === !1 || !N(this.#u) || this.#u === 0) && (this.#h = setInterval(() => {
|
|
805
|
+
(this.options.refetchIntervalInBackground || ct.isFocused()) && this.#l();
|
|
806
|
+
}, this.#u));
|
|
807
|
+
}
|
|
808
|
+
#b() {
|
|
809
|
+
this.#v(), this.#m(this.#g());
|
|
810
|
+
}
|
|
811
|
+
#S() {
|
|
812
|
+
this.#c && (clearTimeout(this.#c), this.#c = void 0);
|
|
813
|
+
}
|
|
814
|
+
#w() {
|
|
815
|
+
this.#h && (clearInterval(this.#h), this.#h = void 0);
|
|
816
|
+
}
|
|
817
|
+
createResult(t, e) {
|
|
818
|
+
const s = this.#t, r = this.options, n = this.#n, i = this.#r, o = this.#o, u = t !== s ? t.state : this.#s, { state: f } = t;
|
|
819
|
+
let c = { ...f }, d = !1, l;
|
|
820
|
+
if (e._optimisticResults) {
|
|
821
|
+
const b = this.hasListeners(), T = !b && rt(t, e), P = b && nt(t, s, e, r);
|
|
822
|
+
(T || P) && (c = {
|
|
823
|
+
...c,
|
|
824
|
+
...dt(f.data, t.options)
|
|
825
|
+
}), e._optimisticResults === "isRestoring" && (c.fetchStatus = "idle");
|
|
826
|
+
}
|
|
827
|
+
let { error: g, errorUpdatedAt: R, status: h } = c;
|
|
828
|
+
l = c.data;
|
|
829
|
+
let m = !1;
|
|
830
|
+
if (e.placeholderData !== void 0 && l === void 0 && h === "pending") {
|
|
831
|
+
let b;
|
|
832
|
+
n?.isPlaceholderData && e.placeholderData === o?.placeholderData ? (b = n.data, m = !0) : b = typeof e.placeholderData == "function" ? e.placeholderData(
|
|
833
|
+
this.#d?.state.data,
|
|
834
|
+
this.#d
|
|
835
|
+
) : e.placeholderData, b !== void 0 && (h = "success", l = K(
|
|
836
|
+
n?.data,
|
|
837
|
+
b,
|
|
838
|
+
e
|
|
839
|
+
), d = !0);
|
|
840
|
+
}
|
|
841
|
+
if (e.select && l !== void 0 && !m)
|
|
842
|
+
if (n && l === i?.data && e.select === this.#y)
|
|
843
|
+
l = this.#f;
|
|
844
|
+
else
|
|
845
|
+
try {
|
|
846
|
+
this.#y = e.select, l = e.select(l), l = K(n?.data, l, e), this.#f = l, this.#i = null;
|
|
847
|
+
} catch (b) {
|
|
848
|
+
this.#i = b;
|
|
849
|
+
}
|
|
850
|
+
this.#i && (g = this.#i, l = this.#f, R = Date.now(), h = "error");
|
|
851
|
+
const v = c.fetchStatus === "fetching", p = h === "pending", y = h === "error", E = p && v, I = l !== void 0, O = {
|
|
852
|
+
status: h,
|
|
853
|
+
fetchStatus: c.fetchStatus,
|
|
854
|
+
isPending: p,
|
|
855
|
+
isSuccess: h === "success",
|
|
856
|
+
isError: y,
|
|
857
|
+
isInitialLoading: E,
|
|
858
|
+
isLoading: E,
|
|
859
|
+
data: l,
|
|
860
|
+
dataUpdatedAt: c.dataUpdatedAt,
|
|
861
|
+
error: g,
|
|
862
|
+
errorUpdatedAt: R,
|
|
863
|
+
failureCount: c.fetchFailureCount,
|
|
864
|
+
failureReason: c.fetchFailureReason,
|
|
865
|
+
errorUpdateCount: c.errorUpdateCount,
|
|
866
|
+
isFetched: c.dataUpdateCount > 0 || c.errorUpdateCount > 0,
|
|
867
|
+
isFetchedAfterMount: c.dataUpdateCount > u.dataUpdateCount || c.errorUpdateCount > u.errorUpdateCount,
|
|
868
|
+
isFetching: v,
|
|
869
|
+
isRefetching: v && !p,
|
|
870
|
+
isLoadingError: y && !I,
|
|
871
|
+
isPaused: c.fetchStatus === "paused",
|
|
872
|
+
isPlaceholderData: d,
|
|
873
|
+
isRefetchError: y && I,
|
|
874
|
+
isStale: Z(t, e),
|
|
875
|
+
refetch: this.refetch,
|
|
876
|
+
promise: this.#a
|
|
877
|
+
};
|
|
878
|
+
if (this.options.experimental_prefetchInRender) {
|
|
879
|
+
const b = (D) => {
|
|
880
|
+
O.status === "error" ? D.reject(O.error) : O.data !== void 0 && D.resolve(O.data);
|
|
881
|
+
}, T = () => {
|
|
882
|
+
const D = this.#a = O.promise = B();
|
|
883
|
+
b(D);
|
|
884
|
+
}, P = this.#a;
|
|
885
|
+
switch (P.status) {
|
|
886
|
+
case "pending":
|
|
887
|
+
t.queryHash === s.queryHash && b(P);
|
|
888
|
+
break;
|
|
889
|
+
case "fulfilled":
|
|
890
|
+
(O.status === "error" || O.data !== P.value) && T();
|
|
891
|
+
break;
|
|
892
|
+
case "rejected":
|
|
893
|
+
(O.status !== "error" || O.error !== P.reason) && T();
|
|
894
|
+
break;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
return O;
|
|
898
|
+
}
|
|
899
|
+
updateResult() {
|
|
900
|
+
const t = this.#n, e = this.createResult(this.#t, this.options);
|
|
901
|
+
if (this.#r = this.#t.state, this.#o = this.options, this.#r.data !== void 0 && (this.#d = this.#t), _(e, t))
|
|
902
|
+
return;
|
|
903
|
+
this.#n = e;
|
|
904
|
+
const s = () => {
|
|
905
|
+
if (!t)
|
|
906
|
+
return !0;
|
|
907
|
+
const { notifyOnChangeProps: r } = this.options, n = typeof r == "function" ? r() : r;
|
|
908
|
+
if (n === "all" || !n && !this.#p.size)
|
|
909
|
+
return !0;
|
|
910
|
+
const i = new Set(
|
|
911
|
+
n ?? this.#p
|
|
912
|
+
);
|
|
913
|
+
return this.options.throwOnError && i.add("error"), Object.keys(this.#n).some((o) => {
|
|
914
|
+
const a = o;
|
|
915
|
+
return this.#n[a] !== t[a] && i.has(a);
|
|
916
|
+
});
|
|
917
|
+
};
|
|
918
|
+
this.#R({ listeners: s() });
|
|
919
|
+
}
|
|
920
|
+
#O() {
|
|
921
|
+
const t = this.#e.getQueryCache().build(this.#e, this.options);
|
|
922
|
+
if (t === this.#t)
|
|
923
|
+
return;
|
|
924
|
+
const e = this.#t;
|
|
925
|
+
this.#t = t, this.#s = t.state, this.hasListeners() && (e?.removeObserver(this), t.addObserver(this));
|
|
926
|
+
}
|
|
927
|
+
onQueryUpdate() {
|
|
928
|
+
this.updateResult(), this.hasListeners() && this.#b();
|
|
929
|
+
}
|
|
930
|
+
#R(t) {
|
|
931
|
+
J.batch(() => {
|
|
932
|
+
t.listeners && this.listeners.forEach((e) => {
|
|
933
|
+
e(this.#n);
|
|
934
|
+
}), this.#e.getQueryCache().notify({
|
|
935
|
+
query: this.#t,
|
|
936
|
+
type: "observerResultsUpdated"
|
|
937
|
+
});
|
|
938
|
+
});
|
|
939
|
+
}
|
|
940
|
+
};
|
|
941
|
+
function Nt(t, e) {
|
|
942
|
+
return w(e.enabled, t) !== !1 && t.state.data === void 0 && !(t.state.status === "error" && e.retryOnMount === !1);
|
|
943
|
+
}
|
|
944
|
+
function rt(t, e) {
|
|
945
|
+
return Nt(t, e) || t.state.data !== void 0 && G(t, e, e.refetchOnMount);
|
|
946
|
+
}
|
|
947
|
+
function G(t, e, s) {
|
|
948
|
+
if (w(e.enabled, t) !== !1) {
|
|
949
|
+
const r = typeof s == "function" ? s(t) : s;
|
|
950
|
+
return r === "always" || r !== !1 && Z(t, e);
|
|
951
|
+
}
|
|
952
|
+
return !1;
|
|
953
|
+
}
|
|
954
|
+
function nt(t, e, s, r) {
|
|
955
|
+
return (t !== e || w(r.enabled, t) === !1) && (!s.suspense || t.state.status !== "error") && Z(t, s);
|
|
956
|
+
}
|
|
957
|
+
function Z(t, e) {
|
|
958
|
+
return w(e.enabled, t) !== !1 && t.isStaleByTime(A(e.staleTime, t));
|
|
959
|
+
}
|
|
960
|
+
function Lt(t, e) {
|
|
961
|
+
return !_(t.getCurrentResult(), e);
|
|
962
|
+
}
|
|
963
|
+
var yt = S.createContext(
|
|
964
|
+
void 0
|
|
965
|
+
), vt = (t) => {
|
|
966
|
+
const e = S.useContext(yt);
|
|
967
|
+
if (t)
|
|
968
|
+
return t;
|
|
969
|
+
if (!e)
|
|
970
|
+
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
971
|
+
return e;
|
|
972
|
+
}, Fe = ({
|
|
973
|
+
client: t,
|
|
974
|
+
children: e
|
|
975
|
+
}) => (S.useEffect(() => (t.mount(), () => {
|
|
976
|
+
t.unmount();
|
|
977
|
+
}), [t]), /* @__PURE__ */ Ct.jsx(yt.Provider, { value: t, children: e })), gt = S.createContext(!1), Mt = () => S.useContext(gt);
|
|
978
|
+
gt.Provider;
|
|
979
|
+
function _t() {
|
|
980
|
+
let t = !1;
|
|
981
|
+
return {
|
|
982
|
+
clearReset: () => {
|
|
983
|
+
t = !1;
|
|
984
|
+
},
|
|
985
|
+
reset: () => {
|
|
986
|
+
t = !0;
|
|
987
|
+
},
|
|
988
|
+
isReset: () => t
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
var Ht = S.createContext(_t()), Kt = () => S.useContext(Ht);
|
|
992
|
+
function Bt(t, e) {
|
|
993
|
+
return typeof t == "function" ? t(...e) : !!t;
|
|
994
|
+
}
|
|
995
|
+
function it() {
|
|
996
|
+
}
|
|
997
|
+
var Gt = (t, e) => {
|
|
998
|
+
(t.suspense || t.throwOnError || t.experimental_prefetchInRender) && (e.isReset() || (t.retryOnMount = !1));
|
|
999
|
+
}, zt = (t) => {
|
|
1000
|
+
S.useEffect(() => {
|
|
1001
|
+
t.clearReset();
|
|
1002
|
+
}, [t]);
|
|
1003
|
+
}, $t = ({
|
|
1004
|
+
result: t,
|
|
1005
|
+
errorResetBoundary: e,
|
|
1006
|
+
throwOnError: s,
|
|
1007
|
+
query: r,
|
|
1008
|
+
suspense: n
|
|
1009
|
+
}) => t.isError && !e.isReset() && !t.isFetching && r && (n && t.data === void 0 || Bt(s, [t.error, r])), Vt = (t, e) => e.state.data === void 0, Jt = (t) => {
|
|
1010
|
+
const e = t.staleTime;
|
|
1011
|
+
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)));
|
|
1012
|
+
}, Zt = (t, e) => t.isLoading && t.isFetching && !e, Wt = (t, e) => t?.suspense && e.isPending, at = (t, e, s) => e.fetchOptimistic(t).catch(() => {
|
|
1013
|
+
s.clearReset();
|
|
1014
|
+
});
|
|
1015
|
+
function mt(t, e, s) {
|
|
1016
|
+
if (process.env.NODE_ENV !== "production" && (typeof t != "object" || Array.isArray(t)))
|
|
1017
|
+
throw new Error(
|
|
1018
|
+
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
|
1019
|
+
);
|
|
1020
|
+
const r = vt(s), n = Mt(), i = Kt(), o = r.defaultQueryOptions(t);
|
|
1021
|
+
r.getDefaultOptions().queries?._experimental_beforeQuery?.(
|
|
1022
|
+
o
|
|
1023
|
+
), process.env.NODE_ENV !== "production" && (o.queryFn || console.error(
|
|
1024
|
+
`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
|
|
1025
|
+
)), o._optimisticResults = n ? "isRestoring" : "optimistic", Jt(o), Gt(o, i), zt(i);
|
|
1026
|
+
const a = !r.getQueryCache().get(o.queryHash), [u] = S.useState(
|
|
1027
|
+
() => new e(
|
|
1028
|
+
r,
|
|
1029
|
+
o
|
|
1030
|
+
)
|
|
1031
|
+
), f = u.getOptimisticResult(o), c = !n && t.subscribed !== !1;
|
|
1032
|
+
if (S.useSyncExternalStore(
|
|
1033
|
+
S.useCallback(
|
|
1034
|
+
(d) => {
|
|
1035
|
+
const l = c ? u.subscribe(J.batchCalls(d)) : it;
|
|
1036
|
+
return u.updateResult(), l;
|
|
1037
|
+
},
|
|
1038
|
+
[u, c]
|
|
1039
|
+
),
|
|
1040
|
+
() => u.getCurrentResult(),
|
|
1041
|
+
() => u.getCurrentResult()
|
|
1042
|
+
), S.useEffect(() => {
|
|
1043
|
+
u.setOptions(o);
|
|
1044
|
+
}, [o, u]), Wt(o, f))
|
|
1045
|
+
throw at(o, u, i);
|
|
1046
|
+
if ($t({
|
|
1047
|
+
result: f,
|
|
1048
|
+
errorResetBoundary: i,
|
|
1049
|
+
throwOnError: o.throwOnError,
|
|
1050
|
+
query: r.getQueryCache().get(o.queryHash),
|
|
1051
|
+
suspense: o.suspense
|
|
1052
|
+
}))
|
|
1053
|
+
throw f.error;
|
|
1054
|
+
return r.getDefaultOptions().queries?._experimental_afterQuery?.(
|
|
1055
|
+
o,
|
|
1056
|
+
f
|
|
1057
|
+
), o.experimental_prefetchInRender && !C && Zt(f, n) && (a ? (
|
|
1058
|
+
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
1059
|
+
at(o, u, i)
|
|
1060
|
+
) : (
|
|
1061
|
+
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
1062
|
+
r.getQueryCache().get(o.queryHash)?.promise
|
|
1063
|
+
))?.catch(it).finally(() => {
|
|
1064
|
+
u.updateResult();
|
|
1065
|
+
}), o.notifyOnChangeProps ? f : u.trackResult(f);
|
|
1066
|
+
}
|
|
1067
|
+
function Yt(t, e) {
|
|
1068
|
+
return mt(t, pt, e);
|
|
1069
|
+
}
|
|
1070
|
+
function Xt(t, e) {
|
|
1071
|
+
return process.env.NODE_ENV !== "production" && t.queryFn === k && console.error("skipToken is not allowed for useSuspenseQuery"), mt(
|
|
1072
|
+
{
|
|
1073
|
+
...t,
|
|
1074
|
+
enabled: !0,
|
|
1075
|
+
suspense: !0,
|
|
1076
|
+
throwOnError: Vt,
|
|
1077
|
+
placeholderData: void 0
|
|
1078
|
+
},
|
|
1079
|
+
pt,
|
|
1080
|
+
e
|
|
1081
|
+
);
|
|
1082
|
+
}
|
|
1083
|
+
const te = /^(\w+:\/\/[^/?]+)?([^?]*)(\?.*)?$/, ee = (t) => t.filter(
|
|
1084
|
+
(e) => e != null && e !== !1 && (typeof e == "string" || typeof e == "number")
|
|
1085
|
+
).map((e) => `${e}`).filter((e) => e), se = (t) => {
|
|
1086
|
+
const e = t.join("/"), [, s = "", r = ""] = e.match(te) ?? [];
|
|
1087
|
+
return {
|
|
1088
|
+
prefix: s,
|
|
1089
|
+
pathname: r.split("/").filter((n) => n !== "")
|
|
1090
|
+
};
|
|
1091
|
+
}, re = (t) => {
|
|
1092
|
+
const { prefix: e, pathname: s } = t;
|
|
1093
|
+
let r = e;
|
|
1094
|
+
return s.length > 0 ? (r ? r += "/" : r = "/", r += s.join("/")) : r || (r = "/"), r;
|
|
1095
|
+
}, F = (...t) => {
|
|
1096
|
+
const e = ee(t), s = se(e);
|
|
1097
|
+
return re(s);
|
|
1098
|
+
}, bt = Object.freeze({
|
|
1099
|
+
API_IDENTITIES: ["api-identities"]
|
|
1100
|
+
}), Ie = () => {
|
|
1101
|
+
const t = vt();
|
|
1102
|
+
return {
|
|
1103
|
+
invalidateCache: async (e) => {
|
|
1104
|
+
await t.invalidateQueries({ queryKey: bt[e] });
|
|
1105
|
+
}
|
|
1106
|
+
};
|
|
1107
|
+
}, Pe = "no-dehydrate", W = (t, e) => {
|
|
1108
|
+
for (const s of t) {
|
|
1109
|
+
const r = Y(s, e);
|
|
1110
|
+
if (r !== void 0) return r;
|
|
1111
|
+
}
|
|
1112
|
+
}, Y = (t, e, s = []) => {
|
|
1113
|
+
const r = e(t, s);
|
|
1114
|
+
if (r !== void 0) return r;
|
|
1115
|
+
if (t.type === "category")
|
|
1116
|
+
for (const n of t.items) {
|
|
1117
|
+
const i = Y(n, e, [
|
|
1118
|
+
...s,
|
|
1119
|
+
t
|
|
1120
|
+
]);
|
|
1121
|
+
if (i !== void 0) return i;
|
|
1122
|
+
}
|
|
1123
|
+
}, Te = () => {
|
|
1124
|
+
const t = x(), { navigation: e } = St();
|
|
1125
|
+
return W(e, (s) => {
|
|
1126
|
+
if (s.type === "doc" && F(s.path) === t.pathname)
|
|
1127
|
+
return s;
|
|
1128
|
+
});
|
|
1129
|
+
}, De = (t) => {
|
|
1130
|
+
const e = x();
|
|
1131
|
+
return Y(t, (s) => {
|
|
1132
|
+
if (s.type === "category" && s.link && F(s.link.path) === e.pathname || s.type === "doc" && F(s.path) === e.pathname)
|
|
1133
|
+
return !0;
|
|
1134
|
+
});
|
|
1135
|
+
}, Ae = () => {
|
|
1136
|
+
const t = x().pathname, { navigation: e } = St();
|
|
1137
|
+
let s, r, n = !1;
|
|
1138
|
+
return W(e, (i) => {
|
|
1139
|
+
const o = i.type === "doc" ? F(i.path) : i.type === "category" && i.link ? F(i.link.path) : void 0;
|
|
1140
|
+
if (o) {
|
|
1141
|
+
if (n)
|
|
1142
|
+
return r = { label: i.label, id: o }, !0;
|
|
1143
|
+
t === o ? n = !0 : s = { label: i.label, id: o };
|
|
1144
|
+
}
|
|
1145
|
+
}), { prev: s, next: r };
|
|
1146
|
+
}, ke = Ft(
|
|
1147
|
+
"relative flex items-center gap-2 px-(--padding-nav-item) my-0.5 py-1.5 rounded-lg hover:bg-accent tabular-nums",
|
|
1148
|
+
{
|
|
1149
|
+
variants: {
|
|
1150
|
+
isActive: {
|
|
1151
|
+
true: "bg-accent font-medium",
|
|
1152
|
+
false: "text-foreground/80"
|
|
1153
|
+
},
|
|
1154
|
+
isMuted: {
|
|
1155
|
+
true: "text-foreground/30",
|
|
1156
|
+
false: ""
|
|
1157
|
+
},
|
|
1158
|
+
isPending: {
|
|
1159
|
+
true: "bg-accent animate-pulse",
|
|
1160
|
+
false: ""
|
|
1161
|
+
}
|
|
1162
|
+
},
|
|
1163
|
+
defaultVariants: {
|
|
1164
|
+
isActive: !1
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
), xe = (t) => (e) => e.display === "hide" || !e.label ? !1 : e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", ne = Rt(
|
|
1168
|
+
void 0
|
|
1169
|
+
), X = () => {
|
|
1170
|
+
const t = Et(ne);
|
|
1171
|
+
if (!t)
|
|
1172
|
+
throw new Error("useZudoku must be used within a ZudokuProvider.");
|
|
1173
|
+
return t;
|
|
1174
|
+
}, je = () => {
|
|
1175
|
+
const { getApiIdentities: t } = X();
|
|
1176
|
+
return Yt({
|
|
1177
|
+
queryFn: t,
|
|
1178
|
+
queryKey: bt.API_IDENTITIES
|
|
1179
|
+
});
|
|
1180
|
+
}, U = (t) => {
|
|
1181
|
+
switch (t.type) {
|
|
1182
|
+
case "doc":
|
|
1183
|
+
return F(t.path);
|
|
1184
|
+
case "category":
|
|
1185
|
+
return t.link ? F(t.link.path) : void 0;
|
|
1186
|
+
case "link":
|
|
1187
|
+
return t.to;
|
|
1188
|
+
case "custom-page":
|
|
1189
|
+
return t.path;
|
|
1190
|
+
default:
|
|
1191
|
+
return;
|
|
1192
|
+
}
|
|
1193
|
+
}, St = () => {
|
|
1194
|
+
const { getPluginNavigation: t, navigation: e, options: s } = X(), r = x(), n = de(), i = s.protectedRoutes?.some(
|
|
1195
|
+
(c) => j(c, r.pathname)
|
|
1196
|
+
), o = W(e, (c, d) => {
|
|
1197
|
+
if (U(c) === r.pathname)
|
|
1198
|
+
return d.at(0) ?? c;
|
|
1199
|
+
}), { data: a } = Xt({
|
|
1200
|
+
queryFn: () => t(r.pathname),
|
|
1201
|
+
queryKey: ["plugin-navigation", r.pathname]
|
|
1202
|
+
});
|
|
1203
|
+
let u = o;
|
|
1204
|
+
if (!o && a.length > 0) {
|
|
1205
|
+
const c = a.flatMap((d) => U(d)?.split("?").at(0)?.split("#").at(0) ?? []);
|
|
1206
|
+
u = e.flatMap((d) => {
|
|
1207
|
+
const l = U(d);
|
|
1208
|
+
return l ? [{ item: d, path: l }] : [];
|
|
1209
|
+
}).sort((d, l) => l.path.length - d.path.length).find(({ path: d }) => c.some(
|
|
1210
|
+
(l) => j({ path: d, end: !1 }, l) ?? j({ path: l, end: !1 }, d)
|
|
1211
|
+
))?.item;
|
|
1212
|
+
}
|
|
1213
|
+
return {
|
|
1214
|
+
navigation: n.isAuthEnabled && !n.isAuthenticated && i ? [] : [...o?.type === "category" ? o.items : [], ...a],
|
|
1215
|
+
topNavItem: u
|
|
1216
|
+
};
|
|
1217
|
+
}, ot = (t) => {
|
|
1218
|
+
let e;
|
|
1219
|
+
const s = /* @__PURE__ */ new Set(), r = (f, c) => {
|
|
1220
|
+
const d = typeof f == "function" ? f(e) : f;
|
|
1221
|
+
if (!Object.is(d, e)) {
|
|
1222
|
+
const l = e;
|
|
1223
|
+
e = c ?? (typeof d != "object" || d === null) ? d : Object.assign({}, e, d), s.forEach((g) => g(e, l));
|
|
1224
|
+
}
|
|
1225
|
+
}, n = () => e, a = { setState: r, getState: n, getInitialState: () => u, subscribe: (f) => (s.add(f), () => s.delete(f)) }, u = e = t(r, n, a);
|
|
1226
|
+
return a;
|
|
1227
|
+
}, ie = (t) => t ? ot(t) : ot, ae = (t) => t;
|
|
1228
|
+
function oe(t, e = ae) {
|
|
1229
|
+
const s = tt.useSyncExternalStore(
|
|
1230
|
+
t.subscribe,
|
|
1231
|
+
() => e(t.getState()),
|
|
1232
|
+
() => e(t.getInitialState())
|
|
1233
|
+
);
|
|
1234
|
+
return tt.useDebugValue(s), s;
|
|
1235
|
+
}
|
|
1236
|
+
const ue = (t) => {
|
|
1237
|
+
const e = ie(t), s = (r) => oe(e, r);
|
|
1238
|
+
return Object.assign(s, e), s;
|
|
1239
|
+
}, ce = (t) => ue;
|
|
1240
|
+
function wt(t, e) {
|
|
1241
|
+
let s;
|
|
1242
|
+
try {
|
|
1243
|
+
s = t();
|
|
1244
|
+
} catch {
|
|
1245
|
+
return;
|
|
1246
|
+
}
|
|
1247
|
+
return {
|
|
1248
|
+
getItem: (n) => {
|
|
1249
|
+
var i;
|
|
1250
|
+
const o = (u) => u === null ? null : JSON.parse(u, void 0), a = (i = s.getItem(n)) != null ? i : null;
|
|
1251
|
+
return a instanceof Promise ? a.then(o) : o(a);
|
|
1252
|
+
},
|
|
1253
|
+
setItem: (n, i) => s.setItem(n, JSON.stringify(i, void 0)),
|
|
1254
|
+
removeItem: (n) => s.removeItem(n)
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
const z = (t) => (e) => {
|
|
1258
|
+
try {
|
|
1259
|
+
const s = t(e);
|
|
1260
|
+
return s instanceof Promise ? s : {
|
|
1261
|
+
then(r) {
|
|
1262
|
+
return z(r)(s);
|
|
1263
|
+
},
|
|
1264
|
+
catch(r) {
|
|
1265
|
+
return this;
|
|
1266
|
+
}
|
|
1267
|
+
};
|
|
1268
|
+
} catch (s) {
|
|
1269
|
+
return {
|
|
1270
|
+
then(r) {
|
|
1271
|
+
return this;
|
|
1272
|
+
},
|
|
1273
|
+
catch(r) {
|
|
1274
|
+
return z(r)(s);
|
|
1275
|
+
}
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
}, he = (t, e) => (s, r, n) => {
|
|
1279
|
+
let i = {
|
|
1280
|
+
storage: wt(() => localStorage),
|
|
1281
|
+
partialize: (h) => h,
|
|
1282
|
+
version: 0,
|
|
1283
|
+
merge: (h, m) => ({
|
|
1284
|
+
...m,
|
|
1285
|
+
...h
|
|
1286
|
+
}),
|
|
1287
|
+
...e
|
|
1288
|
+
}, o = !1;
|
|
1289
|
+
const a = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Set();
|
|
1290
|
+
let f = i.storage;
|
|
1291
|
+
if (!f)
|
|
1292
|
+
return t(
|
|
1293
|
+
(...h) => {
|
|
1294
|
+
console.warn(
|
|
1295
|
+
`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`
|
|
1296
|
+
), s(...h);
|
|
1297
|
+
},
|
|
1298
|
+
r,
|
|
1299
|
+
n
|
|
1300
|
+
);
|
|
1301
|
+
const c = () => {
|
|
1302
|
+
const h = i.partialize({ ...r() });
|
|
1303
|
+
return f.setItem(i.name, {
|
|
1304
|
+
state: h,
|
|
1305
|
+
version: i.version
|
|
1306
|
+
});
|
|
1307
|
+
}, d = n.setState;
|
|
1308
|
+
n.setState = (h, m) => {
|
|
1309
|
+
d(h, m), c();
|
|
1310
|
+
};
|
|
1311
|
+
const l = t(
|
|
1312
|
+
(...h) => {
|
|
1313
|
+
s(...h), c();
|
|
1314
|
+
},
|
|
1315
|
+
r,
|
|
1316
|
+
n
|
|
1317
|
+
);
|
|
1318
|
+
n.getInitialState = () => l;
|
|
1319
|
+
let g;
|
|
1320
|
+
const R = () => {
|
|
1321
|
+
var h, m;
|
|
1322
|
+
if (!f) return;
|
|
1323
|
+
o = !1, a.forEach((p) => {
|
|
1324
|
+
var y;
|
|
1325
|
+
return p((y = r()) != null ? y : l);
|
|
1326
|
+
});
|
|
1327
|
+
const v = ((m = i.onRehydrateStorage) == null ? void 0 : m.call(i, (h = r()) != null ? h : l)) || void 0;
|
|
1328
|
+
return z(f.getItem.bind(f))(i.name).then((p) => {
|
|
1329
|
+
if (p)
|
|
1330
|
+
if (typeof p.version == "number" && p.version !== i.version) {
|
|
1331
|
+
if (i.migrate) {
|
|
1332
|
+
const y = i.migrate(
|
|
1333
|
+
p.state,
|
|
1334
|
+
p.version
|
|
1335
|
+
);
|
|
1336
|
+
return y instanceof Promise ? y.then((E) => [!0, E]) : [!0, y];
|
|
1337
|
+
}
|
|
1338
|
+
console.error(
|
|
1339
|
+
"State loaded from storage couldn't be migrated since no migrate function was provided"
|
|
1340
|
+
);
|
|
1341
|
+
} else
|
|
1342
|
+
return [!1, p.state];
|
|
1343
|
+
return [!1, void 0];
|
|
1344
|
+
}).then((p) => {
|
|
1345
|
+
var y;
|
|
1346
|
+
const [E, I] = p;
|
|
1347
|
+
if (g = i.merge(
|
|
1348
|
+
I,
|
|
1349
|
+
(y = r()) != null ? y : l
|
|
1350
|
+
), s(g, !0), E)
|
|
1351
|
+
return c();
|
|
1352
|
+
}).then(() => {
|
|
1353
|
+
v?.(g, void 0), g = r(), o = !0, u.forEach((p) => p(g));
|
|
1354
|
+
}).catch((p) => {
|
|
1355
|
+
v?.(void 0, p);
|
|
1356
|
+
});
|
|
1357
|
+
};
|
|
1358
|
+
return n.persist = {
|
|
1359
|
+
setOptions: (h) => {
|
|
1360
|
+
i = {
|
|
1361
|
+
...i,
|
|
1362
|
+
...h
|
|
1363
|
+
}, h.storage && (f = h.storage);
|
|
1364
|
+
},
|
|
1365
|
+
clearStorage: () => {
|
|
1366
|
+
f?.removeItem(i.name);
|
|
1367
|
+
},
|
|
1368
|
+
getOptions: () => i,
|
|
1369
|
+
rehydrate: () => R(),
|
|
1370
|
+
hasHydrated: () => o,
|
|
1371
|
+
onHydrate: (h) => (a.add(h), () => {
|
|
1372
|
+
a.delete(h);
|
|
1373
|
+
}),
|
|
1374
|
+
onFinishHydration: (h) => (u.add(h), () => {
|
|
1375
|
+
u.delete(h);
|
|
1376
|
+
})
|
|
1377
|
+
}, i.skipHydration || R(), g || l;
|
|
1378
|
+
}, le = he, fe = (t) => {
|
|
1379
|
+
const e = (s) => {
|
|
1380
|
+
s.key === t.persist.getOptions().name && s.newValue && t.persist.rehydrate();
|
|
1381
|
+
};
|
|
1382
|
+
return window.addEventListener("storage", e), () => {
|
|
1383
|
+
window.removeEventListener("storage", e);
|
|
1384
|
+
};
|
|
1385
|
+
}, Ot = ce()(
|
|
1386
|
+
le(
|
|
1387
|
+
(t) => ({
|
|
1388
|
+
isAuthenticated: !1,
|
|
1389
|
+
isPending: !0,
|
|
1390
|
+
profile: null,
|
|
1391
|
+
providerData: null,
|
|
1392
|
+
setAuthenticationPending: () => t(() => ({
|
|
1393
|
+
isAuthenticated: !1,
|
|
1394
|
+
isPending: !1,
|
|
1395
|
+
profile: null,
|
|
1396
|
+
providerData: null
|
|
1397
|
+
})),
|
|
1398
|
+
setLoggedOut: () => t(() => ({
|
|
1399
|
+
isAuthenticated: !1,
|
|
1400
|
+
isPending: !1,
|
|
1401
|
+
profile: null,
|
|
1402
|
+
providerData: null
|
|
1403
|
+
})),
|
|
1404
|
+
setLoggedIn: ({
|
|
1405
|
+
profile: e,
|
|
1406
|
+
providerData: s
|
|
1407
|
+
}) => t(() => ({
|
|
1408
|
+
isAuthenticated: !0,
|
|
1409
|
+
isPending: !1,
|
|
1410
|
+
profile: e,
|
|
1411
|
+
providerData: s
|
|
1412
|
+
}))
|
|
1413
|
+
}),
|
|
1414
|
+
{
|
|
1415
|
+
merge: (t, e) => ({
|
|
1416
|
+
...e,
|
|
1417
|
+
isPending: !1,
|
|
1418
|
+
...typeof t == "object" ? t : {}
|
|
1419
|
+
}),
|
|
1420
|
+
name: "auth-state",
|
|
1421
|
+
storage: wt(() => localStorage)
|
|
1422
|
+
}
|
|
1423
|
+
)
|
|
1424
|
+
);
|
|
1425
|
+
typeof window < "u" && fe(Ot);
|
|
1426
|
+
const de = () => {
|
|
1427
|
+
const { authentication: t } = X(), e = Ot(), s = typeof t < "u";
|
|
1428
|
+
return {
|
|
1429
|
+
isAuthEnabled: s,
|
|
1430
|
+
...e,
|
|
1431
|
+
login: async () => {
|
|
1432
|
+
if (!s)
|
|
1433
|
+
throw new Error("Authentication is not enabled.");
|
|
1434
|
+
await t.signIn({
|
|
1435
|
+
redirectTo: window.location.href
|
|
1436
|
+
});
|
|
1437
|
+
},
|
|
1438
|
+
logout: async () => {
|
|
1439
|
+
if (!s)
|
|
1440
|
+
throw new Error("Authentication is not enabled.");
|
|
1441
|
+
await t.signOut(), window.location.href = "/";
|
|
1442
|
+
},
|
|
1443
|
+
signup: async () => {
|
|
1444
|
+
if (!s)
|
|
1445
|
+
throw new Error("Authentication is not enabled.");
|
|
1446
|
+
await t.signUp({
|
|
1447
|
+
redirectTo: window.location.href
|
|
1448
|
+
});
|
|
1449
|
+
}
|
|
1450
|
+
};
|
|
1451
|
+
};
|
|
1452
|
+
export {
|
|
1453
|
+
Ee as A,
|
|
1454
|
+
Re as B,
|
|
1455
|
+
bt as C,
|
|
1456
|
+
ct as D,
|
|
1457
|
+
ht as E,
|
|
1458
|
+
A as F,
|
|
1459
|
+
be as G,
|
|
1460
|
+
V as H,
|
|
1461
|
+
k as I,
|
|
1462
|
+
Fe as J,
|
|
1463
|
+
xe as K,
|
|
1464
|
+
St as L,
|
|
1465
|
+
Y as M,
|
|
1466
|
+
Pe as N,
|
|
1467
|
+
xt as O,
|
|
1468
|
+
De as P,
|
|
1469
|
+
Ce as Q,
|
|
1470
|
+
Ut as R,
|
|
1471
|
+
$ as S,
|
|
1472
|
+
ke as T,
|
|
1473
|
+
ie as U,
|
|
1474
|
+
oe as V,
|
|
1475
|
+
ne as Z,
|
|
1476
|
+
Te as a,
|
|
1477
|
+
Ae as b,
|
|
1478
|
+
Xt as c,
|
|
1479
|
+
X as d,
|
|
1480
|
+
de as e,
|
|
1481
|
+
Ie as f,
|
|
1482
|
+
vt as g,
|
|
1483
|
+
L as h,
|
|
1484
|
+
it as i,
|
|
1485
|
+
F as j,
|
|
1486
|
+
Bt as k,
|
|
1487
|
+
Yt as l,
|
|
1488
|
+
Oe as m,
|
|
1489
|
+
J as n,
|
|
1490
|
+
ce as o,
|
|
1491
|
+
le as p,
|
|
1492
|
+
wt as q,
|
|
1493
|
+
je as r,
|
|
1494
|
+
_ as s,
|
|
1495
|
+
W as t,
|
|
1496
|
+
Ot as u,
|
|
1497
|
+
It as v,
|
|
1498
|
+
Se as w,
|
|
1499
|
+
we as x,
|
|
1500
|
+
Q as y,
|
|
1501
|
+
Tt as z
|
|
1502
|
+
};
|
|
1503
|
+
//# sourceMappingURL=hook-Bd0yS8M0.js.map
|