zudoku 0.0.0-f42e3678 → 0.0.0-f46233e4
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 +32 -12
- package/cli.js +1 -0
- package/dist/app/ZuploBuildConfig.d.ts +1 -1
- package/dist/app/ZuploBuildConfig.js +1 -1
- package/dist/app/ZuploBuildConfig.js.map +1 -1
- package/dist/app/demo.js +1 -1
- package/dist/app/entry.client.js +6 -5
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.js +3 -3
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/env.js +6 -6
- package/dist/app/env.js.map +1 -1
- package/dist/app/main.d.ts +1 -1
- package/dist/app/main.js +12 -6
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +5 -2
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/cli.d.ts +9 -0
- package/dist/cli/cli.js +5 -10
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.d.ts +1 -1
- package/dist/cli/cmds/dev.d.ts +1 -1
- package/dist/cli/cmds/preview.d.ts +1 -1
- package/dist/cli/common/analytics/lib.js +1 -1
- package/dist/cli/common/analytics/lib.js.map +1 -1
- package/dist/cli/common/logger.js +0 -1
- package/dist/cli/common/logger.js.map +1 -1
- package/dist/cli/common/machine-id/lib.js +3 -2
- package/dist/cli/common/machine-id/lib.js.map +1 -1
- package/dist/cli/common/outdated.js +2 -1
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/cli/common/output.js +2 -3
- package/dist/cli/common/output.js.map +1 -1
- package/dist/cli/common/utils/box.js +2 -2
- package/dist/cli/common/utils/box.js.map +1 -1
- package/dist/cli/common/validators/lib.js +1 -1
- package/dist/cli/common/validators/lib.js.map +1 -1
- package/dist/cli/common/version-check.d.ts +2 -0
- package/dist/cli/common/version-check.js +58 -0
- package/dist/cli/common/version-check.js.map +1 -0
- package/dist/cli/dev/handler.js +0 -4
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/codegen.js +2 -2
- package/dist/codegen.js.map +1 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/BuildSchema.d.ts +11 -4
- package/dist/config/validators/BuildSchema.js +17 -3
- package/dist/config/validators/BuildSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.d.ts +194 -68
- package/dist/config/validators/InputNavigationSchema.js +6 -2
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js +2 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -1
- package/dist/config/validators/NavigationSchema.d.ts +1 -1
- package/dist/config/validators/NavigationSchema.js +5 -3
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +6 -5
- package/dist/config/validators/ProtectedRoutesSchema.js +5 -14
- package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -1
- package/dist/config/validators/auth.d.ts +2 -2
- package/dist/config/validators/auth.js +1 -1
- package/dist/config/validators/auth.js.map +1 -1
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +28 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +57 -30
- package/dist/config/validators/validate.js +26 -3
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/config/validators/validate.test.js +1 -2
- package/dist/config/validators/validate.test.js.map +1 -1
- package/dist/flat-config.d.ts +26 -2
- package/dist/index.d.ts +6 -5
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/MissingIcon.d.ts +1 -1
- package/dist/lib/MissingIcon.js.map +1 -1
- package/dist/lib/assets/language-icons/c.d.ts +3 -0
- package/dist/lib/assets/language-icons/c.js +4 -0
- package/dist/lib/assets/language-icons/c.js.map +1 -0
- package/dist/lib/assets/language-icons/commonlisp.d.ts +3 -0
- package/dist/lib/assets/language-icons/commonlisp.js +4 -0
- package/dist/lib/assets/language-icons/commonlisp.js.map +1 -0
- package/dist/lib/assets/language-icons/cpp.d.ts +3 -0
- package/dist/lib/assets/language-icons/cpp.js +4 -0
- package/dist/lib/assets/language-icons/cpp.js.map +1 -0
- package/dist/lib/assets/language-icons/csharp.d.ts +3 -0
- package/dist/lib/assets/language-icons/csharp.js +4 -0
- package/dist/lib/assets/language-icons/csharp.js.map +1 -0
- package/dist/lib/assets/language-icons/css.d.ts +3 -0
- package/dist/lib/assets/language-icons/css.js +4 -0
- package/dist/lib/assets/language-icons/css.js.map +1 -0
- package/dist/lib/assets/language-icons/dart.d.ts +3 -0
- package/dist/lib/assets/language-icons/dart.js +4 -0
- package/dist/lib/assets/language-icons/dart.js.map +1 -0
- package/dist/lib/assets/language-icons/elixir.d.ts +3 -0
- package/dist/lib/assets/language-icons/elixir.js +4 -0
- package/dist/lib/assets/language-icons/elixir.js.map +1 -0
- package/dist/lib/assets/language-icons/go.d.ts +3 -0
- package/dist/lib/assets/language-icons/go.js +4 -0
- package/dist/lib/assets/language-icons/go.js.map +1 -0
- package/dist/lib/assets/language-icons/graphql.d.ts +3 -0
- package/dist/lib/assets/language-icons/graphql.js +4 -0
- package/dist/lib/assets/language-icons/graphql.js.map +1 -0
- package/dist/lib/assets/language-icons/html.d.ts +3 -0
- package/dist/lib/assets/language-icons/html.js +4 -0
- package/dist/lib/assets/language-icons/html.js.map +1 -0
- package/dist/lib/assets/language-icons/java.d.ts +3 -0
- package/dist/lib/assets/language-icons/java.js +4 -0
- package/dist/lib/assets/language-icons/java.js.map +1 -0
- package/dist/lib/assets/language-icons/javascript.d.ts +3 -0
- package/dist/lib/assets/language-icons/javascript.js +4 -0
- package/dist/lib/assets/language-icons/javascript.js.map +1 -0
- package/dist/lib/assets/language-icons/json.d.ts +3 -0
- package/dist/lib/assets/language-icons/json.js +4 -0
- package/dist/lib/assets/language-icons/json.js.map +1 -0
- package/dist/lib/assets/language-icons/kotlin.d.ts +3 -0
- package/dist/lib/assets/language-icons/kotlin.js +4 -0
- package/dist/lib/assets/language-icons/kotlin.js.map +1 -0
- package/dist/lib/assets/language-icons/markdown.d.ts +3 -0
- package/dist/lib/assets/language-icons/markdown.js +4 -0
- package/dist/lib/assets/language-icons/markdown.js.map +1 -0
- package/dist/lib/assets/language-icons/mdx.d.ts +3 -0
- package/dist/lib/assets/language-icons/mdx.js +4 -0
- package/dist/lib/assets/language-icons/mdx.js.map +1 -0
- package/dist/lib/assets/language-icons/objectivec.d.ts +3 -0
- package/dist/lib/assets/language-icons/objectivec.js +4 -0
- package/dist/lib/assets/language-icons/objectivec.js.map +1 -0
- package/dist/lib/assets/language-icons/ocaml.d.ts +3 -0
- package/dist/lib/assets/language-icons/ocaml.js +4 -0
- package/dist/lib/assets/language-icons/ocaml.js.map +1 -0
- package/dist/lib/assets/language-icons/php.d.ts +3 -0
- package/dist/lib/assets/language-icons/php.js +4 -0
- package/dist/lib/assets/language-icons/php.js.map +1 -0
- package/dist/lib/assets/language-icons/powershell.d.ts +3 -0
- package/dist/lib/assets/language-icons/powershell.js +4 -0
- package/dist/lib/assets/language-icons/powershell.js.map +1 -0
- package/dist/lib/assets/language-icons/python.d.ts +3 -0
- package/dist/lib/assets/language-icons/python.js +4 -0
- package/dist/lib/assets/language-icons/python.js.map +1 -0
- package/dist/lib/assets/language-icons/react.d.ts +3 -0
- package/dist/lib/assets/language-icons/react.js +4 -0
- package/dist/lib/assets/language-icons/react.js.map +1 -0
- package/dist/lib/assets/language-icons/ruby.d.ts +3 -0
- package/dist/lib/assets/language-icons/ruby.js +4 -0
- package/dist/lib/assets/language-icons/ruby.js.map +1 -0
- package/dist/lib/assets/language-icons/rust.d.ts +3 -0
- package/dist/lib/assets/language-icons/rust.js +4 -0
- package/dist/lib/assets/language-icons/rust.js.map +1 -0
- package/dist/lib/assets/language-icons/scala.d.ts +3 -0
- package/dist/lib/assets/language-icons/scala.js +4 -0
- package/dist/lib/assets/language-icons/scala.js.map +1 -0
- package/dist/lib/assets/language-icons/shell.d.ts +3 -0
- package/dist/lib/assets/language-icons/shell.js +4 -0
- package/dist/lib/assets/language-icons/shell.js.map +1 -0
- package/dist/lib/assets/language-icons/swift.d.ts +3 -0
- package/dist/lib/assets/language-icons/swift.js +4 -0
- package/dist/lib/assets/language-icons/swift.js.map +1 -0
- package/dist/lib/assets/language-icons/toml.d.ts +3 -0
- package/dist/lib/assets/language-icons/toml.js +4 -0
- package/dist/lib/assets/language-icons/toml.js.map +1 -0
- package/dist/lib/assets/language-icons/typescript.d.ts +3 -0
- package/dist/lib/assets/language-icons/typescript.js +4 -0
- package/dist/lib/assets/language-icons/typescript.js.map +1 -0
- package/dist/lib/assets/language-icons/xml.d.ts +3 -0
- package/dist/lib/assets/language-icons/xml.js +4 -0
- package/dist/lib/assets/language-icons/xml.js.map +1 -0
- package/dist/lib/assets/language-icons/yaml.d.ts +3 -0
- package/dist/lib/assets/language-icons/yaml.js +4 -0
- package/dist/lib/assets/language-icons/yaml.js.map +1 -0
- package/dist/lib/assets/language-icons/zig.d.ts +3 -0
- package/dist/lib/assets/language-icons/zig.js +4 -0
- package/dist/lib/assets/language-icons/zig.js.map +1 -0
- package/dist/lib/auth/issuer.test.js +1 -0
- package/dist/lib/auth/issuer.test.js.map +1 -1
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +1 -1
- package/dist/lib/authentication/authentication.d.ts +1 -3
- package/dist/lib/authentication/components/OAuthErrorPage.d.ts +1 -1
- package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +1 -1
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/authentication/providers/auth0.d.ts +2 -2
- package/dist/lib/authentication/providers/auth0.js +1 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.d.ts +2 -2
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.d.ts +2 -2
- package/dist/lib/authentication/providers/openid.d.ts +2 -2
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase.d.ts +2 -2
- package/dist/lib/authentication/providers/supabase.js +1 -0
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/authentication/state.d.ts +5 -3
- package/dist/lib/authentication/use-broadcast/shared.d.ts +1 -1
- package/dist/lib/authentication/use-broadcast/shared.js +3 -3
- package/dist/lib/authentication/use-broadcast/shared.js.map +1 -1
- package/dist/lib/authentication/use-broadcast/useBroadcast.js +2 -2
- package/dist/lib/authentication/use-broadcast/useBroadcast.js.map +1 -1
- package/dist/lib/components/Autocomplete.js.map +1 -1
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/BuildCheck.d.ts +2 -1
- package/dist/lib/components/BuildCheck.js +13 -6
- package/dist/lib/components/BuildCheck.js.map +1 -1
- package/dist/lib/components/Header.js +2 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/LanguageIcon.d.ts +3 -0
- package/dist/lib/components/LanguageIcon.js +163 -0
- package/dist/lib/components/LanguageIcon.js.map +1 -0
- package/dist/lib/components/Layout.js +4 -7
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Markdown.js +2 -2
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/Meta.d.ts +2 -0
- package/dist/lib/components/Meta.js +11 -0
- package/dist/lib/components/Meta.js.map +1 -0
- package/dist/lib/components/MobileTopNavigation.js +4 -4
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/PathRenderer.js +1 -1
- package/dist/lib/components/PathRenderer.js.map +1 -1
- package/dist/lib/components/Search.js +1 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/Slot.js.map +1 -1
- package/dist/lib/components/Slot.test.js +7 -3
- package/dist/lib/components/Slot.test.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +1 -1
- package/dist/lib/components/TopNavigation.js +2 -2
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.js +2 -2
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/ComponentsContext.js.map +1 -1
- package/dist/lib/components/context/RouterEventsEmitter.js.map +1 -1
- package/dist/lib/components/context/SlotProvider.js.map +1 -1
- package/dist/lib/components/context/ViewportAnchorContext.js +1 -1
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/context/ZudokuContext.js +11 -3
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuProvider.d.ts +1 -1
- package/dist/lib/components/index.d.ts +11 -27
- package/dist/lib/components/index.js +3 -16
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js +7 -2
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +6 -5
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/NavigationWrapper.js.map +1 -1
- package/dist/lib/components/navigation/Toc.js.map +1 -1
- package/dist/lib/components/navigation/ZudokuLogo.d.ts +1 -1
- package/dist/lib/components/navigation/utils.d.ts +3 -3
- package/dist/lib/components/navigation/utils.js +12 -12
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +4 -2
- package/dist/lib/core/ZudokuContext.js +14 -3
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/__internal.d.ts +37 -0
- package/dist/lib/core/__internal.js +26 -0
- package/dist/lib/core/__internal.js.map +1 -0
- package/dist/lib/core/router.d.ts +1 -0
- package/dist/lib/core/router.js +2 -0
- package/dist/lib/core/router.js.map +1 -0
- package/dist/lib/errors/ErrorAlert.js +0 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/errors/TopLevelError.d.ts +2 -2
- package/dist/lib/errors/TopLevelError.js +1 -2
- package/dist/lib/errors/TopLevelError.js.map +1 -1
- package/dist/lib/oas/graphql/circular.js +2 -2
- package/dist/lib/oas/graphql/circular.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +22 -3
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/index.js +2 -1
- package/dist/lib/oas/parser/dereference/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/resolveRef.js +3 -3
- package/dist/lib/oas/parser/dereference/resolveRef.js.map +1 -1
- package/dist/lib/oas/parser/index.js +1 -1
- package/dist/lib/oas/parser/index.js.map +1 -1
- package/dist/lib/oas/parser/upgrade/index.js +2 -1
- package/dist/lib/oas/parser/upgrade/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.js +7 -1
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +9 -3
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKeyDialog.d.ts +11 -0
- package/dist/lib/plugins/api-keys/CreateApiKeyDialog.js +9 -0
- package/dist/lib/plugins/api-keys/CreateApiKeyDialog.js.map +1 -0
- package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +10 -16
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +11 -7
- package/dist/lib/plugins/api-keys/index.js +1 -1
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +1 -1
- package/dist/lib/plugins/custom-pages/index.js +3 -0
- package/dist/lib/plugins/custom-pages/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +4 -4
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +4 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js +2 -2
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/MCPEndpoint.d.ts +5 -0
- package/dist/lib/plugins/openapi/MCPEndpoint.js +56 -0
- package/dist/lib/plugins/openapi/MCPEndpoint.js.map +1 -0
- package/dist/lib/plugins/openapi/OasProvider.d.ts +1 -1
- package/dist/lib/plugins/openapi/OasProvider.js +1 -0
- package/dist/lib/plugins/openapi/OasProvider.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.d.ts +0 -2
- package/dist/lib/plugins/openapi/OperationList.js +22 -7
- 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 +8 -4
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.d.ts +1 -1
- package/dist/lib/plugins/openapi/ParamInfos.js +11 -9
- package/dist/lib/plugins/openapi/ParamInfos.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.d.ts +2 -2
- package/dist/lib/plugins/openapi/ParameterList.js +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.d.ts +2 -3
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -4
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -5
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.d.ts +2 -2
- package/dist/lib/plugins/openapi/RequestBodySidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.d.ts +2 -2
- package/dist/lib/plugins/openapi/Sidecar.js +4 -2
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.d.ts +2 -4
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/StaggeredRender.d.ts +1 -1
- package/dist/lib/plugins/openapi/client/GraphQLContext.d.ts +1 -1
- package/dist/lib/plugins/openapi/client/createServer.js +1 -2
- package/dist/lib/plugins/openapi/client/createServer.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/context.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/fragment-masking.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.d.ts +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js +1 -1
- package/dist/lib/plugins/openapi/graphql/gql.js.map +1 -1
- package/dist/lib/plugins/openapi/graphql/graphql.d.ts +5 -2
- package/dist/lib/plugins/openapi/graphql/graphql.js +3 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.d.ts +2 -2
- package/dist/lib/plugins/openapi/index.js +2 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +5 -4
- package/dist/lib/plugins/openapi/playground/BodyPanel.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/BodyPanel.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +3 -3
- package/dist/lib/plugins/openapi/playground/Headers.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/IdentityDialog.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/IdentitySelector.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/Playground.js +2 -2
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/rememberedIdentity.d.ts +5 -3
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js +3 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +15 -3
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +2 -2
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +1 -1
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/useRememberSkipLoginDialog.d.ts +5 -3
- package/dist/lib/plugins/openapi/processors/removeExtensions.test.js +1 -0
- package/dist/lib/plugins/openapi/processors/removeExtensions.test.js.map +1 -1
- package/dist/lib/plugins/openapi/processors/removeParameters.test.js +1 -0
- package/dist/lib/plugins/openapi/processors/removeParameters.test.js.map +1 -1
- package/dist/lib/plugins/openapi/processors/traverse.d.ts +1 -1
- package/dist/lib/plugins/openapi/processors/traverse.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.d.ts +5 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js +7 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupConnector.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/{LogicalGroup/LogicalGroupItem.d.ts → AllOfGroup/AllOfGroupItem.d.ts} +1 -3
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js +10 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupItem.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.d.ts +5 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js +16 -0
- package/dist/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.d.ts +0 -3
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js +7 -15
- package/dist/lib/plugins/openapi/schema/SchemaPropertyItem.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +16 -11
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/UnionView.d.ts +5 -0
- package/dist/lib/plugins/openapi/schema/UnionView.js +36 -0
- package/dist/lib/plugins/openapi/schema/UnionView.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/union-helpers.d.ts +28 -0
- package/dist/lib/plugins/openapi/schema/union-helpers.js +72 -0
- package/dist/lib/plugins/openapi/schema/union-helpers.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/utils.d.ts +0 -7
- package/dist/lib/plugins/openapi/schema/utils.js +0 -6
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -1
- package/dist/lib/plugins/openapi/state.d.ts +5 -3
- package/dist/lib/plugins/openapi/util/createHttpSnippet.d.ts +1 -1
- package/dist/lib/plugins/openapi/util/createHttpSnippet.js +1 -1
- package/dist/lib/plugins/openapi/util/createHttpSnippet.js.map +1 -1
- package/dist/lib/plugins/openapi/util/createNavigationCategory.js +1 -0
- package/dist/lib/plugins/openapi/util/createNavigationCategory.js.map +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.d.ts +1 -1
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js +1 -2
- package/dist/lib/plugins/openapi/util/generateSchemaExample.js.map +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js +1 -1
- package/dist/lib/plugins/openapi/util/getRoutes.js.map +1 -1
- package/dist/lib/plugins/openapi/util/methodColorMap.d.ts +1 -1
- package/dist/lib/plugins/search-inkeep/index.js +1 -1
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js +1 -1
- package/dist/lib/plugins/search-pagefind/PagefindSearch.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.d.ts +1 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js +4 -1
- package/dist/lib/plugins/search-pagefind/ResultList.js.map +1 -1
- package/dist/lib/plugins/search-pagefind/get-results.js +0 -1
- package/dist/lib/plugins/search-pagefind/get-results.js.map +1 -1
- package/dist/lib/shiki.d.ts +6 -5
- package/dist/lib/shiki.js +18 -6
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/Breadcrumb.js +1 -1
- package/dist/lib/ui/Breadcrumb.js.map +1 -1
- package/dist/lib/ui/CodeBlock.d.ts +1 -1
- package/dist/lib/ui/CodeBlock.js +5 -4
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +2 -2
- package/dist/lib/ui/Command.js +2 -6
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Dialog.js +2 -2
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/dist/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/dist/lib/ui/Form.d.ts +2 -2
- package/dist/lib/ui/Pagination.d.ts +1 -1
- package/dist/lib/ui/Pagination.js +1 -1
- package/dist/lib/ui/Pagination.js.map +1 -1
- package/dist/lib/ui/ReactComponentDoc.d.ts +20 -0
- package/dist/lib/ui/ReactComponentDoc.js +10 -0
- package/dist/lib/ui/ReactComponentDoc.js.map +1 -0
- package/dist/lib/ui/Secret.d.ts +18 -0
- package/dist/lib/ui/Secret.js +26 -0
- package/dist/lib/ui/Secret.js.map +1 -0
- package/dist/lib/ui/ToggleGroup.d.ts +1 -1
- package/dist/lib/ui/Value.d.ts +5 -0
- package/dist/lib/ui/Value.js +13 -0
- package/dist/lib/ui/Value.js.map +1 -0
- package/dist/lib/util/MdxComponents.d.ts +1 -1
- package/dist/lib/util/MdxComponents.js +5 -3
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/cn.js.map +1 -1
- package/dist/lib/util/createVariantComponent.d.ts +2 -2
- package/dist/lib/util/createVariantComponent.js.map +1 -1
- package/dist/lib/util/groupBy.js +1 -0
- package/dist/lib/util/groupBy.js.map +1 -1
- package/dist/lib/util/humanFileSize.js +1 -1
- package/dist/lib/util/humanFileSize.js.map +1 -1
- package/dist/lib/util/invariant.js +3 -1
- package/dist/lib/util/invariant.js.map +1 -1
- package/dist/lib/util/pastellize.js +4 -4
- package/dist/lib/util/pastellize.js.map +1 -1
- package/dist/lib/util/traverse.d.ts +1 -0
- package/dist/lib/util/traverse.js +25 -0
- package/dist/lib/util/traverse.js.map +1 -1
- package/dist/lib/util/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/lib/util/useScrollToAnchor.js +2 -0
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/ts.js +3 -3
- package/dist/ts.js.map +1 -1
- package/dist/vite/api/SchemaManager.js +16 -12
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/api/schema-codegen.js +60 -42
- package/dist/vite/api/schema-codegen.js.map +1 -1
- package/dist/vite/api/schema-codegen.test.js +76 -3
- package/dist/vite/api/schema-codegen.test.js.map +1 -1
- package/dist/vite/build.js +1 -1
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +6 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.js +2 -2
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/error-handler.d.ts +2 -2
- package/dist/vite/error-handler.js.map +1 -1
- package/dist/vite/llms.d.ts +28 -0
- package/dist/vite/llms.js +82 -0
- package/dist/vite/llms.js.map +1 -0
- package/dist/vite/mdx/remark-inject-filepath.d.ts +3 -0
- package/dist/vite/mdx/remark-inject-filepath.js +6 -0
- package/dist/vite/mdx/remark-inject-filepath.js.map +1 -0
- package/dist/vite/mdx/remark-last-modified.js +0 -1
- package/dist/vite/mdx/remark-last-modified.js.map +1 -1
- package/dist/vite/mdx/remark-link-rewrite.d.ts +2 -0
- package/dist/vite/mdx/remark-link-rewrite.js +20 -0
- package/dist/vite/mdx/remark-link-rewrite.js.map +1 -0
- package/dist/vite/mdx/remark-normalize-image-url.d.ts +2 -0
- package/dist/vite/mdx/remark-normalize-image-url.js +12 -0
- package/dist/vite/mdx/remark-normalize-image-url.js.map +1 -0
- package/dist/vite/{remarkStaticGeneration.d.ts → mdx/remark-static-generation.d.ts} +2 -2
- package/dist/vite/{remarkStaticGeneration.js → mdx/remark-static-generation.js} +2 -2
- package/dist/vite/mdx/remark-static-generation.js.map +1 -0
- package/dist/vite/output.d.ts +1 -1
- package/dist/vite/output.js +1 -1
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +1 -1
- package/dist/vite/plugin-api-keys.js +1 -1
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.js +7 -15
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +1 -1
- package/dist/vite/plugin-auth.js +1 -1
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +1 -1
- package/dist/vite/plugin-config-reload.d.ts +1 -1
- package/dist/vite/plugin-config.d.ts +1 -1
- package/dist/vite/plugin-config.js +2 -1
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +1 -1
- package/dist/vite/plugin-custom-pages.js +1 -1
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +9 -0
- package/dist/vite/plugin-docs.js +71 -50
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.js +1 -1
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-llms.d.ts +10 -0
- package/dist/vite/plugin-llms.js +105 -0
- package/dist/vite/plugin-llms.js.map +1 -0
- package/dist/vite/plugin-mdx.d.ts +2 -2
- package/dist/vite/plugin-mdx.js +16 -29
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-metadata.d.ts +1 -1
- package/dist/vite/plugin-navigation.d.ts +2 -2
- package/dist/vite/plugin-navigation.js +38 -35
- package/dist/vite/plugin-navigation.js.map +1 -1
- package/dist/vite/plugin-redirect.d.ts +1 -1
- package/dist/vite/plugin-redirect.js +1 -1
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +1 -1
- package/dist/vite/plugin-search.js +1 -1
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-shiki-register.js +1 -1
- package/dist/vite/plugin-shiki-register.js.map +1 -1
- package/dist/vite/plugin-theme.js +6 -6
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/plugin-theme.test.js +2 -0
- package/dist/vite/plugin-theme.test.js.map +1 -1
- package/dist/vite/plugin.d.ts +1 -1
- package/dist/vite/plugin.js +4 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender/FileWritingResponse.js +5 -3
- package/dist/vite/prerender/FileWritingResponse.js.map +1 -1
- package/dist/vite/prerender/InMemoryResponse.js +3 -1
- package/dist/vite/prerender/InMemoryResponse.js.map +1 -1
- package/dist/vite/prerender/prerender.js +24 -5
- package/dist/vite/prerender/prerender.js.map +1 -1
- package/dist/vite/prerender/worker.d.ts +1 -1
- package/dist/vite/prerender/worker.js.map +1 -1
- package/dist/vite/reporter.js +2 -2
- package/dist/vite/reporter.js.map +1 -1
- package/dist/vite/shadcn-registry.d.ts +8 -33
- package/dist/vite/sitemap.js +14 -13
- package/dist/vite/sitemap.js.map +1 -1
- package/dist/zuplo/enrich-with-zuplo-mcp.d.ts +4 -0
- package/dist/zuplo/enrich-with-zuplo-mcp.js +117 -0
- package/dist/zuplo/enrich-with-zuplo-mcp.js.map +1 -0
- package/dist/zuplo/enrich-with-zuplo.d.ts +1 -0
- package/dist/zuplo/enrich-with-zuplo.js +4 -4
- package/dist/zuplo/enrich-with-zuplo.js.map +1 -1
- package/dist/zuplo/policy-types.js +0 -1
- package/dist/zuplo/policy-types.js.map +1 -1
- package/dist/zuplo/with-zuplo-processors.js +2 -0
- package/dist/zuplo/with-zuplo-processors.js.map +1 -1
- package/dist/zuplo/with-zuplo.js +1 -1
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/{Button-B3o-2Xdf.js → Button-DmS4u8Lj.js} +2 -2
- package/lib/{Button-B3o-2Xdf.js.map → Button-DmS4u8Lj.js.map} +1 -1
- package/lib/{Card-CMDQUPM4.js → Card-KFniaZn5.js} +2 -2
- package/lib/{Card-CMDQUPM4.js.map → Card-KFniaZn5.js.map} +1 -1
- package/lib/CategoryHeading-DhmodDcq.js +17 -0
- package/lib/CategoryHeading-DhmodDcq.js.map +1 -0
- package/lib/CodeBlock-CanTUJLl.js +221 -0
- package/lib/CodeBlock-CanTUJLl.js.map +1 -0
- package/lib/{Command-BYukybsa.js → Command-CJY6q3PF.js} +22 -28
- package/lib/Command-CJY6q3PF.js.map +1 -0
- package/lib/Dialog-BOl0QB3n.js +114 -0
- package/lib/Dialog-BOl0QB3n.js.map +1 -0
- package/lib/{Drawer-DJ05s2pH.js → Drawer-Ci7XwhqT.js} +2 -2
- package/lib/{Drawer-DJ05s2pH.js.map → Drawer-Ci7XwhqT.js.map} +1 -1
- package/lib/{Slot-DAyXieeZ.js → ErrorAlert-Brvk_U1i.js} +2082 -2286
- package/lib/ErrorAlert-Brvk_U1i.js.map +1 -0
- package/lib/{MdxPage-Bsko6_kb.js → MdxPage-CGX72MLx.js} +30 -29
- package/lib/MdxPage-CGX72MLx.js.map +1 -0
- package/lib/{OAuthErrorPage-DJzGiIBt.js → OAuthErrorPage-Cv2Cy3L8.js} +8 -8
- package/lib/OAuthErrorPage-Cv2Cy3L8.js.map +1 -0
- package/lib/{OasProvider-DQQRt3oS.js → OasProvider-Doa4bJq6.js} +5 -4
- package/lib/OasProvider-Doa4bJq6.js.map +1 -0
- package/lib/{OperationList-DpmkHf26.js → OperationList-B6v941u4.js} +2245 -1977
- package/lib/OperationList-B6v941u4.js.map +1 -0
- package/lib/{Pagination-kqFNgtnI.js → Pagination-DLOX63A8.js} +4 -4
- package/lib/{Pagination-kqFNgtnI.js.map → Pagination-DLOX63A8.js.map} +1 -1
- package/lib/RouteGuard-hHAwglew.js +56 -0
- package/lib/RouteGuard-hHAwglew.js.map +1 -0
- package/lib/RouterError-DFKYoA21.js +41 -0
- package/lib/RouterError-DFKYoA21.js.map +1 -0
- package/lib/{SchemaList-DS-pMd6B.js → SchemaList-B_ZSBIZQ.js} +17 -16
- package/lib/{SchemaList-DS-pMd6B.js.map → SchemaList-B_ZSBIZQ.js.map} +1 -1
- package/lib/SchemaView-P_vs98kp.js +458 -0
- package/lib/SchemaView-P_vs98kp.js.map +1 -0
- package/lib/Select-Cd4-iVtm.js +372 -0
- package/lib/Select-Cd4-iVtm.js.map +1 -0
- package/lib/{SignUp-BwOSCD-6.js → SignUp-DmGhKaYB.js} +7 -7
- package/lib/SignUp-DmGhKaYB.js.map +1 -0
- package/lib/{Spinner-mNLZ6awP.js → Spinner-CI6bRyZw.js} +2 -2
- package/lib/{Spinner-mNLZ6awP.js.map → Spinner-CI6bRyZw.js.map} +1 -1
- package/lib/{SyntaxHighlight-BMKR4pl6.js → SyntaxHighlight-BvPom2Ah.js} +656 -637
- package/lib/SyntaxHighlight-BvPom2Ah.js.map +1 -0
- package/lib/{Toc-BKDRCQzU.js → Toc-BUvPY3Eo.js} +3 -3
- package/lib/{Toc-BKDRCQzU.js.map → Toc-BUvPY3Eo.js.map} +1 -1
- package/lib/ZudokuContext-CgNnmIdS.js +1507 -0
- package/lib/ZudokuContext-CgNnmIdS.js.map +1 -0
- package/lib/c-B-NUhs61.js +46 -0
- package/lib/c-B-NUhs61.js.map +1 -0
- package/lib/chunk-PVWAREVJ-BO6B-RAk.js +7965 -0
- package/lib/chunk-PVWAREVJ-BO6B-RAk.js.map +1 -0
- package/lib/{circular-8GWQDvCW.js → circular-Dj7ksnVz.js} +30 -30
- package/lib/{circular-8GWQDvCW.js.map → circular-Dj7ksnVz.js.map} +1 -1
- package/lib/cn-dYga0KKN.js.map +1 -1
- package/lib/commonlisp-De080z23.js +28 -0
- package/lib/commonlisp-De080z23.js.map +1 -0
- package/lib/cpp-79Paht7T.js +53 -0
- package/lib/cpp-79Paht7T.js.map +1 -0
- package/lib/{createServer-BsezSzvV.js → createServer-TdhrtpF-.js} +4023 -3976
- package/lib/createServer-TdhrtpF-.js.map +1 -0
- package/lib/csharp-D8MIL50B.js +53 -0
- package/lib/csharp-D8MIL50B.js.map +1 -0
- package/lib/css-Bt6hr1td.js +54 -0
- package/lib/css-Bt6hr1td.js.map +1 -0
- package/lib/dart-B0vy1jWB.js +60 -0
- package/lib/dart-B0vy1jWB.js.map +1 -0
- package/lib/elixir-Ds8r0sF8.js +25 -0
- package/lib/elixir-Ds8r0sF8.js.map +1 -0
- package/lib/{errors-Cs7hKmdL.js → errors-Djd93sGS.js} +3 -3
- package/lib/errors-Djd93sGS.js.map +1 -0
- package/lib/go-D2VsmIOS.js +25 -0
- package/lib/go-D2VsmIOS.js.map +1 -0
- package/lib/graphql-BtA6M4m5.js +25 -0
- package/lib/graphql-BtA6M4m5.js.map +1 -0
- package/lib/hook-CN3s-MdA.js +31 -0
- package/lib/hook-CN3s-MdA.js.map +1 -0
- package/lib/html-MGnI2uzP.js +33 -0
- package/lib/html-MGnI2uzP.js.map +1 -0
- package/lib/{index-BkW9tJ6j.js → index-B9_Vty7t.js} +166 -50
- package/lib/index-B9_Vty7t.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/index-D5H3egwO.js +1058 -0
- package/lib/index-D5H3egwO.js.map +1 -0
- package/lib/{index-Bg7Js3jB.js → index-flQyzEBn.js} +732 -702
- package/lib/index-flQyzEBn.js.map +1 -0
- package/lib/{index-DmNq2fbN.js → index-nGbmHh_A.js} +2 -2
- package/lib/index-nGbmHh_A.js.map +1 -0
- package/lib/{RouteGuard-0wPUKdxJ.js → index.esm-BnYHxCYC.js} +226 -281
- package/lib/index.esm-BnYHxCYC.js.map +1 -0
- package/lib/index.esm-DpgNxKa2.js +1267 -0
- package/lib/index.esm-DpgNxKa2.js.map +1 -0
- package/lib/invariant-Bm-FVUQE.js.map +1 -1
- package/lib/java-CVLzHfb1.js +53 -0
- package/lib/java-CVLzHfb1.js.map +1 -0
- package/lib/javascript-CcmIpL4G.js +10 -0
- package/lib/javascript-CcmIpL4G.js.map +1 -0
- package/lib/json-4AyP4uiY.js +25 -0
- package/lib/json-4AyP4uiY.js.map +1 -0
- package/lib/{jsx-runtime-C5mzlN2N.js → jsx-runtime-BzflLqGi.js} +110 -112
- package/lib/jsx-runtime-BzflLqGi.js.map +1 -0
- package/lib/kotlin-v2plddBQ.js +37 -0
- package/lib/kotlin-v2plddBQ.js.map +1 -0
- package/lib/markdown-DYGWCmGQ.js +25 -0
- package/lib/markdown-DYGWCmGQ.js.map +1 -0
- package/lib/mdx-CHwYvXd4.js +32 -0
- package/lib/mdx-CHwYvXd4.js.map +1 -0
- package/lib/mutation-Byfu-P5y.js +196 -0
- package/lib/mutation-Byfu-P5y.js.map +1 -0
- package/lib/objectivec-HZY8shkd.js +32 -0
- package/lib/objectivec-HZY8shkd.js.map +1 -0
- package/lib/ocaml-DqsdDdwb.js +52 -0
- package/lib/ocaml-DqsdDdwb.js.map +1 -0
- package/lib/php-rQXzo7K_.js +25 -0
- package/lib/php-rQXzo7K_.js.map +1 -0
- package/lib/powershell-CQje9pm1.js +39 -0
- package/lib/powershell-CQje9pm1.js.map +1 -0
- package/lib/processors/traverse.js.map +1 -1
- package/lib/python-QIQAE5Ei.js +32 -0
- package/lib/python-QIQAE5Ei.js.map +1 -0
- package/lib/react-DHpVpxRv.js +24 -0
- package/lib/react-DHpVpxRv.js.map +1 -0
- package/lib/ruby-B2dU8Ny5.js +25 -0
- package/lib/ruby-B2dU8Ny5.js.map +1 -0
- package/lib/rust-DYnLHAi2.js +25 -0
- package/lib/rust-DYnLHAi2.js.map +1 -0
- package/lib/scala-CeKInBR8.js +25 -0
- package/lib/scala-CeKInBR8.js.map +1 -0
- package/lib/shell-HUv9oVtp.js +25 -0
- package/lib/shell-HUv9oVtp.js.map +1 -0
- package/lib/swift-B4z6ig1Z.js +25 -0
- package/lib/swift-B4z6ig1Z.js.map +1 -0
- package/lib/toml-Co9mpdct.js +32 -0
- package/lib/toml-Co9mpdct.js.map +1 -0
- package/lib/typescript-C26xdBDC.js +32 -0
- package/lib/typescript-C26xdBDC.js.map +1 -0
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +3 -3
- package/lib/ui/Alert.js +1 -1
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +1 -1
- package/lib/ui/Breadcrumb.js +23 -22
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js +1 -1
- package/lib/ui/Callout.js +1 -1
- package/lib/ui/Card.js +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +1 -1
- package/lib/ui/CodeBlock.js +4 -3
- package/lib/ui/CodeBlock.js.map +1 -1
- package/lib/ui/Command.js +21 -27
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +56 -41
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/DropdownMenu.js +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +4 -4
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Form.js +2 -2
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/HoverCard.js +1 -1
- package/lib/ui/Input.js +1 -1
- package/lib/ui/Label.js +1 -1
- package/lib/ui/Pagination.js +28 -29
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +1 -1
- package/lib/ui/ReactComponentDoc.js +28 -0
- package/lib/ui/ReactComponentDoc.js.map +1 -0
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Secret.js +106 -0
- package/lib/ui/Secret.js.map +1 -0
- package/lib/ui/Select.js +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +1 -1
- package/lib/ui/Stepper.js +1 -1
- package/lib/ui/Switch.js +1 -1
- package/lib/ui/SyntaxHighlight.js +4 -4
- package/lib/ui/Tabs.js +1 -1
- package/lib/ui/Textarea.js +1 -1
- package/lib/ui/Toggle.js +1 -1
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js +1 -1
- package/lib/ui/Value.js +39 -0
- package/lib/ui/Value.js.map +1 -0
- package/lib/useCopyToClipboard-B_085nfO.js +14 -0
- package/lib/useCopyToClipboard-B_085nfO.js.map +1 -0
- package/lib/useExposedProps-B8NHdNRq.js +113 -0
- package/lib/useExposedProps-B8NHdNRq.js.map +1 -0
- package/lib/useLatest-hmRS46UF.js +11 -0
- package/lib/useLatest-hmRS46UF.js.map +1 -0
- package/lib/xml-BQOOC04j.js +25 -0
- package/lib/xml-BQOOC04j.js.map +1 -0
- package/lib/yaml-BGsJItKv.js +32 -0
- package/lib/yaml-BGsJItKv.js.map +1 -0
- package/lib/zig-CUV2sTct.js +35 -0
- package/lib/zig-CUV2sTct.js.map +1 -0
- package/lib/zudoku.__internal.js +3084 -0
- package/lib/zudoku.__internal.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-azureb2c.js +14 -15
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +3 -3
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +57 -58
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +3 -2
- package/lib/zudoku.auth-supabase.js.map +1 -1
- package/lib/zudoku.components.js +24 -31
- package/lib/zudoku.hooks.js +19 -20
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.icons.js +1 -1
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +30 -24
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +253 -278
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +8 -5
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +2 -2
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +5 -5
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +1 -1
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +29 -30
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.router.js +2507 -0
- package/lib/zudoku.router.js.map +1 -0
- package/package.json +69 -73
- package/src/app/ZuploBuildConfig.ts +1 -1
- package/src/app/demo.tsx +1 -1
- package/src/app/entry.client.tsx +7 -6
- package/src/app/entry.server.tsx +4 -4
- package/src/app/env.ts +6 -6
- package/src/app/main.css +12 -16
- package/src/app/main.tsx +24 -12
- package/src/app/standalone.tsx +8 -3
- package/src/lib/MissingIcon.tsx +1 -1
- package/src/lib/assets/language-icons/c.tsx +31 -0
- package/src/lib/assets/language-icons/commonlisp.tsx +22 -0
- package/src/lib/assets/language-icons/cpp.tsx +35 -0
- package/src/lib/assets/language-icons/csharp.tsx +35 -0
- package/src/lib/assets/language-icons/css.tsx +36 -0
- package/src/lib/assets/language-icons/dart.tsx +39 -0
- package/src/lib/assets/language-icons/elixir.tsx +19 -0
- package/src/lib/assets/language-icons/go.tsx +19 -0
- package/src/lib/assets/language-icons/graphql.tsx +19 -0
- package/src/lib/assets/language-icons/html.tsx +24 -0
- package/src/lib/assets/language-icons/java.tsx +35 -0
- package/src/lib/assets/language-icons/javascript.tsx +11 -0
- package/src/lib/assets/language-icons/json.tsx +19 -0
- package/src/lib/assets/language-icons/kotlin.tsx +30 -0
- package/src/lib/assets/language-icons/markdown.tsx +19 -0
- package/src/lib/assets/language-icons/mdx.tsx +23 -0
- package/src/lib/assets/language-icons/objectivec.tsx +23 -0
- package/src/lib/assets/language-icons/ocaml.tsx +34 -0
- package/src/lib/assets/language-icons/php.tsx +19 -0
- package/src/lib/assets/language-icons/powershell.tsx +27 -0
- package/src/lib/assets/language-icons/python.tsx +23 -0
- package/src/lib/assets/language-icons/react.tsx +21 -0
- package/src/lib/assets/language-icons/ruby.tsx +19 -0
- package/src/lib/assets/language-icons/rust.tsx +19 -0
- package/src/lib/assets/language-icons/scala.tsx +19 -0
- package/src/lib/assets/language-icons/shell.tsx +19 -0
- package/src/lib/assets/language-icons/swift.tsx +19 -0
- package/src/lib/assets/language-icons/toml.tsx +23 -0
- package/src/lib/assets/language-icons/typescript.tsx +23 -0
- package/src/lib/assets/language-icons/xml.tsx +19 -0
- package/src/lib/assets/language-icons/yaml.tsx +23 -0
- package/src/lib/assets/language-icons/zig.tsx +32 -0
- package/src/lib/auth/issuer.test.ts +1 -0
- package/src/lib/authentication/AuthenticationPlugin.tsx +4 -4
- package/src/lib/authentication/authentication.ts +3 -3
- package/src/lib/authentication/components/OAuthErrorPage.tsx +1 -1
- package/src/lib/authentication/components/SignOut.tsx +1 -1
- package/src/lib/authentication/providers/auth0.tsx +5 -5
- package/src/lib/authentication/providers/azureb2c.tsx +5 -5
- package/src/lib/authentication/providers/clerk.tsx +5 -5
- package/src/lib/authentication/providers/openid.tsx +6 -6
- package/src/lib/authentication/providers/supabase.tsx +7 -6
- package/src/lib/authentication/use-broadcast/LICENSE.md +12 -3
- package/src/lib/authentication/use-broadcast/shared.ts +4 -4
- package/src/lib/authentication/use-broadcast/useBroadcast.ts +2 -2
- package/src/lib/components/AnchorLink.tsx +1 -1
- package/src/lib/components/Autocomplete.tsx +1 -1
- package/src/lib/components/Bootstrap.tsx +1 -0
- package/src/lib/components/BuildCheck.tsx +27 -14
- package/src/lib/components/Header.tsx +5 -5
- package/src/lib/components/Heading.tsx +2 -3
- package/src/lib/components/LanguageIcon.tsx +181 -0
- package/src/lib/components/Layout.tsx +3 -22
- package/src/lib/components/Markdown.tsx +5 -2
- package/src/lib/components/Meta.tsx +45 -0
- package/src/lib/components/MobileTopNavigation.tsx +11 -13
- package/src/lib/components/PathRenderer.tsx +2 -2
- package/src/lib/components/Search.tsx +1 -1
- package/src/lib/components/Slot.test.tsx +8 -8
- package/src/lib/components/Slot.tsx +2 -2
- package/src/lib/components/TopNavigation.tsx +3 -3
- package/src/lib/components/Zudoku.tsx +2 -2
- package/src/lib/components/context/ComponentsContext.tsx +2 -2
- package/src/lib/components/context/RouterEventsEmitter.tsx +1 -1
- package/src/lib/components/context/SlotProvider.tsx +4 -4
- package/src/lib/components/context/ViewportAnchorContext.tsx +2 -2
- package/src/lib/components/context/ZudokuContext.ts +13 -4
- package/src/lib/components/context/ZudokuProvider.tsx +1 -1
- package/src/lib/components/index.ts +3 -19
- package/src/lib/components/navigation/NavigationCategory.tsx +9 -2
- package/src/lib/components/navigation/NavigationItem.tsx +7 -5
- package/src/lib/components/navigation/NavigationWrapper.tsx +1 -1
- package/src/lib/components/navigation/Toc.tsx +2 -2
- package/src/lib/components/navigation/ZudokuLogo.tsx +1 -1
- package/src/lib/components/navigation/utils.ts +16 -17
- package/src/lib/core/ZudokuContext.ts +25 -6
- package/src/lib/core/__internal.tsx +30 -0
- package/src/lib/core/router.ts +1 -0
- package/src/lib/errors/ErrorAlert.tsx +0 -1
- package/src/lib/errors/TopLevelError.tsx +2 -4
- package/src/lib/hooks/useEvent.test.tsx +2 -2
- package/src/lib/oas/graphql/circular.ts +3 -3
- package/src/lib/oas/graphql/index.ts +20 -3
- package/src/lib/oas/parser/dereference/index.ts +2 -1
- package/src/lib/oas/parser/dereference/resolveRef.ts +4 -4
- package/src/lib/oas/parser/index.ts +2 -2
- package/src/lib/oas/parser/upgrade/index.ts +2 -1
- package/src/lib/plugins/api-catalog/Catalog.tsx +7 -0
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +7 -4
- package/src/lib/plugins/api-keys/CreateApiKeyDialog.tsx +49 -0
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +24 -73
- package/src/lib/plugins/api-keys/index.tsx +17 -11
- package/src/lib/plugins/custom-pages/index.tsx +4 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +6 -6
- package/src/lib/plugins/markdown/index.tsx +1 -1
- package/src/lib/plugins/openapi/ColorizedParam.tsx +3 -1
- package/src/lib/plugins/openapi/Endpoint.tsx +2 -2
- package/src/lib/plugins/openapi/MCPEndpoint.tsx +273 -0
- package/src/lib/plugins/openapi/OasProvider.tsx +2 -1
- package/src/lib/plugins/openapi/OperationList.tsx +25 -11
- package/src/lib/plugins/openapi/OperationListItem.tsx +93 -74
- package/src/lib/plugins/openapi/ParamInfos.tsx +10 -9
- package/src/lib/plugins/openapi/ParameterList.tsx +3 -5
- package/src/lib/plugins/openapi/ParameterListItem.tsx +6 -12
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +8 -13
- package/src/lib/plugins/openapi/RequestBodySidecarBox.tsx +3 -2
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +1 -1
- package/src/lib/plugins/openapi/Sidecar.tsx +4 -3
- package/src/lib/plugins/openapi/SidecarExamples.tsx +3 -10
- package/src/lib/plugins/openapi/StaggeredRender.tsx +1 -1
- package/src/lib/plugins/openapi/client/GraphQLContext.tsx +1 -1
- package/src/lib/plugins/openapi/client/createServer.ts +1 -2
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +3 -2
- package/src/lib/plugins/openapi/context.tsx +1 -1
- package/src/lib/plugins/openapi/graphql/fragment-masking.ts +1 -1
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +11 -3
- package/src/lib/plugins/openapi/index.tsx +5 -4
- package/src/lib/plugins/openapi/interfaces.ts +7 -4
- package/src/lib/plugins/openapi/playground/BodyPanel.tsx +3 -3
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +3 -3
- package/src/lib/plugins/openapi/playground/Headers.tsx +1 -1
- package/src/lib/plugins/openapi/playground/IdentityDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/IdentitySelector.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +4 -4
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +12 -1
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/request-panel/UrlPath.tsx +1 -1
- package/src/lib/plugins/openapi/playground/request-panel/UrlQueryParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResponseStatusBar.tsx +3 -1
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +31 -3
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +3 -3
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +1 -1
- package/src/lib/plugins/openapi/processors/removeExtensions.test.ts +1 -0
- package/src/lib/plugins/openapi/processors/removeParameters.test.ts +1 -0
- package/src/lib/plugins/openapi/processors/traverse.ts +1 -1
- package/src/lib/plugins/openapi/schema/{LogicalGroup/LogicalGroupConnector.tsx → AllOfGroup/AllOfGroupConnector.tsx} +4 -25
- package/src/lib/plugins/openapi/schema/{LogicalGroup/LogicalGroupItem.tsx → AllOfGroup/AllOfGroupItem.tsx} +3 -11
- package/src/lib/plugins/openapi/schema/AllOfGroup/AllOfGroupView.tsx +42 -0
- package/src/lib/plugins/openapi/schema/SchemaPropertyItem.tsx +9 -27
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +35 -23
- package/src/lib/plugins/openapi/schema/UnionView.tsx +143 -0
- package/src/lib/plugins/openapi/schema/union-helpers.ts +124 -0
- package/src/lib/plugins/openapi/schema/utils.ts +0 -11
- package/src/lib/plugins/openapi/util/createHttpSnippet.ts +2 -2
- package/src/lib/plugins/openapi/util/createNavigationCategory.tsx +1 -0
- package/src/lib/plugins/openapi/util/generateSchemaExample.ts +3 -4
- package/src/lib/plugins/openapi/util/getRoutes.tsx +2 -2
- package/src/lib/plugins/openapi/util/methodColorMap.tsx +1 -1
- package/src/lib/plugins/search-inkeep/index.tsx +3 -3
- package/src/lib/plugins/search-pagefind/PagefindSearch.tsx +2 -4
- package/src/lib/plugins/search-pagefind/ResultList.tsx +3 -4
- package/src/lib/plugins/search-pagefind/get-results.tsx +0 -1
- package/src/lib/shiki.ts +21 -6
- package/src/lib/ui/Breadcrumb.tsx +1 -0
- package/src/lib/ui/CodeBlock.tsx +11 -19
- package/src/lib/ui/Command.tsx +2 -4
- package/src/lib/ui/Dialog.tsx +12 -4
- package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
- package/src/lib/ui/Form.tsx +4 -4
- package/src/lib/ui/Pagination.tsx +1 -2
- package/src/lib/ui/ReactComponentDoc.tsx +68 -0
- package/src/lib/ui/Secret.tsx +123 -0
- package/src/lib/ui/ToggleGroup.tsx +1 -1
- package/src/lib/ui/Value.tsx +42 -0
- package/src/lib/util/MdxComponents.tsx +13 -3
- package/src/lib/util/cn.ts +1 -1
- package/src/lib/util/createVariantComponent.tsx +2 -2
- package/src/lib/util/groupBy.ts +1 -0
- package/src/lib/util/humanFileSize.ts +2 -3
- package/src/lib/util/invariant.ts +1 -0
- package/src/lib/util/pastellize.ts +4 -4
- package/src/lib/util/traverse.ts +36 -0
- package/src/lib/util/types.ts +1 -1
- package/src/lib/util/useIsomorphicLayoutEffect.ts +1 -0
- package/src/lib/util/useScrollToAnchor.ts +3 -1
- package/src/shiki/langs/vue-vine.js +1 -0
- package/dist/lib/components/ReactMarkdown.d.ts +0 -29
- package/dist/lib/components/ReactMarkdown.js +0 -182
- package/dist/lib/components/ReactMarkdown.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.d.ts +0 -8
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js +0 -14
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.d.ts +0 -7
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js +0 -17
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupConnector.js.map +0 -1
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js +0 -10
- package/dist/lib/plugins/openapi/schema/LogicalGroup/LogicalGroupItem.js.map +0 -1
- package/dist/vite/remarkStaticGeneration.js.map +0 -1
- package/lib/CodeBlock-B-G0eKtw.js +0 -85
- package/lib/CodeBlock-B-G0eKtw.js.map +0 -1
- package/lib/Command-BYukybsa.js.map +0 -1
- package/lib/Dialog-u9Uz9sTt.js +0 -99
- package/lib/Dialog-u9Uz9sTt.js.map +0 -1
- package/lib/MdxPage-Bsko6_kb.js.map +0 -1
- package/lib/OAuthErrorPage-DJzGiIBt.js.map +0 -1
- package/lib/OasProvider-DQQRt3oS.js.map +0 -1
- package/lib/OperationList-DpmkHf26.js.map +0 -1
- package/lib/RouteGuard-0wPUKdxJ.js.map +0 -1
- package/lib/SchemaView-BnN6WHjw.js +0 -366
- package/lib/SchemaView-BnN6WHjw.js.map +0 -1
- package/lib/Select-BmTTKNPp.js +0 -273
- package/lib/Select-BmTTKNPp.js.map +0 -1
- package/lib/SignUp-BwOSCD-6.js.map +0 -1
- package/lib/Slot-DAyXieeZ.js.map +0 -1
- package/lib/SyntaxHighlight-BMKR4pl6.js.map +0 -1
- package/lib/ZudokuContext-CLl5w57E.js +0 -1278
- package/lib/ZudokuContext-CLl5w57E.js.map +0 -1
- package/lib/chunk-QMGIS6GS-CEOk3lro.js +0 -1839
- package/lib/chunk-QMGIS6GS-CEOk3lro.js.map +0 -1
- package/lib/createServer-BsezSzvV.js.map +0 -1
- package/lib/errors-Cs7hKmdL.js.map +0 -1
- package/lib/hook-DbUCLQNg.js +0 -247
- package/lib/hook-DbUCLQNg.js.map +0 -1
- package/lib/index-A5Qdwj1B.js +0 -4081
- package/lib/index-A5Qdwj1B.js.map +0 -1
- package/lib/index-Bg7Js3jB.js.map +0 -1
- package/lib/index-BkW9tJ6j.js.map +0 -1
- package/lib/index-Bm35Tkgf.js +0 -107
- package/lib/index-Bm35Tkgf.js.map +0 -1
- package/lib/index-DmNq2fbN.js.map +0 -1
- package/lib/index.esm-CdzlRw50.js +0 -1254
- package/lib/index.esm-CdzlRw50.js.map +0 -1
- package/lib/jsx-runtime-C5mzlN2N.js.map +0 -1
- package/lib/useExposedProps-KcgXHKeE.js +0 -9
- package/lib/useExposedProps-KcgXHKeE.js.map +0 -1
- package/src/lib/components/ReactMarkdown.license.txt +0 -21
- package/src/lib/components/ReactMarkdown.tsx +0 -264
- package/src/lib/plugins/openapi/schema/LogicalGroup/LogicalGroup.tsx +0 -40
|
@@ -0,0 +1,1267 @@
|
|
|
1
|
+
import b from "react";
|
|
2
|
+
var he = (e) => e.type === "checkbox", le = (e) => e instanceof Date, j = (e) => e == null;
|
|
3
|
+
const _t = (e) => typeof e == "object";
|
|
4
|
+
var I = (e) => !j(e) && !Array.isArray(e) && _t(e) && !le(e), ht = (e) => I(e) && e.target ? he(e.target) ? e.target.checked : e.target.value : e, It = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, mt = (e, r) => e.has(It(r)), Nt = (e) => {
|
|
5
|
+
const r = e.constructor && e.constructor.prototype;
|
|
6
|
+
return I(r) && r.hasOwnProperty("isPrototypeOf");
|
|
7
|
+
}, je = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
|
|
8
|
+
function O(e) {
|
|
9
|
+
let r;
|
|
10
|
+
const t = Array.isArray(e), i = typeof FileList < "u" ? e instanceof FileList : !1;
|
|
11
|
+
if (e instanceof Date)
|
|
12
|
+
r = new Date(e);
|
|
13
|
+
else if (!(je && (e instanceof Blob || i)) && (t || I(e)))
|
|
14
|
+
if (r = t ? [] : Object.create(Object.getPrototypeOf(e)), !t && !Nt(e))
|
|
15
|
+
r = e;
|
|
16
|
+
else
|
|
17
|
+
for (const u in e)
|
|
18
|
+
e.hasOwnProperty(u) && (r[u] = O(e[u]));
|
|
19
|
+
else
|
|
20
|
+
return e;
|
|
21
|
+
return r;
|
|
22
|
+
}
|
|
23
|
+
var Se = (e) => /^\w*$/.test(e), R = (e) => e === void 0, we = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Ke = (e) => we(e.replace(/["|']|\]/g, "").split(/\.|\[/)), d = (e, r, t) => {
|
|
24
|
+
if (!r || !I(e))
|
|
25
|
+
return t;
|
|
26
|
+
const i = (Se(r) ? [r] : Ke(r)).reduce((u, n) => j(u) ? u : u[n], e);
|
|
27
|
+
return R(i) || i === e ? R(e[r]) ? t : e[r] : i;
|
|
28
|
+
}, Y = (e) => typeof e == "boolean", E = (e, r, t) => {
|
|
29
|
+
let i = -1;
|
|
30
|
+
const u = Se(r) ? [r] : Ke(r), n = u.length, f = n - 1;
|
|
31
|
+
for (; ++i < n; ) {
|
|
32
|
+
const c = u[i];
|
|
33
|
+
let S = t;
|
|
34
|
+
if (i !== f) {
|
|
35
|
+
const x = e[c];
|
|
36
|
+
S = I(x) || Array.isArray(x) ? x : isNaN(+u[i + 1]) ? {} : [];
|
|
37
|
+
}
|
|
38
|
+
if (c === "__proto__" || c === "constructor" || c === "prototype")
|
|
39
|
+
return;
|
|
40
|
+
e[c] = S, e = e[c];
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const Ve = {
|
|
44
|
+
BLUR: "blur",
|
|
45
|
+
FOCUS_OUT: "focusout",
|
|
46
|
+
CHANGE: "change"
|
|
47
|
+
}, Q = {
|
|
48
|
+
onBlur: "onBlur",
|
|
49
|
+
onChange: "onChange",
|
|
50
|
+
onSubmit: "onSubmit",
|
|
51
|
+
onTouched: "onTouched",
|
|
52
|
+
all: "all"
|
|
53
|
+
}, se = {
|
|
54
|
+
max: "max",
|
|
55
|
+
min: "min",
|
|
56
|
+
maxLength: "maxLength",
|
|
57
|
+
minLength: "minLength",
|
|
58
|
+
pattern: "pattern",
|
|
59
|
+
required: "required",
|
|
60
|
+
validate: "validate"
|
|
61
|
+
}, ze = b.createContext(null);
|
|
62
|
+
ze.displayName = "HookFormContext";
|
|
63
|
+
const ke = () => b.useContext(ze), ir = (e) => {
|
|
64
|
+
const { children: r, ...t } = e;
|
|
65
|
+
return b.createElement(ze.Provider, { value: t }, r);
|
|
66
|
+
};
|
|
67
|
+
var vt = (e, r, t, i = !0) => {
|
|
68
|
+
const u = {
|
|
69
|
+
defaultValues: r._defaultValues
|
|
70
|
+
};
|
|
71
|
+
for (const n in e)
|
|
72
|
+
Object.defineProperty(u, n, {
|
|
73
|
+
get: () => {
|
|
74
|
+
const f = n;
|
|
75
|
+
return r._proxyFormState[f] !== Q.all && (r._proxyFormState[f] = !i || Q.all), t && (t[f] = !0), e[f];
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
return u;
|
|
79
|
+
};
|
|
80
|
+
const De = typeof window < "u" ? b.useLayoutEffect : b.useEffect;
|
|
81
|
+
function Bt(e) {
|
|
82
|
+
const r = ke(), { control: t = r.control, disabled: i, name: u, exact: n } = e || {}, [f, c] = b.useState(t._formState), S = b.useRef({
|
|
83
|
+
isDirty: !1,
|
|
84
|
+
isLoading: !1,
|
|
85
|
+
dirtyFields: !1,
|
|
86
|
+
touchedFields: !1,
|
|
87
|
+
validatingFields: !1,
|
|
88
|
+
isValidating: !1,
|
|
89
|
+
isValid: !1,
|
|
90
|
+
errors: !1
|
|
91
|
+
});
|
|
92
|
+
return De(() => t._subscribe({
|
|
93
|
+
name: u,
|
|
94
|
+
formState: S.current,
|
|
95
|
+
exact: n,
|
|
96
|
+
callback: (x) => {
|
|
97
|
+
!i && c({
|
|
98
|
+
...t._formState,
|
|
99
|
+
...x
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
}), [u, i, n]), b.useEffect(() => {
|
|
103
|
+
S.current.isValid && t._setValid(!0);
|
|
104
|
+
}, [t]), b.useMemo(() => vt(f, t, S.current, !1), [f, t]);
|
|
105
|
+
}
|
|
106
|
+
var re = (e) => typeof e == "string", bt = (e, r, t, i, u) => re(e) ? (i && r.watch.add(e), d(t, e, u)) : Array.isArray(e) ? e.map((n) => (i && r.watch.add(n), d(t, n))) : (i && (r.watchAll = !0), t), qe = (e) => j(e) || !_t(e);
|
|
107
|
+
function ie(e, r, t = /* @__PURE__ */ new WeakSet()) {
|
|
108
|
+
if (qe(e) || qe(r))
|
|
109
|
+
return e === r;
|
|
110
|
+
if (le(e) && le(r))
|
|
111
|
+
return e.getTime() === r.getTime();
|
|
112
|
+
const i = Object.keys(e), u = Object.keys(r);
|
|
113
|
+
if (i.length !== u.length)
|
|
114
|
+
return !1;
|
|
115
|
+
if (t.has(e) || t.has(r))
|
|
116
|
+
return !0;
|
|
117
|
+
t.add(e), t.add(r);
|
|
118
|
+
for (const n of i) {
|
|
119
|
+
const f = e[n];
|
|
120
|
+
if (!u.includes(n))
|
|
121
|
+
return !1;
|
|
122
|
+
if (n !== "ref") {
|
|
123
|
+
const c = r[n];
|
|
124
|
+
if (le(f) && le(c) || I(f) && I(c) || Array.isArray(f) && Array.isArray(c) ? !ie(f, c, t) : f !== c)
|
|
125
|
+
return !1;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return !0;
|
|
129
|
+
}
|
|
130
|
+
function Pt(e) {
|
|
131
|
+
const r = ke(), { control: t = r.control, name: i, defaultValue: u, disabled: n, exact: f, compute: c } = e || {}, S = b.useRef(u), x = b.useRef(c), A = b.useRef(void 0);
|
|
132
|
+
x.current = c;
|
|
133
|
+
const w = b.useMemo(() => t._getWatch(i, S.current), [t, i]), [h, G] = b.useState(x.current ? x.current(w) : w);
|
|
134
|
+
return De(() => t._subscribe({
|
|
135
|
+
name: i,
|
|
136
|
+
formState: {
|
|
137
|
+
values: !0
|
|
138
|
+
},
|
|
139
|
+
exact: f,
|
|
140
|
+
callback: (q) => {
|
|
141
|
+
if (!n) {
|
|
142
|
+
const C = bt(i, t._names, q.values || t._formValues, !1, S.current);
|
|
143
|
+
if (x.current) {
|
|
144
|
+
const B = x.current(C);
|
|
145
|
+
ie(B, A.current) || (G(B), A.current = B);
|
|
146
|
+
} else
|
|
147
|
+
G(C);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}), [t, n, i, f]), b.useEffect(() => t._removeUnmounted()), h;
|
|
151
|
+
}
|
|
152
|
+
function Wt(e) {
|
|
153
|
+
const r = ke(), { name: t, disabled: i, control: u = r.control, shouldUnregister: n, defaultValue: f } = e, c = mt(u._names.array, t), S = b.useMemo(() => d(u._formValues, t, d(u._defaultValues, t, f)), [u, t, f]), x = Pt({
|
|
154
|
+
control: u,
|
|
155
|
+
name: t,
|
|
156
|
+
defaultValue: S,
|
|
157
|
+
exact: !0
|
|
158
|
+
}), A = Bt({
|
|
159
|
+
control: u,
|
|
160
|
+
name: t,
|
|
161
|
+
exact: !0
|
|
162
|
+
}), w = b.useRef(e), h = b.useRef(u.register(t, {
|
|
163
|
+
...e.rules,
|
|
164
|
+
value: x,
|
|
165
|
+
...Y(e.disabled) ? { disabled: e.disabled } : {}
|
|
166
|
+
}));
|
|
167
|
+
w.current = e;
|
|
168
|
+
const G = b.useMemo(() => Object.defineProperties({}, {
|
|
169
|
+
invalid: {
|
|
170
|
+
enumerable: !0,
|
|
171
|
+
get: () => !!d(A.errors, t)
|
|
172
|
+
},
|
|
173
|
+
isDirty: {
|
|
174
|
+
enumerable: !0,
|
|
175
|
+
get: () => !!d(A.dirtyFields, t)
|
|
176
|
+
},
|
|
177
|
+
isTouched: {
|
|
178
|
+
enumerable: !0,
|
|
179
|
+
get: () => !!d(A.touchedFields, t)
|
|
180
|
+
},
|
|
181
|
+
isValidating: {
|
|
182
|
+
enumerable: !0,
|
|
183
|
+
get: () => !!d(A.validatingFields, t)
|
|
184
|
+
},
|
|
185
|
+
error: {
|
|
186
|
+
enumerable: !0,
|
|
187
|
+
get: () => d(A.errors, t)
|
|
188
|
+
}
|
|
189
|
+
}), [A, t]), q = b.useCallback((V) => h.current.onChange({
|
|
190
|
+
target: {
|
|
191
|
+
value: ht(V),
|
|
192
|
+
name: t
|
|
193
|
+
},
|
|
194
|
+
type: Ve.CHANGE
|
|
195
|
+
}), [t]), C = b.useCallback(() => h.current.onBlur({
|
|
196
|
+
target: {
|
|
197
|
+
value: d(u._formValues, t),
|
|
198
|
+
name: t
|
|
199
|
+
},
|
|
200
|
+
type: Ve.BLUR
|
|
201
|
+
}), [t, u._formValues]), B = b.useCallback((V) => {
|
|
202
|
+
const P = d(u._fields, t);
|
|
203
|
+
P && V && (P._f.ref = {
|
|
204
|
+
focus: () => V.focus && V.focus(),
|
|
205
|
+
select: () => V.select && V.select(),
|
|
206
|
+
setCustomValidity: (N) => V.setCustomValidity(N),
|
|
207
|
+
reportValidity: () => V.reportValidity()
|
|
208
|
+
});
|
|
209
|
+
}, [u._fields, t]), ae = b.useMemo(() => ({
|
|
210
|
+
name: t,
|
|
211
|
+
value: x,
|
|
212
|
+
...Y(i) || A.disabled ? { disabled: A.disabled || i } : {},
|
|
213
|
+
onChange: q,
|
|
214
|
+
onBlur: C,
|
|
215
|
+
ref: B
|
|
216
|
+
}), [t, i, A.disabled, q, C, B, x]);
|
|
217
|
+
return b.useEffect(() => {
|
|
218
|
+
const V = u._options.shouldUnregister || n;
|
|
219
|
+
u.register(t, {
|
|
220
|
+
...w.current.rules,
|
|
221
|
+
...Y(w.current.disabled) ? { disabled: w.current.disabled } : {}
|
|
222
|
+
});
|
|
223
|
+
const P = (N, _) => {
|
|
224
|
+
const m = d(u._fields, N);
|
|
225
|
+
m && m._f && (m._f.mount = _);
|
|
226
|
+
};
|
|
227
|
+
if (P(t, !0), V) {
|
|
228
|
+
const N = O(d(u._options.defaultValues, t));
|
|
229
|
+
E(u._defaultValues, t, N), R(d(u._formValues, t)) && E(u._formValues, t, N);
|
|
230
|
+
}
|
|
231
|
+
return !c && u.register(t), () => {
|
|
232
|
+
(c ? V && !u._state.action : V) ? u.unregister(t) : P(t, !1);
|
|
233
|
+
};
|
|
234
|
+
}, [t, u, c, n]), b.useEffect(() => {
|
|
235
|
+
u._setDisabledField({
|
|
236
|
+
disabled: i,
|
|
237
|
+
name: t
|
|
238
|
+
});
|
|
239
|
+
}, [i, t, u]), b.useMemo(() => ({
|
|
240
|
+
field: ae,
|
|
241
|
+
formState: A,
|
|
242
|
+
fieldState: G
|
|
243
|
+
}), [ae, A, G]);
|
|
244
|
+
}
|
|
245
|
+
const ar = (e) => e.render(Wt(e));
|
|
246
|
+
var qt = (e, r, t, i, u) => r ? {
|
|
247
|
+
...t[e],
|
|
248
|
+
types: {
|
|
249
|
+
...t[e] && t[e].types ? t[e].types : {},
|
|
250
|
+
[i]: u || !0
|
|
251
|
+
}
|
|
252
|
+
} : {}, z = (e) => Array.isArray(e) ? e : [e], ut = () => {
|
|
253
|
+
let e = [];
|
|
254
|
+
return {
|
|
255
|
+
get observers() {
|
|
256
|
+
return e;
|
|
257
|
+
},
|
|
258
|
+
next: (u) => {
|
|
259
|
+
for (const n of e)
|
|
260
|
+
n.next && n.next(u);
|
|
261
|
+
},
|
|
262
|
+
subscribe: (u) => (e.push(u), {
|
|
263
|
+
unsubscribe: () => {
|
|
264
|
+
e = e.filter((n) => n !== u);
|
|
265
|
+
}
|
|
266
|
+
}),
|
|
267
|
+
unsubscribe: () => {
|
|
268
|
+
e = [];
|
|
269
|
+
}
|
|
270
|
+
};
|
|
271
|
+
}, $ = (e) => I(e) && !Object.keys(e).length, Ge = (e) => e.type === "file", X = (e) => typeof e == "function", Fe = (e) => {
|
|
272
|
+
if (!je)
|
|
273
|
+
return !1;
|
|
274
|
+
const r = e ? e.ownerDocument : 0;
|
|
275
|
+
return e instanceof (r && r.defaultView ? r.defaultView.HTMLElement : HTMLElement);
|
|
276
|
+
}, Vt = (e) => e.type === "select-multiple", Ye = (e) => e.type === "radio", Ht = (e) => Ye(e) || he(e), Re = (e) => Fe(e) && e.isConnected;
|
|
277
|
+
function $t(e, r) {
|
|
278
|
+
const t = r.slice(0, -1).length;
|
|
279
|
+
let i = 0;
|
|
280
|
+
for (; i < t; )
|
|
281
|
+
e = R(e) ? i++ : e[r[i++]];
|
|
282
|
+
return e;
|
|
283
|
+
}
|
|
284
|
+
function jt(e) {
|
|
285
|
+
for (const r in e)
|
|
286
|
+
if (e.hasOwnProperty(r) && !R(e[r]))
|
|
287
|
+
return !1;
|
|
288
|
+
return !0;
|
|
289
|
+
}
|
|
290
|
+
function T(e, r) {
|
|
291
|
+
const t = Array.isArray(r) ? r : Se(r) ? [r] : Ke(r), i = t.length === 1 ? e : $t(e, t), u = t.length - 1, n = t[u];
|
|
292
|
+
return i && delete i[n], u !== 0 && (I(i) && $(i) || Array.isArray(i) && jt(i)) && T(e, t.slice(0, -1)), e;
|
|
293
|
+
}
|
|
294
|
+
var Ft = (e) => {
|
|
295
|
+
for (const r in e)
|
|
296
|
+
if (X(e[r]))
|
|
297
|
+
return !0;
|
|
298
|
+
return !1;
|
|
299
|
+
};
|
|
300
|
+
function Ae(e, r = {}) {
|
|
301
|
+
const t = Array.isArray(e);
|
|
302
|
+
if (I(e) || t)
|
|
303
|
+
for (const i in e)
|
|
304
|
+
Array.isArray(e[i]) || I(e[i]) && !Ft(e[i]) ? (r[i] = Array.isArray(e[i]) ? [] : {}, Ae(e[i], r[i])) : j(e[i]) || (r[i] = !0);
|
|
305
|
+
return r;
|
|
306
|
+
}
|
|
307
|
+
function At(e, r, t) {
|
|
308
|
+
const i = Array.isArray(e);
|
|
309
|
+
if (I(e) || i)
|
|
310
|
+
for (const u in e)
|
|
311
|
+
Array.isArray(e[u]) || I(e[u]) && !Ft(e[u]) ? R(r) || qe(t[u]) ? t[u] = Array.isArray(e[u]) ? Ae(e[u], []) : { ...Ae(e[u]) } : At(e[u], j(r) ? {} : r[u], t[u]) : t[u] = !ie(e[u], r[u]);
|
|
312
|
+
return t;
|
|
313
|
+
}
|
|
314
|
+
var ge = (e, r) => At(e, r, Ae(r));
|
|
315
|
+
const nt = {
|
|
316
|
+
value: !1,
|
|
317
|
+
isValid: !1
|
|
318
|
+
}, lt = { value: !0, isValid: !0 };
|
|
319
|
+
var xt = (e) => {
|
|
320
|
+
if (Array.isArray(e)) {
|
|
321
|
+
if (e.length > 1) {
|
|
322
|
+
const r = e.filter((t) => t && t.checked && !t.disabled).map((t) => t.value);
|
|
323
|
+
return { value: r, isValid: !!r.length };
|
|
324
|
+
}
|
|
325
|
+
return e[0].checked && !e[0].disabled ? (
|
|
326
|
+
// @ts-expect-error expected to work in the browser
|
|
327
|
+
e[0].attributes && !R(e[0].attributes.value) ? R(e[0].value) || e[0].value === "" ? lt : { value: e[0].value, isValid: !0 } : lt
|
|
328
|
+
) : nt;
|
|
329
|
+
}
|
|
330
|
+
return nt;
|
|
331
|
+
}, St = (e, { valueAsNumber: r, valueAsDate: t, setValueAs: i }) => R(e) ? e : r ? e === "" ? NaN : e && +e : t && re(e) ? new Date(e) : i ? i(e) : e;
|
|
332
|
+
const ot = {
|
|
333
|
+
isValid: !1,
|
|
334
|
+
value: null
|
|
335
|
+
};
|
|
336
|
+
var wt = (e) => Array.isArray(e) ? e.reduce((r, t) => t && t.checked && !t.disabled ? {
|
|
337
|
+
isValid: !0,
|
|
338
|
+
value: t.value
|
|
339
|
+
} : r, ot) : ot;
|
|
340
|
+
function ct(e) {
|
|
341
|
+
const r = e.ref;
|
|
342
|
+
return Ge(r) ? r.files : Ye(r) ? wt(e.refs).value : Vt(r) ? [...r.selectedOptions].map(({ value: t }) => t) : he(r) ? xt(e.refs).value : St(R(r.value) ? e.ref.value : r.value, e);
|
|
343
|
+
}
|
|
344
|
+
var Kt = (e, r, t, i) => {
|
|
345
|
+
const u = {};
|
|
346
|
+
for (const n of e) {
|
|
347
|
+
const f = d(r, n);
|
|
348
|
+
f && E(u, n, f._f);
|
|
349
|
+
}
|
|
350
|
+
return {
|
|
351
|
+
criteriaMode: t,
|
|
352
|
+
names: [...e],
|
|
353
|
+
fields: u,
|
|
354
|
+
shouldUseNativeValidation: i
|
|
355
|
+
};
|
|
356
|
+
}, xe = (e) => e instanceof RegExp, _e = (e) => R(e) ? e : xe(e) ? e.source : I(e) ? xe(e.value) ? e.value.source : e.value : e, de = (e) => ({
|
|
357
|
+
isOnSubmit: !e || e === Q.onSubmit,
|
|
358
|
+
isOnBlur: e === Q.onBlur,
|
|
359
|
+
isOnChange: e === Q.onChange,
|
|
360
|
+
isOnAll: e === Q.all,
|
|
361
|
+
isOnTouch: e === Q.onTouched
|
|
362
|
+
});
|
|
363
|
+
const dt = "AsyncFunction";
|
|
364
|
+
var zt = (e) => !!e && !!e.validate && !!(X(e.validate) && e.validate.constructor.name === dt || I(e.validate) && Object.values(e.validate).find((r) => r.constructor.name === dt)), Gt = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), He = (e, r, t) => !t && (r.watchAll || r.watch.has(e) || [...r.watch].some((i) => e.startsWith(i) && /^\.\w+/.test(e.slice(i.length))));
|
|
365
|
+
const fe = (e, r, t, i) => {
|
|
366
|
+
for (const u of t || Object.keys(e)) {
|
|
367
|
+
const n = d(e, u);
|
|
368
|
+
if (n) {
|
|
369
|
+
const { _f: f, ...c } = n;
|
|
370
|
+
if (f) {
|
|
371
|
+
if (f.refs && f.refs[0] && r(f.refs[0], u) && !i)
|
|
372
|
+
return !0;
|
|
373
|
+
if (f.ref && r(f.ref, f.name) && !i)
|
|
374
|
+
return !0;
|
|
375
|
+
if (fe(c, r))
|
|
376
|
+
break;
|
|
377
|
+
} else if (I(c) && fe(c, r))
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
function ft(e, r, t) {
|
|
383
|
+
const i = d(e, t);
|
|
384
|
+
if (i || Se(t))
|
|
385
|
+
return {
|
|
386
|
+
error: i,
|
|
387
|
+
name: t
|
|
388
|
+
};
|
|
389
|
+
const u = t.split(".");
|
|
390
|
+
for (; u.length; ) {
|
|
391
|
+
const n = u.join("."), f = d(r, n), c = d(e, n);
|
|
392
|
+
if (f && !Array.isArray(f) && t !== n)
|
|
393
|
+
return { name: t };
|
|
394
|
+
if (c && c.type)
|
|
395
|
+
return {
|
|
396
|
+
name: n,
|
|
397
|
+
error: c
|
|
398
|
+
};
|
|
399
|
+
if (c && c.root && c.root.type)
|
|
400
|
+
return {
|
|
401
|
+
name: `${n}.root`,
|
|
402
|
+
error: c.root
|
|
403
|
+
};
|
|
404
|
+
u.pop();
|
|
405
|
+
}
|
|
406
|
+
return {
|
|
407
|
+
name: t
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
var Yt = (e, r, t, i) => {
|
|
411
|
+
t(e);
|
|
412
|
+
const { name: u, ...n } = e;
|
|
413
|
+
return $(n) || Object.keys(n).length >= Object.keys(r).length || Object.keys(n).find((f) => r[f] === (!i || Q.all));
|
|
414
|
+
}, Jt = (e, r, t) => !e || !r || e === r || z(e).some((i) => i && (t ? i === r : i.startsWith(r) || r.startsWith(i))), Qt = (e, r, t, i, u) => u.isOnAll ? !1 : !t && u.isOnTouch ? !(r || e) : (t ? i.isOnBlur : u.isOnBlur) ? !e : (t ? i.isOnChange : u.isOnChange) ? e : !0, Xt = (e, r) => !we(d(e, r)).length && T(e, r), kt = (e, r, t) => {
|
|
415
|
+
const i = z(d(e, t));
|
|
416
|
+
return E(i, "root", r[t]), E(e, t, i), e;
|
|
417
|
+
}, be = (e) => re(e);
|
|
418
|
+
function yt(e, r, t = "validate") {
|
|
419
|
+
if (be(e) || Array.isArray(e) && e.every(be) || Y(e) && !e)
|
|
420
|
+
return {
|
|
421
|
+
type: t,
|
|
422
|
+
message: be(e) ? e : "",
|
|
423
|
+
ref: r
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
var ce = (e) => I(e) && !xe(e) ? e : {
|
|
427
|
+
value: e,
|
|
428
|
+
message: ""
|
|
429
|
+
}, $e = async (e, r, t, i, u, n) => {
|
|
430
|
+
const { ref: f, refs: c, required: S, maxLength: x, minLength: A, min: w, max: h, pattern: G, validate: q, name: C, valueAsNumber: B, mount: ae } = e._f, V = d(t, C);
|
|
431
|
+
if (!ae || r.has(C))
|
|
432
|
+
return {};
|
|
433
|
+
const P = c ? c[0] : f, N = (k) => {
|
|
434
|
+
u && P.reportValidity && (P.setCustomValidity(Y(k) ? "" : k || ""), P.reportValidity());
|
|
435
|
+
}, _ = {}, m = Ye(f), F = he(f), U = m || F, W = (B || Ge(f)) && R(f.value) && R(V) || Fe(f) && f.value === "" || V === "" || Array.isArray(V) && !V.length, Z = qt.bind(null, C, i, _), ee = (k, p, L, H = se.maxLength, K = se.minLength) => {
|
|
436
|
+
const te = k ? p : L;
|
|
437
|
+
_[C] = {
|
|
438
|
+
type: k ? H : K,
|
|
439
|
+
message: te,
|
|
440
|
+
ref: f,
|
|
441
|
+
...Z(k ? H : K, te)
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
if (n ? !Array.isArray(V) || !V.length : S && (!U && (W || j(V)) || Y(V) && !V || F && !xt(c).isValid || m && !wt(c).isValid)) {
|
|
445
|
+
const { value: k, message: p } = be(S) ? { value: !!S, message: S } : ce(S);
|
|
446
|
+
if (k && (_[C] = {
|
|
447
|
+
type: se.required,
|
|
448
|
+
message: p,
|
|
449
|
+
ref: P,
|
|
450
|
+
...Z(se.required, p)
|
|
451
|
+
}, !i))
|
|
452
|
+
return N(p), _;
|
|
453
|
+
}
|
|
454
|
+
if (!W && (!j(w) || !j(h))) {
|
|
455
|
+
let k, p;
|
|
456
|
+
const L = ce(h), H = ce(w);
|
|
457
|
+
if (!j(V) && !isNaN(V)) {
|
|
458
|
+
const K = f.valueAsNumber || V && +V;
|
|
459
|
+
j(L.value) || (k = K > L.value), j(H.value) || (p = K < H.value);
|
|
460
|
+
} else {
|
|
461
|
+
const K = f.valueAsDate || new Date(V), te = (me) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + me), ye = f.type == "time", oe = f.type == "week";
|
|
462
|
+
re(L.value) && V && (k = ye ? te(V) > te(L.value) : oe ? V > L.value : K > new Date(L.value)), re(H.value) && V && (p = ye ? te(V) < te(H.value) : oe ? V < H.value : K < new Date(H.value));
|
|
463
|
+
}
|
|
464
|
+
if ((k || p) && (ee(!!k, L.message, H.message, se.max, se.min), !i))
|
|
465
|
+
return N(_[C].message), _;
|
|
466
|
+
}
|
|
467
|
+
if ((x || A) && !W && (re(V) || n && Array.isArray(V))) {
|
|
468
|
+
const k = ce(x), p = ce(A), L = !j(k.value) && V.length > +k.value, H = !j(p.value) && V.length < +p.value;
|
|
469
|
+
if ((L || H) && (ee(L, k.message, p.message), !i))
|
|
470
|
+
return N(_[C].message), _;
|
|
471
|
+
}
|
|
472
|
+
if (G && !W && re(V)) {
|
|
473
|
+
const { value: k, message: p } = ce(G);
|
|
474
|
+
if (xe(k) && !V.match(k) && (_[C] = {
|
|
475
|
+
type: se.pattern,
|
|
476
|
+
message: p,
|
|
477
|
+
ref: f,
|
|
478
|
+
...Z(se.pattern, p)
|
|
479
|
+
}, !i))
|
|
480
|
+
return N(p), _;
|
|
481
|
+
}
|
|
482
|
+
if (q) {
|
|
483
|
+
if (X(q)) {
|
|
484
|
+
const k = await q(V, t), p = yt(k, P);
|
|
485
|
+
if (p && (_[C] = {
|
|
486
|
+
...p,
|
|
487
|
+
...Z(se.validate, p.message)
|
|
488
|
+
}, !i))
|
|
489
|
+
return N(p.message), _;
|
|
490
|
+
} else if (I(q)) {
|
|
491
|
+
let k = {};
|
|
492
|
+
for (const p in q) {
|
|
493
|
+
if (!$(k) && !i)
|
|
494
|
+
break;
|
|
495
|
+
const L = yt(await q[p](V, t), P, p);
|
|
496
|
+
L && (k = {
|
|
497
|
+
...L,
|
|
498
|
+
...Z(p, L.message)
|
|
499
|
+
}, N(L.message), i && (_[C] = k));
|
|
500
|
+
}
|
|
501
|
+
if (!$(k) && (_[C] = {
|
|
502
|
+
ref: P,
|
|
503
|
+
...k
|
|
504
|
+
}, !i))
|
|
505
|
+
return _;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
return N(!0), _;
|
|
509
|
+
};
|
|
510
|
+
const Zt = {
|
|
511
|
+
mode: Q.onSubmit,
|
|
512
|
+
reValidateMode: Q.onChange,
|
|
513
|
+
shouldFocusError: !0
|
|
514
|
+
};
|
|
515
|
+
function er(e = {}) {
|
|
516
|
+
let r = {
|
|
517
|
+
...Zt,
|
|
518
|
+
...e
|
|
519
|
+
}, t = {
|
|
520
|
+
submitCount: 0,
|
|
521
|
+
isDirty: !1,
|
|
522
|
+
isReady: !1,
|
|
523
|
+
isLoading: X(r.defaultValues),
|
|
524
|
+
isValidating: !1,
|
|
525
|
+
isSubmitted: !1,
|
|
526
|
+
isSubmitting: !1,
|
|
527
|
+
isSubmitSuccessful: !1,
|
|
528
|
+
isValid: !1,
|
|
529
|
+
touchedFields: {},
|
|
530
|
+
dirtyFields: {},
|
|
531
|
+
validatingFields: {},
|
|
532
|
+
errors: r.errors || {},
|
|
533
|
+
disabled: r.disabled || !1
|
|
534
|
+
}, i = {}, u = I(r.defaultValues) || I(r.values) ? O(r.defaultValues || r.values) || {} : {}, n = r.shouldUnregister ? {} : O(u), f = {
|
|
535
|
+
action: !1,
|
|
536
|
+
mount: !1,
|
|
537
|
+
watch: !1
|
|
538
|
+
}, c = {
|
|
539
|
+
mount: /* @__PURE__ */ new Set(),
|
|
540
|
+
disabled: /* @__PURE__ */ new Set(),
|
|
541
|
+
unMount: /* @__PURE__ */ new Set(),
|
|
542
|
+
array: /* @__PURE__ */ new Set(),
|
|
543
|
+
watch: /* @__PURE__ */ new Set()
|
|
544
|
+
}, S, x = 0;
|
|
545
|
+
const A = {
|
|
546
|
+
isDirty: !1,
|
|
547
|
+
dirtyFields: !1,
|
|
548
|
+
validatingFields: !1,
|
|
549
|
+
touchedFields: !1,
|
|
550
|
+
isValidating: !1,
|
|
551
|
+
isValid: !1,
|
|
552
|
+
errors: !1
|
|
553
|
+
};
|
|
554
|
+
let w = {
|
|
555
|
+
...A
|
|
556
|
+
};
|
|
557
|
+
const h = {
|
|
558
|
+
array: ut(),
|
|
559
|
+
state: ut()
|
|
560
|
+
}, G = r.criteriaMode === Q.all, q = (s) => (a) => {
|
|
561
|
+
clearTimeout(x), x = setTimeout(s, a);
|
|
562
|
+
}, C = async (s) => {
|
|
563
|
+
if (!r.disabled && (A.isValid || w.isValid || s)) {
|
|
564
|
+
const a = r.resolver ? $((await F()).errors) : await W(i, !0);
|
|
565
|
+
a !== t.isValid && h.state.next({
|
|
566
|
+
isValid: a
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
}, B = (s, a) => {
|
|
570
|
+
!r.disabled && (A.isValidating || A.validatingFields || w.isValidating || w.validatingFields) && ((s || Array.from(c.mount)).forEach((l) => {
|
|
571
|
+
l && (a ? E(t.validatingFields, l, a) : T(t.validatingFields, l));
|
|
572
|
+
}), h.state.next({
|
|
573
|
+
validatingFields: t.validatingFields,
|
|
574
|
+
isValidating: !$(t.validatingFields)
|
|
575
|
+
}));
|
|
576
|
+
}, ae = (s, a = [], l, g, y = !0, o = !0) => {
|
|
577
|
+
if (g && l && !r.disabled) {
|
|
578
|
+
if (f.action = !0, o && Array.isArray(d(i, s))) {
|
|
579
|
+
const v = l(d(i, s), g.argA, g.argB);
|
|
580
|
+
y && E(i, s, v);
|
|
581
|
+
}
|
|
582
|
+
if (o && Array.isArray(d(t.errors, s))) {
|
|
583
|
+
const v = l(d(t.errors, s), g.argA, g.argB);
|
|
584
|
+
y && E(t.errors, s, v), Xt(t.errors, s);
|
|
585
|
+
}
|
|
586
|
+
if ((A.touchedFields || w.touchedFields) && o && Array.isArray(d(t.touchedFields, s))) {
|
|
587
|
+
const v = l(d(t.touchedFields, s), g.argA, g.argB);
|
|
588
|
+
y && E(t.touchedFields, s, v);
|
|
589
|
+
}
|
|
590
|
+
(A.dirtyFields || w.dirtyFields) && (t.dirtyFields = ge(u, n)), h.state.next({
|
|
591
|
+
name: s,
|
|
592
|
+
isDirty: ee(s, a),
|
|
593
|
+
dirtyFields: t.dirtyFields,
|
|
594
|
+
errors: t.errors,
|
|
595
|
+
isValid: t.isValid
|
|
596
|
+
});
|
|
597
|
+
} else
|
|
598
|
+
E(n, s, a);
|
|
599
|
+
}, V = (s, a) => {
|
|
600
|
+
E(t.errors, s, a), h.state.next({
|
|
601
|
+
errors: t.errors
|
|
602
|
+
});
|
|
603
|
+
}, P = (s) => {
|
|
604
|
+
t.errors = s, h.state.next({
|
|
605
|
+
errors: t.errors,
|
|
606
|
+
isValid: !1
|
|
607
|
+
});
|
|
608
|
+
}, N = (s, a, l, g) => {
|
|
609
|
+
const y = d(i, s);
|
|
610
|
+
if (y) {
|
|
611
|
+
const o = d(n, s, R(l) ? d(u, s) : l);
|
|
612
|
+
R(o) || g && g.defaultChecked || a ? E(n, s, a ? o : ct(y._f)) : L(s, o), f.mount && C();
|
|
613
|
+
}
|
|
614
|
+
}, _ = (s, a, l, g, y) => {
|
|
615
|
+
let o = !1, v = !1;
|
|
616
|
+
const D = {
|
|
617
|
+
name: s
|
|
618
|
+
};
|
|
619
|
+
if (!r.disabled) {
|
|
620
|
+
if (!l || g) {
|
|
621
|
+
(A.isDirty || w.isDirty) && (v = t.isDirty, t.isDirty = D.isDirty = ee(), o = v !== D.isDirty);
|
|
622
|
+
const M = ie(d(u, s), a);
|
|
623
|
+
v = !!d(t.dirtyFields, s), M ? T(t.dirtyFields, s) : E(t.dirtyFields, s, !0), D.dirtyFields = t.dirtyFields, o = o || (A.dirtyFields || w.dirtyFields) && v !== !M;
|
|
624
|
+
}
|
|
625
|
+
if (l) {
|
|
626
|
+
const M = d(t.touchedFields, s);
|
|
627
|
+
M || (E(t.touchedFields, s, l), D.touchedFields = t.touchedFields, o = o || (A.touchedFields || w.touchedFields) && M !== l);
|
|
628
|
+
}
|
|
629
|
+
o && y && h.state.next(D);
|
|
630
|
+
}
|
|
631
|
+
return o ? D : {};
|
|
632
|
+
}, m = (s, a, l, g) => {
|
|
633
|
+
const y = d(t.errors, s), o = (A.isValid || w.isValid) && Y(a) && t.isValid !== a;
|
|
634
|
+
if (r.delayError && l ? (S = q(() => V(s, l)), S(r.delayError)) : (clearTimeout(x), S = null, l ? E(t.errors, s, l) : T(t.errors, s)), (l ? !ie(y, l) : y) || !$(g) || o) {
|
|
635
|
+
const v = {
|
|
636
|
+
...g,
|
|
637
|
+
...o && Y(a) ? { isValid: a } : {},
|
|
638
|
+
errors: t.errors,
|
|
639
|
+
name: s
|
|
640
|
+
};
|
|
641
|
+
t = {
|
|
642
|
+
...t,
|
|
643
|
+
...v
|
|
644
|
+
}, h.state.next(v);
|
|
645
|
+
}
|
|
646
|
+
}, F = async (s) => {
|
|
647
|
+
B(s, !0);
|
|
648
|
+
const a = await r.resolver(n, r.context, Kt(s || c.mount, i, r.criteriaMode, r.shouldUseNativeValidation));
|
|
649
|
+
return B(s), a;
|
|
650
|
+
}, U = async (s) => {
|
|
651
|
+
const { errors: a } = await F(s);
|
|
652
|
+
if (s)
|
|
653
|
+
for (const l of s) {
|
|
654
|
+
const g = d(a, l);
|
|
655
|
+
g ? E(t.errors, l, g) : T(t.errors, l);
|
|
656
|
+
}
|
|
657
|
+
else
|
|
658
|
+
t.errors = a;
|
|
659
|
+
return a;
|
|
660
|
+
}, W = async (s, a, l = {
|
|
661
|
+
valid: !0
|
|
662
|
+
}) => {
|
|
663
|
+
for (const g in s) {
|
|
664
|
+
const y = s[g];
|
|
665
|
+
if (y) {
|
|
666
|
+
const { _f: o, ...v } = y;
|
|
667
|
+
if (o) {
|
|
668
|
+
const D = c.array.has(o.name), M = y._f && zt(y._f);
|
|
669
|
+
M && A.validatingFields && B([g], !0);
|
|
670
|
+
const J = await $e(y, c.disabled, n, G, r.shouldUseNativeValidation && !a, D);
|
|
671
|
+
if (M && A.validatingFields && B([g]), J[o.name] && (l.valid = !1, a))
|
|
672
|
+
break;
|
|
673
|
+
!a && (d(J, o.name) ? D ? kt(t.errors, J, o.name) : E(t.errors, o.name, J[o.name]) : T(t.errors, o.name));
|
|
674
|
+
}
|
|
675
|
+
!$(v) && await W(v, a, l);
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
return l.valid;
|
|
679
|
+
}, Z = () => {
|
|
680
|
+
for (const s of c.unMount) {
|
|
681
|
+
const a = d(i, s);
|
|
682
|
+
a && (a._f.refs ? a._f.refs.every((l) => !Re(l)) : !Re(a._f.ref)) && pe(s);
|
|
683
|
+
}
|
|
684
|
+
c.unMount = /* @__PURE__ */ new Set();
|
|
685
|
+
}, ee = (s, a) => !r.disabled && (s && a && E(n, s, a), !ie(me(), u)), k = (s, a, l) => bt(s, c, {
|
|
686
|
+
...f.mount ? n : R(a) ? u : re(s) ? { [s]: a } : a
|
|
687
|
+
}, l, a), p = (s) => we(d(f.mount ? n : u, s, r.shouldUnregister ? d(u, s, []) : [])), L = (s, a, l = {}) => {
|
|
688
|
+
const g = d(i, s);
|
|
689
|
+
let y = a;
|
|
690
|
+
if (g) {
|
|
691
|
+
const o = g._f;
|
|
692
|
+
o && (!o.disabled && E(n, s, St(a, o)), y = Fe(o.ref) && j(a) ? "" : a, Vt(o.ref) ? [...o.ref.options].forEach((v) => v.selected = y.includes(v.value)) : o.refs ? he(o.ref) ? o.refs.forEach((v) => {
|
|
693
|
+
(!v.defaultChecked || !v.disabled) && (Array.isArray(y) ? v.checked = !!y.find((D) => D === v.value) : v.checked = y === v.value || !!y);
|
|
694
|
+
}) : o.refs.forEach((v) => v.checked = v.value === y) : Ge(o.ref) ? o.ref.value = "" : (o.ref.value = y, o.ref.type || h.state.next({
|
|
695
|
+
name: s,
|
|
696
|
+
values: O(n)
|
|
697
|
+
})));
|
|
698
|
+
}
|
|
699
|
+
(l.shouldDirty || l.shouldTouch) && _(s, y, l.shouldTouch, l.shouldDirty, !0), l.shouldValidate && oe(s);
|
|
700
|
+
}, H = (s, a, l) => {
|
|
701
|
+
for (const g in a) {
|
|
702
|
+
if (!a.hasOwnProperty(g))
|
|
703
|
+
return;
|
|
704
|
+
const y = a[g], o = s + "." + g, v = d(i, o);
|
|
705
|
+
(c.array.has(s) || I(y) || v && !v._f) && !le(y) ? H(o, y, l) : L(o, y, l);
|
|
706
|
+
}
|
|
707
|
+
}, K = (s, a, l = {}) => {
|
|
708
|
+
const g = d(i, s), y = c.array.has(s), o = O(a);
|
|
709
|
+
E(n, s, o), y ? (h.array.next({
|
|
710
|
+
name: s,
|
|
711
|
+
values: O(n)
|
|
712
|
+
}), (A.isDirty || A.dirtyFields || w.isDirty || w.dirtyFields) && l.shouldDirty && h.state.next({
|
|
713
|
+
name: s,
|
|
714
|
+
dirtyFields: ge(u, n),
|
|
715
|
+
isDirty: ee(s, o)
|
|
716
|
+
})) : g && !g._f && !j(o) ? H(s, o, l) : L(s, o, l), He(s, c) && h.state.next({ ...t, name: s }), h.state.next({
|
|
717
|
+
name: f.mount ? s : void 0,
|
|
718
|
+
values: O(n)
|
|
719
|
+
});
|
|
720
|
+
}, te = async (s) => {
|
|
721
|
+
f.mount = !0;
|
|
722
|
+
const a = s.target;
|
|
723
|
+
let l = a.name, g = !0;
|
|
724
|
+
const y = d(i, l), o = (M) => {
|
|
725
|
+
g = Number.isNaN(M) || le(M) && isNaN(M.getTime()) || ie(M, d(n, l, M));
|
|
726
|
+
}, v = de(r.mode), D = de(r.reValidateMode);
|
|
727
|
+
if (y) {
|
|
728
|
+
let M, J;
|
|
729
|
+
const ve = a.type ? ct(y._f) : ht(s), ue = s.type === Ve.BLUR || s.type === Ve.FOCUS_OUT, Ut = !Gt(y._f) && !r.resolver && !d(t.errors, l) && !y._f.deps || Qt(ue, d(t.touchedFields, l), t.isSubmitted, D, v), Me = He(l, c, ue);
|
|
730
|
+
E(n, l, ve), ue ? (!a || !a.readOnly) && (y._f.onBlur && y._f.onBlur(s), S && S(0)) : y._f.onChange && y._f.onChange(s);
|
|
731
|
+
const Oe = _(l, ve, ue), Lt = !$(Oe) || Me;
|
|
732
|
+
if (!ue && h.state.next({
|
|
733
|
+
name: l,
|
|
734
|
+
type: s.type,
|
|
735
|
+
values: O(n)
|
|
736
|
+
}), Ut)
|
|
737
|
+
return (A.isValid || w.isValid) && (r.mode === "onBlur" ? ue && C() : ue || C()), Lt && h.state.next({ name: l, ...Me ? {} : Oe });
|
|
738
|
+
if (!ue && Me && h.state.next({ ...t }), r.resolver) {
|
|
739
|
+
const { errors: it } = await F([l]);
|
|
740
|
+
if (o(ve), g) {
|
|
741
|
+
const Tt = ft(t.errors, i, l), at = ft(it, i, Tt.name || l);
|
|
742
|
+
M = at.error, l = at.name, J = $(it);
|
|
743
|
+
}
|
|
744
|
+
} else
|
|
745
|
+
B([l], !0), M = (await $e(y, c.disabled, n, G, r.shouldUseNativeValidation))[l], B([l]), o(ve), g && (M ? J = !1 : (A.isValid || w.isValid) && (J = await W(i, !0)));
|
|
746
|
+
g && (y._f.deps && oe(y._f.deps), m(l, J, M, Oe));
|
|
747
|
+
}
|
|
748
|
+
}, ye = (s, a) => {
|
|
749
|
+
if (d(t.errors, a) && s.focus)
|
|
750
|
+
return s.focus(), 1;
|
|
751
|
+
}, oe = async (s, a = {}) => {
|
|
752
|
+
let l, g;
|
|
753
|
+
const y = z(s);
|
|
754
|
+
if (r.resolver) {
|
|
755
|
+
const o = await U(R(s) ? s : y);
|
|
756
|
+
l = $(o), g = s ? !y.some((v) => d(o, v)) : l;
|
|
757
|
+
} else s ? (g = (await Promise.all(y.map(async (o) => {
|
|
758
|
+
const v = d(i, o);
|
|
759
|
+
return await W(v && v._f ? { [o]: v } : v);
|
|
760
|
+
}))).every(Boolean), !(!g && !t.isValid) && C()) : g = l = await W(i);
|
|
761
|
+
return h.state.next({
|
|
762
|
+
...!re(s) || (A.isValid || w.isValid) && l !== t.isValid ? {} : { name: s },
|
|
763
|
+
...r.resolver || !s ? { isValid: l } : {},
|
|
764
|
+
errors: t.errors
|
|
765
|
+
}), a.shouldFocus && !g && fe(i, ye, s ? y : c.mount), g;
|
|
766
|
+
}, me = (s) => {
|
|
767
|
+
const a = {
|
|
768
|
+
...f.mount ? n : u
|
|
769
|
+
};
|
|
770
|
+
return R(s) ? a : re(s) ? d(a, s) : s.map((l) => d(a, l));
|
|
771
|
+
}, Je = (s, a) => ({
|
|
772
|
+
invalid: !!d((a || t).errors, s),
|
|
773
|
+
isDirty: !!d((a || t).dirtyFields, s),
|
|
774
|
+
error: d((a || t).errors, s),
|
|
775
|
+
isValidating: !!d(t.validatingFields, s),
|
|
776
|
+
isTouched: !!d((a || t).touchedFields, s)
|
|
777
|
+
}), Dt = (s) => {
|
|
778
|
+
s && z(s).forEach((a) => T(t.errors, a)), h.state.next({
|
|
779
|
+
errors: s ? t.errors : {}
|
|
780
|
+
});
|
|
781
|
+
}, Qe = (s, a, l) => {
|
|
782
|
+
const g = (d(i, s, { _f: {} })._f || {}).ref, y = d(t.errors, s) || {}, { ref: o, message: v, type: D, ...M } = y;
|
|
783
|
+
E(t.errors, s, {
|
|
784
|
+
...M,
|
|
785
|
+
...a,
|
|
786
|
+
ref: g
|
|
787
|
+
}), h.state.next({
|
|
788
|
+
name: s,
|
|
789
|
+
errors: t.errors,
|
|
790
|
+
isValid: !1
|
|
791
|
+
}), l && l.shouldFocus && g && g.focus && g.focus();
|
|
792
|
+
}, pt = (s, a) => X(s) ? h.state.subscribe({
|
|
793
|
+
next: (l) => "values" in l && s(k(void 0, a), l)
|
|
794
|
+
}) : k(s, a, !0), Xe = (s) => h.state.subscribe({
|
|
795
|
+
next: (a) => {
|
|
796
|
+
Jt(s.name, a.name, s.exact) && Yt(a, s.formState || A, Rt, s.reRenderRoot) && s.callback({
|
|
797
|
+
values: { ...n },
|
|
798
|
+
...t,
|
|
799
|
+
...a,
|
|
800
|
+
defaultValues: u
|
|
801
|
+
});
|
|
802
|
+
}
|
|
803
|
+
}).unsubscribe, Et = (s) => (f.mount = !0, w = {
|
|
804
|
+
...w,
|
|
805
|
+
...s.formState
|
|
806
|
+
}, Xe({
|
|
807
|
+
...s,
|
|
808
|
+
formState: w
|
|
809
|
+
})), pe = (s, a = {}) => {
|
|
810
|
+
for (const l of s ? z(s) : c.mount)
|
|
811
|
+
c.mount.delete(l), c.array.delete(l), a.keepValue || (T(i, l), T(n, l)), !a.keepError && T(t.errors, l), !a.keepDirty && T(t.dirtyFields, l), !a.keepTouched && T(t.touchedFields, l), !a.keepIsValidating && T(t.validatingFields, l), !r.shouldUnregister && !a.keepDefaultValue && T(u, l);
|
|
812
|
+
h.state.next({
|
|
813
|
+
values: O(n)
|
|
814
|
+
}), h.state.next({
|
|
815
|
+
...t,
|
|
816
|
+
...a.keepDirty ? { isDirty: ee() } : {}
|
|
817
|
+
}), !a.keepIsValid && C();
|
|
818
|
+
}, Ze = ({ disabled: s, name: a }) => {
|
|
819
|
+
(Y(s) && f.mount || s || c.disabled.has(a)) && (s ? c.disabled.add(a) : c.disabled.delete(a));
|
|
820
|
+
}, Ee = (s, a = {}) => {
|
|
821
|
+
let l = d(i, s);
|
|
822
|
+
const g = Y(a.disabled) || Y(r.disabled);
|
|
823
|
+
return E(i, s, {
|
|
824
|
+
...l || {},
|
|
825
|
+
_f: {
|
|
826
|
+
...l && l._f ? l._f : { ref: { name: s } },
|
|
827
|
+
name: s,
|
|
828
|
+
mount: !0,
|
|
829
|
+
...a
|
|
830
|
+
}
|
|
831
|
+
}), c.mount.add(s), l ? Ze({
|
|
832
|
+
disabled: Y(a.disabled) ? a.disabled : r.disabled,
|
|
833
|
+
name: s
|
|
834
|
+
}) : N(s, !0, a.value), {
|
|
835
|
+
...g ? { disabled: a.disabled || r.disabled } : {},
|
|
836
|
+
...r.progressive ? {
|
|
837
|
+
required: !!a.required,
|
|
838
|
+
min: _e(a.min),
|
|
839
|
+
max: _e(a.max),
|
|
840
|
+
minLength: _e(a.minLength),
|
|
841
|
+
maxLength: _e(a.maxLength),
|
|
842
|
+
pattern: _e(a.pattern)
|
|
843
|
+
} : {},
|
|
844
|
+
name: s,
|
|
845
|
+
onChange: te,
|
|
846
|
+
onBlur: te,
|
|
847
|
+
ref: (y) => {
|
|
848
|
+
if (y) {
|
|
849
|
+
Ee(s, a), l = d(i, s);
|
|
850
|
+
const o = R(y.value) && y.querySelectorAll && y.querySelectorAll("input,select,textarea")[0] || y, v = Ht(o), D = l._f.refs || [];
|
|
851
|
+
if (v ? D.find((M) => M === o) : o === l._f.ref)
|
|
852
|
+
return;
|
|
853
|
+
E(i, s, {
|
|
854
|
+
_f: {
|
|
855
|
+
...l._f,
|
|
856
|
+
...v ? {
|
|
857
|
+
refs: [
|
|
858
|
+
...D.filter(Re),
|
|
859
|
+
o,
|
|
860
|
+
...Array.isArray(d(u, s)) ? [{}] : []
|
|
861
|
+
],
|
|
862
|
+
ref: { type: o.type, name: s }
|
|
863
|
+
} : { ref: o }
|
|
864
|
+
}
|
|
865
|
+
}), N(s, !1, void 0, o);
|
|
866
|
+
} else
|
|
867
|
+
l = d(i, s, {}), l._f && (l._f.mount = !1), (r.shouldUnregister || a.shouldUnregister) && !(mt(c.array, s) && f.action) && c.unMount.add(s);
|
|
868
|
+
}
|
|
869
|
+
};
|
|
870
|
+
}, Ce = () => r.shouldFocusError && fe(i, ye, c.mount), Ct = (s) => {
|
|
871
|
+
Y(s) && (h.state.next({ disabled: s }), fe(i, (a, l) => {
|
|
872
|
+
const g = d(i, l);
|
|
873
|
+
g && (a.disabled = g._f.disabled || s, Array.isArray(g._f.refs) && g._f.refs.forEach((y) => {
|
|
874
|
+
y.disabled = g._f.disabled || s;
|
|
875
|
+
}));
|
|
876
|
+
}, 0, !1));
|
|
877
|
+
}, et = (s, a) => async (l) => {
|
|
878
|
+
let g;
|
|
879
|
+
l && (l.preventDefault && l.preventDefault(), l.persist && l.persist());
|
|
880
|
+
let y = O(n);
|
|
881
|
+
if (h.state.next({
|
|
882
|
+
isSubmitting: !0
|
|
883
|
+
}), r.resolver) {
|
|
884
|
+
const { errors: o, values: v } = await F();
|
|
885
|
+
t.errors = o, y = O(v);
|
|
886
|
+
} else
|
|
887
|
+
await W(i);
|
|
888
|
+
if (c.disabled.size)
|
|
889
|
+
for (const o of c.disabled)
|
|
890
|
+
T(y, o);
|
|
891
|
+
if (T(t.errors, "root"), $(t.errors)) {
|
|
892
|
+
h.state.next({
|
|
893
|
+
errors: {}
|
|
894
|
+
});
|
|
895
|
+
try {
|
|
896
|
+
await s(y, l);
|
|
897
|
+
} catch (o) {
|
|
898
|
+
g = o;
|
|
899
|
+
}
|
|
900
|
+
} else
|
|
901
|
+
a && await a({ ...t.errors }, l), Ce(), setTimeout(Ce);
|
|
902
|
+
if (h.state.next({
|
|
903
|
+
isSubmitted: !0,
|
|
904
|
+
isSubmitting: !1,
|
|
905
|
+
isSubmitSuccessful: $(t.errors) && !g,
|
|
906
|
+
submitCount: t.submitCount + 1,
|
|
907
|
+
errors: t.errors
|
|
908
|
+
}), g)
|
|
909
|
+
throw g;
|
|
910
|
+
}, Mt = (s, a = {}) => {
|
|
911
|
+
d(i, s) && (R(a.defaultValue) ? K(s, O(d(u, s))) : (K(s, a.defaultValue), E(u, s, O(a.defaultValue))), a.keepTouched || T(t.touchedFields, s), a.keepDirty || (T(t.dirtyFields, s), t.isDirty = a.defaultValue ? ee(s, O(d(u, s))) : ee()), a.keepError || (T(t.errors, s), A.isValid && C()), h.state.next({ ...t }));
|
|
912
|
+
}, tt = (s, a = {}) => {
|
|
913
|
+
const l = s ? O(s) : u, g = O(l), y = $(s), o = y ? u : g;
|
|
914
|
+
if (a.keepDefaultValues || (u = l), !a.keepValues) {
|
|
915
|
+
if (a.keepDirtyValues) {
|
|
916
|
+
const v = /* @__PURE__ */ new Set([
|
|
917
|
+
...c.mount,
|
|
918
|
+
...Object.keys(ge(u, n))
|
|
919
|
+
]);
|
|
920
|
+
for (const D of Array.from(v))
|
|
921
|
+
d(t.dirtyFields, D) ? E(o, D, d(n, D)) : K(D, d(o, D));
|
|
922
|
+
} else {
|
|
923
|
+
if (je && R(s))
|
|
924
|
+
for (const v of c.mount) {
|
|
925
|
+
const D = d(i, v);
|
|
926
|
+
if (D && D._f) {
|
|
927
|
+
const M = Array.isArray(D._f.refs) ? D._f.refs[0] : D._f.ref;
|
|
928
|
+
if (Fe(M)) {
|
|
929
|
+
const J = M.closest("form");
|
|
930
|
+
if (J) {
|
|
931
|
+
J.reset();
|
|
932
|
+
break;
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
if (a.keepFieldsRef)
|
|
938
|
+
for (const v of c.mount)
|
|
939
|
+
K(v, d(o, v));
|
|
940
|
+
else
|
|
941
|
+
i = {};
|
|
942
|
+
}
|
|
943
|
+
n = r.shouldUnregister ? a.keepDefaultValues ? O(u) : {} : O(o), h.array.next({
|
|
944
|
+
values: { ...o }
|
|
945
|
+
}), h.state.next({
|
|
946
|
+
values: { ...o }
|
|
947
|
+
});
|
|
948
|
+
}
|
|
949
|
+
c = {
|
|
950
|
+
mount: a.keepDirtyValues ? c.mount : /* @__PURE__ */ new Set(),
|
|
951
|
+
unMount: /* @__PURE__ */ new Set(),
|
|
952
|
+
array: /* @__PURE__ */ new Set(),
|
|
953
|
+
disabled: /* @__PURE__ */ new Set(),
|
|
954
|
+
watch: /* @__PURE__ */ new Set(),
|
|
955
|
+
watchAll: !1,
|
|
956
|
+
focus: ""
|
|
957
|
+
}, f.mount = !A.isValid || !!a.keepIsValid || !!a.keepDirtyValues, f.watch = !!r.shouldUnregister, h.state.next({
|
|
958
|
+
submitCount: a.keepSubmitCount ? t.submitCount : 0,
|
|
959
|
+
isDirty: y ? !1 : a.keepDirty ? t.isDirty : !!(a.keepDefaultValues && !ie(s, u)),
|
|
960
|
+
isSubmitted: a.keepIsSubmitted ? t.isSubmitted : !1,
|
|
961
|
+
dirtyFields: y ? {} : a.keepDirtyValues ? a.keepDefaultValues && n ? ge(u, n) : t.dirtyFields : a.keepDefaultValues && s ? ge(u, s) : a.keepDirty ? t.dirtyFields : {},
|
|
962
|
+
touchedFields: a.keepTouched ? t.touchedFields : {},
|
|
963
|
+
errors: a.keepErrors ? t.errors : {},
|
|
964
|
+
isSubmitSuccessful: a.keepIsSubmitSuccessful ? t.isSubmitSuccessful : !1,
|
|
965
|
+
isSubmitting: !1,
|
|
966
|
+
defaultValues: u
|
|
967
|
+
});
|
|
968
|
+
}, rt = (s, a) => tt(X(s) ? s(n) : s, a), Ot = (s, a = {}) => {
|
|
969
|
+
const l = d(i, s), g = l && l._f;
|
|
970
|
+
if (g) {
|
|
971
|
+
const y = g.refs ? g.refs[0] : g.ref;
|
|
972
|
+
y.focus && (y.focus(), a.shouldSelect && X(y.select) && y.select());
|
|
973
|
+
}
|
|
974
|
+
}, Rt = (s) => {
|
|
975
|
+
t = {
|
|
976
|
+
...t,
|
|
977
|
+
...s
|
|
978
|
+
};
|
|
979
|
+
}, st = {
|
|
980
|
+
control: {
|
|
981
|
+
register: Ee,
|
|
982
|
+
unregister: pe,
|
|
983
|
+
getFieldState: Je,
|
|
984
|
+
handleSubmit: et,
|
|
985
|
+
setError: Qe,
|
|
986
|
+
_subscribe: Xe,
|
|
987
|
+
_runSchema: F,
|
|
988
|
+
_focusError: Ce,
|
|
989
|
+
_getWatch: k,
|
|
990
|
+
_getDirty: ee,
|
|
991
|
+
_setValid: C,
|
|
992
|
+
_setFieldArray: ae,
|
|
993
|
+
_setDisabledField: Ze,
|
|
994
|
+
_setErrors: P,
|
|
995
|
+
_getFieldArray: p,
|
|
996
|
+
_reset: tt,
|
|
997
|
+
_resetDefaultValues: () => X(r.defaultValues) && r.defaultValues().then((s) => {
|
|
998
|
+
rt(s, r.resetOptions), h.state.next({
|
|
999
|
+
isLoading: !1
|
|
1000
|
+
});
|
|
1001
|
+
}),
|
|
1002
|
+
_removeUnmounted: Z,
|
|
1003
|
+
_disableForm: Ct,
|
|
1004
|
+
_subjects: h,
|
|
1005
|
+
_proxyFormState: A,
|
|
1006
|
+
get _fields() {
|
|
1007
|
+
return i;
|
|
1008
|
+
},
|
|
1009
|
+
get _formValues() {
|
|
1010
|
+
return n;
|
|
1011
|
+
},
|
|
1012
|
+
get _state() {
|
|
1013
|
+
return f;
|
|
1014
|
+
},
|
|
1015
|
+
set _state(s) {
|
|
1016
|
+
f = s;
|
|
1017
|
+
},
|
|
1018
|
+
get _defaultValues() {
|
|
1019
|
+
return u;
|
|
1020
|
+
},
|
|
1021
|
+
get _names() {
|
|
1022
|
+
return c;
|
|
1023
|
+
},
|
|
1024
|
+
set _names(s) {
|
|
1025
|
+
c = s;
|
|
1026
|
+
},
|
|
1027
|
+
get _formState() {
|
|
1028
|
+
return t;
|
|
1029
|
+
},
|
|
1030
|
+
get _options() {
|
|
1031
|
+
return r;
|
|
1032
|
+
},
|
|
1033
|
+
set _options(s) {
|
|
1034
|
+
r = {
|
|
1035
|
+
...r,
|
|
1036
|
+
...s
|
|
1037
|
+
};
|
|
1038
|
+
}
|
|
1039
|
+
},
|
|
1040
|
+
subscribe: Et,
|
|
1041
|
+
trigger: oe,
|
|
1042
|
+
register: Ee,
|
|
1043
|
+
handleSubmit: et,
|
|
1044
|
+
watch: pt,
|
|
1045
|
+
setValue: K,
|
|
1046
|
+
getValues: me,
|
|
1047
|
+
reset: rt,
|
|
1048
|
+
resetField: Mt,
|
|
1049
|
+
clearErrors: Dt,
|
|
1050
|
+
unregister: pe,
|
|
1051
|
+
setError: Qe,
|
|
1052
|
+
setFocus: Ot,
|
|
1053
|
+
getFieldState: Je
|
|
1054
|
+
};
|
|
1055
|
+
return {
|
|
1056
|
+
...st,
|
|
1057
|
+
formControl: st
|
|
1058
|
+
};
|
|
1059
|
+
}
|
|
1060
|
+
var ne = () => {
|
|
1061
|
+
if (typeof crypto < "u" && crypto.randomUUID)
|
|
1062
|
+
return crypto.randomUUID();
|
|
1063
|
+
const e = typeof performance > "u" ? Date.now() : performance.now() * 1e3;
|
|
1064
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (r) => {
|
|
1065
|
+
const t = (Math.random() * 16 + e) % 16 | 0;
|
|
1066
|
+
return (r == "x" ? t : t & 3 | 8).toString(16);
|
|
1067
|
+
});
|
|
1068
|
+
}, Ue = (e, r, t = {}) => t.shouldFocus || R(t.shouldFocus) ? t.focusName || `${e}.${R(t.focusIndex) ? r : t.focusIndex}.` : "", Le = (e, r) => [
|
|
1069
|
+
...e,
|
|
1070
|
+
...z(r)
|
|
1071
|
+
], Te = (e) => Array.isArray(e) ? e.map(() => {
|
|
1072
|
+
}) : void 0;
|
|
1073
|
+
function Ie(e, r, t) {
|
|
1074
|
+
return [
|
|
1075
|
+
...e.slice(0, r),
|
|
1076
|
+
...z(t),
|
|
1077
|
+
...e.slice(r)
|
|
1078
|
+
];
|
|
1079
|
+
}
|
|
1080
|
+
var Ne = (e, r, t) => Array.isArray(e) ? (R(e[t]) && (e[t] = void 0), e.splice(t, 0, e.splice(r, 1)[0]), e) : [], Be = (e, r) => [
|
|
1081
|
+
...z(r),
|
|
1082
|
+
...z(e)
|
|
1083
|
+
];
|
|
1084
|
+
function tr(e, r) {
|
|
1085
|
+
let t = 0;
|
|
1086
|
+
const i = [...e];
|
|
1087
|
+
for (const u of r)
|
|
1088
|
+
i.splice(u - t, 1), t++;
|
|
1089
|
+
return we(i).length ? i : [];
|
|
1090
|
+
}
|
|
1091
|
+
var Pe = (e, r) => R(r) ? [] : tr(e, z(r).sort((t, i) => t - i)), We = (e, r, t) => {
|
|
1092
|
+
[e[r], e[t]] = [e[t], e[r]];
|
|
1093
|
+
}, gt = (e, r, t) => (e[r] = t, e);
|
|
1094
|
+
function ur(e) {
|
|
1095
|
+
const r = ke(), { control: t = r.control, name: i, keyName: u = "id", shouldUnregister: n, rules: f } = e, [c, S] = b.useState(t._getFieldArray(i)), x = b.useRef(t._getFieldArray(i).map(ne)), A = b.useRef(c), w = b.useRef(!1);
|
|
1096
|
+
A.current = c, t._names.array.add(i), b.useMemo(() => f && t.register(i, f), [t, f, i]), De(() => t._subjects.array.subscribe({
|
|
1097
|
+
next: ({ values: _, name: m }) => {
|
|
1098
|
+
if (m === i || !m) {
|
|
1099
|
+
const F = d(_, i);
|
|
1100
|
+
Array.isArray(F) && (S(F), x.current = F.map(ne));
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
}).unsubscribe, [t, i]);
|
|
1104
|
+
const h = b.useCallback((_) => {
|
|
1105
|
+
w.current = !0, t._setFieldArray(i, _);
|
|
1106
|
+
}, [t, i]), G = (_, m) => {
|
|
1107
|
+
const F = z(O(_)), U = Le(t._getFieldArray(i), F);
|
|
1108
|
+
t._names.focus = Ue(i, U.length - 1, m), x.current = Le(x.current, F.map(ne)), h(U), S(U), t._setFieldArray(i, U, Le, {
|
|
1109
|
+
argA: Te(_)
|
|
1110
|
+
});
|
|
1111
|
+
}, q = (_, m) => {
|
|
1112
|
+
const F = z(O(_)), U = Be(t._getFieldArray(i), F);
|
|
1113
|
+
t._names.focus = Ue(i, 0, m), x.current = Be(x.current, F.map(ne)), h(U), S(U), t._setFieldArray(i, U, Be, {
|
|
1114
|
+
argA: Te(_)
|
|
1115
|
+
});
|
|
1116
|
+
}, C = (_) => {
|
|
1117
|
+
const m = Pe(t._getFieldArray(i), _);
|
|
1118
|
+
x.current = Pe(x.current, _), h(m), S(m), !Array.isArray(d(t._fields, i)) && E(t._fields, i, void 0), t._setFieldArray(i, m, Pe, {
|
|
1119
|
+
argA: _
|
|
1120
|
+
});
|
|
1121
|
+
}, B = (_, m, F) => {
|
|
1122
|
+
const U = z(O(m)), W = Ie(t._getFieldArray(i), _, U);
|
|
1123
|
+
t._names.focus = Ue(i, _, F), x.current = Ie(x.current, _, U.map(ne)), h(W), S(W), t._setFieldArray(i, W, Ie, {
|
|
1124
|
+
argA: _,
|
|
1125
|
+
argB: Te(m)
|
|
1126
|
+
});
|
|
1127
|
+
}, ae = (_, m) => {
|
|
1128
|
+
const F = t._getFieldArray(i);
|
|
1129
|
+
We(F, _, m), We(x.current, _, m), h(F), S(F), t._setFieldArray(i, F, We, {
|
|
1130
|
+
argA: _,
|
|
1131
|
+
argB: m
|
|
1132
|
+
}, !1);
|
|
1133
|
+
}, V = (_, m) => {
|
|
1134
|
+
const F = t._getFieldArray(i);
|
|
1135
|
+
Ne(F, _, m), Ne(x.current, _, m), h(F), S(F), t._setFieldArray(i, F, Ne, {
|
|
1136
|
+
argA: _,
|
|
1137
|
+
argB: m
|
|
1138
|
+
}, !1);
|
|
1139
|
+
}, P = (_, m) => {
|
|
1140
|
+
const F = O(m), U = gt(t._getFieldArray(i), _, F);
|
|
1141
|
+
x.current = [...U].map((W, Z) => !W || Z === _ ? ne() : x.current[Z]), h(U), S([...U]), t._setFieldArray(i, U, gt, {
|
|
1142
|
+
argA: _,
|
|
1143
|
+
argB: F
|
|
1144
|
+
}, !0, !1);
|
|
1145
|
+
}, N = (_) => {
|
|
1146
|
+
const m = z(O(_));
|
|
1147
|
+
x.current = m.map(ne), h([...m]), S([...m]), t._setFieldArray(i, [...m], (F) => F, {}, !0, !1);
|
|
1148
|
+
};
|
|
1149
|
+
return b.useEffect(() => {
|
|
1150
|
+
if (t._state.action = !1, He(i, t._names) && t._subjects.state.next({
|
|
1151
|
+
...t._formState
|
|
1152
|
+
}), w.current && (!de(t._options.mode).isOnSubmit || t._formState.isSubmitted) && !de(t._options.reValidateMode).isOnSubmit)
|
|
1153
|
+
if (t._options.resolver)
|
|
1154
|
+
t._runSchema([i]).then((_) => {
|
|
1155
|
+
const m = d(_.errors, i), F = d(t._formState.errors, i);
|
|
1156
|
+
(F ? !m && F.type || m && (F.type !== m.type || F.message !== m.message) : m && m.type) && (m ? E(t._formState.errors, i, m) : T(t._formState.errors, i), t._subjects.state.next({
|
|
1157
|
+
errors: t._formState.errors
|
|
1158
|
+
}));
|
|
1159
|
+
});
|
|
1160
|
+
else {
|
|
1161
|
+
const _ = d(t._fields, i);
|
|
1162
|
+
_ && _._f && !(de(t._options.reValidateMode).isOnSubmit && de(t._options.mode).isOnSubmit) && $e(_, t._names.disabled, t._formValues, t._options.criteriaMode === Q.all, t._options.shouldUseNativeValidation, !0).then((m) => !$(m) && t._subjects.state.next({
|
|
1163
|
+
errors: kt(t._formState.errors, m, i)
|
|
1164
|
+
}));
|
|
1165
|
+
}
|
|
1166
|
+
t._subjects.state.next({
|
|
1167
|
+
name: i,
|
|
1168
|
+
values: O(t._formValues)
|
|
1169
|
+
}), t._names.focus && fe(t._fields, (_, m) => {
|
|
1170
|
+
if (t._names.focus && m.startsWith(t._names.focus) && _.focus)
|
|
1171
|
+
return _.focus(), 1;
|
|
1172
|
+
}), t._names.focus = "", t._setValid(), w.current = !1;
|
|
1173
|
+
}, [c, i, t]), b.useEffect(() => (!d(t._formValues, i) && t._setFieldArray(i), () => {
|
|
1174
|
+
const _ = (m, F) => {
|
|
1175
|
+
const U = d(t._fields, m);
|
|
1176
|
+
U && U._f && (U._f.mount = F);
|
|
1177
|
+
};
|
|
1178
|
+
t._options.shouldUnregister || n ? t.unregister(i) : _(i, !1);
|
|
1179
|
+
}), [i, t, u, n]), {
|
|
1180
|
+
swap: b.useCallback(ae, [h, i, t]),
|
|
1181
|
+
move: b.useCallback(V, [h, i, t]),
|
|
1182
|
+
prepend: b.useCallback(q, [h, i, t]),
|
|
1183
|
+
append: b.useCallback(G, [h, i, t]),
|
|
1184
|
+
remove: b.useCallback(C, [h, i, t]),
|
|
1185
|
+
insert: b.useCallback(B, [h, i, t]),
|
|
1186
|
+
update: b.useCallback(P, [h, i, t]),
|
|
1187
|
+
replace: b.useCallback(N, [h, i, t]),
|
|
1188
|
+
fields: b.useMemo(() => c.map((_, m) => ({
|
|
1189
|
+
..._,
|
|
1190
|
+
[u]: x.current[m] || ne()
|
|
1191
|
+
})), [c, u])
|
|
1192
|
+
};
|
|
1193
|
+
}
|
|
1194
|
+
function nr(e = {}) {
|
|
1195
|
+
const r = b.useRef(void 0), t = b.useRef(void 0), [i, u] = b.useState({
|
|
1196
|
+
isDirty: !1,
|
|
1197
|
+
isValidating: !1,
|
|
1198
|
+
isLoading: X(e.defaultValues),
|
|
1199
|
+
isSubmitted: !1,
|
|
1200
|
+
isSubmitting: !1,
|
|
1201
|
+
isSubmitSuccessful: !1,
|
|
1202
|
+
isValid: !1,
|
|
1203
|
+
submitCount: 0,
|
|
1204
|
+
dirtyFields: {},
|
|
1205
|
+
touchedFields: {},
|
|
1206
|
+
validatingFields: {},
|
|
1207
|
+
errors: e.errors || {},
|
|
1208
|
+
disabled: e.disabled || !1,
|
|
1209
|
+
isReady: !1,
|
|
1210
|
+
defaultValues: X(e.defaultValues) ? void 0 : e.defaultValues
|
|
1211
|
+
});
|
|
1212
|
+
if (!r.current)
|
|
1213
|
+
if (e.formControl)
|
|
1214
|
+
r.current = {
|
|
1215
|
+
...e.formControl,
|
|
1216
|
+
formState: i
|
|
1217
|
+
}, e.defaultValues && !X(e.defaultValues) && e.formControl.reset(e.defaultValues, e.resetOptions);
|
|
1218
|
+
else {
|
|
1219
|
+
const { formControl: f, ...c } = er(e);
|
|
1220
|
+
r.current = {
|
|
1221
|
+
...c,
|
|
1222
|
+
formState: i
|
|
1223
|
+
};
|
|
1224
|
+
}
|
|
1225
|
+
const n = r.current.control;
|
|
1226
|
+
return n._options = e, De(() => {
|
|
1227
|
+
const f = n._subscribe({
|
|
1228
|
+
formState: n._proxyFormState,
|
|
1229
|
+
callback: () => u({ ...n._formState }),
|
|
1230
|
+
reRenderRoot: !0
|
|
1231
|
+
});
|
|
1232
|
+
return u((c) => ({
|
|
1233
|
+
...c,
|
|
1234
|
+
isReady: !0
|
|
1235
|
+
})), n._formState.isReady = !0, f;
|
|
1236
|
+
}, [n]), b.useEffect(() => n._disableForm(e.disabled), [n, e.disabled]), b.useEffect(() => {
|
|
1237
|
+
e.mode && (n._options.mode = e.mode), e.reValidateMode && (n._options.reValidateMode = e.reValidateMode);
|
|
1238
|
+
}, [n, e.mode, e.reValidateMode]), b.useEffect(() => {
|
|
1239
|
+
e.errors && (n._setErrors(e.errors), n._focusError());
|
|
1240
|
+
}, [n, e.errors]), b.useEffect(() => {
|
|
1241
|
+
e.shouldUnregister && n._subjects.state.next({
|
|
1242
|
+
values: n._getWatch()
|
|
1243
|
+
});
|
|
1244
|
+
}, [n, e.shouldUnregister]), b.useEffect(() => {
|
|
1245
|
+
if (n._proxyFormState.isDirty) {
|
|
1246
|
+
const f = n._getDirty();
|
|
1247
|
+
f !== i.isDirty && n._subjects.state.next({
|
|
1248
|
+
isDirty: f
|
|
1249
|
+
});
|
|
1250
|
+
}
|
|
1251
|
+
}, [n, i.isDirty]), b.useEffect(() => {
|
|
1252
|
+
e.values && !ie(e.values, t.current) ? (n._reset(e.values, {
|
|
1253
|
+
keepFieldsRef: !0,
|
|
1254
|
+
...n._options.resetOptions
|
|
1255
|
+
}), t.current = e.values, u((f) => ({ ...f }))) : n._resetDefaultValues();
|
|
1256
|
+
}, [n, e.values]), b.useEffect(() => {
|
|
1257
|
+
n._state.mount || (n._setValid(), n._state.mount = !0), n._state.watch && (n._state.watch = !1, n._subjects.state.next({ ...n._formState })), n._removeUnmounted();
|
|
1258
|
+
}), r.current.formState = vt(i, n), r.current;
|
|
1259
|
+
}
|
|
1260
|
+
export {
|
|
1261
|
+
ar as C,
|
|
1262
|
+
ir as F,
|
|
1263
|
+
nr as a,
|
|
1264
|
+
ur as b,
|
|
1265
|
+
ke as u
|
|
1266
|
+
};
|
|
1267
|
+
//# sourceMappingURL=index.esm-DpgNxKa2.js.map
|