ardo 3.1.0 → 3.2.1

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 (123) hide show
  1. package/README.md +9 -19
  2. package/dist/DocPage-CIBiCAxZ.js +1010 -0
  3. package/dist/DocPage-CIBiCAxZ.js.map +1 -0
  4. package/dist/assets/src/ui/Breadcrumb.css.ts.vanilla-Dpgq-C_p.css +20 -0
  5. package/dist/assets/src/ui/DocPage.css.ts.vanilla-CXKuz4U-.css +34 -0
  6. package/dist/assets/src/ui/Footer.css.ts.vanilla-BSzPIPt4.css +100 -0
  7. package/dist/assets/src/ui/Header.css.ts.vanilla-8QL0Jzgk.css +156 -0
  8. package/dist/assets/src/ui/Layout.css.ts.vanilla-Bpx_-gJt.css +67 -0
  9. package/dist/assets/src/ui/Nav.css.ts.vanilla-CsAQjogy.css +51 -0
  10. package/dist/assets/src/ui/Sidebar.css.ts.vanilla-D70qXTEr.css +115 -0
  11. package/dist/assets/src/ui/Toc.css.ts.vanilla-CYqcWgvD.css +52 -0
  12. package/dist/assets/src/ui/components/ApiItem.css.ts.vanilla-B_DW-1iJ.css +218 -0
  13. package/dist/assets/src/ui/components/CodeBlock.css.ts.vanilla-lNKqskjQ.css +182 -0
  14. package/dist/assets/src/ui/components/Container.css.ts.vanilla-CUhRUA9t.css +80 -0
  15. package/dist/assets/src/ui/components/CopyButton.css.ts.vanilla-DZZ5jgTM.css +24 -0
  16. package/dist/assets/src/ui/components/Features.css.ts.vanilla-D-pNXM9Q.css +129 -0
  17. package/dist/assets/src/ui/components/Hero.css.ts.vanilla-DHJVZ6GX.css +134 -0
  18. package/dist/assets/src/ui/components/Search.css.ts.vanilla-BYpWHzky.css +135 -0
  19. package/dist/assets/src/ui/components/Steps.css.ts.vanilla-CisaxeNj.css +59 -0
  20. package/dist/assets/src/ui/components/Tabs.css.ts.vanilla-C4-vJSnf.css +30 -0
  21. package/dist/assets/src/ui/components/ThemeToggle.css.ts.vanilla---sSUELC.css +22 -0
  22. package/dist/assets/src/ui/content.css.ts.vanilla-O_RaSPXm.css +106 -0
  23. package/dist/assets/src/ui/theme/animations.css.ts.vanilla-D6ImVUKy.css +10 -0
  24. package/dist/assets/src/ui/theme/dark.css.ts.vanilla-2iJgcpbU.css +87 -0
  25. package/dist/assets/src/ui/theme/light.css.ts.vanilla-CwinfWSf.css +87 -0
  26. package/dist/assets/src/ui/theme/reset.css.ts.vanilla-0Q3pLjfC.css +34 -0
  27. package/dist/brand-icons-DLJKqTun.js +59 -0
  28. package/dist/brand-icons-DLJKqTun.js.map +1 -0
  29. package/dist/config/index.d.ts +5 -5
  30. package/dist/config/index.d.ts.map +1 -0
  31. package/dist/config/index.js +54 -11
  32. package/dist/config/index.js.map +1 -1
  33. package/dist/contract.css-DYvFVCFE.d.ts +105 -0
  34. package/dist/contract.css-DYvFVCFE.d.ts.map +1 -0
  35. package/dist/generator-DPtRXxM_.js +1194 -0
  36. package/dist/generator-DPtRXxM_.js.map +1 -0
  37. package/dist/icons/index.d.ts +22 -1
  38. package/dist/icons/index.d.ts.map +1 -0
  39. package/dist/icons/index.js +2 -2
  40. package/dist/index-BTeHvysI.d.ts +807 -0
  41. package/dist/index-BTeHvysI.d.ts.map +1 -0
  42. package/dist/index-DySzkJlC.d.ts +78 -0
  43. package/dist/index-DySzkJlC.d.ts.map +1 -0
  44. package/dist/index.d.ts +5 -8
  45. package/dist/index.js +6 -100
  46. package/dist/mdx/provider.d.ts +61 -4
  47. package/dist/mdx/provider.d.ts.map +1 -0
  48. package/dist/mdx/provider.js +89 -117
  49. package/dist/mdx/provider.js.map +1 -1
  50. package/dist/runtime/index.d.ts +2 -41
  51. package/dist/runtime/index.js +2 -28
  52. package/dist/sidebar-utils-1Skqle1Q.js +109 -0
  53. package/dist/sidebar-utils-1Skqle1Q.js.map +1 -0
  54. package/dist/theme/index.d.ts +201 -182
  55. package/dist/theme/index.d.ts.map +1 -0
  56. package/dist/theme/index.js +288 -128
  57. package/dist/theme/index.js.map +1 -1
  58. package/dist/typedoc/components/index.d.ts +55 -0
  59. package/dist/typedoc/components/index.d.ts.map +1 -0
  60. package/dist/typedoc/components/index.js +339 -0
  61. package/dist/typedoc/components/index.js.map +1 -0
  62. package/dist/typedoc/index.d.ts +36 -305
  63. package/dist/typedoc/index.d.ts.map +1 -0
  64. package/dist/typedoc/index.js +97 -268
  65. package/dist/typedoc/index.js.map +1 -1
  66. package/dist/types-BCuJBsJu.d.ts +182 -0
  67. package/dist/types-BCuJBsJu.d.ts.map +1 -0
  68. package/dist/types-CTd_mkrv.d.ts +175 -0
  69. package/dist/types-CTd_mkrv.d.ts.map +1 -0
  70. package/dist/ui/index.d.ts +2 -178
  71. package/dist/ui/index.js +3 -95
  72. package/dist/ui/styles.css +1401 -1335
  73. package/dist/ui/styles.d.ts +1 -2
  74. package/dist/ui/styles.js +23 -4
  75. package/dist/ui-3grzJSsq.js +1314 -0
  76. package/dist/ui-3grzJSsq.js.map +1 -0
  77. package/dist/vite/index.d.ts +78 -86
  78. package/dist/vite/index.d.ts.map +1 -0
  79. package/dist/vite/index.js +2931 -1282
  80. package/dist/vite/index.js.map +1 -1
  81. package/package.json +30 -19
  82. package/dist/Features-D_Pt7zpA.d.ts +0 -615
  83. package/dist/Search-DOJMNI2T.css +0 -193
  84. package/dist/Search-DOJMNI2T.css.map +0 -1
  85. package/dist/Search-VYYG3D43.js +0 -10
  86. package/dist/Search-VYYG3D43.js.map +0 -1
  87. package/dist/chunk-4YQE3TNM.js +0 -1
  88. package/dist/chunk-4YQE3TNM.js.map +0 -1
  89. package/dist/chunk-AXLJDGQL.js +0 -1
  90. package/dist/chunk-AXLJDGQL.js.map +0 -1
  91. package/dist/chunk-CZM5NX27.js +0 -909
  92. package/dist/chunk-CZM5NX27.js.map +0 -1
  93. package/dist/chunk-FZP2AVJL.js +0 -43
  94. package/dist/chunk-FZP2AVJL.js.map +0 -1
  95. package/dist/chunk-IEPSORG5.js +0 -444
  96. package/dist/chunk-IEPSORG5.js.map +0 -1
  97. package/dist/chunk-KUWEUO37.js +0 -1
  98. package/dist/chunk-KUWEUO37.js.map +0 -1
  99. package/dist/chunk-NBRHGTR2.js +0 -79
  100. package/dist/chunk-NBRHGTR2.js.map +0 -1
  101. package/dist/chunk-PGHUPTGL.js +0 -1035
  102. package/dist/chunk-PGHUPTGL.js.map +0 -1
  103. package/dist/chunk-PMS3P4MA.js +0 -43
  104. package/dist/chunk-PMS3P4MA.js.map +0 -1
  105. package/dist/chunk-QELSOHIY.js +0 -46
  106. package/dist/chunk-QELSOHIY.js.map +0 -1
  107. package/dist/chunk-R2QKY6G3.js +0 -1
  108. package/dist/chunk-R2QKY6G3.js.map +0 -1
  109. package/dist/chunk-ZPYQQZ7J.js +0 -210
  110. package/dist/chunk-ZPYQQZ7J.js.map +0 -1
  111. package/dist/icons/index.js.map +0 -1
  112. package/dist/index.css +0 -1290
  113. package/dist/index.css.map +0 -1
  114. package/dist/index.js.map +0 -1
  115. package/dist/mdx/provider.css +0 -403
  116. package/dist/mdx/provider.css.map +0 -1
  117. package/dist/runtime/index.js.map +0 -1
  118. package/dist/types-CLkHwCch.d.ts +0 -248
  119. package/dist/ui/index.css +0 -1290
  120. package/dist/ui/index.css.map +0 -1
  121. package/dist/ui/index.js.map +0 -1
  122. package/dist/ui/styles.css.map +0 -1
  123. package/dist/ui/styles.js.map +0 -1
@@ -1,909 +0,0 @@
1
- import {
2
- Content,
3
- docPage,
4
- footer,
5
- footerBuildTime,
6
- footerCopyright,
7
- footerLink,
8
- footerMessage,
9
- footerPrimary,
10
- footerSeparator
11
- } from "./chunk-IEPSORG5.js";
12
- import {
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";
24
- import {
25
- ArdoContext,
26
- ArdoProvider,
27
- useConfig,
28
- usePageData,
29
- useSidebar,
30
- useTOC,
31
- useThemeConfig
32
- } from "./chunk-QELSOHIY.js";
33
-
34
- // src/ui/Layout.tsx
35
- import { useContext } from "react";
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
47
- import { jsx, jsxs } from "react/jsx-runtime";
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";
49
- function RootLayout({ children, favicon, lang }) {
50
- const context = useContext(ArdoContext);
51
- const resolvedLang = lang ?? context?.config.lang ?? "en";
52
- return /* @__PURE__ */ jsxs("html", { lang: resolvedLang, suppressHydrationWarning: true, children: [
53
- /* @__PURE__ */ jsxs("head", { children: [
54
- /* @__PURE__ */ jsx("meta", { charSet: "utf-8" }),
55
- /* @__PURE__ */ jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }),
56
- /* @__PURE__ */ jsx("link", { rel: "icon", type: "image/svg+xml", href: favicon ?? ARDO_FAVICON }),
57
- /* @__PURE__ */ jsx(Meta, {}),
58
- /* @__PURE__ */ jsx(Links, {})
59
- ] }),
60
- /* @__PURE__ */ jsxs("body", { suppressHydrationWarning: true, children: [
61
- children,
62
- /* @__PURE__ */ jsx(ScrollRestoration, {}),
63
- /* @__PURE__ */ jsx(Scripts, {})
64
- ] })
65
- ] });
66
- }
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 })
74
- ] }),
75
- footer2
76
- ] });
77
- }
78
-
79
- // src/ui/ArdoRoot.tsx
80
- import { cloneElement, isValidElement as isValidElement2 } from "react";
81
- import { Outlet, useLocation as useLocation3 } from "react-router";
82
-
83
- // src/ui/Header.tsx
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";
104
-
105
- // src/ui/components/ThemeToggle.tsx
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
112
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
113
- function ThemeToggle() {
114
- const [theme, setTheme] = useState("system");
115
- const [mounted, setMounted] = useState(false);
116
- useEffect(() => {
117
- setMounted(true);
118
- const stored = localStorage.getItem("ardo-theme");
119
- if (stored) {
120
- setTheme(stored);
121
- applyTheme(stored);
122
- } else {
123
- applyTheme("system");
124
- }
125
- }, []);
126
- const toggleTheme = () => {
127
- const nextTheme = theme === "light" ? "dark" : theme === "dark" ? "system" : "light";
128
- setTheme(nextTheme);
129
- localStorage.setItem("ardo-theme", nextTheme);
130
- applyTheme(nextTheme);
131
- };
132
- if (!mounted) {
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 }) }) });
134
- }
135
- return /* @__PURE__ */ jsx2(
136
- "button",
137
- {
138
- className: themeToggle,
139
- onClick: toggleTheme,
140
- "aria-label": `Switch to ${theme === "light" ? "dark" : theme === "dark" ? "system" : "light"} theme`,
141
- children: /* @__PURE__ */ jsxs2("span", { className: "ardo-theme-icon", children: [
142
- theme === "light" && /* @__PURE__ */ jsx2(Sun, { size: 20 }),
143
- theme === "dark" && /* @__PURE__ */ jsx2(Moon, { size: 20 }),
144
- theme === "system" && /* @__PURE__ */ jsx2(Monitor, { size: 20 })
145
- ] })
146
- }
147
- );
148
- }
149
- function applyTheme(theme) {
150
- const root = document.documentElement;
151
- if (theme === "system") {
152
- const isDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
153
- root.classList.toggle("dark", isDark);
154
- root.classList.toggle("light", !isDark);
155
- } else {
156
- root.classList.toggle("dark", theme === "dark");
157
- root.classList.toggle("light", theme === "light");
158
- }
159
- }
160
-
161
- // src/ui/Header.tsx
162
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
163
- var LazySearch = lazy(() => import("./Search-VYYG3D43.js").then((m) => ({ default: m.Search })));
164
- function Header({
165
- logo: logo2,
166
- title,
167
- nav: nav2,
168
- actions,
169
- search = true,
170
- themeToggle: themeToggle2 = true,
171
- mobileMenuContent,
172
- className
173
- }) {
174
- const location = useLocation();
175
- const config = useConfig();
176
- const themeConfig = useThemeConfig();
177
- const [mobileMenuOpen, setMobileMenuOpen] = useState2(false);
178
- const resolvedLogo = logo2 ?? themeConfig.logo;
179
- const resolvedTitle = title ?? (themeConfig.siteTitle !== false ? themeConfig.siteTitle ?? config.title : void 0);
180
- const resolvedNav = nav2 ?? (themeConfig.nav?.length ? /* @__PURE__ */ jsx3(AutoNav, { items: themeConfig.nav }) : void 0);
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);
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(
196
- "button",
197
- {
198
- type: "button",
199
- className: mobileMenuButton,
200
- onClick: () => setMobileMenuOpen(!mobileMenuOpen),
201
- "aria-label": "Toggle menu",
202
- "aria-expanded": mobileMenuOpen,
203
- children: /* @__PURE__ */ jsxs3("span", { className: hamburger, children: [
204
- /* @__PURE__ */ jsx3("span", {}),
205
- /* @__PURE__ */ jsx3("span", {}),
206
- /* @__PURE__ */ jsx3("span", {})
207
- ] })
208
- }
209
- ),
210
- /* @__PURE__ */ jsxs3(Link, { to: "/", className: logoLink, children: [
211
- resolvedLogo && /* @__PURE__ */ jsx3(
212
- "img",
213
- {
214
- src: typeof resolvedLogo === "string" ? resolvedLogo : resolvedLogo.light,
215
- alt: resolvedTitle ?? "Logo",
216
- className: logo
217
- }
218
- ),
219
- resolvedTitle && /* @__PURE__ */ jsx3("span", { className: siteTitle, children: resolvedTitle })
220
- ] })
221
- ] }),
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, {}),
226
- resolvedActions
227
- ] })
228
- ] }),
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
- ) })
238
- ] });
239
- }
240
- function SocialLink({ href, icon, ariaLabel, className }) {
241
- return /* @__PURE__ */ jsx3(
242
- "a",
243
- {
244
- href,
245
- target: "_blank",
246
- rel: "noopener noreferrer",
247
- className: className ?? socialLink,
248
- "aria-label": ariaLabel ?? icon,
249
- children: /* @__PURE__ */ jsx3(SocialIcon, { icon })
250
- }
251
- );
252
- }
253
- function AutoNav({ items }) {
254
- return /* @__PURE__ */ jsx3("nav", { className: nav, children: items.map((item, i) => /* @__PURE__ */ jsx3(AutoNavItem, { item }, i)) });
255
- }
256
- function AutoNavItem({ item }) {
257
- if (item.link?.startsWith("http")) {
258
- return /* @__PURE__ */ jsx3("a", { href: item.link, className: navLink, target: "_blank", rel: "noopener noreferrer", children: item.text });
259
- }
260
- if (item.link) {
261
- return /* @__PURE__ */ jsx3(
262
- RouterNavLink,
263
- {
264
- to: item.link,
265
- className: ({ isActive }) => [navLink, isActive && "active"].filter(Boolean).join(" "),
266
- children: item.text
267
- }
268
- );
269
- }
270
- return /* @__PURE__ */ jsx3("span", { className: navLink, children: item.text });
271
- }
272
- var socialIcons = {
273
- github: Github,
274
- twitter: Twitter,
275
- discord: MessageCircle,
276
- linkedin: Linkedin,
277
- youtube: Youtube,
278
- npm: Package
279
- };
280
- function SocialIcon({ icon }) {
281
- const IconComponent = socialIcons[icon] ?? Github;
282
- return /* @__PURE__ */ jsx3(IconComponent, { size: 20 });
283
- }
284
-
285
- // src/ui/Sidebar.tsx
286
- import {
287
- useState as useState3,
288
- Children,
289
- isValidElement,
290
- createContext,
291
- useContext as useContext2
292
- } from "react";
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
307
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
308
- var SidebarContext = createContext({ currentPath: "" });
309
- function useSidebarContext() {
310
- return useContext2(SidebarContext);
311
- }
312
- function Sidebar({ items, children, className }) {
313
- const { pathname } = useLocation2();
314
- const contextSidebar = useSidebar();
315
- const resolvedItems = items ?? (children ? void 0 : contextSidebar);
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 }) }) });
317
- }
318
- function SidebarGroup({
319
- title,
320
- to,
321
- collapsed: initialCollapsed = false,
322
- collapsible = true,
323
- children,
324
- className
325
- }) {
326
- const [collapsed, setCollapsed] = useState3(initialCollapsed);
327
- const { currentPath } = useSidebarContext();
328
- const isChildActive = checkChildrenActive(children, currentPath);
329
- const textClassName = [sidebarText, isChildActive && "child-active"].filter(Boolean).join(" ");
330
- const hasChildren = Children.count(children) > 0;
331
- return /* @__PURE__ */ jsxs4("li", { className: className ?? sidebarItem, children: [
332
- /* @__PURE__ */ jsxs4("div", { className: sidebarItemHeader, children: [
333
- to ? /* @__PURE__ */ jsx4(
334
- NavLink,
335
- {
336
- to,
337
- end: true,
338
- className: ({ isActive }) => [textClassName, isActive && "active"].filter(Boolean).join(" "),
339
- children: title
340
- }
341
- ) : /* @__PURE__ */ jsx4(
342
- "span",
343
- {
344
- className: textClassName,
345
- onClick: () => collapsible && hasChildren && setCollapsed(!collapsed),
346
- style: collapsible && hasChildren ? { cursor: "pointer" } : void 0,
347
- children: title
348
- }
349
- ),
350
- collapsible && hasChildren && /* @__PURE__ */ jsx4(
351
- "button",
352
- {
353
- className: [sidebarCollapse, collapsed && "collapsed"].filter(Boolean).join(" "),
354
- onClick: () => setCollapsed(!collapsed),
355
- "aria-label": collapsed ? "Expand" : "Collapse",
356
- children: /* @__PURE__ */ jsx4(ChevronDown, { size: 16 })
357
- }
358
- )
359
- ] }),
360
- hasChildren && !collapsed && /* @__PURE__ */ jsx4("ul", { className: `${sidebarList} ${sidebarList1}`, children })
361
- ] });
362
- }
363
- function SidebarLink({ to, children, className }) {
364
- const baseClassName = className ?? sidebarLink;
365
- return /* @__PURE__ */ jsx4("li", { className: sidebarItem, children: /* @__PURE__ */ jsx4(
366
- NavLink,
367
- {
368
- to,
369
- className: ({ isActive }) => [baseClassName, isActive && "active"].filter(Boolean).join(" "),
370
- children
371
- }
372
- ) });
373
- }
374
- function SidebarItems({ items, depth }) {
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
- );
382
- }
383
- function SidebarItemComponent({ item, depth }) {
384
- const { currentPath } = useSidebarContext();
385
- const [collapsed, setCollapsed] = useState3(item.collapsed ?? false);
386
- const hasChildren = item.items && item.items.length > 0;
387
- const isChildActive = hasChildren && item.items.some(
388
- (child) => child.link === currentPath || child.items && child.items.some((grandchild) => grandchild.link === currentPath)
389
- );
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: [
394
- item.link ? /* @__PURE__ */ jsx4(
395
- NavLink,
396
- {
397
- to: item.link,
398
- className: ({ isActive }) => [linkClassName, isActive && "active"].filter(Boolean).join(" "),
399
- children: item.text
400
- }
401
- ) : /* @__PURE__ */ jsx4("span", { className: textClassName, onClick: () => hasChildren && setCollapsed(!collapsed), children: item.text }),
402
- hasChildren && /* @__PURE__ */ jsx4(
403
- "button",
404
- {
405
- className: [sidebarCollapse, collapsed && "collapsed"].filter(Boolean).join(" "),
406
- onClick: () => setCollapsed(!collapsed),
407
- "aria-label": collapsed ? "Expand" : "Collapse",
408
- children: /* @__PURE__ */ jsx4(ChevronDown, { size: 16 })
409
- }
410
- )
411
- ] }),
412
- hasChildren && !collapsed && /* @__PURE__ */ jsx4(SidebarItems, { items: item.items, depth: depth + 1 })
413
- ] });
414
- }
415
- function checkChildrenActive(children, currentPath) {
416
- let isActive = false;
417
- Children.forEach(children, (child) => {
418
- if (isActive) return;
419
- if (isValidElement(child)) {
420
- if (child.type === SidebarLink && child.props.to === currentPath) {
421
- isActive = true;
422
- return;
423
- }
424
- if (child.type === SidebarGroup) {
425
- const groupProps = child.props;
426
- if (groupProps.to === currentPath) {
427
- isActive = true;
428
- return;
429
- }
430
- if (groupProps.children && checkChildrenActive(groupProps.children, currentPath)) {
431
- isActive = true;
432
- return;
433
- }
434
- }
435
- }
436
- });
437
- return isActive;
438
- }
439
-
440
- // src/ui/Footer.tsx
441
- import { Fragment, jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
442
- function formatBuildTime(iso) {
443
- try {
444
- const date = new Date(iso);
445
- return date.toLocaleDateString("en-US", {
446
- month: "long",
447
- day: "numeric",
448
- year: "numeric"
449
- });
450
- } catch {
451
- return iso;
452
- }
453
- }
454
- function Footer({
455
- message,
456
- copyright,
457
- children,
458
- className,
459
- project,
460
- sponsor,
461
- buildTime,
462
- buildHash,
463
- ardoLink = true
464
- }) {
465
- const config = useConfig();
466
- const themeConfig = useThemeConfig();
467
- const resolvedProject = project ?? config.project;
468
- const resolvedBuildTime = buildTime ?? config.buildTime;
469
- const resolvedBuildHash = buildHash ?? config.buildHash;
470
- const resolvedMessage = message ?? themeConfig.footer?.message;
471
- const resolvedCopyright = copyright ?? themeConfig.footer?.copyright;
472
- const resolvedSponsor = sponsor ?? themeConfig.footer?.sponsor;
473
- const hasContent = resolvedMessage || resolvedCopyright || children || resolvedProject || resolvedSponsor || resolvedBuildTime || ardoLink;
474
- if (!hasContent) {
475
- return null;
476
- }
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: [
480
- resolvedProject.name,
481
- resolvedProject.version ? ` v${resolvedProject.version}` : ""
482
- ] }) : /* @__PURE__ */ jsxs5("span", { children: [
483
- resolvedProject.name,
484
- resolvedProject.version ? ` v${resolvedProject.version}` : ""
485
- ] }) }),
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: [
490
- "Sponsored by ",
491
- resolvedSponsor.text
492
- ] })
493
- ] }),
494
- resolvedMessage && /* @__PURE__ */ jsx5(
495
- "p",
496
- {
497
- className: footerMessage,
498
- dangerouslySetInnerHTML: { __html: resolvedMessage }
499
- }
500
- ),
501
- resolvedCopyright && /* @__PURE__ */ jsx5(
502
- "p",
503
- {
504
- className: footerCopyright,
505
- dangerouslySetInnerHTML: { __html: resolvedCopyright }
506
- }
507
- ),
508
- resolvedBuildTime && /* @__PURE__ */ jsxs5("p", { className: footerBuildTime, children: [
509
- "Built on ",
510
- formatBuildTime(resolvedBuildTime),
511
- resolvedBuildHash && /* @__PURE__ */ jsxs5(Fragment, { children: [
512
- " (",
513
- resolvedBuildHash,
514
- ")"
515
- ] })
516
- ] })
517
- ] }) }) });
518
- }
519
-
520
- // src/ui/ArdoRoot.tsx
521
- import { jsx as jsx6 } from "react/jsx-runtime";
522
- function ArdoRoot({
523
- config,
524
- sidebar: sidebar2,
525
- header: header2,
526
- sidebarContent,
527
- footer: footer2,
528
- headerProps,
529
- sidebarProps,
530
- footerProps,
531
- className,
532
- children
533
- }) {
534
- const location = useLocation3();
535
- const isHomePage = location.pathname === "/" || location.pathname === "";
536
- const resolvedSidebar = isHomePage ? void 0 : sidebarContent ?? /* @__PURE__ */ jsx6(Sidebar, { ...sidebarProps });
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(
548
- Layout,
549
- {
550
- className: resolvedClassName,
551
- header: resolvedHeader,
552
- sidebar: resolvedSidebar,
553
- footer: resolvedFooter,
554
- children: children ?? /* @__PURE__ */ jsx6(Outlet, {})
555
- }
556
- ) });
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
- }
568
-
569
- // src/ui/Nav.tsx
570
- import { useState as useState4, createContext as createContext2, useContext as useContext3 } from "react";
571
- import { NavLink as RouterNavLink2 } from "react-router";
572
- import { jsx as jsx7 } from "react/jsx-runtime";
573
- var NavContext = createContext2(null);
574
- function useNavContext() {
575
- return useContext3(NavContext);
576
- }
577
- function Nav({ children, className }) {
578
- return /* @__PURE__ */ jsx7("nav", { className: className ?? nav, children });
579
- }
580
- function NavLink2({
581
- to,
582
- href,
583
- children,
584
- className,
585
- activeMatch: _activeMatch
586
- }) {
587
- const navContext = useNavContext();
588
- const baseClassName = className ?? navLink;
589
- const handleClick = () => {
590
- navContext?.setMobileMenuOpen(false);
591
- };
592
- if (href) {
593
- return /* @__PURE__ */ jsx7(
594
- "a",
595
- {
596
- href,
597
- className: baseClassName,
598
- target: "_blank",
599
- rel: "noopener noreferrer",
600
- onClick: handleClick,
601
- children
602
- }
603
- );
604
- }
605
- if (to) {
606
- return /* @__PURE__ */ jsx7(
607
- RouterNavLink2,
608
- {
609
- to,
610
- className: ({ isActive }) => [baseClassName, isActive && "active"].filter(Boolean).join(" "),
611
- onClick: handleClick,
612
- children
613
- }
614
- );
615
- }
616
- return /* @__PURE__ */ jsx7("span", { className: baseClassName, children });
617
- }
618
-
619
- // src/ui/TOC.tsx
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";
632
- function TOC() {
633
- const toc2 = useTOC();
634
- const themeConfig = useThemeConfig();
635
- const [activeId, setActiveId] = useState5("");
636
- const label = themeConfig.outline?.label ?? "On this page";
637
- useEffect3(() => {
638
- if (toc2.length === 0) return;
639
- const headingElements = toc2.map((item) => document.getElementById(item.id)).filter(Boolean);
640
- if (headingElements.length === 0) return;
641
- const observer = new IntersectionObserver(
642
- (entries) => {
643
- for (const entry of entries) {
644
- if (entry.isIntersecting) {
645
- setActiveId(entry.target.id);
646
- break;
647
- }
648
- }
649
- },
650
- {
651
- rootMargin: "-80px 0px -80% 0px",
652
- threshold: 0
653
- }
654
- );
655
- headingElements.forEach((el) => el && observer.observe(el));
656
- return () => {
657
- headingElements.forEach((el) => el && observer.unobserve(el));
658
- };
659
- }, [toc2]);
660
- if (toc2.length === 0) {
661
- return null;
662
- }
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 }) })
666
- ] }) });
667
- }
668
- function TOCItems({ items, activeId }) {
669
- return /* @__PURE__ */ jsx8("ul", { className: tocList, children: items.map((item) => /* @__PURE__ */ jsx8(TOCItemComponent, { item, activeId }, item.id)) });
670
- }
671
- function TOCItemComponent({ item, activeId }) {
672
- const isActive = item.id === activeId;
673
- const hasActiveChild = hasActiveDescendant(item, activeId);
674
- return /* @__PURE__ */ jsxs6("li", { children: [
675
- /* @__PURE__ */ jsx8(
676
- "a",
677
- {
678
- href: `#${item.id}`,
679
- className: [
680
- tocLink,
681
- item.level === 3 && tocLink3,
682
- item.level === 4 && tocLink4,
683
- isActive && "active",
684
- hasActiveChild && "child-active"
685
- ].filter(Boolean).join(" "),
686
- onClick: (e) => {
687
- e.preventDefault();
688
- const element = document.getElementById(item.id);
689
- if (element) {
690
- element.scrollIntoView({ behavior: "smooth" });
691
- window.history.pushState(null, "", `#${item.id}`);
692
- }
693
- },
694
- children: item.text
695
- }
696
- ),
697
- item.children && item.children.length > 0 && /* @__PURE__ */ jsx8(TOCItems, { items: item.children, activeId })
698
- ] });
699
- }
700
- function hasActiveDescendant(item, activeId) {
701
- if (!item.children) return false;
702
- for (const child of item.children) {
703
- if (child.id === activeId) return true;
704
- if (hasActiveDescendant(child, activeId)) return true;
705
- }
706
- return false;
707
- }
708
-
709
- // src/ui/DocPage.tsx
710
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
711
- function DocPage({ children }) {
712
- const pageData = usePageData();
713
- const showToc = pageData?.frontmatter.outline !== false && pageData?.toc && pageData.toc.length > 0;
714
- return /* @__PURE__ */ jsx9(Layout, { children: /* @__PURE__ */ jsxs7("div", { className: docPage, children: [
715
- /* @__PURE__ */ jsx9(Content, { children }),
716
- showToc && /* @__PURE__ */ jsx9(TOC, {})
717
- ] }) });
718
- }
719
- function DocContent({ children }) {
720
- const pageData = usePageData();
721
- const showToc = pageData?.frontmatter.outline !== false && pageData?.toc && pageData.toc.length > 0;
722
- return /* @__PURE__ */ jsxs7("div", { className: docPage, children: [
723
- /* @__PURE__ */ jsx9(Content, { children }),
724
- showToc && /* @__PURE__ */ jsx9(TOC, {})
725
- ] });
726
- }
727
- function DocLayout({ content }) {
728
- return /* @__PURE__ */ jsx9(DocPage, { children: content });
729
- }
730
-
731
- // src/ui/HomePage.tsx
732
- import { Link as Link2 } from "react-router";
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";
761
- function HomePage() {
762
- const pageData = usePageData();
763
- const config = useConfig();
764
- const themeConfig = useThemeConfig();
765
- const hero2 = pageData?.frontmatter.hero;
766
- const features2 = pageData?.frontmatter.features;
767
- return /* @__PURE__ */ jsxs8("div", { className: home, children: [
768
- /* @__PURE__ */ jsx10(
769
- Header,
770
- {
771
- logo: themeConfig.logo,
772
- title: themeConfig.siteTitle !== false ? config.title : void 0,
773
- nav: themeConfig.nav && themeConfig.nav.length > 0 ? /* @__PURE__ */ jsx10(Nav, { children: themeConfig.nav.map((item, index) => /* @__PURE__ */ jsx10(NavLink2, { to: item.link, children: item.text }, index)) }) : void 0,
774
- actions: themeConfig.socialLinks?.map((link, index) => /* @__PURE__ */ jsx10(SocialLink, { href: link.link, icon: link.icon, ariaLabel: link.ariaLabel }, index))
775
- }
776
- ),
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(
780
- "img",
781
- {
782
- src: typeof hero2.image === "string" ? hero2.image : hero2.image.light,
783
- alt: hero2.name || config.title
784
- }
785
- ) }),
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(
791
- Link2,
792
- {
793
- to: action.link,
794
- className: `${heroAction} ${action.theme === "alt" ? heroActionAlt : heroActionBrand}`,
795
- children: action.text
796
- },
797
- index
798
- )) })
799
- ] })
800
- ] }) }),
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" })
806
- ] }, index)) }) })
807
- ] }),
808
- /* @__PURE__ */ jsx10(Footer, {})
809
- ] });
810
- }
811
-
812
- // src/ui/components/Hero.tsx
813
- import { Link as Link3 } from "react-router";
814
- import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
815
- function Hero({ name, text, tagline, image, actions, className, version }) {
816
- const imageUrl = typeof image === "string" ? image : image?.light;
817
- const imageAlt = typeof image === "string" ? name : image?.alt ?? name;
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: [
822
- "v",
823
- version
824
- ] }),
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) => {
829
- const link = action.link;
830
- const isExternal = typeof link === "string" && (link.startsWith("http://") || link.startsWith("https://"));
831
- const actionClass = `${heroAction} ${action.theme === "alt" ? heroActionAlt : heroActionBrand}`;
832
- const content = /* @__PURE__ */ jsxs9(Fragment2, { children: [
833
- action.icon,
834
- action.text
835
- ] });
836
- if (isExternal) {
837
- return /* @__PURE__ */ jsx11(
838
- "a",
839
- {
840
- href: link,
841
- className: actionClass,
842
- target: "_blank",
843
- rel: "noopener noreferrer",
844
- children: content
845
- },
846
- index
847
- );
848
- }
849
- return /* @__PURE__ */ jsx11(Link3, { to: link, className: actionClass, children: content }, index);
850
- }) })
851
- ] })
852
- ] }) });
853
- }
854
-
855
- // src/ui/components/Features.tsx
856
- import { Link as Link4 } from "react-router";
857
- import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
858
- function FeatureCard({
859
- title,
860
- icon,
861
- details,
862
- link,
863
- linkText,
864
- className,
865
- style
866
- }) {
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" })
872
- ] });
873
- }
874
- function Features({ items, title, subtitle, className }) {
875
- if (!items || items.length === 0) {
876
- return null;
877
- }
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 })
882
- ] }),
883
- /* @__PURE__ */ jsx12("div", { className: featuresContainer, children: items.map((feature2, index) => /* @__PURE__ */ jsx12(FeatureCard, { ...feature2, style: { animationDelay: `${index * 80}ms` } }, index)) })
884
- ] });
885
- }
886
-
887
- export {
888
- RootLayout,
889
- Layout,
890
- ThemeToggle,
891
- Header,
892
- SocialLink,
893
- Sidebar,
894
- SidebarGroup,
895
- SidebarLink,
896
- Footer,
897
- ArdoRoot,
898
- Nav,
899
- NavLink2 as NavLink,
900
- TOC,
901
- DocPage,
902
- DocContent,
903
- DocLayout,
904
- HomePage,
905
- Hero,
906
- FeatureCard,
907
- Features
908
- };
909
- //# sourceMappingURL=chunk-CZM5NX27.js.map