zudoku 0.45.1 → 0.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/main.js +4 -23
- package/dist/app/main.js.map +1 -1
- package/dist/config/config.d.ts +2 -2
- package/dist/config/file-exists.d.ts +1 -0
- package/dist/config/file-exists.js +5 -0
- package/dist/config/file-exists.js.map +1 -0
- package/dist/config/loader.d.ts +19 -4
- package/dist/config/loader.js +94 -14
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/validate.d.ts +3536 -743
- package/dist/config/validators/validate.js +396 -11
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +7 -2
- package/dist/lib/authentication/AuthenticationPlugin.js +13 -1
- package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +2 -4
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +62 -43
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +7 -12
- package/dist/lib/authentication/providers/openid.js +11 -22
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase.js +3 -5
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/components/Autocomplete.js +1 -1
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +1 -1
- package/dist/lib/components/Footer.js +3 -3
- package/dist/lib/components/Footer.js.map +1 -1
- package/dist/lib/components/Header.js +16 -8
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.js +6 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/InlineCode.js +1 -1
- package/dist/lib/components/InlineCode.js.map +1 -1
- package/dist/lib/components/Layout.js +2 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Main.js +2 -2
- package/dist/lib/components/Main.js.map +1 -1
- package/dist/lib/components/Markdown.js +8 -3
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +3 -2
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +1 -1
- package/dist/lib/components/Pagination.js +1 -1
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/Search.js +1 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/Slot.d.ts +17 -0
- package/dist/lib/components/Slot.js +24 -0
- package/dist/lib/components/Slot.js.map +1 -0
- package/dist/lib/components/Slot.test.js +168 -0
- package/dist/lib/components/Slot.test.js.map +1 -0
- package/dist/lib/components/TopNavigation.d.ts +1 -4
- package/dist/lib/components/TopNavigation.js +3 -11
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.js +2 -2
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/SlotProvider.d.ts +26 -0
- package/dist/lib/components/context/SlotProvider.js +83 -0
- package/dist/lib/components/context/SlotProvider.js.map +1 -0
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/context/ZudokuProvider.js +2 -1
- package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
- package/dist/lib/components/index.d.ts +29 -23
- package/dist/lib/components/index.js +13 -7
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/PoweredByZudoku.js +1 -1
- package/dist/lib/components/navigation/Sidebar.js +3 -3
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarBadge.js +1 -1
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +3 -3
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +0 -5
- package/dist/lib/components/navigation/SidebarItem.js +19 -23
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
- package/dist/lib/components/navigation/Toc.js +1 -1
- package/dist/lib/components/navigation/Toc.js.map +1 -1
- package/dist/lib/components/navigation/utils.d.ts +8 -0
- package/dist/lib/components/navigation/utils.js +34 -6
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +12 -8
- package/dist/lib/core/ZudokuContext.js +6 -5
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +5 -2
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/hooks/index.d.ts +19 -0
- package/dist/lib/hooks/index.js +11 -0
- package/dist/lib/hooks/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.js +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +3 -2
- package/dist/lib/plugins/api-keys/CreateApiKey.js +8 -4
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +54 -23
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +18 -9
- package/dist/lib/plugins/api-keys/index.js +49 -34
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +1 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +1 -1
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +1 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +5 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +2 -4
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -4
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +6 -5
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +8 -0
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ResponseContent.d.ts +12 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.js +21 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +2 -0
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/SubmitButton.js +7 -10
- package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +2 -2
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +3 -3
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/redirect/index.d.ts +1 -1
- package/dist/lib/ui/Badge.d.ts +2 -2
- package/dist/lib/ui/Badge.js +1 -1
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/Button.js +8 -6
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Callout.js +1 -1
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Card.js +1 -1
- package/dist/lib/ui/Checkbox.js +1 -1
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +2 -2
- package/dist/lib/ui/Command.js +3 -3
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Dialog.js +1 -1
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/DropdownMenu.js +4 -4
- package/dist/lib/ui/DropdownMenu.js.map +1 -1
- package/dist/lib/ui/HoverCard.js +1 -1
- package/dist/lib/ui/HoverCard.js.map +1 -1
- package/dist/lib/ui/Input.js +1 -1
- package/dist/lib/ui/Input.js.map +1 -1
- package/dist/lib/ui/Popover.js +1 -1
- package/dist/lib/ui/Popover.js.map +1 -1
- package/dist/lib/ui/RadioGroup.js +1 -1
- package/dist/lib/ui/RadioGroup.js.map +1 -1
- package/dist/lib/ui/Select.js +2 -2
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/Slider.js +1 -1
- package/dist/lib/ui/Slider.js.map +1 -1
- package/dist/lib/ui/Switch.js +1 -1
- package/dist/lib/ui/Switch.js.map +1 -1
- package/dist/lib/ui/Tabs.js +2 -2
- package/dist/lib/ui/Tabs.js.map +1 -1
- package/dist/lib/ui/Textarea.js +1 -1
- package/dist/lib/ui/Textarea.js.map +1 -1
- package/dist/lib/ui/Toggle.js +1 -1
- package/dist/lib/ui/Toggle.js.map +1 -1
- package/dist/lib/ui/Tooltip.d.ts +2 -1
- package/dist/lib/ui/Tooltip.js +2 -1
- package/dist/lib/ui/Tooltip.js.map +1 -1
- package/dist/lib/util/useExposedProps.d.ts +8 -1
- package/dist/lib/util/useExposedProps.js.map +1 -1
- package/dist/vite/api/SchemaManager.js +16 -1
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/build.js +44 -6
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +2 -9
- package/dist/vite/config.js +6 -95
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +1 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/css/plugin.d.ts +1 -2
- package/dist/vite/css/plugin.js +3 -2
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.d.ts +0 -1
- package/dist/vite/dev-server.js +10 -12
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/html.d.ts +2 -2
- package/dist/vite/html.js +5 -2
- package/dist/vite/html.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +1 -2
- package/dist/vite/plugin-api-keys.js +9 -3
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +1 -2
- package/dist/vite/plugin-api.js +5 -4
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +1 -2
- package/dist/vite/plugin-auth.js +3 -2
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +1 -2
- package/dist/vite/plugin-component.js +3 -2
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +1 -2
- package/dist/vite/plugin-config-reload.js +21 -22
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +1 -2
- package/dist/vite/plugin-config.js +4 -3
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-configure-tailwind.d.ts +2 -0
- package/dist/vite/plugin-configure-tailwind.js +38 -0
- package/dist/vite/plugin-configure-tailwind.js.map +1 -0
- package/dist/vite/plugin-custom-pages.d.ts +1 -2
- package/dist/vite/plugin-custom-pages.js +3 -2
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +1 -2
- package/dist/vite/plugin-docs.js +4 -3
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +1 -2
- package/dist/vite/plugin-frontmatter.js +3 -2
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +1 -2
- package/dist/vite/plugin-mdx.js +3 -2
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-redirect.d.ts +1 -2
- package/dist/vite/plugin-redirect.js +3 -2
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +1 -2
- package/dist/vite/plugin-search.js +3 -2
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-shiki-register.d.ts +1 -2
- package/dist/vite/plugin-shiki-register.js +2 -1
- package/dist/vite/plugin-shiki-register.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +1 -2
- package/dist/vite/plugin-sidebar.js +3 -2
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin-theme-css.d.ts +1 -2
- package/dist/vite/plugin-theme-css.js +20 -60
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/dist/vite/plugin.d.ts +1 -2
- package/dist/vite/plugin.js +22 -21
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/sitemap.d.ts +1 -1
- package/dist/zuplo/with-zuplo.d.ts +2 -2
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/Button-BE9IVkWV.js +51 -0
- package/lib/Button-BE9IVkWV.js.map +1 -0
- package/lib/{Callout-XadUe37J.js → Callout-BkgOUkoZ.js} +9 -8
- package/lib/Callout-BkgOUkoZ.js.map +1 -0
- package/lib/{Card-BlCYNw5W.js → Card-DPhGbYUM.js} +3 -3
- package/lib/{Card-BlCYNw5W.js.map → Card-DPhGbYUM.js.map} +1 -1
- package/lib/{CategoryHeading-DZi-Szor.js → CategoryHeading-Cu2RwgjC.js} +2 -2
- package/lib/{CategoryHeading-DZi-Szor.js.map → CategoryHeading-Cu2RwgjC.js.map} +1 -1
- package/lib/{Dialog-CNf2oWXG.js → Dialog-Du6WMcIA.js} +8 -7
- package/lib/Dialog-Du6WMcIA.js.map +1 -0
- package/lib/{Drawer-BPBxzel2.js → Drawer-BzkOKwgC.js} +2 -2
- package/lib/{Drawer-BPBxzel2.js.map → Drawer-BzkOKwgC.js.map} +1 -1
- package/lib/Markdown-BRAyzyUJ.js +15348 -0
- package/lib/Markdown-BRAyzyUJ.js.map +1 -0
- package/lib/{MdxPage-tTTaDsLc.js → MdxPage-B3v1BSKr.js} +11 -11
- package/lib/MdxPage-B3v1BSKr.js.map +1 -0
- package/lib/{OasProvider-DalHQixM.js → OasProvider-5jrFuhVk.js} +3 -3
- package/lib/{OasProvider-DalHQixM.js.map → OasProvider-5jrFuhVk.js.map} +1 -1
- package/lib/{OperationList-BB09ENaq.js → OperationList-BmoMLQPO.js} +1039 -1005
- package/lib/OperationList-BmoMLQPO.js.map +1 -0
- package/lib/Pagination-Cr0fWZS3.js +36 -0
- package/lib/Pagination-Cr0fWZS3.js.map +1 -0
- package/lib/RouteGuard-PrSVLbSr.js +55 -0
- package/lib/RouteGuard-PrSVLbSr.js.map +1 -0
- package/lib/{SchemaList-BH9bgMRw.js → SchemaList-B4riYLoP.js} +61 -47
- package/lib/SchemaList-B4riYLoP.js.map +1 -0
- package/lib/{SchemaView-BsB7EFRl.js → SchemaView-CPZ6RgsF.js} +100 -95
- package/lib/SchemaView-CPZ6RgsF.js.map +1 -0
- package/lib/{AuthenticationPlugin-BTJ37DKg.js → SignUp-CWaiH0tY.js} +23 -50
- package/lib/SignUp-CWaiH0tY.js.map +1 -0
- package/lib/Slot-Bo6K4tnb.js +160 -0
- package/lib/Slot-Bo6K4tnb.js.map +1 -0
- package/lib/{SyntaxHighlight-UxOF1xNb.js → SyntaxHighlight-DedRjJNr.js} +233 -212
- package/lib/{SyntaxHighlight-UxOF1xNb.js.map → SyntaxHighlight-DedRjJNr.js.map} +1 -1
- package/lib/{Toc-Ax54Pw8S.js → Toc-lL3fzNkl.js} +5 -5
- package/lib/Toc-lL3fzNkl.js.map +1 -0
- package/lib/{circular-CZaZtOBs.js → circular-oB4auIIg.js} +2 -2
- package/lib/{circular-CZaZtOBs.js.map → circular-oB4auIIg.js.map} +1 -1
- package/lib/clsx-OuTLNxxd.js +17 -0
- package/lib/clsx-OuTLNxxd.js.map +1 -0
- package/lib/{cn-CwJPJKOE.js → cn-wvCW-ho6.js} +1015 -562
- package/lib/cn-wvCW-ho6.js.map +1 -0
- package/lib/{createServer-DmqFeMgf.js → createServer-DCB82j2t.js} +81 -81
- package/lib/{createServer-DmqFeMgf.js.map → createServer-DCB82j2t.js.map} +1 -1
- package/lib/{hook-BwOB_iZo.js → hook-DawSLaZr.js} +323 -300
- package/lib/hook-DawSLaZr.js.map +1 -0
- package/lib/{index-sS7O9W-R.js → index-BXYvD5-7.js} +868 -758
- package/lib/index-BXYvD5-7.js.map +1 -0
- package/lib/{index-Z13x6tPX.js → index-DI5SPFK9.js} +2 -2
- package/lib/{index-Z13x6tPX.js.map → index-DI5SPFK9.js.map} +1 -1
- package/lib/index-QzXzw_ra.js +24 -0
- package/lib/index-QzXzw_ra.js.map +1 -0
- package/lib/{RouteGuard-lkdEJoDV.js → index.esm-BFcSKCe-.js} +232 -281
- package/lib/index.esm-BFcSKCe-.js.map +1 -0
- package/lib/{index.esm-D2ZUREQN.js → index.esm-DSfX_eMP.js} +3 -3
- package/lib/{index.esm-D2ZUREQN.js.map → index.esm-DSfX_eMP.js.map} +1 -1
- package/lib/joinPath-B7kNnUX4.js +8 -0
- package/lib/joinPath-B7kNnUX4.js.map +1 -0
- package/lib/{mutation-CL2MCRQL.js → mutation-oxMvODNQ.js} +2 -2
- package/lib/{mutation-CL2MCRQL.js.map → mutation-oxMvODNQ.js.map} +1 -1
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +2 -2
- package/lib/ui/Alert.js +2 -2
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +3 -3
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Button.js +20 -18
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +6 -5
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +8 -8
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Checkbox.js +7 -7
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +1 -1
- package/lib/ui/Command.js +43 -43
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +2 -2
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/DropdownMenu.js +34 -34
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/Form.js +2 -2
- package/lib/ui/HoverCard.js +5 -5
- package/lib/ui/HoverCard.js.map +1 -1
- package/lib/ui/Input.js +2 -2
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Pagination.js +1 -1
- package/lib/ui/Popover.js +2 -2
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +10 -10
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +31 -31
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +5 -5
- package/lib/ui/Slider.js.map +1 -1
- package/lib/ui/Switch.js +5 -5
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +2 -2
- package/lib/ui/Tabs.js +16 -16
- package/lib/ui/Tabs.js.map +1 -1
- package/lib/ui/Textarea.js +5 -5
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js +7 -7
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +15 -8
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/ui/util.js +1 -1
- package/lib/useExposedProps-DG8J6ewJ.js.map +1 -1
- package/lib/useMutation-C_j3dA_L.js +97 -0
- package/lib/useMutation-C_j3dA_L.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +99 -82
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +246 -216
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +4957 -33
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +21 -12
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +8 -8
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +5022 -214
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +5 -5
- package/lib/zudoku.plugins.js +7 -6
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +15 -15
- package/src/app/defaultTheme.css +54 -0
- package/src/app/font.geist.css +73 -0
- package/src/app/main.css +114 -157
- package/src/app/main.tsx +4 -28
- package/src/lib/authentication/AuthenticationPlugin.tsx +18 -4
- package/src/lib/authentication/authentication.ts +2 -5
- package/src/lib/authentication/providers/auth0.tsx +8 -2
- package/src/lib/authentication/providers/clerk.tsx +72 -48
- package/src/lib/authentication/providers/openid.tsx +19 -26
- package/src/lib/authentication/providers/supabase.tsx +7 -7
- package/src/lib/components/Autocomplete.tsx +1 -1
- package/src/lib/components/Banner.tsx +1 -1
- package/src/lib/components/ErrorPage.tsx +1 -1
- package/src/lib/components/Footer.tsx +4 -4
- package/src/lib/components/Header.tsx +29 -29
- package/src/lib/components/Heading.tsx +9 -5
- package/src/lib/components/InlineCode.tsx +1 -1
- package/src/lib/components/Layout.tsx +3 -3
- package/src/lib/components/Main.tsx +4 -4
- package/src/lib/components/Markdown.tsx +14 -4
- package/src/lib/components/MobileTopNavigation.tsx +3 -2
- package/src/lib/components/NotFoundPage.tsx +1 -1
- package/src/lib/components/Pagination.tsx +3 -9
- package/src/lib/components/Search.tsx +1 -1
- package/src/lib/components/Slot.test.tsx +465 -0
- package/src/lib/components/Slot.tsx +64 -0
- package/src/lib/components/TopNavigation.tsx +5 -17
- package/src/lib/components/Zudoku.tsx +9 -9
- package/src/lib/components/context/SlotProvider.tsx +149 -0
- package/src/lib/components/context/ZudokuProvider.tsx +2 -1
- package/src/lib/components/index.ts +14 -10
- package/src/lib/components/navigation/PoweredByZudoku.tsx +1 -1
- package/src/lib/components/navigation/Sidebar.tsx +3 -3
- package/src/lib/components/navigation/SidebarBadge.tsx +1 -1
- package/src/lib/components/navigation/SidebarCategory.tsx +3 -3
- package/src/lib/components/navigation/SidebarItem.tsx +57 -30
- package/src/lib/components/navigation/SidebarWrapper.tsx +2 -2
- package/src/lib/components/navigation/Toc.tsx +2 -2
- package/src/lib/components/navigation/utils.ts +42 -6
- package/src/lib/core/ZudokuContext.ts +24 -12
- package/src/lib/core/plugins.ts +10 -2
- package/src/lib/errors/ErrorAlert.tsx +1 -1
- package/src/lib/hooks/index.ts +11 -0
- package/src/lib/plugins/api-catalog/Catalog.tsx +1 -1
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +54 -42
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +292 -112
- package/src/lib/plugins/api-keys/index.tsx +101 -55
- package/src/lib/plugins/custom-pages/index.tsx +1 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +2 -2
- package/src/lib/plugins/markdown/index.tsx +2 -2
- package/src/lib/plugins/markdown/resolver.ts +4 -2
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +1 -1
- package/src/lib/plugins/openapi/ColorizedParam.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +2 -2
- package/src/lib/plugins/openapi/OperationListItem.tsx +6 -34
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -1
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +5 -16
- package/src/lib/plugins/openapi/SchemaList.tsx +20 -8
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +6 -0
- package/src/lib/plugins/openapi/components/EnumValues.tsx +1 -1
- package/src/lib/plugins/openapi/components/ResponseContent.tsx +104 -0
- package/src/lib/plugins/openapi/playground/Playground.tsx +7 -1
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/SubmitButton.tsx +24 -29
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +2 -2
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +7 -3
- package/src/lib/plugins/redirect/index.tsx +1 -1
- package/src/lib/ui/Badge.tsx +2 -2
- package/src/lib/ui/Button.tsx +9 -6
- package/src/lib/ui/Callout.tsx +1 -0
- package/src/lib/ui/Card.tsx +1 -1
- package/src/lib/ui/Checkbox.tsx +1 -1
- package/src/lib/ui/Command.tsx +5 -5
- package/src/lib/ui/Dialog.tsx +1 -1
- package/src/lib/ui/DropdownMenu.tsx +4 -4
- package/src/lib/ui/HoverCard.tsx +1 -1
- package/src/lib/ui/Input.tsx +1 -1
- package/src/lib/ui/Popover.tsx +1 -1
- package/src/lib/ui/RadioGroup.tsx +1 -1
- package/src/lib/ui/Select.tsx +3 -3
- package/src/lib/ui/Slider.tsx +1 -1
- package/src/lib/ui/Switch.tsx +1 -1
- package/src/lib/ui/Tabs.tsx +2 -2
- package/src/lib/ui/Textarea.tsx +1 -1
- package/src/lib/ui/Toggle.tsx +1 -1
- package/src/lib/ui/Tooltip.tsx +16 -1
- package/src/lib/util/useExposedProps.tsx +12 -1
- package/dist/app/tailwind.d.ts +0 -4
- package/dist/app/tailwind.js +0 -97
- package/dist/app/tailwind.js.map +0 -1
- package/dist/config/common.d.ts +0 -10
- package/dist/config/common.js +0 -2
- package/dist/config/common.js.map +0 -1
- package/dist/config/validators/common.d.ts +0 -8001
- package/dist/config/validators/common.js +0 -414
- package/dist/config/validators/common.js.map +0 -1
- package/dist/lib/components/SlotletProvider.d.ts +0 -17
- package/dist/lib/components/SlotletProvider.js +0 -18
- package/dist/lib/components/SlotletProvider.js.map +0 -1
- package/dist/vite/plugin-docs.test.js +0 -22
- package/dist/vite/plugin-docs.test.js.map +0 -1
- package/lib/AuthenticationPlugin-BTJ37DKg.js.map +0 -1
- package/lib/Button-Bdk_Ij3U.js +0 -49
- package/lib/Button-Bdk_Ij3U.js.map +0 -1
- package/lib/Callout-XadUe37J.js.map +0 -1
- package/lib/Dialog-CNf2oWXG.js.map +0 -1
- package/lib/Markdown-D96AphCL.js +0 -7691
- package/lib/Markdown-D96AphCL.js.map +0 -1
- package/lib/MdxPage-tTTaDsLc.js.map +0 -1
- package/lib/OperationList-BB09ENaq.js.map +0 -1
- package/lib/Pagination-CtmnJOJi.js +0 -48
- package/lib/Pagination-CtmnJOJi.js.map +0 -1
- package/lib/RouteGuard-lkdEJoDV.js.map +0 -1
- package/lib/SchemaList-BH9bgMRw.js.map +0 -1
- package/lib/SchemaView-BsB7EFRl.js.map +0 -1
- package/lib/Select-HTio1oSE.js +0 -211
- package/lib/Select-HTio1oSE.js.map +0 -1
- package/lib/SlotletProvider-CTgIBRWg.js +0 -257
- package/lib/SlotletProvider-CTgIBRWg.js.map +0 -1
- package/lib/Toc-Ax54Pw8S.js.map +0 -1
- package/lib/cn-CwJPJKOE.js.map +0 -1
- package/lib/hook-BwOB_iZo.js.map +0 -1
- package/lib/index-BnT4-Efz.js +0 -4975
- package/lib/index-BnT4-Efz.js.map +0 -1
- package/lib/index-sS7O9W-R.js.map +0 -1
- package/src/app/tailwind.ts +0 -103
- package/src/lib/components/SlotletProvider.tsx +0 -55
- /package/dist/{vite/plugin-docs.test.d.ts → lib/components/Slot.test.d.ts} +0 -0
|
@@ -1,78 +1,73 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { u as ve } from "./useLatest-hmRS46UF.js";
|
|
8
|
-
var x, K;
|
|
9
|
-
function Ae() {
|
|
10
|
-
if (K) return x;
|
|
11
|
-
K = 1;
|
|
1
|
+
import y, { Component as k } from "react";
|
|
2
|
+
import { g as j } from "./invariant-DAFpPywt.js";
|
|
3
|
+
var S, U;
|
|
4
|
+
function ne() {
|
|
5
|
+
if (U) return S;
|
|
6
|
+
U = 1;
|
|
12
7
|
var e = typeof Element < "u", r = typeof Map == "function", t = typeof Set == "function", n = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
|
|
13
|
-
function
|
|
14
|
-
if (s ===
|
|
15
|
-
if (s &&
|
|
16
|
-
if (s.constructor !==
|
|
17
|
-
var
|
|
8
|
+
function i(s, o) {
|
|
9
|
+
if (s === o) return !0;
|
|
10
|
+
if (s && o && typeof s == "object" && typeof o == "object") {
|
|
11
|
+
if (s.constructor !== o.constructor) return !1;
|
|
12
|
+
var l, a, c;
|
|
18
13
|
if (Array.isArray(s)) {
|
|
19
|
-
if (
|
|
20
|
-
for (a =
|
|
21
|
-
if (!
|
|
14
|
+
if (l = s.length, l != o.length) return !1;
|
|
15
|
+
for (a = l; a-- !== 0; )
|
|
16
|
+
if (!i(s[a], o[a])) return !1;
|
|
22
17
|
return !0;
|
|
23
18
|
}
|
|
24
19
|
var u;
|
|
25
|
-
if (r && s instanceof Map &&
|
|
26
|
-
if (s.size !==
|
|
20
|
+
if (r && s instanceof Map && o instanceof Map) {
|
|
21
|
+
if (s.size !== o.size) return !1;
|
|
27
22
|
for (u = s.entries(); !(a = u.next()).done; )
|
|
28
|
-
if (!
|
|
23
|
+
if (!o.has(a.value[0])) return !1;
|
|
29
24
|
for (u = s.entries(); !(a = u.next()).done; )
|
|
30
|
-
if (!
|
|
25
|
+
if (!i(a.value[1], o.get(a.value[0]))) return !1;
|
|
31
26
|
return !0;
|
|
32
27
|
}
|
|
33
|
-
if (t && s instanceof Set &&
|
|
34
|
-
if (s.size !==
|
|
28
|
+
if (t && s instanceof Set && o instanceof Set) {
|
|
29
|
+
if (s.size !== o.size) return !1;
|
|
35
30
|
for (u = s.entries(); !(a = u.next()).done; )
|
|
36
|
-
if (!
|
|
31
|
+
if (!o.has(a.value[0])) return !1;
|
|
37
32
|
return !0;
|
|
38
33
|
}
|
|
39
|
-
if (n && ArrayBuffer.isView(s) && ArrayBuffer.isView(
|
|
40
|
-
if (
|
|
41
|
-
for (a =
|
|
42
|
-
if (s[a] !==
|
|
34
|
+
if (n && ArrayBuffer.isView(s) && ArrayBuffer.isView(o)) {
|
|
35
|
+
if (l = s.length, l != o.length) return !1;
|
|
36
|
+
for (a = l; a-- !== 0; )
|
|
37
|
+
if (s[a] !== o[a]) return !1;
|
|
43
38
|
return !0;
|
|
44
39
|
}
|
|
45
|
-
if (s.constructor === RegExp) return s.source ===
|
|
46
|
-
if (s.valueOf !== Object.prototype.valueOf && typeof s.valueOf == "function" && typeof
|
|
47
|
-
if (s.toString !== Object.prototype.toString && typeof s.toString == "function" && typeof
|
|
48
|
-
if (c = Object.keys(s),
|
|
49
|
-
for (a =
|
|
50
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
40
|
+
if (s.constructor === RegExp) return s.source === o.source && s.flags === o.flags;
|
|
41
|
+
if (s.valueOf !== Object.prototype.valueOf && typeof s.valueOf == "function" && typeof o.valueOf == "function") return s.valueOf() === o.valueOf();
|
|
42
|
+
if (s.toString !== Object.prototype.toString && typeof s.toString == "function" && typeof o.toString == "function") return s.toString() === o.toString();
|
|
43
|
+
if (c = Object.keys(s), l = c.length, l !== Object.keys(o).length) return !1;
|
|
44
|
+
for (a = l; a-- !== 0; )
|
|
45
|
+
if (!Object.prototype.hasOwnProperty.call(o, c[a])) return !1;
|
|
51
46
|
if (e && s instanceof Element) return !1;
|
|
52
|
-
for (a =
|
|
53
|
-
if (!((c[a] === "_owner" || c[a] === "__v" || c[a] === "__o") && s.$$typeof) && !
|
|
47
|
+
for (a = l; a-- !== 0; )
|
|
48
|
+
if (!((c[a] === "_owner" || c[a] === "__v" || c[a] === "__o") && s.$$typeof) && !i(s[c[a]], o[c[a]]))
|
|
54
49
|
return !1;
|
|
55
50
|
return !0;
|
|
56
51
|
}
|
|
57
|
-
return s !== s &&
|
|
52
|
+
return s !== s && o !== o;
|
|
58
53
|
}
|
|
59
|
-
return
|
|
54
|
+
return S = function(o, l) {
|
|
60
55
|
try {
|
|
61
|
-
return o
|
|
56
|
+
return i(o, l);
|
|
62
57
|
} catch (a) {
|
|
63
58
|
if ((a.message || "").match(/stack|recursion/i))
|
|
64
59
|
return console.warn("react-fast-compare cannot handle circular refs"), !1;
|
|
65
60
|
throw a;
|
|
66
61
|
}
|
|
67
|
-
},
|
|
62
|
+
}, S;
|
|
68
63
|
}
|
|
69
|
-
var
|
|
70
|
-
const
|
|
71
|
-
var
|
|
72
|
-
function
|
|
73
|
-
if (
|
|
74
|
-
|
|
75
|
-
var e = function(r, t, n,
|
|
64
|
+
var se = ne();
|
|
65
|
+
const ae = /* @__PURE__ */ j(se);
|
|
66
|
+
var x, K;
|
|
67
|
+
function ie() {
|
|
68
|
+
if (K) return x;
|
|
69
|
+
K = 1;
|
|
70
|
+
var e = function(r, t, n, i, s, o, l, a) {
|
|
76
71
|
if (process.env.NODE_ENV !== "production" && t === void 0)
|
|
77
72
|
throw new Error("invariant requires an error message argument");
|
|
78
73
|
if (!r) {
|
|
@@ -82,7 +77,7 @@ function Ce() {
|
|
|
82
77
|
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
83
78
|
);
|
|
84
79
|
else {
|
|
85
|
-
var u = [n,
|
|
80
|
+
var u = [n, i, s, o, l, a], f = 0;
|
|
86
81
|
c = new Error(
|
|
87
82
|
t.replace(/%s/g, function() {
|
|
88
83
|
return u[f++];
|
|
@@ -92,37 +87,37 @@ function Ce() {
|
|
|
92
87
|
throw c.framesToPop = 1, c;
|
|
93
88
|
}
|
|
94
89
|
};
|
|
95
|
-
return
|
|
90
|
+
return x = e, x;
|
|
96
91
|
}
|
|
97
|
-
var
|
|
98
|
-
const
|
|
99
|
-
var
|
|
100
|
-
function
|
|
101
|
-
return
|
|
102
|
-
var s = n ? n.call(
|
|
92
|
+
var oe = ie();
|
|
93
|
+
const z = /* @__PURE__ */ j(oe);
|
|
94
|
+
var P, N;
|
|
95
|
+
function le() {
|
|
96
|
+
return N || (N = 1, P = function(r, t, n, i) {
|
|
97
|
+
var s = n ? n.call(i, r, t) : void 0;
|
|
103
98
|
if (s !== void 0)
|
|
104
99
|
return !!s;
|
|
105
100
|
if (r === t)
|
|
106
101
|
return !0;
|
|
107
102
|
if (typeof r != "object" || !r || typeof t != "object" || !t)
|
|
108
103
|
return !1;
|
|
109
|
-
var
|
|
110
|
-
if (
|
|
104
|
+
var o = Object.keys(r), l = Object.keys(t);
|
|
105
|
+
if (o.length !== l.length)
|
|
111
106
|
return !1;
|
|
112
|
-
for (var a = Object.prototype.hasOwnProperty.bind(t), c = 0; c <
|
|
113
|
-
var u =
|
|
107
|
+
for (var a = Object.prototype.hasOwnProperty.bind(t), c = 0; c < o.length; c++) {
|
|
108
|
+
var u = o[c];
|
|
114
109
|
if (!a(u))
|
|
115
110
|
return !1;
|
|
116
111
|
var f = r[u], m = t[u];
|
|
117
|
-
if (s = n ? n.call(
|
|
112
|
+
if (s = n ? n.call(i, f, m, u) : void 0, s === !1 || s === void 0 && f !== m)
|
|
118
113
|
return !1;
|
|
119
114
|
}
|
|
120
115
|
return !0;
|
|
121
|
-
}),
|
|
116
|
+
}), P;
|
|
122
117
|
}
|
|
123
|
-
var
|
|
124
|
-
const
|
|
125
|
-
var
|
|
118
|
+
var ce = le();
|
|
119
|
+
const ue = /* @__PURE__ */ j(ce);
|
|
120
|
+
var G = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "head", e.HTML = "html", e.LINK = "link", e.META = "meta", e.NOSCRIPT = "noscript", e.SCRIPT = "script", e.STYLE = "style", e.TITLE = "title", e.FRAGMENT = "Symbol(react.fragment)", e))(G || {}), $ = {
|
|
126
121
|
link: { rel: ["amphtml", "canonical", "alternate"] },
|
|
127
122
|
script: { type: ["application/ld+json"] },
|
|
128
123
|
meta: {
|
|
@@ -144,7 +139,7 @@ var Q = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
144
139
|
"twitter:site"
|
|
145
140
|
]
|
|
146
141
|
}
|
|
147
|
-
}, V = Object.values(
|
|
142
|
+
}, V = Object.values(G), q = {
|
|
148
143
|
accesskey: "accessKey",
|
|
149
144
|
charset: "charSet",
|
|
150
145
|
class: "className",
|
|
@@ -153,90 +148,90 @@ var Q = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
153
148
|
"http-equiv": "httpEquiv",
|
|
154
149
|
itemprop: "itemProp",
|
|
155
150
|
tabindex: "tabIndex"
|
|
156
|
-
},
|
|
151
|
+
}, fe = Object.entries(q).reduce(
|
|
157
152
|
(e, [r, t]) => (e[t] = r, e),
|
|
158
153
|
{}
|
|
159
|
-
), h = "data-rh",
|
|
154
|
+
), h = "data-rh", v = {
|
|
160
155
|
DEFAULT_TITLE: "defaultTitle",
|
|
161
156
|
DEFER: "defer",
|
|
162
157
|
ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
|
|
163
158
|
ON_CHANGE_CLIENT_STATE: "onChangeClientState",
|
|
164
159
|
TITLE_TEMPLATE: "titleTemplate",
|
|
165
160
|
PRIORITIZE_SEO_TAGS: "prioritizeSeoTags"
|
|
166
|
-
},
|
|
161
|
+
}, A = (e, r) => {
|
|
167
162
|
for (let t = e.length - 1; t >= 0; t -= 1) {
|
|
168
163
|
const n = e[t];
|
|
169
164
|
if (Object.prototype.hasOwnProperty.call(n, r))
|
|
170
165
|
return n[r];
|
|
171
166
|
}
|
|
172
167
|
return null;
|
|
173
|
-
},
|
|
174
|
-
let r =
|
|
168
|
+
}, pe = (e) => {
|
|
169
|
+
let r = A(
|
|
175
170
|
e,
|
|
176
171
|
"title"
|
|
177
172
|
/* TITLE */
|
|
178
173
|
);
|
|
179
|
-
const t =
|
|
174
|
+
const t = A(e, v.TITLE_TEMPLATE);
|
|
180
175
|
if (Array.isArray(r) && (r = r.join("")), t && r)
|
|
181
176
|
return t.replace(/%s/g, () => r);
|
|
182
|
-
const n =
|
|
177
|
+
const n = A(e, v.DEFAULT_TITLE);
|
|
183
178
|
return r || n || void 0;
|
|
184
|
-
},
|
|
185
|
-
}),
|
|
179
|
+
}, de = (e) => A(e, v.ON_CHANGE_CLIENT_STATE) || (() => {
|
|
180
|
+
}), I = (e, r) => r.filter((t) => typeof t[e] < "u").map((t) => t[e]).reduce((t, n) => ({ ...t, ...n }), {}), me = (e, r) => r.filter((t) => typeof t.base < "u").map((t) => t.base).reverse().reduce((t, n) => {
|
|
186
181
|
if (!t.length) {
|
|
187
|
-
const
|
|
188
|
-
for (let s = 0; s <
|
|
189
|
-
const
|
|
190
|
-
if (e.indexOf(
|
|
182
|
+
const i = Object.keys(n);
|
|
183
|
+
for (let s = 0; s < i.length; s += 1) {
|
|
184
|
+
const l = i[s].toLowerCase();
|
|
185
|
+
if (e.indexOf(l) !== -1 && n[l])
|
|
191
186
|
return t.concat(n);
|
|
192
187
|
}
|
|
193
188
|
}
|
|
194
189
|
return t;
|
|
195
|
-
}, []),
|
|
190
|
+
}, []), he = (e) => console && typeof console.warn == "function" && console.warn(e), E = (e, r, t) => {
|
|
196
191
|
const n = {};
|
|
197
|
-
return t.filter((
|
|
198
|
-
`Helmet: ${e} should be of type "Array". Instead found type "${typeof
|
|
199
|
-
), !1)).map((
|
|
200
|
-
const
|
|
192
|
+
return t.filter((i) => Array.isArray(i[e]) ? !0 : (typeof i[e] < "u" && he(
|
|
193
|
+
`Helmet: ${e} should be of type "Array". Instead found type "${typeof i[e]}"`
|
|
194
|
+
), !1)).map((i) => i[e]).reverse().reduce((i, s) => {
|
|
195
|
+
const o = {};
|
|
201
196
|
s.filter((a) => {
|
|
202
197
|
let c;
|
|
203
198
|
const u = Object.keys(a);
|
|
204
199
|
for (let m = 0; m < u.length; m += 1) {
|
|
205
|
-
const p = u[m],
|
|
206
|
-
r.indexOf(
|
|
200
|
+
const p = u[m], T = p.toLowerCase();
|
|
201
|
+
r.indexOf(T) !== -1 && !(c === "rel" && a[c].toLowerCase() === "canonical") && !(T === "rel" && a[T].toLowerCase() === "stylesheet") && (c = T), r.indexOf(p) !== -1 && (p === "innerHTML" || p === "cssText" || p === "itemprop") && (c = p);
|
|
207
202
|
}
|
|
208
203
|
if (!c || !a[c])
|
|
209
204
|
return !1;
|
|
210
205
|
const f = a[c].toLowerCase();
|
|
211
|
-
return n[c] || (n[c] = {}),
|
|
212
|
-
}).reverse().forEach((a) =>
|
|
213
|
-
const
|
|
214
|
-
for (let a = 0; a <
|
|
215
|
-
const c =
|
|
206
|
+
return n[c] || (n[c] = {}), o[c] || (o[c] = {}), n[c][f] ? !1 : (o[c][f] = !0, !0);
|
|
207
|
+
}).reverse().forEach((a) => i.push(a));
|
|
208
|
+
const l = Object.keys(o);
|
|
209
|
+
for (let a = 0; a < l.length; a += 1) {
|
|
210
|
+
const c = l[a], u = {
|
|
216
211
|
...n[c],
|
|
217
|
-
...
|
|
212
|
+
...o[c]
|
|
218
213
|
};
|
|
219
214
|
n[c] = u;
|
|
220
215
|
}
|
|
221
|
-
return
|
|
216
|
+
return i;
|
|
222
217
|
}, []).reverse();
|
|
223
|
-
},
|
|
218
|
+
}, ye = (e, r) => {
|
|
224
219
|
if (Array.isArray(e) && e.length) {
|
|
225
220
|
for (let t = 0; t < e.length; t += 1)
|
|
226
221
|
if (e[t][r])
|
|
227
222
|
return !0;
|
|
228
223
|
}
|
|
229
224
|
return !1;
|
|
230
|
-
},
|
|
231
|
-
baseTag:
|
|
225
|
+
}, Te = (e) => ({
|
|
226
|
+
baseTag: me([
|
|
232
227
|
"href"
|
|
233
228
|
/* HREF */
|
|
234
229
|
], e),
|
|
235
|
-
bodyAttributes:
|
|
236
|
-
defer:
|
|
237
|
-
encode:
|
|
238
|
-
htmlAttributes:
|
|
239
|
-
linkTags:
|
|
230
|
+
bodyAttributes: I("bodyAttributes", e),
|
|
231
|
+
defer: A(e, v.DEFER),
|
|
232
|
+
encode: A(e, v.ENCODE_SPECIAL_CHARACTERS),
|
|
233
|
+
htmlAttributes: I("htmlAttributes", e),
|
|
234
|
+
linkTags: E(
|
|
240
235
|
"link",
|
|
241
236
|
[
|
|
242
237
|
"rel",
|
|
@@ -245,7 +240,7 @@ var Q = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
245
240
|
],
|
|
246
241
|
e
|
|
247
242
|
),
|
|
248
|
-
metaTags:
|
|
243
|
+
metaTags: E(
|
|
249
244
|
"meta",
|
|
250
245
|
[
|
|
251
246
|
"name",
|
|
@@ -257,12 +252,12 @@ var Q = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
257
252
|
],
|
|
258
253
|
e
|
|
259
254
|
),
|
|
260
|
-
noscriptTags:
|
|
255
|
+
noscriptTags: E("noscript", [
|
|
261
256
|
"innerHTML"
|
|
262
257
|
/* INNER_HTML */
|
|
263
258
|
], e),
|
|
264
|
-
onChangeClientState:
|
|
265
|
-
scriptTags:
|
|
259
|
+
onChangeClientState: de(e),
|
|
260
|
+
scriptTags: E(
|
|
266
261
|
"script",
|
|
267
262
|
[
|
|
268
263
|
"src",
|
|
@@ -271,122 +266,122 @@ var Q = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
271
266
|
],
|
|
272
267
|
e
|
|
273
268
|
),
|
|
274
|
-
styleTags:
|
|
269
|
+
styleTags: E("style", [
|
|
275
270
|
"cssText"
|
|
276
271
|
/* CSS_TEXT */
|
|
277
272
|
], e),
|
|
278
|
-
title:
|
|
279
|
-
titleAttributes:
|
|
280
|
-
prioritizeSeoTags:
|
|
281
|
-
}), W = (e) => Array.isArray(e) ? e.join("") : e,
|
|
273
|
+
title: pe(e),
|
|
274
|
+
titleAttributes: I("titleAttributes", e),
|
|
275
|
+
prioritizeSeoTags: ye(e, v.PRIORITIZE_SEO_TAGS)
|
|
276
|
+
}), W = (e) => Array.isArray(e) ? e.join("") : e, ge = (e, r) => {
|
|
282
277
|
const t = Object.keys(e);
|
|
283
278
|
for (let n = 0; n < t.length; n += 1)
|
|
284
279
|
if (r[t[n]] && r[t[n]].includes(e[t[n]]))
|
|
285
280
|
return !0;
|
|
286
281
|
return !1;
|
|
287
|
-
},
|
|
288
|
-
(t, n) => (
|
|
282
|
+
}, H = (e, r) => Array.isArray(e) ? e.reduce(
|
|
283
|
+
(t, n) => (ge(n, r) ? t.priority.push(n) : t.default.push(n), t),
|
|
289
284
|
{ priority: [], default: [] }
|
|
290
|
-
) : { default: e, priority: [] },
|
|
285
|
+
) : { default: e, priority: [] }, B = (e, r) => ({
|
|
291
286
|
...e,
|
|
292
287
|
[r]: void 0
|
|
293
|
-
}),
|
|
288
|
+
}), ve = [
|
|
294
289
|
"noscript",
|
|
295
290
|
"script",
|
|
296
291
|
"style"
|
|
297
292
|
/* STYLE */
|
|
298
|
-
],
|
|
293
|
+
], _ = (e, r = !0) => r === !1 ? String(e) : String(e).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'"), J = (e) => Object.keys(e).reduce((r, t) => {
|
|
299
294
|
const n = typeof e[t] < "u" ? `${t}="${e[t]}"` : `${t}`;
|
|
300
295
|
return r ? `${r} ${n}` : n;
|
|
301
|
-
}, ""),
|
|
302
|
-
const
|
|
303
|
-
return
|
|
296
|
+
}, ""), Ae = (e, r, t, n) => {
|
|
297
|
+
const i = J(t), s = W(r);
|
|
298
|
+
return i ? `<${e} ${h}="true" ${i}>${_(
|
|
304
299
|
s,
|
|
305
300
|
n
|
|
306
|
-
)}</${e}>` : `<${e} ${h}="true">${
|
|
301
|
+
)}</${e}>` : `<${e} ${h}="true">${_(
|
|
307
302
|
s,
|
|
308
303
|
n
|
|
309
304
|
)}</${e}>`;
|
|
310
|
-
},
|
|
311
|
-
const s =
|
|
305
|
+
}, Ee = (e, r, t = !0) => r.reduce((n, i) => {
|
|
306
|
+
const s = i, o = Object.keys(s).filter(
|
|
312
307
|
(c) => !(c === "innerHTML" || c === "cssText")
|
|
313
308
|
).reduce((c, u) => {
|
|
314
|
-
const f = typeof s[u] > "u" ? u : `${u}="${
|
|
309
|
+
const f = typeof s[u] > "u" ? u : `${u}="${_(s[u], t)}"`;
|
|
315
310
|
return c ? `${c} ${f}` : f;
|
|
316
|
-
}, ""),
|
|
317
|
-
return `${n}<${e} ${h}="true" ${
|
|
318
|
-
}, ""),
|
|
319
|
-
const
|
|
320
|
-
return t[
|
|
321
|
-
}, r),
|
|
311
|
+
}, ""), l = s.innerHTML || s.cssText || "", a = ve.indexOf(e) === -1;
|
|
312
|
+
return `${n}<${e} ${h}="true" ${o}${a ? "/>" : `>${l}</${e}>`}`;
|
|
313
|
+
}, ""), Q = (e, r = {}) => Object.keys(e).reduce((t, n) => {
|
|
314
|
+
const i = q[n];
|
|
315
|
+
return t[i || n] = e[n], t;
|
|
316
|
+
}, r), be = (e, r, t) => {
|
|
322
317
|
const n = {
|
|
323
318
|
key: r,
|
|
324
319
|
[h]: !0
|
|
325
|
-
},
|
|
326
|
-
return [
|
|
327
|
-
},
|
|
328
|
-
const
|
|
320
|
+
}, i = Q(t, n);
|
|
321
|
+
return [y.createElement("title", i, r)];
|
|
322
|
+
}, w = (e, r) => r.map((t, n) => {
|
|
323
|
+
const i = {
|
|
329
324
|
key: n,
|
|
330
325
|
[h]: !0
|
|
331
326
|
};
|
|
332
327
|
return Object.keys(t).forEach((s) => {
|
|
333
|
-
const
|
|
334
|
-
if (
|
|
328
|
+
const l = q[s] || s;
|
|
329
|
+
if (l === "innerHTML" || l === "cssText") {
|
|
335
330
|
const a = t.innerHTML || t.cssText;
|
|
336
|
-
|
|
331
|
+
i.dangerouslySetInnerHTML = { __html: a };
|
|
337
332
|
} else
|
|
338
|
-
|
|
339
|
-
}),
|
|
333
|
+
i[l] = t[s];
|
|
334
|
+
}), y.createElement(e, i);
|
|
340
335
|
}), d = (e, r, t = !0) => {
|
|
341
336
|
switch (e) {
|
|
342
337
|
case "title":
|
|
343
338
|
return {
|
|
344
|
-
toComponent: () =>
|
|
345
|
-
toString: () =>
|
|
339
|
+
toComponent: () => be(e, r.title, r.titleAttributes),
|
|
340
|
+
toString: () => Ae(e, r.title, r.titleAttributes, t)
|
|
346
341
|
};
|
|
347
342
|
case "bodyAttributes":
|
|
348
343
|
case "htmlAttributes":
|
|
349
344
|
return {
|
|
350
|
-
toComponent: () =>
|
|
345
|
+
toComponent: () => Q(r),
|
|
351
346
|
toString: () => J(r)
|
|
352
347
|
};
|
|
353
348
|
default:
|
|
354
349
|
return {
|
|
355
|
-
toComponent: () =>
|
|
356
|
-
toString: () =>
|
|
350
|
+
toComponent: () => w(e, r),
|
|
351
|
+
toString: () => Ee(e, r, t)
|
|
357
352
|
};
|
|
358
353
|
}
|
|
359
|
-
},
|
|
360
|
-
const
|
|
354
|
+
}, Oe = ({ metaTags: e, linkTags: r, scriptTags: t, encode: n }) => {
|
|
355
|
+
const i = H(e, $.meta), s = H(r, $.link), o = H(t, $.script);
|
|
361
356
|
return {
|
|
362
357
|
priorityMethods: {
|
|
363
358
|
toComponent: () => [
|
|
364
|
-
...
|
|
365
|
-
...
|
|
366
|
-
...
|
|
359
|
+
...w("meta", i.priority),
|
|
360
|
+
...w("link", s.priority),
|
|
361
|
+
...w("script", o.priority)
|
|
367
362
|
],
|
|
368
363
|
toString: () => (
|
|
369
364
|
// generate all the tags as strings and concatenate them
|
|
370
|
-
`${d("meta",
|
|
365
|
+
`${d("meta", i.priority, n)} ${d(
|
|
371
366
|
"link",
|
|
372
367
|
s.priority,
|
|
373
368
|
n
|
|
374
|
-
)} ${d("script",
|
|
369
|
+
)} ${d("script", o.priority, n)}`
|
|
375
370
|
)
|
|
376
371
|
},
|
|
377
|
-
metaTags:
|
|
372
|
+
metaTags: i.default,
|
|
378
373
|
linkTags: s.default,
|
|
379
|
-
scriptTags:
|
|
374
|
+
scriptTags: o.default
|
|
380
375
|
};
|
|
381
|
-
},
|
|
376
|
+
}, Ce = (e) => {
|
|
382
377
|
const {
|
|
383
378
|
baseTag: r,
|
|
384
379
|
bodyAttributes: t,
|
|
385
380
|
encode: n = !0,
|
|
386
|
-
htmlAttributes:
|
|
381
|
+
htmlAttributes: i,
|
|
387
382
|
noscriptTags: s,
|
|
388
|
-
styleTags:
|
|
389
|
-
title:
|
|
383
|
+
styleTags: o,
|
|
384
|
+
title: l = "",
|
|
390
385
|
titleAttributes: a,
|
|
391
386
|
prioritizeSeoTags: c
|
|
392
387
|
} = e;
|
|
@@ -395,39 +390,39 @@ var Q = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
395
390
|
},
|
|
396
391
|
toString: () => ""
|
|
397
392
|
};
|
|
398
|
-
return c && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: m } =
|
|
393
|
+
return c && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: m } = Oe(e)), {
|
|
399
394
|
priority: p,
|
|
400
395
|
base: d("base", r, n),
|
|
401
396
|
bodyAttributes: d("bodyAttributes", t, n),
|
|
402
|
-
htmlAttributes: d("htmlAttributes",
|
|
397
|
+
htmlAttributes: d("htmlAttributes", i, n),
|
|
403
398
|
link: d("link", u, n),
|
|
404
399
|
meta: d("meta", f, n),
|
|
405
400
|
noscript: d("noscript", s, n),
|
|
406
401
|
script: d("script", m, n),
|
|
407
|
-
style: d("style",
|
|
408
|
-
title: d("title", { title:
|
|
402
|
+
style: d("style", o, n),
|
|
403
|
+
title: d("title", { title: l, titleAttributes: a }, n)
|
|
409
404
|
};
|
|
410
|
-
},
|
|
405
|
+
}, D = Ce, C = [], X = !!(typeof window < "u" && window.document && window.document.createElement), R = class {
|
|
411
406
|
instances = [];
|
|
412
|
-
canUseDOM =
|
|
407
|
+
canUseDOM = X;
|
|
413
408
|
context;
|
|
414
409
|
value = {
|
|
415
410
|
setHelmet: (e) => {
|
|
416
411
|
this.context.helmet = e;
|
|
417
412
|
},
|
|
418
413
|
helmetInstances: {
|
|
419
|
-
get: () => this.canUseDOM ?
|
|
414
|
+
get: () => this.canUseDOM ? C : this.instances,
|
|
420
415
|
add: (e) => {
|
|
421
|
-
(this.canUseDOM ?
|
|
416
|
+
(this.canUseDOM ? C : this.instances).push(e);
|
|
422
417
|
},
|
|
423
418
|
remove: (e) => {
|
|
424
|
-
const r = (this.canUseDOM ?
|
|
425
|
-
(this.canUseDOM ?
|
|
419
|
+
const r = (this.canUseDOM ? C : this.instances).indexOf(e);
|
|
420
|
+
(this.canUseDOM ? C : this.instances).splice(r, 1);
|
|
426
421
|
}
|
|
427
422
|
}
|
|
428
423
|
};
|
|
429
424
|
constructor(e, r) {
|
|
430
|
-
this.context = e, this.canUseDOM = r || !1, r || (e.helmet =
|
|
425
|
+
this.context = e, this.canUseDOM = r || !1, r || (e.helmet = D({
|
|
431
426
|
baseTag: [],
|
|
432
427
|
bodyAttributes: {},
|
|
433
428
|
htmlAttributes: {},
|
|
@@ -440,91 +435,91 @@ var Q = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
440
435
|
titleAttributes: {}
|
|
441
436
|
}));
|
|
442
437
|
}
|
|
443
|
-
},
|
|
444
|
-
static canUseDOM =
|
|
438
|
+
}, we = {}, ee = y.createContext(we), Se = class te extends k {
|
|
439
|
+
static canUseDOM = X;
|
|
445
440
|
helmetData;
|
|
446
441
|
constructor(r) {
|
|
447
|
-
super(r), this.helmetData = new
|
|
442
|
+
super(r), this.helmetData = new R(this.props.context || {}, te.canUseDOM);
|
|
448
443
|
}
|
|
449
444
|
render() {
|
|
450
|
-
return /* @__PURE__ */
|
|
445
|
+
return /* @__PURE__ */ y.createElement(ee.Provider, { value: this.helmetData.value }, this.props.children);
|
|
451
446
|
}
|
|
452
|
-
},
|
|
447
|
+
}, g = (e, r) => {
|
|
453
448
|
const t = document.head || document.querySelector(
|
|
454
449
|
"head"
|
|
455
450
|
/* HEAD */
|
|
456
|
-
), n = t.querySelectorAll(`${e}[${h}]`),
|
|
457
|
-
let
|
|
458
|
-
return r && r.length && r.forEach((
|
|
451
|
+
), n = t.querySelectorAll(`${e}[${h}]`), i = [].slice.call(n), s = [];
|
|
452
|
+
let o;
|
|
453
|
+
return r && r.length && r.forEach((l) => {
|
|
459
454
|
const a = document.createElement(e);
|
|
460
|
-
for (const c in
|
|
461
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
455
|
+
for (const c in l)
|
|
456
|
+
if (Object.prototype.hasOwnProperty.call(l, c))
|
|
462
457
|
if (c === "innerHTML")
|
|
463
|
-
a.innerHTML =
|
|
458
|
+
a.innerHTML = l.innerHTML;
|
|
464
459
|
else if (c === "cssText")
|
|
465
|
-
a.styleSheet ? a.styleSheet.cssText =
|
|
460
|
+
a.styleSheet ? a.styleSheet.cssText = l.cssText : a.appendChild(document.createTextNode(l.cssText));
|
|
466
461
|
else {
|
|
467
|
-
const u = c, f = typeof
|
|
462
|
+
const u = c, f = typeof l[u] > "u" ? "" : l[u];
|
|
468
463
|
a.setAttribute(c, f);
|
|
469
464
|
}
|
|
470
|
-
a.setAttribute(h, "true"),
|
|
471
|
-
}),
|
|
472
|
-
oldTags:
|
|
465
|
+
a.setAttribute(h, "true"), i.some((c, u) => (o = u, a.isEqualNode(c))) ? i.splice(o, 1) : s.push(a);
|
|
466
|
+
}), i.forEach((l) => l.parentNode?.removeChild(l)), s.forEach((l) => t.appendChild(l)), {
|
|
467
|
+
oldTags: i,
|
|
473
468
|
newTags: s
|
|
474
469
|
};
|
|
475
|
-
},
|
|
470
|
+
}, M = (e, r) => {
|
|
476
471
|
const t = document.getElementsByTagName(e)[0];
|
|
477
472
|
if (!t)
|
|
478
473
|
return;
|
|
479
|
-
const n = t.getAttribute(h),
|
|
480
|
-
for (const
|
|
481
|
-
const a = r[
|
|
482
|
-
t.getAttribute(
|
|
483
|
-
const c = s.indexOf(
|
|
474
|
+
const n = t.getAttribute(h), i = n ? n.split(",") : [], s = [...i], o = Object.keys(r);
|
|
475
|
+
for (const l of o) {
|
|
476
|
+
const a = r[l] || "";
|
|
477
|
+
t.getAttribute(l) !== a && t.setAttribute(l, a), i.indexOf(l) === -1 && i.push(l);
|
|
478
|
+
const c = s.indexOf(l);
|
|
484
479
|
c !== -1 && s.splice(c, 1);
|
|
485
480
|
}
|
|
486
|
-
for (let
|
|
487
|
-
t.removeAttribute(s[
|
|
488
|
-
|
|
489
|
-
},
|
|
490
|
-
typeof e < "u" && document.title !== e && (document.title = W(e)),
|
|
481
|
+
for (let l = s.length - 1; l >= 0; l -= 1)
|
|
482
|
+
t.removeAttribute(s[l]);
|
|
483
|
+
i.length === s.length ? t.removeAttribute(h) : t.getAttribute(h) !== o.join(",") && t.setAttribute(h, o.join(","));
|
|
484
|
+
}, xe = (e, r) => {
|
|
485
|
+
typeof e < "u" && document.title !== e && (document.title = W(e)), M("title", r);
|
|
491
486
|
}, Y = (e, r) => {
|
|
492
487
|
const {
|
|
493
488
|
baseTag: t,
|
|
494
489
|
bodyAttributes: n,
|
|
495
|
-
htmlAttributes:
|
|
490
|
+
htmlAttributes: i,
|
|
496
491
|
linkTags: s,
|
|
497
|
-
metaTags:
|
|
498
|
-
noscriptTags:
|
|
492
|
+
metaTags: o,
|
|
493
|
+
noscriptTags: l,
|
|
499
494
|
onChangeClientState: a,
|
|
500
495
|
scriptTags: c,
|
|
501
496
|
styleTags: u,
|
|
502
497
|
title: f,
|
|
503
498
|
titleAttributes: m
|
|
504
499
|
} = e;
|
|
505
|
-
|
|
500
|
+
M("body", n), M("html", i), xe(f, m);
|
|
506
501
|
const p = {
|
|
507
|
-
baseTag:
|
|
508
|
-
linkTags:
|
|
509
|
-
metaTags:
|
|
510
|
-
noscriptTags:
|
|
511
|
-
scriptTags:
|
|
512
|
-
styleTags:
|
|
513
|
-
},
|
|
502
|
+
baseTag: g("base", t),
|
|
503
|
+
linkTags: g("link", s),
|
|
504
|
+
metaTags: g("meta", o),
|
|
505
|
+
noscriptTags: g("noscript", l),
|
|
506
|
+
scriptTags: g("script", c),
|
|
507
|
+
styleTags: g("style", u)
|
|
508
|
+
}, T = {}, L = {};
|
|
514
509
|
Object.keys(p).forEach((O) => {
|
|
515
|
-
const { newTags:
|
|
516
|
-
|
|
517
|
-
}), r && r(), a(e,
|
|
518
|
-
},
|
|
519
|
-
|
|
510
|
+
const { newTags: F, oldTags: re } = p[O];
|
|
511
|
+
F.length && (T[O] = F), re.length && (L[O] = p[O].oldTags);
|
|
512
|
+
}), r && r(), a(e, T, L);
|
|
513
|
+
}, b = null, Pe = (e) => {
|
|
514
|
+
b && cancelAnimationFrame(b), e.defer ? b = requestAnimationFrame(() => {
|
|
520
515
|
Y(e, () => {
|
|
521
|
-
|
|
516
|
+
b = null;
|
|
522
517
|
});
|
|
523
|
-
}) : (Y(e),
|
|
524
|
-
},
|
|
518
|
+
}) : (Y(e), b = null);
|
|
519
|
+
}, $e = Pe, Z = class extends k {
|
|
525
520
|
rendered = !1;
|
|
526
521
|
shouldComponentUpdate(e) {
|
|
527
|
-
return !
|
|
522
|
+
return !ue(e, this.props);
|
|
528
523
|
}
|
|
529
524
|
componentDidUpdate() {
|
|
530
525
|
this.emitChange();
|
|
@@ -536,13 +531,13 @@ var Q = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
536
531
|
emitChange() {
|
|
537
532
|
const { helmetInstances: e, setHelmet: r } = this.props.context;
|
|
538
533
|
let t = null;
|
|
539
|
-
const n =
|
|
540
|
-
e.get().map((
|
|
541
|
-
const s = { ...
|
|
534
|
+
const n = Te(
|
|
535
|
+
e.get().map((i) => {
|
|
536
|
+
const s = { ...i.props };
|
|
542
537
|
return delete s.context, s;
|
|
543
538
|
})
|
|
544
539
|
);
|
|
545
|
-
|
|
540
|
+
Se.canUseDOM ? $e(n) : D && (t = D(n)), r(t);
|
|
546
541
|
}
|
|
547
542
|
// componentWillMount will be deprecated
|
|
548
543
|
// for SSR, initialize on first render
|
|
@@ -557,14 +552,14 @@ var Q = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
557
552
|
render() {
|
|
558
553
|
return this.init(), null;
|
|
559
554
|
}
|
|
560
|
-
},
|
|
555
|
+
}, _e = class extends k {
|
|
561
556
|
static defaultProps = {
|
|
562
557
|
defer: !0,
|
|
563
558
|
encodeSpecialCharacters: !0,
|
|
564
559
|
prioritizeSeoTags: !1
|
|
565
560
|
};
|
|
566
561
|
shouldComponentUpdate(e) {
|
|
567
|
-
return !
|
|
562
|
+
return !ae(B(this.props, "helmetData"), B(e, "helmetData"));
|
|
568
563
|
}
|
|
569
564
|
mapNestedChildrenToProps(e, r) {
|
|
570
565
|
if (!r)
|
|
@@ -632,26 +627,26 @@ var Q = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
632
627
|
}), t;
|
|
633
628
|
}
|
|
634
629
|
warnOnInvalidChildren(e, r) {
|
|
635
|
-
return
|
|
630
|
+
return z(
|
|
636
631
|
V.some((t) => e.type === t),
|
|
637
632
|
typeof e.type == "function" ? "You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information." : `Only elements types ${V.join(
|
|
638
633
|
", "
|
|
639
634
|
)} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`
|
|
640
|
-
),
|
|
635
|
+
), z(
|
|
641
636
|
!r || typeof r == "string" || Array.isArray(r) && !r.some((t) => typeof t != "string"),
|
|
642
637
|
`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`
|
|
643
638
|
), !0;
|
|
644
639
|
}
|
|
645
640
|
mapChildrenToProps(e, r) {
|
|
646
641
|
let t = {};
|
|
647
|
-
return
|
|
642
|
+
return y.Children.forEach(e, (n) => {
|
|
648
643
|
if (!n || !n.props)
|
|
649
644
|
return;
|
|
650
|
-
const { children:
|
|
651
|
-
let { type:
|
|
652
|
-
switch (typeof
|
|
645
|
+
const { children: i, ...s } = n.props, o = Object.keys(s).reduce((a, c) => (a[fe[c] || c] = s[c], a), {});
|
|
646
|
+
let { type: l } = n;
|
|
647
|
+
switch (typeof l == "symbol" ? l = l.toString() : this.warnOnInvalidChildren(n, i), l) {
|
|
653
648
|
case "Symbol(react.fragment)":
|
|
654
|
-
r = this.mapChildrenToProps(
|
|
649
|
+
r = this.mapChildrenToProps(i, r);
|
|
655
650
|
break;
|
|
656
651
|
case "link":
|
|
657
652
|
case "meta":
|
|
@@ -661,12 +656,12 @@ var Q = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
661
656
|
t = this.flattenArrayTypeChildren(
|
|
662
657
|
n,
|
|
663
658
|
t,
|
|
664
|
-
|
|
665
|
-
|
|
659
|
+
o,
|
|
660
|
+
i
|
|
666
661
|
);
|
|
667
662
|
break;
|
|
668
663
|
default:
|
|
669
|
-
r = this.mapObjectTypeChildren(n, r,
|
|
664
|
+
r = this.mapObjectTypeChildren(n, r, o, i);
|
|
670
665
|
break;
|
|
671
666
|
}
|
|
672
667
|
}), this.mapArrayTypeChildrenToProps(t, r);
|
|
@@ -674,59 +669,15 @@ var Q = /* @__PURE__ */ ((e) => (e.BASE = "base", e.BODY = "body", e.HEAD = "hea
|
|
|
674
669
|
render() {
|
|
675
670
|
const { children: e, ...r } = this.props;
|
|
676
671
|
let t = { ...r }, { helmetData: n } = r;
|
|
677
|
-
if (e && (t = this.mapChildrenToProps(e, t)), n && !(n instanceof
|
|
678
|
-
const
|
|
679
|
-
n = new
|
|
672
|
+
if (e && (t = this.mapChildrenToProps(e, t)), n && !(n instanceof R)) {
|
|
673
|
+
const i = n;
|
|
674
|
+
n = new R(i.context, !0), delete t.helmetData;
|
|
680
675
|
}
|
|
681
|
-
return n ? /* @__PURE__ */
|
|
676
|
+
return n ? /* @__PURE__ */ y.createElement(Z, { ...t, context: n.value }) : /* @__PURE__ */ y.createElement(ee.Consumer, null, (i) => /* @__PURE__ */ y.createElement(Z, { ...t, context: i }));
|
|
682
677
|
}
|
|
683
678
|
};
|
|
684
|
-
const Ye = oe(!1), Ge = "protected", nt = () => {
|
|
685
|
-
const e = se(), r = ae(), t = ue(), n = fe(), o = ve(n.pathname), s = le(Ye), { protectedRoutes: l = [] } = r.options, i = !s && l.some(
|
|
686
|
-
(a) => pe({ path: a, end: !0 }, n.pathname)
|
|
687
|
-
);
|
|
688
|
-
if (ie({
|
|
689
|
-
queryKey: ["login-redirect"],
|
|
690
|
-
queryFn: async () => (await new Promise((a) => setTimeout(a, 1200)), await r.authentication?.signIn({
|
|
691
|
-
redirectTo: o.current
|
|
692
|
-
}), !0),
|
|
693
|
-
enabled: typeof window < "u" && i && !e.isPending && !e.isAuthenticated
|
|
694
|
-
}), i && !e.isAuthenticated)
|
|
695
|
-
return /* @__PURE__ */ y.jsx(
|
|
696
|
-
me,
|
|
697
|
-
{
|
|
698
|
-
open: !0,
|
|
699
|
-
onOpenChange: (a) => {
|
|
700
|
-
a || t(-1);
|
|
701
|
-
},
|
|
702
|
-
children: /* @__PURE__ */ y.jsxs(he, { children: [
|
|
703
|
-
/* @__PURE__ */ y.jsx(ye, { children: /* @__PURE__ */ y.jsx(Te, { children: "Logging you in..." }) }),
|
|
704
|
-
/* @__PURE__ */ y.jsx(ge, { children: "Please wait while we log you in." })
|
|
705
|
-
] })
|
|
706
|
-
}
|
|
707
|
-
);
|
|
708
|
-
if (i && !e.isAuthEnabled)
|
|
709
|
-
throw new ce("Authentication is not enabled", {
|
|
710
|
-
title: "Authentication is not enabled",
|
|
711
|
-
developerHint: "To use protectedRoutes you need authentication to be enabled"
|
|
712
|
-
});
|
|
713
|
-
return /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
|
|
714
|
-
s && /* @__PURE__ */ y.jsx(Ze, { children: /* @__PURE__ */ y.jsx(
|
|
715
|
-
"meta",
|
|
716
|
-
{
|
|
717
|
-
name: "pagefind",
|
|
718
|
-
"data-pagefind-filter": `section:${Ge}`,
|
|
719
|
-
content: "true"
|
|
720
|
-
}
|
|
721
|
-
) }),
|
|
722
|
-
/* @__PURE__ */ y.jsx(de, {})
|
|
723
|
-
] });
|
|
724
|
-
};
|
|
725
679
|
export {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
nt as R,
|
|
729
|
-
Ge as S,
|
|
730
|
-
ze as a
|
|
680
|
+
_e as H,
|
|
681
|
+
Se as a
|
|
731
682
|
};
|
|
732
|
-
//# sourceMappingURL=
|
|
683
|
+
//# sourceMappingURL=index.esm-BFcSKCe-.js.map
|