fumadocs-ui 15.5.0 → 15.5.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.
- package/css/preset.css +6 -14
- 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 +21 -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 +22 -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 +21 -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 +113 -43
- 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/popover.js +1 -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.d.ts +2 -11
- package/dist/layouts/docs.d.ts.map +1 -1
- package/dist/layouts/docs.js +15 -14
- 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.d.ts.map +1 -1
- package/dist/layouts/notebook.js +13 -9
- package/dist/layouts/shared.d.ts +0 -9
- package/dist/layouts/shared.d.ts.map +1 -1
- package/dist/layouts/shared.js +0 -21
- package/dist/mdx.server.d.ts.map +1 -1
- package/dist/mdx.server.js +2 -1
- package/dist/page.d.ts +1 -1
- package/dist/page.d.ts.map +1 -1
- package/dist/page.js +6 -3
- package/dist/page.server.d.ts.map +1 -1
- package/dist/page.server.js +3 -2
- package/dist/provider/base.d.ts +1 -1
- package/dist/provider/base.d.ts.map +1 -1
- package/dist/style.css +43 -31
- package/package.json +20 -13
- 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/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.
|
|
1
|
+
/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
4
|
@layer theme {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
--radius-lg: 0.5rem;
|
|
33
33
|
--radius-xl: 0.75rem;
|
|
34
34
|
--radius-2xl: 1rem;
|
|
35
|
-
--animate-
|
|
35
|
+
--animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
36
36
|
--blur-sm: 8px;
|
|
37
37
|
--blur-md: 12px;
|
|
38
38
|
--blur-lg: 16px;
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
--color-fd-diff-add-symbol: rgb(10, 200, 100);
|
|
70
70
|
--animate-fd-fade-in: fd-fade-in 300ms ease;
|
|
71
71
|
--animate-fd-fade-out: fd-fade-out 300ms ease;
|
|
72
|
-
--animate-fd-dialog-in: fd-dialog-in
|
|
73
|
-
--animate-fd-dialog-out: fd-dialog-out
|
|
74
|
-
--animate-fd-popover-in: fd-popover-in
|
|
75
|
-
--animate-fd-popover-out: fd-popover-out
|
|
72
|
+
--animate-fd-dialog-in: fd-dialog-in 300ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
73
|
+
--animate-fd-dialog-out: fd-dialog-out 300ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
74
|
+
--animate-fd-popover-in: fd-popover-in 130ms ease;
|
|
75
|
+
--animate-fd-popover-out: fd-popover-out 130ms ease;
|
|
76
76
|
--animate-fd-collapsible-down: fd-collapsible-down 150ms
|
|
77
77
|
cubic-bezier(0.45, 0, 0.55, 1);
|
|
78
78
|
--animate-fd-collapsible-up: fd-collapsible-up 150ms
|
|
@@ -841,9 +841,6 @@
|
|
|
841
841
|
.mt-6 {
|
|
842
842
|
margin-top: calc(var(--spacing) * 6);
|
|
843
843
|
}
|
|
844
|
-
.mt-auto {
|
|
845
|
-
margin-top: auto;
|
|
846
|
-
}
|
|
847
844
|
.mt-px {
|
|
848
845
|
margin-top: 1px;
|
|
849
846
|
}
|
|
@@ -937,6 +934,9 @@
|
|
|
937
934
|
width: 100%;
|
|
938
935
|
height: 100%;
|
|
939
936
|
}
|
|
937
|
+
.h-\(--fd-animated-height\) {
|
|
938
|
+
height: var(--fd-animated-height);
|
|
939
|
+
}
|
|
940
940
|
.h-\(--fd-height\) {
|
|
941
941
|
height: var(--fd-height);
|
|
942
942
|
}
|
|
@@ -1072,6 +1072,9 @@
|
|
|
1072
1072
|
.shrink-0 {
|
|
1073
1073
|
flex-shrink: 0;
|
|
1074
1074
|
}
|
|
1075
|
+
.origin-\(--radix-popover-content-transform-origin\) {
|
|
1076
|
+
transform-origin: var(--radix-popover-content-transform-origin);
|
|
1077
|
+
}
|
|
1075
1078
|
.origin-\[top_center\] {
|
|
1076
1079
|
transform-origin: top center;
|
|
1077
1080
|
}
|
|
@@ -1117,8 +1120,8 @@
|
|
|
1117
1120
|
.animate-fd-fade-in {
|
|
1118
1121
|
animation: var(--animate-fd-fade-in);
|
|
1119
1122
|
}
|
|
1120
|
-
.animate-
|
|
1121
|
-
animation: var(--animate-
|
|
1123
|
+
.animate-pulse {
|
|
1124
|
+
animation: var(--animate-pulse);
|
|
1122
1125
|
}
|
|
1123
1126
|
.scroll-m-24 {
|
|
1124
1127
|
scroll-margin: calc(var(--spacing) * 24);
|
|
@@ -1339,8 +1342,11 @@
|
|
|
1339
1342
|
.bg-fd-muted {
|
|
1340
1343
|
background-color: var(--color-fd-muted);
|
|
1341
1344
|
}
|
|
1342
|
-
.bg-fd-popover {
|
|
1343
|
-
background-color:
|
|
1345
|
+
.bg-fd-popover\/60 {
|
|
1346
|
+
background-color: color-mix(in srgb, hsl(0, 0%, 98%) 60%, transparent);
|
|
1347
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1348
|
+
background-color: color-mix(in oklab, var(--color-fd-popover) 60%, transparent);
|
|
1349
|
+
}
|
|
1344
1350
|
}
|
|
1345
1351
|
.bg-fd-primary {
|
|
1346
1352
|
background-color: var(--color-fd-primary);
|
|
@@ -1610,6 +1616,10 @@
|
|
|
1610
1616
|
.opacity-0 {
|
|
1611
1617
|
opacity: 0%;
|
|
1612
1618
|
}
|
|
1619
|
+
.shadow-2xl {
|
|
1620
|
+
--tw-shadow: 0 25px 50px -12px var(--tw-shadow-color, rgb(0 0 0 / 0.25));
|
|
1621
|
+
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1622
|
+
}
|
|
1613
1623
|
.shadow-lg {
|
|
1614
1624
|
--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
1615
1625
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
@@ -1622,6 +1632,12 @@
|
|
|
1622
1632
|
--tw-shadow: 0 1px 3px 0 var(--tw-shadow-color, rgb(0 0 0 / 0.1)), 0 1px 2px -1px var(--tw-shadow-color, rgb(0 0 0 / 0.1));
|
|
1623
1633
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
1624
1634
|
}
|
|
1635
|
+
.shadow-black\/20 {
|
|
1636
|
+
--tw-shadow-color: color-mix(in srgb, #000 20%, transparent);
|
|
1637
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
1638
|
+
--tw-shadow-color: color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent);
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1625
1641
|
.outline {
|
|
1626
1642
|
outline-style: var(--tw-outline-style);
|
|
1627
1643
|
outline-width: 1px;
|
|
@@ -1649,6 +1665,11 @@
|
|
|
1649
1665
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
1650
1666
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
1651
1667
|
}
|
|
1668
|
+
.transition-\[height\] {
|
|
1669
|
+
transition-property: height;
|
|
1670
|
+
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
1671
|
+
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
1672
|
+
}
|
|
1652
1673
|
.transition-\[margin\] {
|
|
1653
1674
|
transition-property: margin;
|
|
1654
1675
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
@@ -1691,6 +1712,10 @@
|
|
|
1691
1712
|
--tw-duration: 300ms;
|
|
1692
1713
|
transition-duration: 300ms;
|
|
1693
1714
|
}
|
|
1715
|
+
.duration-400 {
|
|
1716
|
+
--tw-duration: 400ms;
|
|
1717
|
+
transition-duration: 400ms;
|
|
1718
|
+
}
|
|
1694
1719
|
.outline-none {
|
|
1695
1720
|
--tw-outline-style: none;
|
|
1696
1721
|
outline-style: none;
|
|
@@ -1914,11 +1939,6 @@
|
|
|
1914
1939
|
display: none;
|
|
1915
1940
|
}
|
|
1916
1941
|
}
|
|
1917
|
-
.data-\[empty\=true\]\:hidden {
|
|
1918
|
-
&[data-empty="true"] {
|
|
1919
|
-
display: none;
|
|
1920
|
-
}
|
|
1921
|
-
}
|
|
1922
1942
|
.data-\[motion\=from-end\]\:animate-fd-enterFromRight {
|
|
1923
1943
|
&[data-motion="from-end"] {
|
|
1924
1944
|
animation: var(--animate-fd-enterFromRight);
|
|
@@ -2699,9 +2719,9 @@
|
|
|
2699
2719
|
syntax: "*";
|
|
2700
2720
|
inherits: false;
|
|
2701
2721
|
}
|
|
2702
|
-
@keyframes
|
|
2703
|
-
|
|
2704
|
-
|
|
2722
|
+
@keyframes pulse {
|
|
2723
|
+
50% {
|
|
2724
|
+
opacity: 0.5;
|
|
2705
2725
|
}
|
|
2706
2726
|
}
|
|
2707
2727
|
@keyframes fd-collapsible-down {
|
|
@@ -2761,21 +2781,13 @@
|
|
|
2761
2781
|
@keyframes fd-popover-in {
|
|
2762
2782
|
from {
|
|
2763
2783
|
opacity: 0;
|
|
2764
|
-
transform: translateY(-12px);
|
|
2765
|
-
}
|
|
2766
|
-
to {
|
|
2767
|
-
opacity: 1;
|
|
2768
|
-
transform: translateY(0);
|
|
2784
|
+
transform: translateY(-12px) scale(0.9);
|
|
2769
2785
|
}
|
|
2770
2786
|
}
|
|
2771
2787
|
@keyframes fd-popover-out {
|
|
2772
|
-
from {
|
|
2773
|
-
opacity: 1;
|
|
2774
|
-
transform: translateY(0);
|
|
2775
|
-
}
|
|
2776
2788
|
to {
|
|
2777
2789
|
opacity: 0;
|
|
2778
|
-
transform: translateY(-12px);
|
|
2790
|
+
transform: translateY(-12px) scale(0.9);
|
|
2779
2791
|
}
|
|
2780
2792
|
}
|
|
2781
2793
|
@keyframes fd-fade-in {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "15.5.
|
|
3
|
+
"version": "15.5.2",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -87,31 +87,38 @@
|
|
|
87
87
|
"next-themes": "^0.4.6",
|
|
88
88
|
"postcss-selector-parser": "^7.1.0",
|
|
89
89
|
"react-medium-image-zoom": "^5.2.14",
|
|
90
|
-
"react-remove-scroll": "^2.
|
|
91
|
-
"tailwind-merge": "^3.3.
|
|
92
|
-
"fumadocs-core": "15.5.
|
|
90
|
+
"react-remove-scroll": "^2.7.1",
|
|
91
|
+
"tailwind-merge": "^3.3.1",
|
|
92
|
+
"fumadocs-core": "15.5.2"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@next/eslint-plugin-next": "^15.3.3",
|
|
96
|
-
"@tailwindcss/cli": "^4.1.
|
|
96
|
+
"@tailwindcss/cli": "^4.1.10",
|
|
97
97
|
"@types/lodash.merge": "^4.6.9",
|
|
98
|
-
"@types/react": "^19.1.
|
|
99
|
-
"@types/react-dom": "^19.1.
|
|
98
|
+
"@types/react": "^19.1.8",
|
|
99
|
+
"@types/react-dom": "^19.1.6",
|
|
100
100
|
"next": "15.3.3",
|
|
101
|
-
"tailwindcss": "^4.1.
|
|
101
|
+
"tailwindcss": "^4.1.10",
|
|
102
102
|
"tsc-alias": "^1.8.16",
|
|
103
|
-
"@fumadocs/cli": "0.2.
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
103
|
+
"@fumadocs/cli": "0.2.1",
|
|
104
|
+
"fumadocs-core": "15.5.2",
|
|
105
|
+
"tsconfig": "0.0.0",
|
|
106
|
+
"eslint-config-custom": "0.0.0"
|
|
107
107
|
},
|
|
108
108
|
"peerDependencies": {
|
|
109
109
|
"next": "14.x.x || 15.x.x",
|
|
110
110
|
"react": "18.x.x || 19.x.x",
|
|
111
111
|
"react-dom": "18.x.x || 19.x.x",
|
|
112
|
-
"tailwindcss": "^3.4.14 || ^4.0.0"
|
|
112
|
+
"tailwindcss": "^3.4.14 || ^4.0.0",
|
|
113
|
+
"@types/react": "*"
|
|
113
114
|
},
|
|
114
115
|
"peerDependenciesMeta": {
|
|
116
|
+
"next": {
|
|
117
|
+
"optional": true
|
|
118
|
+
},
|
|
119
|
+
"@types/react": {
|
|
120
|
+
"optional": true
|
|
121
|
+
},
|
|
115
122
|
"tailwindcss": {
|
|
116
123
|
"optional": true
|
|
117
124
|
}
|
|
@@ -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
|
-
}
|