zudoku 0.45.0 → 0.46.0
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/cli.js +8 -2
- package/dist/app/main.js +4 -23
- package/dist/app/main.js.map +1 -1
- package/dist/config/config.d.ts +2 -2
- package/dist/config/file-exists.d.ts +1 -0
- package/dist/config/file-exists.js +5 -0
- package/dist/config/file-exists.js.map +1 -0
- package/dist/config/loader.d.ts +19 -4
- package/dist/config/loader.js +94 -14
- package/dist/config/loader.js.map +1 -1
- package/dist/config/validators/validate.d.ts +3536 -743
- package/dist/config/validators/validate.js +396 -11
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/authentication/AuthenticationPlugin.d.ts +7 -2
- package/dist/lib/authentication/AuthenticationPlugin.js +13 -1
- package/dist/lib/authentication/AuthenticationPlugin.js.map +1 -1
- package/dist/lib/authentication/authentication.d.ts +2 -4
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/clerk.js +62 -43
- package/dist/lib/authentication/providers/clerk.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +7 -12
- package/dist/lib/authentication/providers/openid.js +11 -22
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/authentication/providers/supabase.js +3 -5
- package/dist/lib/authentication/providers/supabase.js.map +1 -1
- package/dist/lib/components/Autocomplete.js +1 -1
- package/dist/lib/components/Banner.js +1 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/ErrorPage.js +1 -1
- package/dist/lib/components/Footer.js +5 -5
- package/dist/lib/components/Footer.js.map +1 -1
- package/dist/lib/components/Header.js +16 -8
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.js +6 -1
- package/dist/lib/components/Heading.js.map +1 -1
- package/dist/lib/components/InlineCode.js +1 -1
- package/dist/lib/components/InlineCode.js.map +1 -1
- package/dist/lib/components/Layout.js +2 -2
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/Main.js +2 -2
- package/dist/lib/components/Main.js.map +1 -1
- package/dist/lib/components/Markdown.js +8 -3
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +3 -2
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/NotFoundPage.js +1 -1
- package/dist/lib/components/Pagination.js +1 -1
- package/dist/lib/components/Pagination.js.map +1 -1
- package/dist/lib/components/Search.js +1 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/Slot.d.ts +17 -0
- package/dist/lib/components/Slot.js +24 -0
- package/dist/lib/components/Slot.js.map +1 -0
- package/dist/lib/components/Slot.test.js +168 -0
- package/dist/lib/components/Slot.test.js.map +1 -0
- package/dist/lib/components/TopNavigation.d.ts +1 -4
- package/dist/lib/components/TopNavigation.js +3 -11
- package/dist/lib/components/TopNavigation.js.map +1 -1
- package/dist/lib/components/Zudoku.js +2 -2
- package/dist/lib/components/Zudoku.js.map +1 -1
- package/dist/lib/components/context/SlotProvider.d.ts +26 -0
- package/dist/lib/components/context/SlotProvider.js +83 -0
- package/dist/lib/components/context/SlotProvider.js.map +1 -0
- package/dist/lib/components/context/ZudokuContext.d.ts +1 -1
- package/dist/lib/components/context/ZudokuProvider.js +2 -1
- package/dist/lib/components/context/ZudokuProvider.js.map +1 -1
- package/dist/lib/components/index.d.ts +29 -23
- package/dist/lib/components/index.js +13 -7
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/components/navigation/PoweredByZudoku.js +1 -1
- package/dist/lib/components/navigation/Sidebar.js +3 -3
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarBadge.js +1 -1
- package/dist/lib/components/navigation/SidebarBadge.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +3 -3
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.d.ts +0 -5
- package/dist/lib/components/navigation/SidebarItem.js +19 -23
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +1 -1
- package/dist/lib/components/navigation/Toc.js +1 -1
- package/dist/lib/components/navigation/Toc.js.map +1 -1
- package/dist/lib/components/navigation/utils.d.ts +8 -0
- package/dist/lib/components/navigation/utils.js +34 -6
- package/dist/lib/components/navigation/utils.js.map +1 -1
- package/dist/lib/core/ZudokuContext.d.ts +12 -8
- package/dist/lib/core/ZudokuContext.js +6 -5
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +5 -2
- package/dist/lib/core/plugins.js +1 -0
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/errors/ErrorAlert.js +1 -1
- package/dist/lib/hooks/index.d.ts +19 -0
- package/dist/lib/hooks/index.js +11 -0
- package/dist/lib/hooks/index.js.map +1 -1
- package/dist/lib/plugins/api-catalog/Catalog.js +1 -1
- package/dist/lib/plugins/api-keys/CreateApiKey.d.ts +3 -2
- package/dist/lib/plugins/api-keys/CreateApiKey.js +8 -4
- package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.d.ts +1 -1
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js +54 -23
- package/dist/lib/plugins/api-keys/SettingsApiKeys.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.d.ts +18 -9
- package/dist/lib/plugins/api-keys/index.js +49 -34
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/index.d.ts +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/markdown/index.d.ts +1 -1
- package/dist/lib/plugins/markdown/resolver.d.ts +1 -1
- package/dist/lib/plugins/markdown/resolver.js.map +1 -1
- package/dist/lib/plugins/openapi/CollapsibleCode.js +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js +1 -1
- package/dist/lib/plugins/openapi/ColorizedParam.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +1 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +2 -3
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +5 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +2 -4
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +1 -4
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/SchemaList.js +6 -5
- package/dist/lib/plugins/openapi/SchemaList.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/SidecarExamples.js +8 -0
- package/dist/lib/plugins/openapi/SidecarExamples.js.map +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js +1 -1
- package/dist/lib/plugins/openapi/components/EnumValues.js.map +1 -1
- package/dist/lib/plugins/openapi/components/ResponseContent.d.ts +12 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.js +21 -0
- package/dist/lib/plugins/openapi/components/ResponseContent.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.js +2 -0
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/SubmitButton.js +7 -10
- package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js +2 -2
- package/dist/lib/plugins/openapi/schema/SchemaExampleAndDefault.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +2 -1
- package/dist/lib/plugins/openapi/schema/SchemaView.js +3 -3
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -1
- package/dist/lib/plugins/redirect/index.d.ts +1 -1
- package/dist/lib/ui/Badge.d.ts +2 -2
- package/dist/lib/ui/Badge.js +1 -1
- package/dist/lib/ui/Badge.js.map +1 -1
- package/dist/lib/ui/Button.d.ts +2 -2
- package/dist/lib/ui/Button.js +8 -6
- package/dist/lib/ui/Button.js.map +1 -1
- package/dist/lib/ui/Callout.js +1 -1
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Card.js +1 -1
- package/dist/lib/ui/Checkbox.js +1 -1
- package/dist/lib/ui/Checkbox.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +2 -2
- package/dist/lib/ui/Command.js +3 -3
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Dialog.js +1 -1
- package/dist/lib/ui/Dialog.js.map +1 -1
- package/dist/lib/ui/DropdownMenu.js +4 -4
- package/dist/lib/ui/DropdownMenu.js.map +1 -1
- package/dist/lib/ui/HoverCard.js +1 -1
- package/dist/lib/ui/HoverCard.js.map +1 -1
- package/dist/lib/ui/Input.js +1 -1
- package/dist/lib/ui/Input.js.map +1 -1
- package/dist/lib/ui/Popover.js +1 -1
- package/dist/lib/ui/Popover.js.map +1 -1
- package/dist/lib/ui/RadioGroup.js +1 -1
- package/dist/lib/ui/RadioGroup.js.map +1 -1
- package/dist/lib/ui/Select.js +2 -2
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/ui/Slider.js +1 -1
- package/dist/lib/ui/Slider.js.map +1 -1
- package/dist/lib/ui/Switch.js +1 -1
- package/dist/lib/ui/Switch.js.map +1 -1
- package/dist/lib/ui/Tabs.js +2 -2
- package/dist/lib/ui/Tabs.js.map +1 -1
- package/dist/lib/ui/Textarea.js +1 -1
- package/dist/lib/ui/Textarea.js.map +1 -1
- package/dist/lib/ui/Toggle.js +1 -1
- package/dist/lib/ui/Toggle.js.map +1 -1
- package/dist/lib/ui/Tooltip.d.ts +2 -1
- package/dist/lib/ui/Tooltip.js +2 -1
- package/dist/lib/ui/Tooltip.js.map +1 -1
- package/dist/lib/util/useExposedProps.d.ts +8 -1
- package/dist/lib/util/useExposedProps.js.map +1 -1
- package/dist/vite/api/SchemaManager.js +16 -1
- package/dist/vite/api/SchemaManager.js.map +1 -1
- package/dist/vite/build.js +44 -6
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.d.ts +2 -9
- package/dist/vite/config.js +6 -95
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +1 -1
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/css/plugin.d.ts +1 -2
- package/dist/vite/css/plugin.js +3 -2
- package/dist/vite/css/plugin.js.map +1 -1
- package/dist/vite/dev-server.d.ts +0 -1
- package/dist/vite/dev-server.js +10 -12
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/html.d.ts +2 -2
- package/dist/vite/html.js +5 -2
- package/dist/vite/html.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +1 -2
- package/dist/vite/plugin-api-keys.js +9 -3
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +1 -2
- package/dist/vite/plugin-api.js +5 -4
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +1 -2
- package/dist/vite/plugin-auth.js +3 -2
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +1 -2
- package/dist/vite/plugin-component.js +3 -2
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +1 -2
- package/dist/vite/plugin-config-reload.js +21 -22
- package/dist/vite/plugin-config-reload.js.map +1 -1
- package/dist/vite/plugin-config.d.ts +1 -2
- package/dist/vite/plugin-config.js +4 -3
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-configure-tailwind.d.ts +2 -0
- package/dist/vite/plugin-configure-tailwind.js +38 -0
- package/dist/vite/plugin-configure-tailwind.js.map +1 -0
- package/dist/vite/plugin-custom-pages.d.ts +1 -2
- package/dist/vite/plugin-custom-pages.js +3 -2
- package/dist/vite/plugin-custom-pages.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +1 -2
- package/dist/vite/plugin-docs.js +4 -3
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-frontmatter.d.ts +1 -2
- package/dist/vite/plugin-frontmatter.js +3 -2
- package/dist/vite/plugin-frontmatter.js.map +1 -1
- package/dist/vite/plugin-mdx.d.ts +1 -2
- package/dist/vite/plugin-mdx.js +3 -2
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-redirect.d.ts +1 -2
- package/dist/vite/plugin-redirect.js +3 -2
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-search.d.ts +1 -2
- package/dist/vite/plugin-search.js +3 -2
- package/dist/vite/plugin-search.js.map +1 -1
- package/dist/vite/plugin-shiki-register.d.ts +1 -2
- package/dist/vite/plugin-shiki-register.js +2 -1
- package/dist/vite/plugin-shiki-register.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +1 -2
- package/dist/vite/plugin-sidebar.js +3 -2
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin-theme-css.d.ts +1 -2
- package/dist/vite/plugin-theme-css.js +20 -60
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/dist/vite/plugin.d.ts +1 -2
- package/dist/vite/plugin.js +22 -21
- package/dist/vite/plugin.js.map +1 -1
- package/dist/vite/sitemap.d.ts +1 -1
- package/dist/zuplo/with-zuplo.d.ts +2 -2
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/Button-BE9IVkWV.js +51 -0
- package/lib/Button-BE9IVkWV.js.map +1 -0
- package/lib/{Callout-XadUe37J.js → Callout-BkgOUkoZ.js} +9 -8
- package/lib/Callout-BkgOUkoZ.js.map +1 -0
- package/lib/{Card-BlCYNw5W.js → Card-DPhGbYUM.js} +3 -3
- package/lib/{Card-BlCYNw5W.js.map → Card-DPhGbYUM.js.map} +1 -1
- package/lib/{CategoryHeading-DZi-Szor.js → CategoryHeading-Cu2RwgjC.js} +2 -2
- package/lib/{CategoryHeading-DZi-Szor.js.map → CategoryHeading-Cu2RwgjC.js.map} +1 -1
- package/lib/{Dialog-CNf2oWXG.js → Dialog-Du6WMcIA.js} +8 -7
- package/lib/Dialog-Du6WMcIA.js.map +1 -0
- package/lib/{Drawer-BPBxzel2.js → Drawer-BzkOKwgC.js} +2 -2
- package/lib/{Drawer-BPBxzel2.js.map → Drawer-BzkOKwgC.js.map} +1 -1
- package/lib/Markdown-BRAyzyUJ.js +15348 -0
- package/lib/Markdown-BRAyzyUJ.js.map +1 -0
- package/lib/{MdxPage-Sjv6y3cA.js → MdxPage-B3v1BSKr.js} +11 -11
- package/lib/MdxPage-B3v1BSKr.js.map +1 -0
- package/lib/{OasProvider-CzRXrs_-.js → OasProvider-5jrFuhVk.js} +3 -3
- package/lib/{OasProvider-CzRXrs_-.js.map → OasProvider-5jrFuhVk.js.map} +1 -1
- package/lib/{OperationList-DefCF3ZI.js → OperationList-BmoMLQPO.js} +1039 -1005
- package/lib/OperationList-BmoMLQPO.js.map +1 -0
- package/lib/Pagination-Cr0fWZS3.js +36 -0
- package/lib/Pagination-Cr0fWZS3.js.map +1 -0
- package/lib/RouteGuard-PrSVLbSr.js +55 -0
- package/lib/RouteGuard-PrSVLbSr.js.map +1 -0
- package/lib/{SchemaList-zHQ2Ekyw.js → SchemaList-B4riYLoP.js} +61 -47
- package/lib/SchemaList-B4riYLoP.js.map +1 -0
- package/lib/{SchemaView-CqF4oMU-.js → SchemaView-CPZ6RgsF.js} +100 -95
- package/lib/SchemaView-CPZ6RgsF.js.map +1 -0
- package/lib/{AuthenticationPlugin-UNaAuxNo.js → SignUp-CWaiH0tY.js} +23 -50
- package/lib/SignUp-CWaiH0tY.js.map +1 -0
- package/lib/Slot-Bo6K4tnb.js +160 -0
- package/lib/Slot-Bo6K4tnb.js.map +1 -0
- package/lib/{SyntaxHighlight-UxOF1xNb.js → SyntaxHighlight-DedRjJNr.js} +233 -212
- package/lib/{SyntaxHighlight-UxOF1xNb.js.map → SyntaxHighlight-DedRjJNr.js.map} +1 -1
- package/lib/{Toc-Ax54Pw8S.js → Toc-lL3fzNkl.js} +5 -5
- package/lib/Toc-lL3fzNkl.js.map +1 -0
- package/lib/{circular-B_TODp4H.js → circular-oB4auIIg.js} +2 -2
- package/lib/{circular-B_TODp4H.js.map → circular-oB4auIIg.js.map} +1 -1
- package/lib/clsx-OuTLNxxd.js +17 -0
- package/lib/clsx-OuTLNxxd.js.map +1 -0
- package/lib/{cn-CwJPJKOE.js → cn-wvCW-ho6.js} +1015 -562
- package/lib/cn-wvCW-ho6.js.map +1 -0
- package/lib/{createServer-CXd8q7nF.js → createServer-DCB82j2t.js} +81 -81
- package/lib/{createServer-CXd8q7nF.js.map → createServer-DCB82j2t.js.map} +1 -1
- package/lib/{hook-BwOB_iZo.js → hook-DawSLaZr.js} +323 -300
- package/lib/hook-DawSLaZr.js.map +1 -0
- package/lib/{index-BY8J3gEh.js → index-BXYvD5-7.js} +868 -758
- package/lib/index-BXYvD5-7.js.map +1 -0
- package/lib/{index-Z13x6tPX.js → index-DI5SPFK9.js} +2 -2
- package/lib/{index-Z13x6tPX.js.map → index-DI5SPFK9.js.map} +1 -1
- package/lib/index-QzXzw_ra.js +24 -0
- package/lib/index-QzXzw_ra.js.map +1 -0
- package/lib/{RouteGuard-lkdEJoDV.js → index.esm-BFcSKCe-.js} +232 -281
- package/lib/index.esm-BFcSKCe-.js.map +1 -0
- package/lib/{index.esm-D2ZUREQN.js → index.esm-DSfX_eMP.js} +3 -3
- package/lib/{index.esm-D2ZUREQN.js.map → index.esm-DSfX_eMP.js.map} +1 -1
- package/lib/joinPath-B7kNnUX4.js +8 -0
- package/lib/joinPath-B7kNnUX4.js.map +1 -0
- package/lib/{mutation-CL2MCRQL.js → mutation-oxMvODNQ.js} +2 -2
- package/lib/{mutation-CL2MCRQL.js.map → mutation-oxMvODNQ.js.map} +1 -1
- package/lib/ui/Accordion.js +1 -1
- package/lib/ui/ActionButton.js +2 -2
- package/lib/ui/Alert.js +2 -2
- package/lib/ui/AlertDialog.js +1 -1
- package/lib/ui/Badge.js +3 -3
- package/lib/ui/Badge.js.map +1 -1
- package/lib/ui/Breadcrumb.js +1 -1
- package/lib/ui/Button.js +20 -18
- package/lib/ui/Button.js.map +1 -1
- package/lib/ui/Callout.js +6 -5
- package/lib/ui/Callout.js.map +1 -1
- package/lib/ui/Card.js +8 -8
- package/lib/ui/Card.js.map +1 -1
- package/lib/ui/Carousel.js +1 -1
- package/lib/ui/Checkbox.js +7 -7
- package/lib/ui/Checkbox.js.map +1 -1
- package/lib/ui/CodeBlock.js +1 -1
- package/lib/ui/Command.js +43 -43
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Dialog.js +2 -2
- package/lib/ui/Dialog.js.map +1 -1
- package/lib/ui/Drawer.js +2 -2
- package/lib/ui/DropdownMenu.js +34 -34
- package/lib/ui/DropdownMenu.js.map +1 -1
- package/lib/ui/Form.js +2 -2
- package/lib/ui/HoverCard.js +5 -5
- package/lib/ui/HoverCard.js.map +1 -1
- package/lib/ui/Input.js +2 -2
- package/lib/ui/Input.js.map +1 -1
- package/lib/ui/Label.js +2 -2
- package/lib/ui/Pagination.js +1 -1
- package/lib/ui/Popover.js +2 -2
- package/lib/ui/Popover.js.map +1 -1
- package/lib/ui/Progress.js +1 -1
- package/lib/ui/RadioGroup.js +10 -10
- package/lib/ui/RadioGroup.js.map +1 -1
- package/lib/ui/ScrollArea.js +1 -1
- package/lib/ui/Select.js +31 -31
- package/lib/ui/Select.js.map +1 -1
- package/lib/ui/Skeleton.js +1 -1
- package/lib/ui/Slider.js +5 -5
- package/lib/ui/Slider.js.map +1 -1
- package/lib/ui/Switch.js +5 -5
- package/lib/ui/Switch.js.map +1 -1
- package/lib/ui/SyntaxHighlight.js +2 -2
- package/lib/ui/Tabs.js +16 -16
- package/lib/ui/Tabs.js.map +1 -1
- package/lib/ui/Textarea.js +5 -5
- package/lib/ui/Textarea.js.map +1 -1
- package/lib/ui/Toggle.js +7 -7
- package/lib/ui/Toggle.js.map +1 -1
- package/lib/ui/ToggleGroup.js +1 -1
- package/lib/ui/Tooltip.js +15 -8
- package/lib/ui/Tooltip.js.map +1 -1
- package/lib/ui/util.js +1 -1
- package/lib/useExposedProps-DG8J6ewJ.js.map +1 -1
- package/lib/useMutation-C_j3dA_L.js +97 -0
- package/lib/useMutation-C_j3dA_L.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +99 -82
- package/lib/zudoku.auth-clerk.js.map +1 -1
- package/lib/zudoku.auth-openid.js +246 -216
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +4957 -33
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.hooks.js +21 -12
- package/lib/zudoku.hooks.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +8 -8
- package/lib/zudoku.plugin-api-catalog.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +5022 -214
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-markdown.js.map +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-redirect.js.map +1 -1
- package/lib/zudoku.plugin-search-pagefind.js +5 -5
- package/lib/zudoku.plugins.js +7 -6
- package/lib/zudoku.plugins.js.map +1 -1
- package/package.json +15 -16
- package/src/app/defaultTheme.css +54 -0
- package/src/app/font.geist.css +73 -0
- package/src/app/main.css +113 -156
- package/src/app/main.tsx +4 -28
- package/src/lib/authentication/AuthenticationPlugin.tsx +18 -4
- package/src/lib/authentication/authentication.ts +2 -5
- package/src/lib/authentication/providers/auth0.tsx +8 -2
- package/src/lib/authentication/providers/clerk.tsx +72 -48
- package/src/lib/authentication/providers/openid.tsx +19 -26
- package/src/lib/authentication/providers/supabase.tsx +7 -7
- package/src/lib/components/Autocomplete.tsx +1 -1
- package/src/lib/components/Banner.tsx +1 -1
- package/src/lib/components/ErrorPage.tsx +1 -1
- package/src/lib/components/Footer.tsx +7 -10
- package/src/lib/components/Header.tsx +29 -29
- package/src/lib/components/Heading.tsx +9 -5
- package/src/lib/components/InlineCode.tsx +1 -1
- package/src/lib/components/Layout.tsx +3 -3
- package/src/lib/components/Main.tsx +4 -4
- package/src/lib/components/Markdown.tsx +14 -4
- package/src/lib/components/MobileTopNavigation.tsx +3 -2
- package/src/lib/components/NotFoundPage.tsx +1 -1
- package/src/lib/components/Pagination.tsx +3 -9
- package/src/lib/components/Search.tsx +1 -1
- package/src/lib/components/Slot.test.tsx +465 -0
- package/src/lib/components/Slot.tsx +64 -0
- package/src/lib/components/TopNavigation.tsx +5 -17
- package/src/lib/components/Zudoku.tsx +9 -9
- package/src/lib/components/context/SlotProvider.tsx +149 -0
- package/src/lib/components/context/ZudokuProvider.tsx +2 -1
- package/src/lib/components/index.ts +14 -10
- package/src/lib/components/navigation/PoweredByZudoku.tsx +1 -1
- package/src/lib/components/navigation/Sidebar.tsx +3 -3
- package/src/lib/components/navigation/SidebarBadge.tsx +1 -1
- package/src/lib/components/navigation/SidebarCategory.tsx +3 -3
- package/src/lib/components/navigation/SidebarItem.tsx +57 -30
- package/src/lib/components/navigation/SidebarWrapper.tsx +2 -2
- package/src/lib/components/navigation/Toc.tsx +2 -2
- package/src/lib/components/navigation/utils.ts +42 -6
- package/src/lib/core/ZudokuContext.ts +24 -12
- package/src/lib/core/plugins.ts +10 -2
- package/src/lib/errors/ErrorAlert.tsx +1 -1
- package/src/lib/hooks/index.ts +11 -0
- package/src/lib/plugins/api-catalog/Catalog.tsx +1 -1
- package/src/lib/plugins/api-keys/CreateApiKey.tsx +54 -42
- package/src/lib/plugins/api-keys/SettingsApiKeys.tsx +292 -112
- package/src/lib/plugins/api-keys/index.tsx +101 -55
- package/src/lib/plugins/custom-pages/index.tsx +1 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +2 -2
- package/src/lib/plugins/markdown/index.tsx +2 -2
- package/src/lib/plugins/markdown/resolver.ts +4 -2
- package/src/lib/plugins/openapi/CollapsibleCode.tsx +1 -1
- package/src/lib/plugins/openapi/ColorizedParam.tsx +2 -2
- package/src/lib/plugins/openapi/OperationList.tsx +2 -2
- package/src/lib/plugins/openapi/OperationListItem.tsx +6 -34
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +7 -1
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +5 -16
- package/src/lib/plugins/openapi/SchemaList.tsx +20 -8
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/SidecarExamples.tsx +6 -0
- package/src/lib/plugins/openapi/components/EnumValues.tsx +1 -1
- package/src/lib/plugins/openapi/components/ResponseContent.tsx +104 -0
- package/src/lib/plugins/openapi/playground/Playground.tsx +7 -1
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/SubmitButton.tsx +24 -29
- package/src/lib/plugins/openapi/schema/SchemaExampleAndDefault.tsx +2 -2
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +7 -3
- package/src/lib/plugins/redirect/index.tsx +1 -1
- package/src/lib/ui/Badge.tsx +2 -2
- package/src/lib/ui/Button.tsx +9 -6
- package/src/lib/ui/Callout.tsx +1 -0
- package/src/lib/ui/Card.tsx +1 -1
- package/src/lib/ui/Checkbox.tsx +1 -1
- package/src/lib/ui/Command.tsx +5 -5
- package/src/lib/ui/Dialog.tsx +1 -1
- package/src/lib/ui/DropdownMenu.tsx +4 -4
- package/src/lib/ui/HoverCard.tsx +1 -1
- package/src/lib/ui/Input.tsx +1 -1
- package/src/lib/ui/Popover.tsx +1 -1
- package/src/lib/ui/RadioGroup.tsx +1 -1
- package/src/lib/ui/Select.tsx +3 -3
- package/src/lib/ui/Slider.tsx +1 -1
- package/src/lib/ui/Switch.tsx +1 -1
- package/src/lib/ui/Tabs.tsx +2 -2
- package/src/lib/ui/Textarea.tsx +1 -1
- package/src/lib/ui/Toggle.tsx +1 -1
- package/src/lib/ui/Tooltip.tsx +16 -1
- package/src/lib/util/useExposedProps.tsx +12 -1
- package/dist/app/tailwind.d.ts +0 -4
- package/dist/app/tailwind.js +0 -97
- package/dist/app/tailwind.js.map +0 -1
- package/dist/config/common.d.ts +0 -10
- package/dist/config/common.js +0 -2
- package/dist/config/common.js.map +0 -1
- package/dist/config/validators/common.d.ts +0 -8001
- package/dist/config/validators/common.js +0 -414
- package/dist/config/validators/common.js.map +0 -1
- package/dist/lib/components/SlotletProvider.d.ts +0 -17
- package/dist/lib/components/SlotletProvider.js +0 -18
- package/dist/lib/components/SlotletProvider.js.map +0 -1
- package/dist/vite/plugin-docs.test.js +0 -22
- package/dist/vite/plugin-docs.test.js.map +0 -1
- package/lib/AuthenticationPlugin-UNaAuxNo.js.map +0 -1
- package/lib/Button-Bdk_Ij3U.js +0 -49
- package/lib/Button-Bdk_Ij3U.js.map +0 -1
- package/lib/Callout-XadUe37J.js.map +0 -1
- package/lib/Dialog-CNf2oWXG.js.map +0 -1
- package/lib/Markdown-D96AphCL.js +0 -7691
- package/lib/Markdown-D96AphCL.js.map +0 -1
- package/lib/MdxPage-Sjv6y3cA.js.map +0 -1
- package/lib/OperationList-DefCF3ZI.js.map +0 -1
- package/lib/Pagination-B89j9KJS.js +0 -48
- package/lib/Pagination-B89j9KJS.js.map +0 -1
- package/lib/RouteGuard-lkdEJoDV.js.map +0 -1
- package/lib/SchemaList-zHQ2Ekyw.js.map +0 -1
- package/lib/SchemaView-CqF4oMU-.js.map +0 -1
- package/lib/Select-HTio1oSE.js +0 -211
- package/lib/Select-HTio1oSE.js.map +0 -1
- package/lib/SlotletProvider-CTgIBRWg.js +0 -257
- package/lib/SlotletProvider-CTgIBRWg.js.map +0 -1
- package/lib/Toc-Ax54Pw8S.js.map +0 -1
- package/lib/cn-CwJPJKOE.js.map +0 -1
- package/lib/hook-BwOB_iZo.js.map +0 -1
- package/lib/index-BY8J3gEh.js.map +0 -1
- package/lib/index-CT2PstvH.js +0 -4982
- package/lib/index-CT2PstvH.js.map +0 -1
- package/src/app/tailwind.ts +0 -103
- package/src/lib/components/SlotletProvider.tsx +0 -55
- /package/dist/{vite/plugin-docs.test.d.ts → lib/components/Slot.test.d.ts} +0 -0
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
import { j as n } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { c as $, L as O, e as M, i as L } from "./chunk-BAXFHI7N-C9WnHsLV.js";
|
|
3
|
-
import { UnlinkIcon as w } from "lucide-react";
|
|
4
|
-
import { C as F } from "./CategoryHeading-DZi-Szor.js";
|
|
5
|
-
import { Callout as k } from "./ui/Callout.js";
|
|
6
|
-
import { M as b, H as y, P as v } from "./Markdown-D96AphCL.js";
|
|
7
|
-
import A, { memo as D, useContext as H } from "react";
|
|
8
|
-
import { e as U } from "./hook-BwOB_iZo.js";
|
|
9
|
-
import { h as V } from "./SyntaxHighlight-UxOF1xNb.js";
|
|
10
|
-
import { i as z, Z as C } from "./invariant-DAFpPywt.js";
|
|
11
|
-
import { CodeBlock as q } from "./ui/CodeBlock.js";
|
|
12
|
-
import { c as Z } from "./cn-CwJPJKOE.js";
|
|
13
|
-
import { u as W } from "./useExposedProps-DG8J6ewJ.js";
|
|
14
|
-
const N = ({
|
|
15
|
-
children: r,
|
|
16
|
-
className: a
|
|
17
|
-
}) => {
|
|
18
|
-
if (process.env.NODE_ENV === "development")
|
|
19
|
-
return /* @__PURE__ */ n.jsx(k, { type: "caution", title: "Developer hint", className: a, children: /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
20
|
-
typeof r == "string" ? /* @__PURE__ */ n.jsx(b, { content: r }) : /* @__PURE__ */ n.jsx("div", { children: r }),
|
|
21
|
-
/* @__PURE__ */ n.jsx("small", { className: "italic", children: "Note: This hint is only shown in development mode." })
|
|
22
|
-
] }) });
|
|
23
|
-
}, j = () => {
|
|
24
|
-
const r = $();
|
|
25
|
-
return /* @__PURE__ */ n.jsxs("div", { className: v + " h-full pt-[--padding-content-top]", children: [
|
|
26
|
-
/* @__PURE__ */ n.jsx(F, { children: "404" }),
|
|
27
|
-
/* @__PURE__ */ n.jsxs(y, { level: 1, className: "flex gap-3.5 items-center", children: [
|
|
28
|
-
"Page not found",
|
|
29
|
-
/* @__PURE__ */ n.jsx(w, { size: 24 })
|
|
30
|
-
] }),
|
|
31
|
-
/* @__PURE__ */ n.jsxs(N, { children: [
|
|
32
|
-
"Start by adding a file at",
|
|
33
|
-
" ",
|
|
34
|
-
/* @__PURE__ */ n.jsxs("code", { children: [
|
|
35
|
-
"{PROJECT_ROOT}",
|
|
36
|
-
"/",
|
|
37
|
-
r["*"],
|
|
38
|
-
".mdx"
|
|
39
|
-
] }),
|
|
40
|
-
" ",
|
|
41
|
-
"and add some content to make this error go away."
|
|
42
|
-
] }),
|
|
43
|
-
/* @__PURE__ */ n.jsx("p", { children: "It seems that the page you are looking for does not exist or may have been moved. Please check the URL for any typos or use the navigation menu to find the correct page." }),
|
|
44
|
-
/* @__PURE__ */ n.jsx(O, { to: "/", children: "Go back home" })
|
|
45
|
-
] });
|
|
46
|
-
}, I = D(
|
|
47
|
-
({ code: r, children: a, ...s }) => {
|
|
48
|
-
const { syntaxHighlighting: i } = U().options;
|
|
49
|
-
z(i?.highlighter, "Highlighter not found");
|
|
50
|
-
const u = V(
|
|
51
|
-
i.highlighter,
|
|
52
|
-
r ?? a,
|
|
53
|
-
s.language,
|
|
54
|
-
i.themes
|
|
55
|
-
);
|
|
56
|
-
return /* @__PURE__ */ n.jsx(q, { ...s, children: u });
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
I.displayName = "SyntaxHighlight";
|
|
60
|
-
function G({ error: r }) {
|
|
61
|
-
const a = r instanceof Error ? r.message : "Something went wrong", s = r instanceof C ? r.developerHint : void 0, i = r instanceof C ? r.title : "Something went wrong", u = r instanceof Error ? r.stack : void 0, l = r instanceof Error ? r.cause : void 0, f = l instanceof Error ? String(l.stack) : u;
|
|
62
|
-
return /* @__PURE__ */ n.jsxs(
|
|
63
|
-
"div",
|
|
64
|
-
{
|
|
65
|
-
className: Z(
|
|
66
|
-
v,
|
|
67
|
-
"grid grid-cols-1 !max-w-none pt-[--padding-content-top]"
|
|
68
|
-
),
|
|
69
|
-
children: [
|
|
70
|
-
/* @__PURE__ */ n.jsx(y, { level: 1, children: i }),
|
|
71
|
-
"Error: ",
|
|
72
|
-
a,
|
|
73
|
-
s && /* @__PURE__ */ n.jsx(N, { className: "mb-4", children: s }),
|
|
74
|
-
f && /* @__PURE__ */ n.jsx("div", { children: /* @__PURE__ */ n.jsx(
|
|
75
|
-
I,
|
|
76
|
-
{
|
|
77
|
-
className: "max-h-[400px] border mt-2",
|
|
78
|
-
language: "js",
|
|
79
|
-
code: f
|
|
80
|
-
}
|
|
81
|
-
) })
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
function me() {
|
|
87
|
-
const r = M();
|
|
88
|
-
return L(r) && r.status === 404 ? /* @__PURE__ */ n.jsx(j, {}) : /* @__PURE__ */ n.jsx(G, { error: r });
|
|
89
|
-
}
|
|
90
|
-
var S = { exports: {} }, t = {};
|
|
91
|
-
/**
|
|
92
|
-
* @license React
|
|
93
|
-
* react-is.production.js
|
|
94
|
-
*
|
|
95
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
96
|
-
*
|
|
97
|
-
* This source code is licensed under the MIT license found in the
|
|
98
|
-
* LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/
|
|
100
|
-
var x;
|
|
101
|
-
function X() {
|
|
102
|
-
if (x) return t;
|
|
103
|
-
x = 1;
|
|
104
|
-
var r = Symbol.for("react.transitional.element"), a = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), l = Symbol.for("react.consumer"), f = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), T = Symbol.for("react.lazy"), R = Symbol.for("react.view_transition"), h = Symbol.for("react.client.reference");
|
|
105
|
-
function c(e) {
|
|
106
|
-
if (typeof e == "object" && e !== null) {
|
|
107
|
-
var p = e.$$typeof;
|
|
108
|
-
switch (p) {
|
|
109
|
-
case r:
|
|
110
|
-
switch (e = e.type, e) {
|
|
111
|
-
case s:
|
|
112
|
-
case u:
|
|
113
|
-
case i:
|
|
114
|
-
case E:
|
|
115
|
-
case d:
|
|
116
|
-
case R:
|
|
117
|
-
return e;
|
|
118
|
-
default:
|
|
119
|
-
switch (e = e && e.$$typeof, e) {
|
|
120
|
-
case f:
|
|
121
|
-
case m:
|
|
122
|
-
case T:
|
|
123
|
-
case _:
|
|
124
|
-
return e;
|
|
125
|
-
case l:
|
|
126
|
-
return e;
|
|
127
|
-
default:
|
|
128
|
-
return p;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
case a:
|
|
132
|
-
return p;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
return t.ContextConsumer = l, t.ContextProvider = f, t.Element = r, t.ForwardRef = m, t.Fragment = s, t.Lazy = T, t.Memo = _, t.Portal = a, t.Profiler = u, t.StrictMode = i, t.Suspense = E, t.SuspenseList = d, t.isContextConsumer = function(e) {
|
|
137
|
-
return c(e) === l;
|
|
138
|
-
}, t.isContextProvider = function(e) {
|
|
139
|
-
return c(e) === f;
|
|
140
|
-
}, t.isElement = function(e) {
|
|
141
|
-
return typeof e == "object" && e !== null && e.$$typeof === r;
|
|
142
|
-
}, t.isForwardRef = function(e) {
|
|
143
|
-
return c(e) === m;
|
|
144
|
-
}, t.isFragment = function(e) {
|
|
145
|
-
return c(e) === s;
|
|
146
|
-
}, t.isLazy = function(e) {
|
|
147
|
-
return c(e) === T;
|
|
148
|
-
}, t.isMemo = function(e) {
|
|
149
|
-
return c(e) === _;
|
|
150
|
-
}, t.isPortal = function(e) {
|
|
151
|
-
return c(e) === a;
|
|
152
|
-
}, t.isProfiler = function(e) {
|
|
153
|
-
return c(e) === u;
|
|
154
|
-
}, t.isStrictMode = function(e) {
|
|
155
|
-
return c(e) === i;
|
|
156
|
-
}, t.isSuspense = function(e) {
|
|
157
|
-
return c(e) === E;
|
|
158
|
-
}, t.isSuspenseList = function(e) {
|
|
159
|
-
return c(e) === d;
|
|
160
|
-
}, t.isValidElementType = function(e) {
|
|
161
|
-
return typeof e == "string" || typeof e == "function" || e === s || e === u || e === i || e === E || e === d || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === _ || e.$$typeof === f || e.$$typeof === l || e.$$typeof === m || e.$$typeof === h || e.getModuleId !== void 0);
|
|
162
|
-
}, t.typeOf = c, t;
|
|
163
|
-
}
|
|
164
|
-
var o = {};
|
|
165
|
-
/**
|
|
166
|
-
* @license React
|
|
167
|
-
* react-is.development.js
|
|
168
|
-
*
|
|
169
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
170
|
-
*
|
|
171
|
-
* This source code is licensed under the MIT license found in the
|
|
172
|
-
* LICENSE file in the root directory of this source tree.
|
|
173
|
-
*/
|
|
174
|
-
var g;
|
|
175
|
-
function B() {
|
|
176
|
-
return g || (g = 1, process.env.NODE_ENV !== "production" && function() {
|
|
177
|
-
function r(e) {
|
|
178
|
-
if (typeof e == "object" && e !== null) {
|
|
179
|
-
var p = e.$$typeof;
|
|
180
|
-
switch (p) {
|
|
181
|
-
case a:
|
|
182
|
-
switch (e = e.type, e) {
|
|
183
|
-
case i:
|
|
184
|
-
case l:
|
|
185
|
-
case u:
|
|
186
|
-
case d:
|
|
187
|
-
case _:
|
|
188
|
-
case h:
|
|
189
|
-
return e;
|
|
190
|
-
default:
|
|
191
|
-
switch (e = e && e.$$typeof, e) {
|
|
192
|
-
case m:
|
|
193
|
-
case E:
|
|
194
|
-
case R:
|
|
195
|
-
case T:
|
|
196
|
-
return e;
|
|
197
|
-
case f:
|
|
198
|
-
return e;
|
|
199
|
-
default:
|
|
200
|
-
return p;
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
case s:
|
|
204
|
-
return p;
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
var a = Symbol.for("react.transitional.element"), s = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), f = Symbol.for("react.consumer"), m = Symbol.for("react.context"), E = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), h = Symbol.for("react.view_transition"), c = Symbol.for("react.client.reference");
|
|
209
|
-
o.ContextConsumer = f, o.ContextProvider = m, o.Element = a, o.ForwardRef = E, o.Fragment = i, o.Lazy = R, o.Memo = T, o.Portal = s, o.Profiler = l, o.StrictMode = u, o.Suspense = d, o.SuspenseList = _, o.isContextConsumer = function(e) {
|
|
210
|
-
return r(e) === f;
|
|
211
|
-
}, o.isContextProvider = function(e) {
|
|
212
|
-
return r(e) === m;
|
|
213
|
-
}, o.isElement = function(e) {
|
|
214
|
-
return typeof e == "object" && e !== null && e.$$typeof === a;
|
|
215
|
-
}, o.isForwardRef = function(e) {
|
|
216
|
-
return r(e) === E;
|
|
217
|
-
}, o.isFragment = function(e) {
|
|
218
|
-
return r(e) === i;
|
|
219
|
-
}, o.isLazy = function(e) {
|
|
220
|
-
return r(e) === R;
|
|
221
|
-
}, o.isMemo = function(e) {
|
|
222
|
-
return r(e) === T;
|
|
223
|
-
}, o.isPortal = function(e) {
|
|
224
|
-
return r(e) === s;
|
|
225
|
-
}, o.isProfiler = function(e) {
|
|
226
|
-
return r(e) === l;
|
|
227
|
-
}, o.isStrictMode = function(e) {
|
|
228
|
-
return r(e) === u;
|
|
229
|
-
}, o.isSuspense = function(e) {
|
|
230
|
-
return r(e) === d;
|
|
231
|
-
}, o.isSuspenseList = function(e) {
|
|
232
|
-
return r(e) === _;
|
|
233
|
-
}, o.isValidElementType = function(e) {
|
|
234
|
-
return typeof e == "string" || typeof e == "function" || e === i || e === l || e === u || e === d || e === _ || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === T || e.$$typeof === m || e.$$typeof === f || e.$$typeof === E || e.$$typeof === c || e.getModuleId !== void 0);
|
|
235
|
-
}, o.typeOf = r;
|
|
236
|
-
}()), o;
|
|
237
|
-
}
|
|
238
|
-
var P;
|
|
239
|
-
function J() {
|
|
240
|
-
return P || (P = 1, process.env.NODE_ENV === "production" ? S.exports = /* @__PURE__ */ X() : S.exports = /* @__PURE__ */ B()), S.exports;
|
|
241
|
-
}
|
|
242
|
-
var K = /* @__PURE__ */ J();
|
|
243
|
-
const Y = A.createContext({}), Ee = ({
|
|
244
|
-
slotlets: r,
|
|
245
|
-
children: a
|
|
246
|
-
}) => /* @__PURE__ */ n.jsx(Y.Provider, { value: r, children: a }), de = ({ name: r }) => {
|
|
247
|
-
const s = H(Y)?.[r], i = W();
|
|
248
|
-
return K.isValidElementType(s) ? A.createElement(s, i) : s;
|
|
249
|
-
};
|
|
250
|
-
export {
|
|
251
|
-
N as D,
|
|
252
|
-
G as E,
|
|
253
|
-
me as R,
|
|
254
|
-
de as S,
|
|
255
|
-
Ee as a
|
|
256
|
-
};
|
|
257
|
-
//# sourceMappingURL=SlotletProvider-CTgIBRWg.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SlotletProvider-CTgIBRWg.js","sources":["../src/lib/components/DeveloperHint.tsx","../src/lib/components/NotFoundPage.tsx","../src/lib/ui/SyntaxHighlight.tsx","../src/lib/errors/ErrorAlert.tsx","../src/lib/errors/RouterError.tsx","../../../node_modules/.pnpm/react-is@19.1.0/node_modules/react-is/cjs/react-is.production.js","../../../node_modules/.pnpm/react-is@19.1.0/node_modules/react-is/cjs/react-is.development.js","../../../node_modules/.pnpm/react-is@19.1.0/node_modules/react-is/index.js","../src/lib/components/SlotletProvider.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { Callout } from \"../ui/Callout.js\";\nimport { Markdown } from \"./Markdown.js\";\n\nexport const DeveloperHint = ({\n children,\n className,\n}: {\n children: ReactNode;\n className?: string;\n}) => {\n if (process.env.NODE_ENV !== \"development\") return;\n\n return (\n <Callout type=\"caution\" title=\"Developer hint\" className={className}>\n <div className=\"flex flex-col gap-2\">\n {typeof children === \"string\" ? (\n <Markdown content={children} />\n ) : (\n <div>{children}</div>\n )}\n <small className=\"italic\">\n Note: This hint is only shown in development mode.\n </small>\n </div>\n </Callout>\n );\n};\n","import { UnlinkIcon } from \"lucide-react\";\nimport { Link, useParams } from \"react-router\";\nimport { CategoryHeading } from \"./CategoryHeading.js\";\nimport { DeveloperHint } from \"./DeveloperHint.js\";\nimport { Heading } from \"./Heading.js\";\nimport { ProseClasses } from \"./Markdown.js\";\n\nexport const NotFoundPage = () => {\n const params = useParams();\n\n return (\n <div className={ProseClasses + \" h-full pt-[--padding-content-top]\"}>\n <CategoryHeading>404</CategoryHeading>\n <Heading level={1} className=\"flex gap-3.5 items-center\">\n Page not found\n <UnlinkIcon size={24} />\n </Heading>\n <DeveloperHint>\n Start by adding a file at{\" \"}\n <code>\n {\"{PROJECT_ROOT}\"}/{params[\"*\"]}.mdx\n </code>{\" \"}\n and add some content to make this error go away.\n </DeveloperHint>\n <p>\n It seems that the page you are looking for does not exist or may have\n been moved. Please check the URL for any typos or use the navigation\n menu to find the correct page.\n </p>\n <Link to=\"/\">Go back home</Link>\n </div>\n );\n};\n","import { memo } from \"react\";\nimport { useZudoku } from \"../components/context/ZudokuContext.js\";\nimport { highlight } from \"../shiki.js\";\nimport invariant from \"../util/invariant.js\";\nimport { CodeBlock, type CodeBlockProps } from \"./CodeBlock.js\";\n\ntype SyntaxHighlightProps = CodeBlockProps &\n ({ code: string; children?: never } | { code?: never; children: string });\n\nexport const SyntaxHighlight = memo(\n ({ code, children, ...props }: SyntaxHighlightProps) => {\n const { syntaxHighlighting } = useZudoku().options;\n\n invariant(syntaxHighlighting?.highlighter, \"Highlighter not found\");\n\n const highlightedCode = highlight(\n syntaxHighlighting.highlighter,\n code ?? children,\n props.language,\n syntaxHighlighting.themes,\n );\n\n return <CodeBlock {...props}>{highlightedCode}</CodeBlock>;\n },\n);\n\nSyntaxHighlight.displayName = \"SyntaxHighlight\";\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nimport { SyntaxHighlight } from \"zudoku/ui/SyntaxHighlight.js\";\nimport { DeveloperHint } from \"../components/DeveloperHint.js\";\nimport { Heading } from \"../components/Heading.js\";\nimport { ProseClasses } from \"../components/Markdown.js\";\nimport { cn } from \"../util/cn.js\";\nimport { ZudokuError } from \"../util/invariant.js\";\n\nexport function ErrorAlert({ error }: { error: unknown }) {\n const message =\n error instanceof Error ? error.message : \"Something went wrong\";\n\n const hint = error instanceof ZudokuError ? error.developerHint : undefined;\n const title =\n error instanceof ZudokuError ? error.title : \"Something went wrong\";\n const stack = error instanceof Error ? error.stack : undefined;\n const cause = error instanceof Error ? error.cause : undefined;\n\n const stringError = cause instanceof Error ? String(cause.stack) : stack;\n\n return (\n <div\n className={cn(\n ProseClasses,\n \"grid grid-cols-1 !max-w-none pt-[--padding-content-top]\",\n )}\n >\n <Heading level={1}>{title}</Heading>\n Error: {message}\n {hint && <DeveloperHint className=\"mb-4\">{hint}</DeveloperHint>}\n {stringError && (\n <div>\n <SyntaxHighlight\n className=\"max-h-[400px] border mt-2\"\n language=\"js\"\n code={stringError}\n />\n </div>\n )}\n </div>\n );\n}\n","import { isRouteErrorResponse, useRouteError } from \"react-router\";\nimport { NotFoundPage } from \"../components/NotFoundPage.js\";\nimport { ErrorAlert } from \"./ErrorAlert.js\";\n\nexport function RouterError() {\n const error = useRouteError();\n\n if (isRouteErrorResponse(error) && error.status === 404) {\n return <NotFoundPage />;\n }\n\n return <ErrorAlert error={error} />;\n}\n","/**\n * @license React\n * react-is.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\nSymbol.for(\"react.provider\");\nvar REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\");\nfunction typeOf(object) {\n if (\"object\" === typeof object && null !== object) {\n var $$typeof = object.$$typeof;\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n switch (((object = object.type), object)) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n case REACT_VIEW_TRANSITION_TYPE:\n return object;\n default:\n switch (((object = object && object.$$typeof), object)) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n return object;\n case REACT_CONSUMER_TYPE:\n return object;\n default:\n return $$typeof;\n }\n }\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n}\nexports.ContextConsumer = REACT_CONSUMER_TYPE;\nexports.ContextProvider = REACT_CONTEXT_TYPE;\nexports.Element = REACT_ELEMENT_TYPE;\nexports.ForwardRef = REACT_FORWARD_REF_TYPE;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Lazy = REACT_LAZY_TYPE;\nexports.Memo = REACT_MEMO_TYPE;\nexports.Portal = REACT_PORTAL_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;\nexports.isContextConsumer = function (object) {\n return typeOf(object) === REACT_CONSUMER_TYPE;\n};\nexports.isContextProvider = function (object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n};\nexports.isElement = function (object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n};\nexports.isForwardRef = function (object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n};\nexports.isFragment = function (object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n};\nexports.isLazy = function (object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n};\nexports.isMemo = function (object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n};\nexports.isPortal = function (object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n};\nexports.isProfiler = function (object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n};\nexports.isStrictMode = function (object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n};\nexports.isSuspense = function (object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n};\nexports.isSuspenseList = function (object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n};\nexports.isValidElementType = function (type) {\n return \"string\" === typeof type ||\n \"function\" === typeof type ||\n type === REACT_FRAGMENT_TYPE ||\n type === REACT_PROFILER_TYPE ||\n type === REACT_STRICT_MODE_TYPE ||\n type === REACT_SUSPENSE_TYPE ||\n type === REACT_SUSPENSE_LIST_TYPE ||\n (\"object\" === typeof type &&\n null !== type &&\n (type.$$typeof === REACT_LAZY_TYPE ||\n type.$$typeof === REACT_MEMO_TYPE ||\n type.$$typeof === REACT_CONTEXT_TYPE ||\n type.$$typeof === REACT_CONSUMER_TYPE ||\n type.$$typeof === REACT_FORWARD_REF_TYPE ||\n type.$$typeof === REACT_CLIENT_REFERENCE ||\n void 0 !== type.getModuleId))\n ? !0\n : !1;\n};\nexports.typeOf = typeOf;\n","/**\n * @license React\n * react-is.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function typeOf(object) {\n if (\"object\" === typeof object && null !== object) {\n var $$typeof = object.$$typeof;\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n switch (((object = object.type), object)) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n case REACT_VIEW_TRANSITION_TYPE:\n return object;\n default:\n switch (((object = object && object.$$typeof), object)) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n return object;\n case REACT_CONSUMER_TYPE:\n return object;\n default:\n return $$typeof;\n }\n }\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n }\n var REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n Symbol.for(\"react.provider\");\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_VIEW_TRANSITION_TYPE = Symbol.for(\"react.view_transition\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\");\n exports.ContextConsumer = REACT_CONSUMER_TYPE;\n exports.ContextProvider = REACT_CONTEXT_TYPE;\n exports.Element = REACT_ELEMENT_TYPE;\n exports.ForwardRef = REACT_FORWARD_REF_TYPE;\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.Lazy = REACT_LAZY_TYPE;\n exports.Memo = REACT_MEMO_TYPE;\n exports.Portal = REACT_PORTAL_TYPE;\n exports.Profiler = REACT_PROFILER_TYPE;\n exports.StrictMode = REACT_STRICT_MODE_TYPE;\n exports.Suspense = REACT_SUSPENSE_TYPE;\n exports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;\n exports.isContextConsumer = function (object) {\n return typeOf(object) === REACT_CONSUMER_TYPE;\n };\n exports.isContextProvider = function (object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n };\n exports.isElement = function (object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n };\n exports.isForwardRef = function (object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n };\n exports.isFragment = function (object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n };\n exports.isLazy = function (object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n };\n exports.isMemo = function (object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n };\n exports.isPortal = function (object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n };\n exports.isProfiler = function (object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n };\n exports.isStrictMode = function (object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n };\n exports.isSuspense = function (object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n };\n exports.isSuspenseList = function (object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n };\n exports.isValidElementType = function (type) {\n return \"string\" === typeof type ||\n \"function\" === typeof type ||\n type === REACT_FRAGMENT_TYPE ||\n type === REACT_PROFILER_TYPE ||\n type === REACT_STRICT_MODE_TYPE ||\n type === REACT_SUSPENSE_TYPE ||\n type === REACT_SUSPENSE_LIST_TYPE ||\n (\"object\" === typeof type &&\n null !== type &&\n (type.$$typeof === REACT_LAZY_TYPE ||\n type.$$typeof === REACT_MEMO_TYPE ||\n type.$$typeof === REACT_CONTEXT_TYPE ||\n type.$$typeof === REACT_CONSUMER_TYPE ||\n type.$$typeof === REACT_FORWARD_REF_TYPE ||\n type.$$typeof === REACT_CLIENT_REFERENCE ||\n void 0 !== type.getModuleId))\n ? !0\n : !1;\n };\n exports.typeOf = typeOf;\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","import React, {\n type ComponentType,\n type ReactElement,\n ReactNode,\n useContext,\n} from \"react\";\nimport { isValidElementType } from \"react-is\";\nimport {\n type Location,\n type NavigateFunction,\n type Params,\n type SetURLSearchParams,\n} from \"react-router\";\nimport { useExposedProps } from \"../util/useExposedProps.js\";\n\nexport type Slotlets = Record<\n string,\n ReactNode | ReactElement | ComponentType<ExposedComponentProps>\n>;\n\nconst SlotletContext = React.createContext<Slotlets | undefined>({});\n\nexport const SlotletProvider = ({\n slotlets,\n children,\n}: {\n children: ReactNode;\n slotlets?: Slotlets;\n}) => {\n return (\n <SlotletContext.Provider value={slotlets}>\n {children}\n </SlotletContext.Provider>\n );\n};\n\nexport type ExposedComponentProps = {\n location: Location;\n navigate: NavigateFunction;\n searchParams: URLSearchParams;\n setSearchParams: SetURLSearchParams;\n params: Params;\n};\n\nexport const Slotlet = ({ name }: { name: string }) => {\n const context = useContext(SlotletContext);\n const componentOrElement = context?.[name];\n const slotletProps = useExposedProps();\n\n if (isValidElementType(componentOrElement)) {\n return React.createElement(componentOrElement, slotletProps);\n }\n\n return componentOrElement as ReactNode;\n};\n"],"names":["DeveloperHint","children","className","jsx","Callout","jsxs","Markdown","NotFoundPage","params","useParams","ProseClasses","CategoryHeading","Heading","UnlinkIcon","Link","SyntaxHighlight","memo","code","props","syntaxHighlighting","useZudoku","invariant","highlightedCode","highlight","CodeBlock","ErrorAlert","error","message","hint","ZudokuError","title","stack","cause","stringError","cn","RouterError","useRouteError","isRouteErrorResponse","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_CONSUMER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_VIEW_TRANSITION_TYPE","REACT_CLIENT_REFERENCE","typeOf","object","$$typeof","reactIs_production","type","reactIs_development","reactIsModule","require$$0","require$$1","SlotletContext","React","SlotletProvider","slotlets","Slotlet","name","componentOrElement","useContext","slotletProps","useExposedProps","isValidElementType"],"mappings":";;;;;;;;;;;;;AAIO,MAAMA,IAAgB,CAAC;AAAA,EAC5B,UAAAC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","x_google_ignoreList":[5,6,7]}
|
package/lib/Toc-Ax54Pw8S.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Toc-Ax54Pw8S.js","sources":["../src/lib/components/navigation/Toc.tsx"],"sourcesContent":["import type { TocEntry } from \"@stefanprobst/rehype-extract-toc\";\nimport { ListTreeIcon } from \"lucide-react\";\nimport {\n useEffect,\n useRef,\n useState,\n type CSSProperties,\n type PropsWithChildren,\n} from \"react\";\nimport { cn } from \"../../util/cn.js\";\nimport { AnchorLink } from \"../AnchorLink.js\";\nimport { useViewportAnchor } from \"../context/ViewportAnchorContext.js\";\n\nconst DATA_ANCHOR_ATTR = \"data-active\";\n\nconst TocItem = ({\n item,\n children,\n className,\n isActive,\n}: PropsWithChildren<{\n item: TocEntry;\n isActive: boolean;\n className?: string;\n}>) => {\n return (\n <li className={cn(\"truncate\", className)} title={item.value}>\n <AnchorLink\n to={`#${item.id}`}\n {...{ [DATA_ANCHOR_ATTR]: item.id }}\n className={cn(\n isActive\n ? \"text-primary\"\n : \"hover:text-accent-foreground text-muted-foreground\",\n )}\n >\n {item.value}\n </AnchorLink>\n {children}\n </li>\n );\n};\n\nexport const Toc = ({ entries }: { entries: TocEntry[] }) => {\n const { activeAnchor } = useViewportAnchor();\n const listWrapperRef = useRef<HTMLUListElement>(null);\n const paintedOnce = useRef(false);\n const [indicatorStyle, setIndicatorStyles] = useState<CSSProperties>({\n top: 0,\n opacity: 0,\n });\n\n // synchronize active anchor indicator with the scroll position\n useEffect(() => {\n if (!listWrapperRef.current) return;\n\n const activeElement = listWrapperRef.current.querySelector(\n `[${DATA_ANCHOR_ATTR}='${activeAnchor}']`,\n );\n\n if (!activeElement) {\n setIndicatorStyles({ top: 0, opacity: 0 });\n return;\n }\n\n const topParent = listWrapperRef.current.getBoundingClientRect().top;\n const topElement = activeElement.getBoundingClientRect().top;\n\n setIndicatorStyles({\n opacity: 1,\n top: `${topElement - topParent}px`,\n });\n\n if (paintedOnce.current) return;\n\n // after all is painted, the indicator should animate\n requestIdleCallback(() => {\n paintedOnce.current = true;\n });\n }, [activeAnchor]);\n\n return (\n <aside className=\"sticky scrollbar top-8 lg:top-[--header-height] h-[calc(100vh-var(--header-height))] pt-[--padding-content-top] pb-[--padding-content-bottom] overflow-y-auto ps-1 text-sm\">\n <div className=\"flex items-center gap-2 font-medium mb-2\">\n <ListTreeIcon size={16} />\n On this page\n </div>\n <div className=\"relative ms-2 ps-4\">\n <div className=\"absolute inset-0 end-auto bg-border w-[2px]\" />\n <div\n className={cn(\n \"absolute -start-px -translate-y-1 h-6 w-[4px] rounded bg-primary\",\n paintedOnce.current &&\n \"ease-out [transition:top_150ms,opacity_325ms]\",\n )}\n style={indicatorStyle}\n />\n <ul\n ref={listWrapperRef}\n className=\"relative font-medium list-none space-y-2\"\n >\n {entries.map((item) => (\n <TocItem\n isActive={item.id === activeAnchor}\n key={item.id}\n item={item}\n className=\"ps-0\"\n >\n {item.children && (\n <ul className=\"list-none ps-4 pt-2 space-y-2\">\n {item.children.map((child) => (\n <TocItem\n item={child}\n isActive={child.id === activeAnchor}\n key={child.id}\n />\n ))}\n </ul>\n )}\n </TocItem>\n ))}\n </ul>\n </div>\n </aside>\n );\n};\n"],"names":["DATA_ANCHOR_ATTR","TocItem","item","children","className","isActive","jsxs","cn","jsx","AnchorLink","Toc","entries","activeAnchor","useViewportAnchor","listWrapperRef","useRef","paintedOnce","indicatorStyle","setIndicatorStyles","useState","useEffect","activeElement","topParent","topElement","ListTreeIcon","child"],"mappings":";;;;;AAaA,MAAMA,IAAmB,eAEnBC,IAAU,CAAC;AAAA,EACf,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AACF,MAMIC,gBAAAA,OAAC,QAAG,WAAWC,EAAG,YAAYH,CAAS,GAAG,OAAOF,EAAK,OACpD,UAAA;AAAA,EAAAM,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI,IAAI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