@unterberg/nivel 0.1.10 → 0.1.13

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.
Files changed (38) hide show
  1. package/README.md +5 -13
  2. package/dist/SearchModal-YJZFUB53.js +335 -0
  3. package/dist/SearchModal-YJZFUB53.js.map +1 -0
  4. package/dist/{chunk-GT62XN7K.js → chunk-DCHQC4WP.js} +13 -22
  5. package/dist/chunk-DCHQC4WP.js.map +1 -0
  6. package/dist/chunk-ESAHWFDZ.js +196 -0
  7. package/dist/chunk-ESAHWFDZ.js.map +1 -0
  8. package/dist/{chunk-6Q5XESPG.js → chunk-OUDSISNU.js} +3 -3
  9. package/dist/{chunk-HQHLPFGA.js → chunk-PKXDOKJY.js} +5 -3
  10. package/dist/{chunk-HQHLPFGA.js.map → chunk-PKXDOKJY.js.map} +1 -1
  11. package/dist/chunk-PYYPYIBD.js +49 -0
  12. package/dist/chunk-PYYPYIBD.js.map +1 -0
  13. package/dist/{chunk-NDJ5LYLK.js → chunk-QWIYQPCW.js} +6 -45
  14. package/dist/chunk-QWIYQPCW.js.map +1 -0
  15. package/dist/{chunk-F4OBB7JD.js → chunk-SH5XWPXW.js} +482 -818
  16. package/dist/chunk-SH5XWPXW.js.map +1 -0
  17. package/dist/cli.js +3 -2
  18. package/dist/cli.js.map +1 -1
  19. package/dist/client.d.ts +1 -1
  20. package/dist/client.js +8 -5
  21. package/dist/config.d.ts +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +3 -2
  24. package/dist/mdx.js +3 -2
  25. package/dist/mdx.js.map +1 -1
  26. package/dist/runtime/client.d.ts +1 -1
  27. package/dist/runtime/client.js +8 -5
  28. package/dist/runtime/node.d.ts +1 -1
  29. package/dist/runtime/node.js +4 -3
  30. package/dist/{types-BGAec0JI.d.ts → types-IiJ1jLWc.d.ts} +1 -0
  31. package/dist/vike.d.ts +1 -1
  32. package/dist/vike.js +249 -4
  33. package/dist/vike.js.map +1 -1
  34. package/package.json +6 -7
  35. package/dist/chunk-F4OBB7JD.js.map +0 -1
  36. package/dist/chunk-GT62XN7K.js.map +0 -1
  37. package/dist/chunk-NDJ5LYLK.js.map +0 -1
  38. /package/dist/{chunk-6Q5XESPG.js.map → chunk-OUDSISNU.js.map} +0 -0
@@ -1,3 +1,16 @@
1
+ import {
2
+ DocsGlobalContextProvider,
3
+ DocsRuntimeStoreProvider,
4
+ LayoutComponent,
5
+ createDocsRuntimeStore,
6
+ getDocsFromGlobalContext,
7
+ useDocsFromPageGlobalContext,
8
+ useDocsGlobalContext,
9
+ useDocsSearchActions,
10
+ useDocsSearchStore,
11
+ useDocsSidebarActions,
12
+ useDocsSidebarStore
13
+ } from "./chunk-ESAHWFDZ.js";
1
14
  import {
2
15
  createHeadingSlugger,
3
16
  normalizeHeadingTitle
@@ -11,557 +24,100 @@ import {
11
24
  getResolvedPageByPathname,
12
25
  getResolvedSectionById,
13
26
  isSamePagePathname,
27
+ resolveDocsHref
28
+ } from "./chunk-QWIYQPCW.js";
29
+ import {
14
30
  nivelAssetUrl,
15
- resolveDocsHref,
16
31
  withSiteBaseUrl
17
- } from "./chunk-NDJ5LYLK.js";
32
+ } from "./chunk-PYYPYIBD.js";
18
33
 
19
34
  // src/runtime/client/AppLayout.tsx
20
- import { cmMerge as cmMerge6 } from "@classmatejs/react";
21
- import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
22
- import { usePageContext as usePageContext4 } from "vike-react/usePageContext";
35
+ import { cmMerge as cmMerge5 } from "@classmatejs/react";
36
+ import { usePageContext as usePageContext2 } from "vike-react/usePageContext";
23
37
 
24
38
  // src/runtime/client/components/Navbar/index.tsx
25
- import cm4 from "@classmatejs/react";
26
- import { usePageContext as usePageContext3 } from "vike-react/usePageContext";
27
-
28
- // src/runtime/client/docsGlobalContext.ts
29
- import { createContext, createElement, useContext } from "react";
39
+ import cm3 from "@classmatejs/react";
40
+ import { useEffect as useEffect4, useState as useState4 } from "react";
30
41
  import { usePageContext } from "vike-react/usePageContext";
31
- var DocsGlobalContext = createContext(null);
32
- var getDocsFromGlobalContext = (pageContext) => {
33
- const docs = pageContext.globalContext?.docs;
34
- if (!docs) {
35
- throw new Error("Missing docs global context data.");
36
- }
37
- return docs;
38
- };
39
- var DocsGlobalContextProvider = ({ children, docs }) => {
40
- return createElement(DocsGlobalContext.Provider, { value: docs }, children);
41
- };
42
- var useDocsGlobalContext = () => {
43
- const docs = useContext(DocsGlobalContext);
44
- if (!docs) {
45
- throw new Error("Missing docs global context provider.");
46
- }
47
- return docs;
48
- };
49
- var useDocsFromPageGlobalContext = () => {
50
- return getDocsFromGlobalContext(usePageContext());
51
- };
52
-
53
- // src/runtime/client/store/runtime-store.tsx
54
- import { createContext as createContext2, useContext as useContext2 } from "react";
55
- import { useStore } from "zustand";
56
- import { createStore } from "zustand/vanilla";
57
- import { jsx } from "react/jsx-runtime";
58
- var defaultDocsSearchState = {
59
- isOpen: false,
60
- query: ""
61
- };
62
- var defaultDocsSidebarState = {
63
- openNodes: {}
64
- };
65
- var createDocsRuntimeStore = () => {
66
- return createStore()((set) => {
67
- const searchActions = {
68
- open: () => set((state) => {
69
- if (state.searchState.isOpen) {
70
- return state;
71
- }
72
- return {
73
- searchState: {
74
- ...state.searchState,
75
- isOpen: true
76
- }
77
- };
78
- }),
79
- close: () => set((state) => {
80
- if (!state.searchState.isOpen) {
81
- return state;
82
- }
83
- return {
84
- searchState: {
85
- ...state.searchState,
86
- isOpen: false
87
- }
88
- };
89
- }),
90
- toggle: () => set((state) => ({
91
- searchState: {
92
- ...state.searchState,
93
- isOpen: !state.searchState.isOpen
94
- }
95
- })),
96
- setQuery: (query) => set((state) => {
97
- if (state.searchState.query === query) {
98
- return state;
99
- }
100
- return {
101
- searchState: {
102
- ...state.searchState,
103
- query
104
- }
105
- };
106
- }),
107
- clearQuery: () => set((state) => {
108
- if (state.searchState.query === "") {
109
- return state;
110
- }
111
- return {
112
- searchState: {
113
- ...state.searchState,
114
- query: ""
115
- }
116
- };
117
- })
118
- };
119
- const sidebarActions = {
120
- setNodeOpen: (nodeId, isOpen) => set((state) => {
121
- if (state.sidebarState.openNodes[nodeId] === isOpen) {
122
- return state;
123
- }
124
- return {
125
- sidebarState: {
126
- ...state.sidebarState,
127
- openNodes: {
128
- ...state.sidebarState.openNodes,
129
- [nodeId]: isOpen
130
- }
131
- }
132
- };
133
- })
134
- };
135
- return {
136
- searchActions,
137
- searchState: defaultDocsSearchState,
138
- sidebarActions,
139
- sidebarState: defaultDocsSidebarState
140
- };
141
- });
142
- };
143
- var DocsRuntimeStoreContext = createContext2(null);
144
- var DocsRuntimeStoreProvider = ({ children, store }) => {
145
- return /* @__PURE__ */ jsx(DocsRuntimeStoreContext.Provider, { value: store, children });
146
- };
147
- var useDocsRuntimeStoreApi = () => {
148
- const store = useContext2(DocsRuntimeStoreContext);
149
- if (store === null) {
150
- throw new Error("Missing docs runtime store provider.");
151
- }
152
- return store;
153
- };
154
- var useDocsRuntimeStore = (selector) => {
155
- return useStore(useDocsRuntimeStoreApi(), selector);
156
- };
157
- var useDocsSearchStore = (selector) => {
158
- return useDocsRuntimeStore(
159
- (state) => selector({
160
- ...state.searchState,
161
- ...state.searchActions
162
- })
163
- );
164
- };
165
- var useDocsSearchActions = () => {
166
- return useDocsRuntimeStore((state) => state.searchActions);
167
- };
168
- var useDocsSidebarStore = (selector) => {
169
- return useDocsRuntimeStore(
170
- (state) => selector({
171
- ...state.sidebarState,
172
- ...state.sidebarActions
173
- })
174
- );
175
- };
176
- var useDocsSidebarActions = () => {
177
- return useDocsRuntimeStore((state) => state.sidebarActions);
178
- };
179
-
180
- // src/runtime/client/components/LayoutComponent.tsx
181
- import cm from "@classmatejs/react";
182
- var LayoutSize = {
183
- xxs: "xxs",
184
- xs: "xs",
185
- sm: "sm",
186
- md: "md",
187
- lg: "lg",
188
- xl: "xl",
189
- full: "full"
190
- };
191
- var layoutComponentSizeMapping = {
192
- xxs: "max-w-[480px]",
193
- xs: "max-w-[768px]",
194
- sm: "max-w-5xl",
195
- md: "max-w-6xl",
196
- lg: "max-w-7xl",
197
- xl: "max-w-[1440px]",
198
- full: "max-w-full"
199
- };
200
- var LayoutComponent = cm.div.variants({
201
- base: ({ $noGrow }) => `px-4 ${$noGrow ? "" : "mx-auto w-full"} relative`,
202
- variants: {
203
- $size: layoutComponentSizeMapping
204
- },
205
- defaultVariants: {
206
- $size: LayoutSize.xl
207
- }
208
- });
209
42
 
210
43
  // src/runtime/client/components/Search.tsx
211
- import { cmMerge } from "@classmatejs/react";
212
- import { useQuery } from "@tanstack/react-query";
213
- import { ArrowRightFromLine, MessageCircleQuestion, Search as SearchIcon, TriangleAlert } from "lucide-react";
214
- import { memo, useEffect, useRef, useState } from "react";
215
- import { createPortal } from "react-dom";
216
- import { usePageContext as usePageContext2 } from "vike-react/usePageContext";
217
-
218
- // src/runtime/client/search.ts
219
- var hierarchyLevels = ["lvl0", "lvl1", "lvl2", "lvl3", "lvl4", "lvl5", "lvl6"];
220
- var stripHtml = (value) => value.replace(/<[^>]+>/g, "");
221
- var normalizeString = (value) => {
222
- if (typeof value === "string") {
223
- const normalized = stripHtml(value).replace(/\s+/g, " ").trim();
224
- return normalized || void 0;
225
- }
226
- if (typeof value === "number" || typeof value === "boolean") {
227
- return String(value);
228
- }
229
- return void 0;
230
- };
231
- var getValueAtPath = (value, path) => {
232
- if (!path) {
233
- return void 0;
234
- }
235
- const segments = path.split(".").filter(Boolean);
236
- let currentValue = value;
237
- for (const segment of segments) {
238
- if (!currentValue || typeof currentValue !== "object" || Array.isArray(currentValue)) {
239
- return void 0;
240
- }
241
- currentValue = currentValue[segment];
242
- }
243
- return currentValue;
244
- };
245
- var getMappedString = (value, path) => {
246
- return normalizeString(getValueAtPath(value, path));
247
- };
248
- var buildSearchUrl = (appId, indexName) => {
249
- return `https://${appId}-dsn.algolia.net/1/indexes/${encodeURIComponent(indexName)}/query`;
250
- };
251
- var getDocSearchHierarchyValue = (hierarchy, level) => {
252
- if (!hierarchy || typeof hierarchy !== "object") {
253
- return void 0;
254
- }
255
- return normalizeString(hierarchy[level]);
256
- };
257
- var getDocSearchTitleLevel = (hit) => {
258
- const levelFromType = typeof hit.type === "string" && /^lvl[0-6]$/.test(hit.type) ? hit.type : null;
259
- if (levelFromType && getDocSearchHierarchyValue(hit.hierarchy, levelFromType)) {
260
- return levelFromType;
261
- }
262
- return [...hierarchyLevels].reverse().find((level) => level !== "lvl0" && getDocSearchHierarchyValue(hit.hierarchy, level));
263
- };
264
- var getDocSearchFallbackResult = (hit) => {
265
- const docSearchHit = hit;
266
- const titleLevel = getDocSearchTitleLevel(docSearchHit);
267
- const title = titleLevel ? getDocSearchHierarchyValue(docSearchHit.hierarchy, titleLevel) : void 0;
268
- const titleLevelIndex = titleLevel ? hierarchyLevels.indexOf(titleLevel) : -1;
269
- const sectionTitle = hierarchyLevels.slice(0, Math.max(titleLevelIndex, 0)).reverse().map((level) => getDocSearchHierarchyValue(docSearchHit.hierarchy, level)).find(Boolean) ?? normalizeString(docSearchHit.category);
270
- return {
271
- href: normalizeString(docSearchHit.url) ?? normalizeString(docSearchHit.url_without_anchor),
272
- title: title ?? normalizeString(docSearchHit.category),
273
- excerpt: normalizeString(docSearchHit._snippetResult?.content?.value) ?? normalizeString(docSearchHit.content) ?? normalizeString(docSearchHit._highlightResult?.content?.value),
274
- sectionTitle
275
- };
276
- };
277
- var mapHitToSearchResult = (hit, config) => {
278
- const docSearchFallback = getDocSearchFallbackResult(hit);
279
- const href = getMappedString(hit, config.fields.href) ?? docSearchFallback.href;
280
- const title = getMappedString(hit, config.fields.title) ?? docSearchFallback.title;
281
- if (!href || !title) {
282
- return null;
283
- }
284
- const excerpt = getMappedString(hit, config.fields.excerpt) ?? docSearchFallback.excerpt;
285
- const sectionTitle = getMappedString(hit, config.fields.sectionTitle) ?? docSearchFallback.sectionTitle;
286
- return {
287
- href,
288
- title,
289
- excerpt,
290
- sectionTitle
291
- };
292
- };
293
- var searchAlgoliaIndex = async (options) => {
294
- const { config, query, signal } = options;
295
- if (!config) {
296
- throw new Error("Algolia search is not configured.");
297
- }
298
- const response = await fetch(buildSearchUrl(config.appId, config.indexName), {
299
- method: "POST",
300
- signal,
301
- headers: {
302
- accept: "application/json",
303
- "content-type": "application/json",
304
- "x-algolia-api-key": config.apiKey,
305
- "x-algolia-application-id": config.appId
306
- },
307
- body: JSON.stringify({
308
- query,
309
- ...config.searchParams
310
- })
311
- });
312
- if (!response.ok) {
313
- throw new Error(`Algolia search request failed with status ${response.status}.`);
314
- }
315
- const data = await response.json();
316
- return (data.hits ?? []).map((hit) => mapHitToSearchResult(hit, config)).filter((result) => result !== null);
317
- };
318
-
319
- // src/runtime/client/components/Search.tsx
320
- import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
321
- var MIN_QUERY_LENGTH = 2;
322
- var QUERY_DEBOUNCE_MS = 150;
323
- var useDebouncedValue = (value, delayMs) => {
324
- const [debouncedValue, setDebouncedValue] = useState(value);
325
- useEffect(() => {
326
- const timeoutId = window.setTimeout(() => {
327
- setDebouncedValue(value);
328
- }, delayMs);
329
- return () => {
330
- window.clearTimeout(timeoutId);
331
- };
332
- }, [delayMs, value]);
333
- return debouncedValue;
44
+ import { useEffect, useState } from "react";
45
+ import { jsx } from "react/jsx-runtime";
46
+ var searchModalModulePromise = null;
47
+ var loadSearchModalModule = () => {
48
+ searchModalModulePromise ??= import("./SearchModal-YJZFUB53.js");
49
+ return searchModalModulePromise;
334
50
  };
335
- var _SearchTrigger = memo(() => {
336
- const docs = useDocsGlobalContext();
337
- const { open, setQuery } = useDocsSearchActions();
338
- const query = useDocsSearchStore((state) => state.query);
339
- const [isSearchHovered, setIsSearchHovered] = useState(false);
340
- if (!docs.algolia) {
341
- return null;
342
- }
343
- return /* @__PURE__ */ jsxs(Fragment, { children: [
344
- /* @__PURE__ */ jsx2("div", { className: "hidden md:block", children: /* @__PURE__ */ jsxs(
345
- "label",
346
- {
347
- className: cmMerge(
348
- "input input-sm w-56 transition-all",
349
- isSearchHovered ? "border-primary-muted shadow-lg shadow-primary-muted-light" : "shadow-transparent"
350
- ),
351
- onMouseEnter: () => setIsSearchHovered(true),
352
- onMouseLeave: () => setIsSearchHovered(false),
353
- children: [
354
- /* @__PURE__ */ jsx2("span", { className: "label", children: /* @__PURE__ */ jsx2(SearchIcon, { className: "h-4 w-4 shrink-0" }) }),
355
- /* @__PURE__ */ jsx2(
356
- "input",
357
- {
358
- type: "text",
359
- value: query,
360
- placeholder: "Search docs",
361
- className: cmMerge(
362
- "w-full placeholder:text-base-muted-medium transition-colors",
363
- isSearchHovered && "placeholder:text-base-muted"
364
- ),
365
- onFocus: open,
366
- onChange: (event) => {
367
- setQuery(event.target.value);
368
- open();
369
- }
370
- }
371
- )
372
- ]
373
- }
374
- ) }),
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" }) })
376
- ] });
377
- });
378
- var Search = memo(() => {
51
+ var Search = () => {
379
52
  const docs = useDocsGlobalContext();
380
- const { urlPathname } = usePageContext2();
381
- const { close, setQuery } = useDocsSearchActions();
382
53
  const isOpen = useDocsSearchStore((state) => state.isOpen);
383
- const query = useDocsSearchStore((state) => state.query);
384
- const containerRef = useRef(null);
385
- const suggestionBoxRef = useRef(null);
386
- const previousPathnameRef = useRef(urlPathname);
387
- const debouncedQuery = useDebouncedValue(query, QUERY_DEBOUNCE_MS);
388
- const normalizedQuery = debouncedQuery.trim();
389
- const canSearch = Boolean(docs.algolia) && normalizedQuery.length >= MIN_QUERY_LENGTH;
390
- const searchQuery = useQuery({
391
- queryKey: ["nivel-algolia-search", docs.algolia?.appId, docs.algolia?.indexName, normalizedQuery],
392
- queryFn: ({ signal }) => searchAlgoliaIndex({ config: docs.algolia, query: normalizedQuery, signal }),
393
- enabled: isOpen && canSearch,
394
- retry: false
395
- });
396
- useEffect(() => {
397
- if (previousPathnameRef.current !== urlPathname) {
398
- close();
399
- previousPathnameRef.current = urlPathname;
400
- }
401
- }, [close, urlPathname]);
54
+ const [searchModalModule, setSearchModalModule] = useState(null);
402
55
  useEffect(() => {
403
- if (!isOpen) {
56
+ if (!docs.algolia || !isOpen || searchModalModule !== null) {
404
57
  return;
405
58
  }
406
- const handlePointerDown = (event) => {
407
- const target = event.target;
408
- if (!containerRef.current?.contains(target) && !suggestionBoxRef.current?.contains(target)) {
409
- close();
59
+ let isMounted = true;
60
+ loadSearchModalModule().then((module) => {
61
+ if (isMounted) {
62
+ setSearchModalModule(module);
410
63
  }
411
- };
412
- const handleKeyDown = (event) => {
413
- if (event.key === "Escape") {
414
- close();
415
- }
416
- };
417
- document.addEventListener("pointerdown", handlePointerDown);
418
- document.addEventListener("keydown", handleKeyDown);
419
- return () => {
420
- document.removeEventListener("pointerdown", handlePointerDown);
421
- document.removeEventListener("keydown", handleKeyDown);
422
- };
423
- }, [close, isOpen]);
424
- if (!docs.algolia) {
425
- return null;
426
- }
427
- return /* @__PURE__ */ jsx2("div", { ref: containerRef, className: "relative", children: /* @__PURE__ */ jsx2(
428
- SearchSuggestionBox,
429
- {
430
- contentRef: suggestionBoxRef,
431
- isError: searchQuery.isError,
432
- isLoading: searchQuery.isFetching,
433
- isOpen,
434
- onClose: close,
435
- onQueryChange: setQuery,
436
- query,
437
- results: searchQuery.data ?? []
438
- }
439
- ) });
440
- });
441
- var SearchSuggestionBox = ({
442
- contentRef,
443
- isError,
444
- isLoading,
445
- isOpen,
446
- onClose,
447
- onQueryChange,
448
- query,
449
- results
450
- }) => {
451
- const inputRef = useRef(null);
452
- const normalizedQuery = query.trim();
453
- const canSearch = normalizedQuery.length >= MIN_QUERY_LENGTH;
454
- useEffect(() => {
455
- if (!isOpen) {
456
- return;
457
- }
458
- const frameId = window.requestAnimationFrame(() => {
459
- inputRef.current?.focus();
460
- inputRef.current?.setSelectionRange(query.length, query.length);
461
64
  });
462
65
  return () => {
463
- window.cancelAnimationFrame(frameId);
66
+ isMounted = false;
464
67
  };
465
- }, [isOpen, query.length]);
466
- if (!isOpen || typeof document === "undefined") {
68
+ }, [docs.algolia, isOpen, searchModalModule]);
69
+ if (!docs.algolia || searchModalModule === null) {
467
70
  return null;
468
71
  }
469
- return createPortal(
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(
473
- LayoutComponent,
474
- {
475
- ref: contentRef,
476
- $size: "sm",
477
- className: "mt-5 relative z-2 rounded-box bg-base-100/70 p-6 pt-6 shadow-lg shadow-primary-muted-light",
478
- children: [
479
- /* @__PURE__ */ jsx2(
480
- "input",
481
- {
482
- placeholder: "Search docs",
483
- ref: inputRef,
484
- type: "text",
485
- className: "input input-primary input-xl w-full",
486
- value: query,
487
- onChange: (event) => onQueryChange(event.target.value)
488
- }
489
- ),
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" }),
492
- "Searching..."
493
- ] }) : normalizedQuery ? null : /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
494
- /* @__PURE__ */ jsx2(MessageCircleQuestion, { className: "h-3 w-3 shrink-0" }),
495
- "Type at least ",
496
- MIN_QUERY_LENGTH,
497
- " characters."
498
- ] }) }),
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" }),
501
- "Search is temporarily unavailable."
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(
503
- "a",
504
- {
505
- href: withSiteBaseUrl(result.href),
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",
507
- onClick: onClose,
508
- children: [
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" }),
513
- " ",
514
- result.sectionTitle
515
- ] }) : null
516
- ] }),
517
- result.excerpt ? /* @__PURE__ */ jsx2("p", { className: "text-xs leading-5 text-base-muted", children: result.excerpt }) : null
518
- ]
519
- }
520
- ) }, result.href)) }) }) : null
521
- ]
522
- }
523
- )
524
- ] }),
525
- document.body
526
- );
72
+ const { SearchModal } = searchModalModule;
73
+ return /* @__PURE__ */ jsx(SearchModal, {});
527
74
  };
528
75
 
529
76
  // src/runtime/client/components/Navbar/DocsNavbar.tsx
530
- import cm2, { cmMerge as cmMerge3 } from "@classmatejs/react";
77
+ import cm, { cmMerge as cmMerge2 } from "@classmatejs/react";
531
78
  import { ChevronDown, Menu, TextSearch } from "lucide-react";
79
+ import { useCallback } from "react";
532
80
 
533
81
  // 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";
82
+ import { cmMerge } from "@classmatejs/react";
83
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
536
84
  var Brand = ({ brand, noText = false }) => {
537
85
  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
- ] });
86
+ return /* @__PURE__ */ jsxs(
87
+ "a",
88
+ {
89
+ href: brand.href,
90
+ className: "flex items-center gap-3 text-base-content no-underline",
91
+ "aria-label": noText ? `${brand.text} homepage` : void 0,
92
+ children: [
93
+ defaultLogo && /* @__PURE__ */ jsxs("span", { className: "relative block h-8 w-8 shrink-0", children: [
94
+ brand.logoLight && /* @__PURE__ */ jsx2(
95
+ "img",
96
+ {
97
+ src: brand.logoLight,
98
+ alt: brand.logoAlt,
99
+ className: cmMerge("h-8 w-8 object-contain", brand.logoDark ? "block dark:hidden" : "block")
100
+ }
101
+ ),
102
+ brand.logoDark && /* @__PURE__ */ jsx2(
103
+ "img",
104
+ {
105
+ src: brand.logoDark,
106
+ alt: brand.logoAlt,
107
+ className: cmMerge("h-8 w-8 object-contain", brand.logoLight ? "hidden dark:block" : "block")
108
+ }
109
+ )
110
+ ] }),
111
+ !noText && /* @__PURE__ */ jsx2("span", { className: "text-xl font-semibold tracking-tight", children: brand.text })
112
+ ]
113
+ }
114
+ );
559
115
  };
560
116
 
561
117
  // src/runtime/client/components/SocialLinks.tsx
562
- import { memo as memo2 } from "react";
563
- import { jsx as jsx4 } from "react/jsx-runtime";
564
- var _iconAssets = {
118
+ import { memo } from "react";
119
+ import { jsx as jsx3 } from "react/jsx-runtime";
120
+ var iconAssets = {
565
121
  github: nivelAssetUrl("brands/github.svg"),
566
122
  discord: nivelAssetUrl(`brands/discord.svg`),
567
123
  x: nivelAssetUrl(`brands/x.svg`),
@@ -569,26 +125,29 @@ var _iconAssets = {
569
125
  linkedin: nivelAssetUrl("brands/linkedin.svg")
570
126
  };
571
127
  var SocialIconElement = ({ icon, href }) => {
572
- return /* @__PURE__ */ jsx4("li", { className: "m-0 p-0", children: /* @__PURE__ */ jsx4(
128
+ const socialLabel = icon === "x" ? "X" : icon.charAt(0).toUpperCase() + icon.slice(1);
129
+ return /* @__PURE__ */ jsx3("li", { className: "m-0 p-0", children: /* @__PURE__ */ jsx3(
573
130
  "a",
574
131
  {
575
132
  href,
576
133
  target: "_blank",
577
134
  rel: "noopener noreferrer",
578
135
  className: "flex h-8 w-8 items-center justify-center rounded-full border border-base-muted-light bg-base-200",
579
- children: /* @__PURE__ */ jsx4("img", { src: _iconAssets[icon], alt: `${icon} icon`, className: "h-3 w-auto opacity-75 dark:invert" })
136
+ "aria-label": `${socialLabel} profile`,
137
+ title: socialLabel,
138
+ children: /* @__PURE__ */ jsx3("img", { src: iconAssets[icon], alt: "", "aria-hidden": "true", className: "h-3 w-auto opacity-75 dark:invert" })
580
139
  }
581
140
  ) });
582
141
  };
583
- var SocialIcons = memo2(() => {
142
+ var SocialIcons = memo(() => {
584
143
  const docs = useDocsGlobalContext();
585
144
  const socialEntries = Object.entries(docs.social ?? {}).filter(
586
- (entry) => entry[0] in _iconAssets && typeof entry[1] === "string" && entry[1].length > 0
145
+ (entry) => entry[0] in iconAssets && typeof entry[1] === "string" && entry[1].length > 0
587
146
  );
588
147
  if (socialEntries.length === 0) {
589
148
  return null;
590
149
  }
591
- return /* @__PURE__ */ jsx4("ul", { className: "flex items-center gap-1", children: socialEntries.map(([platform, href]) => /* @__PURE__ */ jsx4(SocialIconElement, { icon: platform, href }, platform)) });
150
+ return /* @__PURE__ */ jsx3("ul", { className: "flex items-center gap-1", children: socialEntries.map(([platform, href]) => /* @__PURE__ */ jsx3(SocialIconElement, { icon: platform, href }, platform)) });
592
151
  });
593
152
  var SocialLinks_default = SocialIcons;
594
153
 
@@ -677,12 +236,12 @@ var applyThemePreference = (themePreference, themeConfig) => {
677
236
  };
678
237
 
679
238
  // src/runtime/client/components/ThemeSwitch.tsx
680
- import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
239
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
681
240
  var ThemeSwitch = ({ theme }) => {
682
241
  const themePreference = useDocsUserSettingsStore((state) => state.themePreference);
683
242
  const setThemePreference = useDocsUserSettingsStore((state) => state.setThemePreference);
684
243
  const effectiveThemePreference = resolveThemePreference(themePreference, theme);
685
- return /* @__PURE__ */ jsxs3(
244
+ return /* @__PURE__ */ jsxs2(
686
245
  "button",
687
246
  {
688
247
  type: "button",
@@ -690,74 +249,88 @@ var ThemeSwitch = ({ theme }) => {
690
249
  onClick: () => setThemePreference(effectiveThemePreference === "light" ? "dark" : "light"),
691
250
  className: "relative flex h-8 w-8 cursor-pointer items-center justify-center rounded-full border border-base-muted-light bg-base-200",
692
251
  children: [
693
- /* @__PURE__ */ jsx5(Sun, { className: "h-4 w-4 dark:hidden" }),
694
- /* @__PURE__ */ jsx5(Moon, { className: "hidden h-4 w-4 dark:block" })
252
+ /* @__PURE__ */ jsx4(Sun, { className: "h-4 w-4 dark:hidden" }),
253
+ /* @__PURE__ */ jsx4(Moon, { className: "hidden h-4 w-4 dark:block" })
695
254
  ]
696
255
  }
697
256
  );
698
257
  };
699
258
 
700
259
  // src/runtime/client/components/Navbar/AsideButtons.tsx
701
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
260
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
702
261
  var AsideButtons = () => {
703
262
  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 })
263
+ return /* @__PURE__ */ jsxs3("div", { className: "flex-1 justify-end gap-2 flex", children: [
264
+ /* @__PURE__ */ jsx5("div", { className: "hidden lg:block", children: /* @__PURE__ */ jsx5(SocialLinks_default, {}) }),
265
+ /* @__PURE__ */ jsx5(ThemeSwitch, { theme: docs.theme })
707
266
  ] });
708
267
  };
709
268
  var AsideButtons_default = AsideButtons;
710
269
 
711
270
  // src/runtime/client/components/Navbar/DocsNavbar.tsx
712
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
713
- var StyledNav = cm2.nav`
271
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
272
+ var StyledNav = cm.nav`
714
273
  gap-4
715
274
  flex-1 pl-10 items-center justify-end lg:justify-start
716
- hidden sm:flex
275
+ hidden lg:flex
717
276
  `;
718
- var StyledNavList = cm2.ul`
277
+ var StyledNavList = cm.ul`
719
278
  inline-flex items-center gap-2 font-semibold
720
279
  `;
721
280
  var DocsNavbar = ({
722
281
  closeMegaMenu,
723
282
  openMegaMenu,
283
+ scheduleMegaMenuOpen,
724
284
  scheduleMegaMenuClose,
725
285
  toggleSearch,
726
- activeSection
286
+ activeSection,
287
+ hoveredSectionId,
288
+ isMegaMenuOpen
727
289
  }) => {
728
290
  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(
291
+ const handleClick = useCallback(() => {
292
+ alert("TODO: Open mobile menu");
293
+ }, []);
294
+ return /* @__PURE__ */ jsxs4("div", { className: "flex flex-1 gap-4 pt-3 justify-between", children: [
295
+ /* @__PURE__ */ jsx6("div", { className: "lg:min-w-76 min-w-none", children: /* @__PURE__ */ jsx6(Brand, { brand: docs.brand }) }),
296
+ /* @__PURE__ */ jsx6(StyledNav, { "aria-label": "Primary", children: /* @__PURE__ */ jsxs4(StyledNavList, { className: "", children: [
297
+ docs.navbarItems.map((item) => {
298
+ const isMegaMenuItemActive = isMegaMenuOpen && hoveredSectionId === item.id;
299
+ return /* @__PURE__ */ jsx6("li", { children: /* @__PURE__ */ jsx6(
300
+ "a",
301
+ {
302
+ href: withSiteBaseUrl(item.href),
303
+ className: "block",
304
+ onPointerEnter: () => scheduleMegaMenuOpen(item.id),
305
+ onPointerLeave: scheduleMegaMenuClose,
306
+ onFocus: () => openMegaMenu(item.id),
307
+ onBlur: scheduleMegaMenuClose,
308
+ onClick: closeMegaMenu,
309
+ children: /* @__PURE__ */ jsxs4(
310
+ "span",
311
+ {
312
+ className: cmMerge2(
313
+ "btn text-base btn-sm md:min-w-30 px-2 whitespace-nowrap tracking-tight",
314
+ activeSection?.id === item.id ? "btn-primary btn-soft" : "btn-ghost "
315
+ ),
316
+ children: [
317
+ renderInlineMarkdown(item.title),
318
+ /* @__PURE__ */ jsx6(
319
+ ChevronDown,
320
+ {
321
+ className: cmMerge2(
322
+ "h-4 w-4 shrink-0 transition-transform duration-200",
323
+ isMegaMenuItemActive ? "rotate-180" : "rotate-0"
324
+ )
325
+ }
326
+ )
327
+ ]
328
+ }
329
+ )
330
+ }
331
+ ) }, item.id);
332
+ }),
333
+ docs.algolia ? /* @__PURE__ */ jsx6("li", { children: /* @__PURE__ */ jsxs4(
761
334
  "button",
762
335
  {
763
336
  type: "button",
@@ -765,63 +338,81 @@ var DocsNavbar = ({
765
338
  className: "btn btn-ghost btn-sm text-base md:min-w-30 px-2 whitespace-nowrap tracking-tight",
766
339
  children: [
767
340
  "Search",
768
- /* @__PURE__ */ jsx7(TextSearch, { className: "h-4 w-4" })
341
+ /* @__PURE__ */ jsx6(TextSearch, { className: "h-4 w-4" })
769
342
  ]
770
343
  }
771
344
  ) }) : null
772
345
  ] }) }),
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, {}) })
346
+ /* @__PURE__ */ jsx6("button", { type: "button", className: "block lg:hidden", "aria-label": "Open navigation menu", onClick: handleClick, children: /* @__PURE__ */ jsx6(Menu, { className: "w-6 h-6" }) }),
347
+ /* @__PURE__ */ jsx6("div", { className: "lg:min-w-40 hidden lg:block", children: /* @__PURE__ */ jsx6(AsideButtons_default, {}) })
775
348
  ] });
776
349
  };
777
350
  var DocsNavbar_default = DocsNavbar;
778
351
 
779
352
  // 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`
353
+ import cm2, { cmMerge as cmMerge3 } from "@classmatejs/react";
354
+ import { ChevronDown as ChevronDown2, Menu as Menu2, TextSearch as TextSearch2 } from "lucide-react";
355
+ import { useCallback as useCallback2 } from "react";
356
+ import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
357
+ var StyledNav2 = cm2.nav`
784
358
  gap-4
785
359
  flex-1 lg:pl-6 xl:pl-10 items-center justify-center
786
360
  `;
787
- var StyledNavList2 = cm3.ul`
361
+ var StyledNavList2 = cm2.ul`
788
362
  inline-flex items-center gap-2 font-semibold
789
363
  `;
790
364
  var LandingPageNavbar = ({
791
365
  closeMegaMenu,
792
366
  openMegaMenu,
367
+ scheduleMegaMenuOpen,
793
368
  scheduleMegaMenuClose,
794
- toggleSearch
369
+ toggleSearch,
370
+ hoveredSectionId,
371
+ isMegaMenuOpen
795
372
  }) => {
796
373
  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(
374
+ const handleClick = useCallback2(() => {
375
+ alert("TODO: Open mobile menu");
376
+ }, []);
377
+ return /* @__PURE__ */ jsxs5("div", { className: "flex flex-1 gap-4 pt-3 justify-between", children: [
378
+ /* @__PURE__ */ jsx7("div", { className: "min-w-40", children: /* @__PURE__ */ jsx7(Brand, { brand: docs.brand }) }),
379
+ /* @__PURE__ */ jsx7(StyledNav2, { "aria-label": "Primary", className: "flex-1 flex hidden lg:flex", children: /* @__PURE__ */ jsxs5(StyledNavList2, { className: "justify-end ", children: [
380
+ docs.navbarItems.map((item) => {
381
+ const isMegaMenuItemActive = isMegaMenuOpen && hoveredSectionId === item.id;
382
+ return /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsx7(
383
+ "a",
384
+ {
385
+ href: withSiteBaseUrl(item.href),
386
+ className: "block",
387
+ onPointerEnter: () => scheduleMegaMenuOpen(item.id),
388
+ onPointerLeave: scheduleMegaMenuClose,
389
+ onFocus: () => openMegaMenu(item.id),
390
+ onBlur: scheduleMegaMenuClose,
391
+ onClick: closeMegaMenu,
392
+ children: /* @__PURE__ */ jsxs5(
393
+ "span",
394
+ {
395
+ className: cmMerge3(
396
+ "btn btn-ghost text-base lg:text-lg btn-sm lg:min-w-30 px-2 whitespace-nowrap tracking-tight"
397
+ ),
398
+ children: [
399
+ renderInlineMarkdown(item.title),
400
+ /* @__PURE__ */ jsx7(
401
+ ChevronDown2,
402
+ {
403
+ className: cmMerge3(
404
+ "h-4 w-4 shrink-0 transition-transform duration-200",
405
+ isMegaMenuItemActive ? "rotate-180" : "rotate-0"
406
+ )
407
+ }
408
+ )
409
+ ]
410
+ }
411
+ )
412
+ }
413
+ ) }, item.id);
414
+ }),
415
+ docs.algolia ? /* @__PURE__ */ jsx7("li", { children: /* @__PURE__ */ jsxs5(
825
416
  "button",
826
417
  {
827
418
  type: "button",
@@ -829,20 +420,21 @@ var LandingPageNavbar = ({
829
420
  className: "btn btn-ghost btn-sm text-base lg:text-lg lg:min-w-30 px-2 whitespace-nowrap tracking-tight",
830
421
  children: [
831
422
  "Search",
832
- /* @__PURE__ */ jsx8(TextSearch2, { className: "h-4 w-4" })
423
+ /* @__PURE__ */ jsx7(TextSearch2, { className: "h-4 w-4" })
833
424
  ]
834
425
  }
835
426
  ) }) : null
836
427
  ] }) }),
837
- /* @__PURE__ */ jsx8("div", { className: "min-w-40", children: /* @__PURE__ */ jsx8(AsideButtons_default, {}) })
428
+ /* @__PURE__ */ jsx7("div", { className: "min-w-40 hidden lg:block", children: /* @__PURE__ */ jsx7(AsideButtons_default, {}) }),
429
+ /* @__PURE__ */ jsx7("button", { type: "button", className: "block lg:hidden", "aria-label": "Open navigation menu", onClick: handleClick, children: /* @__PURE__ */ jsx7(Menu2, { className: "w-6 h-6" }) })
838
430
  ] });
839
431
  };
840
432
  var LandingPageNavbar_default = LandingPageNavbar;
841
433
 
842
434
  // src/runtime/client/components/Navbar/MegaMenu.tsx
843
- import { cmMerge as cmMerge5 } from "@classmatejs/react";
435
+ import { cmMerge as cmMerge4 } from "@classmatejs/react";
844
436
  import { useEffect as useEffect2, useState as useState2 } from "react";
845
- import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
437
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
846
438
  var MegaMenu = ({
847
439
  isActive,
848
440
  onOpen,
@@ -856,7 +448,7 @@ var MegaMenu = ({
856
448
  const [visibleSectionElement, setVisibleSectionElement] = useState2(null);
857
449
  const [contentHeight, setContentHeight] = useState2(0);
858
450
  useEffect2(() => {
859
- if (!visibleSectionId || visibleSectionElement === null) {
451
+ if (!isActive || !visibleSectionId || visibleSectionElement === null) {
860
452
  return;
861
453
  }
862
454
  const updateContentHeight = () => {
@@ -873,57 +465,57 @@ var MegaMenu = ({
873
465
  return () => {
874
466
  resizeObserver.disconnect();
875
467
  };
876
- }, [visibleSectionElement, visibleSectionId]);
877
- return /* @__PURE__ */ jsxs7(
468
+ }, [visibleSectionElement, visibleSectionId, isActive]);
469
+ return /* @__PURE__ */ jsxs6(
878
470
  "div",
879
471
  {
880
- className: cmMerge5("fixed top-14 left-0 z-3 w-full", isActive ? "pointer-events-auto" : "pointer-events-none"),
472
+ className: cmMerge4("fixed top-14 left-0 z-3 w-full", isActive ? "pointer-events-auto" : "pointer-events-none"),
881
473
  onPointerEnter: () => onOpen(visibleSectionId),
882
474
  onPointerLeave: onClose,
883
475
  children: [
884
- /* @__PURE__ */ jsx9(
476
+ /* @__PURE__ */ jsx8(
885
477
  "div",
886
478
  {
887
- className: cmMerge5(
479
+ className: cmMerge4(
888
480
  isActive ? "opacity-100" : "opacity-0",
889
481
  "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"
890
482
  )
891
483
  }
892
484
  ),
893
- /* @__PURE__ */ jsx9(
485
+ /* @__PURE__ */ jsx8(
894
486
  "div",
895
487
  {
896
- className: cmMerge5(
488
+ className: cmMerge4(
897
489
  "relative z-4 overflow-hidden transition-[height] bg-base-100 duration-300",
898
490
  isLandingPage && !isActive ? "" : "border-b border-base-muted-light ease-out"
899
491
  ),
900
492
  style: { height: isActive ? contentHeight : 0 },
901
- children: /* @__PURE__ */ jsx9(LayoutComponent, { $size: "sm", children: /* @__PURE__ */ jsx9(
493
+ children: /* @__PURE__ */ jsx8(LayoutComponent, { $size: "sm", children: /* @__PURE__ */ jsx8(
902
494
  "div",
903
495
  {
904
- className: cmMerge5(
496
+ className: cmMerge4(
905
497
  isActive ? "translate-y-0 opacity-100" : "-translate-y-10 opacity-0",
906
498
  "relative z-4 transition-all duration-300"
907
499
  ),
908
- children: sections.map((section) => /* @__PURE__ */ jsx9(
500
+ children: sections.map((section) => /* @__PURE__ */ jsx8(
909
501
  "div",
910
502
  {
911
503
  ref: section.id === visibleSectionId ? setVisibleSectionElement : void 0,
912
- className: cmMerge5(
504
+ className: cmMerge4(
913
505
  section.id === visibleSectionId ? "opacity-100" : "opacity-0 pointer-events-none",
914
506
  "transition-all absolute w-full duration-300"
915
507
  ),
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(
508
+ children: section.items.length > 0 && /* @__PURE__ */ jsx8("ul", { className: "mt-2 flex ", children: section.items.map(
509
+ (child) => child.showInNav !== false && /* @__PURE__ */ jsxs6("li", { className: "flex-1 py-3 mb-6 px-4", children: [
510
+ child.href ? /* @__PURE__ */ jsx8(
919
511
  "a",
920
512
  {
921
513
  className: "mb-4 block text-lg font-semibold tracking-tight",
922
514
  href: withSiteBaseUrl(child.href),
923
515
  children: child.title
924
516
  }
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)) })
517
+ ) : /* @__PURE__ */ jsx8("span", { className: "mb-4 block text-lg font-semibold tracking-tight", children: child.title }),
518
+ child.kind === "group" && child.items.length > 0 && /* @__PURE__ */ jsx8("ul", { className: "menu border-l border-base-muted-light py-0 w-full", children: child.items.map((subChild) => /* @__PURE__ */ jsx8("li", { children: subChild.href ? /* @__PURE__ */ jsx8("a", { href: withSiteBaseUrl(subChild.href), onClick: onClose, children: renderInlineMarkdown(subChild.title) }) : /* @__PURE__ */ jsx8("span", { children: renderInlineMarkdown(subChild.title) }) }, subChild.id)) })
927
519
  ] }, child.id)
928
520
  ) })
929
521
  },
@@ -939,12 +531,22 @@ var MegaMenu = ({
939
531
  };
940
532
 
941
533
  // src/runtime/client/components/Navbar/useMegaMenu.ts
942
- import { useCallback, useEffect as useEffect3, useRef as useRef2, useState as useState3 } from "react";
534
+ import { useCallback as useCallback3, useEffect as useEffect3, useRef, useState as useState3 } from "react";
535
+ var megaMenuOpenDelayMs = 120;
536
+ var megaMenuCloseDelayMs = 140;
943
537
  var useMegaMenu = ({ activeSectionId, sections }) => {
944
538
  const [isMegaMenuOpen, setIsMegaMenuOpen] = useState3(false);
945
- const megaMenuCloseTimeoutRef = useRef2(null);
539
+ const megaMenuOpenTimeoutRef = useRef(null);
540
+ const megaMenuCloseTimeoutRef = useRef(null);
946
541
  const [hoveredSectionId, setHoveredSectionId] = useState3(activeSectionId ?? sections[0]?.id);
947
- const clearMegaMenuCloseTimeout = useCallback(() => {
542
+ const clearMegaMenuOpenTimeout = useCallback3(() => {
543
+ if (megaMenuOpenTimeoutRef.current === null) {
544
+ return;
545
+ }
546
+ window.clearTimeout(megaMenuOpenTimeoutRef.current);
547
+ megaMenuOpenTimeoutRef.current = null;
548
+ }, []);
549
+ const clearMegaMenuCloseTimeout = useCallback3(() => {
948
550
  if (megaMenuCloseTimeoutRef.current === null) {
949
551
  return;
950
552
  }
@@ -955,25 +557,44 @@ var useMegaMenu = ({ activeSectionId, sections }) => {
955
557
  if (currentSectionId !== void 0) {
956
558
  setHoveredSectionId(currentSectionId);
957
559
  }
560
+ clearMegaMenuOpenTimeout();
958
561
  clearMegaMenuCloseTimeout();
959
562
  setIsMegaMenuOpen(true);
960
563
  };
564
+ const scheduleMegaMenuOpen = (currentSectionId) => {
565
+ if (currentSectionId !== void 0) {
566
+ setHoveredSectionId(currentSectionId);
567
+ }
568
+ clearMegaMenuOpenTimeout();
569
+ clearMegaMenuCloseTimeout();
570
+ if (isMegaMenuOpen) {
571
+ setIsMegaMenuOpen(true);
572
+ return;
573
+ }
574
+ megaMenuOpenTimeoutRef.current = window.setTimeout(() => {
575
+ setIsMegaMenuOpen(true);
576
+ megaMenuOpenTimeoutRef.current = null;
577
+ }, megaMenuOpenDelayMs);
578
+ };
961
579
  const closeMegaMenu = () => {
580
+ clearMegaMenuOpenTimeout();
962
581
  clearMegaMenuCloseTimeout();
963
582
  setIsMegaMenuOpen(false);
964
583
  };
965
584
  const scheduleMegaMenuClose = () => {
585
+ clearMegaMenuOpenTimeout();
966
586
  clearMegaMenuCloseTimeout();
967
587
  megaMenuCloseTimeoutRef.current = window.setTimeout(() => {
968
588
  setIsMegaMenuOpen(false);
969
589
  megaMenuCloseTimeoutRef.current = null;
970
- }, 140);
590
+ }, megaMenuCloseDelayMs);
971
591
  };
972
592
  useEffect3(() => {
973
593
  return () => {
594
+ clearMegaMenuOpenTimeout();
974
595
  clearMegaMenuCloseTimeout();
975
596
  };
976
- }, [clearMegaMenuCloseTimeout]);
597
+ }, [clearMegaMenuCloseTimeout, clearMegaMenuOpenTimeout]);
977
598
  useEffect3(() => {
978
599
  setHoveredSectionId(activeSectionId ?? sections[0]?.id);
979
600
  }, [activeSectionId, sections]);
@@ -981,6 +602,7 @@ var useMegaMenu = ({ activeSectionId, sections }) => {
981
602
  isMegaMenuOpen,
982
603
  hoveredSectionId,
983
604
  openMegaMenu,
605
+ scheduleMegaMenuOpen,
984
606
  closeMegaMenu,
985
607
  scheduleMegaMenuClose
986
608
  };
@@ -988,39 +610,61 @@ var useMegaMenu = ({ activeSectionId, sections }) => {
988
610
  var useMegaMenu_default = useMegaMenu;
989
611
 
990
612
  // src/runtime/client/components/Navbar/index.tsx
991
- import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
613
+ import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
614
+ var LARGE_SCREEN_MEDIA_QUERY = "(min-width: 1024px)";
992
615
  var NavbarNew = () => {
993
616
  const docs = useDocsGlobalContext();
994
- const { urlPathname, urlParsed } = usePageContext3();
617
+ const { urlPathname, urlParsed } = usePageContext();
995
618
  const isLandingPage = urlParsed.pathname === "/";
996
619
  const sections = docs.sidebarSections;
997
620
  const activeSection = getActiveSectionByPathname(docs, urlPathname);
998
621
  const { toggle: toggleSearch } = useDocsSearchActions();
999
- const { closeMegaMenu, hoveredSectionId, isMegaMenuOpen, openMegaMenu, scheduleMegaMenuClose } = useMegaMenu_default({
622
+ const [isLargeScreen, setIsLargeScreen] = useState4(false);
623
+ const { closeMegaMenu, hoveredSectionId, isMegaMenuOpen, openMegaMenu, scheduleMegaMenuOpen, scheduleMegaMenuClose } = useMegaMenu_default({
1000
624
  activeSectionId: activeSection?.id,
1001
625
  sections
1002
626
  });
1003
- return /* @__PURE__ */ jsxs8(StyledNavbar, { $border: isLandingPage, children: [
1004
- /* @__PURE__ */ jsx10(LayoutComponent, { children: isLandingPage ? /* @__PURE__ */ jsx10(
627
+ useEffect4(() => {
628
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
629
+ return;
630
+ }
631
+ const mediaQueryList = window.matchMedia(LARGE_SCREEN_MEDIA_QUERY);
632
+ const updateLargeScreenState = () => {
633
+ setIsLargeScreen(mediaQueryList.matches);
634
+ };
635
+ updateLargeScreenState();
636
+ mediaQueryList.addEventListener("change", updateLargeScreenState);
637
+ return () => {
638
+ mediaQueryList.removeEventListener("change", updateLargeScreenState);
639
+ };
640
+ }, []);
641
+ return /* @__PURE__ */ jsxs7(StyledNavbar, { $border: isLandingPage, children: [
642
+ /* @__PURE__ */ jsx9(LayoutComponent, { children: isLandingPage ? /* @__PURE__ */ jsx9(
1005
643
  LandingPageNavbar_default,
1006
644
  {
1007
645
  openMegaMenu,
646
+ scheduleMegaMenuOpen,
1008
647
  scheduleMegaMenuClose,
1009
648
  toggleSearch,
1010
- closeMegaMenu
649
+ closeMegaMenu,
650
+ hoveredSectionId,
651
+ isMegaMenuOpen
1011
652
  }
1012
- ) : /* @__PURE__ */ jsx10(
653
+ ) : /* @__PURE__ */ jsx9(
1013
654
  DocsNavbar_default,
1014
655
  {
1015
656
  openMegaMenu,
657
+ scheduleMegaMenuOpen,
1016
658
  scheduleMegaMenuClose,
1017
659
  toggleSearch,
1018
660
  closeMegaMenu,
1019
- activeSection
661
+ activeSection,
662
+ hoveredSectionId,
663
+ isMegaMenuOpen
1020
664
  }
1021
665
  ) }),
1022
- /* @__PURE__ */ jsx10(Search, {}),
1023
- /* @__PURE__ */ jsx10(
666
+ /* @__PURE__ */ jsx9(Search, {}),
667
+ isLargeScreen ? /* @__PURE__ */ jsx9(
1024
668
  MegaMenu,
1025
669
  {
1026
670
  sections,
@@ -1031,18 +675,18 @@ var NavbarNew = () => {
1031
675
  onClose: scheduleMegaMenuClose,
1032
676
  isLandingPage
1033
677
  }
1034
- )
678
+ ) : null
1035
679
  ] });
1036
680
  };
1037
681
  var Navbar_default = NavbarNew;
1038
- var StyledNavbar = cm4.header`
682
+ var StyledNavbar = cm3.header`
1039
683
  top-0 left-0 z-20 w-full bg-base-100
1040
684
  pt-0 h-14
1041
685
  ${({ $border }) => $border ? "relative" : "fixed"}
1042
686
  `;
1043
687
 
1044
688
  // src/runtime/client/components/UserSettingsSync.tsx
1045
- import { useEffect as useEffect4, useMemo } from "react";
689
+ import { useEffect as useEffect5, useMemo } from "react";
1046
690
  var UserSettingsSync = ({ theme }) => {
1047
691
  const themePreference = useDocsUserSettingsStore((state) => state.themePreference);
1048
692
  const lightTheme = theme?.light ?? "consumer-light";
@@ -1053,57 +697,84 @@ var UserSettingsSync = ({ theme }) => {
1053
697
  [darkTheme, defaultThemePreference, lightTheme]
1054
698
  );
1055
699
  const effectiveThemePreference = resolveThemePreference(themePreference, resolvedTheme);
1056
- useEffect4(() => {
700
+ useEffect5(() => {
1057
701
  applyThemePreference(effectiveThemePreference, resolvedTheme);
1058
702
  }, [effectiveThemePreference, resolvedTheme]);
1059
703
  return null;
1060
704
  };
1061
705
 
1062
706
  // src/runtime/client/AppLayout.tsx
1063
- import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
1064
- var queryClient = new QueryClient();
707
+ import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
1065
708
  var runtimeStore = createDocsRuntimeStore();
1066
709
  var AppLayout = ({ children, header }) => {
1067
- const { urlPathname } = usePageContext4();
1068
- const pageContext = usePageContext4();
710
+ const { urlPathname } = usePageContext2();
711
+ const pageContext = usePageContext2();
1069
712
  const docs = getDocsFromGlobalContext(pageContext);
1070
713
  const isLandingPage = urlPathname === "/";
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 })
714
+ return /* @__PURE__ */ jsx10(DocsRuntimeStoreProvider, { store: runtimeStore, children: /* @__PURE__ */ jsxs8(DocsGlobalContextProvider, { docs, children: [
715
+ /* @__PURE__ */ jsx10(UserSettingsSync, { theme: docs.theme }),
716
+ /* @__PURE__ */ jsxs8("div", { className: "min-h-screen bg-base-100 text-base-content", children: [
717
+ header ?? /* @__PURE__ */ jsx10(Navbar_default, {}),
718
+ /* @__PURE__ */ jsx10("div", { className: cmMerge5(isLandingPage ? "" : "pt-14"), children })
1076
719
  ] })
1077
- ] }) }) });
720
+ ] }) });
1078
721
  };
1079
722
 
1080
723
  // src/runtime/client/components/MetaHead/FaviconLinks.tsx
1081
- import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
724
+ import { Fragment, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
1082
725
  var FaviconLinks = ({ head }) => {
1083
726
  const { appleTouchIcon, faviconIco, faviconSvg } = head;
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 })
727
+ return /* @__PURE__ */ jsxs9(Fragment, { children: [
728
+ appleTouchIcon && /* @__PURE__ */ jsx11("link", { rel: "apple-touch-icon", href: appleTouchIcon }),
729
+ faviconSvg && /* @__PURE__ */ jsx11("link", { rel: "icon", type: "image/svg+xml", href: faviconSvg }),
730
+ faviconIco && /* @__PURE__ */ jsxs9(Fragment, { children: [
731
+ /* @__PURE__ */ jsx11("link", { rel: "shortcut icon", type: "image/x-icon", href: faviconIco }),
732
+ /* @__PURE__ */ jsx11("link", { rel: "icon", type: "image/x-icon", href: faviconIco })
1090
733
  ] })
1091
734
  ] });
1092
735
  };
1093
736
 
1094
737
  // src/runtime/client/components/MetaHead/FontLinks.tsx
1095
- import { Fragment as Fragment3, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
738
+ import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
739
+ var defaultInterFontStylesheetHref = nivelAssetUrl("fonts/fonts-inter.css");
740
+ var defaultInterFontCss = `
741
+ @font-face {
742
+ font-display: swap;
743
+ font-family: 'Inter';
744
+ font-style: normal;
745
+ font-weight: 400;
746
+ src: url('${nivelAssetUrl("fonts/inter-v20-latin-regular.woff2")}') format('woff2');
747
+ }
748
+
749
+ @font-face {
750
+ font-display: swap;
751
+ font-family: 'Inter';
752
+ font-style: normal;
753
+ font-weight: 600;
754
+ src: url('${nivelAssetUrl("fonts/inter-v20-latin-600.woff2")}') format('woff2');
755
+ }
756
+
757
+ @font-face {
758
+ font-display: swap;
759
+ font-family: 'Inter';
760
+ font-style: normal;
761
+ font-weight: 800;
762
+ src: url('${nivelAssetUrl("fonts/inter-v20-latin-800.woff2")}') format('woff2');
763
+ }
764
+ `;
1096
765
  var FontLinks = ({ head }) => {
1097
766
  const { fontStylesheetHref, fontPreloadHrefs } = head;
1098
767
  const effectivePreloadHrefs = fontPreloadHrefs ?? [];
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 })
768
+ const shouldInlineDefaultInterFonts = fontStylesheetHref === defaultInterFontStylesheetHref;
769
+ return /* @__PURE__ */ jsxs10(Fragment2, { children: [
770
+ effectivePreloadHrefs.map((href) => /* @__PURE__ */ jsx12("link", { rel: "preload", href, as: "font", type: "font/woff2", crossOrigin: "anonymous" }, href)),
771
+ shouldInlineDefaultInterFonts ? /* @__PURE__ */ jsx12("style", { dangerouslySetInnerHTML: { __html: defaultInterFontCss } }) : null,
772
+ fontStylesheetHref && !shouldInlineDefaultInterFonts ? /* @__PURE__ */ jsx12("link", { rel: "stylesheet", href: fontStylesheetHref }) : null
1102
773
  ] });
1103
774
  };
1104
775
 
1105
776
  // src/runtime/client/components/MetaHead/ThemeBootstrap.tsx
1106
- import { jsx as jsx14 } from "react/jsx-runtime";
777
+ import { jsx as jsx13 } from "react/jsx-runtime";
1107
778
  var getThemeBootstrapScript = (theme) => {
1108
779
  return `(() => {
1109
780
  const storageKey = ${JSON.stringify(USER_SETTINGS_STORAGE_KEY)};
@@ -1141,7 +812,7 @@ var getThemeBootstrapScript = (theme) => {
1141
812
  })();`;
1142
813
  };
1143
814
  var ThemeBootstrap = ({ theme }) => {
1144
- return /* @__PURE__ */ jsx14(
815
+ return /* @__PURE__ */ jsx13(
1145
816
  "script",
1146
817
  {
1147
818
  dangerouslySetInnerHTML: {
@@ -1152,19 +823,19 @@ var ThemeBootstrap = ({ theme }) => {
1152
823
  };
1153
824
 
1154
825
  // src/runtime/client/components/MetaHead/index.tsx
1155
- import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
826
+ import { Fragment as Fragment3, jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
1156
827
  var MetaHead = () => {
1157
828
  const docs = useDocsFromPageGlobalContext();
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 })
829
+ return /* @__PURE__ */ jsxs11(Fragment3, { children: [
830
+ /* @__PURE__ */ jsx14(ThemeBootstrap, { theme: docs.theme }),
831
+ /* @__PURE__ */ jsx14(FaviconLinks, { head: docs.head }),
832
+ /* @__PURE__ */ jsx14(FontLinks, { head: docs.head })
1162
833
  ] });
1163
834
  };
1164
835
 
1165
836
  // src/runtime/client/components/ProseContainer.tsx
1166
- import cm5 from "@classmatejs/react";
1167
- var ProseContainer = cm5.section`
837
+ import cm4 from "@classmatejs/react";
838
+ var ProseContainer = cm4.section`
1168
839
  prose-container
1169
840
  `;
1170
841
 
@@ -1172,34 +843,34 @@ var ProseContainer = cm5.section`
1172
843
  import { useData } from "vike-react/useData";
1173
844
 
1174
845
  // src/runtime/client/components/DocsPagination.tsx
1175
- import { cmMerge as cmMerge7 } from "@classmatejs/react";
846
+ import { cmMerge as cmMerge6 } from "@classmatejs/react";
1176
847
  import { ChevronLeft, ChevronRight } from "lucide-react";
1177
- import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
848
+ import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
1178
849
  var PaginationCard = ({ item, direction, isOffset }) => {
1179
850
  const isPrevious = direction === "previous";
1180
- return /* @__PURE__ */ jsx16(
851
+ return /* @__PURE__ */ jsx15(
1181
852
  "a",
1182
853
  {
1183
854
  href: withSiteBaseUrl(item.href),
1184
- className: cmMerge7(
855
+ className: cmMerge6(
1185
856
  "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
857
  isPrevious ? "text-left" : "text-right",
1187
858
  isOffset && "sm:col-start-2"
1188
859
  ),
1189
860
  "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(
861
+ children: /* @__PURE__ */ jsxs12("div", { className: "flex flex-col justify-between gap-2", children: [
862
+ /* @__PURE__ */ jsx15("p", { className: "text-lg font-semibold text-base-content", children: renderInlineMarkdown(item.title) }),
863
+ /* @__PURE__ */ jsxs12(
1193
864
  "div",
1194
865
  {
1195
- className: cmMerge7(
866
+ className: cmMerge6(
1196
867
  "flex items-center gap-1 text-base-muted group-hover:text-base-content",
1197
868
  isPrevious ? "justify-start" : "justify-end"
1198
869
  ),
1199
870
  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" })
871
+ isPrevious && /* @__PURE__ */ jsx15(ChevronLeft, { className: "h-4 w-4" }),
872
+ /* @__PURE__ */ jsx15("span", { children: isPrevious ? "Previous" : "Next" }),
873
+ !isPrevious && /* @__PURE__ */ jsx15(ChevronRight, { className: "h-4 w-4" })
1203
874
  ]
1204
875
  }
1205
876
  )
@@ -1220,38 +891,38 @@ var DocsPagination = ({
1220
891
  if (!previousPage && !nextPage) {
1221
892
  return null;
1222
893
  }
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" })
894
+ return /* @__PURE__ */ jsx15("nav", { className: "mb-10 mt-16", "aria-label": "Previous Next", children: /* @__PURE__ */ jsxs12("div", { className: "grid gap-4 sm:grid-cols-2", children: [
895
+ previousPage && /* @__PURE__ */ jsx15(PaginationCard, { item: previousPage, direction: "previous" }),
896
+ nextPage && /* @__PURE__ */ jsx15(PaginationCard, { isOffset: !previousPage, item: nextPage, direction: "next" })
1226
897
  ] }) });
1227
898
  };
1228
899
 
1229
900
  // src/runtime/client/components/Footer.tsx
1230
901
  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(() => {
902
+ import { memo as memo2 } from "react";
903
+ import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
904
+ var DocsFooter = memo2(() => {
1234
905
  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" }),
906
+ return /* @__PURE__ */ jsxs13("footer", { className: "mb-8 mt-12 text-sm border-t border-base-muted-light pt-10", children: [
907
+ /* @__PURE__ */ jsxs13("div", { className: "mb-16 flex items-center gap-2", children: [
908
+ /* @__PURE__ */ jsxs13("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
909
+ /* @__PURE__ */ jsx16(Pencil, { className: "w-3 h-3" }),
1239
910
  " Edit this page"
1240
911
  ] }),
1241
- /* @__PURE__ */ jsxs14("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
1242
- /* @__PURE__ */ jsx17(Bug, { className: "w-3 h-3" }),
912
+ /* @__PURE__ */ jsxs13("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
913
+ /* @__PURE__ */ jsx16(Bug, { className: "w-3 h-3" }),
1243
914
  " Report Issue"
1244
915
  ] })
1245
916
  ] }),
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 }) })
917
+ /* @__PURE__ */ jsxs13("div", { className: "flex justify-between items-center", children: [
918
+ /* @__PURE__ */ jsx16(SocialLinks_default, {}),
919
+ /* @__PURE__ */ jsx16("div", { className: "flex gap-2 items-center", children: brand && /* @__PURE__ */ jsx16(Brand, { brand, noText: true }) })
1249
920
  ] })
1250
921
  ] });
1251
922
  });
1252
923
 
1253
924
  // src/runtime/client/components/HeadingLinkCopy.tsx
1254
- import { useEffect as useEffect5 } from "react";
925
+ import { useEffect as useEffect6 } from "react";
1255
926
  var copyText = async (value) => {
1256
927
  try {
1257
928
  await navigator.clipboard.writeText(value);
@@ -1270,7 +941,7 @@ var copyText = async (value) => {
1270
941
  };
1271
942
  var getHeadingLink = (target) => target instanceof Element ? target.closest("a[data-copy-heading-link]") : null;
1272
943
  var HeadingLinkCopy = () => {
1273
- useEffect5(() => {
944
+ useEffect6(() => {
1274
945
  const handleClick = (event) => {
1275
946
  if (event.defaultPrevented || event.button !== 0) {
1276
947
  return;
@@ -1301,9 +972,9 @@ var HeadingLinkCopy = () => {
1301
972
  };
1302
973
 
1303
974
  // src/runtime/client/components/Sidebar.tsx
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";
975
+ import { cmMerge as cmMerge7 } from "@classmatejs/react";
976
+ import { memo as memo3, useEffect as useEffect7, useRef as useRef2 } from "react";
977
+ import { usePageContext as usePageContext3 } from "vike-react/usePageContext";
1307
978
 
1308
979
  // src/runtime/client/components/docsNavigation.ts
1309
980
  var containsActiveHref = (items, currentHref) => {
@@ -1331,12 +1002,12 @@ var getVisibleGroupItems = (group) => {
1331
1002
  var getGroupHref = (group) => group.href ?? null;
1332
1003
 
1333
1004
  // src/runtime/client/components/Sidebar.tsx
1334
- import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
1005
+ import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
1335
1006
  var useAutoOpenDetails = (nodeId, isOpenByDefault, hasActiveDescendant) => {
1336
1007
  const storedOpen = useDocsSidebarStore((state) => state.openNodes[nodeId]);
1337
1008
  const { setNodeOpen } = useDocsSidebarActions();
1338
1009
  const isOpen = storedOpen === void 0 ? isOpenByDefault || hasActiveDescendant : storedOpen || hasActiveDescendant;
1339
- useEffect6(() => {
1010
+ useEffect7(() => {
1340
1011
  if (hasActiveDescendant) {
1341
1012
  setNodeOpen(nodeId, true);
1342
1013
  return;
@@ -1351,11 +1022,11 @@ var useAutoOpenDetails = (nodeId, isOpenByDefault, hasActiveDescendant) => {
1351
1022
  };
1352
1023
  };
1353
1024
  var SidebarPageLink = ({ title, href, currentHref }) => {
1354
- return /* @__PURE__ */ jsx18("li", { className: "rounded-none", children: /* @__PURE__ */ jsx18(
1025
+ return /* @__PURE__ */ jsx17("li", { className: "rounded-none", children: /* @__PURE__ */ jsx17(
1355
1026
  "a",
1356
1027
  {
1357
1028
  href: withSiteBaseUrl(href),
1358
- className: cmMerge8(
1029
+ className: cmMerge7(
1359
1030
  "text-base-muted hover:text-base-content justify-start hover:bg-base-200",
1360
1031
  href === currentHref && "text-primary! font-semibold bg-base-200"
1361
1032
  ),
@@ -1364,13 +1035,13 @@ var SidebarPageLink = ({ title, href, currentHref }) => {
1364
1035
  ) });
1365
1036
  };
1366
1037
  var SidebarGroupDivider = ({ title }) => {
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!" }) }) });
1038
+ return /* @__PURE__ */ jsx17("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__ */ jsx17("span", { className: "-ml-3", children: renderInlineMarkdown(title, { codeClassName: "text-sm!" }) }) });
1368
1039
  };
1369
1040
  var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) => {
1370
- const content = /* @__PURE__ */ jsx18(
1041
+ const content = /* @__PURE__ */ jsx17(
1371
1042
  "span",
1372
1043
  {
1373
- className: cmMerge8(
1044
+ className: cmMerge7(
1374
1045
  allowNavigation ? "font-medium" : "font-semibold",
1375
1046
  isActive && allowNavigation && "text-primary!"
1376
1047
  ),
@@ -1378,11 +1049,11 @@ var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) =>
1378
1049
  }
1379
1050
  );
1380
1051
  if (allowNavigation && href) {
1381
- return /* @__PURE__ */ jsx18(
1052
+ return /* @__PURE__ */ jsx17(
1382
1053
  "a",
1383
1054
  {
1384
1055
  href: withSiteBaseUrl(href),
1385
- className: cmMerge8(
1056
+ className: cmMerge7(
1386
1057
  "flex items-center gap-2 text-base-muted hover:text-base-content no-underline",
1387
1058
  isActive && "text-primary! font-semibold"
1388
1059
  ),
@@ -1390,19 +1061,19 @@ var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false }) =>
1390
1061
  }
1391
1062
  );
1392
1063
  }
1393
- return /* @__PURE__ */ jsx18("span", { className: "flex items-center gap-2 text-base-content", children: content });
1064
+ return /* @__PURE__ */ jsx17("span", { className: "flex items-center gap-2 text-base-content", children: content });
1394
1065
  };
1395
1066
  var renderSidebarItems = (items, currentHref) => {
1396
1067
  return items.map((item) => {
1397
1068
  if (item.kind === "page") {
1398
- return /* @__PURE__ */ jsx18(SidebarPageLink, { title: item.navTitle, href: item.href, currentHref }, item.id);
1069
+ return /* @__PURE__ */ jsx17(SidebarPageLink, { title: item.navTitle, href: item.href, currentHref }, item.id);
1399
1070
  }
1400
- return /* @__PURE__ */ jsx18(SidebarNestedGroup, { group: item, currentHref }, item.id);
1071
+ return /* @__PURE__ */ jsx17(SidebarNestedGroup, { group: item, currentHref }, item.id);
1401
1072
  });
1402
1073
  };
1403
1074
  var SidebarItemList = ({ items, currentHref }) => {
1404
1075
  const visibleItems = getVisibleNavItems(items);
1405
- return /* @__PURE__ */ jsx18("ul", { className: "menu w-full", children: renderSidebarItems(visibleItems, currentHref) });
1076
+ return /* @__PURE__ */ jsx17("ul", { className: "menu lg:w-[97%]", children: renderSidebarItems(visibleItems, currentHref) });
1406
1077
  };
1407
1078
  var SidebarNestedGroup = ({ group, currentHref }) => {
1408
1079
  const groupHref = getGroupHref(group);
@@ -1413,14 +1084,14 @@ var SidebarNestedGroup = ({ group, currentHref }) => {
1413
1084
  const { isOpen, setIsOpen } = useAutoOpenDetails(`group:${group.id}`, isOpenByDefault, nestedHasActiveItem);
1414
1085
  if (!isCollapsible) {
1415
1086
  if (!group.title) {
1416
- return /* @__PURE__ */ jsx18(Fragment5, { children: renderSidebarItems(visibleItems, currentHref) });
1087
+ return /* @__PURE__ */ jsx17(Fragment4, { children: renderSidebarItems(visibleItems, currentHref) });
1417
1088
  }
1418
- return /* @__PURE__ */ jsxs15(Fragment5, { children: [
1419
- /* @__PURE__ */ jsx18(SidebarGroupDivider, { title: group.title }),
1089
+ return /* @__PURE__ */ jsxs14(Fragment4, { children: [
1090
+ /* @__PURE__ */ jsx17(SidebarGroupDivider, { title: group.title }),
1420
1091
  renderSidebarItems(visibleItems, currentHref)
1421
1092
  ] });
1422
1093
  }
1423
- return /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs15(
1094
+ return /* @__PURE__ */ jsx17("li", { children: /* @__PURE__ */ jsxs14(
1424
1095
  "details",
1425
1096
  {
1426
1097
  open: isOpen,
@@ -1428,7 +1099,7 @@ var SidebarNestedGroup = ({ group, currentHref }) => {
1428
1099
  setIsOpen(event.currentTarget.open);
1429
1100
  },
1430
1101
  children: [
1431
- /* @__PURE__ */ jsx18("summary", { children: /* @__PURE__ */ jsx18(
1102
+ /* @__PURE__ */ jsx17("summary", { children: /* @__PURE__ */ jsx17(
1432
1103
  SidebarGroupTitle,
1433
1104
  {
1434
1105
  title: group.title,
@@ -1437,7 +1108,7 @@ var SidebarNestedGroup = ({ group, currentHref }) => {
1437
1108
  allowNavigation: Boolean(groupHref)
1438
1109
  }
1439
1110
  ) }),
1440
- visibleItems.length > 0 ? /* @__PURE__ */ jsx18(SidebarItemList, { items: visibleItems, currentHref }) : null
1111
+ visibleItems.length > 0 ? /* @__PURE__ */ jsx17(SidebarItemList, { items: visibleItems, currentHref }) : null
1441
1112
  ]
1442
1113
  }
1443
1114
  ) });
@@ -1449,7 +1120,7 @@ var SidebarSectionGroup = ({ section, currentHref, activeSectionId }) => {
1449
1120
  section.id === activeSectionId,
1450
1121
  sectionHasActiveItem
1451
1122
  );
1452
- return /* @__PURE__ */ jsx18("li", { className: "pb-4", children: /* @__PURE__ */ jsxs15(
1123
+ return /* @__PURE__ */ jsx17("li", { className: "pb-4", children: /* @__PURE__ */ jsxs14(
1453
1124
  "details",
1454
1125
  {
1455
1126
  open: isOpen,
@@ -1457,28 +1128,28 @@ var SidebarSectionGroup = ({ section, currentHref, activeSectionId }) => {
1457
1128
  setIsOpen(event.currentTarget.open);
1458
1129
  },
1459
1130
  children: [
1460
- /* @__PURE__ */ jsx18("summary", { children: /* @__PURE__ */ jsx18(SidebarGroupTitle, { title: section.title, isActive: sectionHasActiveItem }) }),
1461
- /* @__PURE__ */ jsx18(SidebarItemList, { items: section.items, currentHref })
1131
+ /* @__PURE__ */ jsx17("summary", { children: /* @__PURE__ */ jsx17(SidebarGroupTitle, { title: section.title, isActive: sectionHasActiveItem }) }),
1132
+ /* @__PURE__ */ jsx17(SidebarItemList, { items: section.items, currentHref })
1462
1133
  ]
1463
1134
  }
1464
1135
  ) });
1465
1136
  };
1466
- var Sidebar = memo4(
1137
+ var Sidebar = memo3(
1467
1138
  ({ currentHref: currentHrefProp = "", activeSectionId: activeSectionIdProp = "" }) => {
1468
- const scrollContainerRef = useRef3(null);
1469
- const { urlPathname } = usePageContext5();
1139
+ const scrollContainerRef = useRef2(null);
1140
+ const { urlPathname } = usePageContext3();
1470
1141
  const currentHref = currentHrefProp || urlPathname;
1471
1142
  const docs = useDocsGlobalContext();
1472
1143
  const activeSectionId = activeSectionIdProp || getActiveSectionByPathname(docs, currentHref)?.id || "";
1473
1144
  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(
1145
+ return /* @__PURE__ */ jsx17("aside", { className: "hidden basis-76 shrink-0 lg:block", children: /* @__PURE__ */ jsxs14("div", { className: "-ml-3 sticky top-14", children: [
1146
+ /* @__PURE__ */ jsx17("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" }),
1147
+ /* @__PURE__ */ jsx17(
1477
1148
  "div",
1478
1149
  {
1479
1150
  ref: scrollContainerRef,
1480
1151
  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(
1152
+ children: /* @__PURE__ */ jsx17("ul", { className: cmMerge7("menu p-0 m-0 w-full px-0 pt-3 li:last-child:border-0"), children: sidebarSections.map((section) => /* @__PURE__ */ jsx17(
1482
1153
  SidebarSectionGroup,
1483
1154
  {
1484
1155
  section,
@@ -1494,9 +1165,9 @@ var Sidebar = memo4(
1494
1165
  );
1495
1166
 
1496
1167
  // src/runtime/client/components/TableOfContents.tsx
1497
- import cm6, { cmMerge as cmMerge9 } from "@classmatejs/react";
1168
+ import cm5, { cmMerge as cmMerge8 } from "@classmatejs/react";
1498
1169
  import { Flame, TableOfContentsIcon } from "lucide-react";
1499
- import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
1170
+ import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
1500
1171
  var TableOfContents = ({
1501
1172
  headings: headingsProp = [],
1502
1173
  tableOfContents: tableOfContentsProp = false,
@@ -1506,19 +1177,19 @@ var TableOfContents = ({
1506
1177
  const { partners } = useDocsGlobalContext();
1507
1178
  const effectiveHeadings = headingsProp;
1508
1179
  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" }),
1180
+ return /* @__PURE__ */ jsx18("aside", { className: cmMerge8(effectiveTableOfContents ? "w-64" : "w-32", "hidden shrink-0 xl:block"), children: /* @__PURE__ */ jsx18("div", { className: "sticky top-14", children: /* @__PURE__ */ jsxs15("div", { className: "relative h-[calc(100svh-14*var(--spacing))] overflow-y-auto overflow-x-hidden pt-10 pb-8", children: [
1181
+ effectiveTableOfContents ? effectiveHeadings.length > 0 && /* @__PURE__ */ jsxs15(Fragment5, { children: [
1182
+ /* @__PURE__ */ jsxs15("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
1183
+ /* @__PURE__ */ jsx18(TableOfContentsIcon, { className: "h-3 w-3" }),
1513
1184
  "On this page"
1514
1185
  ] }),
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(
1186
+ /* @__PURE__ */ jsx18("nav", { "aria-label": "On this page", className: "mb-12", children: /* @__PURE__ */ jsx18("ul", { children: effectiveHeadings.map((heading) => /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsx18(
1516
1187
  "a",
1517
1188
  {
1518
1189
  href: `#${heading.id}`,
1519
1190
  "aria-current": activeHeadingId === heading.id ? "location" : void 0,
1520
1191
  onClick: () => setActiveHeadingId(heading.id),
1521
- className: cmMerge9(
1192
+ className: cmMerge8(
1522
1193
  "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
1194
  heading.depth > 2 ? "pl-6" : "pl-4",
1524
1195
  activeHeadingId === heading.id ? "border-l-2 border-primary font-semibold text-base-content" : ""
@@ -1527,42 +1198,42 @@ var TableOfContents = ({
1527
1198
  }
1528
1199
  ) }, heading.id)) }) })
1529
1200
  ] }) : null,
1530
- /* @__PURE__ */ jsx19(Adbar, { partners })
1201
+ /* @__PURE__ */ jsx18(Adbar, { partners })
1531
1202
  ] }) }) });
1532
1203
  };
1533
1204
  var Adbar = ({ partners }) => {
1534
1205
  if (partners.primary.length === 0 && partners.gold.length === 0) {
1535
1206
  return null;
1536
1207
  }
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" }),
1208
+ return /* @__PURE__ */ jsxs15("aside", { children: [
1209
+ /* @__PURE__ */ jsxs15("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
1210
+ /* @__PURE__ */ jsx18(Flame, { className: "h-3 w-3" }),
1540
1211
  "Partners"
1541
1212
  ] }),
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))
1213
+ /* @__PURE__ */ jsxs15("ul", { className: "grid grid-cols-[repeat(auto-fit,minmax(5.5rem,1fr))] gap-3 opacity-90", children: [
1214
+ partners.primary.map((partner) => /* @__PURE__ */ jsx18(AdbarItem, { className: "col-span-full", children: /* @__PURE__ */ jsx18(AdbarLink, { href: partner.href, title: partner.name, children: /* @__PURE__ */ jsx18(PartnerLogo, { partner }) }) }, partner.name)),
1215
+ partners.gold.map((partner) => /* @__PURE__ */ jsx18(AdbarItem, { children: /* @__PURE__ */ jsx18(AdbarLink, { href: partner.href, title: partner.name, children: /* @__PURE__ */ jsx18(PartnerLogo, { partner }) }) }, partner.name))
1545
1216
  ] })
1546
1217
  ] });
1547
1218
  };
1548
1219
  var PartnerLogo = ({
1549
1220
  partner
1550
1221
  }) => {
1551
- return /* @__PURE__ */ jsxs16(Fragment6, { children: [
1552
- /* @__PURE__ */ jsx19(
1222
+ return /* @__PURE__ */ jsxs15(Fragment5, { children: [
1223
+ /* @__PURE__ */ jsx18(
1553
1224
  Image,
1554
1225
  {
1555
1226
  src: partner.logoLight,
1556
1227
  width: 200,
1557
1228
  height: 100,
1558
1229
  alt: partner.logoAlt,
1559
- className: cmMerge9("block", partner.logoDark ? "dark:hidden" : "dark:invert")
1230
+ className: cmMerge8("block", partner.logoDark ? "dark:hidden" : "dark:invert")
1560
1231
  }
1561
1232
  ),
1562
- partner.logoDark ? /* @__PURE__ */ jsx19(Image, { src: partner.logoDark, width: 200, height: 100, alt: partner.logoAlt, className: "hidden dark:block" }) : null
1233
+ partner.logoDark ? /* @__PURE__ */ jsx18(Image, { src: partner.logoDark, width: 200, height: 100, alt: partner.logoAlt, className: "hidden dark:block" }) : null
1563
1234
  ] });
1564
1235
  };
1565
- var AdbarItem = cm6.div`
1236
+ var AdbarItem = cm5.div`
1566
1237
  px-5
1567
1238
  py-5
1568
1239
  bg-base-200
@@ -1572,27 +1243,26 @@ var AdbarItem = cm6.div`
1572
1243
  justify-center
1573
1244
  rounded-field
1574
1245
  `;
1575
- var AdbarLink = cm6.a`
1246
+ var AdbarLink = cm5.a`
1576
1247
  block
1577
1248
  w-full
1578
1249
  transition-opacity
1579
1250
  hover:opacity-100
1580
1251
  focus-visible:opacity-100
1581
1252
  `;
1582
- var Image = cm6.img`
1253
+ var Image = cm5.img`
1583
1254
  mx-auto
1584
1255
  w-24
1585
1256
  `;
1586
1257
 
1587
1258
  // src/runtime/client/components/TableOfContentsMobile.tsx
1588
- import cm7 from "@classmatejs/react";
1259
+ import cm6 from "@classmatejs/react";
1589
1260
  import { TableOfContents as TableOfContents2 } from "lucide-react";
1590
1261
 
1591
1262
  // src/runtime/client/components/BreadcrumbSidebarTrigger.tsx
1592
1263
  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";
1264
+ import { useCallback as useCallback4 } from "react";
1265
+ import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
1596
1266
  var dedupeBreadcrumbs = (items) => {
1597
1267
  return items.filter((item, index) => index === 0 || items[index - 1]?.title !== item.title);
1598
1268
  };
@@ -1617,47 +1287,45 @@ var getSidebarBreadcrumbs = (items, currentHref) => {
1617
1287
  }
1618
1288
  return null;
1619
1289
  };
1620
- var BreadcrumbSidebarTrigger = () => {
1621
- const { urlPathname } = usePageContext6();
1290
+ var BreadcrumbSidebarTrigger = ({ currentHref }) => {
1622
1291
  const docs = useDocsGlobalContext();
1623
- const activeSection = getActiveSectionByPathname(docs, urlPathname);
1292
+ const activeSection = getActiveSectionByPathname(docs, currentHref);
1624
1293
  const breadcrumbItems = dedupeBreadcrumbs([
1625
1294
  ...activeSection ? [{ id: activeSection.id, title: activeSection.navTitle }] : [],
1626
- ...activeSection ? getSidebarBreadcrumbs(activeSection.items, urlPathname) ?? [] : []
1295
+ ...activeSection ? getSidebarBreadcrumbs(activeSection.items, currentHref) ?? [] : []
1627
1296
  ]);
1628
- const mobileBreadcrumbItems = breadcrumbItems.length > 3 ? breadcrumbItems.slice(0, 2) : breadcrumbItems;
1629
- const handleClick = useCallback2(() => {
1630
- alert("TODO: Open sidebar");
1297
+ const handleClick = useCallback4(() => {
1298
+ alert("TODO: Open mobile menu");
1631
1299
  }, []);
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(" / ") })
1300
+ return /* @__PURE__ */ jsx19("button", { className: "cursor-pointer min-w-0 max-w-full hidden md:block", type: "button", onClick: handleClick, children: /* @__PURE__ */ jsxs16("span", { className: "flex items-center gap-1 min-w-0 overflow-hidden lg:hidden", children: [
1301
+ /* @__PURE__ */ jsx19(ChevronLast, { className: "w-4 h-4 shrink-0 text-primary" }),
1302
+ /* @__PURE__ */ jsx19("span", { className: "hidden md:flex items-center gap-1", children: breadcrumbItems.map((item, index) => /* @__PURE__ */ jsxs16("span", { className: "contents", children: [
1303
+ index > 0 ? /* @__PURE__ */ jsx19(ChevronsRight, { className: "w-4 h-4 shrink-0 text-base-muted-medium" }) : null,
1304
+ /* @__PURE__ */ jsx19("span", { className: index === 0 ? "font-semibold truncate" : "text-sm truncate", children: renderInlineMarkdown(item.title, { codeClassName: "text-sm!" }) })
1305
+ ] }, item.id)) })
1639
1306
  ] }) });
1640
1307
  };
1641
1308
  var BreadcrumbSidebarTrigger_default = BreadcrumbSidebarTrigger;
1642
1309
 
1643
1310
  // src/runtime/client/components/TableOfContentsMobile.tsx
1644
- import { Fragment as Fragment7, jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
1311
+ import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
1645
1312
  var TableOfContentsMobile = ({
1646
1313
  headings = [],
1647
1314
  tableOfContents = false,
1648
1315
  pageTitle = "On this page",
1316
+ currentHref,
1649
1317
  activeHeadingId = "",
1650
1318
  setActiveHeadingId = () => void 0
1651
1319
  }) => {
1652
1320
  const topOptionValue = "__docs-page-top__";
1653
1321
  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(
1322
+ return /* @__PURE__ */ jsxs17(Fragment6, { children: [
1323
+ /* @__PURE__ */ jsx20("div", { className: "h-12 xl:hidden" }),
1324
+ /* @__PURE__ */ jsx20(StyledTOC, { children: /* @__PURE__ */ jsxs17(StyledTOCInner, { children: [
1325
+ /* @__PURE__ */ jsx20(BreadcrumbSidebarTrigger_default, { currentHref }),
1326
+ /* @__PURE__ */ jsxs17("label", { className: "select select-sm md:w-80 w-full", htmlFor: "table-of-contents-select", children: [
1327
+ /* @__PURE__ */ jsx20("span", { className: "label flex", children: /* @__PURE__ */ jsx20(TableOfContents2, { className: "w-4 h-4" }) }),
1328
+ /* @__PURE__ */ jsxs17(
1661
1329
  "select",
1662
1330
  {
1663
1331
  id: "table-of-contents-select",
@@ -1674,8 +1342,8 @@ var TableOfContentsMobile = ({
1674
1342
  window.location.hash = encodeURIComponent(value);
1675
1343
  },
1676
1344
  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))
1345
+ /* @__PURE__ */ jsx20("option", { value: topOptionValue, children: pageTitle }),
1346
+ tableOfContents && headings.map((heading) => /* @__PURE__ */ jsx20("option", { value: heading.id, children: heading.title }, heading.id))
1679
1347
  ]
1680
1348
  }
1681
1349
  )
@@ -1684,7 +1352,7 @@ var TableOfContentsMobile = ({
1684
1352
  ] });
1685
1353
  };
1686
1354
  var TableOfContentsMobile_default = TableOfContentsMobile;
1687
- var StyledTOC = cm7.div`
1355
+ var StyledTOC = cm6.div`
1688
1356
  block xl:hidden
1689
1357
  fixed
1690
1358
  bg-base-100 border-b-base-muted-light
@@ -1693,14 +1361,14 @@ var StyledTOC = cm7.div`
1693
1361
  lg:w-[calc(100svw-80*var(--spacing))]
1694
1362
  lg:left-80
1695
1363
  `;
1696
- var StyledTOCInner = cm7.div`
1364
+ var StyledTOCInner = cm6.div`
1697
1365
  absolute inset-0 flex justify-between items-center
1698
1366
  pr-4
1699
1367
  px-4 lg:pl-14
1700
1368
  `;
1701
1369
 
1702
1370
  // src/runtime/client/components/useTableOfContentsState.ts
1703
- import { useEffect as useEffect7, useState as useState4 } from "react";
1371
+ import { useEffect as useEffect8, useState as useState5 } from "react";
1704
1372
  var getCurrentHash = () => {
1705
1373
  try {
1706
1374
  return decodeURIComponent(window.location.hash);
@@ -1782,10 +1450,10 @@ var updateActiveHeadingFromScroll = (setActiveHeadingId) => {
1782
1450
  var useTableOfContentsState = ({
1783
1451
  headings: routeHeadings = []
1784
1452
  }) => {
1785
- const [activeHeadingId, setActiveHeadingId] = useState4("");
1786
- const [domHeadings, setDomHeadings] = useState4(routeHeadings);
1453
+ const [activeHeadingId, setActiveHeadingId] = useState5("");
1454
+ const [domHeadings, setDomHeadings] = useState5(routeHeadings);
1787
1455
  const effectiveHeadings = domHeadings.length > 0 ? domHeadings : routeHeadings;
1788
- useEffect7(() => {
1456
+ useEffect8(() => {
1789
1457
  let scrollFrame = 0;
1790
1458
  const syncActiveHeading = () => {
1791
1459
  if (scrollFrame) {
@@ -1821,7 +1489,7 @@ var useTableOfContentsState = ({
1821
1489
  window.removeEventListener("resize", syncActiveHeading);
1822
1490
  };
1823
1491
  }, []);
1824
- useEffect7(() => {
1492
+ useEffect8(() => {
1825
1493
  if (typeof window === "undefined") {
1826
1494
  return;
1827
1495
  }
@@ -1845,33 +1513,34 @@ var useTableOfContentsState = ({
1845
1513
  };
1846
1514
 
1847
1515
  // src/runtime/client/DocsLayout.tsx
1848
- import { Fragment as Fragment8, jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
1516
+ import { Fragment as Fragment7, jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
1849
1517
  var DocsLayout = ({ children }) => {
1850
1518
  const data = useData();
1851
1519
  const { activeHeadingId, effectiveHeadings, setActiveHeadingId } = useTableOfContentsState({
1852
1520
  headings: data.headings
1853
1521
  });
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(
1522
+ return /* @__PURE__ */ jsxs18(Fragment7, { children: [
1523
+ /* @__PURE__ */ jsx21(HeadingLinkCopy, {}),
1524
+ /* @__PURE__ */ jsx21("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" }),
1525
+ /* @__PURE__ */ jsx21(LayoutComponent, { children: /* @__PURE__ */ jsxs18("div", { className: "lg:flex gap-14", children: [
1526
+ /* @__PURE__ */ jsx21(Sidebar, { currentHref: data.page.href, activeSectionId: data.page.sectionId }),
1527
+ /* @__PURE__ */ jsxs18("main", { className: "min-w-0 flex-1 basis-auto shrink", children: [
1528
+ /* @__PURE__ */ jsx21(
1861
1529
  TableOfContentsMobile_default,
1862
1530
  {
1863
1531
  headings: effectiveHeadings,
1864
1532
  tableOfContents: data.page.tableOfContents && effectiveHeadings.length > 0,
1865
1533
  pageTitle: data.page.title,
1534
+ currentHref: data.page.href,
1866
1535
  activeHeadingId,
1867
1536
  setActiveHeadingId
1868
1537
  }
1869
1538
  ),
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, {})
1539
+ /* @__PURE__ */ jsx21("div", { className: "mt-10 min-w-0", children }),
1540
+ /* @__PURE__ */ jsx21(DocsPagination, { previousPage: data.previousPage, nextPage: data.nextPage }),
1541
+ /* @__PURE__ */ jsx21(DocsFooter, {})
1873
1542
  ] }),
1874
- /* @__PURE__ */ jsx22(
1543
+ /* @__PURE__ */ jsx21(
1875
1544
  TableOfContents,
1876
1545
  {
1877
1546
  headings: effectiveHeadings,
@@ -1886,7 +1555,7 @@ var DocsLayout = ({ children }) => {
1886
1555
 
1887
1556
  // src/runtime/client/DocsPage.tsx
1888
1557
  import { useData as useData2 } from "vike-react/useData";
1889
- import { usePageContext as usePageContext7 } from "vike-react/usePageContext";
1558
+ import { usePageContext as usePageContext4 } from "vike-react/usePageContext";
1890
1559
 
1891
1560
  // src/runtime/client/getMdxRuntimeValue.tsx
1892
1561
  var isExternalHref = (href) => {
@@ -1982,32 +1651,27 @@ var getMdxRuntimeValue = (options) => {
1982
1651
  };
1983
1652
 
1984
1653
  // src/runtime/client/DocsPage.tsx
1985
- import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
1654
+ import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
1986
1655
  var DocsPage = ({ Content }) => {
1987
- const pageContext = usePageContext7();
1656
+ const pageContext = usePageContext4();
1988
1657
  const docs = useDocsGlobalContext();
1989
1658
  const { page } = useData2();
1990
- return /* @__PURE__ */ jsx23(
1659
+ return /* @__PURE__ */ jsx22(
1991
1660
  UniversalMdxProvider,
1992
1661
  {
1993
1662
  value: getMdxRuntimeValue({
1994
1663
  docs,
1995
1664
  currentPathname: pageContext.urlPathname
1996
1665
  }),
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, {})
1666
+ children: /* @__PURE__ */ jsxs19(ProseContainer, { "data-doc-content": "", children: [
1667
+ /* @__PURE__ */ jsx22("h1", { className: "scroll-mt-32 xl:scroll-mt-24", children: renderInlineMarkdown(page.title) }),
1668
+ /* @__PURE__ */ jsx22(Content, {})
2000
1669
  ] })
2001
1670
  }
2002
1671
  );
2003
1672
  };
2004
1673
 
2005
1674
  export {
2006
- useDocsSearchStore,
2007
- useDocsSearchActions,
2008
- useDocsSidebarStore,
2009
- useDocsSidebarActions,
2010
- LayoutComponent,
2011
1675
  useDocsUserSettingsStore,
2012
1676
  DEFAULT_THEME_PREFERENCE,
2013
1677
  applyThemePreference,
@@ -2018,4 +1682,4 @@ export {
2018
1682
  DocsLayout,
2019
1683
  DocsPage
2020
1684
  };
2021
- //# sourceMappingURL=chunk-F4OBB7JD.js.map
1685
+ //# sourceMappingURL=chunk-SH5XWPXW.js.map