@unterberg/nivel 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-QVIL3FKM.js → chunk-6Q5XESPG.js} +2 -2
- package/dist/{chunk-5QP3Y2DU.js → chunk-6TXPHBIC.js} +839 -601
- package/dist/chunk-6TXPHBIC.js.map +1 -0
- package/dist/{chunk-6665M66K.js → chunk-GT62XN7K.js} +6 -1
- package/dist/chunk-GT62XN7K.js.map +1 -0
- package/dist/{chunk-YKCSRKDJ.js → chunk-HQHLPFGA.js} +15 -5
- package/dist/chunk-HQHLPFGA.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/client.d.ts +7 -23
- package/dist/client.js +3 -7
- package/dist/index.js +1 -1
- package/dist/mdx.js +1 -1
- package/dist/runtime/client.d.ts +1 -1
- package/dist/runtime/client.js +3 -7
- package/dist/runtime/node.js +2 -2
- package/dist/vike.js +5 -4
- package/dist/vike.js.map +1 -1
- package/package.json +9 -4
- package/dist/chunk-5QP3Y2DU.js.map +0 -1
- package/dist/chunk-6665M66K.js.map +0 -1
- package/dist/chunk-YKCSRKDJ.js.map +0 -1
- /package/dist/{chunk-QVIL3FKM.js.map → chunk-6Q5XESPG.js.map} +0 -0
|
@@ -17,14 +17,12 @@ import {
|
|
|
17
17
|
} from "./chunk-NDJ5LYLK.js";
|
|
18
18
|
|
|
19
19
|
// src/runtime/client/AppLayout.tsx
|
|
20
|
-
import { cmMerge as
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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__ */
|
|
433
|
-
/* @__PURE__ */
|
|
343
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
344
|
+
/* @__PURE__ */ jsx2("div", { className: "hidden md:block", children: /* @__PURE__ */ jsxs(
|
|
434
345
|
"label",
|
|
435
346
|
{
|
|
436
|
-
className:
|
|
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__ */
|
|
444
|
-
/* @__PURE__ */
|
|
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:
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
560
|
-
/* @__PURE__ */
|
|
561
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
580
|
-
/* @__PURE__ */
|
|
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__ */
|
|
583
|
-
/* @__PURE__ */
|
|
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__ */
|
|
589
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
599
|
-
/* @__PURE__ */
|
|
600
|
-
result.sectionTitle ? /* @__PURE__ */
|
|
601
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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,39 @@ 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
|
+
import { useCallback } from "react";
|
|
533
|
+
|
|
534
|
+
// src/runtime/client/components/Brand.tsx
|
|
535
|
+
import { cmMerge as cmMerge2 } from "@classmatejs/react";
|
|
536
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
537
|
+
var Brand = ({ brand, noText = false }) => {
|
|
538
|
+
const defaultLogo = brand.logoLight ?? brand.logoDark;
|
|
539
|
+
return /* @__PURE__ */ jsxs2("a", { href: brand.href, className: "flex items-center gap-3 text-base-content no-underline", children: [
|
|
540
|
+
defaultLogo && /* @__PURE__ */ jsxs2("span", { className: "relative block h-8 w-8 shrink-0", children: [
|
|
541
|
+
brand.logoLight && /* @__PURE__ */ jsx3(
|
|
542
|
+
"img",
|
|
543
|
+
{
|
|
544
|
+
src: brand.logoLight,
|
|
545
|
+
alt: brand.logoAlt,
|
|
546
|
+
className: cmMerge2("h-8 w-8 object-contain", brand.logoDark ? "block dark:hidden" : "block")
|
|
547
|
+
}
|
|
548
|
+
),
|
|
549
|
+
brand.logoDark && /* @__PURE__ */ jsx3(
|
|
550
|
+
"img",
|
|
551
|
+
{
|
|
552
|
+
src: brand.logoDark,
|
|
553
|
+
alt: brand.logoAlt,
|
|
554
|
+
className: cmMerge2("h-8 w-8 object-contain", brand.logoLight ? "hidden dark:block" : "block")
|
|
555
|
+
}
|
|
556
|
+
)
|
|
557
|
+
] }),
|
|
558
|
+
!noText && /* @__PURE__ */ jsx3("span", { className: "text-xl font-semibold tracking-tight", children: brand.text })
|
|
559
|
+
] });
|
|
560
|
+
};
|
|
561
|
+
|
|
618
562
|
// src/runtime/client/components/SocialLinks.tsx
|
|
619
563
|
import { memo as memo2 } from "react";
|
|
620
564
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
@@ -754,10 +698,185 @@ var ThemeSwitch = ({ theme }) => {
|
|
|
754
698
|
);
|
|
755
699
|
};
|
|
756
700
|
|
|
701
|
+
// src/runtime/client/components/Navbar/AsideButtons.tsx
|
|
702
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
703
|
+
var AsideButtons = () => {
|
|
704
|
+
const docs = useDocsGlobalContext();
|
|
705
|
+
return /* @__PURE__ */ jsxs4("div", { className: "flex-1 justify-end gap-2 flex", children: [
|
|
706
|
+
/* @__PURE__ */ jsx6("div", { className: "hidden lg:block", children: /* @__PURE__ */ jsx6(SocialLinks_default, {}) }),
|
|
707
|
+
/* @__PURE__ */ jsx6(ThemeSwitch, { theme: docs.theme })
|
|
708
|
+
] });
|
|
709
|
+
};
|
|
710
|
+
var AsideButtons_default = AsideButtons;
|
|
711
|
+
|
|
712
|
+
// src/runtime/client/components/Navbar/DocsNavbar.tsx
|
|
713
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
714
|
+
var StyledNav = cm2.nav`
|
|
715
|
+
gap-4
|
|
716
|
+
flex-1 pl-10 items-center justify-end lg:justify-start
|
|
717
|
+
hidden lg:flex
|
|
718
|
+
`;
|
|
719
|
+
var StyledNavList = cm2.ul`
|
|
720
|
+
inline-flex items-center gap-2 font-semibold
|
|
721
|
+
`;
|
|
722
|
+
var DocsNavbar = ({
|
|
723
|
+
closeMegaMenu,
|
|
724
|
+
openMegaMenu,
|
|
725
|
+
scheduleMegaMenuOpen,
|
|
726
|
+
scheduleMegaMenuClose,
|
|
727
|
+
toggleSearch,
|
|
728
|
+
activeSection,
|
|
729
|
+
hoveredSectionId,
|
|
730
|
+
isMegaMenuOpen
|
|
731
|
+
}) => {
|
|
732
|
+
const docs = useDocsGlobalContext();
|
|
733
|
+
const handleClick = useCallback(() => {
|
|
734
|
+
alert("TODO: Open mobile menu");
|
|
735
|
+
}, []);
|
|
736
|
+
return /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 gap-4 pt-3 justify-between", children: [
|
|
737
|
+
/* @__PURE__ */ jsx7("div", { className: "lg:min-w-76 min-w-none", children: /* @__PURE__ */ jsx7(Brand, { brand: docs.brand }) }),
|
|
738
|
+
/* @__PURE__ */ jsx7(StyledNav, { "aria-label": "Primary", children: /* @__PURE__ */ jsxs5(StyledNavList, { className: "", children: [
|
|
739
|
+
docs.navbarItems.map((item) => {
|
|
740
|
+
const isMegaMenuItemActive = isMegaMenuOpen && hoveredSectionId === item.id;
|
|
741
|
+
return /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsx7(
|
|
742
|
+
"a",
|
|
743
|
+
{
|
|
744
|
+
href: withSiteBaseUrl(item.href),
|
|
745
|
+
className: "block",
|
|
746
|
+
onPointerEnter: () => scheduleMegaMenuOpen(item.id),
|
|
747
|
+
onPointerLeave: scheduleMegaMenuClose,
|
|
748
|
+
onFocus: () => openMegaMenu(item.id),
|
|
749
|
+
onBlur: scheduleMegaMenuClose,
|
|
750
|
+
onClick: closeMegaMenu,
|
|
751
|
+
children: /* @__PURE__ */ jsxs5(
|
|
752
|
+
"span",
|
|
753
|
+
{
|
|
754
|
+
className: cmMerge3(
|
|
755
|
+
"btn text-base btn-sm md:min-w-30 px-2 whitespace-nowrap tracking-tight",
|
|
756
|
+
activeSection?.id === item.id ? "btn-primary btn-soft" : "btn-ghost "
|
|
757
|
+
),
|
|
758
|
+
children: [
|
|
759
|
+
renderInlineMarkdown(item.title),
|
|
760
|
+
/* @__PURE__ */ jsx7(
|
|
761
|
+
ChevronDown,
|
|
762
|
+
{
|
|
763
|
+
className: cmMerge3(
|
|
764
|
+
"h-4 w-4 shrink-0 transition-transform duration-200",
|
|
765
|
+
isMegaMenuItemActive ? "rotate-180" : "rotate-0"
|
|
766
|
+
)
|
|
767
|
+
}
|
|
768
|
+
)
|
|
769
|
+
]
|
|
770
|
+
}
|
|
771
|
+
)
|
|
772
|
+
}
|
|
773
|
+
) }, item.id);
|
|
774
|
+
}),
|
|
775
|
+
docs.algolia ? /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsxs5(
|
|
776
|
+
"button",
|
|
777
|
+
{
|
|
778
|
+
type: "button",
|
|
779
|
+
onClick: toggleSearch,
|
|
780
|
+
className: "btn btn-ghost btn-sm text-base md:min-w-30 px-2 whitespace-nowrap tracking-tight",
|
|
781
|
+
children: [
|
|
782
|
+
"Search",
|
|
783
|
+
/* @__PURE__ */ jsx7(TextSearch, { className: "h-4 w-4" })
|
|
784
|
+
]
|
|
785
|
+
}
|
|
786
|
+
) }) : null
|
|
787
|
+
] }) }),
|
|
788
|
+
/* @__PURE__ */ jsx7("button", { type: "button", className: "block lg:hidden", onClick: handleClick, children: /* @__PURE__ */ jsx7(Menu, { className: "w-6 h-6" }) }),
|
|
789
|
+
/* @__PURE__ */ jsx7("div", { className: "lg:min-w-40 hidden lg:block", children: /* @__PURE__ */ jsx7(AsideButtons_default, {}) })
|
|
790
|
+
] });
|
|
791
|
+
};
|
|
792
|
+
var DocsNavbar_default = DocsNavbar;
|
|
793
|
+
|
|
794
|
+
// src/runtime/client/components/Navbar/LandingPageNavbar.tsx
|
|
795
|
+
import cm3, { cmMerge as cmMerge4 } from "@classmatejs/react";
|
|
796
|
+
import { ChevronDown as ChevronDown2, Menu as Menu2, TextSearch as TextSearch2 } from "lucide-react";
|
|
797
|
+
import { useCallback as useCallback2 } from "react";
|
|
798
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
799
|
+
var StyledNav2 = cm3.nav`
|
|
800
|
+
gap-4
|
|
801
|
+
flex-1 lg:pl-6 xl:pl-10 items-center justify-center
|
|
802
|
+
`;
|
|
803
|
+
var StyledNavList2 = cm3.ul`
|
|
804
|
+
inline-flex items-center gap-2 font-semibold
|
|
805
|
+
`;
|
|
806
|
+
var LandingPageNavbar = ({
|
|
807
|
+
closeMegaMenu,
|
|
808
|
+
openMegaMenu,
|
|
809
|
+
scheduleMegaMenuOpen,
|
|
810
|
+
scheduleMegaMenuClose,
|
|
811
|
+
toggleSearch,
|
|
812
|
+
hoveredSectionId,
|
|
813
|
+
isMegaMenuOpen
|
|
814
|
+
}) => {
|
|
815
|
+
const docs = useDocsGlobalContext();
|
|
816
|
+
const handleClick = useCallback2(() => {
|
|
817
|
+
alert("TODO: Open mobile menu");
|
|
818
|
+
}, []);
|
|
819
|
+
return /* @__PURE__ */ jsxs6("div", { className: "flex flex-1 gap-4 pt-3 justify-between", children: [
|
|
820
|
+
/* @__PURE__ */ jsx8("div", { className: "min-w-40", children: /* @__PURE__ */ jsx8(Brand, { brand: docs.brand }) }),
|
|
821
|
+
/* @__PURE__ */ jsx8(StyledNav2, { "aria-label": "Primary", className: "flex-1 flex hidden lg:flex", children: /* @__PURE__ */ jsxs6(StyledNavList2, { className: "justify-end ", children: [
|
|
822
|
+
docs.navbarItems.map((item) => {
|
|
823
|
+
const isMegaMenuItemActive = isMegaMenuOpen && hoveredSectionId === item.id;
|
|
824
|
+
return /* @__PURE__ */ jsx8("li", { children: /* @__PURE__ */ jsx8(
|
|
825
|
+
"a",
|
|
826
|
+
{
|
|
827
|
+
href: withSiteBaseUrl(item.href),
|
|
828
|
+
className: "block",
|
|
829
|
+
onPointerEnter: () => scheduleMegaMenuOpen(item.id),
|
|
830
|
+
onPointerLeave: scheduleMegaMenuClose,
|
|
831
|
+
onFocus: () => openMegaMenu(item.id),
|
|
832
|
+
onBlur: scheduleMegaMenuClose,
|
|
833
|
+
onClick: closeMegaMenu,
|
|
834
|
+
children: /* @__PURE__ */ jsxs6(
|
|
835
|
+
"span",
|
|
836
|
+
{
|
|
837
|
+
className: cmMerge4(
|
|
838
|
+
"btn btn-ghost text-base lg:text-lg btn-sm lg:min-w-30 px-2 whitespace-nowrap tracking-tight"
|
|
839
|
+
),
|
|
840
|
+
children: [
|
|
841
|
+
renderInlineMarkdown(item.title),
|
|
842
|
+
/* @__PURE__ */ jsx8(
|
|
843
|
+
ChevronDown2,
|
|
844
|
+
{
|
|
845
|
+
className: cmMerge4(
|
|
846
|
+
"h-4 w-4 shrink-0 transition-transform duration-200",
|
|
847
|
+
isMegaMenuItemActive ? "rotate-180" : "rotate-0"
|
|
848
|
+
)
|
|
849
|
+
}
|
|
850
|
+
)
|
|
851
|
+
]
|
|
852
|
+
}
|
|
853
|
+
)
|
|
854
|
+
}
|
|
855
|
+
) }, item.id);
|
|
856
|
+
}),
|
|
857
|
+
docs.algolia ? /* @__PURE__ */ jsx8("li", { children: /* @__PURE__ */ jsxs6(
|
|
858
|
+
"button",
|
|
859
|
+
{
|
|
860
|
+
type: "button",
|
|
861
|
+
onClick: toggleSearch,
|
|
862
|
+
className: "btn btn-ghost btn-sm text-base lg:text-lg lg:min-w-30 px-2 whitespace-nowrap tracking-tight",
|
|
863
|
+
children: [
|
|
864
|
+
"Search",
|
|
865
|
+
/* @__PURE__ */ jsx8(TextSearch2, { className: "h-4 w-4" })
|
|
866
|
+
]
|
|
867
|
+
}
|
|
868
|
+
) }) : null
|
|
869
|
+
] }) }),
|
|
870
|
+
/* @__PURE__ */ jsx8("div", { className: "min-w-40 hidden lg:block", children: /* @__PURE__ */ jsx8(AsideButtons_default, {}) }),
|
|
871
|
+
/* @__PURE__ */ jsx8("button", { type: "button", className: "block lg:hidden", onClick: handleClick, children: /* @__PURE__ */ jsx8(Menu2, { className: "w-6 h-6" }) })
|
|
872
|
+
] });
|
|
873
|
+
};
|
|
874
|
+
var LandingPageNavbar_default = LandingPageNavbar;
|
|
875
|
+
|
|
757
876
|
// src/runtime/client/components/Navbar/MegaMenu.tsx
|
|
758
|
-
import { cmMerge as
|
|
877
|
+
import { cmMerge as cmMerge5 } from "@classmatejs/react";
|
|
759
878
|
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
760
|
-
import { jsx as
|
|
879
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
761
880
|
var MegaMenu = ({
|
|
762
881
|
isActive,
|
|
763
882
|
onOpen,
|
|
@@ -789,59 +908,56 @@ var MegaMenu = ({
|
|
|
789
908
|
resizeObserver.disconnect();
|
|
790
909
|
};
|
|
791
910
|
}, [visibleSectionElement, visibleSectionId]);
|
|
792
|
-
return /* @__PURE__ */
|
|
911
|
+
return /* @__PURE__ */ jsxs7(
|
|
793
912
|
"div",
|
|
794
913
|
{
|
|
795
|
-
className:
|
|
796
|
-
"fixed top-13 left-0 z-3 w-full pt-3",
|
|
797
|
-
isActive ? "pointer-events-auto" : "pointer-events-none"
|
|
798
|
-
),
|
|
914
|
+
className: cmMerge5("fixed top-14 left-0 z-3 w-full", isActive ? "pointer-events-auto" : "pointer-events-none"),
|
|
799
915
|
onPointerEnter: () => onOpen(visibleSectionId),
|
|
800
916
|
onPointerLeave: onClose,
|
|
801
917
|
children: [
|
|
802
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ jsx9(
|
|
803
919
|
"div",
|
|
804
920
|
{
|
|
805
|
-
className:
|
|
921
|
+
className: cmMerge5(
|
|
806
922
|
isActive ? "opacity-100" : "opacity-0",
|
|
807
923
|
"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
924
|
)
|
|
809
925
|
}
|
|
810
926
|
),
|
|
811
|
-
/* @__PURE__ */
|
|
927
|
+
/* @__PURE__ */ jsx9(
|
|
812
928
|
"div",
|
|
813
929
|
{
|
|
814
|
-
className:
|
|
930
|
+
className: cmMerge5(
|
|
815
931
|
"relative z-4 overflow-hidden transition-[height] bg-base-100 duration-300",
|
|
816
932
|
isLandingPage && !isActive ? "" : "border-b border-base-muted-light ease-out"
|
|
817
933
|
),
|
|
818
934
|
style: { height: isActive ? contentHeight : 0 },
|
|
819
|
-
children: /* @__PURE__ */
|
|
935
|
+
children: /* @__PURE__ */ jsx9(LayoutComponent, { $size: "sm", children: /* @__PURE__ */ jsx9(
|
|
820
936
|
"div",
|
|
821
937
|
{
|
|
822
|
-
className:
|
|
938
|
+
className: cmMerge5(
|
|
823
939
|
isActive ? "translate-y-0 opacity-100" : "-translate-y-10 opacity-0",
|
|
824
940
|
"relative z-4 transition-all duration-300"
|
|
825
941
|
),
|
|
826
|
-
children: sections.map((section) => /* @__PURE__ */
|
|
942
|
+
children: sections.map((section) => /* @__PURE__ */ jsx9(
|
|
827
943
|
"div",
|
|
828
944
|
{
|
|
829
945
|
ref: section.id === visibleSectionId ? setVisibleSectionElement : void 0,
|
|
830
|
-
className:
|
|
946
|
+
className: cmMerge5(
|
|
831
947
|
section.id === visibleSectionId ? "opacity-100" : "opacity-0 pointer-events-none",
|
|
832
948
|
"transition-all absolute w-full duration-300"
|
|
833
949
|
),
|
|
834
|
-
children: section.items.length > 0 && /* @__PURE__ */
|
|
835
|
-
(child) => child.showInNav !== false && /* @__PURE__ */
|
|
836
|
-
child.href ? /* @__PURE__ */
|
|
950
|
+
children: section.items.length > 0 && /* @__PURE__ */ jsx9("ul", { className: "mt-2 flex ", children: section.items.map(
|
|
951
|
+
(child) => child.showInNav !== false && /* @__PURE__ */ jsxs7("li", { className: "flex-1 py-3 mb-6 px-4", children: [
|
|
952
|
+
child.href ? /* @__PURE__ */ jsx9(
|
|
837
953
|
"a",
|
|
838
954
|
{
|
|
839
955
|
className: "mb-4 block text-lg font-semibold tracking-tight",
|
|
840
956
|
href: withSiteBaseUrl(child.href),
|
|
841
957
|
children: child.title
|
|
842
958
|
}
|
|
843
|
-
) : /* @__PURE__ */
|
|
844
|
-
child.kind === "group" && child.items.length > 0 && /* @__PURE__ */
|
|
959
|
+
) : /* @__PURE__ */ jsx9("span", { className: "mb-4 block text-lg font-semibold tracking-tight", children: child.title }),
|
|
960
|
+
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
961
|
] }, child.id)
|
|
846
962
|
) })
|
|
847
963
|
},
|
|
@@ -856,20 +972,23 @@ var MegaMenu = ({
|
|
|
856
972
|
);
|
|
857
973
|
};
|
|
858
974
|
|
|
859
|
-
// src/runtime/client/components/Navbar/
|
|
860
|
-
import {
|
|
861
|
-
var
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
const activeSectionId = useDocsRouteStore((state) => state.currentSectionId);
|
|
865
|
-
const isLandingPage = urlParsed.pathname === "/";
|
|
975
|
+
// src/runtime/client/components/Navbar/useMegaMenu.ts
|
|
976
|
+
import { useCallback as useCallback3, useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
|
|
977
|
+
var megaMenuOpenDelayMs = 120;
|
|
978
|
+
var megaMenuCloseDelayMs = 140;
|
|
979
|
+
var useMegaMenu = ({ activeSectionId, sections }) => {
|
|
866
980
|
const [isMegaMenuOpen, setIsMegaMenuOpen] = useState3(false);
|
|
981
|
+
const megaMenuOpenTimeoutRef = useRef2(null);
|
|
867
982
|
const megaMenuCloseTimeoutRef = useRef2(null);
|
|
868
|
-
const
|
|
869
|
-
const
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
983
|
+
const [hoveredSectionId, setHoveredSectionId] = useState3(activeSectionId ?? sections[0]?.id);
|
|
984
|
+
const clearMegaMenuOpenTimeout = useCallback3(() => {
|
|
985
|
+
if (megaMenuOpenTimeoutRef.current === null) {
|
|
986
|
+
return;
|
|
987
|
+
}
|
|
988
|
+
window.clearTimeout(megaMenuOpenTimeoutRef.current);
|
|
989
|
+
megaMenuOpenTimeoutRef.current = null;
|
|
990
|
+
}, []);
|
|
991
|
+
const clearMegaMenuCloseTimeout = useCallback3(() => {
|
|
873
992
|
if (megaMenuCloseTimeoutRef.current === null) {
|
|
874
993
|
return;
|
|
875
994
|
}
|
|
@@ -880,113 +999,98 @@ var Navbar = memo3(() => {
|
|
|
880
999
|
if (currentSectionId !== void 0) {
|
|
881
1000
|
setHoveredSectionId(currentSectionId);
|
|
882
1001
|
}
|
|
1002
|
+
clearMegaMenuOpenTimeout();
|
|
883
1003
|
clearMegaMenuCloseTimeout();
|
|
884
1004
|
setIsMegaMenuOpen(true);
|
|
885
1005
|
};
|
|
1006
|
+
const scheduleMegaMenuOpen = (currentSectionId) => {
|
|
1007
|
+
if (currentSectionId !== void 0) {
|
|
1008
|
+
setHoveredSectionId(currentSectionId);
|
|
1009
|
+
}
|
|
1010
|
+
clearMegaMenuOpenTimeout();
|
|
1011
|
+
clearMegaMenuCloseTimeout();
|
|
1012
|
+
if (isMegaMenuOpen) {
|
|
1013
|
+
setIsMegaMenuOpen(true);
|
|
1014
|
+
return;
|
|
1015
|
+
}
|
|
1016
|
+
megaMenuOpenTimeoutRef.current = window.setTimeout(() => {
|
|
1017
|
+
setIsMegaMenuOpen(true);
|
|
1018
|
+
megaMenuOpenTimeoutRef.current = null;
|
|
1019
|
+
}, megaMenuOpenDelayMs);
|
|
1020
|
+
};
|
|
886
1021
|
const closeMegaMenu = () => {
|
|
1022
|
+
clearMegaMenuOpenTimeout();
|
|
887
1023
|
clearMegaMenuCloseTimeout();
|
|
888
1024
|
setIsMegaMenuOpen(false);
|
|
889
1025
|
};
|
|
890
1026
|
const scheduleMegaMenuClose = () => {
|
|
1027
|
+
clearMegaMenuOpenTimeout();
|
|
891
1028
|
clearMegaMenuCloseTimeout();
|
|
892
1029
|
megaMenuCloseTimeoutRef.current = window.setTimeout(() => {
|
|
893
1030
|
setIsMegaMenuOpen(false);
|
|
894
1031
|
megaMenuCloseTimeoutRef.current = null;
|
|
895
|
-
},
|
|
1032
|
+
}, megaMenuCloseDelayMs);
|
|
896
1033
|
};
|
|
897
1034
|
useEffect3(() => {
|
|
898
1035
|
return () => {
|
|
1036
|
+
clearMegaMenuOpenTimeout();
|
|
899
1037
|
clearMegaMenuCloseTimeout();
|
|
900
1038
|
};
|
|
901
|
-
}, [clearMegaMenuCloseTimeout]);
|
|
1039
|
+
}, [clearMegaMenuCloseTimeout, clearMegaMenuOpenTimeout]);
|
|
902
1040
|
useEffect3(() => {
|
|
903
|
-
setHoveredSectionId(
|
|
904
|
-
}, [
|
|
905
|
-
return
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
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(
|
|
1041
|
+
setHoveredSectionId(activeSectionId ?? sections[0]?.id);
|
|
1042
|
+
}, [activeSectionId, sections]);
|
|
1043
|
+
return {
|
|
1044
|
+
isMegaMenuOpen,
|
|
1045
|
+
hoveredSectionId,
|
|
1046
|
+
openMegaMenu,
|
|
1047
|
+
scheduleMegaMenuOpen,
|
|
1048
|
+
closeMegaMenu,
|
|
1049
|
+
scheduleMegaMenuClose
|
|
1050
|
+
};
|
|
1051
|
+
};
|
|
1052
|
+
var useMegaMenu_default = useMegaMenu;
|
|
1053
|
+
|
|
1054
|
+
// src/runtime/client/components/Navbar/index.tsx
|
|
1055
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1056
|
+
var NavbarNew = () => {
|
|
1057
|
+
const docs = useDocsGlobalContext();
|
|
1058
|
+
const { urlPathname, urlParsed } = usePageContext3();
|
|
1059
|
+
const isLandingPage = urlParsed.pathname === "/";
|
|
1060
|
+
const sections = docs.sidebarSections;
|
|
1061
|
+
const activeSection = getActiveSectionByPathname(docs, urlPathname);
|
|
1062
|
+
const { toggle: toggleSearch } = useDocsSearchActions();
|
|
1063
|
+
const { closeMegaMenu, hoveredSectionId, isMegaMenuOpen, openMegaMenu, scheduleMegaMenuOpen, scheduleMegaMenuClose } = useMegaMenu_default({
|
|
1064
|
+
activeSectionId: activeSection?.id,
|
|
1065
|
+
sections
|
|
1066
|
+
});
|
|
1067
|
+
return /* @__PURE__ */ jsxs8(StyledNavbar, { $border: isLandingPage, children: [
|
|
1068
|
+
/* @__PURE__ */ jsx10(LayoutComponent, { children: isLandingPage ? /* @__PURE__ */ jsx10(
|
|
1069
|
+
LandingPageNavbar_default,
|
|
1070
|
+
{
|
|
1071
|
+
openMegaMenu,
|
|
1072
|
+
scheduleMegaMenuOpen,
|
|
1073
|
+
scheduleMegaMenuClose,
|
|
1074
|
+
toggleSearch,
|
|
1075
|
+
closeMegaMenu,
|
|
1076
|
+
hoveredSectionId,
|
|
1077
|
+
isMegaMenuOpen
|
|
1078
|
+
}
|
|
1079
|
+
) : /* @__PURE__ */ jsx10(
|
|
1080
|
+
DocsNavbar_default,
|
|
1081
|
+
{
|
|
1082
|
+
openMegaMenu,
|
|
1083
|
+
scheduleMegaMenuOpen,
|
|
1084
|
+
scheduleMegaMenuClose,
|
|
1085
|
+
toggleSearch,
|
|
1086
|
+
closeMegaMenu,
|
|
1087
|
+
activeSection,
|
|
1088
|
+
hoveredSectionId,
|
|
1089
|
+
isMegaMenuOpen
|
|
1090
|
+
}
|
|
1091
|
+
) }),
|
|
1092
|
+
/* @__PURE__ */ jsx10(Search, {}),
|
|
1093
|
+
/* @__PURE__ */ jsx10(
|
|
990
1094
|
MegaMenu,
|
|
991
1095
|
{
|
|
992
1096
|
sections,
|
|
@@ -999,9 +1103,11 @@ var Navbar = memo3(() => {
|
|
|
999
1103
|
}
|
|
1000
1104
|
)
|
|
1001
1105
|
] });
|
|
1002
|
-
}
|
|
1003
|
-
var
|
|
1004
|
-
|
|
1106
|
+
};
|
|
1107
|
+
var Navbar_default = NavbarNew;
|
|
1108
|
+
var StyledNavbar = cm4.header`
|
|
1109
|
+
top-0 left-0 z-20 w-full bg-base-100
|
|
1110
|
+
pt-0 h-14
|
|
1005
1111
|
${({ $border }) => $border ? "relative" : "fixed"}
|
|
1006
1112
|
`;
|
|
1007
1113
|
|
|
@@ -1024,7 +1130,7 @@ var UserSettingsSync = ({ theme }) => {
|
|
|
1024
1130
|
};
|
|
1025
1131
|
|
|
1026
1132
|
// src/runtime/client/AppLayout.tsx
|
|
1027
|
-
import { jsx as
|
|
1133
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1028
1134
|
var queryClient = new QueryClient();
|
|
1029
1135
|
var runtimeStore = createDocsRuntimeStore();
|
|
1030
1136
|
var AppLayout = ({ children, header }) => {
|
|
@@ -1032,42 +1138,42 @@ var AppLayout = ({ children, header }) => {
|
|
|
1032
1138
|
const pageContext = usePageContext4();
|
|
1033
1139
|
const docs = getDocsFromGlobalContext(pageContext);
|
|
1034
1140
|
const isLandingPage = urlPathname === "/";
|
|
1035
|
-
return /* @__PURE__ */
|
|
1036
|
-
/* @__PURE__ */
|
|
1037
|
-
/* @__PURE__ */
|
|
1038
|
-
header ?? /* @__PURE__ */
|
|
1039
|
-
/* @__PURE__ */
|
|
1141
|
+
return /* @__PURE__ */ jsx11(DocsRuntimeStoreProvider, { store: runtimeStore, children: /* @__PURE__ */ jsx11(DocsGlobalContextProvider, { docs, children: /* @__PURE__ */ jsxs9(QueryClientProvider, { client: queryClient, children: [
|
|
1142
|
+
/* @__PURE__ */ jsx11(UserSettingsSync, { theme: docs.theme }),
|
|
1143
|
+
/* @__PURE__ */ jsxs9("div", { className: "min-h-screen bg-base-100 text-base-content", children: [
|
|
1144
|
+
header ?? /* @__PURE__ */ jsx11(Navbar_default, {}),
|
|
1145
|
+
/* @__PURE__ */ jsx11("div", { className: cmMerge6(isLandingPage ? "" : "pt-14"), children })
|
|
1040
1146
|
] })
|
|
1041
1147
|
] }) }) });
|
|
1042
1148
|
};
|
|
1043
1149
|
|
|
1044
1150
|
// src/runtime/client/components/MetaHead/FaviconLinks.tsx
|
|
1045
|
-
import { Fragment as
|
|
1151
|
+
import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1046
1152
|
var FaviconLinks = ({ head }) => {
|
|
1047
1153
|
const { appleTouchIcon, faviconIco, faviconSvg } = head;
|
|
1048
|
-
return /* @__PURE__ */
|
|
1049
|
-
appleTouchIcon && /* @__PURE__ */
|
|
1050
|
-
faviconSvg && /* @__PURE__ */
|
|
1051
|
-
faviconIco && /* @__PURE__ */
|
|
1052
|
-
/* @__PURE__ */
|
|
1053
|
-
/* @__PURE__ */
|
|
1154
|
+
return /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
1155
|
+
appleTouchIcon && /* @__PURE__ */ jsx12("link", { rel: "apple-touch-icon", href: appleTouchIcon }),
|
|
1156
|
+
faviconSvg && /* @__PURE__ */ jsx12("link", { rel: "icon", type: "image/svg+xml", href: faviconSvg }),
|
|
1157
|
+
faviconIco && /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
1158
|
+
/* @__PURE__ */ jsx12("link", { rel: "shortcut icon", type: "image/x-icon", href: faviconIco }),
|
|
1159
|
+
/* @__PURE__ */ jsx12("link", { rel: "icon", type: "image/x-icon", href: faviconIco })
|
|
1054
1160
|
] })
|
|
1055
1161
|
] });
|
|
1056
1162
|
};
|
|
1057
1163
|
|
|
1058
1164
|
// src/runtime/client/components/MetaHead/FontLinks.tsx
|
|
1059
|
-
import { Fragment as
|
|
1165
|
+
import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1060
1166
|
var FontLinks = ({ head }) => {
|
|
1061
1167
|
const { fontStylesheetHref, fontPreloadHrefs } = head;
|
|
1062
1168
|
const effectivePreloadHrefs = fontPreloadHrefs ?? [];
|
|
1063
|
-
return /* @__PURE__ */
|
|
1064
|
-
effectivePreloadHrefs.map((href) => /* @__PURE__ */
|
|
1065
|
-
fontStylesheetHref && /* @__PURE__ */
|
|
1169
|
+
return /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
1170
|
+
effectivePreloadHrefs.map((href) => /* @__PURE__ */ jsx13("link", { rel: "preload", href, as: "font", type: "font/woff2", crossOrigin: "anonymous" }, href)),
|
|
1171
|
+
fontStylesheetHref && /* @__PURE__ */ jsx13("link", { rel: "stylesheet", href: fontStylesheetHref })
|
|
1066
1172
|
] });
|
|
1067
1173
|
};
|
|
1068
1174
|
|
|
1069
1175
|
// src/runtime/client/components/MetaHead/ThemeBootstrap.tsx
|
|
1070
|
-
import { jsx as
|
|
1176
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1071
1177
|
var getThemeBootstrapScript = (theme) => {
|
|
1072
1178
|
return `(() => {
|
|
1073
1179
|
const storageKey = ${JSON.stringify(USER_SETTINGS_STORAGE_KEY)};
|
|
@@ -1105,7 +1211,7 @@ var getThemeBootstrapScript = (theme) => {
|
|
|
1105
1211
|
})();`;
|
|
1106
1212
|
};
|
|
1107
1213
|
var ThemeBootstrap = ({ theme }) => {
|
|
1108
|
-
return /* @__PURE__ */
|
|
1214
|
+
return /* @__PURE__ */ jsx14(
|
|
1109
1215
|
"script",
|
|
1110
1216
|
{
|
|
1111
1217
|
dangerouslySetInnerHTML: {
|
|
@@ -1116,219 +1222,100 @@ var ThemeBootstrap = ({ theme }) => {
|
|
|
1116
1222
|
};
|
|
1117
1223
|
|
|
1118
1224
|
// src/runtime/client/components/MetaHead/index.tsx
|
|
1119
|
-
import { Fragment as
|
|
1225
|
+
import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1120
1226
|
var MetaHead = () => {
|
|
1121
1227
|
const docs = useDocsFromPageGlobalContext();
|
|
1122
|
-
return /* @__PURE__ */
|
|
1123
|
-
/* @__PURE__ */
|
|
1124
|
-
/* @__PURE__ */
|
|
1125
|
-
/* @__PURE__ */
|
|
1228
|
+
return /* @__PURE__ */ jsxs12(Fragment4, { children: [
|
|
1229
|
+
/* @__PURE__ */ jsx15(ThemeBootstrap, { theme: docs.theme }),
|
|
1230
|
+
/* @__PURE__ */ jsx15(FaviconLinks, { head: docs.head }),
|
|
1231
|
+
/* @__PURE__ */ jsx15(FontLinks, { head: docs.head })
|
|
1126
1232
|
] });
|
|
1127
1233
|
};
|
|
1128
1234
|
|
|
1129
1235
|
// src/runtime/client/components/ProseContainer.tsx
|
|
1130
|
-
import
|
|
1131
|
-
var ProseContainer =
|
|
1236
|
+
import cm5 from "@classmatejs/react";
|
|
1237
|
+
var ProseContainer = cm5.section`
|
|
1132
1238
|
prose-container
|
|
1133
1239
|
`;
|
|
1134
1240
|
|
|
1135
|
-
// src/runtime/client/
|
|
1241
|
+
// src/runtime/client/DocsLayout.tsx
|
|
1136
1242
|
import { useData } from "vike-react/useData";
|
|
1137
|
-
import { usePageContext as usePageContext5 } from "vike-react/usePageContext";
|
|
1138
1243
|
|
|
1139
|
-
// src/runtime/client/
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
};
|
|
1143
|
-
var
|
|
1144
|
-
const
|
|
1145
|
-
return
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1244
|
+
// src/runtime/client/components/DocsPagination.tsx
|
|
1245
|
+
import { cmMerge as cmMerge7 } from "@classmatejs/react";
|
|
1246
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
1247
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1248
|
+
var PaginationCard = ({ item, direction, isOffset }) => {
|
|
1249
|
+
const isPrevious = direction === "previous";
|
|
1250
|
+
return /* @__PURE__ */ jsx16(
|
|
1251
|
+
"a",
|
|
1252
|
+
{
|
|
1253
|
+
href: withSiteBaseUrl(item.href),
|
|
1254
|
+
className: cmMerge7(
|
|
1255
|
+
"group rounded-box border border-base-muted-light bg-base-100 p-5 no-underline hover:border-primary-muted-medium hover:bg-base-200",
|
|
1256
|
+
isPrevious ? "text-left" : "text-right",
|
|
1257
|
+
isOffset && "sm:col-start-2"
|
|
1258
|
+
),
|
|
1259
|
+
"aria-label": `${isPrevious ? "Previous" : "Next"}: ${item.title}`,
|
|
1260
|
+
children: /* @__PURE__ */ jsxs13("div", { className: "flex flex-col justify-between gap-2", children: [
|
|
1261
|
+
/* @__PURE__ */ jsx16("p", { className: "text-lg font-semibold text-base-content", children: renderInlineMarkdown(item.title) }),
|
|
1262
|
+
/* @__PURE__ */ jsxs13(
|
|
1263
|
+
"div",
|
|
1264
|
+
{
|
|
1265
|
+
className: cmMerge7(
|
|
1266
|
+
"flex items-center gap-1 text-base-muted group-hover:text-base-content",
|
|
1267
|
+
isPrevious ? "justify-start" : "justify-end"
|
|
1268
|
+
),
|
|
1269
|
+
children: [
|
|
1270
|
+
isPrevious && /* @__PURE__ */ jsx16(ChevronLeft, { className: "h-4 w-4" }),
|
|
1271
|
+
/* @__PURE__ */ jsx16("span", { children: isPrevious ? "Previous" : "Next" }),
|
|
1272
|
+
!isPrevious && /* @__PURE__ */ jsx16(ChevronRight, { className: "h-4 w-4" })
|
|
1273
|
+
]
|
|
1274
|
+
}
|
|
1275
|
+
)
|
|
1276
|
+
] })
|
|
1277
|
+
}
|
|
1278
|
+
);
|
|
1149
1279
|
};
|
|
1150
|
-
var
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
const
|
|
1156
|
-
const
|
|
1157
|
-
if (!
|
|
1280
|
+
var DocsPagination = ({
|
|
1281
|
+
previousPage: previousPageProp = null,
|
|
1282
|
+
nextPage: nextPageProp = null
|
|
1283
|
+
}) => {
|
|
1284
|
+
const paginationEnabled = useDocsGlobalContext().footer.pagination;
|
|
1285
|
+
const previousPage = previousPageProp;
|
|
1286
|
+
const nextPage = nextPageProp;
|
|
1287
|
+
if (!paginationEnabled) {
|
|
1158
1288
|
return null;
|
|
1159
1289
|
}
|
|
1160
|
-
|
|
1161
|
-
if (!page) {
|
|
1290
|
+
if (!previousPage && !nextPage) {
|
|
1162
1291
|
return null;
|
|
1163
1292
|
}
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
breadcrumb: section ? [section.navTitle] : [],
|
|
1169
|
-
isCurrentPage: isSamePagePathname(page, currentPathname)
|
|
1170
|
-
};
|
|
1171
|
-
};
|
|
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
|
-
] }) });
|
|
1293
|
+
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: [
|
|
1294
|
+
previousPage && /* @__PURE__ */ jsx16(PaginationCard, { item: previousPage, direction: "previous" }),
|
|
1295
|
+
nextPage && /* @__PURE__ */ jsx16(PaginationCard, { isOffset: !previousPage, item: nextPage, direction: "next" })
|
|
1296
|
+
] }) });
|
|
1310
1297
|
};
|
|
1311
1298
|
|
|
1312
1299
|
// src/runtime/client/components/Footer.tsx
|
|
1313
1300
|
import { Bug, Pencil } from "lucide-react";
|
|
1314
|
-
import { memo as
|
|
1315
|
-
import { jsx as
|
|
1316
|
-
var DocsFooter =
|
|
1301
|
+
import { memo as memo3 } from "react";
|
|
1302
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1303
|
+
var DocsFooter = memo3(() => {
|
|
1317
1304
|
const { brand } = useDocsGlobalContext();
|
|
1318
|
-
return /* @__PURE__ */
|
|
1319
|
-
/* @__PURE__ */
|
|
1320
|
-
/* @__PURE__ */
|
|
1321
|
-
/* @__PURE__ */
|
|
1305
|
+
return /* @__PURE__ */ jsxs14("footer", { className: "mb-8 mt-12 text-sm border-t border-base-muted-light pt-10", children: [
|
|
1306
|
+
/* @__PURE__ */ jsxs14("div", { className: "mb-16 flex items-center gap-2", children: [
|
|
1307
|
+
/* @__PURE__ */ jsxs14("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
|
|
1308
|
+
/* @__PURE__ */ jsx17(Pencil, { className: "w-3 h-3" }),
|
|
1322
1309
|
" Edit this page"
|
|
1323
1310
|
] }),
|
|
1324
|
-
/* @__PURE__ */
|
|
1325
|
-
/* @__PURE__ */
|
|
1311
|
+
/* @__PURE__ */ jsxs14("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
|
|
1312
|
+
/* @__PURE__ */ jsx17(Bug, { className: "w-3 h-3" }),
|
|
1326
1313
|
" Report Issue"
|
|
1327
1314
|
] })
|
|
1328
1315
|
] }),
|
|
1329
|
-
/* @__PURE__ */
|
|
1330
|
-
/* @__PURE__ */
|
|
1331
|
-
/* @__PURE__ */
|
|
1316
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex justify-between items-center", children: [
|
|
1317
|
+
/* @__PURE__ */ jsx17(SocialLinks_default, {}),
|
|
1318
|
+
/* @__PURE__ */ jsx17("div", { className: "flex gap-2 items-center", children: brand && /* @__PURE__ */ jsx17(Brand, { brand, noText: true }) })
|
|
1332
1319
|
] })
|
|
1333
1320
|
] });
|
|
1334
1321
|
});
|
|
@@ -1384,8 +1371,9 @@ var HeadingLinkCopy = () => {
|
|
|
1384
1371
|
};
|
|
1385
1372
|
|
|
1386
1373
|
// src/runtime/client/components/Sidebar.tsx
|
|
1387
|
-
import { cmMerge as
|
|
1388
|
-
import { memo as
|
|
1374
|
+
import { cmMerge as cmMerge8 } from "@classmatejs/react";
|
|
1375
|
+
import { memo as memo4, useEffect as useEffect6, useRef as useRef3 } from "react";
|
|
1376
|
+
import { usePageContext as usePageContext5 } from "vike-react/usePageContext";
|
|
1389
1377
|
|
|
1390
1378
|
// src/runtime/client/components/docsNavigation.ts
|
|
1391
1379
|
var containsActiveHref = (items, currentHref) => {
|
|
@@ -1413,7 +1401,7 @@ var getVisibleGroupItems = (group) => {
|
|
|
1413
1401
|
var getGroupHref = (group) => group.href ?? null;
|
|
1414
1402
|
|
|
1415
1403
|
// src/runtime/client/components/Sidebar.tsx
|
|
1416
|
-
import { Fragment as
|
|
1404
|
+
import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1417
1405
|
var useAutoOpenDetails = (nodeId, isOpenByDefault, hasActiveDescendant) => {
|
|
1418
1406
|
const storedOpen = useDocsSidebarStore((state) => state.openNodes[nodeId]);
|
|
1419
1407
|
const { setNodeOpen } = useDocsSidebarActions();
|
|
@@ -1433,11 +1421,11 @@ var useAutoOpenDetails = (nodeId, isOpenByDefault, hasActiveDescendant) => {
|
|
|
1433
1421
|
};
|
|
1434
1422
|
};
|
|
1435
1423
|
var SidebarPageLink = ({ title, href, currentHref }) => {
|
|
1436
|
-
return /* @__PURE__ */
|
|
1424
|
+
return /* @__PURE__ */ jsx18("li", { className: "rounded-none", children: /* @__PURE__ */ jsx18(
|
|
1437
1425
|
"a",
|
|
1438
1426
|
{
|
|
1439
1427
|
href: withSiteBaseUrl(href),
|
|
1440
|
-
className:
|
|
1428
|
+
className: cmMerge8(
|
|
1441
1429
|
"text-base-muted hover:text-base-content justify-start hover:bg-base-200",
|
|
1442
1430
|
href === currentHref && "text-primary! font-semibold bg-base-200"
|
|
1443
1431
|
),
|
|
@@ -1446,13 +1434,13 @@ var SidebarPageLink = ({ title, href, currentHref }) => {
|
|
|
1446
1434
|
) });
|
|
1447
1435
|
};
|
|
1448
1436
|
var SidebarGroupDivider = ({ title }) => {
|
|
1449
|
-
return /* @__PURE__ */
|
|
1437
|
+
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
1438
|
};
|
|
1451
1439
|
var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) => {
|
|
1452
|
-
const content = /* @__PURE__ */
|
|
1440
|
+
const content = /* @__PURE__ */ jsx18(
|
|
1453
1441
|
"span",
|
|
1454
1442
|
{
|
|
1455
|
-
className:
|
|
1443
|
+
className: cmMerge8(
|
|
1456
1444
|
allowNavigation ? "font-medium" : "font-semibold",
|
|
1457
1445
|
isActive && allowNavigation && "text-primary!"
|
|
1458
1446
|
),
|
|
@@ -1460,11 +1448,11 @@ var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) =>
|
|
|
1460
1448
|
}
|
|
1461
1449
|
);
|
|
1462
1450
|
if (allowNavigation && href) {
|
|
1463
|
-
return /* @__PURE__ */
|
|
1451
|
+
return /* @__PURE__ */ jsx18(
|
|
1464
1452
|
"a",
|
|
1465
1453
|
{
|
|
1466
1454
|
href: withSiteBaseUrl(href),
|
|
1467
|
-
className:
|
|
1455
|
+
className: cmMerge8(
|
|
1468
1456
|
"flex items-center gap-2 text-base-muted hover:text-base-content no-underline",
|
|
1469
1457
|
isActive && "text-primary! font-semibold"
|
|
1470
1458
|
),
|
|
@@ -1472,19 +1460,19 @@ var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) =>
|
|
|
1472
1460
|
}
|
|
1473
1461
|
);
|
|
1474
1462
|
}
|
|
1475
|
-
return /* @__PURE__ */
|
|
1463
|
+
return /* @__PURE__ */ jsx18("span", { className: "flex items-center gap-2 text-base-content", children: content });
|
|
1476
1464
|
};
|
|
1477
1465
|
var renderSidebarItems = (items, currentHref) => {
|
|
1478
1466
|
return items.map((item) => {
|
|
1479
1467
|
if (item.kind === "page") {
|
|
1480
|
-
return /* @__PURE__ */
|
|
1468
|
+
return /* @__PURE__ */ jsx18(SidebarPageLink, { title: item.navTitle, href: item.href, currentHref }, item.id);
|
|
1481
1469
|
}
|
|
1482
|
-
return /* @__PURE__ */
|
|
1470
|
+
return /* @__PURE__ */ jsx18(SidebarNestedGroup, { group: item, currentHref }, item.id);
|
|
1483
1471
|
});
|
|
1484
1472
|
};
|
|
1485
1473
|
var SidebarItemList = ({ items, currentHref }) => {
|
|
1486
1474
|
const visibleItems = getVisibleNavItems(items);
|
|
1487
|
-
return /* @__PURE__ */
|
|
1475
|
+
return /* @__PURE__ */ jsx18("ul", { className: "menu lg:w-[97%]", children: renderSidebarItems(visibleItems, currentHref) });
|
|
1488
1476
|
};
|
|
1489
1477
|
var SidebarNestedGroup = ({ group, currentHref }) => {
|
|
1490
1478
|
const groupHref = getGroupHref(group);
|
|
@@ -1495,14 +1483,14 @@ var SidebarNestedGroup = ({ group, currentHref }) => {
|
|
|
1495
1483
|
const { isOpen, setIsOpen } = useAutoOpenDetails(`group:${group.id}`, isOpenByDefault, nestedHasActiveItem);
|
|
1496
1484
|
if (!isCollapsible) {
|
|
1497
1485
|
if (!group.title) {
|
|
1498
|
-
return /* @__PURE__ */
|
|
1486
|
+
return /* @__PURE__ */ jsx18(Fragment5, { children: renderSidebarItems(visibleItems, currentHref) });
|
|
1499
1487
|
}
|
|
1500
|
-
return /* @__PURE__ */
|
|
1501
|
-
/* @__PURE__ */
|
|
1488
|
+
return /* @__PURE__ */ jsxs15(Fragment5, { children: [
|
|
1489
|
+
/* @__PURE__ */ jsx18(SidebarGroupDivider, { title: group.title }),
|
|
1502
1490
|
renderSidebarItems(visibleItems, currentHref)
|
|
1503
1491
|
] });
|
|
1504
1492
|
}
|
|
1505
|
-
return /* @__PURE__ */
|
|
1493
|
+
return /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs15(
|
|
1506
1494
|
"details",
|
|
1507
1495
|
{
|
|
1508
1496
|
open: isOpen,
|
|
@@ -1510,7 +1498,7 @@ var SidebarNestedGroup = ({ group, currentHref }) => {
|
|
|
1510
1498
|
setIsOpen(event.currentTarget.open);
|
|
1511
1499
|
},
|
|
1512
1500
|
children: [
|
|
1513
|
-
/* @__PURE__ */
|
|
1501
|
+
/* @__PURE__ */ jsx18("summary", { children: /* @__PURE__ */ jsx18(
|
|
1514
1502
|
SidebarGroupTitle,
|
|
1515
1503
|
{
|
|
1516
1504
|
title: group.title,
|
|
@@ -1519,7 +1507,7 @@ var SidebarNestedGroup = ({ group, currentHref }) => {
|
|
|
1519
1507
|
allowNavigation: Boolean(groupHref)
|
|
1520
1508
|
}
|
|
1521
1509
|
) }),
|
|
1522
|
-
visibleItems.length > 0 ? /* @__PURE__ */
|
|
1510
|
+
visibleItems.length > 0 ? /* @__PURE__ */ jsx18(SidebarItemList, { items: visibleItems, currentHref }) : null
|
|
1523
1511
|
]
|
|
1524
1512
|
}
|
|
1525
1513
|
) });
|
|
@@ -1531,7 +1519,7 @@ var SidebarSectionGroup = ({ section, currentHref, activeSectionId }) => {
|
|
|
1531
1519
|
section.id === activeSectionId,
|
|
1532
1520
|
sectionHasActiveItem
|
|
1533
1521
|
);
|
|
1534
|
-
return /* @__PURE__ */
|
|
1522
|
+
return /* @__PURE__ */ jsx18("li", { className: "pb-4", children: /* @__PURE__ */ jsxs15(
|
|
1535
1523
|
"details",
|
|
1536
1524
|
{
|
|
1537
1525
|
open: isOpen,
|
|
@@ -1539,26 +1527,28 @@ var SidebarSectionGroup = ({ section, currentHref, activeSectionId }) => {
|
|
|
1539
1527
|
setIsOpen(event.currentTarget.open);
|
|
1540
1528
|
},
|
|
1541
1529
|
children: [
|
|
1542
|
-
/* @__PURE__ */
|
|
1543
|
-
/* @__PURE__ */
|
|
1530
|
+
/* @__PURE__ */ jsx18("summary", { children: /* @__PURE__ */ jsx18(SidebarGroupTitle, { title: section.title, isActive: sectionHasActiveItem }) }),
|
|
1531
|
+
/* @__PURE__ */ jsx18(SidebarItemList, { items: section.items, currentHref })
|
|
1544
1532
|
]
|
|
1545
1533
|
}
|
|
1546
1534
|
) });
|
|
1547
1535
|
};
|
|
1548
|
-
var Sidebar =
|
|
1536
|
+
var Sidebar = memo4(
|
|
1549
1537
|
({ currentHref: currentHrefProp = "", activeSectionId: activeSectionIdProp = "" }) => {
|
|
1550
1538
|
const scrollContainerRef = useRef3(null);
|
|
1551
|
-
const
|
|
1552
|
-
const
|
|
1553
|
-
const
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1539
|
+
const { urlPathname } = usePageContext5();
|
|
1540
|
+
const currentHref = currentHrefProp || urlPathname;
|
|
1541
|
+
const docs = useDocsGlobalContext();
|
|
1542
|
+
const activeSectionId = activeSectionIdProp || getActiveSectionByPathname(docs, currentHref)?.id || "";
|
|
1543
|
+
const { sidebarSections } = docs;
|
|
1544
|
+
return /* @__PURE__ */ jsx18("aside", { className: "hidden basis-76 shrink-0 lg:block", children: /* @__PURE__ */ jsxs15("div", { className: "-ml-3 sticky top-14", children: [
|
|
1545
|
+
/* @__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" }),
|
|
1546
|
+
/* @__PURE__ */ jsx18(
|
|
1557
1547
|
"div",
|
|
1558
1548
|
{
|
|
1559
1549
|
ref: scrollContainerRef,
|
|
1560
|
-
className: "pr-4 h-[calc(100svh-
|
|
1561
|
-
children: /* @__PURE__ */
|
|
1550
|
+
className: "pr-4 h-[calc(100svh-14*var(--spacing))] overflow-y-scroll relative z-10",
|
|
1551
|
+
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
1552
|
SidebarSectionGroup,
|
|
1563
1553
|
{
|
|
1564
1554
|
section,
|
|
@@ -1574,10 +1564,210 @@ var Sidebar = memo5(
|
|
|
1574
1564
|
);
|
|
1575
1565
|
|
|
1576
1566
|
// src/runtime/client/components/TableOfContents.tsx
|
|
1577
|
-
import
|
|
1567
|
+
import cm6, { cmMerge as cmMerge9 } from "@classmatejs/react";
|
|
1578
1568
|
import { Flame, TableOfContentsIcon } from "lucide-react";
|
|
1569
|
+
import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1570
|
+
var TableOfContents = ({
|
|
1571
|
+
headings: headingsProp = [],
|
|
1572
|
+
tableOfContents: tableOfContentsProp = false,
|
|
1573
|
+
activeHeadingId = "",
|
|
1574
|
+
setActiveHeadingId = () => void 0
|
|
1575
|
+
}) => {
|
|
1576
|
+
const { partners } = useDocsGlobalContext();
|
|
1577
|
+
const effectiveHeadings = headingsProp;
|
|
1578
|
+
const effectiveTableOfContents = tableOfContentsProp;
|
|
1579
|
+
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: [
|
|
1580
|
+
effectiveTableOfContents ? effectiveHeadings.length > 0 && /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
1581
|
+
/* @__PURE__ */ jsxs16("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
|
|
1582
|
+
/* @__PURE__ */ jsx19(TableOfContentsIcon, { className: "h-3 w-3" }),
|
|
1583
|
+
"On this page"
|
|
1584
|
+
] }),
|
|
1585
|
+
/* @__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(
|
|
1586
|
+
"a",
|
|
1587
|
+
{
|
|
1588
|
+
href: `#${heading.id}`,
|
|
1589
|
+
"aria-current": activeHeadingId === heading.id ? "location" : void 0,
|
|
1590
|
+
onClick: () => setActiveHeadingId(heading.id),
|
|
1591
|
+
className: cmMerge9(
|
|
1592
|
+
"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",
|
|
1593
|
+
heading.depth > 2 ? "pl-6" : "pl-4",
|
|
1594
|
+
activeHeadingId === heading.id ? "border-l-2 border-primary font-semibold text-base-content" : ""
|
|
1595
|
+
),
|
|
1596
|
+
children: heading.title
|
|
1597
|
+
}
|
|
1598
|
+
) }, heading.id)) }) })
|
|
1599
|
+
] }) : null,
|
|
1600
|
+
/* @__PURE__ */ jsx19(Adbar, { partners })
|
|
1601
|
+
] }) }) });
|
|
1602
|
+
};
|
|
1603
|
+
var Adbar = ({ partners }) => {
|
|
1604
|
+
if (partners.primary.length === 0 && partners.gold.length === 0) {
|
|
1605
|
+
return null;
|
|
1606
|
+
}
|
|
1607
|
+
return /* @__PURE__ */ jsxs16("aside", { children: [
|
|
1608
|
+
/* @__PURE__ */ jsxs16("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
|
|
1609
|
+
/* @__PURE__ */ jsx19(Flame, { className: "h-3 w-3" }),
|
|
1610
|
+
"Partners"
|
|
1611
|
+
] }),
|
|
1612
|
+
/* @__PURE__ */ jsxs16("ul", { className: "grid grid-cols-[repeat(auto-fit,minmax(5.5rem,1fr))] gap-3 opacity-90", children: [
|
|
1613
|
+
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)),
|
|
1614
|
+
partners.gold.map((partner) => /* @__PURE__ */ jsx19(AdbarItem, { children: /* @__PURE__ */ jsx19(AdbarLink, { href: partner.href, title: partner.name, children: /* @__PURE__ */ jsx19(PartnerLogo, { partner }) }) }, partner.name))
|
|
1615
|
+
] })
|
|
1616
|
+
] });
|
|
1617
|
+
};
|
|
1618
|
+
var PartnerLogo = ({
|
|
1619
|
+
partner
|
|
1620
|
+
}) => {
|
|
1621
|
+
return /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
1622
|
+
/* @__PURE__ */ jsx19(
|
|
1623
|
+
Image,
|
|
1624
|
+
{
|
|
1625
|
+
src: partner.logoLight,
|
|
1626
|
+
width: 200,
|
|
1627
|
+
height: 100,
|
|
1628
|
+
alt: partner.logoAlt,
|
|
1629
|
+
className: cmMerge9("block", partner.logoDark ? "dark:hidden" : "dark:invert")
|
|
1630
|
+
}
|
|
1631
|
+
),
|
|
1632
|
+
partner.logoDark ? /* @__PURE__ */ jsx19(Image, { src: partner.logoDark, width: 200, height: 100, alt: partner.logoAlt, className: "hidden dark:block" }) : null
|
|
1633
|
+
] });
|
|
1634
|
+
};
|
|
1635
|
+
var AdbarItem = cm6.div`
|
|
1636
|
+
px-5
|
|
1637
|
+
py-5
|
|
1638
|
+
bg-base-200
|
|
1639
|
+
text-center
|
|
1640
|
+
flex
|
|
1641
|
+
items-center
|
|
1642
|
+
justify-center
|
|
1643
|
+
rounded-field
|
|
1644
|
+
`;
|
|
1645
|
+
var AdbarLink = cm6.a`
|
|
1646
|
+
block
|
|
1647
|
+
w-full
|
|
1648
|
+
transition-opacity
|
|
1649
|
+
hover:opacity-100
|
|
1650
|
+
focus-visible:opacity-100
|
|
1651
|
+
`;
|
|
1652
|
+
var Image = cm6.img`
|
|
1653
|
+
mx-auto
|
|
1654
|
+
w-24
|
|
1655
|
+
`;
|
|
1656
|
+
|
|
1657
|
+
// src/runtime/client/components/TableOfContentsMobile.tsx
|
|
1658
|
+
import cm7 from "@classmatejs/react";
|
|
1659
|
+
import { TableOfContents as TableOfContents2 } from "lucide-react";
|
|
1660
|
+
|
|
1661
|
+
// src/runtime/client/components/BreadcrumbSidebarTrigger.tsx
|
|
1662
|
+
import { ChevronLast, ChevronsRight } from "lucide-react";
|
|
1663
|
+
import { useCallback as useCallback4 } from "react";
|
|
1664
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1665
|
+
var dedupeBreadcrumbs = (items) => {
|
|
1666
|
+
return items.filter((item, index) => index === 0 || items[index - 1]?.title !== item.title);
|
|
1667
|
+
};
|
|
1668
|
+
var getSidebarBreadcrumbs = (items, currentHref) => {
|
|
1669
|
+
for (const item of items) {
|
|
1670
|
+
if (item.kind === "page") {
|
|
1671
|
+
if (item.href === currentHref) {
|
|
1672
|
+
return [{ id: item.id, title: item.navTitle }];
|
|
1673
|
+
}
|
|
1674
|
+
continue;
|
|
1675
|
+
}
|
|
1676
|
+
if (item.href === currentHref) {
|
|
1677
|
+
return item.title ? [{ id: item.id, title: item.title }] : [];
|
|
1678
|
+
}
|
|
1679
|
+
const nestedBreadcrumbs = getSidebarBreadcrumbs(item.items, currentHref);
|
|
1680
|
+
if (!nestedBreadcrumbs) {
|
|
1681
|
+
continue;
|
|
1682
|
+
}
|
|
1683
|
+
return dedupeBreadcrumbs(
|
|
1684
|
+
item.title ? [{ id: item.id, title: item.title }, ...nestedBreadcrumbs] : nestedBreadcrumbs
|
|
1685
|
+
);
|
|
1686
|
+
}
|
|
1687
|
+
return null;
|
|
1688
|
+
};
|
|
1689
|
+
var BreadcrumbSidebarTrigger = ({ currentHref }) => {
|
|
1690
|
+
const docs = useDocsGlobalContext();
|
|
1691
|
+
const activeSection = getActiveSectionByPathname(docs, currentHref);
|
|
1692
|
+
const breadcrumbItems = dedupeBreadcrumbs([
|
|
1693
|
+
...activeSection ? [{ id: activeSection.id, title: activeSection.navTitle }] : [],
|
|
1694
|
+
...activeSection ? getSidebarBreadcrumbs(activeSection.items, currentHref) ?? [] : []
|
|
1695
|
+
]);
|
|
1696
|
+
const handleClick = useCallback4(() => {
|
|
1697
|
+
alert("TODO: Open mobile menu");
|
|
1698
|
+
}, []);
|
|
1699
|
+
return /* @__PURE__ */ jsx20("button", { className: "cursor-pointer min-w-0 max-w-full hidden md:block", type: "button", onClick: handleClick, children: /* @__PURE__ */ jsxs17("span", { className: "flex items-center gap-1 min-w-0 overflow-hidden lg:hidden", children: [
|
|
1700
|
+
/* @__PURE__ */ jsx20(ChevronLast, { className: "w-4 h-4 shrink-0 text-primary" }),
|
|
1701
|
+
/* @__PURE__ */ jsx20("span", { className: "hidden md:flex items-center gap-1", children: breadcrumbItems.map((item, index) => /* @__PURE__ */ jsxs17("span", { className: "contents", children: [
|
|
1702
|
+
index > 0 ? /* @__PURE__ */ jsx20(ChevronsRight, { className: "w-4 h-4 shrink-0 text-base-muted-medium" }) : null,
|
|
1703
|
+
/* @__PURE__ */ jsx20("span", { className: index === 0 ? "font-semibold truncate" : "text-sm truncate", children: renderInlineMarkdown(item.title, { codeClassName: "text-sm!" }) })
|
|
1704
|
+
] }, item.id)) })
|
|
1705
|
+
] }) });
|
|
1706
|
+
};
|
|
1707
|
+
var BreadcrumbSidebarTrigger_default = BreadcrumbSidebarTrigger;
|
|
1708
|
+
|
|
1709
|
+
// src/runtime/client/components/TableOfContentsMobile.tsx
|
|
1710
|
+
import { Fragment as Fragment7, jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1711
|
+
var TableOfContentsMobile = ({
|
|
1712
|
+
headings = [],
|
|
1713
|
+
tableOfContents = false,
|
|
1714
|
+
pageTitle = "On this page",
|
|
1715
|
+
currentHref,
|
|
1716
|
+
activeHeadingId = "",
|
|
1717
|
+
setActiveHeadingId = () => void 0
|
|
1718
|
+
}) => {
|
|
1719
|
+
const topOptionValue = "__docs-page-top__";
|
|
1720
|
+
const selectedValue = tableOfContents && headings.some((heading) => heading.id === activeHeadingId) ? activeHeadingId : "";
|
|
1721
|
+
return /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
1722
|
+
/* @__PURE__ */ jsx21("div", { className: "h-12 xl:hidden" }),
|
|
1723
|
+
/* @__PURE__ */ jsx21(StyledTOC, { children: /* @__PURE__ */ jsxs18(StyledTOCInner, { children: [
|
|
1724
|
+
/* @__PURE__ */ jsx21(BreadcrumbSidebarTrigger_default, { currentHref }),
|
|
1725
|
+
/* @__PURE__ */ jsxs18("label", { className: "select select-sm md:w-80 w-full", htmlFor: "table-of-contents-select", children: [
|
|
1726
|
+
/* @__PURE__ */ jsx21("span", { className: "label flex", children: /* @__PURE__ */ jsx21(TableOfContents2, { className: "w-4 h-4" }) }),
|
|
1727
|
+
/* @__PURE__ */ jsxs18(
|
|
1728
|
+
"select",
|
|
1729
|
+
{
|
|
1730
|
+
id: "table-of-contents-select",
|
|
1731
|
+
value: selectedValue || topOptionValue,
|
|
1732
|
+
onChange: (e) => {
|
|
1733
|
+
const value = e.target.value;
|
|
1734
|
+
if (value === topOptionValue) {
|
|
1735
|
+
setActiveHeadingId("");
|
|
1736
|
+
window.history.replaceState(null, "", `${window.location.pathname}${window.location.search}`);
|
|
1737
|
+
window.scrollTo({ top: 0, behavior: "auto" });
|
|
1738
|
+
return;
|
|
1739
|
+
}
|
|
1740
|
+
setActiveHeadingId(value);
|
|
1741
|
+
window.location.hash = encodeURIComponent(value);
|
|
1742
|
+
},
|
|
1743
|
+
children: [
|
|
1744
|
+
/* @__PURE__ */ jsx21("option", { value: topOptionValue, children: pageTitle }),
|
|
1745
|
+
tableOfContents && headings.map((heading) => /* @__PURE__ */ jsx21("option", { value: heading.id, children: heading.title }, heading.id))
|
|
1746
|
+
]
|
|
1747
|
+
}
|
|
1748
|
+
)
|
|
1749
|
+
] })
|
|
1750
|
+
] }) })
|
|
1751
|
+
] });
|
|
1752
|
+
};
|
|
1753
|
+
var TableOfContentsMobile_default = TableOfContentsMobile;
|
|
1754
|
+
var StyledTOC = cm7.div`
|
|
1755
|
+
block xl:hidden
|
|
1756
|
+
fixed
|
|
1757
|
+
bg-base-100 border-b-base-muted-light
|
|
1758
|
+
w-full h-14
|
|
1759
|
+
top-14 left-0 border-b z-5
|
|
1760
|
+
lg:w-[calc(100svw-80*var(--spacing))]
|
|
1761
|
+
lg:left-80
|
|
1762
|
+
`;
|
|
1763
|
+
var StyledTOCInner = cm7.div`
|
|
1764
|
+
absolute inset-0 flex justify-between items-center
|
|
1765
|
+
pr-4
|
|
1766
|
+
px-4 lg:pl-14
|
|
1767
|
+
`;
|
|
1768
|
+
|
|
1769
|
+
// src/runtime/client/components/useTableOfContentsState.ts
|
|
1579
1770
|
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
1771
|
var getCurrentHash = () => {
|
|
1582
1772
|
try {
|
|
1583
1773
|
return decodeURIComponent(window.location.hash);
|
|
@@ -1614,7 +1804,8 @@ var syncHeadingsFromDom = (setDomHeadings) => {
|
|
|
1614
1804
|
if (!title) {
|
|
1615
1805
|
return null;
|
|
1616
1806
|
}
|
|
1617
|
-
element.classList.add("scroll-mt-
|
|
1807
|
+
element.classList.add("scroll-mt-32");
|
|
1808
|
+
element.classList.add("xl:scroll-mt-24");
|
|
1618
1809
|
const id = element.id || slugify(title);
|
|
1619
1810
|
if (!element.id) {
|
|
1620
1811
|
element.id = id;
|
|
@@ -1638,7 +1829,7 @@ var updateActiveHeadingFromScroll = (setActiveHeadingId) => {
|
|
|
1638
1829
|
return;
|
|
1639
1830
|
}
|
|
1640
1831
|
const activationOffset = 144;
|
|
1641
|
-
let nextActiveHeadingId =
|
|
1832
|
+
let nextActiveHeadingId = "";
|
|
1642
1833
|
for (const heading of headingElements) {
|
|
1643
1834
|
if (!heading.id) {
|
|
1644
1835
|
continue;
|
|
@@ -1655,18 +1846,12 @@ var updateActiveHeadingFromScroll = (setActiveHeadingId) => {
|
|
|
1655
1846
|
}
|
|
1656
1847
|
setActiveHeadingId(nextActiveHeadingId);
|
|
1657
1848
|
};
|
|
1658
|
-
var
|
|
1659
|
-
headings:
|
|
1660
|
-
tableOfContents: tableOfContentsProp = false
|
|
1849
|
+
var useTableOfContentsState = ({
|
|
1850
|
+
headings: routeHeadings = []
|
|
1661
1851
|
}) => {
|
|
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
1852
|
const [activeHeadingId, setActiveHeadingId] = useState4("");
|
|
1668
|
-
const [domHeadings, setDomHeadings] = useState4(
|
|
1669
|
-
const effectiveHeadings = domHeadings.length > 0 ? domHeadings :
|
|
1853
|
+
const [domHeadings, setDomHeadings] = useState4(routeHeadings);
|
|
1854
|
+
const effectiveHeadings = domHeadings.length > 0 ? domHeadings : routeHeadings;
|
|
1670
1855
|
useEffect7(() => {
|
|
1671
1856
|
let scrollFrame = 0;
|
|
1672
1857
|
const syncActiveHeading = () => {
|
|
@@ -1708,126 +1893,181 @@ var TableOfContents = ({
|
|
|
1708
1893
|
return;
|
|
1709
1894
|
}
|
|
1710
1895
|
setDomHeadings((currentHeadings) => {
|
|
1711
|
-
if (areHeadingsEqual(currentHeadings,
|
|
1896
|
+
if (areHeadingsEqual(currentHeadings, routeHeadings)) {
|
|
1712
1897
|
return currentHeadings;
|
|
1713
1898
|
}
|
|
1714
|
-
return
|
|
1899
|
+
return routeHeadings;
|
|
1715
1900
|
});
|
|
1716
1901
|
setActiveHeadingId("");
|
|
1717
1902
|
queueMicrotask(() => {
|
|
1718
1903
|
syncHeadingsFromDom(setDomHeadings);
|
|
1719
1904
|
updateActiveHeadingFromScroll(setActiveHeadingId);
|
|
1720
1905
|
});
|
|
1721
|
-
}, [
|
|
1722
|
-
return
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1906
|
+
}, [routeHeadings]);
|
|
1907
|
+
return {
|
|
1908
|
+
activeHeadingId,
|
|
1909
|
+
effectiveHeadings,
|
|
1910
|
+
setActiveHeadingId
|
|
1911
|
+
};
|
|
1912
|
+
};
|
|
1913
|
+
|
|
1914
|
+
// src/runtime/client/DocsLayout.tsx
|
|
1915
|
+
import { Fragment as Fragment8, jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1916
|
+
var DocsLayout = ({ children }) => {
|
|
1917
|
+
const data = useData();
|
|
1918
|
+
const { activeHeadingId, effectiveHeadings, setActiveHeadingId } = useTableOfContentsState({
|
|
1919
|
+
headings: data.headings
|
|
1920
|
+
});
|
|
1921
|
+
return /* @__PURE__ */ jsxs19(Fragment8, { children: [
|
|
1922
|
+
/* @__PURE__ */ jsx22(HeadingLinkCopy, {}),
|
|
1923
|
+
/* @__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" }),
|
|
1924
|
+
/* @__PURE__ */ jsx22(LayoutComponent, { children: /* @__PURE__ */ jsxs19("div", { className: "lg:flex gap-14", children: [
|
|
1925
|
+
/* @__PURE__ */ jsx22(Sidebar, { currentHref: data.page.href, activeSectionId: data.page.sectionId }),
|
|
1926
|
+
/* @__PURE__ */ jsxs19("main", { className: "min-w-0 flex-1 basis-auto shrink", children: [
|
|
1927
|
+
/* @__PURE__ */ jsx22(
|
|
1928
|
+
TableOfContentsMobile_default,
|
|
1929
|
+
{
|
|
1930
|
+
headings: effectiveHeadings,
|
|
1931
|
+
tableOfContents: data.page.tableOfContents && effectiveHeadings.length > 0,
|
|
1932
|
+
pageTitle: data.page.title,
|
|
1933
|
+
currentHref: data.page.href,
|
|
1934
|
+
activeHeadingId,
|
|
1935
|
+
setActiveHeadingId
|
|
1936
|
+
}
|
|
1937
|
+
),
|
|
1938
|
+
/* @__PURE__ */ jsx22("div", { className: "mt-10 min-w-0", children }),
|
|
1939
|
+
/* @__PURE__ */ jsx22(DocsPagination, { previousPage: data.previousPage, nextPage: data.nextPage }),
|
|
1940
|
+
/* @__PURE__ */ jsx22(DocsFooter, {})
|
|
1727
1941
|
] }),
|
|
1728
|
-
/* @__PURE__ */
|
|
1729
|
-
|
|
1942
|
+
/* @__PURE__ */ jsx22(
|
|
1943
|
+
TableOfContents,
|
|
1730
1944
|
{
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
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
|
|
1945
|
+
headings: effectiveHeadings,
|
|
1946
|
+
tableOfContents: data.page.tableOfContents,
|
|
1947
|
+
activeHeadingId,
|
|
1948
|
+
setActiveHeadingId
|
|
1740
1949
|
}
|
|
1741
|
-
)
|
|
1742
|
-
] })
|
|
1743
|
-
|
|
1744
|
-
] }) }) });
|
|
1950
|
+
)
|
|
1951
|
+
] }) })
|
|
1952
|
+
] });
|
|
1745
1953
|
};
|
|
1746
|
-
|
|
1747
|
-
|
|
1954
|
+
|
|
1955
|
+
// src/runtime/client/DocsPage.tsx
|
|
1956
|
+
import { useData as useData2 } from "vike-react/useData";
|
|
1957
|
+
import { usePageContext as usePageContext6 } from "vike-react/usePageContext";
|
|
1958
|
+
|
|
1959
|
+
// src/runtime/client/getMdxRuntimeValue.tsx
|
|
1960
|
+
var isExternalHref = (href) => {
|
|
1961
|
+
return /^(?:[a-z]+:)?\/\//i.test(href) || href.startsWith("mailto:") || href.startsWith("tel:");
|
|
1962
|
+
};
|
|
1963
|
+
var splitHref = (href) => {
|
|
1964
|
+
const [pathname, hash = ""] = href.split("#");
|
|
1965
|
+
return {
|
|
1966
|
+
pathname,
|
|
1967
|
+
hash: hash ? `#${hash}` : ""
|
|
1968
|
+
};
|
|
1969
|
+
};
|
|
1970
|
+
var resolveDocLink = (options) => {
|
|
1971
|
+
const { currentPathname, href } = options;
|
|
1972
|
+
if (href.startsWith("#") || isExternalHref(href)) {
|
|
1748
1973
|
return null;
|
|
1749
1974
|
}
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1975
|
+
const { pathname, hash } = splitHref(href);
|
|
1976
|
+
const docsPathname = resolveDocsHref(options.docs.basePath, pathname);
|
|
1977
|
+
if (!docsPathname) {
|
|
1978
|
+
return null;
|
|
1979
|
+
}
|
|
1980
|
+
const page = getResolvedPageByPathname(options.docs, docsPathname);
|
|
1981
|
+
if (!page) {
|
|
1982
|
+
return null;
|
|
1983
|
+
}
|
|
1984
|
+
const section = getResolvedSectionById(options.docs, page.sectionId);
|
|
1985
|
+
return {
|
|
1986
|
+
href: withSiteBaseUrl(`${page.href}${hash}`),
|
|
1987
|
+
title: page.title,
|
|
1988
|
+
breadcrumb: section ? [section.navTitle] : [],
|
|
1989
|
+
isCurrentPage: isSamePagePathname(page, currentPathname)
|
|
1990
|
+
};
|
|
1760
1991
|
};
|
|
1761
|
-
var
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1992
|
+
var resolveOverviewItem = (options) => {
|
|
1993
|
+
const page = options.docs.pages.find((candidate) => candidate.id === options.id);
|
|
1994
|
+
if (!page) {
|
|
1995
|
+
return null;
|
|
1996
|
+
}
|
|
1997
|
+
return {
|
|
1998
|
+
title: page.title,
|
|
1999
|
+
href: withSiteBaseUrl(page.href),
|
|
2000
|
+
excerpt: page.description ?? null
|
|
2001
|
+
};
|
|
2002
|
+
};
|
|
2003
|
+
var getMdxRuntimeValue = (options) => {
|
|
2004
|
+
const { currentPathname, docs } = options;
|
|
2005
|
+
const activeSection = getActiveSectionByPathname(docs, currentPathname);
|
|
2006
|
+
const currentPage = getResolvedPageByPathname(docs, currentPathname);
|
|
2007
|
+
return {
|
|
2008
|
+
locale: "en",
|
|
2009
|
+
codeBlockChoices: docsCodeBlockChoiceStore,
|
|
2010
|
+
localizeHref: (href) => {
|
|
2011
|
+
if (href.startsWith("#") || isExternalHref(href)) {
|
|
2012
|
+
return href;
|
|
1773
2013
|
}
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
2014
|
+
const { pathname, hash } = splitHref(href);
|
|
2015
|
+
const docsPathname = resolveDocsHref(docs.basePath, pathname);
|
|
2016
|
+
const page = docsPathname ? getResolvedPageByPathname(docs, docsPathname) : null;
|
|
2017
|
+
if (!page) {
|
|
2018
|
+
if (docsPathname && !pathname.startsWith("/")) {
|
|
2019
|
+
return withSiteBaseUrl(`${docsPathname}${hash}`);
|
|
2020
|
+
}
|
|
2021
|
+
return withSiteBaseUrl(href);
|
|
2022
|
+
}
|
|
2023
|
+
return withSiteBaseUrl(`${page.href}${hash}`);
|
|
2024
|
+
},
|
|
2025
|
+
resolveDocLink: ({ href }) => resolveDocLink({
|
|
2026
|
+
docs,
|
|
2027
|
+
currentPathname,
|
|
2028
|
+
href
|
|
2029
|
+
}),
|
|
2030
|
+
resolveOverviewItem: (id) => resolveOverviewItem({
|
|
2031
|
+
docs,
|
|
2032
|
+
id
|
|
2033
|
+
}),
|
|
2034
|
+
t: (group, key) => {
|
|
2035
|
+
if (group === "docs" && key === "onThisPage") {
|
|
2036
|
+
return "On this page";
|
|
2037
|
+
}
|
|
2038
|
+
if (group === "docs" && key === "previous") {
|
|
2039
|
+
return "Previous";
|
|
2040
|
+
}
|
|
2041
|
+
if (group === "docs" && key === "next") {
|
|
2042
|
+
return "Next";
|
|
2043
|
+
}
|
|
2044
|
+
if (group === "docs" && key === "currentSection") {
|
|
2045
|
+
return activeSection?.navTitle ?? currentPage?.title ?? "Docs";
|
|
2046
|
+
}
|
|
2047
|
+
return key;
|
|
2048
|
+
}
|
|
2049
|
+
};
|
|
1777
2050
|
};
|
|
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
2051
|
|
|
1800
|
-
// src/runtime/client/
|
|
1801
|
-
import {
|
|
1802
|
-
var
|
|
1803
|
-
|
|
1804
|
-
const
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
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
|
-
] });
|
|
2052
|
+
// src/runtime/client/DocsPage.tsx
|
|
2053
|
+
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2054
|
+
var DocsPage = ({ Content }) => {
|
|
2055
|
+
const pageContext = usePageContext6();
|
|
2056
|
+
const docs = useDocsGlobalContext();
|
|
2057
|
+
const { page } = useData2();
|
|
2058
|
+
return /* @__PURE__ */ jsx23(
|
|
2059
|
+
UniversalMdxProvider,
|
|
2060
|
+
{
|
|
2061
|
+
value: getMdxRuntimeValue({
|
|
2062
|
+
docs,
|
|
2063
|
+
currentPathname: pageContext.urlPathname
|
|
2064
|
+
}),
|
|
2065
|
+
children: /* @__PURE__ */ jsxs20(ProseContainer, { "data-doc-content": "", children: [
|
|
2066
|
+
/* @__PURE__ */ jsx23("h1", { className: "scroll-mt-32 xl:scroll-mt-24", children: renderInlineMarkdown(page.title) }),
|
|
2067
|
+
/* @__PURE__ */ jsx23(Content, {})
|
|
2068
|
+
] })
|
|
2069
|
+
}
|
|
2070
|
+
);
|
|
1831
2071
|
};
|
|
1832
2072
|
|
|
1833
2073
|
export {
|
|
@@ -1835,8 +2075,6 @@ export {
|
|
|
1835
2075
|
useDocsSearchActions,
|
|
1836
2076
|
useDocsSidebarStore,
|
|
1837
2077
|
useDocsSidebarActions,
|
|
1838
|
-
useDocsRouteStore,
|
|
1839
|
-
useDocsRouteActions,
|
|
1840
2078
|
LayoutComponent,
|
|
1841
2079
|
useDocsUserSettingsStore,
|
|
1842
2080
|
DEFAULT_THEME_PREFERENCE,
|
|
@@ -1845,7 +2083,7 @@ export {
|
|
|
1845
2083
|
AppLayout,
|
|
1846
2084
|
MetaHead,
|
|
1847
2085
|
ProseContainer,
|
|
1848
|
-
|
|
1849
|
-
|
|
2086
|
+
DocsLayout,
|
|
2087
|
+
DocsPage
|
|
1850
2088
|
};
|
|
1851
|
-
//# sourceMappingURL=chunk-
|
|
2089
|
+
//# sourceMappingURL=chunk-6TXPHBIC.js.map
|