fumadocs-ui 15.2.13 → 15.2.15
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 +4 -4
- package/css/shiki.css +14 -23
- package/dist/components/codeblock.d.ts.map +1 -1
- package/dist/components/codeblock.js +1 -1
- package/dist/layouts/home/navbar.d.ts +2 -2
- package/dist/layouts/home/navbar.d.ts.map +1 -1
- package/dist/layouts/home/navbar.js +6 -3
- package/dist/style.css +34 -24
- package/package.json +3 -3
package/css/preset.css
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
--fd-nav-height: 0px;
|
|
14
14
|
--fd-tocnav-height: 0px;
|
|
15
15
|
|
|
16
|
-
--fd-diff-remove
|
|
17
|
-
--fd-diff-remove-symbol
|
|
18
|
-
--fd-diff-add
|
|
19
|
-
--fd-diff-add-symbol
|
|
16
|
+
--color-fd-diff-remove: rgba(200, 10, 100, 0.12);
|
|
17
|
+
--color-fd-diff-remove-symbol: rgb(230, 10, 100);
|
|
18
|
+
--color-fd-diff-add: rgba(14, 180, 100, 0.12);
|
|
19
|
+
--color-fd-diff-add-symbol: rgb(10, 200, 100);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
@layer base {
|
package/css/shiki.css
CHANGED
|
@@ -1,51 +1,42 @@
|
|
|
1
|
-
.fd-codeblock pre > * {
|
|
2
|
-
display: grid;
|
|
3
|
-
font-size: 13px;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
1
|
.shiki:not(.not-fumadocs-codeblock *) {
|
|
7
2
|
code span {
|
|
8
3
|
color: var(--shiki-light);
|
|
9
4
|
}
|
|
10
5
|
|
|
11
|
-
code .diff.remove {
|
|
12
|
-
background-color: var(--fd-diff-remove-color);
|
|
13
|
-
opacity: 0.7;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
6
|
code .diff::before {
|
|
17
7
|
position: absolute;
|
|
18
8
|
left: 6px;
|
|
19
9
|
}
|
|
20
10
|
|
|
11
|
+
code .diff.remove {
|
|
12
|
+
opacity: 0.7;
|
|
13
|
+
@apply bg-fd-diff-remove;
|
|
14
|
+
}
|
|
15
|
+
|
|
21
16
|
code .diff.remove::before {
|
|
22
17
|
content: '-';
|
|
23
|
-
|
|
18
|
+
@apply text-fd-diff-remove-symbol;
|
|
24
19
|
}
|
|
25
20
|
|
|
26
21
|
code .diff.add {
|
|
27
|
-
|
|
22
|
+
@apply bg-fd-diff-add;
|
|
28
23
|
}
|
|
29
24
|
|
|
30
25
|
code .diff.add::before {
|
|
31
26
|
content: '+';
|
|
32
|
-
|
|
27
|
+
@apply text-fd-diff-add-symbol;
|
|
33
28
|
}
|
|
34
29
|
|
|
35
30
|
code .diff {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
width: calc(100% + 8 * var(--spacing));
|
|
32
|
+
|
|
33
|
+
@apply relative inline-block -mx-4 px-4;
|
|
39
34
|
}
|
|
40
35
|
|
|
41
36
|
.highlighted {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
in oklab,
|
|
46
|
-
var(--color-fd-primary) 10%,
|
|
47
|
-
transparent
|
|
48
|
-
);
|
|
37
|
+
width: calc(100% + 8 * var(--spacing));
|
|
38
|
+
|
|
39
|
+
@apply inline-block -mx-4 px-4 bg-fd-primary/10;
|
|
49
40
|
}
|
|
50
41
|
|
|
51
42
|
.highlighted-word {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeblock.d.ts","sourceRoot":"","sources":["../../src/components/codeblock.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACzD;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,aAAa,CAAC,EAAE,uBAAuB,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"codeblock.d.ts","sourceRoot":"","sources":["../../src/components/codeblock.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAE3E,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACzD;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IAEjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,aAAa,CAAC,EAAE,uBAAuB,CAAC;CACzC,CAAC;AAEF,eAAO,MAAM,GAAG,2HAef,CAAC;AAIF,eAAO,MAAM,SAAS;IA3CpB;;;;OAIG;WACI,SAAS;IAEhB;;;;OAIG;gBACS,OAAO;IAEnB;;;;OAIG;qBACc,OAAO;oBAER,uBAAuB;+CAqGxC,CAAC"}
|
|
@@ -7,7 +7,7 @@ import { ScrollArea, ScrollBar, ScrollViewport, } from '../components/ui/scroll-
|
|
|
7
7
|
import { useCopyButton } from '../utils/use-copy-button.js';
|
|
8
8
|
import { buttonVariants } from '../components/ui/button.js';
|
|
9
9
|
export const Pre = forwardRef(({ className, ...props }, ref) => {
|
|
10
|
-
return (_jsx("pre", { ref: ref, className: cn('p-4 focus-visible:outline-none', className), ...props, children: props.children }));
|
|
10
|
+
return (_jsx("pre", { ref: ref, className: cn('text-[13px] p-4 focus-visible:outline-none *:block *:w-full', className), ...props, children: props.children }));
|
|
11
11
|
});
|
|
12
12
|
Pre.displayName = 'Pre';
|
|
13
13
|
export const CodeBlock = forwardRef(({ title, allowCopy = true, keepBackground = false, icon, viewportProps, ...props }, ref) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type ComponentProps
|
|
1
|
+
import { type ComponentProps } from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
import { type LinkProps } from 'fumadocs-core/link';
|
|
4
4
|
import { BaseLinkItem } from '../../layouts/links.js';
|
|
5
5
|
import type { NavigationMenuContentProps, NavigationMenuTriggerProps } from '@radix-ui/react-navigation-menu';
|
|
6
|
-
export declare function Navbar(props:
|
|
6
|
+
export declare function Navbar(props: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export declare const NavbarMenu: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-navigation-menu").NavigationMenuItemProps & import("react").RefAttributes<HTMLLIElement>, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
8
8
|
export declare function NavbarMenuContent(props: NavigationMenuContentProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export declare function NavbarMenuTrigger(props: NavigationMenuTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../../src/layouts/home/navbar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../../src/layouts/home/navbar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,OAAO,CAAC;AACtD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAa,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAW/C,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC3B,MAAM,iCAAiC,CAAC;AAOzC,wBAAgB,MAAM,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,2CAkClD;AAED,eAAO,MAAM,UAAU,yNAAqB,CAAC;AAE7C,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,0BAA0B,2CAYlE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,0BAA0B,2CASlE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,SAAS,2CAc9C;AAED,QAAA,MAAM,YAAY;;8EAiBhB,CAAC;AAEH,wBAAgB,UAAU,CAAC,EACzB,IAAI,EACJ,OAAO,EACP,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,YAAY,CAAC,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,2CAczE"}
|
|
@@ -12,12 +12,15 @@ const navItemVariants = cva('inline-flex items-center gap-1 p-2 text-fd-muted-fo
|
|
|
12
12
|
export function Navbar(props) {
|
|
13
13
|
const [value, setValue] = useState('');
|
|
14
14
|
const { isTransparent } = useNav();
|
|
15
|
-
return (_jsx(NavigationMenu, { value: value, onValueChange: setValue, asChild: true, children: _jsxs("header", { id: "nd-nav", ...props, className: cn('fixed left-
|
|
16
|
-
'bg-fd-background/80 backdrop-blur-lg', props.className),
|
|
15
|
+
return (_jsx(NavigationMenu, { value: value, onValueChange: setValue, asChild: true, children: _jsxs("header", { id: "nd-nav", ...props, className: cn('fixed left-(--fd-nav-left) top-(--fd-banner-height) z-40 box-content w-full max-w-fd-container -translate-x-1/2 border-b border-fd-foreground/10 transition-colors lg:mt-2 lg:w-[calc(100%-1rem)] lg:rounded-2xl lg:border', value.length > 0 ? 'shadow-lg' : 'shadow-sm', (!isTransparent || value.length > 0) &&
|
|
16
|
+
'bg-fd-background/80 backdrop-blur-lg', props.className), style: {
|
|
17
|
+
'--fd-nav-left': 'calc(50% - var(--removed-body-scroll-bar-size,0px) / 2)',
|
|
18
|
+
...props.style,
|
|
19
|
+
}, children: [_jsx(NavigationMenuList, { className: "flex h-14 w-full flex-row items-center px-4 lg:h-12", asChild: true, children: _jsx("nav", { children: props.children }) }), _jsx(NavigationMenuViewport, {})] }) }));
|
|
17
20
|
}
|
|
18
21
|
export const NavbarMenu = NavigationMenuItem;
|
|
19
22
|
export function NavbarMenuContent(props) {
|
|
20
|
-
return (_jsx(NavigationMenuContent, { ...props, className: cn('grid grid-cols-1 gap-3
|
|
23
|
+
return (_jsx(NavigationMenuContent, { ...props, className: cn('grid grid-cols-1 gap-3 p-4 md:grid-cols-2 lg:grid-cols-3', props.className), children: props.children }));
|
|
21
24
|
}
|
|
22
25
|
export function NavbarMenuTrigger(props) {
|
|
23
26
|
return (_jsx(NavigationMenuTrigger, { ...props, className: cn(navItemVariants(), 'rounded-md', props.className), children: props.children }));
|
package/dist/style.css
CHANGED
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
--fd-banner-height: 0px;
|
|
78
78
|
--fd-nav-height: 0px;
|
|
79
79
|
--fd-tocnav-height: 0px;
|
|
80
|
-
--fd-diff-remove
|
|
81
|
-
--fd-diff-remove-symbol
|
|
82
|
-
--fd-diff-add
|
|
83
|
-
--fd-diff-add-symbol
|
|
80
|
+
--color-fd-diff-remove: rgba(200, 10, 100, 0.12);
|
|
81
|
+
--color-fd-diff-remove-symbol: rgb(230, 10, 100);
|
|
82
|
+
--color-fd-diff-add: rgba(14, 180, 100, 0.12);
|
|
83
|
+
--color-fd-diff-add-symbol: rgb(10, 200, 100);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
@layer base {
|
|
@@ -348,6 +348,9 @@
|
|
|
348
348
|
.bottom-1\.5 {
|
|
349
349
|
bottom: calc(var(--spacing) * 1.5);
|
|
350
350
|
}
|
|
351
|
+
.left-\(--fd-nav-left\) {
|
|
352
|
+
left: var(--fd-nav-left);
|
|
353
|
+
}
|
|
351
354
|
.left-1\/2 {
|
|
352
355
|
left: calc(1/2 * 100%);
|
|
353
356
|
}
|
|
@@ -1432,9 +1435,6 @@
|
|
|
1432
1435
|
.pb-2 {
|
|
1433
1436
|
padding-bottom: calc(var(--spacing) * 2);
|
|
1434
1437
|
}
|
|
1435
|
-
.pb-4 {
|
|
1436
|
-
padding-bottom: calc(var(--spacing) * 4);
|
|
1437
|
-
}
|
|
1438
1438
|
.pb-6 {
|
|
1439
1439
|
padding-bottom: calc(var(--spacing) * 6);
|
|
1440
1440
|
}
|
|
@@ -1649,6 +1649,16 @@
|
|
|
1649
1649
|
grid-row-start: 1;
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
|
+
.\*\:block {
|
|
1653
|
+
:is(& > *) {
|
|
1654
|
+
display: block;
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
.\*\:w-full {
|
|
1658
|
+
:is(& > *) {
|
|
1659
|
+
width: 100%;
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1652
1662
|
.group-hover\:opacity-100 {
|
|
1653
1663
|
&:is(:where(.group):hover *) {
|
|
1654
1664
|
@media (hover: hover) {
|
|
@@ -2351,45 +2361,45 @@
|
|
|
2351
2361
|
--color-fd-secondary: hsl(0, 0%, 18%);
|
|
2352
2362
|
--color-fd-muted-foreground: hsl(0, 0%, 72%);
|
|
2353
2363
|
}
|
|
2354
|
-
.fd-codeblock pre > * {
|
|
2355
|
-
display: grid;
|
|
2356
|
-
font-size: 13px;
|
|
2357
|
-
}
|
|
2358
2364
|
.shiki:not(.not-fumadocs-codeblock *) {
|
|
2359
2365
|
code span {
|
|
2360
2366
|
color: var(--shiki-light);
|
|
2361
2367
|
}
|
|
2362
|
-
code .diff.remove {
|
|
2363
|
-
background-color: var(--fd-diff-remove-color);
|
|
2364
|
-
opacity: 0.7;
|
|
2365
|
-
}
|
|
2366
2368
|
code .diff::before {
|
|
2367
2369
|
position: absolute;
|
|
2368
2370
|
left: 6px;
|
|
2369
2371
|
}
|
|
2372
|
+
code .diff.remove {
|
|
2373
|
+
opacity: 0.7;
|
|
2374
|
+
background-color: var(--color-fd-diff-remove);
|
|
2375
|
+
}
|
|
2370
2376
|
code .diff.remove::before {
|
|
2371
2377
|
content: '-';
|
|
2372
|
-
color: var(--fd-diff-remove-symbol
|
|
2378
|
+
color: var(--color-fd-diff-remove-symbol);
|
|
2373
2379
|
}
|
|
2374
2380
|
code .diff.add {
|
|
2375
|
-
background-color: var(--fd-diff-add
|
|
2381
|
+
background-color: var(--color-fd-diff-add);
|
|
2376
2382
|
}
|
|
2377
2383
|
code .diff.add::before {
|
|
2378
2384
|
content: '+';
|
|
2379
|
-
color: var(--fd-diff-add-symbol
|
|
2385
|
+
color: var(--color-fd-diff-add-symbol);
|
|
2380
2386
|
}
|
|
2381
2387
|
code .diff {
|
|
2382
|
-
|
|
2383
|
-
padding: 0 16px;
|
|
2388
|
+
width: calc(100% + 8 * var(--spacing));
|
|
2384
2389
|
position: relative;
|
|
2390
|
+
margin-inline: calc(var(--spacing) * -4);
|
|
2391
|
+
display: inline-block;
|
|
2392
|
+
padding-inline: calc(var(--spacing) * 4);
|
|
2385
2393
|
}
|
|
2386
2394
|
.highlighted {
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2395
|
+
width: calc(100% + 8 * var(--spacing));
|
|
2396
|
+
margin-inline: calc(var(--spacing) * -4);
|
|
2397
|
+
display: inline-block;
|
|
2398
|
+
background-color: color-mix(in srgb, hsl(0, 0%, 9%) 10%, transparent);
|
|
2390
2399
|
@supports (color: color-mix(in lab, red, red)) {
|
|
2391
|
-
background-color: color-mix(
|
|
2400
|
+
background-color: color-mix(in oklab, var(--color-fd-primary) 10%, transparent);
|
|
2392
2401
|
}
|
|
2402
|
+
padding-inline: calc(var(--spacing) * 4);
|
|
2393
2403
|
}
|
|
2394
2404
|
.highlighted-word {
|
|
2395
2405
|
padding: 1px 2px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "15.2.
|
|
3
|
+
"version": "15.2.15",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"postcss-selector-parser": "^7.1.0",
|
|
88
88
|
"react-medium-image-zoom": "^5.2.14",
|
|
89
89
|
"tailwind-merge": "^3.2.0",
|
|
90
|
-
"fumadocs-core": "15.2.
|
|
90
|
+
"fumadocs-core": "15.2.15"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
93
|
"@next/eslint-plugin-next": "^15.3.1",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"tsc-alias": "^1.8.15",
|
|
101
101
|
"@fumadocs/cli": "0.1.1",
|
|
102
102
|
"eslint-config-custom": "0.0.0",
|
|
103
|
-
"fumadocs-core": "15.2.
|
|
103
|
+
"fumadocs-core": "15.2.15",
|
|
104
104
|
"tsconfig": "0.0.0"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|