fumadocs-ui 15.7.11 → 15.7.12
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.
|
@@ -38,5 +38,5 @@ export declare function CodeBlock({ ref, title, allowCopy, keepBackground, icon,
|
|
|
38
38
|
export declare function CodeBlockTabs({ ref, ...props }: ComponentProps<typeof Tabs>): import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
export declare function CodeBlockTabsList(props: ComponentProps<typeof TabsList>): import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
export declare function CodeBlockTabsTrigger({ children, ...props }: ComponentProps<typeof TabsTrigger>): import("react/jsx-runtime").JSX.Element;
|
|
41
|
-
export declare function CodeBlockTab(
|
|
41
|
+
export declare function CodeBlockTab(props: ComponentProps<typeof TabsContent>): import("react/jsx-runtime").JSX.Element;
|
|
42
42
|
//# sourceMappingURL=codeblock.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeblock.d.ts","sourceRoot":"","sources":["../../src/components/codeblock.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,cAAc,EACnB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAIf,OAAO,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAGpC,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,QAAQ,CAAC;IAC9D;;;;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,cAAc,CAAC,WAAW,CAAC,CAAC;IAE5C;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAEnC,OAAO,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EACD,GAAG,KAAK,EACT,EAAE,cAAc,2CAkEhB;AAwCD,wBAAgB,aAAa,CAAC,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,2CA2B3E;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,QAAQ,CAAC,2CAYvE;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,WAAW,CAAC,2CAapC;AAGD,wBAAgB,YAAY,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,WAAW,CAAC,2CAErE"}
|
|
@@ -11,11 +11,12 @@ const TabsContext = createContext(null);
|
|
|
11
11
|
export function Pre(props) {
|
|
12
12
|
return (_jsx("pre", { ...props, className: cn('min-w-full w-max *:flex *:flex-col', props.className), children: props.children }));
|
|
13
13
|
}
|
|
14
|
-
export function CodeBlock({ ref, title, allowCopy, keepBackground = false, icon, viewportProps = {}, children, Actions = (props) => (_jsx("div", { ...props, className: cn('empty:hidden', props.className) })), ...props }) {
|
|
14
|
+
export function CodeBlock({ ref, title, allowCopy = true, keepBackground = false, icon, viewportProps = {}, children, Actions = (props) => (_jsx("div", { ...props, className: cn('empty:hidden', props.className) })), ...props }) {
|
|
15
15
|
const inTab = useContext(TabsContext) !== null;
|
|
16
16
|
const areaRef = useRef(null);
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
return (_jsxs("figure", { ref: ref, dir: "ltr", ...props, className: cn(inTab
|
|
18
|
+
? 'bg-fd-secondary -mx-px -mb-px last:rounded-b-xl'
|
|
19
|
+
: 'my-4 bg-fd-card rounded-xl', keepBackground && 'bg-(--shiki-light-bg) dark:bg-(--shiki-dark-bg)', 'shiki relative border shadow-sm outline-none not-prose overflow-hidden text-sm', props.className), children: [title ? (_jsxs("div", { className: "flex text-fd-muted-foreground items-center gap-2 h-9.5 border-b px-4", children: [typeof icon === 'string' ? (_jsx("div", { className: "[&_svg]:size-3.5", dangerouslySetInnerHTML: {
|
|
19
20
|
__html: icon,
|
|
20
21
|
} })) : (icon), _jsx("figcaption", { className: "flex-1 truncate", children: title }), Actions({
|
|
21
22
|
className: '-me-2',
|
|
@@ -57,13 +58,12 @@ export function CodeBlockTabs({ ref, ...props }) {
|
|
|
57
58
|
}), [nested]), children: props.children }) }));
|
|
58
59
|
}
|
|
59
60
|
export function CodeBlockTabsList(props) {
|
|
60
|
-
|
|
61
|
-
return (_jsxs(TabsList, { ...props, className: cn('flex flex-row *:first:ms-2 overflow-x-auto text-fd-muted-foreground', props.className), children: [props.children, !nested && (_jsx(CopyButton, { className: "sticky ms-auto right-2 bg-fd-card backdrop-blur-sm", containerRef: containerRef }))] }));
|
|
61
|
+
return (_jsx(TabsList, { ...props, className: cn('flex flex-row px-2 overflow-x-auto text-fd-muted-foreground', props.className), children: props.children }));
|
|
62
62
|
}
|
|
63
63
|
export function CodeBlockTabsTrigger({ children, ...props }) {
|
|
64
64
|
return (_jsxs(TabsTrigger, { ...props, className: cn('relative group inline-flex text-sm font-medium text-nowrap items-center transition-colors gap-2 px-2 py-1.5 hover:text-fd-accent-foreground data-[state=active]:text-fd-primary [&_svg]:size-3.5', props.className), children: [_jsx("div", { className: "absolute inset-x-2 bottom-0 h-px group-data-[state=active]:bg-fd-primary" }), children] }));
|
|
65
65
|
}
|
|
66
|
-
// TODO: currently Vite RSC plugin has problem with
|
|
67
|
-
export function CodeBlockTab(
|
|
68
|
-
return _jsx(TabsContent, {
|
|
66
|
+
// TODO: currently Vite RSC plugin has problem with `asChild` due to children is automatically wrapped in <Fragment />, maybe revisit this in future
|
|
67
|
+
export function CodeBlockTab(props) {
|
|
68
|
+
return _jsx(TabsContent, { ...props });
|
|
69
69
|
}
|
package/dist/style.css
CHANGED
|
@@ -1919,11 +1919,10 @@
|
|
|
1919
1919
|
padding-top: calc(var(--spacing) * 0);
|
|
1920
1920
|
}
|
|
1921
1921
|
}
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
}
|
|
1922
|
+
.last\:rounded-b-xl {
|
|
1923
|
+
&:last-child {
|
|
1924
|
+
border-bottom-right-radius: var(--radius-xl);
|
|
1925
|
+
border-bottom-left-radius: var(--radius-xl);
|
|
1927
1926
|
}
|
|
1928
1927
|
}
|
|
1929
1928
|
.last\:pb-0 {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "15.7.
|
|
3
|
+
"version": "15.7.12",
|
|
4
4
|
"description": "The framework for building a documentation website in Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"NextJs",
|
|
@@ -121,20 +121,20 @@
|
|
|
121
121
|
"react-medium-image-zoom": "^5.3.0",
|
|
122
122
|
"scroll-into-view-if-needed": "^3.1.0",
|
|
123
123
|
"tailwind-merge": "^3.3.1",
|
|
124
|
-
"fumadocs-core": "15.7.
|
|
124
|
+
"fumadocs-core": "15.7.12"
|
|
125
125
|
},
|
|
126
126
|
"devDependencies": {
|
|
127
|
-
"@next/eslint-plugin-next": "^15.5.
|
|
127
|
+
"@next/eslint-plugin-next": "^15.5.3",
|
|
128
128
|
"@tailwindcss/cli": "^4.1.13",
|
|
129
129
|
"@types/lodash.merge": "^4.6.9",
|
|
130
|
-
"@types/react": "^19.1.
|
|
130
|
+
"@types/react": "^19.1.13",
|
|
131
131
|
"@types/react-dom": "^19.1.9",
|
|
132
|
-
"next": "15.5.
|
|
132
|
+
"next": "15.5.3",
|
|
133
133
|
"tailwindcss": "^4.1.13",
|
|
134
134
|
"tsc-alias": "^1.8.16",
|
|
135
135
|
"@fumadocs/cli": "1.0.1",
|
|
136
136
|
"eslint-config-custom": "0.0.0",
|
|
137
|
-
"fumadocs-core": "15.7.
|
|
137
|
+
"fumadocs-core": "15.7.12",
|
|
138
138
|
"tsconfig": "0.0.0"
|
|
139
139
|
},
|
|
140
140
|
"peerDependencies": {
|