ardo 3.0.4 → 3.1.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/{FileTree-K0YVFXhg.d.ts → Features-D_Pt7zpA.d.ts} +9 -47
- package/dist/Search-DOJMNI2T.css +193 -0
- package/dist/Search-DOJMNI2T.css.map +1 -0
- package/dist/Search-VYYG3D43.js +10 -0
- package/dist/chunk-4YQE3TNM.js +1 -0
- package/dist/chunk-4YQE3TNM.js.map +1 -0
- package/dist/chunk-AXLJDGQL.js +1 -0
- package/dist/chunk-AXLJDGQL.js.map +1 -0
- package/dist/{chunk-TDBU2FXP.js → chunk-CZM5NX27.js} +301 -236
- package/dist/chunk-CZM5NX27.js.map +1 -0
- package/dist/{chunk-UWFMFHRD.js → chunk-IEPSORG5.js} +177 -63
- package/dist/chunk-IEPSORG5.js.map +1 -0
- package/dist/chunk-KUWEUO37.js +1 -0
- package/dist/chunk-KUWEUO37.js.map +1 -0
- package/dist/chunk-PMS3P4MA.js +43 -0
- package/dist/chunk-PMS3P4MA.js.map +1 -0
- package/dist/{chunk-BHHI2BO4.js → chunk-ZPYQQZ7J.js} +36 -20
- package/dist/chunk-ZPYQQZ7J.js.map +1 -0
- package/dist/index.css +1290 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -8
- package/dist/mdx/provider.css +403 -0
- package/dist/mdx/provider.css.map +1 -0
- package/dist/mdx/provider.js +3 -2
- package/dist/mdx/provider.js.map +1 -1
- package/dist/theme/index.d.ts +196 -0
- package/dist/theme/index.js +135 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/ui/index.css +1290 -0
- package/dist/ui/index.css.map +1 -0
- package/dist/ui/index.d.ts +3 -23
- package/dist/ui/index.js +7 -10
- package/dist/ui/styles.css +1039 -1976
- package/dist/ui/styles.css.map +1 -0
- package/dist/ui/styles.d.ts +2 -0
- package/dist/ui/styles.js +4 -0
- package/dist/ui/styles.js.map +1 -0
- package/dist/vite/index.js +4 -0
- package/dist/vite/index.js.map +1 -1
- package/package.json +12 -2
- package/dist/Search-MXGJE6PQ.js +0 -9
- package/dist/chunk-BHHI2BO4.js.map +0 -1
- package/dist/chunk-MJQGGJQZ.js +0 -88
- package/dist/chunk-MJQGGJQZ.js.map +0 -1
- package/dist/chunk-TDBU2FXP.js.map +0 -1
- package/dist/chunk-UWFMFHRD.js.map +0 -1
- /package/dist/{Search-MXGJE6PQ.js.map → Search-VYYG3D43.js.map} +0 -0
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Content
|
|
3
|
-
|
|
2
|
+
Content,
|
|
3
|
+
docPage,
|
|
4
|
+
footer,
|
|
5
|
+
footerBuildTime,
|
|
6
|
+
footerCopyright,
|
|
7
|
+
footerLink,
|
|
8
|
+
footerMessage,
|
|
9
|
+
footerPrimary,
|
|
10
|
+
footerSeparator
|
|
11
|
+
} from "./chunk-IEPSORG5.js";
|
|
4
12
|
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
} from "./chunk-
|
|
13
|
+
ChevronDown,
|
|
14
|
+
Github,
|
|
15
|
+
Linkedin,
|
|
16
|
+
MessageCircle,
|
|
17
|
+
Monitor,
|
|
18
|
+
Moon,
|
|
19
|
+
Package,
|
|
20
|
+
Sun,
|
|
21
|
+
Twitter,
|
|
22
|
+
Youtube
|
|
23
|
+
} from "./chunk-PMS3P4MA.js";
|
|
16
24
|
import {
|
|
17
25
|
ArdoContext,
|
|
18
26
|
ArdoProvider,
|
|
@@ -26,6 +34,16 @@ import {
|
|
|
26
34
|
// src/ui/Layout.tsx
|
|
27
35
|
import { useContext } from "react";
|
|
28
36
|
import { Links, Meta, Scripts, ScrollRestoration } from "react-router";
|
|
37
|
+
|
|
38
|
+
// src/ui/Layout.css.ts
|
|
39
|
+
var home = "Layout_home__8autjm3";
|
|
40
|
+
var homeMain = "Layout_homeMain__8autjm4";
|
|
41
|
+
var layout = "Layout_layout__8autjm0";
|
|
42
|
+
var layoutContainer = "Layout_layoutContainer__8autjm1";
|
|
43
|
+
var main = "Layout_main__8autjm2";
|
|
44
|
+
var skipLink = "Layout_skipLink__8autjm5";
|
|
45
|
+
|
|
46
|
+
// src/ui/Layout.tsx
|
|
29
47
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
30
48
|
var ARDO_FAVICON = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20style%3D%22stroke-linecap%3Around%3Bstroke-linejoin%3Around%22%20viewBox%3D%220%200%20600%20600%22%3E%3Cdefs%3E%3Csymbol%20id%3D%22a%22%20overflow%3D%22visible%22%3E%3Cpath%20d%3D%22M300%20300%20151%20128l2%20178-41%2094h93c-35%2032-55%2068-63%20107m63-106%2095%2081m-32-96%2028%2088%22%2F%3E%3Cellipse%20cx%3D%22222%22%20cy%3D%22327%22%20fill%3D%22%2300655a%22%20rx%3D%2220%22%20ry%3D%2233%22%2F%3E%3Ccircle%20cx%3D%22227%22%20cy%3D%22324%22%20r%3D%2271%22%2F%3E%3C%2Fsymbol%3E%3C%2Fdefs%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%2300655a%22%20stroke-width%3D%2216%22%3E%3Cpath%20d%3D%22M155%20318c2-70%2066-126%20145-126s143%2056%20145%20126%22%2F%3E%3Ccircle%20cx%3D%22300%22%20cy%3D%22290%22%20r%3D%22270%22%2F%3E%3Cuse%20href%3D%22%23a%22%2F%3E%3Cuse%20href%3D%22%23a%22%20transform%3D%22matrix%28-1%200%200%201%20600%200%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E";
|
|
31
49
|
function RootLayout({ children, favicon, lang }) {
|
|
@@ -46,27 +64,51 @@ function RootLayout({ children, favicon, lang }) {
|
|
|
46
64
|
] })
|
|
47
65
|
] });
|
|
48
66
|
}
|
|
49
|
-
function Layout({ header, sidebar, footer, children, className }) {
|
|
50
|
-
return /* @__PURE__ */ jsxs("div", { className: className ??
|
|
51
|
-
/* @__PURE__ */ jsx("a", { href: "#main-content", className:
|
|
52
|
-
|
|
53
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
54
|
-
|
|
55
|
-
/* @__PURE__ */ jsx("main", { id: "main-content", className:
|
|
67
|
+
function Layout({ header: header2, sidebar: sidebar2, footer: footer2, children, className }) {
|
|
68
|
+
return /* @__PURE__ */ jsxs("div", { className: className ?? layout, children: [
|
|
69
|
+
/* @__PURE__ */ jsx("a", { href: "#main-content", className: skipLink, children: "Skip to content" }),
|
|
70
|
+
header2,
|
|
71
|
+
/* @__PURE__ */ jsxs("div", { className: layoutContainer, children: [
|
|
72
|
+
sidebar2,
|
|
73
|
+
/* @__PURE__ */ jsx("main", { id: "main-content", className: main, children })
|
|
56
74
|
] }),
|
|
57
|
-
|
|
75
|
+
footer2
|
|
58
76
|
] });
|
|
59
77
|
}
|
|
60
78
|
|
|
61
79
|
// src/ui/ArdoRoot.tsx
|
|
62
|
-
import {
|
|
80
|
+
import { cloneElement, isValidElement as isValidElement2 } from "react";
|
|
81
|
+
import { Outlet, useLocation as useLocation3 } from "react-router";
|
|
63
82
|
|
|
64
83
|
// src/ui/Header.tsx
|
|
65
|
-
import { useState as useState2, lazy, Suspense } from "react";
|
|
66
|
-
import { Link, NavLink as RouterNavLink } from "react-router";
|
|
84
|
+
import { useEffect as useEffect2, useState as useState2, lazy, Suspense } from "react";
|
|
85
|
+
import { Link, NavLink as RouterNavLink, useLocation } from "react-router";
|
|
86
|
+
|
|
87
|
+
// src/ui/Header.css.ts
|
|
88
|
+
var desktopNav = "Header_desktopNav__qjc2r59";
|
|
89
|
+
var hamburger = "Header_hamburger__qjc2r58";
|
|
90
|
+
var header = "Header_header__qjc2r50";
|
|
91
|
+
var headerContainer = "Header_headerContainer__qjc2r51";
|
|
92
|
+
var headerLeft = "Header_headerLeft__qjc2r52";
|
|
93
|
+
var headerRight = "Header_headerRight__qjc2r53";
|
|
94
|
+
var logo = "Header_logo__qjc2r55";
|
|
95
|
+
var logoLink = "Header_logoLink__qjc2r54";
|
|
96
|
+
var mobileMenu = "Header_mobileMenu__qjc2r5a";
|
|
97
|
+
var mobileMenuButton = "Header_mobileMenuButton__qjc2r57";
|
|
98
|
+
var siteTitle = "Header_siteTitle__qjc2r56";
|
|
99
|
+
|
|
100
|
+
// src/ui/Nav.css.ts
|
|
101
|
+
var nav = "Nav_nav__85hnke0";
|
|
102
|
+
var navLink = "Nav_navLink__85hnke1";
|
|
103
|
+
var socialLink = "Nav_socialLink__85hnke2";
|
|
67
104
|
|
|
68
105
|
// src/ui/components/ThemeToggle.tsx
|
|
69
106
|
import { useState, useEffect } from "react";
|
|
107
|
+
|
|
108
|
+
// src/ui/components/ThemeToggle.css.ts
|
|
109
|
+
var themeToggle = "ThemeToggle_themeToggle__18g5iyz0";
|
|
110
|
+
|
|
111
|
+
// src/ui/components/ThemeToggle.tsx
|
|
70
112
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
71
113
|
function ThemeToggle() {
|
|
72
114
|
const [theme, setTheme] = useState("system");
|
|
@@ -88,18 +130,18 @@ function ThemeToggle() {
|
|
|
88
130
|
applyTheme(nextTheme);
|
|
89
131
|
};
|
|
90
132
|
if (!mounted) {
|
|
91
|
-
return /* @__PURE__ */ jsx2("button", { className:
|
|
133
|
+
return /* @__PURE__ */ jsx2("button", { className: themeToggle, "aria-label": "Toggle theme", children: /* @__PURE__ */ jsx2("span", { className: "ardo-theme-icon", children: /* @__PURE__ */ jsx2(Sun, { size: 20 }) }) });
|
|
92
134
|
}
|
|
93
135
|
return /* @__PURE__ */ jsx2(
|
|
94
136
|
"button",
|
|
95
137
|
{
|
|
96
|
-
className:
|
|
138
|
+
className: themeToggle,
|
|
97
139
|
onClick: toggleTheme,
|
|
98
140
|
"aria-label": `Switch to ${theme === "light" ? "dark" : theme === "dark" ? "system" : "light"} theme`,
|
|
99
141
|
children: /* @__PURE__ */ jsxs2("span", { className: "ardo-theme-icon", children: [
|
|
100
|
-
theme === "light" && /* @__PURE__ */ jsx2(
|
|
101
|
-
theme === "dark" && /* @__PURE__ */ jsx2(
|
|
102
|
-
theme === "system" && /* @__PURE__ */ jsx2(
|
|
142
|
+
theme === "light" && /* @__PURE__ */ jsx2(Sun, { size: 20 }),
|
|
143
|
+
theme === "dark" && /* @__PURE__ */ jsx2(Moon, { size: 20 }),
|
|
144
|
+
theme === "system" && /* @__PURE__ */ jsx2(Monitor, { size: 20 })
|
|
103
145
|
] })
|
|
104
146
|
}
|
|
105
147
|
);
|
|
@@ -118,60 +160,81 @@ function applyTheme(theme) {
|
|
|
118
160
|
|
|
119
161
|
// src/ui/Header.tsx
|
|
120
162
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
121
|
-
var LazySearch = lazy(() => import("./Search-
|
|
163
|
+
var LazySearch = lazy(() => import("./Search-VYYG3D43.js").then((m) => ({ default: m.Search })));
|
|
122
164
|
function Header({
|
|
123
|
-
logo,
|
|
165
|
+
logo: logo2,
|
|
124
166
|
title,
|
|
125
|
-
nav,
|
|
167
|
+
nav: nav2,
|
|
126
168
|
actions,
|
|
127
169
|
search = true,
|
|
128
|
-
themeToggle = true,
|
|
170
|
+
themeToggle: themeToggle2 = true,
|
|
171
|
+
mobileMenuContent,
|
|
129
172
|
className
|
|
130
173
|
}) {
|
|
174
|
+
const location = useLocation();
|
|
131
175
|
const config = useConfig();
|
|
132
176
|
const themeConfig = useThemeConfig();
|
|
133
177
|
const [mobileMenuOpen, setMobileMenuOpen] = useState2(false);
|
|
134
|
-
const resolvedLogo =
|
|
178
|
+
const resolvedLogo = logo2 ?? themeConfig.logo;
|
|
135
179
|
const resolvedTitle = title ?? (themeConfig.siteTitle !== false ? themeConfig.siteTitle ?? config.title : void 0);
|
|
136
|
-
const resolvedNav =
|
|
180
|
+
const resolvedNav = nav2 ?? (themeConfig.nav?.length ? /* @__PURE__ */ jsx3(AutoNav, { items: themeConfig.nav }) : void 0);
|
|
137
181
|
const resolvedActions = actions ?? (themeConfig.socialLinks?.length ? themeConfig.socialLinks.map((link, i) => /* @__PURE__ */ jsx3(SocialLink, { href: link.link, icon: link.icon, ariaLabel: link.ariaLabel }, i)) : void 0);
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
182
|
+
const hasMobileMenu = Boolean(mobileMenuContent);
|
|
183
|
+
useEffect2(() => {
|
|
184
|
+
setMobileMenuOpen(false);
|
|
185
|
+
}, [location.pathname]);
|
|
186
|
+
const handleMobileMenuClick = (event) => {
|
|
187
|
+
const target = event.target;
|
|
188
|
+
if (target.closest("a")) {
|
|
189
|
+
setMobileMenuOpen(false);
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
return /* @__PURE__ */ jsxs3("header", { className: className ?? header, children: [
|
|
193
|
+
/* @__PURE__ */ jsxs3("div", { className: headerContainer, children: [
|
|
194
|
+
/* @__PURE__ */ jsxs3("div", { className: headerLeft, children: [
|
|
195
|
+
hasMobileMenu && /* @__PURE__ */ jsx3(
|
|
142
196
|
"button",
|
|
143
197
|
{
|
|
144
|
-
|
|
198
|
+
type: "button",
|
|
199
|
+
className: mobileMenuButton,
|
|
145
200
|
onClick: () => setMobileMenuOpen(!mobileMenuOpen),
|
|
146
201
|
"aria-label": "Toggle menu",
|
|
147
202
|
"aria-expanded": mobileMenuOpen,
|
|
148
|
-
children: /* @__PURE__ */ jsxs3("span", { className:
|
|
203
|
+
children: /* @__PURE__ */ jsxs3("span", { className: hamburger, children: [
|
|
149
204
|
/* @__PURE__ */ jsx3("span", {}),
|
|
150
205
|
/* @__PURE__ */ jsx3("span", {}),
|
|
151
206
|
/* @__PURE__ */ jsx3("span", {})
|
|
152
207
|
] })
|
|
153
208
|
}
|
|
154
209
|
),
|
|
155
|
-
/* @__PURE__ */ jsxs3(Link, { to: "/", className:
|
|
210
|
+
/* @__PURE__ */ jsxs3(Link, { to: "/", className: logoLink, children: [
|
|
156
211
|
resolvedLogo && /* @__PURE__ */ jsx3(
|
|
157
212
|
"img",
|
|
158
213
|
{
|
|
159
214
|
src: typeof resolvedLogo === "string" ? resolvedLogo : resolvedLogo.light,
|
|
160
215
|
alt: resolvedTitle ?? "Logo",
|
|
161
|
-
className:
|
|
216
|
+
className: logo
|
|
162
217
|
}
|
|
163
218
|
),
|
|
164
|
-
resolvedTitle && /* @__PURE__ */ jsx3("span", { className:
|
|
219
|
+
resolvedTitle && /* @__PURE__ */ jsx3("span", { className: siteTitle, children: resolvedTitle })
|
|
165
220
|
] })
|
|
166
221
|
] }),
|
|
167
|
-
resolvedNav && /* @__PURE__ */ jsx3("div", { className:
|
|
168
|
-
/* @__PURE__ */ jsxs3("div", { className:
|
|
169
|
-
search && /* @__PURE__ */ jsx3(Suspense, { fallback: /* @__PURE__ */ jsx3("span", {
|
|
170
|
-
|
|
222
|
+
resolvedNav && /* @__PURE__ */ jsx3("div", { className: desktopNav, children: resolvedNav }),
|
|
223
|
+
/* @__PURE__ */ jsxs3("div", { className: headerRight, children: [
|
|
224
|
+
search && /* @__PURE__ */ jsx3(Suspense, { fallback: /* @__PURE__ */ jsx3("span", {}), children: /* @__PURE__ */ jsx3(LazySearch, {}) }),
|
|
225
|
+
themeToggle2 && /* @__PURE__ */ jsx3(ThemeToggle, {}),
|
|
171
226
|
resolvedActions
|
|
172
227
|
] })
|
|
173
228
|
] }),
|
|
174
|
-
|
|
229
|
+
resolvedNav && /* @__PURE__ */ jsx3("div", { className: "ardo-mobile-top-nav", children: /* @__PURE__ */ jsx3("div", { className: "ardo-mobile-top-nav-inner", children: resolvedNav }) }),
|
|
230
|
+
mobileMenuOpen && hasMobileMenu && /* @__PURE__ */ jsx3("div", { className: mobileMenu, children: mobileMenuContent && /* @__PURE__ */ jsx3(
|
|
231
|
+
"div",
|
|
232
|
+
{
|
|
233
|
+
className: "ardo-mobile-menu-content ardo-mobile-menu-section",
|
|
234
|
+
onClick: handleMobileMenuClick,
|
|
235
|
+
children: mobileMenuContent
|
|
236
|
+
}
|
|
237
|
+
) })
|
|
175
238
|
] });
|
|
176
239
|
}
|
|
177
240
|
function SocialLink({ href, icon, ariaLabel, className }) {
|
|
@@ -181,41 +244,41 @@ function SocialLink({ href, icon, ariaLabel, className }) {
|
|
|
181
244
|
href,
|
|
182
245
|
target: "_blank",
|
|
183
246
|
rel: "noopener noreferrer",
|
|
184
|
-
className: className ??
|
|
247
|
+
className: className ?? socialLink,
|
|
185
248
|
"aria-label": ariaLabel ?? icon,
|
|
186
249
|
children: /* @__PURE__ */ jsx3(SocialIcon, { icon })
|
|
187
250
|
}
|
|
188
251
|
);
|
|
189
252
|
}
|
|
190
253
|
function AutoNav({ items }) {
|
|
191
|
-
return /* @__PURE__ */ jsx3("nav", { className:
|
|
254
|
+
return /* @__PURE__ */ jsx3("nav", { className: nav, children: items.map((item, i) => /* @__PURE__ */ jsx3(AutoNavItem, { item }, i)) });
|
|
192
255
|
}
|
|
193
256
|
function AutoNavItem({ item }) {
|
|
194
257
|
if (item.link?.startsWith("http")) {
|
|
195
|
-
return /* @__PURE__ */ jsx3("a", { href: item.link, className:
|
|
258
|
+
return /* @__PURE__ */ jsx3("a", { href: item.link, className: navLink, target: "_blank", rel: "noopener noreferrer", children: item.text });
|
|
196
259
|
}
|
|
197
260
|
if (item.link) {
|
|
198
261
|
return /* @__PURE__ */ jsx3(
|
|
199
262
|
RouterNavLink,
|
|
200
263
|
{
|
|
201
264
|
to: item.link,
|
|
202
|
-
className: ({ isActive }) => [
|
|
265
|
+
className: ({ isActive }) => [navLink, isActive && "active"].filter(Boolean).join(" "),
|
|
203
266
|
children: item.text
|
|
204
267
|
}
|
|
205
268
|
);
|
|
206
269
|
}
|
|
207
|
-
return /* @__PURE__ */ jsx3("span", { className:
|
|
270
|
+
return /* @__PURE__ */ jsx3("span", { className: navLink, children: item.text });
|
|
208
271
|
}
|
|
209
272
|
var socialIcons = {
|
|
210
|
-
github:
|
|
211
|
-
twitter:
|
|
212
|
-
discord:
|
|
213
|
-
linkedin:
|
|
214
|
-
youtube:
|
|
215
|
-
npm:
|
|
273
|
+
github: Github,
|
|
274
|
+
twitter: Twitter,
|
|
275
|
+
discord: MessageCircle,
|
|
276
|
+
linkedin: Linkedin,
|
|
277
|
+
youtube: Youtube,
|
|
278
|
+
npm: Package
|
|
216
279
|
};
|
|
217
280
|
function SocialIcon({ icon }) {
|
|
218
|
-
const IconComponent = socialIcons[icon] ??
|
|
281
|
+
const IconComponent = socialIcons[icon] ?? Github;
|
|
219
282
|
return /* @__PURE__ */ jsx3(IconComponent, { size: 20 });
|
|
220
283
|
}
|
|
221
284
|
|
|
@@ -227,17 +290,30 @@ import {
|
|
|
227
290
|
createContext,
|
|
228
291
|
useContext as useContext2
|
|
229
292
|
} from "react";
|
|
230
|
-
import { NavLink, useLocation } from "react-router";
|
|
293
|
+
import { NavLink, useLocation as useLocation2 } from "react-router";
|
|
294
|
+
|
|
295
|
+
// src/ui/Sidebar.css.ts
|
|
296
|
+
var sidebar = "Sidebar_sidebar__1057ydn0";
|
|
297
|
+
var sidebarCollapse = "Sidebar_sidebarCollapse__1057ydn8";
|
|
298
|
+
var sidebarItem = "Sidebar_sidebarItem__1057ydn4";
|
|
299
|
+
var sidebarItemHeader = "Sidebar_sidebarItemHeader__1057ydn5";
|
|
300
|
+
var sidebarLink = "Sidebar_sidebarLink__1057ydn6";
|
|
301
|
+
var sidebarList = "Sidebar_sidebarList__1057ydn1";
|
|
302
|
+
var sidebarList0 = "Sidebar_sidebarList0__1057ydn2";
|
|
303
|
+
var sidebarList1 = "Sidebar_sidebarList1__1057ydn3";
|
|
304
|
+
var sidebarText = "Sidebar_sidebarText__1057ydn7";
|
|
305
|
+
|
|
306
|
+
// src/ui/Sidebar.tsx
|
|
231
307
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
232
308
|
var SidebarContext = createContext({ currentPath: "" });
|
|
233
309
|
function useSidebarContext() {
|
|
234
310
|
return useContext2(SidebarContext);
|
|
235
311
|
}
|
|
236
312
|
function Sidebar({ items, children, className }) {
|
|
237
|
-
const { pathname } =
|
|
313
|
+
const { pathname } = useLocation2();
|
|
238
314
|
const contextSidebar = useSidebar();
|
|
239
315
|
const resolvedItems = items ?? (children ? void 0 : contextSidebar);
|
|
240
|
-
return /* @__PURE__ */ jsx4(SidebarContext.Provider, { value: { currentPath: pathname }, children: /* @__PURE__ */ jsx4("aside", { className: className ??
|
|
316
|
+
return /* @__PURE__ */ jsx4(SidebarContext.Provider, { value: { currentPath: pathname }, children: /* @__PURE__ */ jsx4("aside", { className: className ?? sidebar, children: /* @__PURE__ */ jsx4("nav", { "aria-label": "Main navigation", children: children ? /* @__PURE__ */ jsx4("ul", { className: `${sidebarList} ${sidebarList0}`, children }) : resolvedItems?.length ? /* @__PURE__ */ jsx4(SidebarItems, { items: resolvedItems, depth: 0 }) : null }) }) });
|
|
241
317
|
}
|
|
242
318
|
function SidebarGroup({
|
|
243
319
|
title,
|
|
@@ -250,10 +326,10 @@ function SidebarGroup({
|
|
|
250
326
|
const [collapsed, setCollapsed] = useState3(initialCollapsed);
|
|
251
327
|
const { currentPath } = useSidebarContext();
|
|
252
328
|
const isChildActive = checkChildrenActive(children, currentPath);
|
|
253
|
-
const textClassName = [
|
|
329
|
+
const textClassName = [sidebarText, isChildActive && "child-active"].filter(Boolean).join(" ");
|
|
254
330
|
const hasChildren = Children.count(children) > 0;
|
|
255
|
-
return /* @__PURE__ */ jsxs4("li", { className: className ??
|
|
256
|
-
/* @__PURE__ */ jsxs4("div", { className:
|
|
331
|
+
return /* @__PURE__ */ jsxs4("li", { className: className ?? sidebarItem, children: [
|
|
332
|
+
/* @__PURE__ */ jsxs4("div", { className: sidebarItemHeader, children: [
|
|
257
333
|
to ? /* @__PURE__ */ jsx4(
|
|
258
334
|
NavLink,
|
|
259
335
|
{
|
|
@@ -274,19 +350,19 @@ function SidebarGroup({
|
|
|
274
350
|
collapsible && hasChildren && /* @__PURE__ */ jsx4(
|
|
275
351
|
"button",
|
|
276
352
|
{
|
|
277
|
-
className: [
|
|
353
|
+
className: [sidebarCollapse, collapsed && "collapsed"].filter(Boolean).join(" "),
|
|
278
354
|
onClick: () => setCollapsed(!collapsed),
|
|
279
355
|
"aria-label": collapsed ? "Expand" : "Collapse",
|
|
280
|
-
children: /* @__PURE__ */ jsx4(
|
|
356
|
+
children: /* @__PURE__ */ jsx4(ChevronDown, { size: 16 })
|
|
281
357
|
}
|
|
282
358
|
)
|
|
283
359
|
] }),
|
|
284
|
-
hasChildren && !collapsed && /* @__PURE__ */ jsx4("ul", { className:
|
|
360
|
+
hasChildren && !collapsed && /* @__PURE__ */ jsx4("ul", { className: `${sidebarList} ${sidebarList1}`, children })
|
|
285
361
|
] });
|
|
286
362
|
}
|
|
287
363
|
function SidebarLink({ to, children, className }) {
|
|
288
|
-
const baseClassName = className ??
|
|
289
|
-
return /* @__PURE__ */ jsx4("li", { className:
|
|
364
|
+
const baseClassName = className ?? sidebarLink;
|
|
365
|
+
return /* @__PURE__ */ jsx4("li", { className: sidebarItem, children: /* @__PURE__ */ jsx4(
|
|
290
366
|
NavLink,
|
|
291
367
|
{
|
|
292
368
|
to,
|
|
@@ -296,7 +372,13 @@ function SidebarLink({ to, children, className }) {
|
|
|
296
372
|
) });
|
|
297
373
|
}
|
|
298
374
|
function SidebarItems({ items, depth }) {
|
|
299
|
-
return /* @__PURE__ */ jsx4(
|
|
375
|
+
return /* @__PURE__ */ jsx4(
|
|
376
|
+
"ul",
|
|
377
|
+
{
|
|
378
|
+
className: `${sidebarList} ${depth === 0 ? sidebarList0 : sidebarList1}`,
|
|
379
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx4(SidebarItemComponent, { item, depth }, index))
|
|
380
|
+
}
|
|
381
|
+
);
|
|
300
382
|
}
|
|
301
383
|
function SidebarItemComponent({ item, depth }) {
|
|
302
384
|
const { currentPath } = useSidebarContext();
|
|
@@ -305,10 +387,10 @@ function SidebarItemComponent({ item, depth }) {
|
|
|
305
387
|
const isChildActive = hasChildren && item.items.some(
|
|
306
388
|
(child) => child.link === currentPath || child.items && child.items.some((grandchild) => grandchild.link === currentPath)
|
|
307
389
|
);
|
|
308
|
-
const linkClassName = [
|
|
309
|
-
const textClassName = [
|
|
310
|
-
return /* @__PURE__ */ jsxs4("li", { className:
|
|
311
|
-
/* @__PURE__ */ jsxs4("div", { className:
|
|
390
|
+
const linkClassName = [sidebarLink, isChildActive && "child-active"].filter(Boolean).join(" ");
|
|
391
|
+
const textClassName = [sidebarText, isChildActive && "child-active"].filter(Boolean).join(" ");
|
|
392
|
+
return /* @__PURE__ */ jsxs4("li", { className: sidebarItem, children: [
|
|
393
|
+
/* @__PURE__ */ jsxs4("div", { className: sidebarItemHeader, children: [
|
|
312
394
|
item.link ? /* @__PURE__ */ jsx4(
|
|
313
395
|
NavLink,
|
|
314
396
|
{
|
|
@@ -320,10 +402,10 @@ function SidebarItemComponent({ item, depth }) {
|
|
|
320
402
|
hasChildren && /* @__PURE__ */ jsx4(
|
|
321
403
|
"button",
|
|
322
404
|
{
|
|
323
|
-
className: [
|
|
405
|
+
className: [sidebarCollapse, collapsed && "collapsed"].filter(Boolean).join(" "),
|
|
324
406
|
onClick: () => setCollapsed(!collapsed),
|
|
325
407
|
"aria-label": collapsed ? "Expand" : "Collapse",
|
|
326
|
-
children: /* @__PURE__ */ jsx4(
|
|
408
|
+
children: /* @__PURE__ */ jsx4(ChevronDown, { size: 16 })
|
|
327
409
|
}
|
|
328
410
|
)
|
|
329
411
|
] }),
|
|
@@ -392,19 +474,19 @@ function Footer({
|
|
|
392
474
|
if (!hasContent) {
|
|
393
475
|
return null;
|
|
394
476
|
}
|
|
395
|
-
return /* @__PURE__ */ jsx5("footer", { className: className ??
|
|
396
|
-
(resolvedProject || ardoLink || resolvedSponsor) && /* @__PURE__ */ jsxs5("p", { className:
|
|
397
|
-
resolvedProject?.name && /* @__PURE__ */ jsx5(Fragment, { children: resolvedProject.homepage ? /* @__PURE__ */ jsxs5("a", { href: resolvedProject.homepage, className:
|
|
477
|
+
return /* @__PURE__ */ jsx5("footer", { className: className ?? footer, children: /* @__PURE__ */ jsx5("div", { className: "ardo-footer-container", children: children ?? /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
478
|
+
(resolvedProject || ardoLink || resolvedSponsor) && /* @__PURE__ */ jsxs5("p", { className: footerPrimary, children: [
|
|
479
|
+
resolvedProject?.name && /* @__PURE__ */ jsx5(Fragment, { children: resolvedProject.homepage ? /* @__PURE__ */ jsxs5("a", { href: resolvedProject.homepage, className: footerLink, children: [
|
|
398
480
|
resolvedProject.name,
|
|
399
481
|
resolvedProject.version ? ` v${resolvedProject.version}` : ""
|
|
400
482
|
] }) : /* @__PURE__ */ jsxs5("span", { children: [
|
|
401
483
|
resolvedProject.name,
|
|
402
484
|
resolvedProject.version ? ` v${resolvedProject.version}` : ""
|
|
403
485
|
] }) }),
|
|
404
|
-
resolvedProject?.name && ardoLink && /* @__PURE__ */ jsx5("span", { className:
|
|
405
|
-
ardoLink && /* @__PURE__ */ jsx5("a", { href: "https://ardo-docs.dev", className:
|
|
406
|
-
(resolvedProject?.name || ardoLink) && resolvedSponsor && /* @__PURE__ */ jsx5("span", { className:
|
|
407
|
-
resolvedSponsor && /* @__PURE__ */ jsxs5("a", { href: resolvedSponsor.link, className:
|
|
486
|
+
resolvedProject?.name && ardoLink && /* @__PURE__ */ jsx5("span", { className: footerSeparator, "aria-hidden": "true" }),
|
|
487
|
+
ardoLink && /* @__PURE__ */ jsx5("a", { href: "https://ardo-docs.dev", className: footerLink, children: "Built with Ardo" }),
|
|
488
|
+
(resolvedProject?.name || ardoLink) && resolvedSponsor && /* @__PURE__ */ jsx5("span", { className: footerSeparator, "aria-hidden": "true" }),
|
|
489
|
+
resolvedSponsor && /* @__PURE__ */ jsxs5("a", { href: resolvedSponsor.link, className: footerLink, children: [
|
|
408
490
|
"Sponsored by ",
|
|
409
491
|
resolvedSponsor.text
|
|
410
492
|
] })
|
|
@@ -412,18 +494,18 @@ function Footer({
|
|
|
412
494
|
resolvedMessage && /* @__PURE__ */ jsx5(
|
|
413
495
|
"p",
|
|
414
496
|
{
|
|
415
|
-
className:
|
|
497
|
+
className: footerMessage,
|
|
416
498
|
dangerouslySetInnerHTML: { __html: resolvedMessage }
|
|
417
499
|
}
|
|
418
500
|
),
|
|
419
501
|
resolvedCopyright && /* @__PURE__ */ jsx5(
|
|
420
502
|
"p",
|
|
421
503
|
{
|
|
422
|
-
className:
|
|
504
|
+
className: footerCopyright,
|
|
423
505
|
dangerouslySetInnerHTML: { __html: resolvedCopyright }
|
|
424
506
|
}
|
|
425
507
|
),
|
|
426
|
-
resolvedBuildTime && /* @__PURE__ */ jsxs5("p", { className:
|
|
508
|
+
resolvedBuildTime && /* @__PURE__ */ jsxs5("p", { className: footerBuildTime, children: [
|
|
427
509
|
"Built on ",
|
|
428
510
|
formatBuildTime(resolvedBuildTime),
|
|
429
511
|
resolvedBuildHash && /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
@@ -439,23 +521,30 @@ function Footer({
|
|
|
439
521
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
440
522
|
function ArdoRoot({
|
|
441
523
|
config,
|
|
442
|
-
sidebar,
|
|
443
|
-
header,
|
|
524
|
+
sidebar: sidebar2,
|
|
525
|
+
header: header2,
|
|
444
526
|
sidebarContent,
|
|
445
|
-
footer,
|
|
527
|
+
footer: footer2,
|
|
446
528
|
headerProps,
|
|
447
529
|
sidebarProps,
|
|
448
530
|
footerProps,
|
|
449
531
|
className,
|
|
450
532
|
children
|
|
451
533
|
}) {
|
|
452
|
-
const location =
|
|
534
|
+
const location = useLocation3();
|
|
453
535
|
const isHomePage = location.pathname === "/" || location.pathname === "";
|
|
454
|
-
const resolvedHeader = header ?? /* @__PURE__ */ jsx6(Header, { ...headerProps });
|
|
455
536
|
const resolvedSidebar = isHomePage ? void 0 : sidebarContent ?? /* @__PURE__ */ jsx6(Sidebar, { ...sidebarProps });
|
|
456
|
-
const
|
|
457
|
-
const
|
|
458
|
-
|
|
537
|
+
const inferredMobileMenuContent = isHomePage ? void 0 : resolvedSidebar;
|
|
538
|
+
const resolvedHeader = header2 ? enhanceHeaderWithMobileMenuContent(header2, inferredMobileMenuContent) : /* @__PURE__ */ jsx6(
|
|
539
|
+
Header,
|
|
540
|
+
{
|
|
541
|
+
...headerProps,
|
|
542
|
+
mobileMenuContent: headerProps?.mobileMenuContent ?? inferredMobileMenuContent
|
|
543
|
+
}
|
|
544
|
+
);
|
|
545
|
+
const resolvedFooter = footer2 ?? /* @__PURE__ */ jsx6(Footer, { ...footerProps });
|
|
546
|
+
const resolvedClassName = className ?? (isHomePage ? `${layout} ${home}` : layout);
|
|
547
|
+
return /* @__PURE__ */ jsx6(ArdoProvider, { config, sidebar: sidebar2, children: /* @__PURE__ */ jsx6(
|
|
459
548
|
Layout,
|
|
460
549
|
{
|
|
461
550
|
className: resolvedClassName,
|
|
@@ -466,17 +555,27 @@ function ArdoRoot({
|
|
|
466
555
|
}
|
|
467
556
|
) });
|
|
468
557
|
}
|
|
558
|
+
function enhanceHeaderWithMobileMenuContent(header2, mobileMenuContent) {
|
|
559
|
+
if (!isValidElement2(header2) || header2.type !== Header) {
|
|
560
|
+
return header2;
|
|
561
|
+
}
|
|
562
|
+
const existingMobileMenuContent = header2.props.mobileMenuContent;
|
|
563
|
+
if (existingMobileMenuContent !== void 0) {
|
|
564
|
+
return header2;
|
|
565
|
+
}
|
|
566
|
+
return cloneElement(header2, { mobileMenuContent });
|
|
567
|
+
}
|
|
469
568
|
|
|
470
569
|
// src/ui/Nav.tsx
|
|
471
570
|
import { useState as useState4, createContext as createContext2, useContext as useContext3 } from "react";
|
|
472
571
|
import { NavLink as RouterNavLink2 } from "react-router";
|
|
473
|
-
import { jsx as jsx7
|
|
572
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
474
573
|
var NavContext = createContext2(null);
|
|
475
574
|
function useNavContext() {
|
|
476
575
|
return useContext3(NavContext);
|
|
477
576
|
}
|
|
478
577
|
function Nav({ children, className }) {
|
|
479
|
-
return /* @__PURE__ */ jsx7("nav", { className: className ??
|
|
578
|
+
return /* @__PURE__ */ jsx7("nav", { className: className ?? nav, children });
|
|
480
579
|
}
|
|
481
580
|
function NavLink2({
|
|
482
581
|
to,
|
|
@@ -486,7 +585,7 @@ function NavLink2({
|
|
|
486
585
|
activeMatch: _activeMatch
|
|
487
586
|
}) {
|
|
488
587
|
const navContext = useNavContext();
|
|
489
|
-
const baseClassName = className ??
|
|
588
|
+
const baseClassName = className ?? navLink;
|
|
490
589
|
const handleClick = () => {
|
|
491
590
|
navContext?.setMobileMenuOpen(false);
|
|
492
591
|
};
|
|
@@ -516,36 +615,28 @@ function NavLink2({
|
|
|
516
615
|
}
|
|
517
616
|
return /* @__PURE__ */ jsx7("span", { className: baseClassName, children });
|
|
518
617
|
}
|
|
519
|
-
function NavDropdown({ text, children, className }) {
|
|
520
|
-
const [open, setOpen] = useState4(false);
|
|
521
|
-
return /* @__PURE__ */ jsxs6(
|
|
522
|
-
"div",
|
|
523
|
-
{
|
|
524
|
-
className: className ?? "ardo-nav-dropdown",
|
|
525
|
-
onMouseEnter: () => setOpen(true),
|
|
526
|
-
onMouseLeave: () => setOpen(false),
|
|
527
|
-
children: [
|
|
528
|
-
/* @__PURE__ */ jsxs6("button", { className: "ardo-nav-dropdown-button", children: [
|
|
529
|
-
text,
|
|
530
|
-
/* @__PURE__ */ jsx7("span", { className: "ardo-nav-dropdown-icon", children: "\u25BC" })
|
|
531
|
-
] }),
|
|
532
|
-
open && /* @__PURE__ */ jsx7("div", { className: "ardo-nav-dropdown-menu", children })
|
|
533
|
-
]
|
|
534
|
-
}
|
|
535
|
-
);
|
|
536
|
-
}
|
|
537
618
|
|
|
538
619
|
// src/ui/TOC.tsx
|
|
539
|
-
import { useState as useState5, useEffect as
|
|
540
|
-
|
|
620
|
+
import { useState as useState5, useEffect as useEffect3 } from "react";
|
|
621
|
+
|
|
622
|
+
// src/ui/TOC.css.ts
|
|
623
|
+
var toc = "TOC_toc__1trko900";
|
|
624
|
+
var tocLink = "TOC_tocLink__1trko903";
|
|
625
|
+
var tocLink3 = "TOC_tocLink3__1trko904";
|
|
626
|
+
var tocLink4 = "TOC_tocLink4__1trko905";
|
|
627
|
+
var tocList = "TOC_tocList__1trko902";
|
|
628
|
+
var tocTitle = "TOC_tocTitle__1trko901";
|
|
629
|
+
|
|
630
|
+
// src/ui/TOC.tsx
|
|
631
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
541
632
|
function TOC() {
|
|
542
|
-
const
|
|
633
|
+
const toc2 = useTOC();
|
|
543
634
|
const themeConfig = useThemeConfig();
|
|
544
635
|
const [activeId, setActiveId] = useState5("");
|
|
545
636
|
const label = themeConfig.outline?.label ?? "On this page";
|
|
546
|
-
|
|
547
|
-
if (
|
|
548
|
-
const headingElements =
|
|
637
|
+
useEffect3(() => {
|
|
638
|
+
if (toc2.length === 0) return;
|
|
639
|
+
const headingElements = toc2.map((item) => document.getElementById(item.id)).filter(Boolean);
|
|
549
640
|
if (headingElements.length === 0) return;
|
|
550
641
|
const observer = new IntersectionObserver(
|
|
551
642
|
(entries) => {
|
|
@@ -565,28 +656,30 @@ function TOC() {
|
|
|
565
656
|
return () => {
|
|
566
657
|
headingElements.forEach((el) => el && observer.unobserve(el));
|
|
567
658
|
};
|
|
568
|
-
}, [
|
|
569
|
-
if (
|
|
659
|
+
}, [toc2]);
|
|
660
|
+
if (toc2.length === 0) {
|
|
570
661
|
return null;
|
|
571
662
|
}
|
|
572
|
-
return /* @__PURE__ */ jsx8("aside", { className:
|
|
573
|
-
/* @__PURE__ */ jsx8("h3", { className:
|
|
574
|
-
/* @__PURE__ */ jsx8("nav", {
|
|
663
|
+
return /* @__PURE__ */ jsx8("aside", { className: toc, children: /* @__PURE__ */ jsxs6("div", { children: [
|
|
664
|
+
/* @__PURE__ */ jsx8("h3", { className: tocTitle, children: label }),
|
|
665
|
+
/* @__PURE__ */ jsx8("nav", { "aria-label": "Table of contents", children: /* @__PURE__ */ jsx8(TOCItems, { items: toc2, activeId }) })
|
|
575
666
|
] }) });
|
|
576
667
|
}
|
|
577
668
|
function TOCItems({ items, activeId }) {
|
|
578
|
-
return /* @__PURE__ */ jsx8("ul", { className:
|
|
669
|
+
return /* @__PURE__ */ jsx8("ul", { className: tocList, children: items.map((item) => /* @__PURE__ */ jsx8(TOCItemComponent, { item, activeId }, item.id)) });
|
|
579
670
|
}
|
|
580
671
|
function TOCItemComponent({ item, activeId }) {
|
|
581
672
|
const isActive = item.id === activeId;
|
|
582
673
|
const hasActiveChild = hasActiveDescendant(item, activeId);
|
|
583
|
-
return /* @__PURE__ */
|
|
674
|
+
return /* @__PURE__ */ jsxs6("li", { children: [
|
|
584
675
|
/* @__PURE__ */ jsx8(
|
|
585
676
|
"a",
|
|
586
677
|
{
|
|
587
678
|
href: `#${item.id}`,
|
|
588
679
|
className: [
|
|
589
|
-
|
|
680
|
+
tocLink,
|
|
681
|
+
item.level === 3 && tocLink3,
|
|
682
|
+
item.level === 4 && tocLink4,
|
|
590
683
|
isActive && "active",
|
|
591
684
|
hasActiveChild && "child-active"
|
|
592
685
|
].filter(Boolean).join(" "),
|
|
@@ -614,11 +707,11 @@ function hasActiveDescendant(item, activeId) {
|
|
|
614
707
|
}
|
|
615
708
|
|
|
616
709
|
// src/ui/DocPage.tsx
|
|
617
|
-
import { jsx as jsx9, jsxs as
|
|
710
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
618
711
|
function DocPage({ children }) {
|
|
619
712
|
const pageData = usePageData();
|
|
620
713
|
const showToc = pageData?.frontmatter.outline !== false && pageData?.toc && pageData.toc.length > 0;
|
|
621
|
-
return /* @__PURE__ */ jsx9(Layout, { children: /* @__PURE__ */
|
|
714
|
+
return /* @__PURE__ */ jsx9(Layout, { children: /* @__PURE__ */ jsxs7("div", { className: docPage, children: [
|
|
622
715
|
/* @__PURE__ */ jsx9(Content, { children }),
|
|
623
716
|
showToc && /* @__PURE__ */ jsx9(TOC, {})
|
|
624
717
|
] }) });
|
|
@@ -626,7 +719,7 @@ function DocPage({ children }) {
|
|
|
626
719
|
function DocContent({ children }) {
|
|
627
720
|
const pageData = usePageData();
|
|
628
721
|
const showToc = pageData?.frontmatter.outline !== false && pageData?.toc && pageData.toc.length > 0;
|
|
629
|
-
return /* @__PURE__ */
|
|
722
|
+
return /* @__PURE__ */ jsxs7("div", { className: docPage, children: [
|
|
630
723
|
/* @__PURE__ */ jsx9(Content, { children }),
|
|
631
724
|
showToc && /* @__PURE__ */ jsx9(TOC, {})
|
|
632
725
|
] });
|
|
@@ -637,14 +730,41 @@ function DocLayout({ content }) {
|
|
|
637
730
|
|
|
638
731
|
// src/ui/HomePage.tsx
|
|
639
732
|
import { Link as Link2 } from "react-router";
|
|
640
|
-
|
|
733
|
+
|
|
734
|
+
// src/ui/components/Hero.css.ts
|
|
735
|
+
var hero = "Hero_hero__j780910";
|
|
736
|
+
var heroAction = "Hero_heroAction__j780918";
|
|
737
|
+
var heroActionAlt = "Hero_heroActionAlt__j78091a";
|
|
738
|
+
var heroActionBrand = "Hero_heroActionBrand__j780919";
|
|
739
|
+
var heroActions = "Hero_heroActions__j780917";
|
|
740
|
+
var heroAnimate = "Hero_heroAnimate__j780912";
|
|
741
|
+
var heroContainer = "Hero_heroContainer__j780911";
|
|
742
|
+
var heroName = "Hero_heroName__j780914";
|
|
743
|
+
var heroTagline = "Hero_heroTagline__j780916";
|
|
744
|
+
var heroText = "Hero_heroText__j780915";
|
|
745
|
+
var heroVersion = "Hero_heroVersion__j780913";
|
|
746
|
+
|
|
747
|
+
// src/ui/components/Features.css.ts
|
|
748
|
+
var feature = "Features_feature__15qe9bp5";
|
|
749
|
+
var featureDetails = "Features_featureDetails__15qe9bp8";
|
|
750
|
+
var featureIcon = "Features_featureIcon__15qe9bp6";
|
|
751
|
+
var featureLink = "Features_featureLink__15qe9bp9";
|
|
752
|
+
var featureTitle = "Features_featureTitle__15qe9bp7";
|
|
753
|
+
var features = "Features_features__15qe9bp0";
|
|
754
|
+
var featuresContainer = "Features_featuresContainer__15qe9bp4";
|
|
755
|
+
var featuresHeader = "Features_featuresHeader__15qe9bp1";
|
|
756
|
+
var featuresSubtitle = "Features_featuresSubtitle__15qe9bp3";
|
|
757
|
+
var featuresTitle = "Features_featuresTitle__15qe9bp2";
|
|
758
|
+
|
|
759
|
+
// src/ui/HomePage.tsx
|
|
760
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
641
761
|
function HomePage() {
|
|
642
762
|
const pageData = usePageData();
|
|
643
763
|
const config = useConfig();
|
|
644
764
|
const themeConfig = useThemeConfig();
|
|
645
|
-
const
|
|
646
|
-
const
|
|
647
|
-
return /* @__PURE__ */
|
|
765
|
+
const hero2 = pageData?.frontmatter.hero;
|
|
766
|
+
const features2 = pageData?.frontmatter.features;
|
|
767
|
+
return /* @__PURE__ */ jsxs8("div", { className: home, children: [
|
|
648
768
|
/* @__PURE__ */ jsx10(
|
|
649
769
|
Header,
|
|
650
770
|
{
|
|
@@ -654,35 +774,35 @@ function HomePage() {
|
|
|
654
774
|
actions: themeConfig.socialLinks?.map((link, index) => /* @__PURE__ */ jsx10(SocialLink, { href: link.link, icon: link.icon, ariaLabel: link.ariaLabel }, index))
|
|
655
775
|
}
|
|
656
776
|
),
|
|
657
|
-
/* @__PURE__ */
|
|
658
|
-
|
|
659
|
-
|
|
777
|
+
/* @__PURE__ */ jsxs8("main", { className: homeMain, children: [
|
|
778
|
+
hero2 && /* @__PURE__ */ jsx10("section", { className: hero, children: /* @__PURE__ */ jsxs8("div", { className: heroContainer, children: [
|
|
779
|
+
hero2.image && /* @__PURE__ */ jsx10("div", { children: /* @__PURE__ */ jsx10(
|
|
660
780
|
"img",
|
|
661
781
|
{
|
|
662
|
-
src: typeof
|
|
663
|
-
alt:
|
|
782
|
+
src: typeof hero2.image === "string" ? hero2.image : hero2.image.light,
|
|
783
|
+
alt: hero2.name || config.title
|
|
664
784
|
}
|
|
665
785
|
) }),
|
|
666
|
-
/* @__PURE__ */
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
786
|
+
/* @__PURE__ */ jsxs8("div", { children: [
|
|
787
|
+
hero2.name && /* @__PURE__ */ jsx10("h1", { className: heroName, children: hero2.name }),
|
|
788
|
+
hero2.text && /* @__PURE__ */ jsx10("p", { className: heroText, children: hero2.text }),
|
|
789
|
+
hero2.tagline && /* @__PURE__ */ jsx10("p", { className: heroTagline, children: hero2.tagline }),
|
|
790
|
+
hero2.actions && hero2.actions.length > 0 && /* @__PURE__ */ jsx10("div", { className: heroActions, children: hero2.actions.map((action, index) => /* @__PURE__ */ jsx10(
|
|
671
791
|
Link2,
|
|
672
792
|
{
|
|
673
793
|
to: action.link,
|
|
674
|
-
className:
|
|
794
|
+
className: `${heroAction} ${action.theme === "alt" ? heroActionAlt : heroActionBrand}`,
|
|
675
795
|
children: action.text
|
|
676
796
|
},
|
|
677
797
|
index
|
|
678
798
|
)) })
|
|
679
799
|
] })
|
|
680
800
|
] }) }),
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
/* @__PURE__ */ jsx10("h3", { className:
|
|
684
|
-
/* @__PURE__ */ jsx10("p", { className:
|
|
685
|
-
|
|
801
|
+
features2 && features2.length > 0 && /* @__PURE__ */ jsx10("section", { className: features, children: /* @__PURE__ */ jsx10("div", { className: featuresContainer, children: features2.map((feature2, index) => /* @__PURE__ */ jsxs8("div", { className: feature, children: [
|
|
802
|
+
feature2.icon && /* @__PURE__ */ jsx10("div", { className: featureIcon, children: feature2.icon }),
|
|
803
|
+
/* @__PURE__ */ jsx10("h3", { className: featureTitle, children: feature2.title }),
|
|
804
|
+
/* @__PURE__ */ jsx10("p", { className: featureDetails, children: feature2.details }),
|
|
805
|
+
feature2.link && /* @__PURE__ */ jsx10(Link2, { to: feature2.link, className: featureLink, children: feature2.linkText || "Learn more" })
|
|
686
806
|
] }, index)) }) })
|
|
687
807
|
] }),
|
|
688
808
|
/* @__PURE__ */ jsx10(Footer, {})
|
|
@@ -691,25 +811,25 @@ function HomePage() {
|
|
|
691
811
|
|
|
692
812
|
// src/ui/components/Hero.tsx
|
|
693
813
|
import { Link as Link3 } from "react-router";
|
|
694
|
-
import { Fragment as Fragment2, jsx as jsx11, jsxs as
|
|
814
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
695
815
|
function Hero({ name, text, tagline, image, actions, className, version }) {
|
|
696
816
|
const imageUrl = typeof image === "string" ? image : image?.light;
|
|
697
817
|
const imageAlt = typeof image === "string" ? name : image?.alt ?? name;
|
|
698
|
-
return /* @__PURE__ */ jsx11("section", { className: className ??
|
|
699
|
-
image && /* @__PURE__ */ jsx11("div", {
|
|
700
|
-
/* @__PURE__ */
|
|
701
|
-
version && /* @__PURE__ */
|
|
818
|
+
return /* @__PURE__ */ jsx11("section", { className: className ?? hero, children: /* @__PURE__ */ jsxs9("div", { className: `${heroContainer} ${heroAnimate}`, children: [
|
|
819
|
+
image && /* @__PURE__ */ jsx11("div", { children: /* @__PURE__ */ jsx11("img", { src: imageUrl, alt: imageAlt }) }),
|
|
820
|
+
/* @__PURE__ */ jsxs9("div", { children: [
|
|
821
|
+
version && /* @__PURE__ */ jsxs9("span", { className: heroVersion, children: [
|
|
702
822
|
"v",
|
|
703
823
|
version
|
|
704
824
|
] }),
|
|
705
|
-
name && /* @__PURE__ */ jsx11("h1", { className:
|
|
706
|
-
text && /* @__PURE__ */ jsx11("p", { className:
|
|
707
|
-
tagline && /* @__PURE__ */ jsx11("p", { className:
|
|
708
|
-
actions && actions.length > 0 && /* @__PURE__ */ jsx11("div", { className:
|
|
825
|
+
name && /* @__PURE__ */ jsx11("h1", { className: heroName, children: name }),
|
|
826
|
+
text && /* @__PURE__ */ jsx11("p", { className: heroText, children: text }),
|
|
827
|
+
tagline && /* @__PURE__ */ jsx11("p", { className: heroTagline, children: tagline }),
|
|
828
|
+
actions && actions.length > 0 && /* @__PURE__ */ jsx11("div", { className: heroActions, children: actions.map((action, index) => {
|
|
709
829
|
const link = action.link;
|
|
710
830
|
const isExternal = typeof link === "string" && (link.startsWith("http://") || link.startsWith("https://"));
|
|
711
|
-
const
|
|
712
|
-
const content = /* @__PURE__ */
|
|
831
|
+
const actionClass = `${heroAction} ${action.theme === "alt" ? heroActionAlt : heroActionBrand}`;
|
|
832
|
+
const content = /* @__PURE__ */ jsxs9(Fragment2, { children: [
|
|
713
833
|
action.icon,
|
|
714
834
|
action.text
|
|
715
835
|
] });
|
|
@@ -718,7 +838,7 @@ function Hero({ name, text, tagline, image, actions, className, version }) {
|
|
|
718
838
|
"a",
|
|
719
839
|
{
|
|
720
840
|
href: link,
|
|
721
|
-
className:
|
|
841
|
+
className: actionClass,
|
|
722
842
|
target: "_blank",
|
|
723
843
|
rel: "noopener noreferrer",
|
|
724
844
|
children: content
|
|
@@ -726,7 +846,7 @@ function Hero({ name, text, tagline, image, actions, className, version }) {
|
|
|
726
846
|
index
|
|
727
847
|
);
|
|
728
848
|
}
|
|
729
|
-
return /* @__PURE__ */ jsx11(Link3, { to: link, className:
|
|
849
|
+
return /* @__PURE__ */ jsx11(Link3, { to: link, className: actionClass, children: content }, index);
|
|
730
850
|
}) })
|
|
731
851
|
] })
|
|
732
852
|
] }) });
|
|
@@ -734,7 +854,7 @@ function Hero({ name, text, tagline, image, actions, className, version }) {
|
|
|
734
854
|
|
|
735
855
|
// src/ui/components/Features.tsx
|
|
736
856
|
import { Link as Link4 } from "react-router";
|
|
737
|
-
import { jsx as jsx12, jsxs as
|
|
857
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
738
858
|
function FeatureCard({
|
|
739
859
|
title,
|
|
740
860
|
icon,
|
|
@@ -744,78 +864,26 @@ function FeatureCard({
|
|
|
744
864
|
className,
|
|
745
865
|
style
|
|
746
866
|
}) {
|
|
747
|
-
return /* @__PURE__ */
|
|
748
|
-
icon && /* @__PURE__ */ jsx12("div", { className:
|
|
749
|
-
/* @__PURE__ */ jsx12("h3", { className:
|
|
750
|
-
/* @__PURE__ */ jsx12("p", { className:
|
|
751
|
-
link && /* @__PURE__ */ jsx12(Link4, { to: link, className:
|
|
867
|
+
return /* @__PURE__ */ jsxs10("div", { className: className ?? feature, style, children: [
|
|
868
|
+
icon && /* @__PURE__ */ jsx12("div", { className: featureIcon, children: icon }),
|
|
869
|
+
/* @__PURE__ */ jsx12("h3", { className: featureTitle, children: title }),
|
|
870
|
+
/* @__PURE__ */ jsx12("p", { className: featureDetails, children: details }),
|
|
871
|
+
link && /* @__PURE__ */ jsx12(Link4, { to: link, className: featureLink, children: linkText || "Learn more" })
|
|
752
872
|
] });
|
|
753
873
|
}
|
|
754
874
|
function Features({ items, title, subtitle, className }) {
|
|
755
875
|
if (!items || items.length === 0) {
|
|
756
876
|
return null;
|
|
757
877
|
}
|
|
758
|
-
return /* @__PURE__ */
|
|
759
|
-
(title || subtitle) && /* @__PURE__ */
|
|
760
|
-
title && /* @__PURE__ */ jsx12("h2", { className:
|
|
761
|
-
subtitle && /* @__PURE__ */ jsx12("p", { className:
|
|
878
|
+
return /* @__PURE__ */ jsxs10("section", { className: className ?? features, children: [
|
|
879
|
+
(title || subtitle) && /* @__PURE__ */ jsxs10("div", { className: featuresHeader, children: [
|
|
880
|
+
title && /* @__PURE__ */ jsx12("h2", { className: featuresTitle, children: title }),
|
|
881
|
+
subtitle && /* @__PURE__ */ jsx12("p", { className: featuresSubtitle, children: subtitle })
|
|
762
882
|
] }),
|
|
763
|
-
/* @__PURE__ */ jsx12("div", { className:
|
|
883
|
+
/* @__PURE__ */ jsx12("div", { className: featuresContainer, children: items.map((feature2, index) => /* @__PURE__ */ jsx12(FeatureCard, { ...feature2, style: { animationDelay: `${index * 80}ms` } }, index)) })
|
|
764
884
|
] });
|
|
765
885
|
}
|
|
766
886
|
|
|
767
|
-
// src/ui/components/Steps.tsx
|
|
768
|
-
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
769
|
-
function Steps({ children }) {
|
|
770
|
-
return /* @__PURE__ */ jsx13("div", { className: "ardo-steps", children });
|
|
771
|
-
}
|
|
772
|
-
|
|
773
|
-
// src/ui/components/FileTree.tsx
|
|
774
|
-
import {
|
|
775
|
-
Children as Children2,
|
|
776
|
-
isValidElement as isValidElement2,
|
|
777
|
-
cloneElement
|
|
778
|
-
} from "react";
|
|
779
|
-
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
780
|
-
function getTextContent(node) {
|
|
781
|
-
if (typeof node === "string") return node;
|
|
782
|
-
if (typeof node === "number") return String(node);
|
|
783
|
-
if (!isValidElement2(node)) return "";
|
|
784
|
-
const children = node.props.children;
|
|
785
|
-
if (!children) return "";
|
|
786
|
-
return Children2.toArray(children).map(getTextContent).join("");
|
|
787
|
-
}
|
|
788
|
-
function isDirectory(node) {
|
|
789
|
-
const children = node.props.children;
|
|
790
|
-
const childArray = Children2.toArray(children);
|
|
791
|
-
for (const child of childArray) {
|
|
792
|
-
if (isValidElement2(child) && (child.type === "ul" || child.type === "ol")) {
|
|
793
|
-
return true;
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
const text = getTextContent(node).trim();
|
|
797
|
-
return text.endsWith("/");
|
|
798
|
-
}
|
|
799
|
-
function processChildren(children) {
|
|
800
|
-
return Children2.map(children, (child) => {
|
|
801
|
-
if (!isValidElement2(child)) return child;
|
|
802
|
-
const props = child.props;
|
|
803
|
-
const el = child;
|
|
804
|
-
if (child.type === "li") {
|
|
805
|
-
const isDir = isDirectory(child);
|
|
806
|
-
const className = [props.className, isDir ? "ardo-filetree-dir" : "ardo-filetree-file"].filter(Boolean).join(" ");
|
|
807
|
-
return cloneElement(el, { className }, processChildren(props.children));
|
|
808
|
-
}
|
|
809
|
-
if (child.type === "ul" || child.type === "ol") {
|
|
810
|
-
return cloneElement(el, {}, processChildren(props.children));
|
|
811
|
-
}
|
|
812
|
-
return child;
|
|
813
|
-
});
|
|
814
|
-
}
|
|
815
|
-
function FileTree({ children }) {
|
|
816
|
-
return /* @__PURE__ */ jsx14("div", { className: "ardo-filetree", children: processChildren(children) });
|
|
817
|
-
}
|
|
818
|
-
|
|
819
887
|
export {
|
|
820
888
|
RootLayout,
|
|
821
889
|
Layout,
|
|
@@ -829,7 +897,6 @@ export {
|
|
|
829
897
|
ArdoRoot,
|
|
830
898
|
Nav,
|
|
831
899
|
NavLink2 as NavLink,
|
|
832
|
-
NavDropdown,
|
|
833
900
|
TOC,
|
|
834
901
|
DocPage,
|
|
835
902
|
DocContent,
|
|
@@ -837,8 +904,6 @@ export {
|
|
|
837
904
|
HomePage,
|
|
838
905
|
Hero,
|
|
839
906
|
FeatureCard,
|
|
840
|
-
Features
|
|
841
|
-
Steps,
|
|
842
|
-
FileTree
|
|
907
|
+
Features
|
|
843
908
|
};
|
|
844
|
-
//# sourceMappingURL=chunk-
|
|
909
|
+
//# sourceMappingURL=chunk-CZM5NX27.js.map
|