boltdocs 1.6.0 → 1.7.0
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/{SearchDialog-3QICRMWF.css → SearchDialog-UOAW6IR3.css} +270 -113
- package/dist/{SearchDialog-J3KNRGNO.mjs → SearchDialog-YOXMFGH6.mjs} +1 -1
- package/dist/{chunk-HSPDIRTW.mjs → chunk-MULKZFVN.mjs} +872 -758
- package/dist/client/index.css +270 -113
- package/dist/client/index.d.mts +21 -7
- package/dist/client/index.d.ts +21 -7
- package/dist/client/index.js +637 -499
- package/dist/client/index.mjs +17 -1
- package/dist/client/ssr.css +270 -113
- package/dist/client/ssr.d.mts +3 -1
- package/dist/client/ssr.d.ts +3 -1
- package/dist/client/ssr.js +533 -412
- package/dist/client/ssr.mjs +3 -2
- package/dist/{config-DkZg5aCf.d.ts → config-D68h41CA.d.mts} +21 -2
- package/dist/{config-DkZg5aCf.d.mts → config-D68h41CA.d.ts} +21 -2
- package/dist/node/index.d.mts +10 -2
- package/dist/node/index.d.ts +10 -2
- package/dist/node/index.js +45 -21
- package/dist/node/index.mjs +45 -21
- package/dist/{types-DGIo1VKD.d.mts → types-CviV0GbX.d.mts} +13 -0
- package/dist/{types-DGIo1VKD.d.ts → types-CviV0GbX.d.ts} +13 -0
- package/package.json +1 -1
- package/src/client/app/index.tsx +8 -4
- package/src/client/index.ts +2 -0
- package/src/client/ssr.tsx +4 -1
- package/src/client/theme/components/mdx/Table.tsx +53 -0
- package/src/client/theme/components/mdx/index.ts +3 -0
- package/src/client/theme/components/mdx/mdx-components.css +49 -0
- package/src/client/theme/styles/markdown.css +8 -3
- package/src/client/theme/styles/variables.css +10 -9
- package/src/client/theme/ui/Layout/Layout.tsx +2 -10
- package/src/client/theme/ui/Layout/base.css +15 -3
- package/src/client/theme/ui/Link/Link.tsx +2 -2
- package/src/client/theme/ui/Link/LinkPreview.tsx +9 -14
- package/src/client/theme/ui/Link/link-preview.css +30 -27
- package/src/client/theme/ui/Navbar/Navbar.tsx +65 -17
- package/src/client/theme/ui/Navbar/Tabs.tsx +74 -0
- package/src/client/theme/ui/Navbar/navbar.css +111 -5
- package/src/client/theme/ui/OnThisPage/OnThisPage.tsx +65 -49
- package/src/client/theme/ui/OnThisPage/toc.css +30 -10
- package/src/client/theme/ui/Sidebar/Sidebar.tsx +97 -57
- package/src/client/theme/ui/Sidebar/sidebar.css +61 -67
- package/src/client/types.ts +10 -0
- package/src/node/config.ts +19 -1
- package/src/node/plugin/entry.ts +5 -1
- package/src/node/plugin/index.ts +2 -1
- package/src/node/routes/index.ts +12 -1
- package/src/node/routes/parser.ts +21 -7
- package/src/node/routes/types.ts +9 -1
- package/src/node/ssg/index.ts +2 -1
- package/src/node/ssg/options.ts +2 -0
package/dist/client/ssr.js
CHANGED
|
@@ -88,30 +88,25 @@ function LinkPreview({
|
|
|
88
88
|
x,
|
|
89
89
|
y
|
|
90
90
|
}) {
|
|
91
|
-
const [mounted, setMounted] = (0, import_react2.useState)(false);
|
|
92
91
|
const ref = (0, import_react2.useRef)(null);
|
|
93
92
|
const [position, setPosition] = (0, import_react2.useState)({ top: 0, left: 0 });
|
|
94
93
|
(0, import_react2.useEffect)(() => {
|
|
95
|
-
|
|
96
|
-
}, []);
|
|
97
|
-
(0, import_react2.useEffect)(() => {
|
|
98
|
-
if (isVisible && ref.current) {
|
|
94
|
+
if (ref.current) {
|
|
99
95
|
const rect = ref.current.getBoundingClientRect();
|
|
100
|
-
const padding =
|
|
96
|
+
const padding = 12;
|
|
101
97
|
let top = y + padding;
|
|
102
98
|
let left = x + padding;
|
|
103
|
-
if (left + rect.width > window.innerWidth) {
|
|
99
|
+
if (left + rect.width > window.innerWidth - 20) {
|
|
104
100
|
left = x - rect.width - padding;
|
|
105
101
|
}
|
|
106
|
-
if (top + rect.height > window.innerHeight) {
|
|
102
|
+
if (top + rect.height > window.innerHeight - 20) {
|
|
107
103
|
top = y - rect.height - padding;
|
|
108
104
|
}
|
|
109
105
|
setPosition({ top, left });
|
|
110
106
|
}
|
|
111
|
-
}, [
|
|
112
|
-
if (!mounted) return null;
|
|
107
|
+
}, [x, y, isVisible]);
|
|
113
108
|
return (0, import_react_dom.createPortal)(
|
|
114
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
109
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
115
110
|
"div",
|
|
116
111
|
{
|
|
117
112
|
ref,
|
|
@@ -120,10 +115,10 @@ function LinkPreview({
|
|
|
120
115
|
top: position.top,
|
|
121
116
|
left: position.left
|
|
122
117
|
},
|
|
123
|
-
children: [
|
|
118
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "boltdocs-link-preview-content", children: [
|
|
124
119
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "boltdocs-link-preview-title", children: title }),
|
|
125
120
|
summary && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: "boltdocs-link-preview-summary", children: summary })
|
|
126
|
-
]
|
|
121
|
+
] })
|
|
127
122
|
}
|
|
128
123
|
),
|
|
129
124
|
document.body
|
|
@@ -293,7 +288,7 @@ var init_Link = __esm({
|
|
|
293
288
|
...rest
|
|
294
289
|
}
|
|
295
290
|
),
|
|
296
|
-
shouldShowPreview && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
291
|
+
preview.visible && shouldShowPreview && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
297
292
|
LinkPreview,
|
|
298
293
|
{
|
|
299
294
|
isVisible: preview.visible,
|
|
@@ -394,7 +389,7 @@ var init_Link = __esm({
|
|
|
394
389
|
...rest
|
|
395
390
|
}
|
|
396
391
|
),
|
|
397
|
-
shouldShowPreview && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
392
|
+
preview.visible && shouldShowPreview && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
398
393
|
LinkPreview,
|
|
399
394
|
{
|
|
400
395
|
isVisible: preview.visible,
|
|
@@ -841,6 +836,58 @@ var init_GithubStars = __esm({
|
|
|
841
836
|
}
|
|
842
837
|
});
|
|
843
838
|
|
|
839
|
+
// src/client/theme/ui/Navbar/Tabs.tsx
|
|
840
|
+
function Tabs({ tabs, routes }) {
|
|
841
|
+
const location = (0, import_react_router_dom4.useLocation)();
|
|
842
|
+
const currentRoute = routes.find((r) => r.path === location.pathname);
|
|
843
|
+
const currentTabId = currentRoute?.tab?.toLowerCase();
|
|
844
|
+
if (!tabs || tabs.length === 0) return null;
|
|
845
|
+
const renderTabIcon = (iconName) => {
|
|
846
|
+
if (!iconName) return null;
|
|
847
|
+
if (iconName.trim().startsWith("<svg")) {
|
|
848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
849
|
+
"span",
|
|
850
|
+
{
|
|
851
|
+
className: "tab-icon svg-icon",
|
|
852
|
+
dangerouslySetInnerHTML: { __html: iconName }
|
|
853
|
+
}
|
|
854
|
+
);
|
|
855
|
+
}
|
|
856
|
+
const LucideIcon = Icons[iconName];
|
|
857
|
+
if (LucideIcon) {
|
|
858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LucideIcon, { size: 16, className: "tab-icon lucide-icon" });
|
|
859
|
+
}
|
|
860
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("img", { src: iconName, alt: "", className: "tab-icon img-icon" });
|
|
861
|
+
};
|
|
862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "boltdocs-tabs-container", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "boltdocs-tabs", children: tabs.map((tab, index) => {
|
|
863
|
+
const isActive = currentTabId ? currentTabId === tab.id.toLowerCase() : index === 0;
|
|
864
|
+
const firstRoute = routes.find((r) => r.tab && r.tab.toLowerCase() === tab.id.toLowerCase());
|
|
865
|
+
const linkTo = firstRoute ? firstRoute.path : "#";
|
|
866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
867
|
+
Link,
|
|
868
|
+
{
|
|
869
|
+
to: linkTo,
|
|
870
|
+
className: `boltdocs-tab-item ${isActive ? "active" : ""}`,
|
|
871
|
+
children: [
|
|
872
|
+
renderTabIcon(tab.icon),
|
|
873
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: tab.text })
|
|
874
|
+
]
|
|
875
|
+
},
|
|
876
|
+
tab.id
|
|
877
|
+
);
|
|
878
|
+
}) }) });
|
|
879
|
+
}
|
|
880
|
+
var import_react_router_dom4, Icons, import_jsx_runtime11;
|
|
881
|
+
var init_Tabs = __esm({
|
|
882
|
+
"src/client/theme/ui/Navbar/Tabs.tsx"() {
|
|
883
|
+
"use strict";
|
|
884
|
+
import_react_router_dom4 = require("react-router-dom");
|
|
885
|
+
init_Link2();
|
|
886
|
+
Icons = __toESM(require("lucide-react"));
|
|
887
|
+
import_jsx_runtime11 = require("react/jsx-runtime");
|
|
888
|
+
}
|
|
889
|
+
});
|
|
890
|
+
|
|
844
891
|
// src/client/theme/ui/SearchDialog/SearchDialog.tsx
|
|
845
892
|
function SearchDialog({ routes }) {
|
|
846
893
|
const [isOpen, setIsOpen] = (0, import_react8.useState)(false);
|
|
@@ -907,8 +954,8 @@ function SearchDialog({ routes }) {
|
|
|
907
954
|
}
|
|
908
955
|
return uniqueResults.slice(0, 10);
|
|
909
956
|
}, [routes, query]);
|
|
910
|
-
return /* @__PURE__ */ (0,
|
|
911
|
-
/* @__PURE__ */ (0,
|
|
957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
958
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
912
959
|
"div",
|
|
913
960
|
{
|
|
914
961
|
className: "navbar-search",
|
|
@@ -923,19 +970,19 @@ function SearchDialog({ routes }) {
|
|
|
923
970
|
},
|
|
924
971
|
"aria-label": "Open search dialog",
|
|
925
972
|
children: [
|
|
926
|
-
/* @__PURE__ */ (0,
|
|
973
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Search, { className: "boltdocs-search-icon", size: 18 }),
|
|
927
974
|
"Search docs...",
|
|
928
|
-
/* @__PURE__ */ (0,
|
|
975
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("kbd", { children: "\u2318K" })
|
|
929
976
|
]
|
|
930
977
|
}
|
|
931
978
|
),
|
|
932
979
|
isOpen && (0, import_react_dom2.createPortal)(
|
|
933
|
-
/* @__PURE__ */ (0,
|
|
980
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
934
981
|
"div",
|
|
935
982
|
{
|
|
936
983
|
className: "boltdocs-search-overlay",
|
|
937
984
|
onPointerDown: () => setIsOpen(false),
|
|
938
|
-
children: /* @__PURE__ */ (0,
|
|
985
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
939
986
|
"div",
|
|
940
987
|
{
|
|
941
988
|
className: "boltdocs-search-modal",
|
|
@@ -944,9 +991,9 @@ function SearchDialog({ routes }) {
|
|
|
944
991
|
"aria-label": "Search",
|
|
945
992
|
onPointerDown: (e) => e.stopPropagation(),
|
|
946
993
|
children: [
|
|
947
|
-
/* @__PURE__ */ (0,
|
|
948
|
-
/* @__PURE__ */ (0,
|
|
949
|
-
/* @__PURE__ */ (0,
|
|
994
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "boltdocs-search-header", children: [
|
|
995
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Search, { size: 18 }),
|
|
996
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
950
997
|
"input",
|
|
951
998
|
{
|
|
952
999
|
ref: inputRef,
|
|
@@ -957,7 +1004,7 @@ function SearchDialog({ routes }) {
|
|
|
957
1004
|
onChange: (e) => setQuery(e.target.value)
|
|
958
1005
|
}
|
|
959
1006
|
),
|
|
960
|
-
/* @__PURE__ */ (0,
|
|
1007
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
961
1008
|
"button",
|
|
962
1009
|
{
|
|
963
1010
|
className: "boltdocs-search-close",
|
|
@@ -967,7 +1014,7 @@ function SearchDialog({ routes }) {
|
|
|
967
1014
|
}
|
|
968
1015
|
)
|
|
969
1016
|
] }),
|
|
970
|
-
/* @__PURE__ */ (0,
|
|
1017
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "boltdocs-search-results", children: searchResults.length > 0 ? searchResults.map((result) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
971
1018
|
Link,
|
|
972
1019
|
{
|
|
973
1020
|
to: result.path === "" ? "/" : result.path,
|
|
@@ -994,15 +1041,15 @@ function SearchDialog({ routes }) {
|
|
|
994
1041
|
setIsOpen(false);
|
|
995
1042
|
},
|
|
996
1043
|
children: [
|
|
997
|
-
/* @__PURE__ */ (0,
|
|
998
|
-
result.isHeading ? /* @__PURE__ */ (0,
|
|
1044
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "boltdocs-search-result-title", children: [
|
|
1045
|
+
result.isHeading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "heading-indicator", children: "#" }) : null,
|
|
999
1046
|
result.title
|
|
1000
1047
|
] }),
|
|
1001
|
-
result.groupTitle && /* @__PURE__ */ (0,
|
|
1048
|
+
result.groupTitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "boltdocs-search-result-group", children: result.groupTitle })
|
|
1002
1049
|
]
|
|
1003
1050
|
},
|
|
1004
1051
|
result.path
|
|
1005
|
-
)) : /* @__PURE__ */ (0,
|
|
1052
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "boltdocs-search-empty", children: [
|
|
1006
1053
|
'No results found for "',
|
|
1007
1054
|
query,
|
|
1008
1055
|
'"'
|
|
@@ -1016,7 +1063,7 @@ function SearchDialog({ routes }) {
|
|
|
1016
1063
|
)
|
|
1017
1064
|
] });
|
|
1018
1065
|
}
|
|
1019
|
-
var import_react8, import_react_dom2, import_lucide_react4,
|
|
1066
|
+
var import_react8, import_react_dom2, import_lucide_react4, import_jsx_runtime12;
|
|
1020
1067
|
var init_SearchDialog = __esm({
|
|
1021
1068
|
"src/client/theme/ui/SearchDialog/SearchDialog.tsx"() {
|
|
1022
1069
|
"use strict";
|
|
@@ -1024,7 +1071,7 @@ var init_SearchDialog = __esm({
|
|
|
1024
1071
|
import_react_dom2 = require("react-dom");
|
|
1025
1072
|
init_Link2();
|
|
1026
1073
|
import_lucide_react4 = require("lucide-react");
|
|
1027
|
-
|
|
1074
|
+
import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1028
1075
|
}
|
|
1029
1076
|
});
|
|
1030
1077
|
|
|
@@ -1048,88 +1095,130 @@ function Navbar({
|
|
|
1048
1095
|
currentLocale,
|
|
1049
1096
|
currentVersion
|
|
1050
1097
|
}) {
|
|
1098
|
+
const location = (0, import_react_router_dom5.useLocation)();
|
|
1099
|
+
const isHomePage = location.pathname === "/";
|
|
1051
1100
|
const title = config.themeConfig?.title || "Boltdocs";
|
|
1052
1101
|
const navItems = config.themeConfig?.navbar || [];
|
|
1053
1102
|
const socialLinks = config.themeConfig?.socialLinks || [];
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1066
|
-
"img",
|
|
1067
|
-
{
|
|
1068
|
-
src: config.themeConfig.logo,
|
|
1069
|
-
alt: title,
|
|
1070
|
-
className: "navbar-logo-img"
|
|
1071
|
-
}
|
|
1072
|
-
) : null,
|
|
1073
|
-
title
|
|
1074
|
-
] }) }),
|
|
1075
|
-
config.versions && currentVersion && allRoutes ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1076
|
-
VersionSwitcher,
|
|
1103
|
+
const hasTabs = !isHomePage && config.themeConfig?.tabs && config.themeConfig.tabs.length > 0;
|
|
1104
|
+
const leftItems = navItems.filter((item) => item.position !== "right");
|
|
1105
|
+
const rightItems = navItems.filter((item) => item.position === "right");
|
|
1106
|
+
const renderNavItem = (item, i) => {
|
|
1107
|
+
const text = item.label || item.text || "";
|
|
1108
|
+
const href = item.to || item.href || item.link || "";
|
|
1109
|
+
const isExternal = href.startsWith("http") || href.startsWith("//") || href.includes("://");
|
|
1110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_router_dom5.Link, { to: href, target: isExternal ? "_blank" : void 0, children: [
|
|
1111
|
+
text,
|
|
1112
|
+
isExternal && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "navbar-external-icon", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1113
|
+
"svg",
|
|
1077
1114
|
{
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1092
|
-
import_react9.default.Suspense,
|
|
1093
|
-
{
|
|
1094
|
-
fallback: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "navbar-search-placeholder" }),
|
|
1095
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SearchDialog2, { routes: routes || [] })
|
|
1096
|
-
}
|
|
1097
|
-
),
|
|
1098
|
-
config.i18n && currentLocale && allRoutes && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1099
|
-
LanguageSwitcher,
|
|
1100
|
-
{
|
|
1101
|
-
i18n: config.i18n,
|
|
1102
|
-
currentLocale,
|
|
1103
|
-
allRoutes
|
|
1115
|
+
viewBox: "0 0 24 24",
|
|
1116
|
+
width: "13",
|
|
1117
|
+
height: "13",
|
|
1118
|
+
stroke: "currentColor",
|
|
1119
|
+
strokeWidth: "2",
|
|
1120
|
+
fill: "none",
|
|
1121
|
+
strokeLinecap: "round",
|
|
1122
|
+
strokeLinejoin: "round",
|
|
1123
|
+
children: [
|
|
1124
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
1125
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("polyline", { points: "15 3 21 3 21 9" }),
|
|
1126
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
|
|
1127
|
+
]
|
|
1104
1128
|
}
|
|
1105
|
-
)
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1129
|
+
) })
|
|
1130
|
+
] }, i);
|
|
1131
|
+
};
|
|
1132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("header", { className: `boltdocs-navbar ${hasTabs ? "has-tabs" : ""}`, children: [
|
|
1133
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1134
|
+
"div",
|
|
1135
|
+
{
|
|
1136
|
+
className: "navbar-container",
|
|
1137
|
+
style: { height: "var(--ld-navbar-height)" },
|
|
1138
|
+
children: [
|
|
1139
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "navbar-left", children: [
|
|
1140
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-logo", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_router_dom5.Link, { to: "/", children: [
|
|
1141
|
+
config.themeConfig?.logo ? config.themeConfig.logo.trim().startsWith("<svg") ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1142
|
+
"span",
|
|
1143
|
+
{
|
|
1144
|
+
className: "navbar-logo-svg",
|
|
1145
|
+
dangerouslySetInnerHTML: {
|
|
1146
|
+
__html: config.themeConfig.logo
|
|
1147
|
+
}
|
|
1148
|
+
}
|
|
1149
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1150
|
+
"img",
|
|
1151
|
+
{
|
|
1152
|
+
src: config.themeConfig.logo,
|
|
1153
|
+
alt: title,
|
|
1154
|
+
className: "navbar-logo-img"
|
|
1155
|
+
}
|
|
1156
|
+
) : null,
|
|
1157
|
+
title
|
|
1158
|
+
] }) }),
|
|
1159
|
+
config.versions && currentVersion && allRoutes ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1160
|
+
VersionSwitcher,
|
|
1161
|
+
{
|
|
1162
|
+
versions: config.versions,
|
|
1163
|
+
currentVersion,
|
|
1164
|
+
currentLocale,
|
|
1165
|
+
allRoutes
|
|
1166
|
+
}
|
|
1167
|
+
) : config.themeConfig?.version ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "navbar-version", children: [
|
|
1168
|
+
config.themeConfig.version,
|
|
1169
|
+
" ",
|
|
1170
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react5.ChevronDown, { size: 14 })
|
|
1171
|
+
] }) : null,
|
|
1172
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { className: "navbar-links", "aria-label": "Top Navigation Left", children: leftItems.map(renderNavItem) })
|
|
1173
|
+
] }),
|
|
1174
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "navbar-right", children: [
|
|
1175
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { className: "navbar-links", "aria-label": "Top Navigation Right", children: rightItems.map(renderNavItem) }),
|
|
1176
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react9.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-search-placeholder" }), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SearchDialog2, { routes: routes || [] }) }),
|
|
1177
|
+
config.i18n && currentLocale && allRoutes && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1178
|
+
LanguageSwitcher,
|
|
1179
|
+
{
|
|
1180
|
+
i18n: config.i18n,
|
|
1181
|
+
currentLocale,
|
|
1182
|
+
allRoutes
|
|
1183
|
+
}
|
|
1184
|
+
),
|
|
1185
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ThemeToggle, {}),
|
|
1186
|
+
config.themeConfig?.githubRepo && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(GithubStars, { repo: config.themeConfig.githubRepo }),
|
|
1187
|
+
socialLinks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-divider" }),
|
|
1188
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-icons", children: socialLinks.map((link, i) => {
|
|
1189
|
+
const IconComp = ICON_MAP[link.icon.toLowerCase()];
|
|
1190
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1191
|
+
"a",
|
|
1192
|
+
{
|
|
1193
|
+
href: link.link,
|
|
1194
|
+
target: "_blank",
|
|
1195
|
+
rel: "noopener noreferrer",
|
|
1196
|
+
className: "navbar-icon-btn",
|
|
1197
|
+
"aria-label": link.icon,
|
|
1198
|
+
children: IconComp ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconComp, {}) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: link.icon })
|
|
1199
|
+
},
|
|
1200
|
+
i
|
|
1201
|
+
);
|
|
1202
|
+
}) })
|
|
1203
|
+
] })
|
|
1204
|
+
]
|
|
1205
|
+
}
|
|
1206
|
+
),
|
|
1207
|
+
hasTabs && config.themeConfig?.tabs && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1208
|
+
Tabs,
|
|
1209
|
+
{
|
|
1210
|
+
tabs: config.themeConfig.tabs,
|
|
1211
|
+
routes: allRoutes || routes || []
|
|
1212
|
+
}
|
|
1213
|
+
)
|
|
1214
|
+
] });
|
|
1126
1215
|
}
|
|
1127
|
-
var import_react9, import_lucide_react5,
|
|
1216
|
+
var import_react9, import_react_router_dom5, import_lucide_react5, import_jsx_runtime13, SearchDialog2, ICON_MAP;
|
|
1128
1217
|
var init_Navbar = __esm({
|
|
1129
1218
|
"src/client/theme/ui/Navbar/Navbar.tsx"() {
|
|
1130
1219
|
"use strict";
|
|
1131
|
-
import_react9 =
|
|
1132
|
-
|
|
1220
|
+
import_react9 = require("react");
|
|
1221
|
+
import_react_router_dom5 = require("react-router-dom");
|
|
1133
1222
|
import_lucide_react5 = require("lucide-react");
|
|
1134
1223
|
init_LanguageSwitcher2();
|
|
1135
1224
|
init_VersionSwitcher2();
|
|
@@ -1137,8 +1226,9 @@ var init_Navbar = __esm({
|
|
|
1137
1226
|
init_discord();
|
|
1138
1227
|
init_twitter();
|
|
1139
1228
|
init_GithubStars();
|
|
1140
|
-
|
|
1141
|
-
|
|
1229
|
+
init_Tabs();
|
|
1230
|
+
import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1231
|
+
SearchDialog2 = (0, import_react9.lazy)(
|
|
1142
1232
|
() => Promise.resolve().then(() => (init_SearchDialog2(), SearchDialog_exports)).then((m) => ({ default: m.SearchDialog }))
|
|
1143
1233
|
);
|
|
1144
1234
|
ICON_MAP = {
|
|
@@ -1159,7 +1249,7 @@ var init_Navbar2 = __esm({
|
|
|
1159
1249
|
|
|
1160
1250
|
// src/client/theme/ui/PoweredBy/PoweredBy.tsx
|
|
1161
1251
|
function PoweredBy() {
|
|
1162
|
-
return /* @__PURE__ */ (0,
|
|
1252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "powered-by-container", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1163
1253
|
"a",
|
|
1164
1254
|
{
|
|
1165
1255
|
href: "https://github.com/jesusalcaladev/boltdocs",
|
|
@@ -1167,19 +1257,19 @@ function PoweredBy() {
|
|
|
1167
1257
|
rel: "noopener noreferrer",
|
|
1168
1258
|
className: "powered-by-link",
|
|
1169
1259
|
children: [
|
|
1170
|
-
/* @__PURE__ */ (0,
|
|
1171
|
-
/* @__PURE__ */ (0,
|
|
1172
|
-
/* @__PURE__ */ (0,
|
|
1260
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react6.Zap, { className: "powered-by-icon", size: 12, fill: "currentColor" }),
|
|
1261
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Powered by" }),
|
|
1262
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "powered-by-brand", children: "LiteDocs" })
|
|
1173
1263
|
]
|
|
1174
1264
|
}
|
|
1175
1265
|
) });
|
|
1176
1266
|
}
|
|
1177
|
-
var import_lucide_react6,
|
|
1267
|
+
var import_lucide_react6, import_jsx_runtime14;
|
|
1178
1268
|
var init_PoweredBy = __esm({
|
|
1179
1269
|
"src/client/theme/ui/PoweredBy/PoweredBy.tsx"() {
|
|
1180
1270
|
"use strict";
|
|
1181
1271
|
import_lucide_react6 = require("lucide-react");
|
|
1182
|
-
|
|
1272
|
+
import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1183
1273
|
}
|
|
1184
1274
|
});
|
|
1185
1275
|
|
|
@@ -1212,7 +1302,6 @@ function renderBadge(badgeRaw) {
|
|
|
1212
1302
|
}
|
|
1213
1303
|
}
|
|
1214
1304
|
if (!text) return null;
|
|
1215
|
-
if (!text) return null;
|
|
1216
1305
|
let typeClass = "badge-default";
|
|
1217
1306
|
const lowerText = text.toLowerCase();
|
|
1218
1307
|
if (lowerText === "new") {
|
|
@@ -1222,18 +1311,51 @@ function renderBadge(badgeRaw) {
|
|
|
1222
1311
|
} else if (lowerText === "updated") {
|
|
1223
1312
|
typeClass = "badge-updated";
|
|
1224
1313
|
}
|
|
1225
|
-
return /* @__PURE__ */ (0,
|
|
1314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: `sidebar-badge ${typeClass}`, children: text });
|
|
1315
|
+
}
|
|
1316
|
+
function renderIcon(iconName, size = 16) {
|
|
1317
|
+
if (!iconName) return null;
|
|
1318
|
+
const trimmed = iconName.trim();
|
|
1319
|
+
if (trimmed.startsWith("<svg") || trimmed.includes("http")) {
|
|
1320
|
+
if (trimmed.startsWith("<svg")) {
|
|
1321
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1322
|
+
"span",
|
|
1323
|
+
{
|
|
1324
|
+
className: "sidebar-icon svg-icon",
|
|
1325
|
+
dangerouslySetInnerHTML: { __html: trimmed }
|
|
1326
|
+
}
|
|
1327
|
+
);
|
|
1328
|
+
}
|
|
1329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1330
|
+
"img",
|
|
1331
|
+
{
|
|
1332
|
+
src: trimmed,
|
|
1333
|
+
className: "sidebar-icon",
|
|
1334
|
+
style: { width: size, height: size },
|
|
1335
|
+
alt: ""
|
|
1336
|
+
}
|
|
1337
|
+
);
|
|
1338
|
+
}
|
|
1339
|
+
const IconComponent = LucideIcons[iconName];
|
|
1340
|
+
if (IconComponent) {
|
|
1341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconComponent, { size, className: "sidebar-icon lucide-icon" });
|
|
1342
|
+
}
|
|
1343
|
+
return null;
|
|
1226
1344
|
}
|
|
1227
1345
|
function Sidebar({
|
|
1228
1346
|
routes,
|
|
1229
|
-
config
|
|
1230
|
-
isCollapsed,
|
|
1231
|
-
onToggle
|
|
1347
|
+
config
|
|
1232
1348
|
}) {
|
|
1233
|
-
const location = (0,
|
|
1349
|
+
const location = (0, import_react_router_dom6.useLocation)();
|
|
1350
|
+
const currentRoute = routes.find((r) => r.path === location.pathname);
|
|
1351
|
+
const activeTabId = currentRoute?.tab?.toLowerCase();
|
|
1352
|
+
const filteredRoutes = activeTabId ? routes.filter((r) => {
|
|
1353
|
+
if (!r.tab) return true;
|
|
1354
|
+
return r.tab.toLowerCase() === activeTabId;
|
|
1355
|
+
}) : routes;
|
|
1234
1356
|
const ungrouped = [];
|
|
1235
1357
|
const groupMap = /* @__PURE__ */ new Map();
|
|
1236
|
-
for (const route of
|
|
1358
|
+
for (const route of filteredRoutes) {
|
|
1237
1359
|
if (!route.group) {
|
|
1238
1360
|
ungrouped.push(route);
|
|
1239
1361
|
} else {
|
|
@@ -1241,49 +1363,41 @@ function Sidebar({
|
|
|
1241
1363
|
groupMap.set(route.group, {
|
|
1242
1364
|
slug: route.group,
|
|
1243
1365
|
title: route.groupTitle || route.group,
|
|
1244
|
-
routes: []
|
|
1366
|
+
routes: [],
|
|
1367
|
+
icon: route.groupIcon
|
|
1245
1368
|
});
|
|
1246
1369
|
}
|
|
1247
1370
|
groupMap.get(route.group).routes.push(route);
|
|
1248
1371
|
}
|
|
1249
1372
|
}
|
|
1250
1373
|
const groups = Array.from(groupMap.values());
|
|
1251
|
-
return /* @__PURE__ */ (0,
|
|
1252
|
-
|
|
1253
|
-
"
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
{
|
|
1279
|
-
group,
|
|
1280
|
-
currentPath: location.pathname
|
|
1281
|
-
},
|
|
1282
|
-
group.slug
|
|
1283
|
-
))
|
|
1284
|
-
] }),
|
|
1285
|
-
config.themeConfig?.poweredBy !== false && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PoweredBy, {})
|
|
1286
|
-
] })
|
|
1374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("aside", { className: "boltdocs-sidebar", children: [
|
|
1375
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("nav", { "aria-label": "Main Navigation", children: [
|
|
1376
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "sidebar-list", children: ungrouped.map((route) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1377
|
+
Link,
|
|
1378
|
+
{
|
|
1379
|
+
to: route.path === "" ? "/" : route.path,
|
|
1380
|
+
className: `sidebar-link ${location.pathname === route.path ? "active" : ""}`,
|
|
1381
|
+
"aria-current": location.pathname === route.path ? "page" : void 0,
|
|
1382
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-content", children: [
|
|
1383
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-title-container", children: [
|
|
1384
|
+
renderIcon(route.icon),
|
|
1385
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: route.title })
|
|
1386
|
+
] }),
|
|
1387
|
+
renderBadge(route.badge)
|
|
1388
|
+
] })
|
|
1389
|
+
}
|
|
1390
|
+
) }, route.path)) }),
|
|
1391
|
+
groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1392
|
+
SidebarGroupSection,
|
|
1393
|
+
{
|
|
1394
|
+
group,
|
|
1395
|
+
currentPath: location.pathname
|
|
1396
|
+
},
|
|
1397
|
+
group.slug
|
|
1398
|
+
))
|
|
1399
|
+
] }),
|
|
1400
|
+
config.themeConfig?.poweredBy !== false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PoweredBy, {})
|
|
1287
1401
|
] });
|
|
1288
1402
|
}
|
|
1289
1403
|
function SidebarGroupSection({
|
|
@@ -1292,8 +1406,8 @@ function SidebarGroupSection({
|
|
|
1292
1406
|
}) {
|
|
1293
1407
|
const isActive = group.routes.some((r) => currentPath === r.path);
|
|
1294
1408
|
const [open, setOpen] = (0, import_react10.useState)(true);
|
|
1295
|
-
return /* @__PURE__ */ (0,
|
|
1296
|
-
/* @__PURE__ */ (0,
|
|
1409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-group", children: [
|
|
1410
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1297
1411
|
"button",
|
|
1298
1412
|
{
|
|
1299
1413
|
className: `sidebar-group-header ${isActive ? "active" : ""}`,
|
|
@@ -1301,35 +1415,39 @@ function SidebarGroupSection({
|
|
|
1301
1415
|
"aria-expanded": open,
|
|
1302
1416
|
"aria-controls": `sidebar-group-${group.slug}`,
|
|
1303
1417
|
children: [
|
|
1304
|
-
/* @__PURE__ */ (0,
|
|
1305
|
-
/* @__PURE__ */ (0,
|
|
1418
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "sidebar-group-header-content", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "sidebar-group-title", children: group.title }) }),
|
|
1419
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: `sidebar-group-chevron ${open ? "open" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react7.ChevronRight, { size: 16 }) })
|
|
1306
1420
|
]
|
|
1307
1421
|
}
|
|
1308
1422
|
),
|
|
1309
|
-
open && /* @__PURE__ */ (0,
|
|
1423
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("ul", { className: "sidebar-group-list", id: `sidebar-group-${group.slug}`, children: group.routes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1310
1424
|
Link,
|
|
1311
1425
|
{
|
|
1312
1426
|
to: route.path === "" ? "/" : route.path,
|
|
1313
1427
|
className: `sidebar-link sidebar-link-nested ${currentPath === route.path ? "active" : ""}`,
|
|
1314
1428
|
"aria-current": currentPath === route.path ? "page" : void 0,
|
|
1315
|
-
children: /* @__PURE__ */ (0,
|
|
1316
|
-
/* @__PURE__ */ (0,
|
|
1429
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-content", children: [
|
|
1430
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-title-container", children: [
|
|
1431
|
+
renderIcon(route.icon),
|
|
1432
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: route.title })
|
|
1433
|
+
] }),
|
|
1317
1434
|
renderBadge(route.badge)
|
|
1318
1435
|
] })
|
|
1319
1436
|
}
|
|
1320
1437
|
) }, route.path)) })
|
|
1321
1438
|
] });
|
|
1322
1439
|
}
|
|
1323
|
-
var import_react10,
|
|
1440
|
+
var import_react10, import_react_router_dom6, import_lucide_react7, LucideIcons, import_jsx_runtime15;
|
|
1324
1441
|
var init_Sidebar = __esm({
|
|
1325
1442
|
"src/client/theme/ui/Sidebar/Sidebar.tsx"() {
|
|
1326
1443
|
"use strict";
|
|
1327
1444
|
import_react10 = require("react");
|
|
1328
|
-
|
|
1445
|
+
import_react_router_dom6 = require("react-router-dom");
|
|
1329
1446
|
init_Link2();
|
|
1330
1447
|
init_PoweredBy2();
|
|
1331
1448
|
import_lucide_react7 = require("lucide-react");
|
|
1332
|
-
|
|
1449
|
+
LucideIcons = __toESM(require("lucide-react"));
|
|
1450
|
+
import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1333
1451
|
}
|
|
1334
1452
|
});
|
|
1335
1453
|
|
|
@@ -1348,11 +1466,12 @@ function OnThisPage({
|
|
|
1348
1466
|
communityHelp,
|
|
1349
1467
|
filePath
|
|
1350
1468
|
}) {
|
|
1351
|
-
const [activeId, setActiveId] = (0, import_react11.useState)(
|
|
1469
|
+
const [activeId, setActiveId] = (0, import_react11.useState)(null);
|
|
1352
1470
|
const [indicatorStyle, setIndicatorStyle] = (0, import_react11.useState)({});
|
|
1353
1471
|
const observerRef = (0, import_react11.useRef)(null);
|
|
1354
|
-
const location = (0,
|
|
1472
|
+
const location = (0, import_react_router_dom7.useLocation)();
|
|
1355
1473
|
const listRef = (0, import_react11.useRef)(null);
|
|
1474
|
+
const visibleIdsRef = (0, import_react11.useRef)(/* @__PURE__ */ new Set());
|
|
1356
1475
|
(0, import_react11.useEffect)(() => {
|
|
1357
1476
|
if (headings.length > 0) {
|
|
1358
1477
|
const hash = window.location.hash.substring(1);
|
|
@@ -1365,36 +1484,53 @@ function OnThisPage({
|
|
|
1365
1484
|
}, [location.pathname, headings]);
|
|
1366
1485
|
(0, import_react11.useEffect)(() => {
|
|
1367
1486
|
if (!activeId || !listRef.current) return;
|
|
1368
|
-
const
|
|
1487
|
+
const activeLink = listRef.current.querySelector(
|
|
1369
1488
|
`a[href="#${activeId}"]`
|
|
1370
1489
|
);
|
|
1371
|
-
if (
|
|
1372
|
-
const
|
|
1490
|
+
if (activeLink) {
|
|
1491
|
+
const top = activeLink.offsetTop;
|
|
1492
|
+
const height = activeLink.offsetHeight;
|
|
1373
1493
|
setIndicatorStyle({
|
|
1374
|
-
transform: `translateY(${
|
|
1375
|
-
height: `${
|
|
1494
|
+
transform: `translateY(${top}px)`,
|
|
1495
|
+
height: `${height}px`,
|
|
1376
1496
|
opacity: 1
|
|
1377
1497
|
});
|
|
1378
1498
|
}
|
|
1379
1499
|
}, [activeId, headings]);
|
|
1380
1500
|
(0, import_react11.useEffect)(() => {
|
|
1381
1501
|
if (headings.length === 0) return;
|
|
1502
|
+
visibleIdsRef.current.clear();
|
|
1382
1503
|
if (observerRef.current) {
|
|
1383
1504
|
observerRef.current.disconnect();
|
|
1384
1505
|
}
|
|
1385
1506
|
const callback = (entries) => {
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1507
|
+
entries.forEach((entry) => {
|
|
1508
|
+
if (entry.isIntersecting) {
|
|
1509
|
+
visibleIdsRef.current.add(entry.target.id);
|
|
1510
|
+
} else {
|
|
1511
|
+
visibleIdsRef.current.delete(entry.target.id);
|
|
1512
|
+
}
|
|
1513
|
+
});
|
|
1514
|
+
const firstVisible = headings.find((h) => visibleIdsRef.current.has(h.id));
|
|
1515
|
+
if (firstVisible) {
|
|
1516
|
+
setActiveId(firstVisible.id);
|
|
1517
|
+
} else {
|
|
1518
|
+
const firstEl = document.getElementById(headings[0].id);
|
|
1519
|
+
if (firstEl) {
|
|
1520
|
+
const rect = firstEl.getBoundingClientRect();
|
|
1521
|
+
if (rect.top > 200) {
|
|
1522
|
+
setActiveId(headings[0].id);
|
|
1523
|
+
return;
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1392
1526
|
}
|
|
1393
1527
|
};
|
|
1394
|
-
|
|
1395
|
-
|
|
1528
|
+
const observerOptions = {
|
|
1529
|
+
root: document.querySelector(".boltdocs-content"),
|
|
1530
|
+
rootMargin: "-20% 0px -70% 0px",
|
|
1396
1531
|
threshold: [0, 1]
|
|
1397
|
-
}
|
|
1532
|
+
};
|
|
1533
|
+
observerRef.current = new IntersectionObserver(callback, observerOptions);
|
|
1398
1534
|
const observeHeadings = () => {
|
|
1399
1535
|
headings.forEach(({ id }) => {
|
|
1400
1536
|
const el = document.getElementById(id);
|
|
@@ -1425,16 +1561,14 @@ function OnThisPage({
|
|
|
1425
1561
|
`a[href="#${activeId}"]`
|
|
1426
1562
|
);
|
|
1427
1563
|
if (activeLink) {
|
|
1428
|
-
const container = listRef.current.
|
|
1429
|
-
".boltdocs-on-this-page"
|
|
1430
|
-
);
|
|
1564
|
+
const container = listRef.current.parentElement;
|
|
1431
1565
|
if (!container) return;
|
|
1432
1566
|
const linkRect = activeLink.getBoundingClientRect();
|
|
1433
1567
|
const containerRect = container.getBoundingClientRect();
|
|
1434
1568
|
const isVisible = linkRect.top >= containerRect.top && linkRect.bottom <= containerRect.bottom;
|
|
1435
1569
|
if (!isVisible) {
|
|
1436
1570
|
activeLink.scrollIntoView({
|
|
1437
|
-
behavior: "
|
|
1571
|
+
behavior: "auto",
|
|
1438
1572
|
block: "nearest"
|
|
1439
1573
|
});
|
|
1440
1574
|
}
|
|
@@ -1461,11 +1595,11 @@ function OnThisPage({
|
|
|
1461
1595
|
[]
|
|
1462
1596
|
);
|
|
1463
1597
|
if (headings.length === 0) return null;
|
|
1464
|
-
return /* @__PURE__ */ (0,
|
|
1465
|
-
/* @__PURE__ */ (0,
|
|
1466
|
-
/* @__PURE__ */ (0,
|
|
1467
|
-
/* @__PURE__ */ (0,
|
|
1468
|
-
/* @__PURE__ */ (0,
|
|
1598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("nav", { className: "boltdocs-on-this-page", "aria-label": "Table of contents", children: [
|
|
1599
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "on-this-page-title", children: "On this page" }),
|
|
1600
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "on-this-page-container", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "on-this-page-list-container", children: [
|
|
1601
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "toc-indicator", style: indicatorStyle }),
|
|
1602
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("ul", { className: "on-this-page-list", ref: listRef, children: headings.map((h) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { className: h.level === 3 ? "toc-indent" : "", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1469
1603
|
"a",
|
|
1470
1604
|
{
|
|
1471
1605
|
href: `#${h.id}`,
|
|
@@ -1475,11 +1609,11 @@ function OnThisPage({
|
|
|
1475
1609
|
children: h.text
|
|
1476
1610
|
}
|
|
1477
1611
|
) }, h.id)) })
|
|
1478
|
-
] }),
|
|
1479
|
-
(editLink || communityHelp) && /* @__PURE__ */ (0,
|
|
1480
|
-
/* @__PURE__ */ (0,
|
|
1481
|
-
/* @__PURE__ */ (0,
|
|
1482
|
-
editLink && filePath && /* @__PURE__ */ (0,
|
|
1612
|
+
] }) }),
|
|
1613
|
+
(editLink || communityHelp) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "toc-help", children: [
|
|
1614
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "toc-help-title", children: "Need help?" }),
|
|
1615
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("ul", { className: "toc-help-links", children: [
|
|
1616
|
+
editLink && filePath && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1483
1617
|
"a",
|
|
1484
1618
|
{
|
|
1485
1619
|
href: editLink.replace(":path", filePath),
|
|
@@ -1487,12 +1621,12 @@ function OnThisPage({
|
|
|
1487
1621
|
rel: "noopener noreferrer",
|
|
1488
1622
|
className: "toc-help-link",
|
|
1489
1623
|
children: [
|
|
1490
|
-
/* @__PURE__ */ (0,
|
|
1624
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react8.Pencil, { size: 16 }),
|
|
1491
1625
|
"Edit this page"
|
|
1492
1626
|
]
|
|
1493
1627
|
}
|
|
1494
1628
|
) }),
|
|
1495
|
-
communityHelp && /* @__PURE__ */ (0,
|
|
1629
|
+
communityHelp && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1496
1630
|
"a",
|
|
1497
1631
|
{
|
|
1498
1632
|
href: communityHelp,
|
|
@@ -1500,7 +1634,7 @@ function OnThisPage({
|
|
|
1500
1634
|
rel: "noopener noreferrer",
|
|
1501
1635
|
className: "toc-help-link",
|
|
1502
1636
|
children: [
|
|
1503
|
-
/* @__PURE__ */ (0,
|
|
1637
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react8.CircleHelp, { size: 16 }),
|
|
1504
1638
|
"Community help"
|
|
1505
1639
|
]
|
|
1506
1640
|
}
|
|
@@ -1509,14 +1643,14 @@ function OnThisPage({
|
|
|
1509
1643
|
] })
|
|
1510
1644
|
] });
|
|
1511
1645
|
}
|
|
1512
|
-
var import_react11,
|
|
1646
|
+
var import_react11, import_react_router_dom7, import_lucide_react8, import_jsx_runtime16;
|
|
1513
1647
|
var init_OnThisPage = __esm({
|
|
1514
1648
|
"src/client/theme/ui/OnThisPage/OnThisPage.tsx"() {
|
|
1515
1649
|
"use strict";
|
|
1516
1650
|
import_react11 = require("react");
|
|
1517
|
-
|
|
1651
|
+
import_react_router_dom7 = require("react-router-dom");
|
|
1518
1652
|
import_lucide_react8 = require("lucide-react");
|
|
1519
|
-
|
|
1653
|
+
import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1520
1654
|
}
|
|
1521
1655
|
});
|
|
1522
1656
|
|
|
@@ -1530,7 +1664,7 @@ var init_OnThisPage2 = __esm({
|
|
|
1530
1664
|
|
|
1531
1665
|
// src/client/theme/ui/Head/Head.tsx
|
|
1532
1666
|
function Head({ siteTitle, siteDescription, routes }) {
|
|
1533
|
-
const location = (0,
|
|
1667
|
+
const location = (0, import_react_router_dom8.useLocation)();
|
|
1534
1668
|
(0, import_react12.useEffect)(() => {
|
|
1535
1669
|
const currentRoute = routes.find((r) => r.path === location.pathname);
|
|
1536
1670
|
const pageTitle = currentRoute?.title;
|
|
@@ -1575,12 +1709,12 @@ function setMetaTag(attr, key, content) {
|
|
|
1575
1709
|
}
|
|
1576
1710
|
tag.content = content;
|
|
1577
1711
|
}
|
|
1578
|
-
var import_react12,
|
|
1712
|
+
var import_react12, import_react_router_dom8;
|
|
1579
1713
|
var init_Head = __esm({
|
|
1580
1714
|
"src/client/theme/ui/Head/Head.tsx"() {
|
|
1581
1715
|
"use strict";
|
|
1582
1716
|
import_react12 = require("react");
|
|
1583
|
-
|
|
1717
|
+
import_react_router_dom8 = require("react-router-dom");
|
|
1584
1718
|
}
|
|
1585
1719
|
});
|
|
1586
1720
|
|
|
@@ -1594,21 +1728,21 @@ var init_Head2 = __esm({
|
|
|
1594
1728
|
|
|
1595
1729
|
// src/client/theme/ui/Breadcrumbs/Breadcrumbs.tsx
|
|
1596
1730
|
function Breadcrumbs({ routes, config }) {
|
|
1597
|
-
const location = (0,
|
|
1731
|
+
const location = (0, import_react_router_dom9.useLocation)();
|
|
1598
1732
|
if (config.themeConfig?.breadcrumbs === false) return null;
|
|
1599
1733
|
if (location.pathname === "/") return null;
|
|
1600
1734
|
const currentRoute = routes.find((r) => r.path === location.pathname);
|
|
1601
1735
|
const groupRoute = currentRoute?.group ? routes.find((r) => r.group === currentRoute.group) : null;
|
|
1602
|
-
return /* @__PURE__ */ (0,
|
|
1603
|
-
/* @__PURE__ */ (0,
|
|
1604
|
-
/* @__PURE__ */ (0,
|
|
1605
|
-
/* @__PURE__ */ (0,
|
|
1736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("nav", { className: "boltdocs-breadcrumbs", "aria-label": "Breadcrumb", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("ol", { className: "boltdocs-breadcrumbs-list", children: [
|
|
1737
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: "boltdocs-breadcrumbs-item", children: [
|
|
1738
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Link, { to: "/", className: "boltdocs-breadcrumbs-link", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react9.Home, { size: 14 }) }),
|
|
1739
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "boltdocs-breadcrumbs-separator", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react9.ChevronRight, { size: 14 }) })
|
|
1606
1740
|
] }),
|
|
1607
|
-
currentRoute?.groupTitle && /* @__PURE__ */ (0,
|
|
1608
|
-
groupRoute ? /* @__PURE__ */ (0,
|
|
1609
|
-
/* @__PURE__ */ (0,
|
|
1741
|
+
currentRoute?.groupTitle && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: "boltdocs-breadcrumbs-item", children: [
|
|
1742
|
+
groupRoute ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Link, { to: groupRoute.path, className: "boltdocs-breadcrumbs-link", children: currentRoute.groupTitle }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "boltdocs-breadcrumbs-text", children: currentRoute.groupTitle }),
|
|
1743
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "boltdocs-breadcrumbs-separator", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react9.ChevronRight, { size: 14 }) })
|
|
1610
1744
|
] }),
|
|
1611
|
-
currentRoute?.title && /* @__PURE__ */ (0,
|
|
1745
|
+
currentRoute?.title && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { className: "boltdocs-breadcrumbs-item", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1612
1746
|
"span",
|
|
1613
1747
|
{
|
|
1614
1748
|
className: "boltdocs-breadcrumbs-text boltdocs-breadcrumbs-active",
|
|
@@ -1618,14 +1752,14 @@ function Breadcrumbs({ routes, config }) {
|
|
|
1618
1752
|
) })
|
|
1619
1753
|
] }) });
|
|
1620
1754
|
}
|
|
1621
|
-
var
|
|
1755
|
+
var import_react_router_dom9, import_lucide_react9, import_jsx_runtime17;
|
|
1622
1756
|
var init_Breadcrumbs = __esm({
|
|
1623
1757
|
"src/client/theme/ui/Breadcrumbs/Breadcrumbs.tsx"() {
|
|
1624
1758
|
"use strict";
|
|
1625
|
-
|
|
1759
|
+
import_react_router_dom9 = require("react-router-dom");
|
|
1626
1760
|
init_Link2();
|
|
1627
1761
|
import_lucide_react9 = require("lucide-react");
|
|
1628
|
-
|
|
1762
|
+
import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1629
1763
|
}
|
|
1630
1764
|
});
|
|
1631
1765
|
|
|
@@ -1639,16 +1773,16 @@ var init_Breadcrumbs2 = __esm({
|
|
|
1639
1773
|
|
|
1640
1774
|
// src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx
|
|
1641
1775
|
function BackgroundGradient() {
|
|
1642
|
-
return /* @__PURE__ */ (0,
|
|
1643
|
-
/* @__PURE__ */ (0,
|
|
1644
|
-
/* @__PURE__ */ (0,
|
|
1776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "boltdocs-background-glow", children: [
|
|
1777
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "glow-shape glow-1" }),
|
|
1778
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "glow-shape glow-2" })
|
|
1645
1779
|
] });
|
|
1646
1780
|
}
|
|
1647
|
-
var
|
|
1781
|
+
var import_jsx_runtime18;
|
|
1648
1782
|
var init_BackgroundGradient = __esm({
|
|
1649
1783
|
"src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx"() {
|
|
1650
1784
|
"use strict";
|
|
1651
|
-
|
|
1785
|
+
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1652
1786
|
}
|
|
1653
1787
|
});
|
|
1654
1788
|
|
|
@@ -1680,10 +1814,9 @@ function ThemeLayout({
|
|
|
1680
1814
|
className = "",
|
|
1681
1815
|
style
|
|
1682
1816
|
}) {
|
|
1683
|
-
const [isSidebarOpen, setIsSidebarOpen] = (0, import_react13.useState)(true);
|
|
1684
1817
|
const siteTitle = config.themeConfig?.title || "Boltdocs";
|
|
1685
1818
|
const siteDescription = config.themeConfig?.description || "";
|
|
1686
|
-
const location = (0,
|
|
1819
|
+
const location = (0, import_react_router_dom10.useLocation)();
|
|
1687
1820
|
const currentIndex = routes.findIndex((r) => r.path === location.pathname);
|
|
1688
1821
|
const currentRoute = routes[currentIndex];
|
|
1689
1822
|
const currentLocale = config.i18n ? currentRoute?.locale || config.i18n.defaultLocale : void 0;
|
|
@@ -1703,9 +1836,9 @@ function ThemeLayout({
|
|
|
1703
1836
|
if (prevPage?.path) preload(prevPage.path);
|
|
1704
1837
|
if (nextPage?.path) preload(nextPage.path);
|
|
1705
1838
|
}, [prevPage, nextPage, preload]);
|
|
1706
|
-
return /* @__PURE__ */ (0,
|
|
1707
|
-
background !== void 0 ? background : /* @__PURE__ */ (0,
|
|
1708
|
-
head !== void 0 ? head : /* @__PURE__ */ (0,
|
|
1839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: `boltdocs-layout ${className}`, style, children: [
|
|
1840
|
+
background !== void 0 ? background : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(BackgroundGradient, {}),
|
|
1841
|
+
head !== void 0 ? head : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1709
1842
|
Head,
|
|
1710
1843
|
{
|
|
1711
1844
|
siteTitle,
|
|
@@ -1713,7 +1846,7 @@ function ThemeLayout({
|
|
|
1713
1846
|
routes
|
|
1714
1847
|
}
|
|
1715
1848
|
),
|
|
1716
|
-
navbar !== void 0 ? navbar : /* @__PURE__ */ (0,
|
|
1849
|
+
navbar !== void 0 ? navbar : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1717
1850
|
Navbar,
|
|
1718
1851
|
{
|
|
1719
1852
|
config,
|
|
@@ -1723,74 +1856,60 @@ function ThemeLayout({
|
|
|
1723
1856
|
currentVersion
|
|
1724
1857
|
}
|
|
1725
1858
|
),
|
|
1726
|
-
/* @__PURE__ */ (0,
|
|
1727
|
-
|
|
1728
|
-
{
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1859
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "boltdocs-main-container", children: [
|
|
1860
|
+
sidebar !== void 0 ? sidebar : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Sidebar, { routes: filteredRoutes, config }),
|
|
1861
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("main", { className: "boltdocs-content", children: [
|
|
1862
|
+
breadcrumbs !== void 0 ? breadcrumbs : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Breadcrumbs, { routes: filteredRoutes, config }),
|
|
1863
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "boltdocs-page", children }),
|
|
1864
|
+
(prevPage || nextPage) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("nav", { className: "page-nav", "aria-label": "Pagination", children: [
|
|
1865
|
+
prevPage ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1866
|
+
Link,
|
|
1733
1867
|
{
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1868
|
+
to: prevPage.path || "/",
|
|
1869
|
+
className: "page-nav-link page-nav-link--prev",
|
|
1870
|
+
children: [
|
|
1871
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "page-nav-info", children: [
|
|
1872
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "page-nav-label", children: "Previous" }),
|
|
1873
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "page-nav-title", children: prevPage.title })
|
|
1874
|
+
] }),
|
|
1875
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react10.ChevronLeft, { className: "page-nav-arrow", size: 16 })
|
|
1876
|
+
]
|
|
1738
1877
|
}
|
|
1739
|
-
),
|
|
1740
|
-
/* @__PURE__ */ (0,
|
|
1741
|
-
|
|
1742
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "boltdocs-page", children }),
|
|
1743
|
-
(prevPage || nextPage) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("nav", { className: "page-nav", "aria-label": "Pagination", children: [
|
|
1744
|
-
prevPage ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1745
|
-
Link,
|
|
1746
|
-
{
|
|
1747
|
-
to: prevPage.path || "/",
|
|
1748
|
-
className: "page-nav-link page-nav-link--prev",
|
|
1749
|
-
children: [
|
|
1750
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "page-nav-info", children: [
|
|
1751
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "page-nav-label", children: "Previous" }),
|
|
1752
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "page-nav-title", children: prevPage.title })
|
|
1753
|
-
] }),
|
|
1754
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react10.ChevronLeft, { className: "page-nav-arrow", size: 16 })
|
|
1755
|
-
]
|
|
1756
|
-
}
|
|
1757
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", {}),
|
|
1758
|
-
nextPage ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1759
|
-
Link,
|
|
1760
|
-
{
|
|
1761
|
-
to: nextPage.path || "/",
|
|
1762
|
-
className: "page-nav-link page-nav-link--next",
|
|
1763
|
-
children: [
|
|
1764
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "page-nav-info", children: [
|
|
1765
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "page-nav-label", children: "Next" }),
|
|
1766
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "page-nav-title", children: nextPage.title })
|
|
1767
|
-
] }),
|
|
1768
|
-
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react10.ChevronRight, { className: "page-nav-arrow", size: 16 })
|
|
1769
|
-
]
|
|
1770
|
-
}
|
|
1771
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", {})
|
|
1772
|
-
] })
|
|
1773
|
-
] }),
|
|
1774
|
-
toc !== void 0 ? toc : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1775
|
-
OnThisPage,
|
|
1878
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", {}),
|
|
1879
|
+
nextPage ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
1880
|
+
Link,
|
|
1776
1881
|
{
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1882
|
+
to: nextPage.path || "/",
|
|
1883
|
+
className: "page-nav-link page-nav-link--next",
|
|
1884
|
+
children: [
|
|
1885
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "page-nav-info", children: [
|
|
1886
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "page-nav-label", children: "Next" }),
|
|
1887
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "page-nav-title", children: nextPage.title })
|
|
1888
|
+
] }),
|
|
1889
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_lucide_react10.ChevronRight, { className: "page-nav-arrow", size: 16 })
|
|
1890
|
+
]
|
|
1781
1891
|
}
|
|
1782
|
-
)
|
|
1783
|
-
]
|
|
1784
|
-
}
|
|
1785
|
-
|
|
1892
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", {})
|
|
1893
|
+
] })
|
|
1894
|
+
] }),
|
|
1895
|
+
toc !== void 0 ? toc : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1896
|
+
OnThisPage,
|
|
1897
|
+
{
|
|
1898
|
+
headings: routes[currentIndex]?.headings,
|
|
1899
|
+
editLink: config.themeConfig?.editLink,
|
|
1900
|
+
communityHelp: config.themeConfig?.communityHelp,
|
|
1901
|
+
filePath: routes[currentIndex]?.filePath
|
|
1902
|
+
}
|
|
1903
|
+
)
|
|
1904
|
+
] })
|
|
1786
1905
|
] });
|
|
1787
1906
|
}
|
|
1788
|
-
var import_react13,
|
|
1907
|
+
var import_react13, import_react_router_dom10, import_lucide_react10, import_jsx_runtime19;
|
|
1789
1908
|
var init_Layout = __esm({
|
|
1790
1909
|
"src/client/theme/ui/Layout/Layout.tsx"() {
|
|
1791
1910
|
"use strict";
|
|
1792
1911
|
import_react13 = __toESM(require("react"));
|
|
1793
|
-
|
|
1912
|
+
import_react_router_dom10 = require("react-router-dom");
|
|
1794
1913
|
init_Link2();
|
|
1795
1914
|
import_lucide_react10 = require("lucide-react");
|
|
1796
1915
|
init_preload();
|
|
@@ -1807,7 +1926,7 @@ var init_Layout = __esm({
|
|
|
1807
1926
|
init_Breadcrumbs2();
|
|
1808
1927
|
init_BackgroundGradient2();
|
|
1809
1928
|
init_styles();
|
|
1810
|
-
|
|
1929
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1811
1930
|
}
|
|
1812
1931
|
});
|
|
1813
1932
|
|
|
@@ -1821,23 +1940,23 @@ var init_Layout2 = __esm({
|
|
|
1821
1940
|
|
|
1822
1941
|
// src/client/theme/ui/NotFound/NotFound.tsx
|
|
1823
1942
|
function NotFound() {
|
|
1824
|
-
return /* @__PURE__ */ (0,
|
|
1825
|
-
/* @__PURE__ */ (0,
|
|
1826
|
-
/* @__PURE__ */ (0,
|
|
1827
|
-
/* @__PURE__ */ (0,
|
|
1828
|
-
/* @__PURE__ */ (0,
|
|
1829
|
-
/* @__PURE__ */ (0,
|
|
1943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "boltdocs-not-found", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "not-found-content", children: [
|
|
1944
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "not-found-code", children: "404" }),
|
|
1945
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h1", { className: "not-found-title", children: "Page Not Found" }),
|
|
1946
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "not-found-text", children: "The page you're looking for doesn't exist or has been moved." }),
|
|
1947
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(Link, { to: "/", className: "not-found-link", children: [
|
|
1948
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_lucide_react11.ArrowLeft, { size: 16 }),
|
|
1830
1949
|
" Go to Home"
|
|
1831
1950
|
] })
|
|
1832
1951
|
] }) });
|
|
1833
1952
|
}
|
|
1834
|
-
var import_lucide_react11,
|
|
1953
|
+
var import_lucide_react11, import_jsx_runtime20;
|
|
1835
1954
|
var init_NotFound = __esm({
|
|
1836
1955
|
"src/client/theme/ui/NotFound/NotFound.tsx"() {
|
|
1837
1956
|
"use strict";
|
|
1838
1957
|
init_Link2();
|
|
1839
1958
|
import_lucide_react11 = require("lucide-react");
|
|
1840
|
-
|
|
1959
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1841
1960
|
}
|
|
1842
1961
|
});
|
|
1843
1962
|
|
|
@@ -1851,16 +1970,16 @@ var init_NotFound2 = __esm({
|
|
|
1851
1970
|
|
|
1852
1971
|
// src/client/theme/ui/Loading/Loading.tsx
|
|
1853
1972
|
function Loading() {
|
|
1854
|
-
return /* @__PURE__ */ (0,
|
|
1855
|
-
/* @__PURE__ */ (0,
|
|
1856
|
-
/* @__PURE__ */ (0,
|
|
1973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "boltdocs-loading", children: [
|
|
1974
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "loading-spinner" }),
|
|
1975
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: "loading-text", children: "Loading..." })
|
|
1857
1976
|
] });
|
|
1858
1977
|
}
|
|
1859
|
-
var
|
|
1978
|
+
var import_jsx_runtime21;
|
|
1860
1979
|
var init_Loading = __esm({
|
|
1861
1980
|
"src/client/theme/ui/Loading/Loading.tsx"() {
|
|
1862
1981
|
"use strict";
|
|
1863
|
-
|
|
1982
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1864
1983
|
}
|
|
1865
1984
|
});
|
|
1866
1985
|
|
|
@@ -1882,27 +2001,27 @@ function CodeBlock({ children, ...props }) {
|
|
|
1882
2001
|
setCopied(true);
|
|
1883
2002
|
setTimeout(() => setCopied(false), 2e3);
|
|
1884
2003
|
}, []);
|
|
1885
|
-
return /* @__PURE__ */ (0,
|
|
1886
|
-
/* @__PURE__ */ (0,
|
|
2004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "code-block-wrapper", children: [
|
|
2005
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1887
2006
|
"button",
|
|
1888
2007
|
{
|
|
1889
2008
|
className: `code-block-copy ${copied ? "copied" : ""}`,
|
|
1890
2009
|
onClick: handleCopy,
|
|
1891
2010
|
"aria-label": "Copy code",
|
|
1892
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
2011
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react12.Check, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react12.Copy, { size: 16 })
|
|
1893
2012
|
}
|
|
1894
2013
|
),
|
|
1895
|
-
/* @__PURE__ */ (0,
|
|
2014
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("pre", { ref: preRef, ...props, children })
|
|
1896
2015
|
] });
|
|
1897
2016
|
}
|
|
1898
|
-
var import_react14, import_lucide_react12,
|
|
2017
|
+
var import_react14, import_lucide_react12, import_jsx_runtime22;
|
|
1899
2018
|
var init_CodeBlock = __esm({
|
|
1900
2019
|
"src/client/theme/components/CodeBlock/CodeBlock.tsx"() {
|
|
1901
2020
|
"use strict";
|
|
1902
2021
|
import_react14 = require("react");
|
|
1903
2022
|
import_lucide_react12 = require("lucide-react");
|
|
1904
2023
|
init_utils();
|
|
1905
|
-
|
|
2024
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1906
2025
|
}
|
|
1907
2026
|
});
|
|
1908
2027
|
|
|
@@ -1941,7 +2060,7 @@ function Video({
|
|
|
1941
2060
|
observer.observe(el);
|
|
1942
2061
|
return () => observer.disconnect();
|
|
1943
2062
|
}, []);
|
|
1944
|
-
return /* @__PURE__ */ (0,
|
|
2063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { ref: containerRef, className: "boltdocs-video-wrapper", children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1945
2064
|
"video",
|
|
1946
2065
|
{
|
|
1947
2066
|
className: "boltdocs-video",
|
|
@@ -1956,7 +2075,7 @@ function Video({
|
|
|
1956
2075
|
"Your browser does not support the video tag."
|
|
1957
2076
|
]
|
|
1958
2077
|
}
|
|
1959
|
-
) : /* @__PURE__ */ (0,
|
|
2078
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1960
2079
|
"div",
|
|
1961
2080
|
{
|
|
1962
2081
|
className: "boltdocs-video-placeholder",
|
|
@@ -1965,12 +2084,12 @@ function Video({
|
|
|
1965
2084
|
}
|
|
1966
2085
|
) });
|
|
1967
2086
|
}
|
|
1968
|
-
var import_react15,
|
|
2087
|
+
var import_react15, import_jsx_runtime23;
|
|
1969
2088
|
var init_Video = __esm({
|
|
1970
2089
|
"src/client/theme/components/Video/Video.tsx"() {
|
|
1971
2090
|
"use strict";
|
|
1972
2091
|
import_react15 = require("react");
|
|
1973
|
-
|
|
2092
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1974
2093
|
}
|
|
1975
2094
|
});
|
|
1976
2095
|
|
|
@@ -1987,14 +2106,14 @@ var init_Video2 = __esm({
|
|
|
1987
2106
|
});
|
|
1988
2107
|
|
|
1989
2108
|
// src/client/theme/icons/npm.tsx
|
|
1990
|
-
var
|
|
2109
|
+
var import_jsx_runtime24, NPM;
|
|
1991
2110
|
var init_npm = __esm({
|
|
1992
2111
|
"src/client/theme/icons/npm.tsx"() {
|
|
1993
2112
|
"use strict";
|
|
1994
|
-
|
|
1995
|
-
NPM = (props) => /* @__PURE__ */ (0,
|
|
1996
|
-
/* @__PURE__ */ (0,
|
|
1997
|
-
/* @__PURE__ */ (0,
|
|
2113
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2114
|
+
NPM = (props) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("svg", { ...props, viewBox: "0 0 2500 2500", children: [
|
|
2115
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { fill: "#c00", d: "M0 0h2500v2500H0z" }),
|
|
2116
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1998
2117
|
"path",
|
|
1999
2118
|
{
|
|
2000
2119
|
fill: "#fff",
|
|
@@ -2006,69 +2125,69 @@ var init_npm = __esm({
|
|
|
2006
2125
|
});
|
|
2007
2126
|
|
|
2008
2127
|
// src/client/theme/icons/pnpm.tsx
|
|
2009
|
-
var
|
|
2128
|
+
var import_jsx_runtime25, Pnpm;
|
|
2010
2129
|
var init_pnpm = __esm({
|
|
2011
2130
|
"src/client/theme/icons/pnpm.tsx"() {
|
|
2012
2131
|
"use strict";
|
|
2013
|
-
|
|
2014
|
-
Pnpm = (props) => /* @__PURE__ */ (0,
|
|
2132
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2133
|
+
Pnpm = (props) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2015
2134
|
"svg",
|
|
2016
2135
|
{
|
|
2017
2136
|
...props,
|
|
2018
2137
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
2019
2138
|
viewBox: "76.58987244897958 44 164.00775510204068 164",
|
|
2020
2139
|
children: [
|
|
2021
|
-
/* @__PURE__ */ (0,
|
|
2022
|
-
/* @__PURE__ */ (0,
|
|
2140
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("defs", { children: [
|
|
2141
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2023
2142
|
"path",
|
|
2024
2143
|
{
|
|
2025
2144
|
d: "M237.6 95L187.6 95L187.6 45L237.6 45L237.6 95Z",
|
|
2026
2145
|
id: "pnpm_dark__b45vdTD8hs"
|
|
2027
2146
|
}
|
|
2028
2147
|
),
|
|
2029
|
-
/* @__PURE__ */ (0,
|
|
2148
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2030
2149
|
"path",
|
|
2031
2150
|
{
|
|
2032
2151
|
d: "M182.59 95L132.59 95L132.59 45L182.59 45L182.59 95Z",
|
|
2033
2152
|
id: "pnpm_dark__a40WtxIl8d"
|
|
2034
2153
|
}
|
|
2035
2154
|
),
|
|
2036
|
-
/* @__PURE__ */ (0,
|
|
2155
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2037
2156
|
"path",
|
|
2038
2157
|
{
|
|
2039
2158
|
d: "M127.59 95L77.59 95L77.59 45L127.59 45L127.59 95Z",
|
|
2040
2159
|
id: "pnpm_dark__h2CN9AEEpe"
|
|
2041
2160
|
}
|
|
2042
2161
|
),
|
|
2043
|
-
/* @__PURE__ */ (0,
|
|
2162
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2044
2163
|
"path",
|
|
2045
2164
|
{
|
|
2046
2165
|
d: "M237.6 150L187.6 150L187.6 100L237.6 100L237.6 150Z",
|
|
2047
2166
|
id: "pnpm_dark__dqv5133G8"
|
|
2048
2167
|
}
|
|
2049
2168
|
),
|
|
2050
|
-
/* @__PURE__ */ (0,
|
|
2169
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2051
2170
|
"path",
|
|
2052
2171
|
{
|
|
2053
2172
|
d: "M182.59 150L132.59 150L132.59 100L182.59 100L182.59 150Z",
|
|
2054
2173
|
id: "pnpm_dark__b1Lv79ypvm"
|
|
2055
2174
|
}
|
|
2056
2175
|
),
|
|
2057
|
-
/* @__PURE__ */ (0,
|
|
2176
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2058
2177
|
"path",
|
|
2059
2178
|
{
|
|
2060
2179
|
d: "M182.59 205L132.59 205L132.59 155L182.59 155L182.59 205Z",
|
|
2061
2180
|
id: "pnpm_dark__hy1IZWwLX"
|
|
2062
2181
|
}
|
|
2063
2182
|
),
|
|
2064
|
-
/* @__PURE__ */ (0,
|
|
2183
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2065
2184
|
"path",
|
|
2066
2185
|
{
|
|
2067
2186
|
d: "M237.6 205L187.6 205L187.6 155L237.6 155L237.6 205Z",
|
|
2068
2187
|
id: "pnpm_dark__akQfjxQes"
|
|
2069
2188
|
}
|
|
2070
2189
|
),
|
|
2071
|
-
/* @__PURE__ */ (0,
|
|
2190
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2072
2191
|
"path",
|
|
2073
2192
|
{
|
|
2074
2193
|
d: "M127.59 205L77.59 205L77.59 155L127.59 155L127.59 205Z",
|
|
@@ -2076,15 +2195,15 @@ var init_pnpm = __esm({
|
|
|
2076
2195
|
}
|
|
2077
2196
|
)
|
|
2078
2197
|
] }),
|
|
2079
|
-
/* @__PURE__ */ (0,
|
|
2080
|
-
/* @__PURE__ */ (0,
|
|
2081
|
-
/* @__PURE__ */ (0,
|
|
2082
|
-
/* @__PURE__ */ (0,
|
|
2083
|
-
/* @__PURE__ */ (0,
|
|
2084
|
-
/* @__PURE__ */ (0,
|
|
2085
|
-
/* @__PURE__ */ (0,
|
|
2086
|
-
/* @__PURE__ */ (0,
|
|
2087
|
-
/* @__PURE__ */ (0,
|
|
2198
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("g", { children: [
|
|
2199
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__b45vdTD8hs", fill: "#f9ad00" }) }),
|
|
2200
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__a40WtxIl8d", fill: "#f9ad00" }) }),
|
|
2201
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__h2CN9AEEpe", fill: "#f9ad00" }) }),
|
|
2202
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__dqv5133G8", fill: "#f9ad00" }) }),
|
|
2203
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__b1Lv79ypvm", fill: "#ffffff" }) }),
|
|
2204
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__hy1IZWwLX", fill: "#ffffff" }) }),
|
|
2205
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__akQfjxQes", fill: "#ffffff" }) }),
|
|
2206
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("use", { xlinkHref: "#pnpm_dark__bdSrwE5pk", fill: "#ffffff" }) })
|
|
2088
2207
|
] })
|
|
2089
2208
|
]
|
|
2090
2209
|
}
|
|
@@ -2093,62 +2212,62 @@ var init_pnpm = __esm({
|
|
|
2093
2212
|
});
|
|
2094
2213
|
|
|
2095
2214
|
// src/client/theme/icons/bun.tsx
|
|
2096
|
-
var
|
|
2215
|
+
var import_jsx_runtime26, Bun;
|
|
2097
2216
|
var init_bun = __esm({
|
|
2098
2217
|
"src/client/theme/icons/bun.tsx"() {
|
|
2099
2218
|
"use strict";
|
|
2100
|
-
|
|
2101
|
-
Bun = (props) => /* @__PURE__ */ (0,
|
|
2102
|
-
/* @__PURE__ */ (0,
|
|
2103
|
-
/* @__PURE__ */ (0,
|
|
2219
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2220
|
+
Bun = (props) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { ...props, viewBox: "0 0 80 70", children: [
|
|
2221
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M71.09 20.74c-.16-.17-.33-.34-.5-.5s-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5-.33-.34-.5-.5A26.46 26.46 0 0 1 75.5 35.7c0 16.57-16.82 30.05-37.5 30.05-11.58 0-21.94-4.23-28.83-10.86l.5.5.5.5.5.5.5.5.5.5.5.5.5.5C19.55 65.3 30.14 69.75 42 69.75c20.68 0 37.5-13.48 37.5-30 0-7.06-3.04-13.75-8.41-19.01Z" }),
|
|
2222
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2104
2223
|
"path",
|
|
2105
2224
|
{
|
|
2106
2225
|
d: "M73 35.7c0 15.21-15.67 27.54-35 27.54S3 50.91 3 35.7C3 26.27 9 17.94 18.22 13S33.18 3 38 3s8.94 4.13 19.78 10C67 17.94 73 26.27 73 35.7Z",
|
|
2107
2226
|
style: { fill: "#fbf0df" }
|
|
2108
2227
|
}
|
|
2109
2228
|
),
|
|
2110
|
-
/* @__PURE__ */ (0,
|
|
2229
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2111
2230
|
"path",
|
|
2112
2231
|
{
|
|
2113
2232
|
d: "M73 35.7a21.67 21.67 0 0 0-.8-5.78c-2.73 33.3-43.35 34.9-59.32 24.94A40 40 0 0 0 38 63.24c19.3 0 35-12.35 35-27.54Z",
|
|
2114
2233
|
style: { fill: "#f6dece" }
|
|
2115
2234
|
}
|
|
2116
2235
|
),
|
|
2117
|
-
/* @__PURE__ */ (0,
|
|
2236
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2118
2237
|
"path",
|
|
2119
2238
|
{
|
|
2120
2239
|
d: "M24.53 11.17C29 8.49 34.94 3.46 40.78 3.45A9.29 9.29 0 0 0 38 3c-2.42 0-5 1.25-8.25 3.13-1.13.66-2.3 1.39-3.54 2.15-2.33 1.44-5 3.07-8 4.7C8.69 18.13 3 26.62 3 35.7v1.19c6.06-21.41 17.07-23.04 21.53-25.72Z",
|
|
2121
2240
|
style: { fill: "#fffefc" }
|
|
2122
2241
|
}
|
|
2123
2242
|
),
|
|
2124
|
-
/* @__PURE__ */ (0,
|
|
2243
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2125
2244
|
"path",
|
|
2126
2245
|
{
|
|
2127
2246
|
d: "M35.12 5.53A16.41 16.41 0 0 1 29.49 18c-.28.25-.06.73.3.59 3.37-1.31 7.92-5.23 6-13.14-.08-.45-.67-.33-.67.08Zm2.27 0A16.24 16.24 0 0 1 39 19c-.12.35.31.65.55.36 2.19-2.8 4.1-8.36-1.62-14.36-.29-.26-.74.14-.54.49Zm2.76-.17A16.42 16.42 0 0 1 47 17.12a.33.33 0 0 0 .65.11c.92-3.49.4-9.44-7.17-12.53-.4-.16-.66.38-.33.62Zm-18.46 10.4a16.94 16.94 0 0 0 10.47-9c.18-.36.75-.22.66.18-1.73 8-7.52 9.67-11.12 9.45-.38.01-.37-.52-.01-.63Z",
|
|
2128
2247
|
style: { fill: "#ccbea7", fillRule: "evenodd" }
|
|
2129
2248
|
}
|
|
2130
2249
|
),
|
|
2131
|
-
/* @__PURE__ */ (0,
|
|
2132
|
-
/* @__PURE__ */ (0,
|
|
2133
|
-
/* @__PURE__ */ (0,
|
|
2250
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M38 65.75C17.32 65.75.5 52.27.5 35.7c0-10 6.18-19.33 16.53-24.92 3-1.6 5.57-3.21 7.86-4.62 1.26-.78 2.45-1.51 3.6-2.19C32 1.89 35 .5 38 .5s5.62 1.2 8.9 3.14c1 .57 2 1.19 3.07 1.87 2.49 1.54 5.3 3.28 9 5.27C69.32 16.37 75.5 25.69 75.5 35.7c0 16.57-16.82 30.05-37.5 30.05ZM38 3c-2.42 0-5 1.25-8.25 3.13-1.13.66-2.3 1.39-3.54 2.15-2.33 1.44-5 3.07-8 4.7C8.69 18.13 3 26.62 3 35.7c0 15.19 15.7 27.55 35 27.55S73 50.89 73 35.7c0-9.08-5.69-17.57-15.22-22.7-3.78-2-6.73-3.88-9.12-5.36-1.09-.67-2.09-1.29-3-1.84C42.63 4 40.42 3 38 3Z" }),
|
|
2251
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("g", { children: [
|
|
2252
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2134
2253
|
"path",
|
|
2135
2254
|
{
|
|
2136
2255
|
d: "M45.05 43a8.93 8.93 0 0 1-2.92 4.71 6.81 6.81 0 0 1-4 1.88A6.84 6.84 0 0 1 34 47.71 8.93 8.93 0 0 1 31.12 43a.72.72 0 0 1 .8-.81h12.34a.72.72 0 0 1 .79.81Z",
|
|
2137
2256
|
style: { fill: "#b71422" }
|
|
2138
2257
|
}
|
|
2139
2258
|
),
|
|
2140
|
-
/* @__PURE__ */ (0,
|
|
2259
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2141
2260
|
"path",
|
|
2142
2261
|
{
|
|
2143
2262
|
d: "M34 47.79a6.91 6.91 0 0 0 4.12 1.9 6.91 6.91 0 0 0 4.11-1.9 10.63 10.63 0 0 0 1-1.07 6.83 6.83 0 0 0-4.9-2.31 6.15 6.15 0 0 0-5 2.78c.23.21.43.41.67.6Z",
|
|
2144
2263
|
style: { fill: "#ff6164" }
|
|
2145
2264
|
}
|
|
2146
2265
|
),
|
|
2147
|
-
/* @__PURE__ */ (0,
|
|
2148
|
-
/* @__PURE__ */ (0,
|
|
2266
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M34.16 47a5.36 5.36 0 0 1 4.19-2.08 6 6 0 0 1 4 1.69c.23-.25.45-.51.66-.77a7 7 0 0 0-4.71-1.93 6.36 6.36 0 0 0-4.89 2.36 9.53 9.53 0 0 0 .75.73Z" }),
|
|
2267
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M38.09 50.19a7.42 7.42 0 0 1-4.45-2 9.52 9.52 0 0 1-3.11-5.05 1.2 1.2 0 0 1 .26-1 1.41 1.41 0 0 1 1.13-.51h12.34a1.44 1.44 0 0 1 1.13.51 1.19 1.19 0 0 1 .25 1 9.52 9.52 0 0 1-3.11 5.05 7.42 7.42 0 0 1-4.44 2Zm-6.17-7.4c-.16 0-.2.07-.21.09a8.29 8.29 0 0 0 2.73 4.37A6.23 6.23 0 0 0 38.09 49a6.28 6.28 0 0 0 3.65-1.73 8.3 8.3 0 0 0 2.72-4.37.21.21 0 0 0-.2-.09Z" })
|
|
2149
2268
|
] }),
|
|
2150
|
-
/* @__PURE__ */ (0,
|
|
2151
|
-
/* @__PURE__ */ (0,
|
|
2269
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("g", { children: [
|
|
2270
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2152
2271
|
"ellipse",
|
|
2153
2272
|
{
|
|
2154
2273
|
cx: "53.22",
|
|
@@ -2158,7 +2277,7 @@ var init_bun = __esm({
|
|
|
2158
2277
|
style: { fill: "#febbd0" }
|
|
2159
2278
|
}
|
|
2160
2279
|
),
|
|
2161
|
-
/* @__PURE__ */ (0,
|
|
2280
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2162
2281
|
"ellipse",
|
|
2163
2282
|
{
|
|
2164
2283
|
cx: "22.95",
|
|
@@ -2168,14 +2287,14 @@ var init_bun = __esm({
|
|
|
2168
2287
|
style: { fill: "#febbd0" }
|
|
2169
2288
|
}
|
|
2170
2289
|
),
|
|
2171
|
-
/* @__PURE__ */ (0,
|
|
2290
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2172
2291
|
"path",
|
|
2173
2292
|
{
|
|
2174
2293
|
d: "M25.7 38.8a5.51 5.51 0 1 0-5.5-5.51 5.51 5.51 0 0 0 5.5 5.51Zm24.77 0A5.51 5.51 0 1 0 45 33.29a5.5 5.5 0 0 0 5.47 5.51Z",
|
|
2175
2294
|
style: { fillRule: "evenodd" }
|
|
2176
2295
|
}
|
|
2177
2296
|
),
|
|
2178
|
-
/* @__PURE__ */ (0,
|
|
2297
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2179
2298
|
"path",
|
|
2180
2299
|
{
|
|
2181
2300
|
d: "M24 33.64a2.07 2.07 0 1 0-2.06-2.07A2.07 2.07 0 0 0 24 33.64Zm24.77 0a2.07 2.07 0 1 0-2.06-2.07 2.07 2.07 0 0 0 2.04 2.07Z",
|
|
@@ -2188,12 +2307,12 @@ var init_bun = __esm({
|
|
|
2188
2307
|
});
|
|
2189
2308
|
|
|
2190
2309
|
// src/client/theme/icons/deno.tsx
|
|
2191
|
-
var
|
|
2310
|
+
var import_jsx_runtime27, Deno;
|
|
2192
2311
|
var init_deno = __esm({
|
|
2193
2312
|
"src/client/theme/icons/deno.tsx"() {
|
|
2194
2313
|
"use strict";
|
|
2195
|
-
|
|
2196
|
-
Deno = (props) => /* @__PURE__ */ (0,
|
|
2314
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2315
|
+
Deno = (props) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2197
2316
|
"svg",
|
|
2198
2317
|
{
|
|
2199
2318
|
...props,
|
|
@@ -2203,7 +2322,7 @@ var init_deno = __esm({
|
|
|
2203
2322
|
strokeMiterlimit: "2",
|
|
2204
2323
|
clipRule: "evenodd",
|
|
2205
2324
|
viewBox: "0 0 441 441",
|
|
2206
|
-
children: /* @__PURE__ */ (0,
|
|
2325
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2207
2326
|
"path",
|
|
2208
2327
|
{
|
|
2209
2328
|
fill: "currentColor",
|
|
@@ -2258,11 +2377,11 @@ function PackageManagerTabs({
|
|
|
2258
2377
|
setCopied(true);
|
|
2259
2378
|
setTimeout(() => setCopied(false), 2e3);
|
|
2260
2379
|
}, [activeCommand]);
|
|
2261
|
-
return /* @__PURE__ */ (0,
|
|
2262
|
-
/* @__PURE__ */ (0,
|
|
2380
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: `pkg-tabs-wrapper ${className}`, children: [
|
|
2381
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "pkg-tabs-header", children: MANAGERS.map((mgr) => {
|
|
2263
2382
|
const Icon = mgr.icon;
|
|
2264
2383
|
const isActive = activeTab === mgr.id;
|
|
2265
|
-
return /* @__PURE__ */ (0,
|
|
2384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2266
2385
|
"button",
|
|
2267
2386
|
{
|
|
2268
2387
|
className: `pkg-tab-btn ${isActive ? "active" : ""}`,
|
|
@@ -2270,29 +2389,29 @@ function PackageManagerTabs({
|
|
|
2270
2389
|
"aria-selected": isActive,
|
|
2271
2390
|
role: "tab",
|
|
2272
2391
|
children: [
|
|
2273
|
-
/* @__PURE__ */ (0,
|
|
2274
|
-
/* @__PURE__ */ (0,
|
|
2392
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon, { className: "pkg-tab-icon", width: "16", height: "16" }),
|
|
2393
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: mgr.label })
|
|
2275
2394
|
]
|
|
2276
2395
|
},
|
|
2277
2396
|
mgr.id
|
|
2278
2397
|
);
|
|
2279
2398
|
}) }),
|
|
2280
|
-
/* @__PURE__ */ (0,
|
|
2281
|
-
/* @__PURE__ */ (0,
|
|
2399
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "code-block-wrapper pkg-tabs-content", children: [
|
|
2400
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2282
2401
|
"button",
|
|
2283
2402
|
{
|
|
2284
2403
|
className: `code-block-copy ${copied ? "copied" : ""}`,
|
|
2285
2404
|
onClick: handleCopy,
|
|
2286
2405
|
type: "button",
|
|
2287
2406
|
"aria-label": "Copy code",
|
|
2288
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
2407
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react13.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_lucide_react13.Copy, { size: 14 })
|
|
2289
2408
|
}
|
|
2290
2409
|
),
|
|
2291
|
-
/* @__PURE__ */ (0,
|
|
2410
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("pre", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("code", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "line", children: activeCommand }) }) })
|
|
2292
2411
|
] })
|
|
2293
2412
|
] });
|
|
2294
2413
|
}
|
|
2295
|
-
var import_react16, import_lucide_react13,
|
|
2414
|
+
var import_react16, import_lucide_react13, import_jsx_runtime28, MANAGERS;
|
|
2296
2415
|
var init_PackageManagerTabs = __esm({
|
|
2297
2416
|
"src/client/theme/components/PackageManagerTabs/PackageManagerTabs.tsx"() {
|
|
2298
2417
|
"use strict";
|
|
@@ -2303,7 +2422,7 @@ var init_PackageManagerTabs = __esm({
|
|
|
2303
2422
|
init_bun();
|
|
2304
2423
|
init_deno();
|
|
2305
2424
|
init_utils();
|
|
2306
|
-
|
|
2425
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2307
2426
|
MANAGERS = [
|
|
2308
2427
|
{ id: "npm", label: "npm", icon: NPM },
|
|
2309
2428
|
{ id: "pnpm", label: "pnpm", icon: Pnpm },
|
|
@@ -2332,6 +2451,7 @@ function useConfig() {
|
|
|
2332
2451
|
function AppShell({
|
|
2333
2452
|
initialRoutes,
|
|
2334
2453
|
initialConfig,
|
|
2454
|
+
docsDirName,
|
|
2335
2455
|
modules,
|
|
2336
2456
|
hot,
|
|
2337
2457
|
homePage: HomePage,
|
|
@@ -2344,14 +2464,14 @@ function AppShell({
|
|
|
2344
2464
|
(route) => !(HomePage && (route.path === "/" || route.path === ""))
|
|
2345
2465
|
).map((route) => {
|
|
2346
2466
|
const loaderKey = Object.keys(modules).find(
|
|
2347
|
-
(k) => k
|
|
2467
|
+
(k) => k === `/${docsDirName}/${route.filePath}`
|
|
2348
2468
|
);
|
|
2349
2469
|
const loader = loaderKey ? modules[loaderKey] : null;
|
|
2350
2470
|
return {
|
|
2351
2471
|
...route,
|
|
2352
2472
|
Component: import_react17.default.lazy(() => {
|
|
2353
2473
|
if (!loader)
|
|
2354
|
-
return Promise.resolve({ default: () => /* @__PURE__ */ (0,
|
|
2474
|
+
return Promise.resolve({ default: () => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(NotFound, {}) });
|
|
2355
2475
|
return loader();
|
|
2356
2476
|
})
|
|
2357
2477
|
};
|
|
@@ -2369,15 +2489,15 @@ function AppShell({
|
|
|
2369
2489
|
}, [hot]);
|
|
2370
2490
|
(0, import_react17.useEffect)(() => {
|
|
2371
2491
|
setResolvedRoutes(resolveRoutes(routesInfo));
|
|
2372
|
-
}, [routesInfo, modules]);
|
|
2373
|
-
return /* @__PURE__ */ (0,
|
|
2374
|
-
/* @__PURE__ */ (0,
|
|
2375
|
-
/* @__PURE__ */ (0,
|
|
2376
|
-
HomePage && /* @__PURE__ */ (0,
|
|
2377
|
-
|
|
2492
|
+
}, [routesInfo, modules, docsDirName]);
|
|
2493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(PreloadProvider, { routes: routesInfo, modules, children: [
|
|
2494
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ScrollHandler, {}),
|
|
2495
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_router_dom11.Routes, { children: [
|
|
2496
|
+
HomePage && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2497
|
+
import_react_router_dom11.Route,
|
|
2378
2498
|
{
|
|
2379
2499
|
path: "/",
|
|
2380
|
-
element: /* @__PURE__ */ (0,
|
|
2500
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2381
2501
|
ThemeLayout,
|
|
2382
2502
|
{
|
|
2383
2503
|
config,
|
|
@@ -2386,20 +2506,20 @@ function AppShell({
|
|
|
2386
2506
|
toc: null,
|
|
2387
2507
|
breadcrumbs: null,
|
|
2388
2508
|
...config.themeConfig?.layoutProps,
|
|
2389
|
-
children: /* @__PURE__ */ (0,
|
|
2509
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(HomePage, {})
|
|
2390
2510
|
}
|
|
2391
2511
|
)
|
|
2392
2512
|
}
|
|
2393
2513
|
),
|
|
2394
|
-
/* @__PURE__ */ (0,
|
|
2395
|
-
|
|
2514
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2515
|
+
import_react_router_dom11.Route,
|
|
2396
2516
|
{
|
|
2397
|
-
element: /* @__PURE__ */ (0,
|
|
2398
|
-
children: resolvedRoutes.map((route) => /* @__PURE__ */ (0,
|
|
2399
|
-
|
|
2517
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DocsLayout, { config, routes: routesInfo }),
|
|
2518
|
+
children: resolvedRoutes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2519
|
+
import_react_router_dom11.Route,
|
|
2400
2520
|
{
|
|
2401
2521
|
path: route.path === "" ? "/" : route.path,
|
|
2402
|
-
element: /* @__PURE__ */ (0,
|
|
2522
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react17.default.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Loading, {}), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2403
2523
|
MdxPage,
|
|
2404
2524
|
{
|
|
2405
2525
|
Component: route.Component,
|
|
@@ -2412,17 +2532,17 @@ function AppShell({
|
|
|
2412
2532
|
},
|
|
2413
2533
|
"docs-layout"
|
|
2414
2534
|
),
|
|
2415
|
-
/* @__PURE__ */ (0,
|
|
2416
|
-
|
|
2535
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2536
|
+
import_react_router_dom11.Route,
|
|
2417
2537
|
{
|
|
2418
2538
|
path: "*",
|
|
2419
|
-
element: /* @__PURE__ */ (0,
|
|
2539
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2420
2540
|
ThemeLayout,
|
|
2421
2541
|
{
|
|
2422
2542
|
config,
|
|
2423
2543
|
routes: routesInfo,
|
|
2424
2544
|
...config.themeConfig?.layoutProps,
|
|
2425
|
-
children: /* @__PURE__ */ (0,
|
|
2545
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(NotFound, {})
|
|
2426
2546
|
}
|
|
2427
2547
|
)
|
|
2428
2548
|
}
|
|
@@ -2431,7 +2551,7 @@ function AppShell({
|
|
|
2431
2551
|
] }) });
|
|
2432
2552
|
}
|
|
2433
2553
|
function ScrollHandler() {
|
|
2434
|
-
const { pathname, hash } = (0,
|
|
2554
|
+
const { pathname, hash } = (0, import_react_router_dom11.useLocation)();
|
|
2435
2555
|
(0, import_react19.useLayoutEffect)(() => {
|
|
2436
2556
|
if (hash) {
|
|
2437
2557
|
const id = hash.replace("#", "");
|
|
@@ -2457,13 +2577,13 @@ function DocsLayout({
|
|
|
2457
2577
|
config,
|
|
2458
2578
|
routes
|
|
2459
2579
|
}) {
|
|
2460
|
-
return /* @__PURE__ */ (0,
|
|
2580
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2461
2581
|
ThemeLayout,
|
|
2462
2582
|
{
|
|
2463
2583
|
config,
|
|
2464
2584
|
routes,
|
|
2465
2585
|
...config.themeConfig?.layoutProps,
|
|
2466
|
-
children: /* @__PURE__ */ (0,
|
|
2586
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_router_dom11.Outlet, {})
|
|
2467
2587
|
}
|
|
2468
2588
|
);
|
|
2469
2589
|
}
|
|
@@ -2472,15 +2592,15 @@ function MdxPage({
|
|
|
2472
2592
|
customComponents = {}
|
|
2473
2593
|
}) {
|
|
2474
2594
|
const allComponents = { ...mdxComponents, ...customComponents };
|
|
2475
|
-
return /* @__PURE__ */ (0,
|
|
2595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react18.MDXProvider, { components: allComponents, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Component, {}) });
|
|
2476
2596
|
}
|
|
2477
|
-
var import_react17, import_client,
|
|
2597
|
+
var import_react17, import_client, import_react_router_dom11, import_react18, import_react19, import_lucide_react14, import_jsx_runtime29, ConfigContext, Video2, PackageManagerTabs2, Heading, mdxComponents;
|
|
2478
2598
|
var init_app = __esm({
|
|
2479
2599
|
"src/client/app/index.tsx"() {
|
|
2480
2600
|
"use strict";
|
|
2481
2601
|
import_react17 = __toESM(require("react"));
|
|
2482
2602
|
import_client = __toESM(require("react-dom/client"));
|
|
2483
|
-
|
|
2603
|
+
import_react_router_dom11 = require("react-router-dom");
|
|
2484
2604
|
init_Layout2();
|
|
2485
2605
|
init_NotFound2();
|
|
2486
2606
|
init_Loading2();
|
|
@@ -2489,7 +2609,7 @@ var init_app = __esm({
|
|
|
2489
2609
|
import_lucide_react14 = require("lucide-react");
|
|
2490
2610
|
init_CodeBlock2();
|
|
2491
2611
|
init_preload();
|
|
2492
|
-
|
|
2612
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2493
2613
|
ConfigContext = (0, import_react19.createContext)(null);
|
|
2494
2614
|
Video2 = (0, import_react19.lazy)(
|
|
2495
2615
|
() => Promise.resolve().then(() => (init_Video2(), Video_exports)).then((m) => ({ default: m.Video }))
|
|
@@ -2505,21 +2625,21 @@ var init_app = __esm({
|
|
|
2505
2625
|
children
|
|
2506
2626
|
}) => {
|
|
2507
2627
|
const Tag = `h${level}`;
|
|
2508
|
-
return /* @__PURE__ */ (0,
|
|
2628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Tag, { id, className: "boltdocs-heading", children: [
|
|
2509
2629
|
children,
|
|
2510
|
-
id && /* @__PURE__ */ (0,
|
|
2630
|
+
id && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("a", { href: `#${id}`, className: "header-anchor", "aria-label": "Anchor", children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react14.Link, { size: 16 }) })
|
|
2511
2631
|
] });
|
|
2512
2632
|
};
|
|
2513
2633
|
mdxComponents = {
|
|
2514
|
-
h1: (props) => /* @__PURE__ */ (0,
|
|
2515
|
-
h2: (props) => /* @__PURE__ */ (0,
|
|
2516
|
-
h3: (props) => /* @__PURE__ */ (0,
|
|
2517
|
-
h4: (props) => /* @__PURE__ */ (0,
|
|
2518
|
-
h5: (props) => /* @__PURE__ */ (0,
|
|
2519
|
-
h6: (props) => /* @__PURE__ */ (0,
|
|
2520
|
-
pre: (props) => /* @__PURE__ */ (0,
|
|
2521
|
-
video: (props) => /* @__PURE__ */ (0,
|
|
2522
|
-
PackageManagerTabs: (props) => /* @__PURE__ */ (0,
|
|
2634
|
+
h1: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 1, ...props }),
|
|
2635
|
+
h2: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 2, ...props }),
|
|
2636
|
+
h3: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 3, ...props }),
|
|
2637
|
+
h4: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 4, ...props }),
|
|
2638
|
+
h5: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 5, ...props }),
|
|
2639
|
+
h6: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Heading, { level: 6, ...props }),
|
|
2640
|
+
pre: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CodeBlock, { ...props, children: props.children }),
|
|
2641
|
+
video: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "video-skeleton" }), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Video2, { ...props }) }),
|
|
2642
|
+
PackageManagerTabs: (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react19.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "pkg-tabs-skeleton" }), children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(PackageManagerTabs2, { ...props }) })
|
|
2523
2643
|
};
|
|
2524
2644
|
}
|
|
2525
2645
|
});
|
|
@@ -2534,19 +2654,20 @@ var import_react20 = __toESM(require("react"));
|
|
|
2534
2654
|
var import_server = __toESM(require("react-dom/server"));
|
|
2535
2655
|
var import_server2 = require("react-router-dom/server");
|
|
2536
2656
|
init_app();
|
|
2537
|
-
var
|
|
2657
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2538
2658
|
async function render(options) {
|
|
2539
|
-
const { path, routes, config, modules, homePage } = options;
|
|
2659
|
+
const { path, routes, config, modules, homePage, docsDirName } = options;
|
|
2540
2660
|
const resolvedModules = {};
|
|
2541
2661
|
for (const [key, mod] of Object.entries(modules)) {
|
|
2542
2662
|
resolvedModules[key] = () => Promise.resolve(mod);
|
|
2543
2663
|
}
|
|
2544
2664
|
const html = import_server.default.renderToString(
|
|
2545
|
-
/* @__PURE__ */ (0,
|
|
2665
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react20.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_server2.StaticRouter, { location: path, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2546
2666
|
AppShell,
|
|
2547
2667
|
{
|
|
2548
2668
|
initialRoutes: routes,
|
|
2549
2669
|
initialConfig: config,
|
|
2670
|
+
docsDirName,
|
|
2550
2671
|
modules: resolvedModules,
|
|
2551
2672
|
homePage
|
|
2552
2673
|
}
|