@hanzo/docs-base-ui 16.5.0 → 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/README.md +3 -3
- package/css/aspen.css +39 -0
- package/css/black.css +39 -1
- package/css/catppuccin.css +49 -1
- package/css/dusk.css +47 -1
- package/css/emerald.css +39 -0
- package/css/generated/docs.css +490 -0
- package/css/generated/flux.css +429 -0
- package/css/generated/home.css +285 -0
- package/css/generated/notebook.css +526 -0
- package/css/generated/shared.css +1173 -0
- package/css/lib/base.css +214 -0
- package/css/lib/default-colors.css +51 -0
- package/css/lib/shiki.css +98 -0
- package/css/neutral.css +7 -1
- package/css/ocean.css +44 -1
- package/css/preset.css +9 -7
- package/css/purple.css +39 -1
- package/css/ruby.css +39 -0
- package/css/shadcn.css +36 -1
- package/css/solar.css +75 -1
- package/css/vitepress.css +65 -1
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/components/accordion.d.ts +2 -3
- package/dist/components/accordion.js +9 -13
- package/dist/components/banner.d.ts +3 -4
- package/dist/components/banner.js +5 -9
- package/dist/components/callout.d.ts +6 -7
- package/dist/components/callout.js +1 -4
- package/dist/components/card.d.ts +4 -5
- package/dist/components/card.js +2 -5
- package/dist/components/codeblock.d.ts +8 -9
- package/dist/components/codeblock.js +9 -13
- 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 +7 -9
- package/dist/components/dialog/search-algolia.js +8 -12
- package/dist/components/dialog/search-default.d.ts +7 -9
- package/dist/components/dialog/search-default.js +8 -12
- package/dist/components/dialog/search-orama.d.ts +7 -9
- package/dist/components/dialog/search-orama.js +8 -12
- package/dist/components/dialog/search.d.ts +21 -21
- package/dist/components/dialog/search.js +137 -60
- package/dist/components/dynamic-codeblock.core.d.ts +35 -0
- package/dist/components/dynamic-codeblock.core.js +51 -0
- package/dist/components/dynamic-codeblock.d.ts +7 -29
- package/dist/components/dynamic-codeblock.js +11 -60
- package/dist/components/files.d.ts +1 -2
- package/dist/components/files.js +6 -10
- package/dist/components/github-info.d.ts +23 -10
- package/dist/components/github-info.js +34 -29
- package/dist/components/heading.d.ts +1 -2
- package/dist/components/heading.js +3 -6
- package/dist/components/image-zoom.d.ts +4 -5
- package/dist/components/image-zoom.js +2 -5
- package/dist/components/inline-toc.d.ts +3 -4
- package/dist/components/inline-toc.js +2 -6
- package/dist/components/sidebar/base.d.ts +29 -23
- package/dist/components/sidebar/base.js +16 -22
- package/dist/components/sidebar/link-item.d.ts +3 -4
- package/dist/components/sidebar/link-item.js +6 -3
- package/dist/components/sidebar/page-tree.d.ts +3 -4
- package/dist/components/sidebar/page-tree.js +56 -45
- package/dist/components/sidebar/tabs/dropdown.d.ts +6 -9
- package/dist/components/sidebar/tabs/dropdown.js +22 -29
- 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 +4 -5
- package/dist/components/steps.js +0 -3
- package/dist/components/tabs.d.ts +15 -11
- package/dist/components/tabs.js +15 -20
- package/dist/components/toc/clerk.d.ts +19 -1
- package/dist/components/toc/clerk.js +165 -10
- package/dist/components/toc/default.d.ts +19 -1
- package/dist/components/toc/default.js +45 -10
- package/dist/components/toc/index.d.ts +29 -1
- package/dist/components/toc/index.js +105 -10
- package/dist/components/type-table.d.ts +11 -6
- package/dist/components/type-table.js +28 -23
- package/dist/components/ui/accordion.d.ts +7 -8
- package/dist/components/ui/accordion.js +2 -6
- package/dist/components/ui/button.d.ts +1 -2
- package/dist/components/ui/button.js +0 -3
- package/dist/components/ui/collapsible.d.ts +6 -7
- package/dist/components/ui/collapsible.js +3 -7
- package/dist/components/ui/navigation-menu.d.ts +27 -13
- package/dist/components/ui/navigation-menu.js +53 -31
- package/dist/components/ui/popover.d.ts +11 -6
- package/dist/components/ui/popover.js +15 -19
- package/dist/components/ui/scroll-area.d.ts +17 -7
- package/dist/components/ui/scroll-area.js +27 -31
- package/dist/components/ui/tabs.d.ts +8 -9
- package/dist/components/ui/tabs.js +5 -9
- package/dist/contexts/i18n.d.ts +62 -1
- package/dist/contexts/i18n.js +53 -10
- package/dist/contexts/search.d.ts +71 -5
- package/dist/contexts/search.js +64 -10
- package/dist/contexts/tree.d.ts +21 -1
- package/dist/contexts/tree.js +36 -10
- package/dist/i18n.d.ts +21 -1
- package/dist/i18n.js +20 -3
- package/dist/layouts/docs/client.d.ts +30 -29
- package/dist/layouts/docs/client.js +76 -52
- package/dist/layouts/docs/index.d.ts +21 -35
- package/dist/layouts/docs/index.js +16 -172
- package/dist/layouts/docs/page/index.d.ts +75 -52
- package/dist/layouts/docs/page/index.js +76 -56
- 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 +74 -0
- package/dist/layouts/flux/index.js +146 -0
- package/dist/layouts/flux/page/index.d.ts +105 -0
- package/dist/layouts/flux/page/index.js +104 -0
- 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/slots/sidebar.js +237 -0
- package/dist/layouts/flux/slots/tab-dropdown.d.ts +17 -0
- package/dist/layouts/flux/slots/tab-dropdown.js +85 -0
- package/dist/layouts/home/index.d.ts +25 -8
- package/dist/layouts/home/index.js +39 -19
- package/dist/layouts/home/navbar.d.ts +7 -16
- package/dist/layouts/home/navbar.js +12 -14
- 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 +58 -148
- package/dist/layouts/notebook/index.d.ts +26 -25
- package/dist/layouts/notebook/index.js +16 -213
- package/dist/layouts/notebook/page/index.d.ts +75 -52
- package/dist/layouts/notebook/page/index.js +76 -56
- 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 +144 -35
- package/dist/layouts/shared/index.js +74 -15
- 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} +12 -16
- package/dist/layouts/shared/slots/search-trigger.d.ts +23 -0
- package/dist/layouts/shared/{search-toggle.js → slots/search-trigger.js} +12 -16
- package/dist/layouts/shared/slots/theme-switch.d.ts +14 -0
- package/dist/layouts/shared/{theme-toggle.js → slots/theme-switch.js} +11 -15
- package/dist/mdx.d.ts +23 -13
- package/dist/mdx.js +2 -6
- package/dist/mdx.server.d.ts +1 -3
- 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 +22 -1
- package/dist/og.js +70 -3
- package/dist/page.d.ts +6 -7
- package/dist/page.js +9 -14
- package/dist/provider/base.d.ts +5 -6
- package/dist/provider/base.js +5 -9
- package/dist/provider/next.d.ts +4 -5
- package/dist/provider/next.js +1 -5
- package/dist/provider/react-router.d.ts +4 -5
- package/dist/provider/react-router.js +1 -5
- package/dist/provider/tanstack.d.ts +4 -5
- package/dist/provider/tanstack.js +1 -5
- package/dist/provider/waku.d.ts +4 -5
- package/dist/provider/waku.js +1 -5
- package/dist/style.css +594 -192
- package/dist/tailwind/typography.d.ts +2 -0
- package/dist/tailwind/typography.js +2 -0
- package/dist/utils/cn.js +2 -0
- package/dist/utils/merge-refs.js +11 -0
- package/dist/utils/urls.js +15 -0
- package/dist/utils/use-copy-button.d.ts +6 -1
- package/dist/utils/use-copy-button.js +26 -3
- package/dist/utils/use-footer-items.d.ts +9 -1
- package/dist/utils/use-footer-items.js +24 -3
- package/dist/utils/use-is-scroll-top.d.ts +8 -1
- package/dist/utils/use-is-scroll-top.js +20 -3
- package/package.json +133 -81
- package/css/layouts/docs.css +0 -1
- package/css/layouts/home.css +0 -1
- package/css/layouts/notebook.css +0 -1
- package/dist/_virtual/rolldown_runtime.js +0 -36
- 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.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-CtfZieBH.css +0 -80
- package/dist/components/image-zoom-CtfZieBH.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.js.map +0 -1
- package/dist/components/toc/default.js.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.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.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 -46
- 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 -63
- 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/home/client.d.ts +0 -19
- package/dist/layouts/home/client.d.ts.map +0 -1
- package/dist/layouts/home/client.js +0 -285
- 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 -46
- 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 -59
- 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/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
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { I18nLabel, useI18n } from "../../../contexts/i18n.js";
|
|
3
|
+
import { cn } from "../../../utils/cn.js";
|
|
4
|
+
import { buttonVariants } from "../../../components/ui/button.js";
|
|
5
|
+
import { MarkdownCopyButton, ViewOptionsPopover } from "../../shared/page-actions.js";
|
|
6
|
+
import { TOC, TOCProvider } from "./slots/toc.js";
|
|
7
|
+
import { Footer } from "./slots/footer.js";
|
|
8
|
+
import { Breadcrumb } from "./slots/breadcrumb.js";
|
|
9
|
+
import { Container } from "./slots/container.js";
|
|
10
|
+
import { createContext, use, useEffect, useState } from "react";
|
|
11
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { Edit } from "lucide-react";
|
|
13
|
+
//#region src/layouts/flux/page/index.tsx
|
|
14
|
+
const PageContext = createContext(null);
|
|
15
|
+
function useDocsPage() {
|
|
16
|
+
const context = use(PageContext);
|
|
17
|
+
if (!context) throw new Error("Please use page components under <DocsPage /> (`@hanzo/docs-ui/layouts/flux/page`).");
|
|
18
|
+
return context;
|
|
19
|
+
}
|
|
20
|
+
function DocsPage({ tableOfContent: { enabled: tocEnabled, single, ...tocProps } = {}, breadcrumb: { enabled: breadcrumbEnabled = true, ...breadcrumb } = {}, footer: { enabled: footerEnabled = true, ...footer } = {}, full = false, toc = [], slots: defaultSlots = {}, children, ...containerProps }) {
|
|
21
|
+
tocEnabled ??= Boolean(toc.length > 0 || tocProps.header || tocProps.footer);
|
|
22
|
+
const slots = {
|
|
23
|
+
breadcrumb: defaultSlots.breadcrumb ?? Breadcrumb,
|
|
24
|
+
footer: defaultSlots.footer ?? Footer,
|
|
25
|
+
container: defaultSlots.container ?? Container,
|
|
26
|
+
toc: defaultSlots.toc ?? {
|
|
27
|
+
provider: TOCProvider,
|
|
28
|
+
main: TOC
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
return /* @__PURE__ */ jsx(PageContext, {
|
|
32
|
+
value: {
|
|
33
|
+
props: { full },
|
|
34
|
+
slots
|
|
35
|
+
},
|
|
36
|
+
children: /* @__PURE__ */ jsxs(slots.toc.provider, {
|
|
37
|
+
single,
|
|
38
|
+
toc: tocEnabled ? toc : [],
|
|
39
|
+
children: [tocEnabled && (tocProps.component ?? /* @__PURE__ */ jsx(slots.toc.main, { ...tocProps })), /* @__PURE__ */ jsxs(slots.container, {
|
|
40
|
+
...containerProps,
|
|
41
|
+
children: [
|
|
42
|
+
breadcrumbEnabled && (breadcrumb.component ?? /* @__PURE__ */ jsx(slots.breadcrumb, { ...breadcrumb })),
|
|
43
|
+
children,
|
|
44
|
+
footerEnabled && (footer.component ?? /* @__PURE__ */ jsx(slots.footer, { ...footer }))
|
|
45
|
+
]
|
|
46
|
+
})]
|
|
47
|
+
})
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
function EditOnGitHub(props) {
|
|
51
|
+
return /* @__PURE__ */ jsx("a", {
|
|
52
|
+
target: "_blank",
|
|
53
|
+
rel: "noreferrer noopener",
|
|
54
|
+
...props,
|
|
55
|
+
className: cn(buttonVariants({
|
|
56
|
+
color: "secondary",
|
|
57
|
+
size: "sm"
|
|
58
|
+
}), "gap-1.5 not-prose", props.className),
|
|
59
|
+
children: props.children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Edit, { className: "size-3.5" }), /* @__PURE__ */ jsx(I18nLabel, { label: "editOnGithub" })] })
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Add typography styles
|
|
64
|
+
*/
|
|
65
|
+
function DocsBody({ children, className, ...props }) {
|
|
66
|
+
return /* @__PURE__ */ jsx("div", {
|
|
67
|
+
...props,
|
|
68
|
+
className: cn("prose flex-1", className),
|
|
69
|
+
children
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function DocsDescription({ children, className, ...props }) {
|
|
73
|
+
if (children === void 0) return null;
|
|
74
|
+
return /* @__PURE__ */ jsx("p", {
|
|
75
|
+
...props,
|
|
76
|
+
className: cn("mb-8 text-lg text-fd-muted-foreground", className),
|
|
77
|
+
children
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
function DocsTitle({ children, className, ...props }) {
|
|
81
|
+
return /* @__PURE__ */ jsx("h1", {
|
|
82
|
+
...props,
|
|
83
|
+
className: cn("text-[1.75em] font-semibold", className),
|
|
84
|
+
children
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function PageLastUpdate({ date: value, ...props }) {
|
|
88
|
+
const { text } = useI18n();
|
|
89
|
+
const [date, setDate] = useState("");
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
setDate(value.toLocaleDateString());
|
|
92
|
+
}, [value]);
|
|
93
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
94
|
+
...props,
|
|
95
|
+
className: cn("text-sm text-fd-muted-foreground", props.className),
|
|
96
|
+
children: [
|
|
97
|
+
text.lastUpdate,
|
|
98
|
+
" ",
|
|
99
|
+
date
|
|
100
|
+
]
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { DocsBody, DocsDescription, DocsPage, DocsTitle, EditOnGitHub, MarkdownCopyButton, Breadcrumb as PageBreadcrumb, Footer as PageFooter, PageLastUpdate, ViewOptionsPopover, useDocsPage };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import { BreadcrumbOptions } from "@hanzo/docs-core/breadcrumb";
|
|
4
|
+
|
|
5
|
+
//#region src/layouts/flux/page/slots/breadcrumb.d.ts
|
|
6
|
+
type BreadcrumbProps = BreadcrumbOptions & ComponentProps<'div'>;
|
|
7
|
+
declare function Breadcrumb({
|
|
8
|
+
includeRoot,
|
|
9
|
+
includeSeparator,
|
|
10
|
+
includePage,
|
|
11
|
+
...props
|
|
12
|
+
}: BreadcrumbProps): react_jsx_runtime0.JSX.Element | null;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Breadcrumb, BreadcrumbProps };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../../../utils/cn.js";
|
|
3
|
+
import { useTreeContext, useTreePath } from "../../../../contexts/tree.js";
|
|
4
|
+
import { Fragment, useMemo } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import Link from "@hanzo/docs-core/link";
|
|
7
|
+
import { ChevronRight } from "lucide-react";
|
|
8
|
+
import { getBreadcrumbItemsFromPath } from "@hanzo/docs-core/breadcrumb";
|
|
9
|
+
//#region src/layouts/flux/page/slots/breadcrumb.tsx
|
|
10
|
+
function Breadcrumb({ includeRoot, includeSeparator, includePage, ...props }) {
|
|
11
|
+
const path = useTreePath();
|
|
12
|
+
const { root } = useTreeContext();
|
|
13
|
+
const items = useMemo(() => {
|
|
14
|
+
return getBreadcrumbItemsFromPath(root, path, {
|
|
15
|
+
includePage,
|
|
16
|
+
includeSeparator,
|
|
17
|
+
includeRoot
|
|
18
|
+
});
|
|
19
|
+
}, [
|
|
20
|
+
includePage,
|
|
21
|
+
includeRoot,
|
|
22
|
+
includeSeparator,
|
|
23
|
+
path,
|
|
24
|
+
root
|
|
25
|
+
]);
|
|
26
|
+
if (items.length === 0) return null;
|
|
27
|
+
return /* @__PURE__ */ jsx("div", {
|
|
28
|
+
...props,
|
|
29
|
+
className: cn("flex items-center gap-1.5 text-sm text-fd-muted-foreground", props.className),
|
|
30
|
+
children: items.map((item, i) => {
|
|
31
|
+
const className = cn("truncate", i === items.length - 1 && "text-fd-primary font-medium");
|
|
32
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [i !== 0 && /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5 shrink-0" }), item.url ? /* @__PURE__ */ jsx(Link, {
|
|
33
|
+
href: item.url,
|
|
34
|
+
className: cn(className, "transition-opacity hover:opacity-80"),
|
|
35
|
+
children: item.name
|
|
36
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
37
|
+
className,
|
|
38
|
+
children: item.name
|
|
39
|
+
})] }, i);
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { Breadcrumb };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/layouts/flux/page/slots/container.d.ts
|
|
5
|
+
declare function Container(props: ComponentProps<'article'>): react_jsx_runtime0.JSX.Element;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { Container };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../../../utils/cn.js";
|
|
3
|
+
import { useDocsPage } from "../index.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/layouts/flux/page/slots/container.tsx
|
|
6
|
+
function Container(props) {
|
|
7
|
+
const { props: { full } } = useDocsPage();
|
|
8
|
+
return /* @__PURE__ */ jsx("article", {
|
|
9
|
+
id: "nd-page",
|
|
10
|
+
"data-full": full,
|
|
11
|
+
...props,
|
|
12
|
+
className: cn("flex flex-col w-full max-w-[900px] mx-auto [grid-area:main] px-4 py-6 gap-4 md:px-6 md:pt-8 xl:px-8 xl:pt-14", full ? "max-w-[1200px]" : "xl:layout:[--fd-toc-width:268px]", props.className),
|
|
13
|
+
children: props.children
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Container };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import * as PageTree from "@hanzo/docs-core/page-tree";
|
|
4
|
+
|
|
5
|
+
//#region src/layouts/flux/page/slots/footer.d.ts
|
|
6
|
+
type Item = Pick<PageTree.Item, 'name' | 'description' | 'url'>;
|
|
7
|
+
interface FooterProps extends ComponentProps<'div'> {
|
|
8
|
+
/**
|
|
9
|
+
* Items including information for the next and previous page
|
|
10
|
+
*/
|
|
11
|
+
items?: {
|
|
12
|
+
previous?: Item;
|
|
13
|
+
next?: Item;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
declare function Footer({
|
|
17
|
+
items,
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
...props
|
|
21
|
+
}: FooterProps): react_jsx_runtime0.JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Footer, FooterProps };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useI18n } from "../../../../contexts/i18n.js";
|
|
3
|
+
import { cn } from "../../../../utils/cn.js";
|
|
4
|
+
import { isActive } from "../../../../utils/urls.js";
|
|
5
|
+
import { useFooterItems } from "../../../../utils/use-footer-items.js";
|
|
6
|
+
import { useMemo } from "react";
|
|
7
|
+
import { usePathname } from "@hanzo/docs-core/framework";
|
|
8
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import Link from "@hanzo/docs-core/link";
|
|
10
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
11
|
+
//#region src/layouts/flux/page/slots/footer.tsx
|
|
12
|
+
function Footer({ items, children, className, ...props }) {
|
|
13
|
+
const footerList = useFooterItems();
|
|
14
|
+
const pathname = usePathname();
|
|
15
|
+
const { previous, next } = useMemo(() => {
|
|
16
|
+
if (items) return items;
|
|
17
|
+
const idx = footerList.findIndex((item) => isActive(item.url, pathname));
|
|
18
|
+
if (idx === -1) return {};
|
|
19
|
+
return {
|
|
20
|
+
previous: footerList[idx - 1],
|
|
21
|
+
next: footerList[idx + 1]
|
|
22
|
+
};
|
|
23
|
+
}, [
|
|
24
|
+
footerList,
|
|
25
|
+
items,
|
|
26
|
+
pathname
|
|
27
|
+
]);
|
|
28
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
|
|
29
|
+
className: cn("@container grid gap-4", previous && next ? "grid-cols-2" : "grid-cols-1", className),
|
|
30
|
+
...props,
|
|
31
|
+
children: [previous && /* @__PURE__ */ jsx(FooterItem, {
|
|
32
|
+
item: previous,
|
|
33
|
+
index: 0
|
|
34
|
+
}), next && /* @__PURE__ */ jsx(FooterItem, {
|
|
35
|
+
item: next,
|
|
36
|
+
index: 1
|
|
37
|
+
})]
|
|
38
|
+
}), children] });
|
|
39
|
+
}
|
|
40
|
+
function FooterItem({ item, index }) {
|
|
41
|
+
const { text } = useI18n();
|
|
42
|
+
const Icon = index === 0 ? ChevronLeft : ChevronRight;
|
|
43
|
+
return /* @__PURE__ */ jsxs(Link, {
|
|
44
|
+
href: item.url,
|
|
45
|
+
className: cn("flex flex-col gap-2 rounded-lg border p-4 text-sm transition-colors hover:bg-fd-accent/80 hover:text-fd-accent-foreground @max-lg:col-span-full", index === 1 && "text-end"),
|
|
46
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
47
|
+
className: cn("inline-flex items-center gap-1.5 font-medium", index === 1 && "flex-row-reverse"),
|
|
48
|
+
children: [/* @__PURE__ */ jsx(Icon, { className: "-mx-1 size-4 shrink-0 rtl:rotate-180" }), /* @__PURE__ */ jsx("p", { children: item.name })]
|
|
49
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
50
|
+
className: "text-fd-muted-foreground truncate",
|
|
51
|
+
children: item.description ?? (index === 0 ? text.previousPage : text.nextPage)
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
export { Footer };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { TOCProvider as TOCProvider$1, TOCProviderProps as TOCProviderProps$1 } from "../../../../components/toc/index.js";
|
|
2
|
+
import { ComponentProps, ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/layouts/flux/page/slots/toc.d.ts
|
|
6
|
+
type TOCProviderProps = TOCProviderProps$1;
|
|
7
|
+
declare const TOCProvider: typeof TOCProvider$1;
|
|
8
|
+
interface TOCProps {
|
|
9
|
+
container?: ComponentProps<'div'>;
|
|
10
|
+
trigger?: ComponentProps<'button'>;
|
|
11
|
+
content?: ComponentProps<'div'>;
|
|
12
|
+
/**
|
|
13
|
+
* Custom content in TOC container, before the main TOC
|
|
14
|
+
*/
|
|
15
|
+
header?: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Custom content in TOC container, after the main TOC
|
|
18
|
+
*/
|
|
19
|
+
footer?: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* @defaultValue 'normal'
|
|
22
|
+
*/
|
|
23
|
+
style?: 'normal' | 'clerk';
|
|
24
|
+
}
|
|
25
|
+
declare function TOC({
|
|
26
|
+
container,
|
|
27
|
+
trigger,
|
|
28
|
+
content,
|
|
29
|
+
header,
|
|
30
|
+
footer,
|
|
31
|
+
style
|
|
32
|
+
}: TOCProps): react_jsx_runtime0.JSX.Element;
|
|
33
|
+
//#endregion
|
|
34
|
+
export { TOC, TOCProps, TOCProvider, TOCProviderProps };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useI18n } from "../../../../contexts/i18n.js";
|
|
3
|
+
import { cn } from "../../../../utils/cn.js";
|
|
4
|
+
import { TOCScrollArea, toc_exports, useItems, useTOCItems } from "../../../../components/toc/index.js";
|
|
5
|
+
import { default_exports } from "../../../../components/toc/default.js";
|
|
6
|
+
import { clerk_exports } from "../../../../components/toc/clerk.js";
|
|
7
|
+
import { useTreePath } from "../../../../contexts/tree.js";
|
|
8
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../../components/ui/collapsible.js";
|
|
9
|
+
import { createContext, use, useEffect, useEffectEvent, useMemo, useRef, useState } from "react";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { ChevronDown } from "lucide-react";
|
|
12
|
+
import { createPortal } from "react-dom";
|
|
13
|
+
import { AnimatePresence, motion } from "motion/react";
|
|
14
|
+
//#region src/layouts/flux/page/slots/toc.tsx
|
|
15
|
+
const TocPopoverContext = createContext(null);
|
|
16
|
+
const { TOCProvider } = toc_exports;
|
|
17
|
+
function TOC({ container, trigger, content, header, footer, style = "normal" }) {
|
|
18
|
+
const items = useTOCItems();
|
|
19
|
+
const { TOCItems, TOCEmpty, TOCItem } = style === "clerk" ? clerk_exports : default_exports;
|
|
20
|
+
return /* @__PURE__ */ jsxs(PageTOCPopover, {
|
|
21
|
+
...container,
|
|
22
|
+
children: [/* @__PURE__ */ jsxs(PageTOCPopoverContent, {
|
|
23
|
+
...content,
|
|
24
|
+
children: [
|
|
25
|
+
header,
|
|
26
|
+
/* @__PURE__ */ jsx(TOCScrollArea, { children: /* @__PURE__ */ jsxs(TOCItems, { children: [items.length === 0 && /* @__PURE__ */ jsx(TOCEmpty, {}), items.map((item) => /* @__PURE__ */ jsx(TOCItem, { item }, item.url))] }) }),
|
|
27
|
+
footer
|
|
28
|
+
]
|
|
29
|
+
}), /* @__PURE__ */ jsx(PageTOCPopoverTrigger, { ...trigger })]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function PageTOCPopover(props) {
|
|
33
|
+
const [container, setContainer] = useState(null);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
const element = document.getElementById("flux-layout-slot");
|
|
36
|
+
if (!element) return;
|
|
37
|
+
setContainer(element);
|
|
38
|
+
}, []);
|
|
39
|
+
if (!container) return;
|
|
40
|
+
return createPortal(/* @__PURE__ */ jsx(PageTOCPopoverPhysical, { ...props }), container);
|
|
41
|
+
}
|
|
42
|
+
function PageTOCPopoverPhysical({ className, children, ...rest }) {
|
|
43
|
+
const ref = useRef(null);
|
|
44
|
+
const [open, setOpen] = useState(false);
|
|
45
|
+
const onClick = useEffectEvent((e) => {
|
|
46
|
+
if (!open) return;
|
|
47
|
+
if (ref.current && !ref.current.contains(e.target)) setOpen(false);
|
|
48
|
+
});
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
window.addEventListener("click", onClick);
|
|
51
|
+
return () => {
|
|
52
|
+
window.removeEventListener("click", onClick);
|
|
53
|
+
};
|
|
54
|
+
}, []);
|
|
55
|
+
return /* @__PURE__ */ jsx(TocPopoverContext, {
|
|
56
|
+
value: useMemo(() => ({
|
|
57
|
+
open,
|
|
58
|
+
setOpen
|
|
59
|
+
}), [setOpen, open]),
|
|
60
|
+
children: /* @__PURE__ */ jsx(Collapsible, {
|
|
61
|
+
open,
|
|
62
|
+
onOpenChange: setOpen,
|
|
63
|
+
"data-toc-popover": "",
|
|
64
|
+
className: cn("relative h-9 animate-fd-fade-in", className),
|
|
65
|
+
...rest,
|
|
66
|
+
children: /* @__PURE__ */ jsx("header", {
|
|
67
|
+
ref,
|
|
68
|
+
className: cn("absolute w-full bottom-0 border rounded-xl transition-colors bg-fd-secondary text-fd-secondary-foreground backdrop-blur-sm", open && "shadow-lg bg-fd-popover/80 text-fd-popover-foreground"),
|
|
69
|
+
children
|
|
70
|
+
})
|
|
71
|
+
})
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function PageTOCPopoverTrigger({ className, ...props }) {
|
|
75
|
+
const { text } = useI18n();
|
|
76
|
+
const { open } = use(TocPopoverContext);
|
|
77
|
+
const items = useItems();
|
|
78
|
+
const selectedIdx = items.findIndex((item) => item.active);
|
|
79
|
+
const path = useTreePath().at(-1);
|
|
80
|
+
const spanProps = {
|
|
81
|
+
transition: { duration: .1 },
|
|
82
|
+
initial: {
|
|
83
|
+
opacity: 0,
|
|
84
|
+
y: 10
|
|
85
|
+
},
|
|
86
|
+
animate: {
|
|
87
|
+
opacity: 1,
|
|
88
|
+
y: 0
|
|
89
|
+
},
|
|
90
|
+
exit: {
|
|
91
|
+
opacity: 0,
|
|
92
|
+
y: -10
|
|
93
|
+
},
|
|
94
|
+
className: cn(open && "text-fd-popover-foreground")
|
|
95
|
+
};
|
|
96
|
+
return /* @__PURE__ */ jsxs(CollapsibleTrigger, {
|
|
97
|
+
className: cn("flex w-full h-8.5 items-center text-sm text-fd-muted-foreground gap-2.5 px-2 text-start focus-visible:outline-none [&_svg]:size-4", className),
|
|
98
|
+
"data-toc-popover-trigger": "",
|
|
99
|
+
...props,
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ jsx(ProgressCircle, {
|
|
102
|
+
value: (selectedIdx + 1) / Math.max(1, items.length),
|
|
103
|
+
max: 1,
|
|
104
|
+
className: cn("shrink-0", open && "text-fd-primary")
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsx(AnimatePresence, {
|
|
107
|
+
mode: "wait",
|
|
108
|
+
children: items[selectedIdx] && !open ? /* @__PURE__ */ jsx(motion.span, {
|
|
109
|
+
...spanProps,
|
|
110
|
+
children: items[selectedIdx].original.title
|
|
111
|
+
}, selectedIdx) : path ? /* @__PURE__ */ jsx(motion.span, {
|
|
112
|
+
...spanProps,
|
|
113
|
+
children: path.name
|
|
114
|
+
}, path.$id ?? ":pathId") : /* @__PURE__ */ jsx(motion.span, {
|
|
115
|
+
...spanProps,
|
|
116
|
+
children: text.toc
|
|
117
|
+
}, ":toc")
|
|
118
|
+
}),
|
|
119
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: cn("ms-auto shrink-0 transition-transform", open && "rotate-180") })
|
|
120
|
+
]
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function clamp(input, min, max) {
|
|
124
|
+
if (input < min) return min;
|
|
125
|
+
if (input > max) return max;
|
|
126
|
+
return input;
|
|
127
|
+
}
|
|
128
|
+
function ProgressCircle({ value, strokeWidth = 2, size = 24, min = 0, max = 100, ...restSvgProps }) {
|
|
129
|
+
const normalizedValue = clamp(value, min, max);
|
|
130
|
+
const radius = (size - strokeWidth) / 2;
|
|
131
|
+
const circumference = 2 * Math.PI * radius;
|
|
132
|
+
const progress = normalizedValue / max * circumference;
|
|
133
|
+
const circleProps = {
|
|
134
|
+
cx: size / 2,
|
|
135
|
+
cy: size / 2,
|
|
136
|
+
r: radius,
|
|
137
|
+
fill: "none",
|
|
138
|
+
strokeWidth
|
|
139
|
+
};
|
|
140
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
141
|
+
role: "progressbar",
|
|
142
|
+
viewBox: `0 0 ${size} ${size}`,
|
|
143
|
+
"aria-valuenow": normalizedValue,
|
|
144
|
+
"aria-valuemin": min,
|
|
145
|
+
"aria-valuemax": max,
|
|
146
|
+
...restSvgProps,
|
|
147
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
148
|
+
...circleProps,
|
|
149
|
+
className: "stroke-current/25"
|
|
150
|
+
}), /* @__PURE__ */ jsx("circle", {
|
|
151
|
+
...circleProps,
|
|
152
|
+
stroke: "currentColor",
|
|
153
|
+
strokeDasharray: circumference,
|
|
154
|
+
strokeDashoffset: circumference - progress,
|
|
155
|
+
strokeLinecap: "round",
|
|
156
|
+
transform: `rotate(-90 ${size / 2} ${size / 2})`,
|
|
157
|
+
className: "transition-all"
|
|
158
|
+
})]
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
function PageTOCPopoverContent(props) {
|
|
162
|
+
return /* @__PURE__ */ jsx(CollapsibleContent, {
|
|
163
|
+
"data-toc-popover-content": "",
|
|
164
|
+
...props,
|
|
165
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
166
|
+
className: "flex flex-col px-2 max-h-[50vh]",
|
|
167
|
+
children: props.children
|
|
168
|
+
})
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
//#endregion
|
|
172
|
+
export { TOC, TOCProvider };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/layouts/flux/slots/container.d.ts
|
|
5
|
+
declare function Container(props: ComponentProps<'div'>): 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/flux/slots/container.tsx
|
|
5
|
+
function Container(props) {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
id: "nd-flux-layout",
|
|
8
|
+
...props,
|
|
9
|
+
className: cn("flex flex-col items-center pb-24 overflow-x-clip", props.className)
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { Container };
|
|
@@ -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 };
|