fumadocs-ui 15.1.3 → 15.2.1
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/shiki.css +11 -11
- package/dist/components/dialog/search.d.ts.map +1 -1
- package/dist/components/dialog/search.js +1 -1
- package/dist/components/dynamic-codeblock.d.ts +1 -1
- package/dist/components/dynamic-codeblock.d.ts.map +1 -1
- package/dist/components/image-zoom.d.ts +1 -1
- package/dist/components/image-zoom.d.ts.map +1 -1
- package/dist/components/image-zoom.js +8 -4
- package/dist/components/layout/root-toggle.js +3 -3
- package/dist/components/layout/sidebar.d.ts.map +1 -1
- package/dist/components/layout/sidebar.js +3 -5
- package/dist/components/registry.js +5 -5
- package/dist/components/type-table.js +1 -1
- package/dist/contexts/i18n.d.ts +7 -1
- package/dist/contexts/i18n.d.ts.map +1 -1
- package/dist/contexts/i18n.js +5 -6
- package/dist/contexts/layout.d.ts.map +1 -1
- package/dist/contexts/layout.js +6 -5
- package/dist/contexts/search.d.ts.map +1 -1
- package/dist/contexts/search.js +4 -3
- package/dist/contexts/sidebar.d.ts +7 -1
- package/dist/contexts/sidebar.d.ts.map +1 -1
- package/dist/contexts/sidebar.js +5 -7
- package/dist/contexts/tree.d.ts +1 -1
- package/dist/contexts/tree.d.ts.map +1 -1
- package/dist/contexts/tree.js +13 -12
- package/dist/layouts/docs/shared.d.ts +0 -2
- package/dist/layouts/docs/shared.d.ts.map +1 -1
- package/dist/layouts/docs/shared.js +2 -4
- package/dist/layouts/{docs.client.d.ts → docs-client.d.ts} +1 -1
- package/dist/layouts/{docs.client.d.ts.map → docs-client.d.ts.map} +1 -1
- package/dist/layouts/docs.d.ts +17 -4
- package/dist/layouts/docs.d.ts.map +1 -1
- package/dist/layouts/docs.js +19 -19
- package/dist/layouts/links.js +1 -1
- package/dist/layouts/{notebook.client.d.ts → notebook-client.d.ts} +1 -1
- package/dist/layouts/{notebook.client.d.ts.map → notebook-client.d.ts.map} +1 -1
- package/dist/layouts/{notebook.client.js → notebook-client.js} +1 -1
- package/dist/layouts/notebook.d.ts +1 -1
- package/dist/layouts/notebook.d.ts.map +1 -1
- package/dist/layouts/notebook.js +6 -6
- package/dist/layouts/shared.d.ts.map +1 -1
- package/dist/layouts/shared.js +1 -1
- package/dist/mdx.d.ts +3 -1
- package/dist/mdx.d.ts.map +1 -1
- package/dist/mdx.js +2 -2
- package/dist/{page.client.d.ts → page-client.d.ts} +1 -1
- package/dist/{page.client.d.ts.map → page-client.d.ts.map} +1 -1
- package/dist/{page.client.js → page-client.js} +3 -7
- package/dist/page.d.ts +1 -1
- package/dist/page.js +1 -1
- package/dist/{provider.d.ts → provider/base.d.ts} +4 -8
- package/dist/provider/base.d.ts.map +1 -0
- package/dist/{provider.js → provider/base.js} +4 -9
- package/dist/provider/index.d.ts +9 -0
- package/dist/provider/index.d.ts.map +1 -0
- package/dist/provider/index.js +12 -0
- package/dist/style.css +12 -17
- package/package.json +21 -13
- package/dist/provider.d.ts.map +0 -1
- /package/dist/layouts/{docs.client.js → docs-client.js} +0 -0
package/css/shiki.css
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
.
|
|
1
|
+
.fd-codeblock code span {
|
|
2
2
|
color: var(--shiki-light);
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
.dark .
|
|
5
|
+
.dark .fd-codeblock code span {
|
|
6
6
|
color: var(--shiki-dark);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
.fd-codeblock
|
|
9
|
+
.fd-codeblock pre > * {
|
|
10
10
|
display: grid;
|
|
11
11
|
font-size: 13px;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
14
|
+
.fd-codeblock code .diff.remove {
|
|
15
15
|
background-color: var(--fd-diff-remove-color);
|
|
16
16
|
opacity: 0.7;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.
|
|
19
|
+
.fd-codeblock code .diff::before {
|
|
20
20
|
position: absolute;
|
|
21
21
|
left: 6px;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
.
|
|
24
|
+
.fd-codeblock code .diff.remove::before {
|
|
25
25
|
content: '-';
|
|
26
26
|
color: var(--fd-diff-remove-symbol-color);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.
|
|
29
|
+
.fd-codeblock code .diff.add {
|
|
30
30
|
background-color: var(--fd-diff-add-color);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
.
|
|
33
|
+
.fd-codeblock code .diff.add::before {
|
|
34
34
|
content: '+';
|
|
35
35
|
color: var(--fd-diff-add-symbol-color);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
.fd-codeblock code .diff {
|
|
39
39
|
margin: 0 -16px;
|
|
40
40
|
padding: 0 16px;
|
|
41
41
|
position: relative;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
.
|
|
44
|
+
.fd-codeblock .highlighted {
|
|
45
45
|
margin: 0 -16px;
|
|
46
46
|
padding: 0 16px;
|
|
47
47
|
background-color: color-mix(
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
.
|
|
54
|
+
.fd-codeblock .highlighted-word {
|
|
55
55
|
padding: 1px 2px;
|
|
56
56
|
margin: -1px -3px;
|
|
57
57
|
border: 1px solid
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/search.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/search.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,SAAS,EAKd,KAAK,cAAc,EACpB,MAAM,OAAO,CAAC;AAWf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAKzD,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,E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H,WAAW,EACX,KAAK,EACL,UAAU,EACV,GAAG,KAAK,EACT,EAAE,aAAa,2CAkCf"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { FileText, Hash, Loader2, SearchIcon, Text } from 'lucide-react';
|
|
4
|
-
import { useRouter } from 'next/navigation';
|
|
5
4
|
import { useMemo, useEffect, useState, useCallback, } from 'react';
|
|
6
5
|
import { useI18n } from '../../contexts/i18n.js';
|
|
7
6
|
import { cn } from '../../utils/cn.js';
|
|
@@ -10,6 +9,7 @@ import { buttonVariants } from '../../components/ui/button.js';
|
|
|
10
9
|
import { Dialog, DialogContent, DialogOverlay, DialogTitle, } from '@radix-ui/react-dialog';
|
|
11
10
|
import { cva } from 'class-variance-authority';
|
|
12
11
|
import { useEffectEvent } from 'fumadocs-core/utils/use-effect-event';
|
|
12
|
+
import { useRouter } from 'fumadocs-core/framework';
|
|
13
13
|
export function SearchDialog({ open, onOpenChange, footer, links = [], search, onSearchChange, isLoading, ...props }) {
|
|
14
14
|
const { text } = useI18n();
|
|
15
15
|
const defaultItems = useMemo(() => links.map(([name, link]) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-codeblock.d.ts","sourceRoot":"","sources":["../../src/components/dynamic-codeblock.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"dynamic-codeblock.d.ts","sourceRoot":"","sources":["../../src/components/dynamic-codeblock.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAchE,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,IAAI,EACJ,OAAO,GACR,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;CAC1C,6BAUA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-zoom.d.ts","sourceRoot":"","sources":["../../src/components/image-zoom.tsx"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"image-zoom.d.ts","sourceRoot":"","sources":["../../src/components/image-zoom.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,kBAAkB,CAAC;AAC1B,OAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEvE,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG;IACxC;;OAEG;IACH,WAAW,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IAElD;;OAEG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B,CAAC;AAeF,wBAAgB,SAAS,CAAC,EACxB,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,cAAc,2CAoBhB"}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import Image from '
|
|
3
|
+
import { Image } from 'fumadocs-core/framework';
|
|
4
4
|
import './image-zoom.css';
|
|
5
5
|
import Zoom from 'react-medium-image-zoom';
|
|
6
6
|
function getImageSrc(src) {
|
|
7
7
|
if (typeof src === 'string')
|
|
8
8
|
return src;
|
|
9
|
-
if ('
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
if (typeof src === 'object') {
|
|
10
|
+
// Next.js
|
|
11
|
+
if ('default' in src)
|
|
12
|
+
return src.default.src;
|
|
13
|
+
return src.src;
|
|
14
|
+
}
|
|
15
|
+
return '';
|
|
12
16
|
}
|
|
13
17
|
export function ImageZoom({ zoomInProps, children, rmiz, ...props }) {
|
|
14
18
|
return (_jsx(Zoom, { zoomMargin: 20, wrapElement: "span", ...rmiz, zoomImg: {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronsUpDown } from 'lucide-react';
|
|
4
4
|
import { useMemo, useState } from 'react';
|
|
5
|
-
import Link from '
|
|
6
|
-
import { usePathname } from '
|
|
5
|
+
import Link from 'fumadocs-core/link';
|
|
6
|
+
import { usePathname } from 'fumadocs-core/framework';
|
|
7
7
|
import { cn } from '../../utils/cn.js';
|
|
8
8
|
import { isActive } from '../../utils/is-active.js';
|
|
9
9
|
import { useSidebar } from '../../contexts/sidebar.js';
|
|
@@ -27,5 +27,5 @@ export function RootToggle({ options, placeholder, ...props }) {
|
|
|
27
27
|
: 'hover:bg-fd-accent/50', item.props?.className), children: _jsx(Item, { ...item }) }, item.url))) })] }));
|
|
28
28
|
}
|
|
29
29
|
function Item(props) {
|
|
30
|
-
return (_jsxs(_Fragment, { children: [props.icon, _jsxs("div", { className: "flex-1 text-start", children: [_jsx("p", { className: "text-sm font-medium", children: props.title }), props.description ? (_jsx("p", { className: "text-xs text-fd-muted-foreground", children: props.description })) : null] })] }));
|
|
30
|
+
return (_jsxs(_Fragment, { children: [_jsx(_Fragment, { children: props.icon }), _jsxs("div", { className: "flex-1 text-start", children: [_jsx("p", { className: "text-sm font-medium", children: props.title }), props.description ? (_jsx("p", { className: "text-xs text-fd-muted-foreground", children: props.description })) : null] })] }));
|
|
31
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../src/components/layout/sidebar.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,oBAAoB,EAGzB,KAAK,cAAc,EACnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AACf,OAAa,EAAE,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K,EAAE,cAAc,CAAC,cAAc,CAAC,2CAYlE;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,eAAe,2CAarD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,oBAAoB,CAAC,2CAkB3E;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,SAAS,GAAG;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,2CAsBA;AAED,wBAAgB,aAAa,CAAC,EAC5B,WAAmB,EACnB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG;IAClC,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,2CAgBA;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,uBAAuB,2CAqBlE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,2CAmCjD;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,uBAAuB,2CAmBlE;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,2CAiB/C;AAgBD;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACzC,2CAuDA"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronDown, ExternalLink } from 'lucide-react';
|
|
4
4
|
import * as Base from 'fumadocs-core/sidebar';
|
|
5
|
-
import { usePathname } from '
|
|
5
|
+
import { usePathname } from 'fumadocs-core/framework';
|
|
6
6
|
import { createContext, Fragment, useContext, useMemo, useRef, useState, } from 'react';
|
|
7
7
|
import Link from 'fumadocs-core/link';
|
|
8
8
|
import { useOnChange } from 'fumadocs-core/utils/use-on-change';
|
|
@@ -180,14 +180,12 @@ export function SidebarPageTree(props) {
|
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
182
|
return (_jsx(Fragment, { children: renderSidebarList(root.children, 1) }, root.$id));
|
|
183
|
-
|
|
184
|
-
}, [props.components, root.$id]);
|
|
183
|
+
}, [props.components, root]);
|
|
185
184
|
}
|
|
186
185
|
function PageTreeFolder({ item, ...props }) {
|
|
187
186
|
const { defaultOpenLevel, level } = useInternalContext();
|
|
188
187
|
const path = useTreePath();
|
|
189
|
-
return (_jsxs(SidebarFolder, { defaultOpen: (item.defaultOpen ?? defaultOpenLevel >= level) ||
|
|
190
|
-
path.some((pathItem) => pathItem.$id === item.$id || pathItem === item), children: [item.index ? (_jsxs(SidebarFolderLink, { href: item.index.url, external: item.index.external, ...props, children: [item.icon, item.name] })) : (_jsxs(SidebarFolderTrigger, { ...props, children: [item.icon, item.name] })), _jsx(SidebarFolderContent, { children: props.children })] }));
|
|
188
|
+
return (_jsxs(SidebarFolder, { defaultOpen: (item.defaultOpen ?? defaultOpenLevel >= level) || path.includes(item), children: [item.index ? (_jsxs(SidebarFolderLink, { href: item.index.url, external: item.index.external, ...props, children: [item.icon, item.name] })) : (_jsxs(SidebarFolderTrigger, { ...props, children: [item.icon, item.name] })), _jsx(SidebarFolderContent, { children: props.children })] }));
|
|
191
189
|
}
|
|
192
190
|
function getOffset(level) {
|
|
193
191
|
return `calc(var(--spacing) * ${(level > 1 ? level : 0) * 2 + 2})`;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { fileURLToPath } from 'node:url';
|
|
2
2
|
const contextsMap = {
|
|
3
|
-
'../contexts/sidebar.tsx': 'fumadocs-ui/
|
|
4
|
-
'../contexts/search.tsx': 'fumadocs-ui/
|
|
5
|
-
'../contexts/tree.tsx': 'fumadocs-ui/
|
|
6
|
-
'../contexts/i18n.tsx': 'fumadocs-ui/
|
|
7
|
-
'../contexts/layout.tsx': 'fumadocs-ui/
|
|
3
|
+
'../contexts/sidebar.tsx': 'fumadocs-ui/contexts/sidebar',
|
|
4
|
+
'../contexts/search.tsx': 'fumadocs-ui/contexts/search',
|
|
5
|
+
'../contexts/tree.tsx': 'fumadocs-ui/contexts/tree',
|
|
6
|
+
'../contexts/i18n.tsx': 'fumadocs-ui/contexts/i18n',
|
|
7
|
+
'../contexts/layout.tsx': 'fumadocs-ui/contexts/layout',
|
|
8
8
|
};
|
|
9
9
|
export const registry = {
|
|
10
10
|
path: fileURLToPath(import.meta.url),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { InfoIcon } from 'lucide-react';
|
|
4
|
-
import Link from '
|
|
4
|
+
import Link from 'fumadocs-core/link';
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
import { cn } from '../utils/cn.js';
|
|
7
7
|
import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover.js';
|
package/dist/contexts/i18n.d.ts
CHANGED
|
@@ -22,7 +22,13 @@ interface I18nContextType {
|
|
|
22
22
|
locales?: LocaleItem[];
|
|
23
23
|
}
|
|
24
24
|
export declare const defaultTranslations: Translations;
|
|
25
|
-
export declare const I18nContext:
|
|
25
|
+
export declare const I18nContext: {
|
|
26
|
+
Provider: (props: {
|
|
27
|
+
value: I18nContextType;
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
use: (errorMessage?: string) => I18nContextType;
|
|
31
|
+
};
|
|
26
32
|
export declare function I18nLabel(props: {
|
|
27
33
|
label: keyof Translations;
|
|
28
34
|
}): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/contexts/i18n.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../src/contexts/i18n.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,OAAO,CAAC;AAEh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B,cAA0B,EAC1B,GAAG,KAAK,EACT,EAAE,iBAAiB,GAAG;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;CAChD,2CAsCA"}
|
package/dist/contexts/i18n.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { createContext,
|
|
4
|
-
import { usePathname, useRouter } from 'next/navigation';
|
|
3
|
+
import { createContext, usePathname, useRouter } from 'fumadocs-core/framework';
|
|
5
4
|
import { useEffectEvent } from 'fumadocs-core/utils/use-effect-event';
|
|
6
5
|
import { useMemo } from 'react';
|
|
7
6
|
export const defaultTranslations = {
|
|
@@ -11,12 +10,12 @@ export const defaultTranslations = {
|
|
|
11
10
|
tocNoHeadings: 'No Headings',
|
|
12
11
|
lastUpdate: 'Last updated on',
|
|
13
12
|
chooseLanguage: 'Choose a language',
|
|
14
|
-
nextPage: 'Next',
|
|
15
|
-
previousPage: 'Previous',
|
|
13
|
+
nextPage: 'Next Page',
|
|
14
|
+
previousPage: 'Previous Page',
|
|
16
15
|
chooseTheme: 'Theme',
|
|
17
16
|
editOnGithub: 'Edit on GitHub',
|
|
18
17
|
};
|
|
19
|
-
export const I18nContext = createContext({
|
|
18
|
+
export const I18nContext = createContext('I18nContext', {
|
|
20
19
|
text: defaultTranslations,
|
|
21
20
|
});
|
|
22
21
|
export function I18nLabel(props) {
|
|
@@ -24,7 +23,7 @@ export function I18nLabel(props) {
|
|
|
24
23
|
return text[props.label];
|
|
25
24
|
}
|
|
26
25
|
export function useI18n() {
|
|
27
|
-
return
|
|
26
|
+
return I18nContext.use();
|
|
28
27
|
}
|
|
29
28
|
export function I18nProvider({ locales = [], locale, onChange: _onChange, onLocaleChange = _onChange, ...props }) {
|
|
30
29
|
const router = useRouter();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/contexts/layout.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/contexts/layout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAgC,MAAM,OAAO,CAAC;AAGrE,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAUD,wBAAgB,aAAa,eAE5B;AAED,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,UAAU,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAItC;AAED,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,eAAe,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;CAC7C;AAED,UAAU,cAAc;IACtB,aAAa,EAAE,OAAO,CAAC;CACxB;AAMD,wBAAgB,WAAW,CAAC,EAC1B,eAAwB,EACxB,QAAQ,GACT,EAAE,gBAAgB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CAwB5C;AAED,wBAAgB,MAAM,IAAI,cAAc,CAEvC"}
|
package/dist/contexts/layout.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
4
|
+
import { createContext } from 'fumadocs-core/framework';
|
|
4
5
|
/**
|
|
5
6
|
* applied styles to different layout components in `Page` from layouts
|
|
6
7
|
*/
|
|
7
|
-
const StylesContext = createContext({
|
|
8
|
+
const StylesContext = createContext('StylesContext', {
|
|
8
9
|
tocNav: 'xl:hidden',
|
|
9
10
|
toc: 'max-xl:hidden',
|
|
10
11
|
});
|
|
11
12
|
export function usePageStyles() {
|
|
12
|
-
return
|
|
13
|
+
return StylesContext.use();
|
|
13
14
|
}
|
|
14
15
|
export function StylesProvider({ children, ...value }) {
|
|
15
16
|
return (_jsx(StylesContext.Provider, { value: value, children: children }));
|
|
16
17
|
}
|
|
17
|
-
const NavContext = createContext({
|
|
18
|
+
const NavContext = createContext('NavContext', {
|
|
18
19
|
isTransparent: false,
|
|
19
20
|
});
|
|
20
21
|
export function NavProvider({ transparentMode = 'none', children, }) {
|
|
@@ -34,5 +35,5 @@ export function NavProvider({ transparentMode = 'none', children, }) {
|
|
|
34
35
|
return (_jsx(NavContext.Provider, { value: useMemo(() => ({ isTransparent: transparent }), [transparent]), children: children }));
|
|
35
36
|
}
|
|
36
37
|
export function useNav() {
|
|
37
|
-
return
|
|
38
|
+
return NavContext.use();
|
|
38
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/contexts/search.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/contexts/search.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAG1E,UAAU,MAAM;IACd,OAAO,EAAE,SAAS,CAAC;IAEnB;;OAEG;IACH,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;IAErB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAElB;;;;OAIG;IACH,YAAY,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IAEzC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAE/B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,UAAU,iBAAiB;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC;AAQD,wBAAgB,gBAAgB,IAAI,iBAAiB,CAEpD;AAcD,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EACZ,QAAQ,EACR,OAAc,EACd,OAAO,EACP,MASC,EACD,KAAK,GACN,EAAE,mBAAmB,2CAuCrB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,aAI/D"}
|
package/dist/contexts/search.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { useEffect, useMemo, useState, } from 'react';
|
|
4
|
+
import { createContext } from 'fumadocs-core/framework';
|
|
5
|
+
const SearchContext = createContext('SearchContext', {
|
|
5
6
|
enabled: false,
|
|
6
7
|
hotKey: [],
|
|
7
8
|
setOpenSearch: () => undefined,
|
|
8
9
|
});
|
|
9
10
|
export function useSearchContext() {
|
|
10
|
-
return
|
|
11
|
+
return SearchContext.use();
|
|
11
12
|
}
|
|
12
13
|
function MetaOrControl() {
|
|
13
14
|
const [key, setKey] = useState('⌘');
|
|
@@ -9,7 +9,13 @@ interface SidebarContext {
|
|
|
9
9
|
*/
|
|
10
10
|
closeOnRedirect: RefObject<boolean>;
|
|
11
11
|
}
|
|
12
|
-
declare const SidebarContext:
|
|
12
|
+
declare const SidebarContext: {
|
|
13
|
+
Provider: (props: {
|
|
14
|
+
value: SidebarContext;
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
use: (errorMessage?: string) => SidebarContext;
|
|
18
|
+
};
|
|
13
19
|
export declare function useSidebar(): SidebarContext;
|
|
14
20
|
export declare function SidebarProvider({ children, }: {
|
|
15
21
|
children: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/contexts/sidebar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/contexts/sidebar.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAKf,UAAU,cAAc;IACtB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACvD,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAE5D;;OAEG;IACH,eAAe,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CACrC;AAED,QAAA,MAAM,cAAc;;;;;;CAAkD,CAAC;AAEvE,wBAAgB,UAAU,IAAI,cAAc,CAE3C;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,SAAS,CAgCZ"}
|
package/dist/contexts/sidebar.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { usePathname } from '
|
|
3
|
+
import { useState, useMemo, useRef, } from 'react';
|
|
4
|
+
import { createContext, usePathname } from 'fumadocs-core/framework';
|
|
4
5
|
import { SidebarProvider as BaseProvider } from 'fumadocs-core/sidebar';
|
|
5
6
|
import { useOnChange } from 'fumadocs-core/utils/use-on-change';
|
|
6
|
-
const SidebarContext = createContext(
|
|
7
|
+
const SidebarContext = createContext('SidebarContext');
|
|
7
8
|
export function useSidebar() {
|
|
8
|
-
|
|
9
|
-
if (!ctx)
|
|
10
|
-
throw new Error('Missing root provider');
|
|
11
|
-
return ctx;
|
|
9
|
+
return SidebarContext.use();
|
|
12
10
|
}
|
|
13
11
|
export function SidebarProvider({ children, }) {
|
|
14
12
|
const closeOnRedirect = useRef(true);
|
package/dist/contexts/tree.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ type MakeRequired<O, K extends keyof O> = Omit<O, K> & Pick<Required<O>, K>;
|
|
|
4
4
|
interface TreeContextType {
|
|
5
5
|
root: MakeRequired<PageTree.Root | PageTree.Folder, '$id'>;
|
|
6
6
|
}
|
|
7
|
-
export declare function TreeContextProvider(
|
|
7
|
+
export declare function TreeContextProvider(props: {
|
|
8
8
|
tree: PageTree.Root;
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/contexts/tree.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,
|
|
1
|
+
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../src/contexts/tree.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,OAAO,CAAC;AAGxD,KAAK,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAE5E,UAAU,eAAe;IACvB,IAAI,EAAE,YAAY,CAAC,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CAC5D;AAKD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IACpB,QAAQ,EAAE,SAAS,CAAC;CACrB,2CAwBA;AAED,wBAAgB,WAAW,IAAI,QAAQ,CAAC,IAAI,EAAE,CAE7C;AAED,wBAAgB,cAAc,IAAI,eAAe,CAEhD"}
|
package/dist/contexts/tree.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import { usePathname } from '
|
|
4
|
-
import {
|
|
3
|
+
import { createContext, usePathname } from 'fumadocs-core/framework';
|
|
4
|
+
import { useMemo, useRef } from 'react';
|
|
5
5
|
import { searchPath } from 'fumadocs-core/breadcrumb';
|
|
6
|
-
const TreeContext = createContext(
|
|
7
|
-
const PathContext = createContext([]);
|
|
8
|
-
export function TreeContextProvider(
|
|
6
|
+
const TreeContext = createContext('TreeContext');
|
|
7
|
+
const PathContext = createContext('PathContext', []);
|
|
8
|
+
export function TreeContextProvider(props) {
|
|
9
9
|
const nextIdRef = useRef(0);
|
|
10
10
|
const pathname = usePathname();
|
|
11
|
-
|
|
11
|
+
// I found that object-typed props passed from a RSC will be re-constructed, hence breaking all hooks' dependencies
|
|
12
|
+
// using the id here to make sure this never happens
|
|
13
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
14
|
+
const tree = useMemo(() => props.tree, [props.tree.$id ?? props.tree]);
|
|
15
|
+
const path = useMemo(() => searchPath(tree.children, pathname) ?? [], [tree, pathname]);
|
|
12
16
|
const root = path.findLast((item) => item.type === 'folder' && item.root) ?? tree;
|
|
13
17
|
root.$id ?? (root.$id = String(nextIdRef.current++));
|
|
14
|
-
return (_jsx(TreeContext.Provider, { value: useMemo(() => ({ root
|
|
18
|
+
return (_jsx(TreeContext.Provider, { value: useMemo(() => ({ root }), [root]), children: _jsx(PathContext.Provider, { value: path, children: props.children }) }));
|
|
15
19
|
}
|
|
16
20
|
export function useTreePath() {
|
|
17
|
-
return
|
|
21
|
+
return PathContext.use();
|
|
18
22
|
}
|
|
19
23
|
export function useTreeContext() {
|
|
20
|
-
|
|
21
|
-
if (!ctx)
|
|
22
|
-
throw new Error('You must wrap this component under <DocsLayout />');
|
|
23
|
-
return ctx;
|
|
24
|
+
return TreeContext.use('You must wrap this component under <DocsLayout />');
|
|
24
25
|
}
|
|
@@ -10,8 +10,6 @@ export interface TabOptions {
|
|
|
10
10
|
transform?: (option: Option, node: PageTree.Folder) => Option | null;
|
|
11
11
|
}
|
|
12
12
|
export interface SidebarOptions extends SidebarProps {
|
|
13
|
-
enabled: boolean;
|
|
14
|
-
component: ReactNode;
|
|
15
13
|
collapsible?: boolean;
|
|
16
14
|
components?: Partial<SidebarComponents>;
|
|
17
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/layouts/docs/shared.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAML,KAAK,YAAY,EAClB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/layouts/docs/shared.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,YAAY,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I,EAAE,YAAY,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,2CAsDA;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,OAAO,QAY5C;AAED,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,cAAc,CAAC,MAAM,CAAC,EAC/B,IAAI,EAAE,QAAQ,CAAC,IAAI,wBASpB"}
|
|
@@ -3,7 +3,6 @@ import { BaseLinkItem } from '../../layouts/links.js';
|
|
|
3
3
|
import { SidebarFolder, SidebarFolderContent, SidebarFolderLink, SidebarFolderTrigger, SidebarItem, } from '../../components/layout/sidebar.js';
|
|
4
4
|
import { cn } from '../../utils/cn.js';
|
|
5
5
|
import { buttonVariants } from '../../components/ui/button.js';
|
|
6
|
-
import { notFound } from 'next/navigation';
|
|
7
6
|
export const layoutVariables = {
|
|
8
7
|
'--fd-layout-offset': 'max(calc(50vw - var(--fd-layout-width) / 2), 0px)',
|
|
9
8
|
};
|
|
@@ -20,9 +19,8 @@ export function SidebarLinkItem({ item, ...props }) {
|
|
|
20
19
|
return (_jsx(SidebarItem, { href: item.url, icon: item.icon, external: item.external, ...props, children: item.text }));
|
|
21
20
|
}
|
|
22
21
|
export function checkPageTree(passed) {
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
if (typeof passed === 'object' &&
|
|
22
|
+
if (passed &&
|
|
23
|
+
typeof passed === 'object' &&
|
|
26
24
|
'children' in passed &&
|
|
27
25
|
Array.isArray(passed.children))
|
|
28
26
|
return;
|
|
@@ -2,4 +2,4 @@ import { type ButtonHTMLAttributes, type HTMLAttributes } from 'react';
|
|
|
2
2
|
export declare function Navbar(props: HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
export declare function NavbarSidebarTrigger(props: ButtonHTMLAttributes<HTMLButtonElement>): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare function CollapsibleControl(): import("react/jsx-runtime").JSX.Element | undefined;
|
|
5
|
-
//# sourceMappingURL=docs
|
|
5
|
+
//# sourceMappingURL=docs-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs
|
|
1
|
+
{"version":3,"file":"docs-client.d.ts","sourceRoot":"","sources":["../../src/layouts/docs-client.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AASvE,wBAAgB,MAAM,CAAC,KAAK,EAAE,cAAc,CAAC,WAAW,CAAC,2CAiBxD;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,2CAkB/C;AAED,wBAAgB,kBAAkB,wDAoBjC"}
|
package/dist/layouts/docs.d.ts
CHANGED
|
@@ -1,18 +1,31 @@
|
|
|
1
1
|
import type { PageTree } from 'fumadocs-core/server';
|
|
2
2
|
import { type ReactNode, type HTMLAttributes } from 'react';
|
|
3
|
-
import { type LinkItemType } from '../layouts/links.js';
|
|
3
|
+
import { type LinkItemType, type IconItemType } from '../layouts/links.js';
|
|
4
4
|
import { type BaseLayoutProps } from './shared.js';
|
|
5
|
-
import { CollapsibleControl, Navbar, NavbarSidebarTrigger } from '../layouts/docs
|
|
5
|
+
import { CollapsibleControl, Navbar, NavbarSidebarTrigger } from '../layouts/docs-client.js';
|
|
6
6
|
import { type SidebarOptions } from '../layouts/docs/shared.js';
|
|
7
7
|
export interface DocsLayoutProps extends BaseLayoutProps {
|
|
8
8
|
tree: PageTree.Root;
|
|
9
|
-
sidebar?: Partial<SidebarOptions
|
|
9
|
+
sidebar?: Partial<SidebarOptions> & {
|
|
10
|
+
enabled?: boolean;
|
|
11
|
+
component?: ReactNode;
|
|
12
|
+
};
|
|
10
13
|
/**
|
|
11
14
|
* Props for the `div` container
|
|
12
15
|
*/
|
|
13
16
|
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
14
17
|
}
|
|
15
|
-
export declare function DocsLayout({ nav: { enabled: navEnabled, component: navReplace, transparentMode, ...nav }, themeSwitch, sidebar
|
|
18
|
+
export declare function DocsLayout({ nav: { enabled: navEnabled, component: navReplace, transparentMode, ...nav }, themeSwitch, sidebar, i18n, children, ...props }: DocsLayoutProps): ReactNode;
|
|
19
|
+
export declare function DocsLayoutSidebar({ collapsible, components, tabs: tabOptions, hideSearch, tree, nav, links, footer, banner, ...props }: Partial<SidebarOptions> & {
|
|
20
|
+
tree: PageTree.Root;
|
|
21
|
+
links?: LinkItemType[];
|
|
22
|
+
nav?: ReactNode;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function DocsLayoutSidebarFooter({ i18n, themeSwitch, links, }: {
|
|
25
|
+
i18n?: DocsLayoutProps['i18n'];
|
|
26
|
+
links?: IconItemType[];
|
|
27
|
+
themeSwitch?: DocsLayoutProps['themeSwitch'];
|
|
28
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
|
16
29
|
export { CollapsibleControl, Navbar, NavbarSidebarTrigger, type LinkItemType };
|
|
17
30
|
export { getSidebarTabsFromOptions, type TabOptions } from './docs/shared.js';
|
|
18
31
|
//# sourceMappingURL=docs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/layouts/docs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"docs.d.ts","sourceRoot":"","sources":["../../src/layouts/docs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAW,MAAM,OAAO,CAAC;AAcrE,OAAO,EACL,KAAK,YAAY,EAEjB,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,KA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AAC,aAAa,CAAC,CAAC;CAC9C,kDAiCA;AAED,OAAO,EAAE,kBAAkB,EAAE,MAAM,EAAE,oBAAoB,EAAE,KAAK,YAAY,EAAE,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/layouts/docs.js
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
3
|
import { Languages, SidebarIcon } from 'lucide-react';
|
|
4
4
|
import { cn } from '../utils/cn.js';
|
|
5
5
|
import { buttonVariants } from '../components/ui/button.js';
|
|
6
6
|
import { CollapsibleSidebar, Sidebar, SidebarFooter, SidebarHeader, SidebarCollapseTrigger, SidebarViewport, SidebarPageTree, } from '../components/layout/sidebar.js';
|
|
7
7
|
import { replaceOrDefault } from '../layouts/shared.js';
|
|
8
|
-
import { BaseLinkItem } from '../layouts/links.js';
|
|
8
|
+
import { BaseLinkItem, } from '../layouts/links.js';
|
|
9
9
|
import { RootToggle } from '../components/layout/root-toggle.js';
|
|
10
10
|
import { getLinks } from './shared.js';
|
|
11
11
|
import { LanguageToggle, LanguageToggleText, } from '../components/layout/language-toggle.js';
|
|
12
|
-
import { CollapsibleControl, Navbar, NavbarSidebarTrigger, } from '../layouts/docs
|
|
12
|
+
import { CollapsibleControl, Navbar, NavbarSidebarTrigger, } from '../layouts/docs-client.js';
|
|
13
13
|
import { TreeContextProvider } from '../contexts/tree.js';
|
|
14
14
|
import { ThemeToggle } from '../components/layout/theme-toggle.js';
|
|
15
15
|
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle.js';
|
|
16
16
|
import { checkPageTree, getSidebarTabsFromOptions, layoutVariables, SidebarLinkItem, } from '../layouts/docs/shared.js';
|
|
17
17
|
import { StylesProvider, NavProvider, } from '../contexts/layout.js';
|
|
18
|
-
|
|
18
|
+
import Link from 'fumadocs-core/link';
|
|
19
|
+
export function DocsLayout({ nav: { enabled: navEnabled = true, component: navReplace, transparentMode, ...nav } = {}, themeSwitch, sidebar = {}, i18n = false, children, ...props }) {
|
|
19
20
|
checkPageTree(props.tree);
|
|
20
21
|
const links = getLinks(props.links ?? [], props.githubUrl);
|
|
21
|
-
const Aside = collapsible ? CollapsibleSidebar : Sidebar;
|
|
22
|
-
const tabs = getSidebarTabsFromOptions(tabOptions, props.tree) ?? [];
|
|
23
22
|
const variables = cn('[--fd-tocnav-height:36px] md:[--fd-sidebar-width:268px] lg:[--fd-sidebar-width:286px] xl:[--fd-toc-width:286px] xl:[--fd-tocnav-height:0px]', !navReplace && navEnabled
|
|
24
23
|
? '[--fd-nav-height:calc(var(--spacing)*14)] md:[--fd-nav-height:0px]'
|
|
25
24
|
: undefined);
|
|
@@ -30,22 +29,23 @@ export function DocsLayout({ nav: { enabled: navEnabled = true, component: navRe
|
|
|
30
29
|
return (_jsx(TreeContextProvider, { tree: props.tree, children: _jsxs(NavProvider, { transparentMode: transparentMode, children: [replaceOrDefault({ enabled: navEnabled, component: navReplace }, _jsxs(Navbar, { className: "md:hidden", children: [_jsx(Link, { href: nav.url ?? '/', className: "inline-flex items-center gap-2.5 font-semibold", children: nav.title }), _jsx("div", { className: "flex flex-1 flex-row items-center gap-1", children: nav.children }), _jsx(SearchToggle, { hideIfDisabled: true }), _jsx(NavbarSidebarTrigger, { className: "-me-2 md:hidden" })] }), nav), _jsxs("main", { id: "nd-docs-layout", ...props.containerProps, className: cn('flex flex-1 flex-row pe-(--fd-layout-offset)', variables, props.containerProps?.className), style: {
|
|
31
30
|
...layoutVariables,
|
|
32
31
|
...props.containerProps?.style,
|
|
33
|
-
}, children: [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
}, children: [replaceOrDefault(sidebar, _jsx(DocsLayoutSidebar, { tree: props.tree, ...sidebar, links: links, nav: _jsxs(_Fragment, { children: [_jsx(Link, { href: nav.url ?? '/', className: "inline-flex text-[15px] items-center gap-2.5 font-medium", children: nav.title }), nav.children] }), footer: _jsxs(_Fragment, { children: [_jsx(DocsLayoutSidebarFooter, { links: links.filter((item) => item.type === 'icon'), i18n: i18n, themeSwitch: themeSwitch }), sidebar.footer] }) })), _jsx(StylesProvider, { ...pageStyles, children: children })] })] }) }));
|
|
33
|
+
}
|
|
34
|
+
export function DocsLayoutSidebar({ collapsible = true, components, tabs: tabOptions, hideSearch, tree, nav, links = [], footer, banner, ...props }) {
|
|
35
|
+
const tabs = useMemo(() => getSidebarTabsFromOptions(tabOptions, tree) ?? [], [tabOptions, tree]);
|
|
36
|
+
const Aside = collapsible ? CollapsibleSidebar : Sidebar;
|
|
37
|
+
return (_jsxs(_Fragment, { children: [collapsible ? _jsx(CollapsibleControl, {}) : null, _jsxs(Aside, { ...props, className: cn('md:ps-(--fd-layout-offset)', props.className), children: [_jsxs(SidebarHeader, { children: [_jsxs("div", { className: "flex flex-row pt-1 max-md:hidden", children: [nav, collapsible && (_jsx(SidebarCollapseTrigger, { className: cn(buttonVariants({
|
|
38
|
+
color: 'ghost',
|
|
39
|
+
size: 'icon-sm',
|
|
40
|
+
}), 'ms-auto mb-auto text-fd-muted-foreground max-md:hidden'), children: _jsx(SidebarIcon, {}) }))] }), banner, tabs.length > 0 ? (_jsx(RootToggle, { options: tabs, className: "-mx-2" })) : null, !hideSearch ? (_jsx(LargeSearchToggle, { hideIfDisabled: true, className: "rounded-lg max-md:hidden" })) : null] }), _jsxs(SidebarViewport, { children: [_jsx("div", { className: "mb-4 empty:hidden", children: links
|
|
41
|
+
.filter((v) => v.type !== 'icon')
|
|
42
|
+
.map((item, i) => (_jsx(SidebarLinkItem, { item: item }, i))) }), _jsx(SidebarPageTree, { components: components })] }), _jsx(SidebarFooter, { children: footer })] })] }));
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
-
const iconItems = links.filter((v) => v.type === 'icon');
|
|
44
|
+
export function DocsLayoutSidebarFooter({ i18n, themeSwitch, links = [], }) {
|
|
45
45
|
// empty footer items
|
|
46
46
|
if (links.length === 0 && !i18n && themeSwitch?.enabled === false)
|
|
47
47
|
return null;
|
|
48
|
-
return (_jsxs("div", { className: "flex flex-row items-center", children: [
|
|
48
|
+
return (_jsxs("div", { className: "flex flex-row items-center", children: [links.map((item, i) => (_jsx(BaseLinkItem, { item: item, className: cn(buttonVariants({ size: 'icon', color: 'ghost' }), 'text-fd-muted-foreground md:[&_svg]:size-4.5'), "aria-label": item.label, children: item.icon }, i))), _jsx("div", { role: "separator", className: "flex-1" }), i18n ? (_jsxs(LanguageToggle, { className: "me-1.5", children: [_jsx(Languages, { className: "size-4.5" }), _jsx(LanguageToggleText, { className: "md:hidden" })] })) : null, replaceOrDefault(themeSwitch, _jsx(ThemeToggle, { className: "p-0", mode: themeSwitch?.mode }))] }));
|
|
49
49
|
}
|
|
50
50
|
export { CollapsibleControl, Navbar, NavbarSidebarTrigger };
|
|
51
51
|
export { getSidebarTabsFromOptions } from './docs/shared.js';
|
package/dist/layouts/links.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import Link from 'fumadocs-core/link';
|
|
4
|
-
import { usePathname } from '
|
|
4
|
+
import { usePathname } from 'fumadocs-core/framework';
|
|
5
5
|
import { forwardRef, } from 'react';
|
|
6
6
|
import { isActive } from '../utils/is-active.js';
|
|
7
7
|
export const BaseLinkItem = forwardRef(({ item, ...props }, ref) => {
|
|
@@ -9,4 +9,4 @@ export declare function LayoutTab(item: Option): import("react/jsx-runtime").JSX
|
|
|
9
9
|
export declare function SidebarLayoutTab({ item, ...props }: {
|
|
10
10
|
item: Option;
|
|
11
11
|
} & HTMLAttributes<HTMLElement>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
//# sourceMappingURL=notebook
|
|
12
|
+
//# sourceMappingURL=notebook-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notebook
|
|
1
|
+
{"version":3,"file":"notebook-client.d.ts","sourceRoot":"","sources":["../../src/layouts/notebook-client.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AASvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAE9D,wBAAgB,MAAM,CAAC,EACrB,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,WAAW,CAAC,GAAG;IAAE,IAAI,EAAE,KAAK,GAAG,MAAM,CAAA;CAAE,2CAoBxD;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,oBAAoB,CAAC,iBAAiB,CAAC,2CAkB/C;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,WAAW,CAAC,2CAY5D;AAUD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,2CAkBrC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,GAAG,KAAK,EACT,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,cAAc,CAAC,WAAW,CAAC,2CAoBhD"}
|
|
@@ -7,7 +7,7 @@ import { SidebarTrigger } from 'fumadocs-core/sidebar';
|
|
|
7
7
|
import { buttonVariants } from '../components/ui/button.js';
|
|
8
8
|
import { Menu, X } from 'lucide-react';
|
|
9
9
|
import Link from 'fumadocs-core/link';
|
|
10
|
-
import { usePathname } from '
|
|
10
|
+
import { usePathname } from 'fumadocs-core/framework';
|
|
11
11
|
import { isActive } from '../utils/is-active.js';
|
|
12
12
|
export function Navbar({ mode, ...props }) {
|
|
13
13
|
const { open, collapsed } = useSidebar();
|
|
@@ -2,7 +2,7 @@ import { type HTMLAttributes } from 'react';
|
|
|
2
2
|
import { type BaseLayoutProps } from '../layouts/shared.js';
|
|
3
3
|
import { type SidebarOptions } from '../layouts/docs/shared.js';
|
|
4
4
|
import type { PageTree } from 'fumadocs-core/server';
|
|
5
|
-
import { Navbar, NavbarSidebarTrigger } from './notebook
|
|
5
|
+
import { Navbar, NavbarSidebarTrigger } from './notebook-client.js';
|
|
6
6
|
export interface DocsLayoutProps extends BaseLayoutProps {
|
|
7
7
|
tree: PageTree.Root;
|
|
8
8
|
tabMode?: 'sidebar' | 'navbar';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notebook.d.ts","sourceRoot":"","sources":["../../src/layouts/notebook.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"notebook.d.ts","sourceRoot":"","sources":["../../src/layouts/notebook.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,cAAc,EAAW,MAAM,OAAO,CAAC;AAC/D,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,kBAAkB,CAAC;AA0B1B,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAGL,MAAM,EACN,oBAAoB,EAErB,MAAM,mBAAmB,CAAC;AAS3B,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAE/B,GAAG,CAAC,EAAE,eAAe,CAAC,KAAK,CAAC,GAAG;QAC7B,IAAI,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;KACvB,CAAC;IAEF,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC,CAAC;IAEjE,cAAc,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CACjD;AAED,wBAAgB,UAAU,CAAC,EACzB,OAAmB,EACnB,GAAG,EAAE,EAAE,eAAe,EAAE,GAAG,GAAG,EAAO,EACrC,OAAO,EAAE,EACP,WAAW,EAAE,kBAAyB,EACtC,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,iBAAiB,EAC7B,GAAG,OAAO,EACN,EACN,IAAY,EACZ,WAAW,EACX,GAAG,KAAK,EACT,EAAE,eAAe,2CAsIjB;AAiLD,OAAO,EAAE,MAAM,EAAE,oBAAoB,EAAE,CAAC"}
|
package/dist/layouts/notebook.js
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Fragment } from 'react';
|
|
2
|
+
import { Fragment, useMemo } from 'react';
|
|
3
3
|
import { getLinks, replaceOrDefault, } from '../layouts/shared.js';
|
|
4
4
|
import { CollapsibleSidebar, Sidebar, SidebarCollapseTrigger, SidebarFooter, SidebarHeader, SidebarViewport, SidebarPageTree, } from '../components/layout/sidebar.js';
|
|
5
5
|
import { TreeContextProvider } from '../contexts/tree.js';
|
|
6
6
|
import { LargeSearchToggle, SearchToggle, } from '../components/layout/search-toggle.js';
|
|
7
7
|
import { cn } from '../utils/cn.js';
|
|
8
|
-
import Link from 'next/link';
|
|
9
8
|
import { buttonVariants } from '../components/ui/button.js';
|
|
10
9
|
import { ChevronDown, Languages, SidebarIcon } from 'lucide-react';
|
|
11
10
|
import { BaseLinkItem } from '../layouts/links.js';
|
|
@@ -13,15 +12,16 @@ import { LanguageToggle } from '../components/layout/language-toggle.js';
|
|
|
13
12
|
import { ThemeToggle } from '../components/layout/theme-toggle.js';
|
|
14
13
|
import { Popover, PopoverContent, PopoverTrigger, } from '../components/ui/popover.js';
|
|
15
14
|
import { checkPageTree, getSidebarTabsFromOptions, layoutVariables, SidebarLinkItem, } from '../layouts/docs/shared.js';
|
|
16
|
-
import { LayoutTab, LayoutTabs, Navbar, NavbarSidebarTrigger, SidebarLayoutTab, } from './notebook
|
|
15
|
+
import { LayoutTab, LayoutTabs, Navbar, NavbarSidebarTrigger, SidebarLayoutTab, } from './notebook-client.js';
|
|
17
16
|
import { StylesProvider, NavProvider, } from '../contexts/layout.js';
|
|
18
17
|
import { RootToggle } from '../components/layout/root-toggle.js';
|
|
18
|
+
import Link from 'fumadocs-core/link';
|
|
19
19
|
export function DocsLayout({ tabMode = 'sidebar', nav: { transparentMode, ...nav } = {}, sidebar: { collapsible: sidebarCollapsible = true, tabs: tabOptions, banner: sidebarBanner, footer: sidebarFooter, components: sidebarComponents, ...sidebar } = {}, i18n = false, themeSwitch, ...props }) {
|
|
20
20
|
checkPageTree(props.tree);
|
|
21
21
|
const navMode = nav.mode ?? 'auto';
|
|
22
22
|
const links = getLinks(props.links ?? [], props.githubUrl);
|
|
23
|
+
const tabs = useMemo(() => getSidebarTabsFromOptions(tabOptions, props.tree) ?? [], [tabOptions, props.tree]);
|
|
23
24
|
const Aside = sidebarCollapsible ? CollapsibleSidebar : Sidebar;
|
|
24
|
-
const tabs = getSidebarTabsFromOptions(tabOptions, props.tree) ?? [];
|
|
25
25
|
const variables = cn('[--fd-nav-height:calc(var(--spacing)*14)] [--fd-tocnav-height:36px] md:[--fd-sidebar-width:286px] xl:[--fd-toc-width:286px] xl:[--fd-tocnav-height:0px]', tabs.length > 0 &&
|
|
26
26
|
tabMode === 'navbar' &&
|
|
27
27
|
'lg:[--fd-nav-height:calc(var(--spacing)*24)]');
|
|
@@ -41,7 +41,7 @@ export function DocsLayout({ tabMode = 'sidebar', nav: { transparentMode, ...nav
|
|
|
41
41
|
}), 'text-fd-muted-foreground mb-auto'), children: _jsx(SidebarIcon, {}) })] })), nav.children, sidebarBanner, tabMode === 'sidebar' && tabs.length > 0 ? (_jsx(RootToggle, { options: tabs, className: "-mx-2" })) : null] }), _jsxs(SidebarViewport, { children: [tabMode === 'navbar' &&
|
|
42
42
|
tabs.map((tab, i) => (_jsx(SidebarLayoutTab, { item: tab, className: cn('lg:hidden', i === tabs.length - 1 && 'mb-4') }, tab.url))), links.map((item, i) => (_jsx(SidebarLinkItem, { item: item, className: cn('lg:hidden', i === links.length - 1 && 'mb-4') }, i))), _jsx(SidebarPageTree, { components: sidebarComponents })] }), _jsxs(SidebarFooter, { className: cn('flex flex-row items-center', !sidebarFooter && 'md:hidden'), children: [i18n ? (_jsx(LanguageToggle, { className: "me-auto md:hidden", children: _jsx(Languages, { className: "size-5 text-fd-muted-foreground" }) })) : null, replaceOrDefault(themeSwitch, _jsx(ThemeToggle, { className: "md:hidden", mode: themeSwitch?.mode ?? 'light-dark-system' })), sidebarFooter] })] }), _jsx(DocsNavbar, { nav: nav, links: links, i18n: i18n, sidebarCollapsible: sidebarCollapsible, tabs: tabMode == 'navbar' ? tabs : [] }), _jsx(StylesProvider, { ...pageStyles, children: props.children })] }) }) }));
|
|
43
43
|
}
|
|
44
|
-
function DocsNavbar({ sidebarCollapsible, links, nav = {}, i18n, tabs, }) {
|
|
44
|
+
function DocsNavbar({ sidebarCollapsible, links, themeSwitch, nav = {}, i18n, tabs, }) {
|
|
45
45
|
const navMode = nav.mode ?? 'auto';
|
|
46
46
|
return (_jsxs(Navbar, { mode: navMode, children: [_jsxs("div", { className: cn('flex flex-row border-b border-fd-foreground/10 px-4 h-14', navMode === 'auto' && 'md:px-6'), children: [_jsxs("div", { className: cn('flex flex-row items-center', navMode === 'top' && 'flex-1 pe-4'), children: [sidebarCollapsible && navMode === 'auto' ? (_jsx(SidebarCollapseTrigger, { className: cn(buttonVariants({
|
|
47
47
|
color: 'ghost',
|
|
@@ -50,7 +50,7 @@ function DocsNavbar({ sidebarCollapsible, links, nav = {}, i18n, tabs, }) {
|
|
|
50
50
|
.filter((item) => item.type !== 'icon')
|
|
51
51
|
.map((item, i) => (_jsx(NavbarLinkItem, { item: item, className: "text-sm text-fd-muted-foreground transition-colors hover:text-fd-accent-foreground" }, i))) }), nav.children, _jsx(SearchToggle, { hideIfDisabled: true, className: "md:hidden" }), _jsx(NavbarSidebarTrigger, { className: "md:hidden" }), links
|
|
52
52
|
.filter((item) => item.type === 'icon')
|
|
53
|
-
.map((item, i) => (_jsx(BaseLinkItem, { item: item, className: cn(buttonVariants({ size: 'icon-sm', color: 'ghost' }), 'text-fd-muted-foreground max-lg:hidden'), "aria-label": item.label, children: item.icon }, i))), i18n ? (_jsx(LanguageToggle, { className: "max-md:hidden", children: _jsx(Languages, { className: "size-4.5 text-fd-muted-foreground" }) })) : null, _jsx(ThemeToggle, { className: "ms-2 max-md:hidden", mode:
|
|
53
|
+
.map((item, i) => (_jsx(BaseLinkItem, { item: item, className: cn(buttonVariants({ size: 'icon-sm', color: 'ghost' }), 'text-fd-muted-foreground max-lg:hidden'), "aria-label": item.label, children: item.icon }, i))), i18n ? (_jsx(LanguageToggle, { className: "max-md:hidden", children: _jsx(Languages, { className: "size-4.5 text-fd-muted-foreground" }) })) : null, replaceOrDefault(themeSwitch, _jsx(ThemeToggle, { className: "ms-2 max-md:hidden", mode: themeSwitch?.mode ?? 'light-dark-system' })), sidebarCollapsible && navMode === 'top' ? (_jsx(SidebarCollapseTrigger, { className: cn(buttonVariants({
|
|
54
54
|
color: 'secondary',
|
|
55
55
|
size: 'icon-sm',
|
|
56
56
|
}), 'ms-2 text-fd-muted-foreground rounded-full max-md:hidden'), children: _jsx(SidebarIcon, {}) })) : null] })] }), tabs.length > 0 ? (_jsx(LayoutTabs, { className: "px-6 border-b border-fd-foreground/10 h-10 max-lg:hidden", children: tabs.map((tab) => (_jsx(LayoutTab, { ...tab }, tab.url))) })) : null] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/layouts/shared.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,K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MAAM,EAC7B,QAAQ,CAAC,EAAE,SAAS,GACnB,SAAS,CAMX"}
|
package/dist/layouts/shared.js
CHANGED
package/dist/mdx.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { AnchorHTMLAttributes, FC, HTMLAttributes, ImgHTMLAttributes, TableHTMLAttributes } from 'react';
|
|
2
2
|
import { Card, Cards } from './components/card.js';
|
|
3
|
-
declare function Image(props: ImgHTMLAttributes<HTMLImageElement>
|
|
3
|
+
declare function Image(props: ImgHTMLAttributes<HTMLImageElement> & {
|
|
4
|
+
sizes?: string;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
4
6
|
declare function Table(props: TableHTMLAttributes<HTMLTableElement>): import("react/jsx-runtime").JSX.Element;
|
|
5
7
|
declare const defaultMdxComponents: {
|
|
6
8
|
pre: (props: HTMLAttributes<HTMLPreElement>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/mdx.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../src/mdx.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EACpB,EAAE,EACF,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../src/mdx.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,oBAAoB,EACpB,EAAE,EACF,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAMhD,iBAAS,KAAK,CACZ,KAAK,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,GAAG;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,2CASF;AAED,iBAAS,KAAK,CAAC,KAAK,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,2CAM1D;AAED,QAAA,MAAM,oBAAoB;iBACX,cAAc,CAAC,cAAc,CAAC;;;OAOhC,EAAE,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;;gBAE1C,cAAc,CAAC,kBAAkB,CAAC;gBAGlC,cAAc,CAAC,kBAAkB,CAAC;gBAGlC,cAAc,CAAC,kBAAkB,CAAC;gBAGlC,cAAc,CAAC,kBAAkB,CAAC;gBAGlC,cAAc,CAAC,kBAAkB,CAAC;gBAGlC,cAAc,CAAC,kBAAkB,CAAC;;;;;;;CAK/C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAAc,cAAc,EAAE,kBAK5D,CAAC;AAEJ,OAAO,EAAE,oBAAoB,IAAI,OAAO,EAAE,CAAC"}
|
package/dist/mdx.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import Link from 'fumadocs-core/link';
|
|
3
|
-
import
|
|
3
|
+
import { Image as FrameworkImage } from 'fumadocs-core/framework';
|
|
4
4
|
import { Card, Cards } from './components/card.js';
|
|
5
5
|
import { Callout } from './components/callout.js';
|
|
6
6
|
import { Heading } from './components/heading.js';
|
|
7
7
|
import { cn } from './utils/cn.js';
|
|
8
8
|
import { CodeBlock, Pre } from './components/codeblock.js';
|
|
9
9
|
function Image(props) {
|
|
10
|
-
return (_jsx(
|
|
10
|
+
return (_jsx(FrameworkImage, { sizes: "(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px", ...props, className: cn('rounded-lg', props.className) }));
|
|
11
11
|
}
|
|
12
12
|
function Table(props) {
|
|
13
13
|
return (_jsx("div", { className: "relative overflow-auto", children: _jsx("table", { ...props }) }));
|
|
@@ -21,4 +21,4 @@ export declare function Footer({ items }: FooterProps): import("react/jsx-runtim
|
|
|
21
21
|
export type BreadcrumbProps = BreadcrumbOptions;
|
|
22
22
|
export declare function Breadcrumb(options: BreadcrumbProps): import("react/jsx-runtime").JSX.Element | null;
|
|
23
23
|
export {};
|
|
24
|
-
//# sourceMappingURL=page
|
|
24
|
+
//# sourceMappingURL=page-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page
|
|
1
|
+
{"version":3,"file":"page-client.d.ts","sourceRoot":"","sources":["../src/page-client.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EAKpB,MAAM,OAAO,CAAC;AAOf,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAMlC,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,cAAc,CAAC,cAAc,CAAC,2CA8CrE;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,cAAc,CAAC,2CAY7D;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,WAAW,CAAC,2CAe7D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,2CAc/C;AAED,KAAK,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,KAAK,CAAC,CAAC;AAChE,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE;QACN,QAAQ,CAAC,EAAE,IAAI,CAAC;QAChB,IAAI,CAAC,EAAE,IAAI,CAAC;KACb,CAAC;CACH;AAyBD,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,2CA+B5C;AA8BD,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAEhD,wBAAgB,UAAU,CAAC,OAAO,EAAE,eAAe,kDAsClD"}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Fragment, useEffect, useMemo, useRef, useState, } from 'react';
|
|
4
4
|
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
5
|
-
import Link from '
|
|
5
|
+
import Link from 'fumadocs-core/link';
|
|
6
6
|
import { cn } from './utils/cn.js';
|
|
7
7
|
import { useI18n } from './contexts/i18n.js';
|
|
8
8
|
import { useTreeContext, useTreePath } from './contexts/tree.js';
|
|
9
9
|
import { useSidebar } from './contexts/sidebar.js';
|
|
10
|
-
import { usePathname } from '
|
|
10
|
+
import { usePathname } from 'fumadocs-core/framework';
|
|
11
11
|
import { getBreadcrumbItemsFromPath, } from 'fumadocs-core/breadcrumb';
|
|
12
12
|
import { usePageStyles, useNav } from './contexts/layout.js';
|
|
13
13
|
import { isActive } from './utils/is-active.js';
|
|
@@ -91,11 +91,7 @@ export function Footer({ items }) {
|
|
|
91
91
|
function FooterItem({ item, index }) {
|
|
92
92
|
const { text } = useI18n();
|
|
93
93
|
const Icon = index === 0 ? ChevronLeft : ChevronRight;
|
|
94
|
-
|
|
95
|
-
const description = item.description ?? item.name;
|
|
96
|
-
return (_jsxs(Link, { href: item.url, 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'), children: [_jsxs("div", { className: cn('inline-flex items-center gap-1.5', index === 1 && 'flex-row-reverse', title ? 'font-medium' : 'text-fd-muted-foreground'), children: [_jsx(Icon, { className: "-mx-1 size-4 shrink-0 rtl:rotate-180" }), _jsx("p", { children: title ?? text.nextPage })] }), _jsx("p", { className: cn(title
|
|
97
|
-
? 'text-fd-muted-foreground truncate'
|
|
98
|
-
: 'font-medium md:text-[15px]'), children: description })] }));
|
|
94
|
+
return (_jsxs(Link, { href: item.url, 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'), children: [_jsxs("div", { className: cn('inline-flex items-center gap-1.5 font-medium', index === 1 && 'flex-row-reverse'), children: [_jsx(Icon, { className: "-mx-1 size-4 shrink-0 rtl:rotate-180" }), _jsx("p", { children: item.name })] }), _jsx("p", { className: "text-fd-muted-foreground truncate", children: item.description ?? (index === 0 ? text.previousPage : text.nextPage) })] }));
|
|
99
95
|
}
|
|
100
96
|
export function Breadcrumb(options) {
|
|
101
97
|
const path = useTreePath();
|
package/dist/page.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { type PageTree, type TableOfContents } from 'fumadocs-core/server';
|
|
|
2
2
|
import { type AnchorHTMLAttributes, type HTMLAttributes, type ReactNode } from 'react';
|
|
3
3
|
import type { LoaderConfig, LoaderOutput, Page } from 'fumadocs-core/source';
|
|
4
4
|
import { type AnchorProviderProps } from 'fumadocs-core/toc';
|
|
5
|
-
import { type FooterProps, type BreadcrumbProps } from './page
|
|
5
|
+
import { type FooterProps, type BreadcrumbProps } from './page-client.js';
|
|
6
6
|
import { type TOCProps } from './components/layout/toc.js';
|
|
7
7
|
type TableOfContentOptions = Omit<TOCProps, 'items' | 'children'> & Pick<AnchorProviderProps, 'single'> & {
|
|
8
8
|
enabled: boolean;
|
package/dist/page.js
CHANGED
|
@@ -4,7 +4,7 @@ import { AnchorProvider } from 'fumadocs-core/toc';
|
|
|
4
4
|
import { Card, Cards } from './components/card.js';
|
|
5
5
|
import { replaceOrDefault } from './layouts/shared.js';
|
|
6
6
|
import { cn } from './utils/cn.js';
|
|
7
|
-
import { Footer, LastUpdate, TocPopoverHeader, Breadcrumb, PageBody, PageArticle, } from './page
|
|
7
|
+
import { Footer, LastUpdate, TocPopoverHeader, Breadcrumb, PageBody, PageArticle, } from './page-client.js';
|
|
8
8
|
import { Toc, TOCItems, TocPopoverTrigger, TocPopoverContent, TOCScrollArea, } from './components/layout/toc.js';
|
|
9
9
|
import { buttonVariants } from './components/ui/button.js';
|
|
10
10
|
import { Edit, Text } from 'lucide-react';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThemeProvider } from 'next-themes';
|
|
2
2
|
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
3
|
-
import type { DefaultSearchDialogProps } from '
|
|
4
|
-
import { type SearchProviderProps } from '
|
|
3
|
+
import type { DefaultSearchDialogProps } from '../components/dialog/search-default.js';
|
|
4
|
+
import { type SearchProviderProps } from '../contexts/search.js';
|
|
5
5
|
interface SearchOptions extends Omit<SearchProviderProps, 'options' | 'children'> {
|
|
6
6
|
options?: Partial<DefaultSearchDialogProps> | SearchProviderProps['options'];
|
|
7
7
|
/**
|
|
@@ -34,9 +34,5 @@ export interface RootProviderProps {
|
|
|
34
34
|
children?: ReactNode;
|
|
35
35
|
}
|
|
36
36
|
export declare function RootProvider({ children, dir, theme, search, }: RootProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
-
export {
|
|
38
|
-
|
|
39
|
-
export { SidebarProvider, useSidebar } from './contexts/sidebar.js';
|
|
40
|
-
export { useTreePath, useTreeContext, TreeContextProvider, } from './contexts/tree.js';
|
|
41
|
-
export { StylesProvider, usePageStyles, type PageStyles, } from './contexts/layout.js';
|
|
42
|
-
//# sourceMappingURL=provider.d.ts.map
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/provider/base.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,KAAK,wBAAwB,EAAQ,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE5E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAEnF,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,UAAU,aACR,SAAQ,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,UAAU,CAAC;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAC7E;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAEhC;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,CAAC,GAAG;QAChE;;;;WAIG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;IAEF,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAMD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,GAAW,EACX,KAAU,EACV,MAAM,GACP,EAAE,iBAAiB,2CA4BnB"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { ThemeProvider } from 'next-themes';
|
|
4
|
-
import
|
|
4
|
+
import { lazy } from 'react';
|
|
5
5
|
import { DirectionProvider } from '@radix-ui/react-direction';
|
|
6
|
-
import { SidebarProvider } from '
|
|
7
|
-
import { SearchProvider } from '
|
|
8
|
-
const DefaultSearchDialog =
|
|
6
|
+
import { SidebarProvider } from '../contexts/sidebar.js';
|
|
7
|
+
import { SearchProvider } from '../contexts/search.js';
|
|
8
|
+
const DefaultSearchDialog = lazy(() => import('../components/dialog/search-default.js'));
|
|
9
9
|
export function RootProvider({ children, dir = 'ltr', theme = {}, search, }) {
|
|
10
10
|
let body = children;
|
|
11
11
|
if (search?.enabled !== false)
|
|
@@ -14,8 +14,3 @@ export function RootProvider({ children, dir = 'ltr', theme = {}, search, }) {
|
|
|
14
14
|
body = (_jsx(ThemeProvider, { attribute: "class", defaultTheme: "system", enableSystem: true, disableTransitionOnChange: true, ...theme, children: body }));
|
|
15
15
|
return (_jsx(DirectionProvider, { dir: dir, children: _jsx(SidebarProvider, { children: body }) }));
|
|
16
16
|
}
|
|
17
|
-
export { useI18n, I18nLabel } from './contexts/i18n.js';
|
|
18
|
-
export { SearchProvider, SearchOnly, useSearchContext, } from './contexts/search.js';
|
|
19
|
-
export { SidebarProvider, useSidebar } from './contexts/sidebar.js';
|
|
20
|
-
export { useTreePath, useTreeContext, TreeContextProvider, } from './contexts/tree.js';
|
|
21
|
-
export { StylesProvider, usePageStyles, } from './contexts/layout.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { RootProvider as BaseProvider } from './base.js';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
export declare function RootProvider(props: ComponentProps<typeof BaseProvider>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export { useI18n, I18nLabel } from '../contexts/i18n.js';
|
|
5
|
+
export { SearchProvider, SearchOnly, useSearchContext, type SearchProviderProps, } from '../contexts/search.js';
|
|
6
|
+
export { SidebarProvider, useSidebar } from '../contexts/sidebar.js';
|
|
7
|
+
export { useTreePath, useTreeContext, TreeContextProvider, } from '../contexts/tree.js';
|
|
8
|
+
export { useNav, NavProvider, type NavProviderProps, type PageStyles, StylesProvider, usePageStyles, } from '../contexts/layout.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/provider/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,2CAMtE;AAED,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EACL,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,KAAK,mBAAmB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EACL,WAAW,EACX,cAAc,EACd,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,MAAM,EACN,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,cAAc,EACd,aAAa,GACd,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { RootProvider as BaseProvider } from './base.js';
|
|
4
|
+
import { NextProvider } from 'fumadocs-core/framework/next';
|
|
5
|
+
export function RootProvider(props) {
|
|
6
|
+
return (_jsx(NextProvider, { children: _jsx(BaseProvider, { ...props, children: props.children }) }));
|
|
7
|
+
}
|
|
8
|
+
export { useI18n, I18nLabel } from '../contexts/i18n.js';
|
|
9
|
+
export { SearchProvider, SearchOnly, useSearchContext, } from '../contexts/search.js';
|
|
10
|
+
export { SidebarProvider, useSidebar } from '../contexts/sidebar.js';
|
|
11
|
+
export { useTreePath, useTreeContext, TreeContextProvider, } from '../contexts/tree.js';
|
|
12
|
+
export { useNav, NavProvider, StylesProvider, usePageStyles, } from '../contexts/layout.js';
|
package/dist/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.0.
|
|
1
|
+
/*! tailwindcss v4.0.17 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer theme, base, components, utilities;
|
|
3
3
|
@layer theme {
|
|
4
4
|
:root, :host {
|
|
@@ -1947,11 +1947,6 @@
|
|
|
1947
1947
|
padding-top: calc(var(--spacing) * 12);
|
|
1948
1948
|
}
|
|
1949
1949
|
}
|
|
1950
|
-
.md\:text-\[15px\] {
|
|
1951
|
-
@media (width >= 48rem) {
|
|
1952
|
-
font-size: 15px;
|
|
1953
|
-
}
|
|
1954
|
-
}
|
|
1955
1950
|
.md\:opacity-0 {
|
|
1956
1951
|
@media (width >= 48rem) {
|
|
1957
1952
|
opacity: 0%;
|
|
@@ -2187,46 +2182,46 @@
|
|
|
2187
2182
|
--color-fd-secondary: hsl(0, 0%, 18%);
|
|
2188
2183
|
--color-fd-muted-foreground: hsl(0, 0%, 72%);
|
|
2189
2184
|
}
|
|
2190
|
-
.
|
|
2185
|
+
.fd-codeblock code span {
|
|
2191
2186
|
color: var(--shiki-light);
|
|
2192
2187
|
}
|
|
2193
|
-
.dark .
|
|
2188
|
+
.dark .fd-codeblock code span {
|
|
2194
2189
|
color: var(--shiki-dark);
|
|
2195
2190
|
}
|
|
2196
|
-
.fd-codeblock
|
|
2191
|
+
.fd-codeblock pre > * {
|
|
2197
2192
|
display: grid;
|
|
2198
2193
|
font-size: 13px;
|
|
2199
2194
|
}
|
|
2200
|
-
.
|
|
2195
|
+
.fd-codeblock code .diff.remove {
|
|
2201
2196
|
background-color: var(--fd-diff-remove-color);
|
|
2202
2197
|
opacity: 0.7;
|
|
2203
2198
|
}
|
|
2204
|
-
.
|
|
2199
|
+
.fd-codeblock code .diff::before {
|
|
2205
2200
|
position: absolute;
|
|
2206
2201
|
left: 6px;
|
|
2207
2202
|
}
|
|
2208
|
-
.
|
|
2203
|
+
.fd-codeblock code .diff.remove::before {
|
|
2209
2204
|
content: '-';
|
|
2210
2205
|
color: var(--fd-diff-remove-symbol-color);
|
|
2211
2206
|
}
|
|
2212
|
-
.
|
|
2207
|
+
.fd-codeblock code .diff.add {
|
|
2213
2208
|
background-color: var(--fd-diff-add-color);
|
|
2214
2209
|
}
|
|
2215
|
-
.
|
|
2210
|
+
.fd-codeblock code .diff.add::before {
|
|
2216
2211
|
content: '+';
|
|
2217
2212
|
color: var(--fd-diff-add-symbol-color);
|
|
2218
2213
|
}
|
|
2219
|
-
.
|
|
2214
|
+
.fd-codeblock code .diff {
|
|
2220
2215
|
margin: 0 -16px;
|
|
2221
2216
|
padding: 0 16px;
|
|
2222
2217
|
position: relative;
|
|
2223
2218
|
}
|
|
2224
|
-
.
|
|
2219
|
+
.fd-codeblock .highlighted {
|
|
2225
2220
|
margin: 0 -16px;
|
|
2226
2221
|
padding: 0 16px;
|
|
2227
2222
|
background-color: color-mix( in oklab, var(--color-fd-primary) 10%, transparent );
|
|
2228
2223
|
}
|
|
2229
|
-
.
|
|
2224
|
+
.fd-codeblock .highlighted-word {
|
|
2230
2225
|
padding: 1px 2px;
|
|
2231
2226
|
margin: -1px -3px;
|
|
2232
2227
|
border: 1px solid color-mix(in oklab, var(--color-fd-primary) 50%, transparent);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "15.1
|
|
3
|
+
"version": "15.2.1",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -33,8 +33,16 @@
|
|
|
33
33
|
"types": "./dist/page.d.ts"
|
|
34
34
|
},
|
|
35
35
|
"./provider": {
|
|
36
|
-
"import": "./dist/provider.js",
|
|
37
|
-
"types": "./dist/provider.d.ts"
|
|
36
|
+
"import": "./dist/provider/index.js",
|
|
37
|
+
"types": "./dist/provider/index.d.ts"
|
|
38
|
+
},
|
|
39
|
+
"./provider/*": {
|
|
40
|
+
"import": "./dist/provider/*.js",
|
|
41
|
+
"types": "./dist/provider/*.d.ts"
|
|
42
|
+
},
|
|
43
|
+
"./contexts/*": {
|
|
44
|
+
"import": "./dist/contexts/*.js",
|
|
45
|
+
"types": "./dist/contexts/*.d.ts"
|
|
38
46
|
},
|
|
39
47
|
"./mdx": {
|
|
40
48
|
"node": "./dist/mdx.server.js",
|
|
@@ -66,32 +74,32 @@
|
|
|
66
74
|
"@radix-ui/react-tabs": "^1.1.3",
|
|
67
75
|
"class-variance-authority": "^0.7.1",
|
|
68
76
|
"lodash.merge": "^4.6.2",
|
|
69
|
-
"lucide-react": "^0.
|
|
77
|
+
"lucide-react": "^0.485.0",
|
|
70
78
|
"next-themes": "^0.4.6",
|
|
71
79
|
"postcss-selector-parser": "^7.1.0",
|
|
72
80
|
"react-medium-image-zoom": "^5.2.14",
|
|
73
|
-
"tailwind-merge": "^3.0.2"
|
|
81
|
+
"tailwind-merge": "^3.0.2",
|
|
82
|
+
"fumadocs-core": "15.2.1"
|
|
74
83
|
},
|
|
75
84
|
"devDependencies": {
|
|
76
|
-
"@next/eslint-plugin-next": "^15.2.
|
|
77
|
-
"@tailwindcss/cli": "^4.0.
|
|
85
|
+
"@next/eslint-plugin-next": "^15.2.4",
|
|
86
|
+
"@tailwindcss/cli": "^4.0.17",
|
|
78
87
|
"@types/lodash.merge": "^4.6.9",
|
|
79
88
|
"@types/react": "^19.0.12",
|
|
80
89
|
"@types/react-dom": "^19.0.4",
|
|
81
|
-
"next": "15.2.
|
|
82
|
-
"tailwindcss": "^4.0.
|
|
83
|
-
"tsc-alias": "^1.8.
|
|
90
|
+
"next": "15.2.4",
|
|
91
|
+
"tailwindcss": "^4.0.17",
|
|
92
|
+
"tsc-alias": "^1.8.12",
|
|
84
93
|
"@fumadocs/cli": "0.0.8",
|
|
85
94
|
"eslint-config-custom": "0.0.0",
|
|
86
|
-
"fumadocs-core": "15.1
|
|
95
|
+
"fumadocs-core": "15.2.1",
|
|
87
96
|
"tsconfig": "0.0.0"
|
|
88
97
|
},
|
|
89
98
|
"peerDependencies": {
|
|
90
99
|
"next": "14.x.x || 15.x.x",
|
|
91
100
|
"react": "18.x.x || 19.x.x",
|
|
92
101
|
"react-dom": "18.x.x || 19.x.x",
|
|
93
|
-
"tailwindcss": "^3.4.14 || ^4.0.0"
|
|
94
|
-
"fumadocs-core": "15.1.3"
|
|
102
|
+
"tailwindcss": "^3.4.14 || ^4.0.0"
|
|
95
103
|
},
|
|
96
104
|
"peerDependenciesMeta": {
|
|
97
105
|
"tailwindcss": {
|
package/dist/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