@fumadocs/base-ui 16.7.3 → 16.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/generated/shared.css +1 -5
- package/dist/components/toc/clerk.js +3 -3
- package/dist/components/toc/default.js +3 -5
- package/dist/layouts/docs/page/slots/toc.js +7 -5
- package/dist/layouts/flux/page/slots/toc.js +7 -5
- package/dist/layouts/notebook/page/slots/toc.js +7 -5
- package/dist/style.css +3 -77
- package/package.json +4 -4
package/css/generated/shared.css
CHANGED
|
@@ -137,7 +137,6 @@
|
|
|
137
137
|
@source inline("bg-fd-primary/10");
|
|
138
138
|
@source inline("bg-fd-secondary");
|
|
139
139
|
@source inline("bg-fd-secondary/50");
|
|
140
|
-
@source inline("bg-linear-to-t");
|
|
141
140
|
@source inline("bg-transparent");
|
|
142
141
|
@source inline("bind");
|
|
143
142
|
@source inline("black");
|
|
@@ -314,7 +313,6 @@
|
|
|
314
313
|
@source inline("defineI18nUI");
|
|
315
314
|
@source inline("defined");
|
|
316
315
|
@source inline("delay");
|
|
317
|
-
@source inline("delay-25");
|
|
318
316
|
@source inline("dependencies");
|
|
319
317
|
@source inline("depends");
|
|
320
318
|
@source inline("deprecated");
|
|
@@ -493,7 +491,6 @@
|
|
|
493
491
|
@source inline("hover:bg-fd-accent");
|
|
494
492
|
@source inline("hover:bg-fd-accent/80");
|
|
495
493
|
@source inline("hover:bg-fd-primary/80");
|
|
496
|
-
@source inline("hover:delay-0");
|
|
497
494
|
@source inline("hover:text-fd-accent-foreground");
|
|
498
495
|
@source inline("hovered");
|
|
499
496
|
@source inline("hovering");
|
|
@@ -904,6 +901,7 @@
|
|
|
904
901
|
@source inline("scroll-m-20");
|
|
905
902
|
@source inline("scroll-m-24");
|
|
906
903
|
@source inline("scroll-m-28");
|
|
904
|
+
@source inline("scroll-m-4");
|
|
907
905
|
@source inline("scrollIntoView");
|
|
908
906
|
@source inline("scrollMode");
|
|
909
907
|
@source inline("scrollY");
|
|
@@ -1076,7 +1074,6 @@
|
|
|
1076
1074
|
@source inline("transition-opacity");
|
|
1077
1075
|
@source inline("transition-transform");
|
|
1078
1076
|
@source inline("translate");
|
|
1079
|
-
@source inline("translate-y-1/2");
|
|
1080
1077
|
@source inline("translations");
|
|
1081
1078
|
@source inline("transparent");
|
|
1082
1079
|
@source inline("tree");
|
|
@@ -1142,7 +1139,6 @@
|
|
|
1142
1139
|
@source inline("variants");
|
|
1143
1140
|
@source inline("vertical");
|
|
1144
1141
|
@source inline("via");
|
|
1145
|
-
@source inline("via-fd-primary");
|
|
1146
1142
|
@source inline("viewBox");
|
|
1147
1143
|
@source inline("viewRef");
|
|
1148
1144
|
@source inline("viewport");
|
|
@@ -64,7 +64,7 @@ function TOCItems({ ref, className, ...props }) {
|
|
|
64
64
|
children: [/* @__PURE__ */ jsx("svg", {
|
|
65
65
|
xmlns: "http://www.w3.org/2000/svg",
|
|
66
66
|
viewBox: `0 0 ${svg.width} ${svg.height}`,
|
|
67
|
-
className: "absolute
|
|
67
|
+
className: "absolute transition-[clip-path]",
|
|
68
68
|
style: {
|
|
69
69
|
width: svg.width,
|
|
70
70
|
height: svg.height,
|
|
@@ -94,7 +94,7 @@ function ThumbBox() {
|
|
|
94
94
|
const item = items.findLast((item) => ids.includes(item.url.slice(1)));
|
|
95
95
|
if (!item) return;
|
|
96
96
|
return /* @__PURE__ */ jsx("div", {
|
|
97
|
-
className: "absolute size-1 bg-fd-primary rounded-full
|
|
97
|
+
className: "absolute size-1 bg-fd-primary rounded-full transition-transform",
|
|
98
98
|
style: { translate: `calc(${getLineOffset(item.depth)}px - 1.25px) calc(var(--fd-top) + var(--fd-height))` }
|
|
99
99
|
});
|
|
100
100
|
}
|
|
@@ -113,7 +113,7 @@ function TOCItem({ item, upper = item.depth, lower = item.depth }) {
|
|
|
113
113
|
return /* @__PURE__ */ jsxs(Primitive.TOCItem, {
|
|
114
114
|
href: item.url,
|
|
115
115
|
style: { paddingInlineStart: getItemOffset(item.depth) },
|
|
116
|
-
className: "prose relative py-1.5 text-sm text-fd-muted-foreground hover:text-fd-accent-foreground transition-colors wrap-anywhere first:pt-0 last:pb-0 data-[active=true]:text-fd-primary",
|
|
116
|
+
className: "prose relative py-1.5 text-sm scroll-m-4 text-fd-muted-foreground hover:text-fd-accent-foreground transition-colors wrap-anywhere first:pt-0 last:pb-0 data-[active=true]:text-fd-primary",
|
|
117
117
|
children: [
|
|
118
118
|
offset !== upperOffset && /* @__PURE__ */ jsx("svg", {
|
|
119
119
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -15,11 +15,9 @@ function TOCItems({ ref, className, ...props }) {
|
|
|
15
15
|
className: "rounded-lg border bg-fd-card p-3 text-xs text-fd-muted-foreground",
|
|
16
16
|
children: text.tocNoHeadings
|
|
17
17
|
});
|
|
18
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(TocThumb, {
|
|
19
19
|
containerRef,
|
|
20
|
-
|
|
21
|
-
className: "absolute top-(--fd-top) h-(--fd-height) w-px bg-linear-to-t via-fd-primary transition-[top,height] delay-25",
|
|
22
|
-
children: [/* @__PURE__ */ jsx("div", { className: "absolute top-0 -translate-y-1/2 size-1 rounded-e-full bg-fd-primary" }), /* @__PURE__ */ jsx("div", { className: "absolute bottom-0 translate-y-1/2 size-1 rounded-e-full bg-fd-primary" })]
|
|
20
|
+
className: "absolute top-(--fd-top) inset-s-0 w-0.5 h-(--fd-height) rounded-e-full bg-fd-primary transition-[top,height]"
|
|
23
21
|
}), /* @__PURE__ */ jsx("div", {
|
|
24
22
|
ref: mergeRefs(ref, containerRef),
|
|
25
23
|
className: cn("flex flex-col border-s border-fd-foreground/10", className),
|
|
@@ -30,7 +28,7 @@ function TOCItems({ ref, className, ...props }) {
|
|
|
30
28
|
function TOCItem({ item }) {
|
|
31
29
|
return /* @__PURE__ */ jsx(Primitive.TOCItem, {
|
|
32
30
|
href: item.url,
|
|
33
|
-
className: cn("prose py-1.5 text-sm text-fd-muted-foreground transition-colors
|
|
31
|
+
className: cn("prose py-1.5 text-sm text-fd-muted-foreground scroll-m-4 transition-colors wrap-anywhere first:pt-0 last:pb-0 data-[active=true]:text-fd-primary hover:text-fd-accent-foreground", item.depth <= 2 && "ps-3", item.depth === 3 && "ps-6", item.depth >= 4 && "ps-8"),
|
|
34
32
|
children: item.title
|
|
35
33
|
});
|
|
36
34
|
}
|
|
@@ -36,13 +36,13 @@ const TocPopoverContext = createContext(null);
|
|
|
36
36
|
function TOCPopover({ container, trigger, content, header, footer, style }) {
|
|
37
37
|
return /* @__PURE__ */ jsxs(PageTOCPopover, {
|
|
38
38
|
...container,
|
|
39
|
-
children: [/* @__PURE__ */ jsx(PageTOCPopoverTrigger, { ...trigger }), /* @__PURE__ */
|
|
39
|
+
children: [/* @__PURE__ */ jsx(PageTOCPopoverTrigger, { ...trigger }), /* @__PURE__ */ jsxs(PageTOCPopoverContent, {
|
|
40
40
|
...content,
|
|
41
|
-
children:
|
|
41
|
+
children: [
|
|
42
42
|
header,
|
|
43
43
|
/* @__PURE__ */ jsx(TOCScrollArea, { children: style === "clerk" ? /* @__PURE__ */ jsx(TOCItems$1, {}) : /* @__PURE__ */ jsx(TOCItems, {}) }),
|
|
44
44
|
footer
|
|
45
|
-
]
|
|
45
|
+
]
|
|
46
46
|
})]
|
|
47
47
|
});
|
|
48
48
|
}
|
|
@@ -153,8 +153,10 @@ function PageTOCPopoverContent(props) {
|
|
|
153
153
|
return /* @__PURE__ */ jsx(CollapsibleContent, {
|
|
154
154
|
"data-toc-popover-content": "",
|
|
155
155
|
...props,
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
157
|
+
className: "flex flex-col px-4 max-h-[50vh] md:px-6",
|
|
158
|
+
children: props.children
|
|
159
|
+
})
|
|
158
160
|
});
|
|
159
161
|
}
|
|
160
162
|
//#endregion
|
|
@@ -18,13 +18,13 @@ const { TOCProvider } = toc_exports;
|
|
|
18
18
|
function TOC({ container, trigger, content, header, footer, style }) {
|
|
19
19
|
return /* @__PURE__ */ jsxs(PageTOCPopover, {
|
|
20
20
|
...container,
|
|
21
|
-
children: [/* @__PURE__ */
|
|
21
|
+
children: [/* @__PURE__ */ jsxs(PageTOCPopoverContent, {
|
|
22
22
|
...content,
|
|
23
|
-
children:
|
|
23
|
+
children: [
|
|
24
24
|
header,
|
|
25
25
|
/* @__PURE__ */ jsx(TOCScrollArea, { children: style === "clerk" ? /* @__PURE__ */ jsx(TOCItems$1, {}) : /* @__PURE__ */ jsx(TOCItems, {}) }),
|
|
26
26
|
footer
|
|
27
|
-
]
|
|
27
|
+
]
|
|
28
28
|
}), /* @__PURE__ */ jsx(PageTOCPopoverTrigger, { ...trigger })]
|
|
29
29
|
});
|
|
30
30
|
}
|
|
@@ -162,8 +162,10 @@ function PageTOCPopoverContent(props) {
|
|
|
162
162
|
return /* @__PURE__ */ jsx(CollapsibleContent, {
|
|
163
163
|
"data-toc-popover-content": "",
|
|
164
164
|
...props,
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
166
|
+
className: "flex flex-col px-2 max-h-[50vh]",
|
|
167
|
+
children: props.children
|
|
168
|
+
})
|
|
167
169
|
});
|
|
168
170
|
}
|
|
169
171
|
//#endregion
|
|
@@ -35,13 +35,13 @@ const TocPopoverContext = createContext(null);
|
|
|
35
35
|
function TOCPopover({ container, trigger, content, header, footer, style }) {
|
|
36
36
|
return /* @__PURE__ */ jsxs(PageTOCPopover, {
|
|
37
37
|
...container,
|
|
38
|
-
children: [/* @__PURE__ */ jsx(PageTOCPopoverTrigger, { ...trigger }), /* @__PURE__ */
|
|
38
|
+
children: [/* @__PURE__ */ jsx(PageTOCPopoverTrigger, { ...trigger }), /* @__PURE__ */ jsxs(PageTOCPopoverContent, {
|
|
39
39
|
...content,
|
|
40
|
-
children:
|
|
40
|
+
children: [
|
|
41
41
|
header,
|
|
42
42
|
/* @__PURE__ */ jsx(TOCScrollArea, { children: style === "clerk" ? /* @__PURE__ */ jsx(TOCItems$1, {}) : /* @__PURE__ */ jsx(TOCItems, {}) }),
|
|
43
43
|
footer
|
|
44
|
-
]
|
|
44
|
+
]
|
|
45
45
|
})]
|
|
46
46
|
});
|
|
47
47
|
}
|
|
@@ -152,8 +152,10 @@ function PageTOCPopoverContent(props) {
|
|
|
152
152
|
return /* @__PURE__ */ jsx(CollapsibleContent, {
|
|
153
153
|
"data-toc-popover-content": "",
|
|
154
154
|
...props,
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
156
|
+
className: "flex flex-col px-4 max-h-[50vh] md:px-6",
|
|
157
|
+
children: props.children
|
|
158
|
+
})
|
|
157
159
|
});
|
|
158
160
|
}
|
|
159
161
|
//#endregion
|
package/dist/style.css
CHANGED
|
@@ -1178,10 +1178,6 @@
|
|
|
1178
1178
|
--tw-translate-y: -100%;
|
|
1179
1179
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1180
1180
|
}
|
|
1181
|
-
.translate-y-1\/2 {
|
|
1182
|
-
--tw-translate-y: calc(1 / 2 * 100%);
|
|
1183
|
-
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
1184
|
-
}
|
|
1185
1181
|
.translate-y-full {
|
|
1186
1182
|
--tw-translate-y: 100%;
|
|
1187
1183
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
@@ -1201,6 +1197,9 @@
|
|
|
1201
1197
|
.animate-pulse {
|
|
1202
1198
|
animation: var(--animate-pulse);
|
|
1203
1199
|
}
|
|
1200
|
+
.scroll-m-4 {
|
|
1201
|
+
scroll-margin: calc(var(--spacing) * 4);
|
|
1202
|
+
}
|
|
1204
1203
|
.scroll-m-20 {
|
|
1205
1204
|
scroll-margin: calc(var(--spacing) * 20);
|
|
1206
1205
|
}
|
|
@@ -1490,18 +1489,6 @@
|
|
|
1490
1489
|
.bg-transparent {
|
|
1491
1490
|
background-color: transparent;
|
|
1492
1491
|
}
|
|
1493
|
-
.bg-linear-to-t {
|
|
1494
|
-
--tw-gradient-position: to top;
|
|
1495
|
-
@supports (background-image: linear-gradient(in lab, red, red)) {
|
|
1496
|
-
--tw-gradient-position: to top in oklab;
|
|
1497
|
-
}
|
|
1498
|
-
background-image: linear-gradient(var(--tw-gradient-stops));
|
|
1499
|
-
}
|
|
1500
|
-
.via-fd-primary {
|
|
1501
|
-
--tw-gradient-via: var(--color-fd-primary);
|
|
1502
|
-
--tw-gradient-via-stops: var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);
|
|
1503
|
-
--tw-gradient-stops: var(--tw-gradient-via-stops);
|
|
1504
|
-
}
|
|
1505
1492
|
.mask-\[linear-gradient\(to_bottom\,transparent\,white_--spacing\(14\)\,white_calc\(100\%---spacing\(14\)\)\,transparent\)\] {
|
|
1506
1493
|
mask-image: linear-gradient(to bottom,transparent,white calc(var(--spacing) * 14),white calc(100% - calc(var(--spacing) * 14)),transparent);
|
|
1507
1494
|
}
|
|
@@ -1929,9 +1916,6 @@
|
|
|
1929
1916
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
1930
1917
|
transition-duration: var(--tw-duration, var(--default-transition-duration));
|
|
1931
1918
|
}
|
|
1932
|
-
.delay-25 {
|
|
1933
|
-
transition-delay: 25ms;
|
|
1934
|
-
}
|
|
1935
1919
|
.duration-\(--duration\) {
|
|
1936
1920
|
--tw-duration: var(--duration);
|
|
1937
1921
|
transition-duration: var(--duration);
|
|
@@ -2260,13 +2244,6 @@
|
|
|
2260
2244
|
}
|
|
2261
2245
|
}
|
|
2262
2246
|
}
|
|
2263
|
-
.hover\:delay-0 {
|
|
2264
|
-
&:hover {
|
|
2265
|
-
@media (hover: hover) {
|
|
2266
|
-
transition-delay: 0ms;
|
|
2267
|
-
}
|
|
2268
|
-
}
|
|
2269
|
-
}
|
|
2270
2247
|
.focus-visible\:ring-2 {
|
|
2271
2248
|
&:focus-visible {
|
|
2272
2249
|
--tw-ring-shadow: var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color, currentcolor);
|
|
@@ -3257,48 +3234,6 @@
|
|
|
3257
3234
|
inherits: false;
|
|
3258
3235
|
initial-value: 0;
|
|
3259
3236
|
}
|
|
3260
|
-
@property --tw-gradient-position {
|
|
3261
|
-
syntax: "*";
|
|
3262
|
-
inherits: false;
|
|
3263
|
-
}
|
|
3264
|
-
@property --tw-gradient-from {
|
|
3265
|
-
syntax: "<color>";
|
|
3266
|
-
inherits: false;
|
|
3267
|
-
initial-value: #0000;
|
|
3268
|
-
}
|
|
3269
|
-
@property --tw-gradient-via {
|
|
3270
|
-
syntax: "<color>";
|
|
3271
|
-
inherits: false;
|
|
3272
|
-
initial-value: #0000;
|
|
3273
|
-
}
|
|
3274
|
-
@property --tw-gradient-to {
|
|
3275
|
-
syntax: "<color>";
|
|
3276
|
-
inherits: false;
|
|
3277
|
-
initial-value: #0000;
|
|
3278
|
-
}
|
|
3279
|
-
@property --tw-gradient-stops {
|
|
3280
|
-
syntax: "*";
|
|
3281
|
-
inherits: false;
|
|
3282
|
-
}
|
|
3283
|
-
@property --tw-gradient-via-stops {
|
|
3284
|
-
syntax: "*";
|
|
3285
|
-
inherits: false;
|
|
3286
|
-
}
|
|
3287
|
-
@property --tw-gradient-from-position {
|
|
3288
|
-
syntax: "<length-percentage>";
|
|
3289
|
-
inherits: false;
|
|
3290
|
-
initial-value: 0%;
|
|
3291
|
-
}
|
|
3292
|
-
@property --tw-gradient-via-position {
|
|
3293
|
-
syntax: "<length-percentage>";
|
|
3294
|
-
inherits: false;
|
|
3295
|
-
initial-value: 50%;
|
|
3296
|
-
}
|
|
3297
|
-
@property --tw-gradient-to-position {
|
|
3298
|
-
syntax: "<length-percentage>";
|
|
3299
|
-
inherits: false;
|
|
3300
|
-
initial-value: 100%;
|
|
3301
|
-
}
|
|
3302
3237
|
@property --tw-leading {
|
|
3303
3238
|
syntax: "*";
|
|
3304
3239
|
inherits: false;
|
|
@@ -3569,15 +3504,6 @@
|
|
|
3569
3504
|
--tw-skew-y: initial;
|
|
3570
3505
|
--tw-divide-x-reverse: 0;
|
|
3571
3506
|
--tw-divide-y-reverse: 0;
|
|
3572
|
-
--tw-gradient-position: initial;
|
|
3573
|
-
--tw-gradient-from: #0000;
|
|
3574
|
-
--tw-gradient-via: #0000;
|
|
3575
|
-
--tw-gradient-to: #0000;
|
|
3576
|
-
--tw-gradient-stops: initial;
|
|
3577
|
-
--tw-gradient-via-stops: initial;
|
|
3578
|
-
--tw-gradient-from-position: 0%;
|
|
3579
|
-
--tw-gradient-via-position: 50%;
|
|
3580
|
-
--tw-gradient-to-position: 100%;
|
|
3581
3507
|
--tw-leading: initial;
|
|
3582
3508
|
--tw-font-weight: initial;
|
|
3583
3509
|
--tw-shadow: 0 0 #0000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fumadocs/base-ui",
|
|
3
|
-
"version": "16.7.
|
|
3
|
+
"version": "16.7.4",
|
|
4
4
|
"description": "The Base UI version of Fumadocs UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -142,8 +142,8 @@
|
|
|
142
142
|
"unified": "^11.0.5",
|
|
143
143
|
"@fumadocs/cli": "1.3.1",
|
|
144
144
|
"eslint-config-custom": "0.0.0",
|
|
145
|
-
"
|
|
146
|
-
"
|
|
145
|
+
"tsconfig": "0.0.0",
|
|
146
|
+
"fumadocs-core": "16.7.4"
|
|
147
147
|
},
|
|
148
148
|
"peerDependencies": {
|
|
149
149
|
"@takumi-rs/image-response": "*",
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
"react": "^19.2.0",
|
|
154
154
|
"react-dom": "^19.2.0",
|
|
155
155
|
"shiki": "*",
|
|
156
|
-
"fumadocs-core": "16.7.
|
|
156
|
+
"fumadocs-core": "16.7.4"
|
|
157
157
|
},
|
|
158
158
|
"peerDependenciesMeta": {
|
|
159
159
|
"shiki": {
|