fumadocs-ui 13.4.9 → 14.0.0
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/dist/{chunk-774JT2B6.js → chunk-5KVEK5A7.js} +11 -8
- package/dist/chunk-5QPVK7QM.js +542 -0
- package/dist/chunk-BN7HGCQ4.js +212 -0
- package/dist/chunk-CDPVENXR.js +8 -0
- package/dist/{chunk-KWZZNVSY.js → chunk-CPGKWLLV.js} +7 -3
- package/dist/chunk-DN6Z5VW6.js +61 -0
- package/dist/chunk-GHOAONNQ.js +48 -0
- package/dist/{chunk-ERUVE5R6.js → chunk-IHIFNFRB.js} +4 -2
- package/dist/{chunk-CP67AHDD.js → chunk-IVBHRX3O.js} +1 -1
- package/dist/{chunk-NSEJBI4V.js → chunk-KZTWSBYY.js} +28 -16
- package/dist/chunk-MCX7E6ZW.js +57 -0
- package/dist/chunk-PZTQPB4U.js +125 -0
- package/dist/{chunk-EDNTYBXS.js → chunk-QKOA6KEZ.js} +2 -17
- package/dist/{chunk-YIOV4KEY.js → chunk-TYZZJ335.js} +26 -16
- package/dist/{chunk-HOIRMHZT.js → chunk-UQIRU7MP.js} +8 -2
- package/dist/chunk-V6RONFCQ.js +69 -0
- package/dist/chunk-WRBUXI2A.js +82 -0
- package/dist/chunk-YL3MZH7N.js +66 -0
- package/dist/components/accordion.js +7 -3
- package/dist/components/api.d.ts +2 -5
- package/dist/components/api.js +2 -4
- package/dist/components/banner.js +5 -6
- package/dist/components/callout.d.ts +1 -1
- package/dist/components/callout.js +2 -1
- package/dist/components/card.d.ts +6 -5
- package/dist/components/card.js +1 -1
- package/dist/components/codeblock.js +4 -3
- package/dist/components/dialog/search-algolia.d.ts +10 -4
- package/dist/components/dialog/search-algolia.js +25 -15
- package/dist/components/dialog/search-default.d.ts +10 -6
- package/dist/components/dialog/search-default.js +27 -5
- package/dist/components/dialog/search.d.ts +7 -7
- package/dist/components/dialog/search.js +4 -3
- package/dist/components/files.js +15 -11
- package/dist/components/heading.js +2 -1
- package/dist/components/image-zoom.d.ts +6 -1
- package/dist/components/image-zoom.js +10 -5
- package/dist/components/inline-toc.js +3 -1
- package/dist/components/layout/language-toggle.d.ts +4 -3
- package/dist/components/layout/language-toggle.js +8 -6
- package/dist/components/layout/root-toggle.d.ts +3 -3
- package/dist/components/layout/root-toggle.js +7 -73
- package/dist/components/tabs.js +30 -13
- package/dist/components/type-table.d.ts +7 -5
- package/dist/components/type-table.js +11 -11
- package/dist/dynamic-sidebar-QWGMOUMS.js +129 -0
- package/dist/{edit-on-github-YFVYCMB7.js → edit-on-github-PCTRDRD6.js} +10 -8
- package/dist/layouts/docs.client.d.ts +26 -0
- package/dist/layouts/docs.client.js +200 -0
- package/dist/layouts/docs.d.ts +29 -0
- package/dist/layouts/docs.js +187 -0
- package/dist/layouts/home.client.d.ts +11 -0
- package/dist/layouts/home.client.js +274 -0
- package/dist/layouts/home.d.ts +7 -0
- package/dist/layouts/home.js +55 -0
- package/dist/layouts/shared.d.ts +2 -0
- package/dist/layouts/shared.js +9 -0
- package/dist/mdx.client.js +4 -3
- package/dist/mdx.d.ts +0 -1
- package/dist/mdx.js +8 -10
- package/dist/og.d.ts +1 -7
- package/dist/og.js +5 -15
- package/dist/page.client.d.ts +2 -1
- package/dist/page.client.js +91 -63
- package/dist/page.d.ts +6 -5
- package/dist/page.js +63 -51
- package/dist/provider.d.ts +1 -2
- package/dist/provider.js +3 -4
- package/dist/shared-ElIzX-sQ.d.ts +152 -0
- package/dist/{sidebar-DwBSl7jC.d.ts → sidebar-HwpSmOKR.d.ts} +7 -9
- package/dist/style.css +1 -1
- package/dist/tailwind-plugin.js +86 -39
- package/dist/{toc-clerk-CAID2WGC.js → toc-clerk-SKE4LBT7.js} +40 -50
- package/dist/{tree-CrKzI9Nz.d.ts → tree-06ley65N.d.ts} +9 -3
- package/package.json +31 -68
- package/dist/chunk-KCZRDPB4.js +0 -308
- package/dist/chunk-LSTPTAZ5.js +0 -58
- package/dist/chunk-P4HLRHHV.js +0 -36
- package/dist/chunk-UOD2T27N.js +0 -27
- package/dist/chunk-WLTWFYQA.js +0 -44
- package/dist/docs-layout.client.d.ts +0 -18
- package/dist/docs-layout.client.js +0 -406
- package/dist/home-layout.client.d.ts +0 -9
- package/dist/home-layout.client.js +0 -88
- package/dist/home-layout.d.ts +0 -7
- package/dist/home-layout.js +0 -30
- package/dist/layout.d.ts +0 -19
- package/dist/layout.js +0 -127
- package/dist/layout.shared-DEQFTB9M.d.ts +0 -117
- package/dist/twoslash/popup.d.ts +0 -11
- package/dist/twoslash/popup.js +0 -97
- package/dist/twoslash.css +0 -1
- /package/dist/{image-zoom.css → components/image-zoom.css} +0 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
BaseLinkItem,
|
|
4
|
+
ButtonItem,
|
|
5
|
+
IconItem,
|
|
6
|
+
ThemeToggle
|
|
7
|
+
} from "../chunk-PZTQPB4U.js";
|
|
8
|
+
import {
|
|
9
|
+
LargeSearchToggle,
|
|
10
|
+
SearchToggle
|
|
11
|
+
} from "../chunk-V6RONFCQ.js";
|
|
12
|
+
import {
|
|
13
|
+
LanguageToggle,
|
|
14
|
+
LanguageToggleText
|
|
15
|
+
} from "../chunk-KZTWSBYY.js";
|
|
16
|
+
import "../chunk-CDPVENXR.js";
|
|
17
|
+
import {
|
|
18
|
+
buttonVariants
|
|
19
|
+
} from "../chunk-QKOA6KEZ.js";
|
|
20
|
+
import {
|
|
21
|
+
NavContext,
|
|
22
|
+
NavProvider,
|
|
23
|
+
Title
|
|
24
|
+
} from "../chunk-MCX7E6ZW.js";
|
|
25
|
+
import "../chunk-IVBHRX3O.js";
|
|
26
|
+
import {
|
|
27
|
+
ChevronDown,
|
|
28
|
+
Languages
|
|
29
|
+
} from "../chunk-5QPVK7QM.js";
|
|
30
|
+
import {
|
|
31
|
+
twMerge
|
|
32
|
+
} from "../chunk-TK3TM3MR.js";
|
|
33
|
+
import {
|
|
34
|
+
useSearchContext
|
|
35
|
+
} from "../chunk-ET4TW6M5.js";
|
|
36
|
+
import "../chunk-EFMHXXHW.js";
|
|
37
|
+
import "../chunk-MLKGABMK.js";
|
|
38
|
+
|
|
39
|
+
// src/layouts/home.client.tsx
|
|
40
|
+
import { useContext, useMemo, useState } from "react";
|
|
41
|
+
|
|
42
|
+
// src/layouts/nav-item.tsx
|
|
43
|
+
import { Fragment } from "react";
|
|
44
|
+
import { cva } from "class-variance-authority";
|
|
45
|
+
import Link2 from "fumadocs-core/link";
|
|
46
|
+
|
|
47
|
+
// src/components/ui/navigation-menu.tsx
|
|
48
|
+
import * as React from "react";
|
|
49
|
+
import * as Primitive from "@radix-ui/react-navigation-menu";
|
|
50
|
+
import { jsx } from "react/jsx-runtime";
|
|
51
|
+
var NavigationMenu = Primitive.Root;
|
|
52
|
+
var NavigationMenuList = Primitive.List;
|
|
53
|
+
var NavigationMenuItem = Primitive.Item;
|
|
54
|
+
var NavigationMenuTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
55
|
+
Primitive.Trigger,
|
|
56
|
+
{
|
|
57
|
+
ref,
|
|
58
|
+
className: twMerge("data-[state=open]:bg-fd-accent/50", className),
|
|
59
|
+
...props,
|
|
60
|
+
children
|
|
61
|
+
}
|
|
62
|
+
));
|
|
63
|
+
NavigationMenuTrigger.displayName = Primitive.Trigger.displayName;
|
|
64
|
+
var NavigationMenuContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
65
|
+
Primitive.Content,
|
|
66
|
+
{
|
|
67
|
+
ref,
|
|
68
|
+
className: twMerge(
|
|
69
|
+
"absolute inset-x-0 top-0 data-[motion=from-end]:animate-fd-enterFromRight data-[motion=from-start]:animate-fd-enterFromLeft data-[motion=to-end]:animate-fd-exitToRight data-[motion=to-start]:animate-fd-exitToLeft",
|
|
70
|
+
className
|
|
71
|
+
),
|
|
72
|
+
...props
|
|
73
|
+
}
|
|
74
|
+
));
|
|
75
|
+
NavigationMenuContent.displayName = Primitive.Content.displayName;
|
|
76
|
+
var NavigationMenuLink = Primitive.Link;
|
|
77
|
+
var NavigationMenuViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: "flex w-full justify-center", children: /* @__PURE__ */ jsx(
|
|
78
|
+
Primitive.Viewport,
|
|
79
|
+
{
|
|
80
|
+
...props,
|
|
81
|
+
className: twMerge(
|
|
82
|
+
"relative h-[var(--radix-navigation-menu-viewport-height)] w-full origin-[top_center] overflow-hidden text-fd-popover-foreground transition-[width,height] duration-300 data-[state=closed]:animate-fd-nav-menu-out data-[state=open]:animate-fd-nav-menu-in",
|
|
83
|
+
className
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
) }));
|
|
87
|
+
NavigationMenuViewport.displayName = Primitive.Viewport.displayName;
|
|
88
|
+
|
|
89
|
+
// src/layouts/nav-item.tsx
|
|
90
|
+
import { Fragment as Fragment2, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
91
|
+
var navItemVariants = cva(
|
|
92
|
+
"inline-flex items-center gap-1 p-2 text-fd-muted-foreground transition-colors hover:text-fd-accent-foreground data-[active=true]:text-fd-primary [&_svg]:size-4"
|
|
93
|
+
);
|
|
94
|
+
function NavItem({ item, ...props }) {
|
|
95
|
+
if (item.type === "custom") return /* @__PURE__ */ jsx2("div", { ...props, children: item.children });
|
|
96
|
+
if (item.type === "menu") {
|
|
97
|
+
return /* @__PURE__ */ jsxs(NavigationMenuItem, { ...props, children: [
|
|
98
|
+
/* @__PURE__ */ jsx2(NavigationMenuTrigger, { className: twMerge(navItemVariants(), "rounded-md"), children: item.url ? /* @__PURE__ */ jsx2(Link2, { href: item.url, children: item.text }) : item.text }),
|
|
99
|
+
/* @__PURE__ */ jsx2(NavigationMenuContent, { className: "grid grid-cols-1 gap-3 px-4 pb-4 md:grid-cols-2 lg:grid-cols-3", children: /* @__PURE__ */ jsx2(MenuItemContent, { item }) })
|
|
100
|
+
] });
|
|
101
|
+
}
|
|
102
|
+
if (item.type === "button") {
|
|
103
|
+
return /* @__PURE__ */ jsx2(NavigationMenuItem, { ...props, children: /* @__PURE__ */ jsx2(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx2(ButtonItem, { item }) }) });
|
|
104
|
+
}
|
|
105
|
+
if (item.type === "icon") {
|
|
106
|
+
return /* @__PURE__ */ jsx2(NavigationMenuItem, { ...props, children: /* @__PURE__ */ jsx2(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx2(IconItem, { item }) }) });
|
|
107
|
+
}
|
|
108
|
+
return /* @__PURE__ */ jsx2(NavigationMenuItem, { ...props, children: /* @__PURE__ */ jsx2(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx2(BaseLinkItem, { item, className: twMerge(navItemVariants()), children: item.text }) }) });
|
|
109
|
+
}
|
|
110
|
+
function MenuItemContent({ item }) {
|
|
111
|
+
return /* @__PURE__ */ jsx2(Fragment2, { children: item.items.map((child, i) => {
|
|
112
|
+
if (child.type === "custom")
|
|
113
|
+
return /* @__PURE__ */ jsx2(Fragment, { children: child.children }, i);
|
|
114
|
+
const { banner, footer, ...menuProps } = child.menu ?? {};
|
|
115
|
+
return /* @__PURE__ */ jsx2(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
116
|
+
Link2,
|
|
117
|
+
{
|
|
118
|
+
external: child.external,
|
|
119
|
+
href: child.url,
|
|
120
|
+
...menuProps,
|
|
121
|
+
className: twMerge(
|
|
122
|
+
"flex flex-col gap-2 rounded-lg border bg-fd-card p-3 transition-colors hover:bg-fd-accent/80 hover:text-fd-accent-foreground",
|
|
123
|
+
menuProps.className
|
|
124
|
+
),
|
|
125
|
+
children: [
|
|
126
|
+
banner ?? (child.icon ? /* @__PURE__ */ jsx2("div", { className: "w-fit rounded-md border bg-fd-muted p-1 [&_svg]:size-4", children: child.icon }) : null),
|
|
127
|
+
/* @__PURE__ */ jsx2("p", { className: "-mb-1 text-sm font-medium", children: child.text }),
|
|
128
|
+
child.description ? /* @__PURE__ */ jsx2("p", { className: "text-[13px] text-fd-muted-foreground", children: child.description }) : null,
|
|
129
|
+
footer
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
) }, i);
|
|
133
|
+
}) });
|
|
134
|
+
}
|
|
135
|
+
function MenuItem({ item, ...rest }) {
|
|
136
|
+
if (item.type === "button") {
|
|
137
|
+
return /* @__PURE__ */ jsx2(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx2(ButtonItem, { item, ...rest }) });
|
|
138
|
+
}
|
|
139
|
+
if (item.type === "custom")
|
|
140
|
+
return /* @__PURE__ */ jsx2("div", { ...rest, className: twMerge("grid", rest.className), children: item.children });
|
|
141
|
+
if (item.type === "menu") {
|
|
142
|
+
return /* @__PURE__ */ jsxs("div", { ...rest, className: twMerge("mb-4 flex flex-col", rest.className), children: [
|
|
143
|
+
/* @__PURE__ */ jsx2("p", { className: "mb-1 text-sm text-fd-muted-foreground", children: item.url ? /* @__PURE__ */ jsx2(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxs(Link2, { href: item.url, children: [
|
|
144
|
+
item.icon,
|
|
145
|
+
item.text
|
|
146
|
+
] }) }) : /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
147
|
+
item.icon,
|
|
148
|
+
item.text
|
|
149
|
+
] }) }),
|
|
150
|
+
item.items.map((child, i) => /* @__PURE__ */ jsx2(MenuItem, { item: child }, i))
|
|
151
|
+
] });
|
|
152
|
+
}
|
|
153
|
+
if (item.type === "icon") {
|
|
154
|
+
return /* @__PURE__ */ jsx2(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsx2(IconItem, { item }) });
|
|
155
|
+
}
|
|
156
|
+
return /* @__PURE__ */ jsx2(NavigationMenuLink, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
157
|
+
BaseLinkItem,
|
|
158
|
+
{
|
|
159
|
+
item,
|
|
160
|
+
...rest,
|
|
161
|
+
className: twMerge(
|
|
162
|
+
"inline-flex items-center gap-2 py-1.5 transition-colors hover:text-fd-popover-foreground/50 data-[active=true]:font-medium data-[active=true]:text-fd-primary [&_svg]:size-4",
|
|
163
|
+
rest.className
|
|
164
|
+
),
|
|
165
|
+
children: [
|
|
166
|
+
item.icon,
|
|
167
|
+
item.text
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
) });
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// src/layouts/home.client.tsx
|
|
174
|
+
import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
175
|
+
function Nav({
|
|
176
|
+
items,
|
|
177
|
+
enableSearch = true,
|
|
178
|
+
...props
|
|
179
|
+
}) {
|
|
180
|
+
const search = useSearchContext();
|
|
181
|
+
const [navItems, menuItems] = useMemo(
|
|
182
|
+
() => [
|
|
183
|
+
items.filter((item) => ["nav", "all"].includes(item.on ?? "all")),
|
|
184
|
+
items.filter((item) => ["menu", "all"].includes(item.on ?? "all"))
|
|
185
|
+
],
|
|
186
|
+
[items]
|
|
187
|
+
);
|
|
188
|
+
return /* @__PURE__ */ jsxs2(Fragment3, { children: [
|
|
189
|
+
/* @__PURE__ */ jsx3(
|
|
190
|
+
"div",
|
|
191
|
+
{
|
|
192
|
+
"aria-hidden": "true",
|
|
193
|
+
className: "fixed inset-x-0 top-[var(--fd-banner-height)] z-40 h-6 bg-fd-background",
|
|
194
|
+
style: {
|
|
195
|
+
maskImage: "linear-gradient(to bottom,white,transparent)"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
),
|
|
199
|
+
/* @__PURE__ */ jsxs2(Header, { children: [
|
|
200
|
+
/* @__PURE__ */ jsx3(Title, { title: props.title, url: props.url }),
|
|
201
|
+
props.children,
|
|
202
|
+
/* @__PURE__ */ jsx3(NavigationMenuList, { className: "flex flex-row items-center gap-2 max-sm:hidden", children: navItems.filter((item) => !isSecondary(item)).map((item, i) => /* @__PURE__ */ jsx3(NavItem, { item, className: "text-sm" }, i)) }),
|
|
203
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex flex-1 flex-row items-center justify-end lg:gap-1.5", children: [
|
|
204
|
+
enableSearch && search.enabled ? /* @__PURE__ */ jsxs2(Fragment3, { children: [
|
|
205
|
+
/* @__PURE__ */ jsx3(SearchToggle, { className: "lg:hidden" }),
|
|
206
|
+
/* @__PURE__ */ jsx3(LargeSearchToggle, { className: "w-full max-w-[240px] max-lg:hidden" })
|
|
207
|
+
] }) : null,
|
|
208
|
+
!props.disableThemeSwitch ? /* @__PURE__ */ jsx3(ThemeToggle, { className: "max-lg:hidden" }) : null,
|
|
209
|
+
props.i18n ? /* @__PURE__ */ jsx3(LanguageToggle, { className: "-me-1.5 max-lg:hidden", children: /* @__PURE__ */ jsx3(Languages, { className: "size-5" }) }) : null,
|
|
210
|
+
navItems.filter(isSecondary).map((item, i) => /* @__PURE__ */ jsx3(
|
|
211
|
+
NavItem,
|
|
212
|
+
{
|
|
213
|
+
item,
|
|
214
|
+
className: "-me-1.5 list-none max-lg:hidden"
|
|
215
|
+
},
|
|
216
|
+
i
|
|
217
|
+
)),
|
|
218
|
+
/* @__PURE__ */ jsxs2(NavigationMenuItem, { className: "list-none lg:hidden", children: [
|
|
219
|
+
/* @__PURE__ */ jsx3(
|
|
220
|
+
NavigationMenuTrigger,
|
|
221
|
+
{
|
|
222
|
+
className: twMerge(
|
|
223
|
+
buttonVariants({
|
|
224
|
+
size: "icon",
|
|
225
|
+
color: "ghost"
|
|
226
|
+
}),
|
|
227
|
+
"group -me-2"
|
|
228
|
+
),
|
|
229
|
+
children: /* @__PURE__ */ jsx3(ChevronDown, { className: "size-3 transition-transform duration-300 group-data-[state=open]:rotate-180" })
|
|
230
|
+
}
|
|
231
|
+
),
|
|
232
|
+
/* @__PURE__ */ jsxs2(NavigationMenuContent, { className: "flex flex-col p-4 sm:flex-row sm:items-center sm:justify-end", children: [
|
|
233
|
+
menuItems.filter((item) => !isSecondary(item)).map((item, i) => /* @__PURE__ */ jsx3(MenuItem, { item, className: "sm:hidden" }, i)),
|
|
234
|
+
/* @__PURE__ */ jsxs2("div", { className: "-ms-1.5 flex flex-row items-center gap-1.5 max-sm:mt-2", children: [
|
|
235
|
+
props.i18n ? /* @__PURE__ */ jsxs2(LanguageToggle, { className: "me-auto", children: [
|
|
236
|
+
/* @__PURE__ */ jsx3(Languages, { className: "size-5" }),
|
|
237
|
+
/* @__PURE__ */ jsx3(LanguageToggleText, {}),
|
|
238
|
+
/* @__PURE__ */ jsx3(ChevronDown, { className: "size-3 text-fd-muted-foreground" })
|
|
239
|
+
] }) : null,
|
|
240
|
+
/* @__PURE__ */ jsx3("div", { className: "flex flex-row items-center empty:hidden", children: menuItems.filter(isSecondary).map((item, i) => /* @__PURE__ */ jsx3(MenuItem, { item }, i)) }),
|
|
241
|
+
!props.disableThemeSwitch ? /* @__PURE__ */ jsx3(ThemeToggle, { className: twMerge(!props.i18n && "ms-auto") }) : null
|
|
242
|
+
] })
|
|
243
|
+
] })
|
|
244
|
+
] })
|
|
245
|
+
] })
|
|
246
|
+
] })
|
|
247
|
+
] });
|
|
248
|
+
}
|
|
249
|
+
function Header({ children }) {
|
|
250
|
+
const [value, setValue] = useState("");
|
|
251
|
+
const { isTransparent } = useContext(NavContext);
|
|
252
|
+
return /* @__PURE__ */ jsx3(NavigationMenu, { value, onValueChange: setValue, asChild: true, children: /* @__PURE__ */ jsxs2(
|
|
253
|
+
"header",
|
|
254
|
+
{
|
|
255
|
+
id: "nd-nav",
|
|
256
|
+
className: twMerge(
|
|
257
|
+
"fixed left-1/2 top-[var(--fd-banner-height)] z-40 mt-1 w-[calc(100%-1rem)] max-w-fd-container -translate-x-1/2 rounded-2xl border border-fd-foreground/10 transition-colors",
|
|
258
|
+
value.length > 0 ? "shadow-lg" : "shadow-sm",
|
|
259
|
+
(!isTransparent || value.length > 0) && "bg-fd-background/80 backdrop-blur-lg"
|
|
260
|
+
),
|
|
261
|
+
children: [
|
|
262
|
+
/* @__PURE__ */ jsx3("nav", { className: "flex h-12 w-full flex-row items-center gap-6 px-4", children }),
|
|
263
|
+
/* @__PURE__ */ jsx3(NavigationMenuViewport, {})
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
) });
|
|
267
|
+
}
|
|
268
|
+
function isSecondary(item) {
|
|
269
|
+
return "secondary" in item && item.secondary === true || item.type === "icon";
|
|
270
|
+
}
|
|
271
|
+
export {
|
|
272
|
+
Nav,
|
|
273
|
+
NavProvider
|
|
274
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { B as BaseLayoutProps } from '../shared-ElIzX-sQ.js';
|
|
3
|
+
|
|
4
|
+
type HomeLayoutProps = BaseLayoutProps & HTMLAttributes<HTMLElement>;
|
|
5
|
+
declare function HomeLayout({ nav: { transparentMode, ...nav }, links, githubUrl, i18n, disableThemeSwitch, ...props }: HomeLayoutProps): React.ReactElement;
|
|
6
|
+
|
|
7
|
+
export { HomeLayout, type HomeLayoutProps };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Nav, NavProvider } from "./home.client"
|
|
2
|
+
import {
|
|
3
|
+
getLinks,
|
|
4
|
+
replaceOrDefault
|
|
5
|
+
} from "../chunk-UQIRU7MP.js";
|
|
6
|
+
import {
|
|
7
|
+
twMerge
|
|
8
|
+
} from "../chunk-TK3TM3MR.js";
|
|
9
|
+
import "../chunk-MLKGABMK.js";
|
|
10
|
+
|
|
11
|
+
// src/layouts/home.tsx
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
function HomeLayout({
|
|
14
|
+
nav: { transparentMode, ...nav } = {},
|
|
15
|
+
links = [],
|
|
16
|
+
githubUrl,
|
|
17
|
+
i18n,
|
|
18
|
+
disableThemeSwitch,
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
const finalLinks = getLinks(links, githubUrl);
|
|
22
|
+
return /* @__PURE__ */ jsx(NavProvider, { transparentMode, children: /* @__PURE__ */ jsxs(
|
|
23
|
+
"main",
|
|
24
|
+
{
|
|
25
|
+
id: "nd-home-layout",
|
|
26
|
+
...props,
|
|
27
|
+
className: twMerge(
|
|
28
|
+
"flex flex-1 flex-col pt-[var(--fd-nav-height)]",
|
|
29
|
+
props.className
|
|
30
|
+
),
|
|
31
|
+
style: {
|
|
32
|
+
"--fd-nav-height": "54px",
|
|
33
|
+
...props.style
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
replaceOrDefault(
|
|
37
|
+
nav,
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
Nav,
|
|
40
|
+
{
|
|
41
|
+
items: finalLinks,
|
|
42
|
+
i18n,
|
|
43
|
+
disableThemeSwitch,
|
|
44
|
+
...nav
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
),
|
|
48
|
+
props.children
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
) });
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
HomeLayout
|
|
55
|
+
};
|
package/dist/mdx.client.js
CHANGED
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CodeBlock,
|
|
4
4
|
Pre
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-2FLZOPQN.js";
|
|
5
|
+
} from "./chunk-5KVEK5A7.js";
|
|
7
6
|
import "./chunk-2KMKNVSN.js";
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-QKOA6KEZ.js";
|
|
8
|
+
import "./chunk-2FLZOPQN.js";
|
|
9
|
+
import "./chunk-5QPVK7QM.js";
|
|
9
10
|
import "./chunk-TK3TM3MR.js";
|
|
10
11
|
import "./chunk-MLKGABMK.js";
|
|
11
12
|
|
package/dist/mdx.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import * as react from 'react';
|
|
|
2
2
|
import { FC, HTMLAttributes, AnchorHTMLAttributes, ImgHTMLAttributes, TableHTMLAttributes } from 'react';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { Card, Cards } from './components/card.js';
|
|
5
|
-
import 'fumadocs-core/link';
|
|
6
5
|
|
|
7
6
|
declare function Image(props: ImgHTMLAttributes<HTMLImageElement>): React.ReactElement;
|
|
8
7
|
declare function Table(props: TableHTMLAttributes<HTMLTableElement>): React.ReactElement;
|
package/dist/mdx.js
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { Pre } from "./mdx.client"
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import {
|
|
6
|
-
Card,
|
|
7
|
-
Cards
|
|
8
|
-
} from "./chunk-WLTWFYQA.js";
|
|
3
|
+
Heading
|
|
4
|
+
} from "./chunk-IHIFNFRB.js";
|
|
9
5
|
import {
|
|
10
6
|
Callout
|
|
11
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-CPGKWLLV.js";
|
|
8
|
+
import "./chunk-5QPVK7QM.js";
|
|
12
9
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
Card,
|
|
11
|
+
Cards
|
|
12
|
+
} from "./chunk-GHOAONNQ.js";
|
|
15
13
|
import {
|
|
16
14
|
twMerge
|
|
17
15
|
} from "./chunk-TK3TM3MR.js";
|
|
@@ -25,7 +23,7 @@ function Image(props) {
|
|
|
25
23
|
return /* @__PURE__ */ jsx(
|
|
26
24
|
NextImage,
|
|
27
25
|
{
|
|
28
|
-
sizes:
|
|
26
|
+
sizes: "(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px",
|
|
29
27
|
...props,
|
|
30
28
|
className: twMerge("rounded-lg", props.className)
|
|
31
29
|
}
|
package/dist/og.d.ts
CHANGED
|
@@ -10,13 +10,7 @@ interface GenerateProps {
|
|
|
10
10
|
primaryTextColor?: string;
|
|
11
11
|
site?: ReactNode;
|
|
12
12
|
}
|
|
13
|
-
declare function getImageMeta(baseUrl: string, slugs?: string[]): {
|
|
14
|
-
alt: string;
|
|
15
|
-
url: string;
|
|
16
|
-
width: number;
|
|
17
|
-
height: number;
|
|
18
|
-
};
|
|
19
13
|
declare function generateOGImage(options: GenerateProps & ImageResponseOptions): ImageResponse;
|
|
20
14
|
declare function generate({ primaryColor, primaryTextColor, ...props }: GenerateProps): ReactElement;
|
|
21
15
|
|
|
22
|
-
export { generate, generateOGImage
|
|
16
|
+
export { generate, generateOGImage };
|
package/dist/og.js
CHANGED
|
@@ -3,14 +3,6 @@ import "./chunk-MLKGABMK.js";
|
|
|
3
3
|
// src/og.tsx
|
|
4
4
|
import { ImageResponse } from "next/og";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
function getImageMeta(baseUrl, slugs = []) {
|
|
7
|
-
return {
|
|
8
|
-
alt: "Banner",
|
|
9
|
-
url: `/${[...baseUrl.split("/"), ...slugs, "og.png"].filter((v) => v.length > 0).join("/")}`,
|
|
10
|
-
width: 1200,
|
|
11
|
-
height: 630
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
6
|
function generateOGImage(options) {
|
|
15
7
|
const {
|
|
16
8
|
title,
|
|
@@ -52,9 +44,8 @@ function generate({
|
|
|
52
44
|
height: "100%",
|
|
53
45
|
color: "white",
|
|
54
46
|
padding: "4rem",
|
|
55
|
-
backgroundColor: "#
|
|
56
|
-
backgroundImage: `linear-gradient(to top right, ${primaryColor}, transparent)
|
|
57
|
-
backgroundSize: "100% 100%, 40px 40px, 40px 40px"
|
|
47
|
+
backgroundColor: "#0c0c0c",
|
|
48
|
+
backgroundImage: `linear-gradient(to top right, ${primaryColor}, transparent)`
|
|
58
49
|
},
|
|
59
50
|
children: [
|
|
60
51
|
/* @__PURE__ */ jsxs(
|
|
@@ -74,8 +65,8 @@ function generate({
|
|
|
74
65
|
"p",
|
|
75
66
|
{
|
|
76
67
|
style: {
|
|
77
|
-
fontSize: "
|
|
78
|
-
fontWeight:
|
|
68
|
+
fontSize: "56px",
|
|
69
|
+
fontWeight: 600
|
|
79
70
|
},
|
|
80
71
|
children: props.site
|
|
81
72
|
}
|
|
@@ -109,6 +100,5 @@ function generate({
|
|
|
109
100
|
}
|
|
110
101
|
export {
|
|
111
102
|
generate,
|
|
112
|
-
generateOGImage
|
|
113
|
-
getImageMeta
|
|
103
|
+
generateOGImage
|
|
114
104
|
};
|
package/dist/page.client.d.ts
CHANGED
|
@@ -14,8 +14,9 @@ interface TOCProps {
|
|
|
14
14
|
children: ReactNode;
|
|
15
15
|
}
|
|
16
16
|
declare function Toc({ header, footer, children }: TOCProps): ReactElement;
|
|
17
|
-
declare function TocPopover({
|
|
17
|
+
declare function TocPopover({ items, ...props }: TOCProps & {
|
|
18
18
|
items: TOCItemType[];
|
|
19
|
+
className?: string;
|
|
19
20
|
}): ReactElement;
|
|
20
21
|
declare function TOCItems({ items, isMenu, }: {
|
|
21
22
|
items: TOCItemType[];
|