boltdocs 1.6.0 → 1.7.1
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-J3KNRGNO.mjs → SearchDialog-6Z7CUAYJ.mjs} +8 -1
- package/dist/{SearchDialog-3QICRMWF.css → SearchDialog-GOZ6X53X.css} +385 -113
- package/dist/{chunk-HSPDIRTW.mjs → chunk-SFVOGJ2W.mjs} +955 -737
- package/dist/client/index.css +385 -113
- package/dist/client/index.d.mts +19 -7
- package/dist/client/index.d.ts +19 -7
- package/dist/client/index.js +964 -577
- package/dist/client/index.mjs +118 -1
- package/dist/client/ssr.css +385 -113
- package/dist/client/ssr.d.mts +3 -1
- package/dist/client/ssr.d.ts +3 -1
- package/dist/client/ssr.js +743 -474
- 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 +12 -2
- package/dist/node/index.d.ts +12 -2
- package/dist/node/index.js +48 -21
- package/dist/node/index.mjs +48 -21
- package/dist/{types-DGIo1VKD.d.mts → types-BbceAHA0.d.mts} +15 -0
- package/dist/{types-DGIo1VKD.d.ts → types-BbceAHA0.d.ts} +15 -0
- package/package.json +1 -1
- package/src/client/app/index.tsx +16 -11
- package/src/client/index.ts +2 -0
- package/src/client/ssr.tsx +4 -1
- package/src/client/theme/components/mdx/Table.tsx +151 -0
- package/src/client/theme/components/mdx/index.ts +3 -0
- package/src/client/theme/components/mdx/mdx-components.css +128 -0
- package/src/client/theme/styles/markdown.css +8 -3
- package/src/client/theme/styles/variables.css +34 -9
- package/src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx +46 -0
- package/src/client/theme/ui/ErrorBoundary/index.ts +1 -0
- package/src/client/theme/ui/Layout/Layout.tsx +10 -11
- 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 +99 -0
- package/src/client/theme/ui/Navbar/navbar.css +119 -5
- package/src/client/theme/ui/OnThisPage/OnThisPage.tsx +66 -57
- package/src/client/theme/ui/OnThisPage/toc.css +30 -10
- package/src/client/theme/ui/ProgressBar/ProgressBar.css +17 -0
- package/src/client/theme/ui/ProgressBar/ProgressBar.tsx +51 -0
- package/src/client/theme/ui/ProgressBar/index.ts +1 -0
- package/src/client/theme/ui/SearchDialog/SearchDialog.tsx +11 -1
- 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 +12 -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 +13 -1
- package/src/node/routes/parser.ts +32 -7
- package/src/node/routes/types.ts +11 -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,12 +836,94 @@ 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 containerRef = (0, import_react8.useRef)(null);
|
|
843
|
+
const tabRefs = (0, import_react8.useRef)([]);
|
|
844
|
+
const [indicatorStyle, setIndicatorStyle] = (0, import_react8.useState)({
|
|
845
|
+
opacity: 0,
|
|
846
|
+
transform: "translateX(0) scaleX(0)",
|
|
847
|
+
width: 0
|
|
848
|
+
});
|
|
849
|
+
const currentRoute = routes.find((r) => r.path === location.pathname);
|
|
850
|
+
const currentTabId = currentRoute?.tab?.toLowerCase();
|
|
851
|
+
const activeIndex = tabs.findIndex(
|
|
852
|
+
(tab) => currentTabId ? currentTabId === tab.id.toLowerCase() : false
|
|
853
|
+
);
|
|
854
|
+
const finalActiveIndex = activeIndex === -1 ? 0 : activeIndex;
|
|
855
|
+
(0, import_react8.useEffect)(() => {
|
|
856
|
+
const activeTab = tabRefs.current[finalActiveIndex];
|
|
857
|
+
if (activeTab) {
|
|
858
|
+
setIndicatorStyle({
|
|
859
|
+
opacity: 1,
|
|
860
|
+
width: activeTab.offsetWidth,
|
|
861
|
+
transform: `translateX(${activeTab.offsetLeft}px)`
|
|
862
|
+
});
|
|
863
|
+
}
|
|
864
|
+
}, [finalActiveIndex, tabs, location.pathname]);
|
|
865
|
+
if (!tabs || tabs.length === 0) return null;
|
|
866
|
+
const renderTabIcon = (iconName) => {
|
|
867
|
+
if (!iconName) return null;
|
|
868
|
+
if (iconName.trim().startsWith("<svg")) {
|
|
869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
870
|
+
"span",
|
|
871
|
+
{
|
|
872
|
+
className: "tab-icon svg-icon",
|
|
873
|
+
dangerouslySetInnerHTML: { __html: iconName }
|
|
874
|
+
}
|
|
875
|
+
);
|
|
876
|
+
}
|
|
877
|
+
const LucideIcon = Icons[iconName];
|
|
878
|
+
if (LucideIcon) {
|
|
879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(LucideIcon, { size: 16, className: "tab-icon lucide-icon" });
|
|
880
|
+
}
|
|
881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("img", { src: iconName, alt: "", className: "tab-icon img-icon" });
|
|
882
|
+
};
|
|
883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "boltdocs-tabs-container", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "boltdocs-tabs", ref: containerRef, children: [
|
|
884
|
+
tabs.map((tab, index) => {
|
|
885
|
+
const isActive = index === finalActiveIndex;
|
|
886
|
+
const firstRoute = routes.find(
|
|
887
|
+
(r) => r.tab && r.tab.toLowerCase() === tab.id.toLowerCase()
|
|
888
|
+
);
|
|
889
|
+
const linkTo = firstRoute ? firstRoute.path : "#";
|
|
890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
891
|
+
Link,
|
|
892
|
+
{
|
|
893
|
+
to: linkTo,
|
|
894
|
+
ref: (el) => {
|
|
895
|
+
tabRefs.current[index] = el;
|
|
896
|
+
},
|
|
897
|
+
className: `boltdocs-tab-item ${isActive ? "active" : ""}`,
|
|
898
|
+
children: [
|
|
899
|
+
renderTabIcon(tab.icon),
|
|
900
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: tab.text })
|
|
901
|
+
]
|
|
902
|
+
},
|
|
903
|
+
tab.id
|
|
904
|
+
);
|
|
905
|
+
}),
|
|
906
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "boltdocs-tab-indicator", style: indicatorStyle })
|
|
907
|
+
] }) });
|
|
908
|
+
}
|
|
909
|
+
var import_react8, import_react_router_dom4, Icons, import_jsx_runtime11;
|
|
910
|
+
var init_Tabs = __esm({
|
|
911
|
+
"src/client/theme/ui/Navbar/Tabs.tsx"() {
|
|
912
|
+
"use strict";
|
|
913
|
+
import_react8 = require("react");
|
|
914
|
+
import_react_router_dom4 = require("react-router-dom");
|
|
915
|
+
init_Link2();
|
|
916
|
+
Icons = __toESM(require("lucide-react"));
|
|
917
|
+
import_jsx_runtime11 = require("react/jsx-runtime");
|
|
918
|
+
}
|
|
919
|
+
});
|
|
920
|
+
|
|
844
921
|
// src/client/theme/ui/SearchDialog/SearchDialog.tsx
|
|
845
922
|
function SearchDialog({ routes }) {
|
|
846
|
-
const [isOpen, setIsOpen] = (0,
|
|
847
|
-
const [query, setQuery] = (0,
|
|
848
|
-
const inputRef = (0,
|
|
849
|
-
(0,
|
|
923
|
+
const [isOpen, setIsOpen] = (0, import_react9.useState)(false);
|
|
924
|
+
const [query, setQuery] = (0, import_react9.useState)("");
|
|
925
|
+
const inputRef = (0, import_react9.useRef)(null);
|
|
926
|
+
(0, import_react9.useEffect)(() => {
|
|
850
927
|
const handleKeyDown = (e) => {
|
|
851
928
|
if ((e.metaKey || e.ctrlKey) && e.key === "k") {
|
|
852
929
|
e.preventDefault();
|
|
@@ -859,14 +936,14 @@ function SearchDialog({ routes }) {
|
|
|
859
936
|
window.addEventListener("keydown", handleKeyDown);
|
|
860
937
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
861
938
|
}, [isOpen]);
|
|
862
|
-
(0,
|
|
939
|
+
(0, import_react9.useEffect)(() => {
|
|
863
940
|
if (isOpen) {
|
|
864
941
|
setTimeout(() => inputRef.current?.focus(), 50);
|
|
865
942
|
} else {
|
|
866
943
|
setQuery("");
|
|
867
944
|
}
|
|
868
945
|
}, [isOpen]);
|
|
869
|
-
const searchResults =
|
|
946
|
+
const searchResults = import_react9.default.useMemo(() => {
|
|
870
947
|
if (!query) {
|
|
871
948
|
return routes.slice(0, 10).map((r) => ({
|
|
872
949
|
title: r.title,
|
|
@@ -896,6 +973,13 @@ function SearchDialog({ routes }) {
|
|
|
896
973
|
}
|
|
897
974
|
}
|
|
898
975
|
}
|
|
976
|
+
if (route._content && route._content.toLowerCase().includes(lowerQuery)) {
|
|
977
|
+
results.push({
|
|
978
|
+
title: route.title,
|
|
979
|
+
path: route.path,
|
|
980
|
+
groupTitle: route.groupTitle
|
|
981
|
+
});
|
|
982
|
+
}
|
|
899
983
|
}
|
|
900
984
|
const uniqueResults = [];
|
|
901
985
|
const seenPaths = /* @__PURE__ */ new Set();
|
|
@@ -907,8 +991,8 @@ function SearchDialog({ routes }) {
|
|
|
907
991
|
}
|
|
908
992
|
return uniqueResults.slice(0, 10);
|
|
909
993
|
}, [routes, query]);
|
|
910
|
-
return /* @__PURE__ */ (0,
|
|
911
|
-
/* @__PURE__ */ (0,
|
|
994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
995
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
912
996
|
"div",
|
|
913
997
|
{
|
|
914
998
|
className: "navbar-search",
|
|
@@ -923,19 +1007,19 @@ function SearchDialog({ routes }) {
|
|
|
923
1007
|
},
|
|
924
1008
|
"aria-label": "Open search dialog",
|
|
925
1009
|
children: [
|
|
926
|
-
/* @__PURE__ */ (0,
|
|
1010
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Search, { className: "boltdocs-search-icon", size: 18 }),
|
|
927
1011
|
"Search docs...",
|
|
928
|
-
/* @__PURE__ */ (0,
|
|
1012
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("kbd", { children: "\u2318K" })
|
|
929
1013
|
]
|
|
930
1014
|
}
|
|
931
1015
|
),
|
|
932
1016
|
isOpen && (0, import_react_dom2.createPortal)(
|
|
933
|
-
/* @__PURE__ */ (0,
|
|
1017
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
934
1018
|
"div",
|
|
935
1019
|
{
|
|
936
1020
|
className: "boltdocs-search-overlay",
|
|
937
1021
|
onPointerDown: () => setIsOpen(false),
|
|
938
|
-
children: /* @__PURE__ */ (0,
|
|
1022
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
939
1023
|
"div",
|
|
940
1024
|
{
|
|
941
1025
|
className: "boltdocs-search-modal",
|
|
@@ -944,9 +1028,9 @@ function SearchDialog({ routes }) {
|
|
|
944
1028
|
"aria-label": "Search",
|
|
945
1029
|
onPointerDown: (e) => e.stopPropagation(),
|
|
946
1030
|
children: [
|
|
947
|
-
/* @__PURE__ */ (0,
|
|
948
|
-
/* @__PURE__ */ (0,
|
|
949
|
-
/* @__PURE__ */ (0,
|
|
1031
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "boltdocs-search-header", children: [
|
|
1032
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react4.Search, { size: 18 }),
|
|
1033
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
950
1034
|
"input",
|
|
951
1035
|
{
|
|
952
1036
|
ref: inputRef,
|
|
@@ -957,7 +1041,7 @@ function SearchDialog({ routes }) {
|
|
|
957
1041
|
onChange: (e) => setQuery(e.target.value)
|
|
958
1042
|
}
|
|
959
1043
|
),
|
|
960
|
-
/* @__PURE__ */ (0,
|
|
1044
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
961
1045
|
"button",
|
|
962
1046
|
{
|
|
963
1047
|
className: "boltdocs-search-close",
|
|
@@ -967,7 +1051,7 @@ function SearchDialog({ routes }) {
|
|
|
967
1051
|
}
|
|
968
1052
|
)
|
|
969
1053
|
] }),
|
|
970
|
-
/* @__PURE__ */ (0,
|
|
1054
|
+
/* @__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
1055
|
Link,
|
|
972
1056
|
{
|
|
973
1057
|
to: result.path === "" ? "/" : result.path,
|
|
@@ -994,15 +1078,15 @@ function SearchDialog({ routes }) {
|
|
|
994
1078
|
setIsOpen(false);
|
|
995
1079
|
},
|
|
996
1080
|
children: [
|
|
997
|
-
/* @__PURE__ */ (0,
|
|
998
|
-
result.isHeading ? /* @__PURE__ */ (0,
|
|
1081
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "boltdocs-search-result-title", children: [
|
|
1082
|
+
result.isHeading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "heading-indicator", children: "#" }) : null,
|
|
999
1083
|
result.title
|
|
1000
1084
|
] }),
|
|
1001
|
-
result.groupTitle && /* @__PURE__ */ (0,
|
|
1085
|
+
result.groupTitle && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "boltdocs-search-result-group", children: result.groupTitle })
|
|
1002
1086
|
]
|
|
1003
1087
|
},
|
|
1004
1088
|
result.path
|
|
1005
|
-
)) : /* @__PURE__ */ (0,
|
|
1089
|
+
)) : /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "boltdocs-search-empty", children: [
|
|
1006
1090
|
'No results found for "',
|
|
1007
1091
|
query,
|
|
1008
1092
|
'"'
|
|
@@ -1016,15 +1100,15 @@ function SearchDialog({ routes }) {
|
|
|
1016
1100
|
)
|
|
1017
1101
|
] });
|
|
1018
1102
|
}
|
|
1019
|
-
var
|
|
1103
|
+
var import_react9, import_react_dom2, import_lucide_react4, import_jsx_runtime12;
|
|
1020
1104
|
var init_SearchDialog = __esm({
|
|
1021
1105
|
"src/client/theme/ui/SearchDialog/SearchDialog.tsx"() {
|
|
1022
1106
|
"use strict";
|
|
1023
|
-
|
|
1107
|
+
import_react9 = __toESM(require("react"));
|
|
1024
1108
|
import_react_dom2 = require("react-dom");
|
|
1025
1109
|
init_Link2();
|
|
1026
1110
|
import_lucide_react4 = require("lucide-react");
|
|
1027
|
-
|
|
1111
|
+
import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1028
1112
|
}
|
|
1029
1113
|
});
|
|
1030
1114
|
|
|
@@ -1048,88 +1132,130 @@ function Navbar({
|
|
|
1048
1132
|
currentLocale,
|
|
1049
1133
|
currentVersion
|
|
1050
1134
|
}) {
|
|
1135
|
+
const location = (0, import_react_router_dom5.useLocation)();
|
|
1136
|
+
const isHomePage = location.pathname === "/";
|
|
1051
1137
|
const title = config.themeConfig?.title || "Boltdocs";
|
|
1052
1138
|
const navItems = config.themeConfig?.navbar || [];
|
|
1053
1139
|
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,
|
|
1077
|
-
{
|
|
1078
|
-
versions: config.versions,
|
|
1079
|
-
currentVersion,
|
|
1080
|
-
currentLocale,
|
|
1081
|
-
allRoutes
|
|
1082
|
-
}
|
|
1083
|
-
) : config.themeConfig?.version ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "navbar-version", children: [
|
|
1084
|
-
config.themeConfig.version,
|
|
1085
|
-
" ",
|
|
1086
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react5.ChevronDown, { size: 14 })
|
|
1087
|
-
] }) : null,
|
|
1088
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("nav", { className: "navbar-links", "aria-label": "Top Navigation", children: navItems.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Link, { to: item.link, children: item.text }, i)) })
|
|
1089
|
-
] }),
|
|
1090
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "navbar-right", children: [
|
|
1091
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1092
|
-
import_react9.default.Suspense,
|
|
1140
|
+
const hasTabs = !isHomePage && config.themeConfig?.tabs && config.themeConfig.tabs.length > 0;
|
|
1141
|
+
const leftItems = navItems.filter((item) => item.position !== "right");
|
|
1142
|
+
const rightItems = navItems.filter((item) => item.position === "right");
|
|
1143
|
+
const renderNavItem = (item, i) => {
|
|
1144
|
+
const text = item.label || item.text || "";
|
|
1145
|
+
const href = item.to || item.href || item.link || "";
|
|
1146
|
+
const isExternal = href.startsWith("http") || href.startsWith("//") || href.includes("://");
|
|
1147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_router_dom5.Link, { to: href, target: isExternal ? "_blank" : void 0, children: [
|
|
1148
|
+
text,
|
|
1149
|
+
isExternal && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "navbar-external-icon", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1150
|
+
"svg",
|
|
1093
1151
|
{
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1152
|
+
viewBox: "0 0 24 24",
|
|
1153
|
+
width: "13",
|
|
1154
|
+
height: "13",
|
|
1155
|
+
stroke: "currentColor",
|
|
1156
|
+
strokeWidth: "2",
|
|
1157
|
+
fill: "none",
|
|
1158
|
+
strokeLinecap: "round",
|
|
1159
|
+
strokeLinejoin: "round",
|
|
1160
|
+
children: [
|
|
1161
|
+
/* @__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" }),
|
|
1162
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("polyline", { points: "15 3 21 3 21 9" }),
|
|
1163
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
|
|
1164
|
+
]
|
|
1104
1165
|
}
|
|
1105
|
-
)
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1166
|
+
) })
|
|
1167
|
+
] }, i);
|
|
1168
|
+
};
|
|
1169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("header", { className: `boltdocs-navbar ${hasTabs ? "has-tabs" : ""}`, children: [
|
|
1170
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1171
|
+
"div",
|
|
1172
|
+
{
|
|
1173
|
+
className: "navbar-container",
|
|
1174
|
+
style: { height: "var(--ld-navbar-height)" },
|
|
1175
|
+
children: [
|
|
1176
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "navbar-left", children: [
|
|
1177
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-logo", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_router_dom5.Link, { to: "/", children: [
|
|
1178
|
+
config.themeConfig?.logo ? config.themeConfig.logo.trim().startsWith("<svg") ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1179
|
+
"span",
|
|
1180
|
+
{
|
|
1181
|
+
className: "navbar-logo-svg",
|
|
1182
|
+
dangerouslySetInnerHTML: {
|
|
1183
|
+
__html: config.themeConfig.logo
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1187
|
+
"img",
|
|
1188
|
+
{
|
|
1189
|
+
src: config.themeConfig.logo,
|
|
1190
|
+
alt: title,
|
|
1191
|
+
className: "navbar-logo-img"
|
|
1192
|
+
}
|
|
1193
|
+
) : null,
|
|
1194
|
+
title
|
|
1195
|
+
] }) }),
|
|
1196
|
+
config.versions && currentVersion && allRoutes ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1197
|
+
VersionSwitcher,
|
|
1198
|
+
{
|
|
1199
|
+
versions: config.versions,
|
|
1200
|
+
currentVersion,
|
|
1201
|
+
currentLocale,
|
|
1202
|
+
allRoutes
|
|
1203
|
+
}
|
|
1204
|
+
) : config.themeConfig?.version ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "navbar-version", children: [
|
|
1205
|
+
config.themeConfig.version,
|
|
1206
|
+
" ",
|
|
1207
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_lucide_react5.ChevronDown, { size: 14 })
|
|
1208
|
+
] }) : null,
|
|
1209
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { className: "navbar-links", "aria-label": "Top Navigation Left", children: leftItems.map(renderNavItem) })
|
|
1210
|
+
] }),
|
|
1211
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "navbar-right", children: [
|
|
1212
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { className: "navbar-links", "aria-label": "Top Navigation Right", children: rightItems.map(renderNavItem) }),
|
|
1213
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react10.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-search-placeholder" }), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SearchDialog2, { routes: routes || [] }) }),
|
|
1214
|
+
config.i18n && currentLocale && allRoutes && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1215
|
+
LanguageSwitcher,
|
|
1216
|
+
{
|
|
1217
|
+
i18n: config.i18n,
|
|
1218
|
+
currentLocale,
|
|
1219
|
+
allRoutes
|
|
1220
|
+
}
|
|
1221
|
+
),
|
|
1222
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ThemeToggle, {}),
|
|
1223
|
+
config.themeConfig?.githubRepo && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(GithubStars, { repo: config.themeConfig.githubRepo }),
|
|
1224
|
+
socialLinks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-divider" }),
|
|
1225
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "navbar-icons", children: socialLinks.map((link, i) => {
|
|
1226
|
+
const IconComp = ICON_MAP[link.icon.toLowerCase()];
|
|
1227
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1228
|
+
"a",
|
|
1229
|
+
{
|
|
1230
|
+
href: link.link,
|
|
1231
|
+
target: "_blank",
|
|
1232
|
+
rel: "noopener noreferrer",
|
|
1233
|
+
className: "navbar-icon-btn",
|
|
1234
|
+
"aria-label": link.icon,
|
|
1235
|
+
children: IconComp ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconComp, {}) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: link.icon })
|
|
1236
|
+
},
|
|
1237
|
+
i
|
|
1238
|
+
);
|
|
1239
|
+
}) })
|
|
1240
|
+
] })
|
|
1241
|
+
]
|
|
1242
|
+
}
|
|
1243
|
+
),
|
|
1244
|
+
hasTabs && config.themeConfig?.tabs && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1245
|
+
Tabs,
|
|
1246
|
+
{
|
|
1247
|
+
tabs: config.themeConfig.tabs,
|
|
1248
|
+
routes: allRoutes || routes || []
|
|
1249
|
+
}
|
|
1250
|
+
)
|
|
1251
|
+
] });
|
|
1126
1252
|
}
|
|
1127
|
-
var
|
|
1253
|
+
var import_react10, import_react_router_dom5, import_lucide_react5, import_jsx_runtime13, SearchDialog2, ICON_MAP;
|
|
1128
1254
|
var init_Navbar = __esm({
|
|
1129
1255
|
"src/client/theme/ui/Navbar/Navbar.tsx"() {
|
|
1130
1256
|
"use strict";
|
|
1131
|
-
|
|
1132
|
-
|
|
1257
|
+
import_react10 = require("react");
|
|
1258
|
+
import_react_router_dom5 = require("react-router-dom");
|
|
1133
1259
|
import_lucide_react5 = require("lucide-react");
|
|
1134
1260
|
init_LanguageSwitcher2();
|
|
1135
1261
|
init_VersionSwitcher2();
|
|
@@ -1137,8 +1263,9 @@ var init_Navbar = __esm({
|
|
|
1137
1263
|
init_discord();
|
|
1138
1264
|
init_twitter();
|
|
1139
1265
|
init_GithubStars();
|
|
1140
|
-
|
|
1141
|
-
|
|
1266
|
+
init_Tabs();
|
|
1267
|
+
import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1268
|
+
SearchDialog2 = (0, import_react10.lazy)(
|
|
1142
1269
|
() => Promise.resolve().then(() => (init_SearchDialog2(), SearchDialog_exports)).then((m) => ({ default: m.SearchDialog }))
|
|
1143
1270
|
);
|
|
1144
1271
|
ICON_MAP = {
|
|
@@ -1159,7 +1286,7 @@ var init_Navbar2 = __esm({
|
|
|
1159
1286
|
|
|
1160
1287
|
// src/client/theme/ui/PoweredBy/PoweredBy.tsx
|
|
1161
1288
|
function PoweredBy() {
|
|
1162
|
-
return /* @__PURE__ */ (0,
|
|
1289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "powered-by-container", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1163
1290
|
"a",
|
|
1164
1291
|
{
|
|
1165
1292
|
href: "https://github.com/jesusalcaladev/boltdocs",
|
|
@@ -1167,19 +1294,19 @@ function PoweredBy() {
|
|
|
1167
1294
|
rel: "noopener noreferrer",
|
|
1168
1295
|
className: "powered-by-link",
|
|
1169
1296
|
children: [
|
|
1170
|
-
/* @__PURE__ */ (0,
|
|
1171
|
-
/* @__PURE__ */ (0,
|
|
1172
|
-
/* @__PURE__ */ (0,
|
|
1297
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react6.Zap, { className: "powered-by-icon", size: 12, fill: "currentColor" }),
|
|
1298
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: "Powered by" }),
|
|
1299
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "powered-by-brand", children: "LiteDocs" })
|
|
1173
1300
|
]
|
|
1174
1301
|
}
|
|
1175
1302
|
) });
|
|
1176
1303
|
}
|
|
1177
|
-
var import_lucide_react6,
|
|
1304
|
+
var import_lucide_react6, import_jsx_runtime14;
|
|
1178
1305
|
var init_PoweredBy = __esm({
|
|
1179
1306
|
"src/client/theme/ui/PoweredBy/PoweredBy.tsx"() {
|
|
1180
1307
|
"use strict";
|
|
1181
1308
|
import_lucide_react6 = require("lucide-react");
|
|
1182
|
-
|
|
1309
|
+
import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1183
1310
|
}
|
|
1184
1311
|
});
|
|
1185
1312
|
|
|
@@ -1212,7 +1339,6 @@ function renderBadge(badgeRaw) {
|
|
|
1212
1339
|
}
|
|
1213
1340
|
}
|
|
1214
1341
|
if (!text) return null;
|
|
1215
|
-
if (!text) return null;
|
|
1216
1342
|
let typeClass = "badge-default";
|
|
1217
1343
|
const lowerText = text.toLowerCase();
|
|
1218
1344
|
if (lowerText === "new") {
|
|
@@ -1222,18 +1348,51 @@ function renderBadge(badgeRaw) {
|
|
|
1222
1348
|
} else if (lowerText === "updated") {
|
|
1223
1349
|
typeClass = "badge-updated";
|
|
1224
1350
|
}
|
|
1225
|
-
return /* @__PURE__ */ (0,
|
|
1351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: `sidebar-badge ${typeClass}`, children: text });
|
|
1352
|
+
}
|
|
1353
|
+
function renderIcon(iconName, size = 16) {
|
|
1354
|
+
if (!iconName) return null;
|
|
1355
|
+
const trimmed = iconName.trim();
|
|
1356
|
+
if (trimmed.startsWith("<svg") || trimmed.includes("http")) {
|
|
1357
|
+
if (trimmed.startsWith("<svg")) {
|
|
1358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1359
|
+
"span",
|
|
1360
|
+
{
|
|
1361
|
+
className: "sidebar-icon svg-icon",
|
|
1362
|
+
dangerouslySetInnerHTML: { __html: trimmed }
|
|
1363
|
+
}
|
|
1364
|
+
);
|
|
1365
|
+
}
|
|
1366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1367
|
+
"img",
|
|
1368
|
+
{
|
|
1369
|
+
src: trimmed,
|
|
1370
|
+
className: "sidebar-icon",
|
|
1371
|
+
style: { width: size, height: size },
|
|
1372
|
+
alt: ""
|
|
1373
|
+
}
|
|
1374
|
+
);
|
|
1375
|
+
}
|
|
1376
|
+
const IconComponent = LucideIcons[iconName];
|
|
1377
|
+
if (IconComponent) {
|
|
1378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconComponent, { size, className: "sidebar-icon lucide-icon" });
|
|
1379
|
+
}
|
|
1380
|
+
return null;
|
|
1226
1381
|
}
|
|
1227
1382
|
function Sidebar({
|
|
1228
1383
|
routes,
|
|
1229
|
-
config
|
|
1230
|
-
isCollapsed,
|
|
1231
|
-
onToggle
|
|
1384
|
+
config
|
|
1232
1385
|
}) {
|
|
1233
|
-
const location = (0,
|
|
1386
|
+
const location = (0, import_react_router_dom6.useLocation)();
|
|
1387
|
+
const currentRoute = routes.find((r) => r.path === location.pathname);
|
|
1388
|
+
const activeTabId = currentRoute?.tab?.toLowerCase();
|
|
1389
|
+
const filteredRoutes = activeTabId ? routes.filter((r) => {
|
|
1390
|
+
if (!r.tab) return true;
|
|
1391
|
+
return r.tab.toLowerCase() === activeTabId;
|
|
1392
|
+
}) : routes;
|
|
1234
1393
|
const ungrouped = [];
|
|
1235
1394
|
const groupMap = /* @__PURE__ */ new Map();
|
|
1236
|
-
for (const route of
|
|
1395
|
+
for (const route of filteredRoutes) {
|
|
1237
1396
|
if (!route.group) {
|
|
1238
1397
|
ungrouped.push(route);
|
|
1239
1398
|
} else {
|
|
@@ -1241,49 +1400,41 @@ function Sidebar({
|
|
|
1241
1400
|
groupMap.set(route.group, {
|
|
1242
1401
|
slug: route.group,
|
|
1243
1402
|
title: route.groupTitle || route.group,
|
|
1244
|
-
routes: []
|
|
1403
|
+
routes: [],
|
|
1404
|
+
icon: route.groupIcon
|
|
1245
1405
|
});
|
|
1246
1406
|
}
|
|
1247
1407
|
groupMap.get(route.group).routes.push(route);
|
|
1248
1408
|
}
|
|
1249
1409
|
}
|
|
1250
1410
|
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
|
-
] })
|
|
1411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("aside", { className: "boltdocs-sidebar", children: [
|
|
1412
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("nav", { "aria-label": "Main Navigation", children: [
|
|
1413
|
+
/* @__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)(
|
|
1414
|
+
Link,
|
|
1415
|
+
{
|
|
1416
|
+
to: route.path === "" ? "/" : route.path,
|
|
1417
|
+
className: `sidebar-link ${location.pathname === route.path ? "active" : ""}`,
|
|
1418
|
+
"aria-current": location.pathname === route.path ? "page" : void 0,
|
|
1419
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-content", children: [
|
|
1420
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-title-container", children: [
|
|
1421
|
+
renderIcon(route.icon),
|
|
1422
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: route.title })
|
|
1423
|
+
] }),
|
|
1424
|
+
renderBadge(route.badge)
|
|
1425
|
+
] })
|
|
1426
|
+
}
|
|
1427
|
+
) }, route.path)) }),
|
|
1428
|
+
groups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1429
|
+
SidebarGroupSection,
|
|
1430
|
+
{
|
|
1431
|
+
group,
|
|
1432
|
+
currentPath: location.pathname
|
|
1433
|
+
},
|
|
1434
|
+
group.slug
|
|
1435
|
+
))
|
|
1436
|
+
] }),
|
|
1437
|
+
config.themeConfig?.poweredBy !== false && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(PoweredBy, {})
|
|
1287
1438
|
] });
|
|
1288
1439
|
}
|
|
1289
1440
|
function SidebarGroupSection({
|
|
@@ -1291,9 +1442,9 @@ function SidebarGroupSection({
|
|
|
1291
1442
|
currentPath
|
|
1292
1443
|
}) {
|
|
1293
1444
|
const isActive = group.routes.some((r) => currentPath === r.path);
|
|
1294
|
-
const [open, setOpen] = (0,
|
|
1295
|
-
return /* @__PURE__ */ (0,
|
|
1296
|
-
/* @__PURE__ */ (0,
|
|
1445
|
+
const [open, setOpen] = (0, import_react11.useState)(true);
|
|
1446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-group", children: [
|
|
1447
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1297
1448
|
"button",
|
|
1298
1449
|
{
|
|
1299
1450
|
className: `sidebar-group-header ${isActive ? "active" : ""}`,
|
|
@@ -1301,35 +1452,39 @@ function SidebarGroupSection({
|
|
|
1301
1452
|
"aria-expanded": open,
|
|
1302
1453
|
"aria-controls": `sidebar-group-${group.slug}`,
|
|
1303
1454
|
children: [
|
|
1304
|
-
/* @__PURE__ */ (0,
|
|
1305
|
-
/* @__PURE__ */ (0,
|
|
1455
|
+
/* @__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 }) }),
|
|
1456
|
+
/* @__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
1457
|
]
|
|
1307
1458
|
}
|
|
1308
1459
|
),
|
|
1309
|
-
open && /* @__PURE__ */ (0,
|
|
1460
|
+
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
1461
|
Link,
|
|
1311
1462
|
{
|
|
1312
1463
|
to: route.path === "" ? "/" : route.path,
|
|
1313
1464
|
className: `sidebar-link sidebar-link-nested ${currentPath === route.path ? "active" : ""}`,
|
|
1314
1465
|
"aria-current": currentPath === route.path ? "page" : void 0,
|
|
1315
|
-
children: /* @__PURE__ */ (0,
|
|
1316
|
-
/* @__PURE__ */ (0,
|
|
1466
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-content", children: [
|
|
1467
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "sidebar-link-title-container", children: [
|
|
1468
|
+
renderIcon(route.icon),
|
|
1469
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: route.title })
|
|
1470
|
+
] }),
|
|
1317
1471
|
renderBadge(route.badge)
|
|
1318
1472
|
] })
|
|
1319
1473
|
}
|
|
1320
1474
|
) }, route.path)) })
|
|
1321
1475
|
] });
|
|
1322
1476
|
}
|
|
1323
|
-
var
|
|
1477
|
+
var import_react11, import_react_router_dom6, import_lucide_react7, LucideIcons, import_jsx_runtime15;
|
|
1324
1478
|
var init_Sidebar = __esm({
|
|
1325
1479
|
"src/client/theme/ui/Sidebar/Sidebar.tsx"() {
|
|
1326
1480
|
"use strict";
|
|
1327
|
-
|
|
1328
|
-
|
|
1481
|
+
import_react11 = require("react");
|
|
1482
|
+
import_react_router_dom6 = require("react-router-dom");
|
|
1329
1483
|
init_Link2();
|
|
1330
1484
|
init_PoweredBy2();
|
|
1331
1485
|
import_lucide_react7 = require("lucide-react");
|
|
1332
|
-
|
|
1486
|
+
LucideIcons = __toESM(require("lucide-react"));
|
|
1487
|
+
import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1333
1488
|
}
|
|
1334
1489
|
});
|
|
1335
1490
|
|
|
@@ -1348,12 +1503,13 @@ function OnThisPage({
|
|
|
1348
1503
|
communityHelp,
|
|
1349
1504
|
filePath
|
|
1350
1505
|
}) {
|
|
1351
|
-
const [activeId, setActiveId] = (0,
|
|
1352
|
-
const [indicatorStyle, setIndicatorStyle] = (0,
|
|
1353
|
-
const observerRef = (0,
|
|
1354
|
-
const location = (0,
|
|
1355
|
-
const listRef = (0,
|
|
1356
|
-
(0,
|
|
1506
|
+
const [activeId, setActiveId] = (0, import_react12.useState)(null);
|
|
1507
|
+
const [indicatorStyle, setIndicatorStyle] = (0, import_react12.useState)({});
|
|
1508
|
+
const observerRef = (0, import_react12.useRef)(null);
|
|
1509
|
+
const location = (0, import_react_router_dom7.useLocation)();
|
|
1510
|
+
const listRef = (0, import_react12.useRef)(null);
|
|
1511
|
+
const visibleIdsRef = (0, import_react12.useRef)(/* @__PURE__ */ new Set());
|
|
1512
|
+
(0, import_react12.useEffect)(() => {
|
|
1357
1513
|
if (headings.length > 0) {
|
|
1358
1514
|
const hash = window.location.hash.substring(1);
|
|
1359
1515
|
if (hash && headings.some((h) => h.id === hash)) {
|
|
@@ -1363,38 +1519,55 @@ function OnThisPage({
|
|
|
1363
1519
|
}
|
|
1364
1520
|
}
|
|
1365
1521
|
}, [location.pathname, headings]);
|
|
1366
|
-
(0,
|
|
1522
|
+
(0, import_react12.useEffect)(() => {
|
|
1367
1523
|
if (!activeId || !listRef.current) return;
|
|
1368
|
-
const
|
|
1524
|
+
const activeLink = listRef.current.querySelector(
|
|
1369
1525
|
`a[href="#${activeId}"]`
|
|
1370
1526
|
);
|
|
1371
|
-
if (
|
|
1372
|
-
const
|
|
1527
|
+
if (activeLink) {
|
|
1528
|
+
const top = activeLink.offsetTop;
|
|
1529
|
+
const height = activeLink.offsetHeight;
|
|
1373
1530
|
setIndicatorStyle({
|
|
1374
|
-
transform: `translateY(${
|
|
1375
|
-
height: `${
|
|
1531
|
+
transform: `translateY(${top}px)`,
|
|
1532
|
+
height: `${height}px`,
|
|
1376
1533
|
opacity: 1
|
|
1377
1534
|
});
|
|
1378
1535
|
}
|
|
1379
1536
|
}, [activeId, headings]);
|
|
1380
|
-
(0,
|
|
1537
|
+
(0, import_react12.useEffect)(() => {
|
|
1381
1538
|
if (headings.length === 0) return;
|
|
1539
|
+
visibleIdsRef.current.clear();
|
|
1382
1540
|
if (observerRef.current) {
|
|
1383
1541
|
observerRef.current.disconnect();
|
|
1384
1542
|
}
|
|
1385
1543
|
const callback = (entries) => {
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1544
|
+
entries.forEach((entry) => {
|
|
1545
|
+
if (entry.isIntersecting) {
|
|
1546
|
+
visibleIdsRef.current.add(entry.target.id);
|
|
1547
|
+
} else {
|
|
1548
|
+
visibleIdsRef.current.delete(entry.target.id);
|
|
1549
|
+
}
|
|
1550
|
+
});
|
|
1551
|
+
const firstVisible = headings.find((h) => visibleIdsRef.current.has(h.id));
|
|
1552
|
+
if (firstVisible) {
|
|
1553
|
+
setActiveId(firstVisible.id);
|
|
1554
|
+
} else {
|
|
1555
|
+
const firstEl = document.getElementById(headings[0].id);
|
|
1556
|
+
if (firstEl) {
|
|
1557
|
+
const rect = firstEl.getBoundingClientRect();
|
|
1558
|
+
if (rect.top > 200) {
|
|
1559
|
+
setActiveId(headings[0].id);
|
|
1560
|
+
return;
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1392
1563
|
}
|
|
1393
1564
|
};
|
|
1394
|
-
|
|
1395
|
-
|
|
1565
|
+
const observerOptions = {
|
|
1566
|
+
root: document.querySelector(".boltdocs-content"),
|
|
1567
|
+
rootMargin: "-20% 0px -70% 0px",
|
|
1396
1568
|
threshold: [0, 1]
|
|
1397
|
-
}
|
|
1569
|
+
};
|
|
1570
|
+
observerRef.current = new IntersectionObserver(callback, observerOptions);
|
|
1398
1571
|
const observeHeadings = () => {
|
|
1399
1572
|
headings.forEach(({ id }) => {
|
|
1400
1573
|
const el = document.getElementById(id);
|
|
@@ -1419,39 +1592,31 @@ function OnThisPage({
|
|
|
1419
1592
|
window.removeEventListener("scroll", handleScroll);
|
|
1420
1593
|
};
|
|
1421
1594
|
}, [headings, location.pathname]);
|
|
1422
|
-
(0,
|
|
1595
|
+
(0, import_react12.useEffect)(() => {
|
|
1423
1596
|
if (!activeId || !listRef.current) return;
|
|
1424
1597
|
const activeLink = listRef.current.querySelector(
|
|
1425
1598
|
`a[href="#${activeId}"]`
|
|
1426
1599
|
);
|
|
1427
1600
|
if (activeLink) {
|
|
1428
|
-
const container = listRef.current.
|
|
1429
|
-
".boltdocs-on-this-page"
|
|
1430
|
-
);
|
|
1601
|
+
const container = listRef.current.parentElement;
|
|
1431
1602
|
if (!container) return;
|
|
1432
1603
|
const linkRect = activeLink.getBoundingClientRect();
|
|
1433
1604
|
const containerRect = container.getBoundingClientRect();
|
|
1434
1605
|
const isVisible = linkRect.top >= containerRect.top && linkRect.bottom <= containerRect.bottom;
|
|
1435
1606
|
if (!isVisible) {
|
|
1436
1607
|
activeLink.scrollIntoView({
|
|
1437
|
-
behavior: "
|
|
1608
|
+
behavior: "auto",
|
|
1438
1609
|
block: "nearest"
|
|
1439
1610
|
});
|
|
1440
1611
|
}
|
|
1441
1612
|
}
|
|
1442
1613
|
}, [activeId]);
|
|
1443
|
-
const handleClick = (0,
|
|
1614
|
+
const handleClick = (0, import_react12.useCallback)(
|
|
1444
1615
|
(e, id) => {
|
|
1445
1616
|
e.preventDefault();
|
|
1446
1617
|
const el = document.getElementById(id);
|
|
1447
1618
|
if (el) {
|
|
1448
|
-
|
|
1449
|
-
const bodyRect = document.body.getBoundingClientRect().top;
|
|
1450
|
-
const elementRect = el.getBoundingClientRect().top;
|
|
1451
|
-
const elementPosition = elementRect - bodyRect;
|
|
1452
|
-
const offsetPosition = elementPosition - offset;
|
|
1453
|
-
window.scrollTo({
|
|
1454
|
-
top: offsetPosition,
|
|
1619
|
+
el.scrollIntoView({
|
|
1455
1620
|
behavior: "smooth"
|
|
1456
1621
|
});
|
|
1457
1622
|
setActiveId(id);
|
|
@@ -1461,11 +1626,11 @@ function OnThisPage({
|
|
|
1461
1626
|
[]
|
|
1462
1627
|
);
|
|
1463
1628
|
if (headings.length === 0) return null;
|
|
1464
|
-
return /* @__PURE__ */ (0,
|
|
1465
|
-
/* @__PURE__ */ (0,
|
|
1466
|
-
/* @__PURE__ */ (0,
|
|
1467
|
-
/* @__PURE__ */ (0,
|
|
1468
|
-
/* @__PURE__ */ (0,
|
|
1629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("nav", { className: "boltdocs-on-this-page", "aria-label": "Table of contents", children: [
|
|
1630
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "on-this-page-title", children: "On this page" }),
|
|
1631
|
+
/* @__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: [
|
|
1632
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "toc-indicator", style: indicatorStyle }),
|
|
1633
|
+
/* @__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
1634
|
"a",
|
|
1470
1635
|
{
|
|
1471
1636
|
href: `#${h.id}`,
|
|
@@ -1475,11 +1640,11 @@ function OnThisPage({
|
|
|
1475
1640
|
children: h.text
|
|
1476
1641
|
}
|
|
1477
1642
|
) }, h.id)) })
|
|
1478
|
-
] }),
|
|
1479
|
-
(editLink || communityHelp) && /* @__PURE__ */ (0,
|
|
1480
|
-
/* @__PURE__ */ (0,
|
|
1481
|
-
/* @__PURE__ */ (0,
|
|
1482
|
-
editLink && filePath && /* @__PURE__ */ (0,
|
|
1643
|
+
] }) }),
|
|
1644
|
+
(editLink || communityHelp) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "toc-help", children: [
|
|
1645
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "toc-help-title", children: "Need help?" }),
|
|
1646
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("ul", { className: "toc-help-links", children: [
|
|
1647
|
+
editLink && filePath && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1483
1648
|
"a",
|
|
1484
1649
|
{
|
|
1485
1650
|
href: editLink.replace(":path", filePath),
|
|
@@ -1487,12 +1652,12 @@ function OnThisPage({
|
|
|
1487
1652
|
rel: "noopener noreferrer",
|
|
1488
1653
|
className: "toc-help-link",
|
|
1489
1654
|
children: [
|
|
1490
|
-
/* @__PURE__ */ (0,
|
|
1655
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react8.Pencil, { size: 16 }),
|
|
1491
1656
|
"Edit this page"
|
|
1492
1657
|
]
|
|
1493
1658
|
}
|
|
1494
1659
|
) }),
|
|
1495
|
-
communityHelp && /* @__PURE__ */ (0,
|
|
1660
|
+
communityHelp && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1496
1661
|
"a",
|
|
1497
1662
|
{
|
|
1498
1663
|
href: communityHelp,
|
|
@@ -1500,7 +1665,7 @@ function OnThisPage({
|
|
|
1500
1665
|
rel: "noopener noreferrer",
|
|
1501
1666
|
className: "toc-help-link",
|
|
1502
1667
|
children: [
|
|
1503
|
-
/* @__PURE__ */ (0,
|
|
1668
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react8.CircleHelp, { size: 16 }),
|
|
1504
1669
|
"Community help"
|
|
1505
1670
|
]
|
|
1506
1671
|
}
|
|
@@ -1509,14 +1674,14 @@ function OnThisPage({
|
|
|
1509
1674
|
] })
|
|
1510
1675
|
] });
|
|
1511
1676
|
}
|
|
1512
|
-
var
|
|
1677
|
+
var import_react12, import_react_router_dom7, import_lucide_react8, import_jsx_runtime16;
|
|
1513
1678
|
var init_OnThisPage = __esm({
|
|
1514
1679
|
"src/client/theme/ui/OnThisPage/OnThisPage.tsx"() {
|
|
1515
1680
|
"use strict";
|
|
1516
|
-
|
|
1517
|
-
|
|
1681
|
+
import_react12 = require("react");
|
|
1682
|
+
import_react_router_dom7 = require("react-router-dom");
|
|
1518
1683
|
import_lucide_react8 = require("lucide-react");
|
|
1519
|
-
|
|
1684
|
+
import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1520
1685
|
}
|
|
1521
1686
|
});
|
|
1522
1687
|
|
|
@@ -1530,8 +1695,8 @@ var init_OnThisPage2 = __esm({
|
|
|
1530
1695
|
|
|
1531
1696
|
// src/client/theme/ui/Head/Head.tsx
|
|
1532
1697
|
function Head({ siteTitle, siteDescription, routes }) {
|
|
1533
|
-
const location = (0,
|
|
1534
|
-
(0,
|
|
1698
|
+
const location = (0, import_react_router_dom8.useLocation)();
|
|
1699
|
+
(0, import_react13.useEffect)(() => {
|
|
1535
1700
|
const currentRoute = routes.find((r) => r.path === location.pathname);
|
|
1536
1701
|
const pageTitle = currentRoute?.title;
|
|
1537
1702
|
const pageDescription = currentRoute?.description || siteDescription || "";
|
|
@@ -1575,12 +1740,12 @@ function setMetaTag(attr, key, content) {
|
|
|
1575
1740
|
}
|
|
1576
1741
|
tag.content = content;
|
|
1577
1742
|
}
|
|
1578
|
-
var
|
|
1743
|
+
var import_react13, import_react_router_dom8;
|
|
1579
1744
|
var init_Head = __esm({
|
|
1580
1745
|
"src/client/theme/ui/Head/Head.tsx"() {
|
|
1581
1746
|
"use strict";
|
|
1582
|
-
|
|
1583
|
-
|
|
1747
|
+
import_react13 = require("react");
|
|
1748
|
+
import_react_router_dom8 = require("react-router-dom");
|
|
1584
1749
|
}
|
|
1585
1750
|
});
|
|
1586
1751
|
|
|
@@ -1594,21 +1759,21 @@ var init_Head2 = __esm({
|
|
|
1594
1759
|
|
|
1595
1760
|
// src/client/theme/ui/Breadcrumbs/Breadcrumbs.tsx
|
|
1596
1761
|
function Breadcrumbs({ routes, config }) {
|
|
1597
|
-
const location = (0,
|
|
1762
|
+
const location = (0, import_react_router_dom9.useLocation)();
|
|
1598
1763
|
if (config.themeConfig?.breadcrumbs === false) return null;
|
|
1599
1764
|
if (location.pathname === "/") return null;
|
|
1600
1765
|
const currentRoute = routes.find((r) => r.path === location.pathname);
|
|
1601
1766
|
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,
|
|
1767
|
+
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: [
|
|
1768
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: "boltdocs-breadcrumbs-item", children: [
|
|
1769
|
+
/* @__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 }) }),
|
|
1770
|
+
/* @__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
1771
|
] }),
|
|
1607
|
-
currentRoute?.groupTitle && /* @__PURE__ */ (0,
|
|
1608
|
-
groupRoute ? /* @__PURE__ */ (0,
|
|
1609
|
-
/* @__PURE__ */ (0,
|
|
1772
|
+
currentRoute?.groupTitle && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("li", { className: "boltdocs-breadcrumbs-item", children: [
|
|
1773
|
+
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 }),
|
|
1774
|
+
/* @__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
1775
|
] }),
|
|
1611
|
-
currentRoute?.title && /* @__PURE__ */ (0,
|
|
1776
|
+
currentRoute?.title && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("li", { className: "boltdocs-breadcrumbs-item", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1612
1777
|
"span",
|
|
1613
1778
|
{
|
|
1614
1779
|
className: "boltdocs-breadcrumbs-text boltdocs-breadcrumbs-active",
|
|
@@ -1618,14 +1783,14 @@ function Breadcrumbs({ routes, config }) {
|
|
|
1618
1783
|
) })
|
|
1619
1784
|
] }) });
|
|
1620
1785
|
}
|
|
1621
|
-
var
|
|
1786
|
+
var import_react_router_dom9, import_lucide_react9, import_jsx_runtime17;
|
|
1622
1787
|
var init_Breadcrumbs = __esm({
|
|
1623
1788
|
"src/client/theme/ui/Breadcrumbs/Breadcrumbs.tsx"() {
|
|
1624
1789
|
"use strict";
|
|
1625
|
-
|
|
1790
|
+
import_react_router_dom9 = require("react-router-dom");
|
|
1626
1791
|
init_Link2();
|
|
1627
1792
|
import_lucide_react9 = require("lucide-react");
|
|
1628
|
-
|
|
1793
|
+
import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1629
1794
|
}
|
|
1630
1795
|
});
|
|
1631
1796
|
|
|
@@ -1639,16 +1804,16 @@ var init_Breadcrumbs2 = __esm({
|
|
|
1639
1804
|
|
|
1640
1805
|
// src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx
|
|
1641
1806
|
function BackgroundGradient() {
|
|
1642
|
-
return /* @__PURE__ */ (0,
|
|
1643
|
-
/* @__PURE__ */ (0,
|
|
1644
|
-
/* @__PURE__ */ (0,
|
|
1807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "boltdocs-background-glow", children: [
|
|
1808
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "glow-shape glow-1" }),
|
|
1809
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "glow-shape glow-2" })
|
|
1645
1810
|
] });
|
|
1646
1811
|
}
|
|
1647
|
-
var
|
|
1812
|
+
var import_jsx_runtime18;
|
|
1648
1813
|
var init_BackgroundGradient = __esm({
|
|
1649
1814
|
"src/client/theme/ui/BackgroundGradient/BackgroundGradient.tsx"() {
|
|
1650
1815
|
"use strict";
|
|
1651
|
-
|
|
1816
|
+
import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1652
1817
|
}
|
|
1653
1818
|
});
|
|
1654
1819
|
|
|
@@ -1660,6 +1825,118 @@ var init_BackgroundGradient2 = __esm({
|
|
|
1660
1825
|
}
|
|
1661
1826
|
});
|
|
1662
1827
|
|
|
1828
|
+
// src/client/theme/ui/ProgressBar/ProgressBar.css
|
|
1829
|
+
var init_ProgressBar = __esm({
|
|
1830
|
+
"src/client/theme/ui/ProgressBar/ProgressBar.css"() {
|
|
1831
|
+
}
|
|
1832
|
+
});
|
|
1833
|
+
|
|
1834
|
+
// src/client/theme/ui/ProgressBar/ProgressBar.tsx
|
|
1835
|
+
function ProgressBar() {
|
|
1836
|
+
const [progress, setProgress] = (0, import_react14.useState)(0);
|
|
1837
|
+
(0, import_react14.useEffect)(() => {
|
|
1838
|
+
let container = null;
|
|
1839
|
+
let timer;
|
|
1840
|
+
const handleScroll = () => {
|
|
1841
|
+
if (!container) return;
|
|
1842
|
+
const { scrollTop, scrollHeight, clientHeight } = container;
|
|
1843
|
+
if (scrollHeight <= clientHeight) {
|
|
1844
|
+
setProgress(0);
|
|
1845
|
+
return;
|
|
1846
|
+
}
|
|
1847
|
+
const scrollPercent = scrollTop / (scrollHeight - clientHeight) * 100;
|
|
1848
|
+
setProgress(Math.min(100, Math.max(0, scrollPercent)));
|
|
1849
|
+
};
|
|
1850
|
+
const attachListener = () => {
|
|
1851
|
+
container = document.querySelector(".boltdocs-content");
|
|
1852
|
+
if (container) {
|
|
1853
|
+
container.addEventListener("scroll", handleScroll);
|
|
1854
|
+
handleScroll();
|
|
1855
|
+
if (timer) clearInterval(timer);
|
|
1856
|
+
return true;
|
|
1857
|
+
}
|
|
1858
|
+
return false;
|
|
1859
|
+
};
|
|
1860
|
+
if (!attachListener()) {
|
|
1861
|
+
timer = setInterval(attachListener, 100);
|
|
1862
|
+
}
|
|
1863
|
+
return () => {
|
|
1864
|
+
if (container) container.removeEventListener("scroll", handleScroll);
|
|
1865
|
+
if (timer) clearInterval(timer);
|
|
1866
|
+
};
|
|
1867
|
+
}, []);
|
|
1868
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: "boltdocs-progress-container", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1869
|
+
"div",
|
|
1870
|
+
{
|
|
1871
|
+
className: "boltdocs-progress-bar",
|
|
1872
|
+
style: { width: `${progress}%` }
|
|
1873
|
+
}
|
|
1874
|
+
) });
|
|
1875
|
+
}
|
|
1876
|
+
var import_react14, import_jsx_runtime19;
|
|
1877
|
+
var init_ProgressBar2 = __esm({
|
|
1878
|
+
"src/client/theme/ui/ProgressBar/ProgressBar.tsx"() {
|
|
1879
|
+
"use strict";
|
|
1880
|
+
import_react14 = require("react");
|
|
1881
|
+
init_ProgressBar();
|
|
1882
|
+
import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1883
|
+
}
|
|
1884
|
+
});
|
|
1885
|
+
|
|
1886
|
+
// src/client/theme/ui/ProgressBar/index.ts
|
|
1887
|
+
var init_ProgressBar3 = __esm({
|
|
1888
|
+
"src/client/theme/ui/ProgressBar/index.ts"() {
|
|
1889
|
+
"use strict";
|
|
1890
|
+
init_ProgressBar2();
|
|
1891
|
+
}
|
|
1892
|
+
});
|
|
1893
|
+
|
|
1894
|
+
// src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx
|
|
1895
|
+
var import_react15, import_jsx_runtime20, ErrorBoundary;
|
|
1896
|
+
var init_ErrorBoundary = __esm({
|
|
1897
|
+
"src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx"() {
|
|
1898
|
+
"use strict";
|
|
1899
|
+
import_react15 = require("react");
|
|
1900
|
+
import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1901
|
+
ErrorBoundary = class extends import_react15.Component {
|
|
1902
|
+
state = {
|
|
1903
|
+
hasError: false
|
|
1904
|
+
};
|
|
1905
|
+
static getDerivedStateFromError(error) {
|
|
1906
|
+
return { hasError: true, error };
|
|
1907
|
+
}
|
|
1908
|
+
componentDidCatch(error, errorInfo) {
|
|
1909
|
+
console.error("Uncaught error in Boltdocs Layout:", error, errorInfo);
|
|
1910
|
+
}
|
|
1911
|
+
render() {
|
|
1912
|
+
if (this.state.hasError) {
|
|
1913
|
+
return this.props.fallback || /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "boltdocs-error-boundary", children: [
|
|
1914
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "boltdocs-error-title", children: "Something went wrong" }),
|
|
1915
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "boltdocs-error-message", children: this.state.error?.message || "An unexpected error occurred while rendering this page." }),
|
|
1916
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1917
|
+
"button",
|
|
1918
|
+
{
|
|
1919
|
+
className: "boltdocs-error-retry",
|
|
1920
|
+
onClick: () => this.setState({ hasError: false }),
|
|
1921
|
+
children: "Try again"
|
|
1922
|
+
}
|
|
1923
|
+
)
|
|
1924
|
+
] });
|
|
1925
|
+
}
|
|
1926
|
+
return this.props.children;
|
|
1927
|
+
}
|
|
1928
|
+
};
|
|
1929
|
+
}
|
|
1930
|
+
});
|
|
1931
|
+
|
|
1932
|
+
// src/client/theme/ui/ErrorBoundary/index.ts
|
|
1933
|
+
var init_ErrorBoundary2 = __esm({
|
|
1934
|
+
"src/client/theme/ui/ErrorBoundary/index.ts"() {
|
|
1935
|
+
"use strict";
|
|
1936
|
+
init_ErrorBoundary();
|
|
1937
|
+
}
|
|
1938
|
+
});
|
|
1939
|
+
|
|
1663
1940
|
// src/client/theme/styles.css
|
|
1664
1941
|
var init_styles = __esm({
|
|
1665
1942
|
"src/client/theme/styles.css"() {
|
|
@@ -1680,10 +1957,9 @@ function ThemeLayout({
|
|
|
1680
1957
|
className = "",
|
|
1681
1958
|
style
|
|
1682
1959
|
}) {
|
|
1683
|
-
const [isSidebarOpen, setIsSidebarOpen] = (0, import_react13.useState)(true);
|
|
1684
1960
|
const siteTitle = config.themeConfig?.title || "Boltdocs";
|
|
1685
1961
|
const siteDescription = config.themeConfig?.description || "";
|
|
1686
|
-
const location = (0,
|
|
1962
|
+
const location = (0, import_react_router_dom10.useLocation)();
|
|
1687
1963
|
const currentIndex = routes.findIndex((r) => r.path === location.pathname);
|
|
1688
1964
|
const currentRoute = routes[currentIndex];
|
|
1689
1965
|
const currentLocale = config.i18n ? currentRoute?.locale || config.i18n.defaultLocale : void 0;
|
|
@@ -1699,13 +1975,14 @@ function ThemeLayout({
|
|
|
1699
1975
|
const prevPage = localIndex > 0 ? filteredRoutes[localIndex - 1] : null;
|
|
1700
1976
|
const nextPage = localIndex >= 0 && localIndex < filteredRoutes.length - 1 ? filteredRoutes[localIndex + 1] : null;
|
|
1701
1977
|
const { preload } = usePreload();
|
|
1702
|
-
|
|
1978
|
+
import_react16.default.useEffect(() => {
|
|
1703
1979
|
if (prevPage?.path) preload(prevPage.path);
|
|
1704
1980
|
if (nextPage?.path) preload(nextPage.path);
|
|
1705
1981
|
}, [prevPage, nextPage, preload]);
|
|
1706
|
-
return /* @__PURE__ */ (0,
|
|
1707
|
-
|
|
1708
|
-
|
|
1982
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: `boltdocs-layout ${className}`, style, children: [
|
|
1983
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ProgressBar, {}),
|
|
1984
|
+
background !== void 0 ? background : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(BackgroundGradient, {}),
|
|
1985
|
+
head !== void 0 ? head : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1709
1986
|
Head,
|
|
1710
1987
|
{
|
|
1711
1988
|
siteTitle,
|
|
@@ -1713,7 +1990,7 @@ function ThemeLayout({
|
|
|
1713
1990
|
routes
|
|
1714
1991
|
}
|
|
1715
1992
|
),
|
|
1716
|
-
navbar !== void 0 ? navbar : /* @__PURE__ */ (0,
|
|
1993
|
+
navbar !== void 0 ? navbar : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1717
1994
|
Navbar,
|
|
1718
1995
|
{
|
|
1719
1996
|
config,
|
|
@@ -1723,74 +2000,60 @@ function ThemeLayout({
|
|
|
1723
2000
|
currentVersion
|
|
1724
2001
|
}
|
|
1725
2002
|
),
|
|
1726
|
-
/* @__PURE__ */ (0,
|
|
1727
|
-
|
|
1728
|
-
{
|
|
1729
|
-
|
|
1730
|
-
children:
|
|
1731
|
-
|
|
1732
|
-
|
|
2003
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "boltdocs-main-container", children: [
|
|
2004
|
+
sidebar !== void 0 ? sidebar : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Sidebar, { routes: filteredRoutes, config }),
|
|
2005
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("main", { className: "boltdocs-content", children: [
|
|
2006
|
+
breadcrumbs !== void 0 ? breadcrumbs : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Breadcrumbs, { routes: filteredRoutes, config }),
|
|
2007
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "boltdocs-page", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ErrorBoundary, { children }) }),
|
|
2008
|
+
(prevPage || nextPage) && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("nav", { className: "page-nav", "aria-label": "Pagination", children: [
|
|
2009
|
+
prevPage ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2010
|
+
Link,
|
|
1733
2011
|
{
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
2012
|
+
to: prevPage.path || "/",
|
|
2013
|
+
className: "page-nav-link page-nav-link--prev",
|
|
2014
|
+
children: [
|
|
2015
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "page-nav-info", children: [
|
|
2016
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "page-nav-label", children: "Previous" }),
|
|
2017
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "page-nav-title", children: prevPage.title })
|
|
2018
|
+
] }),
|
|
2019
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react10.ChevronLeft, { className: "page-nav-arrow", size: 16 })
|
|
2020
|
+
]
|
|
1738
2021
|
}
|
|
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,
|
|
2022
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", {}),
|
|
2023
|
+
nextPage ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
2024
|
+
Link,
|
|
1776
2025
|
{
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
2026
|
+
to: nextPage.path || "/",
|
|
2027
|
+
className: "page-nav-link page-nav-link--next",
|
|
2028
|
+
children: [
|
|
2029
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "page-nav-info", children: [
|
|
2030
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "page-nav-label", children: "Next" }),
|
|
2031
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "page-nav-title", children: nextPage.title })
|
|
2032
|
+
] }),
|
|
2033
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react10.ChevronRight, { className: "page-nav-arrow", size: 16 })
|
|
2034
|
+
]
|
|
1781
2035
|
}
|
|
1782
|
-
)
|
|
1783
|
-
]
|
|
1784
|
-
}
|
|
1785
|
-
|
|
2036
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", {})
|
|
2037
|
+
] })
|
|
2038
|
+
] }),
|
|
2039
|
+
toc !== void 0 ? toc : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2040
|
+
OnThisPage,
|
|
2041
|
+
{
|
|
2042
|
+
headings: routes[currentIndex]?.headings,
|
|
2043
|
+
editLink: config.themeConfig?.editLink,
|
|
2044
|
+
communityHelp: config.themeConfig?.communityHelp,
|
|
2045
|
+
filePath: routes[currentIndex]?.filePath
|
|
2046
|
+
}
|
|
2047
|
+
)
|
|
2048
|
+
] })
|
|
1786
2049
|
] });
|
|
1787
2050
|
}
|
|
1788
|
-
var
|
|
2051
|
+
var import_react16, import_react_router_dom10, import_lucide_react10, import_jsx_runtime21;
|
|
1789
2052
|
var init_Layout = __esm({
|
|
1790
2053
|
"src/client/theme/ui/Layout/Layout.tsx"() {
|
|
1791
2054
|
"use strict";
|
|
1792
|
-
|
|
1793
|
-
|
|
2055
|
+
import_react16 = __toESM(require("react"));
|
|
2056
|
+
import_react_router_dom10 = require("react-router-dom");
|
|
1794
2057
|
init_Link2();
|
|
1795
2058
|
import_lucide_react10 = require("lucide-react");
|
|
1796
2059
|
init_preload();
|
|
@@ -1806,8 +2069,10 @@ var init_Layout = __esm({
|
|
|
1806
2069
|
init_Head2();
|
|
1807
2070
|
init_Breadcrumbs2();
|
|
1808
2071
|
init_BackgroundGradient2();
|
|
2072
|
+
init_ProgressBar3();
|
|
2073
|
+
init_ErrorBoundary2();
|
|
1809
2074
|
init_styles();
|
|
1810
|
-
|
|
2075
|
+
import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1811
2076
|
}
|
|
1812
2077
|
});
|
|
1813
2078
|
|
|
@@ -1821,23 +2086,23 @@ var init_Layout2 = __esm({
|
|
|
1821
2086
|
|
|
1822
2087
|
// src/client/theme/ui/NotFound/NotFound.tsx
|
|
1823
2088
|
function NotFound() {
|
|
1824
|
-
return /* @__PURE__ */ (0,
|
|
1825
|
-
/* @__PURE__ */ (0,
|
|
1826
|
-
/* @__PURE__ */ (0,
|
|
1827
|
-
/* @__PURE__ */ (0,
|
|
1828
|
-
/* @__PURE__ */ (0,
|
|
1829
|
-
/* @__PURE__ */ (0,
|
|
2089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "boltdocs-not-found", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "not-found-content", children: [
|
|
2090
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "not-found-code", children: "404" }),
|
|
2091
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h1", { className: "not-found-title", children: "Page Not Found" }),
|
|
2092
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "not-found-text", children: "The page you're looking for doesn't exist or has been moved." }),
|
|
2093
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Link, { to: "/", className: "not-found-link", children: [
|
|
2094
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react11.ArrowLeft, { size: 16 }),
|
|
1830
2095
|
" Go to Home"
|
|
1831
2096
|
] })
|
|
1832
2097
|
] }) });
|
|
1833
2098
|
}
|
|
1834
|
-
var import_lucide_react11,
|
|
2099
|
+
var import_lucide_react11, import_jsx_runtime22;
|
|
1835
2100
|
var init_NotFound = __esm({
|
|
1836
2101
|
"src/client/theme/ui/NotFound/NotFound.tsx"() {
|
|
1837
2102
|
"use strict";
|
|
1838
2103
|
init_Link2();
|
|
1839
2104
|
import_lucide_react11 = require("lucide-react");
|
|
1840
|
-
|
|
2105
|
+
import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1841
2106
|
}
|
|
1842
2107
|
});
|
|
1843
2108
|
|
|
@@ -1851,16 +2116,16 @@ var init_NotFound2 = __esm({
|
|
|
1851
2116
|
|
|
1852
2117
|
// src/client/theme/ui/Loading/Loading.tsx
|
|
1853
2118
|
function Loading() {
|
|
1854
|
-
return /* @__PURE__ */ (0,
|
|
1855
|
-
/* @__PURE__ */ (0,
|
|
1856
|
-
/* @__PURE__ */ (0,
|
|
2119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "boltdocs-loading", children: [
|
|
2120
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: "loading-spinner" }),
|
|
2121
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "loading-text", children: "Loading..." })
|
|
1857
2122
|
] });
|
|
1858
2123
|
}
|
|
1859
|
-
var
|
|
2124
|
+
var import_jsx_runtime23;
|
|
1860
2125
|
var init_Loading = __esm({
|
|
1861
2126
|
"src/client/theme/ui/Loading/Loading.tsx"() {
|
|
1862
2127
|
"use strict";
|
|
1863
|
-
|
|
2128
|
+
import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1864
2129
|
}
|
|
1865
2130
|
});
|
|
1866
2131
|
|
|
@@ -1874,35 +2139,35 @@ var init_Loading2 = __esm({
|
|
|
1874
2139
|
|
|
1875
2140
|
// src/client/theme/components/CodeBlock/CodeBlock.tsx
|
|
1876
2141
|
function CodeBlock({ children, ...props }) {
|
|
1877
|
-
const [copied, setCopied] = (0,
|
|
1878
|
-
const preRef = (0,
|
|
1879
|
-
const handleCopy = (0,
|
|
2142
|
+
const [copied, setCopied] = (0, import_react17.useState)(false);
|
|
2143
|
+
const preRef = (0, import_react17.useRef)(null);
|
|
2144
|
+
const handleCopy = (0, import_react17.useCallback)(async () => {
|
|
1880
2145
|
const code = preRef.current?.textContent || "";
|
|
1881
2146
|
copyToClipboard(code);
|
|
1882
2147
|
setCopied(true);
|
|
1883
2148
|
setTimeout(() => setCopied(false), 2e3);
|
|
1884
2149
|
}, []);
|
|
1885
|
-
return /* @__PURE__ */ (0,
|
|
1886
|
-
/* @__PURE__ */ (0,
|
|
2150
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "code-block-wrapper", children: [
|
|
2151
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1887
2152
|
"button",
|
|
1888
2153
|
{
|
|
1889
2154
|
className: `code-block-copy ${copied ? "copied" : ""}`,
|
|
1890
2155
|
onClick: handleCopy,
|
|
1891
2156
|
"aria-label": "Copy code",
|
|
1892
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
2157
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react12.Check, { size: 16 }) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_lucide_react12.Copy, { size: 16 })
|
|
1893
2158
|
}
|
|
1894
2159
|
),
|
|
1895
|
-
/* @__PURE__ */ (0,
|
|
2160
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("pre", { ref: preRef, ...props, children })
|
|
1896
2161
|
] });
|
|
1897
2162
|
}
|
|
1898
|
-
var
|
|
2163
|
+
var import_react17, import_lucide_react12, import_jsx_runtime24;
|
|
1899
2164
|
var init_CodeBlock = __esm({
|
|
1900
2165
|
"src/client/theme/components/CodeBlock/CodeBlock.tsx"() {
|
|
1901
2166
|
"use strict";
|
|
1902
|
-
|
|
2167
|
+
import_react17 = require("react");
|
|
1903
2168
|
import_lucide_react12 = require("lucide-react");
|
|
1904
2169
|
init_utils();
|
|
1905
|
-
|
|
2170
|
+
import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1906
2171
|
}
|
|
1907
2172
|
});
|
|
1908
2173
|
|
|
@@ -1924,9 +2189,9 @@ function Video({
|
|
|
1924
2189
|
preload = "metadata",
|
|
1925
2190
|
...rest
|
|
1926
2191
|
}) {
|
|
1927
|
-
const containerRef = (0,
|
|
1928
|
-
const [isVisible, setIsVisible] = (0,
|
|
1929
|
-
(0,
|
|
2192
|
+
const containerRef = (0, import_react18.useRef)(null);
|
|
2193
|
+
const [isVisible, setIsVisible] = (0, import_react18.useState)(false);
|
|
2194
|
+
(0, import_react18.useEffect)(() => {
|
|
1930
2195
|
const el = containerRef.current;
|
|
1931
2196
|
if (!el) return;
|
|
1932
2197
|
const observer = new IntersectionObserver(
|
|
@@ -1941,7 +2206,7 @@ function Video({
|
|
|
1941
2206
|
observer.observe(el);
|
|
1942
2207
|
return () => observer.disconnect();
|
|
1943
2208
|
}, []);
|
|
1944
|
-
return /* @__PURE__ */ (0,
|
|
2209
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref: containerRef, className: "boltdocs-video-wrapper", children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
1945
2210
|
"video",
|
|
1946
2211
|
{
|
|
1947
2212
|
className: "boltdocs-video",
|
|
@@ -1956,7 +2221,7 @@ function Video({
|
|
|
1956
2221
|
"Your browser does not support the video tag."
|
|
1957
2222
|
]
|
|
1958
2223
|
}
|
|
1959
|
-
) : /* @__PURE__ */ (0,
|
|
2224
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1960
2225
|
"div",
|
|
1961
2226
|
{
|
|
1962
2227
|
className: "boltdocs-video-placeholder",
|
|
@@ -1965,12 +2230,12 @@ function Video({
|
|
|
1965
2230
|
}
|
|
1966
2231
|
) });
|
|
1967
2232
|
}
|
|
1968
|
-
var
|
|
2233
|
+
var import_react18, import_jsx_runtime25;
|
|
1969
2234
|
var init_Video = __esm({
|
|
1970
2235
|
"src/client/theme/components/Video/Video.tsx"() {
|
|
1971
2236
|
"use strict";
|
|
1972
|
-
|
|
1973
|
-
|
|
2237
|
+
import_react18 = require("react");
|
|
2238
|
+
import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1974
2239
|
}
|
|
1975
2240
|
});
|
|
1976
2241
|
|
|
@@ -1987,14 +2252,14 @@ var init_Video2 = __esm({
|
|
|
1987
2252
|
});
|
|
1988
2253
|
|
|
1989
2254
|
// src/client/theme/icons/npm.tsx
|
|
1990
|
-
var
|
|
2255
|
+
var import_jsx_runtime26, NPM;
|
|
1991
2256
|
var init_npm = __esm({
|
|
1992
2257
|
"src/client/theme/icons/npm.tsx"() {
|
|
1993
2258
|
"use strict";
|
|
1994
|
-
|
|
1995
|
-
NPM = (props) => /* @__PURE__ */ (0,
|
|
1996
|
-
/* @__PURE__ */ (0,
|
|
1997
|
-
/* @__PURE__ */ (0,
|
|
2259
|
+
import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2260
|
+
NPM = (props) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { ...props, viewBox: "0 0 2500 2500", children: [
|
|
2261
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { fill: "#c00", d: "M0 0h2500v2500H0z" }),
|
|
2262
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1998
2263
|
"path",
|
|
1999
2264
|
{
|
|
2000
2265
|
fill: "#fff",
|
|
@@ -2006,69 +2271,69 @@ var init_npm = __esm({
|
|
|
2006
2271
|
});
|
|
2007
2272
|
|
|
2008
2273
|
// src/client/theme/icons/pnpm.tsx
|
|
2009
|
-
var
|
|
2274
|
+
var import_jsx_runtime27, Pnpm;
|
|
2010
2275
|
var init_pnpm = __esm({
|
|
2011
2276
|
"src/client/theme/icons/pnpm.tsx"() {
|
|
2012
2277
|
"use strict";
|
|
2013
|
-
|
|
2014
|
-
Pnpm = (props) => /* @__PURE__ */ (0,
|
|
2278
|
+
import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2279
|
+
Pnpm = (props) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
2015
2280
|
"svg",
|
|
2016
2281
|
{
|
|
2017
2282
|
...props,
|
|
2018
2283
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
2019
2284
|
viewBox: "76.58987244897958 44 164.00775510204068 164",
|
|
2020
2285
|
children: [
|
|
2021
|
-
/* @__PURE__ */ (0,
|
|
2022
|
-
/* @__PURE__ */ (0,
|
|
2286
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("defs", { children: [
|
|
2287
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2023
2288
|
"path",
|
|
2024
2289
|
{
|
|
2025
2290
|
d: "M237.6 95L187.6 95L187.6 45L237.6 45L237.6 95Z",
|
|
2026
2291
|
id: "pnpm_dark__b45vdTD8hs"
|
|
2027
2292
|
}
|
|
2028
2293
|
),
|
|
2029
|
-
/* @__PURE__ */ (0,
|
|
2294
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2030
2295
|
"path",
|
|
2031
2296
|
{
|
|
2032
2297
|
d: "M182.59 95L132.59 95L132.59 45L182.59 45L182.59 95Z",
|
|
2033
2298
|
id: "pnpm_dark__a40WtxIl8d"
|
|
2034
2299
|
}
|
|
2035
2300
|
),
|
|
2036
|
-
/* @__PURE__ */ (0,
|
|
2301
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2037
2302
|
"path",
|
|
2038
2303
|
{
|
|
2039
2304
|
d: "M127.59 95L77.59 95L77.59 45L127.59 45L127.59 95Z",
|
|
2040
2305
|
id: "pnpm_dark__h2CN9AEEpe"
|
|
2041
2306
|
}
|
|
2042
2307
|
),
|
|
2043
|
-
/* @__PURE__ */ (0,
|
|
2308
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2044
2309
|
"path",
|
|
2045
2310
|
{
|
|
2046
2311
|
d: "M237.6 150L187.6 150L187.6 100L237.6 100L237.6 150Z",
|
|
2047
2312
|
id: "pnpm_dark__dqv5133G8"
|
|
2048
2313
|
}
|
|
2049
2314
|
),
|
|
2050
|
-
/* @__PURE__ */ (0,
|
|
2315
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2051
2316
|
"path",
|
|
2052
2317
|
{
|
|
2053
2318
|
d: "M182.59 150L132.59 150L132.59 100L182.59 100L182.59 150Z",
|
|
2054
2319
|
id: "pnpm_dark__b1Lv79ypvm"
|
|
2055
2320
|
}
|
|
2056
2321
|
),
|
|
2057
|
-
/* @__PURE__ */ (0,
|
|
2322
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2058
2323
|
"path",
|
|
2059
2324
|
{
|
|
2060
2325
|
d: "M182.59 205L132.59 205L132.59 155L182.59 155L182.59 205Z",
|
|
2061
2326
|
id: "pnpm_dark__hy1IZWwLX"
|
|
2062
2327
|
}
|
|
2063
2328
|
),
|
|
2064
|
-
/* @__PURE__ */ (0,
|
|
2329
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2065
2330
|
"path",
|
|
2066
2331
|
{
|
|
2067
2332
|
d: "M237.6 205L187.6 205L187.6 155L237.6 155L237.6 205Z",
|
|
2068
2333
|
id: "pnpm_dark__akQfjxQes"
|
|
2069
2334
|
}
|
|
2070
2335
|
),
|
|
2071
|
-
/* @__PURE__ */ (0,
|
|
2336
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2072
2337
|
"path",
|
|
2073
2338
|
{
|
|
2074
2339
|
d: "M127.59 205L77.59 205L77.59 155L127.59 155L127.59 205Z",
|
|
@@ -2076,15 +2341,15 @@ var init_pnpm = __esm({
|
|
|
2076
2341
|
}
|
|
2077
2342
|
)
|
|
2078
2343
|
] }),
|
|
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,
|
|
2344
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("g", { children: [
|
|
2345
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__b45vdTD8hs", fill: "#f9ad00" }) }),
|
|
2346
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__a40WtxIl8d", fill: "#f9ad00" }) }),
|
|
2347
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__h2CN9AEEpe", fill: "#f9ad00" }) }),
|
|
2348
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__dqv5133G8", fill: "#f9ad00" }) }),
|
|
2349
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__b1Lv79ypvm", fill: "#ffffff" }) }),
|
|
2350
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__hy1IZWwLX", fill: "#ffffff" }) }),
|
|
2351
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__akQfjxQes", fill: "#ffffff" }) }),
|
|
2352
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("use", { xlinkHref: "#pnpm_dark__bdSrwE5pk", fill: "#ffffff" }) })
|
|
2088
2353
|
] })
|
|
2089
2354
|
]
|
|
2090
2355
|
}
|
|
@@ -2093,62 +2358,62 @@ var init_pnpm = __esm({
|
|
|
2093
2358
|
});
|
|
2094
2359
|
|
|
2095
2360
|
// src/client/theme/icons/bun.tsx
|
|
2096
|
-
var
|
|
2361
|
+
var import_jsx_runtime28, Bun;
|
|
2097
2362
|
var init_bun = __esm({
|
|
2098
2363
|
"src/client/theme/icons/bun.tsx"() {
|
|
2099
2364
|
"use strict";
|
|
2100
|
-
|
|
2101
|
-
Bun = (props) => /* @__PURE__ */ (0,
|
|
2102
|
-
/* @__PURE__ */ (0,
|
|
2103
|
-
/* @__PURE__ */ (0,
|
|
2365
|
+
import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2366
|
+
Bun = (props) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("svg", { ...props, viewBox: "0 0 80 70", children: [
|
|
2367
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.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" }),
|
|
2368
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2104
2369
|
"path",
|
|
2105
2370
|
{
|
|
2106
2371
|
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
2372
|
style: { fill: "#fbf0df" }
|
|
2108
2373
|
}
|
|
2109
2374
|
),
|
|
2110
|
-
/* @__PURE__ */ (0,
|
|
2375
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2111
2376
|
"path",
|
|
2112
2377
|
{
|
|
2113
2378
|
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
2379
|
style: { fill: "#f6dece" }
|
|
2115
2380
|
}
|
|
2116
2381
|
),
|
|
2117
|
-
/* @__PURE__ */ (0,
|
|
2382
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2118
2383
|
"path",
|
|
2119
2384
|
{
|
|
2120
2385
|
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
2386
|
style: { fill: "#fffefc" }
|
|
2122
2387
|
}
|
|
2123
2388
|
),
|
|
2124
|
-
/* @__PURE__ */ (0,
|
|
2389
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2125
2390
|
"path",
|
|
2126
2391
|
{
|
|
2127
2392
|
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
2393
|
style: { fill: "#ccbea7", fillRule: "evenodd" }
|
|
2129
2394
|
}
|
|
2130
2395
|
),
|
|
2131
|
-
/* @__PURE__ */ (0,
|
|
2132
|
-
/* @__PURE__ */ (0,
|
|
2133
|
-
/* @__PURE__ */ (0,
|
|
2396
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.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" }),
|
|
2397
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("g", { children: [
|
|
2398
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2134
2399
|
"path",
|
|
2135
2400
|
{
|
|
2136
2401
|
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
2402
|
style: { fill: "#b71422" }
|
|
2138
2403
|
}
|
|
2139
2404
|
),
|
|
2140
|
-
/* @__PURE__ */ (0,
|
|
2405
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2141
2406
|
"path",
|
|
2142
2407
|
{
|
|
2143
2408
|
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
2409
|
style: { fill: "#ff6164" }
|
|
2145
2410
|
}
|
|
2146
2411
|
),
|
|
2147
|
-
/* @__PURE__ */ (0,
|
|
2148
|
-
/* @__PURE__ */ (0,
|
|
2412
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.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" }),
|
|
2413
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.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
2414
|
] }),
|
|
2150
|
-
/* @__PURE__ */ (0,
|
|
2151
|
-
/* @__PURE__ */ (0,
|
|
2415
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("g", { children: [
|
|
2416
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2152
2417
|
"ellipse",
|
|
2153
2418
|
{
|
|
2154
2419
|
cx: "53.22",
|
|
@@ -2158,7 +2423,7 @@ var init_bun = __esm({
|
|
|
2158
2423
|
style: { fill: "#febbd0" }
|
|
2159
2424
|
}
|
|
2160
2425
|
),
|
|
2161
|
-
/* @__PURE__ */ (0,
|
|
2426
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2162
2427
|
"ellipse",
|
|
2163
2428
|
{
|
|
2164
2429
|
cx: "22.95",
|
|
@@ -2168,14 +2433,14 @@ var init_bun = __esm({
|
|
|
2168
2433
|
style: { fill: "#febbd0" }
|
|
2169
2434
|
}
|
|
2170
2435
|
),
|
|
2171
|
-
/* @__PURE__ */ (0,
|
|
2436
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2172
2437
|
"path",
|
|
2173
2438
|
{
|
|
2174
2439
|
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
2440
|
style: { fillRule: "evenodd" }
|
|
2176
2441
|
}
|
|
2177
2442
|
),
|
|
2178
|
-
/* @__PURE__ */ (0,
|
|
2443
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2179
2444
|
"path",
|
|
2180
2445
|
{
|
|
2181
2446
|
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 +2453,12 @@ var init_bun = __esm({
|
|
|
2188
2453
|
});
|
|
2189
2454
|
|
|
2190
2455
|
// src/client/theme/icons/deno.tsx
|
|
2191
|
-
var
|
|
2456
|
+
var import_jsx_runtime29, Deno;
|
|
2192
2457
|
var init_deno = __esm({
|
|
2193
2458
|
"src/client/theme/icons/deno.tsx"() {
|
|
2194
2459
|
"use strict";
|
|
2195
|
-
|
|
2196
|
-
Deno = (props) => /* @__PURE__ */ (0,
|
|
2460
|
+
import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2461
|
+
Deno = (props) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2197
2462
|
"svg",
|
|
2198
2463
|
{
|
|
2199
2464
|
...props,
|
|
@@ -2203,7 +2468,7 @@ var init_deno = __esm({
|
|
|
2203
2468
|
strokeMiterlimit: "2",
|
|
2204
2469
|
clipRule: "evenodd",
|
|
2205
2470
|
viewBox: "0 0 441 441",
|
|
2206
|
-
children: /* @__PURE__ */ (0,
|
|
2471
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2207
2472
|
"path",
|
|
2208
2473
|
{
|
|
2209
2474
|
fill: "currentColor",
|
|
@@ -2250,19 +2515,19 @@ function PackageManagerTabs({
|
|
|
2250
2515
|
pkg = "",
|
|
2251
2516
|
className = ""
|
|
2252
2517
|
}) {
|
|
2253
|
-
const [activeTab, setActiveTab] = (0,
|
|
2254
|
-
const [copied, setCopied] = (0,
|
|
2518
|
+
const [activeTab, setActiveTab] = (0, import_react19.useState)("npm");
|
|
2519
|
+
const [copied, setCopied] = (0, import_react19.useState)(false);
|
|
2255
2520
|
const activeCommand = getCommandForManager(activeTab, command, pkg);
|
|
2256
|
-
const handleCopy = (0,
|
|
2521
|
+
const handleCopy = (0, import_react19.useCallback)(async () => {
|
|
2257
2522
|
copyToClipboard(activeCommand);
|
|
2258
2523
|
setCopied(true);
|
|
2259
2524
|
setTimeout(() => setCopied(false), 2e3);
|
|
2260
2525
|
}, [activeCommand]);
|
|
2261
|
-
return /* @__PURE__ */ (0,
|
|
2262
|
-
/* @__PURE__ */ (0,
|
|
2526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: `pkg-tabs-wrapper ${className}`, children: [
|
|
2527
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "pkg-tabs-header", children: MANAGERS.map((mgr) => {
|
|
2263
2528
|
const Icon = mgr.icon;
|
|
2264
2529
|
const isActive = activeTab === mgr.id;
|
|
2265
|
-
return /* @__PURE__ */ (0,
|
|
2530
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2266
2531
|
"button",
|
|
2267
2532
|
{
|
|
2268
2533
|
className: `pkg-tab-btn ${isActive ? "active" : ""}`,
|
|
@@ -2270,40 +2535,40 @@ function PackageManagerTabs({
|
|
|
2270
2535
|
"aria-selected": isActive,
|
|
2271
2536
|
role: "tab",
|
|
2272
2537
|
children: [
|
|
2273
|
-
/* @__PURE__ */ (0,
|
|
2274
|
-
/* @__PURE__ */ (0,
|
|
2538
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Icon, { className: "pkg-tab-icon", width: "16", height: "16" }),
|
|
2539
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { children: mgr.label })
|
|
2275
2540
|
]
|
|
2276
2541
|
},
|
|
2277
2542
|
mgr.id
|
|
2278
2543
|
);
|
|
2279
2544
|
}) }),
|
|
2280
|
-
/* @__PURE__ */ (0,
|
|
2281
|
-
/* @__PURE__ */ (0,
|
|
2545
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "code-block-wrapper pkg-tabs-content", children: [
|
|
2546
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2282
2547
|
"button",
|
|
2283
2548
|
{
|
|
2284
2549
|
className: `code-block-copy ${copied ? "copied" : ""}`,
|
|
2285
2550
|
onClick: handleCopy,
|
|
2286
2551
|
type: "button",
|
|
2287
2552
|
"aria-label": "Copy code",
|
|
2288
|
-
children: copied ? /* @__PURE__ */ (0,
|
|
2553
|
+
children: copied ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react13.Check, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_lucide_react13.Copy, { size: 14 })
|
|
2289
2554
|
}
|
|
2290
2555
|
),
|
|
2291
|
-
/* @__PURE__ */ (0,
|
|
2556
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("pre", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("code", { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "line", children: activeCommand }) }) })
|
|
2292
2557
|
] })
|
|
2293
2558
|
] });
|
|
2294
2559
|
}
|
|
2295
|
-
var
|
|
2560
|
+
var import_react19, import_lucide_react13, import_jsx_runtime30, MANAGERS;
|
|
2296
2561
|
var init_PackageManagerTabs = __esm({
|
|
2297
2562
|
"src/client/theme/components/PackageManagerTabs/PackageManagerTabs.tsx"() {
|
|
2298
2563
|
"use strict";
|
|
2299
|
-
|
|
2564
|
+
import_react19 = require("react");
|
|
2300
2565
|
import_lucide_react13 = require("lucide-react");
|
|
2301
2566
|
init_npm();
|
|
2302
2567
|
init_pnpm();
|
|
2303
2568
|
init_bun();
|
|
2304
2569
|
init_deno();
|
|
2305
2570
|
init_utils();
|
|
2306
|
-
|
|
2571
|
+
import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2307
2572
|
MANAGERS = [
|
|
2308
2573
|
{ id: "npm", label: "npm", icon: NPM },
|
|
2309
2574
|
{ id: "pnpm", label: "pnpm", icon: Pnpm },
|
|
@@ -2327,57 +2592,58 @@ var init_PackageManagerTabs2 = __esm({
|
|
|
2327
2592
|
|
|
2328
2593
|
// src/client/app/index.tsx
|
|
2329
2594
|
function useConfig() {
|
|
2330
|
-
return (0,
|
|
2595
|
+
return (0, import_react22.useContext)(ConfigContext);
|
|
2331
2596
|
}
|
|
2332
2597
|
function AppShell({
|
|
2333
2598
|
initialRoutes,
|
|
2334
2599
|
initialConfig,
|
|
2600
|
+
docsDirName,
|
|
2335
2601
|
modules,
|
|
2336
2602
|
hot,
|
|
2337
2603
|
homePage: HomePage,
|
|
2338
2604
|
components: customComponents = {}
|
|
2339
2605
|
}) {
|
|
2340
|
-
const [routesInfo, setRoutesInfo] = (0,
|
|
2341
|
-
const [config] = (0,
|
|
2606
|
+
const [routesInfo, setRoutesInfo] = (0, import_react20.useState)(initialRoutes);
|
|
2607
|
+
const [config] = (0, import_react20.useState)(initialConfig);
|
|
2342
2608
|
const resolveRoutes = (infos) => {
|
|
2343
2609
|
return infos.filter(
|
|
2344
2610
|
(route) => !(HomePage && (route.path === "/" || route.path === ""))
|
|
2345
2611
|
).map((route) => {
|
|
2346
2612
|
const loaderKey = Object.keys(modules).find(
|
|
2347
|
-
(k) => k
|
|
2613
|
+
(k) => k === `/${docsDirName}/${route.filePath}`
|
|
2348
2614
|
);
|
|
2349
2615
|
const loader = loaderKey ? modules[loaderKey] : null;
|
|
2350
2616
|
return {
|
|
2351
2617
|
...route,
|
|
2352
|
-
Component:
|
|
2618
|
+
Component: import_react20.default.lazy(() => {
|
|
2353
2619
|
if (!loader)
|
|
2354
|
-
return Promise.resolve({ default: () => /* @__PURE__ */ (0,
|
|
2620
|
+
return Promise.resolve({ default: () => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(NotFound, {}) });
|
|
2355
2621
|
return loader();
|
|
2356
2622
|
})
|
|
2357
2623
|
};
|
|
2358
2624
|
});
|
|
2359
2625
|
};
|
|
2360
|
-
const [resolvedRoutes, setResolvedRoutes] = (0,
|
|
2626
|
+
const [resolvedRoutes, setResolvedRoutes] = (0, import_react20.useState)(
|
|
2361
2627
|
() => resolveRoutes(initialRoutes)
|
|
2362
2628
|
);
|
|
2363
|
-
(0,
|
|
2629
|
+
(0, import_react20.useEffect)(() => {
|
|
2364
2630
|
if (hot) {
|
|
2365
2631
|
hot.on("boltdocs:routes-update", (newRoutes) => {
|
|
2366
2632
|
setRoutesInfo(newRoutes);
|
|
2367
2633
|
});
|
|
2368
2634
|
}
|
|
2369
2635
|
}, [hot]);
|
|
2370
|
-
(0,
|
|
2636
|
+
(0, import_react20.useEffect)(() => {
|
|
2371
2637
|
setResolvedRoutes(resolveRoutes(routesInfo));
|
|
2372
|
-
}, [routesInfo, modules]);
|
|
2373
|
-
return /* @__PURE__ */ (0,
|
|
2374
|
-
/* @__PURE__ */ (0,
|
|
2375
|
-
/* @__PURE__ */ (0,
|
|
2376
|
-
HomePage && /* @__PURE__ */ (0,
|
|
2377
|
-
|
|
2638
|
+
}, [routesInfo, modules, docsDirName]);
|
|
2639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ConfigContext.Provider, { value: config, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(PreloadProvider, { routes: routesInfo, modules, children: [
|
|
2640
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(ScrollHandler, {}),
|
|
2641
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_router_dom11.Routes, { children: [
|
|
2642
|
+
HomePage && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2643
|
+
import_react_router_dom11.Route,
|
|
2378
2644
|
{
|
|
2379
2645
|
path: "/",
|
|
2380
|
-
element: /* @__PURE__ */ (0,
|
|
2646
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2381
2647
|
ThemeLayout,
|
|
2382
2648
|
{
|
|
2383
2649
|
config,
|
|
@@ -2386,20 +2652,20 @@ function AppShell({
|
|
|
2386
2652
|
toc: null,
|
|
2387
2653
|
breadcrumbs: null,
|
|
2388
2654
|
...config.themeConfig?.layoutProps,
|
|
2389
|
-
children: /* @__PURE__ */ (0,
|
|
2655
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(HomePage, {})
|
|
2390
2656
|
}
|
|
2391
2657
|
)
|
|
2392
2658
|
}
|
|
2393
2659
|
),
|
|
2394
|
-
/* @__PURE__ */ (0,
|
|
2395
|
-
|
|
2660
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2661
|
+
import_react_router_dom11.Route,
|
|
2396
2662
|
{
|
|
2397
|
-
element: /* @__PURE__ */ (0,
|
|
2398
|
-
children: resolvedRoutes.map((route) => /* @__PURE__ */ (0,
|
|
2399
|
-
|
|
2663
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DocsLayout, { config, routes: routesInfo }),
|
|
2664
|
+
children: resolvedRoutes.map((route) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2665
|
+
import_react_router_dom11.Route,
|
|
2400
2666
|
{
|
|
2401
2667
|
path: route.path === "" ? "/" : route.path,
|
|
2402
|
-
element: /* @__PURE__ */ (0,
|
|
2668
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react20.default.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Loading, {}), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2403
2669
|
MdxPage,
|
|
2404
2670
|
{
|
|
2405
2671
|
Component: route.Component,
|
|
@@ -2412,17 +2678,17 @@ function AppShell({
|
|
|
2412
2678
|
},
|
|
2413
2679
|
"docs-layout"
|
|
2414
2680
|
),
|
|
2415
|
-
/* @__PURE__ */ (0,
|
|
2416
|
-
|
|
2681
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2682
|
+
import_react_router_dom11.Route,
|
|
2417
2683
|
{
|
|
2418
2684
|
path: "*",
|
|
2419
|
-
element: /* @__PURE__ */ (0,
|
|
2685
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2420
2686
|
ThemeLayout,
|
|
2421
2687
|
{
|
|
2422
2688
|
config,
|
|
2423
2689
|
routes: routesInfo,
|
|
2424
2690
|
...config.themeConfig?.layoutProps,
|
|
2425
|
-
children: /* @__PURE__ */ (0,
|
|
2691
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(NotFound, {})
|
|
2426
2692
|
}
|
|
2427
2693
|
)
|
|
2428
2694
|
}
|
|
@@ -2431,25 +2697,27 @@ function AppShell({
|
|
|
2431
2697
|
] }) });
|
|
2432
2698
|
}
|
|
2433
2699
|
function ScrollHandler() {
|
|
2434
|
-
const { pathname, hash } = (0,
|
|
2435
|
-
(0,
|
|
2700
|
+
const { pathname, hash } = (0, import_react_router_dom11.useLocation)();
|
|
2701
|
+
(0, import_react22.useLayoutEffect)(() => {
|
|
2702
|
+
const container = document.querySelector(".boltdocs-content");
|
|
2703
|
+
if (!container) return;
|
|
2436
2704
|
if (hash) {
|
|
2437
2705
|
const id = hash.replace("#", "");
|
|
2438
2706
|
const element = document.getElementById(id);
|
|
2439
2707
|
if (element) {
|
|
2440
2708
|
const offset = 80;
|
|
2441
|
-
const
|
|
2709
|
+
const containerRect = container.getBoundingClientRect().top;
|
|
2442
2710
|
const elementRect = element.getBoundingClientRect().top;
|
|
2443
|
-
const elementPosition = elementRect -
|
|
2444
|
-
const offsetPosition = elementPosition - offset;
|
|
2445
|
-
|
|
2711
|
+
const elementPosition = elementRect - containerRect;
|
|
2712
|
+
const offsetPosition = elementPosition - offset + container.scrollTop;
|
|
2713
|
+
container.scrollTo({
|
|
2446
2714
|
top: offsetPosition,
|
|
2447
2715
|
behavior: "smooth"
|
|
2448
2716
|
});
|
|
2449
2717
|
return;
|
|
2450
2718
|
}
|
|
2451
2719
|
}
|
|
2452
|
-
|
|
2720
|
+
container.scrollTo(0, 0);
|
|
2453
2721
|
}, [pathname, hash]);
|
|
2454
2722
|
return null;
|
|
2455
2723
|
}
|
|
@@ -2457,44 +2725,44 @@ function DocsLayout({
|
|
|
2457
2725
|
config,
|
|
2458
2726
|
routes
|
|
2459
2727
|
}) {
|
|
2460
|
-
return /* @__PURE__ */ (0,
|
|
2728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2461
2729
|
ThemeLayout,
|
|
2462
2730
|
{
|
|
2463
2731
|
config,
|
|
2464
2732
|
routes,
|
|
2465
2733
|
...config.themeConfig?.layoutProps,
|
|
2466
|
-
children: /* @__PURE__ */ (0,
|
|
2734
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_router_dom11.Outlet, {})
|
|
2467
2735
|
}
|
|
2468
2736
|
);
|
|
2469
2737
|
}
|
|
2470
2738
|
function MdxPage({
|
|
2471
|
-
Component,
|
|
2739
|
+
Component: Component2,
|
|
2472
2740
|
customComponents = {}
|
|
2473
2741
|
}) {
|
|
2474
2742
|
const allComponents = { ...mdxComponents, ...customComponents };
|
|
2475
|
-
return /* @__PURE__ */ (0,
|
|
2743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react21.MDXProvider, { components: allComponents, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Component2, {}) });
|
|
2476
2744
|
}
|
|
2477
|
-
var
|
|
2745
|
+
var import_react20, import_client, import_react_router_dom11, import_react21, import_react22, import_lucide_react14, import_jsx_runtime31, ConfigContext, Video2, PackageManagerTabs2, Heading, mdxComponents;
|
|
2478
2746
|
var init_app = __esm({
|
|
2479
2747
|
"src/client/app/index.tsx"() {
|
|
2480
2748
|
"use strict";
|
|
2481
|
-
|
|
2749
|
+
import_react20 = __toESM(require("react"));
|
|
2482
2750
|
import_client = __toESM(require("react-dom/client"));
|
|
2483
|
-
|
|
2751
|
+
import_react_router_dom11 = require("react-router-dom");
|
|
2484
2752
|
init_Layout2();
|
|
2485
2753
|
init_NotFound2();
|
|
2486
2754
|
init_Loading2();
|
|
2487
|
-
|
|
2488
|
-
|
|
2755
|
+
import_react21 = require("@mdx-js/react");
|
|
2756
|
+
import_react22 = require("react");
|
|
2489
2757
|
import_lucide_react14 = require("lucide-react");
|
|
2490
2758
|
init_CodeBlock2();
|
|
2491
2759
|
init_preload();
|
|
2492
|
-
|
|
2493
|
-
ConfigContext = (0,
|
|
2494
|
-
Video2 = (0,
|
|
2760
|
+
import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2761
|
+
ConfigContext = (0, import_react22.createContext)(null);
|
|
2762
|
+
Video2 = (0, import_react22.lazy)(
|
|
2495
2763
|
() => Promise.resolve().then(() => (init_Video2(), Video_exports)).then((m) => ({ default: m.Video }))
|
|
2496
2764
|
);
|
|
2497
|
-
PackageManagerTabs2 = (0,
|
|
2765
|
+
PackageManagerTabs2 = (0, import_react22.lazy)(
|
|
2498
2766
|
() => Promise.resolve().then(() => (init_PackageManagerTabs2(), PackageManagerTabs_exports)).then((m) => ({
|
|
2499
2767
|
default: m.PackageManagerTabs
|
|
2500
2768
|
}))
|
|
@@ -2505,21 +2773,21 @@ var init_app = __esm({
|
|
|
2505
2773
|
children
|
|
2506
2774
|
}) => {
|
|
2507
2775
|
const Tag = `h${level}`;
|
|
2508
|
-
return /* @__PURE__ */ (0,
|
|
2776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(Tag, { id, className: "boltdocs-heading", children: [
|
|
2509
2777
|
children,
|
|
2510
|
-
id && /* @__PURE__ */ (0,
|
|
2778
|
+
id && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("a", { href: `#${id}`, className: "header-anchor", "aria-label": "Anchor", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react14.Link, { size: 16 }) })
|
|
2511
2779
|
] });
|
|
2512
2780
|
};
|
|
2513
2781
|
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,
|
|
2782
|
+
h1: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 1, ...props }),
|
|
2783
|
+
h2: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 2, ...props }),
|
|
2784
|
+
h3: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 3, ...props }),
|
|
2785
|
+
h4: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 4, ...props }),
|
|
2786
|
+
h5: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 5, ...props }),
|
|
2787
|
+
h6: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Heading, { level: 6, ...props }),
|
|
2788
|
+
pre: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CodeBlock, { ...props, children: props.children }),
|
|
2789
|
+
video: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react22.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "video-skeleton" }), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Video2, { ...props }) }),
|
|
2790
|
+
PackageManagerTabs: (props) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react22.Suspense, { fallback: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "pkg-tabs-skeleton" }), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(PackageManagerTabs2, { ...props }) })
|
|
2523
2791
|
};
|
|
2524
2792
|
}
|
|
2525
2793
|
});
|
|
@@ -2530,23 +2798,24 @@ __export(ssr_exports, {
|
|
|
2530
2798
|
render: () => render
|
|
2531
2799
|
});
|
|
2532
2800
|
module.exports = __toCommonJS(ssr_exports);
|
|
2533
|
-
var
|
|
2801
|
+
var import_react23 = __toESM(require("react"));
|
|
2534
2802
|
var import_server = __toESM(require("react-dom/server"));
|
|
2535
2803
|
var import_server2 = require("react-router-dom/server");
|
|
2536
2804
|
init_app();
|
|
2537
|
-
var
|
|
2805
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2538
2806
|
async function render(options) {
|
|
2539
|
-
const { path, routes, config, modules, homePage } = options;
|
|
2807
|
+
const { path, routes, config, modules, homePage, docsDirName } = options;
|
|
2540
2808
|
const resolvedModules = {};
|
|
2541
2809
|
for (const [key, mod] of Object.entries(modules)) {
|
|
2542
2810
|
resolvedModules[key] = () => Promise.resolve(mod);
|
|
2543
2811
|
}
|
|
2544
2812
|
const html = import_server.default.renderToString(
|
|
2545
|
-
/* @__PURE__ */ (0,
|
|
2813
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react23.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_server2.StaticRouter, { location: path, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2546
2814
|
AppShell,
|
|
2547
2815
|
{
|
|
2548
2816
|
initialRoutes: routes,
|
|
2549
2817
|
initialConfig: config,
|
|
2818
|
+
docsDirName,
|
|
2550
2819
|
modules: resolvedModules,
|
|
2551
2820
|
homePage
|
|
2552
2821
|
}
|