@unterberg/nivel 0.1.9 → 0.1.10

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.
@@ -17,14 +17,12 @@ import {
17
17
  } from "./chunk-NDJ5LYLK.js";
18
18
 
19
19
  // src/runtime/client/AppLayout.tsx
20
- import { cmMerge as cmMerge5 } from "@classmatejs/react";
20
+ import { cmMerge as cmMerge6 } from "@classmatejs/react";
21
21
  import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
22
22
  import { usePageContext as usePageContext4 } from "vike-react/usePageContext";
23
23
 
24
24
  // src/runtime/client/components/Navbar/index.tsx
25
- import cm2, { cmMerge as cmMerge4 } from "@classmatejs/react";
26
- import { ChevronDown, TextSearch } from "lucide-react";
27
- import { memo as memo3, useCallback, useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
25
+ import cm4 from "@classmatejs/react";
28
26
  import { usePageContext as usePageContext3 } from "vike-react/usePageContext";
29
27
 
30
28
  // src/runtime/client/docsGlobalContext.ts
@@ -64,54 +62,8 @@ var defaultDocsSearchState = {
64
62
  var defaultDocsSidebarState = {
65
63
  openNodes: {}
66
64
  };
67
- var defaultDocsRouteState = {
68
- currentHref: "",
69
- currentSectionId: null,
70
- pageTitle: "",
71
- headings: [],
72
- tableOfContents: false,
73
- previousPage: null,
74
- nextPage: null
75
- };
76
65
  var createDocsRuntimeStore = () => {
77
66
  return createStore()((set) => {
78
- const routeActions = {
79
- setPageData: (data) => set((state) => {
80
- const nextRouteState = {
81
- ...state.routeState,
82
- currentHref: data.page.href,
83
- currentSectionId: data.page.sectionId,
84
- pageTitle: data.page.title,
85
- headings: data.headings,
86
- tableOfContents: data.page.tableOfContents,
87
- previousPage: data.previousPage,
88
- nextPage: data.nextPage
89
- };
90
- if (state.routeState.currentHref === nextRouteState.currentHref && state.routeState.currentSectionId === nextRouteState.currentSectionId && state.routeState.pageTitle === nextRouteState.pageTitle && state.routeState.headings === nextRouteState.headings && state.routeState.tableOfContents === nextRouteState.tableOfContents && state.routeState.previousPage === nextRouteState.previousPage && state.routeState.nextPage === nextRouteState.nextPage) {
91
- return state;
92
- }
93
- return {
94
- routeState: nextRouteState
95
- };
96
- }),
97
- clearPageData: () => set((state) => {
98
- if (state.routeState.currentHref === defaultDocsRouteState.currentHref && state.routeState.currentSectionId === defaultDocsRouteState.currentSectionId && state.routeState.pageTitle === defaultDocsRouteState.pageTitle && state.routeState.headings === defaultDocsRouteState.headings && state.routeState.tableOfContents === defaultDocsRouteState.tableOfContents && state.routeState.previousPage === defaultDocsRouteState.previousPage && state.routeState.nextPage === defaultDocsRouteState.nextPage) {
99
- return state;
100
- }
101
- return {
102
- routeState: {
103
- ...state.routeState,
104
- currentHref: defaultDocsRouteState.currentHref,
105
- currentSectionId: defaultDocsRouteState.currentSectionId,
106
- pageTitle: defaultDocsRouteState.pageTitle,
107
- headings: defaultDocsRouteState.headings,
108
- tableOfContents: defaultDocsRouteState.tableOfContents,
109
- previousPage: defaultDocsRouteState.previousPage,
110
- nextPage: defaultDocsRouteState.nextPage
111
- }
112
- };
113
- })
114
- };
115
67
  const searchActions = {
116
68
  open: () => set((state) => {
117
69
  if (state.searchState.isOpen) {
@@ -181,8 +133,6 @@ var createDocsRuntimeStore = () => {
181
133
  })
182
134
  };
183
135
  return {
184
- routeActions,
185
- routeState: defaultDocsRouteState,
186
136
  searchActions,
187
137
  searchState: defaultDocsSearchState,
188
138
  sidebarActions,
@@ -226,45 +176,6 @@ var useDocsSidebarStore = (selector) => {
226
176
  var useDocsSidebarActions = () => {
227
177
  return useDocsRuntimeStore((state) => state.sidebarActions);
228
178
  };
229
- var useDocsRouteStore = (selector) => {
230
- return useDocsRuntimeStore(
231
- (state) => selector({
232
- ...state.routeState,
233
- ...state.routeActions
234
- })
235
- );
236
- };
237
- var useDocsRouteActions = () => {
238
- return useDocsRuntimeStore((state) => state.routeActions);
239
- };
240
-
241
- // src/runtime/client/components/Brand.tsx
242
- import { cmMerge } from "@classmatejs/react";
243
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
244
- var Brand = ({ brand, noText = false }) => {
245
- const defaultLogo = brand.logoLight ?? brand.logoDark;
246
- return /* @__PURE__ */ jsxs("a", { href: brand.href, className: "flex items-center gap-3 text-base-content no-underline", children: [
247
- defaultLogo && /* @__PURE__ */ jsxs("span", { className: "relative block h-7 w-7 shrink-0", children: [
248
- brand.logoLight && /* @__PURE__ */ jsx2(
249
- "img",
250
- {
251
- src: brand.logoLight,
252
- alt: brand.logoAlt,
253
- className: cmMerge("h-7 w-7 object-contain", brand.logoDark ? "block dark:hidden" : "block")
254
- }
255
- ),
256
- brand.logoDark && /* @__PURE__ */ jsx2(
257
- "img",
258
- {
259
- src: brand.logoDark,
260
- alt: brand.logoAlt,
261
- className: cmMerge("h-7 w-7 object-contain", brand.logoLight ? "hidden dark:block" : "block")
262
- }
263
- )
264
- ] }),
265
- !noText && /* @__PURE__ */ jsx2("span", { className: "text-xl font-semibold tracking-tight", children: brand.text })
266
- ] });
267
- };
268
179
 
269
180
  // src/runtime/client/components/LayoutComponent.tsx
270
181
  import cm from "@classmatejs/react";
@@ -297,7 +208,7 @@ var LayoutComponent = cm.div.variants({
297
208
  });
298
209
 
299
210
  // src/runtime/client/components/Search.tsx
300
- import { cmMerge as cmMerge2 } from "@classmatejs/react";
211
+ import { cmMerge } from "@classmatejs/react";
301
212
  import { useQuery } from "@tanstack/react-query";
302
213
  import { ArrowRightFromLine, MessageCircleQuestion, Search as SearchIcon, TriangleAlert } from "lucide-react";
303
214
  import { memo, useEffect, useRef, useState } from "react";
@@ -406,7 +317,7 @@ var searchAlgoliaIndex = async (options) => {
406
317
  };
407
318
 
408
319
  // src/runtime/client/components/Search.tsx
409
- import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
320
+ import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
410
321
  var MIN_QUERY_LENGTH = 2;
411
322
  var QUERY_DEBOUNCE_MS = 150;
412
323
  var useDebouncedValue = (value, delayMs) => {
@@ -421,7 +332,7 @@ var useDebouncedValue = (value, delayMs) => {
421
332
  }, [delayMs, value]);
422
333
  return debouncedValue;
423
334
  };
424
- var SearchTrigger = memo(() => {
335
+ var _SearchTrigger = memo(() => {
425
336
  const docs = useDocsGlobalContext();
426
337
  const { open, setQuery } = useDocsSearchActions();
427
338
  const query = useDocsSearchStore((state) => state.query);
@@ -429,25 +340,25 @@ var SearchTrigger = memo(() => {
429
340
  if (!docs.algolia) {
430
341
  return null;
431
342
  }
432
- return /* @__PURE__ */ jsxs2(Fragment, { children: [
433
- /* @__PURE__ */ jsx3("div", { className: "hidden md:block", children: /* @__PURE__ */ jsxs2(
343
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
344
+ /* @__PURE__ */ jsx2("div", { className: "hidden md:block", children: /* @__PURE__ */ jsxs(
434
345
  "label",
435
346
  {
436
- className: cmMerge2(
347
+ className: cmMerge(
437
348
  "input input-sm w-56 transition-all",
438
349
  isSearchHovered ? "border-primary-muted shadow-lg shadow-primary-muted-light" : "shadow-transparent"
439
350
  ),
440
351
  onMouseEnter: () => setIsSearchHovered(true),
441
352
  onMouseLeave: () => setIsSearchHovered(false),
442
353
  children: [
443
- /* @__PURE__ */ jsx3("span", { className: "label", children: /* @__PURE__ */ jsx3(SearchIcon, { className: "h-4 w-4 shrink-0" }) }),
444
- /* @__PURE__ */ jsx3(
354
+ /* @__PURE__ */ jsx2("span", { className: "label", children: /* @__PURE__ */ jsx2(SearchIcon, { className: "h-4 w-4 shrink-0" }) }),
355
+ /* @__PURE__ */ jsx2(
445
356
  "input",
446
357
  {
447
358
  type: "text",
448
359
  value: query,
449
360
  placeholder: "Search docs",
450
- className: cmMerge2(
361
+ className: cmMerge(
451
362
  "w-full placeholder:text-base-muted-medium transition-colors",
452
363
  isSearchHovered && "placeholder:text-base-muted"
453
364
  ),
@@ -461,7 +372,7 @@ var SearchTrigger = memo(() => {
461
372
  ]
462
373
  }
463
374
  ) }),
464
- /* @__PURE__ */ jsx3("button", { type: "button", className: "btn btn-ghost btn-square md:hidden", "aria-label": "Search docs", onClick: open, children: /* @__PURE__ */ jsx3(SearchIcon, { className: "h-4 w-4" }) })
375
+ /* @__PURE__ */ jsx2("button", { type: "button", className: "btn btn-ghost btn-square md:hidden", "aria-label": "Search docs", onClick: open, children: /* @__PURE__ */ jsx2(SearchIcon, { className: "h-4 w-4" }) })
465
376
  ] });
466
377
  });
467
378
  var Search = memo(() => {
@@ -513,7 +424,7 @@ var Search = memo(() => {
513
424
  if (!docs.algolia) {
514
425
  return null;
515
426
  }
516
- return /* @__PURE__ */ jsx3("div", { ref: containerRef, className: "relative", children: /* @__PURE__ */ jsx3(
427
+ return /* @__PURE__ */ jsx2("div", { ref: containerRef, className: "relative", children: /* @__PURE__ */ jsx2(
517
428
  SearchSuggestionBox,
518
429
  {
519
430
  contentRef: suggestionBoxRef,
@@ -556,16 +467,16 @@ var SearchSuggestionBox = ({
556
467
  return null;
557
468
  }
558
469
  return createPortal(
559
- /* @__PURE__ */ jsxs2("div", { className: "fixed inset-0 z-30 h-full w-full bg-base-100/50 backdrop-blur-lg", children: [
560
- /* @__PURE__ */ jsx3("div", { className: "absolute inset-0 z-1 bg-linear-to-b from-base-100 via-base-100 via-25% to-primary-muted-superlight dark:bg-linear-to-t" }),
561
- /* @__PURE__ */ jsxs2(
470
+ /* @__PURE__ */ jsxs("div", { className: "fixed inset-0 z-30 h-full w-full bg-base-100/50 backdrop-blur-lg", children: [
471
+ /* @__PURE__ */ jsx2("div", { className: "absolute inset-0 z-1 bg-linear-to-b from-base-100 via-base-100 via-25% to-primary-muted-superlight dark:bg-linear-to-t" }),
472
+ /* @__PURE__ */ jsxs(
562
473
  LayoutComponent,
563
474
  {
564
475
  ref: contentRef,
565
476
  $size: "sm",
566
477
  className: "mt-5 relative z-2 rounded-box bg-base-100/70 p-6 pt-6 shadow-lg shadow-primary-muted-light",
567
478
  children: [
568
- /* @__PURE__ */ jsx3(
479
+ /* @__PURE__ */ jsx2(
569
480
  "input",
570
481
  {
571
482
  placeholder: "Search docs",
@@ -576,34 +487,34 @@ var SearchSuggestionBox = ({
576
487
  onChange: (event) => onQueryChange(event.target.value)
577
488
  }
578
489
  ),
579
- /* @__PURE__ */ jsx3("div", { className: "flex h-7 items-center px-4 text-xs text-base-muted", children: isLoading ? /* @__PURE__ */ jsxs2("span", { className: "flex items-center gap-1", children: [
580
- /* @__PURE__ */ jsx3("span", { className: "loading loading-dots loading-xs" }),
490
+ /* @__PURE__ */ jsx2("div", { className: "flex h-7 items-center px-4 text-xs text-base-muted", children: isLoading ? /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
491
+ /* @__PURE__ */ jsx2("span", { className: "loading loading-dots loading-xs" }),
581
492
  "Searching..."
582
- ] }) : normalizedQuery ? null : /* @__PURE__ */ jsxs2("span", { className: "flex items-center gap-1", children: [
583
- /* @__PURE__ */ jsx3(MessageCircleQuestion, { className: "h-3 w-3 shrink-0" }),
493
+ ] }) : normalizedQuery ? null : /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
494
+ /* @__PURE__ */ jsx2(MessageCircleQuestion, { className: "h-3 w-3 shrink-0" }),
584
495
  "Type at least ",
585
496
  MIN_QUERY_LENGTH,
586
497
  " characters."
587
498
  ] }) }),
588
- normalizedQuery ? isError ? /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2 rounded-box border border-warning/40 bg-base-100 p-4 text-sm text-base-muted shadow-md shadow-primary-muted-light", children: [
589
- /* @__PURE__ */ jsx3(TriangleAlert, { className: "h-4 w-4 shrink-0 text-warning" }),
499
+ normalizedQuery ? isError ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-box border border-warning/40 bg-base-100 p-4 text-sm text-base-muted shadow-md shadow-primary-muted-light", children: [
500
+ /* @__PURE__ */ jsx2(TriangleAlert, { className: "h-4 w-4 shrink-0 text-warning" }),
590
501
  "Search is temporarily unavailable."
591
- ] }) : !canSearch ? /* @__PURE__ */ jsx3("div", { className: "text-sm text-base-muted", children: "Keep typing to search." }) : !isLoading && results.length === 0 ? /* @__PURE__ */ jsx3("div", { className: "text-sm text-base-muted", children: "No results found." }) : /* @__PURE__ */ jsx3("div", { className: "-mx-2 max-h-80 overflow-y-auto p-2", children: /* @__PURE__ */ jsx3("ul", { className: "flex flex-col gap-2", children: results.map((result) => /* @__PURE__ */ jsx3("li", { children: /* @__PURE__ */ jsxs2(
502
+ ] }) : !canSearch ? /* @__PURE__ */ jsx2("div", { className: "text-sm text-base-muted", children: "Keep typing to search." }) : !isLoading && results.length === 0 ? /* @__PURE__ */ jsx2("div", { className: "text-sm text-base-muted", children: "No results found." }) : /* @__PURE__ */ jsx2("div", { className: "-mx-2 max-h-80 overflow-y-auto p-2", children: /* @__PURE__ */ jsx2("ul", { className: "flex flex-col gap-2", children: results.map((result) => /* @__PURE__ */ jsx2("li", { children: /* @__PURE__ */ jsxs(
592
503
  "a",
593
504
  {
594
505
  href: withSiteBaseUrl(result.href),
595
506
  className: "block rounded-box border border-base-muted-medium bg-base-100 p-4 shadow-md hover:border-primary-muted hover:bg-base-200",
596
507
  onClick: onClose,
597
508
  children: [
598
- /* @__PURE__ */ jsxs2("div", { className: "mb-2 flex items-center justify-start gap-2", children: [
599
- /* @__PURE__ */ jsx3("div", { className: "font-bold text-base-content", children: result.title }),
600
- result.sectionTitle ? /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-1 text-sm text-base-muted-medium", children: [
601
- /* @__PURE__ */ jsx3(ArrowRightFromLine, { className: "h-3 w-3" }),
509
+ /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-start gap-2", children: [
510
+ /* @__PURE__ */ jsx2("div", { className: "font-bold text-base-content", children: result.title }),
511
+ result.sectionTitle ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-sm text-base-muted-medium", children: [
512
+ /* @__PURE__ */ jsx2(ArrowRightFromLine, { className: "h-3 w-3" }),
602
513
  " ",
603
514
  result.sectionTitle
604
515
  ] }) : null
605
516
  ] }),
606
- result.excerpt ? /* @__PURE__ */ jsx3("p", { className: "text-xs leading-5 text-base-muted", children: result.excerpt }) : null
517
+ result.excerpt ? /* @__PURE__ */ jsx2("p", { className: "text-xs leading-5 text-base-muted", children: result.excerpt }) : null
607
518
  ]
608
519
  }
609
520
  ) }, result.href)) }) }) : null
@@ -615,6 +526,38 @@ var SearchSuggestionBox = ({
615
526
  );
616
527
  };
617
528
 
529
+ // src/runtime/client/components/Navbar/DocsNavbar.tsx
530
+ import cm2, { cmMerge as cmMerge3 } from "@classmatejs/react";
531
+ import { ChevronDown, Menu, TextSearch } from "lucide-react";
532
+
533
+ // src/runtime/client/components/Brand.tsx
534
+ import { cmMerge as cmMerge2 } from "@classmatejs/react";
535
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
536
+ var Brand = ({ brand, noText = false }) => {
537
+ const defaultLogo = brand.logoLight ?? brand.logoDark;
538
+ return /* @__PURE__ */ jsxs2("a", { href: brand.href, className: "flex items-center gap-3 text-base-content no-underline", children: [
539
+ defaultLogo && /* @__PURE__ */ jsxs2("span", { className: "relative block h-8 w-8 shrink-0", children: [
540
+ brand.logoLight && /* @__PURE__ */ jsx3(
541
+ "img",
542
+ {
543
+ src: brand.logoLight,
544
+ alt: brand.logoAlt,
545
+ className: cmMerge2("h-8 w-8 object-contain", brand.logoDark ? "block dark:hidden" : "block")
546
+ }
547
+ ),
548
+ brand.logoDark && /* @__PURE__ */ jsx3(
549
+ "img",
550
+ {
551
+ src: brand.logoDark,
552
+ alt: brand.logoAlt,
553
+ className: cmMerge2("h-8 w-8 object-contain", brand.logoLight ? "hidden dark:block" : "block")
554
+ }
555
+ )
556
+ ] }),
557
+ !noText && /* @__PURE__ */ jsx3("span", { className: "text-xl font-semibold tracking-tight", children: brand.text })
558
+ ] });
559
+ };
560
+
618
561
  // src/runtime/client/components/SocialLinks.tsx
619
562
  import { memo as memo2 } from "react";
620
563
  import { jsx as jsx4 } from "react/jsx-runtime";
@@ -754,10 +697,152 @@ var ThemeSwitch = ({ theme }) => {
754
697
  );
755
698
  };
756
699
 
700
+ // src/runtime/client/components/Navbar/AsideButtons.tsx
701
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
702
+ var AsideButtons = () => {
703
+ const docs = useDocsGlobalContext();
704
+ return /* @__PURE__ */ jsxs4("div", { className: "flex-1 justify-end gap-2 flex", children: [
705
+ /* @__PURE__ */ jsx6("div", { className: "hidden lg:block", children: /* @__PURE__ */ jsx6(SocialLinks_default, {}) }),
706
+ /* @__PURE__ */ jsx6(ThemeSwitch, { theme: docs.theme })
707
+ ] });
708
+ };
709
+ var AsideButtons_default = AsideButtons;
710
+
711
+ // src/runtime/client/components/Navbar/DocsNavbar.tsx
712
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
713
+ var StyledNav = cm2.nav`
714
+ gap-4
715
+ flex-1 pl-10 items-center justify-end lg:justify-start
716
+ hidden sm:flex
717
+ `;
718
+ var StyledNavList = cm2.ul`
719
+ inline-flex items-center gap-2 font-semibold
720
+ `;
721
+ var DocsNavbar = ({
722
+ closeMegaMenu,
723
+ openMegaMenu,
724
+ scheduleMegaMenuClose,
725
+ toggleSearch,
726
+ activeSection
727
+ }) => {
728
+ const docs = useDocsGlobalContext();
729
+ const handleMenuButtonClick = () => {
730
+ openMegaMenu("api");
731
+ };
732
+ return /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 gap-4 pt-3 justify-between", children: [
733
+ /* @__PURE__ */ jsx7("div", { className: "lg:min-w-76 min-w-none", children: /* @__PURE__ */ jsx7(Brand, { brand: docs.brand }) }),
734
+ /* @__PURE__ */ jsx7(StyledNav, { "aria-label": "Primary", children: /* @__PURE__ */ jsxs5(StyledNavList, { className: "", children: [
735
+ docs.navbarItems.map((item) => /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsx7(
736
+ "a",
737
+ {
738
+ href: withSiteBaseUrl(item.href),
739
+ className: "block",
740
+ onPointerEnter: () => openMegaMenu(item.id),
741
+ onPointerLeave: scheduleMegaMenuClose,
742
+ onFocus: () => openMegaMenu(item.id),
743
+ onBlur: scheduleMegaMenuClose,
744
+ onClick: closeMegaMenu,
745
+ children: /* @__PURE__ */ jsxs5(
746
+ "span",
747
+ {
748
+ className: cmMerge3(
749
+ "btn text-base btn-sm md:min-w-30 px-2 whitespace-nowrap tracking-tight",
750
+ activeSection?.id === item.id ? "btn-primary btn-soft" : "btn-ghost "
751
+ ),
752
+ children: [
753
+ renderInlineMarkdown(item.title),
754
+ /* @__PURE__ */ jsx7(ChevronDown, { className: "h-4 w-4 shrink-0" })
755
+ ]
756
+ }
757
+ )
758
+ }
759
+ ) }, item.id)),
760
+ docs.algolia ? /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsxs5(
761
+ "button",
762
+ {
763
+ type: "button",
764
+ onClick: toggleSearch,
765
+ className: "btn btn-ghost btn-sm text-base md:min-w-30 px-2 whitespace-nowrap tracking-tight",
766
+ children: [
767
+ "Search",
768
+ /* @__PURE__ */ jsx7(TextSearch, { className: "h-4 w-4" })
769
+ ]
770
+ }
771
+ ) }) : null
772
+ ] }) }),
773
+ /* @__PURE__ */ jsx7("button", { type: "button", className: "block lg:hidden", onClick: handleMenuButtonClick, children: /* @__PURE__ */ jsx7(Menu, { className: "w-6 h-6" }) }),
774
+ /* @__PURE__ */ jsx7("div", { className: "lg:min-w-40 hidden lg:block", children: /* @__PURE__ */ jsx7(AsideButtons_default, {}) })
775
+ ] });
776
+ };
777
+ var DocsNavbar_default = DocsNavbar;
778
+
779
+ // src/runtime/client/components/Navbar/LandingPageNavbar.tsx
780
+ import cm3, { cmMerge as cmMerge4 } from "@classmatejs/react";
781
+ import { ChevronDown as ChevronDown2, TextSearch as TextSearch2 } from "lucide-react";
782
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
783
+ var StyledNav2 = cm3.nav`
784
+ gap-4
785
+ flex-1 lg:pl-6 xl:pl-10 items-center justify-center
786
+ `;
787
+ var StyledNavList2 = cm3.ul`
788
+ inline-flex items-center gap-2 font-semibold
789
+ `;
790
+ var LandingPageNavbar = ({
791
+ closeMegaMenu,
792
+ openMegaMenu,
793
+ scheduleMegaMenuClose,
794
+ toggleSearch
795
+ }) => {
796
+ const docs = useDocsGlobalContext();
797
+ return /* @__PURE__ */ jsxs6("div", { className: "flex flex-1 gap-4 pt-3", children: [
798
+ /* @__PURE__ */ jsx8("div", { className: "min-w-40", children: /* @__PURE__ */ jsx8(Brand, { brand: docs.brand }) }),
799
+ /* @__PURE__ */ jsx8(StyledNav2, { "aria-label": "Primary", className: " flex-1 flex", children: /* @__PURE__ */ jsxs6(StyledNavList2, { className: " justify-end", children: [
800
+ docs.navbarItems.map((item) => /* @__PURE__ */ jsx8("li", { children: /* @__PURE__ */ jsx8(
801
+ "a",
802
+ {
803
+ href: withSiteBaseUrl(item.href),
804
+ className: "block",
805
+ onPointerEnter: () => openMegaMenu(item.id),
806
+ onPointerLeave: scheduleMegaMenuClose,
807
+ onFocus: () => openMegaMenu(item.id),
808
+ onBlur: scheduleMegaMenuClose,
809
+ onClick: closeMegaMenu,
810
+ children: /* @__PURE__ */ jsxs6(
811
+ "span",
812
+ {
813
+ className: cmMerge4(
814
+ "btn btn-ghost text-base lg:text-lg btn-sm lg:min-w-30 px-2 whitespace-nowrap tracking-tight"
815
+ ),
816
+ children: [
817
+ renderInlineMarkdown(item.title),
818
+ /* @__PURE__ */ jsx8(ChevronDown2, { className: "h-4 w-4 shrink-0" })
819
+ ]
820
+ }
821
+ )
822
+ }
823
+ ) }, item.id)),
824
+ docs.algolia ? /* @__PURE__ */ jsx8("li", { children: /* @__PURE__ */ jsxs6(
825
+ "button",
826
+ {
827
+ type: "button",
828
+ onClick: toggleSearch,
829
+ className: "btn btn-ghost btn-sm text-base lg:text-lg lg:min-w-30 px-2 whitespace-nowrap tracking-tight",
830
+ children: [
831
+ "Search",
832
+ /* @__PURE__ */ jsx8(TextSearch2, { className: "h-4 w-4" })
833
+ ]
834
+ }
835
+ ) }) : null
836
+ ] }) }),
837
+ /* @__PURE__ */ jsx8("div", { className: "min-w-40", children: /* @__PURE__ */ jsx8(AsideButtons_default, {}) })
838
+ ] });
839
+ };
840
+ var LandingPageNavbar_default = LandingPageNavbar;
841
+
757
842
  // src/runtime/client/components/Navbar/MegaMenu.tsx
758
- import { cmMerge as cmMerge3 } from "@classmatejs/react";
843
+ import { cmMerge as cmMerge5 } from "@classmatejs/react";
759
844
  import { useEffect as useEffect2, useState as useState2 } from "react";
760
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
845
+ import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
761
846
  var MegaMenu = ({
762
847
  isActive,
763
848
  onOpen,
@@ -789,59 +874,56 @@ var MegaMenu = ({
789
874
  resizeObserver.disconnect();
790
875
  };
791
876
  }, [visibleSectionElement, visibleSectionId]);
792
- return /* @__PURE__ */ jsxs4(
877
+ return /* @__PURE__ */ jsxs7(
793
878
  "div",
794
879
  {
795
- className: cmMerge3(
796
- "fixed top-13 left-0 z-3 w-full pt-3",
797
- isActive ? "pointer-events-auto" : "pointer-events-none"
798
- ),
880
+ className: cmMerge5("fixed top-14 left-0 z-3 w-full", isActive ? "pointer-events-auto" : "pointer-events-none"),
799
881
  onPointerEnter: () => onOpen(visibleSectionId),
800
882
  onPointerLeave: onClose,
801
883
  children: [
802
- /* @__PURE__ */ jsx6(
884
+ /* @__PURE__ */ jsx9(
803
885
  "div",
804
886
  {
805
- className: cmMerge3(
887
+ className: cmMerge5(
806
888
  isActive ? "opacity-100" : "opacity-0",
807
889
  "pointer-events-none absolute top-0 left-0 h-svh w-full bg-linear-to-t from-base-100/60 to-base-100 transition-opacity duration-200 backdrop-blur-md"
808
890
  )
809
891
  }
810
892
  ),
811
- /* @__PURE__ */ jsx6(
893
+ /* @__PURE__ */ jsx9(
812
894
  "div",
813
895
  {
814
- className: cmMerge3(
896
+ className: cmMerge5(
815
897
  "relative z-4 overflow-hidden transition-[height] bg-base-100 duration-300",
816
898
  isLandingPage && !isActive ? "" : "border-b border-base-muted-light ease-out"
817
899
  ),
818
900
  style: { height: isActive ? contentHeight : 0 },
819
- children: /* @__PURE__ */ jsx6(LayoutComponent, { $size: "sm", children: /* @__PURE__ */ jsx6(
901
+ children: /* @__PURE__ */ jsx9(LayoutComponent, { $size: "sm", children: /* @__PURE__ */ jsx9(
820
902
  "div",
821
903
  {
822
- className: cmMerge3(
904
+ className: cmMerge5(
823
905
  isActive ? "translate-y-0 opacity-100" : "-translate-y-10 opacity-0",
824
906
  "relative z-4 transition-all duration-300"
825
907
  ),
826
- children: sections.map((section) => /* @__PURE__ */ jsx6(
908
+ children: sections.map((section) => /* @__PURE__ */ jsx9(
827
909
  "div",
828
910
  {
829
911
  ref: section.id === visibleSectionId ? setVisibleSectionElement : void 0,
830
- className: cmMerge3(
912
+ className: cmMerge5(
831
913
  section.id === visibleSectionId ? "opacity-100" : "opacity-0 pointer-events-none",
832
914
  "transition-all absolute w-full duration-300"
833
915
  ),
834
- children: section.items.length > 0 && /* @__PURE__ */ jsx6("ul", { className: "mt-2 flex ", children: section.items.map(
835
- (child) => child.showInNav !== false && /* @__PURE__ */ jsxs4("li", { className: "flex-1 py-3 mb-6 px-4", children: [
836
- child.href ? /* @__PURE__ */ jsx6(
916
+ children: section.items.length > 0 && /* @__PURE__ */ jsx9("ul", { className: "mt-2 flex ", children: section.items.map(
917
+ (child) => child.showInNav !== false && /* @__PURE__ */ jsxs7("li", { className: "flex-1 py-3 mb-6 px-4", children: [
918
+ child.href ? /* @__PURE__ */ jsx9(
837
919
  "a",
838
920
  {
839
921
  className: "mb-4 block text-lg font-semibold tracking-tight",
840
922
  href: withSiteBaseUrl(child.href),
841
923
  children: child.title
842
924
  }
843
- ) : /* @__PURE__ */ jsx6("span", { className: "mb-4 block text-lg font-semibold tracking-tight", children: child.title }),
844
- child.kind === "group" && child.items.length > 0 && /* @__PURE__ */ jsx6("ul", { className: "menu border-l border-base-muted-light py-0 w-full", children: child.items.map((subChild) => /* @__PURE__ */ jsx6("li", { children: subChild.href ? /* @__PURE__ */ jsx6("a", { href: withSiteBaseUrl(subChild.href), onClick: onClose, children: renderInlineMarkdown(subChild.title) }) : /* @__PURE__ */ jsx6("span", { children: renderInlineMarkdown(subChild.title) }) }, subChild.id)) })
925
+ ) : /* @__PURE__ */ jsx9("span", { className: "mb-4 block text-lg font-semibold tracking-tight", children: child.title }),
926
+ child.kind === "group" && child.items.length > 0 && /* @__PURE__ */ jsx9("ul", { className: "menu border-l border-base-muted-light py-0 w-full", children: child.items.map((subChild) => /* @__PURE__ */ jsx9("li", { children: subChild.href ? /* @__PURE__ */ jsx9("a", { href: withSiteBaseUrl(subChild.href), onClick: onClose, children: renderInlineMarkdown(subChild.title) }) : /* @__PURE__ */ jsx9("span", { children: renderInlineMarkdown(subChild.title) }) }, subChild.id)) })
845
927
  ] }, child.id)
846
928
  ) })
847
929
  },
@@ -856,19 +938,12 @@ var MegaMenu = ({
856
938
  );
857
939
  };
858
940
 
859
- // src/runtime/client/components/Navbar/index.tsx
860
- import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
861
- var Navbar = memo3(() => {
862
- const docs = useDocsGlobalContext();
863
- const { urlPathname, urlParsed } = usePageContext3();
864
- const activeSectionId = useDocsRouteStore((state) => state.currentSectionId);
865
- const isLandingPage = urlParsed.pathname === "/";
941
+ // src/runtime/client/components/Navbar/useMegaMenu.ts
942
+ import { useCallback, useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
943
+ var useMegaMenu = ({ activeSectionId, sections }) => {
866
944
  const [isMegaMenuOpen, setIsMegaMenuOpen] = useState3(false);
867
945
  const megaMenuCloseTimeoutRef = useRef2(null);
868
- const sections = docs.sidebarSections;
869
- const activeSection = sections.find((section) => section.id === activeSectionId) ?? getActiveSectionByPathname(docs, urlPathname);
870
- const [hoveredSectionId, setHoveredSectionId] = useState3(activeSection?.id ?? sections[0]?.id);
871
- const { toggle: toggleSearch } = useDocsSearchActions();
946
+ const [hoveredSectionId, setHoveredSectionId] = useState3(activeSectionId ?? sections[0]?.id);
872
947
  const clearMegaMenuCloseTimeout = useCallback(() => {
873
948
  if (megaMenuCloseTimeoutRef.current === null) {
874
949
  return;
@@ -900,93 +975,52 @@ var Navbar = memo3(() => {
900
975
  };
901
976
  }, [clearMegaMenuCloseTimeout]);
902
977
  useEffect3(() => {
903
- setHoveredSectionId(activeSection?.id ?? sections[0]?.id);
904
- }, [activeSection?.id, sections]);
905
- return /* @__PURE__ */ jsxs5(Fragment2, { children: [
906
- /* @__PURE__ */ jsx7(StyledNavbar, { $border: isLandingPage, children: /* @__PURE__ */ jsx7(LayoutComponent, { className: "h-full", children: isLandingPage ? /* @__PURE__ */ jsxs5("div", { className: "relative z-3 flex h-full items-center justify-between py-4", children: [
907
- /* @__PURE__ */ jsx7("div", { className: "flex flex-1 items-center gap-4", children: /* @__PURE__ */ jsx7(Brand, { brand: docs.brand }) }),
908
- /* @__PURE__ */ jsx7(
909
- "nav",
910
- {
911
- "aria-label": "Primary",
912
- className: "top-0 left-0 flex min-w-0 flex-1 items-center justify-center gap-4 overflow-x-auto",
913
- children: /* @__PURE__ */ jsxs5("ul", { className: "flex items-center font-semibold", children: [
914
- docs.navbarItems.map((item) => /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsx7(
915
- "a",
916
- {
917
- href: withSiteBaseUrl(item.href),
918
- className: "h-full block py-3.25",
919
- onPointerEnter: () => openMegaMenu(item.id),
920
- onPointerLeave: scheduleMegaMenuClose,
921
- onFocus: () => openMegaMenu(item.id),
922
- onBlur: scheduleMegaMenuClose,
923
- onClick: closeMegaMenu,
924
- children: /* @__PURE__ */ jsxs5(
925
- "span",
926
- {
927
- className: cmMerge4("btn text-lg btn-ghost min-w-30 px-2 whitespace-nowrap tracking-tight"),
928
- children: [
929
- renderInlineMarkdown(item.title),
930
- /* @__PURE__ */ jsx7(ChevronDown, { className: "h-4 w-4 shrink-0" })
931
- ]
932
- }
933
- )
934
- }
935
- ) }, item.id)),
936
- docs.algolia ? /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsxs5(
937
- "button",
938
- {
939
- type: "button",
940
- onClick: toggleSearch,
941
- className: "btn btn-ghost min-w-30 px-2 text-lg whitespace-nowrap tracking-tight",
942
- children: [
943
- "Search",
944
- /* @__PURE__ */ jsx7(TextSearch, { className: "h-4 w-4" })
945
- ]
946
- }
947
- ) }) : null
948
- ] })
949
- }
950
- ),
951
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 items-center justify-end gap-2", children: [
952
- /* @__PURE__ */ jsx7(SocialLinks_default, {}),
953
- /* @__PURE__ */ jsx7(ThemeSwitch, { theme: docs.theme })
954
- ] })
955
- ] }) : /* @__PURE__ */ jsxs5("div", { className: "relative z-3 flex h-full items-center justify-between py-4", children: [
956
- /* @__PURE__ */ jsx7("div", { className: "flex w-80 flex-1 items-center justify-between gap-2 lg:flex-none", children: /* @__PURE__ */ jsx7(Brand, { brand: docs.brand }) }),
957
- /* @__PURE__ */ jsxs5(
958
- "nav",
959
- {
960
- "aria-label": "Primary",
961
- className: "top-0 left-0 flex flex-1 items-center justify-start gap-4 overflow-x-auto lg:pl-6 xl:pl-10",
962
- children: [
963
- /* @__PURE__ */ jsx7("ul", { className: "flex items-center gap-2 font-semibold", children: docs.navbarItems.map((item) => /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsx7(
964
- "a",
965
- {
966
- href: withSiteBaseUrl(item.href),
967
- onPointerEnter: () => openMegaMenu(item.id),
968
- onPointerLeave: scheduleMegaMenuClose,
969
- onFocus: () => openMegaMenu(item.id),
970
- onBlur: scheduleMegaMenuClose,
971
- onClick: closeMegaMenu,
972
- className: cmMerge4(
973
- "btn btn-sm px-2 whitespace-nowrap text-base tracking-tight",
974
- item.id === activeSection?.id ? "btn-primary btn-soft" : "btn-ghost"
975
- ),
976
- children: renderInlineMarkdown(item.title)
977
- }
978
- ) }, item.id)) }),
979
- /* @__PURE__ */ jsx7(SearchTrigger, {})
980
- ]
981
- }
982
- ),
983
- /* @__PURE__ */ jsxs5("div", { className: "flex w-78 flex-1 items-center justify-end gap-2 lg:flex-none", children: [
984
- /* @__PURE__ */ jsx7(SocialLinks_default, {}),
985
- /* @__PURE__ */ jsx7(ThemeSwitch, { theme: docs.theme })
986
- ] })
987
- ] }) }) }),
988
- /* @__PURE__ */ jsx7(Search, {}),
989
- /* @__PURE__ */ jsx7(
978
+ setHoveredSectionId(activeSectionId ?? sections[0]?.id);
979
+ }, [activeSectionId, sections]);
980
+ return {
981
+ isMegaMenuOpen,
982
+ hoveredSectionId,
983
+ openMegaMenu,
984
+ closeMegaMenu,
985
+ scheduleMegaMenuClose
986
+ };
987
+ };
988
+ var useMegaMenu_default = useMegaMenu;
989
+
990
+ // src/runtime/client/components/Navbar/index.tsx
991
+ import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
992
+ var NavbarNew = () => {
993
+ const docs = useDocsGlobalContext();
994
+ const { urlPathname, urlParsed } = usePageContext3();
995
+ const isLandingPage = urlParsed.pathname === "/";
996
+ const sections = docs.sidebarSections;
997
+ const activeSection = getActiveSectionByPathname(docs, urlPathname);
998
+ const { toggle: toggleSearch } = useDocsSearchActions();
999
+ const { closeMegaMenu, hoveredSectionId, isMegaMenuOpen, openMegaMenu, scheduleMegaMenuClose } = useMegaMenu_default({
1000
+ activeSectionId: activeSection?.id,
1001
+ sections
1002
+ });
1003
+ return /* @__PURE__ */ jsxs8(StyledNavbar, { $border: isLandingPage, children: [
1004
+ /* @__PURE__ */ jsx10(LayoutComponent, { children: isLandingPage ? /* @__PURE__ */ jsx10(
1005
+ LandingPageNavbar_default,
1006
+ {
1007
+ openMegaMenu,
1008
+ scheduleMegaMenuClose,
1009
+ toggleSearch,
1010
+ closeMegaMenu
1011
+ }
1012
+ ) : /* @__PURE__ */ jsx10(
1013
+ DocsNavbar_default,
1014
+ {
1015
+ openMegaMenu,
1016
+ scheduleMegaMenuClose,
1017
+ toggleSearch,
1018
+ closeMegaMenu,
1019
+ activeSection
1020
+ }
1021
+ ) }),
1022
+ /* @__PURE__ */ jsx10(Search, {}),
1023
+ /* @__PURE__ */ jsx10(
990
1024
  MegaMenu,
991
1025
  {
992
1026
  sections,
@@ -999,9 +1033,11 @@ var Navbar = memo3(() => {
999
1033
  }
1000
1034
  )
1001
1035
  ] });
1002
- });
1003
- var StyledNavbar = cm2.header`
1004
- top-0 left-0 z-20 h-16 w-full bg-base-100
1036
+ };
1037
+ var Navbar_default = NavbarNew;
1038
+ var StyledNavbar = cm4.header`
1039
+ top-0 left-0 z-20 w-full bg-base-100
1040
+ pt-0 h-14
1005
1041
  ${({ $border }) => $border ? "relative" : "fixed"}
1006
1042
  `;
1007
1043
 
@@ -1024,7 +1060,7 @@ var UserSettingsSync = ({ theme }) => {
1024
1060
  };
1025
1061
 
1026
1062
  // src/runtime/client/AppLayout.tsx
1027
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1063
+ import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
1028
1064
  var queryClient = new QueryClient();
1029
1065
  var runtimeStore = createDocsRuntimeStore();
1030
1066
  var AppLayout = ({ children, header }) => {
@@ -1032,42 +1068,42 @@ var AppLayout = ({ children, header }) => {
1032
1068
  const pageContext = usePageContext4();
1033
1069
  const docs = getDocsFromGlobalContext(pageContext);
1034
1070
  const isLandingPage = urlPathname === "/";
1035
- return /* @__PURE__ */ jsx8(DocsRuntimeStoreProvider, { store: runtimeStore, children: /* @__PURE__ */ jsx8(DocsGlobalContextProvider, { docs, children: /* @__PURE__ */ jsxs6(QueryClientProvider, { client: queryClient, children: [
1036
- /* @__PURE__ */ jsx8(UserSettingsSync, { theme: docs.theme }),
1037
- /* @__PURE__ */ jsxs6("div", { className: "min-h-screen bg-base-100 text-base-content", children: [
1038
- header ?? /* @__PURE__ */ jsx8(Navbar, {}),
1039
- /* @__PURE__ */ jsx8("div", { className: cmMerge5(isLandingPage ? "" : "pt-16"), children })
1071
+ return /* @__PURE__ */ jsx11(DocsRuntimeStoreProvider, { store: runtimeStore, children: /* @__PURE__ */ jsx11(DocsGlobalContextProvider, { docs, children: /* @__PURE__ */ jsxs9(QueryClientProvider, { client: queryClient, children: [
1072
+ /* @__PURE__ */ jsx11(UserSettingsSync, { theme: docs.theme }),
1073
+ /* @__PURE__ */ jsxs9("div", { className: "min-h-screen bg-base-100 text-base-content", children: [
1074
+ header ?? /* @__PURE__ */ jsx11(Navbar_default, {}),
1075
+ /* @__PURE__ */ jsx11("div", { className: cmMerge6(isLandingPage ? "" : "pt-14"), children })
1040
1076
  ] })
1041
1077
  ] }) }) });
1042
1078
  };
1043
1079
 
1044
1080
  // src/runtime/client/components/MetaHead/FaviconLinks.tsx
1045
- import { Fragment as Fragment3, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
1081
+ import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
1046
1082
  var FaviconLinks = ({ head }) => {
1047
1083
  const { appleTouchIcon, faviconIco, faviconSvg } = head;
1048
- return /* @__PURE__ */ jsxs7(Fragment3, { children: [
1049
- appleTouchIcon && /* @__PURE__ */ jsx9("link", { rel: "apple-touch-icon", href: appleTouchIcon }),
1050
- faviconSvg && /* @__PURE__ */ jsx9("link", { rel: "icon", type: "image/svg+xml", href: faviconSvg }),
1051
- faviconIco && /* @__PURE__ */ jsxs7(Fragment3, { children: [
1052
- /* @__PURE__ */ jsx9("link", { rel: "shortcut icon", type: "image/x-icon", href: faviconIco }),
1053
- /* @__PURE__ */ jsx9("link", { rel: "icon", type: "image/x-icon", href: faviconIco })
1084
+ return /* @__PURE__ */ jsxs10(Fragment2, { children: [
1085
+ appleTouchIcon && /* @__PURE__ */ jsx12("link", { rel: "apple-touch-icon", href: appleTouchIcon }),
1086
+ faviconSvg && /* @__PURE__ */ jsx12("link", { rel: "icon", type: "image/svg+xml", href: faviconSvg }),
1087
+ faviconIco && /* @__PURE__ */ jsxs10(Fragment2, { children: [
1088
+ /* @__PURE__ */ jsx12("link", { rel: "shortcut icon", type: "image/x-icon", href: faviconIco }),
1089
+ /* @__PURE__ */ jsx12("link", { rel: "icon", type: "image/x-icon", href: faviconIco })
1054
1090
  ] })
1055
1091
  ] });
1056
1092
  };
1057
1093
 
1058
1094
  // src/runtime/client/components/MetaHead/FontLinks.tsx
1059
- import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
1095
+ import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
1060
1096
  var FontLinks = ({ head }) => {
1061
1097
  const { fontStylesheetHref, fontPreloadHrefs } = head;
1062
1098
  const effectivePreloadHrefs = fontPreloadHrefs ?? [];
1063
- return /* @__PURE__ */ jsxs8(Fragment4, { children: [
1064
- effectivePreloadHrefs.map((href) => /* @__PURE__ */ jsx10("link", { rel: "preload", href, as: "font", type: "font/woff2", crossOrigin: "anonymous" }, href)),
1065
- fontStylesheetHref && /* @__PURE__ */ jsx10("link", { rel: "stylesheet", href: fontStylesheetHref })
1099
+ return /* @__PURE__ */ jsxs11(Fragment3, { children: [
1100
+ effectivePreloadHrefs.map((href) => /* @__PURE__ */ jsx13("link", { rel: "preload", href, as: "font", type: "font/woff2", crossOrigin: "anonymous" }, href)),
1101
+ fontStylesheetHref && /* @__PURE__ */ jsx13("link", { rel: "stylesheet", href: fontStylesheetHref })
1066
1102
  ] });
1067
1103
  };
1068
1104
 
1069
1105
  // src/runtime/client/components/MetaHead/ThemeBootstrap.tsx
1070
- import { jsx as jsx11 } from "react/jsx-runtime";
1106
+ import { jsx as jsx14 } from "react/jsx-runtime";
1071
1107
  var getThemeBootstrapScript = (theme) => {
1072
1108
  return `(() => {
1073
1109
  const storageKey = ${JSON.stringify(USER_SETTINGS_STORAGE_KEY)};
@@ -1105,7 +1141,7 @@ var getThemeBootstrapScript = (theme) => {
1105
1141
  })();`;
1106
1142
  };
1107
1143
  var ThemeBootstrap = ({ theme }) => {
1108
- return /* @__PURE__ */ jsx11(
1144
+ return /* @__PURE__ */ jsx14(
1109
1145
  "script",
1110
1146
  {
1111
1147
  dangerouslySetInnerHTML: {
@@ -1116,239 +1152,120 @@ var ThemeBootstrap = ({ theme }) => {
1116
1152
  };
1117
1153
 
1118
1154
  // src/runtime/client/components/MetaHead/index.tsx
1119
- import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
1155
+ import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
1120
1156
  var MetaHead = () => {
1121
1157
  const docs = useDocsFromPageGlobalContext();
1122
- return /* @__PURE__ */ jsxs9(Fragment5, { children: [
1123
- /* @__PURE__ */ jsx12(ThemeBootstrap, { theme: docs.theme }),
1124
- /* @__PURE__ */ jsx12(FaviconLinks, { head: docs.head }),
1125
- /* @__PURE__ */ jsx12(FontLinks, { head: docs.head })
1158
+ return /* @__PURE__ */ jsxs12(Fragment4, { children: [
1159
+ /* @__PURE__ */ jsx15(ThemeBootstrap, { theme: docs.theme }),
1160
+ /* @__PURE__ */ jsx15(FaviconLinks, { head: docs.head }),
1161
+ /* @__PURE__ */ jsx15(FontLinks, { head: docs.head })
1126
1162
  ] });
1127
1163
  };
1128
1164
 
1129
1165
  // src/runtime/client/components/ProseContainer.tsx
1130
- import cm3 from "@classmatejs/react";
1131
- var ProseContainer = cm3.section`
1166
+ import cm5 from "@classmatejs/react";
1167
+ var ProseContainer = cm5.section`
1132
1168
  prose-container
1133
1169
  `;
1134
1170
 
1135
- // src/runtime/client/DocsPage.tsx
1171
+ // src/runtime/client/DocsLayout.tsx
1136
1172
  import { useData } from "vike-react/useData";
1137
- import { usePageContext as usePageContext5 } from "vike-react/usePageContext";
1138
1173
 
1139
- // src/runtime/client/getMdxRuntimeValue.tsx
1140
- var isExternalHref = (href) => {
1141
- return /^(?:[a-z]+:)?\/\//i.test(href) || href.startsWith("mailto:") || href.startsWith("tel:");
1142
- };
1143
- var splitHref = (href) => {
1144
- const [pathname, hash = ""] = href.split("#");
1145
- return {
1146
- pathname,
1147
- hash: hash ? `#${hash}` : ""
1148
- };
1174
+ // src/runtime/client/components/DocsPagination.tsx
1175
+ import { cmMerge as cmMerge7 } from "@classmatejs/react";
1176
+ import { ChevronLeft, ChevronRight } from "lucide-react";
1177
+ import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
1178
+ var PaginationCard = ({ item, direction, isOffset }) => {
1179
+ const isPrevious = direction === "previous";
1180
+ return /* @__PURE__ */ jsx16(
1181
+ "a",
1182
+ {
1183
+ href: withSiteBaseUrl(item.href),
1184
+ className: cmMerge7(
1185
+ "group rounded-box border border-base-muted-light bg-base-100 p-5 no-underline hover:border-primary-muted-medium hover:bg-base-200",
1186
+ isPrevious ? "text-left" : "text-right",
1187
+ isOffset && "sm:col-start-2"
1188
+ ),
1189
+ "aria-label": `${isPrevious ? "Previous" : "Next"}: ${item.title}`,
1190
+ children: /* @__PURE__ */ jsxs13("div", { className: "flex flex-col justify-between gap-2", children: [
1191
+ /* @__PURE__ */ jsx16("p", { className: "text-lg font-semibold text-base-content", children: renderInlineMarkdown(item.title) }),
1192
+ /* @__PURE__ */ jsxs13(
1193
+ "div",
1194
+ {
1195
+ className: cmMerge7(
1196
+ "flex items-center gap-1 text-base-muted group-hover:text-base-content",
1197
+ isPrevious ? "justify-start" : "justify-end"
1198
+ ),
1199
+ children: [
1200
+ isPrevious && /* @__PURE__ */ jsx16(ChevronLeft, { className: "h-4 w-4" }),
1201
+ /* @__PURE__ */ jsx16("span", { children: isPrevious ? "Previous" : "Next" }),
1202
+ !isPrevious && /* @__PURE__ */ jsx16(ChevronRight, { className: "h-4 w-4" })
1203
+ ]
1204
+ }
1205
+ )
1206
+ ] })
1207
+ }
1208
+ );
1149
1209
  };
1150
- var resolveDocLink = (options) => {
1151
- const { currentPathname, href } = options;
1152
- if (href.startsWith("#") || isExternalHref(href)) {
1153
- return null;
1154
- }
1155
- const { pathname, hash } = splitHref(href);
1156
- const docsPathname = resolveDocsHref(options.docs.basePath, pathname);
1157
- if (!docsPathname) {
1210
+ var DocsPagination = ({
1211
+ previousPage: previousPageProp = null,
1212
+ nextPage: nextPageProp = null
1213
+ }) => {
1214
+ const paginationEnabled = useDocsGlobalContext().footer.pagination;
1215
+ const previousPage = previousPageProp;
1216
+ const nextPage = nextPageProp;
1217
+ if (!paginationEnabled) {
1158
1218
  return null;
1159
1219
  }
1160
- const page = getResolvedPageByPathname(options.docs, docsPathname);
1161
- if (!page) {
1220
+ if (!previousPage && !nextPage) {
1162
1221
  return null;
1163
1222
  }
1164
- const section = getResolvedSectionById(options.docs, page.sectionId);
1165
- return {
1166
- href: withSiteBaseUrl(`${page.href}${hash}`),
1167
- title: page.title,
1168
- breadcrumb: section ? [section.navTitle] : [],
1169
- isCurrentPage: isSamePagePathname(page, currentPathname)
1170
- };
1223
+ return /* @__PURE__ */ jsx16("nav", { className: "mb-10 mt-16", "aria-label": "Previous Next", children: /* @__PURE__ */ jsxs13("div", { className: "grid gap-4 sm:grid-cols-2", children: [
1224
+ previousPage && /* @__PURE__ */ jsx16(PaginationCard, { item: previousPage, direction: "previous" }),
1225
+ nextPage && /* @__PURE__ */ jsx16(PaginationCard, { isOffset: !previousPage, item: nextPage, direction: "next" })
1226
+ ] }) });
1171
1227
  };
1172
- var resolveOverviewItem = (options) => {
1173
- const page = options.docs.pages.find((candidate) => candidate.id === options.id);
1174
- if (!page) {
1175
- return null;
1176
- }
1177
- return {
1178
- title: page.title,
1179
- href: withSiteBaseUrl(page.href),
1180
- excerpt: page.description ?? null
1181
- };
1182
- };
1183
- var getMdxRuntimeValue = (options) => {
1184
- const { currentPathname, docs } = options;
1185
- const activeSection = getActiveSectionByPathname(docs, currentPathname);
1186
- const currentPage = getResolvedPageByPathname(docs, currentPathname);
1187
- return {
1188
- locale: "en",
1189
- codeBlockChoices: docsCodeBlockChoiceStore,
1190
- localizeHref: (href) => {
1191
- if (href.startsWith("#") || isExternalHref(href)) {
1192
- return href;
1193
- }
1194
- const { pathname, hash } = splitHref(href);
1195
- const docsPathname = resolveDocsHref(docs.basePath, pathname);
1196
- const page = docsPathname ? getResolvedPageByPathname(docs, docsPathname) : null;
1197
- if (!page) {
1198
- if (docsPathname && !pathname.startsWith("/")) {
1199
- return withSiteBaseUrl(`${docsPathname}${hash}`);
1200
- }
1201
- return withSiteBaseUrl(href);
1202
- }
1203
- return withSiteBaseUrl(`${page.href}${hash}`);
1204
- },
1205
- resolveDocLink: ({ href }) => resolveDocLink({
1206
- docs,
1207
- currentPathname,
1208
- href
1209
- }),
1210
- resolveOverviewItem: (id) => resolveOverviewItem({
1211
- docs,
1212
- id
1213
- }),
1214
- t: (group, key) => {
1215
- if (group === "docs" && key === "onThisPage") {
1216
- return "On this page";
1217
- }
1218
- if (group === "docs" && key === "previous") {
1219
- return "Previous";
1220
- }
1221
- if (group === "docs" && key === "next") {
1222
- return "Next";
1223
- }
1224
- if (group === "docs" && key === "currentSection") {
1225
- return activeSection?.navTitle ?? currentPage?.title ?? "Docs";
1226
- }
1227
- return key;
1228
- }
1229
- };
1230
- };
1231
-
1232
- // src/runtime/client/DocsPage.tsx
1233
- import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
1234
- var DocsPage = ({ Content }) => {
1235
- const pageContext = usePageContext5();
1236
- const docs = useDocsGlobalContext();
1237
- const { page } = useData();
1238
- return /* @__PURE__ */ jsx13(
1239
- UniversalMdxProvider,
1240
- {
1241
- value: getMdxRuntimeValue({
1242
- docs,
1243
- currentPathname: pageContext.urlPathname
1244
- }),
1245
- children: /* @__PURE__ */ jsxs10(ProseContainer, { "data-doc-content": "", children: [
1246
- /* @__PURE__ */ jsx13("h1", { className: "scroll-mt-24", children: renderInlineMarkdown(page.title) }),
1247
- /* @__PURE__ */ jsx13(Content, {})
1248
- ] })
1249
- }
1250
- );
1251
- };
1252
-
1253
- // src/runtime/client/DocsRouteLayout.tsx
1254
- import { useEffect as useEffect8, useLayoutEffect } from "react";
1255
- import { useData as useData2 } from "vike-react/useData";
1256
-
1257
- // src/runtime/client/components/DocsPagination.tsx
1258
- import { cmMerge as cmMerge6 } from "@classmatejs/react";
1259
- import { ChevronLeft, ChevronRight } from "lucide-react";
1260
- import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
1261
- var PaginationCard = ({ item, direction, isOffset }) => {
1262
- const isPrevious = direction === "previous";
1263
- return /* @__PURE__ */ jsx14(
1264
- "a",
1265
- {
1266
- href: withSiteBaseUrl(item.href),
1267
- className: cmMerge6(
1268
- "group rounded-box border border-base-muted-light bg-base-100 p-5 no-underline hover:border-primary-muted-medium hover:bg-base-200",
1269
- isPrevious ? "text-left" : "text-right",
1270
- isOffset && "sm:col-start-2"
1271
- ),
1272
- "aria-label": `${isPrevious ? "Previous" : "Next"}: ${item.title}`,
1273
- children: /* @__PURE__ */ jsxs11("div", { className: "flex flex-col justify-between gap-2", children: [
1274
- /* @__PURE__ */ jsx14("p", { className: "text-lg font-semibold text-base-content", children: renderInlineMarkdown(item.title) }),
1275
- /* @__PURE__ */ jsxs11(
1276
- "div",
1277
- {
1278
- className: cmMerge6(
1279
- "flex items-center gap-1 text-base-muted group-hover:text-base-content",
1280
- isPrevious ? "justify-start" : "justify-end"
1281
- ),
1282
- children: [
1283
- isPrevious && /* @__PURE__ */ jsx14(ChevronLeft, { className: "h-4 w-4" }),
1284
- /* @__PURE__ */ jsx14("span", { children: isPrevious ? "Previous" : "Next" }),
1285
- !isPrevious && /* @__PURE__ */ jsx14(ChevronRight, { className: "h-4 w-4" })
1286
- ]
1287
- }
1288
- )
1289
- ] })
1290
- }
1291
- );
1292
- };
1293
- var DocsPagination = ({
1294
- previousPage: previousPageProp = null,
1295
- nextPage: nextPageProp = null
1296
- }) => {
1297
- const paginationEnabled = useDocsGlobalContext().footer.pagination;
1298
- const previousPage = useDocsRouteStore((state) => state.previousPage) ?? previousPageProp;
1299
- const nextPage = useDocsRouteStore((state) => state.nextPage) ?? nextPageProp;
1300
- if (!paginationEnabled) {
1301
- return null;
1302
- }
1303
- if (!previousPage && !nextPage) {
1304
- return null;
1305
- }
1306
- return /* @__PURE__ */ jsx14("nav", { className: "mb-10 mt-16", "aria-label": "Previous Next", children: /* @__PURE__ */ jsxs11("div", { className: "grid gap-4 sm:grid-cols-2", children: [
1307
- previousPage && /* @__PURE__ */ jsx14(PaginationCard, { item: previousPage, direction: "previous" }),
1308
- nextPage && /* @__PURE__ */ jsx14(PaginationCard, { isOffset: !previousPage, item: nextPage, direction: "next" })
1309
- ] }) });
1310
- };
1311
-
1312
- // src/runtime/client/components/Footer.tsx
1313
- import { Bug, Pencil } from "lucide-react";
1314
- import { memo as memo4 } from "react";
1315
- import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
1316
- var DocsFooter = memo4(() => {
1317
- const { brand } = useDocsGlobalContext();
1318
- return /* @__PURE__ */ jsxs12("footer", { className: "mb-8 mt-12 text-sm border-t border-base-muted-light pt-10", children: [
1319
- /* @__PURE__ */ jsxs12("div", { className: "mb-16 flex items-center gap-2", children: [
1320
- /* @__PURE__ */ jsxs12("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
1321
- /* @__PURE__ */ jsx15(Pencil, { className: "w-3 h-3" }),
1322
- " Edit this page"
1323
- ] }),
1324
- /* @__PURE__ */ jsxs12("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
1325
- /* @__PURE__ */ jsx15(Bug, { className: "w-3 h-3" }),
1326
- " Report Issue"
1327
- ] })
1328
- ] }),
1329
- /* @__PURE__ */ jsxs12("div", { className: "flex justify-between items-center", children: [
1330
- /* @__PURE__ */ jsx15(SocialLinks_default, {}),
1331
- /* @__PURE__ */ jsx15("div", { className: "flex gap-2 items-center", children: brand && /* @__PURE__ */ jsx15(Brand, { brand, noText: true }) })
1332
- ] })
1333
- ] });
1334
- });
1335
-
1336
- // src/runtime/client/components/HeadingLinkCopy.tsx
1337
- import { useEffect as useEffect5 } from "react";
1338
- var copyText = async (value) => {
1339
- try {
1340
- await navigator.clipboard.writeText(value);
1341
- return;
1342
- } catch {
1343
- const textarea = document.createElement("textarea");
1344
- textarea.value = value;
1345
- textarea.setAttribute("readonly", "true");
1346
- textarea.style.position = "fixed";
1347
- textarea.style.opacity = "0";
1348
- document.body.appendChild(textarea);
1349
- textarea.select();
1350
- document.execCommand("copy");
1351
- document.body.removeChild(textarea);
1228
+
1229
+ // src/runtime/client/components/Footer.tsx
1230
+ import { Bug, Pencil } from "lucide-react";
1231
+ import { memo as memo3 } from "react";
1232
+ import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
1233
+ var DocsFooter = memo3(() => {
1234
+ const { brand } = useDocsGlobalContext();
1235
+ return /* @__PURE__ */ jsxs14("footer", { className: "mb-8 mt-12 text-sm border-t border-base-muted-light pt-10", children: [
1236
+ /* @__PURE__ */ jsxs14("div", { className: "mb-16 flex items-center gap-2", children: [
1237
+ /* @__PURE__ */ jsxs14("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
1238
+ /* @__PURE__ */ jsx17(Pencil, { className: "w-3 h-3" }),
1239
+ " Edit this page"
1240
+ ] }),
1241
+ /* @__PURE__ */ jsxs14("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
1242
+ /* @__PURE__ */ jsx17(Bug, { className: "w-3 h-3" }),
1243
+ " Report Issue"
1244
+ ] })
1245
+ ] }),
1246
+ /* @__PURE__ */ jsxs14("div", { className: "flex justify-between items-center", children: [
1247
+ /* @__PURE__ */ jsx17(SocialLinks_default, {}),
1248
+ /* @__PURE__ */ jsx17("div", { className: "flex gap-2 items-center", children: brand && /* @__PURE__ */ jsx17(Brand, { brand, noText: true }) })
1249
+ ] })
1250
+ ] });
1251
+ });
1252
+
1253
+ // src/runtime/client/components/HeadingLinkCopy.tsx
1254
+ import { useEffect as useEffect5 } from "react";
1255
+ var copyText = async (value) => {
1256
+ try {
1257
+ await navigator.clipboard.writeText(value);
1258
+ return;
1259
+ } catch {
1260
+ const textarea = document.createElement("textarea");
1261
+ textarea.value = value;
1262
+ textarea.setAttribute("readonly", "true");
1263
+ textarea.style.position = "fixed";
1264
+ textarea.style.opacity = "0";
1265
+ document.body.appendChild(textarea);
1266
+ textarea.select();
1267
+ document.execCommand("copy");
1268
+ document.body.removeChild(textarea);
1352
1269
  }
1353
1270
  };
1354
1271
  var getHeadingLink = (target) => target instanceof Element ? target.closest("a[data-copy-heading-link]") : null;
@@ -1384,8 +1301,9 @@ var HeadingLinkCopy = () => {
1384
1301
  };
1385
1302
 
1386
1303
  // src/runtime/client/components/Sidebar.tsx
1387
- import { cmMerge as cmMerge7 } from "@classmatejs/react";
1388
- import { memo as memo5, useEffect as useEffect6, useRef as useRef3 } from "react";
1304
+ import { cmMerge as cmMerge8 } from "@classmatejs/react";
1305
+ import { memo as memo4, useEffect as useEffect6, useRef as useRef3 } from "react";
1306
+ import { usePageContext as usePageContext5 } from "vike-react/usePageContext";
1389
1307
 
1390
1308
  // src/runtime/client/components/docsNavigation.ts
1391
1309
  var containsActiveHref = (items, currentHref) => {
@@ -1413,7 +1331,7 @@ var getVisibleGroupItems = (group) => {
1413
1331
  var getGroupHref = (group) => group.href ?? null;
1414
1332
 
1415
1333
  // src/runtime/client/components/Sidebar.tsx
1416
- import { Fragment as Fragment6, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
1334
+ import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
1417
1335
  var useAutoOpenDetails = (nodeId, isOpenByDefault, hasActiveDescendant) => {
1418
1336
  const storedOpen = useDocsSidebarStore((state) => state.openNodes[nodeId]);
1419
1337
  const { setNodeOpen } = useDocsSidebarActions();
@@ -1433,11 +1351,11 @@ var useAutoOpenDetails = (nodeId, isOpenByDefault, hasActiveDescendant) => {
1433
1351
  };
1434
1352
  };
1435
1353
  var SidebarPageLink = ({ title, href, currentHref }) => {
1436
- return /* @__PURE__ */ jsx16("li", { children: /* @__PURE__ */ jsx16(
1354
+ return /* @__PURE__ */ jsx18("li", { className: "rounded-none", children: /* @__PURE__ */ jsx18(
1437
1355
  "a",
1438
1356
  {
1439
1357
  href: withSiteBaseUrl(href),
1440
- className: cmMerge7(
1358
+ className: cmMerge8(
1441
1359
  "text-base-muted hover:text-base-content justify-start hover:bg-base-200",
1442
1360
  href === currentHref && "text-primary! font-semibold bg-base-200"
1443
1361
  ),
@@ -1446,13 +1364,13 @@ var SidebarPageLink = ({ title, href, currentHref }) => {
1446
1364
  ) });
1447
1365
  };
1448
1366
  var SidebarGroupDivider = ({ title }) => {
1449
- return /* @__PURE__ */ jsx16("li", { className: "ml-3 mt-2 mb-2 border-b border-base-muted-light text-xs text-base-muted-medium pointer-events-none font-semibold", children: /* @__PURE__ */ jsx16("span", { className: "-ml-3", children: renderInlineMarkdown(title, { codeClassName: "text-sm!" }) }) });
1367
+ return /* @__PURE__ */ jsx18("li", { className: "ml-3 mt-2 mb-2 border-b border-base-muted-light text-xs text-base-muted-medium pointer-events-none font-semibold", children: /* @__PURE__ */ jsx18("span", { className: "-ml-3", children: renderInlineMarkdown(title, { codeClassName: "text-sm!" }) }) });
1450
1368
  };
1451
1369
  var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) => {
1452
- const content = /* @__PURE__ */ jsx16(
1370
+ const content = /* @__PURE__ */ jsx18(
1453
1371
  "span",
1454
1372
  {
1455
- className: cmMerge7(
1373
+ className: cmMerge8(
1456
1374
  allowNavigation ? "font-medium" : "font-semibold",
1457
1375
  isActive && allowNavigation && "text-primary!"
1458
1376
  ),
@@ -1460,11 +1378,11 @@ var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) =>
1460
1378
  }
1461
1379
  );
1462
1380
  if (allowNavigation && href) {
1463
- return /* @__PURE__ */ jsx16(
1381
+ return /* @__PURE__ */ jsx18(
1464
1382
  "a",
1465
1383
  {
1466
1384
  href: withSiteBaseUrl(href),
1467
- className: cmMerge7(
1385
+ className: cmMerge8(
1468
1386
  "flex items-center gap-2 text-base-muted hover:text-base-content no-underline",
1469
1387
  isActive && "text-primary! font-semibold"
1470
1388
  ),
@@ -1472,19 +1390,19 @@ var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) =>
1472
1390
  }
1473
1391
  );
1474
1392
  }
1475
- return /* @__PURE__ */ jsx16("span", { className: "flex items-center gap-2 text-base-content", children: content });
1393
+ return /* @__PURE__ */ jsx18("span", { className: "flex items-center gap-2 text-base-content", children: content });
1476
1394
  };
1477
1395
  var renderSidebarItems = (items, currentHref) => {
1478
1396
  return items.map((item) => {
1479
1397
  if (item.kind === "page") {
1480
- return /* @__PURE__ */ jsx16(SidebarPageLink, { title: item.navTitle, href: item.href, currentHref }, item.id);
1398
+ return /* @__PURE__ */ jsx18(SidebarPageLink, { title: item.navTitle, href: item.href, currentHref }, item.id);
1481
1399
  }
1482
- return /* @__PURE__ */ jsx16(SidebarNestedGroup, { group: item, currentHref }, item.id);
1400
+ return /* @__PURE__ */ jsx18(SidebarNestedGroup, { group: item, currentHref }, item.id);
1483
1401
  });
1484
1402
  };
1485
1403
  var SidebarItemList = ({ items, currentHref }) => {
1486
1404
  const visibleItems = getVisibleNavItems(items);
1487
- return /* @__PURE__ */ jsx16("ul", { className: "menu w-full", children: renderSidebarItems(visibleItems, currentHref) });
1405
+ return /* @__PURE__ */ jsx18("ul", { className: "menu w-full", children: renderSidebarItems(visibleItems, currentHref) });
1488
1406
  };
1489
1407
  var SidebarNestedGroup = ({ group, currentHref }) => {
1490
1408
  const groupHref = getGroupHref(group);
@@ -1495,14 +1413,14 @@ var SidebarNestedGroup = ({ group, currentHref }) => {
1495
1413
  const { isOpen, setIsOpen } = useAutoOpenDetails(`group:${group.id}`, isOpenByDefault, nestedHasActiveItem);
1496
1414
  if (!isCollapsible) {
1497
1415
  if (!group.title) {
1498
- return /* @__PURE__ */ jsx16(Fragment6, { children: renderSidebarItems(visibleItems, currentHref) });
1416
+ return /* @__PURE__ */ jsx18(Fragment5, { children: renderSidebarItems(visibleItems, currentHref) });
1499
1417
  }
1500
- return /* @__PURE__ */ jsxs13(Fragment6, { children: [
1501
- /* @__PURE__ */ jsx16(SidebarGroupDivider, { title: group.title }),
1418
+ return /* @__PURE__ */ jsxs15(Fragment5, { children: [
1419
+ /* @__PURE__ */ jsx18(SidebarGroupDivider, { title: group.title }),
1502
1420
  renderSidebarItems(visibleItems, currentHref)
1503
1421
  ] });
1504
1422
  }
1505
- return /* @__PURE__ */ jsx16("li", { children: /* @__PURE__ */ jsxs13(
1423
+ return /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs15(
1506
1424
  "details",
1507
1425
  {
1508
1426
  open: isOpen,
@@ -1510,7 +1428,7 @@ var SidebarNestedGroup = ({ group, currentHref }) => {
1510
1428
  setIsOpen(event.currentTarget.open);
1511
1429
  },
1512
1430
  children: [
1513
- /* @__PURE__ */ jsx16("summary", { children: /* @__PURE__ */ jsx16(
1431
+ /* @__PURE__ */ jsx18("summary", { children: /* @__PURE__ */ jsx18(
1514
1432
  SidebarGroupTitle,
1515
1433
  {
1516
1434
  title: group.title,
@@ -1519,7 +1437,7 @@ var SidebarNestedGroup = ({ group, currentHref }) => {
1519
1437
  allowNavigation: Boolean(groupHref)
1520
1438
  }
1521
1439
  ) }),
1522
- visibleItems.length > 0 ? /* @__PURE__ */ jsx16(SidebarItemList, { items: visibleItems, currentHref }) : null
1440
+ visibleItems.length > 0 ? /* @__PURE__ */ jsx18(SidebarItemList, { items: visibleItems, currentHref }) : null
1523
1441
  ]
1524
1442
  }
1525
1443
  ) });
@@ -1531,7 +1449,7 @@ var SidebarSectionGroup = ({ section, currentHref, activeSectionId }) => {
1531
1449
  section.id === activeSectionId,
1532
1450
  sectionHasActiveItem
1533
1451
  );
1534
- return /* @__PURE__ */ jsx16("li", { className: "pb-4", children: /* @__PURE__ */ jsxs13(
1452
+ return /* @__PURE__ */ jsx18("li", { className: "pb-4", children: /* @__PURE__ */ jsxs15(
1535
1453
  "details",
1536
1454
  {
1537
1455
  open: isOpen,
@@ -1539,26 +1457,28 @@ var SidebarSectionGroup = ({ section, currentHref, activeSectionId }) => {
1539
1457
  setIsOpen(event.currentTarget.open);
1540
1458
  },
1541
1459
  children: [
1542
- /* @__PURE__ */ jsx16("summary", { children: /* @__PURE__ */ jsx16(SidebarGroupTitle, { title: section.title, isActive: sectionHasActiveItem }) }),
1543
- /* @__PURE__ */ jsx16(SidebarItemList, { items: section.items, currentHref })
1460
+ /* @__PURE__ */ jsx18("summary", { children: /* @__PURE__ */ jsx18(SidebarGroupTitle, { title: section.title, isActive: sectionHasActiveItem }) }),
1461
+ /* @__PURE__ */ jsx18(SidebarItemList, { items: section.items, currentHref })
1544
1462
  ]
1545
1463
  }
1546
1464
  ) });
1547
1465
  };
1548
- var Sidebar = memo5(
1466
+ var Sidebar = memo4(
1549
1467
  ({ currentHref: currentHrefProp = "", activeSectionId: activeSectionIdProp = "" }) => {
1550
1468
  const scrollContainerRef = useRef3(null);
1551
- const currentHref = useDocsRouteStore((state) => state.currentHref) || currentHrefProp;
1552
- const activeSectionId = useDocsRouteStore((state) => state.currentSectionId ?? "") || activeSectionIdProp;
1553
- const { sidebarSections } = useDocsGlobalContext();
1554
- return /* @__PURE__ */ jsx16("aside", { className: "hidden basis-76 shrink-0 lg:block", children: /* @__PURE__ */ jsxs13("div", { className: "-ml-3 sticky top-16", children: [
1555
- /* @__PURE__ */ jsx16("div", { className: "absolute h-full w-px right-0 top-0 bg-linear-to-t to-base-muted-light via-base-muted-light pointer-events-none z-1" }),
1556
- /* @__PURE__ */ jsx16(
1469
+ const { urlPathname } = usePageContext5();
1470
+ const currentHref = currentHrefProp || urlPathname;
1471
+ const docs = useDocsGlobalContext();
1472
+ const activeSectionId = activeSectionIdProp || getActiveSectionByPathname(docs, currentHref)?.id || "";
1473
+ const { sidebarSections } = docs;
1474
+ return /* @__PURE__ */ jsx18("aside", { className: "hidden basis-76 shrink-0 lg:block", children: /* @__PURE__ */ jsxs15("div", { className: "-ml-3 sticky top-14", children: [
1475
+ /* @__PURE__ */ jsx18("div", { className: "absolute h-full w-px right-0 top-0 bg-linear-to-t to-base-muted-light via-base-muted-light pointer-events-none z-1" }),
1476
+ /* @__PURE__ */ jsx18(
1557
1477
  "div",
1558
1478
  {
1559
1479
  ref: scrollContainerRef,
1560
- className: "pr-4 h-[calc(100svh-16*var(--spacing))] overflow-y-scroll overflow-x-hidden relative z-10",
1561
- children: /* @__PURE__ */ jsx16("ul", { className: cmMerge7("menu w-full px-0 py-5 li:last-child:border-0"), children: sidebarSections.map((section) => /* @__PURE__ */ jsx16(
1480
+ className: "pr-4 h-[calc(100svh-14*var(--spacing))] overflow-y-scroll relative z-10",
1481
+ children: /* @__PURE__ */ jsx18("ul", { className: cmMerge8("menu p-0 m-0 w-full px-0 pt-3 li:last-child:border-0"), children: sidebarSections.map((section) => /* @__PURE__ */ jsx18(
1562
1482
  SidebarSectionGroup,
1563
1483
  {
1564
1484
  section,
@@ -1574,10 +1494,213 @@ var Sidebar = memo5(
1574
1494
  );
1575
1495
 
1576
1496
  // src/runtime/client/components/TableOfContents.tsx
1577
- import cm4, { cmMerge as cmMerge8 } from "@classmatejs/react";
1497
+ import cm6, { cmMerge as cmMerge9 } from "@classmatejs/react";
1578
1498
  import { Flame, TableOfContentsIcon } from "lucide-react";
1499
+ import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
1500
+ var TableOfContents = ({
1501
+ headings: headingsProp = [],
1502
+ tableOfContents: tableOfContentsProp = false,
1503
+ activeHeadingId = "",
1504
+ setActiveHeadingId = () => void 0
1505
+ }) => {
1506
+ const { partners } = useDocsGlobalContext();
1507
+ const effectiveHeadings = headingsProp;
1508
+ const effectiveTableOfContents = tableOfContentsProp;
1509
+ return /* @__PURE__ */ jsx19("aside", { className: cmMerge9(effectiveTableOfContents ? "w-64" : "w-32", "hidden shrink-0 xl:block"), children: /* @__PURE__ */ jsx19("div", { className: "sticky top-14", children: /* @__PURE__ */ jsxs16("div", { className: "relative h-[calc(100svh-14*var(--spacing))] overflow-y-auto overflow-x-hidden pt-10 pb-8", children: [
1510
+ effectiveTableOfContents ? effectiveHeadings.length > 0 && /* @__PURE__ */ jsxs16(Fragment6, { children: [
1511
+ /* @__PURE__ */ jsxs16("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
1512
+ /* @__PURE__ */ jsx19(TableOfContentsIcon, { className: "h-3 w-3" }),
1513
+ "On this page"
1514
+ ] }),
1515
+ /* @__PURE__ */ jsx19("nav", { "aria-label": "On this page", className: "mb-12", children: /* @__PURE__ */ jsx19("ul", { children: effectiveHeadings.map((heading) => /* @__PURE__ */ jsx19("li", { children: /* @__PURE__ */ jsx19(
1516
+ "a",
1517
+ {
1518
+ href: `#${heading.id}`,
1519
+ "aria-current": activeHeadingId === heading.id ? "location" : void 0,
1520
+ onClick: () => setActiveHeadingId(heading.id),
1521
+ className: cmMerge9(
1522
+ "cursor-pointer block border-l border-base-muted-light py-1.5 text-sm text-base-muted hover:border-primary-muted hover:text-base-content",
1523
+ heading.depth > 2 ? "pl-6" : "pl-4",
1524
+ activeHeadingId === heading.id ? "border-l-2 border-primary font-semibold text-base-content" : ""
1525
+ ),
1526
+ children: heading.title
1527
+ }
1528
+ ) }, heading.id)) }) })
1529
+ ] }) : null,
1530
+ /* @__PURE__ */ jsx19(Adbar, { partners })
1531
+ ] }) }) });
1532
+ };
1533
+ var Adbar = ({ partners }) => {
1534
+ if (partners.primary.length === 0 && partners.gold.length === 0) {
1535
+ return null;
1536
+ }
1537
+ return /* @__PURE__ */ jsxs16("aside", { children: [
1538
+ /* @__PURE__ */ jsxs16("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
1539
+ /* @__PURE__ */ jsx19(Flame, { className: "h-3 w-3" }),
1540
+ "Partners"
1541
+ ] }),
1542
+ /* @__PURE__ */ jsxs16("ul", { className: "grid grid-cols-[repeat(auto-fit,minmax(5.5rem,1fr))] gap-3 opacity-90", children: [
1543
+ partners.primary.map((partner) => /* @__PURE__ */ jsx19(AdbarItem, { className: "col-span-full", children: /* @__PURE__ */ jsx19(AdbarLink, { href: partner.href, title: partner.name, children: /* @__PURE__ */ jsx19(PartnerLogo, { partner }) }) }, partner.name)),
1544
+ partners.gold.map((partner) => /* @__PURE__ */ jsx19(AdbarItem, { children: /* @__PURE__ */ jsx19(AdbarLink, { href: partner.href, title: partner.name, children: /* @__PURE__ */ jsx19(PartnerLogo, { partner }) }) }, partner.name))
1545
+ ] })
1546
+ ] });
1547
+ };
1548
+ var PartnerLogo = ({
1549
+ partner
1550
+ }) => {
1551
+ return /* @__PURE__ */ jsxs16(Fragment6, { children: [
1552
+ /* @__PURE__ */ jsx19(
1553
+ Image,
1554
+ {
1555
+ src: partner.logoLight,
1556
+ width: 200,
1557
+ height: 100,
1558
+ alt: partner.logoAlt,
1559
+ className: cmMerge9("block", partner.logoDark ? "dark:hidden" : "dark:invert")
1560
+ }
1561
+ ),
1562
+ partner.logoDark ? /* @__PURE__ */ jsx19(Image, { src: partner.logoDark, width: 200, height: 100, alt: partner.logoAlt, className: "hidden dark:block" }) : null
1563
+ ] });
1564
+ };
1565
+ var AdbarItem = cm6.div`
1566
+ px-5
1567
+ py-5
1568
+ bg-base-200
1569
+ text-center
1570
+ flex
1571
+ items-center
1572
+ justify-center
1573
+ rounded-field
1574
+ `;
1575
+ var AdbarLink = cm6.a`
1576
+ block
1577
+ w-full
1578
+ transition-opacity
1579
+ hover:opacity-100
1580
+ focus-visible:opacity-100
1581
+ `;
1582
+ var Image = cm6.img`
1583
+ mx-auto
1584
+ w-24
1585
+ `;
1586
+
1587
+ // src/runtime/client/components/TableOfContentsMobile.tsx
1588
+ import cm7 from "@classmatejs/react";
1589
+ import { TableOfContents as TableOfContents2 } from "lucide-react";
1590
+
1591
+ // src/runtime/client/components/BreadcrumbSidebarTrigger.tsx
1592
+ import { ChevronLast, ChevronsRight } from "lucide-react";
1593
+ import { useCallback as useCallback2 } from "react";
1594
+ import { usePageContext as usePageContext6 } from "vike-react/usePageContext";
1595
+ import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
1596
+ var dedupeBreadcrumbs = (items) => {
1597
+ return items.filter((item, index) => index === 0 || items[index - 1]?.title !== item.title);
1598
+ };
1599
+ var getSidebarBreadcrumbs = (items, currentHref) => {
1600
+ for (const item of items) {
1601
+ if (item.kind === "page") {
1602
+ if (item.href === currentHref) {
1603
+ return [{ id: item.id, title: item.navTitle }];
1604
+ }
1605
+ continue;
1606
+ }
1607
+ if (item.href === currentHref) {
1608
+ return item.title ? [{ id: item.id, title: item.title }] : [];
1609
+ }
1610
+ const nestedBreadcrumbs = getSidebarBreadcrumbs(item.items, currentHref);
1611
+ if (!nestedBreadcrumbs) {
1612
+ continue;
1613
+ }
1614
+ return dedupeBreadcrumbs(
1615
+ item.title ? [{ id: item.id, title: item.title }, ...nestedBreadcrumbs] : nestedBreadcrumbs
1616
+ );
1617
+ }
1618
+ return null;
1619
+ };
1620
+ var BreadcrumbSidebarTrigger = () => {
1621
+ const { urlPathname } = usePageContext6();
1622
+ const docs = useDocsGlobalContext();
1623
+ const activeSection = getActiveSectionByPathname(docs, urlPathname);
1624
+ const breadcrumbItems = dedupeBreadcrumbs([
1625
+ ...activeSection ? [{ id: activeSection.id, title: activeSection.navTitle }] : [],
1626
+ ...activeSection ? getSidebarBreadcrumbs(activeSection.items, urlPathname) ?? [] : []
1627
+ ]);
1628
+ const mobileBreadcrumbItems = breadcrumbItems.length > 3 ? breadcrumbItems.slice(0, 2) : breadcrumbItems;
1629
+ const handleClick = useCallback2(() => {
1630
+ alert("TODO: Open sidebar");
1631
+ }, []);
1632
+ return /* @__PURE__ */ jsx20("button", { className: "cursor-pointer min-w-0 max-w-full", type: "button", onClick: handleClick, children: /* @__PURE__ */ jsxs17("span", { className: "flex items-center gap-1 min-w-0 overflow-hidden lg:hidden", children: [
1633
+ /* @__PURE__ */ jsx20(ChevronLast, { className: "w-4 h-4 shrink-0 text-primary" }),
1634
+ /* @__PURE__ */ jsx20("span", { className: "hidden md:flex items-center gap-1", children: breadcrumbItems.map((item, index) => /* @__PURE__ */ jsxs17("span", { className: "contents", children: [
1635
+ index > 0 ? /* @__PURE__ */ jsx20(ChevronsRight, { className: "w-4 h-4 shrink-0 text-base-muted-medium" }) : null,
1636
+ /* @__PURE__ */ jsx20("span", { className: index === 0 ? "font-semibold truncate" : "text-sm truncate", children: renderInlineMarkdown(item.title, { codeClassName: "text-sm!" }) })
1637
+ ] }, item.id)) }),
1638
+ /* @__PURE__ */ jsx20("span", { className: "md:hidden text-sm", children: mobileBreadcrumbItems.map((item) => item.title).join(" / ") })
1639
+ ] }) });
1640
+ };
1641
+ var BreadcrumbSidebarTrigger_default = BreadcrumbSidebarTrigger;
1642
+
1643
+ // src/runtime/client/components/TableOfContentsMobile.tsx
1644
+ import { Fragment as Fragment7, jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
1645
+ var TableOfContentsMobile = ({
1646
+ headings = [],
1647
+ tableOfContents = false,
1648
+ pageTitle = "On this page",
1649
+ activeHeadingId = "",
1650
+ setActiveHeadingId = () => void 0
1651
+ }) => {
1652
+ const topOptionValue = "__docs-page-top__";
1653
+ const selectedValue = tableOfContents && headings.some((heading) => heading.id === activeHeadingId) ? activeHeadingId : "";
1654
+ return /* @__PURE__ */ jsxs18(Fragment7, { children: [
1655
+ /* @__PURE__ */ jsx21("div", { className: "h-12 xl:hidden" }),
1656
+ /* @__PURE__ */ jsx21(StyledTOC, { children: /* @__PURE__ */ jsxs18(StyledTOCInner, { children: [
1657
+ /* @__PURE__ */ jsx21(BreadcrumbSidebarTrigger_default, {}),
1658
+ /* @__PURE__ */ jsxs18("label", { className: "select select-sm md:w-60 w-30", htmlFor: "table-of-contents-select", children: [
1659
+ /* @__PURE__ */ jsx21("span", { className: "label", children: /* @__PURE__ */ jsx21(TableOfContents2, { className: "w-4 h-4" }) }),
1660
+ /* @__PURE__ */ jsxs18(
1661
+ "select",
1662
+ {
1663
+ id: "table-of-contents-select",
1664
+ value: selectedValue || topOptionValue,
1665
+ onChange: (e) => {
1666
+ const value = e.target.value;
1667
+ if (value === topOptionValue) {
1668
+ setActiveHeadingId("");
1669
+ window.history.replaceState(null, "", `${window.location.pathname}${window.location.search}`);
1670
+ window.scrollTo({ top: 0, behavior: "auto" });
1671
+ return;
1672
+ }
1673
+ setActiveHeadingId(value);
1674
+ window.location.hash = encodeURIComponent(value);
1675
+ },
1676
+ children: [
1677
+ /* @__PURE__ */ jsx21("option", { value: topOptionValue, children: pageTitle }),
1678
+ tableOfContents && headings.map((heading) => /* @__PURE__ */ jsx21("option", { value: heading.id, children: heading.title }, heading.id))
1679
+ ]
1680
+ }
1681
+ )
1682
+ ] })
1683
+ ] }) })
1684
+ ] });
1685
+ };
1686
+ var TableOfContentsMobile_default = TableOfContentsMobile;
1687
+ var StyledTOC = cm7.div`
1688
+ block xl:hidden
1689
+ fixed
1690
+ bg-base-100 border-b-base-muted-light
1691
+ w-full h-14
1692
+ top-14 left-0 border-b z-5
1693
+ lg:w-[calc(100svw-80*var(--spacing))]
1694
+ lg:left-80
1695
+ `;
1696
+ var StyledTOCInner = cm7.div`
1697
+ absolute inset-0 flex justify-between items-center
1698
+ pr-4
1699
+ px-4 lg:pl-14
1700
+ `;
1701
+
1702
+ // src/runtime/client/components/useTableOfContentsState.ts
1579
1703
  import { useEffect as useEffect7, useState as useState4 } from "react";
1580
- import { Fragment as Fragment7, jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
1581
1704
  var getCurrentHash = () => {
1582
1705
  try {
1583
1706
  return decodeURIComponent(window.location.hash);
@@ -1614,7 +1737,8 @@ var syncHeadingsFromDom = (setDomHeadings) => {
1614
1737
  if (!title) {
1615
1738
  return null;
1616
1739
  }
1617
- element.classList.add("scroll-mt-24");
1740
+ element.classList.add("scroll-mt-32");
1741
+ element.classList.add("xl:scroll-mt-24");
1618
1742
  const id = element.id || slugify(title);
1619
1743
  if (!element.id) {
1620
1744
  element.id = id;
@@ -1638,7 +1762,7 @@ var updateActiveHeadingFromScroll = (setActiveHeadingId) => {
1638
1762
  return;
1639
1763
  }
1640
1764
  const activationOffset = 144;
1641
- let nextActiveHeadingId = headingElements[0]?.id ?? "";
1765
+ let nextActiveHeadingId = "";
1642
1766
  for (const heading of headingElements) {
1643
1767
  if (!heading.id) {
1644
1768
  continue;
@@ -1655,18 +1779,12 @@ var updateActiveHeadingFromScroll = (setActiveHeadingId) => {
1655
1779
  }
1656
1780
  setActiveHeadingId(nextActiveHeadingId);
1657
1781
  };
1658
- var TableOfContents = ({
1659
- headings: headingsProp = [],
1660
- tableOfContents: tableOfContentsProp = false
1782
+ var useTableOfContentsState = ({
1783
+ headings: routeHeadings = []
1661
1784
  }) => {
1662
- const { partners } = useDocsGlobalContext();
1663
- const headings = useDocsRouteStore((state) => state.headings);
1664
- const tableOfContents = useDocsRouteStore((state) => state.tableOfContents);
1665
- const effectiveRouteHeadings = headings.length > 0 ? headings : headingsProp;
1666
- const effectiveTableOfContents = tableOfContents || tableOfContentsProp;
1667
1785
  const [activeHeadingId, setActiveHeadingId] = useState4("");
1668
- const [domHeadings, setDomHeadings] = useState4(effectiveRouteHeadings);
1669
- const effectiveHeadings = domHeadings.length > 0 ? domHeadings : effectiveRouteHeadings;
1786
+ const [domHeadings, setDomHeadings] = useState4(routeHeadings);
1787
+ const effectiveHeadings = domHeadings.length > 0 ? domHeadings : routeHeadings;
1670
1788
  useEffect7(() => {
1671
1789
  let scrollFrame = 0;
1672
1790
  const syncActiveHeading = () => {
@@ -1708,126 +1826,180 @@ var TableOfContents = ({
1708
1826
  return;
1709
1827
  }
1710
1828
  setDomHeadings((currentHeadings) => {
1711
- if (areHeadingsEqual(currentHeadings, effectiveRouteHeadings)) {
1829
+ if (areHeadingsEqual(currentHeadings, routeHeadings)) {
1712
1830
  return currentHeadings;
1713
1831
  }
1714
- return effectiveRouteHeadings;
1832
+ return routeHeadings;
1715
1833
  });
1716
1834
  setActiveHeadingId("");
1717
1835
  queueMicrotask(() => {
1718
1836
  syncHeadingsFromDom(setDomHeadings);
1719
1837
  updateActiveHeadingFromScroll(setActiveHeadingId);
1720
1838
  });
1721
- }, [effectiveRouteHeadings]);
1722
- return /* @__PURE__ */ jsx17("aside", { className: cmMerge8(effectiveTableOfContents ? "w-64" : "w-32", "hidden shrink-0 xl:block"), children: /* @__PURE__ */ jsx17("div", { className: "sticky top-16", children: /* @__PURE__ */ jsxs14("div", { className: "relative h-[calc(100svh-16*var(--spacing))] overflow-y-auto overflow-x-hidden pt-10 pb-8", children: [
1723
- effectiveTableOfContents ? effectiveHeadings.length > 0 && /* @__PURE__ */ jsxs14(Fragment7, { children: [
1724
- /* @__PURE__ */ jsxs14("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
1725
- /* @__PURE__ */ jsx17(TableOfContentsIcon, { className: "h-3 w-3" }),
1726
- "On this page"
1839
+ }, [routeHeadings]);
1840
+ return {
1841
+ activeHeadingId,
1842
+ effectiveHeadings,
1843
+ setActiveHeadingId
1844
+ };
1845
+ };
1846
+
1847
+ // src/runtime/client/DocsLayout.tsx
1848
+ import { Fragment as Fragment8, jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
1849
+ var DocsLayout = ({ children }) => {
1850
+ const data = useData();
1851
+ const { activeHeadingId, effectiveHeadings, setActiveHeadingId } = useTableOfContentsState({
1852
+ headings: data.headings
1853
+ });
1854
+ return /* @__PURE__ */ jsxs19(Fragment8, { children: [
1855
+ /* @__PURE__ */ jsx22(HeadingLinkCopy, {}),
1856
+ /* @__PURE__ */ jsx22("div", { className: "absolute top-0 left-0 h-[60svh] w-full bg-radial-[at_65%_-85%] from-primary-muted-light/40 to-65% dark:from-primary-muted-light/60" }),
1857
+ /* @__PURE__ */ jsx22(LayoutComponent, { children: /* @__PURE__ */ jsxs19("div", { className: "lg:flex gap-14", children: [
1858
+ /* @__PURE__ */ jsx22(Sidebar, { currentHref: data.page.href, activeSectionId: data.page.sectionId }),
1859
+ /* @__PURE__ */ jsxs19("main", { className: "min-w-0 flex-1 basis-auto shrink", children: [
1860
+ /* @__PURE__ */ jsx22(
1861
+ TableOfContentsMobile_default,
1862
+ {
1863
+ headings: effectiveHeadings,
1864
+ tableOfContents: data.page.tableOfContents && effectiveHeadings.length > 0,
1865
+ pageTitle: data.page.title,
1866
+ activeHeadingId,
1867
+ setActiveHeadingId
1868
+ }
1869
+ ),
1870
+ /* @__PURE__ */ jsx22("div", { className: "mt-10 min-w-0", children }),
1871
+ /* @__PURE__ */ jsx22(DocsPagination, { previousPage: data.previousPage, nextPage: data.nextPage }),
1872
+ /* @__PURE__ */ jsx22(DocsFooter, {})
1727
1873
  ] }),
1728
- /* @__PURE__ */ jsx17("nav", { "aria-label": "On this page", className: "mb-12", children: /* @__PURE__ */ jsx17("ul", { children: effectiveHeadings.map((heading, index) => /* @__PURE__ */ jsx17("li", { children: /* @__PURE__ */ jsx17(
1729
- "a",
1874
+ /* @__PURE__ */ jsx22(
1875
+ TableOfContents,
1730
1876
  {
1731
- href: `#${heading.id}`,
1732
- "aria-current": activeHeadingId === heading.id ? "location" : void 0,
1733
- onClick: () => setActiveHeadingId(heading.id),
1734
- className: cmMerge8(
1735
- "cursor-pointer block border-l border-base-muted-light py-1.5 text-sm text-base-muted hover:border-primary-muted hover:text-base-content",
1736
- heading.depth > 2 ? "pl-6" : "pl-4",
1737
- activeHeadingId ? activeHeadingId === heading.id ? "border-l-2 border-primary font-semibold text-base-content" : "" : index === 0 ? "border-l-2 border-primary font-semibold text-base-content" : ""
1738
- ),
1739
- children: heading.title
1877
+ headings: effectiveHeadings,
1878
+ tableOfContents: data.page.tableOfContents,
1879
+ activeHeadingId,
1880
+ setActiveHeadingId
1740
1881
  }
1741
- ) }, heading.id)) }) })
1742
- ] }) : null,
1743
- /* @__PURE__ */ jsx17(Adbar, { partners })
1744
- ] }) }) });
1882
+ )
1883
+ ] }) })
1884
+ ] });
1745
1885
  };
1746
- var Adbar = ({ partners }) => {
1747
- if (partners.primary.length === 0 && partners.gold.length === 0) {
1886
+
1887
+ // src/runtime/client/DocsPage.tsx
1888
+ import { useData as useData2 } from "vike-react/useData";
1889
+ import { usePageContext as usePageContext7 } from "vike-react/usePageContext";
1890
+
1891
+ // src/runtime/client/getMdxRuntimeValue.tsx
1892
+ var isExternalHref = (href) => {
1893
+ return /^(?:[a-z]+:)?\/\//i.test(href) || href.startsWith("mailto:") || href.startsWith("tel:");
1894
+ };
1895
+ var splitHref = (href) => {
1896
+ const [pathname, hash = ""] = href.split("#");
1897
+ return {
1898
+ pathname,
1899
+ hash: hash ? `#${hash}` : ""
1900
+ };
1901
+ };
1902
+ var resolveDocLink = (options) => {
1903
+ const { currentPathname, href } = options;
1904
+ if (href.startsWith("#") || isExternalHref(href)) {
1748
1905
  return null;
1749
1906
  }
1750
- return /* @__PURE__ */ jsxs14("aside", { children: [
1751
- /* @__PURE__ */ jsxs14("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
1752
- /* @__PURE__ */ jsx17(Flame, { className: "h-3 w-3" }),
1753
- "Partners"
1754
- ] }),
1755
- /* @__PURE__ */ jsxs14("ul", { className: "grid grid-cols-[repeat(auto-fit,minmax(5.5rem,1fr))] gap-3 opacity-90", children: [
1756
- partners.primary.map((partner) => /* @__PURE__ */ jsx17(AdbarItem, { className: "col-span-full", children: /* @__PURE__ */ jsx17(AdbarLink, { href: partner.href, title: partner.name, children: /* @__PURE__ */ jsx17(PartnerLogo, { partner }) }) }, partner.name)),
1757
- partners.gold.map((partner) => /* @__PURE__ */ jsx17(AdbarItem, { children: /* @__PURE__ */ jsx17(AdbarLink, { href: partner.href, title: partner.name, children: /* @__PURE__ */ jsx17(PartnerLogo, { partner }) }) }, partner.name))
1758
- ] })
1759
- ] });
1907
+ const { pathname, hash } = splitHref(href);
1908
+ const docsPathname = resolveDocsHref(options.docs.basePath, pathname);
1909
+ if (!docsPathname) {
1910
+ return null;
1911
+ }
1912
+ const page = getResolvedPageByPathname(options.docs, docsPathname);
1913
+ if (!page) {
1914
+ return null;
1915
+ }
1916
+ const section = getResolvedSectionById(options.docs, page.sectionId);
1917
+ return {
1918
+ href: withSiteBaseUrl(`${page.href}${hash}`),
1919
+ title: page.title,
1920
+ breadcrumb: section ? [section.navTitle] : [],
1921
+ isCurrentPage: isSamePagePathname(page, currentPathname)
1922
+ };
1760
1923
  };
1761
- var PartnerLogo = ({
1762
- partner
1763
- }) => {
1764
- return /* @__PURE__ */ jsxs14(Fragment7, { children: [
1765
- /* @__PURE__ */ jsx17(
1766
- Image,
1767
- {
1768
- src: partner.logoLight,
1769
- width: 200,
1770
- height: 100,
1771
- alt: partner.logoAlt,
1772
- className: cmMerge8("block", partner.logoDark ? "dark:hidden" : "dark:invert")
1924
+ var resolveOverviewItem = (options) => {
1925
+ const page = options.docs.pages.find((candidate) => candidate.id === options.id);
1926
+ if (!page) {
1927
+ return null;
1928
+ }
1929
+ return {
1930
+ title: page.title,
1931
+ href: withSiteBaseUrl(page.href),
1932
+ excerpt: page.description ?? null
1933
+ };
1934
+ };
1935
+ var getMdxRuntimeValue = (options) => {
1936
+ const { currentPathname, docs } = options;
1937
+ const activeSection = getActiveSectionByPathname(docs, currentPathname);
1938
+ const currentPage = getResolvedPageByPathname(docs, currentPathname);
1939
+ return {
1940
+ locale: "en",
1941
+ codeBlockChoices: docsCodeBlockChoiceStore,
1942
+ localizeHref: (href) => {
1943
+ if (href.startsWith("#") || isExternalHref(href)) {
1944
+ return href;
1773
1945
  }
1774
- ),
1775
- partner.logoDark ? /* @__PURE__ */ jsx17(Image, { src: partner.logoDark, width: 200, height: 100, alt: partner.logoAlt, className: "hidden dark:block" }) : null
1776
- ] });
1946
+ const { pathname, hash } = splitHref(href);
1947
+ const docsPathname = resolveDocsHref(docs.basePath, pathname);
1948
+ const page = docsPathname ? getResolvedPageByPathname(docs, docsPathname) : null;
1949
+ if (!page) {
1950
+ if (docsPathname && !pathname.startsWith("/")) {
1951
+ return withSiteBaseUrl(`${docsPathname}${hash}`);
1952
+ }
1953
+ return withSiteBaseUrl(href);
1954
+ }
1955
+ return withSiteBaseUrl(`${page.href}${hash}`);
1956
+ },
1957
+ resolveDocLink: ({ href }) => resolveDocLink({
1958
+ docs,
1959
+ currentPathname,
1960
+ href
1961
+ }),
1962
+ resolveOverviewItem: (id) => resolveOverviewItem({
1963
+ docs,
1964
+ id
1965
+ }),
1966
+ t: (group, key) => {
1967
+ if (group === "docs" && key === "onThisPage") {
1968
+ return "On this page";
1969
+ }
1970
+ if (group === "docs" && key === "previous") {
1971
+ return "Previous";
1972
+ }
1973
+ if (group === "docs" && key === "next") {
1974
+ return "Next";
1975
+ }
1976
+ if (group === "docs" && key === "currentSection") {
1977
+ return activeSection?.navTitle ?? currentPage?.title ?? "Docs";
1978
+ }
1979
+ return key;
1980
+ }
1981
+ };
1777
1982
  };
1778
- var AdbarItem = cm4.div`
1779
- px-5
1780
- py-5
1781
- bg-base-200
1782
- text-center
1783
- flex
1784
- items-center
1785
- justify-center
1786
- rounded-field
1787
- `;
1788
- var AdbarLink = cm4.a`
1789
- block
1790
- w-full
1791
- transition-opacity
1792
- hover:opacity-100
1793
- focus-visible:opacity-100
1794
- `;
1795
- var Image = cm4.img`
1796
- mx-auto
1797
- w-24
1798
- `;
1799
1983
 
1800
- // src/runtime/client/DocsRouteLayout.tsx
1801
- import { Fragment as Fragment8, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
1802
- var useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect8 : useLayoutEffect;
1803
- var DocsRouteStateSync = ({ data }) => {
1804
- const { clearPageData, setPageData } = useDocsRouteActions();
1805
- useIsomorphicLayoutEffect(() => {
1806
- setPageData(data);
1807
- }, [data, setPageData]);
1808
- useEffect8(() => {
1809
- return () => {
1810
- clearPageData();
1811
- };
1812
- }, [clearPageData]);
1813
- return null;
1814
- };
1815
- var DocsRouteLayout = ({ children }) => {
1816
- const data = useData2();
1817
- return /* @__PURE__ */ jsxs15(Fragment8, { children: [
1818
- /* @__PURE__ */ jsx18(DocsRouteStateSync, { data }),
1819
- /* @__PURE__ */ jsx18(HeadingLinkCopy, {}),
1820
- /* @__PURE__ */ jsx18("div", { className: "absolute top-0 left-0 h-[60svh] w-full bg-radial-[at_65%_-85%] from-primary-muted-light/40 to-65% dark:from-primary-muted-light/60" }),
1821
- /* @__PURE__ */ jsx18(LayoutComponent, { children: /* @__PURE__ */ jsxs15("div", { className: "lg:flex lg:gap-10 xl:gap-14", children: [
1822
- /* @__PURE__ */ jsx18(Sidebar, { currentHref: data.page.href, activeSectionId: data.page.sectionId }),
1823
- /* @__PURE__ */ jsxs15("main", { className: "mt-10 min-w-0 flex-1 basis-auto shrink", children: [
1824
- children,
1825
- /* @__PURE__ */ jsx18(DocsPagination, { previousPage: data.previousPage, nextPage: data.nextPage }),
1826
- /* @__PURE__ */ jsx18(DocsFooter, {})
1827
- ] }),
1828
- /* @__PURE__ */ jsx18(TableOfContents, { headings: data.headings, tableOfContents: data.page.tableOfContents })
1829
- ] }) })
1830
- ] });
1984
+ // src/runtime/client/DocsPage.tsx
1985
+ import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
1986
+ var DocsPage = ({ Content }) => {
1987
+ const pageContext = usePageContext7();
1988
+ const docs = useDocsGlobalContext();
1989
+ const { page } = useData2();
1990
+ return /* @__PURE__ */ jsx23(
1991
+ UniversalMdxProvider,
1992
+ {
1993
+ value: getMdxRuntimeValue({
1994
+ docs,
1995
+ currentPathname: pageContext.urlPathname
1996
+ }),
1997
+ children: /* @__PURE__ */ jsxs20(ProseContainer, { "data-doc-content": "", children: [
1998
+ /* @__PURE__ */ jsx23("h1", { className: "scroll-mt-32 xl:scroll-mt-24", children: renderInlineMarkdown(page.title) }),
1999
+ /* @__PURE__ */ jsx23(Content, {})
2000
+ ] })
2001
+ }
2002
+ );
1831
2003
  };
1832
2004
 
1833
2005
  export {
@@ -1835,8 +2007,6 @@ export {
1835
2007
  useDocsSearchActions,
1836
2008
  useDocsSidebarStore,
1837
2009
  useDocsSidebarActions,
1838
- useDocsRouteStore,
1839
- useDocsRouteActions,
1840
2010
  LayoutComponent,
1841
2011
  useDocsUserSettingsStore,
1842
2012
  DEFAULT_THEME_PREFERENCE,
@@ -1845,7 +2015,7 @@ export {
1845
2015
  AppLayout,
1846
2016
  MetaHead,
1847
2017
  ProseContainer,
1848
- DocsPage,
1849
- DocsRouteLayout
2018
+ DocsLayout,
2019
+ DocsPage
1850
2020
  };
1851
- //# sourceMappingURL=chunk-5QP3Y2DU.js.map
2021
+ //# sourceMappingURL=chunk-F4OBB7JD.js.map