fumadocs-ui 11.0.3 → 11.0.5

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.
Files changed (33) hide show
  1. package/dist/components/dialog/{search-algolia.d.mts → search-algolia.d.ts} +1 -1
  2. package/dist/components/dialog/{search-default.d.mts → search-default.d.ts} +1 -1
  3. package/dist/{i18n.d.mts → i18n.d.ts} +2 -2
  4. package/dist/{layout-VyGuUztg.d.mts → layout-2oBm-QYW.d.ts} +2 -1
  5. package/dist/layout.client.d.ts +4 -0
  6. package/dist/layout.client.js +2 -1
  7. package/dist/{layout.d.mts → layout.d.ts} +1 -1
  8. package/dist/{mdx.client.d.mts → mdx.client.d.ts} +1 -1
  9. package/dist/{mdx.d.mts → mdx.d.ts} +1 -1
  10. package/dist/{page.d.mts → page.d.ts} +1 -1
  11. package/dist/{provider.d.mts → provider.d.ts} +4 -4
  12. package/dist/tailwind-plugin.cjs +623 -0
  13. package/dist/tailwind-plugin.js +7 -42
  14. package/package.json +18 -17
  15. package/dist/layout.client.d.mts +0 -4
  16. /package/dist/components/{accordion.d.mts → accordion.d.ts} +0 -0
  17. /package/dist/components/{api.d.mts → api.d.ts} +0 -0
  18. /package/dist/components/{callout.d.mts → callout.d.ts} +0 -0
  19. /package/dist/components/{card.d.mts → card.d.ts} +0 -0
  20. /package/dist/components/{codeblock.d.mts → codeblock.d.ts} +0 -0
  21. /package/dist/components/dialog/{search.d.mts → search.d.ts} +0 -0
  22. /package/dist/components/{files.d.mts → files.d.ts} +0 -0
  23. /package/dist/components/{heading.d.mts → heading.d.ts} +0 -0
  24. /package/dist/components/{image-zoom.d.mts → image-zoom.d.ts} +0 -0
  25. /package/dist/components/{inline-toc.d.mts → inline-toc.d.ts} +0 -0
  26. /package/dist/components/{roll-button.d.mts → roll-button.d.ts} +0 -0
  27. /package/dist/components/{steps.d.mts → steps.d.ts} +0 -0
  28. /package/dist/components/{tabs.d.mts → tabs.d.ts} +0 -0
  29. /package/dist/components/{type-table.d.mts → type-table.d.ts} +0 -0
  30. /package/dist/{i18n-dw7ODAws.d.mts → i18n-dw7ODAws.d.ts} +0 -0
  31. /package/dist/{page.client.d.mts → page.client.d.ts} +0 -0
  32. /package/dist/{tree-cqNEopxM.d.mts → tree-cqNEopxM.d.ts} +0 -0
  33. /package/dist/twoslash/{popup.d.mts → popup.d.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { SearchIndex } from 'algoliasearch/lite';
2
2
  import { Options } from 'fumadocs-core/search-algolia/client';
3
3
  import { ReactNode } from 'react';
4
- import { SharedProps } from './search.mjs';
4
+ import { SharedProps } from './search.js';
5
5
  import 'fumadocs-core/search/shared';
6
6
 
7
7
  interface AlgoliaSearchDialogProps extends SharedProps {
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { SharedProps } from './search.mjs';
2
+ import { SharedProps } from './search.js';
3
3
  import 'fumadocs-core/search/shared';
4
4
 
5
5
  interface DefaultSearchDialogProps extends SharedProps {
@@ -1,7 +1,7 @@
1
1
  import { SelectProps } from '@radix-ui/react-select';
2
2
  import { ReactNode } from 'react';
3
- import { N as NamedTranslation } from './i18n-dw7ODAws.mjs';
4
- export { T as Translations } from './i18n-dw7ODAws.mjs';
3
+ import { N as NamedTranslation } from './i18n-dw7ODAws.js';
4
+ export { T as Translations } from './i18n-dw7ODAws.js';
5
5
 
6
6
  type LanguageSelectProps = Omit<SelectProps, 'value' | 'onValueChange'>;
7
7
  declare function LanguageSelect({ ...props }: LanguageSelectProps): React.ReactElement;
@@ -11,6 +11,7 @@ interface NavProps {
11
11
  url?: string;
12
12
  items: LinkItem[];
13
13
  enableSidebar: boolean;
14
+ enableSearch?: boolean;
14
15
  /**
15
16
  * When to use transparent navbar
16
17
  * @defaultValue none
@@ -18,7 +19,7 @@ interface NavProps {
18
19
  transparentMode?: 'always' | 'top' | 'none';
19
20
  children?: ReactNode;
20
21
  }
21
- declare function Nav({ title, url, items, transparentMode, enableSidebar, children, }: NavProps): React.ReactElement;
22
+ declare function Nav({ title, url, items, transparentMode, enableSidebar, enableSearch, children, }: NavProps): React.ReactElement;
22
23
 
23
24
  interface SidebarProps {
24
25
  items: LinkItem[];
@@ -0,0 +1,4 @@
1
+ export { T as TreeContextProvider } from './tree-cqNEopxM.js';
2
+ export { N as Nav, S as Sidebar } from './layout-2oBm-QYW.js';
3
+ import 'fumadocs-core/server';
4
+ import 'react';
@@ -98,6 +98,7 @@ function Nav({
98
98
  items,
99
99
  transparentMode = "none",
100
100
  enableSidebar,
101
+ enableSearch = true,
101
102
  children
102
103
  }) {
103
104
  const [transparent, setTransparent] = useState(transparentMode !== "none");
@@ -132,7 +133,7 @@ function Nav({
132
133
  children,
133
134
  items.filter((item) => item.type === "main" || !item.type).map((item) => /* @__PURE__ */ jsx2(NavItem, { item, className: "max-lg:hidden" }, item.url)),
134
135
  /* @__PURE__ */ jsxs2("div", { className: "flex flex-1 flex-row items-center justify-end md:gap-2", children: [
135
- /* @__PURE__ */ jsx2(SearchToggle, {}),
136
+ enableSearch ? /* @__PURE__ */ jsx2(SearchToggle, {}) : null,
136
137
  enableSidebar ? /* @__PURE__ */ jsxs2(Fragment, { children: [
137
138
  /* @__PURE__ */ jsx2(ThemeToggle, { className: "max-md:hidden" }),
138
139
  /* @__PURE__ */ jsx2(
@@ -1,3 +1,3 @@
1
1
  import 'fumadocs-core/server';
2
2
  import 'react';
3
- export { B as BaseLayoutProps, b as DocsLayout, D as DocsLayoutProps, a as Layout, L as LinkItem } from './layout-VyGuUztg.mjs';
3
+ export { B as BaseLayoutProps, b as DocsLayout, D as DocsLayoutProps, a as Layout, L as LinkItem } from './layout-2oBm-QYW.js';
@@ -1,4 +1,4 @@
1
- import { CodeBlockProps } from './components/codeblock.mjs';
1
+ import { CodeBlockProps } from './components/codeblock.js';
2
2
  import 'react';
3
3
 
4
4
  declare function Pre({ title, allowCopy, icon, ...props }: CodeBlockProps): React.ReactElement;
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { FC, HTMLAttributes, AnchorHTMLAttributes, ImgHTMLAttributes, TableHTMLAttributes } from 'react';
3
- import { Card, Cards } from './components/card.mjs';
3
+ import { Card, Cards } from './components/card.js';
4
4
  import 'fumadocs-core/link';
5
5
 
6
6
  declare function Image(props: ImgHTMLAttributes<HTMLImageElement>): React.ReactElement;
@@ -1,7 +1,7 @@
1
1
  import * as React$1 from 'react';
2
2
  import { ReactNode, HTMLAttributes } from 'react';
3
3
  import { TableOfContents, TOCItemType } from 'fumadocs-core/server';
4
- import { FooterProps } from './page.client.mjs';
4
+ import { FooterProps } from './page.client.js';
5
5
 
6
6
  type TableOfContentOptions = Omit<TOCProps, 'items'> & {
7
7
  enabled: boolean;
@@ -1,9 +1,9 @@
1
1
  import * as React$1 from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { DefaultSearchDialogProps } from './components/dialog/search-default.mjs';
4
- import { SearchLink, SharedProps } from './components/dialog/search.mjs';
5
- export { u as useI18n } from './i18n-dw7ODAws.mjs';
6
- export { u as useTreeContext } from './tree-cqNEopxM.mjs';
3
+ import { DefaultSearchDialogProps } from './components/dialog/search-default.js';
4
+ import { SearchLink, SharedProps } from './components/dialog/search.js';
5
+ export { u as useI18n } from './i18n-dw7ODAws.js';
6
+ export { u as useTreeContext } from './tree-cqNEopxM.js';
7
7
  import 'fumadocs-core/search/shared';
8
8
  import 'fumadocs-core/server';
9
9
 
@@ -0,0 +1,623 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/tailwind-plugin.ts
31
+ var tailwind_plugin_exports = {};
32
+ __export(tailwind_plugin_exports, {
33
+ createPreset: () => createPreset,
34
+ docsUi: () => docsUi,
35
+ presets: () => presets
36
+ });
37
+ module.exports = __toCommonJS(tailwind_plugin_exports);
38
+ var import_typography = __toESM(require("@tailwindcss/typography"), 1);
39
+ var import_plugin = __toESM(require("tailwindcss/plugin"), 1);
40
+
41
+ // src/theme/colors.ts
42
+ var defaultPreset = {
43
+ light: {
44
+ background: "0 0% 98%",
45
+ foreground: "0 0% 3.9%",
46
+ muted: "0 0% 96.1%",
47
+ "muted-foreground": "0 0% 45.1%",
48
+ popover: "0 0% 100%",
49
+ "popover-foreground": "0 0% 15.1%",
50
+ card: "0 0% 99.7%",
51
+ "card-foreground": "0 0% 3.9%",
52
+ border: "0 0% 89.8%",
53
+ primary: "0 0% 9%",
54
+ "primary-foreground": "0 0% 98%",
55
+ secondary: "0 0% 96.1%",
56
+ "secondary-foreground": "0 0% 9%",
57
+ accent: "0 0% 94.1%",
58
+ "accent-foreground": "0 0% 9%",
59
+ ring: "0 0% 63.9%"
60
+ },
61
+ dark: {
62
+ background: "0 0% 3.9%",
63
+ foreground: "0 0% 98%",
64
+ muted: "0 0% 12.9%",
65
+ "muted-foreground": "0 0% 60.9%",
66
+ popover: "0 0% 7%",
67
+ "popover-foreground": "0 0% 88%",
68
+ card: "0 0% 8%",
69
+ "card-foreground": "0 0% 98%",
70
+ border: "0 0% 18%",
71
+ primary: "0 0% 98%",
72
+ "primary-foreground": "0 0% 9%",
73
+ secondary: "0 0% 12.9%",
74
+ "secondary-foreground": "0 0% 98%",
75
+ accent: "0 0% 14.9%",
76
+ "accent-foreground": "0 0% 90%",
77
+ ring: "0 0% 14.9%"
78
+ }
79
+ };
80
+ var oceanPreset = {
81
+ light: {
82
+ background: "0 0% 98%",
83
+ foreground: "0 0% 3.9%",
84
+ muted: "220 90% 96.1%",
85
+ "muted-foreground": "0 0% 45.1%",
86
+ popover: "0 0% 98%",
87
+ "popover-foreground": "0 0% 15.1%",
88
+ card: "220 50% 98%",
89
+ "card-foreground": "0 0% 3.9%",
90
+ border: "220 50% 89.8%",
91
+ primary: "210 80% 20.2%",
92
+ "primary-foreground": "0 0% 98%",
93
+ secondary: "220 90% 96.1%",
94
+ "secondary-foreground": "0 0% 9%",
95
+ accent: "220 50% 94.1%",
96
+ "accent-foreground": "0 0% 9%",
97
+ ring: "220 100% 63.9%"
98
+ },
99
+ dark: {
100
+ "card-foreground": "220 60% 94.5%",
101
+ "primary-foreground": "0 0% 9%",
102
+ "secondary-foreground": "220 80% 90%",
103
+ ring: "205 100% 85%",
104
+ card: "220 50% 10%",
105
+ muted: "220 50% 10%",
106
+ "muted-foreground": "220 30% 65%",
107
+ "accent-foreground": "220 80% 90%",
108
+ popover: "220 50% 10%",
109
+ "popover-foreground": "220 30% 65%",
110
+ accent: "220 40% 20%",
111
+ secondary: "220 50% 20%",
112
+ background: "220 60% 6%",
113
+ foreground: "220 60% 94.5%",
114
+ primary: "205 100% 85%",
115
+ border: "220 50% 20%"
116
+ },
117
+ css: {
118
+ ".dark body": {
119
+ "background-image": "linear-gradient(rgba(5, 105, 255, 0.15), transparent 20rem, transparent)"
120
+ }
121
+ }
122
+ };
123
+ var neutral = {
124
+ light: {
125
+ background: "0 0% 96%",
126
+ foreground: "0 0% 3.9%",
127
+ muted: "0 0% 96.1%",
128
+ "muted-foreground": "0 0% 45.1%",
129
+ popover: "0 0% 100%",
130
+ "popover-foreground": "0 0% 15.1%",
131
+ card: "0 0% 94.7%",
132
+ "card-foreground": "0 0% 3.9%",
133
+ border: "0 0% 89.8%",
134
+ primary: "0 0% 9%",
135
+ "primary-foreground": "0 0% 98%",
136
+ secondary: "0 0% 93.1%",
137
+ "secondary-foreground": "0 0% 9%",
138
+ accent: "0 0% 90.1%",
139
+ "accent-foreground": "0 0% 9%",
140
+ ring: "0 0% 63.9%"
141
+ },
142
+ dark: {
143
+ background: "0 0% 8.9%",
144
+ foreground: "0 0% 92%",
145
+ muted: "0 0% 12.9%",
146
+ "muted-foreground": "0 0% 60.9%",
147
+ popover: "0 0% 9.8%",
148
+ "popover-foreground": "0 0% 88%",
149
+ card: "0 0% 10%",
150
+ "card-foreground": "0 0% 98%",
151
+ border: "0 0% 18%",
152
+ primary: "0 0% 98%",
153
+ "primary-foreground": "0 0% 9%",
154
+ secondary: "0 0% 12.9%",
155
+ "secondary-foreground": "0 0% 98%",
156
+ accent: "0 0% 16.9%",
157
+ "accent-foreground": "0 0% 90%",
158
+ ring: "0 0% 14.9%"
159
+ },
160
+ css: {
161
+ aside: {
162
+ "--muted-foreground": "0 0% 30%"
163
+ },
164
+ "aside::before": {
165
+ content: '""',
166
+ position: "absolute",
167
+ top: "0",
168
+ right: "0",
169
+ zIndex: "-1",
170
+ width: "calc(max(0px, 100vw - theme(maxWidth.container)) + 100% + 1rem)",
171
+ height: "100%",
172
+ background: "hsl(var(--secondary))",
173
+ borderRight: "1px solid",
174
+ borderRightColor: "theme(borderColor.border)"
175
+ },
176
+ ".dark aside": {
177
+ "--muted-foreground": "0 0% 72%"
178
+ }
179
+ }
180
+ };
181
+ var catppuccin = {
182
+ light: {
183
+ popover: "220deg 22% 92%",
184
+ "popover-foreground": "234deg 16% 35%",
185
+ "secondary-foreground": "234deg 16% 35%",
186
+ border: "223deg 16% 83%",
187
+ primary: "266deg 85% 58%",
188
+ "primary-foreground": "234deg 16% 35%",
189
+ muted: "220deg 22% 92%",
190
+ card: "220deg 22% 92%",
191
+ accent: "223deg 16% 83%",
192
+ "accent-foreground": "234deg 16% 35%",
193
+ "card-foreground": "234deg 16% 35%",
194
+ "muted-foreground": "233deg 10% 47%",
195
+ foreground: "234deg 16% 35%",
196
+ secondary: "220deg 22% 92%",
197
+ background: "220deg 23% 95%",
198
+ ring: "267deg 84% 81%"
199
+ },
200
+ dark: {
201
+ ring: "267deg 84% 81%",
202
+ primary: "267deg 84% 81%",
203
+ background: "240deg 21% 15%",
204
+ foreground: "226deg 64% 88%",
205
+ popover: "240deg 23% 9%",
206
+ card: "240deg 21% 12%",
207
+ muted: "237deg 16% 23%",
208
+ border: "237deg 16% 23%",
209
+ accent: "234deg 13% 31%",
210
+ secondary: "240deg 23% 9%",
211
+ "primary-foreground": "240deg 23% 9%",
212
+ "card-foreground": "226deg 64% 88%",
213
+ "secondary-foreground": "226deg 64% 88%",
214
+ "popover-foreground": "226deg 64% 88%",
215
+ "accent-foreground": "226deg 64% 88%",
216
+ "muted-foreground": "228deg 24% 72%"
217
+ },
218
+ css: {
219
+ "aside::before": {
220
+ content: '""',
221
+ position: "absolute",
222
+ top: "0",
223
+ right: "0",
224
+ zIndex: "-1",
225
+ width: "calc(max(0px, 100vw - theme(maxWidth.container)) + 100% + 1rem)",
226
+ height: "100%",
227
+ background: "hsl(var(--secondary))"
228
+ }
229
+ }
230
+ };
231
+ var purple = {
232
+ light: {
233
+ background: "256 100% 96%",
234
+ primary: "270 100% 52%",
235
+ border: "270 40% 80%",
236
+ accent: "270 60% 86%",
237
+ "accent-foreground": "270 100% 20%",
238
+ muted: "256 60% 94%",
239
+ "muted-foreground": "256 50% 50%",
240
+ foreground: "256 60% 26%",
241
+ secondary: "270 60% 90%",
242
+ "secondary-foreground": "256 60% 10%",
243
+ card: "256 60% 92%",
244
+ "card-foreground": "256 100% 20%",
245
+ "popover-foreground": "256 100% 20%",
246
+ popover: "256 60% 96%",
247
+ "primary-foreground": "270 100% 20%",
248
+ ring: "270 100% 52%"
249
+ },
250
+ dark: {
251
+ background: "256 60% 6%",
252
+ primary: "270 100% 86%",
253
+ border: "270 100% 20%",
254
+ accent: "256 60% 26%",
255
+ "accent-foreground": "270 100% 86%",
256
+ muted: "256 60% 10%",
257
+ foreground: "256 60% 90%",
258
+ "muted-foreground": "256 50% 75%",
259
+ secondary: "270 100% 20%",
260
+ "secondary-foreground": "256 60% 90%",
261
+ card: "256 60% 10%",
262
+ "card-foreground": "256 60% 90%",
263
+ "popover-foreground": "256 60% 90%",
264
+ popover: "256 60% 6%",
265
+ "primary-foreground": "256 60% 6%",
266
+ ring: "270 100% 86%"
267
+ }
268
+ };
269
+ var dusk = {
270
+ light: {
271
+ background: "250 20% 92%",
272
+ primary: "340 40% 48%",
273
+ border: "240 40% 90%",
274
+ accent: "250 30% 90%",
275
+ "accent-foreground": "250 20% 20%",
276
+ muted: "240 30% 94%",
277
+ "muted-foreground": "240 10% 50%",
278
+ foreground: "220 20% 30%",
279
+ secondary: "250 40% 94%",
280
+ "secondary-foreground": "240 40% 10%",
281
+ card: "250 20% 92%",
282
+ "card-foreground": "250 20% 20%",
283
+ "popover-foreground": "250 40% 20%",
284
+ popover: "250 40% 96%",
285
+ "primary-foreground": "240 80% 20%",
286
+ ring: "340 40% 48%"
287
+ },
288
+ dark: {
289
+ ring: "340 100% 90%",
290
+ "primary-foreground": "240 40% 4%",
291
+ popover: "240 20% 5%",
292
+ "popover-foreground": "250 20% 90%",
293
+ primary: "340 100% 90%",
294
+ border: "220 15% 15%",
295
+ background: "220 15% 6%",
296
+ foreground: "220 15% 87%",
297
+ muted: "220 20% 15%",
298
+ "muted-foreground": "220 15% 60%",
299
+ accent: "250 20% 15%",
300
+ secondary: "240 20% 15%",
301
+ "card-foreground": "240 15% 87%",
302
+ card: "240 20% 5%",
303
+ "secondary-foreground": "250 20% 90%",
304
+ "accent-foreground": "340 5% 90%"
305
+ }
306
+ };
307
+ var presets = {
308
+ purple,
309
+ default: defaultPreset,
310
+ ocean: oceanPreset,
311
+ catppuccin,
312
+ neutral,
313
+ dusk
314
+ };
315
+
316
+ // src/theme/animations.ts
317
+ var animations = {
318
+ keyframes: {
319
+ "collapsible-down": {
320
+ from: { height: "0", opacity: "0" },
321
+ to: {
322
+ height: "var(--radix-collapsible-content-height)"
323
+ }
324
+ },
325
+ "collapsible-up": {
326
+ from: {
327
+ height: "var(--radix-collapsible-content-height)"
328
+ },
329
+ to: { height: "0", opacity: "0" }
330
+ },
331
+ "accordion-down": {
332
+ from: { height: "0", opacity: "0.5" },
333
+ to: { height: "var(--radix-accordion-content-height)" }
334
+ },
335
+ "accordion-up": {
336
+ from: { height: "var(--radix-accordion-content-height)" },
337
+ to: { height: "0", opacity: "0.5" }
338
+ },
339
+ "dialog-in": {
340
+ from: { transform: "scale(0.95) translate(-50%, 0)", opacity: "0" },
341
+ to: { transform: "scale(1) translate(-50%, 0)" }
342
+ },
343
+ "dialog-out": {
344
+ from: { transform: "scale(1) translate(-50%, 0)" },
345
+ to: { transform: "scale(0.95) translateY(-50%, 0)", opacity: "0" }
346
+ },
347
+ "popover-in": {
348
+ from: { opacity: "0", transform: "scale(0.95) translateY(-10px)" },
349
+ to: { opacity: "1", transform: "scale(1) translateY(0)" }
350
+ },
351
+ "popover-out": {
352
+ from: { opacity: "1", transform: "scale(1) translateY(0)" },
353
+ to: { opacity: "0", transform: "scale(0.95) translateY(-10px)" }
354
+ },
355
+ "fade-in": {
356
+ from: { opacity: "0" },
357
+ to: { opacity: "1" }
358
+ },
359
+ "fade-out": {
360
+ to: { opacity: "0" }
361
+ }
362
+ },
363
+ animation: {
364
+ "fade-in": "fade-in 300ms ease",
365
+ "fade-out": "fade-out 300ms ease",
366
+ "dialog-in": "dialog-in 200ms cubic-bezier(0.32, 0.72, 0, 1)",
367
+ "dialog-out": "dialog-out 300ms cubic-bezier(0.32, 0.72, 0, 1)",
368
+ "popover-in": "popover-in 150ms ease",
369
+ "popover-out": "popover-out 150ms ease",
370
+ "collapsible-down": "collapsible-down 150ms ease-out",
371
+ "collapsible-up": "collapsible-up 150ms ease-out",
372
+ "accordion-down": "accordion-down 200ms ease-out",
373
+ "accordion-up": "accordion-up 200ms ease-out"
374
+ }
375
+ };
376
+
377
+ // src/theme/typography.ts
378
+ var typography = {
379
+ css: {
380
+ "--tw-prose-body": `theme('colors.foreground / 90%')`,
381
+ "--tw-prose-headings": `theme('colors.foreground')`,
382
+ "--tw-prose-lead": `theme('colors.foreground')`,
383
+ "--tw-prose-links": `theme('colors.foreground')`,
384
+ "--tw-prose-bold": `theme('colors.foreground')`,
385
+ "--tw-prose-counters": `theme('colors.muted.foreground')`,
386
+ "--tw-prose-bullets": `theme('colors.muted.foreground')`,
387
+ "--tw-prose-hr": `theme('colors.border')`,
388
+ "--tw-prose-quotes": `theme('colors.foreground')`,
389
+ "--tw-prose-quote-borders": `theme('colors.border')`,
390
+ "--tw-prose-captions": `theme('colors.foreground')`,
391
+ "--tw-prose-code": `theme('colors.foreground')`,
392
+ "--tw-prose-th-borders": `theme('colors.border')`,
393
+ "--tw-prose-td-borders": `theme('colors.border')`,
394
+ "--tw-prose-kbd": `theme('colors.foreground')`,
395
+ "--tw-prose-kbd-shadows": `theme('colors.primary.DEFAULT / 50%')`,
396
+ // not used
397
+ "--tw-prose-pre-bg": false,
398
+ "--tw-prose-pre-code": false,
399
+ fontSize: "16px",
400
+ maxWidth: "none",
401
+ a: {
402
+ transition: "opacity 0.3s",
403
+ fontWeight: "400",
404
+ textDecoration: "underline",
405
+ textUnderlineOffset: "2px",
406
+ textDecorationColor: `theme('colors.primary.DEFAULT')`
407
+ },
408
+ "a:hover": {
409
+ opacity: "80%"
410
+ },
411
+ table: {
412
+ fontSize: "14px",
413
+ whiteSpace: "nowrap"
414
+ },
415
+ "thead th": {
416
+ textAlign: "start"
417
+ },
418
+ code: {
419
+ padding: "3px",
420
+ border: "solid 1px",
421
+ fontSize: "13px",
422
+ borderColor: `theme('colors.border')`,
423
+ borderRadius: "5px",
424
+ fontWeight: "400",
425
+ background: `theme('colors.muted.DEFAULT')`
426
+ },
427
+ kbd: {
428
+ boxShadow: "0 0 0 1px var(--tw-prose-kbd-shadows),0 3px 0 var(--tw-prose-kbd-shadows)"
429
+ },
430
+ ul: {
431
+ listStylePosition: "inside",
432
+ paddingLeft: "0"
433
+ },
434
+ "ul > li": {
435
+ paddingLeft: "0"
436
+ },
437
+ // Disabled styles, handled by Fumadocs UI
438
+ "pre code": false,
439
+ "pre code::after": false,
440
+ "pre code::before": false,
441
+ "code::after": false,
442
+ "code::before": false
443
+ }
444
+ };
445
+
446
+ // src/tailwind-plugin.ts
447
+ function getThemeStyles(prefix, theme) {
448
+ return Object.fromEntries(
449
+ Object.entries(theme).map(([k, v]) => [variableName(prefix, k), v])
450
+ );
451
+ }
452
+ function variableName(prefix, name) {
453
+ return `--${[prefix, name].filter(Boolean).join("-")}`;
454
+ }
455
+ function colorToCSS(prefix, name) {
456
+ return `hsl(var(${variableName(prefix, name)}) / <alpha-value>)`;
457
+ }
458
+ var docsUi = import_plugin.default.withOptions(
459
+ ({
460
+ prefix = "",
461
+ preset = "default",
462
+ keepCodeBlockBackground = false
463
+ } = {}) => {
464
+ return ({ addBase, addComponents, addUtilities }) => {
465
+ const { light, dark, css } = typeof preset === "string" ? presets[preset] : preset;
466
+ addBase({
467
+ ":root": getThemeStyles(prefix, light),
468
+ ".dark": getThemeStyles(prefix, dark),
469
+ "*": {
470
+ "border-color": `theme('colors.border')`
471
+ },
472
+ body: {
473
+ "background-color": `theme('colors.background')`,
474
+ color: `theme('colors.foreground')`
475
+ }
476
+ });
477
+ if (css)
478
+ addBase(css);
479
+ addComponents({
480
+ ".nd-codeblock span": {
481
+ color: "var(--shiki-light)"
482
+ },
483
+ ".dark .nd-codeblock span": {
484
+ color: "var(--shiki-dark)"
485
+ },
486
+ ".nd-codeblock": {
487
+ "& .line": {
488
+ "font-size": "13px",
489
+ "padding-left": `theme('spacing.4')`,
490
+ "padding-right": `theme('spacing.4')`
491
+ },
492
+ "& .highlighted": {
493
+ width: "100%",
494
+ display: "inline-block",
495
+ "background-color": `theme('colors.primary.DEFAULT / 10%')`
496
+ },
497
+ "& .highlighted-word": {
498
+ padding: "1px 2px",
499
+ margin: "-1px -3px",
500
+ border: "1px solid",
501
+ "border-color": `theme('colors.primary.DEFAULT / 50%')`,
502
+ "background-color": `theme('colors.primary.DEFAULT / 10%')`,
503
+ "border-radius": "2px"
504
+ }
505
+ }
506
+ });
507
+ if (keepCodeBlockBackground) {
508
+ addComponents({
509
+ ".nd-codeblock": {
510
+ color: "var(--shiki-light)",
511
+ "background-color": "var(--shiki-light-bg)"
512
+ },
513
+ ".dark .nd-codeblock": {
514
+ color: "var(--shiki-dark)",
515
+ "background-color": "var(--shiki-dark-bg)"
516
+ }
517
+ });
518
+ }
519
+ addUtilities({
520
+ ".steps": {
521
+ "counter-reset": "step",
522
+ "border-left-width": "1px",
523
+ "margin-left": "1rem",
524
+ "padding-left": "1.75rem",
525
+ position: "relative"
526
+ },
527
+ ".step:before": {
528
+ "background-color": `theme('colors.secondary.DEFAULT')`,
529
+ color: `theme('colors.secondary.foreground')`,
530
+ content: "counter(step)",
531
+ "counter-increment": "step",
532
+ "border-radius": `theme('borderRadius.full')`,
533
+ "justify-content": "center",
534
+ "align-items": "center",
535
+ width: "2rem",
536
+ height: "2rem",
537
+ "font-size": ".875rem",
538
+ "line-height": "1.25rem",
539
+ display: "flex",
540
+ position: "absolute",
541
+ left: "-1rem"
542
+ },
543
+ ".prose-no-margin": {
544
+ "& > :first-child": {
545
+ marginTop: "0"
546
+ },
547
+ "& > :last-child": {
548
+ marginBottom: "0"
549
+ }
550
+ }
551
+ });
552
+ };
553
+ },
554
+ ({ prefix = "" } = {}) => ({
555
+ theme: {
556
+ extend: {
557
+ // Allow devs to use `container` for other elements
558
+ container: {
559
+ center: true,
560
+ padding: "1rem",
561
+ screens: {
562
+ "2xl": "1400px"
563
+ }
564
+ },
565
+ height: {
566
+ body: [
567
+ "calc(100vh - 4rem) /* fallback */",
568
+ "calc(100dvh - 4rem)"
569
+ ]
570
+ },
571
+ maxWidth: {
572
+ container: "1400px"
573
+ },
574
+ colors: {
575
+ border: colorToCSS(prefix, "border"),
576
+ ring: colorToCSS(prefix, "ring"),
577
+ background: colorToCSS(prefix, "background"),
578
+ foreground: colorToCSS(prefix, "foreground"),
579
+ primary: {
580
+ DEFAULT: colorToCSS(prefix, "primary"),
581
+ foreground: colorToCSS(prefix, "primary-foreground")
582
+ },
583
+ secondary: {
584
+ DEFAULT: colorToCSS(prefix, "secondary"),
585
+ foreground: colorToCSS(prefix, "secondary-foreground")
586
+ },
587
+ muted: {
588
+ DEFAULT: colorToCSS(prefix, "muted"),
589
+ foreground: colorToCSS(prefix, "muted-foreground")
590
+ },
591
+ accent: {
592
+ DEFAULT: colorToCSS(prefix, "accent"),
593
+ foreground: colorToCSS(prefix, "accent-foreground")
594
+ },
595
+ popover: {
596
+ DEFAULT: colorToCSS(prefix, "popover"),
597
+ foreground: colorToCSS(prefix, "popover-foreground")
598
+ },
599
+ card: {
600
+ DEFAULT: colorToCSS(prefix, "card"),
601
+ foreground: colorToCSS(prefix, "card-foreground")
602
+ }
603
+ },
604
+ ...animations,
605
+ typography: {
606
+ DEFAULT: typography
607
+ }
608
+ }
609
+ }
610
+ })
611
+ );
612
+ function createPreset(options = {}) {
613
+ return {
614
+ darkMode: "class",
615
+ plugins: [import_typography.default, docsUi(options)]
616
+ };
617
+ }
618
+ // Annotate the CommonJS export names for ESM import in node:
619
+ 0 && (module.exports = {
620
+ createPreset,
621
+ docsUi,
622
+ presets
623
+ });
@@ -1,42 +1,8 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
1
+ import "./chunk-6C3VEZWH.js";
29
2
 
30
3
  // src/tailwind-plugin.ts
31
- var tailwind_plugin_exports = {};
32
- __export(tailwind_plugin_exports, {
33
- createPreset: () => createPreset,
34
- docsUi: () => docsUi,
35
- presets: () => presets
36
- });
37
- module.exports = __toCommonJS(tailwind_plugin_exports);
38
- var import_typography = __toESM(require("@tailwindcss/typography"));
39
- var import_plugin = __toESM(require("tailwindcss/plugin"));
4
+ import typography2 from "@tailwindcss/typography";
5
+ import plugin from "tailwindcss/plugin";
40
6
 
41
7
  // src/theme/colors.ts
42
8
  var defaultPreset = {
@@ -455,7 +421,7 @@ function variableName(prefix, name) {
455
421
  function colorToCSS(prefix, name) {
456
422
  return `hsl(var(${variableName(prefix, name)}) / <alpha-value>)`;
457
423
  }
458
- var docsUi = import_plugin.default.withOptions(
424
+ var docsUi = plugin.withOptions(
459
425
  ({
460
426
  prefix = "",
461
427
  preset = "default",
@@ -612,12 +578,11 @@ var docsUi = import_plugin.default.withOptions(
612
578
  function createPreset(options = {}) {
613
579
  return {
614
580
  darkMode: "class",
615
- plugins: [import_typography.default, docsUi(options)]
581
+ plugins: [typography2, docsUi(options)]
616
582
  };
617
583
  }
618
- // Annotate the CommonJS export names for ESM import in node:
619
- 0 && (module.exports = {
584
+ export {
620
585
  createPreset,
621
586
  docsUi,
622
587
  presets
623
- });
588
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-ui",
3
- "version": "11.0.3",
3
+ "version": "11.0.5",
4
4
  "description": "The framework for building a documentation website in Next.js",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -10,42 +10,43 @@
10
10
  "repository": "github:fuma-nama/fumadocs",
11
11
  "license": "MIT",
12
12
  "author": "Fuma Nama",
13
+ "type": "module",
13
14
  "exports": {
14
15
  "./style.css": "./dist/style.css",
15
16
  "./twoslash.css": "./dist/twoslash.css",
16
17
  "./image-zoom.css": "./dist/image-zoom.css",
17
18
  "./tailwind-plugin": {
18
19
  "import": "./dist/tailwind-plugin.js",
19
- "require": "./dist/tailwind-plugin.js",
20
+ "require": "./dist/tailwind-plugin.cjs",
20
21
  "types": "./dist/tailwind-plugin.d.ts"
21
22
  },
22
23
  "./components/*": {
23
24
  "import": "./dist/components/*.js",
24
- "types": "./dist/components/*.d.mts"
25
+ "types": "./dist/components/*.d.ts"
25
26
  },
26
27
  "./twoslash/*": {
27
28
  "import": "./dist/twoslash/*.js",
28
- "types": "./dist/twoslash/*.d.mts"
29
+ "types": "./dist/twoslash/*.d.ts"
29
30
  },
30
31
  "./i18n": {
31
32
  "import": "./dist/i18n.js",
32
- "types": "./dist/i18n.d.mts"
33
+ "types": "./dist/i18n.d.ts"
33
34
  },
34
35
  "./layout": {
35
36
  "import": "./dist/layout.js",
36
- "types": "./dist/layout.d.mts"
37
+ "types": "./dist/layout.d.ts"
37
38
  },
38
39
  "./page": {
39
40
  "import": "./dist/page.js",
40
- "types": "./dist/page.d.mts"
41
+ "types": "./dist/page.d.ts"
41
42
  },
42
43
  "./provider": {
43
44
  "import": "./dist/provider.js",
44
- "types": "./dist/provider.d.mts"
45
+ "types": "./dist/provider.d.ts"
45
46
  },
46
47
  "./mdx": {
47
48
  "import": "./dist/mdx.js",
48
- "types": "./dist/mdx.d.mts"
49
+ "types": "./dist/mdx.d.ts"
49
50
  }
50
51
  },
51
52
  "typesVersions": {
@@ -54,25 +55,25 @@
54
55
  "./dist/tailwind-plugin.d.ts"
55
56
  ],
56
57
  "components/*": [
57
- "./dist/components/*.d.mts"
58
+ "./dist/components/*.d.ts"
58
59
  ],
59
60
  "twoslash/*": [
60
- "./dist/twoslash/*.d.mts"
61
+ "./dist/twoslash/*.d.ts"
61
62
  ],
62
63
  "i18n": [
63
- "./dist/i18n.d.mts"
64
+ "./dist/i18n.d.ts"
64
65
  ],
65
66
  "layout": [
66
- "./dist/layout.d.mts"
67
+ "./dist/layout.d.ts"
67
68
  ],
68
69
  "page": [
69
- "./dist/page.d.mts"
70
+ "./dist/page.d.ts"
70
71
  ],
71
72
  "provider": [
72
- "./dist/provider.d.mts"
73
+ "./dist/provider.d.ts"
73
74
  ],
74
75
  "mdx": [
75
- "./dist/mdx.d.mts"
76
+ "./dist/mdx.d.ts"
76
77
  ]
77
78
  }
78
79
  },
@@ -95,7 +96,7 @@
95
96
  "next-themes": "^0.3.0",
96
97
  "react-medium-image-zoom": "^5.1.11",
97
98
  "tailwind-merge": "^2.3.0",
98
- "fumadocs-core": "11.0.3"
99
+ "fumadocs-core": "11.0.5"
99
100
  },
100
101
  "devDependencies": {
101
102
  "@algolia/client-search": "^4.23.3",
@@ -1,4 +0,0 @@
1
- export { T as TreeContextProvider } from './tree-cqNEopxM.mjs';
2
- export { N as Nav, S as Sidebar } from './layout-VyGuUztg.mjs';
3
- import 'fumadocs-core/server';
4
- import 'react';
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes