zudoku 0.0.0-fd0986c → 0.0.0-fdf886de
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/demo.js +1 -1
- package/dist/app/entry.client.js +1 -1
- package/dist/app/entry.server.js +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 +1 -1
- package/dist/config/config.d.ts +1 -0
- package/dist/config/validators/InputNavigationSchema.d.ts +251 -156
- package/dist/config/validators/InputNavigationSchema.js +5 -4
- package/dist/config/validators/InputNavigationSchema.js.map +1 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js +0 -1
- package/dist/config/validators/InputNavigationSchema.test-d.js.map +1 -1
- package/dist/config/validators/NavigationSchema.js +6 -3
- package/dist/config/validators/NavigationSchema.js.map +1 -1
- package/dist/config/validators/ProtectedRoutesSchema.d.ts +13 -0
- package/dist/config/validators/ProtectedRoutesSchema.js +10 -0
- package/dist/config/validators/ProtectedRoutesSchema.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +1 -1
- package/dist/config/validators/icon-types.js +16 -0
- package/dist/config/validators/icon-types.js.map +1 -1
- package/dist/config/validators/validate.d.ts +44 -30
- package/dist/config/validators/validate.js +8 -2
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/flat-config.d.ts +11 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js +11 -9
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/OAuthErrorPage.d.ts +3 -0
- package/dist/lib/authentication/components/OAuthErrorPage.js +99 -0
- package/dist/lib/authentication/components/OAuthErrorPage.js.map +1 -0
- package/dist/lib/authentication/errors.d.ts +6 -12
- package/dist/lib/authentication/errors.js +2 -1
- package/dist/lib/authentication/errors.js.map +1 -1
- package/dist/lib/authentication/hook.d.ts +1 -0
- package/dist/lib/authentication/hook.js.map +1 -1
- package/dist/lib/authentication/providers/azureb2c.js +4 -2
- package/dist/lib/authentication/providers/azureb2c.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +4 -2
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.js +3 -1
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/BuildCheck.d.ts +2 -1
- package/dist/lib/components/BuildCheck.js +9 -3
- package/dist/lib/components/BuildCheck.js.map +1 -1
- package/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- 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 +5 -3
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +1 -1
- package/dist/lib/components/NotFoundPage.js.map +1 -1
- package/dist/lib/components/TopNavigation.js +4 -3
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Typography.d.ts +1 -1
- package/dist/lib/components/Typography.js +1 -1
- package/dist/lib/components/Typography.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +22 -14
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +0 -27
- package/dist/lib/components/index.js +0 -15
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js +1 -1
- package/dist/lib/components/navigation/NavigationCategory.js.map +1 -1
- package/dist/lib/components/navigation/NavigationItem.d.ts +1 -1
- package/dist/lib/components/navigation/NavigationItem.js +11 -3
- package/dist/lib/components/navigation/NavigationItem.js.map +1 -1
- package/dist/lib/components/navigation/utils.d.ts +3 -1
- package/dist/lib/components/navigation/utils.js +18 -14
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/RouteGuard.js +9 -9
- package/dist/lib/core/RouteGuard.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +5 -1
- package/dist/lib/core/ZudokuContext.js +23 -1
- 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/plugins.d.ts +2 -1
- package/dist/lib/core/plugins.js.map +1 -1
- 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 +1 -1
- package/dist/lib/errors/ErrorAlert.js.map +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js +13 -3
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +3 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +9 -4
- package/dist/lib/plugins/api-keys/index.js +3 -7
- package/dist/lib/plugins/api-keys/index.js.map +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/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +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 +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js +1 -0
- package/dist/lib/plugins/openapi/graphql/graphql.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +42 -10
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js +1 -1
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +4 -2
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/shiki.d.ts +4 -0
- package/dist/lib/shiki.js +2 -0
- package/dist/lib/shiki.js.map +1 -1
- package/dist/lib/ui/ActionButton.js +1 -1
- package/dist/lib/ui/ActionButton.js.map +1 -1
- package/dist/lib/ui/Badge.d.ts +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/CodeBlock.js +30 -4
- package/dist/lib/ui/CodeBlock.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +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/util/invariant.d.ts +6 -5
- package/dist/lib/util/invariant.js +1 -1
- package/dist/lib/util/invariant.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 +9 -1
- package/dist/vite/dev-server.js.map +1 -1
- 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-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} +1 -1
- package/dist/vite/mdx/remark-static-generation.js.map +1 -0
- 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-docs.js +18 -13
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-mdx.js +6 -23
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-theme.js +80 -40
- package/dist/vite/plugin-theme.js.map +1 -1
- package/dist/vite/prerender/worker.js +5 -1
- package/dist/vite/prerender/worker.js.map +1 -1
- package/dist/vite/shadcn-registry.d.ts +4 -4
- package/dist/vite/sitemap.js +10 -9
- package/dist/vite/sitemap.js.map +1 -1
- package/lib/Button-B3o-2Xdf.js.map +1 -1
- package/lib/Card-CMDQUPM4.js.map +1 -1
- package/lib/CategoryHeading-DCpZu3yG.js +17 -0
- package/lib/CategoryHeading-DCpZu3yG.js.map +1 -0
- package/lib/ClientOnly-E7hGysn1.js.map +1 -1
- package/lib/CodeBlock-yJjjRwj-.js +98 -0
- package/lib/CodeBlock-yJjjRwj-.js.map +1 -0
- package/lib/{Command-C9AC5cf-.js → Command-CDn17s8X.js} +2 -2
- package/lib/{Command-C9AC5cf-.js.map → Command-CDn17s8X.js.map} +1 -1
- package/lib/Dialog-BrIjMmUK.js +114 -0
- package/lib/Dialog-BrIjMmUK.js.map +1 -0
- package/lib/{Drawer-DXGPOKPx.js → Drawer-DJ05s2pH.js} +86 -86
- package/lib/{Drawer-DXGPOKPx.js.map → Drawer-DJ05s2pH.js.map} +1 -1
- package/lib/{MdxPage-BI0vLjSn.js → MdxPage-BmOQ5m5g.js} +19 -18
- package/lib/{MdxPage-BI0vLjSn.js.map → MdxPage-BmOQ5m5g.js.map} +1 -1
- package/lib/OAuthErrorPage-Jv3r8wnL.js +150 -0
- package/lib/OAuthErrorPage-Jv3r8wnL.js.map +1 -0
- package/lib/{OasProvider-CK4C2QI3.js → OasProvider-CA_lpILt.js} +3 -3
- package/lib/{OasProvider-CK4C2QI3.js.map → OasProvider-CA_lpILt.js.map} +1 -1
- package/lib/{OperationList-DhA6x6qm.js → OperationList-C-TObVw6.js} +47 -44
- package/lib/OperationList-C-TObVw6.js.map +1 -0
- package/lib/{Pagination-YjKVdgm9.js → Pagination-CBiRGddW.js} +3 -3
- package/lib/{Pagination-YjKVdgm9.js.map → Pagination-CBiRGddW.js.map} +1 -1
- package/lib/RouteGuard-JLH6tCY8.js +56 -0
- package/lib/RouteGuard-JLH6tCY8.js.map +1 -0
- package/lib/RouterError-DcVonMP1.js +41 -0
- package/lib/RouterError-DcVonMP1.js.map +1 -0
- package/lib/{SchemaList-Cx9MS7Wf.js → SchemaList-BeYWvBC7.js} +15 -14
- package/lib/{SchemaList-Cx9MS7Wf.js.map → SchemaList-BeYWvBC7.js.map} +1 -1
- package/lib/{SchemaView-C6sTKWyS.js → SchemaView-CRcShewo.js} +4 -4
- package/lib/{SchemaView-C6sTKWyS.js.map → SchemaView-CRcShewo.js.map} +1 -1
- package/lib/Select-C3efYI1n.js +273 -0
- package/lib/Select-C3efYI1n.js.map +1 -0
- package/lib/{SignUp-DiDmVb3x.js → SignUp-CxBGHgba.js} +6 -6
- package/lib/{SignUp-DiDmVb3x.js.map → SignUp-CxBGHgba.js.map} +1 -1
- package/lib/{Slot-CrCBhP3G.js → Slot-DOtTvoyj.js} +2050 -2288
- package/lib/{Slot-CrCBhP3G.js.map → Slot-DOtTvoyj.js.map} +1 -1
- package/lib/Spinner-mNLZ6awP.js.map +1 -1
- package/lib/{SyntaxHighlight-CVe58ZSY.js → SyntaxHighlight-GR0eix_L.js} +411 -409
- package/lib/SyntaxHighlight-GR0eix_L.js.map +1 -0
- package/lib/{Toc-CpsFSXeD.js → Toc-BlcGIkXc.js} +2 -2
- package/lib/{Toc-CpsFSXeD.js.map → Toc-BlcGIkXc.js.map} +1 -1
- package/lib/ZudokuContext-BuJD7yIX.js +1286 -0
- package/lib/ZudokuContext-BuJD7yIX.js.map +1 -0
- package/lib/chunk-QMGIS6GS-DqecZ6nq.js +9204 -0
- package/lib/chunk-QMGIS6GS-DqecZ6nq.js.map +1 -0
- package/lib/{circular-OvXQH6UK.js → circular-CGTcsqA3.js} +2 -2
- package/lib/{circular-OvXQH6UK.js.map → circular-CGTcsqA3.js.map} +1 -1
- package/lib/cn-dYga0KKN.js.map +1 -1
- package/lib/{createServer-B5U_8E3S.js → createServer-DjgpuLne.js} +5 -5
- package/lib/{createServer-B5U_8E3S.js.map → createServer-DjgpuLne.js.map} +1 -1
- package/lib/errors-CrI3s7mR.js +45 -0
- package/lib/errors-CrI3s7mR.js.map +1 -0
- package/lib/hook-bv3iuX7X.js +247 -0
- package/lib/hook-bv3iuX7X.js.map +1 -0
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/{index-BzcS9JBW.js → index-CvTWnHZF.js} +860 -938
- package/lib/index-CvTWnHZF.js.map +1 -0
- package/lib/index-DI5SPFK9.js.map +1 -1
- package/lib/index-DmNq2fbN.js.map +1 -1
- package/lib/index-DzO-Qh6S.js +1061 -0
- package/lib/index-DzO-Qh6S.js.map +1 -0
- package/lib/{index-4XtG1tlD.js → index-HarEI51d.js} +2 -2
- package/lib/{index-4XtG1tlD.js.map → index-HarEI51d.js.map} +1 -1
- package/lib/index.esm-BnYHxCYC.js +683 -0
- package/lib/index.esm-BnYHxCYC.js.map +1 -0
- package/lib/index.esm-CdzlRw50.js +1254 -0
- package/lib/index.esm-CdzlRw50.js.map +1 -0
- package/lib/{invariant-DAFpPywt.js → invariant-Bm-FVUQE.js} +2 -6
- package/lib/invariant-Bm-FVUQE.js.map +1 -0
- package/lib/jsx-runtime-C5mzlN2N.js.map +1 -1
- package/lib/mutation-Dy_5up8v.js +196 -0
- package/lib/mutation-Dy_5up8v.js.map +1 -0
- package/lib/processors/removeExtensions.js.map +1 -1
- package/lib/processors/removeParameters.js.map +1 -1
- package/lib/processors/removePaths.js.map +1 -1
- package/lib/processors/traverse.js.map +1 -1
- package/lib/ui/Accordion.js.map +1 -1
- package/lib/ui/ActionButton.js +9 -9
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js.map +1 -1
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +1 -1
- package/lib/ui/Command.js +1 -1
- 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 +1 -1
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/EmbeddedCodeBlock.js +1 -1
- package/lib/ui/EmbeddedCodeBlock.js.map +1 -1
- package/lib/ui/Form.js +1 -1
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/HoverCard.js.map +1 -1
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js.map +1 -1
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js.map +1 -1
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js.map +1 -1
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js.map +1 -1
- package/lib/ui/Slider.js.map +1 -1
- package/lib/ui/Stepper.js.map +1 -1
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +4 -4
- package/lib/ui/Tabs.js.map +1 -1
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/useExposedProps-BH9aq4MD.js +113 -0
- package/lib/useExposedProps-BH9aq4MD.js.map +1 -0
- package/lib/useLatest-hmRS46UF.js +11 -0
- package/lib/useLatest-hmRS46UF.js.map +1 -0
- package/lib/zudoku.__internal.js +2965 -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 +46 -9880
- package/lib/zudoku.auth-azureb2c.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +25 -22
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +204 -195
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.auth-supabase.js +97 -0
- package/lib/zudoku.auth-supabase.js.map +1 -0
- package/lib/zudoku.components.js +21 -28
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +7 -7
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.icons.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +23 -22
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +410 -295
- 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 +1 -1
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -6
- package/lib/zudoku.plugin-openapi.js.map +1 -1
- package/lib/zudoku.plugin-redirect.js +3 -3
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +28 -27
- package/lib/zudoku.plugin-search-pagefind.js.map +1 -1
- package/lib/zudoku.plugins.js.map +1 -1
- package/lib/zudoku.router.js +123 -0
- package/lib/zudoku.router.js.map +1 -0
- package/package.json +31 -23
- package/src/app/demo.tsx +1 -1
- package/src/app/entry.client.tsx +1 -1
- package/src/app/entry.server.tsx +1 -1
- package/src/app/main.css +22 -5
- package/src/app/main.tsx +23 -11
- package/src/app/standalone.tsx +1 -1
- package/src/lib/authentication/components/CallbackHandler.tsx +22 -15
- package/src/lib/authentication/components/OAuthErrorPage.tsx +171 -0
- package/src/lib/authentication/errors.ts +27 -13
- package/src/lib/authentication/hook.ts +2 -0
- package/src/lib/authentication/providers/azureb2c.tsx +8 -3
- package/src/lib/authentication/providers/clerk.tsx +4 -1
- package/src/lib/authentication/providers/openid.tsx +7 -1
- package/src/lib/components/BuildCheck.tsx +13 -3
- package/src/lib/components/Header.tsx +4 -3
- package/src/lib/components/Heading.tsx +1 -1
- package/src/lib/components/Layout.tsx +2 -21
- package/src/lib/components/Markdown.tsx +3 -3
- package/src/lib/components/Meta.tsx +32 -0
- package/src/lib/components/MobileTopNavigation.tsx +6 -3
- package/src/lib/components/NotFoundPage.tsx +3 -2
- package/src/lib/components/TopNavigation.tsx +4 -4
- package/src/lib/components/Typography.tsx +1 -1
- package/src/lib/components/context/ZudokuContext.ts +26 -19
- package/src/lib/components/index.ts +0 -18
- package/src/lib/components/navigation/NavigationCategory.tsx +1 -1
- package/src/lib/components/navigation/NavigationItem.tsx +13 -3
- package/src/lib/components/navigation/utils.ts +21 -15
- package/src/lib/core/RouteGuard.tsx +13 -13
- package/src/lib/core/ZudokuContext.ts +37 -5
- package/src/lib/core/__internal.tsx +30 -0
- package/src/lib/core/plugins.ts +2 -1
- package/src/lib/core/router.ts +1 -0
- package/src/lib/errors/ErrorAlert.tsx +5 -7
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +17 -3
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +21 -3
- package/src/lib/plugins/api-keys/index.tsx +16 -11
- package/src/lib/plugins/custom-pages/index.tsx +3 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +1 -1
- package/src/lib/plugins/openapi/graphql/gql.ts +3 -3
- package/src/lib/plugins/openapi/graphql/graphql.ts +2 -0
- package/src/lib/plugins/openapi/index.tsx +66 -16
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +8 -2
- package/src/lib/shiki.ts +2 -0
- package/src/lib/ui/ActionButton.tsx +3 -1
- package/src/lib/ui/CodeBlock.tsx +38 -13
- package/src/lib/ui/Dialog.tsx +12 -3
- package/src/lib/ui/EmbeddedCodeBlock.tsx +1 -1
- package/src/lib/util/invariant.ts +7 -5
- package/src/shiki/langs/vue-vine.js +1 -0
- package/dist/vite/remarkStaticGeneration.js.map +0 -1
- package/lib/Alert-Cig_8hW6.js +0 -161
- package/lib/Alert-Cig_8hW6.js.map +0 -1
- package/lib/CodeBlock-BaBgX9Wy.js +0 -85
- package/lib/CodeBlock-BaBgX9Wy.js.map +0 -1
- package/lib/Dialog-DMWw1doX.js +0 -99
- package/lib/Dialog-DMWw1doX.js.map +0 -1
- package/lib/OperationList-DhA6x6qm.js.map +0 -1
- package/lib/RouteGuard-Vnlz_t51.js +0 -737
- package/lib/RouteGuard-Vnlz_t51.js.map +0 -1
- package/lib/SyntaxHighlight-CVe58ZSY.js.map +0 -1
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.js +0 -1839
- package/lib/chunk-DQRVZFIR-DHK7_Ilc.js.map +0 -1
- package/lib/clerk-BDZ31hjU.js +0 -25190
- package/lib/clerk-BDZ31hjU.js.map +0 -1
- package/lib/errors-DOCWNkkS.js +0 -78
- package/lib/errors-DOCWNkkS.js.map +0 -1
- package/lib/hook-CZjW2buS.js +0 -1510
- package/lib/hook-CZjW2buS.js.map +0 -1
- package/lib/index-Bm35Tkgf.js +0 -107
- package/lib/index-Bm35Tkgf.js.map +0 -1
- package/lib/index-BzcS9JBW.js.map +0 -1
- package/lib/index-Sb7nQNHJ.js +0 -3980
- package/lib/index-Sb7nQNHJ.js.map +0 -1
- package/lib/index.esm-Cp4wkyud.js +0 -1236
- package/lib/index.esm-Cp4wkyud.js.map +0 -1
- package/lib/invariant-DAFpPywt.js.map +0 -1
- package/lib/useExposedProps-BIYjecPD.js +0 -9
- package/lib/useExposedProps-BIYjecPD.js.map +0 -1
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
import y, { Component as k } from "react";
|
|
2
|
+
import { g as j } from "./invariant-Bm-FVUQE.js";
|
|
3
|
+
var S, U;
|
|
4
|
+
function ne() {
|
|
5
|
+
if (U) return S;
|
|
6
|
+
U = 1;
|
|
7
|
+
var e = typeof Element < "u", r = typeof Map == "function", t = typeof Set == "function", n = typeof ArrayBuffer == "function" && !!ArrayBuffer.isView;
|
|
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;
|
|
13
|
+
if (Array.isArray(s)) {
|
|
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;
|
|
17
|
+
return !0;
|
|
18
|
+
}
|
|
19
|
+
var u;
|
|
20
|
+
if (r && s instanceof Map && o instanceof Map) {
|
|
21
|
+
if (s.size !== o.size) return !1;
|
|
22
|
+
for (u = s.entries(); !(a = u.next()).done; )
|
|
23
|
+
if (!o.has(a.value[0])) return !1;
|
|
24
|
+
for (u = s.entries(); !(a = u.next()).done; )
|
|
25
|
+
if (!i(a.value[1], o.get(a.value[0]))) return !1;
|
|
26
|
+
return !0;
|
|
27
|
+
}
|
|
28
|
+
if (t && s instanceof Set && o instanceof Set) {
|
|
29
|
+
if (s.size !== o.size) return !1;
|
|
30
|
+
for (u = s.entries(); !(a = u.next()).done; )
|
|
31
|
+
if (!o.has(a.value[0])) return !1;
|
|
32
|
+
return !0;
|
|
33
|
+
}
|
|
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;
|
|
38
|
+
return !0;
|
|
39
|
+
}
|
|
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;
|
|
46
|
+
if (e && s instanceof Element) return !1;
|
|
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]]))
|
|
49
|
+
return !1;
|
|
50
|
+
return !0;
|
|
51
|
+
}
|
|
52
|
+
return s !== s && o !== o;
|
|
53
|
+
}
|
|
54
|
+
return S = function(o, l) {
|
|
55
|
+
try {
|
|
56
|
+
return i(o, l);
|
|
57
|
+
} catch (a) {
|
|
58
|
+
if ((a.message || "").match(/stack|recursion/i))
|
|
59
|
+
return console.warn("react-fast-compare cannot handle circular refs"), !1;
|
|
60
|
+
throw a;
|
|
61
|
+
}
|
|
62
|
+
}, S;
|
|
63
|
+
}
|
|
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) {
|
|
71
|
+
if (process.env.NODE_ENV !== "production" && t === void 0)
|
|
72
|
+
throw new Error("invariant requires an error message argument");
|
|
73
|
+
if (!r) {
|
|
74
|
+
var c;
|
|
75
|
+
if (t === void 0)
|
|
76
|
+
c = new Error(
|
|
77
|
+
"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."
|
|
78
|
+
);
|
|
79
|
+
else {
|
|
80
|
+
var u = [n, i, s, o, l, a], f = 0;
|
|
81
|
+
c = new Error(
|
|
82
|
+
t.replace(/%s/g, function() {
|
|
83
|
+
return u[f++];
|
|
84
|
+
})
|
|
85
|
+
), c.name = "Invariant Violation";
|
|
86
|
+
}
|
|
87
|
+
throw c.framesToPop = 1, c;
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
return x = e, x;
|
|
91
|
+
}
|
|
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;
|
|
98
|
+
if (s !== void 0)
|
|
99
|
+
return !!s;
|
|
100
|
+
if (r === t)
|
|
101
|
+
return !0;
|
|
102
|
+
if (typeof r != "object" || !r || typeof t != "object" || !t)
|
|
103
|
+
return !1;
|
|
104
|
+
var o = Object.keys(r), l = Object.keys(t);
|
|
105
|
+
if (o.length !== l.length)
|
|
106
|
+
return !1;
|
|
107
|
+
for (var a = Object.prototype.hasOwnProperty.bind(t), c = 0; c < o.length; c++) {
|
|
108
|
+
var u = o[c];
|
|
109
|
+
if (!a(u))
|
|
110
|
+
return !1;
|
|
111
|
+
var f = r[u], m = t[u];
|
|
112
|
+
if (s = n ? n.call(i, f, m, u) : void 0, s === !1 || s === void 0 && f !== m)
|
|
113
|
+
return !1;
|
|
114
|
+
}
|
|
115
|
+
return !0;
|
|
116
|
+
}), P;
|
|
117
|
+
}
|
|
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 || {}), $ = {
|
|
121
|
+
link: { rel: ["amphtml", "canonical", "alternate"] },
|
|
122
|
+
script: { type: ["application/ld+json"] },
|
|
123
|
+
meta: {
|
|
124
|
+
charset: "",
|
|
125
|
+
name: ["generator", "robots", "description"],
|
|
126
|
+
property: [
|
|
127
|
+
"og:type",
|
|
128
|
+
"og:title",
|
|
129
|
+
"og:url",
|
|
130
|
+
"og:image",
|
|
131
|
+
"og:image:alt",
|
|
132
|
+
"og:description",
|
|
133
|
+
"twitter:url",
|
|
134
|
+
"twitter:title",
|
|
135
|
+
"twitter:description",
|
|
136
|
+
"twitter:image",
|
|
137
|
+
"twitter:image:alt",
|
|
138
|
+
"twitter:card",
|
|
139
|
+
"twitter:site"
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
}, V = Object.values(G), q = {
|
|
143
|
+
accesskey: "accessKey",
|
|
144
|
+
charset: "charSet",
|
|
145
|
+
class: "className",
|
|
146
|
+
contenteditable: "contentEditable",
|
|
147
|
+
contextmenu: "contextMenu",
|
|
148
|
+
"http-equiv": "httpEquiv",
|
|
149
|
+
itemprop: "itemProp",
|
|
150
|
+
tabindex: "tabIndex"
|
|
151
|
+
}, fe = Object.entries(q).reduce(
|
|
152
|
+
(e, [r, t]) => (e[t] = r, e),
|
|
153
|
+
{}
|
|
154
|
+
), h = "data-rh", v = {
|
|
155
|
+
DEFAULT_TITLE: "defaultTitle",
|
|
156
|
+
DEFER: "defer",
|
|
157
|
+
ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
|
|
158
|
+
ON_CHANGE_CLIENT_STATE: "onChangeClientState",
|
|
159
|
+
TITLE_TEMPLATE: "titleTemplate",
|
|
160
|
+
PRIORITIZE_SEO_TAGS: "prioritizeSeoTags"
|
|
161
|
+
}, A = (e, r) => {
|
|
162
|
+
for (let t = e.length - 1; t >= 0; t -= 1) {
|
|
163
|
+
const n = e[t];
|
|
164
|
+
if (Object.prototype.hasOwnProperty.call(n, r))
|
|
165
|
+
return n[r];
|
|
166
|
+
}
|
|
167
|
+
return null;
|
|
168
|
+
}, pe = (e) => {
|
|
169
|
+
let r = A(
|
|
170
|
+
e,
|
|
171
|
+
"title"
|
|
172
|
+
/* TITLE */
|
|
173
|
+
);
|
|
174
|
+
const t = A(e, v.TITLE_TEMPLATE);
|
|
175
|
+
if (Array.isArray(r) && (r = r.join("")), t && r)
|
|
176
|
+
return t.replace(/%s/g, () => r);
|
|
177
|
+
const n = A(e, v.DEFAULT_TITLE);
|
|
178
|
+
return r || n || void 0;
|
|
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) => {
|
|
181
|
+
if (!t.length) {
|
|
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])
|
|
186
|
+
return t.concat(n);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return t;
|
|
190
|
+
}, []), he = (e) => console && typeof console.warn == "function" && console.warn(e), E = (e, r, t) => {
|
|
191
|
+
const n = {};
|
|
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 = {};
|
|
196
|
+
s.filter((a) => {
|
|
197
|
+
let c;
|
|
198
|
+
const u = Object.keys(a);
|
|
199
|
+
for (let m = 0; m < u.length; m += 1) {
|
|
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);
|
|
202
|
+
}
|
|
203
|
+
if (!c || !a[c])
|
|
204
|
+
return !1;
|
|
205
|
+
const f = a[c].toLowerCase();
|
|
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 = {
|
|
211
|
+
...n[c],
|
|
212
|
+
...o[c]
|
|
213
|
+
};
|
|
214
|
+
n[c] = u;
|
|
215
|
+
}
|
|
216
|
+
return i;
|
|
217
|
+
}, []).reverse();
|
|
218
|
+
}, ye = (e, r) => {
|
|
219
|
+
if (Array.isArray(e) && e.length) {
|
|
220
|
+
for (let t = 0; t < e.length; t += 1)
|
|
221
|
+
if (e[t][r])
|
|
222
|
+
return !0;
|
|
223
|
+
}
|
|
224
|
+
return !1;
|
|
225
|
+
}, Te = (e) => ({
|
|
226
|
+
baseTag: me([
|
|
227
|
+
"href"
|
|
228
|
+
/* HREF */
|
|
229
|
+
], e),
|
|
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(
|
|
235
|
+
"link",
|
|
236
|
+
[
|
|
237
|
+
"rel",
|
|
238
|
+
"href"
|
|
239
|
+
/* HREF */
|
|
240
|
+
],
|
|
241
|
+
e
|
|
242
|
+
),
|
|
243
|
+
metaTags: E(
|
|
244
|
+
"meta",
|
|
245
|
+
[
|
|
246
|
+
"name",
|
|
247
|
+
"charset",
|
|
248
|
+
"http-equiv",
|
|
249
|
+
"property",
|
|
250
|
+
"itemprop"
|
|
251
|
+
/* ITEM_PROP */
|
|
252
|
+
],
|
|
253
|
+
e
|
|
254
|
+
),
|
|
255
|
+
noscriptTags: E("noscript", [
|
|
256
|
+
"innerHTML"
|
|
257
|
+
/* INNER_HTML */
|
|
258
|
+
], e),
|
|
259
|
+
onChangeClientState: de(e),
|
|
260
|
+
scriptTags: E(
|
|
261
|
+
"script",
|
|
262
|
+
[
|
|
263
|
+
"src",
|
|
264
|
+
"innerHTML"
|
|
265
|
+
/* INNER_HTML */
|
|
266
|
+
],
|
|
267
|
+
e
|
|
268
|
+
),
|
|
269
|
+
styleTags: E("style", [
|
|
270
|
+
"cssText"
|
|
271
|
+
/* CSS_TEXT */
|
|
272
|
+
], 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) => {
|
|
277
|
+
const t = Object.keys(e);
|
|
278
|
+
for (let n = 0; n < t.length; n += 1)
|
|
279
|
+
if (r[t[n]] && r[t[n]].includes(e[t[n]]))
|
|
280
|
+
return !0;
|
|
281
|
+
return !1;
|
|
282
|
+
}, H = (e, r) => Array.isArray(e) ? e.reduce(
|
|
283
|
+
(t, n) => (ge(n, r) ? t.priority.push(n) : t.default.push(n), t),
|
|
284
|
+
{ priority: [], default: [] }
|
|
285
|
+
) : { default: e, priority: [] }, B = (e, r) => ({
|
|
286
|
+
...e,
|
|
287
|
+
[r]: void 0
|
|
288
|
+
}), ve = [
|
|
289
|
+
"noscript",
|
|
290
|
+
"script",
|
|
291
|
+
"style"
|
|
292
|
+
/* STYLE */
|
|
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) => {
|
|
294
|
+
const n = typeof e[t] < "u" ? `${t}="${e[t]}"` : `${t}`;
|
|
295
|
+
return r ? `${r} ${n}` : n;
|
|
296
|
+
}, ""), Ae = (e, r, t, n) => {
|
|
297
|
+
const i = J(t), s = W(r);
|
|
298
|
+
return i ? `<${e} ${h}="true" ${i}>${_(
|
|
299
|
+
s,
|
|
300
|
+
n
|
|
301
|
+
)}</${e}>` : `<${e} ${h}="true">${_(
|
|
302
|
+
s,
|
|
303
|
+
n
|
|
304
|
+
)}</${e}>`;
|
|
305
|
+
}, Ee = (e, r, t = !0) => r.reduce((n, i) => {
|
|
306
|
+
const s = i, o = Object.keys(s).filter(
|
|
307
|
+
(c) => !(c === "innerHTML" || c === "cssText")
|
|
308
|
+
).reduce((c, u) => {
|
|
309
|
+
const f = typeof s[u] > "u" ? u : `${u}="${_(s[u], t)}"`;
|
|
310
|
+
return c ? `${c} ${f}` : f;
|
|
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) => {
|
|
317
|
+
const n = {
|
|
318
|
+
key: r,
|
|
319
|
+
[h]: !0
|
|
320
|
+
}, i = Q(t, n);
|
|
321
|
+
return [y.createElement("title", i, r)];
|
|
322
|
+
}, w = (e, r) => r.map((t, n) => {
|
|
323
|
+
const i = {
|
|
324
|
+
key: n,
|
|
325
|
+
[h]: !0
|
|
326
|
+
};
|
|
327
|
+
return Object.keys(t).forEach((s) => {
|
|
328
|
+
const l = q[s] || s;
|
|
329
|
+
if (l === "innerHTML" || l === "cssText") {
|
|
330
|
+
const a = t.innerHTML || t.cssText;
|
|
331
|
+
i.dangerouslySetInnerHTML = { __html: a };
|
|
332
|
+
} else
|
|
333
|
+
i[l] = t[s];
|
|
334
|
+
}), y.createElement(e, i);
|
|
335
|
+
}), d = (e, r, t = !0) => {
|
|
336
|
+
switch (e) {
|
|
337
|
+
case "title":
|
|
338
|
+
return {
|
|
339
|
+
toComponent: () => be(e, r.title, r.titleAttributes),
|
|
340
|
+
toString: () => Ae(e, r.title, r.titleAttributes, t)
|
|
341
|
+
};
|
|
342
|
+
case "bodyAttributes":
|
|
343
|
+
case "htmlAttributes":
|
|
344
|
+
return {
|
|
345
|
+
toComponent: () => Q(r),
|
|
346
|
+
toString: () => J(r)
|
|
347
|
+
};
|
|
348
|
+
default:
|
|
349
|
+
return {
|
|
350
|
+
toComponent: () => w(e, r),
|
|
351
|
+
toString: () => Ee(e, r, t)
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
}, Oe = ({ metaTags: e, linkTags: r, scriptTags: t, encode: n }) => {
|
|
355
|
+
const i = H(e, $.meta), s = H(r, $.link), o = H(t, $.script);
|
|
356
|
+
return {
|
|
357
|
+
priorityMethods: {
|
|
358
|
+
toComponent: () => [
|
|
359
|
+
...w("meta", i.priority),
|
|
360
|
+
...w("link", s.priority),
|
|
361
|
+
...w("script", o.priority)
|
|
362
|
+
],
|
|
363
|
+
toString: () => (
|
|
364
|
+
// generate all the tags as strings and concatenate them
|
|
365
|
+
`${d("meta", i.priority, n)} ${d(
|
|
366
|
+
"link",
|
|
367
|
+
s.priority,
|
|
368
|
+
n
|
|
369
|
+
)} ${d("script", o.priority, n)}`
|
|
370
|
+
)
|
|
371
|
+
},
|
|
372
|
+
metaTags: i.default,
|
|
373
|
+
linkTags: s.default,
|
|
374
|
+
scriptTags: o.default
|
|
375
|
+
};
|
|
376
|
+
}, Ce = (e) => {
|
|
377
|
+
const {
|
|
378
|
+
baseTag: r,
|
|
379
|
+
bodyAttributes: t,
|
|
380
|
+
encode: n = !0,
|
|
381
|
+
htmlAttributes: i,
|
|
382
|
+
noscriptTags: s,
|
|
383
|
+
styleTags: o,
|
|
384
|
+
title: l = "",
|
|
385
|
+
titleAttributes: a,
|
|
386
|
+
prioritizeSeoTags: c
|
|
387
|
+
} = e;
|
|
388
|
+
let { linkTags: u, metaTags: f, scriptTags: m } = e, p = {
|
|
389
|
+
toComponent: () => {
|
|
390
|
+
},
|
|
391
|
+
toString: () => ""
|
|
392
|
+
};
|
|
393
|
+
return c && ({ priorityMethods: p, linkTags: u, metaTags: f, scriptTags: m } = Oe(e)), {
|
|
394
|
+
priority: p,
|
|
395
|
+
base: d("base", r, n),
|
|
396
|
+
bodyAttributes: d("bodyAttributes", t, n),
|
|
397
|
+
htmlAttributes: d("htmlAttributes", i, n),
|
|
398
|
+
link: d("link", u, n),
|
|
399
|
+
meta: d("meta", f, n),
|
|
400
|
+
noscript: d("noscript", s, n),
|
|
401
|
+
script: d("script", m, n),
|
|
402
|
+
style: d("style", o, n),
|
|
403
|
+
title: d("title", { title: l, titleAttributes: a }, n)
|
|
404
|
+
};
|
|
405
|
+
}, D = Ce, C = [], X = !!(typeof window < "u" && window.document && window.document.createElement), R = class {
|
|
406
|
+
instances = [];
|
|
407
|
+
canUseDOM = X;
|
|
408
|
+
context;
|
|
409
|
+
value = {
|
|
410
|
+
setHelmet: (e) => {
|
|
411
|
+
this.context.helmet = e;
|
|
412
|
+
},
|
|
413
|
+
helmetInstances: {
|
|
414
|
+
get: () => this.canUseDOM ? C : this.instances,
|
|
415
|
+
add: (e) => {
|
|
416
|
+
(this.canUseDOM ? C : this.instances).push(e);
|
|
417
|
+
},
|
|
418
|
+
remove: (e) => {
|
|
419
|
+
const r = (this.canUseDOM ? C : this.instances).indexOf(e);
|
|
420
|
+
(this.canUseDOM ? C : this.instances).splice(r, 1);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
constructor(e, r) {
|
|
425
|
+
this.context = e, this.canUseDOM = r || !1, r || (e.helmet = D({
|
|
426
|
+
baseTag: [],
|
|
427
|
+
bodyAttributes: {},
|
|
428
|
+
htmlAttributes: {},
|
|
429
|
+
linkTags: [],
|
|
430
|
+
metaTags: [],
|
|
431
|
+
noscriptTags: [],
|
|
432
|
+
scriptTags: [],
|
|
433
|
+
styleTags: [],
|
|
434
|
+
title: "",
|
|
435
|
+
titleAttributes: {}
|
|
436
|
+
}));
|
|
437
|
+
}
|
|
438
|
+
}, we = {}, ee = y.createContext(we), Se = class te extends k {
|
|
439
|
+
static canUseDOM = X;
|
|
440
|
+
helmetData;
|
|
441
|
+
constructor(r) {
|
|
442
|
+
super(r), this.helmetData = new R(this.props.context || {}, te.canUseDOM);
|
|
443
|
+
}
|
|
444
|
+
render() {
|
|
445
|
+
return /* @__PURE__ */ y.createElement(ee.Provider, { value: this.helmetData.value }, this.props.children);
|
|
446
|
+
}
|
|
447
|
+
}, g = (e, r) => {
|
|
448
|
+
const t = document.head || document.querySelector(
|
|
449
|
+
"head"
|
|
450
|
+
/* HEAD */
|
|
451
|
+
), n = t.querySelectorAll(`${e}[${h}]`), i = [].slice.call(n), s = [];
|
|
452
|
+
let o;
|
|
453
|
+
return r && r.length && r.forEach((l) => {
|
|
454
|
+
const a = document.createElement(e);
|
|
455
|
+
for (const c in l)
|
|
456
|
+
if (Object.prototype.hasOwnProperty.call(l, c))
|
|
457
|
+
if (c === "innerHTML")
|
|
458
|
+
a.innerHTML = l.innerHTML;
|
|
459
|
+
else if (c === "cssText")
|
|
460
|
+
a.styleSheet ? a.styleSheet.cssText = l.cssText : a.appendChild(document.createTextNode(l.cssText));
|
|
461
|
+
else {
|
|
462
|
+
const u = c, f = typeof l[u] > "u" ? "" : l[u];
|
|
463
|
+
a.setAttribute(c, f);
|
|
464
|
+
}
|
|
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,
|
|
468
|
+
newTags: s
|
|
469
|
+
};
|
|
470
|
+
}, M = (e, r) => {
|
|
471
|
+
const t = document.getElementsByTagName(e)[0];
|
|
472
|
+
if (!t)
|
|
473
|
+
return;
|
|
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);
|
|
479
|
+
c !== -1 && s.splice(c, 1);
|
|
480
|
+
}
|
|
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);
|
|
486
|
+
}, Y = (e, r) => {
|
|
487
|
+
const {
|
|
488
|
+
baseTag: t,
|
|
489
|
+
bodyAttributes: n,
|
|
490
|
+
htmlAttributes: i,
|
|
491
|
+
linkTags: s,
|
|
492
|
+
metaTags: o,
|
|
493
|
+
noscriptTags: l,
|
|
494
|
+
onChangeClientState: a,
|
|
495
|
+
scriptTags: c,
|
|
496
|
+
styleTags: u,
|
|
497
|
+
title: f,
|
|
498
|
+
titleAttributes: m
|
|
499
|
+
} = e;
|
|
500
|
+
M("body", n), M("html", i), xe(f, m);
|
|
501
|
+
const p = {
|
|
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 = {};
|
|
509
|
+
Object.keys(p).forEach((O) => {
|
|
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(() => {
|
|
515
|
+
Y(e, () => {
|
|
516
|
+
b = null;
|
|
517
|
+
});
|
|
518
|
+
}) : (Y(e), b = null);
|
|
519
|
+
}, $e = Pe, Z = class extends k {
|
|
520
|
+
rendered = !1;
|
|
521
|
+
shouldComponentUpdate(e) {
|
|
522
|
+
return !ue(e, this.props);
|
|
523
|
+
}
|
|
524
|
+
componentDidUpdate() {
|
|
525
|
+
this.emitChange();
|
|
526
|
+
}
|
|
527
|
+
componentWillUnmount() {
|
|
528
|
+
const { helmetInstances: e } = this.props.context;
|
|
529
|
+
e.remove(this), this.emitChange();
|
|
530
|
+
}
|
|
531
|
+
emitChange() {
|
|
532
|
+
const { helmetInstances: e, setHelmet: r } = this.props.context;
|
|
533
|
+
let t = null;
|
|
534
|
+
const n = Te(
|
|
535
|
+
e.get().map((i) => {
|
|
536
|
+
const s = { ...i.props };
|
|
537
|
+
return delete s.context, s;
|
|
538
|
+
})
|
|
539
|
+
);
|
|
540
|
+
Se.canUseDOM ? $e(n) : D && (t = D(n)), r(t);
|
|
541
|
+
}
|
|
542
|
+
// componentWillMount will be deprecated
|
|
543
|
+
// for SSR, initialize on first render
|
|
544
|
+
// constructor is also unsafe in StrictMode
|
|
545
|
+
init() {
|
|
546
|
+
if (this.rendered)
|
|
547
|
+
return;
|
|
548
|
+
this.rendered = !0;
|
|
549
|
+
const { helmetInstances: e } = this.props.context;
|
|
550
|
+
e.add(this), this.emitChange();
|
|
551
|
+
}
|
|
552
|
+
render() {
|
|
553
|
+
return this.init(), null;
|
|
554
|
+
}
|
|
555
|
+
}, _e = class extends k {
|
|
556
|
+
static defaultProps = {
|
|
557
|
+
defer: !0,
|
|
558
|
+
encodeSpecialCharacters: !0,
|
|
559
|
+
prioritizeSeoTags: !1
|
|
560
|
+
};
|
|
561
|
+
shouldComponentUpdate(e) {
|
|
562
|
+
return !ae(B(this.props, "helmetData"), B(e, "helmetData"));
|
|
563
|
+
}
|
|
564
|
+
mapNestedChildrenToProps(e, r) {
|
|
565
|
+
if (!r)
|
|
566
|
+
return null;
|
|
567
|
+
switch (e.type) {
|
|
568
|
+
case "script":
|
|
569
|
+
case "noscript":
|
|
570
|
+
return {
|
|
571
|
+
innerHTML: r
|
|
572
|
+
};
|
|
573
|
+
case "style":
|
|
574
|
+
return {
|
|
575
|
+
cssText: r
|
|
576
|
+
};
|
|
577
|
+
default:
|
|
578
|
+
throw new Error(
|
|
579
|
+
`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`
|
|
580
|
+
);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
flattenArrayTypeChildren(e, r, t, n) {
|
|
584
|
+
return {
|
|
585
|
+
...r,
|
|
586
|
+
[e.type]: [
|
|
587
|
+
...r[e.type] || [],
|
|
588
|
+
{
|
|
589
|
+
...t,
|
|
590
|
+
...this.mapNestedChildrenToProps(e, n)
|
|
591
|
+
}
|
|
592
|
+
]
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
mapObjectTypeChildren(e, r, t, n) {
|
|
596
|
+
switch (e.type) {
|
|
597
|
+
case "title":
|
|
598
|
+
return {
|
|
599
|
+
...r,
|
|
600
|
+
[e.type]: n,
|
|
601
|
+
titleAttributes: { ...t }
|
|
602
|
+
};
|
|
603
|
+
case "body":
|
|
604
|
+
return {
|
|
605
|
+
...r,
|
|
606
|
+
bodyAttributes: { ...t }
|
|
607
|
+
};
|
|
608
|
+
case "html":
|
|
609
|
+
return {
|
|
610
|
+
...r,
|
|
611
|
+
htmlAttributes: { ...t }
|
|
612
|
+
};
|
|
613
|
+
default:
|
|
614
|
+
return {
|
|
615
|
+
...r,
|
|
616
|
+
[e.type]: { ...t }
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
mapArrayTypeChildrenToProps(e, r) {
|
|
621
|
+
let t = { ...r };
|
|
622
|
+
return Object.keys(e).forEach((n) => {
|
|
623
|
+
t = {
|
|
624
|
+
...t,
|
|
625
|
+
[n]: e[n]
|
|
626
|
+
};
|
|
627
|
+
}), t;
|
|
628
|
+
}
|
|
629
|
+
warnOnInvalidChildren(e, r) {
|
|
630
|
+
return z(
|
|
631
|
+
V.some((t) => e.type === t),
|
|
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(
|
|
633
|
+
", "
|
|
634
|
+
)} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`
|
|
635
|
+
), z(
|
|
636
|
+
!r || typeof r == "string" || Array.isArray(r) && !r.some((t) => typeof t != "string"),
|
|
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.`
|
|
638
|
+
), !0;
|
|
639
|
+
}
|
|
640
|
+
mapChildrenToProps(e, r) {
|
|
641
|
+
let t = {};
|
|
642
|
+
return y.Children.forEach(e, (n) => {
|
|
643
|
+
if (!n || !n.props)
|
|
644
|
+
return;
|
|
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) {
|
|
648
|
+
case "Symbol(react.fragment)":
|
|
649
|
+
r = this.mapChildrenToProps(i, r);
|
|
650
|
+
break;
|
|
651
|
+
case "link":
|
|
652
|
+
case "meta":
|
|
653
|
+
case "noscript":
|
|
654
|
+
case "script":
|
|
655
|
+
case "style":
|
|
656
|
+
t = this.flattenArrayTypeChildren(
|
|
657
|
+
n,
|
|
658
|
+
t,
|
|
659
|
+
o,
|
|
660
|
+
i
|
|
661
|
+
);
|
|
662
|
+
break;
|
|
663
|
+
default:
|
|
664
|
+
r = this.mapObjectTypeChildren(n, r, o, i);
|
|
665
|
+
break;
|
|
666
|
+
}
|
|
667
|
+
}), this.mapArrayTypeChildrenToProps(t, r);
|
|
668
|
+
}
|
|
669
|
+
render() {
|
|
670
|
+
const { children: e, ...r } = this.props;
|
|
671
|
+
let t = { ...r }, { helmetData: n } = r;
|
|
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;
|
|
675
|
+
}
|
|
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 }));
|
|
677
|
+
}
|
|
678
|
+
};
|
|
679
|
+
export {
|
|
680
|
+
_e as H,
|
|
681
|
+
Se as a
|
|
682
|
+
};
|
|
683
|
+
//# sourceMappingURL=index.esm-BnYHxCYC.js.map
|