fumadocs-ui 15.4.2 → 15.5.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/preset.css +12 -0
- package/dist/components/accordion.d.ts +4 -2
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/accordion.js +18 -10
- package/dist/components/dialog/search-algolia.d.ts +3 -2
- package/dist/components/dialog/search-algolia.d.ts.map +1 -1
- package/dist/components/dialog/search-algolia.js +17 -6
- package/dist/components/dialog/search-default.d.ts +3 -2
- package/dist/components/dialog/search-default.d.ts.map +1 -1
- package/dist/components/dialog/search-default.js +18 -6
- package/dist/components/dialog/search-orama.d.ts +3 -2
- package/dist/components/dialog/search-orama.d.ts.map +1 -1
- package/dist/components/dialog/search-orama.js +17 -6
- package/dist/components/dialog/search.d.ts +46 -19
- package/dist/components/dialog/search.d.ts.map +1 -1
- package/dist/components/dialog/search.js +93 -42
- package/dist/components/layout/sidebar.d.ts.map +1 -1
- package/dist/components/layout/sidebar.js +7 -5
- package/dist/components/layout/toc-clerk.d.ts +2 -4
- package/dist/components/layout/toc-clerk.d.ts.map +1 -1
- package/dist/components/layout/toc-clerk.js +8 -4
- package/dist/components/layout/toc.d.ts +6 -18
- package/dist/components/layout/toc.d.ts.map +1 -1
- package/dist/components/layout/toc.js +14 -16
- package/dist/components/tabs.d.ts +7 -7
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tabs.js +7 -4
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +2 -1
- package/dist/contexts/search.d.ts +10 -2
- package/dist/contexts/search.d.ts.map +1 -1
- package/dist/contexts/search.js +3 -1
- package/dist/layouts/docs/page-client.d.ts +30 -0
- package/dist/layouts/docs/page-client.d.ts.map +1 -0
- package/dist/{page-client.js → layouts/docs/page-client.js} +56 -40
- package/dist/layouts/docs/page.d.ts +16 -0
- package/dist/layouts/docs/page.d.ts.map +1 -0
- package/dist/layouts/docs/page.js +26 -0
- package/dist/layouts/docs/shared.d.ts +0 -3
- package/dist/layouts/docs/shared.d.ts.map +1 -1
- package/dist/layouts/docs/shared.js +0 -3
- package/dist/layouts/docs-client.d.ts +1 -0
- package/dist/layouts/docs-client.d.ts.map +1 -1
- package/dist/layouts/docs-client.js +10 -2
- package/dist/layouts/docs.d.ts +2 -11
- package/dist/layouts/docs.d.ts.map +1 -1
- package/dist/layouts/docs.js +20 -25
- package/dist/layouts/home/navbar.d.ts.map +1 -1
- package/dist/layouts/home/navbar.js +1 -5
- package/dist/layouts/home.d.ts +1 -2
- package/dist/layouts/home.d.ts.map +1 -1
- package/dist/layouts/home.js +8 -6
- package/dist/layouts/notebook-client.d.ts +5 -4
- package/dist/layouts/notebook-client.d.ts.map +1 -1
- package/dist/layouts/notebook-client.js +12 -6
- package/dist/layouts/notebook.d.ts.map +1 -1
- package/dist/layouts/notebook.js +18 -22
- package/dist/layouts/shared.d.ts +0 -9
- package/dist/layouts/shared.d.ts.map +1 -1
- package/dist/layouts/shared.js +0 -22
- package/dist/page.d.ts +25 -18
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +12 -18
- package/dist/provider/base.d.ts +1 -1
- package/dist/provider/base.d.ts.map +1 -1
- package/dist/style.css +47 -95
- package/dist/utils/merge-refs.d.ts +3 -0
- package/dist/utils/merge-refs.d.ts.map +1 -0
- package/dist/utils/merge-refs.js +12 -0
- package/package.json +8 -8
- package/dist/components/ui/hide-if-empty.d.ts +0 -10
- package/dist/components/ui/hide-if-empty.d.ts.map +0 -1
- package/dist/components/ui/hide-if-empty.js +0 -66
- package/dist/page-client.d.ts +0 -28
- package/dist/page-client.d.ts.map +0 -1
package/dist/page.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef
|
|
3
|
-
import { AnchorProvider } from 'fumadocs-core/toc';
|
|
4
|
-
import { slot } from './layouts/shared.js';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
5
3
|
import { cn } from './utils/cn.js';
|
|
6
|
-
import { Breadcrumb, Footer, LastUpdate, PageArticle, PageBody, TocPopover, TocPopoverContent, TocPopoverTrigger, } from './page-client.js';
|
|
7
|
-
import { Toc, TOCItems, TOCScrollArea, } from './components/layout/toc.js';
|
|
8
4
|
import { buttonVariants } from './components/ui/button.js';
|
|
9
|
-
import { Edit
|
|
5
|
+
import { Edit } from './icons.js';
|
|
10
6
|
import { I18nLabel } from './contexts/i18n.js';
|
|
11
|
-
|
|
12
|
-
export function DocsPage({
|
|
7
|
+
import { PageArticle, PageBreadcrumb, PageFooter, PageLastUpdate, PageRoot, PageTOC, PageTOCItems, PageTOCPopover, PageTOCPopoverContent, PageTOCPopoverItems, PageTOCPopoverTrigger, PageTOCTitle, } from './layouts/docs/page.js';
|
|
8
|
+
export function DocsPage({ editOnGithub, breadcrumb: { enabled: breadcrumbEnabled = true, component: breadcrumb, ...breadcrumbProps } = {}, footer = {}, lastUpdate, container, full = false, tableOfContentPopover: { enabled: tocPopoverEnabled, component: tocPopover, ...tocPopoverOptions } = {}, tableOfContent: { enabled: tocEnabled, component: tocReplace, ...tocOptions } = {}, toc = [], article, children, }) {
|
|
13
9
|
const isTocRequired = toc.length > 0 ||
|
|
14
10
|
tocOptions.footer !== undefined ||
|
|
15
11
|
tocOptions.header !== undefined;
|
|
@@ -18,16 +14,14 @@ export function DocsPage({ toc = [], full = false, editOnGithub, tableOfContentP
|
|
|
18
14
|
tocPopoverEnabled ?? (tocPopoverEnabled = toc.length > 0 ||
|
|
19
15
|
tocPopoverOptions.header !== undefined ||
|
|
20
16
|
tocPopoverOptions.footer !== undefined);
|
|
21
|
-
return (_jsxs(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
...
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
...tocOptions,
|
|
30
|
-
})] }));
|
|
17
|
+
return (_jsxs(PageRoot, { toc: {
|
|
18
|
+
toc,
|
|
19
|
+
single: tocOptions.single,
|
|
20
|
+
}, ...container, children: [tocPopoverEnabled &&
|
|
21
|
+
(tocPopover ?? (_jsxs(PageTOCPopover, { children: [_jsx(PageTOCPopoverTrigger, {}), _jsxs(PageTOCPopoverContent, { children: [tocPopoverOptions.header, _jsx(PageTOCPopoverItems, { variant: tocPopoverOptions.style }), tocPopoverOptions.footer] })] }))), _jsxs(PageArticle, { ...article, children: [breadcrumbEnabled &&
|
|
22
|
+
(breadcrumb ?? _jsx(PageBreadcrumb, { ...breadcrumbProps })), children, _jsx("div", { role: "none", className: "flex-1" }), _jsxs("div", { className: "flex flex-row flex-wrap items-center justify-between gap-4 empty:hidden", children: [editOnGithub && (_jsx(EditOnGitHub, { href: `https://github.com/${editOnGithub.owner}/${editOnGithub.repo}/blob/${editOnGithub.sha}/${editOnGithub.path.startsWith('/') ? editOnGithub.path.slice(1) : editOnGithub.path}` })), lastUpdate && _jsx(PageLastUpdate, { date: new Date(lastUpdate) })] }), footer.enabled !== false &&
|
|
23
|
+
(footer.component ?? _jsx(PageFooter, { items: footer.items }))] }), tocEnabled &&
|
|
24
|
+
(tocReplace ?? (_jsxs(PageTOC, { children: [tocOptions.header, _jsx(PageTOCTitle, {}), _jsx(PageTOCItems, { variant: tocOptions.style }), tocOptions.footer] })))] }));
|
|
31
25
|
}
|
|
32
26
|
export function EditOnGitHub(props) {
|
|
33
27
|
return (_jsx("a", { target: "_blank", rel: "noreferrer noopener", ...props, className: cn(buttonVariants({
|
package/dist/provider/base.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { DefaultSearchDialogProps } from '../components/dialog/search-defau
|
|
|
4
4
|
import { type SearchProviderProps } from '../contexts/search.js';
|
|
5
5
|
import { type LocaleItem, type Translations } from '../contexts/i18n.js';
|
|
6
6
|
interface SearchOptions extends Omit<SearchProviderProps, 'options' | 'children'> {
|
|
7
|
-
options?: Partial<DefaultSearchDialogProps
|
|
7
|
+
options?: Partial<DefaultSearchDialogProps>;
|
|
8
8
|
/**
|
|
9
9
|
* Enable search functionality
|
|
10
10
|
*
|
|
@@ -1 +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,EACL,KAAK,wBAAwB,EAE7B,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAEnF,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAC;AAGzB,UAAU,aACR,SAAQ,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,UAAU,CAAC;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,
|
|
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,EACL,KAAK,wBAAwB,EAE7B,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oCAAoC,CAAC;AAEnF,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,YAAY,EAClB,MAAM,iBAAiB,CAAC;AAGzB,UAAU,aACR,SAAQ,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,UAAU,CAAC;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAE5C;;;;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,IAAI,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;IAE3C,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAErC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAErC;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IAEvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAMD,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,GAAW,EACX,KAAU,EACV,MAAM,EACN,IAAI,GACL,EAAE,iBAAiB,2CAgCnB"}
|
package/dist/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.
|
|
1
|
+
/*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
4
|
@layer theme {
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
--color-fd-accent: hsl(0, 0%, 90.1%);
|
|
57
57
|
--color-fd-accent-foreground: hsl(0, 0%, 9%);
|
|
58
58
|
--spacing-fd-container: 1400px;
|
|
59
|
+
--fd-page-width: 1200px;
|
|
59
60
|
--fd-sidebar-width: 0px;
|
|
60
61
|
--fd-toc-width: 0px;
|
|
61
62
|
--fd-layout-width: 100vw;
|
|
@@ -353,12 +354,12 @@
|
|
|
353
354
|
.top-\[10vh\] {
|
|
354
355
|
top: 10vh;
|
|
355
356
|
}
|
|
356
|
-
.top-\[calc\(var\(--fd-banner-height\)\+var\(--fd-nav-height\)\)\] {
|
|
357
|
-
top: calc(var(--fd-banner-height) + var(--fd-nav-height));
|
|
358
|
-
}
|
|
359
357
|
.right-2 {
|
|
360
358
|
right: calc(var(--spacing) * 2);
|
|
361
359
|
}
|
|
360
|
+
.bottom-\(--fd-sidebar-margin\) {
|
|
361
|
+
bottom: var(--fd-sidebar-margin);
|
|
362
|
+
}
|
|
362
363
|
.bottom-1\.5 {
|
|
363
364
|
bottom: calc(var(--spacing) * 1.5);
|
|
364
365
|
}
|
|
@@ -417,6 +418,9 @@
|
|
|
417
418
|
.mx-0\.5 {
|
|
418
419
|
margin-inline: calc(var(--spacing) * 0.5);
|
|
419
420
|
}
|
|
421
|
+
.mx-auto {
|
|
422
|
+
margin-inline: auto;
|
|
423
|
+
}
|
|
420
424
|
.\!my-0 {
|
|
421
425
|
margin-block: calc(var(--spacing) * 0) !important;
|
|
422
426
|
}
|
|
@@ -831,9 +835,6 @@
|
|
|
831
835
|
margin-bottom: 0;
|
|
832
836
|
}
|
|
833
837
|
}
|
|
834
|
-
.mt-\(--fd-nav-height\) {
|
|
835
|
-
margin-top: var(--fd-nav-height);
|
|
836
|
-
}
|
|
837
838
|
.mt-\(--fd-top\) {
|
|
838
839
|
margin-top: var(--fd-top);
|
|
839
840
|
}
|
|
@@ -867,9 +868,6 @@
|
|
|
867
868
|
.mb-auto {
|
|
868
869
|
margin-bottom: auto;
|
|
869
870
|
}
|
|
870
|
-
.box-content {
|
|
871
|
-
box-sizing: content-box;
|
|
872
|
-
}
|
|
873
871
|
.fd-scroll-container {
|
|
874
872
|
&::-webkit-scrollbar {
|
|
875
873
|
width: 5px;
|
|
@@ -945,11 +943,8 @@
|
|
|
945
943
|
.h-\(--fd-nav-height\) {
|
|
946
944
|
height: var(--fd-nav-height);
|
|
947
945
|
}
|
|
948
|
-
.h-\(--fd-
|
|
949
|
-
height: var(--fd-
|
|
950
|
-
}
|
|
951
|
-
.h-\(--fd-toc-height\) {
|
|
952
|
-
height: var(--fd-toc-height);
|
|
946
|
+
.h-\(--fd-tocnav-height\) {
|
|
947
|
+
height: var(--fd-tocnav-height);
|
|
953
948
|
}
|
|
954
949
|
.h-\(--radix-navigation-menu-viewport-height\) {
|
|
955
950
|
height: var(--radix-navigation-menu-viewport-height);
|
|
@@ -963,6 +958,9 @@
|
|
|
963
958
|
.h-14 {
|
|
964
959
|
height: calc(var(--spacing) * 14);
|
|
965
960
|
}
|
|
961
|
+
.h-\[400px\] {
|
|
962
|
+
height: 400px;
|
|
963
|
+
}
|
|
966
964
|
.h-\[calc\(100dvh-var\(--fd-nav-height\)\)\] {
|
|
967
965
|
height: calc(100dvh - var(--fd-nav-height));
|
|
968
966
|
}
|
|
@@ -990,9 +988,6 @@
|
|
|
990
988
|
.min-h-10 {
|
|
991
989
|
min-height: calc(var(--spacing) * 10);
|
|
992
990
|
}
|
|
993
|
-
.w-\(--fd-sidebar-width\) {
|
|
994
|
-
width: var(--fd-sidebar-width);
|
|
995
|
-
}
|
|
996
991
|
.w-\(--fd-toc-width\) {
|
|
997
992
|
width: var(--fd-toc-width);
|
|
998
993
|
}
|
|
@@ -1050,12 +1045,6 @@
|
|
|
1050
1045
|
.max-w-\[860px\] {
|
|
1051
1046
|
max-width: 860px;
|
|
1052
1047
|
}
|
|
1053
|
-
.max-w-\[1120px\] {
|
|
1054
|
-
max-width: 1120px;
|
|
1055
|
-
}
|
|
1056
|
-
.max-w-fd-container {
|
|
1057
|
-
max-width: var(--spacing-fd-container);
|
|
1058
|
-
}
|
|
1059
1048
|
.max-w-full {
|
|
1060
1049
|
max-width: 100%;
|
|
1061
1050
|
}
|
|
@@ -1131,8 +1120,8 @@
|
|
|
1131
1120
|
.animate-spin {
|
|
1132
1121
|
animation: var(--animate-spin);
|
|
1133
1122
|
}
|
|
1134
|
-
.scroll-m-
|
|
1135
|
-
scroll-margin: calc(var(--spacing) *
|
|
1123
|
+
.scroll-m-24 {
|
|
1124
|
+
scroll-margin: calc(var(--spacing) * 24);
|
|
1136
1125
|
}
|
|
1137
1126
|
.scroll-m-28 {
|
|
1138
1127
|
scroll-margin: calc(var(--spacing) * 28);
|
|
@@ -1225,9 +1214,6 @@
|
|
|
1225
1214
|
.overflow-hidden {
|
|
1226
1215
|
overflow: hidden;
|
|
1227
1216
|
}
|
|
1228
|
-
.overflow-visible {
|
|
1229
|
-
overflow: visible;
|
|
1230
|
-
}
|
|
1231
1217
|
.overflow-x-auto {
|
|
1232
1218
|
overflow-x: auto;
|
|
1233
1219
|
}
|
|
@@ -1488,9 +1474,6 @@
|
|
|
1488
1474
|
.ps-\[calc\(var\(--fd-layout-offset\)\+var\(--fd-sidebar-width\)\)\] {
|
|
1489
1475
|
padding-inline-start: calc(var(--fd-layout-offset) + var(--fd-sidebar-width));
|
|
1490
1476
|
}
|
|
1491
|
-
.pe-\(--fd-layout-offset\) {
|
|
1492
|
-
padding-inline-end: var(--fd-layout-offset);
|
|
1493
|
-
}
|
|
1494
1477
|
.pe-2 {
|
|
1495
1478
|
padding-inline-end: calc(var(--spacing) * 2);
|
|
1496
1479
|
}
|
|
@@ -1666,6 +1649,11 @@
|
|
|
1666
1649
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
1667
1650
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
1668
1651
|
}
|
|
1652
|
+
.transition-\[margin\] {
|
|
1653
|
+
transition-property: margin;
|
|
1654
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
1655
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
1656
|
+
}
|
|
1669
1657
|
.transition-\[width\,height\] {
|
|
1670
1658
|
transition-property: width,height;
|
|
1671
1659
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
@@ -1714,9 +1702,6 @@
|
|
|
1714
1702
|
.\[--fd-nav-height\:56px\] {
|
|
1715
1703
|
--fd-nav-height: 56px;
|
|
1716
1704
|
}
|
|
1717
|
-
.\[--fd-tocnav-height\:36px\] {
|
|
1718
|
-
--fd-tocnav-height: 36px;
|
|
1719
|
-
}
|
|
1720
1705
|
.\[scrollbar-width\:none\] {
|
|
1721
1706
|
scrollbar-width: none;
|
|
1722
1707
|
}
|
|
@@ -1730,6 +1715,11 @@
|
|
|
1730
1715
|
grid-row-start: 1;
|
|
1731
1716
|
}
|
|
1732
1717
|
}
|
|
1718
|
+
.\*\:mx-auto {
|
|
1719
|
+
:is(& > *) {
|
|
1720
|
+
margin-inline: auto;
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1733
1723
|
.\*\:my-auto {
|
|
1734
1724
|
:is(& > *) {
|
|
1735
1725
|
margin-block: auto;
|
|
@@ -1745,6 +1735,11 @@
|
|
|
1745
1735
|
width: var(--fd-sidebar-width);
|
|
1746
1736
|
}
|
|
1747
1737
|
}
|
|
1738
|
+
.\*\:max-w-fd-container {
|
|
1739
|
+
:is(& > *) {
|
|
1740
|
+
max-width: var(--spacing-fd-container);
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1748
1743
|
.\*\:flex-col {
|
|
1749
1744
|
:is(& > *) {
|
|
1750
1745
|
flex-direction: column;
|
|
@@ -1757,14 +1752,14 @@
|
|
|
1757
1752
|
}
|
|
1758
1753
|
}
|
|
1759
1754
|
}
|
|
1760
|
-
.group-data-\[state\=open\]\:rotate-
|
|
1755
|
+
.group-data-\[state\=open\]\:rotate-90 {
|
|
1761
1756
|
&:is(:where(.group)[data-state="open"] *) {
|
|
1762
|
-
rotate:
|
|
1757
|
+
rotate: 90deg;
|
|
1763
1758
|
}
|
|
1764
1759
|
}
|
|
1765
|
-
.group-data-\[state\=open\]
|
|
1766
|
-
&:is(:where(.group
|
|
1767
|
-
rotate:
|
|
1760
|
+
.group-data-\[state\=open\]\:rotate-180 {
|
|
1761
|
+
&:is(:where(.group)[data-state="open"] *) {
|
|
1762
|
+
rotate: 180deg;
|
|
1768
1763
|
}
|
|
1769
1764
|
}
|
|
1770
1765
|
.peer-hover\:opacity-100 {
|
|
@@ -1919,21 +1914,6 @@
|
|
|
1919
1914
|
display: none;
|
|
1920
1915
|
}
|
|
1921
1916
|
}
|
|
1922
|
-
.data-\[collapsed\=false\]\:w-\[calc\(var\(--fd-sidebar-width\)\+var\(--fd-layout-offset\)\)\] {
|
|
1923
|
-
&[data-collapsed="false"] {
|
|
1924
|
-
width: calc(var(--fd-sidebar-width) + var(--fd-layout-offset));
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
.data-\[collapsed\=true\]\:me-\[calc\(var\(--fd-layout-offset\)-var\(--fd-sidebar-width\)\)\] {
|
|
1928
|
-
&[data-collapsed="true"] {
|
|
1929
|
-
margin-inline-end: calc(var(--fd-layout-offset) - var(--fd-sidebar-width));
|
|
1930
|
-
}
|
|
1931
|
-
}
|
|
1932
|
-
.data-\[empty\=true\]\:hidden {
|
|
1933
|
-
&[data-empty="true"] {
|
|
1934
|
-
display: none;
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
1917
|
.data-\[motion\=from-end\]\:animate-fd-enterFromRight {
|
|
1938
1918
|
&[data-motion="from-end"] {
|
|
1939
1919
|
animation: var(--animate-fd-enterFromRight);
|
|
@@ -2172,11 +2152,6 @@
|
|
|
2172
2152
|
padding-block: calc(var(--spacing) * 1.5);
|
|
2173
2153
|
}
|
|
2174
2154
|
}
|
|
2175
|
-
.md\:pt-12 {
|
|
2176
|
-
@media (width >= 48rem) {
|
|
2177
|
-
padding-top: calc(var(--spacing) * 12);
|
|
2178
|
-
}
|
|
2179
|
-
}
|
|
2180
2155
|
.md\:text-sm {
|
|
2181
2156
|
@media (width >= 48rem) {
|
|
2182
2157
|
font-size: var(--text-sm);
|
|
@@ -2209,21 +2184,11 @@
|
|
|
2209
2184
|
--fd-sidebar-width: 286px;
|
|
2210
2185
|
}
|
|
2211
2186
|
}
|
|
2212
|
-
.lg\:mt-2 {
|
|
2213
|
-
@media (width >= 64rem) {
|
|
2214
|
-
margin-top: calc(var(--spacing) * 2);
|
|
2215
|
-
}
|
|
2216
|
-
}
|
|
2217
2187
|
.lg\:hidden {
|
|
2218
2188
|
@media (width >= 64rem) {
|
|
2219
2189
|
display: none;
|
|
2220
2190
|
}
|
|
2221
2191
|
}
|
|
2222
|
-
.lg\:h-12 {
|
|
2223
|
-
@media (width >= 64rem) {
|
|
2224
|
-
height: calc(var(--spacing) * 12);
|
|
2225
|
-
}
|
|
2226
|
-
}
|
|
2227
2192
|
.lg\:grid-cols-3 {
|
|
2228
2193
|
@media (width >= 64rem) {
|
|
2229
2194
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
@@ -2239,27 +2204,11 @@
|
|
|
2239
2204
|
align-items: center;
|
|
2240
2205
|
}
|
|
2241
2206
|
}
|
|
2242
|
-
.lg\:rounded-2xl {
|
|
2243
|
-
@media (width >= 64rem) {
|
|
2244
|
-
border-radius: var(--radius-2xl);
|
|
2245
|
-
}
|
|
2246
|
-
}
|
|
2247
|
-
.lg\:border {
|
|
2248
|
-
@media (width >= 64rem) {
|
|
2249
|
-
border-style: var(--tw-border-style);
|
|
2250
|
-
border-width: 1px;
|
|
2251
|
-
}
|
|
2252
|
-
}
|
|
2253
2207
|
.lg\:\[--fd-nav-height\:104px\] {
|
|
2254
2208
|
@media (width >= 64rem) {
|
|
2255
2209
|
--fd-nav-height: 104px;
|
|
2256
2210
|
}
|
|
2257
2211
|
}
|
|
2258
|
-
.lg\:\[--fd-padding\:1rem\] {
|
|
2259
|
-
@media (width >= 64rem) {
|
|
2260
|
-
--fd-padding: 1rem;
|
|
2261
|
-
}
|
|
2262
|
-
}
|
|
2263
2212
|
.lg\:\[--fd-sidebar-width\:286px\] {
|
|
2264
2213
|
@media (width >= 64rem) {
|
|
2265
2214
|
--fd-sidebar-width: 286px;
|
|
@@ -2270,11 +2219,6 @@
|
|
|
2270
2219
|
inset-inline-start: calc(var(--spacing) * 4);
|
|
2271
2220
|
}
|
|
2272
2221
|
}
|
|
2273
|
-
.xl\:mx-auto {
|
|
2274
|
-
@media (width >= 80rem) {
|
|
2275
|
-
margin-inline: auto;
|
|
2276
|
-
}
|
|
2277
|
-
}
|
|
2278
2222
|
.xl\:hidden {
|
|
2279
2223
|
@media (width >= 80rem) {
|
|
2280
2224
|
display: none;
|
|
@@ -2285,14 +2229,14 @@
|
|
|
2285
2229
|
padding-inline: calc(var(--spacing) * 12);
|
|
2286
2230
|
}
|
|
2287
2231
|
}
|
|
2288
|
-
.xl
|
|
2232
|
+
.xl\:pt-12 {
|
|
2289
2233
|
@media (width >= 80rem) {
|
|
2290
|
-
|
|
2234
|
+
padding-top: calc(var(--spacing) * 12);
|
|
2291
2235
|
}
|
|
2292
2236
|
}
|
|
2293
|
-
.xl\:\[--fd-
|
|
2237
|
+
.xl\:\[--fd-toc-width\:286px\] {
|
|
2294
2238
|
@media (width >= 80rem) {
|
|
2295
|
-
--fd-
|
|
2239
|
+
--fd-toc-width: 286px;
|
|
2296
2240
|
}
|
|
2297
2241
|
}
|
|
2298
2242
|
.\@max-lg\:col-span-full {
|
|
@@ -2502,6 +2446,14 @@
|
|
|
2502
2446
|
[data-rmiz-modal-overlay='visible'] {
|
|
2503
2447
|
background-color: var(--color-fd-background);
|
|
2504
2448
|
}
|
|
2449
|
+
:root, #nd-docs-layout {
|
|
2450
|
+
--fd-layout-offset: max(calc(50vw - var(--fd-layout-width) / 2), 0px);
|
|
2451
|
+
}
|
|
2452
|
+
}
|
|
2453
|
+
@media (width < 80rem) {
|
|
2454
|
+
#nd-docs-layout:has([data-toc-popover]) {
|
|
2455
|
+
--fd-tocnav-height: calc(var(--spacing) * 10);
|
|
2456
|
+
}
|
|
2505
2457
|
}
|
|
2506
2458
|
@property --radix-collapsible-content-height {
|
|
2507
2459
|
syntax: '<length>';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge-refs.d.ts","sourceRoot":"","sources":["../../src/utils/merge-refs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,wBAAgB,SAAS,CAAC,CAAC,EACzB,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,GACpC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAUtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.5.1",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -89,20 +89,20 @@
|
|
|
89
89
|
"react-medium-image-zoom": "^5.2.14",
|
|
90
90
|
"react-remove-scroll": "^2.6.3",
|
|
91
91
|
"tailwind-merge": "^3.3.0",
|
|
92
|
-
"fumadocs-core": "15.
|
|
92
|
+
"fumadocs-core": "15.5.1"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@next/eslint-plugin-next": "^15.3.
|
|
96
|
-
"@tailwindcss/cli": "^4.1.
|
|
95
|
+
"@next/eslint-plugin-next": "^15.3.3",
|
|
96
|
+
"@tailwindcss/cli": "^4.1.8",
|
|
97
97
|
"@types/lodash.merge": "^4.6.9",
|
|
98
|
-
"@types/react": "^19.1.
|
|
98
|
+
"@types/react": "^19.1.6",
|
|
99
99
|
"@types/react-dom": "^19.1.5",
|
|
100
|
-
"next": "15.3.
|
|
101
|
-
"tailwindcss": "^4.1.
|
|
100
|
+
"next": "15.3.3",
|
|
101
|
+
"tailwindcss": "^4.1.8",
|
|
102
102
|
"tsc-alias": "^1.8.16",
|
|
103
103
|
"@fumadocs/cli": "0.2.0",
|
|
104
104
|
"eslint-config-custom": "0.0.0",
|
|
105
|
-
"fumadocs-core": "15.
|
|
105
|
+
"fumadocs-core": "15.5.1",
|
|
106
106
|
"tsconfig": "0.0.0"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The built-in CSS `:empty` selector cannot detect if the children is hidden, classes such as `md:hidden` causes it to fail.
|
|
3
|
-
* This component is an enhancement to `empty:hidden` to fix the issue described above.
|
|
4
|
-
*
|
|
5
|
-
* This can be expensive, please avoid this whenever possible.
|
|
6
|
-
*/
|
|
7
|
-
export declare function HideIfEmpty({ children }: {
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
//# sourceMappingURL=hide-if-empty.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hide-if-empty.d.ts","sourceRoot":"","sources":["../../../src/components/ui/hide-if-empty.tsx"],"names":[],"mappings":"AAoBA;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,2CAgEtE"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
4
|
-
import { useEffect, useId, useRef, useState } from 'react';
|
|
5
|
-
function isEmpty(node) {
|
|
6
|
-
for (let i = 0; i < node.childNodes.length; i++) {
|
|
7
|
-
const child = node.childNodes.item(i);
|
|
8
|
-
if (child.nodeType === Node.TEXT_NODE) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
else if (child.nodeType === Node.ELEMENT_NODE &&
|
|
12
|
-
window.getComputedStyle(child).display !== 'none') {
|
|
13
|
-
return false;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* The built-in CSS `:empty` selector cannot detect if the children is hidden, classes such as `md:hidden` causes it to fail.
|
|
20
|
-
* This component is an enhancement to `empty:hidden` to fix the issue described above.
|
|
21
|
-
*
|
|
22
|
-
* This can be expensive, please avoid this whenever possible.
|
|
23
|
-
*/
|
|
24
|
-
export function HideIfEmpty({ children }) {
|
|
25
|
-
const id = useId();
|
|
26
|
-
const ref = useRef(null);
|
|
27
|
-
const [empty, setEmpty] = useState();
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
const element = ref.current;
|
|
30
|
-
if (!element)
|
|
31
|
-
return;
|
|
32
|
-
const onUpdate = () => {
|
|
33
|
-
setEmpty(isEmpty(element));
|
|
34
|
-
};
|
|
35
|
-
const observer = new ResizeObserver(onUpdate);
|
|
36
|
-
observer.observe(element);
|
|
37
|
-
onUpdate();
|
|
38
|
-
return () => {
|
|
39
|
-
observer.disconnect();
|
|
40
|
-
};
|
|
41
|
-
}, []);
|
|
42
|
-
const inject = `{
|
|
43
|
-
function isEmpty(node) {
|
|
44
|
-
for (let i = 0; i < node.childNodes.length; i++) {
|
|
45
|
-
const child = node.childNodes.item(i);
|
|
46
|
-
if (child.nodeType === Node.TEXT_NODE) {
|
|
47
|
-
return false;
|
|
48
|
-
} else if (
|
|
49
|
-
child.nodeType === Node.ELEMENT_NODE &&
|
|
50
|
-
window.getComputedStyle(child).display !== 'none'
|
|
51
|
-
) {
|
|
52
|
-
return false;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return true;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const element = document.querySelector('[data-fdid="${id}"]')
|
|
60
|
-
if (element) {
|
|
61
|
-
element.setAttribute('data-empty', String(isEmpty(element)))
|
|
62
|
-
}}`;
|
|
63
|
-
return (_jsxs(_Fragment, { children: [_jsx(Slot, { ref: ref, "data-fdid": id, "data-empty": empty, className: "data-[empty=true]:hidden", suppressHydrationWarning: true, children: children }), empty === undefined && (_jsx("script", { suppressHydrationWarning: true, dangerouslySetInnerHTML: {
|
|
64
|
-
__html: inject,
|
|
65
|
-
} }))] }));
|
|
66
|
-
}
|
package/dist/page-client.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type ComponentProps } from 'react';
|
|
2
|
-
import type { PageTree, TOCItemType } from 'fumadocs-core/server';
|
|
3
|
-
import { type BreadcrumbOptions } from 'fumadocs-core/breadcrumb';
|
|
4
|
-
export declare function TocPopoverTrigger({ items, ...props }: ComponentProps<'button'> & {
|
|
5
|
-
items: TOCItemType[];
|
|
6
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export declare function TocPopoverContent(props: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare function TocPopover(props: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export declare function PageBody(props: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export declare function PageArticle(props: ComponentProps<'article'>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export declare function LastUpdate(props: {
|
|
12
|
-
date: Date;
|
|
13
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
type Item = Pick<PageTree.Item, 'name' | 'description' | 'url'>;
|
|
15
|
-
export interface FooterProps {
|
|
16
|
-
/**
|
|
17
|
-
* Items including information for the next and previous page
|
|
18
|
-
*/
|
|
19
|
-
items?: {
|
|
20
|
-
previous?: Item;
|
|
21
|
-
next?: Item;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export declare function Footer({ items }: FooterProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export type BreadcrumbProps = BreadcrumbOptions;
|
|
26
|
-
export declare function Breadcrumb(options: BreadcrumbProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
-
export {};
|
|
28
|
-
//# sourceMappingURL=page-client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page-client.d.ts","sourceRoot":"","sources":["../src/page-client.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EAMpB,MAAM,OAAO,CAAC;AAMf,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAgBlC,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG;IAAE,KAAK,EAAE,WAAW,EAAE,CAAA;CAAE,2CAgDrD;AA4DD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,2CAU7D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,2CAwDtD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,2CAYpD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,2CAe3D;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"}
|