@fumadocs/base-ui 16.9.3 → 16.10.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/css/generated/docs.css +1 -234
- package/css/generated/flux.css +1 -162
- package/css/generated/home.css +1 -65
- package/css/generated/notebook.css +1 -258
- package/css/generated/shared.css +1 -1189
- package/dist/.translations/index.d.ts +49 -0
- package/dist/.translations/keys.js +49 -0
- package/dist/components/accordion.d.ts +2 -3
- package/dist/components/accordion.js +3 -3
- package/dist/components/banner.d.ts +1 -2
- package/dist/components/banner.js +3 -3
- package/dist/components/callout.d.ts +4 -5
- package/dist/components/card.d.ts +2 -3
- package/dist/components/codeblock.d.ts +6 -7
- package/dist/components/codeblock.js +3 -3
- package/dist/components/codeblock.rsc.d.ts +1 -2
- package/dist/components/dialog/search-algolia.d.ts +1 -2
- package/dist/components/dialog/search-default.d.ts +1 -2
- package/dist/components/dialog/search-orama.d.ts +1 -2
- package/dist/components/dialog/search.d.ts +12 -13
- package/dist/components/dialog/search.js +13 -10
- package/dist/components/dynamic-codeblock.core.d.ts +1 -2
- package/dist/components/dynamic-codeblock.d.ts +1 -2
- package/dist/components/github-info.d.ts +1 -2
- package/dist/components/heading.d.ts +1 -2
- package/dist/components/heading.js +3 -3
- package/dist/components/image-zoom.d.ts +2 -3
- package/dist/components/image-zoom.js +1 -1
- package/dist/components/inline-toc.d.ts +1 -2
- package/dist/components/inline-toc.js +3 -3
- package/dist/components/sidebar/base.d.ts +13 -15
- package/dist/components/sidebar/base.js +3 -3
- package/dist/components/sidebar/link-item.d.ts +1 -2
- package/dist/components/sidebar/page-tree.d.ts +1 -2
- package/dist/components/sidebar/tabs/dropdown.d.ts +1 -2
- package/dist/components/steps.d.ts +2 -3
- package/dist/components/tabs.d.ts +5 -6
- package/dist/components/toc/clerk.d.ts +3 -4
- package/dist/components/toc/clerk.js +2 -2
- package/dist/components/toc/default.d.ts +3 -4
- package/dist/components/toc/default.js +2 -2
- package/dist/components/toc/index.d.ts +2 -3
- package/dist/components/type-table.d.ts +1 -2
- package/dist/components/type-table.js +9 -9
- package/dist/components/ui/accordion.d.ts +5 -6
- package/dist/components/ui/button.d.ts +1 -2
- package/dist/components/ui/collapsible.d.ts +3 -6
- package/dist/components/ui/navigation-menu.d.ts +6 -8
- package/dist/components/ui/popover.d.ts +2 -4
- package/dist/components/ui/scroll-area.d.ts +3 -4
- package/dist/components/ui/tabs.d.ts +4 -7
- package/dist/contexts/i18n.d.ts +5 -30
- package/dist/contexts/i18n.js +10 -22
- package/dist/contexts/search.d.ts +1 -2
- package/dist/contexts/tree.d.ts +1 -2
- package/dist/i18n.d.ts +9 -63
- package/dist/i18n.js +23 -70
- package/dist/layouts/docs/index.d.ts +1 -2
- package/dist/layouts/docs/page/index.d.ts +6 -7
- package/dist/layouts/docs/page/index.js +5 -4
- package/dist/layouts/docs/page/slots/breadcrumb.d.ts +1 -2
- package/dist/layouts/docs/page/slots/container.d.ts +1 -2
- package/dist/layouts/docs/page/slots/footer.d.ts +1 -2
- package/dist/layouts/docs/page/slots/footer.js +3 -3
- package/dist/layouts/docs/page/slots/toc.d.ts +3 -4
- package/dist/layouts/docs/page/slots/toc.js +5 -4
- package/dist/layouts/docs/slots/container.d.ts +1 -2
- package/dist/layouts/docs/slots/header.d.ts +1 -3
- package/dist/layouts/docs/slots/sidebar.d.ts +3 -4
- package/dist/layouts/flux/index.d.ts +3 -4
- package/dist/layouts/flux/page/index.d.ts +6 -7
- package/dist/layouts/flux/page/index.js +5 -4
- package/dist/layouts/flux/page/slots/breadcrumb.d.ts +1 -2
- package/dist/layouts/flux/page/slots/container.d.ts +1 -2
- package/dist/layouts/flux/page/slots/footer.d.ts +1 -2
- package/dist/layouts/flux/page/slots/footer.js +3 -3
- package/dist/layouts/flux/page/slots/toc.d.ts +1 -2
- package/dist/layouts/flux/page/slots/toc.js +3 -3
- package/dist/layouts/flux/slots/container.d.ts +1 -2
- package/dist/layouts/flux/slots/sidebar.d.ts +3 -4
- package/dist/layouts/flux/slots/tab-dropdown.d.ts +1 -2
- package/dist/layouts/home/index.d.ts +1 -2
- package/dist/layouts/home/navbar.d.ts +3 -4
- package/dist/layouts/home/not-found.d.ts +1 -3
- package/dist/layouts/home/not-found.js +6 -4
- package/dist/layouts/home/slots/container.d.ts +1 -2
- package/dist/layouts/home/slots/header.d.ts +2 -4
- package/dist/layouts/home/slots/header.js +3 -3
- package/dist/layouts/notebook/index.d.ts +1 -2
- package/dist/layouts/notebook/page/index.d.ts +6 -7
- package/dist/layouts/notebook/page/index.js +5 -4
- package/dist/layouts/notebook/page/slots/breadcrumb.d.ts +1 -2
- package/dist/layouts/notebook/page/slots/container.d.ts +1 -2
- package/dist/layouts/notebook/page/slots/footer.d.ts +1 -2
- package/dist/layouts/notebook/page/slots/footer.js +3 -3
- package/dist/layouts/notebook/page/slots/toc.d.ts +3 -4
- package/dist/layouts/notebook/page/slots/toc.js +5 -4
- package/dist/layouts/notebook/slots/container.d.ts +1 -2
- package/dist/layouts/notebook/slots/header.d.ts +1 -3
- package/dist/layouts/notebook/slots/sidebar.d.ts +5 -6
- package/dist/layouts/shared/client.d.ts +1 -2
- package/dist/layouts/shared/index.d.ts +1 -1
- package/dist/layouts/shared/page-actions.d.ts +2 -3
- package/dist/layouts/shared/page-actions.js +12 -13
- package/dist/layouts/shared/slots/language-select.d.ts +1 -2
- package/dist/layouts/shared/slots/language-select.js +5 -2
- package/dist/layouts/shared/slots/search-trigger.d.ts +2 -3
- package/dist/layouts/shared/slots/search-trigger.js +5 -5
- package/dist/layouts/shared/slots/theme-switch.d.ts +1 -2
- package/dist/layouts/shared/slots/theme-switch.js +43 -30
- package/dist/mdx.d.ts +9 -10
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/controlled.d.ts +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/controlled.js +6 -2
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/uncontrolled.d.ts +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/uncontrolled.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/adjust-svg-ids.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/compute-positioned-style.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/element-tests.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/get-div-img-style.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/get-img-alt.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/get-img-object-fit-style.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/get-img-regular-style.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/get-img-src.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/get-modal-img-transform.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/get-scale.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/get-style-ghost.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/get-style-modal-img.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/get-target-dimension.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/parse-position.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/utils/test-has-scalable-src.js +1 -1
- package/dist/og/takumi.d.ts +1 -2
- package/dist/og.d.ts +1 -2
- package/dist/page.d.ts +2 -3
- package/dist/provider/base.d.ts +1 -2
- package/dist/provider/next.d.ts +1 -2
- package/dist/provider/react-router.d.ts +1 -2
- package/dist/provider/tanstack.d.ts +1 -2
- package/dist/provider/waku.d.ts +1 -2
- package/dist/style.css +3 -0
- package/package.json +10 -9
- /package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6 → react-medium-image-zoom@5.4.6_react-dom@19.2.7_react@19.2.7__react@19.2.7}/node_modules/react-medium-image-zoom/dist/index.d.ts +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SidebarProviderProps as SidebarProviderProps$1, useSidebar as useSidebar$1 } from "../../../components/sidebar/base.js";
|
|
2
2
|
import { SidebarPageTreeComponents } from "../../../components/sidebar/page-tree.js";
|
|
3
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
3
|
import { ComponentProps, ReactNode } from "react";
|
|
5
4
|
|
|
6
5
|
//#region src/layouts/docs/slots/sidebar.d.ts
|
|
@@ -17,14 +16,14 @@ interface SidebarProps extends ComponentProps<'aside'> {
|
|
|
17
16
|
}
|
|
18
17
|
type SidebarProviderProps = SidebarProviderProps$1;
|
|
19
18
|
declare const useSidebar: typeof useSidebar$1;
|
|
20
|
-
declare function SidebarProvider(props: SidebarProviderProps):
|
|
19
|
+
declare function SidebarProvider(props: SidebarProviderProps): import("react").JSX.Element;
|
|
21
20
|
declare function Sidebar({
|
|
22
21
|
footer,
|
|
23
22
|
banner,
|
|
24
23
|
collapsible,
|
|
25
24
|
components,
|
|
26
25
|
...rest
|
|
27
|
-
}: SidebarProps):
|
|
28
|
-
declare function SidebarTrigger(props: ComponentProps<'button'>):
|
|
26
|
+
}: SidebarProps): import("react").JSX.Element;
|
|
27
|
+
declare function SidebarTrigger(props: ComponentProps<'button'>): import("react").JSX.Element;
|
|
29
28
|
//#endregion
|
|
30
29
|
export { Sidebar, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarTrigger, useSidebar };
|
|
@@ -2,7 +2,6 @@ import { BaseSlots, BaseSlotsProps } from "../shared/client.js";
|
|
|
2
2
|
import { BaseLayoutProps, GetLayoutTabsOptions, LayoutTab, LinkItemType } from "../shared/index.js";
|
|
3
3
|
import { TabDropdownProps } from "./slots/tab-dropdown.js";
|
|
4
4
|
import { SidebarProps, SidebarProviderProps } from "./slots/sidebar.js";
|
|
5
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
5
|
import { ComponentProps, FC, ReactNode } from "react";
|
|
7
6
|
import * as PageTree from "fumadocs-core/page-tree";
|
|
8
7
|
import { motion } from "motion/react";
|
|
@@ -43,7 +42,7 @@ declare function useFluxLayout(): {
|
|
|
43
42
|
navItems: LinkItemType[];
|
|
44
43
|
slots: DocsSlots;
|
|
45
44
|
};
|
|
46
|
-
declare function DocsLayout(props: DocsLayoutProps):
|
|
45
|
+
declare function DocsLayout(props: DocsLayoutProps): import("react").JSX.Element;
|
|
47
46
|
interface NavigationPanelProps {
|
|
48
47
|
head: ReactNode;
|
|
49
48
|
tabDropdown: ReactNode;
|
|
@@ -62,13 +61,13 @@ declare function NavigationPanel({
|
|
|
62
61
|
* replace default children
|
|
63
62
|
*/
|
|
64
63
|
children?: (defaultChildren: ReactNode) => ReactNode;
|
|
65
|
-
}):
|
|
64
|
+
}): import("react").JSX.Element;
|
|
66
65
|
declare function NavigationPanelOverlay({
|
|
67
66
|
enabled,
|
|
68
67
|
className,
|
|
69
68
|
...props
|
|
70
69
|
}: ComponentProps<typeof motion.div> & {
|
|
71
70
|
enabled?: boolean;
|
|
72
|
-
}):
|
|
71
|
+
}): import("react").JSX.Element;
|
|
73
72
|
//#endregion
|
|
74
73
|
export { DocsLayout, DocsLayoutProps, DocsSlots, NavigationPanel, NavigationPanelOverlay, NavigationPanelProps, useFluxLayout };
|
|
@@ -2,7 +2,6 @@ import { MarkdownCopyButton, ViewOptionsPopover } from "../../shared/page-action
|
|
|
2
2
|
import { TOCProps, TOCProviderProps } from "./slots/toc.js";
|
|
3
3
|
import { Footer, FooterProps } from "./slots/footer.js";
|
|
4
4
|
import { Breadcrumb, BreadcrumbProps } from "./slots/breadcrumb.js";
|
|
5
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
5
|
import { ComponentProps, FC, ReactNode } from "react";
|
|
7
6
|
import { TOCItemType } from "fumadocs-core/toc";
|
|
8
7
|
|
|
@@ -73,8 +72,8 @@ declare function DocsPage({
|
|
|
73
72
|
slots: defaultSlots,
|
|
74
73
|
children,
|
|
75
74
|
...containerProps
|
|
76
|
-
}: DocsPageProps):
|
|
77
|
-
declare function EditOnGitHub(props: ComponentProps<'a'>):
|
|
75
|
+
}: DocsPageProps): import("react").JSX.Element;
|
|
76
|
+
declare function EditOnGitHub(props: ComponentProps<'a'>): import("react").JSX.Element;
|
|
78
77
|
/**
|
|
79
78
|
* Add typography styles
|
|
80
79
|
*/
|
|
@@ -82,22 +81,22 @@ declare function DocsBody({
|
|
|
82
81
|
children,
|
|
83
82
|
className,
|
|
84
83
|
...props
|
|
85
|
-
}: ComponentProps<'div'>):
|
|
84
|
+
}: ComponentProps<'div'>): import("react").JSX.Element;
|
|
86
85
|
declare function DocsDescription({
|
|
87
86
|
children,
|
|
88
87
|
className,
|
|
89
88
|
...props
|
|
90
|
-
}: ComponentProps<'p'>):
|
|
89
|
+
}: ComponentProps<'p'>): import("react").JSX.Element | null;
|
|
91
90
|
declare function DocsTitle({
|
|
92
91
|
children,
|
|
93
92
|
className,
|
|
94
93
|
...props
|
|
95
|
-
}: ComponentProps<'h1'>):
|
|
94
|
+
}: ComponentProps<'h1'>): import("react").JSX.Element;
|
|
96
95
|
declare function PageLastUpdate({
|
|
97
96
|
date: value,
|
|
98
97
|
...props
|
|
99
98
|
}: Omit<ComponentProps<'p'>, 'children'> & {
|
|
100
99
|
date: Date;
|
|
101
|
-
}):
|
|
100
|
+
}): import("react").JSX.Element;
|
|
102
101
|
//#endregion
|
|
103
102
|
export { type BreadcrumbProps, DocsBody, DocsDescription, DocsPage, DocsPageProps, DocsTitle, EditOnGitHub, type FooterProps, MarkdownCopyButton, Breadcrumb as PageBreadcrumb, Footer as PageFooter, PageLastUpdate, ViewOptionsPopover, useDocsPage };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../../utils/cn.js";
|
|
3
3
|
import { buttonVariants } from "../../../components/ui/button.js";
|
|
4
|
-
import { I18nLabel, useTranslations } from "../../../contexts/i18n.js";
|
|
5
4
|
import { MarkdownCopyButton, ViewOptionsPopover } from "../../shared/page-actions.js";
|
|
6
5
|
import { TOC, TOCProvider } from "./slots/toc.js";
|
|
7
6
|
import { Footer } from "./slots/footer.js";
|
|
@@ -10,6 +9,7 @@ import { Container } from "./slots/container.js";
|
|
|
10
9
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
10
|
import { Edit } from "lucide-react";
|
|
12
11
|
import { createContext, use, useEffect, useState } from "react";
|
|
12
|
+
import { useTranslations } from "@fuma-translate/react";
|
|
13
13
|
//#region src/layouts/flux/page/index.tsx
|
|
14
14
|
const PageContext = createContext(null);
|
|
15
15
|
function useDocsPage() {
|
|
@@ -47,6 +47,7 @@ function DocsPage({ full = false, tableOfContent: { enabled: tocEnabled = !full,
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
function EditOnGitHub(props) {
|
|
50
|
+
const t = useTranslations({ note: "edit page" });
|
|
50
51
|
return /* @__PURE__ */ jsx("a", {
|
|
51
52
|
target: "_blank",
|
|
52
53
|
rel: "noreferrer noopener",
|
|
@@ -55,7 +56,7 @@ function EditOnGitHub(props) {
|
|
|
55
56
|
color: "secondary",
|
|
56
57
|
size: "sm"
|
|
57
58
|
}), "gap-1.5 not-prose", props.className),
|
|
58
|
-
children: props.children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Edit, { className: "size-3.5" }),
|
|
59
|
+
children: props.children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Edit, { className: "size-3.5" }), t("Edit on GitHub")] })
|
|
59
60
|
});
|
|
60
61
|
}
|
|
61
62
|
/**
|
|
@@ -84,7 +85,7 @@ function DocsTitle({ children, className, ...props }) {
|
|
|
84
85
|
});
|
|
85
86
|
}
|
|
86
87
|
function PageLastUpdate({ date: value, ...props }) {
|
|
87
|
-
const t = useTranslations();
|
|
88
|
+
const t = useTranslations({ note: "page footer" });
|
|
88
89
|
const [date, setDate] = useState("");
|
|
89
90
|
useEffect(() => {
|
|
90
91
|
setDate(value.toLocaleDateString());
|
|
@@ -93,7 +94,7 @@ function PageLastUpdate({ date: value, ...props }) {
|
|
|
93
94
|
...props,
|
|
94
95
|
className: cn("text-sm text-fd-muted-foreground", props.className),
|
|
95
96
|
children: [
|
|
96
|
-
t
|
|
97
|
+
t("Last updated on"),
|
|
97
98
|
" ",
|
|
98
99
|
date
|
|
99
100
|
]
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { ComponentProps } from "react";
|
|
3
2
|
import { BreadcrumbOptions } from "fumadocs-core/breadcrumb";
|
|
4
3
|
|
|
@@ -9,6 +8,6 @@ declare function Breadcrumb({
|
|
|
9
8
|
includeSeparator,
|
|
10
9
|
includePage,
|
|
11
10
|
...props
|
|
12
|
-
}: BreadcrumbProps):
|
|
11
|
+
}: BreadcrumbProps): import("react").JSX.Element | null;
|
|
13
12
|
//#endregion
|
|
14
13
|
export { Breadcrumb, BreadcrumbProps };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { ComponentProps } from "react";
|
|
3
2
|
|
|
4
3
|
//#region src/layouts/flux/page/slots/container.d.ts
|
|
5
|
-
declare function Container(props: ComponentProps<'article'>):
|
|
4
|
+
declare function Container(props: ComponentProps<'article'>): import("react").JSX.Element;
|
|
6
5
|
//#endregion
|
|
7
6
|
export { Container };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { ComponentProps } from "react";
|
|
3
2
|
import * as PageTree from "fumadocs-core/page-tree";
|
|
4
3
|
|
|
@@ -18,6 +17,6 @@ declare function Footer({
|
|
|
18
17
|
children,
|
|
19
18
|
className,
|
|
20
19
|
...props
|
|
21
|
-
}: FooterProps):
|
|
20
|
+
}: FooterProps): import("react").JSX.Element;
|
|
22
21
|
//#endregion
|
|
23
22
|
export { Footer, FooterProps };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../../../utils/cn.js";
|
|
3
|
-
import { useI18n } from "../../../../contexts/i18n.js";
|
|
4
3
|
import { isActive } from "../../../../utils/urls.js";
|
|
5
4
|
import { useFooterItems } from "../../../../utils/use-footer-items.js";
|
|
6
5
|
import Link from "fumadocs-core/link";
|
|
@@ -8,6 +7,7 @@ import { usePathname } from "fumadocs-core/framework";
|
|
|
8
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
10
9
|
import { useMemo } from "react";
|
|
10
|
+
import { useTranslations } from "@fuma-translate/react";
|
|
11
11
|
//#region src/layouts/flux/page/slots/footer.tsx
|
|
12
12
|
function Footer({ items, children, className, ...props }) {
|
|
13
13
|
const footerList = useFooterItems();
|
|
@@ -38,7 +38,7 @@ function Footer({ items, children, className, ...props }) {
|
|
|
38
38
|
}), children] });
|
|
39
39
|
}
|
|
40
40
|
function FooterItem({ item, index }) {
|
|
41
|
-
const {
|
|
41
|
+
const t = useTranslations({ note: "pagination" });
|
|
42
42
|
const Icon = index === 0 ? ChevronLeft : ChevronRight;
|
|
43
43
|
return /* @__PURE__ */ jsxs(Link, {
|
|
44
44
|
href: item.url,
|
|
@@ -48,7 +48,7 @@ function FooterItem({ item, index }) {
|
|
|
48
48
|
children: [/* @__PURE__ */ jsx(Icon, { className: "-mx-1 size-4 shrink-0 rtl:rotate-180" }), /* @__PURE__ */ jsx("p", { children: item.name })]
|
|
49
49
|
}), /* @__PURE__ */ jsx("p", {
|
|
50
50
|
className: "text-fd-muted-foreground truncate",
|
|
51
|
-
children: item.description ?? (index === 0 ?
|
|
51
|
+
children: item.description ?? (index === 0 ? t("Previous Page") : t("Next Page"))
|
|
52
52
|
})]
|
|
53
53
|
});
|
|
54
54
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { TOCItemsProps } from "../../../../components/toc/clerk.js";
|
|
2
2
|
import { TOCItemsProps as TOCItemsProps$1 } from "../../../../components/toc/default.js";
|
|
3
3
|
import { TOCProvider as TOCProvider$1, TOCProviderProps as TOCProviderProps$1 } from "../../../../components/toc/index.js";
|
|
4
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
4
|
import { ComponentProps, ReactNode } from "react";
|
|
6
5
|
|
|
7
6
|
//#region src/layouts/flux/page/slots/toc.d.ts
|
|
@@ -34,6 +33,6 @@ declare function TOC({
|
|
|
34
33
|
footer,
|
|
35
34
|
style,
|
|
36
35
|
list
|
|
37
|
-
}: TOCProps):
|
|
36
|
+
}: TOCProps): import("react").JSX.Element | undefined;
|
|
38
37
|
//#endregion
|
|
39
38
|
export { TOC, TOCProps, TOCProvider, TOCProviderProps };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../../../utils/cn.js";
|
|
3
|
-
import { useTranslations } from "../../../../contexts/i18n.js";
|
|
4
3
|
import { TOCScrollArea, toc_exports, useItems, useTOCItems } from "../../../../components/toc/index.js";
|
|
5
4
|
import { default_exports } from "../../../../components/toc/default.js";
|
|
6
5
|
import { clerk_exports } from "../../../../components/toc/clerk.js";
|
|
@@ -9,6 +8,7 @@ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../..
|
|
|
9
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
9
|
import { ChevronDown } from "lucide-react";
|
|
11
10
|
import { createContext, use, useEffect, useEffectEvent, useMemo, useRef, useState } from "react";
|
|
11
|
+
import { useTranslations } from "@fuma-translate/react";
|
|
12
12
|
import { createPortal } from "react-dom";
|
|
13
13
|
import { AnimatePresence, motion } from "motion/react";
|
|
14
14
|
//#region src/layouts/flux/page/slots/toc.tsx
|
|
@@ -76,7 +76,7 @@ function PageTOCPopoverPhysical({ className, children, ...rest }) {
|
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
function PageTOCPopoverTrigger({ className, ...props }) {
|
|
79
|
-
const t = useTranslations();
|
|
79
|
+
const t = useTranslations({ note: "table of contents" });
|
|
80
80
|
const { open } = use(TocPopoverContext);
|
|
81
81
|
const items = useItems();
|
|
82
82
|
const selectedIdx = items.findIndex((item) => item.active);
|
|
@@ -117,7 +117,7 @@ function PageTOCPopoverTrigger({ className, ...props }) {
|
|
|
117
117
|
children: path.name
|
|
118
118
|
}, path.$id ?? ":pathId") : /* @__PURE__ */ jsx(motion.span, {
|
|
119
119
|
...spanProps,
|
|
120
|
-
children: t
|
|
120
|
+
children: t("On this page")
|
|
121
121
|
}, ":toc")
|
|
122
122
|
}),
|
|
123
123
|
/* @__PURE__ */ jsx(ChevronDown, { className: cn("ms-auto shrink-0 transition-transform", open && "rotate-180") })
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { ComponentProps } from "react";
|
|
3
2
|
|
|
4
3
|
//#region src/layouts/flux/slots/container.d.ts
|
|
5
|
-
declare function Container(props: ComponentProps<'div'>):
|
|
4
|
+
declare function Container(props: ComponentProps<'div'>): import("react").JSX.Element;
|
|
6
5
|
//#endregion
|
|
7
6
|
export { Container };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SidebarProviderProps as SidebarProviderProps$1, useSidebar as useSidebar$1 } from "../../../components/sidebar/base.js";
|
|
2
2
|
import { SidebarPageTreeComponents } from "../../../components/sidebar/page-tree.js";
|
|
3
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
3
|
import { ComponentProps, ReactNode } from "react";
|
|
5
4
|
|
|
6
5
|
//#region src/layouts/flux/slots/sidebar.d.ts
|
|
@@ -11,13 +10,13 @@ interface SidebarProps extends ComponentProps<'aside'> {
|
|
|
11
10
|
}
|
|
12
11
|
type SidebarProviderProps = SidebarProviderProps$1;
|
|
13
12
|
declare const useSidebar: typeof useSidebar$1;
|
|
14
|
-
declare function SidebarProvider(props: SidebarProviderProps):
|
|
13
|
+
declare function SidebarProvider(props: SidebarProviderProps): import("react").JSX.Element;
|
|
15
14
|
declare function Sidebar({
|
|
16
15
|
footer,
|
|
17
16
|
banner,
|
|
18
17
|
components,
|
|
19
18
|
...rest
|
|
20
|
-
}: SidebarProps):
|
|
21
|
-
declare function SidebarTrigger(props: ComponentProps<'button'>):
|
|
19
|
+
}: SidebarProps): import("react").JSX.Element;
|
|
20
|
+
declare function SidebarTrigger(props: ComponentProps<'button'>): import("react").JSX.Element;
|
|
22
21
|
//#endregion
|
|
23
22
|
export { Sidebar, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarTrigger, useSidebar };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LayoutTab } from "../../shared/index.js";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { ComponentProps, ReactNode } from "react";
|
|
4
3
|
|
|
5
4
|
//#region src/layouts/flux/slots/tab-dropdown.d.ts
|
|
@@ -12,6 +11,6 @@ declare function TabDropdown({
|
|
|
12
11
|
placeholder,
|
|
13
12
|
className,
|
|
14
13
|
...props
|
|
15
|
-
}: TabDropdownProps):
|
|
14
|
+
}: TabDropdownProps): import("react").JSX.Element;
|
|
16
15
|
//#endregion
|
|
17
16
|
export { TabDropdown, TabDropdownProps };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { BaseSlots, BaseSlotsProps } from "../shared/client.js";
|
|
2
2
|
import { BaseLayoutProps, LinkItemType, NavOptions } from "../shared/index.js";
|
|
3
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
3
|
import { ComponentProps, FC } from "react";
|
|
5
4
|
|
|
6
5
|
//#region src/layouts/home/index.d.ts
|
|
@@ -24,6 +23,6 @@ declare function useHomeLayout(): {
|
|
|
24
23
|
menuItems: LinkItemType[];
|
|
25
24
|
slots: HomeSlots;
|
|
26
25
|
};
|
|
27
|
-
declare function HomeLayout(props: HomeLayoutProps):
|
|
26
|
+
declare function HomeLayout(props: HomeLayoutProps): import("react").JSX.Element;
|
|
28
27
|
//#endregion
|
|
29
28
|
export { HomeLayout, HomeLayoutProps, HomeSlots, useHomeLayout };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { NavigationMenuContentProps, NavigationMenuItem, NavigationMenuTriggerProps } from "../../components/ui/navigation-menu.js";
|
|
2
2
|
import { LinkProps } from "fumadocs-core/link";
|
|
3
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
3
|
|
|
5
4
|
//#region src/layouts/home/navbar.d.ts
|
|
6
5
|
declare const NavbarMenu: typeof NavigationMenuItem;
|
|
7
|
-
declare function NavbarMenuContent(props: NavigationMenuContentProps):
|
|
8
|
-
declare function NavbarMenuTrigger(props: NavigationMenuTriggerProps):
|
|
9
|
-
declare function NavbarMenuLink(props: LinkProps):
|
|
6
|
+
declare function NavbarMenuContent(props: NavigationMenuContentProps): import("react").JSX.Element;
|
|
7
|
+
declare function NavbarMenuTrigger(props: NavigationMenuTriggerProps): import("react").JSX.Element;
|
|
8
|
+
declare function NavbarMenuLink(props: LinkProps): import("react").JSX.Element;
|
|
10
9
|
//#endregion
|
|
11
10
|
export { NavbarMenu, NavbarMenuContent, NavbarMenuLink, NavbarMenuTrigger };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
1
|
//#region src/layouts/home/not-found.d.ts
|
|
4
2
|
/**
|
|
5
3
|
* the default not found page content, please make your own if you want to customize it.
|
|
6
4
|
*/
|
|
7
|
-
declare function DefaultNotFound():
|
|
5
|
+
declare function DefaultNotFound(): import("react").JSX.Element;
|
|
8
6
|
//#endregion
|
|
9
7
|
export { DefaultNotFound };
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn } from "../../utils/cn.js";
|
|
2
3
|
import { buttonVariants } from "../../components/ui/button.js";
|
|
3
|
-
import { I18nLabel } from "../../contexts/i18n.js";
|
|
4
4
|
import Link from "fumadocs-core/link";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { HomeIcon } from "lucide-react";
|
|
7
|
+
import { useTranslations } from "@fuma-translate/react";
|
|
7
8
|
//#region src/layouts/home/not-found.tsx
|
|
8
9
|
/**
|
|
9
10
|
* the default not found page content, please make your own if you want to customize it.
|
|
10
11
|
*/
|
|
11
12
|
function DefaultNotFound() {
|
|
13
|
+
const t = useTranslations({ note: "404 not found page" });
|
|
12
14
|
return /* @__PURE__ */ jsxs("div", {
|
|
13
15
|
className: "flex flex-col px-8 justify-center flex-1 text-center items-center gap-4",
|
|
14
16
|
children: [
|
|
@@ -18,11 +20,11 @@ function DefaultNotFound() {
|
|
|
18
20
|
}),
|
|
19
21
|
/* @__PURE__ */ jsx("h2", {
|
|
20
22
|
className: "text-2xl font-semibold",
|
|
21
|
-
children:
|
|
23
|
+
children: t("Page Not Found")
|
|
22
24
|
}),
|
|
23
25
|
/* @__PURE__ */ jsx("p", {
|
|
24
26
|
className: "text-fd-muted-foreground max-w-md",
|
|
25
|
-
children:
|
|
27
|
+
children: t("The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.")
|
|
26
28
|
}),
|
|
27
29
|
/* @__PURE__ */ jsxs(Link, {
|
|
28
30
|
href: "/",
|
|
@@ -30,7 +32,7 @@ function DefaultNotFound() {
|
|
|
30
32
|
className: "mt-4 gap-1.5",
|
|
31
33
|
variant: "primary"
|
|
32
34
|
})),
|
|
33
|
-
children: [/* @__PURE__ */ jsx(HomeIcon, { className: "size-4" }),
|
|
35
|
+
children: [/* @__PURE__ */ jsx(HomeIcon, { className: "size-4" }), t("Back to Home")]
|
|
34
36
|
})
|
|
35
37
|
]
|
|
36
38
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { ComponentProps } from "react";
|
|
3
2
|
|
|
4
3
|
//#region src/layouts/home/slots/container.d.ts
|
|
5
|
-
declare function Container(props: ComponentProps<'main'>):
|
|
4
|
+
declare function Container(props: ComponentProps<'main'>): import("react").JSX.Element;
|
|
6
5
|
//#endregion
|
|
7
6
|
export { Container };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { ComponentProps } from "react";
|
|
3
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
4
2
|
|
|
5
3
|
//#region src/layouts/home/slots/header.d.ts
|
|
6
4
|
declare const navItemVariants: (props?: ({
|
|
7
5
|
variant?: "icon" | "main" | "button" | null | undefined;
|
|
8
|
-
} &
|
|
9
|
-
declare function Header(props: ComponentProps<'header'>):
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Header(props: ComponentProps<'header'>): import("react").JSX.Element;
|
|
10
8
|
//#endregion
|
|
11
9
|
export { Header, navItemVariants };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../../utils/cn.js";
|
|
3
3
|
import { buttonVariants } from "../../../components/ui/button.js";
|
|
4
|
-
import { useTranslations } from "../../../contexts/i18n.js";
|
|
5
4
|
import { mergeRefs } from "../../../utils/merge-refs.js";
|
|
6
5
|
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "../../../components/ui/collapsible.js";
|
|
7
6
|
import { LinkItem } from "../../shared/client.js";
|
|
@@ -14,6 +13,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
14
13
|
import { ChevronDown, Languages } from "lucide-react";
|
|
15
14
|
import { cva } from "class-variance-authority";
|
|
16
15
|
import { Fragment as Fragment$1, useEffect, useEffectEvent, useRef, useState } from "react";
|
|
16
|
+
import { useTranslations } from "@fuma-translate/react";
|
|
17
17
|
//#region src/layouts/home/slots/header.tsx
|
|
18
18
|
const navItemVariants = cva("[&_svg]:size-4", {
|
|
19
19
|
variants: { variant: {
|
|
@@ -34,7 +34,7 @@ function Header(props) {
|
|
|
34
34
|
const headerRef = useRef(null);
|
|
35
35
|
const listRef = useRef(null);
|
|
36
36
|
const [open, setOpen] = useState(false);
|
|
37
|
-
const t = useTranslations();
|
|
37
|
+
const t = useTranslations({ note: "home layout header" });
|
|
38
38
|
const transparentMode = nav?.transparentMode ?? "none";
|
|
39
39
|
const isTop = useIsScrollTop({ enabled: transparentMode === "top" }) ?? true;
|
|
40
40
|
const isNavTransparent = transparentMode === "top" ? isTop : transparentMode === "always";
|
|
@@ -86,7 +86,7 @@ function Header(props) {
|
|
|
86
86
|
hideIfDisabled: true,
|
|
87
87
|
className: "p-2"
|
|
88
88
|
}), /* @__PURE__ */ jsx(CollapsibleTrigger, {
|
|
89
|
-
"aria-label": t
|
|
89
|
+
"aria-label": t("Toggle Menu", { note: "aria-label" }),
|
|
90
90
|
className: cn(buttonVariants({
|
|
91
91
|
size: "icon",
|
|
92
92
|
color: "ghost"
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BaseLayoutProps, GetLayoutTabsOptions, LayoutTab, NavOptions } from "../shared/index.js";
|
|
2
2
|
import { SidebarProps, SidebarProviderProps } from "./slots/sidebar.js";
|
|
3
3
|
import { DocsSlots, useNotebookLayout } from "./client.js";
|
|
4
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
4
|
import { HTMLAttributes } from "react";
|
|
6
5
|
import * as PageTree from "fumadocs-core/page-tree";
|
|
7
6
|
|
|
@@ -33,6 +32,6 @@ declare function DocsLayout({
|
|
|
33
32
|
children,
|
|
34
33
|
tabs,
|
|
35
34
|
...props
|
|
36
|
-
}: DocsLayoutProps):
|
|
35
|
+
}: DocsLayoutProps): import("react").JSX.Element;
|
|
37
36
|
//#endregion
|
|
38
37
|
export { DocsLayout, DocsLayoutProps, type DocsSlots, useNotebookLayout };
|
|
@@ -2,7 +2,6 @@ import { MarkdownCopyButton, ViewOptionsPopover } from "../../shared/page-action
|
|
|
2
2
|
import { TOCPopoverProps, TOCProps, TOCProviderProps } from "./slots/toc.js";
|
|
3
3
|
import { Footer, FooterProps } from "./slots/footer.js";
|
|
4
4
|
import { Breadcrumb, BreadcrumbProps } from "./slots/breadcrumb.js";
|
|
5
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
5
|
import { ComponentProps, FC, ReactNode } from "react";
|
|
7
6
|
import { TOCItemType } from "fumadocs-core/toc";
|
|
8
7
|
|
|
@@ -86,8 +85,8 @@ declare function DocsPage({
|
|
|
86
85
|
slots: defaultSlots,
|
|
87
86
|
children,
|
|
88
87
|
...containerProps
|
|
89
|
-
}: DocsPageProps):
|
|
90
|
-
declare function EditOnGitHub(props: ComponentProps<'a'>):
|
|
88
|
+
}: DocsPageProps): import("react").JSX.Element;
|
|
89
|
+
declare function EditOnGitHub(props: ComponentProps<'a'>): import("react").JSX.Element;
|
|
91
90
|
/**
|
|
92
91
|
* Add typography styles
|
|
93
92
|
*/
|
|
@@ -95,22 +94,22 @@ declare function DocsBody({
|
|
|
95
94
|
children,
|
|
96
95
|
className,
|
|
97
96
|
...props
|
|
98
|
-
}: ComponentProps<'div'>):
|
|
97
|
+
}: ComponentProps<'div'>): import("react").JSX.Element;
|
|
99
98
|
declare function DocsDescription({
|
|
100
99
|
children,
|
|
101
100
|
className,
|
|
102
101
|
...props
|
|
103
|
-
}: ComponentProps<'p'>):
|
|
102
|
+
}: ComponentProps<'p'>): import("react").JSX.Element | null;
|
|
104
103
|
declare function DocsTitle({
|
|
105
104
|
children,
|
|
106
105
|
className,
|
|
107
106
|
...props
|
|
108
|
-
}: ComponentProps<'h1'>):
|
|
107
|
+
}: ComponentProps<'h1'>): import("react").JSX.Element;
|
|
109
108
|
declare function PageLastUpdate({
|
|
110
109
|
date: value,
|
|
111
110
|
...props
|
|
112
111
|
}: Omit<ComponentProps<'p'>, 'children'> & {
|
|
113
112
|
date: Date;
|
|
114
|
-
}):
|
|
113
|
+
}): import("react").JSX.Element;
|
|
115
114
|
//#endregion
|
|
116
115
|
export { type BreadcrumbProps, DocsBody, DocsDescription, DocsPage, DocsPageProps, DocsTitle, EditOnGitHub, type FooterProps, MarkdownCopyButton, Breadcrumb as PageBreadcrumb, Footer as PageFooter, PageLastUpdate, ViewOptionsPopover, useDocsPage };
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { __exportAll } from "../../../_virtual/_rolldown/runtime.js";
|
|
3
3
|
import { cn } from "../../../utils/cn.js";
|
|
4
4
|
import { buttonVariants } from "../../../components/ui/button.js";
|
|
5
|
-
import { I18nLabel, useTranslations } from "../../../contexts/i18n.js";
|
|
6
5
|
import { MarkdownCopyButton, ViewOptionsPopover } from "../../shared/page-actions.js";
|
|
7
6
|
import { TOC, TOCPopover, TOCProvider } from "./slots/toc.js";
|
|
8
7
|
import { Footer } from "./slots/footer.js";
|
|
@@ -11,6 +10,7 @@ import { Container } from "./slots/container.js";
|
|
|
11
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
11
|
import { Edit } from "lucide-react";
|
|
13
12
|
import { createContext, use, useEffect, useState } from "react";
|
|
13
|
+
import { useTranslations } from "@fuma-translate/react";
|
|
14
14
|
//#region src/layouts/notebook/page/index.tsx
|
|
15
15
|
var page_exports = /* @__PURE__ */ __exportAll({
|
|
16
16
|
DocsBody: () => DocsBody,
|
|
@@ -67,6 +67,7 @@ function DocsPage({ full = false, tableOfContent: { enabled: tocEnabled = !full,
|
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
69
|
function EditOnGitHub(props) {
|
|
70
|
+
const t = useTranslations({ note: "edit page" });
|
|
70
71
|
return /* @__PURE__ */ jsx("a", {
|
|
71
72
|
target: "_blank",
|
|
72
73
|
rel: "noreferrer noopener",
|
|
@@ -75,7 +76,7 @@ function EditOnGitHub(props) {
|
|
|
75
76
|
color: "secondary",
|
|
76
77
|
size: "sm"
|
|
77
78
|
}), "gap-1.5 not-prose", props.className),
|
|
78
|
-
children: props.children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Edit, { className: "size-3.5" }),
|
|
79
|
+
children: props.children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Edit, { className: "size-3.5" }), t("Edit on GitHub")] })
|
|
79
80
|
});
|
|
80
81
|
}
|
|
81
82
|
/**
|
|
@@ -104,7 +105,7 @@ function DocsTitle({ children, className, ...props }) {
|
|
|
104
105
|
});
|
|
105
106
|
}
|
|
106
107
|
function PageLastUpdate({ date: value, ...props }) {
|
|
107
|
-
const t = useTranslations();
|
|
108
|
+
const t = useTranslations({ note: "page footer" });
|
|
108
109
|
const [date, setDate] = useState("");
|
|
109
110
|
useEffect(() => {
|
|
110
111
|
setDate(value.toLocaleDateString());
|
|
@@ -113,7 +114,7 @@ function PageLastUpdate({ date: value, ...props }) {
|
|
|
113
114
|
...props,
|
|
114
115
|
className: cn("text-sm text-fd-muted-foreground", props.className),
|
|
115
116
|
children: [
|
|
116
|
-
t
|
|
117
|
+
t("Last updated on"),
|
|
117
118
|
" ",
|
|
118
119
|
date
|
|
119
120
|
]
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { ComponentProps } from "react";
|
|
3
2
|
import { BreadcrumbOptions } from "fumadocs-core/breadcrumb";
|
|
4
3
|
|
|
@@ -9,6 +8,6 @@ declare function Breadcrumb({
|
|
|
9
8
|
includeSeparator,
|
|
10
9
|
includePage,
|
|
11
10
|
...props
|
|
12
|
-
}: BreadcrumbProps):
|
|
11
|
+
}: BreadcrumbProps): import("react").JSX.Element | null;
|
|
13
12
|
//#endregion
|
|
14
13
|
export { Breadcrumb, BreadcrumbProps };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { ComponentProps } from "react";
|
|
3
2
|
|
|
4
3
|
//#region src/layouts/notebook/page/slots/container.d.ts
|
|
5
|
-
declare function Container(props: ComponentProps<'article'>):
|
|
4
|
+
declare function Container(props: ComponentProps<'article'>): import("react").JSX.Element;
|
|
6
5
|
//#endregion
|
|
7
6
|
export { Container };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { ComponentProps } from "react";
|
|
3
2
|
import * as PageTree from "fumadocs-core/page-tree";
|
|
4
3
|
|
|
@@ -18,6 +17,6 @@ declare function Footer({
|
|
|
18
17
|
children,
|
|
19
18
|
className,
|
|
20
19
|
...props
|
|
21
|
-
}: FooterProps):
|
|
20
|
+
}: FooterProps): import("react").JSX.Element;
|
|
22
21
|
//#endregion
|
|
23
22
|
export { Footer, FooterProps };
|