@unterberg/nivel 0.2.32 → 0.2.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-SARND7IX.js → chunk-LZDZWW3P.js} +154 -152
- package/dist/chunk-LZDZWW3P.js.map +1 -0
- package/dist/client.js +1 -1
- package/dist/runtime/client.js +1 -1
- package/dist/vike.js +168 -1
- package/dist/vike.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-SARND7IX.js.map +0 -1
|
@@ -1002,10 +1002,56 @@ import { useData } from "vike-react/useData";
|
|
|
1002
1002
|
// src/runtime/client/components/DocsPagination.tsx
|
|
1003
1003
|
import { cmMerge as cmMerge6 } from "@classmatejs/react";
|
|
1004
1004
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
1005
|
+
|
|
1006
|
+
// src/runtime/client/components/DocsBreadcrumbs.tsx
|
|
1007
|
+
import { ChevronsRight } from "lucide-react";
|
|
1005
1008
|
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1009
|
+
var dedupeBreadcrumbs = (items) => {
|
|
1010
|
+
return items.filter((item, index) => index === 0 || items[index - 1]?.title !== item.title);
|
|
1011
|
+
};
|
|
1012
|
+
var getSidebarBreadcrumbs = (items, currentHref) => {
|
|
1013
|
+
for (const item of items) {
|
|
1014
|
+
if (item.kind === "page") {
|
|
1015
|
+
if (item.href === currentHref) {
|
|
1016
|
+
return [{ id: item.id, kind: item.kind, title: item.navTitle }];
|
|
1017
|
+
}
|
|
1018
|
+
continue;
|
|
1019
|
+
}
|
|
1020
|
+
if (item.href === currentHref) {
|
|
1021
|
+
return item.title ? [{ id: item.id, kind: item.kind, title: item.title }] : [];
|
|
1022
|
+
}
|
|
1023
|
+
const nestedBreadcrumbs = getSidebarBreadcrumbs(item.items, currentHref);
|
|
1024
|
+
if (!nestedBreadcrumbs) {
|
|
1025
|
+
continue;
|
|
1026
|
+
}
|
|
1027
|
+
return dedupeBreadcrumbs(item.title ? [{ id: item.id, kind: item.kind, title: item.title }] : nestedBreadcrumbs);
|
|
1028
|
+
}
|
|
1029
|
+
return null;
|
|
1030
|
+
};
|
|
1031
|
+
var DocsBreadcrumbs = ({ currentHref }) => {
|
|
1032
|
+
const docs = useDocsGlobalContext();
|
|
1033
|
+
const activeSection = getActiveSectionByPathname(docs, currentHref);
|
|
1034
|
+
const breadcrumbItems = dedupeBreadcrumbs([
|
|
1035
|
+
...activeSection ? getSidebarBreadcrumbs(activeSection.items, currentHref) ?? [] : []
|
|
1036
|
+
]);
|
|
1037
|
+
return /* @__PURE__ */ jsx15("span", { className: "flex items-center text-sm gap-1 min-w-0 overflow-hidden text-primary", children: breadcrumbItems.map((item, index) => {
|
|
1038
|
+
const Icon = docs.docsIconMap[getDocsIconMapKey(item.kind, item.id)];
|
|
1039
|
+
return /* @__PURE__ */ jsxs12("span", { className: "contents", children: [
|
|
1040
|
+
index > 0 ? /* @__PURE__ */ jsx15(ChevronsRight, { className: "size-4 shrink-0 text-base-muted-medium" }) : null,
|
|
1041
|
+
/* @__PURE__ */ jsxs12("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
1042
|
+
Icon ? /* @__PURE__ */ jsx15(Icon, { className: "size-3 shrink-0", "aria-hidden": "true" }) : null,
|
|
1043
|
+
/* @__PURE__ */ jsx15("span", { className: "truncate", children: renderInlineMarkdown(item.title, { codeClassName: "text-sm!" }) })
|
|
1044
|
+
] })
|
|
1045
|
+
] }, item.id);
|
|
1046
|
+
}) });
|
|
1047
|
+
};
|
|
1048
|
+
var DocsBreadcrumbs_default = DocsBreadcrumbs;
|
|
1049
|
+
|
|
1050
|
+
// src/runtime/client/components/DocsPagination.tsx
|
|
1051
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1006
1052
|
var PaginationCard = ({ item, direction, isOffset }) => {
|
|
1007
1053
|
const isPrevious = direction === "previous";
|
|
1008
|
-
return /* @__PURE__ */
|
|
1054
|
+
return /* @__PURE__ */ jsx16(
|
|
1009
1055
|
"a",
|
|
1010
1056
|
{
|
|
1011
1057
|
href: withSiteBaseUrl(item.href),
|
|
@@ -1015,20 +1061,21 @@ var PaginationCard = ({ item, direction, isOffset }) => {
|
|
|
1015
1061
|
isOffset && "sm:col-start-2"
|
|
1016
1062
|
),
|
|
1017
1063
|
"aria-label": `${isPrevious ? "Previous" : "Next"}: ${item.title}`,
|
|
1018
|
-
children: /* @__PURE__ */
|
|
1019
|
-
/* @__PURE__ */
|
|
1020
|
-
/* @__PURE__ */
|
|
1064
|
+
children: /* @__PURE__ */ jsxs13("div", { className: "flex flex-col h-full justify-between gap-2", children: [
|
|
1065
|
+
/* @__PURE__ */ jsx16("div", { className: cmMerge6("flex gap-1 text-base-muted", isPrevious ? "justify-start" : "justify-end"), children: /* @__PURE__ */ jsx16(DocsBreadcrumbs_default, { currentHref: item.href }) }),
|
|
1066
|
+
/* @__PURE__ */ jsx16("p", { className: "text-lg font-semibold text-base-content", children: renderInlineMarkdown(item.title) }),
|
|
1067
|
+
/* @__PURE__ */ jsx16(
|
|
1021
1068
|
"div",
|
|
1022
1069
|
{
|
|
1023
1070
|
className: cmMerge6(
|
|
1024
|
-
"flex items-
|
|
1071
|
+
"flex flex-1 items-end gap-1 text-base-muted group-hover:text-base-content",
|
|
1025
1072
|
isPrevious ? "justify-start" : "justify-end"
|
|
1026
1073
|
),
|
|
1027
|
-
children: [
|
|
1028
|
-
isPrevious && /* @__PURE__ */
|
|
1029
|
-
/* @__PURE__ */
|
|
1030
|
-
!isPrevious && /* @__PURE__ */
|
|
1031
|
-
]
|
|
1074
|
+
children: /* @__PURE__ */ jsxs13("div", { className: "flex items-center", children: [
|
|
1075
|
+
isPrevious && /* @__PURE__ */ jsx16(ChevronLeft, { className: "size-4" }),
|
|
1076
|
+
/* @__PURE__ */ jsx16("span", { children: isPrevious ? "Previous" : "Next" }),
|
|
1077
|
+
!isPrevious && /* @__PURE__ */ jsx16(ChevronRight, { className: "size-4" })
|
|
1078
|
+
] })
|
|
1032
1079
|
}
|
|
1033
1080
|
)
|
|
1034
1081
|
] })
|
|
@@ -1048,32 +1095,32 @@ var DocsPagination = ({
|
|
|
1048
1095
|
if (!previousPage && !nextPage) {
|
|
1049
1096
|
return null;
|
|
1050
1097
|
}
|
|
1051
|
-
return /* @__PURE__ */
|
|
1052
|
-
previousPage && /* @__PURE__ */
|
|
1053
|
-
nextPage && /* @__PURE__ */
|
|
1098
|
+
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: [
|
|
1099
|
+
previousPage && /* @__PURE__ */ jsx16(PaginationCard, { item: previousPage, direction: "previous" }),
|
|
1100
|
+
nextPage && /* @__PURE__ */ jsx16(PaginationCard, { isOffset: !previousPage, item: nextPage, direction: "next" })
|
|
1054
1101
|
] }) });
|
|
1055
1102
|
};
|
|
1056
1103
|
|
|
1057
1104
|
// src/runtime/client/components/Footer.tsx
|
|
1058
1105
|
import { Bug, Pencil } from "lucide-react";
|
|
1059
1106
|
import { memo as memo2 } from "react";
|
|
1060
|
-
import { jsx as
|
|
1107
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1061
1108
|
var DocsFooter = memo2(() => {
|
|
1062
1109
|
const { brand } = useDocsGlobalContext();
|
|
1063
|
-
return /* @__PURE__ */
|
|
1064
|
-
/* @__PURE__ */
|
|
1065
|
-
/* @__PURE__ */
|
|
1066
|
-
/* @__PURE__ */
|
|
1110
|
+
return /* @__PURE__ */ jsxs14("footer", { className: "mb-8 mt-12 text-sm border-t border-base-muted-light pt-10", children: [
|
|
1111
|
+
/* @__PURE__ */ jsxs14("div", { className: "mb-16 flex items-center gap-2", children: [
|
|
1112
|
+
/* @__PURE__ */ jsxs14("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
|
|
1113
|
+
/* @__PURE__ */ jsx17(Pencil, { className: "size-3" }),
|
|
1067
1114
|
" Edit this page"
|
|
1068
1115
|
] }),
|
|
1069
|
-
/* @__PURE__ */
|
|
1070
|
-
/* @__PURE__ */
|
|
1116
|
+
/* @__PURE__ */ jsxs14("a", { href: "edit", className: "btn btn-sm btn-primary btn-soft", children: [
|
|
1117
|
+
/* @__PURE__ */ jsx17(Bug, { className: "size-3" }),
|
|
1071
1118
|
" Report Issue"
|
|
1072
1119
|
] })
|
|
1073
1120
|
] }),
|
|
1074
|
-
/* @__PURE__ */
|
|
1075
|
-
/* @__PURE__ */
|
|
1076
|
-
/* @__PURE__ */
|
|
1121
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex justify-between items-center", children: [
|
|
1122
|
+
/* @__PURE__ */ jsx17(SocialLinks_default, {}),
|
|
1123
|
+
/* @__PURE__ */ jsx17("div", { className: "flex gap-2 items-center", children: brand && /* @__PURE__ */ jsx17(Brand, { brand, noText: true }) })
|
|
1077
1124
|
] })
|
|
1078
1125
|
] });
|
|
1079
1126
|
});
|
|
@@ -1159,7 +1206,7 @@ var getVisibleGroupItems = (group) => {
|
|
|
1159
1206
|
var getGroupHref = (group) => group.href ?? null;
|
|
1160
1207
|
|
|
1161
1208
|
// src/runtime/client/components/Sidebar.tsx
|
|
1162
|
-
import { Fragment as Fragment4, jsx as
|
|
1209
|
+
import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1163
1210
|
var useAutoOpenDetails = (nodeId, isOpenByDefault, hasActiveDescendant) => {
|
|
1164
1211
|
const storedOpen = useDocsSidebarStore((state) => state.openNodes[nodeId]);
|
|
1165
1212
|
const { setNodeOpen } = useDocsSidebarActions();
|
|
@@ -1179,7 +1226,7 @@ var useAutoOpenDetails = (nodeId, isOpenByDefault, hasActiveDescendant) => {
|
|
|
1179
1226
|
};
|
|
1180
1227
|
};
|
|
1181
1228
|
var SidebarPageLink = ({ title, href, currentHref, icon: Icon }) => {
|
|
1182
|
-
return /* @__PURE__ */
|
|
1229
|
+
return /* @__PURE__ */ jsx18("li", { className: "rounded-none", children: /* @__PURE__ */ jsx18(
|
|
1183
1230
|
"a",
|
|
1184
1231
|
{
|
|
1185
1232
|
href: withSiteBaseUrl(href),
|
|
@@ -1187,23 +1234,23 @@ var SidebarPageLink = ({ title, href, currentHref, icon: Icon }) => {
|
|
|
1187
1234
|
"rounded-field py-2 text-base-muted hover:text-base-content justify-start hover:bg-base-200",
|
|
1188
1235
|
href === currentHref && "text-primary! font-semibold bg-base-200"
|
|
1189
1236
|
),
|
|
1190
|
-
children: /* @__PURE__ */
|
|
1191
|
-
Icon ? /* @__PURE__ */
|
|
1192
|
-
/* @__PURE__ */
|
|
1237
|
+
children: /* @__PURE__ */ jsxs15("span", { className: "flex items-center gap-2", children: [
|
|
1238
|
+
Icon ? /* @__PURE__ */ jsx18(Icon, { className: "size-4 shrink-0", "aria-hidden": "true" }) : null,
|
|
1239
|
+
/* @__PURE__ */ jsx18("span", { children: renderInlineMarkdown(title, { codeClassName: "text-sm!" }) })
|
|
1193
1240
|
] })
|
|
1194
1241
|
}
|
|
1195
1242
|
) });
|
|
1196
1243
|
};
|
|
1197
1244
|
var SidebarGroupDivider = ({ title, icon: Icon }) => {
|
|
1198
|
-
return /* @__PURE__ */
|
|
1199
|
-
Icon ? /* @__PURE__ */
|
|
1200
|
-
/* @__PURE__ */
|
|
1245
|
+
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__ */ jsxs15("span", { className: "-ml-3 flex items-center gap-2", children: [
|
|
1246
|
+
Icon ? /* @__PURE__ */ jsx18(Icon, { className: "size-4 shrink-0", "aria-hidden": "true" }) : null,
|
|
1247
|
+
/* @__PURE__ */ jsx18("span", { children: renderInlineMarkdown(title, { codeClassName: "text-sm!" }) })
|
|
1201
1248
|
] }) });
|
|
1202
1249
|
};
|
|
1203
1250
|
var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false, icon: Icon }) => {
|
|
1204
|
-
const content = /* @__PURE__ */
|
|
1205
|
-
Icon ? /* @__PURE__ */
|
|
1206
|
-
/* @__PURE__ */
|
|
1251
|
+
const content = /* @__PURE__ */ jsxs15("span", { className: "flex items-center gap-2", children: [
|
|
1252
|
+
Icon ? /* @__PURE__ */ jsx18(Icon, { className: "size-4 shrink-0", "aria-hidden": "true" }) : null,
|
|
1253
|
+
/* @__PURE__ */ jsx18(
|
|
1207
1254
|
"span",
|
|
1208
1255
|
{
|
|
1209
1256
|
className: cmMerge7(
|
|
@@ -1215,7 +1262,7 @@ var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false, icon:
|
|
|
1215
1262
|
)
|
|
1216
1263
|
] });
|
|
1217
1264
|
if (allowNavigation && href) {
|
|
1218
|
-
return /* @__PURE__ */
|
|
1265
|
+
return /* @__PURE__ */ jsx18(
|
|
1219
1266
|
"a",
|
|
1220
1267
|
{
|
|
1221
1268
|
href: withSiteBaseUrl(href),
|
|
@@ -1227,12 +1274,12 @@ var SidebarGroupTitle = ({ title, href, isActive, allowNavigation = false, icon:
|
|
|
1227
1274
|
}
|
|
1228
1275
|
);
|
|
1229
1276
|
}
|
|
1230
|
-
return /* @__PURE__ */
|
|
1277
|
+
return /* @__PURE__ */ jsx18("span", { className: "flex items-center gap-2 rounded-field py-2 text-base-content", children: content });
|
|
1231
1278
|
};
|
|
1232
1279
|
var renderSidebarItems = (items, currentHref, docsIconMap) => {
|
|
1233
1280
|
return items.map((item) => {
|
|
1234
1281
|
if (item.kind === "page") {
|
|
1235
|
-
return /* @__PURE__ */
|
|
1282
|
+
return /* @__PURE__ */ jsx18(
|
|
1236
1283
|
SidebarPageLink,
|
|
1237
1284
|
{
|
|
1238
1285
|
title: item.navTitle,
|
|
@@ -1243,12 +1290,12 @@ var renderSidebarItems = (items, currentHref, docsIconMap) => {
|
|
|
1243
1290
|
item.id
|
|
1244
1291
|
);
|
|
1245
1292
|
}
|
|
1246
|
-
return /* @__PURE__ */
|
|
1293
|
+
return /* @__PURE__ */ jsx18(SidebarNestedGroup, { group: item, currentHref, docsIconMap }, item.id);
|
|
1247
1294
|
});
|
|
1248
1295
|
};
|
|
1249
1296
|
var SidebarItemList = ({ items, currentHref, docsIconMap }) => {
|
|
1250
1297
|
const visibleItems = getVisibleNavItems(items);
|
|
1251
|
-
return /* @__PURE__ */
|
|
1298
|
+
return /* @__PURE__ */ jsx18("ul", { className: "menu lg:w-[97%]", children: renderSidebarItems(visibleItems, currentHref, docsIconMap) });
|
|
1252
1299
|
};
|
|
1253
1300
|
var SidebarNestedGroup = ({ group, currentHref, docsIconMap }) => {
|
|
1254
1301
|
const groupHref = getGroupHref(group);
|
|
@@ -1260,14 +1307,14 @@ var SidebarNestedGroup = ({ group, currentHref, docsIconMap }) => {
|
|
|
1260
1307
|
const GroupIcon = docsIconMap[getDocsIconMapKey("group", group.id)];
|
|
1261
1308
|
if (!isCollapsible) {
|
|
1262
1309
|
if (!group.title) {
|
|
1263
|
-
return /* @__PURE__ */
|
|
1310
|
+
return /* @__PURE__ */ jsx18(Fragment4, { children: renderSidebarItems(visibleItems, currentHref, docsIconMap) });
|
|
1264
1311
|
}
|
|
1265
|
-
return /* @__PURE__ */
|
|
1266
|
-
/* @__PURE__ */
|
|
1312
|
+
return /* @__PURE__ */ jsxs15(Fragment4, { children: [
|
|
1313
|
+
/* @__PURE__ */ jsx18(SidebarGroupDivider, { title: group.title, icon: GroupIcon }),
|
|
1267
1314
|
renderSidebarItems(visibleItems, currentHref, docsIconMap)
|
|
1268
1315
|
] });
|
|
1269
1316
|
}
|
|
1270
|
-
return /* @__PURE__ */
|
|
1317
|
+
return /* @__PURE__ */ jsx18("li", { children: /* @__PURE__ */ jsxs15(
|
|
1271
1318
|
"details",
|
|
1272
1319
|
{
|
|
1273
1320
|
open: isOpen,
|
|
@@ -1275,7 +1322,7 @@ var SidebarNestedGroup = ({ group, currentHref, docsIconMap }) => {
|
|
|
1275
1322
|
setIsOpen(event.currentTarget.open);
|
|
1276
1323
|
},
|
|
1277
1324
|
children: [
|
|
1278
|
-
/* @__PURE__ */
|
|
1325
|
+
/* @__PURE__ */ jsx18("summary", { className: "rounded-field max-h-9 flex items-center", children: /* @__PURE__ */ jsx18(
|
|
1279
1326
|
SidebarGroupTitle,
|
|
1280
1327
|
{
|
|
1281
1328
|
title: group.title,
|
|
@@ -1285,7 +1332,7 @@ var SidebarNestedGroup = ({ group, currentHref, docsIconMap }) => {
|
|
|
1285
1332
|
icon: GroupIcon
|
|
1286
1333
|
}
|
|
1287
1334
|
) }),
|
|
1288
|
-
visibleItems.length > 0 ? /* @__PURE__ */
|
|
1335
|
+
visibleItems.length > 0 ? /* @__PURE__ */ jsx18(SidebarItemList, { items: visibleItems, currentHref, docsIconMap }) : null
|
|
1289
1336
|
]
|
|
1290
1337
|
}
|
|
1291
1338
|
) });
|
|
@@ -1299,7 +1346,7 @@ var SidebarSectionGroup = ({ section, currentHref, activeSectionId }) => {
|
|
|
1299
1346
|
section.id === activeSectionId,
|
|
1300
1347
|
sectionHasActiveItem
|
|
1301
1348
|
);
|
|
1302
|
-
return /* @__PURE__ */
|
|
1349
|
+
return /* @__PURE__ */ jsx18("li", { className: "pb-1", children: /* @__PURE__ */ jsxs15(
|
|
1303
1350
|
"details",
|
|
1304
1351
|
{
|
|
1305
1352
|
open: isOpen,
|
|
@@ -1307,8 +1354,8 @@ var SidebarSectionGroup = ({ section, currentHref, activeSectionId }) => {
|
|
|
1307
1354
|
setIsOpen(event.currentTarget.open);
|
|
1308
1355
|
},
|
|
1309
1356
|
children: [
|
|
1310
|
-
/* @__PURE__ */
|
|
1311
|
-
/* @__PURE__ */
|
|
1357
|
+
/* @__PURE__ */ jsx18("summary", { className: "rounded-field max-h-9 flex items-center", children: /* @__PURE__ */ jsx18(SidebarGroupTitle, { title: section.title, isActive: sectionHasActiveItem, icon: SectionIcon }) }),
|
|
1358
|
+
/* @__PURE__ */ jsx18(SidebarItemList, { items: section.items, currentHref, docsIconMap: docs.docsIconMap })
|
|
1312
1359
|
]
|
|
1313
1360
|
}
|
|
1314
1361
|
) });
|
|
@@ -1321,14 +1368,14 @@ var Sidebar = memo3(
|
|
|
1321
1368
|
const docs = useDocsGlobalContext();
|
|
1322
1369
|
const activeSectionId = activeSectionIdProp || getActiveSectionByPathname(docs, currentHref)?.id || "";
|
|
1323
1370
|
const { sidebarSections } = docs;
|
|
1324
|
-
return /* @__PURE__ */
|
|
1325
|
-
/* @__PURE__ */
|
|
1326
|
-
/* @__PURE__ */
|
|
1371
|
+
return /* @__PURE__ */ jsx18("aside", { className: "hidden basis-76 shrink-0 lg:block", children: /* @__PURE__ */ jsxs15("div", { className: "-ml-3 sticky top-14", children: [
|
|
1372
|
+
/* @__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" }),
|
|
1373
|
+
/* @__PURE__ */ jsx18(
|
|
1327
1374
|
"div",
|
|
1328
1375
|
{
|
|
1329
1376
|
ref: scrollContainerRef,
|
|
1330
1377
|
className: "pr-4 h-[calc(100svh-14*var(--spacing))] overflow-y-scroll relative z-10",
|
|
1331
|
-
children: /* @__PURE__ */
|
|
1378
|
+
children: /* @__PURE__ */ jsx18("ul", { className: cmMerge7("menu p-0 m-0 w-full px-0 pt-3 li:last-child:border-0"), children: sidebarSections.map((section) => /* @__PURE__ */ jsx18(
|
|
1332
1379
|
SidebarSectionGroup,
|
|
1333
1380
|
{
|
|
1334
1381
|
section,
|
|
@@ -1346,7 +1393,7 @@ var Sidebar = memo3(
|
|
|
1346
1393
|
// src/runtime/client/components/TableOfContents.tsx
|
|
1347
1394
|
import cm5, { cmMerge as cmMerge8 } from "@classmatejs/react";
|
|
1348
1395
|
import { Flame, TableOfContentsIcon } from "lucide-react";
|
|
1349
|
-
import { Fragment as Fragment5, jsx as
|
|
1396
|
+
import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1350
1397
|
var TableOfContents = ({
|
|
1351
1398
|
headings: headingsProp = [],
|
|
1352
1399
|
tableOfContents: tableOfContentsProp = false,
|
|
@@ -1356,13 +1403,13 @@ var TableOfContents = ({
|
|
|
1356
1403
|
const { partners } = useDocsGlobalContext();
|
|
1357
1404
|
const effectiveHeadings = headingsProp;
|
|
1358
1405
|
const effectiveTableOfContents = tableOfContentsProp;
|
|
1359
|
-
return /* @__PURE__ */
|
|
1360
|
-
effectiveTableOfContents ? effectiveHeadings.length > 0 && /* @__PURE__ */
|
|
1361
|
-
/* @__PURE__ */
|
|
1362
|
-
/* @__PURE__ */
|
|
1406
|
+
return /* @__PURE__ */ jsx19("aside", { className: cmMerge8(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: [
|
|
1407
|
+
effectiveTableOfContents ? effectiveHeadings.length > 0 && /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
1408
|
+
/* @__PURE__ */ jsxs16("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
|
|
1409
|
+
/* @__PURE__ */ jsx19(TableOfContentsIcon, { className: "size-3" }),
|
|
1363
1410
|
"On this page"
|
|
1364
1411
|
] }),
|
|
1365
|
-
/* @__PURE__ */
|
|
1412
|
+
/* @__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(
|
|
1366
1413
|
"a",
|
|
1367
1414
|
{
|
|
1368
1415
|
href: `#${heading.id}`,
|
|
@@ -1377,29 +1424,29 @@ var TableOfContents = ({
|
|
|
1377
1424
|
}
|
|
1378
1425
|
) }, heading.id)) }) })
|
|
1379
1426
|
] }) : null,
|
|
1380
|
-
/* @__PURE__ */
|
|
1427
|
+
/* @__PURE__ */ jsx19(Adbar, { partners })
|
|
1381
1428
|
] }) }) });
|
|
1382
1429
|
};
|
|
1383
1430
|
var Adbar = ({ partners }) => {
|
|
1384
1431
|
if (partners.primary.length === 0 && partners.gold.length === 0) {
|
|
1385
1432
|
return null;
|
|
1386
1433
|
}
|
|
1387
|
-
return /* @__PURE__ */
|
|
1388
|
-
/* @__PURE__ */
|
|
1389
|
-
/* @__PURE__ */
|
|
1434
|
+
return /* @__PURE__ */ jsxs16("aside", { children: [
|
|
1435
|
+
/* @__PURE__ */ jsxs16("p", { className: "mb-4 flex items-center gap-2 text-xs font-semibold uppercase tracking-widest text-base-muted", children: [
|
|
1436
|
+
/* @__PURE__ */ jsx19(Flame, { className: "size-3" }),
|
|
1390
1437
|
"Partners"
|
|
1391
1438
|
] }),
|
|
1392
|
-
/* @__PURE__ */
|
|
1393
|
-
partners.primary.map((partner) => /* @__PURE__ */
|
|
1394
|
-
partners.gold.map((partner) => /* @__PURE__ */
|
|
1439
|
+
/* @__PURE__ */ jsxs16("ul", { className: "grid grid-cols-[repeat(auto-fit,minmax(5.5rem,1fr))] gap-3 opacity-90", children: [
|
|
1440
|
+
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)),
|
|
1441
|
+
partners.gold.map((partner) => /* @__PURE__ */ jsx19(AdbarItem, { children: /* @__PURE__ */ jsx19(AdbarLink, { href: partner.href, title: partner.name, children: /* @__PURE__ */ jsx19(PartnerLogo, { partner }) }) }, partner.name))
|
|
1395
1442
|
] })
|
|
1396
1443
|
] });
|
|
1397
1444
|
};
|
|
1398
1445
|
var PartnerLogo = ({
|
|
1399
1446
|
partner
|
|
1400
1447
|
}) => {
|
|
1401
|
-
return /* @__PURE__ */
|
|
1402
|
-
/* @__PURE__ */
|
|
1448
|
+
return /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
1449
|
+
/* @__PURE__ */ jsx19(
|
|
1403
1450
|
Image,
|
|
1404
1451
|
{
|
|
1405
1452
|
src: partner.logoLight,
|
|
@@ -1409,7 +1456,7 @@ var PartnerLogo = ({
|
|
|
1409
1456
|
className: cmMerge8("block", partner.logoDark ? "dark:hidden" : "dark:invert")
|
|
1410
1457
|
}
|
|
1411
1458
|
),
|
|
1412
|
-
partner.logoDark ? /* @__PURE__ */
|
|
1459
|
+
partner.logoDark ? /* @__PURE__ */ jsx19(Image, { src: partner.logoDark, width: 200, height: 200, alt: partner.logoAlt, className: "hidden dark:block" }) : null
|
|
1413
1460
|
] });
|
|
1414
1461
|
};
|
|
1415
1462
|
var AdbarItem = cm5.li`
|
|
@@ -1442,13 +1489,13 @@ import { TableOfContents as TableOfContents2 } from "lucide-react";
|
|
|
1442
1489
|
import { useId } from "react";
|
|
1443
1490
|
|
|
1444
1491
|
// src/runtime/client/components/BreadcrumbSidebarTrigger.tsx
|
|
1445
|
-
import { ChevronLast, ChevronsRight } from "lucide-react";
|
|
1492
|
+
import { ChevronLast, ChevronsRight as ChevronsRight2 } from "lucide-react";
|
|
1446
1493
|
import { useCallback as useCallback4 } from "react";
|
|
1447
|
-
import { jsx as
|
|
1448
|
-
var
|
|
1494
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1495
|
+
var dedupeBreadcrumbs2 = (items) => {
|
|
1449
1496
|
return items.filter((item, index) => index === 0 || items[index - 1]?.title !== item.title);
|
|
1450
1497
|
};
|
|
1451
|
-
var
|
|
1498
|
+
var getSidebarBreadcrumbs2 = (items, currentHref) => {
|
|
1452
1499
|
for (const item of items) {
|
|
1453
1500
|
if (item.kind === "page") {
|
|
1454
1501
|
if (item.href === currentHref) {
|
|
@@ -1459,11 +1506,11 @@ var getSidebarBreadcrumbs = (items, currentHref) => {
|
|
|
1459
1506
|
if (item.href === currentHref) {
|
|
1460
1507
|
return item.title ? [{ id: item.id, title: item.title }] : [];
|
|
1461
1508
|
}
|
|
1462
|
-
const nestedBreadcrumbs =
|
|
1509
|
+
const nestedBreadcrumbs = getSidebarBreadcrumbs2(item.items, currentHref);
|
|
1463
1510
|
if (!nestedBreadcrumbs) {
|
|
1464
1511
|
continue;
|
|
1465
1512
|
}
|
|
1466
|
-
return
|
|
1513
|
+
return dedupeBreadcrumbs2(
|
|
1467
1514
|
item.title ? [{ id: item.id, title: item.title }, ...nestedBreadcrumbs] : nestedBreadcrumbs
|
|
1468
1515
|
);
|
|
1469
1516
|
}
|
|
@@ -1472,25 +1519,25 @@ var getSidebarBreadcrumbs = (items, currentHref) => {
|
|
|
1472
1519
|
var BreadcrumbSidebarTrigger = ({ currentHref }) => {
|
|
1473
1520
|
const docs = useDocsGlobalContext();
|
|
1474
1521
|
const activeSection = getActiveSectionByPathname(docs, currentHref);
|
|
1475
|
-
const breadcrumbItems =
|
|
1522
|
+
const breadcrumbItems = dedupeBreadcrumbs2([
|
|
1476
1523
|
...activeSection ? [{ id: activeSection.id, title: activeSection.navTitle }] : [],
|
|
1477
|
-
...activeSection ?
|
|
1524
|
+
...activeSection ? getSidebarBreadcrumbs2(activeSection.items, currentHref) ?? [] : []
|
|
1478
1525
|
]);
|
|
1479
1526
|
const handleClick = useCallback4(() => {
|
|
1480
1527
|
alert("TODO: Open mobile menu");
|
|
1481
1528
|
}, []);
|
|
1482
|
-
return /* @__PURE__ */
|
|
1483
|
-
/* @__PURE__ */
|
|
1484
|
-
/* @__PURE__ */
|
|
1485
|
-
index > 0 ? /* @__PURE__ */
|
|
1486
|
-
/* @__PURE__ */
|
|
1529
|
+
return /* @__PURE__ */ jsx20("button", { className: "cursor-pointer min-w-0 max-w-full block", type: "button", onClick: handleClick, children: /* @__PURE__ */ jsxs17("span", { className: "flex items-center gap-1 min-w-0 overflow-hidden lg:hidden", children: [
|
|
1530
|
+
/* @__PURE__ */ jsx20(ChevronLast, { className: "size-4 shrink-0 text-primary" }),
|
|
1531
|
+
/* @__PURE__ */ jsx20("span", { className: "flex items-center gap-1", children: breadcrumbItems.map((item, index) => /* @__PURE__ */ jsxs17("span", { className: "contents", children: [
|
|
1532
|
+
index > 0 ? /* @__PURE__ */ jsx20(ChevronsRight2, { className: "size-4 shrink-0 text-base-muted-medium" }) : null,
|
|
1533
|
+
/* @__PURE__ */ jsx20("span", { className: index === 0 ? "font-semibold truncate" : "text-sm truncate", children: renderInlineMarkdown(item.title, { codeClassName: "text-sm!" }) })
|
|
1487
1534
|
] }, item.id)) })
|
|
1488
1535
|
] }) });
|
|
1489
1536
|
};
|
|
1490
1537
|
var BreadcrumbSidebarTrigger_default = BreadcrumbSidebarTrigger;
|
|
1491
1538
|
|
|
1492
1539
|
// src/runtime/client/components/TableOfContentsMobile.tsx
|
|
1493
|
-
import { Fragment as Fragment6, jsx as
|
|
1540
|
+
import { Fragment as Fragment6, jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1494
1541
|
var TableOfContentsMobile = ({
|
|
1495
1542
|
headings = [],
|
|
1496
1543
|
tableOfContents = false,
|
|
@@ -1503,14 +1550,14 @@ var TableOfContentsMobile = ({
|
|
|
1503
1550
|
const selectId = useId();
|
|
1504
1551
|
const labelId = `${selectId}-label`;
|
|
1505
1552
|
const selectedValue = tableOfContents && headings.some((heading) => heading.id === activeHeadingId) ? activeHeadingId : "";
|
|
1506
|
-
return /* @__PURE__ */
|
|
1507
|
-
/* @__PURE__ */
|
|
1508
|
-
/* @__PURE__ */
|
|
1509
|
-
/* @__PURE__ */
|
|
1510
|
-
/* @__PURE__ */
|
|
1511
|
-
/* @__PURE__ */
|
|
1512
|
-
/* @__PURE__ */
|
|
1513
|
-
/* @__PURE__ */
|
|
1553
|
+
return /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
1554
|
+
/* @__PURE__ */ jsx21("div", { className: "h-12 xl:hidden" }),
|
|
1555
|
+
/* @__PURE__ */ jsx21(StyledTOC, { children: /* @__PURE__ */ jsxs18(StyledTOCInner, { children: [
|
|
1556
|
+
/* @__PURE__ */ jsx21("div", { className: "hidden md:block", children: /* @__PURE__ */ jsx21(BreadcrumbSidebarTrigger_default, { currentHref }) }),
|
|
1557
|
+
/* @__PURE__ */ jsxs18("label", { className: "select select-sm md:w-80 w-full", htmlFor: selectId, children: [
|
|
1558
|
+
/* @__PURE__ */ jsx21("span", { id: labelId, className: "sr-only", children: pageTitle }),
|
|
1559
|
+
/* @__PURE__ */ jsx21("span", { className: "label flex", "aria-hidden": "true", children: /* @__PURE__ */ jsx21(TableOfContents2, { className: "size-4" }) }),
|
|
1560
|
+
/* @__PURE__ */ jsxs18(
|
|
1514
1561
|
"select",
|
|
1515
1562
|
{
|
|
1516
1563
|
id: selectId,
|
|
@@ -1528,8 +1575,8 @@ var TableOfContentsMobile = ({
|
|
|
1528
1575
|
window.location.hash = encodeURIComponent(value);
|
|
1529
1576
|
},
|
|
1530
1577
|
children: [
|
|
1531
|
-
/* @__PURE__ */
|
|
1532
|
-
tableOfContents && headings.map((heading) => /* @__PURE__ */
|
|
1578
|
+
/* @__PURE__ */ jsx21("option", { value: topOptionValue, children: pageTitle }),
|
|
1579
|
+
tableOfContents && headings.map((heading) => /* @__PURE__ */ jsx21("option", { value: heading.id, children: heading.title }, heading.id))
|
|
1533
1580
|
]
|
|
1534
1581
|
}
|
|
1535
1582
|
)
|
|
@@ -1699,19 +1746,19 @@ var useTableOfContentsState = ({
|
|
|
1699
1746
|
};
|
|
1700
1747
|
|
|
1701
1748
|
// src/runtime/client/DocsLayout.tsx
|
|
1702
|
-
import { Fragment as Fragment7, jsx as
|
|
1749
|
+
import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1703
1750
|
var DocsLayout = ({ children }) => {
|
|
1704
1751
|
const data = useData();
|
|
1705
1752
|
const { activeHeadingId, effectiveHeadings, setActiveHeadingId } = useTableOfContentsState({
|
|
1706
1753
|
headings: data.headings
|
|
1707
1754
|
});
|
|
1708
|
-
return /* @__PURE__ */
|
|
1709
|
-
/* @__PURE__ */
|
|
1710
|
-
/* @__PURE__ */
|
|
1711
|
-
/* @__PURE__ */
|
|
1712
|
-
/* @__PURE__ */
|
|
1713
|
-
/* @__PURE__ */
|
|
1714
|
-
/* @__PURE__ */
|
|
1755
|
+
return /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
1756
|
+
/* @__PURE__ */ jsx22(HeadingLinkCopy, {}),
|
|
1757
|
+
/* @__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" }),
|
|
1758
|
+
/* @__PURE__ */ jsx22(LayoutComponent, { children: /* @__PURE__ */ jsxs19("div", { className: "lg:flex gap-14", children: [
|
|
1759
|
+
/* @__PURE__ */ jsx22(Sidebar, { currentHref: data.page.href, activeSectionId: data.page.sectionId }),
|
|
1760
|
+
/* @__PURE__ */ jsxs19("main", { className: "min-w-0 flex-1 basis-auto shrink", children: [
|
|
1761
|
+
/* @__PURE__ */ jsx22(
|
|
1715
1762
|
TableOfContentsMobile_default,
|
|
1716
1763
|
{
|
|
1717
1764
|
headings: effectiveHeadings,
|
|
@@ -1722,11 +1769,11 @@ var DocsLayout = ({ children }) => {
|
|
|
1722
1769
|
setActiveHeadingId
|
|
1723
1770
|
}
|
|
1724
1771
|
),
|
|
1725
|
-
/* @__PURE__ */
|
|
1726
|
-
/* @__PURE__ */
|
|
1727
|
-
/* @__PURE__ */
|
|
1772
|
+
/* @__PURE__ */ jsx22("div", { className: "mt-10 min-w-0", children }),
|
|
1773
|
+
/* @__PURE__ */ jsx22(DocsPagination, { previousPage: data.previousPage, nextPage: data.nextPage }),
|
|
1774
|
+
/* @__PURE__ */ jsx22(DocsFooter, {})
|
|
1728
1775
|
] }),
|
|
1729
|
-
/* @__PURE__ */
|
|
1776
|
+
/* @__PURE__ */ jsx22(
|
|
1730
1777
|
TableOfContents,
|
|
1731
1778
|
{
|
|
1732
1779
|
headings: effectiveHeadings,
|
|
@@ -1741,57 +1788,12 @@ var DocsLayout = ({ children }) => {
|
|
|
1741
1788
|
|
|
1742
1789
|
// src/runtime/client/DocsPage.tsx
|
|
1743
1790
|
import { useData as useData2 } from "vike-react/useData";
|
|
1744
|
-
|
|
1745
|
-
// src/runtime/client/components/DocsBreadcrumbs.tsx
|
|
1746
|
-
import { ChevronsRight as ChevronsRight2 } from "lucide-react";
|
|
1747
|
-
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1748
|
-
var dedupeBreadcrumbs2 = (items) => {
|
|
1749
|
-
return items.filter((item, index) => index === 0 || items[index - 1]?.title !== item.title);
|
|
1750
|
-
};
|
|
1751
|
-
var getSidebarBreadcrumbs2 = (items, currentHref) => {
|
|
1752
|
-
for (const item of items) {
|
|
1753
|
-
if (item.kind === "page") {
|
|
1754
|
-
if (item.href === currentHref) {
|
|
1755
|
-
return [{ id: item.id, kind: item.kind, title: item.navTitle }];
|
|
1756
|
-
}
|
|
1757
|
-
continue;
|
|
1758
|
-
}
|
|
1759
|
-
if (item.href === currentHref) {
|
|
1760
|
-
return item.title ? [{ id: item.id, kind: item.kind, title: item.title }] : [];
|
|
1761
|
-
}
|
|
1762
|
-
const nestedBreadcrumbs = getSidebarBreadcrumbs2(item.items, currentHref);
|
|
1763
|
-
if (!nestedBreadcrumbs) {
|
|
1764
|
-
continue;
|
|
1765
|
-
}
|
|
1766
|
-
return dedupeBreadcrumbs2(item.title ? [{ id: item.id, kind: item.kind, title: item.title }] : nestedBreadcrumbs);
|
|
1767
|
-
}
|
|
1768
|
-
return null;
|
|
1769
|
-
};
|
|
1770
|
-
var DocsBreadcrumbs = ({ currentHref }) => {
|
|
1771
|
-
const docs = useDocsGlobalContext();
|
|
1772
|
-
const activeSection = getActiveSectionByPathname(docs, currentHref);
|
|
1773
|
-
const breadcrumbItems = dedupeBreadcrumbs2([
|
|
1774
|
-
...activeSection ? getSidebarBreadcrumbs2(activeSection.items, currentHref) ?? [] : []
|
|
1775
|
-
]);
|
|
1776
|
-
return /* @__PURE__ */ jsx22("span", { className: "hidden lg:flex items-center text-sm gap-1 min-w-0 overflow-hidden mb-3 text-primary", children: breadcrumbItems.map((item, index) => {
|
|
1777
|
-
const Icon = docs.docsIconMap[getDocsIconMapKey(item.kind, item.id)];
|
|
1778
|
-
return /* @__PURE__ */ jsxs19("span", { className: "contents", children: [
|
|
1779
|
-
index > 0 ? /* @__PURE__ */ jsx22(ChevronsRight2, { className: "size-4 shrink-0 text-base-muted-medium" }) : null,
|
|
1780
|
-
/* @__PURE__ */ jsxs19("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
1781
|
-
Icon ? /* @__PURE__ */ jsx22(Icon, { className: "size-3 shrink-0", "aria-hidden": "true" }) : null,
|
|
1782
|
-
/* @__PURE__ */ jsx22("span", { className: "truncate", children: renderInlineMarkdown(item.title, { codeClassName: "text-sm!" }) })
|
|
1783
|
-
] })
|
|
1784
|
-
] }, item.id);
|
|
1785
|
-
}) });
|
|
1786
|
-
};
|
|
1787
|
-
var DocsBreadcrumbs_default = DocsBreadcrumbs;
|
|
1788
|
-
|
|
1789
|
-
// src/runtime/client/DocsPage.tsx
|
|
1790
1791
|
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1791
1792
|
var DocsPage = ({ Content }) => {
|
|
1792
1793
|
const { page } = useData2();
|
|
1793
1794
|
return /* @__PURE__ */ jsxs20(ProseContainer, { "data-doc-content": "", children: [
|
|
1794
|
-
/* @__PURE__ */ jsx23(
|
|
1795
|
+
/* @__PURE__ */ jsx23("div", { className: "mb-2 md:hidden", children: /* @__PURE__ */ jsx23(BreadcrumbSidebarTrigger_default, { currentHref: page.href }) }),
|
|
1796
|
+
/* @__PURE__ */ jsx23("div", { className: "mb-2 hidden md:block", children: /* @__PURE__ */ jsx23(DocsBreadcrumbs_default, { currentHref: page.href }) }),
|
|
1795
1797
|
/* @__PURE__ */ jsx23("h1", { className: "scroll-mt-32 xl:scroll-mt-22", children: renderInlineMarkdown(page.title) }),
|
|
1796
1798
|
/* @__PURE__ */ jsx23(Content, {})
|
|
1797
1799
|
] });
|
|
@@ -1808,4 +1810,4 @@ export {
|
|
|
1808
1810
|
DocsLayout,
|
|
1809
1811
|
DocsPage
|
|
1810
1812
|
};
|
|
1811
|
-
//# sourceMappingURL=chunk-
|
|
1813
|
+
//# sourceMappingURL=chunk-LZDZWW3P.js.map
|