fumadocs-ui 16.6.8 → 16.6.9
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 -0
- package/css/lib/base.css +1 -1
- package/dist/components/codeblock.rsc.d.ts +21 -0
- package/dist/components/codeblock.rsc.js +23 -0
- package/dist/components/dynamic-codeblock.js +1 -1
- package/dist/components/sidebar/base.js +2 -2
- package/dist/style.css +11 -6
- package/package.json +4 -4
package/css/generated/shared.css
CHANGED
package/css/lib/base.css
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CodeBlockProps } from "./codeblock.js";
|
|
2
|
+
import * as react from "react";
|
|
3
|
+
import { HighlightOptions } from "fumadocs-core/highlight";
|
|
4
|
+
|
|
5
|
+
//#region src/components/codeblock.rsc.d.ts
|
|
6
|
+
type ServerCodeBlockProps = HighlightOptions & {
|
|
7
|
+
code: string;
|
|
8
|
+
/**
|
|
9
|
+
* Extra props for the underlying `<CodeBlock />` component.
|
|
10
|
+
*
|
|
11
|
+
* Ignored if you defined your own `pre` component in `components`.
|
|
12
|
+
*/
|
|
13
|
+
codeblock?: CodeBlockProps;
|
|
14
|
+
};
|
|
15
|
+
declare function ServerCodeBlock({
|
|
16
|
+
code,
|
|
17
|
+
codeblock,
|
|
18
|
+
...options
|
|
19
|
+
}: ServerCodeBlockProps): Promise<react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | (string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined)>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ServerCodeBlock, ServerCodeBlockProps };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cn } from "../utils/cn.js";
|
|
2
|
+
import { CodeBlock, Pre } from "./codeblock.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { highlight } from "fumadocs-core/highlight";
|
|
5
|
+
|
|
6
|
+
//#region src/components/codeblock.rsc.tsx
|
|
7
|
+
async function ServerCodeBlock({ code, codeblock, ...options }) {
|
|
8
|
+
return await highlight(code, {
|
|
9
|
+
...options,
|
|
10
|
+
components: {
|
|
11
|
+
pre: (props) => {
|
|
12
|
+
CodeBlock, {
|
|
13
|
+
...props,
|
|
14
|
+
...codeblock
|
|
15
|
+
}, cn("my-0", props.className, codeblock?.className), Pre, props.children;
|
|
16
|
+
},
|
|
17
|
+
...options.components
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { ServerCodeBlock };
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { DynamicCodeBlock as DynamicCodeBlock$1 } from "./dynamic-codeblock.core.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { useShikiConfigOptional } from "fumadocs-core/highlight/core/client";
|
|
6
5
|
import { configDefault } from "fumadocs-core/highlight";
|
|
6
|
+
import { useShikiConfigOptional } from "fumadocs-core/highlight/core/client";
|
|
7
7
|
|
|
8
8
|
//#region src/components/dynamic-codeblock.tsx
|
|
9
9
|
function DynamicCodeBlock(props) {
|
|
@@ -179,7 +179,7 @@ function SidebarFolderTrigger({ children, ...props }) {
|
|
|
179
179
|
...props,
|
|
180
180
|
children: [children, /* @__PURE__ */ jsx(ChevronDown, {
|
|
181
181
|
"data-icon": true,
|
|
182
|
-
className: cn("ms-auto transition-transform", !open && "-rotate-90")
|
|
182
|
+
className: cn("ms-auto transition-transform", !open && "-rotate-90 rtl:rotate-90")
|
|
183
183
|
})]
|
|
184
184
|
});
|
|
185
185
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -206,7 +206,7 @@ function SidebarFolderLink({ children, active = false, ...props }) {
|
|
|
206
206
|
...props,
|
|
207
207
|
children: [children, collapsible && /* @__PURE__ */ jsx(ChevronDown, {
|
|
208
208
|
"data-icon": true,
|
|
209
|
-
className: cn("ms-auto transition-transform", !open && "-rotate-90")
|
|
209
|
+
className: cn("ms-auto transition-transform", !open && "-rotate-90 rtl:rotate-90")
|
|
210
210
|
})]
|
|
211
211
|
});
|
|
212
212
|
}
|
package/dist/style.css
CHANGED
|
@@ -268,15 +268,15 @@
|
|
|
268
268
|
.fd-steps {
|
|
269
269
|
counter-reset: step;
|
|
270
270
|
position: relative;
|
|
271
|
-
margin-
|
|
272
|
-
border-
|
|
273
|
-
border-
|
|
274
|
-
padding-
|
|
271
|
+
margin-inline-start: calc(var(--spacing) * 2);
|
|
272
|
+
border-inline-start-style: var(--tw-border-style);
|
|
273
|
+
border-inline-start-width: 1px;
|
|
274
|
+
padding-inline-start: calc(var(--spacing) * 6);
|
|
275
275
|
@media (width >= 40rem) {
|
|
276
|
-
margin-
|
|
276
|
+
margin-inline-start: calc(var(--spacing) * 4);
|
|
277
277
|
}
|
|
278
278
|
@media (width >= 40rem) {
|
|
279
|
-
padding-
|
|
279
|
+
padding-inline-start: calc(var(--spacing) * 7);
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
.absolute {
|
|
@@ -2726,6 +2726,11 @@
|
|
|
2726
2726
|
scale: var(--tw-scale-x) var(--tw-scale-y);
|
|
2727
2727
|
}
|
|
2728
2728
|
}
|
|
2729
|
+
.rtl\:rotate-90 {
|
|
2730
|
+
&:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
|
|
2731
|
+
rotate: 90deg;
|
|
2732
|
+
}
|
|
2733
|
+
}
|
|
2729
2734
|
.rtl\:rotate-180 {
|
|
2730
2735
|
&:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
|
|
2731
2736
|
rotate: 180deg;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "16.6.
|
|
3
|
+
"version": "16.6.9",
|
|
4
4
|
"description": "The Radix UI version of Fumadocs UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -139,16 +139,16 @@
|
|
|
139
139
|
"unified": "^11.0.5",
|
|
140
140
|
"@fumadocs/cli": "1.2.5",
|
|
141
141
|
"eslint-config-custom": "0.0.0",
|
|
142
|
-
"fumadocs-core": "16.6.
|
|
142
|
+
"fumadocs-core": "16.6.9",
|
|
143
143
|
"tsconfig": "0.0.0"
|
|
144
144
|
},
|
|
145
145
|
"peerDependencies": {
|
|
146
|
-
"@takumi-rs/image-response": "
|
|
146
|
+
"@takumi-rs/image-response": "*",
|
|
147
147
|
"@types/react": "*",
|
|
148
148
|
"next": "16.x.x",
|
|
149
149
|
"react": "^19.2.0",
|
|
150
150
|
"react-dom": "^19.2.0",
|
|
151
|
-
"fumadocs-core": "16.6.
|
|
151
|
+
"fumadocs-core": "16.6.9"
|
|
152
152
|
},
|
|
153
153
|
"peerDependenciesMeta": {
|
|
154
154
|
"next": {
|