zudoku 0.0.0-fa903e7 → 0.0.0-fabd0c1
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/client.d.ts +7 -0
- package/dist/app/demo.js +1 -1
- package/dist/app/demo.js.map +1 -1
- package/dist/app/entry.client.d.ts +1 -0
- package/dist/app/entry.client.js +14 -15
- package/dist/app/entry.client.js.map +1 -1
- package/dist/app/entry.server.d.ts +1 -0
- package/dist/app/entry.server.js +2 -2
- package/dist/app/entry.server.js.map +1 -1
- package/dist/app/main.d.ts +1 -1
- package/dist/app/main.js +2 -1
- package/dist/app/main.js.map +1 -1
- package/dist/app/sentry.d.ts +3 -0
- package/dist/app/sentry.js +19 -0
- package/dist/app/sentry.js.map +1 -0
- package/dist/app/standalone.js +1 -1
- package/dist/app/standalone.js.map +1 -1
- package/dist/app/tailwind.d.ts +2 -1
- package/dist/app/tailwind.js +64 -52
- package/dist/app/tailwind.js.map +1 -1
- package/dist/cli/cli.js +0 -2
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/cmds/build.js +1 -0
- package/dist/cli/cmds/build.js.map +1 -1
- package/dist/cli/common/outdated.js +2 -1
- package/dist/cli/common/outdated.js.map +1 -1
- package/dist/config/common.d.ts +8 -0
- package/dist/config/common.js +2 -0
- package/dist/config/common.js.map +1 -0
- package/dist/config/config.d.ts +3 -2
- package/dist/config/loader.d.ts +20 -0
- package/dist/config/loader.js +154 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/validators/InputSidebarSchema.d.ts +14 -13
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/common.d.ts +4945 -0
- package/dist/config/validators/common.js +280 -0
- package/dist/config/validators/common.js.map +1 -0
- package/dist/config/validators/icon-types.d.ts +1 -0
- package/dist/config/validators/icon-types.js +2 -0
- package/dist/config/validators/icon-types.js.map +1 -0
- package/dist/config/validators/validate.d.ts +783 -533
- package/dist/config/validators/validate.js +9 -234
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js +1 -1
- package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
- package/dist/lib/authentication/components/SignIn.js +1 -1
- package/dist/lib/authentication/components/SignIn.js.map +1 -1
- package/dist/lib/authentication/components/SignOut.js +1 -1
- package/dist/lib/authentication/components/SignOut.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +7 -0
- package/dist/lib/authentication/providers/openid.js +8 -2
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/AnchorLink.d.ts +1 -1
- package/dist/lib/components/AnchorLink.js +1 -1
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Bootstrap.d.ts +1 -2
- package/dist/lib/components/Bootstrap.js +3 -3
- package/dist/lib/components/Bootstrap.js.map +1 -1
- package/dist/lib/components/Header.js +2 -2
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +4 -4
- package/dist/lib/components/Heading.js +1 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/Layout.js +4 -3
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Markdown.js +1 -1
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +1 -1
- 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/ReactMarkdown.d.ts +29 -0
- package/dist/lib/components/ReactMarkdown.js +182 -0
- package/dist/lib/components/ReactMarkdown.js.map +1 -0
- package/dist/lib/components/Search.d.ts +3 -1
- package/dist/lib/components/Search.js +3 -3
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/SlotletProvider.d.ts +2 -2
- package/dist/lib/components/SyntaxHighlight.js +0 -4
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/TopNavigation.d.ts +1 -1
- package/dist/lib/components/TopNavigation.js +1 -1
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.js +1 -1
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +1 -1
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +4 -4
- package/dist/lib/components/index.js +1 -1
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.d.ts +3 -1
- package/dist/lib/components/navigation/Sidebar.js +2 -2
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarBadge.d.ts +0 -9
- package/dist/lib/components/navigation/SidebarBadge.js +0 -9
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.d.ts +2 -2
- package/dist/lib/components/navigation/SidebarCategory.js +4 -5
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +2 -4
- package/dist/lib/components/navigation/SidebarItem.js +6 -11
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/components/navigation/utils.js +1 -1
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +1 -1
- package/dist/lib/core/plugins.d.ts +3 -5
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/RouterError.js +1 -1
- package/dist/lib/errors/RouterError.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +4 -1
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.d.ts +2 -0
- package/dist/lib/plugins/api-catalog/Catalog.js +36 -0
- package/dist/lib/plugins/api-catalog/Catalog.js.map +1 -0
- package/dist/lib/plugins/api-catalog/index.d.ts +30 -0
- package/dist/lib/plugins/api-catalog/index.js +15 -0
- package/dist/lib/plugins/api-catalog/index.js.map +1 -0
- package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js +1 -1
- package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +3 -3
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +3 -1
- package/dist/lib/plugins/markdown/index.js.map +1 -1
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +24 -3
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.d.ts +2 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +14 -4
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +4 -2
- package/dist/lib/plugins/openapi/Route.js +25 -2
- package/dist/lib/plugins/openapi/Route.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +3 -13
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/context.d.ts +3 -3
- 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 +2 -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 +13 -13
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +19 -0
- 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/util/methodToColor.d.ts +20 -0
- package/dist/lib/plugins/openapi/util/methodToColor.js +24 -0
- package/dist/lib/plugins/openapi/util/methodToColor.js.map +1 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.d.ts +1 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js +27 -0
- package/dist/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.js.map +1 -0
- package/dist/lib/plugins/redirect/index.d.ts +1 -1
- package/dist/lib/plugins/redirect/index.js +1 -1
- package/dist/lib/plugins/redirect/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/index.d.ts +22 -3
- package/dist/lib/plugins/search-inkeep/index.js +41 -5
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/plugins/search-inkeep/inkeep.d.ts +3 -4
- package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +1 -1
- package/dist/lib/ui/Command.d.ts +1 -1
- package/dist/lib/util/MdxComponents.d.ts +18 -19
- package/dist/lib/util/MdxComponents.js +1 -3
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/createVariantComponent.d.ts +2 -2
- package/dist/lib/util/useExposedProps.js +1 -1
- package/dist/lib/util/useExposedProps.js.map +1 -1
- package/dist/lib/util/useOnScreen.d.ts +1 -1
- package/dist/lib/util/useScrollToAnchor.js +1 -1
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/lib/util/useScrollToTop.js +1 -1
- package/dist/lib/util/useScrollToTop.js.map +1 -1
- package/dist/vite/build.js +15 -3
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +6 -4
- package/dist/vite/config.js +59 -24
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +4 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/css/collect.d.ts +2 -0
- package/dist/vite/css/collect.js +27 -0
- package/dist/vite/css/collect.js.map +1 -0
- package/dist/vite/css/plugin.d.ts +5 -0
- package/dist/vite/css/plugin.js +79 -0
- package/dist/vite/css/plugin.js.map +1 -0
- package/dist/vite/dev-server.js +19 -6
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/output.d.ts +1 -1
- package/dist/vite/output.js +25 -16
- package/dist/vite/output.js.map +1 -1
- package/dist/vite/plugin-api.js +79 -10
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-component.js +1 -0
- 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.map +1 -1
- package/dist/vite/plugin-config.js +20 -0
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-mdx.js +50 -1
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/{plugin-custom-css.d.ts → plugin-theme-css.d.ts} +2 -2
- package/dist/vite/{plugin-custom-css.js → plugin-theme-css.js} +10 -3
- package/dist/vite/plugin-theme-css.js.map +1 -0
- package/dist/vite/plugin.d.ts +1 -2
- package/dist/vite/plugin.js +6 -2
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/prerender.d.ts +2 -1
- package/dist/vite/prerender.js +2 -2
- package/dist/vite/prerender.js.map +1 -1
- package/dist/vite/sitemap.d.ts +1 -1
- package/dist/zuplo/env.d.ts +6 -0
- package/dist/zuplo/env.js +9 -0
- package/dist/zuplo/env.js.map +1 -0
- package/dist/zuplo/with-zuplo.d.ts +2 -2
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/AnchorLink-DFZZbmvr.js +34 -0
- package/lib/AnchorLink-DFZZbmvr.js.map +1 -0
- package/lib/{AuthenticationPlugin-D0Em0SwR.js → AuthenticationPlugin-fB7viE7A.js} +15 -16
- package/lib/AuthenticationPlugin-fB7viE7A.js.map +1 -0
- package/lib/{Button-jK0EsymC.js → Button-DeAoTouo.js} +4 -4
- package/lib/{Button-jK0EsymC.js.map → Button-DeAoTouo.js.map} +1 -1
- package/lib/{CategoryHeading-Bb9dqxD3.js → CategoryHeading-CBconmtI.js} +3 -3
- package/lib/{CategoryHeading-Bb9dqxD3.js.map → CategoryHeading-CBconmtI.js.map} +1 -1
- package/lib/ClientOnly-E7hGysn1.js.map +1 -1
- package/lib/{Dialog-k70Qfukb.js → Dialog-Bxv1yEIg.js} +3 -3
- package/lib/{Dialog-k70Qfukb.js.map → Dialog-Bxv1yEIg.js.map} +1 -1
- package/lib/{Markdown-ievDDhFT.js → Markdown-CZDLNOFc.js} +13227 -13217
- package/lib/Markdown-CZDLNOFc.js.map +1 -0
- package/lib/{MdxPage-B2FpJ9KC.js → MdxPage-CPBw4_lf.js} +82 -77
- package/lib/MdxPage-CPBw4_lf.js.map +1 -0
- package/lib/OperationList-n4U_BHmO.js +5062 -0
- package/lib/OperationList-n4U_BHmO.js.map +1 -0
- package/lib/Route-C8nwd9A2.js +37 -0
- package/lib/Route-C8nwd9A2.js.map +1 -0
- package/lib/{Select-O9ZM3ZgX.js → Select-D3XuKKuH.js} +5 -5
- package/lib/{Select-O9ZM3ZgX.js.map → Select-D3XuKKuH.js.map} +1 -1
- package/lib/SlotletProvider-pfc9oejW.js +221 -0
- package/lib/SlotletProvider-pfc9oejW.js.map +1 -0
- package/lib/{Spinner-3cQDBVGr.js → Spinner-DuxJLLNE.js} +2 -2
- package/lib/{Spinner-3cQDBVGr.js.map → Spinner-DuxJLLNE.js.map} +1 -1
- package/lib/StaggeredRender-DgsamH_G.js +17 -0
- package/lib/StaggeredRender-DgsamH_G.js.map +1 -0
- package/lib/{SyntaxHighlight-DkLOsjHS.js → SyntaxHighlight-Bz-lOJtH.js} +8 -12
- package/lib/{SyntaxHighlight-DkLOsjHS.js.map → SyntaxHighlight-Bz-lOJtH.js.map} +1 -1
- package/lib/assets/{index-B_Jk_Yzp.js → index-C7jnHK4b.js} +218 -197
- package/lib/assets/index-C7jnHK4b.js.map +1 -0
- package/lib/assets/{worker-BHClFO3A.js → worker-D2kRl-cG.js} +5285 -4904
- package/lib/assets/worker-D2kRl-cG.js.map +1 -0
- package/lib/chunk-D52XG6IA-Dl7HLe6j.js +1823 -0
- package/lib/chunk-D52XG6IA-Dl7HLe6j.js.map +1 -0
- package/lib/{cn-BmFQLtkS.js → cn-qaFjX9_3.js} +2 -2
- package/lib/cn-qaFjX9_3.js.map +1 -0
- package/lib/{context-D1nXWxm7.js → context-h_UkBLvr.js} +2 -2
- package/lib/context-h_UkBLvr.js.map +1 -0
- package/lib/{createServer-CpJlUPtn.js → createServer-69sLlmQA.js} +4820 -4440
- package/lib/createServer-69sLlmQA.js.map +1 -0
- package/lib/{hook-hEqe7fPB.js → hook-DgGeo5iL.js} +3 -3
- package/lib/{hook-hEqe7fPB.js.map → hook-DgGeo5iL.js.map} +1 -1
- package/lib/{index-CkwDvuPt.js → index-CBXSgjaE.js} +259 -238
- package/lib/index-CBXSgjaE.js.map +1 -0
- package/lib/index-CPNSgwSb.js +36 -0
- package/lib/index-CPNSgwSb.js.map +1 -0
- package/lib/index-DStSNvP-.js +1284 -0
- package/lib/index-DStSNvP-.js.map +1 -0
- package/lib/index-LNp6rxyU.js.map +1 -1
- package/lib/index.esm-BSV1C092.js +692 -0
- package/lib/index.esm-BSV1C092.js.map +1 -0
- package/lib/index.esm-BnnBRKJX.js +1214 -0
- package/lib/index.esm-BnnBRKJX.js.map +1 -0
- package/lib/invariant-Caa8-XvF.js.map +1 -1
- package/lib/jsx-runtime-Dx-03ztt.js +446 -0
- package/lib/jsx-runtime-Dx-03ztt.js.map +1 -0
- package/lib/object_hash-BNWPnMN9.js +787 -0
- package/lib/object_hash-BNWPnMN9.js.map +1 -0
- package/lib/post-processors/removeExtensions.js.map +1 -1
- package/lib/post-processors/removePaths.js.map +1 -1
- package/lib/post-processors/traverse.js.map +1 -1
- package/lib/prism-csharp.min-DUwvItt4.js +63 -0
- package/lib/{prism-csharp.min-Yizuc34Y.js.map → prism-csharp.min-DUwvItt4.js.map} +1 -1
- package/lib/prism-java.min-BtgBR4yd.js +35 -0
- package/lib/{prism-java.min-d5iT_mOd.js.map → prism-java.min-BtgBR4yd.js.map} +1 -1
- package/lib/prism-markup-BNGj0Tvm.js.map +1 -1
- package/lib/prism-ruby.min-DeDXCp1r.js +38 -0
- package/lib/{prism-ruby.min-C7LwcKyz.js.map → prism-ruby.min-DeDXCp1r.js.map} +1 -1
- package/lib/prism-typescript.min-CD7H2IYQ.js +34 -0
- package/lib/{prism-typescript.min-oSVeWCAd.js.map → prism-typescript.min-CD7H2IYQ.js.map} +1 -1
- package/lib/state-CFQsUZUP.js +202 -0
- package/lib/state-CFQsUZUP.js.map +1 -0
- package/lib/ui/Accordion.js +2 -2
- package/lib/ui/Accordion.js.map +1 -1
- package/lib/ui/ActionButton.js +4 -4
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Alert.js +3 -3
- package/lib/ui/Alert.js.map +1 -1
- package/lib/ui/AlertDialog.js +2 -2
- package/lib/ui/AlertDialog.js.map +1 -1
- package/lib/ui/Badge.js +3 -3
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +2 -2
- package/lib/ui/Breadcrumb.js.map +1 -1
- package/lib/ui/Button.js +3 -3
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +2 -2
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +2 -2
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +407 -401
- package/lib/ui/Carousel.js.map +1 -1
- package/lib/ui/Checkbox.js +2 -2
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/Command.js +111 -108
- 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 +81 -81
- package/lib/ui/Drawer.js.map +1 -1
- package/lib/ui/DropdownMenu.js +2 -2
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/Form.js +3 -3
- package/lib/ui/Form.js.map +1 -1
- package/lib/ui/HoverCard.js +2 -2
- package/lib/ui/Input.js +2 -2
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +3 -3
- package/lib/ui/Pagination.js +2 -2
- package/lib/ui/Pagination.js.map +1 -1
- package/lib/ui/Popover.js +2 -2
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js +2 -2
- package/lib/ui/Progress.js.map +1 -1
- package/lib/ui/RadioGroup.js +2 -2
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js +2 -2
- package/lib/ui/ScrollArea.js.map +1 -1
- package/lib/ui/Select.js +2 -2
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +2 -2
- package/lib/ui/Skeleton.js.map +1 -1
- package/lib/ui/Slider.js +2 -2
- package/lib/ui/Switch.js +2 -2
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/Tabs.js +2 -2
- package/lib/ui/Textarea.js +2 -2
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js +3 -3
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js +2 -2
- package/lib/ui/ToggleGroup.js.map +1 -1
- package/lib/ui/Tooltip.js +2 -2
- package/lib/useExposedProps-DE9lR6MF.js +9 -0
- package/lib/useExposedProps-DE9lR6MF.js.map +1 -0
- package/lib/{utils-DcpDOncX.js → utils-B4O1uet5.js} +35 -36
- package/lib/{utils-DcpDOncX.js.map → utils-B4O1uet5.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +382 -374
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +773 -992
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +1 -1
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +123 -0
- package/lib/zudoku.plugin-api-catalog.js.map +1 -0
- package/lib/zudoku.plugin-api-keys.js +15 -16
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +4 -4
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +2 -2
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +5 -5
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-inkeep.js +53 -24
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/package.json +59 -47
- package/src/app/demo.tsx +1 -1
- package/src/app/entry.client.tsx +16 -15
- package/src/app/entry.server.tsx +3 -2
- package/src/app/main.tsx +6 -2
- package/src/app/sentry.ts +24 -0
- package/src/app/standalone.tsx +1 -1
- package/src/app/tailwind.ts +67 -52
- package/src/lib/authentication/components/CallbackHandler.tsx +1 -1
- package/src/lib/authentication/components/SignIn.tsx +1 -1
- package/src/lib/authentication/components/SignOut.tsx +1 -1
- package/src/lib/authentication/providers/openid.tsx +12 -5
- package/src/lib/components/AnchorLink.tsx +1 -1
- package/src/lib/components/Bootstrap.tsx +4 -6
- package/src/lib/components/Header.tsx +2 -2
- package/src/lib/components/Heading.tsx +13 -13
- package/src/lib/components/Layout.tsx +10 -5
- package/src/lib/components/Markdown.tsx +1 -1
- package/src/lib/components/MobileTopNavigation.tsx +18 -18
- package/src/lib/components/NotFoundPage.tsx +1 -1
- package/src/lib/components/ReactMarkdown.license.txt +21 -0
- package/src/lib/components/ReactMarkdown.tsx +264 -0
- package/src/lib/components/Search.tsx +3 -3
- package/src/lib/components/SlotletProvider.tsx +1 -1
- package/src/lib/components/SyntaxHighlight.tsx +0 -4
- package/src/lib/components/TopNavigation.tsx +2 -2
- package/src/lib/components/Zudoku.tsx +1 -1
- package/src/lib/components/context/ZudokuContext.ts +1 -1
- package/src/lib/components/index.ts +1 -1
- package/src/lib/components/navigation/Sidebar.tsx +18 -8
- package/src/lib/components/navigation/SidebarBadge.tsx +0 -10
- package/src/lib/components/navigation/SidebarCategory.tsx +11 -10
- package/src/lib/components/navigation/SidebarItem.tsx +11 -14
- package/src/lib/components/navigation/SidebarWrapper.tsx +1 -1
- package/src/lib/components/navigation/utils.ts +1 -1
- package/src/lib/core/ZudokuContext.ts +1 -1
- package/src/lib/core/plugins.ts +3 -7
- package/src/lib/errors/RouterError.tsx +1 -1
- package/src/lib/oas/graphql/index.ts +4 -1
- package/src/lib/plugins/api-catalog/Catalog.tsx +123 -0
- package/src/lib/plugins/api-catalog/index.tsx +64 -0
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +1 -1
- package/src/lib/plugins/api-keys/ProtectedRoute.tsx +1 -1
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +1 -1
- package/src/lib/plugins/api-keys/index.tsx +1 -1
- package/src/lib/plugins/custom-pages/index.tsx +1 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +3 -1
- package/src/lib/plugins/markdown/index.tsx +4 -2
- package/src/lib/plugins/markdown/resolver.ts +2 -4
- package/src/lib/plugins/openapi/OperationList.tsx +64 -8
- package/src/lib/plugins/openapi/OperationListItem.tsx +31 -2
- package/src/lib/plugins/openapi/Route.tsx +45 -9
- package/src/lib/plugins/openapi/Sidecar.tsx +3 -17
- package/src/lib/plugins/openapi/context.tsx +2 -2
- package/src/lib/plugins/openapi/graphql/gql.ts +2 -2
- package/src/lib/plugins/openapi/graphql/graphql.ts +3 -0
- package/src/lib/plugins/openapi/index.tsx +35 -28
- package/src/lib/plugins/openapi/interfaces.ts +22 -1
- package/src/lib/plugins/openapi/playground/PathParams.tsx +1 -0
- package/src/lib/plugins/openapi/util/methodToColor.ts +27 -0
- package/src/lib/plugins/openapi/util/sanitizeMarkdownForMetatag.tsx +32 -0
- package/src/lib/plugins/redirect/index.tsx +2 -2
- package/src/lib/plugins/search-inkeep/index.tsx +78 -23
- package/src/lib/plugins/search-inkeep/inkeep.ts +3 -9
- package/src/lib/util/MdxComponents.tsx +3 -8
- package/src/lib/util/createVariantComponent.tsx +2 -2
- package/src/lib/util/useExposedProps.tsx +1 -1
- package/src/lib/util/useScrollToAnchor.ts +1 -1
- package/src/lib/util/useScrollToTop.ts +1 -1
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.d.ts +0 -2
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js +0 -3
- package/dist/lib/plugins/search-inkeep/InkeepCustomTrigger.js.map +0 -1
- package/dist/vite/plugin-custom-css.js.map +0 -1
- package/lib/AnchorLink-CDlhr8gL.js +0 -706
- package/lib/AnchorLink-CDlhr8gL.js.map +0 -1
- package/lib/AuthenticationPlugin-D0Em0SwR.js.map +0 -1
- package/lib/InkeepCustomTrigger-CE5-K5ex.js +0 -6
- package/lib/InkeepCustomTrigger-CE5-K5ex.js.map +0 -1
- package/lib/Markdown-ievDDhFT.js.map +0 -1
- package/lib/MdxPage-B2FpJ9KC.js.map +0 -1
- package/lib/OperationList-BkNQEsNs.js +0 -4693
- package/lib/OperationList-BkNQEsNs.js.map +0 -1
- package/lib/Route-DlG_HTMu.js +0 -11
- package/lib/Route-DlG_HTMu.js.map +0 -1
- package/lib/SidebarBadge-DxFJcJ6V.js +0 -51
- package/lib/SidebarBadge-DxFJcJ6V.js.map +0 -1
- package/lib/SlotletProvider-DyomlzGx.js +0 -252
- package/lib/SlotletProvider-DyomlzGx.js.map +0 -1
- package/lib/assets/index-B_Jk_Yzp.js.map +0 -1
- package/lib/assets/worker-BHClFO3A.js.map +0 -1
- package/lib/cn-BmFQLtkS.js.map +0 -1
- package/lib/context-D1nXWxm7.js.map +0 -1
- package/lib/createServer-CpJlUPtn.js.map +0 -1
- package/lib/index-BuAyrJe3.js +0 -46
- package/lib/index-BuAyrJe3.js.map +0 -1
- package/lib/index-C7SaIME0.js +0 -1277
- package/lib/index-C7SaIME0.js.map +0 -1
- package/lib/index-CkwDvuPt.js.map +0 -1
- package/lib/index-Czzd9rjU.js +0 -899
- package/lib/index-Czzd9rjU.js.map +0 -1
- package/lib/index-Yn8c3UWE.js +0 -921
- package/lib/index-Yn8c3UWE.js.map +0 -1
- package/lib/index.esm-C5mr_sKO.js +0 -1193
- package/lib/index.esm-C5mr_sKO.js.map +0 -1
- package/lib/jsx-runtime-B6kdoens.js +0 -635
- package/lib/jsx-runtime-B6kdoens.js.map +0 -1
- package/lib/object_hash-CvlLgU-M.js +0 -785
- package/lib/object_hash-CvlLgU-M.js.map +0 -1
- package/lib/prism-csharp.min-Yizuc34Y.js +0 -35
- package/lib/prism-java.min-d5iT_mOd.js +0 -7
- package/lib/prism-markup-templating-DZrrEs0A.js +0 -62
- package/lib/prism-markup-templating-DZrrEs0A.js.map +0 -1
- package/lib/prism-php.min-o7FpoMP_.js +0 -11
- package/lib/prism-php.min-o7FpoMP_.js.map +0 -1
- package/lib/prism-ruby.min-C7LwcKyz.js +0 -10
- package/lib/prism-typescript.min-oSVeWCAd.js +0 -6
- package/lib/router-lfyopgBI.js +0 -3024
- package/lib/router-lfyopgBI.js.map +0 -1
- package/lib/state-tsXBLONe.js +0 -203
- package/lib/state-tsXBLONe.js.map +0 -1
- package/lib/useExposedProps-CTPtylCV.js +0 -10
- package/lib/useExposedProps-CTPtylCV.js.map +0 -1
- package/src/lib/plugins/search-inkeep/InkeepCustomTrigger.tsx +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Helmet } from "@zudoku/react-helmet-async";
|
|
2
2
|
import { PanelLeftIcon } from "lucide-react";
|
|
3
|
-
import { Suspense, useEffect, useRef, type ReactNode } from "react";
|
|
4
|
-
import { Outlet, useLocation, useNavigation } from "react-router
|
|
3
|
+
import { Suspense, useEffect, useRef, useState, type ReactNode } from "react";
|
|
4
|
+
import { Outlet, useLocation, useNavigation } from "react-router";
|
|
5
5
|
import { useSpinDelay } from "spin-delay";
|
|
6
6
|
import { Drawer, DrawerTrigger } from "../ui/Drawer.js";
|
|
7
7
|
import { cn } from "../util/cn.js";
|
|
@@ -49,6 +49,7 @@ export const Layout = ({ children }: { children?: ReactNode }) => {
|
|
|
49
49
|
delay: 300,
|
|
50
50
|
minDuration: 500,
|
|
51
51
|
});
|
|
52
|
+
const [isDrawerOpen, setDrawerOpen] = useState(false);
|
|
52
53
|
|
|
53
54
|
return (
|
|
54
55
|
<>
|
|
@@ -65,13 +66,17 @@ export const Layout = ({ children }: { children?: ReactNode }) => {
|
|
|
65
66
|
<Header />
|
|
66
67
|
<Slotlet name="layout-after-head" />
|
|
67
68
|
|
|
68
|
-
<div className="w-full max-w-screen-2xl mx-auto px-
|
|
69
|
+
<div className="w-full max-w-screen-2xl mx-auto px-4 lg:px-12">
|
|
69
70
|
{showSpinner ? (
|
|
70
71
|
<LoadingFallback />
|
|
71
72
|
) : (
|
|
72
73
|
<Suspense fallback={<LoadingFallback />}>
|
|
73
|
-
<Drawer
|
|
74
|
-
|
|
74
|
+
<Drawer
|
|
75
|
+
direction="left"
|
|
76
|
+
open={isDrawerOpen}
|
|
77
|
+
onOpenChange={(open) => setDrawerOpen(open)}
|
|
78
|
+
>
|
|
79
|
+
<Sidebar onRequestClose={() => setDrawerOpen(false)} />
|
|
75
80
|
<div
|
|
76
81
|
className={cn(
|
|
77
82
|
"lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import ReactMarkdown from "react-markdown";
|
|
2
1
|
import rehypeRaw from "rehype-raw";
|
|
3
2
|
import remarkGfm from "remark-gfm";
|
|
4
3
|
import { visit } from "unist-util-visit";
|
|
5
4
|
import { MdxComponents } from "../util/MdxComponents.js";
|
|
5
|
+
import { ReactMarkdown } from "./ReactMarkdown.js";
|
|
6
6
|
|
|
7
7
|
// same as in packages/dev-portal/framework/vite.ts
|
|
8
8
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -30,27 +30,27 @@ export const MobileTopNavigation = () => {
|
|
|
30
30
|
</DrawerTrigger>
|
|
31
31
|
</div>
|
|
32
32
|
<DrawerContent
|
|
33
|
-
className="lg:hidden h-
|
|
33
|
+
className="lg:hidden h-[100dvh] right-0 left-auto w-[320px] rounded-none"
|
|
34
34
|
aria-describedby={undefined}
|
|
35
35
|
>
|
|
36
|
-
<
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<Search />
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
<ThemeSwitch />
|
|
45
|
-
</li>
|
|
46
|
-
{topNavigation.filter(isHiddenItem(isAuthenticated)).map((item) => (
|
|
47
|
-
<li key={item.label}>
|
|
48
|
-
<button onClick={() => setDrawerOpen(false)}>
|
|
49
|
-
<TopNavItem {...item} />
|
|
50
|
-
</button>
|
|
36
|
+
<div className="p-4 overflow-y-auto overscroll-none">
|
|
37
|
+
<VisuallyHidden>
|
|
38
|
+
<DrawerTitle>Navigation</DrawerTitle>
|
|
39
|
+
</VisuallyHidden>
|
|
40
|
+
<Search className="flex p-4" />
|
|
41
|
+
<ul className="flex flex-col items-center gap-4 p-4">
|
|
42
|
+
<li>
|
|
43
|
+
<ThemeSwitch />
|
|
51
44
|
</li>
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
{topNavigation.filter(isHiddenItem(isAuthenticated)).map((item) => (
|
|
46
|
+
<li key={item.label}>
|
|
47
|
+
<button onClick={() => setDrawerOpen(false)}>
|
|
48
|
+
<TopNavItem {...item} />
|
|
49
|
+
</button>
|
|
50
|
+
</li>
|
|
51
|
+
))}
|
|
52
|
+
</ul>
|
|
53
|
+
</div>
|
|
54
54
|
</DrawerContent>
|
|
55
55
|
</Drawer>
|
|
56
56
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UnlinkIcon } from "lucide-react";
|
|
2
|
-
import { Link, useParams } from "react-router
|
|
2
|
+
import { Link, useParams } from "react-router";
|
|
3
3
|
import { CategoryHeading } from "./CategoryHeading.js";
|
|
4
4
|
import { DeveloperHint } from "./DeveloperHint.js";
|
|
5
5
|
import { Heading } from "./Heading.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) Espen Hovlandsdal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This is a fork of `react-markdown` converted to typescript.
|
|
6
|
+
* The reason we fork it is because react-markdown is comptaible with
|
|
7
|
+
* unified 11, but references the unified 10 and related packages causing
|
|
8
|
+
* type errors and a bunch of extra imports
|
|
9
|
+
*
|
|
10
|
+
* Source: https://github.com/remarkjs/react-markdown/blob/main/index.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { unreachable } from "devlop";
|
|
14
|
+
import type { Element, ElementContent, Nodes, Parents } from "hast";
|
|
15
|
+
import {
|
|
16
|
+
Components as JsxRuntimeComponents,
|
|
17
|
+
toJsxRuntime,
|
|
18
|
+
} from "hast-util-to-jsx-runtime";
|
|
19
|
+
import { urlAttributes } from "html-url-attributes";
|
|
20
|
+
import { ReactElement } from "react";
|
|
21
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
+
import remarkParse from "remark-parse";
|
|
23
|
+
import remarkRehype, { Options as RemarkRehypeOptions } from "remark-rehype";
|
|
24
|
+
import { PluggableList, unified } from "unified";
|
|
25
|
+
import { visit } from "unist-util-visit";
|
|
26
|
+
import { VFile } from "vfile";
|
|
27
|
+
|
|
28
|
+
const changelog =
|
|
29
|
+
"https://github.com/remarkjs/react-markdown/blob/main/changelog.md";
|
|
30
|
+
|
|
31
|
+
const emptyPlugins: PluggableList = [];
|
|
32
|
+
const emptyRemarkRehypeOptions: Readonly<RemarkRehypeOptions> = {
|
|
33
|
+
allowDangerousHtml: true,
|
|
34
|
+
};
|
|
35
|
+
const safeProtocol = /^(https?|ircs?|mailto|xmpp)$/i;
|
|
36
|
+
|
|
37
|
+
interface Deprecation {
|
|
38
|
+
from: string;
|
|
39
|
+
id: string;
|
|
40
|
+
to?: keyof Options;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface AllowElement {
|
|
44
|
+
(
|
|
45
|
+
element: Readonly<Element>,
|
|
46
|
+
index: number,
|
|
47
|
+
parent: Readonly<Parents> | undefined,
|
|
48
|
+
): boolean | null | undefined;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface UrlTransform {
|
|
52
|
+
(
|
|
53
|
+
url: string,
|
|
54
|
+
key: string,
|
|
55
|
+
node: Readonly<Element>,
|
|
56
|
+
): string | null | undefined;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
60
|
+
interface Components extends Partial<JsxRuntimeComponents> {}
|
|
61
|
+
|
|
62
|
+
interface Options {
|
|
63
|
+
allowElement?: AllowElement | null;
|
|
64
|
+
allowedElements?: ReadonlyArray<string> | null;
|
|
65
|
+
children?: string | null;
|
|
66
|
+
className?: string | null;
|
|
67
|
+
components?: Components | null;
|
|
68
|
+
disallowedElements?: ReadonlyArray<string> | null;
|
|
69
|
+
rehypePlugins?: PluggableList | null;
|
|
70
|
+
remarkPlugins?: PluggableList | null;
|
|
71
|
+
remarkRehypeOptions?: Readonly<RemarkRehypeOptions> | null;
|
|
72
|
+
skipHtml?: boolean | null;
|
|
73
|
+
unwrapDisallowed?: boolean | null;
|
|
74
|
+
urlTransform?: UrlTransform | null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const deprecations: ReadonlyArray<Readonly<Deprecation>> = [
|
|
78
|
+
{ from: "astPlugins", id: "remove-buggy-html-in-markdown-parser" },
|
|
79
|
+
{ from: "allowDangerousHtml", id: "remove-buggy-html-in-markdown-parser" },
|
|
80
|
+
{
|
|
81
|
+
from: "allowNode",
|
|
82
|
+
id: "replace-allownode-allowedtypes-and-disallowedtypes",
|
|
83
|
+
to: "allowElement",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
from: "allowedTypes",
|
|
87
|
+
id: "replace-allownode-allowedtypes-and-disallowedtypes",
|
|
88
|
+
to: "allowedElements",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
from: "disallowedTypes",
|
|
92
|
+
id: "replace-allownode-allowedtypes-and-disallowedtypes",
|
|
93
|
+
to: "disallowedElements",
|
|
94
|
+
},
|
|
95
|
+
{ from: "escapeHtml", id: "remove-buggy-html-in-markdown-parser" },
|
|
96
|
+
{ from: "includeElementIndex", id: "#remove-includeelementindex" },
|
|
97
|
+
{
|
|
98
|
+
from: "includeNodeIndex",
|
|
99
|
+
id: "change-includenodeindex-to-includeelementindex",
|
|
100
|
+
},
|
|
101
|
+
{ from: "linkTarget", id: "remove-linktarget" },
|
|
102
|
+
{
|
|
103
|
+
from: "plugins",
|
|
104
|
+
id: "change-plugins-to-remarkplugins",
|
|
105
|
+
to: "remarkPlugins",
|
|
106
|
+
},
|
|
107
|
+
{ from: "rawSourcePos", id: "#remove-rawsourcepos" },
|
|
108
|
+
{ from: "renderers", id: "change-renderers-to-components", to: "components" },
|
|
109
|
+
{ from: "source", id: "change-source-to-children", to: "children" },
|
|
110
|
+
{ from: "sourcePos", id: "#remove-sourcepos" },
|
|
111
|
+
{ from: "transformImageUri", id: "#add-urltransform", to: "urlTransform" },
|
|
112
|
+
{ from: "transformLinkUri", id: "#add-urltransform", to: "urlTransform" },
|
|
113
|
+
];
|
|
114
|
+
|
|
115
|
+
export function ReactMarkdown(options: Readonly<Options>): ReactElement {
|
|
116
|
+
const allowedElements = options.allowedElements;
|
|
117
|
+
const allowElement = options.allowElement;
|
|
118
|
+
const children = options.children || "";
|
|
119
|
+
const className = options.className;
|
|
120
|
+
const components = options.components;
|
|
121
|
+
const disallowedElements = options.disallowedElements;
|
|
122
|
+
const rehypePlugins = options.rehypePlugins || emptyPlugins;
|
|
123
|
+
const remarkPlugins = options.remarkPlugins || emptyPlugins;
|
|
124
|
+
const remarkRehypeOptions = options.remarkRehypeOptions
|
|
125
|
+
? { ...options.remarkRehypeOptions, ...emptyRemarkRehypeOptions }
|
|
126
|
+
: emptyRemarkRehypeOptions;
|
|
127
|
+
const skipHtml = options.skipHtml;
|
|
128
|
+
const unwrapDisallowed = options.unwrapDisallowed;
|
|
129
|
+
const urlTransform = options.urlTransform || defaultUrlTransform;
|
|
130
|
+
|
|
131
|
+
const processor = unified()
|
|
132
|
+
.use(remarkParse)
|
|
133
|
+
.use(remarkPlugins)
|
|
134
|
+
.use(remarkRehype, remarkRehypeOptions)
|
|
135
|
+
.use(rehypePlugins);
|
|
136
|
+
|
|
137
|
+
const file = new VFile();
|
|
138
|
+
|
|
139
|
+
if (typeof children === "string") {
|
|
140
|
+
file.value = children;
|
|
141
|
+
} else {
|
|
142
|
+
unreachable(
|
|
143
|
+
`Unexpected value '${children}' for 'children' prop, expected 'string'`,
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (allowedElements && disallowedElements) {
|
|
148
|
+
unreachable(
|
|
149
|
+
"Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other",
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
for (const deprecation of deprecations) {
|
|
154
|
+
if (Object.prototype.hasOwnProperty.call(options, deprecation.from)) {
|
|
155
|
+
unreachable(
|
|
156
|
+
`Unexpected '${deprecation.from}' prop, ` +
|
|
157
|
+
(deprecation.to ? `use '${deprecation.to}' instead` : "remove it") +
|
|
158
|
+
` (see <${changelog}#${deprecation.id}> for more info)`,
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const mdastTree = processor.parse(file);
|
|
164
|
+
let hastTree: Nodes = processor.runSync(mdastTree, file);
|
|
165
|
+
|
|
166
|
+
if (className) {
|
|
167
|
+
hastTree = {
|
|
168
|
+
type: "element",
|
|
169
|
+
tagName: "div",
|
|
170
|
+
properties: { className },
|
|
171
|
+
children:
|
|
172
|
+
hastTree.type === "root"
|
|
173
|
+
? (hastTree.children as ElementContent[])
|
|
174
|
+
: [hastTree],
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Nodes type is slightly off, different versions of `hast` have different types
|
|
179
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
180
|
+
// @ts-ignore
|
|
181
|
+
visit(hastTree, transform);
|
|
182
|
+
|
|
183
|
+
return toJsxRuntime(hastTree, {
|
|
184
|
+
Fragment,
|
|
185
|
+
components,
|
|
186
|
+
ignoreInvalidStyle: true,
|
|
187
|
+
jsx,
|
|
188
|
+
jsxs,
|
|
189
|
+
passKeys: true,
|
|
190
|
+
passNode: true,
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
function transform(
|
|
194
|
+
node: Nodes,
|
|
195
|
+
index: number | null,
|
|
196
|
+
parent: Parents | undefined,
|
|
197
|
+
): number | void {
|
|
198
|
+
if (node.type === "raw" && parent && typeof index === "number") {
|
|
199
|
+
if (skipHtml) {
|
|
200
|
+
parent.children.splice(index, 1);
|
|
201
|
+
} else {
|
|
202
|
+
parent.children[index] = { type: "text", value: node.value };
|
|
203
|
+
}
|
|
204
|
+
return index;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (node.type === "element") {
|
|
208
|
+
for (const key in urlAttributes) {
|
|
209
|
+
if (
|
|
210
|
+
Object.prototype.hasOwnProperty.call(urlAttributes, key) &&
|
|
211
|
+
Object.prototype.hasOwnProperty.call(node.properties, key)
|
|
212
|
+
) {
|
|
213
|
+
const value = node.properties[key];
|
|
214
|
+
const test = urlAttributes[key];
|
|
215
|
+
if (
|
|
216
|
+
test === null ||
|
|
217
|
+
test === undefined ||
|
|
218
|
+
test.includes(node.tagName)
|
|
219
|
+
) {
|
|
220
|
+
node.properties[key] = urlTransform(String(value || ""), key, node);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
let remove = allowedElements
|
|
226
|
+
? !allowedElements.includes(node.tagName)
|
|
227
|
+
: disallowedElements
|
|
228
|
+
? disallowedElements.includes(node.tagName)
|
|
229
|
+
: false;
|
|
230
|
+
|
|
231
|
+
if (!remove && allowElement && typeof index === "number") {
|
|
232
|
+
remove = !allowElement(node, index, parent);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (remove && parent && typeof index === "number") {
|
|
236
|
+
if (unwrapDisallowed && node.children) {
|
|
237
|
+
parent.children.splice(index, 1, ...node.children);
|
|
238
|
+
} else {
|
|
239
|
+
parent.children.splice(index, 1);
|
|
240
|
+
}
|
|
241
|
+
return index;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
function defaultUrlTransform(value: string): string {
|
|
248
|
+
const colon = value.indexOf(":");
|
|
249
|
+
const questionMark = value.indexOf("?");
|
|
250
|
+
const numberSign = value.indexOf("#");
|
|
251
|
+
const slash = value.indexOf("/");
|
|
252
|
+
|
|
253
|
+
if (
|
|
254
|
+
colon < 0 ||
|
|
255
|
+
(slash > -1 && colon > slash) ||
|
|
256
|
+
(questionMark > -1 && colon > questionMark) ||
|
|
257
|
+
(numberSign > -1 && colon > numberSign) ||
|
|
258
|
+
safeProtocol.test(value.slice(0, colon))
|
|
259
|
+
) {
|
|
260
|
+
return value;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
return "";
|
|
264
|
+
}
|
|
@@ -3,7 +3,7 @@ import { Suspense, useCallback, useEffect, useState } from "react";
|
|
|
3
3
|
import { isSearchPlugin } from "../core/plugins.js";
|
|
4
4
|
import { useZudoku } from "./context/ZudokuContext.js";
|
|
5
5
|
|
|
6
|
-
export const Search = () => {
|
|
6
|
+
export const Search = ({ className }: { className?: string }) => {
|
|
7
7
|
const ctx = useZudoku();
|
|
8
8
|
const [isOpen, setIsOpen] = useState(false);
|
|
9
9
|
|
|
@@ -35,7 +35,7 @@ export const Search = () => {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
return (
|
|
38
|
-
|
|
38
|
+
<div className={className}>
|
|
39
39
|
<button
|
|
40
40
|
type="button"
|
|
41
41
|
onClick={() => setIsOpen(true)}
|
|
@@ -55,6 +55,6 @@ export const Search = () => {
|
|
|
55
55
|
onClose,
|
|
56
56
|
})}
|
|
57
57
|
</Suspense>
|
|
58
|
-
|
|
58
|
+
</div>
|
|
59
59
|
);
|
|
60
60
|
};
|
|
@@ -13,12 +13,8 @@ void import("prismjs/components/prism-bash.min.js");
|
|
|
13
13
|
// @ts-expect-error This is untyped
|
|
14
14
|
void import("prismjs/components/prism-ruby.min.js");
|
|
15
15
|
// @ts-expect-error This is untyped
|
|
16
|
-
void import("prismjs/components/prism-markup-templating.js");
|
|
17
|
-
// @ts-expect-error This is untyped
|
|
18
16
|
void import("prismjs/components/prism-markup.js");
|
|
19
17
|
// @ts-expect-error This is untyped
|
|
20
|
-
void import("prismjs/components/prism-php.min.js");
|
|
21
|
-
// @ts-expect-error This is untyped
|
|
22
18
|
void import("prismjs/components/prism-json.min.js");
|
|
23
19
|
// @ts-expect-error This is untyped
|
|
24
20
|
void import("prismjs/components/prism-java.min.js");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cx } from "class-variance-authority";
|
|
2
2
|
import { Suspense } from "react";
|
|
3
|
-
import { NavLink, useNavigation } from "react-router
|
|
4
|
-
import { TopNavigationItem } from "../../config/validators/
|
|
3
|
+
import { NavLink, useNavigation } from "react-router";
|
|
4
|
+
import { TopNavigationItem } from "../../config/validators/common.js";
|
|
5
5
|
import { useAuth } from "../authentication/hook.js";
|
|
6
6
|
import { ZudokuError } from "../util/invariant.js";
|
|
7
7
|
import { joinPath } from "../util/joinPath.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
useState,
|
|
12
12
|
} from "react";
|
|
13
13
|
import { ErrorBoundary } from "react-error-boundary";
|
|
14
|
-
import { Outlet, useNavigation } from "react-router
|
|
14
|
+
import { Outlet, useNavigation } from "react-router";
|
|
15
15
|
import { hasHead, isMdxProviderPlugin } from "../core/plugins.js";
|
|
16
16
|
import { ZudokuContext, ZudokuContextOptions } from "../core/ZudokuContext.js";
|
|
17
17
|
import { TopLevelError } from "../errors/TopLevelError.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
|
2
2
|
import { createContext, useContext } from "react";
|
|
3
|
-
import { matchPath, useLocation } from "react-router
|
|
3
|
+
import { matchPath, useLocation } from "react-router";
|
|
4
4
|
import { ZudokuContext } from "../../core/ZudokuContext.js";
|
|
5
5
|
import { joinPath } from "../../util/joinPath.js";
|
|
6
6
|
import { traverseSidebar } from "../navigation/utils.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMDXComponents as useMDXComponentsImport } from "@mdx-js/react";
|
|
2
2
|
import { Helmet } from "@zudoku/react-helmet-async";
|
|
3
|
-
import { Link as LinkImport } from "react-router
|
|
3
|
+
import { Link as LinkImport } from "react-router";
|
|
4
4
|
import { useAuthState } from "../authentication/state.js";
|
|
5
5
|
import { RouterError as RouterErrorImport } from "../errors/RouterError.js";
|
|
6
6
|
import { ServerError as ServerErrorImport } from "../errors/ServerError.js";
|
|
@@ -7,7 +7,11 @@ import { Slotlet } from "../SlotletProvider.js";
|
|
|
7
7
|
import { SidebarItem } from "./SidebarItem.js";
|
|
8
8
|
import { SidebarWrapper } from "./SidebarWrapper.js";
|
|
9
9
|
|
|
10
|
-
export const Sidebar = (
|
|
10
|
+
export const Sidebar = ({
|
|
11
|
+
onRequestClose,
|
|
12
|
+
}: {
|
|
13
|
+
onRequestClose?: () => void;
|
|
14
|
+
}) => {
|
|
11
15
|
const navRef = useRef<HTMLDivElement | null>(null);
|
|
12
16
|
const navigation = useCurrentNavigation();
|
|
13
17
|
|
|
@@ -24,15 +28,21 @@ export const Sidebar = () => {
|
|
|
24
28
|
<Slotlet name="zudoku-after-navigation" />
|
|
25
29
|
</SidebarWrapper>
|
|
26
30
|
<DrawerContent
|
|
27
|
-
className="lg:hidden h-
|
|
31
|
+
className="lg:hidden h-[100dvh] left-0 w-[320px] rounded-none"
|
|
28
32
|
aria-describedby={undefined}
|
|
29
33
|
>
|
|
30
|
-
<
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
<div className="p-4 overflow-y-auto overscroll-none">
|
|
35
|
+
<VisuallyHidden>
|
|
36
|
+
<DrawerTitle>Sidebar</DrawerTitle>
|
|
37
|
+
</VisuallyHidden>
|
|
38
|
+
{navigation.sidebar.map((item) => (
|
|
39
|
+
<SidebarItem
|
|
40
|
+
key={item.label}
|
|
41
|
+
item={item}
|
|
42
|
+
onRequestClose={onRequestClose}
|
|
43
|
+
/>
|
|
44
|
+
))}
|
|
45
|
+
</div>
|
|
36
46
|
</DrawerContent>
|
|
37
47
|
</>
|
|
38
48
|
);
|
|
@@ -1,15 +1,5 @@
|
|
|
1
1
|
import { cn } from "../../util/cn.js";
|
|
2
2
|
|
|
3
|
-
export const TextColorMap = {
|
|
4
|
-
green: "text-green-600",
|
|
5
|
-
blue: "text-sky-600",
|
|
6
|
-
yellow: "text-yellow-600",
|
|
7
|
-
red: "text-red-600",
|
|
8
|
-
purple: "text-purple-600",
|
|
9
|
-
indigo: "text-indigo-600",
|
|
10
|
-
gray: "text-gray-600",
|
|
11
|
-
};
|
|
12
|
-
|
|
13
3
|
export const ColorMap = {
|
|
14
4
|
green: "bg-green-400 dark:bg-green-800",
|
|
15
5
|
blue: "bg-sky-400 dark:bg-sky-800",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
2
2
|
import { ChevronRightIcon } from "lucide-react";
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
|
-
import { NavLink, useMatch } from "react-router
|
|
4
|
+
import { NavLink, useMatch } from "react-router";
|
|
5
5
|
import type { SidebarItemCategory } from "../../../config/validators/SidebarSchema.js";
|
|
6
6
|
import { cn } from "../../util/cn.js";
|
|
7
7
|
import { joinPath } from "../../util/joinPath.js";
|
|
@@ -10,10 +10,10 @@ import { useIsCategoryOpen } from "./utils.js";
|
|
|
10
10
|
|
|
11
11
|
export const SidebarCategory = ({
|
|
12
12
|
category,
|
|
13
|
-
|
|
13
|
+
onRequestClose,
|
|
14
14
|
}: {
|
|
15
15
|
category: SidebarItemCategory;
|
|
16
|
-
|
|
16
|
+
onRequestClose?: () => void;
|
|
17
17
|
}) => {
|
|
18
18
|
const isCategoryOpen = useIsCategoryOpen(category);
|
|
19
19
|
const [hasInteracted, setHasInteracted] = useState(false);
|
|
@@ -65,7 +65,6 @@ export const SidebarCategory = ({
|
|
|
65
65
|
onClick={() => setHasInteracted(true)}
|
|
66
66
|
className={navigationListItem({
|
|
67
67
|
isActive: false,
|
|
68
|
-
isTopLevel: level === 0,
|
|
69
68
|
className: [
|
|
70
69
|
"text-start",
|
|
71
70
|
isCollapsible
|
|
@@ -77,10 +76,7 @@ export const SidebarCategory = ({
|
|
|
77
76
|
{category.icon && (
|
|
78
77
|
<category.icon
|
|
79
78
|
size={16}
|
|
80
|
-
className={cn(
|
|
81
|
-
"align-[-0.125em] -translate-x-1",
|
|
82
|
-
isActive && "text-primary",
|
|
83
|
-
)}
|
|
79
|
+
className={cn("align-[-0.125em] ", isActive && "text-primary")}
|
|
84
80
|
/>
|
|
85
81
|
)}
|
|
86
82
|
{category.link?.type === "doc" ? (
|
|
@@ -116,9 +112,14 @@ export const SidebarCategory = ({
|
|
|
116
112
|
className={cn(
|
|
117
113
|
// CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
|
|
118
114
|
hasInteracted && "CollapsibleContent",
|
|
115
|
+
"ms-6 my-1",
|
|
119
116
|
)}
|
|
120
117
|
>
|
|
121
|
-
<ul
|
|
118
|
+
<ul
|
|
119
|
+
className={
|
|
120
|
+
"relative after:absolute after:-left-[--padding-nav-item] after:translate-x-[1.5px] after:top-0 after:bottom-0 after:w-px after:bg-border"
|
|
121
|
+
}
|
|
122
|
+
>
|
|
122
123
|
{category.items.map((item) => (
|
|
123
124
|
<SidebarItem
|
|
124
125
|
key={
|
|
@@ -126,7 +127,7 @@ export const SidebarCategory = ({
|
|
|
126
127
|
("href" in item ? item.href : "") +
|
|
127
128
|
item.label
|
|
128
129
|
}
|
|
129
|
-
|
|
130
|
+
onRequestClose={onRequestClose}
|
|
130
131
|
item={item}
|
|
131
132
|
/>
|
|
132
133
|
))}
|