fumadocs-ui 15.2.1 → 15.2.2
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.
|
@@ -63,7 +63,8 @@ export function Sidebar({ defaultOpenLevel = 0, prefetch = true, inner, ...props
|
|
|
63
63
|
level: 1,
|
|
64
64
|
};
|
|
65
65
|
}, [defaultOpenLevel, prefetch]);
|
|
66
|
-
return (_jsx(Context.Provider, { value: context, children: _jsx(Base.SidebarList, { id: "nd-sidebar",
|
|
66
|
+
return (_jsx(Context.Provider, { value: context, children: _jsx(Base.SidebarList, { id: "nd-sidebar", removeScrollOn: "(min-width: 768px)" // md
|
|
67
|
+
, ...props, className: cn('fixed top-[calc(var(--fd-banner-height)+var(--fd-nav-height))] z-20 bg-fd-card text-sm md:sticky md:h-(--fd-sidebar-height)', 'max-md:inset-x-0 max-md:bottom-0 max-md:bg-fd-background/80 max-md:text-[15px] max-md:backdrop-blur-lg max-md:data-[open=false]:invisible', props.className), style: {
|
|
67
68
|
...props.style,
|
|
68
69
|
'--fd-sidebar-height': 'calc(100dvh - var(--fd-banner-height) - var(--fd-nav-height))',
|
|
69
70
|
}, children: _jsx("div", { ...inner, className: cn('flex size-full max-w-full flex-col pt-2 md:ms-auto md:w-(--fd-sidebar-width) md:border-e md:pt-4', inner?.className), children: props.children }) }) }));
|
package/dist/style.css
CHANGED
|
@@ -293,6 +293,9 @@
|
|
|
293
293
|
.top-\(--fd-banner-height\) {
|
|
294
294
|
top: var(--fd-banner-height);
|
|
295
295
|
}
|
|
296
|
+
.top-\(--fd-nav-height\) {
|
|
297
|
+
top: var(--fd-nav-height);
|
|
298
|
+
}
|
|
296
299
|
.top-0 {
|
|
297
300
|
top: calc(var(--spacing) * 0);
|
|
298
301
|
}
|
|
@@ -308,6 +311,9 @@
|
|
|
308
311
|
.top-12 {
|
|
309
312
|
top: calc(var(--spacing) * 12);
|
|
310
313
|
}
|
|
314
|
+
.top-14 {
|
|
315
|
+
top: calc(var(--spacing) * 14);
|
|
316
|
+
}
|
|
311
317
|
.top-\[10vh\] {
|
|
312
318
|
top: 10vh;
|
|
313
319
|
}
|
|
@@ -797,12 +803,18 @@
|
|
|
797
803
|
.mt-2 {
|
|
798
804
|
margin-top: calc(var(--spacing) * 2);
|
|
799
805
|
}
|
|
806
|
+
.mt-6 {
|
|
807
|
+
margin-top: calc(var(--spacing) * 6);
|
|
808
|
+
}
|
|
800
809
|
.mt-8 {
|
|
801
810
|
margin-top: calc(var(--spacing) * 8);
|
|
802
811
|
}
|
|
803
812
|
.mt-auto {
|
|
804
813
|
margin-top: auto;
|
|
805
814
|
}
|
|
815
|
+
.mr-auto {
|
|
816
|
+
margin-right: auto;
|
|
817
|
+
}
|
|
806
818
|
.-mb-1 {
|
|
807
819
|
margin-bottom: calc(var(--spacing) * -1);
|
|
808
820
|
}
|
|
@@ -891,6 +903,9 @@
|
|
|
891
903
|
.h-14 {
|
|
892
904
|
height: calc(var(--spacing) * 14);
|
|
893
905
|
}
|
|
906
|
+
.h-\[calc\(100dvh-var\(--fd-nav-height\)\)\] {
|
|
907
|
+
height: calc(100dvh - var(--fd-nav-height));
|
|
908
|
+
}
|
|
894
909
|
.h-full {
|
|
895
910
|
height: 100%;
|
|
896
911
|
}
|
|
@@ -936,6 +951,9 @@
|
|
|
936
951
|
.w-\[98vw\] {
|
|
937
952
|
width: 98vw;
|
|
938
953
|
}
|
|
954
|
+
.w-\[286px\] {
|
|
955
|
+
width: 286px;
|
|
956
|
+
}
|
|
939
957
|
.w-fit {
|
|
940
958
|
width: fit-content;
|
|
941
959
|
}
|
|
@@ -1275,6 +1293,9 @@
|
|
|
1275
1293
|
.py-0\.5 {
|
|
1276
1294
|
padding-block: calc(var(--spacing) * 0.5);
|
|
1277
1295
|
}
|
|
1296
|
+
.py-1 {
|
|
1297
|
+
padding-block: calc(var(--spacing) * 1);
|
|
1298
|
+
}
|
|
1278
1299
|
.py-1\.5 {
|
|
1279
1300
|
padding-block: calc(var(--spacing) * 1.5);
|
|
1280
1301
|
}
|
|
@@ -1287,6 +1308,9 @@
|
|
|
1287
1308
|
.py-3 {
|
|
1288
1309
|
padding-block: calc(var(--spacing) * 3);
|
|
1289
1310
|
}
|
|
1311
|
+
.py-8 {
|
|
1312
|
+
padding-block: calc(var(--spacing) * 8);
|
|
1313
|
+
}
|
|
1290
1314
|
.py-12 {
|
|
1291
1315
|
padding-block: calc(var(--spacing) * 12);
|
|
1292
1316
|
}
|
|
@@ -1341,6 +1365,9 @@
|
|
|
1341
1365
|
.pb-6 {
|
|
1342
1366
|
padding-bottom: calc(var(--spacing) * 6);
|
|
1343
1367
|
}
|
|
1368
|
+
.pl-4 {
|
|
1369
|
+
padding-left: calc(var(--spacing) * 4);
|
|
1370
|
+
}
|
|
1344
1371
|
.text-center {
|
|
1345
1372
|
text-align: center;
|
|
1346
1373
|
}
|
|
@@ -1515,6 +1542,9 @@
|
|
|
1515
1542
|
-webkit-user-select: none;
|
|
1516
1543
|
user-select: none;
|
|
1517
1544
|
}
|
|
1545
|
+
.\[--fd-nav-height\:56px\] {
|
|
1546
|
+
--fd-nav-height: 56px;
|
|
1547
|
+
}
|
|
1518
1548
|
.\[--fd-nav-height\:calc\(var\(--spacing\)\*14\)\] {
|
|
1519
1549
|
--fd-nav-height: calc(var(--spacing) * 14);
|
|
1520
1550
|
}
|
|
@@ -1550,6 +1580,11 @@
|
|
|
1550
1580
|
color: var(--color-fd-muted-foreground);
|
|
1551
1581
|
}
|
|
1552
1582
|
}
|
|
1583
|
+
.first\:mt-0 {
|
|
1584
|
+
&:first-child {
|
|
1585
|
+
margin-top: calc(var(--spacing) * 0);
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1553
1588
|
.first\:pt-0 {
|
|
1554
1589
|
&:first-child {
|
|
1555
1590
|
padding-top: calc(var(--spacing) * 0);
|
|
@@ -1780,6 +1815,11 @@
|
|
|
1780
1815
|
display: none;
|
|
1781
1816
|
}
|
|
1782
1817
|
}
|
|
1818
|
+
.max-md\:invisible {
|
|
1819
|
+
@media (width < 48rem) {
|
|
1820
|
+
visibility: hidden;
|
|
1821
|
+
}
|
|
1822
|
+
}
|
|
1783
1823
|
.max-md\:inset-x-0 {
|
|
1784
1824
|
@media (width < 48rem) {
|
|
1785
1825
|
inset-inline: calc(var(--spacing) * 0);
|
|
@@ -1795,6 +1835,11 @@
|
|
|
1795
1835
|
display: none;
|
|
1796
1836
|
}
|
|
1797
1837
|
}
|
|
1838
|
+
.max-md\:bg-fd-background {
|
|
1839
|
+
@media (width < 48rem) {
|
|
1840
|
+
background-color: var(--color-fd-background);
|
|
1841
|
+
}
|
|
1842
|
+
}
|
|
1798
1843
|
.max-md\:bg-fd-background\/80 {
|
|
1799
1844
|
@media (width < 48rem) {
|
|
1800
1845
|
background-color: color-mix(in oklab, var(--color-fd-background) 80%, transparent);
|
|
@@ -1859,6 +1904,11 @@
|
|
|
1859
1904
|
margin-inline: calc(var(--spacing) * 6);
|
|
1860
1905
|
}
|
|
1861
1906
|
}
|
|
1907
|
+
.md\:mx-auto {
|
|
1908
|
+
@media (width >= 48rem) {
|
|
1909
|
+
margin-inline: auto;
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1862
1912
|
.md\:ms-auto {
|
|
1863
1913
|
@media (width >= 48rem) {
|
|
1864
1914
|
margin-inline-start: auto;
|
|
@@ -1879,11 +1929,21 @@
|
|
|
1879
1929
|
height: var(--fd-sidebar-height);
|
|
1880
1930
|
}
|
|
1881
1931
|
}
|
|
1932
|
+
.md\:h-\[calc\(100dvh-56px\)\] {
|
|
1933
|
+
@media (width >= 48rem) {
|
|
1934
|
+
height: calc(100dvh - 56px);
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1882
1937
|
.md\:w-\(--fd-sidebar-width\) {
|
|
1883
1938
|
@media (width >= 48rem) {
|
|
1884
1939
|
width: var(--fd-sidebar-width);
|
|
1885
1940
|
}
|
|
1886
1941
|
}
|
|
1942
|
+
.md\:w-\[300px\] {
|
|
1943
|
+
@media (width >= 48rem) {
|
|
1944
|
+
width: 300px;
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1887
1947
|
.md\:-translate-x-\(--fd-sidebar-offset\) {
|
|
1888
1948
|
@media (width >= 48rem) {
|
|
1889
1949
|
--tw-translate-x: calc(var(--fd-sidebar-offset) * -1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "15.2.
|
|
3
|
+
"version": "15.2.2",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
"@radix-ui/react-tabs": "^1.1.3",
|
|
75
75
|
"class-variance-authority": "^0.7.1",
|
|
76
76
|
"lodash.merge": "^4.6.2",
|
|
77
|
-
"lucide-react": "^0.
|
|
77
|
+
"lucide-react": "^0.486.0",
|
|
78
78
|
"next-themes": "^0.4.6",
|
|
79
79
|
"postcss-selector-parser": "^7.1.0",
|
|
80
80
|
"react-medium-image-zoom": "^5.2.14",
|
|
81
|
-
"tailwind-merge": "^3.0
|
|
82
|
-
"fumadocs-core": "15.2.
|
|
81
|
+
"tailwind-merge": "^3.1.0",
|
|
82
|
+
"fumadocs-core": "15.2.2"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@next/eslint-plugin-next": "^15.2.4",
|
|
@@ -89,10 +89,10 @@
|
|
|
89
89
|
"@types/react-dom": "^19.0.4",
|
|
90
90
|
"next": "15.2.4",
|
|
91
91
|
"tailwindcss": "^4.0.17",
|
|
92
|
-
"tsc-alias": "^1.8.
|
|
93
|
-
"@fumadocs/cli": "0.0
|
|
92
|
+
"tsc-alias": "^1.8.13",
|
|
93
|
+
"@fumadocs/cli": "0.1.0",
|
|
94
94
|
"eslint-config-custom": "0.0.0",
|
|
95
|
-
"fumadocs-core": "15.2.
|
|
95
|
+
"fumadocs-core": "15.2.2",
|
|
96
96
|
"tsconfig": "0.0.0"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/components/registry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAUpD,eAAO,MAAM,QAAQ,EAAE,QAmFtB,CAAC"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { fileURLToPath } from 'node:url';
|
|
2
|
-
const contextsMap = {
|
|
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
|
-
};
|
|
9
|
-
export const registry = {
|
|
10
|
-
path: fileURLToPath(import.meta.url),
|
|
11
|
-
rootDir: '../../',
|
|
12
|
-
namespaces: {
|
|
13
|
-
'': 'components',
|
|
14
|
-
'../utils': 'lib',
|
|
15
|
-
'../layouts': 'components',
|
|
16
|
-
},
|
|
17
|
-
components: [
|
|
18
|
-
{
|
|
19
|
-
name: 'layout/root-toggle',
|
|
20
|
-
description: 'the UI of Sidebar Tabs',
|
|
21
|
-
files: ['layout/root-toggle.tsx'],
|
|
22
|
-
mapImportPath: contextsMap,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
name: 'layout/language-toggle',
|
|
26
|
-
description: 'Language Select',
|
|
27
|
-
files: ['layout/language-toggle.tsx'],
|
|
28
|
-
mapImportPath: contextsMap,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: 'layouts/docs',
|
|
32
|
-
description: 'Replace Docs Layout',
|
|
33
|
-
files: ['../layouts/docs.tsx'],
|
|
34
|
-
mapImportPath: contextsMap,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: 'layouts/notebook',
|
|
38
|
-
description: 'Replace Notebook Layout',
|
|
39
|
-
files: ['../layouts/notebook.tsx'],
|
|
40
|
-
mapImportPath: contextsMap,
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: 'layouts/home',
|
|
44
|
-
description: 'Replace Home Layout',
|
|
45
|
-
files: ['../layouts/home.tsx'],
|
|
46
|
-
mapImportPath: contextsMap,
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
name: 'layouts/page',
|
|
50
|
-
description: 'Replace Page Layout',
|
|
51
|
-
files: ['components:../page.tsx'],
|
|
52
|
-
mapImportPath: contextsMap,
|
|
53
|
-
},
|
|
54
|
-
{ name: 'accordion', files: ['accordion.tsx'] },
|
|
55
|
-
{
|
|
56
|
-
name: 'github-info',
|
|
57
|
-
files: ['github-info.tsx'],
|
|
58
|
-
description: 'A card to display GitHub repo info',
|
|
59
|
-
},
|
|
60
|
-
{ name: 'banner', files: ['banner.tsx'] },
|
|
61
|
-
{ name: 'callout', files: ['callout.tsx'] },
|
|
62
|
-
{ name: 'card', files: ['card.tsx'] },
|
|
63
|
-
{ name: 'codeblock', files: ['codeblock.tsx'] },
|
|
64
|
-
{ name: 'files', files: ['files.tsx'] },
|
|
65
|
-
{ name: 'heading', files: ['heading.tsx'] },
|
|
66
|
-
{
|
|
67
|
-
name: 'image-zoom',
|
|
68
|
-
description: 'Zoomable Image',
|
|
69
|
-
files: ['image-zoom.tsx', 'image-zoom.css'],
|
|
70
|
-
},
|
|
71
|
-
{ name: 'inline-toc', files: ['inline-toc.tsx'] },
|
|
72
|
-
{ name: 'steps', files: ['steps.tsx'] },
|
|
73
|
-
{ name: 'tabs', files: ['tabs.tsx'] },
|
|
74
|
-
{ name: 'type-table', files: ['type-table.tsx'] },
|
|
75
|
-
{
|
|
76
|
-
name: 'button',
|
|
77
|
-
unlisted: true,
|
|
78
|
-
files: ['ui/button.tsx'],
|
|
79
|
-
},
|
|
80
|
-
],
|
|
81
|
-
dependencies: {
|
|
82
|
-
'fumadocs-core': {
|
|
83
|
-
type: 'runtime',
|
|
84
|
-
},
|
|
85
|
-
'fumadocs-ui': {
|
|
86
|
-
type: 'runtime',
|
|
87
|
-
},
|
|
88
|
-
next: {
|
|
89
|
-
type: 'runtime',
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
};
|