@hanzo/docs-base-ui 16.5.3 → 16.7.5
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/css/generated/docs.css +68 -33
- package/css/generated/flux.css +44 -34
- package/css/generated/home.css +88 -4
- package/css/generated/notebook.css +65 -31
- package/css/generated/shared.css +199 -59
- package/css/lib/base.css +1 -4
- package/css/lib/shiki.css +49 -41
- package/css/preset.css +3 -0
- package/dist/_virtual/_rolldown/runtime.js +6 -11
- package/dist/components/accordion.d.ts +1 -2
- package/dist/components/accordion.js +3 -7
- package/dist/components/banner.d.ts +1 -2
- package/dist/components/banner.js +1 -5
- package/dist/components/callout.d.ts +1 -2
- package/dist/components/callout.js +0 -3
- package/dist/components/card.d.ts +1 -2
- package/dist/components/card.js +0 -3
- package/dist/components/codeblock.d.ts +1 -2
- package/dist/components/codeblock.js +2 -6
- package/dist/components/codeblock.rsc.d.ts +21 -0
- package/dist/components/codeblock.rsc.js +22 -0
- package/dist/components/dialog/search-algolia.d.ts +1 -3
- package/dist/components/dialog/search-algolia.js +1 -5
- package/dist/components/dialog/search-default.d.ts +1 -3
- package/dist/components/dialog/search-default.js +1 -5
- package/dist/components/dialog/search-orama.d.ts +1 -3
- package/dist/components/dialog/search-orama.js +1 -5
- package/dist/components/dialog/search.d.ts +5 -5
- package/dist/components/dialog/search.js +124 -47
- package/dist/components/dynamic-codeblock.core.d.ts +7 -5
- package/dist/components/dynamic-codeblock.core.js +17 -32
- package/dist/components/dynamic-codeblock.d.ts +5 -3
- package/dist/components/dynamic-codeblock.js +8 -13
- package/dist/components/files.d.ts +1 -2
- package/dist/components/files.js +4 -8
- package/dist/components/github-info.d.ts +22 -9
- package/dist/components/github-info.js +33 -28
- package/dist/components/heading.d.ts +1 -2
- package/dist/components/heading.js +2 -5
- package/dist/components/image-zoom.d.ts +1 -2
- package/dist/components/image-zoom.js +2 -5
- package/dist/components/inline-toc.d.ts +1 -2
- package/dist/components/inline-toc.js +1 -5
- package/dist/components/sidebar/base.d.ts +7 -3
- package/dist/components/sidebar/base.js +6 -16
- package/dist/components/sidebar/link-item.d.ts +2 -3
- package/dist/components/sidebar/link-item.js +6 -3
- package/dist/components/sidebar/page-tree.d.ts +1 -2
- package/dist/components/sidebar/page-tree.js +54 -43
- package/dist/components/sidebar/tabs/dropdown.d.ts +4 -7
- package/dist/components/sidebar/tabs/dropdown.js +4 -11
- package/dist/components/sidebar/tabs/index.d.ts +3 -17
- package/dist/components/sidebar/tabs/index.js +0 -3
- package/dist/components/steps.d.ts +1 -2
- package/dist/components/steps.js +0 -3
- package/dist/components/tabs.d.ts +11 -7
- package/dist/components/tabs.js +13 -18
- package/dist/components/toc/clerk.d.ts +9 -2
- package/dist/components/toc/clerk.js +117 -62
- package/dist/components/toc/default.d.ts +9 -2
- package/dist/components/toc/default.js +28 -21
- package/dist/components/toc/index.d.ts +8 -5
- package/dist/components/toc/index.js +50 -25
- package/dist/components/type-table.d.ts +10 -5
- package/dist/components/type-table.js +22 -17
- package/dist/components/ui/accordion.d.ts +1 -2
- package/dist/components/ui/accordion.js +1 -5
- package/dist/components/ui/button.d.ts +2 -3
- package/dist/components/ui/button.js +0 -3
- package/dist/components/ui/collapsible.d.ts +1 -2
- package/dist/components/ui/collapsible.js +2 -6
- package/dist/components/ui/navigation-menu.d.ts +26 -12
- package/dist/components/ui/navigation-menu.js +52 -30
- package/dist/components/ui/popover.d.ts +10 -5
- package/dist/components/ui/popover.js +14 -18
- package/dist/components/ui/scroll-area.d.ts +17 -7
- package/dist/components/ui/scroll-area.js +26 -30
- package/dist/components/ui/tabs.d.ts +1 -2
- package/dist/components/ui/tabs.js +1 -5
- package/dist/contexts/i18n.d.ts +7 -5
- package/dist/contexts/i18n.js +3 -8
- package/dist/contexts/search.d.ts +2 -2
- package/dist/contexts/search.js +4 -6
- package/dist/contexts/tree.d.ts +1 -2
- package/dist/contexts/tree.js +1 -5
- package/dist/i18n.d.ts +16 -9
- package/dist/i18n.js +14 -14
- package/dist/layouts/docs/client.d.ts +30 -29
- package/dist/layouts/docs/client.js +72 -48
- package/dist/layouts/docs/index.d.ts +19 -33
- package/dist/layouts/docs/index.js +16 -172
- package/dist/layouts/docs/page/index.d.ts +67 -55
- package/dist/layouts/docs/page/index.js +74 -54
- package/dist/layouts/docs/page/slots/breadcrumb.d.ts +14 -0
- package/dist/layouts/docs/page/slots/breadcrumb.js +44 -0
- package/dist/layouts/docs/page/slots/container.d.ts +7 -0
- package/dist/layouts/docs/page/slots/container.js +17 -0
- package/dist/layouts/docs/page/slots/footer.d.ts +23 -0
- package/dist/layouts/docs/page/slots/footer.js +56 -0
- package/dist/layouts/docs/page/slots/toc.d.ts +55 -0
- package/dist/layouts/docs/page/slots/toc.js +166 -0
- package/dist/layouts/docs/slots/container.d.ts +7 -0
- package/dist/layouts/docs/slots/container.js +29 -0
- package/dist/layouts/docs/slots/header.d.ts +8 -0
- package/dist/layouts/docs/slots/header.js +38 -0
- package/dist/layouts/docs/slots/sidebar.d.ts +30 -0
- package/dist/layouts/docs/slots/sidebar.js +319 -0
- package/dist/layouts/flux/index.d.ts +34 -39
- package/dist/layouts/flux/index.js +77 -99
- package/dist/layouts/flux/page/index.d.ts +56 -49
- package/dist/layouts/flux/page/index.js +63 -35
- package/dist/layouts/flux/page/slots/breadcrumb.d.ts +14 -0
- package/dist/layouts/flux/page/slots/breadcrumb.js +44 -0
- package/dist/layouts/flux/page/slots/container.d.ts +7 -0
- package/dist/layouts/flux/page/slots/container.js +17 -0
- package/dist/layouts/flux/page/slots/footer.d.ts +23 -0
- package/dist/layouts/flux/page/slots/footer.js +56 -0
- package/dist/layouts/flux/page/slots/toc.d.ts +34 -0
- package/dist/layouts/flux/page/slots/toc.js +172 -0
- package/dist/layouts/flux/slots/container.d.ts +7 -0
- package/dist/layouts/flux/slots/container.js +13 -0
- package/dist/layouts/flux/slots/sidebar.d.ts +23 -0
- package/dist/layouts/flux/{sidebar.js → slots/sidebar.js} +74 -34
- package/dist/layouts/flux/slots/tab-dropdown.d.ts +17 -0
- package/dist/layouts/flux/{tab-dropdown.js → slots/tab-dropdown.js} +13 -24
- package/dist/layouts/home/index.d.ts +24 -7
- package/dist/layouts/home/index.js +39 -19
- package/dist/layouts/home/navbar.d.ts +5 -14
- package/dist/layouts/home/navbar.js +10 -12
- package/dist/layouts/home/not-found.d.ts +9 -0
- package/dist/layouts/home/not-found.js +38 -0
- package/dist/layouts/home/slots/container.d.ts +7 -0
- package/dist/layouts/home/slots/container.js +13 -0
- package/dist/layouts/home/slots/header.d.ts +11 -0
- package/dist/layouts/home/slots/header.js +242 -0
- package/dist/layouts/notebook/client.d.ts +32 -44
- package/dist/layouts/notebook/client.js +57 -147
- package/dist/layouts/notebook/index.d.ts +25 -24
- package/dist/layouts/notebook/index.js +16 -212
- package/dist/layouts/notebook/page/index.d.ts +67 -55
- package/dist/layouts/notebook/page/index.js +74 -54
- package/dist/layouts/notebook/page/slots/breadcrumb.d.ts +14 -0
- package/dist/layouts/notebook/page/slots/breadcrumb.js +44 -0
- package/dist/layouts/notebook/page/slots/container.d.ts +7 -0
- package/dist/layouts/notebook/page/slots/container.js +17 -0
- package/dist/layouts/notebook/page/slots/footer.d.ts +23 -0
- package/dist/layouts/notebook/page/slots/footer.js +56 -0
- package/dist/layouts/notebook/page/slots/toc.d.ts +55 -0
- package/dist/layouts/notebook/page/slots/toc.js +165 -0
- package/dist/layouts/notebook/slots/container.d.ts +7 -0
- package/dist/layouts/notebook/slots/container.js +31 -0
- package/dist/layouts/notebook/slots/header.d.ts +8 -0
- package/dist/layouts/notebook/slots/header.js +194 -0
- package/dist/layouts/notebook/slots/sidebar.d.ts +40 -0
- package/dist/layouts/notebook/slots/sidebar.js +297 -0
- package/dist/layouts/shared/client.d.ts +45 -0
- package/dist/layouts/shared/client.js +84 -0
- package/dist/layouts/shared/index.d.ts +136 -34
- package/dist/layouts/shared/index.js +49 -17
- package/dist/layouts/shared/page-actions.d.ts +36 -0
- package/dist/layouts/shared/page-actions.js +190 -0
- package/dist/layouts/shared/slots/language-select.d.ts +10 -0
- package/dist/layouts/shared/{language-toggle.js → slots/language-select.js} +11 -15
- package/dist/layouts/shared/slots/search-trigger.d.ts +23 -0
- package/dist/layouts/shared/{search-toggle.js → slots/search-trigger.js} +9 -13
- package/dist/layouts/shared/slots/theme-switch.d.ts +14 -0
- package/dist/layouts/shared/{theme-toggle.js → slots/theme-switch.js} +5 -9
- package/dist/mdx.d.ts +13 -3
- package/dist/mdx.js +0 -4
- package/dist/mdx.server.d.ts +1 -2
- package/dist/mdx.server.js +0 -3
- package/dist/og/takumi.d.ts +21 -0
- package/dist/og/takumi.js +70 -0
- package/dist/og.d.ts +1 -2
- package/dist/og.js +6 -6
- package/dist/page.d.ts +3 -4
- package/dist/page.js +6 -11
- package/dist/provider/base.d.ts +1 -2
- package/dist/provider/base.js +2 -6
- package/dist/provider/next.d.ts +1 -2
- package/dist/provider/next.js +1 -5
- package/dist/provider/react-router.d.ts +1 -2
- package/dist/provider/react-router.js +1 -5
- package/dist/provider/tanstack.d.ts +1 -2
- package/dist/provider/tanstack.js +1 -5
- package/dist/provider/waku.d.ts +1 -2
- package/dist/provider/waku.js +1 -5
- package/dist/style.css +433 -166
- package/dist/tailwind/typography.d.ts +2 -0
- package/dist/tailwind/typography.js +2 -0
- package/dist/utils/cn.js +1 -2
- package/dist/utils/merge-refs.js +0 -2
- package/dist/utils/urls.js +1 -3
- package/dist/utils/use-copy-button.d.ts +1 -2
- package/dist/utils/use-copy-button.js +1 -5
- package/dist/utils/use-footer-items.d.ts +1 -2
- package/dist/utils/use-footer-items.js +4 -8
- package/dist/utils/use-is-scroll-top.d.ts +1 -2
- package/dist/utils/use-is-scroll-top.js +1 -5
- package/package.json +139 -103
- package/LICENSE +0 -21
- package/dist/components/accordion.d.ts.map +0 -1
- package/dist/components/accordion.js.map +0 -1
- package/dist/components/banner.d.ts.map +0 -1
- package/dist/components/banner.js.map +0 -1
- package/dist/components/callout.d.ts.map +0 -1
- package/dist/components/callout.js.map +0 -1
- package/dist/components/card.d.ts.map +0 -1
- package/dist/components/card.js.map +0 -1
- package/dist/components/codeblock.d.ts.map +0 -1
- package/dist/components/codeblock.js.map +0 -1
- package/dist/components/dialog/search-algolia.d.ts.map +0 -1
- package/dist/components/dialog/search-algolia.js.map +0 -1
- package/dist/components/dialog/search-default.d.ts.map +0 -1
- package/dist/components/dialog/search-default.js.map +0 -1
- package/dist/components/dialog/search-orama.d.ts.map +0 -1
- package/dist/components/dialog/search-orama.js.map +0 -1
- package/dist/components/dialog/search.d.ts.map +0 -1
- package/dist/components/dialog/search.js.map +0 -1
- package/dist/components/dynamic-codeblock.core.d.ts.map +0 -1
- package/dist/components/dynamic-codeblock.core.js.map +0 -1
- package/dist/components/dynamic-codeblock.d.ts.map +0 -1
- package/dist/components/dynamic-codeblock.js.map +0 -1
- package/dist/components/files.d.ts.map +0 -1
- package/dist/components/files.js.map +0 -1
- package/dist/components/github-info.d.ts.map +0 -1
- package/dist/components/github-info.js.map +0 -1
- package/dist/components/heading.d.ts.map +0 -1
- package/dist/components/heading.js.map +0 -1
- package/dist/components/image-zoom-DGvp66QF.css +0 -80
- package/dist/components/image-zoom-DGvp66QF.css.map +0 -1
- package/dist/components/image-zoom.d.ts.map +0 -1
- package/dist/components/image-zoom.js.map +0 -1
- package/dist/components/image-zoom2.js +0 -1
- package/dist/components/inline-toc.d.ts.map +0 -1
- package/dist/components/inline-toc.js.map +0 -1
- package/dist/components/sidebar/base.d.ts.map +0 -1
- package/dist/components/sidebar/base.js.map +0 -1
- package/dist/components/sidebar/link-item.d.ts.map +0 -1
- package/dist/components/sidebar/link-item.js.map +0 -1
- package/dist/components/sidebar/page-tree.d.ts.map +0 -1
- package/dist/components/sidebar/page-tree.js.map +0 -1
- package/dist/components/sidebar/tabs/dropdown.d.ts.map +0 -1
- package/dist/components/sidebar/tabs/dropdown.js.map +0 -1
- package/dist/components/sidebar/tabs/index.d.ts.map +0 -1
- package/dist/components/sidebar/tabs/index.js.map +0 -1
- package/dist/components/steps.d.ts.map +0 -1
- package/dist/components/steps.js.map +0 -1
- package/dist/components/tabs.d.ts.map +0 -1
- package/dist/components/tabs.js.map +0 -1
- package/dist/components/toc/clerk.d.ts.map +0 -1
- package/dist/components/toc/clerk.js.map +0 -1
- package/dist/components/toc/default.d.ts.map +0 -1
- package/dist/components/toc/default.js.map +0 -1
- package/dist/components/toc/index.d.ts.map +0 -1
- package/dist/components/toc/index.js.map +0 -1
- package/dist/components/type-table.d.ts.map +0 -1
- package/dist/components/type-table.js.map +0 -1
- package/dist/components/ui/accordion.d.ts.map +0 -1
- package/dist/components/ui/accordion.js.map +0 -1
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/button.js.map +0 -1
- package/dist/components/ui/collapsible.d.ts.map +0 -1
- package/dist/components/ui/collapsible.js.map +0 -1
- package/dist/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/components/ui/navigation-menu.js.map +0 -1
- package/dist/components/ui/popover.d.ts.map +0 -1
- package/dist/components/ui/popover.js.map +0 -1
- package/dist/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/components/ui/scroll-area.js.map +0 -1
- package/dist/components/ui/tabs.d.ts.map +0 -1
- package/dist/components/ui/tabs.js.map +0 -1
- package/dist/contexts/i18n.d.ts.map +0 -1
- package/dist/contexts/i18n.js.map +0 -1
- package/dist/contexts/search.d.ts.map +0 -1
- package/dist/contexts/search.js.map +0 -1
- package/dist/contexts/tree.d.ts.map +0 -1
- package/dist/contexts/tree.js.map +0 -1
- package/dist/i18n.d.ts.map +0 -1
- package/dist/i18n.js.map +0 -1
- package/dist/layouts/docs/client.d.ts.map +0 -1
- package/dist/layouts/docs/client.js.map +0 -1
- package/dist/layouts/docs/index.d.ts.map +0 -1
- package/dist/layouts/docs/index.js.map +0 -1
- package/dist/layouts/docs/page/client.d.ts +0 -48
- package/dist/layouts/docs/page/client.d.ts.map +0 -1
- package/dist/layouts/docs/page/client.js +0 -227
- package/dist/layouts/docs/page/client.js.map +0 -1
- package/dist/layouts/docs/page/index.d.ts.map +0 -1
- package/dist/layouts/docs/page/index.js.map +0 -1
- package/dist/layouts/docs/sidebar.d.ts +0 -64
- package/dist/layouts/docs/sidebar.d.ts.map +0 -1
- package/dist/layouts/docs/sidebar.js +0 -162
- package/dist/layouts/docs/sidebar.js.map +0 -1
- package/dist/layouts/flux/index.d.ts.map +0 -1
- package/dist/layouts/flux/index.js.map +0 -1
- package/dist/layouts/flux/page/client.d.ts +0 -45
- package/dist/layouts/flux/page/client.d.ts.map +0 -1
- package/dist/layouts/flux/page/client.js +0 -255
- package/dist/layouts/flux/page/client.js.map +0 -1
- package/dist/layouts/flux/page/index.d.ts.map +0 -1
- package/dist/layouts/flux/page/index.js.map +0 -1
- package/dist/layouts/flux/sidebar.d.ts +0 -59
- package/dist/layouts/flux/sidebar.d.ts.map +0 -1
- package/dist/layouts/flux/sidebar.js.map +0 -1
- package/dist/layouts/flux/tab-dropdown.d.ts +0 -21
- package/dist/layouts/flux/tab-dropdown.d.ts.map +0 -1
- package/dist/layouts/flux/tab-dropdown.js.map +0 -1
- package/dist/layouts/home/client.d.ts +0 -19
- package/dist/layouts/home/client.d.ts.map +0 -1
- package/dist/layouts/home/client.js +0 -267
- package/dist/layouts/home/client.js.map +0 -1
- package/dist/layouts/home/index.d.ts.map +0 -1
- package/dist/layouts/home/index.js.map +0 -1
- package/dist/layouts/home/navbar.d.ts.map +0 -1
- package/dist/layouts/home/navbar.js.map +0 -1
- package/dist/layouts/notebook/client.d.ts.map +0 -1
- package/dist/layouts/notebook/client.js.map +0 -1
- package/dist/layouts/notebook/index.d.ts.map +0 -1
- package/dist/layouts/notebook/index.js.map +0 -1
- package/dist/layouts/notebook/page/client.d.ts +0 -48
- package/dist/layouts/notebook/page/client.d.ts.map +0 -1
- package/dist/layouts/notebook/page/client.js +0 -227
- package/dist/layouts/notebook/page/client.js.map +0 -1
- package/dist/layouts/notebook/page/index.d.ts.map +0 -1
- package/dist/layouts/notebook/page/index.js.map +0 -1
- package/dist/layouts/notebook/sidebar.d.ts +0 -60
- package/dist/layouts/notebook/sidebar.d.ts.map +0 -1
- package/dist/layouts/notebook/sidebar.js +0 -133
- package/dist/layouts/notebook/sidebar.js.map +0 -1
- package/dist/layouts/shared/index.d.ts.map +0 -1
- package/dist/layouts/shared/index.js.map +0 -1
- package/dist/layouts/shared/language-toggle.d.ts +0 -10
- package/dist/layouts/shared/language-toggle.d.ts.map +0 -1
- package/dist/layouts/shared/language-toggle.js.map +0 -1
- package/dist/layouts/shared/search-toggle.d.ts +0 -23
- package/dist/layouts/shared/search-toggle.d.ts.map +0 -1
- package/dist/layouts/shared/search-toggle.js.map +0 -1
- package/dist/layouts/shared/theme-toggle.d.ts +0 -14
- package/dist/layouts/shared/theme-toggle.d.ts.map +0 -1
- package/dist/layouts/shared/theme-toggle.js.map +0 -1
- package/dist/mdx.d.ts.map +0 -1
- package/dist/mdx.js.map +0 -1
- package/dist/mdx.server.d.ts.map +0 -1
- package/dist/mdx.server.js.map +0 -1
- package/dist/og.d.ts.map +0 -1
- package/dist/og.js.map +0 -1
- package/dist/page.d.ts.map +0 -1
- package/dist/page.js.map +0 -1
- package/dist/provider/base.d.ts.map +0 -1
- package/dist/provider/base.js.map +0 -1
- package/dist/provider/next.d.ts.map +0 -1
- package/dist/provider/next.js.map +0 -1
- package/dist/provider/react-router.d.ts.map +0 -1
- package/dist/provider/react-router.js.map +0 -1
- package/dist/provider/tanstack.d.ts.map +0 -1
- package/dist/provider/tanstack.js.map +0 -1
- package/dist/provider/waku.d.ts.map +0 -1
- package/dist/provider/waku.js.map +0 -1
- package/dist/utils/link-item.d.ts +0 -86
- package/dist/utils/link-item.d.ts.map +0 -1
- package/dist/utils/link-item.js +0 -25
- package/dist/utils/link-item.js.map +0 -1
- package/dist/utils/merge-refs.js.map +0 -1
- package/dist/utils/urls.js.map +0 -1
- package/dist/utils/use-copy-button.d.ts.map +0 -1
- package/dist/utils/use-copy-button.js.map +0 -1
- package/dist/utils/use-footer-items.d.ts.map +0 -1
- package/dist/utils/use-footer-items.js.map +0 -1
- package/dist/utils/use-is-scroll-top.d.ts.map +0 -1
- package/dist/utils/use-is-scroll-top.js.map +0 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SidebarProviderProps as SidebarProviderProps$1, useSidebar as useSidebar$1 } from "../../../components/sidebar/base.js";
|
|
2
|
+
import { SidebarPageTreeComponents } from "../../../components/sidebar/page-tree.js";
|
|
3
|
+
import { ComponentProps, ReactNode } from "react";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/layouts/flux/slots/sidebar.d.ts
|
|
7
|
+
interface SidebarProps extends ComponentProps<'aside'> {
|
|
8
|
+
components?: Partial<SidebarPageTreeComponents>;
|
|
9
|
+
banner?: ReactNode;
|
|
10
|
+
footer?: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
type SidebarProviderProps = SidebarProviderProps$1;
|
|
13
|
+
declare const useSidebar: typeof useSidebar$1;
|
|
14
|
+
declare function SidebarProvider(props: SidebarProviderProps): react_jsx_runtime0.JSX.Element;
|
|
15
|
+
declare function Sidebar({
|
|
16
|
+
footer,
|
|
17
|
+
banner,
|
|
18
|
+
components,
|
|
19
|
+
...rest
|
|
20
|
+
}: SidebarProps): react_jsx_runtime0.JSX.Element;
|
|
21
|
+
declare function SidebarTrigger(props: ComponentProps<'button'>): react_jsx_runtime0.JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Sidebar, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarTrigger, useSidebar };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { createLinkItemRenderer } from "
|
|
7
|
-
import {
|
|
8
|
-
import { useEffect, useEffectEvent, useRef } from "react";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../../utils/cn.js";
|
|
3
|
+
import { mergeRefs } from "../../../utils/merge-refs.js";
|
|
4
|
+
import { SidebarFolder as SidebarFolder$1, SidebarFolderContent as SidebarFolderContent$1, SidebarFolderLink as SidebarFolderLink$1, SidebarFolderTrigger as SidebarFolderTrigger$1, SidebarItem as SidebarItem$1, SidebarProvider as SidebarProvider$1, SidebarSeparator as SidebarSeparator$1, SidebarViewport, base_exports, useFolder, useFolderDepth } from "../../../components/sidebar/base.js";
|
|
5
|
+
import { createPageTreeRenderer } from "../../../components/sidebar/page-tree.js";
|
|
6
|
+
import { createLinkItemRenderer } from "../../../components/sidebar/link-item.js";
|
|
7
|
+
import { useFluxLayout } from "../index.js";
|
|
8
|
+
import { useEffect, useEffectEvent, useRef, useState } from "react";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { SidebarIcon, XIcon } from "lucide-react";
|
|
10
11
|
import { cva } from "class-variance-authority";
|
|
11
|
-
import { motion } from "motion/react";
|
|
12
|
+
import { AnimatePresence, motion } from "motion/react";
|
|
12
13
|
import { RemoveScroll } from "react-remove-scroll";
|
|
13
|
-
|
|
14
|
-
//#region src/layouts/flux/sidebar.tsx
|
|
14
|
+
//#region src/layouts/flux/slots/sidebar.tsx
|
|
15
15
|
const MotionSidebarItem = motion.create(SidebarItem$1);
|
|
16
16
|
const MotionSidebarFolderTrigger = motion.create(SidebarFolderTrigger$1);
|
|
17
17
|
const MotionSidebarFolderLink = motion.create(SidebarFolderLink$1);
|
|
@@ -26,23 +26,59 @@ const itemVariants = cva("relative flex flex-row items-center gap-2 rounded-lg p
|
|
|
26
26
|
function getItemOffset(depth) {
|
|
27
27
|
return `calc(${2 + 3 * depth} * var(--spacing))`;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const { useSidebar } = base_exports;
|
|
30
|
+
function SidebarProvider(props) {
|
|
31
|
+
return /* @__PURE__ */ jsx(SidebarProvider$1, { ...props });
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
function Sidebar({ footer, banner, components, ...rest }) {
|
|
34
|
+
const { menuItems } = useFluxLayout();
|
|
35
|
+
return /* @__PURE__ */ jsxs(SidebarContent, {
|
|
36
|
+
...rest,
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsx("div", {
|
|
39
|
+
className: "flex flex-col gap-3 p-4 pb-2 empty:hidden",
|
|
40
|
+
children: banner
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ jsx(SidebarViewport, { children: /* @__PURE__ */ jsxs("div", {
|
|
43
|
+
className: "flex flex-col",
|
|
44
|
+
children: [menuItems.filter((v) => v.type !== "icon").map((item, i, list) => /* @__PURE__ */ jsx(SidebarLinkItem, {
|
|
45
|
+
item,
|
|
46
|
+
className: cn(i === list.length - 1 && "mb-4")
|
|
47
|
+
}, i)), /* @__PURE__ */ jsx(SidebarPageTree, { ...components })]
|
|
48
|
+
}) }),
|
|
49
|
+
footer
|
|
50
|
+
]
|
|
51
|
+
});
|
|
40
52
|
}
|
|
41
53
|
function SidebarTrigger(props) {
|
|
42
|
-
|
|
54
|
+
const { open, setOpen } = useSidebar();
|
|
55
|
+
return /* @__PURE__ */ jsx("button", {
|
|
56
|
+
onClick: () => setOpen((prev) => !prev),
|
|
57
|
+
...props,
|
|
58
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, {
|
|
59
|
+
mode: "wait",
|
|
60
|
+
children: /* @__PURE__ */ jsx(motion.span, {
|
|
61
|
+
transition: { duration: .2 },
|
|
62
|
+
initial: {
|
|
63
|
+
y: "100%",
|
|
64
|
+
opacity: 0
|
|
65
|
+
},
|
|
66
|
+
animate: {
|
|
67
|
+
y: 0,
|
|
68
|
+
opacity: 1
|
|
69
|
+
},
|
|
70
|
+
exit: {
|
|
71
|
+
y: "100%",
|
|
72
|
+
opacity: 0
|
|
73
|
+
},
|
|
74
|
+
children: open ? /* @__PURE__ */ jsx(XIcon, {}) : /* @__PURE__ */ jsx(SidebarIcon, {})
|
|
75
|
+
}, open ? "open" : "closed")
|
|
76
|
+
})
|
|
77
|
+
});
|
|
43
78
|
}
|
|
44
79
|
function SidebarContent({ ref: refProp, className, children, ...props }) {
|
|
45
80
|
const ref = useRef(null);
|
|
81
|
+
const [blockScroll, setBlockScroll] = useState(false);
|
|
46
82
|
const { open, setOpen } = useSidebar();
|
|
47
83
|
const listener = useEffectEvent((e) => {
|
|
48
84
|
if (open && e.key === "Escape") {
|
|
@@ -56,8 +92,9 @@ function SidebarContent({ ref: refProp, className, children, ...props }) {
|
|
|
56
92
|
window.removeEventListener("keydown", listener);
|
|
57
93
|
};
|
|
58
94
|
}, []);
|
|
95
|
+
if (open && !blockScroll) setBlockScroll(true);
|
|
59
96
|
return /* @__PURE__ */ jsx(RemoveScroll, {
|
|
60
|
-
enabled:
|
|
97
|
+
enabled: blockScroll,
|
|
61
98
|
children: /* @__PURE__ */ jsx(motion.div, {
|
|
62
99
|
className: cn("fixed inset-0 py-10 z-30 backdrop-blur-md bg-fd-background/60", !open && "pointer-events-none"),
|
|
63
100
|
initial: "hide",
|
|
@@ -70,8 +107,11 @@ function SidebarContent({ ref: refProp, className, children, ...props }) {
|
|
|
70
107
|
onClick: () => {
|
|
71
108
|
setOpen(false);
|
|
72
109
|
},
|
|
110
|
+
onAnimationComplete: (definition) => {
|
|
111
|
+
if (definition === "hide") setBlockScroll(false);
|
|
112
|
+
},
|
|
73
113
|
children: /* @__PURE__ */ jsx(motion.div, {
|
|
74
|
-
className: "absolute overflow-y-auto pr-(--removed-body-scroll-bar-size,0)
|
|
114
|
+
className: "absolute top-0 min-h-0 inset-x-0 bottom-26 overflow-y-auto fd-scroll-container pr-(--removed-body-scroll-bar-size,0) py-16 mask-[linear-gradient(to_bottom,transparent,white_--spacing(14),white_calc(100%---spacing(14)),transparent)] lg:text-sm",
|
|
75
115
|
variants: {
|
|
76
116
|
show: {
|
|
77
117
|
y: 0,
|
|
@@ -83,14 +123,13 @@ function SidebarContent({ ref: refProp, className, children, ...props }) {
|
|
|
83
123
|
}
|
|
84
124
|
},
|
|
85
125
|
transition: {
|
|
86
|
-
duration: .
|
|
126
|
+
duration: .4,
|
|
87
127
|
ease: [
|
|
88
128
|
.16,
|
|
89
129
|
1,
|
|
90
130
|
.3,
|
|
91
131
|
1
|
|
92
|
-
]
|
|
93
|
-
opacity: { duration: .1 }
|
|
132
|
+
]
|
|
94
133
|
},
|
|
95
134
|
children: /* @__PURE__ */ jsx(motion.aside, {
|
|
96
135
|
id: "nd-sidebar",
|
|
@@ -104,10 +143,13 @@ function SidebarContent({ ref: refProp, className, children, ...props }) {
|
|
|
104
143
|
})
|
|
105
144
|
});
|
|
106
145
|
}
|
|
146
|
+
function SidebarFolder(props) {
|
|
147
|
+
return /* @__PURE__ */ jsx(SidebarFolder$1, { ...props });
|
|
148
|
+
}
|
|
107
149
|
function SidebarSeparator({ className, style, children, ...props }) {
|
|
108
150
|
const depth = useFolderDepth();
|
|
109
151
|
return /* @__PURE__ */ jsx(SidebarSeparator$1, {
|
|
110
|
-
className: cn("[&_svg]:size-4 [&_svg]:shrink-0", className),
|
|
152
|
+
className: cn("inline-flex items-center gap-2 mb-1.5 px-2 mt-6 empty:mb-0 [&_svg]:size-4 [&_svg]:shrink-0", depth === 0 && "first:mt-0", className),
|
|
111
153
|
style: {
|
|
112
154
|
paddingInlineStart: getItemOffset(depth),
|
|
113
155
|
...style
|
|
@@ -134,7 +176,7 @@ function SidebarItem({ className, style, children, ...props }) {
|
|
|
134
176
|
function SidebarFolderTrigger({ className, style, ...props }) {
|
|
135
177
|
const { depth, collapsible } = useFolder();
|
|
136
178
|
return /* @__PURE__ */ jsx(MotionSidebarFolderTrigger, {
|
|
137
|
-
className: (
|
|
179
|
+
className: (state) => cn(itemVariants({ variant: collapsible ? "button" : null }), "w-full", typeof className === "function" ? className(state) : className),
|
|
138
180
|
style: {
|
|
139
181
|
paddingInlineStart: getItemOffset(depth - 1),
|
|
140
182
|
...style
|
|
@@ -162,7 +204,7 @@ function SidebarFolderContent({ className, children, ...props }) {
|
|
|
162
204
|
const depth = useFolderDepth();
|
|
163
205
|
const { open } = useFolder();
|
|
164
206
|
return /* @__PURE__ */ jsx(MotionSidebarFolderContent, {
|
|
165
|
-
className: (
|
|
207
|
+
className: (state) => cn("relative", depth === 1 && "before:content-[''] before:absolute before:w-px before:inset-y-1 before:bg-fd-border before:start-2.5", typeof className === "function" ? className(state) : className),
|
|
166
208
|
...props,
|
|
167
209
|
children: /* @__PURE__ */ jsx(motion.div, {
|
|
168
210
|
initial: "hide",
|
|
@@ -191,7 +233,5 @@ const SidebarLinkItem = createLinkItemRenderer({
|
|
|
191
233
|
SidebarFolderTrigger,
|
|
192
234
|
SidebarItem
|
|
193
235
|
});
|
|
194
|
-
|
|
195
236
|
//#endregion
|
|
196
|
-
export { Sidebar,
|
|
197
|
-
//# sourceMappingURL=sidebar.js.map
|
|
237
|
+
export { Sidebar, SidebarProvider, SidebarTrigger, useSidebar };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LayoutTab } from "../../shared/index.js";
|
|
2
|
+
import { ComponentProps, ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/layouts/flux/slots/tab-dropdown.d.ts
|
|
6
|
+
interface TabDropdownProps extends ComponentProps<'button'> {
|
|
7
|
+
placeholder?: ReactNode;
|
|
8
|
+
tabs: LayoutTab[];
|
|
9
|
+
}
|
|
10
|
+
declare function TabDropdown({
|
|
11
|
+
tabs,
|
|
12
|
+
placeholder,
|
|
13
|
+
className,
|
|
14
|
+
...props
|
|
15
|
+
}: TabDropdownProps): react_jsx_runtime0.JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { TabDropdown, TabDropdownProps };
|
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useSidebar } from "../../components/sidebar/base.js";
|
|
6
|
-
import { Popover, PopoverContent, PopoverTrigger } from "../../components/ui/popover.js";
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../../utils/cn.js";
|
|
3
|
+
import { Popover, PopoverContent, PopoverTrigger } from "../../../components/ui/popover.js";
|
|
4
|
+
import { isLayoutTabActive } from "../../shared/index.js";
|
|
7
5
|
import { useMemo, useState } from "react";
|
|
8
6
|
import { usePathname } from "@hanzo/docs-core/framework";
|
|
9
7
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
8
|
import Link from "@hanzo/docs-core/link";
|
|
11
9
|
import { Check, ChevronsUpDown } from "lucide-react";
|
|
12
10
|
import { AnimatePresence, motion } from "motion/react";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
function SidebarTabsDropdown({ options, placeholder, className, ...props }) {
|
|
11
|
+
//#region src/layouts/flux/slots/tab-dropdown.tsx
|
|
12
|
+
function TabDropdown({ tabs, placeholder, className, ...props }) {
|
|
16
13
|
const [open, setOpen] = useState(false);
|
|
17
|
-
const { closeOnRedirect } = useSidebar();
|
|
18
14
|
const pathname = usePathname();
|
|
19
15
|
const selectedIdx = useMemo(() => {
|
|
20
|
-
return
|
|
21
|
-
}, [
|
|
22
|
-
const selected = selectedIdx !== -1 ?
|
|
16
|
+
return tabs.findLastIndex((item) => isLayoutTabActive(item, pathname));
|
|
17
|
+
}, [tabs, pathname]);
|
|
18
|
+
const selected = selectedIdx !== -1 ? tabs[selectedIdx] : void 0;
|
|
23
19
|
const onClick = () => {
|
|
24
|
-
closeOnRedirect.current = false;
|
|
25
20
|
setOpen(false);
|
|
26
21
|
};
|
|
27
22
|
const item = selected ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -35,12 +30,12 @@ function SidebarTabsDropdown({ options, placeholder, className, ...props }) {
|
|
|
35
30
|
open,
|
|
36
31
|
onOpenChange: setOpen,
|
|
37
32
|
children: [item && /* @__PURE__ */ jsxs(PopoverTrigger, {
|
|
38
|
-
className: cn("flex items-center gap-2 rounded-
|
|
33
|
+
className: cn("flex items-center gap-2 rounded-xl overflow-hidden p-1.5 border shadow-sm text-sm text-start transition-colors hover:bg-fd-accent hover:text-fd-accent-foreground data-[state=open]:bg-fd-accent data-[state=open]:text-fd-accent-foreground", className),
|
|
39
34
|
...props,
|
|
40
35
|
children: [/* @__PURE__ */ jsx(AnimatePresence, {
|
|
41
36
|
mode: "popLayout",
|
|
42
37
|
children: /* @__PURE__ */ jsx(motion.span, {
|
|
43
|
-
className: "flex w-full items-center text-nowrap gap-1.5",
|
|
38
|
+
className: "flex w-full min-w-0 overflow-hidden items-center text-nowrap gap-1.5",
|
|
44
39
|
initial: {
|
|
45
40
|
opacity: 0,
|
|
46
41
|
y: "100%"
|
|
@@ -59,7 +54,7 @@ function SidebarTabsDropdown({ options, placeholder, className, ...props }) {
|
|
|
59
54
|
}), /* @__PURE__ */ jsx(PopoverContent, {
|
|
60
55
|
align: "start",
|
|
61
56
|
className: "flex flex-col gap-1 max-w-svw p-1 fd-scroll-container",
|
|
62
|
-
children:
|
|
57
|
+
children: tabs.map((item, i) => {
|
|
63
58
|
const isActive = i === selectedIdx;
|
|
64
59
|
if (!isActive && item.unlisted) return;
|
|
65
60
|
return /* @__PURE__ */ jsxs(Link, {
|
|
@@ -86,11 +81,5 @@ function SidebarTabsDropdown({ options, placeholder, className, ...props }) {
|
|
|
86
81
|
})]
|
|
87
82
|
});
|
|
88
83
|
}
|
|
89
|
-
function isTabActive(tab, pathname) {
|
|
90
|
-
if (tab.urls) return tab.urls.has(normalize(pathname));
|
|
91
|
-
return isActive(tab.url, pathname, true);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
84
|
//#endregion
|
|
95
|
-
export {
|
|
96
|
-
//# sourceMappingURL=tab-dropdown.js.map
|
|
85
|
+
export { TabDropdown };
|
|
@@ -1,12 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { BaseSlots, BaseSlotsProps } from "../shared/client.js";
|
|
2
|
+
import { BaseLayoutProps, LinkItemType, NavOptions } from "../shared/index.js";
|
|
3
|
+
import { ComponentProps, FC } from "react";
|
|
3
4
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
5
|
|
|
5
6
|
//#region src/layouts/home/index.d.ts
|
|
6
|
-
interface HomeLayoutProps extends BaseLayoutProps {
|
|
7
|
-
nav?:
|
|
7
|
+
interface HomeLayoutProps extends BaseLayoutProps, ComponentProps<'main'> {
|
|
8
|
+
nav?: Nav;
|
|
9
|
+
slots?: Partial<HomeSlots>;
|
|
8
10
|
}
|
|
9
|
-
|
|
11
|
+
interface Nav extends NavOptions {
|
|
12
|
+
/**
|
|
13
|
+
* Open mobile menu when hovering the trigger
|
|
14
|
+
*/
|
|
15
|
+
enableHoverToOpen?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface HomeSlots extends BaseSlots {
|
|
18
|
+
header: FC<ComponentProps<'header'>>;
|
|
19
|
+
container: FC<ComponentProps<'main'>>;
|
|
20
|
+
}
|
|
21
|
+
declare function useHomeLayout(): {
|
|
22
|
+
props: BaseSlotsProps<HomeLayoutProps>;
|
|
23
|
+
navItems: LinkItemType[];
|
|
24
|
+
menuItems: LinkItemType[];
|
|
25
|
+
slots: HomeSlots;
|
|
26
|
+
};
|
|
27
|
+
declare function HomeLayout(props: HomeLayoutProps): react_jsx_runtime0.JSX.Element;
|
|
10
28
|
//#endregion
|
|
11
|
-
export { HomeLayout, HomeLayoutProps };
|
|
12
|
-
//# sourceMappingURL=index.d.ts.map
|
|
29
|
+
export { HomeLayout, HomeLayoutProps, HomeSlots, useHomeLayout };
|
|
@@ -1,25 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
"use client";
|
|
2
|
+
import { baseSlots } from "../shared/client.js";
|
|
3
|
+
import { useLinkItems } from "../shared/index.js";
|
|
4
|
+
import { Container } from "./slots/container.js";
|
|
5
|
+
import { Header } from "./slots/header.js";
|
|
6
|
+
import { createContext, use } from "react";
|
|
3
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
5
8
|
//#region src/layouts/home/index.tsx
|
|
9
|
+
const LayoutContext = createContext(null);
|
|
10
|
+
function useHomeLayout() {
|
|
11
|
+
const context = use(LayoutContext);
|
|
12
|
+
if (!context) throw new Error("Please use this component under <HomeLayout /> (`@hanzo/docs-ui/layouts/home`).");
|
|
13
|
+
return context;
|
|
14
|
+
}
|
|
15
|
+
const { useProvider } = baseSlots({ useProps() {
|
|
16
|
+
return useHomeLayout().props;
|
|
17
|
+
} });
|
|
6
18
|
function HomeLayout(props) {
|
|
7
|
-
const { nav = {},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
const { nav: { enabled: navEnabled = true } = {}, slots: defaultSlots, children, i18n: _i18n, githubUrl: _githubUrl, links: _links, themeSwitch: _themeSwitch, searchToggle: _searchToggle, ...rest } = props;
|
|
20
|
+
const { baseSlots, baseProps } = useProvider(props);
|
|
21
|
+
const linkItems = useLinkItems(props);
|
|
22
|
+
const slots = {
|
|
23
|
+
...baseSlots,
|
|
24
|
+
header: defaultSlots?.header ?? InlineHeader,
|
|
25
|
+
container: defaultSlots?.container ?? Container
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ jsx(LayoutContext, {
|
|
28
|
+
value: {
|
|
29
|
+
props: baseProps,
|
|
30
|
+
slots,
|
|
31
|
+
...linkItems
|
|
32
|
+
},
|
|
33
|
+
children: /* @__PURE__ */ jsxs(slots.container, {
|
|
34
|
+
...rest,
|
|
35
|
+
children: [navEnabled && /* @__PURE__ */ jsx(slots.header, {}), children]
|
|
36
|
+
})
|
|
20
37
|
});
|
|
21
38
|
}
|
|
22
|
-
|
|
39
|
+
function InlineHeader(props) {
|
|
40
|
+
const { nav } = useHomeLayout().props;
|
|
41
|
+
if (nav?.component) return nav.component;
|
|
42
|
+
return /* @__PURE__ */ jsx(Header, { ...props });
|
|
43
|
+
}
|
|
23
44
|
//#endregion
|
|
24
|
-
export { HomeLayout };
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
|
45
|
+
export { HomeLayout, useHomeLayout };
|
|
@@ -1,20 +1,11 @@
|
|
|
1
|
-
import { NavigationMenuContentProps, NavigationMenuTriggerProps } from "../../components/ui/navigation-menu.js";
|
|
2
|
-
import * as react from "react";
|
|
1
|
+
import { NavigationMenuContentProps, NavigationMenuItem, NavigationMenuTriggerProps } from "../../components/ui/navigation-menu.js";
|
|
3
2
|
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
3
|
import { LinkProps } from "@hanzo/docs-core/link";
|
|
5
|
-
import * as _base_ui_react0 from "@base-ui/react";
|
|
6
4
|
|
|
7
5
|
//#region src/layouts/home/navbar.d.ts
|
|
8
|
-
declare const NavbarMenu:
|
|
9
|
-
declare function NavbarMenuContent(
|
|
10
|
-
|
|
11
|
-
...props
|
|
12
|
-
}: NavigationMenuContentProps): react_jsx_runtime0.JSX.Element;
|
|
13
|
-
declare function NavbarMenuTrigger({
|
|
14
|
-
className,
|
|
15
|
-
...props
|
|
16
|
-
}: NavigationMenuTriggerProps): react_jsx_runtime0.JSX.Element;
|
|
6
|
+
declare const NavbarMenu: typeof NavigationMenuItem;
|
|
7
|
+
declare function NavbarMenuContent(props: NavigationMenuContentProps): react_jsx_runtime0.JSX.Element;
|
|
8
|
+
declare function NavbarMenuTrigger(props: NavigationMenuTriggerProps): react_jsx_runtime0.JSX.Element;
|
|
17
9
|
declare function NavbarMenuLink(props: LinkProps): react_jsx_runtime0.JSX.Element;
|
|
18
10
|
//#endregion
|
|
19
|
-
export { NavbarMenu, NavbarMenuContent, NavbarMenuLink, NavbarMenuTrigger };
|
|
20
|
-
//# sourceMappingURL=navbar.d.ts.map
|
|
11
|
+
export { NavbarMenu, NavbarMenuContent, NavbarMenuLink, NavbarMenuTrigger };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
3
2
|
import { cn } from "../../utils/cn.js";
|
|
4
3
|
import { NavigationMenuContent, NavigationMenuItem, NavigationMenuLink, NavigationMenuTrigger } from "../../components/ui/navigation-menu.js";
|
|
5
|
-
import { navItemVariants } from "./
|
|
4
|
+
import { navItemVariants } from "./slots/header.js";
|
|
6
5
|
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
import Link from "@hanzo/docs-core/link";
|
|
8
|
-
|
|
9
7
|
//#region src/layouts/home/navbar.tsx
|
|
10
8
|
const NavbarMenu = NavigationMenuItem;
|
|
11
|
-
function NavbarMenuContent(
|
|
9
|
+
function NavbarMenuContent(props) {
|
|
10
|
+
const { className, ...rest } = props;
|
|
12
11
|
return /* @__PURE__ */ jsx(NavigationMenuContent, {
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
...rest,
|
|
13
|
+
className: (state) => cn("grid grid-cols-1 gap-2 md:grid-cols-2 lg:grid-cols-3", typeof className === "function" ? className(state) : className),
|
|
15
14
|
children: props.children
|
|
16
15
|
});
|
|
17
16
|
}
|
|
18
|
-
function NavbarMenuTrigger(
|
|
17
|
+
function NavbarMenuTrigger(props) {
|
|
18
|
+
const { className, ...rest } = props;
|
|
19
19
|
return /* @__PURE__ */ jsx(NavigationMenuTrigger, {
|
|
20
|
-
...
|
|
21
|
-
className: (
|
|
20
|
+
...rest,
|
|
21
|
+
className: (state) => cn(navItemVariants(), "text-sm rounded-md", typeof className === "function" ? className(state) : className),
|
|
22
22
|
children: props.children
|
|
23
23
|
});
|
|
24
24
|
}
|
|
@@ -29,7 +29,5 @@ function NavbarMenuLink(props) {
|
|
|
29
29
|
children: props.children
|
|
30
30
|
}) });
|
|
31
31
|
}
|
|
32
|
-
|
|
33
32
|
//#endregion
|
|
34
33
|
export { NavbarMenu, NavbarMenuContent, NavbarMenuLink, NavbarMenuTrigger };
|
|
35
|
-
//# sourceMappingURL=navbar.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/layouts/home/not-found.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* the default not found page content, please make your own if you want to customise it.
|
|
6
|
+
*/
|
|
7
|
+
declare function DefaultNotFound(): react_jsx_runtime0.JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { DefaultNotFound };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { buttonVariants } from "../../components/ui/button.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import Link from "@hanzo/docs-core/link";
|
|
5
|
+
import { HomeIcon } from "lucide-react";
|
|
6
|
+
//#region src/layouts/home/not-found.tsx
|
|
7
|
+
/**
|
|
8
|
+
* the default not found page content, please make your own if you want to customise it.
|
|
9
|
+
*/
|
|
10
|
+
function DefaultNotFound() {
|
|
11
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
12
|
+
className: "flex flex-col px-8 justify-center flex-1 text-center items-center gap-4",
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ jsx("h1", {
|
|
15
|
+
className: "text-6xl font-bold text-fd-muted-foreground",
|
|
16
|
+
children: "404"
|
|
17
|
+
}),
|
|
18
|
+
/* @__PURE__ */ jsx("h2", {
|
|
19
|
+
className: "text-2xl font-semibold",
|
|
20
|
+
children: "Page Not Found"
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ jsx("p", {
|
|
23
|
+
className: "text-fd-muted-foreground max-w-md",
|
|
24
|
+
children: "The page you are looking for might have been removed, had its name changed, or is temporarily unavailable."
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ jsxs(Link, {
|
|
27
|
+
href: "/",
|
|
28
|
+
className: cn(buttonVariants({
|
|
29
|
+
className: "mt-4 gap-1.5",
|
|
30
|
+
variant: "primary"
|
|
31
|
+
})),
|
|
32
|
+
children: [/* @__PURE__ */ jsx(HomeIcon, { className: "size-4" }), "Back to Home"]
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { DefaultNotFound };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/layouts/home/slots/container.d.ts
|
|
5
|
+
declare function Container(props: ComponentProps<'main'>): react_jsx_runtime0.JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Container };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../../utils/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/layouts/home/slots/container.tsx
|
|
5
|
+
function Container(props) {
|
|
6
|
+
return /* @__PURE__ */ jsx("main", {
|
|
7
|
+
id: "nd-home-layout",
|
|
8
|
+
...props,
|
|
9
|
+
className: cn("flex flex-1 flex-col [--fd-layout-width:1400px]", props.className)
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Container };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
4
|
+
|
|
5
|
+
//#region src/layouts/home/slots/header.d.ts
|
|
6
|
+
declare const navItemVariants: (props?: ({
|
|
7
|
+
variant?: "button" | "main" | "icon" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
9
|
+
declare function Header(props: ComponentProps<'header'>): react_jsx_runtime0.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Header, navItemVariants };
|