ardo 3.1.0 → 3.2.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.
Files changed (120) hide show
  1. package/README.md +9 -19
  2. package/dist/DocPage-BVibJR9O.js +997 -0
  3. package/dist/DocPage-BVibJR9O.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-435FKDcl.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/config/index.d.ts +5 -5
  28. package/dist/config/index.d.ts.map +1 -0
  29. package/dist/config/index.js +54 -11
  30. package/dist/config/index.js.map +1 -1
  31. package/dist/contract.css-QS0y3-CM.d.ts +105 -0
  32. package/dist/contract.css-QS0y3-CM.d.ts.map +1 -0
  33. package/dist/generator-DcUomVnD.js +1193 -0
  34. package/dist/generator-DcUomVnD.js.map +1 -0
  35. package/dist/icons/index.d.ts +1 -1
  36. package/dist/icons/index.js +1 -2
  37. package/dist/index-DNKCjxv5.d.ts +78 -0
  38. package/dist/index-DNKCjxv5.d.ts.map +1 -0
  39. package/dist/index-DSeJoaxz.d.ts +938 -0
  40. package/dist/index-DSeJoaxz.d.ts.map +1 -0
  41. package/dist/index.d.ts +5 -8
  42. package/dist/index.js +6 -100
  43. package/dist/mdx/provider.d.ts +61 -4
  44. package/dist/mdx/provider.d.ts.map +1 -0
  45. package/dist/mdx/provider.js +89 -117
  46. package/dist/mdx/provider.js.map +1 -1
  47. package/dist/runtime/index.d.ts +2 -41
  48. package/dist/runtime/index.js +2 -28
  49. package/dist/sidebar-utils-1Skqle1Q.js +109 -0
  50. package/dist/sidebar-utils-1Skqle1Q.js.map +1 -0
  51. package/dist/theme/index.d.ts +201 -182
  52. package/dist/theme/index.d.ts.map +1 -0
  53. package/dist/theme/index.js +288 -128
  54. package/dist/theme/index.js.map +1 -1
  55. package/dist/typedoc/components/index.d.ts +55 -0
  56. package/dist/typedoc/components/index.d.ts.map +1 -0
  57. package/dist/typedoc/components/index.js +328 -0
  58. package/dist/typedoc/components/index.js.map +1 -0
  59. package/dist/typedoc/index.d.ts +34 -303
  60. package/dist/typedoc/index.d.ts.map +1 -0
  61. package/dist/typedoc/index.js +97 -268
  62. package/dist/typedoc/index.js.map +1 -1
  63. package/dist/types-DAZHcySL.d.ts +182 -0
  64. package/dist/types-DAZHcySL.d.ts.map +1 -0
  65. package/dist/types-DVodb4lK.d.ts +198 -0
  66. package/dist/types-DVodb4lK.d.ts.map +1 -0
  67. package/dist/ui/index.d.ts +2 -178
  68. package/dist/ui/index.js +3 -95
  69. package/dist/ui/styles.css +1401 -1335
  70. package/dist/ui/styles.d.ts +1 -2
  71. package/dist/ui/styles.js +23 -4
  72. package/dist/ui-NhRDIFUN.js +1301 -0
  73. package/dist/ui-NhRDIFUN.js.map +1 -0
  74. package/dist/vite/index.d.ts +72 -78
  75. package/dist/vite/index.d.ts.map +1 -0
  76. package/dist/vite/index.js +2918 -1282
  77. package/dist/vite/index.js.map +1 -1
  78. package/package.json +25 -17
  79. package/dist/Features-D_Pt7zpA.d.ts +0 -615
  80. package/dist/Search-DOJMNI2T.css +0 -193
  81. package/dist/Search-DOJMNI2T.css.map +0 -1
  82. package/dist/Search-VYYG3D43.js +0 -10
  83. package/dist/Search-VYYG3D43.js.map +0 -1
  84. package/dist/chunk-4YQE3TNM.js +0 -1
  85. package/dist/chunk-4YQE3TNM.js.map +0 -1
  86. package/dist/chunk-AXLJDGQL.js +0 -1
  87. package/dist/chunk-AXLJDGQL.js.map +0 -1
  88. package/dist/chunk-CZM5NX27.js +0 -909
  89. package/dist/chunk-CZM5NX27.js.map +0 -1
  90. package/dist/chunk-FZP2AVJL.js +0 -43
  91. package/dist/chunk-FZP2AVJL.js.map +0 -1
  92. package/dist/chunk-IEPSORG5.js +0 -444
  93. package/dist/chunk-IEPSORG5.js.map +0 -1
  94. package/dist/chunk-KUWEUO37.js +0 -1
  95. package/dist/chunk-KUWEUO37.js.map +0 -1
  96. package/dist/chunk-NBRHGTR2.js +0 -79
  97. package/dist/chunk-NBRHGTR2.js.map +0 -1
  98. package/dist/chunk-PGHUPTGL.js +0 -1035
  99. package/dist/chunk-PGHUPTGL.js.map +0 -1
  100. package/dist/chunk-PMS3P4MA.js +0 -43
  101. package/dist/chunk-PMS3P4MA.js.map +0 -1
  102. package/dist/chunk-QELSOHIY.js +0 -46
  103. package/dist/chunk-QELSOHIY.js.map +0 -1
  104. package/dist/chunk-R2QKY6G3.js +0 -1
  105. package/dist/chunk-R2QKY6G3.js.map +0 -1
  106. package/dist/chunk-ZPYQQZ7J.js +0 -210
  107. package/dist/chunk-ZPYQQZ7J.js.map +0 -1
  108. package/dist/icons/index.js.map +0 -1
  109. package/dist/index.css +0 -1290
  110. package/dist/index.css.map +0 -1
  111. package/dist/index.js.map +0 -1
  112. package/dist/mdx/provider.css +0 -403
  113. package/dist/mdx/provider.css.map +0 -1
  114. package/dist/runtime/index.js.map +0 -1
  115. package/dist/types-CLkHwCch.d.ts +0 -248
  116. package/dist/ui/index.css +0 -1290
  117. package/dist/ui/index.css.map +0 -1
  118. package/dist/ui/index.js.map +0 -1
  119. package/dist/ui/styles.css.map +0 -1
  120. package/dist/ui/styles.js.map +0 -1
@@ -0,0 +1,997 @@
1
+ import { d as useArdoSiteConfig, f as useArdoTOC, l as useArdoPageData, n as getPrevNextLinks, r as ArdoContext, u as useArdoSidebar } from "./sidebar-utils-1Skqle1Q.js";
2
+ import { Children, createContext, isValidElement, use, useEffect, useMemo, useRef, useState } from "react";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ import { Link, Links, Meta, Scripts, ScrollRestoration, useLocation } from "react-router";
5
+ import { Check as CheckIcon, ChevronDown as ChevronDownIcon, CircleX as XCircleIcon, Copy as CopyIcon, FileText as FileTextIcon, Github as GithubIcon, Info as InfoIcon, Lightbulb as LightbulbIcon, Linkedin as LinkedinIcon, MessageCircle as MessageCircleIcon, Monitor as MonitorIcon, Moon as MoonIcon, Package as PackageIcon, Search as SearchIcon, Sun as SunIcon, TriangleAlert as AlertTriangleIcon, Twitter as TwitterIcon, X as XIcon, Youtube as YoutubeIcon } from "lucide-react";
6
+ import "./assets/src/ui/Footer.css.ts.vanilla-BSzPIPt4.css";
7
+ import "./assets/src/ui/Layout.css.ts.vanilla-Bpx_-gJt.css";
8
+ import "./assets/src/ui/components/CodeBlock.css.ts.vanilla-lNKqskjQ.css";
9
+ import "./assets/src/ui/components/CopyButton.css.ts.vanilla-DZZ5jgTM.css";
10
+ import "./assets/src/ui/components/Container.css.ts.vanilla-CUhRUA9t.css";
11
+ import { createRuntimeFn } from "@vanilla-extract/recipes/createRuntimeFn";
12
+ import "./assets/src/ui/components/Steps.css.ts.vanilla-CisaxeNj.css";
13
+ import "./assets/src/ui/components/Tabs.css.ts.vanilla-C4-vJSnf.css";
14
+ import "./assets/src/ui/Breadcrumb.css.ts.vanilla-Dpgq-C_p.css";
15
+ import "./assets/src/ui/content.css.ts.vanilla-O_RaSPXm.css";
16
+ import "./assets/src/ui/DocPage.css.ts.vanilla-CXKuz4U-.css";
17
+ import "./assets/src/ui/TOC.css.ts.vanilla-435FKDcl.css";
18
+ //#region src/ui/Footer.css.ts
19
+ var contentMeta = "_169q00b9";
20
+ var footer = "_169q00b0";
21
+ var footerBuildTime = "_169q00b7";
22
+ var footerContainer = "_169q00b1";
23
+ var footerCopyright = "_169q00b6";
24
+ var footerLink = "_169q00b4";
25
+ var footerMessage = "_169q00b5";
26
+ var footerPrimary = "_169q00b2";
27
+ var footerSeparator = "_169q00b3";
28
+ var nextLink = "_169q00be _169q00bc";
29
+ var prevLink = "_169q00bc";
30
+ var prevNext = "_169q00bb";
31
+ var prevNextLabel = "_169q00bf";
32
+ var prevNextTitle = "_169q00bg";
33
+ //#endregion
34
+ //#region src/ui/Layout.css.ts
35
+ var home = "_8autjm3";
36
+ var homeMain = "_8autjm4";
37
+ var layout = "_8autjm0";
38
+ var layoutContainer = "_8autjm1";
39
+ var main = "_8autjm2";
40
+ var skipLink = "_8autjm5";
41
+ //#endregion
42
+ //#region src/ui/Layout.tsx
43
+ const 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";
44
+ /**
45
+ * Default HTML shell for Ardo sites. Replaces the boilerplate `Layout` export
46
+ * that every root.tsx must define for React Router.
47
+ *
48
+ * @example Basic usage
49
+ * ```tsx
50
+ * // app/root.tsx
51
+ * export { RootLayout as Layout } from "ardo/ui"
52
+ * ```
53
+ *
54
+ * @example With favicon
55
+ * ```tsx
56
+ * import logo from "./assets/logo.svg"
57
+ * export const Layout = (props) => <RootLayout favicon={logo} {...props} />
58
+ * ```
59
+ */
60
+ function ArdoRootLayout({ children, favicon, lang }) {
61
+ const context = use(ArdoContext);
62
+ return /* @__PURE__ */ jsxs("html", {
63
+ lang: lang ?? context?.config.lang ?? "en",
64
+ suppressHydrationWarning: true,
65
+ children: [/* @__PURE__ */ jsxs("head", { children: [
66
+ /* @__PURE__ */ jsx("meta", { charSet: "utf-8" }),
67
+ /* @__PURE__ */ jsx("meta", {
68
+ name: "viewport",
69
+ content: "width=device-width, initial-scale=1"
70
+ }),
71
+ /* @__PURE__ */ jsx("link", {
72
+ rel: "icon",
73
+ type: "image/svg+xml",
74
+ href: favicon ?? ARDO_FAVICON
75
+ }),
76
+ /* @__PURE__ */ jsx(Meta, {}),
77
+ /* @__PURE__ */ jsx(Links, {})
78
+ ] }), /* @__PURE__ */ jsxs("body", {
79
+ suppressHydrationWarning: true,
80
+ children: [
81
+ children,
82
+ /* @__PURE__ */ jsx(ScrollRestoration, {}),
83
+ /* @__PURE__ */ jsx(Scripts, {})
84
+ ]
85
+ })]
86
+ });
87
+ }
88
+ /**
89
+ * Layout component with explicit slot props.
90
+ *
91
+ * @example
92
+ * ```tsx
93
+ * <Layout
94
+ * header={<Header logo="/logo.svg" title="Ardo" nav={...} />}
95
+ * sidebar={<Sidebar>...</Sidebar>}
96
+ * footer={<Footer message="MIT License" />}
97
+ * >
98
+ * <Outlet />
99
+ * </Layout>
100
+ * ```
101
+ */
102
+ function ArdoLayout({ header, sidebar, footer, children, className }) {
103
+ return /* @__PURE__ */ jsxs("div", {
104
+ className: className ?? "_8autjm0",
105
+ children: [
106
+ /* @__PURE__ */ jsx("a", {
107
+ href: "#main-content",
108
+ className: skipLink,
109
+ children: "Skip to content"
110
+ }),
111
+ header,
112
+ /* @__PURE__ */ jsxs("div", {
113
+ className: layoutContainer,
114
+ children: [sidebar, /* @__PURE__ */ jsxs("main", {
115
+ id: "main-content",
116
+ className: main,
117
+ children: [children, footer]
118
+ })]
119
+ })
120
+ ]
121
+ });
122
+ }
123
+ //#endregion
124
+ //#region src/ui/BareContent.tsx
125
+ const BareContentContext = createContext(false);
126
+ /**
127
+ * Wraps imported MDX content to render without the full Content wrapper
128
+ * (article, header, footer, navigation). Only the content body is rendered.
129
+ *
130
+ * ```tsx
131
+ * import MySnippet from "./snippet.mdx"
132
+ *
133
+ * <BareContent>
134
+ * <MySnippet />
135
+ * </BareContent>
136
+ * ```
137
+ */
138
+ function ArdoBareContent({ children }) {
139
+ return /* @__PURE__ */ jsx(BareContentContext, {
140
+ value: true,
141
+ children
142
+ });
143
+ }
144
+ function useBareContent() {
145
+ return use(BareContentContext);
146
+ }
147
+ //#endregion
148
+ //#region src/ui/components/CodeBlock.css.ts
149
+ var codeBlock = "_1l68ra30";
150
+ var codeGroup = "_1l68ra35";
151
+ var codeGroupPanel = "_1l68ra39";
152
+ var codeGroupPanels = "_1l68ra38";
153
+ var codeGroupTab = "_1l68ra37";
154
+ var codeGroupTabs = "_1l68ra36";
155
+ var codeLine = "_1l68ra33";
156
+ var codeTitle = "_1l68ra31";
157
+ var codeWrapper = "_1l68ra32";
158
+ //#endregion
159
+ //#region src/ui/components/CopyButton.css.ts
160
+ var copyButton = "_1flm2ul1";
161
+ var copyText = "_1flm2ul0";
162
+ //#endregion
163
+ //#region src/ui/components/CopyButton.tsx
164
+ function ArdoCopyButton({ code }) {
165
+ const [copied, setCopied] = useState(false);
166
+ const handleCopy = async () => {
167
+ try {
168
+ await navigator.clipboard.writeText(code);
169
+ setCopied(true);
170
+ setTimeout(() => {
171
+ setCopied(false);
172
+ }, 2e3);
173
+ } catch (error) {
174
+ console.error("Failed to copy:", error);
175
+ }
176
+ };
177
+ return /* @__PURE__ */ jsxs("button", {
178
+ type: "button",
179
+ className: copyButton,
180
+ onClick: () => {
181
+ handleCopy();
182
+ },
183
+ "aria-label": copied ? "Copied!" : "Copy code",
184
+ children: [copied ? /* @__PURE__ */ jsx(CheckIcon, { size: 16 }) : /* @__PURE__ */ jsx(CopyIcon, { size: 16 }), /* @__PURE__ */ jsx("span", {
185
+ className: copyText,
186
+ children: copied ? "Copied!" : "Copy"
187
+ })]
188
+ });
189
+ }
190
+ //#endregion
191
+ //#region src/ui/components/CodeBlock.tsx
192
+ const EMPTY_HIGHLIGHT_LINES = [];
193
+ /**
194
+ * Strips leading/trailing blank lines and removes common leading whitespace
195
+ * so that template literals in indented JSX render cleanly.
196
+ */
197
+ function outdent(text) {
198
+ let start = 0;
199
+ while (start < text.length && text[start] === "\n") start++;
200
+ let end = text.length;
201
+ while (end > start && (text[end - 1] === "\n" || text[end - 1] === "\r" || text[end - 1] === " " || text[end - 1] === " ")) end--;
202
+ const trimmed = text.slice(start, end);
203
+ const lines = trimmed.split("\n");
204
+ const indent = lines.reduce((min, line) => {
205
+ if (line.trim().length === 0) return min;
206
+ const match = /^(\s*)/.exec(line);
207
+ return match ? Math.min(min, match[1].length) : min;
208
+ }, Infinity);
209
+ if (indent === 0 || indent === Infinity) return trimmed;
210
+ return lines.map((line) => line.slice(indent)).join("\n");
211
+ }
212
+ function CodeBlockContent({ html, hasHtml, hasCustomChildren, language, lines, highlightLines, lineNumbers, children }) {
213
+ if (hasHtml) return /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: html ?? "" } });
214
+ if (hasCustomChildren) return /* @__PURE__ */ jsx(Fragment, { children });
215
+ return /* @__PURE__ */ jsx("pre", {
216
+ className: `language-${language}`,
217
+ children: /* @__PURE__ */ jsx("code", { children: lines.map((line, index) => {
218
+ const lineNum = index + 1;
219
+ return /* @__PURE__ */ jsxs("span", {
220
+ className: highlightLines.includes(lineNum) ? `${codeLine} highlighted` : codeLine,
221
+ children: [
222
+ lineNumbers && /* @__PURE__ */ jsx("span", {
223
+ className: "_1l68ra34",
224
+ children: lineNum
225
+ }),
226
+ /* @__PURE__ */ jsx("span", { children: line }),
227
+ index < lines.length - 1 && "\n"
228
+ ]
229
+ }, `${lineNum}-${line}`);
230
+ }) })
231
+ });
232
+ }
233
+ /**
234
+ * Syntax-highlighted code block with copy button.
235
+ *
236
+ * Code can be provided via the `code` prop or as children:
237
+ * ```tsx
238
+ * <CodeBlock language="typescript">{`
239
+ * const x = 42
240
+ * `}</CodeBlock>
241
+ * ```tsx
242
+ * When children is a string, leading/trailing blank lines and common
243
+ * indentation are stripped automatically.
244
+ */
245
+ function ArdoCodeBlock({ code: codeProp, language = "text", title, lineNumbers = false, highlightLines = EMPTY_HIGHLIGHT_LINES, children, __html }) {
246
+ const code = codeProp ?? (typeof children === "string" ? outdent(children) : "");
247
+ const hasCustomChildren = children != null && typeof children !== "string";
248
+ const hasHtml = (__html ?? "") !== "";
249
+ const hasTitle = (title ?? "") !== "";
250
+ const lines = code.split("\n");
251
+ return /* @__PURE__ */ jsxs("div", {
252
+ className: codeBlock,
253
+ "data-lang": language,
254
+ children: [hasTitle && /* @__PURE__ */ jsx("div", {
255
+ className: "_1l68ra31",
256
+ children: title
257
+ }), /* @__PURE__ */ jsxs("div", {
258
+ className: codeWrapper,
259
+ children: [/* @__PURE__ */ jsx(CodeBlockContent, {
260
+ html: __html,
261
+ hasHtml,
262
+ hasCustomChildren,
263
+ language,
264
+ lines,
265
+ highlightLines,
266
+ lineNumbers,
267
+ children
268
+ }), /* @__PURE__ */ jsx(ArdoCopyButton, { code })]
269
+ })]
270
+ });
271
+ }
272
+ /**
273
+ * Tabbed group of code blocks.
274
+ * Labels come from the `labels` prop (set at remark level) or fall back to
275
+ * data-label / title / language props on children.
276
+ */
277
+ function ArdoCodeGroup({ children, labels: labelsStr }) {
278
+ const [activeTab, setActiveTab] = useState(0);
279
+ const hasLabels = (labelsStr ?? "") !== "";
280
+ const childArray = Children.toArray(children).filter((child) => isValidElement(child));
281
+ const labelArray = hasLabels ? (labelsStr ?? "").split(",") : [];
282
+ const tabs = childArray.map((child, index) => {
283
+ if (labelArray[index]) return labelArray[index];
284
+ const props = child.props;
285
+ return props["data-label"] || props.title || props.language || `Tab ${index + 1}`;
286
+ });
287
+ return /* @__PURE__ */ jsxs("div", {
288
+ className: codeGroup,
289
+ children: [/* @__PURE__ */ jsx("div", {
290
+ className: codeGroupTabs,
291
+ children: tabs.map((tab, index) => /* @__PURE__ */ jsx("button", {
292
+ type: "button",
293
+ className: [codeGroupTab, index === activeTab && "active"].filter(Boolean).join(" "),
294
+ onClick: () => {
295
+ setActiveTab(index);
296
+ },
297
+ children: tab
298
+ }, tab))
299
+ }), /* @__PURE__ */ jsx("div", {
300
+ className: codeGroupPanels,
301
+ children: childArray.map((child, index) => /* @__PURE__ */ jsx("div", {
302
+ className: [codeGroupPanel, index === activeTab && "active"].filter(Boolean).join(" "),
303
+ style: { display: index === activeTab ? "block" : "none" },
304
+ children: child
305
+ }, tabAt(tabs, index)))
306
+ })]
307
+ });
308
+ }
309
+ function tabAt(tabs, index) {
310
+ return tabs[index];
311
+ }
312
+ //#endregion
313
+ //#region src/ui/components/Container.css.ts
314
+ var container = createRuntimeFn({
315
+ defaultClassName: "_1l7ew7r0",
316
+ variantClassNames: { type: {
317
+ tip: "_1l7ew7r1",
318
+ warning: "_1l7ew7r2",
319
+ danger: "_1l7ew7r3",
320
+ info: "_1l7ew7r4",
321
+ note: "_1l7ew7r5"
322
+ } },
323
+ defaultVariants: {},
324
+ compoundVariants: []
325
+ });
326
+ var containerBody = "_1l7ew7rc";
327
+ var containerContent = "_1l7ew7rj";
328
+ var containerIcon = createRuntimeFn({
329
+ defaultClassName: "_1l7ew7r6",
330
+ variantClassNames: { type: {
331
+ tip: "_1l7ew7r7",
332
+ warning: "_1l7ew7r8",
333
+ danger: "_1l7ew7r9",
334
+ info: "_1l7ew7ra",
335
+ note: "_1l7ew7rb"
336
+ } },
337
+ defaultVariants: {},
338
+ compoundVariants: []
339
+ });
340
+ var containerTitle = createRuntimeFn({
341
+ defaultClassName: "_1l7ew7rd",
342
+ variantClassNames: { type: {
343
+ tip: "_1l7ew7re",
344
+ warning: "_1l7ew7rf",
345
+ danger: "_1l7ew7rg",
346
+ info: "_1l7ew7rh",
347
+ note: "_1l7ew7ri"
348
+ } },
349
+ defaultVariants: {},
350
+ compoundVariants: []
351
+ });
352
+ //#endregion
353
+ //#region src/ui/components/Container.tsx
354
+ const defaultTitles = {
355
+ tip: "TIP",
356
+ warning: "WARNING",
357
+ danger: "DANGER",
358
+ info: "INFO",
359
+ note: "NOTE"
360
+ };
361
+ const icons = {
362
+ tip: /* @__PURE__ */ jsx(LightbulbIcon, { size: 18 }),
363
+ warning: /* @__PURE__ */ jsx(AlertTriangleIcon, { size: 18 }),
364
+ danger: /* @__PURE__ */ jsx(XCircleIcon, { size: 18 }),
365
+ info: /* @__PURE__ */ jsx(InfoIcon, { size: 18 }),
366
+ note: /* @__PURE__ */ jsx(FileTextIcon, { size: 18 })
367
+ };
368
+ /**
369
+ * A styled container for callouts, tips, warnings, etc.
370
+ */
371
+ function ArdoContainer({ type, title, children }) {
372
+ const hasCustomTitle = title != null && title !== "" && title !== defaultTitles[type];
373
+ return /* @__PURE__ */ jsxs("div", {
374
+ className: container({ type }),
375
+ children: [/* @__PURE__ */ jsx("span", {
376
+ className: containerIcon({ type }),
377
+ children: icons[type]
378
+ }), /* @__PURE__ */ jsxs("div", {
379
+ className: containerBody,
380
+ children: [hasCustomTitle && /* @__PURE__ */ jsx("p", {
381
+ className: containerTitle({ type }),
382
+ children: title
383
+ }), /* @__PURE__ */ jsx("div", {
384
+ className: containerContent,
385
+ children
386
+ })]
387
+ })]
388
+ });
389
+ }
390
+ /**
391
+ * A tip container for helpful information.
392
+ */
393
+ function ArdoTip({ title, children }) {
394
+ return /* @__PURE__ */ jsx(ArdoContainer, {
395
+ type: "tip",
396
+ title,
397
+ children
398
+ });
399
+ }
400
+ /**
401
+ * A warning container for cautionary information.
402
+ */
403
+ function ArdoWarning({ title, children }) {
404
+ return /* @__PURE__ */ jsx(ArdoContainer, {
405
+ type: "warning",
406
+ title,
407
+ children
408
+ });
409
+ }
410
+ /**
411
+ * A danger container for critical warnings.
412
+ */
413
+ function ArdoDanger({ title, children }) {
414
+ return /* @__PURE__ */ jsx(ArdoContainer, {
415
+ type: "danger",
416
+ title,
417
+ children
418
+ });
419
+ }
420
+ /**
421
+ * An info container for informational content.
422
+ */
423
+ function ArdoInfo({ title, children }) {
424
+ return /* @__PURE__ */ jsx(ArdoContainer, {
425
+ type: "info",
426
+ title,
427
+ children
428
+ });
429
+ }
430
+ /**
431
+ * A note container for additional information.
432
+ */
433
+ function ArdoNote({ title, children }) {
434
+ return /* @__PURE__ */ jsx(ArdoContainer, {
435
+ type: "note",
436
+ title,
437
+ children
438
+ });
439
+ }
440
+ //#endregion
441
+ //#region src/ui/components/Icon.tsx
442
+ const iconRegistry = /* @__PURE__ */ new Map();
443
+ /**
444
+ * Register icons for use with the Icon component.
445
+ * Only registered icons are included in your bundle.
446
+ *
447
+ * @example
448
+ * ```tsx
449
+ * // In your app's entry point or layout:
450
+ * import { registerIcons } from "ardo/ui"
451
+ * import { Zap, Rocket, Code } from "lucide-react"
452
+ *
453
+ * registerIcons({ Zap, Rocket, Code })
454
+ * ```
455
+ */
456
+ function registerIcons(icons) {
457
+ for (const [name, icon] of Object.entries(icons)) iconRegistry.set(name, icon);
458
+ }
459
+ /**
460
+ * Get all registered icon names (useful for documentation).
461
+ */
462
+ function getRegisteredIconNames() {
463
+ return [...iconRegistry.keys()];
464
+ }
465
+ /**
466
+ * Renders a registered icon by name.
467
+ * Icons must be registered first using `registerIcons()`.
468
+ *
469
+ * @example
470
+ * ```tsx
471
+ * // First register icons in your app:
472
+ * import { registerIcons } from "ardo/ui"
473
+ * import { Zap, Rocket } from "lucide-react"
474
+ * registerIcons({ Zap, Rocket })
475
+ *
476
+ * // Then use in MDX:
477
+ * <Icon name="Zap" size={24} />
478
+ * <Icon name="Rocket" className="text-brand" />
479
+ * ```
480
+ *
481
+ * @see https://lucide.dev/icons for available icon names
482
+ */
483
+ function ArdoIcon({ name, ...props }) {
484
+ const IconComp = iconRegistry.get(name);
485
+ if (!IconComp) {
486
+ console.warn(`[Ardo] Icon "${name}" not found. Did you register it with registerIcons()?`);
487
+ return null;
488
+ }
489
+ return /* @__PURE__ */ jsx(IconComp, { ...props });
490
+ }
491
+ //#endregion
492
+ //#region src/ui/components/Steps.css.ts
493
+ var steps = "go9pz30";
494
+ //#endregion
495
+ //#region src/ui/components/Steps.tsx
496
+ /**
497
+ * A wrapper for step-by-step instructions rendered as an ordered list.
498
+ *
499
+ * @example
500
+ * ```tsx
501
+ * <ArdoSteps>
502
+ * <ol>
503
+ * <li>Install the package</li>
504
+ * <li>Configure your site</li>
505
+ * <li>Start writing</li>
506
+ * </ol>
507
+ * </ArdoSteps>
508
+ * ```
509
+ */
510
+ function ArdoSteps({ children }) {
511
+ return /* @__PURE__ */ jsx("div", {
512
+ className: steps,
513
+ children
514
+ });
515
+ }
516
+ //#endregion
517
+ //#region src/ui/components/Tabs.css.ts
518
+ var tab = "_1jypr342";
519
+ var tabList = "_1jypr341";
520
+ var tabPanel = "_1jypr343";
521
+ var tabPanels = "_1jypr344";
522
+ var tabs = "_1jypr340";
523
+ //#endregion
524
+ //#region src/ui/components/Tabs.tsx
525
+ const TabsContext = createContext(null);
526
+ const AUTO_TAB_PREFIX = "__ardo-tab-";
527
+ function useTabsContext() {
528
+ const context = use(TabsContext);
529
+ if (!context) throw new Error("Tab components must be used within an ArdoTabs component");
530
+ return context;
531
+ }
532
+ /**
533
+ * Tabs container component for organizing content into tabbed panels.
534
+ */
535
+ function ArdoTabs({ defaultValue, children }) {
536
+ const [activeTab, setActiveTab] = useState(() => defaultValue ?? findFirstTabValue(children));
537
+ const tabIndexRef = useRef(0);
538
+ const panelIndexRef = useRef(0);
539
+ tabIndexRef.current = 0;
540
+ panelIndexRef.current = 0;
541
+ const getTabValue = (value) => {
542
+ const index = tabIndexRef.current++;
543
+ return value ?? `${AUTO_TAB_PREFIX}${index}`;
544
+ };
545
+ const getPanelValue = (value) => {
546
+ const index = panelIndexRef.current++;
547
+ return value ?? `${AUTO_TAB_PREFIX}${index}`;
548
+ };
549
+ const effectiveTab = defaultValue ?? activeTab;
550
+ return /* @__PURE__ */ jsx(TabsContext, {
551
+ value: useMemo(() => ({
552
+ activeTab: effectiveTab,
553
+ setActiveTab,
554
+ getTabValue,
555
+ getPanelValue
556
+ }), [effectiveTab]),
557
+ children: /* @__PURE__ */ jsx("div", {
558
+ className: tabs,
559
+ children
560
+ })
561
+ });
562
+ }
563
+ /**
564
+ * Container for ArdoTab buttons.
565
+ */
566
+ function ArdoTabList({ children }) {
567
+ return /* @__PURE__ */ jsx("div", {
568
+ className: tabList,
569
+ role: "tablist",
570
+ children
571
+ });
572
+ }
573
+ /**
574
+ * Individual tab button.
575
+ */
576
+ function ArdoTab({ value, children }) {
577
+ const { activeTab, setActiveTab, getTabValue } = useTabsContext();
578
+ const resolvedValue = getTabValue(value);
579
+ const isActive = activeTab === resolvedValue;
580
+ return /* @__PURE__ */ jsx("button", {
581
+ type: "button",
582
+ role: "tab",
583
+ "aria-selected": isActive,
584
+ className: [tab, isActive && "active"].filter(Boolean).join(" "),
585
+ onClick: () => {
586
+ setActiveTab(resolvedValue);
587
+ },
588
+ children
589
+ });
590
+ }
591
+ /**
592
+ * Content panel for a tab.
593
+ */
594
+ function ArdoTabPanel({ value, children }) {
595
+ const { activeTab, getPanelValue } = useTabsContext();
596
+ if (!(activeTab === getPanelValue(value))) return null;
597
+ return /* @__PURE__ */ jsx("div", {
598
+ role: "tabpanel",
599
+ className: tabPanel,
600
+ children
601
+ });
602
+ }
603
+ /**
604
+ * Container for ArdoTabPanel components.
605
+ */
606
+ function ArdoTabPanels({ children }) {
607
+ return /* @__PURE__ */ jsx("div", {
608
+ className: tabPanels,
609
+ children
610
+ });
611
+ }
612
+ function findFirstTabValue(children) {
613
+ for (const child of Children.toArray(children)) {
614
+ if (!isValidElement(child)) continue;
615
+ if (child.type === ArdoTab) return child.props.value ?? `${AUTO_TAB_PREFIX}0`;
616
+ const nestedChildren = child.props.children;
617
+ if (nestedChildren != null) {
618
+ const nestedValue = findFirstTabValue(nestedChildren);
619
+ if (nestedValue) return nestedValue;
620
+ }
621
+ }
622
+ return "";
623
+ }
624
+ //#endregion
625
+ //#region src/ui/Breadcrumb.css.ts
626
+ var breadcrumb = "_19g8fxh0";
627
+ var breadcrumbCurrent = "_19g8fxh2";
628
+ //#endregion
629
+ //#region src/ui/Breadcrumb.tsx
630
+ function matchInChildren(groupText, items, path) {
631
+ for (const item of items) {
632
+ if (item.link === path) return {
633
+ section: groupText,
634
+ page: item.text
635
+ };
636
+ if (item.items != null) {
637
+ const sub = item.items.find((s) => s.link === path);
638
+ if (sub != null) return {
639
+ section: groupText,
640
+ page: sub.text
641
+ };
642
+ }
643
+ }
644
+ }
645
+ function findBreadcrumb(sidebar, currentPath) {
646
+ for (const group of sidebar) {
647
+ if (group.link === currentPath) return { page: group.text };
648
+ if (group.items != null) {
649
+ const found = matchInChildren(group.text, group.items, currentPath);
650
+ if (found != null) return found;
651
+ }
652
+ }
653
+ return {};
654
+ }
655
+ function ArdoBreadcrumb() {
656
+ const { section, page } = findBreadcrumb(useArdoSidebar(), useLocation().pathname);
657
+ if (page == null || page === "") return null;
658
+ return /* @__PURE__ */ jsxs("nav", {
659
+ className: breadcrumb,
660
+ "aria-label": "Breadcrumb",
661
+ children: [section != null && section !== "" && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { children: section }), /* @__PURE__ */ jsx("span", {
662
+ className: "_19g8fxh1",
663
+ "aria-hidden": true,
664
+ children: "›"
665
+ })] }), /* @__PURE__ */ jsx("span", {
666
+ className: breadcrumbCurrent,
667
+ children: page
668
+ })]
669
+ });
670
+ }
671
+ //#endregion
672
+ //#region src/ui/content.css.ts
673
+ var ardoContent = "jmxrtm0";
674
+ //#endregion
675
+ //#region src/ui/DocPage.css.ts
676
+ var contentBody = "_1f1m4jr5";
677
+ var contentContainer = "_1f1m4jr1";
678
+ var contentHeader = "_1f1m4jr2";
679
+ var contentTitle = "_1f1m4jr3";
680
+ var docPage = "_1f1m4jr0";
681
+ //#endregion
682
+ //#region src/ui/Content.tsx
683
+ function resolveEditLink(input) {
684
+ const resolved = input.editLink ?? input.siteConfig.editLink;
685
+ const pattern = resolved?.pattern ?? "";
686
+ const relativePath = input.pageData?.relativePath ?? "";
687
+ const show = input.pageData?.frontmatter.editLink !== false && pattern !== "" && input.pageData !== void 0;
688
+ return {
689
+ href: show ? pattern.replace(":path", relativePath) : void 0,
690
+ text: resolved?.text ?? "Edit this page",
691
+ show
692
+ };
693
+ }
694
+ function resolveLastUpdated(input) {
695
+ const resolved = input.lastUpdated ?? input.siteConfig.lastUpdated;
696
+ const value = input.pageData?.lastUpdated;
697
+ const show = input.pageData?.frontmatter.lastUpdated !== false && resolved?.enabled === true && typeof value === "number";
698
+ const formatOptions = resolved?.formatOptions ?? {
699
+ year: "numeric",
700
+ month: "long",
701
+ day: "numeric"
702
+ };
703
+ return {
704
+ label: resolved?.text ?? "Last updated",
705
+ text: show ? new Date(value).toLocaleDateString(void 0, formatOptions) : void 0,
706
+ show
707
+ };
708
+ }
709
+ function ArdoContent({ children, editLink, lastUpdated }) {
710
+ const isBare = useBareContent();
711
+ const pageData = useArdoPageData();
712
+ const siteConfig = useArdoSiteConfig();
713
+ const sidebar = useArdoSidebar();
714
+ const location = useLocation();
715
+ if (isBare) return /* @__PURE__ */ jsx("div", {
716
+ className: `${contentBody} ${ardoContent}`,
717
+ children
718
+ });
719
+ const input = {
720
+ pageData,
721
+ editLink,
722
+ lastUpdated,
723
+ siteConfig
724
+ };
725
+ const edit = resolveEditLink(input);
726
+ const updated = resolveLastUpdated(input);
727
+ const { prev, next } = getPrevNextLinks(sidebar, location.pathname);
728
+ return /* @__PURE__ */ jsxs("article", {
729
+ className: contentContainer,
730
+ children: [
731
+ /* @__PURE__ */ jsx(ArdoBreadcrumb, {}),
732
+ /* @__PURE__ */ jsx(ContentHeader, {
733
+ title: pageData?.frontmatter.title ?? "",
734
+ description: pageData?.frontmatter.description ?? ""
735
+ }),
736
+ /* @__PURE__ */ jsx("div", {
737
+ className: `${contentBody} ${ardoContent}`,
738
+ children
739
+ }),
740
+ /* @__PURE__ */ jsx(ContentMeta, {
741
+ edit,
742
+ updated
743
+ }),
744
+ /* @__PURE__ */ jsx(ContentPrevNext, {
745
+ prev,
746
+ next
747
+ })
748
+ ]
749
+ });
750
+ }
751
+ function ContentHeader({ title, description }) {
752
+ if (title === "") return null;
753
+ return /* @__PURE__ */ jsxs("header", {
754
+ className: contentHeader,
755
+ children: [/* @__PURE__ */ jsx("h1", {
756
+ className: contentTitle,
757
+ children: title
758
+ }), description !== "" && /* @__PURE__ */ jsx("p", {
759
+ className: "_1f1m4jr4",
760
+ children: description
761
+ })]
762
+ });
763
+ }
764
+ function ContentMeta({ edit, updated }) {
765
+ if (!edit.show && !updated.show) return null;
766
+ return /* @__PURE__ */ jsxs("div", {
767
+ className: contentMeta,
768
+ children: [edit.show && /* @__PURE__ */ jsx("a", {
769
+ href: edit.href,
770
+ target: "_blank",
771
+ rel: "noopener noreferrer",
772
+ className: "_169q00ba",
773
+ children: edit.text
774
+ }), updated.show && /* @__PURE__ */ jsxs("span", { children: [
775
+ updated.label,
776
+ ": ",
777
+ updated.text
778
+ ] })]
779
+ });
780
+ }
781
+ function ContentPrevNext({ prev, next }) {
782
+ const prevLink$1 = prev?.link ?? "";
783
+ const nextLink$1 = next?.link ?? "";
784
+ const hasPrev = prevLink$1 !== "";
785
+ const hasNext = nextLink$1 !== "";
786
+ if (!hasPrev && !hasNext) return null;
787
+ return /* @__PURE__ */ jsxs("nav", {
788
+ className: prevNext,
789
+ "aria-label": "Page navigation",
790
+ children: [hasPrev ? /* @__PURE__ */ jsxs(Link, {
791
+ to: prevLink$1,
792
+ className: prevLink,
793
+ children: [/* @__PURE__ */ jsx("span", {
794
+ className: prevNextLabel,
795
+ children: "Previous"
796
+ }), /* @__PURE__ */ jsx("span", {
797
+ className: prevNextTitle,
798
+ children: prev?.text
799
+ })]
800
+ }) : /* @__PURE__ */ jsx("div", {}), hasNext ? /* @__PURE__ */ jsxs(Link, {
801
+ to: nextLink$1,
802
+ className: nextLink,
803
+ children: [/* @__PURE__ */ jsx("span", {
804
+ className: prevNextLabel,
805
+ children: "Next"
806
+ }), /* @__PURE__ */ jsx("span", {
807
+ className: prevNextTitle,
808
+ children: next?.text
809
+ })]
810
+ }) : /* @__PURE__ */ jsx("div", {})]
811
+ });
812
+ }
813
+ //#endregion
814
+ //#region src/ui/TOC.css.ts
815
+ var toc = "_1trko900";
816
+ var tocLink = "_1trko903";
817
+ var tocList = "_1trko902";
818
+ var tocTitle = "_1trko901";
819
+ //#endregion
820
+ //#region src/ui/TOC.tsx
821
+ function ArdoTOC({ label: labelProp } = {}) {
822
+ const toc$1 = useArdoTOC();
823
+ const siteConfig = useArdoSiteConfig();
824
+ const [activeId, setActiveId] = useState("");
825
+ const scrollContainerRef = useRef(null);
826
+ const isClickScrolling = useRef(false);
827
+ const label = labelProp ?? siteConfig.tocLabel ?? "On this page";
828
+ useEffect(() => {
829
+ scrollContainerRef.current = document.getElementById("main-content");
830
+ }, []);
831
+ useEffect(() => {
832
+ if (toc$1.length === 0) return;
833
+ const scrollContainer = scrollContainerRef.current;
834
+ if (!scrollContainer) return;
835
+ const headingElements = toc$1.map((item) => document.getElementById(item.id)).filter(Boolean);
836
+ if (headingElements.length === 0) return;
837
+ const observer = new IntersectionObserver((entries) => {
838
+ if (isClickScrolling.current) return;
839
+ for (const entry of entries) if (entry.isIntersecting) {
840
+ setActiveId(entry.target.id);
841
+ break;
842
+ }
843
+ }, {
844
+ root: scrollContainer,
845
+ rootMargin: "-20px 0px -85% 0px",
846
+ threshold: 0
847
+ });
848
+ for (const element of headingElements) if (element !== null) observer.observe(element);
849
+ return () => {
850
+ for (const element of headingElements) if (element !== null) observer.unobserve(element);
851
+ };
852
+ }, [toc$1]);
853
+ const handleClickItem = (id) => {
854
+ setActiveId(id);
855
+ isClickScrolling.current = true;
856
+ const element = document.getElementById(id);
857
+ const container = scrollContainerRef.current;
858
+ if (element) {
859
+ element.scrollIntoView({
860
+ behavior: "smooth",
861
+ block: "start"
862
+ });
863
+ globalThis.history.pushState(null, "", `#${id}`);
864
+ }
865
+ if (container) {
866
+ const onScrollEnd = () => {
867
+ isClickScrolling.current = false;
868
+ container.removeEventListener("scrollend", onScrollEnd);
869
+ };
870
+ container.addEventListener("scrollend", onScrollEnd, { once: true });
871
+ setTimeout(() => {
872
+ isClickScrolling.current = false;
873
+ }, 1e3);
874
+ } else isClickScrolling.current = false;
875
+ };
876
+ if (toc$1.length === 0) return null;
877
+ return /* @__PURE__ */ jsx("aside", {
878
+ className: toc,
879
+ children: /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
880
+ className: tocTitle,
881
+ children: label
882
+ }), /* @__PURE__ */ jsx("nav", {
883
+ "aria-label": "Table of contents",
884
+ children: /* @__PURE__ */ jsx(TOCItems, {
885
+ items: toc$1,
886
+ activeId,
887
+ onClickItem: handleClickItem
888
+ })
889
+ })] })
890
+ });
891
+ }
892
+ function TOCItems({ items, activeId, onClickItem }) {
893
+ return /* @__PURE__ */ jsx("ul", {
894
+ className: tocList,
895
+ children: items.map((item) => /* @__PURE__ */ jsx(TOCItemComponent, {
896
+ item,
897
+ activeId,
898
+ onClickItem
899
+ }, item.id))
900
+ });
901
+ }
902
+ function TOCItemComponent({ item, activeId, onClickItem }) {
903
+ const isActive = item.id === activeId;
904
+ const hasActiveChild = hasActiveDescendant(item, activeId);
905
+ return /* @__PURE__ */ jsxs("li", { children: [/* @__PURE__ */ jsx("a", {
906
+ href: `#${item.id}`,
907
+ className: [
908
+ tocLink,
909
+ item.level === 3 && "_1trko904",
910
+ item.level === 4 && "_1trko905",
911
+ isActive && "active",
912
+ hasActiveChild && "child-active"
913
+ ].filter(Boolean).join(" "),
914
+ onClick: (e) => {
915
+ e.preventDefault();
916
+ onClickItem(item.id);
917
+ },
918
+ children: item.text
919
+ }), item.children && item.children.length > 0 && /* @__PURE__ */ jsx(TOCItems, {
920
+ items: item.children,
921
+ activeId,
922
+ onClickItem
923
+ })] });
924
+ }
925
+ function hasActiveDescendant(item, activeId) {
926
+ if (!item.children) return false;
927
+ for (const child of item.children) {
928
+ if (child.id === activeId) return true;
929
+ if (hasActiveDescendant(child, activeId)) return true;
930
+ }
931
+ return false;
932
+ }
933
+ //#endregion
934
+ //#region src/ui/DocPage.tsx
935
+ /**
936
+ * Full documentation page with Layout wrapper.
937
+ * Use this when you don't have a _layout.tsx file.
938
+ *
939
+ * @example
940
+ * ```tsx
941
+ * <DocPage>
942
+ * <Content />
943
+ * </DocPage>
944
+ * ```
945
+ */
946
+ function ArdoDocPage({ children, editLink, lastUpdated, tocLabel }) {
947
+ const hideToc = useArdoPageData()?.frontmatter.outline === false;
948
+ return /* @__PURE__ */ jsx(ArdoLayout, { children: /* @__PURE__ */ jsxs("div", {
949
+ className: docPage,
950
+ children: [/* @__PURE__ */ jsx(ArdoContent, {
951
+ editLink,
952
+ lastUpdated,
953
+ children
954
+ }), !hideToc && /* @__PURE__ */ jsx(ArdoTOC, { label: tocLabel })]
955
+ }) });
956
+ }
957
+ /**
958
+ * Documentation content without Layout wrapper.
959
+ * Use this when you have a _layout.tsx that provides the Layout.
960
+ *
961
+ * @example
962
+ * ```tsx
963
+ * // In _layout.tsx:
964
+ * <Layout>
965
+ * <Header ... />
966
+ * <Sidebar ... />
967
+ * <Outlet />
968
+ * <Footer ... />
969
+ * </Layout>
970
+ *
971
+ * // In page routes:
972
+ * <DocContent>
973
+ * <MarkdownContent />
974
+ * </DocContent>
975
+ * ```
976
+ */
977
+ function ArdoDocContent({ children, editLink, lastUpdated, tocLabel }) {
978
+ const hideToc = useArdoPageData()?.frontmatter.outline === false;
979
+ return /* @__PURE__ */ jsxs("div", {
980
+ className: docPage,
981
+ children: [/* @__PURE__ */ jsx(ArdoContent, {
982
+ editLink,
983
+ lastUpdated,
984
+ children
985
+ }), !hideToc && /* @__PURE__ */ jsx(ArdoTOC, { label: tocLabel })]
986
+ });
987
+ }
988
+ /**
989
+ * @deprecated Use DocPage or DocContent instead
990
+ */
991
+ function ArdoDocLayout({ content }) {
992
+ return /* @__PURE__ */ jsx(ArdoDocPage, { children: content });
993
+ }
994
+ //#endregion
995
+ export { home as A, footerSeparator as B, ArdoCopyButton as C, ArdoBareContent as D, codeWrapper as E, footerContainer as F, MonitorIcon as G, GithubIcon as H, footerCopyright as I, SearchIcon as J, MoonIcon as K, footerLink as L, layout as M, footer as N, ArdoLayout as O, footerBuildTime as P, YoutubeIcon as Q, footerMessage as R, ArdoCodeGroup as S, codeTitle as T, LinkedinIcon as U, ChevronDownIcon as V, MessageCircleIcon as W, TwitterIcon as X, SunIcon as Y, XIcon as Z, ArdoInfo as _, ArdoContent as a, ArdoWarning as b, ArdoTabPanel as c, ArdoSteps as d, ArdoIcon as f, ArdoDanger as g, ArdoContainer as h, ArdoTOC as i, homeMain as j, ArdoRootLayout as k, ArdoTabPanels as l, registerIcons as m, ArdoDocLayout as n, ArdoTab as o, getRegisteredIconNames as p, PackageIcon as q, ArdoDocPage as r, ArdoTabList as s, ArdoDocContent as t, ArdoTabs as u, ArdoNote as v, codeBlock as w, ArdoCodeBlock as x, ArdoTip as y, footerPrimary as z };
996
+
997
+ //# sourceMappingURL=DocPage-BVibJR9O.js.map