@unterberg/nivel 0.1.8 → 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,111 +975,69 @@ 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__ */ jsxs5(StyledNavbar, { $border: isLandingPage, children: [
907
- /* @__PURE__ */ jsx7(LayoutComponent, { className: "h-full hidden md:block", children: isLandingPage ? /* @__PURE__ */ jsxs5("div", { className: "relative z-3 flex h-full items-center justify-between py-4", children: [
908
- /* @__PURE__ */ jsx7("div", { className: "flex flex-1 items-center gap-4", children: /* @__PURE__ */ jsx7(Brand, { brand: docs.brand }) }),
909
- /* @__PURE__ */ jsx7(
910
- "nav",
911
- {
912
- "aria-label": "Primary",
913
- className: "top-0 left-0 flex min-w-0 flex-1 items-center justify-center gap-4 overflow-x-auto",
914
- children: /* @__PURE__ */ jsxs5("ul", { className: "flex items-center font-semibold", children: [
915
- docs.navbarItems.map((item) => /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsx7(
916
- "a",
917
- {
918
- href: withSiteBaseUrl(item.href),
919
- className: "h-full block py-3.25",
920
- onPointerEnter: () => openMegaMenu(item.id),
921
- onPointerLeave: scheduleMegaMenuClose,
922
- onFocus: () => openMegaMenu(item.id),
923
- onBlur: scheduleMegaMenuClose,
924
- onClick: closeMegaMenu,
925
- children: /* @__PURE__ */ jsxs5(
926
- "span",
927
- {
928
- className: cmMerge4("btn text-lg btn-ghost min-w-30 px-2 whitespace-nowrap tracking-tight"),
929
- children: [
930
- renderInlineMarkdown(item.title),
931
- /* @__PURE__ */ jsx7(ChevronDown, { className: "h-4 w-4 shrink-0" })
932
- ]
933
- }
934
- )
935
- }
936
- ) }, item.id)),
937
- docs.algolia ? /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsxs5(
938
- "button",
939
- {
940
- type: "button",
941
- onClick: toggleSearch,
942
- className: "btn btn-ghost min-w-30 px-2 text-lg whitespace-nowrap tracking-tight",
943
- children: [
944
- "Search",
945
- /* @__PURE__ */ jsx7(TextSearch, { className: "h-4 w-4" })
946
- ]
947
- }
948
- ) }) : null
949
- ] })
950
- }
951
- ),
952
- /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 items-center justify-end gap-2", children: [
953
- /* @__PURE__ */ jsx7(SocialLinks_default, {}),
954
- /* @__PURE__ */ jsx7(ThemeSwitch, { theme: docs.theme })
955
- ] })
956
- ] }) : /* @__PURE__ */ jsxs5("div", { className: "relative z-3 flex h-full items-center justify-between py-4", children: [
957
- /* @__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 }) }),
958
- /* @__PURE__ */ jsxs5(
959
- "nav",
960
- {
961
- "aria-label": "Primary",
962
- className: "top-0 left-0 flex flex-1 items-center justify-start gap-4 overflow-x-auto lg:pl-6 xl:pl-10",
963
- children: [
964
- /* @__PURE__ */ jsx7("ul", { className: "flex items-center gap-2 font-semibold", children: docs.navbarItems.map((item) => /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsx7(
965
- "a",
966
- {
967
- href: withSiteBaseUrl(item.href),
968
- onPointerEnter: () => openMegaMenu(item.id),
969
- onPointerLeave: scheduleMegaMenuClose,
970
- onFocus: () => openMegaMenu(item.id),
971
- onBlur: scheduleMegaMenuClose,
972
- onClick: closeMegaMenu,
973
- className: cmMerge4(
974
- "btn btn-sm px-2 whitespace-nowrap text-base tracking-tight",
975
- item.id === activeSection?.id ? "btn-primary btn-soft" : "btn-ghost"
976
- ),
977
- children: renderInlineMarkdown(item.title)
978
- }
979
- ) }, item.id)) }),
980
- /* @__PURE__ */ jsx7(SearchTrigger, {})
981
- ]
982
- }
983
- ),
984
- /* @__PURE__ */ jsxs5("div", { className: "flex w-78 flex-1 items-center justify-end gap-2 lg:flex-none", children: [
985
- /* @__PURE__ */ jsx7(SocialLinks_default, {}),
986
- /* @__PURE__ */ jsx7(ThemeSwitch, { theme: docs.theme })
987
- ] })
988
- ] }) }),
989
- /* @__PURE__ */ jsx7(
990
- MegaMenu,
991
- {
992
- sections,
993
- activeSectionId: activeSection?.id,
994
- hoveredSectionId,
995
- isActive: isMegaMenuOpen,
996
- onOpen: openMegaMenu,
997
- onClose: scheduleMegaMenuClose,
998
- isLandingPage
999
- }
1000
- )
1001
- ] }),
1002
- /* @__PURE__ */ jsx7(StyledNavbar, { $border: false, className: "block md:hidden ", children: "MOBILE" }),
1003
- /* @__PURE__ */ jsx7(Search, {})
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(
1024
+ MegaMenu,
1025
+ {
1026
+ sections,
1027
+ activeSectionId: activeSection?.id,
1028
+ hoveredSectionId,
1029
+ isActive: isMegaMenuOpen,
1030
+ onOpen: openMegaMenu,
1031
+ onClose: scheduleMegaMenuClose,
1032
+ isLandingPage
1033
+ }
1034
+ )
1004
1035
  ] });
1005
- });
1006
- var StyledNavbar = cm2.header`
1007
- 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
1008
1041
  ${({ $border }) => $border ? "relative" : "fixed"}
1009
1042
  `;
1010
1043
 
@@ -1027,7 +1060,7 @@ var UserSettingsSync = ({ theme }) => {
1027
1060
  };
1028
1061
 
1029
1062
  // src/runtime/client/AppLayout.tsx
1030
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1063
+ import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
1031
1064
  var queryClient = new QueryClient();
1032
1065
  var runtimeStore = createDocsRuntimeStore();
1033
1066
  var AppLayout = ({ children, header }) => {
@@ -1035,42 +1068,42 @@ var AppLayout = ({ children, header }) => {
1035
1068
  const pageContext = usePageContext4();
1036
1069
  const docs = getDocsFromGlobalContext(pageContext);
1037
1070
  const isLandingPage = urlPathname === "/";
1038
- return /* @__PURE__ */ jsx8(DocsRuntimeStoreProvider, { store: runtimeStore, children: /* @__PURE__ */ jsx8(DocsGlobalContextProvider, { docs, children: /* @__PURE__ */ jsxs6(QueryClientProvider, { client: queryClient, children: [
1039
- /* @__PURE__ */ jsx8(UserSettingsSync, { theme: docs.theme }),
1040
- /* @__PURE__ */ jsxs6("div", { className: "min-h-screen bg-base-100 text-base-content", children: [
1041
- header ?? /* @__PURE__ */ jsx8(Navbar, {}),
1042
- /* @__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 })
1043
1076
  ] })
1044
1077
  ] }) }) });
1045
1078
  };
1046
1079
 
1047
1080
  // src/runtime/client/components/MetaHead/FaviconLinks.tsx
1048
- 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";
1049
1082
  var FaviconLinks = ({ head }) => {
1050
1083
  const { appleTouchIcon, faviconIco, faviconSvg } = head;
1051
- return /* @__PURE__ */ jsxs7(Fragment3, { children: [
1052
- appleTouchIcon && /* @__PURE__ */ jsx9("link", { rel: "apple-touch-icon", href: appleTouchIcon }),
1053
- faviconSvg && /* @__PURE__ */ jsx9("link", { rel: "icon", type: "image/svg+xml", href: faviconSvg }),
1054
- faviconIco && /* @__PURE__ */ jsxs7(Fragment3, { children: [
1055
- /* @__PURE__ */ jsx9("link", { rel: "shortcut icon", type: "image/x-icon", href: faviconIco }),
1056
- /* @__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 })
1057
1090
  ] })
1058
1091
  ] });
1059
1092
  };
1060
1093
 
1061
1094
  // src/runtime/client/components/MetaHead/FontLinks.tsx
1062
- 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";
1063
1096
  var FontLinks = ({ head }) => {
1064
1097
  const { fontStylesheetHref, fontPreloadHrefs } = head;
1065
1098
  const effectivePreloadHrefs = fontPreloadHrefs ?? [];
1066
- return /* @__PURE__ */ jsxs8(Fragment4, { children: [
1067
- effectivePreloadHrefs.map((href) => /* @__PURE__ */ jsx10("link", { rel: "preload", href, as: "font", type: "font/woff2", crossOrigin: "anonymous" }, href)),
1068
- 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 })
1069
1102
  ] });
1070
1103
  };
1071
1104
 
1072
1105
  // src/runtime/client/components/MetaHead/ThemeBootstrap.tsx
1073
- import { jsx as jsx11 } from "react/jsx-runtime";
1106
+ import { jsx as jsx14 } from "react/jsx-runtime";
1074
1107
  var getThemeBootstrapScript = (theme) => {
1075
1108
  return `(() => {
1076
1109
  const storageKey = ${JSON.stringify(USER_SETTINGS_STORAGE_KEY)};
@@ -1108,7 +1141,7 @@ var getThemeBootstrapScript = (theme) => {
1108
1141
  })();`;
1109
1142
  };
1110
1143
  var ThemeBootstrap = ({ theme }) => {
1111
- return /* @__PURE__ */ jsx11(
1144
+ return /* @__PURE__ */ jsx14(
1112
1145
  "script",
1113
1146
  {
1114
1147
  dangerouslySetInnerHTML: {
@@ -1119,239 +1152,120 @@ var ThemeBootstrap = ({ theme }) => {
1119
1152
  };
1120
1153
 
1121
1154
  // src/runtime/client/components/MetaHead/index.tsx
1122
- 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";
1123
1156
  var MetaHead = () => {
1124
1157
  const docs = useDocsFromPageGlobalContext();
1125
- return /* @__PURE__ */ jsxs9(Fragment5, { children: [
1126
- /* @__PURE__ */ jsx12(ThemeBootstrap, { theme: docs.theme }),
1127
- /* @__PURE__ */ jsx12(FaviconLinks, { head: docs.head }),
1128
- /* @__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 })
1129
1162
  ] });
1130
1163
  };
1131
1164
 
1132
1165
  // src/runtime/client/components/ProseContainer.tsx
1133
- import cm3 from "@classmatejs/react";
1134
- var ProseContainer = cm3.section`
1166
+ import cm5 from "@classmatejs/react";
1167
+ var ProseContainer = cm5.section`
1135
1168
  prose-container
1136
1169
  `;
1137
1170
 
1138
- // src/runtime/client/DocsPage.tsx
1171
+ // src/runtime/client/DocsLayout.tsx
1139
1172
  import { useData } from "vike-react/useData";
1140
- import { usePageContext as usePageContext5 } from "vike-react/usePageContext";
1141
1173
 
1142
- // src/runtime/client/getMdxRuntimeValue.tsx
1143
- var isExternalHref = (href) => {
1144
- return /^(?:[a-z]+:)?\/\//i.test(href) || href.startsWith("mailto:") || href.startsWith("tel:");
1145
- };
1146
- var splitHref = (href) => {
1147
- const [pathname, hash = ""] = href.split("#");
1148
- return {
1149
- pathname,
1150
- hash: hash ? `#${hash}` : ""
1151
- };
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
+ );
1152
1209
  };
1153
- var resolveDocLink = (options) => {
1154
- const { currentPathname, href } = options;
1155
- if (href.startsWith("#") || isExternalHref(href)) {
1156
- return null;
1157
- }
1158
- const { pathname, hash } = splitHref(href);
1159
- const docsPathname = resolveDocsHref(options.docs.basePath, pathname);
1160
- 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) {
1161
1218
  return null;
1162
1219
  }
1163
- const page = getResolvedPageByPathname(options.docs, docsPathname);
1164
- if (!page) {
1220
+ if (!previousPage && !nextPage) {
1165
1221
  return null;
1166
1222
  }
1167
- const section = getResolvedSectionById(options.docs, page.sectionId);
1168
- return {
1169
- href: withSiteBaseUrl(`${page.href}${hash}`),
1170
- title: page.title,
1171
- breadcrumb: section ? [section.navTitle] : [],
1172
- isCurrentPage: isSamePagePathname(page, currentPathname)
1173
- };
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
+ ] }) });
1174
1227
  };
1175
- var resolveOverviewItem = (options) => {
1176
- const page = options.docs.pages.find((candidate) => candidate.id === options.id);
1177
- if (!page) {
1178
- return null;
1179
- }
1180
- return {
1181
- title: page.title,
1182
- href: withSiteBaseUrl(page.href),
1183
- excerpt: page.description ?? null
1184
- };
1185
- };
1186
- var getMdxRuntimeValue = (options) => {
1187
- const { currentPathname, docs } = options;
1188
- const activeSection = getActiveSectionByPathname(docs, currentPathname);
1189
- const currentPage = getResolvedPageByPathname(docs, currentPathname);
1190
- return {
1191
- locale: "en",
1192
- codeBlockChoices: docsCodeBlockChoiceStore,
1193
- localizeHref: (href) => {
1194
- if (href.startsWith("#") || isExternalHref(href)) {
1195
- return href;
1196
- }
1197
- const { pathname, hash } = splitHref(href);
1198
- const docsPathname = resolveDocsHref(docs.basePath, pathname);
1199
- const page = docsPathname ? getResolvedPageByPathname(docs, docsPathname) : null;
1200
- if (!page) {
1201
- if (docsPathname && !pathname.startsWith("/")) {
1202
- return withSiteBaseUrl(`${docsPathname}${hash}`);
1203
- }
1204
- return withSiteBaseUrl(href);
1205
- }
1206
- return withSiteBaseUrl(`${page.href}${hash}`);
1207
- },
1208
- resolveDocLink: ({ href }) => resolveDocLink({
1209
- docs,
1210
- currentPathname,
1211
- href
1212
- }),
1213
- resolveOverviewItem: (id) => resolveOverviewItem({
1214
- docs,
1215
- id
1216
- }),
1217
- t: (group, key) => {
1218
- if (group === "docs" && key === "onThisPage") {
1219
- return "On this page";
1220
- }
1221
- if (group === "docs" && key === "previous") {
1222
- return "Previous";
1223
- }
1224
- if (group === "docs" && key === "next") {
1225
- return "Next";
1226
- }
1227
- if (group === "docs" && key === "currentSection") {
1228
- return activeSection?.navTitle ?? currentPage?.title ?? "Docs";
1229
- }
1230
- return key;
1231
- }
1232
- };
1233
- };
1234
-
1235
- // src/runtime/client/DocsPage.tsx
1236
- import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
1237
- var DocsPage = ({ Content }) => {
1238
- const pageContext = usePageContext5();
1239
- const docs = useDocsGlobalContext();
1240
- const { page } = useData();
1241
- return /* @__PURE__ */ jsx13(
1242
- UniversalMdxProvider,
1243
- {
1244
- value: getMdxRuntimeValue({
1245
- docs,
1246
- currentPathname: pageContext.urlPathname
1247
- }),
1248
- children: /* @__PURE__ */ jsxs10(ProseContainer, { "data-doc-content": "", children: [
1249
- /* @__PURE__ */ jsx13("h1", { className: "scroll-mt-24", children: renderInlineMarkdown(page.title) }),
1250
- /* @__PURE__ */ jsx13(Content, {})
1251
- ] })
1252
- }
1253
- );
1254
- };
1255
-
1256
- // src/runtime/client/DocsRouteLayout.tsx
1257
- import { useEffect as useEffect8, useLayoutEffect } from "react";
1258
- import { useData as useData2 } from "vike-react/useData";
1259
-
1260
- // src/runtime/client/components/DocsPagination.tsx
1261
- import { cmMerge as cmMerge6 } from "@classmatejs/react";
1262
- import { ChevronLeft, ChevronRight } from "lucide-react";
1263
- import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
1264
- var PaginationCard = ({ item, direction, isOffset }) => {
1265
- const isPrevious = direction === "previous";
1266
- return /* @__PURE__ */ jsx14(
1267
- "a",
1268
- {
1269
- href: withSiteBaseUrl(item.href),
1270
- className: cmMerge6(
1271
- "group rounded-box border border-base-muted-light bg-base-100 p-5 no-underline hover:border-primary-muted-medium hover:bg-base-200",
1272
- isPrevious ? "text-left" : "text-right",
1273
- isOffset && "sm:col-start-2"
1274
- ),
1275
- "aria-label": `${isPrevious ? "Previous" : "Next"}: ${item.title}`,
1276
- children: /* @__PURE__ */ jsxs11("div", { className: "flex flex-col justify-between gap-2", children: [
1277
- /* @__PURE__ */ jsx14("p", { className: "text-lg font-semibold text-base-content", children: renderInlineMarkdown(item.title) }),
1278
- /* @__PURE__ */ jsxs11(
1279
- "div",
1280
- {
1281
- className: cmMerge6(
1282
- "flex items-center gap-1 text-base-muted group-hover:text-base-content",
1283
- isPrevious ? "justify-start" : "justify-end"
1284
- ),
1285
- children: [
1286
- isPrevious && /* @__PURE__ */ jsx14(ChevronLeft, { className: "h-4 w-4" }),
1287
- /* @__PURE__ */ jsx14("span", { children: isPrevious ? "Previous" : "Next" }),
1288
- !isPrevious && /* @__PURE__ */ jsx14(ChevronRight, { className: "h-4 w-4" })
1289
- ]
1290
- }
1291
- )
1292
- ] })
1293
- }
1294
- );
1295
- };
1296
- var DocsPagination = ({
1297
- previousPage: previousPageProp = null,
1298
- nextPage: nextPageProp = null
1299
- }) => {
1300
- const paginationEnabled = useDocsGlobalContext().footer.pagination;
1301
- const previousPage = useDocsRouteStore((state) => state.previousPage) ?? previousPageProp;
1302
- const nextPage = useDocsRouteStore((state) => state.nextPage) ?? nextPageProp;
1303
- if (!paginationEnabled) {
1304
- return null;
1305
- }
1306
- if (!previousPage && !nextPage) {
1307
- return null;
1308
- }
1309
- 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: [
1310
- previousPage && /* @__PURE__ */ jsx14(PaginationCard, { item: previousPage, direction: "previous" }),
1311
- nextPage && /* @__PURE__ */ jsx14(PaginationCard, { isOffset: !previousPage, item: nextPage, direction: "next" })
1312
- ] }) });
1313
- };
1314
-
1315
- // src/runtime/client/components/Footer.tsx
1316
- import { Bug, Pencil } from "lucide-react";
1317
- import { memo as memo4 } from "react";
1318
- import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
1319
- var DocsFooter = memo4(() => {
1320
- const { brand } = useDocsGlobalContext();
1321
- return /* @__PURE__ */ jsxs12("footer", { className: "mb-8 mt-12 text-sm border-t border-base-muted-light pt-10", children: [
1322
- /* @__PURE__ */ jsxs12("div", { className: "mb-16 flex items-center gap-2", children: [
1323
- /* @__PURE__ */ jsxs12("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
1324
- /* @__PURE__ */ jsx15(Pencil, { className: "w-3 h-3" }),
1325
- " Edit this page"
1326
- ] }),
1327
- /* @__PURE__ */ jsxs12("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
1328
- /* @__PURE__ */ jsx15(Bug, { className: "w-3 h-3" }),
1329
- " Report Issue"
1330
- ] })
1331
- ] }),
1332
- /* @__PURE__ */ jsxs12("div", { className: "flex justify-between items-center", children: [
1333
- /* @__PURE__ */ jsx15(SocialLinks_default, {}),
1334
- /* @__PURE__ */ jsx15("div", { className: "flex gap-2 items-center", children: brand && /* @__PURE__ */ jsx15(Brand, { brand, noText: true }) })
1335
- ] })
1336
- ] });
1337
- });
1338
-
1339
- // src/runtime/client/components/HeadingLinkCopy.tsx
1340
- import { useEffect as useEffect5 } from "react";
1341
- var copyText = async (value) => {
1342
- try {
1343
- await navigator.clipboard.writeText(value);
1344
- return;
1345
- } catch {
1346
- const textarea = document.createElement("textarea");
1347
- textarea.value = value;
1348
- textarea.setAttribute("readonly", "true");
1349
- textarea.style.position = "fixed";
1350
- textarea.style.opacity = "0";
1351
- document.body.appendChild(textarea);
1352
- textarea.select();
1353
- document.execCommand("copy");
1354
- 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);
1355
1269
  }
1356
1270
  };
1357
1271
  var getHeadingLink = (target) => target instanceof Element ? target.closest("a[data-copy-heading-link]") : null;
@@ -1387,8 +1301,9 @@ var HeadingLinkCopy = () => {
1387
1301
  };
1388
1302
 
1389
1303
  // src/runtime/client/components/Sidebar.tsx
1390
- import { cmMerge as cmMerge7 } from "@classmatejs/react";
1391
- 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";
1392
1307
 
1393
1308
  // src/runtime/client/components/docsNavigation.ts
1394
1309
  var containsActiveHref = (items, currentHref) => {
@@ -1416,7 +1331,7 @@ var getVisibleGroupItems = (group) => {
1416
1331
  var getGroupHref = (group) => group.href ?? null;
1417
1332
 
1418
1333
  // src/runtime/client/components/Sidebar.tsx
1419
- 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";
1420
1335
  var useAutoOpenDetails = (nodeId, isOpenByDefault, hasActiveDescendant) => {
1421
1336
  const storedOpen = useDocsSidebarStore((state) => state.openNodes[nodeId]);
1422
1337
  const { setNodeOpen } = useDocsSidebarActions();
@@ -1436,11 +1351,11 @@ var useAutoOpenDetails = (nodeId, isOpenByDefault, hasActiveDescendant) => {
1436
1351
  };
1437
1352
  };
1438
1353
  var SidebarPageLink = ({ title, href, currentHref }) => {
1439
- return /* @__PURE__ */ jsx16("li", { children: /* @__PURE__ */ jsx16(
1354
+ return /* @__PURE__ */ jsx18("li", { className: "rounded-none", children: /* @__PURE__ */ jsx18(
1440
1355
  "a",
1441
1356
  {
1442
1357
  href: withSiteBaseUrl(href),
1443
- className: cmMerge7(
1358
+ className: cmMerge8(
1444
1359
  "text-base-muted hover:text-base-content justify-start hover:bg-base-200",
1445
1360
  href === currentHref && "text-primary! font-semibold bg-base-200"
1446
1361
  ),
@@ -1449,13 +1364,13 @@ var SidebarPageLink = ({ title, href, currentHref }) => {
1449
1364
  ) });
1450
1365
  };
1451
1366
  var SidebarGroupDivider = ({ title }) => {
1452
- 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!" }) }) });
1453
1368
  };
1454
1369
  var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) => {
1455
- const content = /* @__PURE__ */ jsx16(
1370
+ const content = /* @__PURE__ */ jsx18(
1456
1371
  "span",
1457
1372
  {
1458
- className: cmMerge7(
1373
+ className: cmMerge8(
1459
1374
  allowNavigation ? "font-medium" : "font-semibold",
1460
1375
  isActive && allowNavigation && "text-primary!"
1461
1376
  ),
@@ -1463,11 +1378,11 @@ var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) =>
1463
1378
  }
1464
1379
  );
1465
1380
  if (allowNavigation && href) {
1466
- return /* @__PURE__ */ jsx16(
1381
+ return /* @__PURE__ */ jsx18(
1467
1382
  "a",
1468
1383
  {
1469
1384
  href: withSiteBaseUrl(href),
1470
- className: cmMerge7(
1385
+ className: cmMerge8(
1471
1386
  "flex items-center gap-2 text-base-muted hover:text-base-content no-underline",
1472
1387
  isActive && "text-primary! font-semibold"
1473
1388
  ),
@@ -1475,19 +1390,19 @@ var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) =>
1475
1390
  }
1476
1391
  );
1477
1392
  }
1478
- 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 });
1479
1394
  };
1480
1395
  var renderSidebarItems = (items, currentHref) => {
1481
1396
  return items.map((item) => {
1482
1397
  if (item.kind === "page") {
1483
- 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);
1484
1399
  }
1485
- return /* @__PURE__ */ jsx16(SidebarNestedGroup, { group: item, currentHref }, item.id);
1400
+ return /* @__PURE__ */ jsx18(SidebarNestedGroup, { group: item, currentHref }, item.id);
1486
1401
  });
1487
1402
  };
1488
1403
  var SidebarItemList = ({ items, currentHref }) => {
1489
1404
  const visibleItems = getVisibleNavItems(items);
1490
- 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) });
1491
1406
  };
1492
1407
  var SidebarNestedGroup = ({ group, currentHref }) => {
1493
1408
  const groupHref = getGroupHref(group);
@@ -1498,14 +1413,14 @@ var SidebarNestedGroup = ({ group, currentHref }) => {
1498
1413
  const { isOpen, setIsOpen } = useAutoOpenDetails(`group:${group.id}`, isOpenByDefault, nestedHasActiveItem);
1499
1414
  if (!isCollapsible) {
1500
1415
  if (!group.title) {
1501
- return /* @__PURE__ */ jsx16(Fragment6, { children: renderSidebarItems(visibleItems, currentHref) });
1416
+ return /* @__PURE__ */ jsx18(Fragment5, { children: renderSidebarItems(visibleItems, currentHref) });
1502
1417
  }
1503
- return /* @__PURE__ */ jsxs13(Fragment6, { children: [
1504
- /* @__PURE__ */ jsx16(SidebarGroupDivider, { title: group.title }),
1418
+ return /* @__PURE__ */ jsxs15(Fragment5, { children: [
1419
+ /* @__PURE__ */ jsx18(SidebarGroupDivider, { title: group.title }),
1505
1420
  renderSidebarItems(visibleItems, currentHref)
1506
1421
  ] });
1507
1422
  }
1508
- return /* @__PURE__ */ jsx16("li", { children: /* @__PURE__ */ jsxs13(
1423
+ return /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs15(
1509
1424
  "details",
1510
1425
  {
1511
1426
  open: isOpen,
@@ -1513,7 +1428,7 @@ var SidebarNestedGroup = ({ group, currentHref }) => {
1513
1428
  setIsOpen(event.currentTarget.open);
1514
1429
  },
1515
1430
  children: [
1516
- /* @__PURE__ */ jsx16("summary", { children: /* @__PURE__ */ jsx16(
1431
+ /* @__PURE__ */ jsx18("summary", { children: /* @__PURE__ */ jsx18(
1517
1432
  SidebarGroupTitle,
1518
1433
  {
1519
1434
  title: group.title,
@@ -1522,7 +1437,7 @@ var SidebarNestedGroup = ({ group, currentHref }) => {
1522
1437
  allowNavigation: Boolean(groupHref)
1523
1438
  }
1524
1439
  ) }),
1525
- visibleItems.length > 0 ? /* @__PURE__ */ jsx16(SidebarItemList, { items: visibleItems, currentHref }) : null
1440
+ visibleItems.length > 0 ? /* @__PURE__ */ jsx18(SidebarItemList, { items: visibleItems, currentHref }) : null
1526
1441
  ]
1527
1442
  }
1528
1443
  ) });
@@ -1534,7 +1449,7 @@ var SidebarSectionGroup = ({ section, currentHref, activeSectionId }) => {
1534
1449
  section.id === activeSectionId,
1535
1450
  sectionHasActiveItem
1536
1451
  );
1537
- return /* @__PURE__ */ jsx16("li", { className: "pb-4", children: /* @__PURE__ */ jsxs13(
1452
+ return /* @__PURE__ */ jsx18("li", { className: "pb-4", children: /* @__PURE__ */ jsxs15(
1538
1453
  "details",
1539
1454
  {
1540
1455
  open: isOpen,
@@ -1542,26 +1457,28 @@ var SidebarSectionGroup = ({ section, currentHref, activeSectionId }) => {
1542
1457
  setIsOpen(event.currentTarget.open);
1543
1458
  },
1544
1459
  children: [
1545
- /* @__PURE__ */ jsx16("summary", { children: /* @__PURE__ */ jsx16(SidebarGroupTitle, { title: section.title, isActive: sectionHasActiveItem }) }),
1546
- /* @__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 })
1547
1462
  ]
1548
1463
  }
1549
1464
  ) });
1550
1465
  };
1551
- var Sidebar = memo5(
1466
+ var Sidebar = memo4(
1552
1467
  ({ currentHref: currentHrefProp = "", activeSectionId: activeSectionIdProp = "" }) => {
1553
1468
  const scrollContainerRef = useRef3(null);
1554
- const currentHref = useDocsRouteStore((state) => state.currentHref) || currentHrefProp;
1555
- const activeSectionId = useDocsRouteStore((state) => state.currentSectionId ?? "") || activeSectionIdProp;
1556
- const { sidebarSections } = useDocsGlobalContext();
1557
- return /* @__PURE__ */ jsx16("aside", { className: "hidden basis-76 shrink-0 lg:block", children: /* @__PURE__ */ jsxs13("div", { className: "-ml-3 sticky top-16", children: [
1558
- /* @__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" }),
1559
- /* @__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(
1560
1477
  "div",
1561
1478
  {
1562
1479
  ref: scrollContainerRef,
1563
- className: "pr-4 h-[calc(100svh-16*var(--spacing))] overflow-y-scroll overflow-x-hidden relative z-10",
1564
- 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(
1565
1482
  SidebarSectionGroup,
1566
1483
  {
1567
1484
  section,
@@ -1577,10 +1494,213 @@ var Sidebar = memo5(
1577
1494
  );
1578
1495
 
1579
1496
  // src/runtime/client/components/TableOfContents.tsx
1580
- import cm4, { cmMerge as cmMerge8 } from "@classmatejs/react";
1497
+ import cm6, { cmMerge as cmMerge9 } from "@classmatejs/react";
1581
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
1582
1703
  import { useEffect as useEffect7, useState as useState4 } from "react";
1583
- import { Fragment as Fragment7, jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
1584
1704
  var getCurrentHash = () => {
1585
1705
  try {
1586
1706
  return decodeURIComponent(window.location.hash);
@@ -1617,7 +1737,8 @@ var syncHeadingsFromDom = (setDomHeadings) => {
1617
1737
  if (!title) {
1618
1738
  return null;
1619
1739
  }
1620
- element.classList.add("scroll-mt-24");
1740
+ element.classList.add("scroll-mt-32");
1741
+ element.classList.add("xl:scroll-mt-24");
1621
1742
  const id = element.id || slugify(title);
1622
1743
  if (!element.id) {
1623
1744
  element.id = id;
@@ -1641,7 +1762,7 @@ var updateActiveHeadingFromScroll = (setActiveHeadingId) => {
1641
1762
  return;
1642
1763
  }
1643
1764
  const activationOffset = 144;
1644
- let nextActiveHeadingId = headingElements[0]?.id ?? "";
1765
+ let nextActiveHeadingId = "";
1645
1766
  for (const heading of headingElements) {
1646
1767
  if (!heading.id) {
1647
1768
  continue;
@@ -1658,18 +1779,12 @@ var updateActiveHeadingFromScroll = (setActiveHeadingId) => {
1658
1779
  }
1659
1780
  setActiveHeadingId(nextActiveHeadingId);
1660
1781
  };
1661
- var TableOfContents = ({
1662
- headings: headingsProp = [],
1663
- tableOfContents: tableOfContentsProp = false
1782
+ var useTableOfContentsState = ({
1783
+ headings: routeHeadings = []
1664
1784
  }) => {
1665
- const { partners } = useDocsGlobalContext();
1666
- const headings = useDocsRouteStore((state) => state.headings);
1667
- const tableOfContents = useDocsRouteStore((state) => state.tableOfContents);
1668
- const effectiveRouteHeadings = headings.length > 0 ? headings : headingsProp;
1669
- const effectiveTableOfContents = tableOfContents || tableOfContentsProp;
1670
1785
  const [activeHeadingId, setActiveHeadingId] = useState4("");
1671
- const [domHeadings, setDomHeadings] = useState4(effectiveRouteHeadings);
1672
- const effectiveHeadings = domHeadings.length > 0 ? domHeadings : effectiveRouteHeadings;
1786
+ const [domHeadings, setDomHeadings] = useState4(routeHeadings);
1787
+ const effectiveHeadings = domHeadings.length > 0 ? domHeadings : routeHeadings;
1673
1788
  useEffect7(() => {
1674
1789
  let scrollFrame = 0;
1675
1790
  const syncActiveHeading = () => {
@@ -1711,126 +1826,180 @@ var TableOfContents = ({
1711
1826
  return;
1712
1827
  }
1713
1828
  setDomHeadings((currentHeadings) => {
1714
- if (areHeadingsEqual(currentHeadings, effectiveRouteHeadings)) {
1829
+ if (areHeadingsEqual(currentHeadings, routeHeadings)) {
1715
1830
  return currentHeadings;
1716
1831
  }
1717
- return effectiveRouteHeadings;
1832
+ return routeHeadings;
1718
1833
  });
1719
1834
  setActiveHeadingId("");
1720
1835
  queueMicrotask(() => {
1721
1836
  syncHeadingsFromDom(setDomHeadings);
1722
1837
  updateActiveHeadingFromScroll(setActiveHeadingId);
1723
1838
  });
1724
- }, [effectiveRouteHeadings]);
1725
- 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: [
1726
- effectiveTableOfContents ? effectiveHeadings.length > 0 && /* @__PURE__ */ jsxs14(Fragment7, { children: [
1727
- /* @__PURE__ */ jsxs14("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
1728
- /* @__PURE__ */ jsx17(TableOfContentsIcon, { className: "h-3 w-3" }),
1729
- "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, {})
1730
1873
  ] }),
1731
- /* @__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(
1732
- "a",
1874
+ /* @__PURE__ */ jsx22(
1875
+ TableOfContents,
1733
1876
  {
1734
- href: `#${heading.id}`,
1735
- "aria-current": activeHeadingId === heading.id ? "location" : void 0,
1736
- onClick: () => setActiveHeadingId(heading.id),
1737
- className: cmMerge8(
1738
- "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",
1739
- heading.depth > 2 ? "pl-6" : "pl-4",
1740
- 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" : ""
1741
- ),
1742
- children: heading.title
1877
+ headings: effectiveHeadings,
1878
+ tableOfContents: data.page.tableOfContents,
1879
+ activeHeadingId,
1880
+ setActiveHeadingId
1743
1881
  }
1744
- ) }, heading.id)) }) })
1745
- ] }) : null,
1746
- /* @__PURE__ */ jsx17(Adbar, { partners })
1747
- ] }) }) });
1882
+ )
1883
+ ] }) })
1884
+ ] });
1748
1885
  };
1749
- var Adbar = ({ partners }) => {
1750
- 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)) {
1751
1905
  return null;
1752
1906
  }
1753
- return /* @__PURE__ */ jsxs14("aside", { children: [
1754
- /* @__PURE__ */ jsxs14("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
1755
- /* @__PURE__ */ jsx17(Flame, { className: "h-3 w-3" }),
1756
- "Partners"
1757
- ] }),
1758
- /* @__PURE__ */ jsxs14("ul", { className: "grid grid-cols-[repeat(auto-fit,minmax(5.5rem,1fr))] gap-3 opacity-90", children: [
1759
- 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)),
1760
- partners.gold.map((partner) => /* @__PURE__ */ jsx17(AdbarItem, { children: /* @__PURE__ */ jsx17(AdbarLink, { href: partner.href, title: partner.name, children: /* @__PURE__ */ jsx17(PartnerLogo, { partner }) }) }, partner.name))
1761
- ] })
1762
- ] });
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
+ };
1763
1923
  };
1764
- var PartnerLogo = ({
1765
- partner
1766
- }) => {
1767
- return /* @__PURE__ */ jsxs14(Fragment7, { children: [
1768
- /* @__PURE__ */ jsx17(
1769
- Image,
1770
- {
1771
- src: partner.logoLight,
1772
- width: 200,
1773
- height: 100,
1774
- alt: partner.logoAlt,
1775
- 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;
1776
1945
  }
1777
- ),
1778
- partner.logoDark ? /* @__PURE__ */ jsx17(Image, { src: partner.logoDark, width: 200, height: 100, alt: partner.logoAlt, className: "hidden dark:block" }) : null
1779
- ] });
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
+ };
1780
1982
  };
1781
- var AdbarItem = cm4.div`
1782
- px-5
1783
- py-5
1784
- bg-base-200
1785
- text-center
1786
- flex
1787
- items-center
1788
- justify-center
1789
- rounded-field
1790
- `;
1791
- var AdbarLink = cm4.a`
1792
- block
1793
- w-full
1794
- transition-opacity
1795
- hover:opacity-100
1796
- focus-visible:opacity-100
1797
- `;
1798
- var Image = cm4.img`
1799
- mx-auto
1800
- w-24
1801
- `;
1802
1983
 
1803
- // src/runtime/client/DocsRouteLayout.tsx
1804
- import { Fragment as Fragment8, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
1805
- var useIsomorphicLayoutEffect = typeof window === "undefined" ? useEffect8 : useLayoutEffect;
1806
- var DocsRouteStateSync = ({ data }) => {
1807
- const { clearPageData, setPageData } = useDocsRouteActions();
1808
- useIsomorphicLayoutEffect(() => {
1809
- setPageData(data);
1810
- }, [data, setPageData]);
1811
- useEffect8(() => {
1812
- return () => {
1813
- clearPageData();
1814
- };
1815
- }, [clearPageData]);
1816
- return null;
1817
- };
1818
- var DocsRouteLayout = ({ children }) => {
1819
- const data = useData2();
1820
- return /* @__PURE__ */ jsxs15(Fragment8, { children: [
1821
- /* @__PURE__ */ jsx18(DocsRouteStateSync, { data }),
1822
- /* @__PURE__ */ jsx18(HeadingLinkCopy, {}),
1823
- /* @__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" }),
1824
- /* @__PURE__ */ jsx18(LayoutComponent, { children: /* @__PURE__ */ jsxs15("div", { className: "lg:flex lg:gap-10 xl:gap-14", children: [
1825
- /* @__PURE__ */ jsx18(Sidebar, { currentHref: data.page.href, activeSectionId: data.page.sectionId }),
1826
- /* @__PURE__ */ jsxs15("main", { className: "mt-10 min-w-0 flex-1 basis-auto shrink", children: [
1827
- children,
1828
- /* @__PURE__ */ jsx18(DocsPagination, { previousPage: data.previousPage, nextPage: data.nextPage }),
1829
- /* @__PURE__ */ jsx18(DocsFooter, {})
1830
- ] }),
1831
- /* @__PURE__ */ jsx18(TableOfContents, { headings: data.headings, tableOfContents: data.page.tableOfContents })
1832
- ] }) })
1833
- ] });
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
+ );
1834
2003
  };
1835
2004
 
1836
2005
  export {
@@ -1838,8 +2007,6 @@ export {
1838
2007
  useDocsSearchActions,
1839
2008
  useDocsSidebarStore,
1840
2009
  useDocsSidebarActions,
1841
- useDocsRouteStore,
1842
- useDocsRouteActions,
1843
2010
  LayoutComponent,
1844
2011
  useDocsUserSettingsStore,
1845
2012
  DEFAULT_THEME_PREFERENCE,
@@ -1848,7 +2015,7 @@ export {
1848
2015
  AppLayout,
1849
2016
  MetaHead,
1850
2017
  ProseContainer,
1851
- DocsPage,
1852
- DocsRouteLayout
2018
+ DocsLayout,
2019
+ DocsPage
1853
2020
  };
1854
- //# sourceMappingURL=chunk-WQLIG6EM.js.map
2021
+ //# sourceMappingURL=chunk-F4OBB7JD.js.map