@rspress-theme-anatole/theme-default 0.3.2 → 0.3.4
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/bundle.css +2 -2
- package/dist/bundle.js +34 -3
- package/package.json +3 -3
package/dist/bundle.css
CHANGED
|
@@ -461,7 +461,7 @@ summary a:not(.header-anchor) {
|
|
|
461
461
|
}
|
|
462
462
|
|
|
463
463
|
.link_a9ef4:hover {
|
|
464
|
-
border-bottom: 1px solid;
|
|
464
|
+
/* border-bottom: 1px solid; */
|
|
465
465
|
}
|
|
466
466
|
|
|
467
467
|
summary .link_a9ef4:hover {
|
|
@@ -1573,7 +1573,7 @@ ul>li>ul>li>ul>li {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
|
|
1575
1575
|
.pl-5 {
|
|
1576
|
-
padding-left:
|
|
1576
|
+
padding-left: 2.5rem;
|
|
1577
1577
|
}
|
|
1578
1578
|
|
|
1579
1579
|
.pl-6 {
|
package/dist/bundle.js
CHANGED
|
@@ -1062,7 +1062,7 @@ const DocLayout_index_module = {
|
|
|
1062
1062
|
function DocLayout(props) {
|
|
1063
1063
|
const { beforeDocFooter, afterDocFooter, beforeDoc, afterDoc, beforeDocContent, afterDocContent, beforeOutline, afterOutline, beforeSidebar, afterSidebar, uiSwitch, navTitle, components } = props;
|
|
1064
1064
|
const { siteData, page } = (0, __WEBPACK_EXTERNAL_MODULE__rspress_runtime_0abd3046__.usePageData)();
|
|
1065
|
-
const { headingTitle, title, toc = [], frontmatter } = page;
|
|
1065
|
+
const { headingTitle, title, toc = [], frontmatter, routePath } = page;
|
|
1066
1066
|
const [tabData, setTabData] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)({});
|
|
1067
1067
|
const headers = toc;
|
|
1068
1068
|
const { themeConfig } = siteData;
|
|
@@ -1104,6 +1104,37 @@ function DocLayout(props) {
|
|
|
1104
1104
|
]);
|
|
1105
1105
|
const [isSidebarOpen, setIsSidebarOpen] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(false);
|
|
1106
1106
|
|
|
1107
|
+
const sidebarData = useSidebarData();
|
|
1108
|
+
const activeMatcher = useActiveMatcher();
|
|
1109
|
+
|
|
1110
|
+
function findActiveBreadcrumb(items, activeMatcher, parents = []) {
|
|
1111
|
+
for (const item of items) {
|
|
1112
|
+
if ('link' in item && item.link && activeMatcher(item.link)) {
|
|
1113
|
+
return [...parents, item.text];
|
|
1114
|
+
}
|
|
1115
|
+
if ('items' in item) {
|
|
1116
|
+
const found = findActiveBreadcrumb(item.items, activeMatcher, [...parents, item.text]);
|
|
1117
|
+
if (found) return found;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
return null;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
const breadcrumb = findActiveBreadcrumb(sidebarData, activeMatcher) || [];
|
|
1124
|
+
|
|
1125
|
+
const breadcrumbNav = breadcrumb.map((text, idx) => (
|
|
1126
|
+
text = text + (idx < breadcrumb.length - 1 ? ' > ' : '')
|
|
1127
|
+
));
|
|
1128
|
+
|
|
1129
|
+
if (frontmatter.breadcrumb) {
|
|
1130
|
+
if (breadcrumbNav.length > 0) {
|
|
1131
|
+
breadcrumbNav.unshift(frontmatter.breadcrumb + ' > ');
|
|
1132
|
+
}
|
|
1133
|
+
else{
|
|
1134
|
+
breadcrumbNav.unshift(frontmatter.breadcrumb);
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1107
1138
|
return [
|
|
1108
1139
|
(0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
|
|
1109
1140
|
className: `${DocLayout_index_module.docLayout} pt-0`,
|
|
@@ -1170,8 +1201,8 @@ function DocLayout(props) {
|
|
|
1170
1201
|
style: {
|
|
1171
1202
|
fontWeight: '600'
|
|
1172
1203
|
},
|
|
1173
|
-
children:
|
|
1174
|
-
})
|
|
1204
|
+
children: breadcrumbNav
|
|
1205
|
+
})
|
|
1175
1206
|
]
|
|
1176
1207
|
}),
|
|
1177
1208
|
]
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspress-theme-anatole/theme-default",
|
|
3
3
|
"author": "Anatole Tong",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.4",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"sideEffects": [
|
|
7
7
|
"*.css",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"types": "./dist/bundle.d.ts",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@mdx-js/react": "2.3.0",
|
|
24
|
-
"@rspress-theme-anatole/shared": "0.3.
|
|
24
|
+
"@rspress-theme-anatole/shared": "0.3.4",
|
|
25
25
|
"@rspress/runtime": "1.43.8",
|
|
26
26
|
"body-scroll-lock": "4.0.0-beta.0",
|
|
27
27
|
"copy-to-clipboard": "^3.3.3",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-helmet-async": "^1.3.0",
|
|
36
36
|
"react-router-dom": "6.29.0",
|
|
37
37
|
"react-syntax-highlighter": "^15.6.1",
|
|
38
|
-
"@rspress-theme-anatole/rspress-plugin-mermaid": "0.3.
|
|
38
|
+
"@rspress-theme-anatole/rspress-plugin-mermaid": "0.3.4"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@microsoft/api-extractor": "^7.49.2",
|