@rspress-theme-anatole/theme-default 0.7.5 → 0.7.6

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 +10 -9
  2. package/package.json +3 -3
package/dist/bundle.js CHANGED
@@ -2985,15 +2985,15 @@ function HomepageFeatures({ frontmatter, routePath }) {
2985
2985
 
2986
2986
  function HomepageFeaturesTabs({ frontmatter, routePath }) {
2987
2987
  const [activeTab, setActiveTab] = __WEBPACK_EXTERNAL_MODULE_react__.useState(0);
2988
- const features = frontmatter?.features;
2988
+ const featureTabs = frontmatter?.featureTabs;
2989
2989
 
2990
- return (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2990
+ return featureTabs.length > 0 ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2991
2991
  className: "features-div",
2992
2992
  children: [
2993
2993
  //Tabs
2994
2994
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
2995
2995
  className: "features-tabs",
2996
- children: features.tabs.map((tab, idx) =>
2996
+ children: featureTabs.tabs.map((tab, idx) =>
2997
2997
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("button", {
2998
2998
  className: "features-tab" + (idx === activeTab ? " active" : ""),
2999
2999
  onClick: () => setActiveTab(idx),
@@ -3003,9 +3003,10 @@ function HomepageFeaturesTabs({ frontmatter, routePath }) {
3003
3003
  }),
3004
3004
 
3005
3005
  // Tab content
3006
+ featureTabs.tabs[activeTab].rows.length > 0 ?
3006
3007
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3007
- children: features.tabs[activeTab].rows.map((featuresRow) => {
3008
- return (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3008
+ children: featureTabs.tabs[activeTab].rows.map((featuresRow) => {
3009
+ return featuresRow.items.length > 0 ? (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3009
3010
  style: {
3010
3011
  display: 'grid',
3011
3012
  gridTemplateColumns: 'repeat(4, 1fr)',
@@ -3037,7 +3038,7 @@ function HomepageFeaturesTabs({ frontmatter, routePath }) {
3037
3038
  className: "topics-item-desc",
3038
3039
  children: featureItem.desc
3039
3040
  }),
3040
- featureItem.labels && (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3041
+ featureItem.labels.length > 0 && (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
3041
3042
  className: "topics-item-labels",
3042
3043
  children: featureItem.labels.map((label) =>
3043
3044
  (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
@@ -3049,11 +3050,11 @@ function HomepageFeaturesTabs({ frontmatter, routePath }) {
3049
3050
  ]
3050
3051
  }, featureItem.text)
3051
3052
  )
3052
- }, featuresRow.items[0].text);
3053
+ }, featuresRow.items[0].text) : null;
3053
3054
  })
3054
- })
3055
+ }) : null,
3055
3056
  ]
3056
- });
3057
+ }) : null;
3057
3058
  }
3058
3059
 
3059
3060
  function HomepageFaqs({ frontmatter, routePath }) {
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.5",
4
+ "version": "0.7.6",
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.5",
25
- "@rspress-theme-anatole/shared": "0.7.5",
24
+ "@rspress-theme-anatole/rspress-plugin-mermaid": "0.7.6",
25
+ "@rspress-theme-anatole/shared": "0.7.6",
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",