@rspress-theme-anatole/theme-default 0.7.45 → 0.7.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/bundle.js +38 -15
  2. package/package.json +3 -3
package/dist/bundle.js CHANGED
@@ -1068,6 +1068,7 @@ function Sidebar(props) {
1068
1068
  const pathname = decodeURIComponent(rawPathname);
1069
1069
  const { siteData, page } = (0, __WEBPACK_EXTERNAL_MODULE__rspress_runtime_0abd3046__.usePageData)();
1070
1070
  const { base } = siteData;
1071
+ const sidebarLocalesData = useLocaleSiteData();
1071
1072
  const activeMatcher = useActiveMatcher();
1072
1073
  (0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(() => {
1073
1074
  if ((0, __WEBPACK_EXTERNAL_MODULE__rspress_shared_baa012d0__.inBrowser)()) {
@@ -1207,7 +1208,7 @@ function Sidebar(props) {
1207
1208
  className: "fa-regular fa-file-pdf",
1208
1209
  style: { marginRight: '8px' }
1209
1210
  }),
1210
- "Download full guide"
1211
+ sidebarLocalesData?.downloadFullGuideText || "Download full guide"
1211
1212
  ]
1212
1213
  })
1213
1214
  })
@@ -1659,7 +1660,7 @@ function DocLayout(props) {
1659
1660
  }),
1660
1661
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
1661
1662
  className: "ml-2",
1662
- children: "Download this article"
1663
+ children: localesData?.downloadThisArticleText || "Download this article"
1663
1664
  })
1664
1665
  ],
1665
1666
  style: {
@@ -4352,6 +4353,25 @@ function HomepageTopSearch({ frontmatter, routePath }) {
4352
4353
  function IntroBanner({ frontmatter, routePath }) {
4353
4354
  const banner = frontmatter?.banner || DEFAULT_HERO;
4354
4355
 
4356
+ // Build breadcrumb items: root first, then parents array, then current
4357
+ const buildBreadcrumbs = () => {
4358
+ const items = [];
4359
+
4360
+ // Add root if exists
4361
+ if (banner.root?.text) {
4362
+ items.push(banner.root);
4363
+ }
4364
+
4365
+ // Add parents array if exists
4366
+ if (banner.parents && Array.isArray(banner.parents)) {
4367
+ items.push(...banner.parents);
4368
+ }
4369
+
4370
+ return items;
4371
+ };
4372
+
4373
+ const breadcrumbItems = buildBreadcrumbs();
4374
+
4355
4375
  return (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("div", {
4356
4376
  style: {
4357
4377
  height: "233px",
@@ -4372,19 +4392,22 @@ function IntroBanner({ frontmatter, routePath }) {
4372
4392
  marginBottom: "10px"
4373
4393
  },
4374
4394
  children: [
4375
- banner.root?.text && (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
4376
- "a",
4377
- {
4378
- href: banner.root.link || "#",
4379
- style: {
4380
- textDecoration: "underline",
4381
- color: "#32363E",
4382
- fontWeight: "600"
4383
- },
4384
- children: banner.root.text
4385
- }
4386
- ),
4387
- " > ",
4395
+ ...breadcrumbItems.map((item, index) => [
4396
+ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(
4397
+ "a",
4398
+ {
4399
+ href: item.link,
4400
+ style: {
4401
+ textDecoration: "underline",
4402
+ color: "#32363E",
4403
+ fontWeight: "600"
4404
+ },
4405
+ children: item.text
4406
+ },
4407
+ `breadcrumb-${index}`
4408
+ ),
4409
+ " > "
4410
+ ]).flat(),
4388
4411
  banner.current
4389
4412
  ]
4390
4413
  }),
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.7.45",
4
+ "version": "0.7.47",
5
5
  "license": "MIT",
6
6
  "sideEffects": [
7
7
  "*.css",
@@ -21,8 +21,8 @@
21
21
  "types": "./dist/bundle.d.ts",
22
22
  "dependencies": {
23
23
  "@mdx-js/react": "2.3.0",
24
- "@rspress-theme-anatole/rspress-plugin-mermaid": "0.7.45",
25
- "@rspress-theme-anatole/shared": "0.7.45",
24
+ "@rspress-theme-anatole/rspress-plugin-mermaid": "0.7.47",
25
+ "@rspress-theme-anatole/shared": "0.7.47",
26
26
  "@rspress/runtime": "1.43.8",
27
27
  "body-scroll-lock": "4.0.0-beta.0",
28
28
  "copy-to-clipboard": "^3.3.3",