@usecross/docs 0.6.0 → 0.8.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/index.js CHANGED
@@ -117,36 +117,353 @@ function InlineCode({ children }) {
117
117
  return /* @__PURE__ */ jsx("code", { className: "rounded bg-slate-100 px-1.5 py-0.5 text-sm font-medium text-slate-800", children });
118
118
  }
119
119
 
120
+ // src/components/DocSetSelector.tsx
121
+ import { useState as useState2, useRef, useEffect as useEffect2 } from "react";
122
+ import { router } from "@inertiajs/react";
123
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
124
+ var ChevronUpDownIcon = ({ className }) => /* @__PURE__ */ jsx2(
125
+ "svg",
126
+ {
127
+ className,
128
+ viewBox: "0 0 16 16",
129
+ fill: "none",
130
+ xmlns: "http://www.w3.org/2000/svg",
131
+ children: /* @__PURE__ */ jsx2(
132
+ "path",
133
+ {
134
+ d: "M5 6l3-3 3 3M5 10l3 3 3-3",
135
+ stroke: "currentColor",
136
+ strokeWidth: "1.5",
137
+ strokeLinecap: "round",
138
+ strokeLinejoin: "round"
139
+ }
140
+ )
141
+ }
142
+ );
143
+ var CheckIcon = ({ className }) => /* @__PURE__ */ jsx2(
144
+ "svg",
145
+ {
146
+ className,
147
+ viewBox: "0 0 16 16",
148
+ fill: "none",
149
+ xmlns: "http://www.w3.org/2000/svg",
150
+ children: /* @__PURE__ */ jsx2(
151
+ "path",
152
+ {
153
+ d: "M3.5 8.5l3 3 6-6.5",
154
+ stroke: "currentColor",
155
+ strokeWidth: "1.75",
156
+ strokeLinecap: "round",
157
+ strokeLinejoin: "round"
158
+ }
159
+ )
160
+ }
161
+ );
162
+ var PackageIcon = ({ className }) => /* @__PURE__ */ jsxs2(
163
+ "svg",
164
+ {
165
+ className,
166
+ viewBox: "0 0 20 20",
167
+ fill: "none",
168
+ xmlns: "http://www.w3.org/2000/svg",
169
+ children: [
170
+ /* @__PURE__ */ jsx2(
171
+ "path",
172
+ {
173
+ d: "M10 2L17 6v8l-7 4-7-4V6l7-4z",
174
+ stroke: "currentColor",
175
+ strokeWidth: "1.5",
176
+ strokeLinejoin: "round"
177
+ }
178
+ ),
179
+ /* @__PURE__ */ jsx2(
180
+ "path",
181
+ {
182
+ d: "M10 10v8M10 10l7-4M10 10L3 6",
183
+ stroke: "currentColor",
184
+ strokeWidth: "1.5",
185
+ strokeLinecap: "round",
186
+ strokeLinejoin: "round"
187
+ }
188
+ )
189
+ ]
190
+ }
191
+ );
192
+ function DocSetSelector({ docSets, currentDocSet, className }) {
193
+ const [isOpen, setIsOpen] = useState2(false);
194
+ const dropdownRef = useRef(null);
195
+ const current = docSets.find((ds) => ds.slug === currentDocSet) || docSets[0];
196
+ useEffect2(() => {
197
+ const handleClickOutside = (event) => {
198
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
199
+ setIsOpen(false);
200
+ }
201
+ };
202
+ if (isOpen) {
203
+ document.addEventListener("mousedown", handleClickOutside);
204
+ return () => document.removeEventListener("mousedown", handleClickOutside);
205
+ }
206
+ }, [isOpen]);
207
+ useEffect2(() => {
208
+ const handleEscape = (event) => {
209
+ if (event.key === "Escape") setIsOpen(false);
210
+ };
211
+ if (isOpen) {
212
+ document.addEventListener("keydown", handleEscape);
213
+ return () => document.removeEventListener("keydown", handleEscape);
214
+ }
215
+ }, [isOpen]);
216
+ const handleSelect = (docSet) => {
217
+ setIsOpen(false);
218
+ if (docSet.slug !== currentDocSet) {
219
+ router.visit(`${docSet.prefix}/`);
220
+ }
221
+ };
222
+ return /* @__PURE__ */ jsxs2("div", { className: cn("relative", className), ref: dropdownRef, children: [
223
+ /* @__PURE__ */ jsxs2(
224
+ "button",
225
+ {
226
+ onClick: () => setIsOpen(!isOpen),
227
+ className: cn(
228
+ "w-full flex items-center gap-2.5 px-3 py-2",
229
+ "bg-gray-100/80 dark:bg-white/5",
230
+ "border border-gray-200 dark:border-white/10",
231
+ "rounded-lg",
232
+ "hover:bg-gray-200/80 dark:hover:bg-white/10",
233
+ "transition-colors duration-150",
234
+ "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/50"
235
+ ),
236
+ "aria-label": "Select documentation",
237
+ "aria-expanded": isOpen,
238
+ "aria-haspopup": "listbox",
239
+ children: [
240
+ /* @__PURE__ */ jsx2("div", { className: "flex-shrink-0 w-5 h-5 flex items-center justify-center text-gray-600 dark:text-gray-400", children: current.icon ? /* @__PURE__ */ jsx2("span", { className: "text-base leading-none", children: current.icon }) : current.iconUrl ? /* @__PURE__ */ jsx2("img", { src: current.iconUrl, alt: "", className: "w-5 h-5" }) : /* @__PURE__ */ jsx2(PackageIcon, { className: "w-5 h-5" }) }),
241
+ /* @__PURE__ */ jsx2("span", { className: "flex-1 text-left text-sm font-medium text-gray-900 dark:text-white truncate", children: current.name }),
242
+ /* @__PURE__ */ jsx2(ChevronUpDownIcon, { className: "flex-shrink-0 w-4 h-4 text-gray-400 dark:text-gray-500" })
243
+ ]
244
+ }
245
+ ),
246
+ /* @__PURE__ */ jsx2(
247
+ "div",
248
+ {
249
+ className: cn(
250
+ "absolute left-0 right-0 mt-1.5",
251
+ "py-1",
252
+ "bg-white dark:bg-[#1a1a1a]",
253
+ "border border-gray-200 dark:border-white/10",
254
+ "rounded-lg",
255
+ "shadow-lg shadow-black/5 dark:shadow-black/30",
256
+ "z-50",
257
+ "transition-all duration-150 ease-out origin-top",
258
+ isOpen ? "opacity-100 scale-100" : "opacity-0 scale-95 pointer-events-none"
259
+ ),
260
+ role: "listbox",
261
+ "aria-label": "Select documentation set",
262
+ children: docSets.map((docSet) => {
263
+ const isSelected = docSet.slug === currentDocSet;
264
+ return /* @__PURE__ */ jsxs2(
265
+ "button",
266
+ {
267
+ onClick: () => handleSelect(docSet),
268
+ className: cn(
269
+ "w-full flex items-center gap-2.5 px-3 py-2",
270
+ "transition-colors duration-100",
271
+ "focus:outline-none",
272
+ isSelected ? "bg-primary-50 dark:bg-primary-500/10" : "hover:bg-gray-50 dark:hover:bg-white/5"
273
+ ),
274
+ role: "option",
275
+ "aria-selected": isSelected,
276
+ children: [
277
+ /* @__PURE__ */ jsx2("div", { className: cn(
278
+ "flex-shrink-0 w-5 h-5 flex items-center justify-center",
279
+ isSelected ? "text-primary-600 dark:text-primary-400" : "text-gray-500 dark:text-gray-400"
280
+ ), children: docSet.icon ? /* @__PURE__ */ jsx2("span", { className: "text-base leading-none", children: docSet.icon }) : docSet.iconUrl ? /* @__PURE__ */ jsx2("img", { src: docSet.iconUrl, alt: "", className: "w-5 h-5" }) : /* @__PURE__ */ jsx2(PackageIcon, { className: "w-5 h-5" }) }),
281
+ /* @__PURE__ */ jsxs2("div", { className: "flex-1 text-left min-w-0", children: [
282
+ /* @__PURE__ */ jsx2(
283
+ "div",
284
+ {
285
+ className: cn(
286
+ "text-sm font-medium truncate",
287
+ isSelected ? "text-primary-700 dark:text-primary-300" : "text-gray-900 dark:text-white"
288
+ ),
289
+ children: docSet.name
290
+ }
291
+ ),
292
+ docSet.description && /* @__PURE__ */ jsx2("div", { className: cn(
293
+ "text-xs truncate",
294
+ isSelected ? "text-primary-600/70 dark:text-primary-400/70" : "text-gray-500 dark:text-gray-400"
295
+ ), children: docSet.description })
296
+ ] }),
297
+ isSelected && /* @__PURE__ */ jsx2(CheckIcon, { className: "flex-shrink-0 w-4 h-4 text-primary-600 dark:text-primary-400" })
298
+ ]
299
+ },
300
+ docSet.slug || "_root"
301
+ );
302
+ })
303
+ }
304
+ )
305
+ ] });
306
+ }
307
+
120
308
  // src/components/DocsLayout.tsx
121
309
  import { Head, Link as Link2, usePage } from "@inertiajs/react";
122
- import { useState as useState4 } from "react";
310
+ import { useState as useState6 } from "react";
123
311
 
124
312
  // src/components/Sidebar.tsx
125
313
  import { Link } from "@inertiajs/react";
126
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
127
- function Sidebar({ nav, currentPath, className }) {
128
- return /* @__PURE__ */ jsx2("nav", { className: cn("space-y-8", className), children: nav.map((section) => /* @__PURE__ */ jsxs2("div", { children: [
129
- /* @__PURE__ */ jsx2("h3", { className: "mb-3 text-xs font-mono uppercase tracking-widest text-gray-500 dark:text-gray-400", children: section.title }),
130
- /* @__PURE__ */ jsx2("ul", { className: "space-y-1 border-l-2 border-gray-200 dark:border-gray-700", children: section.items.map((item) => /* @__PURE__ */ jsx2("li", { children: /* @__PURE__ */ jsx2(
131
- Link,
132
- {
133
- href: item.href,
134
- className: cn(
135
- "block border-l-2 py-1.5 pl-4 text-sm transition-colors -ml-0.5",
136
- currentPath === item.href ? "border-primary-500 text-gray-900 dark:text-white font-bold" : "border-transparent text-gray-600 dark:text-gray-300 hover:border-gray-900 dark:hover:border-white hover:text-gray-900 dark:hover:text-white"
137
- ),
138
- children: item.title
314
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
315
+ function Sidebar({ nav, currentPath, className, docSets, currentDocSet }) {
316
+ return /* @__PURE__ */ jsxs3("nav", { className: cn("space-y-6", className), children: [
317
+ docSets && docSets.length > 1 && /* @__PURE__ */ jsx3(DocSetSelector, { docSets, currentDocSet: currentDocSet ?? "", className: "mb-6" }),
318
+ /* @__PURE__ */ jsx3("div", { className: "space-y-8", children: nav.map((section) => /* @__PURE__ */ jsxs3("div", { children: [
319
+ /* @__PURE__ */ jsx3("h3", { className: "mb-3 text-xs font-mono uppercase tracking-widest text-gray-500 dark:text-gray-400", children: section.title }),
320
+ /* @__PURE__ */ jsx3("ul", { className: "space-y-1 border-l-2 border-gray-200 dark:border-gray-700", children: section.items.map((item) => /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsx3(
321
+ Link,
322
+ {
323
+ href: item.href,
324
+ className: cn(
325
+ "block border-l-2 py-1.5 pl-4 text-sm transition-colors -ml-0.5",
326
+ currentPath === item.href ? "border-primary-500 text-gray-900 dark:text-white font-bold" : "border-transparent text-gray-600 dark:text-gray-300 hover:border-gray-900 dark:hover:border-white hover:text-gray-900 dark:hover:text-white"
327
+ ),
328
+ children: item.title
329
+ }
330
+ ) }, item.href)) })
331
+ ] }, section.title)) })
332
+ ] });
333
+ }
334
+
335
+ // src/components/TableOfContents.tsx
336
+ import { useEffect as useEffect3, useState as useState3, useRef as useRef2 } from "react";
337
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
338
+ function TableOfContents({ items, className = "" }) {
339
+ const [activeId, setActiveId] = useState3(() => {
340
+ if (typeof window !== "undefined" && window.location.hash) {
341
+ return window.location.hash.slice(1);
342
+ }
343
+ return "";
344
+ });
345
+ const isClickScrolling = useRef2(false);
346
+ useEffect3(() => {
347
+ if (items.length === 0) return;
348
+ const handleHashChange = () => {
349
+ const hash = window.location.hash.slice(1);
350
+ if (hash) {
351
+ setActiveId(hash);
139
352
  }
140
- ) }, item.href)) })
141
- ] }, section.title)) });
353
+ };
354
+ window.addEventListener("hashchange", handleHashChange);
355
+ const handleScroll = () => {
356
+ if (isClickScrolling.current) return;
357
+ const headerOffset = 100;
358
+ let currentId = "";
359
+ const scrollTop = window.scrollY;
360
+ const scrollHeight = document.documentElement.scrollHeight;
361
+ const clientHeight = document.documentElement.clientHeight;
362
+ const isAtBottom = scrollTop + clientHeight >= scrollHeight - 50;
363
+ if (isAtBottom) {
364
+ for (let i = items.length - 1; i >= 0; i--) {
365
+ const element = document.getElementById(items[i].id);
366
+ if (element) {
367
+ const rect = element.getBoundingClientRect();
368
+ if (rect.top < clientHeight && rect.bottom > 0) {
369
+ currentId = items[i].id;
370
+ break;
371
+ }
372
+ }
373
+ }
374
+ } else {
375
+ for (const item of items) {
376
+ const element = document.getElementById(item.id);
377
+ if (element) {
378
+ const rect = element.getBoundingClientRect();
379
+ if (rect.top <= headerOffset) {
380
+ currentId = item.id;
381
+ } else {
382
+ break;
383
+ }
384
+ }
385
+ }
386
+ }
387
+ if (!currentId && items.length > 0) {
388
+ currentId = items[0].id;
389
+ }
390
+ if (currentId) {
391
+ setActiveId(currentId);
392
+ }
393
+ };
394
+ let ticking = false;
395
+ const scrollListener = () => {
396
+ if (!ticking) {
397
+ requestAnimationFrame(() => {
398
+ handleScroll();
399
+ ticking = false;
400
+ });
401
+ ticking = true;
402
+ }
403
+ };
404
+ window.addEventListener("scroll", scrollListener, { passive: true });
405
+ if (!window.location.hash) {
406
+ handleScroll();
407
+ }
408
+ return () => {
409
+ window.removeEventListener("scroll", scrollListener);
410
+ window.removeEventListener("hashchange", handleHashChange);
411
+ };
412
+ }, [items]);
413
+ const handleClick = (e, id) => {
414
+ e.preventDefault();
415
+ const element = document.getElementById(id);
416
+ if (element) {
417
+ isClickScrolling.current = true;
418
+ setActiveId(id);
419
+ const top = element.getBoundingClientRect().top + window.scrollY - 80;
420
+ window.scrollTo({ top, behavior: "smooth" });
421
+ window.history.pushState(null, "", `#${id}`);
422
+ let lastScrollY = window.scrollY;
423
+ let stableCount = 0;
424
+ const checkScrollEnd = () => {
425
+ if (window.scrollY === lastScrollY) {
426
+ stableCount++;
427
+ if (stableCount >= 5) {
428
+ isClickScrolling.current = false;
429
+ return;
430
+ }
431
+ } else {
432
+ stableCount = 0;
433
+ lastScrollY = window.scrollY;
434
+ }
435
+ requestAnimationFrame(checkScrollEnd);
436
+ };
437
+ requestAnimationFrame(checkScrollEnd);
438
+ }
439
+ };
440
+ if (items.length === 0) {
441
+ return null;
442
+ }
443
+ return /* @__PURE__ */ jsxs4("nav", { className, children: [
444
+ /* @__PURE__ */ jsx4("h5", { className: "mb-4 text-sm font-semibold tracking-wide text-gray-500 dark:text-gray-400 uppercase", children: "On this page" }),
445
+ /* @__PURE__ */ jsx4("ul", { className: "space-y-2.5 text-sm border-l border-gray-200 dark:border-gray-700", children: items.map((item) => {
446
+ const isActive = activeId === item.id;
447
+ const indent = item.level === 3 ? "pl-6" : "pl-4";
448
+ return /* @__PURE__ */ jsx4("li", { children: /* @__PURE__ */ jsx4(
449
+ "a",
450
+ {
451
+ href: `#${item.id}`,
452
+ onClick: (e) => handleClick(e, item.id),
453
+ className: `block ${indent} -ml-px border-l transition-colors ${isActive ? "border-primary-500 text-primary-600 dark:text-primary-400" : "border-transparent text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:border-gray-300 dark:hover:border-gray-600"}`,
454
+ children: item.text
455
+ }
456
+ ) }, item.id);
457
+ }) })
458
+ ] });
142
459
  }
143
460
 
144
461
  // src/components/ThemeToggle.tsx
145
- import { useState as useState3, useRef, useEffect as useEffect3 } from "react";
462
+ import { useState as useState5, useRef as useRef3, useEffect as useEffect5 } from "react";
146
463
 
147
464
  // src/components/ThemeProvider.tsx
148
- import { createContext, useContext, useEffect as useEffect2, useState as useState2 } from "react";
149
- import { jsx as jsx3 } from "react/jsx-runtime";
465
+ import { createContext, useContext, useEffect as useEffect4, useState as useState4 } from "react";
466
+ import { jsx as jsx5 } from "react/jsx-runtime";
150
467
  var ThemeContext = createContext(null);
151
468
  var STORAGE_KEY = "cross-docs-theme";
152
469
  function getSystemTheme() {
@@ -166,17 +483,17 @@ function ThemeProvider({
166
483
  defaultTheme: defaultTheme2 = "system",
167
484
  forcedTheme
168
485
  }) {
169
- const [theme, setThemeState] = useState2(() => {
486
+ const [theme, setThemeState] = useState4(() => {
170
487
  if (typeof window === "undefined") return defaultTheme2;
171
488
  return getStoredTheme() ?? defaultTheme2;
172
489
  });
173
- const [resolvedTheme, setResolvedTheme] = useState2(() => {
490
+ const [resolvedTheme, setResolvedTheme] = useState4(() => {
174
491
  if (forcedTheme) return forcedTheme;
175
492
  if (typeof window === "undefined") return "light";
176
493
  if (theme === "system") return getSystemTheme();
177
494
  return theme;
178
495
  });
179
- useEffect2(() => {
496
+ useEffect4(() => {
180
497
  if (forcedTheme) {
181
498
  setResolvedTheme(forcedTheme);
182
499
  return;
@@ -198,7 +515,7 @@ function ThemeProvider({
198
515
  mediaQuery.addEventListener("change", handleChange);
199
516
  return () => mediaQuery.removeEventListener("change", handleChange);
200
517
  }, [theme, forcedTheme]);
201
- useEffect2(() => {
518
+ useEffect4(() => {
202
519
  const root = document.documentElement;
203
520
  root.classList.remove("light", "dark");
204
521
  root.classList.add(resolvedTheme);
@@ -207,7 +524,7 @@ function ThemeProvider({
207
524
  setThemeState(newTheme);
208
525
  localStorage.setItem(STORAGE_KEY, newTheme);
209
526
  };
210
- return /* @__PURE__ */ jsx3(ThemeContext.Provider, { value: { theme, resolvedTheme, setTheme }, children });
527
+ return /* @__PURE__ */ jsx5(ThemeContext.Provider, { value: { theme, resolvedTheme, setTheme }, children });
211
528
  }
212
529
  function useTheme() {
213
530
  const context = useContext(ThemeContext);
@@ -228,15 +545,15 @@ var themeInitScript = `
228
545
  `.trim();
229
546
 
230
547
  // src/components/ThemeToggle.tsx
231
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
232
- var SunIcon = ({ className }) => /* @__PURE__ */ jsxs3("svg", { className, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
233
- /* @__PURE__ */ jsx4("circle", { cx: "12", cy: "12", r: "4", stroke: "currentColor", strokeWidth: "1.5" }),
234
- /* @__PURE__ */ jsx4("path", { d: "M12 5V3M12 21v-2M5 12H3m18 0h-2M7.05 7.05 5.636 5.636m12.728 12.728L16.95 16.95M7.05 16.95l-1.414 1.414M18.364 5.636 16.95 7.05", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
548
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
549
+ var SunIcon = ({ className }) => /* @__PURE__ */ jsxs5("svg", { className, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
550
+ /* @__PURE__ */ jsx6("circle", { cx: "12", cy: "12", r: "4", stroke: "currentColor", strokeWidth: "1.5" }),
551
+ /* @__PURE__ */ jsx6("path", { d: "M12 5V3M12 21v-2M5 12H3m18 0h-2M7.05 7.05 5.636 5.636m12.728 12.728L16.95 16.95M7.05 16.95l-1.414 1.414M18.364 5.636 16.95 7.05", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
235
552
  ] });
236
- var MoonIcon = ({ className }) => /* @__PURE__ */ jsx4("svg", { className, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx4("path", { d: "M21.752 15.002A9.718 9.718 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
237
- var MonitorIcon = ({ className }) => /* @__PURE__ */ jsxs3("svg", { className, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
238
- /* @__PURE__ */ jsx4("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
239
- /* @__PURE__ */ jsx4("path", { d: "M8 21h8m-4-4v4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
553
+ var MoonIcon = ({ className }) => /* @__PURE__ */ jsx6("svg", { className, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx6("path", { d: "M21.752 15.002A9.718 9.718 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
554
+ var MonitorIcon = ({ className }) => /* @__PURE__ */ jsxs5("svg", { className, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
555
+ /* @__PURE__ */ jsx6("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2", stroke: "currentColor", strokeWidth: "1.5" }),
556
+ /* @__PURE__ */ jsx6("path", { d: "M8 21h8m-4-4v4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
240
557
  ] });
241
558
  var themeOptions = [
242
559
  { value: "light", label: "Light", icon: SunIcon },
@@ -245,9 +562,9 @@ var themeOptions = [
245
562
  ];
246
563
  function ThemeToggle({ className, size = "md" }) {
247
564
  const { theme, resolvedTheme, setTheme } = useTheme();
248
- const [isOpen, setIsOpen] = useState3(false);
249
- const dropdownRef = useRef(null);
250
- useEffect3(() => {
565
+ const [isOpen, setIsOpen] = useState5(false);
566
+ const dropdownRef = useRef3(null);
567
+ useEffect5(() => {
251
568
  const handleClickOutside = (event) => {
252
569
  if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
253
570
  setIsOpen(false);
@@ -258,7 +575,7 @@ function ThemeToggle({ className, size = "md" }) {
258
575
  return () => document.removeEventListener("mousedown", handleClickOutside);
259
576
  }
260
577
  }, [isOpen]);
261
- useEffect3(() => {
578
+ useEffect5(() => {
262
579
  const handleEscape = (event) => {
263
580
  if (event.key === "Escape") setIsOpen(false);
264
581
  };
@@ -272,8 +589,8 @@ function ThemeToggle({ className, size = "md" }) {
272
589
  md: "w-5 h-5",
273
590
  lg: "w-[22px] h-[22px]"
274
591
  };
275
- return /* @__PURE__ */ jsxs3("div", { className: "relative", ref: dropdownRef, children: [
276
- /* @__PURE__ */ jsxs3(
592
+ return /* @__PURE__ */ jsxs5("div", { className: "relative", ref: dropdownRef, children: [
593
+ /* @__PURE__ */ jsxs5(
277
594
  "button",
278
595
  {
279
596
  onClick: () => setIsOpen(!isOpen),
@@ -291,7 +608,7 @@ function ThemeToggle({ className, size = "md" }) {
291
608
  "aria-expanded": isOpen,
292
609
  "aria-haspopup": "listbox",
293
610
  children: [
294
- /* @__PURE__ */ jsx4(
611
+ /* @__PURE__ */ jsx6(
295
612
  SunIcon,
296
613
  {
297
614
  className: cn(
@@ -301,7 +618,7 @@ function ThemeToggle({ className, size = "md" }) {
301
618
  )
302
619
  }
303
620
  ),
304
- /* @__PURE__ */ jsx4(
621
+ /* @__PURE__ */ jsx6(
305
622
  MoonIcon,
306
623
  {
307
624
  className: cn(
@@ -314,7 +631,7 @@ function ThemeToggle({ className, size = "md" }) {
314
631
  ]
315
632
  }
316
633
  ),
317
- /* @__PURE__ */ jsx4(
634
+ /* @__PURE__ */ jsx6(
318
635
  "div",
319
636
  {
320
637
  className: cn(
@@ -333,7 +650,7 @@ function ThemeToggle({ className, size = "md" }) {
333
650
  children: themeOptions.map((option, index) => {
334
651
  const Icon = option.icon;
335
652
  const isSelected = theme === option.value;
336
- return /* @__PURE__ */ jsxs3(
653
+ return /* @__PURE__ */ jsxs5(
337
654
  "button",
338
655
  {
339
656
  onClick: () => {
@@ -354,13 +671,13 @@ function ThemeToggle({ className, size = "md" }) {
354
671
  animationDelay: isOpen ? `${index * 25}ms` : "0ms"
355
672
  },
356
673
  children: [
357
- /* @__PURE__ */ jsx4(Icon, { className: cn(
674
+ /* @__PURE__ */ jsx6(Icon, { className: cn(
358
675
  "w-4 h-4 flex-shrink-0",
359
676
  "transition-transform duration-150",
360
677
  isSelected ? "scale-110" : "scale-100"
361
678
  ) }),
362
- /* @__PURE__ */ jsx4("span", { className: "flex-1 text-left", children: option.label }),
363
- /* @__PURE__ */ jsx4("div", { className: cn(
679
+ /* @__PURE__ */ jsx6("span", { className: "flex-1 text-left", children: option.label }),
680
+ /* @__PURE__ */ jsx6("div", { className: cn(
364
681
  "w-1.5 h-1.5 rounded-full",
365
682
  "transition-all duration-200",
366
683
  isSelected ? "bg-primary-500 scale-100 opacity-100" : "bg-transparent scale-0 opacity-0"
@@ -376,23 +693,23 @@ function ThemeToggle({ className, size = "md" }) {
376
693
  }
377
694
 
378
695
  // src/components/DocsLayout.tsx
379
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
696
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
380
697
  function MobileMenuButton({ onClick, isOpen }) {
381
- return /* @__PURE__ */ jsxs4(
698
+ return /* @__PURE__ */ jsxs6(
382
699
  "button",
383
700
  {
384
701
  onClick,
385
702
  className: "inline-flex items-center justify-center p-2 -ml-2 text-gray-700 hover:text-primary-500 dark:text-gray-300 dark:hover:text-primary-400 lg:hidden transition-colors",
386
703
  "aria-expanded": isOpen,
387
704
  children: [
388
- /* @__PURE__ */ jsx5("span", { className: "sr-only", children: isOpen ? "Close menu" : "Open menu" }),
389
- isOpen ? /* @__PURE__ */ jsx5("svg", { className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx5("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) : /* @__PURE__ */ jsx5("svg", { className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx5("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }) })
705
+ /* @__PURE__ */ jsx7("span", { className: "sr-only", children: isOpen ? "Close menu" : "Open menu" }),
706
+ isOpen ? /* @__PURE__ */ jsx7("svg", { className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx7("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) : /* @__PURE__ */ jsx7("svg", { className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx7("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }) })
390
707
  ]
391
708
  }
392
709
  );
393
710
  }
394
711
  function GitHubIcon() {
395
- return /* @__PURE__ */ jsx5("svg", { className: "w-6 h-6", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx5(
712
+ return /* @__PURE__ */ jsx7("svg", { className: "w-6 h-6", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx7(
396
713
  "path",
397
714
  {
398
715
  fillRule: "evenodd",
@@ -411,31 +728,32 @@ function DocsLayout({
411
728
  logoInvertedUrl: propLogoInvertedUrl,
412
729
  githubUrl: propGithubUrl,
413
730
  navLinks: propNavLinks,
414
- footer
731
+ footer,
732
+ toc
415
733
  }) {
416
734
  const sharedProps = usePage().props;
417
- const { nav, currentPath } = sharedProps;
418
- const [mobileMenuOpen, setMobileMenuOpen] = useState4(false);
735
+ const { nav, currentPath, docSets, currentDocSet } = sharedProps;
736
+ const [mobileMenuOpen, setMobileMenuOpen] = useState6(false);
419
737
  const { resolvedTheme } = useTheme();
420
738
  const logoUrl = propLogoUrl ?? sharedProps.logoUrl;
421
739
  const logoInvertedUrl = propLogoInvertedUrl ?? sharedProps.logoInvertedUrl;
422
740
  const githubUrl = propGithubUrl ?? sharedProps.githubUrl;
423
741
  const navLinks = propNavLinks ?? sharedProps.navLinks ?? [];
424
- const headerLogo = logoInverted || logo || (logoInvertedUrl ? /* @__PURE__ */ jsx5("img", { src: logoInvertedUrl, alt: "Logo", className: "h-8" }) : logoUrl ? /* @__PURE__ */ jsx5("img", { src: logoUrl, alt: "Logo", className: "h-8" }) : null);
742
+ const headerLogo = logoInverted || logo || (logoInvertedUrl ? /* @__PURE__ */ jsx7("img", { src: logoInvertedUrl, alt: "Logo", className: "h-8" }) : logoUrl ? /* @__PURE__ */ jsx7("img", { src: logoUrl, alt: "Logo", className: "h-8" }) : null);
425
743
  const footerLogoUrl = sharedProps.footerLogoUrl || logoUrl;
426
744
  const footerLogoInvertedUrl = sharedProps.footerLogoInvertedUrl || logoInvertedUrl;
427
745
  const currentFooterLogoUrl = resolvedTheme === "dark" ? footerLogoInvertedUrl || footerLogoUrl : footerLogoUrl;
428
- const footerLogo = logo || (currentFooterLogoUrl ? /* @__PURE__ */ jsx5("img", { src: currentFooterLogoUrl, alt: "Logo", className: "h-6" }) : null);
429
- return /* @__PURE__ */ jsxs4("div", { className: "min-h-screen bg-white dark:bg-[#0f0f0f] flex flex-col transition-colors duration-200", children: [
430
- /* @__PURE__ */ jsx5(Head, { title }),
431
- /* @__PURE__ */ jsx5("nav", { className: "fixed w-full z-50 bg-white/95 dark:bg-[#0f0f0f]/95 backdrop-blur-sm border-b border-gray-200 dark:border-gray-800 transition-colors", children: /* @__PURE__ */ jsx5("div", { className: "px-4 lg:px-10", children: /* @__PURE__ */ jsxs4("div", { className: "flex justify-between h-16 items-center", children: [
432
- /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
433
- /* @__PURE__ */ jsx5(MobileMenuButton, { onClick: () => setMobileMenuOpen(!mobileMenuOpen), isOpen: mobileMenuOpen }),
434
- headerLogo ? /* @__PURE__ */ jsx5(Link2, { href: "/", className: "flex items-center", children: headerLogo }) : /* @__PURE__ */ jsx5(Link2, { href: "/", className: "font-bold text-lg text-gray-900 dark:text-white", children: "Docs" })
746
+ const footerLogo = logo || (currentFooterLogoUrl ? /* @__PURE__ */ jsx7("img", { src: currentFooterLogoUrl, alt: "Logo", className: "h-6" }) : null);
747
+ return /* @__PURE__ */ jsxs6("div", { className: "min-h-screen bg-white dark:bg-[#0f0f0f] flex flex-col transition-colors duration-200", children: [
748
+ /* @__PURE__ */ jsx7(Head, { title }),
749
+ /* @__PURE__ */ jsx7("nav", { className: "fixed w-full z-50 bg-white/95 dark:bg-[#0f0f0f]/95 backdrop-blur-sm border-b border-gray-200 dark:border-gray-800 transition-colors", children: /* @__PURE__ */ jsx7("div", { className: "px-4 lg:px-10", children: /* @__PURE__ */ jsxs6("div", { className: "flex justify-between h-16 items-center", children: [
750
+ /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2", children: [
751
+ /* @__PURE__ */ jsx7(MobileMenuButton, { onClick: () => setMobileMenuOpen(!mobileMenuOpen), isOpen: mobileMenuOpen }),
752
+ headerLogo ? /* @__PURE__ */ jsx7(Link2, { href: "/", className: "flex items-center", children: headerLogo }) : /* @__PURE__ */ jsx7(Link2, { href: "/", className: "font-bold text-lg text-gray-900 dark:text-white", children: "Docs" })
435
753
  ] }),
436
- /* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-6", children: [
437
- /* @__PURE__ */ jsx5("div", { className: "-mr-2", children: /* @__PURE__ */ jsx5(ThemeToggle, { size: "sm" }) }),
438
- navLinks.map((link) => /* @__PURE__ */ jsx5(
754
+ /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-6", children: [
755
+ /* @__PURE__ */ jsx7("div", { className: "-mr-2", children: /* @__PURE__ */ jsx7(ThemeToggle, { size: "sm" }) }),
756
+ navLinks.map((link) => /* @__PURE__ */ jsx7(
439
757
  Link2,
440
758
  {
441
759
  href: link.href,
@@ -444,31 +762,32 @@ function DocsLayout({
444
762
  },
445
763
  link.href
446
764
  )),
447
- githubUrl && /* @__PURE__ */ jsx5(
765
+ githubUrl && /* @__PURE__ */ jsx7(
448
766
  "a",
449
767
  {
450
768
  href: githubUrl,
451
769
  target: "_blank",
452
770
  rel: "noopener noreferrer",
453
771
  className: "text-gray-700 dark:text-gray-300 hover:text-primary-600 dark:hover:text-primary-400 transition-colors",
454
- children: /* @__PURE__ */ jsx5(GitHubIcon, {})
772
+ children: /* @__PURE__ */ jsx7(GitHubIcon, {})
455
773
  }
456
774
  )
457
775
  ] })
458
776
  ] }) }) }),
459
- mobileMenuOpen && /* @__PURE__ */ jsxs4("div", { className: "fixed inset-0 z-40 lg:hidden", children: [
460
- /* @__PURE__ */ jsx5("div", { className: "fixed inset-0 bg-black/50 dark:bg-black/70", onClick: () => setMobileMenuOpen(false) }),
461
- /* @__PURE__ */ jsx5("div", { className: "fixed inset-y-0 left-0 w-72 overflow-y-auto bg-white dark:bg-[#0f0f0f] px-4 lg:px-10 py-6 pt-20 border-r border-gray-200 dark:border-gray-800 transition-colors", children: /* @__PURE__ */ jsx5(Sidebar, { nav, currentPath }) })
777
+ mobileMenuOpen && /* @__PURE__ */ jsxs6("div", { className: "fixed inset-0 z-40 lg:hidden", children: [
778
+ /* @__PURE__ */ jsx7("div", { className: "fixed inset-0 bg-black/50 dark:bg-black/70", onClick: () => setMobileMenuOpen(false) }),
779
+ /* @__PURE__ */ jsx7("div", { className: "fixed inset-y-0 left-0 w-64 overflow-y-auto bg-white dark:bg-[#0f0f0f] px-4 py-6 pt-20 border-r border-gray-200 dark:border-gray-800 transition-colors", children: /* @__PURE__ */ jsx7(Sidebar, { nav, currentPath, docSets, currentDocSet }) })
462
780
  ] }),
463
- /* @__PURE__ */ jsx5("div", { className: "bg-white dark:bg-[#0f0f0f] pt-16 w-full flex-1 transition-colors", children: /* @__PURE__ */ jsxs4("div", { className: "grid grid-cols-12", children: [
464
- /* @__PURE__ */ jsx5("aside", { className: "hidden lg:block lg:col-span-3 xl:col-span-2 border-r border-gray-200 dark:border-gray-800 min-h-[calc(100vh-4rem)] transition-colors", children: /* @__PURE__ */ jsx5("nav", { className: "sticky top-16 px-4 lg:px-10 py-6 max-h-[calc(100vh-4rem)] overflow-y-auto", children: /* @__PURE__ */ jsx5(Sidebar, { nav, currentPath }) }) }),
465
- /* @__PURE__ */ jsx5("main", { className: "col-span-12 lg:col-span-9 xl:col-span-10 p-4 lg:px-10 lg:py-6", children: /* @__PURE__ */ jsx5("article", { className: "prose prose-lg max-w-3xl prose-headings:font-bold prose-headings:tracking-tight prose-h1:text-3xl prose-h1:mb-4 prose-h2:text-2xl prose-h2:mt-10 first:prose-h2:mt-0 prose-h3:text-xl prose-a:text-primary-600 dark:prose-a:text-primary-400 prose-a:no-underline hover:prose-a:underline prose-code:bg-gray-100 dark:prose-code:bg-gray-800 prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:before:content-none prose-code:after:content-none dark:prose-headings:text-white dark:prose-strong:text-white dark:text-gray-300", children }) })
781
+ /* @__PURE__ */ jsx7("div", { className: "bg-white dark:bg-[#0f0f0f] pt-16 w-full flex-1 transition-colors", children: /* @__PURE__ */ jsxs6("div", { className: "flex", children: [
782
+ /* @__PURE__ */ jsx7("aside", { className: "hidden lg:block w-72 flex-shrink-0 border-r border-gray-200 dark:border-gray-800 min-h-[calc(100vh-4rem)] transition-colors", children: /* @__PURE__ */ jsx7("nav", { className: "sticky top-16 px-4 py-6 max-h-[calc(100vh-4rem)] overflow-y-auto", children: /* @__PURE__ */ jsx7(Sidebar, { nav, currentPath, docSets, currentDocSet }) }) }),
783
+ /* @__PURE__ */ jsx7("main", { className: "flex-1 min-w-0 p-4 lg:px-10 lg:py-6", children: /* @__PURE__ */ jsx7("article", { className: "prose prose-lg max-w-3xl prose-headings:font-bold prose-headings:tracking-tight prose-h1:text-3xl prose-h1:mb-4 prose-h2:text-2xl prose-h2:mt-10 first:prose-h2:mt-0 prose-h3:text-xl prose-a:text-primary-600 dark:prose-a:text-primary-400 prose-a:no-underline hover:prose-a:underline prose-code:bg-gray-100 dark:prose-code:bg-gray-800 prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:before:content-none prose-code:after:content-none dark:prose-headings:text-white dark:prose-strong:text-white dark:text-gray-300", children }) }),
784
+ toc && toc.length > 0 && /* @__PURE__ */ jsx7("aside", { className: "hidden xl:block w-64 flex-shrink-0 min-h-[calc(100vh-4rem)] transition-colors", children: /* @__PURE__ */ jsx7("div", { className: "sticky top-16 px-4 py-6 max-h-[calc(100vh-4rem)] overflow-y-auto", children: /* @__PURE__ */ jsx7(TableOfContents, { items: toc }) }) })
466
785
  ] }) }),
467
- footer || /* @__PURE__ */ jsx5("footer", { className: "border-t border-gray-200 dark:border-gray-800 py-8 bg-white dark:bg-[#0f0f0f] transition-colors", children: /* @__PURE__ */ jsxs4("div", { className: "px-4 lg:px-10 flex flex-col md:flex-row justify-between items-center gap-6", children: [
468
- footerLogo && /* @__PURE__ */ jsx5(Link2, { href: "/", children: footerLogo }),
469
- /* @__PURE__ */ jsxs4("div", { className: "flex gap-8 text-sm text-gray-600 dark:text-gray-400", children: [
470
- navLinks.map((link) => /* @__PURE__ */ jsx5(Link2, { href: link.href, className: "hover:text-black dark:hover:text-white transition-colors", children: link.label }, link.href)),
471
- githubUrl && /* @__PURE__ */ jsx5(
786
+ footer || /* @__PURE__ */ jsx7("footer", { className: "border-t border-gray-200 dark:border-gray-800 py-8 bg-white dark:bg-[#0f0f0f] transition-colors", children: /* @__PURE__ */ jsxs6("div", { className: "px-4 lg:px-10 flex flex-col md:flex-row justify-between items-center gap-6", children: [
787
+ footerLogo && /* @__PURE__ */ jsx7(Link2, { href: "/", children: footerLogo }),
788
+ /* @__PURE__ */ jsxs6("div", { className: "flex gap-8 text-sm text-gray-600 dark:text-gray-400", children: [
789
+ navLinks.map((link) => /* @__PURE__ */ jsx7(Link2, { href: link.href, className: "hover:text-black dark:hover:text-white transition-colors", children: link.label }, link.href)),
790
+ githubUrl && /* @__PURE__ */ jsx7(
472
791
  "a",
473
792
  {
474
793
  href: githubUrl,
@@ -487,7 +806,19 @@ function DocsLayout({
487
806
  import ReactMarkdown from "react-markdown";
488
807
  import remarkGfm from "remark-gfm";
489
808
  import rehypeRaw from "rehype-raw";
490
- import { Fragment, jsx as jsx6 } from "react/jsx-runtime";
809
+ import { Fragment, jsx as jsx8 } from "react/jsx-runtime";
810
+ function slugify(text) {
811
+ return text.toLowerCase().replace(/[\s_]+/g, "-").replace(/[^a-z0-9-]/g, "").replace(/-+/g, "-").replace(/^-|-$/g, "");
812
+ }
813
+ function getTextContent(children) {
814
+ if (typeof children === "string") return children;
815
+ if (typeof children === "number") return String(children);
816
+ if (Array.isArray(children)) return children.map(getTextContent).join("");
817
+ if (children && typeof children === "object" && "props" in children) {
818
+ return getTextContent(children.props.children);
819
+ }
820
+ return "";
821
+ }
491
822
  function Markdown({ content, components }) {
492
823
  const lowercaseComponents = components ? Object.entries(components).reduce(
493
824
  (acc, [name, Component]) => {
@@ -496,7 +827,7 @@ function Markdown({ content, components }) {
496
827
  },
497
828
  {}
498
829
  ) : {};
499
- return /* @__PURE__ */ jsx6(
830
+ return /* @__PURE__ */ jsx8(
500
831
  ReactMarkdown,
501
832
  {
502
833
  remarkPlugins: [remarkGfm],
@@ -505,14 +836,14 @@ function Markdown({ content, components }) {
505
836
  ...lowercaseComponents,
506
837
  // Override pre to avoid double wrapping with CodeBlock
507
838
  pre({ children }) {
508
- return /* @__PURE__ */ jsx6(Fragment, { children });
839
+ return /* @__PURE__ */ jsx8(Fragment, { children });
509
840
  },
510
841
  // Custom code block rendering with syntax highlighting
511
842
  code({ node, className, children, ...props }) {
512
843
  const match = /language-(\w+)/.exec(className || "");
513
844
  const isInline = !match && !className;
514
845
  if (isInline) {
515
- return /* @__PURE__ */ jsx6(
846
+ return /* @__PURE__ */ jsx8(
516
847
  "code",
517
848
  {
518
849
  className: "rounded bg-gray-100 px-1.5 py-0.5 text-sm font-medium text-gray-800 dark:bg-gray-800 dark:text-gray-200",
@@ -525,7 +856,7 @@ function Markdown({ content, components }) {
525
856
  const titleMatch = /title="([^"]+)"/.exec(meta);
526
857
  const filename = titleMatch ? titleMatch[1] : void 0;
527
858
  const showLineNumbers = meta.includes("showLineNumbers");
528
- return /* @__PURE__ */ jsx6(
859
+ return /* @__PURE__ */ jsx8(
529
860
  CodeBlock,
530
861
  {
531
862
  code: String(children).replace(/\n$/, ""),
@@ -538,7 +869,7 @@ function Markdown({ content, components }) {
538
869
  // Custom link styling
539
870
  a({ href, children }) {
540
871
  const isExternal = href?.startsWith("http");
541
- return /* @__PURE__ */ jsx6(
872
+ return /* @__PURE__ */ jsx8(
542
873
  "a",
543
874
  {
544
875
  href,
@@ -550,13 +881,24 @@ function Markdown({ content, components }) {
550
881
  },
551
882
  // Tables
552
883
  table({ children }) {
553
- return /* @__PURE__ */ jsx6("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsx6("table", { className: "w-full text-left text-sm", children }) });
884
+ return /* @__PURE__ */ jsx8("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsx8("table", { className: "w-full text-left text-sm", children }) });
554
885
  },
555
886
  th({ children }) {
556
- return /* @__PURE__ */ jsx6("th", { className: "border-b border-gray-200 bg-gray-50 px-4 py-2 font-semibold dark:border-gray-700 dark:bg-gray-800", children });
887
+ return /* @__PURE__ */ jsx8("th", { className: "border-b border-gray-200 bg-gray-50 px-4 py-2 font-semibold dark:border-gray-700 dark:bg-gray-800", children });
557
888
  },
558
889
  td({ children }) {
559
- return /* @__PURE__ */ jsx6("td", { className: "border-b border-gray-200 px-4 py-2 dark:border-gray-700", children });
890
+ return /* @__PURE__ */ jsx8("td", { className: "border-b border-gray-200 px-4 py-2 dark:border-gray-700", children });
891
+ },
892
+ // Headings with anchor IDs for TOC
893
+ h2({ children }) {
894
+ const text = getTextContent(children);
895
+ const id = slugify(text);
896
+ return /* @__PURE__ */ jsx8("h2", { id, children });
897
+ },
898
+ h3({ children }) {
899
+ const text = getTextContent(children);
900
+ const id = slugify(text);
901
+ return /* @__PURE__ */ jsx8("h3", { id, children });
560
902
  }
561
903
  },
562
904
  children: content
@@ -566,31 +908,40 @@ function Markdown({ content, components }) {
566
908
 
567
909
  // src/context/ComponentsContext.tsx
568
910
  import { createContext as createContext2, useContext as useContext2 } from "react";
569
- import { jsx as jsx7 } from "react/jsx-runtime";
911
+ import { jsx as jsx9 } from "react/jsx-runtime";
570
912
  var ComponentsContext = createContext2({});
571
913
  function ComponentsProvider({
572
914
  children,
573
915
  components
574
916
  }) {
575
- return /* @__PURE__ */ jsx7(ComponentsContext.Provider, { value: { components }, children });
917
+ return /* @__PURE__ */ jsx9(ComponentsContext.Provider, { value: { components }, children });
576
918
  }
577
919
  function useComponents() {
578
920
  return useContext2(ComponentsContext);
579
921
  }
580
922
 
581
923
  // src/components/DocsPage.tsx
582
- import { jsx as jsx8 } from "react/jsx-runtime";
924
+ import { jsx as jsx10 } from "react/jsx-runtime";
583
925
  function DocsPage({ content, ...layoutProps }) {
584
926
  const { components } = useComponents();
585
- return /* @__PURE__ */ jsx8(DocsLayout, { title: content?.title ?? "", description: content?.description, ...layoutProps, children: /* @__PURE__ */ jsx8(Markdown, { content: content?.body ?? "", components }) });
927
+ return /* @__PURE__ */ jsx10(
928
+ DocsLayout,
929
+ {
930
+ title: content?.title ?? "",
931
+ description: content?.description,
932
+ toc: content?.toc,
933
+ ...layoutProps,
934
+ children: /* @__PURE__ */ jsx10(Markdown, { content: content?.body ?? "", components })
935
+ }
936
+ );
586
937
  }
587
938
 
588
939
  // src/components/EmojiConfetti.tsx
589
- import { useState as useState5, useCallback } from "react";
590
- import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
940
+ import { useState as useState7, useCallback } from "react";
941
+ import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
591
942
  function EmojiConfetti({ children, emoji }) {
592
- const [particles, setParticles] = useState5([]);
593
- const [isActive, setIsActive] = useState5(false);
943
+ const [particles, setParticles] = useState7([]);
944
+ const [isActive, setIsActive] = useState7(false);
594
945
  const triggerBurst = useCallback(() => {
595
946
  if (isActive) return;
596
947
  setIsActive(true);
@@ -617,17 +968,17 @@ function EmojiConfetti({ children, emoji }) {
617
968
  setIsActive(false);
618
969
  }, 1e3);
619
970
  }, [isActive]);
620
- return /* @__PURE__ */ jsxs5(
971
+ return /* @__PURE__ */ jsxs7(
621
972
  "span",
622
973
  {
623
974
  className: "relative inline-block",
624
975
  onMouseEnter: triggerBurst,
625
976
  children: [
626
977
  children,
627
- /* @__PURE__ */ jsx9("span", { className: "absolute inset-0 pointer-events-none overflow-visible", children: particles.map((p) => {
978
+ /* @__PURE__ */ jsx11("span", { className: "absolute inset-0 pointer-events-none overflow-visible", children: particles.map((p) => {
628
979
  const endX = p.x + Math.cos(p.angle) * p.velocity;
629
980
  const endY = p.y + Math.sin(p.angle) * p.velocity;
630
- return /* @__PURE__ */ jsx9(
981
+ return /* @__PURE__ */ jsx11(
631
982
  "span",
632
983
  {
633
984
  className: "absolute",
@@ -653,8 +1004,8 @@ function EmojiConfetti({ children, emoji }) {
653
1004
 
654
1005
  // src/components/HomePage.tsx
655
1006
  import { Head as Head2, Link as Link3 } from "@inertiajs/react";
656
- import { createContext as createContext3, useContext as useContext3, useState as useState6 } from "react";
657
- import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
1007
+ import { createContext as createContext3, useContext as useContext3, useState as useState8 } from "react";
1008
+ import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
658
1009
  var HomePageContext = createContext3(null);
659
1010
  function useHomePage() {
660
1011
  const context = useContext3(HomePageContext);
@@ -664,28 +1015,28 @@ function useHomePage() {
664
1015
  return context;
665
1016
  }
666
1017
  function InstallCommand({ command }) {
667
- const [copied, setCopied] = useState6(false);
1018
+ const [copied, setCopied] = useState8(false);
668
1019
  const copyToClipboard = async () => {
669
1020
  await navigator.clipboard.writeText(command);
670
1021
  setCopied(true);
671
1022
  setTimeout(() => setCopied(false), 2e3);
672
1023
  };
673
- return /* @__PURE__ */ jsxs6(
1024
+ return /* @__PURE__ */ jsxs8(
674
1025
  "button",
675
1026
  {
676
1027
  onClick: copyToClipboard,
677
1028
  className: "group relative flex items-center bg-gray-900 dark:bg-white border border-gray-900 dark:border-white px-4 h-14 font-mono text-sm text-white dark:text-gray-900 hover:bg-white dark:hover:bg-gray-900 hover:text-gray-900 dark:hover:text-white transition-colors cursor-pointer",
678
1029
  children: [
679
- /* @__PURE__ */ jsx10("span", { className: "text-primary-500 dark:text-primary-600 mr-2", children: "$" }),
680
- /* @__PURE__ */ jsx10("span", { children: command }),
681
- /* @__PURE__ */ jsx10(
1030
+ /* @__PURE__ */ jsx12("span", { className: "text-primary-500 dark:text-primary-600 mr-2", children: "$" }),
1031
+ /* @__PURE__ */ jsx12("span", { children: command }),
1032
+ /* @__PURE__ */ jsx12(
682
1033
  "svg",
683
1034
  {
684
1035
  className: `ml-4 w-4 h-4 transition ${copied ? "text-green-400" : "opacity-50 group-hover:opacity-100"}`,
685
1036
  fill: "none",
686
1037
  stroke: "currentColor",
687
1038
  viewBox: "0 0 24 24",
688
- children: /* @__PURE__ */ jsx10(
1039
+ children: /* @__PURE__ */ jsx12(
689
1040
  "path",
690
1041
  {
691
1042
  strokeLinecap: "round",
@@ -696,7 +1047,7 @@ function InstallCommand({ command }) {
696
1047
  )
697
1048
  }
698
1049
  ),
699
- /* @__PURE__ */ jsx10(
1050
+ /* @__PURE__ */ jsx12(
700
1051
  "span",
701
1052
  {
702
1053
  className: `absolute -top-8 left-1/2 -translate-x-1/2 bg-gray-900 dark:bg-white text-white dark:text-gray-900 text-xs py-1 px-2 rounded transition-opacity duration-300 whitespace-nowrap ${copied ? "opacity-100" : "opacity-0"}`,
@@ -708,7 +1059,7 @@ function InstallCommand({ command }) {
708
1059
  );
709
1060
  }
710
1061
  function GitHubIcon2() {
711
- return /* @__PURE__ */ jsx10("svg", { className: "w-6 h-6", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx10(
1062
+ return /* @__PURE__ */ jsx12("svg", { className: "w-6 h-6", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx12(
712
1063
  "path",
713
1064
  {
714
1065
  fillRule: "evenodd",
@@ -720,17 +1071,17 @@ function GitHubIcon2() {
720
1071
  function DefaultLogo() {
721
1072
  const { title, logoUrl } = useHomePage();
722
1073
  if (logoUrl) {
723
- return /* @__PURE__ */ jsx10(Link3, { href: "/", className: "flex items-center", children: /* @__PURE__ */ jsx10("img", { src: logoUrl, alt: title, className: "h-8" }) });
1074
+ return /* @__PURE__ */ jsx12(Link3, { href: "/", className: "flex items-center", children: /* @__PURE__ */ jsx12("img", { src: logoUrl, alt: title, className: "h-8" }) });
724
1075
  }
725
- return /* @__PURE__ */ jsx10(Link3, { href: "/", className: "font-bold text-lg text-gray-900 dark:text-white", children: title });
1076
+ return /* @__PURE__ */ jsx12(Link3, { href: "/", className: "font-bold text-lg text-gray-900 dark:text-white", children: title });
726
1077
  }
727
1078
  function HomeHeader({ renderLogo } = {}) {
728
1079
  const { navLinks, githubUrl } = useHomePage();
729
- return /* @__PURE__ */ jsx10("nav", { className: "fixed w-full z-50 bg-white/95 dark:bg-[#0f0f0f]/95 backdrop-blur-sm border-b border-gray-200 dark:border-gray-800 transition-colors", children: /* @__PURE__ */ jsx10("div", { className: "px-4 lg:px-10", children: /* @__PURE__ */ jsxs6("div", { className: "flex justify-between h-16 items-center", children: [
730
- renderLogo ? renderLogo() : /* @__PURE__ */ jsx10(DefaultLogo, {}),
731
- /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-6", children: [
732
- /* @__PURE__ */ jsx10("div", { className: "-mr-2", children: /* @__PURE__ */ jsx10(ThemeToggle, { size: "sm" }) }),
733
- navLinks.map((link) => /* @__PURE__ */ jsx10(
1080
+ return /* @__PURE__ */ jsx12("nav", { className: "fixed w-full z-50 bg-white/95 dark:bg-[#0f0f0f]/95 backdrop-blur-sm border-b border-gray-200 dark:border-gray-800 transition-colors", children: /* @__PURE__ */ jsx12("div", { className: "px-4 lg:px-10", children: /* @__PURE__ */ jsxs8("div", { className: "flex justify-between h-16 items-center", children: [
1081
+ renderLogo ? renderLogo() : /* @__PURE__ */ jsx12(DefaultLogo, {}),
1082
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-6", children: [
1083
+ /* @__PURE__ */ jsx12("div", { className: "-mr-2", children: /* @__PURE__ */ jsx12(ThemeToggle, { size: "sm" }) }),
1084
+ navLinks.map((link) => /* @__PURE__ */ jsx12(
734
1085
  Link3,
735
1086
  {
736
1087
  href: link.href,
@@ -739,14 +1090,14 @@ function HomeHeader({ renderLogo } = {}) {
739
1090
  },
740
1091
  link.href
741
1092
  )),
742
- githubUrl && /* @__PURE__ */ jsx10(
1093
+ githubUrl && /* @__PURE__ */ jsx12(
743
1094
  "a",
744
1095
  {
745
1096
  href: githubUrl,
746
1097
  target: "_blank",
747
1098
  rel: "noopener noreferrer",
748
1099
  className: "text-gray-700 dark:text-gray-300 hover:text-primary-600 dark:hover:text-primary-400 transition-colors",
749
- children: /* @__PURE__ */ jsx10(GitHubIcon2, {})
1100
+ children: /* @__PURE__ */ jsx12(GitHubIcon2, {})
750
1101
  }
751
1102
  )
752
1103
  ] })
@@ -754,19 +1105,19 @@ function HomeHeader({ renderLogo } = {}) {
754
1105
  }
755
1106
  function HomeHero() {
756
1107
  const { title, tagline, description, ctaText, ctaHref, installCommand, heroLogoUrl } = useHomePage();
757
- return /* @__PURE__ */ jsx10("section", { className: "pt-16", children: /* @__PURE__ */ jsx10("div", { className: "px-4 lg:px-10 py-16 lg:py-24", children: /* @__PURE__ */ jsxs6("div", { className: "max-w-4xl", children: [
758
- /* @__PURE__ */ jsx10("div", { className: "mb-4 text-sm font-mono uppercase tracking-widest text-gray-500 dark:text-gray-400", children: tagline }),
759
- heroLogoUrl ? /* @__PURE__ */ jsx10("h1", { className: "mb-6 lg:mb-8", children: /* @__PURE__ */ jsx10(
1108
+ return /* @__PURE__ */ jsx12("section", { className: "pt-16", children: /* @__PURE__ */ jsx12("div", { className: "px-4 lg:px-10 py-16 lg:py-24", children: /* @__PURE__ */ jsxs8("div", { className: "max-w-4xl", children: [
1109
+ /* @__PURE__ */ jsx12("div", { className: "mb-4 text-sm font-mono uppercase tracking-widest text-gray-500 dark:text-gray-400", children: tagline }),
1110
+ heroLogoUrl ? /* @__PURE__ */ jsx12("h1", { className: "mb-6 lg:mb-8", children: /* @__PURE__ */ jsx12(
760
1111
  "img",
761
1112
  {
762
1113
  src: heroLogoUrl,
763
1114
  alt: title,
764
1115
  className: "h-auto w-auto max-w-[580px]"
765
1116
  }
766
- ) }) : /* @__PURE__ */ jsx10("h1", { className: "text-5xl lg:text-7xl font-bold tracking-tight mb-6 text-gray-900 dark:text-white", children: title }),
767
- /* @__PURE__ */ jsx10("p", { className: "text-xl lg:text-2xl text-gray-600 dark:text-gray-300 max-w-2xl leading-relaxed mb-8", children: description }),
768
- /* @__PURE__ */ jsxs6("div", { className: "flex flex-col sm:flex-row gap-3", children: [
769
- /* @__PURE__ */ jsx10(
1117
+ ) }) : /* @__PURE__ */ jsx12("h1", { className: "text-5xl lg:text-7xl font-bold tracking-tight mb-6 text-gray-900 dark:text-white", children: title }),
1118
+ /* @__PURE__ */ jsx12("p", { className: "text-xl lg:text-2xl text-gray-600 dark:text-gray-300 max-w-2xl leading-relaxed mb-8", children: description }),
1119
+ /* @__PURE__ */ jsxs8("div", { className: "flex flex-col sm:flex-row gap-3", children: [
1120
+ /* @__PURE__ */ jsx12(
770
1121
  Link3,
771
1122
  {
772
1123
  href: ctaHref,
@@ -774,19 +1125,19 @@ function HomeHero() {
774
1125
  children: ctaText
775
1126
  }
776
1127
  ),
777
- installCommand && /* @__PURE__ */ jsx10(InstallCommand, { command: installCommand })
1128
+ installCommand && /* @__PURE__ */ jsx12(InstallCommand, { command: installCommand })
778
1129
  ] })
779
1130
  ] }) }) });
780
1131
  }
781
1132
  function HomeFeatureItem({ feature, index, totalFeatures }) {
782
- return /* @__PURE__ */ jsxs6(
1133
+ return /* @__PURE__ */ jsxs8(
783
1134
  "div",
784
1135
  {
785
1136
  className: `p-4 lg:p-10 border-b sm:border-b border-gray-200 dark:border-gray-800 ${index % 2 === 0 ? "sm:border-r" : ""} ${index >= totalFeatures - 2 ? "sm:border-b-0" : ""} ${index === totalFeatures - 1 && totalFeatures % 2 === 1 ? "border-b-0" : ""} transition-colors`,
786
1137
  children: [
787
- /* @__PURE__ */ jsx10("div", { className: "text-5xl font-bold text-primary-500 dark:text-primary-400 mb-4", children: String(index + 1).padStart(2, "0") }),
788
- /* @__PURE__ */ jsx10("h3", { className: "text-xl font-bold mb-2 text-gray-900 dark:text-white", children: feature.title }),
789
- /* @__PURE__ */ jsx10("p", { className: "text-gray-600 dark:text-gray-300", children: feature.description })
1138
+ /* @__PURE__ */ jsx12("div", { className: "text-5xl font-bold text-primary-500 dark:text-primary-400 mb-4", children: String(index + 1).padStart(2, "0") }),
1139
+ /* @__PURE__ */ jsx12("h3", { className: "text-xl font-bold mb-2 text-gray-900 dark:text-white", children: feature.title }),
1140
+ /* @__PURE__ */ jsx12("p", { className: "text-gray-600 dark:text-gray-300", children: feature.description })
790
1141
  ]
791
1142
  }
792
1143
  );
@@ -796,17 +1147,17 @@ function HomeFeatures({ renderFeature } = {}) {
796
1147
  if (features.length === 0) {
797
1148
  return null;
798
1149
  }
799
- return /* @__PURE__ */ jsx10("section", { className: "border-t border-gray-200 dark:border-gray-800 transition-colors", children: /* @__PURE__ */ jsxs6("div", { className: "grid grid-cols-12", children: [
800
- /* @__PURE__ */ jsxs6("div", { className: "col-span-12 lg:col-span-4 p-4 lg:p-10 border-b lg:border-b-0 lg:border-r border-gray-200 dark:border-gray-800 transition-colors", children: [
801
- /* @__PURE__ */ jsx10("div", { className: "text-sm font-mono uppercase tracking-widest text-gray-500 dark:text-gray-400 mb-4", children: "Features" }),
802
- /* @__PURE__ */ jsxs6("h2", { className: "text-4xl lg:text-5xl font-bold tracking-tight text-gray-900 dark:text-white", children: [
1150
+ return /* @__PURE__ */ jsx12("section", { className: "border-t border-gray-200 dark:border-gray-800 transition-colors", children: /* @__PURE__ */ jsxs8("div", { className: "grid grid-cols-12", children: [
1151
+ /* @__PURE__ */ jsxs8("div", { className: "col-span-12 lg:col-span-4 p-4 lg:p-10 border-b lg:border-b-0 lg:border-r border-gray-200 dark:border-gray-800 transition-colors", children: [
1152
+ /* @__PURE__ */ jsx12("div", { className: "text-sm font-mono uppercase tracking-widest text-gray-500 dark:text-gray-400 mb-4", children: "Features" }),
1153
+ /* @__PURE__ */ jsxs8("h2", { className: "text-4xl lg:text-5xl font-bold tracking-tight text-gray-900 dark:text-white", children: [
803
1154
  "Why ",
804
1155
  title,
805
1156
  "?"
806
1157
  ] })
807
1158
  ] }),
808
- /* @__PURE__ */ jsx10("div", { className: "col-span-12 lg:col-span-8 grid grid-cols-1 sm:grid-cols-2", children: features.map(
809
- (feature, index) => renderFeature ? /* @__PURE__ */ jsx10("div", { children: renderFeature(feature, index, HomeFeatureItem) }, index) : /* @__PURE__ */ jsx10(
1159
+ /* @__PURE__ */ jsx12("div", { className: "col-span-12 lg:col-span-8 grid grid-cols-1 sm:grid-cols-2", children: features.map(
1160
+ (feature, index) => renderFeature ? /* @__PURE__ */ jsx12("div", { children: renderFeature(feature, index, HomeFeatureItem) }, index) : /* @__PURE__ */ jsx12(
810
1161
  HomeFeatureItem,
811
1162
  {
812
1163
  feature,
@@ -820,11 +1171,11 @@ function HomeFeatures({ renderFeature } = {}) {
820
1171
  }
821
1172
  function HomeCTA() {
822
1173
  const { ctaHref } = useHomePage();
823
- return /* @__PURE__ */ jsx10("section", { className: "border-t border-gray-200 dark:border-gray-800 transition-colors", children: /* @__PURE__ */ jsxs6("div", { className: "grid grid-cols-12 items-center", children: [
824
- /* @__PURE__ */ jsxs6("div", { className: "col-span-12 lg:col-span-8 p-4 lg:p-10", children: [
825
- /* @__PURE__ */ jsx10("h2", { className: "text-4xl lg:text-6xl font-bold tracking-tight mb-4 text-gray-900 dark:text-white", children: "Ready to start?" }),
826
- /* @__PURE__ */ jsx10("p", { className: "text-xl text-gray-600 dark:text-gray-300 mb-8 max-w-2xl", children: "Get up and running in minutes. Check out our documentation to learn more." }),
827
- /* @__PURE__ */ jsx10(
1174
+ return /* @__PURE__ */ jsx12("section", { className: "border-t border-gray-200 dark:border-gray-800 transition-colors", children: /* @__PURE__ */ jsxs8("div", { className: "grid grid-cols-12 items-center", children: [
1175
+ /* @__PURE__ */ jsxs8("div", { className: "col-span-12 lg:col-span-8 p-4 lg:p-10", children: [
1176
+ /* @__PURE__ */ jsx12("h2", { className: "text-4xl lg:text-6xl font-bold tracking-tight mb-4 text-gray-900 dark:text-white", children: "Ready to start?" }),
1177
+ /* @__PURE__ */ jsx12("p", { className: "text-xl text-gray-600 dark:text-gray-300 mb-8 max-w-2xl", children: "Get up and running in minutes. Check out our documentation to learn more." }),
1178
+ /* @__PURE__ */ jsx12(
828
1179
  Link3,
829
1180
  {
830
1181
  href: ctaHref,
@@ -833,12 +1184,12 @@ function HomeCTA() {
833
1184
  }
834
1185
  )
835
1186
  ] }),
836
- /* @__PURE__ */ jsx10(
1187
+ /* @__PURE__ */ jsx12(
837
1188
  Link3,
838
1189
  {
839
1190
  href: ctaHref,
840
1191
  className: "col-span-12 lg:col-span-4 h-full bg-primary-500 hidden lg:flex items-center justify-center p-4 lg:p-10 hover:bg-gray-900 dark:hover:bg-white transition-colors min-h-[200px] group",
841
- children: /* @__PURE__ */ jsx10("div", { className: "text-white group-hover:text-white dark:group-hover:text-gray-900 text-8xl font-bold transition-colors", children: "\u2192" })
1192
+ children: /* @__PURE__ */ jsx12("div", { className: "text-white group-hover:text-white dark:group-hover:text-gray-900 text-8xl font-bold transition-colors", children: "\u2192" })
842
1193
  }
843
1194
  )
844
1195
  ] }) });
@@ -847,11 +1198,11 @@ function HomeFooter() {
847
1198
  const { title, logoUrl, footerLogoUrl, footerLogoInvertedUrl, navLinks, githubUrl } = useHomePage();
848
1199
  const { resolvedTheme } = useTheme();
849
1200
  const currentLogoUrl = resolvedTheme === "dark" ? footerLogoInvertedUrl || footerLogoUrl || logoUrl : footerLogoUrl || logoUrl;
850
- return /* @__PURE__ */ jsx10("footer", { className: "border-t border-gray-200 dark:border-gray-800 py-8 bg-white dark:bg-[#0f0f0f] transition-colors", children: /* @__PURE__ */ jsxs6("div", { className: "px-4 lg:px-10 flex flex-col md:flex-row justify-between items-center gap-6", children: [
851
- currentLogoUrl && /* @__PURE__ */ jsx10(Link3, { href: "/", children: /* @__PURE__ */ jsx10("img", { src: currentLogoUrl, alt: title, className: "h-6" }) }),
852
- /* @__PURE__ */ jsxs6("div", { className: "flex gap-8 text-sm text-gray-600 dark:text-gray-300", children: [
853
- navLinks.map((link) => /* @__PURE__ */ jsx10(Link3, { href: link.href, className: "hover:text-black dark:hover:text-white transition-colors", children: link.label }, link.href)),
854
- githubUrl && /* @__PURE__ */ jsx10(
1201
+ return /* @__PURE__ */ jsx12("footer", { className: "border-t border-gray-200 dark:border-gray-800 py-8 bg-white dark:bg-[#0f0f0f] transition-colors", children: /* @__PURE__ */ jsxs8("div", { className: "px-4 lg:px-10 flex flex-col md:flex-row justify-between items-center gap-6", children: [
1202
+ currentLogoUrl && /* @__PURE__ */ jsx12(Link3, { href: "/", children: /* @__PURE__ */ jsx12("img", { src: currentLogoUrl, alt: title, className: "h-6" }) }),
1203
+ /* @__PURE__ */ jsxs8("div", { className: "flex gap-8 text-sm text-gray-600 dark:text-gray-300", children: [
1204
+ navLinks.map((link) => /* @__PURE__ */ jsx12(Link3, { href: link.href, className: "hover:text-black dark:hover:text-white transition-colors", children: link.label }, link.href)),
1205
+ githubUrl && /* @__PURE__ */ jsx12(
855
1206
  "a",
856
1207
  {
857
1208
  href: githubUrl,
@@ -865,7 +1216,7 @@ function HomeFooter() {
865
1216
  ] }) });
866
1217
  }
867
1218
  function HomeSpacer() {
868
- return /* @__PURE__ */ jsx10(
1219
+ return /* @__PURE__ */ jsx12(
869
1220
  "div",
870
1221
  {
871
1222
  className: "grow dark:hidden",
@@ -874,7 +1225,7 @@ function HomeSpacer() {
874
1225
  );
875
1226
  }
876
1227
  function HomeSpacerDark() {
877
- return /* @__PURE__ */ jsx10(
1228
+ return /* @__PURE__ */ jsx12(
878
1229
  "div",
879
1230
  {
880
1231
  className: "grow hidden dark:block",
@@ -883,14 +1234,14 @@ function HomeSpacerDark() {
883
1234
  );
884
1235
  }
885
1236
  function DefaultHomeLayout() {
886
- return /* @__PURE__ */ jsxs6(Fragment2, { children: [
887
- /* @__PURE__ */ jsx10(HomeHeader, {}),
888
- /* @__PURE__ */ jsx10(HomeHero, {}),
889
- /* @__PURE__ */ jsx10(HomeFeatures, {}),
890
- /* @__PURE__ */ jsx10(HomeCTA, {}),
891
- /* @__PURE__ */ jsx10(HomeSpacer, {}),
892
- /* @__PURE__ */ jsx10(HomeSpacerDark, {}),
893
- /* @__PURE__ */ jsx10(HomeFooter, {})
1237
+ return /* @__PURE__ */ jsxs8(Fragment2, { children: [
1238
+ /* @__PURE__ */ jsx12(HomeHeader, {}),
1239
+ /* @__PURE__ */ jsx12(HomeHero, {}),
1240
+ /* @__PURE__ */ jsx12(HomeFeatures, {}),
1241
+ /* @__PURE__ */ jsx12(HomeCTA, {}),
1242
+ /* @__PURE__ */ jsx12(HomeSpacer, {}),
1243
+ /* @__PURE__ */ jsx12(HomeSpacerDark, {}),
1244
+ /* @__PURE__ */ jsx12(HomeFooter, {})
894
1245
  ] });
895
1246
  }
896
1247
  function HomePage({
@@ -902,9 +1253,9 @@ function HomePage({
902
1253
  ...props,
903
1254
  navLinks
904
1255
  };
905
- return /* @__PURE__ */ jsx10(HomePageContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs6("div", { className: "min-h-screen bg-white dark:bg-[#0f0f0f] flex flex-col transition-colors duration-200", children: [
906
- /* @__PURE__ */ jsx10(Head2, { title: props.title }),
907
- children || /* @__PURE__ */ jsx10(DefaultHomeLayout, {})
1256
+ return /* @__PURE__ */ jsx12(HomePageContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs8("div", { className: "min-h-screen bg-white dark:bg-[#0f0f0f] flex flex-col transition-colors duration-200", children: [
1257
+ /* @__PURE__ */ jsx12(Head2, { title: props.title }),
1258
+ children || /* @__PURE__ */ jsx12(DefaultHomeLayout, {})
908
1259
  ] }) });
909
1260
  }
910
1261
  HomePage.Header = HomeHeader;
@@ -917,7 +1268,7 @@ HomePage.Footer = HomeFooter;
917
1268
  // src/app.tsx
918
1269
  import { createInertiaApp } from "@inertiajs/react";
919
1270
  import { createRoot, hydrateRoot } from "react-dom/client";
920
- import { jsx as jsx11 } from "react/jsx-runtime";
1271
+ import { jsx as jsx13 } from "react/jsx-runtime";
921
1272
  function createDocsApp(config) {
922
1273
  const { pages, title, components } = config;
923
1274
  if (typeof window !== "undefined") {
@@ -934,7 +1285,7 @@ function createDocsApp(config) {
934
1285
  return page;
935
1286
  },
936
1287
  setup({ el, App, props }) {
937
- const appElement = /* @__PURE__ */ jsx11(ThemeProvider, { children: /* @__PURE__ */ jsx11(ComponentsProvider, { components, children: /* @__PURE__ */ jsx11(App, { ...props }) }) });
1288
+ const appElement = /* @__PURE__ */ jsx13(ThemeProvider, { children: /* @__PURE__ */ jsx13(ComponentsProvider, { components, children: /* @__PURE__ */ jsx13(App, { ...props }) }) });
938
1289
  if (el.hasChildNodes()) {
939
1290
  hydrateRoot(el, appElement);
940
1291
  } else {
@@ -945,6 +1296,7 @@ function createDocsApp(config) {
945
1296
  }
946
1297
  export {
947
1298
  CodeBlock,
1299
+ DocSetSelector,
948
1300
  DocsLayout,
949
1301
  DocsPage,
950
1302
  EmojiConfetti,
@@ -958,6 +1310,7 @@ export {
958
1310
  InlineCode,
959
1311
  Markdown,
960
1312
  Sidebar,
1313
+ TableOfContents,
961
1314
  ThemeProvider,
962
1315
  ThemeToggle,
963
1316
  cn,