@usecross/docs 0.5.0 → 0.6.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
@@ -119,21 +119,21 @@ function InlineCode({ children }) {
119
119
 
120
120
  // src/components/DocsLayout.tsx
121
121
  import { Head, Link as Link2, usePage } from "@inertiajs/react";
122
- import { useState as useState2 } from "react";
122
+ import { useState as useState4 } from "react";
123
123
 
124
124
  // src/components/Sidebar.tsx
125
125
  import { Link } from "@inertiajs/react";
126
126
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
127
127
  function Sidebar({ nav, currentPath, className }) {
128
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", children: section.title }),
130
- /* @__PURE__ */ jsx2("ul", { className: "space-y-1 border-l-2 border-gray-200", children: section.items.map((item) => /* @__PURE__ */ jsx2("li", { children: /* @__PURE__ */ jsx2(
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
131
  Link,
132
132
  {
133
133
  href: item.href,
134
134
  className: cn(
135
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-black font-bold" : "border-transparent text-gray-600 hover:border-black hover:text-black"
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
137
  ),
138
138
  children: item.title
139
139
  }
@@ -141,24 +141,258 @@ function Sidebar({ nav, currentPath, className }) {
141
141
  ] }, section.title)) });
142
142
  }
143
143
 
144
+ // src/components/ThemeToggle.tsx
145
+ import { useState as useState3, useRef, useEffect as useEffect3 } from "react";
146
+
147
+ // 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";
150
+ var ThemeContext = createContext(null);
151
+ var STORAGE_KEY = "cross-docs-theme";
152
+ function getSystemTheme() {
153
+ if (typeof window === "undefined") return "light";
154
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
155
+ }
156
+ function getStoredTheme() {
157
+ if (typeof window === "undefined") return null;
158
+ const stored = localStorage.getItem(STORAGE_KEY);
159
+ if (stored === "light" || stored === "dark" || stored === "system") {
160
+ return stored;
161
+ }
162
+ return null;
163
+ }
164
+ function ThemeProvider({
165
+ children,
166
+ defaultTheme: defaultTheme2 = "system",
167
+ forcedTheme
168
+ }) {
169
+ const [theme, setThemeState] = useState2(() => {
170
+ if (typeof window === "undefined") return defaultTheme2;
171
+ return getStoredTheme() ?? defaultTheme2;
172
+ });
173
+ const [resolvedTheme, setResolvedTheme] = useState2(() => {
174
+ if (forcedTheme) return forcedTheme;
175
+ if (typeof window === "undefined") return "light";
176
+ if (theme === "system") return getSystemTheme();
177
+ return theme;
178
+ });
179
+ useEffect2(() => {
180
+ if (forcedTheme) {
181
+ setResolvedTheme(forcedTheme);
182
+ return;
183
+ }
184
+ const updateResolvedTheme = () => {
185
+ if (theme === "system") {
186
+ setResolvedTheme(getSystemTheme());
187
+ } else {
188
+ setResolvedTheme(theme);
189
+ }
190
+ };
191
+ updateResolvedTheme();
192
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
193
+ const handleChange = () => {
194
+ if (theme === "system") {
195
+ setResolvedTheme(getSystemTheme());
196
+ }
197
+ };
198
+ mediaQuery.addEventListener("change", handleChange);
199
+ return () => mediaQuery.removeEventListener("change", handleChange);
200
+ }, [theme, forcedTheme]);
201
+ useEffect2(() => {
202
+ const root = document.documentElement;
203
+ root.classList.remove("light", "dark");
204
+ root.classList.add(resolvedTheme);
205
+ }, [resolvedTheme]);
206
+ const setTheme = (newTheme) => {
207
+ setThemeState(newTheme);
208
+ localStorage.setItem(STORAGE_KEY, newTheme);
209
+ };
210
+ return /* @__PURE__ */ jsx3(ThemeContext.Provider, { value: { theme, resolvedTheme, setTheme }, children });
211
+ }
212
+ function useTheme() {
213
+ const context = useContext(ThemeContext);
214
+ if (!context) {
215
+ throw new Error("useTheme must be used within a ThemeProvider");
216
+ }
217
+ return context;
218
+ }
219
+ var themeInitScript = `
220
+ (function() {
221
+ try {
222
+ var stored = localStorage.getItem('${STORAGE_KEY}');
223
+ var theme = stored === 'light' || stored === 'dark' ? stored :
224
+ (stored === 'system' || !stored) && window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
225
+ document.documentElement.classList.add(theme);
226
+ } catch (e) {}
227
+ })();
228
+ `.trim();
229
+
230
+ // 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" })
235
+ ] });
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" })
240
+ ] });
241
+ var themeOptions = [
242
+ { value: "light", label: "Light", icon: SunIcon },
243
+ { value: "dark", label: "Dark", icon: MoonIcon },
244
+ { value: "system", label: "System", icon: MonitorIcon }
245
+ ];
246
+ function ThemeToggle({ className, size = "md" }) {
247
+ const { theme, resolvedTheme, setTheme } = useTheme();
248
+ const [isOpen, setIsOpen] = useState3(false);
249
+ const dropdownRef = useRef(null);
250
+ useEffect3(() => {
251
+ const handleClickOutside = (event) => {
252
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
253
+ setIsOpen(false);
254
+ }
255
+ };
256
+ if (isOpen) {
257
+ document.addEventListener("mousedown", handleClickOutside);
258
+ return () => document.removeEventListener("mousedown", handleClickOutside);
259
+ }
260
+ }, [isOpen]);
261
+ useEffect3(() => {
262
+ const handleEscape = (event) => {
263
+ if (event.key === "Escape") setIsOpen(false);
264
+ };
265
+ if (isOpen) {
266
+ document.addEventListener("keydown", handleEscape);
267
+ return () => document.removeEventListener("keydown", handleEscape);
268
+ }
269
+ }, [isOpen]);
270
+ const iconSizes = {
271
+ sm: "w-[18px] h-[18px]",
272
+ md: "w-5 h-5",
273
+ lg: "w-[22px] h-[22px]"
274
+ };
275
+ return /* @__PURE__ */ jsxs3("div", { className: "relative", ref: dropdownRef, children: [
276
+ /* @__PURE__ */ jsxs3(
277
+ "button",
278
+ {
279
+ onClick: () => setIsOpen(!isOpen),
280
+ className: cn(
281
+ "relative inline-flex items-center justify-center",
282
+ "rounded-full p-4",
283
+ "text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white",
284
+ "hover:bg-gray-100 dark:hover:bg-white/10",
285
+ "transition-all duration-200 ease-out",
286
+ "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/50 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-[#0f0f0f]",
287
+ iconSizes[size],
288
+ className
289
+ ),
290
+ "aria-label": "Toggle theme",
291
+ "aria-expanded": isOpen,
292
+ "aria-haspopup": "listbox",
293
+ children: [
294
+ /* @__PURE__ */ jsx4(
295
+ SunIcon,
296
+ {
297
+ className: cn(
298
+ iconSizes[size],
299
+ "absolute inset-0 m-auto transition-all duration-300 ease-out",
300
+ resolvedTheme === "light" ? "rotate-0 scale-100 opacity-100" : "rotate-90 scale-75 opacity-0"
301
+ )
302
+ }
303
+ ),
304
+ /* @__PURE__ */ jsx4(
305
+ MoonIcon,
306
+ {
307
+ className: cn(
308
+ iconSizes[size],
309
+ "absolute inset-0 m-auto transition-all duration-300 ease-out",
310
+ resolvedTheme === "dark" ? "rotate-0 scale-100 opacity-100" : "-rotate-90 scale-75 opacity-0"
311
+ )
312
+ }
313
+ )
314
+ ]
315
+ }
316
+ ),
317
+ /* @__PURE__ */ jsx4(
318
+ "div",
319
+ {
320
+ className: cn(
321
+ "absolute right-0 mt-2 min-w-[140px]",
322
+ "p-1",
323
+ "bg-white dark:bg-[#171717]",
324
+ "border border-gray-200 dark:border-[#262626]",
325
+ "rounded-xl",
326
+ "shadow-lg shadow-black/5 dark:shadow-black/40",
327
+ "z-50",
328
+ "transition-all duration-200 ease-out origin-top-right",
329
+ isOpen ? "opacity-100 scale-100 translate-y-0" : "opacity-0 scale-95 -translate-y-1 pointer-events-none"
330
+ ),
331
+ role: "listbox",
332
+ "aria-label": "Select theme",
333
+ children: themeOptions.map((option, index) => {
334
+ const Icon = option.icon;
335
+ const isSelected = theme === option.value;
336
+ return /* @__PURE__ */ jsxs3(
337
+ "button",
338
+ {
339
+ onClick: () => {
340
+ setTheme(option.value);
341
+ setIsOpen(false);
342
+ },
343
+ className: cn(
344
+ "w-full flex items-center gap-2.5 px-3 py-2",
345
+ "rounded-lg",
346
+ "text-[13px] font-medium",
347
+ "transition-all duration-150 ease-out",
348
+ "focus:outline-none",
349
+ isSelected ? "text-gray-900 dark:text-white bg-gray-100 dark:bg-[#262626]" : "text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-50 dark:hover:bg-[#1f1f1f]"
350
+ ),
351
+ role: "option",
352
+ "aria-selected": isSelected,
353
+ style: {
354
+ animationDelay: isOpen ? `${index * 25}ms` : "0ms"
355
+ },
356
+ children: [
357
+ /* @__PURE__ */ jsx4(Icon, { className: cn(
358
+ "w-4 h-4 flex-shrink-0",
359
+ "transition-transform duration-150",
360
+ isSelected ? "scale-110" : "scale-100"
361
+ ) }),
362
+ /* @__PURE__ */ jsx4("span", { className: "flex-1 text-left", children: option.label }),
363
+ /* @__PURE__ */ jsx4("div", { className: cn(
364
+ "w-1.5 h-1.5 rounded-full",
365
+ "transition-all duration-200",
366
+ isSelected ? "bg-primary-500 scale-100 opacity-100" : "bg-transparent scale-0 opacity-0"
367
+ ) })
368
+ ]
369
+ },
370
+ option.value
371
+ );
372
+ })
373
+ }
374
+ )
375
+ ] });
376
+ }
377
+
144
378
  // src/components/DocsLayout.tsx
145
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
379
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
146
380
  function MobileMenuButton({ onClick, isOpen }) {
147
- return /* @__PURE__ */ jsxs3(
381
+ return /* @__PURE__ */ jsxs4(
148
382
  "button",
149
383
  {
150
384
  onClick,
151
- className: "inline-flex items-center justify-center p-2 -ml-2 text-black hover:text-primary-500 lg:hidden",
385
+ 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",
152
386
  "aria-expanded": isOpen,
153
387
  children: [
154
- /* @__PURE__ */ jsx3("span", { className: "sr-only", children: isOpen ? "Close menu" : "Open menu" }),
155
- isOpen ? /* @__PURE__ */ jsx3("svg", { className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx3("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) : /* @__PURE__ */ jsx3("svg", { className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx3("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 12h16M4 18h16" }) })
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" }) })
156
390
  ]
157
391
  }
158
392
  );
159
393
  }
160
394
  function GitHubIcon() {
161
- return /* @__PURE__ */ jsx3("svg", { className: "w-6 h-6", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx3(
395
+ return /* @__PURE__ */ jsx5("svg", { className: "w-6 h-6", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx5(
162
396
  "path",
163
397
  {
164
398
  fillRule: "evenodd",
@@ -181,62 +415,66 @@ function DocsLayout({
181
415
  }) {
182
416
  const sharedProps = usePage().props;
183
417
  const { nav, currentPath } = sharedProps;
184
- const [mobileMenuOpen, setMobileMenuOpen] = useState2(false);
418
+ const [mobileMenuOpen, setMobileMenuOpen] = useState4(false);
419
+ const { resolvedTheme } = useTheme();
185
420
  const logoUrl = propLogoUrl ?? sharedProps.logoUrl;
186
421
  const logoInvertedUrl = propLogoInvertedUrl ?? sharedProps.logoInvertedUrl;
187
422
  const githubUrl = propGithubUrl ?? sharedProps.githubUrl;
188
423
  const navLinks = propNavLinks ?? sharedProps.navLinks ?? [];
189
- const headerLogo = logoInverted || logo || (logoInvertedUrl ? /* @__PURE__ */ jsx3("img", { src: logoInvertedUrl, alt: "Logo", className: "h-8" }) : logoUrl ? /* @__PURE__ */ jsx3("img", { src: logoUrl, alt: "Logo", className: "h-8" }) : null);
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);
190
425
  const footerLogoUrl = sharedProps.footerLogoUrl || logoUrl;
191
- const footerLogo = logo || (footerLogoUrl ? /* @__PURE__ */ jsx3("img", { src: footerLogoUrl, alt: "Logo", className: "h-6" }) : null);
192
- return /* @__PURE__ */ jsxs3("div", { className: "min-h-screen bg-white flex flex-col", children: [
193
- /* @__PURE__ */ jsx3(Head, { title }),
194
- /* @__PURE__ */ jsx3("nav", { className: "fixed w-full z-50 bg-white border-b border-gray-200", children: /* @__PURE__ */ jsx3("div", { className: "px-4 lg:px-10", children: /* @__PURE__ */ jsxs3("div", { className: "flex justify-between h-16 items-center", children: [
195
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2", children: [
196
- /* @__PURE__ */ jsx3(MobileMenuButton, { onClick: () => setMobileMenuOpen(!mobileMenuOpen), isOpen: mobileMenuOpen }),
197
- headerLogo ? /* @__PURE__ */ jsx3(Link2, { href: "/", className: "flex items-center", children: headerLogo }) : /* @__PURE__ */ jsx3(Link2, { href: "/", className: "font-bold text-lg", children: "Docs" })
426
+ const footerLogoInvertedUrl = sharedProps.footerLogoInvertedUrl || logoInvertedUrl;
427
+ 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" })
198
435
  ] }),
199
- /* @__PURE__ */ jsxs3("div", { className: "flex items-center space-x-8", children: [
200
- navLinks.map((link) => /* @__PURE__ */ jsx3(
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(
201
439
  Link2,
202
440
  {
203
441
  href: link.href,
204
- className: "text-black font-medium hover:text-primary-500 transition-colors",
442
+ className: "hidden sm:block text-gray-700 dark:text-gray-300 font-medium hover:text-primary-600 dark:hover:text-primary-400 transition-colors",
205
443
  children: link.label
206
444
  },
207
445
  link.href
208
446
  )),
209
- githubUrl && /* @__PURE__ */ jsx3(
447
+ githubUrl && /* @__PURE__ */ jsx5(
210
448
  "a",
211
449
  {
212
450
  href: githubUrl,
213
451
  target: "_blank",
214
452
  rel: "noopener noreferrer",
215
- className: "text-black hover:text-primary-500 transition-colors",
216
- children: /* @__PURE__ */ jsx3(GitHubIcon, {})
453
+ className: "text-gray-700 dark:text-gray-300 hover:text-primary-600 dark:hover:text-primary-400 transition-colors",
454
+ children: /* @__PURE__ */ jsx5(GitHubIcon, {})
217
455
  }
218
456
  )
219
457
  ] })
220
458
  ] }) }) }),
221
- mobileMenuOpen && /* @__PURE__ */ jsxs3("div", { className: "fixed inset-0 z-40 lg:hidden", children: [
222
- /* @__PURE__ */ jsx3("div", { className: "fixed inset-0 bg-black/50", onClick: () => setMobileMenuOpen(false) }),
223
- /* @__PURE__ */ jsx3("div", { className: "fixed inset-y-0 left-0 w-72 overflow-y-auto bg-white px-4 lg:px-10 py-6 pt-20 border-r border-gray-200", children: /* @__PURE__ */ jsx3(Sidebar, { nav, currentPath }) })
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 }) })
224
462
  ] }),
225
- /* @__PURE__ */ jsx3("div", { className: "bg-white pt-16 w-full flex-1", children: /* @__PURE__ */ jsxs3("div", { className: "grid grid-cols-12", children: [
226
- /* @__PURE__ */ jsx3("aside", { className: "hidden lg:block lg:col-span-3 xl:col-span-2 border-r border-gray-200 min-h-[calc(100vh-4rem)]", children: /* @__PURE__ */ jsx3("nav", { className: "sticky top-16 px-4 lg:px-10 py-6 max-h-[calc(100vh-4rem)] overflow-y-auto", children: /* @__PURE__ */ jsx3(Sidebar, { nav, currentPath }) }) }),
227
- /* @__PURE__ */ jsx3("main", { className: "col-span-12 lg:col-span-9 xl:col-span-10 p-4 lg:px-10 lg:py-6", children: /* @__PURE__ */ jsx3("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 prose-a:no-underline hover:prose-a:underline prose-code:bg-gray-100 prose-code:px-1.5 prose-code:py-0.5 prose-code:rounded prose-code:before:content-none prose-code:after:content-none", children }) })
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 }) })
228
466
  ] }) }),
229
- footer || /* @__PURE__ */ jsx3("footer", { className: "border-t border-gray-200 py-8", children: /* @__PURE__ */ jsxs3("div", { className: "px-4 lg:px-10 flex flex-col md:flex-row justify-between items-center gap-6", children: [
230
- footerLogo && /* @__PURE__ */ jsx3(Link2, { href: "/", children: footerLogo }),
231
- /* @__PURE__ */ jsxs3("div", { className: "flex gap-8 text-sm text-gray-600", children: [
232
- navLinks.map((link) => /* @__PURE__ */ jsx3(Link2, { href: link.href, className: "hover:text-black transition-colors", children: link.label }, link.href)),
233
- githubUrl && /* @__PURE__ */ jsx3(
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(
234
472
  "a",
235
473
  {
236
474
  href: githubUrl,
237
475
  target: "_blank",
238
476
  rel: "noopener noreferrer",
239
- className: "hover:text-black transition-colors",
477
+ className: "hover:text-black dark:hover:text-white transition-colors",
240
478
  children: "GitHub"
241
479
  }
242
480
  )
@@ -249,7 +487,7 @@ function DocsLayout({
249
487
  import ReactMarkdown from "react-markdown";
250
488
  import remarkGfm from "remark-gfm";
251
489
  import rehypeRaw from "rehype-raw";
252
- import { Fragment, jsx as jsx4 } from "react/jsx-runtime";
490
+ import { Fragment, jsx as jsx6 } from "react/jsx-runtime";
253
491
  function Markdown({ content, components }) {
254
492
  const lowercaseComponents = components ? Object.entries(components).reduce(
255
493
  (acc, [name, Component]) => {
@@ -258,7 +496,7 @@ function Markdown({ content, components }) {
258
496
  },
259
497
  {}
260
498
  ) : {};
261
- return /* @__PURE__ */ jsx4(
499
+ return /* @__PURE__ */ jsx6(
262
500
  ReactMarkdown,
263
501
  {
264
502
  remarkPlugins: [remarkGfm],
@@ -267,14 +505,14 @@ function Markdown({ content, components }) {
267
505
  ...lowercaseComponents,
268
506
  // Override pre to avoid double wrapping with CodeBlock
269
507
  pre({ children }) {
270
- return /* @__PURE__ */ jsx4(Fragment, { children });
508
+ return /* @__PURE__ */ jsx6(Fragment, { children });
271
509
  },
272
510
  // Custom code block rendering with syntax highlighting
273
511
  code({ node, className, children, ...props }) {
274
512
  const match = /language-(\w+)/.exec(className || "");
275
513
  const isInline = !match && !className;
276
514
  if (isInline) {
277
- return /* @__PURE__ */ jsx4(
515
+ return /* @__PURE__ */ jsx6(
278
516
  "code",
279
517
  {
280
518
  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",
@@ -287,7 +525,7 @@ function Markdown({ content, components }) {
287
525
  const titleMatch = /title="([^"]+)"/.exec(meta);
288
526
  const filename = titleMatch ? titleMatch[1] : void 0;
289
527
  const showLineNumbers = meta.includes("showLineNumbers");
290
- return /* @__PURE__ */ jsx4(
528
+ return /* @__PURE__ */ jsx6(
291
529
  CodeBlock,
292
530
  {
293
531
  code: String(children).replace(/\n$/, ""),
@@ -300,7 +538,7 @@ function Markdown({ content, components }) {
300
538
  // Custom link styling
301
539
  a({ href, children }) {
302
540
  const isExternal = href?.startsWith("http");
303
- return /* @__PURE__ */ jsx4(
541
+ return /* @__PURE__ */ jsx6(
304
542
  "a",
305
543
  {
306
544
  href,
@@ -312,13 +550,13 @@ function Markdown({ content, components }) {
312
550
  },
313
551
  // Tables
314
552
  table({ children }) {
315
- return /* @__PURE__ */ jsx4("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsx4("table", { className: "w-full text-left text-sm", children }) });
553
+ return /* @__PURE__ */ jsx6("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsx6("table", { className: "w-full text-left text-sm", children }) });
316
554
  },
317
555
  th({ children }) {
318
- return /* @__PURE__ */ jsx4("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 });
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 });
319
557
  },
320
558
  td({ children }) {
321
- return /* @__PURE__ */ jsx4("td", { className: "border-b border-gray-200 px-4 py-2 dark:border-gray-700", children });
559
+ return /* @__PURE__ */ jsx6("td", { className: "border-b border-gray-200 px-4 py-2 dark:border-gray-700", children });
322
560
  }
323
561
  },
324
562
  children: content
@@ -327,32 +565,32 @@ function Markdown({ content, components }) {
327
565
  }
328
566
 
329
567
  // src/context/ComponentsContext.tsx
330
- import { createContext, useContext } from "react";
331
- import { jsx as jsx5 } from "react/jsx-runtime";
332
- var ComponentsContext = createContext({});
568
+ import { createContext as createContext2, useContext as useContext2 } from "react";
569
+ import { jsx as jsx7 } from "react/jsx-runtime";
570
+ var ComponentsContext = createContext2({});
333
571
  function ComponentsProvider({
334
572
  children,
335
573
  components
336
574
  }) {
337
- return /* @__PURE__ */ jsx5(ComponentsContext.Provider, { value: { components }, children });
575
+ return /* @__PURE__ */ jsx7(ComponentsContext.Provider, { value: { components }, children });
338
576
  }
339
577
  function useComponents() {
340
- return useContext(ComponentsContext);
578
+ return useContext2(ComponentsContext);
341
579
  }
342
580
 
343
581
  // src/components/DocsPage.tsx
344
- import { jsx as jsx6 } from "react/jsx-runtime";
582
+ import { jsx as jsx8 } from "react/jsx-runtime";
345
583
  function DocsPage({ content, ...layoutProps }) {
346
584
  const { components } = useComponents();
347
- return /* @__PURE__ */ jsx6(DocsLayout, { title: content?.title ?? "", description: content?.description, ...layoutProps, children: /* @__PURE__ */ jsx6(Markdown, { content: content?.body ?? "", components }) });
585
+ return /* @__PURE__ */ jsx8(DocsLayout, { title: content?.title ?? "", description: content?.description, ...layoutProps, children: /* @__PURE__ */ jsx8(Markdown, { content: content?.body ?? "", components }) });
348
586
  }
349
587
 
350
588
  // src/components/EmojiConfetti.tsx
351
- import { useState as useState3, useCallback } from "react";
352
- import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
589
+ import { useState as useState5, useCallback } from "react";
590
+ import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
353
591
  function EmojiConfetti({ children, emoji }) {
354
- const [particles, setParticles] = useState3([]);
355
- const [isActive, setIsActive] = useState3(false);
592
+ const [particles, setParticles] = useState5([]);
593
+ const [isActive, setIsActive] = useState5(false);
356
594
  const triggerBurst = useCallback(() => {
357
595
  if (isActive) return;
358
596
  setIsActive(true);
@@ -379,17 +617,17 @@ function EmojiConfetti({ children, emoji }) {
379
617
  setIsActive(false);
380
618
  }, 1e3);
381
619
  }, [isActive]);
382
- return /* @__PURE__ */ jsxs4(
620
+ return /* @__PURE__ */ jsxs5(
383
621
  "span",
384
622
  {
385
623
  className: "relative inline-block",
386
624
  onMouseEnter: triggerBurst,
387
625
  children: [
388
626
  children,
389
- /* @__PURE__ */ jsx7("span", { className: "absolute inset-0 pointer-events-none overflow-visible", children: particles.map((p) => {
627
+ /* @__PURE__ */ jsx9("span", { className: "absolute inset-0 pointer-events-none overflow-visible", children: particles.map((p) => {
390
628
  const endX = p.x + Math.cos(p.angle) * p.velocity;
391
629
  const endY = p.y + Math.sin(p.angle) * p.velocity;
392
- return /* @__PURE__ */ jsx7(
630
+ return /* @__PURE__ */ jsx9(
393
631
  "span",
394
632
  {
395
633
  className: "absolute",
@@ -415,39 +653,39 @@ function EmojiConfetti({ children, emoji }) {
415
653
 
416
654
  // src/components/HomePage.tsx
417
655
  import { Head as Head2, Link as Link3 } from "@inertiajs/react";
418
- import { createContext as createContext2, useContext as useContext2, useState as useState4 } from "react";
419
- import { Fragment as Fragment2, jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
420
- var HomePageContext = createContext2(null);
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";
658
+ var HomePageContext = createContext3(null);
421
659
  function useHomePage() {
422
- const context = useContext2(HomePageContext);
660
+ const context = useContext3(HomePageContext);
423
661
  if (!context) {
424
662
  throw new Error("HomePage sub-components must be used within <HomePage>");
425
663
  }
426
664
  return context;
427
665
  }
428
666
  function InstallCommand({ command }) {
429
- const [copied, setCopied] = useState4(false);
667
+ const [copied, setCopied] = useState6(false);
430
668
  const copyToClipboard = async () => {
431
669
  await navigator.clipboard.writeText(command);
432
670
  setCopied(true);
433
671
  setTimeout(() => setCopied(false), 2e3);
434
672
  };
435
- return /* @__PURE__ */ jsxs5(
673
+ return /* @__PURE__ */ jsxs6(
436
674
  "button",
437
675
  {
438
676
  onClick: copyToClipboard,
439
- className: "group relative flex items-center bg-black border border-black px-4 h-14 font-mono text-sm text-white hover:bg-white hover:text-black transition-colors cursor-pointer",
677
+ 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",
440
678
  children: [
441
- /* @__PURE__ */ jsx8("span", { className: "text-primary-500 mr-2", children: "$" }),
442
- /* @__PURE__ */ jsx8("span", { children: command }),
443
- /* @__PURE__ */ jsx8(
679
+ /* @__PURE__ */ jsx10("span", { className: "text-primary-500 dark:text-primary-600 mr-2", children: "$" }),
680
+ /* @__PURE__ */ jsx10("span", { children: command }),
681
+ /* @__PURE__ */ jsx10(
444
682
  "svg",
445
683
  {
446
684
  className: `ml-4 w-4 h-4 transition ${copied ? "text-green-400" : "opacity-50 group-hover:opacity-100"}`,
447
685
  fill: "none",
448
686
  stroke: "currentColor",
449
687
  viewBox: "0 0 24 24",
450
- children: /* @__PURE__ */ jsx8(
688
+ children: /* @__PURE__ */ jsx10(
451
689
  "path",
452
690
  {
453
691
  strokeLinecap: "round",
@@ -458,10 +696,10 @@ function InstallCommand({ command }) {
458
696
  )
459
697
  }
460
698
  ),
461
- /* @__PURE__ */ jsx8(
699
+ /* @__PURE__ */ jsx10(
462
700
  "span",
463
701
  {
464
- className: `absolute -top-8 left-1/2 -translate-x-1/2 bg-black text-white text-xs py-1 px-2 rounded transition-opacity duration-300 whitespace-nowrap ${copied ? "opacity-100" : "opacity-0"}`,
702
+ 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"}`,
465
703
  children: "Copied!"
466
704
  }
467
705
  )
@@ -470,7 +708,7 @@ function InstallCommand({ command }) {
470
708
  );
471
709
  }
472
710
  function GitHubIcon2() {
473
- return /* @__PURE__ */ jsx8("svg", { className: "w-6 h-6", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx8(
711
+ return /* @__PURE__ */ jsx10("svg", { className: "w-6 h-6", fill: "currentColor", viewBox: "0 0 24 24", "aria-hidden": "true", children: /* @__PURE__ */ jsx10(
474
712
  "path",
475
713
  {
476
714
  fillRule: "evenodd",
@@ -482,32 +720,33 @@ function GitHubIcon2() {
482
720
  function DefaultLogo() {
483
721
  const { title, logoUrl } = useHomePage();
484
722
  if (logoUrl) {
485
- return /* @__PURE__ */ jsx8(Link3, { href: "/", className: "flex items-center", children: /* @__PURE__ */ jsx8("img", { src: logoUrl, alt: title, className: "h-8" }) });
723
+ return /* @__PURE__ */ jsx10(Link3, { href: "/", className: "flex items-center", children: /* @__PURE__ */ jsx10("img", { src: logoUrl, alt: title, className: "h-8" }) });
486
724
  }
487
- return /* @__PURE__ */ jsx8(Link3, { href: "/", className: "font-bold text-lg", children: title });
725
+ return /* @__PURE__ */ jsx10(Link3, { href: "/", className: "font-bold text-lg text-gray-900 dark:text-white", children: title });
488
726
  }
489
727
  function HomeHeader({ renderLogo } = {}) {
490
728
  const { navLinks, githubUrl } = useHomePage();
491
- return /* @__PURE__ */ jsx8("nav", { className: "fixed w-full z-50 bg-white border-b border-gray-200", children: /* @__PURE__ */ jsx8("div", { className: "px-4 lg:px-10", children: /* @__PURE__ */ jsxs5("div", { className: "flex justify-between h-16 items-center", children: [
492
- renderLogo ? renderLogo() : /* @__PURE__ */ jsx8(DefaultLogo, {}),
493
- /* @__PURE__ */ jsxs5("div", { className: "flex items-center space-x-8", children: [
494
- navLinks.map((link) => /* @__PURE__ */ jsx8(
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(
495
734
  Link3,
496
735
  {
497
736
  href: link.href,
498
- className: "text-black font-medium hover:text-primary-500 transition-colors",
737
+ className: "hidden sm:block text-gray-700 dark:text-gray-300 font-medium hover:text-primary-600 dark:hover:text-primary-400 transition-colors",
499
738
  children: link.label
500
739
  },
501
740
  link.href
502
741
  )),
503
- githubUrl && /* @__PURE__ */ jsx8(
742
+ githubUrl && /* @__PURE__ */ jsx10(
504
743
  "a",
505
744
  {
506
745
  href: githubUrl,
507
746
  target: "_blank",
508
747
  rel: "noopener noreferrer",
509
- className: "text-black hover:text-primary-500 transition-colors",
510
- children: /* @__PURE__ */ jsx8(GitHubIcon2, {})
748
+ className: "text-gray-700 dark:text-gray-300 hover:text-primary-600 dark:hover:text-primary-400 transition-colors",
749
+ children: /* @__PURE__ */ jsx10(GitHubIcon2, {})
511
750
  }
512
751
  )
513
752
  ] })
@@ -515,39 +754,39 @@ function HomeHeader({ renderLogo } = {}) {
515
754
  }
516
755
  function HomeHero() {
517
756
  const { title, tagline, description, ctaText, ctaHref, installCommand, heroLogoUrl } = useHomePage();
518
- return /* @__PURE__ */ jsx8("section", { className: "pt-16", children: /* @__PURE__ */ jsx8("div", { className: "px-4 lg:px-10 py-16 lg:py-24", children: /* @__PURE__ */ jsxs5("div", { className: "max-w-4xl", children: [
519
- /* @__PURE__ */ jsx8("div", { className: "mb-4 text-sm font-mono uppercase tracking-widest text-gray-500", children: tagline }),
520
- heroLogoUrl ? /* @__PURE__ */ jsx8("h1", { className: "mb-6 lg:mb-8", children: /* @__PURE__ */ jsx8(
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(
521
760
  "img",
522
761
  {
523
762
  src: heroLogoUrl,
524
763
  alt: title,
525
764
  className: "h-auto w-auto max-w-[580px]"
526
765
  }
527
- ) }) : /* @__PURE__ */ jsx8("h1", { className: "text-5xl lg:text-7xl font-bold tracking-tight mb-6", children: title }),
528
- /* @__PURE__ */ jsx8("p", { className: "text-xl lg:text-2xl text-gray-700 max-w-2xl leading-relaxed mb-8", children: description }),
529
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-col sm:flex-row gap-3", children: [
530
- /* @__PURE__ */ jsx8(
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(
531
770
  Link3,
532
771
  {
533
772
  href: ctaHref,
534
- className: "inline-flex items-center justify-center px-8 h-14 bg-black text-white font-bold text-lg hover:bg-primary-500 transition-colors border border-black",
773
+ className: "inline-flex items-center justify-center px-8 h-14 bg-gray-900 dark:bg-white text-white dark:text-gray-900 font-bold text-lg hover:bg-primary-500 dark:hover:bg-primary-500 dark:hover:text-white transition-colors border border-gray-900 dark:border-white hover:border-primary-500 dark:hover:border-primary-500",
535
774
  children: ctaText
536
775
  }
537
776
  ),
538
- installCommand && /* @__PURE__ */ jsx8(InstallCommand, { command: installCommand })
777
+ installCommand && /* @__PURE__ */ jsx10(InstallCommand, { command: installCommand })
539
778
  ] })
540
779
  ] }) }) });
541
780
  }
542
781
  function HomeFeatureItem({ feature, index, totalFeatures }) {
543
- return /* @__PURE__ */ jsxs5(
782
+ return /* @__PURE__ */ jsxs6(
544
783
  "div",
545
784
  {
546
- className: `p-4 lg:p-10 border-b sm:border-b border-gray-200 ${index % 2 === 0 ? "sm:border-r" : ""} ${index >= totalFeatures - 2 ? "sm:border-b-0" : ""} ${index === totalFeatures - 1 && totalFeatures % 2 === 1 ? "border-b-0" : ""}`,
785
+ 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`,
547
786
  children: [
548
- /* @__PURE__ */ jsx8("div", { className: "text-5xl font-bold text-primary-500 mb-4", children: String(index + 1).padStart(2, "0") }),
549
- /* @__PURE__ */ jsx8("h3", { className: "text-xl font-bold mb-2", children: feature.title }),
550
- /* @__PURE__ */ jsx8("p", { className: "text-gray-600", children: feature.description })
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 })
551
790
  ]
552
791
  }
553
792
  );
@@ -557,17 +796,17 @@ function HomeFeatures({ renderFeature } = {}) {
557
796
  if (features.length === 0) {
558
797
  return null;
559
798
  }
560
- return /* @__PURE__ */ jsx8("section", { className: "border-t border-gray-200", children: /* @__PURE__ */ jsxs5("div", { className: "grid grid-cols-12", children: [
561
- /* @__PURE__ */ jsxs5("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", children: [
562
- /* @__PURE__ */ jsx8("div", { className: "text-sm font-mono uppercase tracking-widest text-gray-500 mb-4", children: "Features" }),
563
- /* @__PURE__ */ jsxs5("h2", { className: "text-4xl lg:text-5xl font-bold tracking-tight", children: [
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: [
564
803
  "Why ",
565
804
  title,
566
805
  "?"
567
806
  ] })
568
807
  ] }),
569
- /* @__PURE__ */ jsx8("div", { className: "col-span-12 lg:col-span-8 grid grid-cols-1 sm:grid-cols-2", children: features.map(
570
- (feature, index) => renderFeature ? /* @__PURE__ */ jsx8("div", { children: renderFeature(feature, index, HomeFeatureItem) }, index) : /* @__PURE__ */ jsx8(
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(
571
810
  HomeFeatureItem,
572
811
  {
573
812
  feature,
@@ -581,42 +820,44 @@ function HomeFeatures({ renderFeature } = {}) {
581
820
  }
582
821
  function HomeCTA() {
583
822
  const { ctaHref } = useHomePage();
584
- return /* @__PURE__ */ jsx8("section", { className: "border-t border-gray-200", children: /* @__PURE__ */ jsxs5("div", { className: "grid grid-cols-12 items-center", children: [
585
- /* @__PURE__ */ jsxs5("div", { className: "col-span-12 lg:col-span-8 p-4 lg:p-10", children: [
586
- /* @__PURE__ */ jsx8("h2", { className: "text-4xl lg:text-6xl font-bold tracking-tight mb-4", children: "Ready to start?" }),
587
- /* @__PURE__ */ jsx8("p", { className: "text-xl text-gray-600 mb-8 max-w-2xl", children: "Get up and running in minutes. Check out our documentation to learn more." }),
588
- /* @__PURE__ */ jsx8(
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(
589
828
  Link3,
590
829
  {
591
830
  href: ctaHref,
592
- className: "inline-flex items-center justify-center px-8 py-4 bg-primary-500 text-white font-bold text-lg hover:bg-black transition-colors border border-primary-500 hover:border-black",
831
+ className: "inline-flex items-center justify-center px-8 py-4 bg-primary-500 text-white font-bold text-lg hover:bg-gray-900 dark:hover:bg-white dark:hover:text-gray-900 transition-colors border border-primary-500 hover:border-gray-900 dark:hover:border-white",
593
832
  children: "Read the Docs"
594
833
  }
595
834
  )
596
835
  ] }),
597
- /* @__PURE__ */ jsx8(
836
+ /* @__PURE__ */ jsx10(
598
837
  Link3,
599
838
  {
600
839
  href: ctaHref,
601
- 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-black transition-colors min-h-[200px]",
602
- children: /* @__PURE__ */ jsx8("div", { className: "text-white text-8xl font-bold", children: "\u2192" })
840
+ 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" })
603
842
  }
604
843
  )
605
844
  ] }) });
606
845
  }
607
846
  function HomeFooter() {
608
- const { title, logoUrl, footerLogoUrl, navLinks, githubUrl } = useHomePage();
609
- return /* @__PURE__ */ jsx8("footer", { className: "border-t border-gray-200 py-8", children: /* @__PURE__ */ jsxs5("div", { className: "px-4 lg:px-10 flex flex-col md:flex-row justify-between items-center gap-6", children: [
610
- (footerLogoUrl || logoUrl) && /* @__PURE__ */ jsx8(Link3, { href: "/", children: /* @__PURE__ */ jsx8("img", { src: footerLogoUrl || logoUrl, alt: title, className: "h-6" }) }),
611
- /* @__PURE__ */ jsxs5("div", { className: "flex gap-8 text-sm text-gray-600", children: [
612
- navLinks.map((link) => /* @__PURE__ */ jsx8(Link3, { href: link.href, className: "hover:text-black transition-colors", children: link.label }, link.href)),
613
- githubUrl && /* @__PURE__ */ jsx8(
847
+ const { title, logoUrl, footerLogoUrl, footerLogoInvertedUrl, navLinks, githubUrl } = useHomePage();
848
+ const { resolvedTheme } = useTheme();
849
+ 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(
614
855
  "a",
615
856
  {
616
857
  href: githubUrl,
617
858
  target: "_blank",
618
859
  rel: "noopener noreferrer",
619
- className: "hover:text-black transition-colors",
860
+ className: "hover:text-black dark:hover:text-white transition-colors",
620
861
  children: "GitHub"
621
862
  }
622
863
  )
@@ -624,22 +865,32 @@ function HomeFooter() {
624
865
  ] }) });
625
866
  }
626
867
  function HomeSpacer() {
627
- return /* @__PURE__ */ jsx8(
868
+ return /* @__PURE__ */ jsx10(
628
869
  "div",
629
870
  {
630
- className: "grow",
871
+ className: "grow dark:hidden",
631
872
  style: { backgroundImage: "linear-gradient(rgb(229, 231, 235) 1px, transparent 1px)" }
632
873
  }
633
874
  );
634
875
  }
876
+ function HomeSpacerDark() {
877
+ return /* @__PURE__ */ jsx10(
878
+ "div",
879
+ {
880
+ className: "grow hidden dark:block",
881
+ style: { backgroundImage: "linear-gradient(rgb(38, 38, 38) 1px, transparent 1px)" }
882
+ }
883
+ );
884
+ }
635
885
  function DefaultHomeLayout() {
636
- return /* @__PURE__ */ jsxs5(Fragment2, { children: [
637
- /* @__PURE__ */ jsx8(HomeHeader, {}),
638
- /* @__PURE__ */ jsx8(HomeHero, {}),
639
- /* @__PURE__ */ jsx8(HomeFeatures, {}),
640
- /* @__PURE__ */ jsx8(HomeCTA, {}),
641
- /* @__PURE__ */ jsx8(HomeSpacer, {}),
642
- /* @__PURE__ */ jsx8(HomeFooter, {})
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, {})
643
894
  ] });
644
895
  }
645
896
  function HomePage({
@@ -651,9 +902,9 @@ function HomePage({
651
902
  ...props,
652
903
  navLinks
653
904
  };
654
- return /* @__PURE__ */ jsx8(HomePageContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs5("div", { className: "min-h-screen bg-white flex flex-col", children: [
655
- /* @__PURE__ */ jsx8(Head2, { title: props.title }),
656
- children || /* @__PURE__ */ jsx8(DefaultHomeLayout, {})
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, {})
657
908
  ] }) });
658
909
  }
659
910
  HomePage.Header = HomeHeader;
@@ -666,7 +917,7 @@ HomePage.Footer = HomeFooter;
666
917
  // src/app.tsx
667
918
  import { createInertiaApp } from "@inertiajs/react";
668
919
  import { createRoot, hydrateRoot } from "react-dom/client";
669
- import { jsx as jsx9 } from "react/jsx-runtime";
920
+ import { jsx as jsx11 } from "react/jsx-runtime";
670
921
  function createDocsApp(config) {
671
922
  const { pages, title, components } = config;
672
923
  if (typeof window !== "undefined") {
@@ -683,7 +934,7 @@ function createDocsApp(config) {
683
934
  return page;
684
935
  },
685
936
  setup({ el, App, props }) {
686
- const appElement = /* @__PURE__ */ jsx9(ComponentsProvider, { components, children: /* @__PURE__ */ jsx9(App, { ...props }) });
937
+ const appElement = /* @__PURE__ */ jsx11(ThemeProvider, { children: /* @__PURE__ */ jsx11(ComponentsProvider, { components, children: /* @__PURE__ */ jsx11(App, { ...props }) }) });
687
938
  if (el.hasChildNodes()) {
688
939
  hydrateRoot(el, appElement);
689
940
  } else {
@@ -707,9 +958,13 @@ export {
707
958
  InlineCode,
708
959
  Markdown,
709
960
  Sidebar,
961
+ ThemeProvider,
962
+ ThemeToggle,
710
963
  cn,
711
964
  configureHighlighter,
712
965
  createDocsApp,
713
- getHighlighter
966
+ getHighlighter,
967
+ themeInitScript,
968
+ useTheme
714
969
  };
715
970
  //# sourceMappingURL=index.js.map