@rspress/core 1.0.0-beta.1 → 1.0.0-beta.3
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/index.js +19 -12
- package/dist/index.js.map +1 -1
- package/dist/runtime/App.d.ts +1 -0
- package/dist/theme/bundle.d.ts +1 -0
- package/dist/theme/bundle.js +14 -4
- package/dist/theme/bundle.js.map +1 -1
- package/package.json +7 -10
- package/src/theme-default/components/Search/SearchPanel.tsx +1 -0
- package/src/theme-default/components/Tabs/index.tsx +9 -1
- package/src/theme-default/layout/DocLayout/docComponents/link.tsx +2 -1
- package/src/theme-default/layout/Layout/index.tsx +11 -1
package/dist/theme/bundle.js
CHANGED
|
@@ -1732,7 +1732,7 @@ function _object_spread10(target) {
|
|
|
1732
1732
|
return target;
|
|
1733
1733
|
}
|
|
1734
1734
|
var Layout = (props) => {
|
|
1735
|
-
const { top, bottom, beforeDocFooter, beforeDoc, afterDoc, beforeOutline, afterOutline, beforeNavTitle, afterNavTitle, beforeNav } = props;
|
|
1735
|
+
const { top, bottom, beforeDocFooter, beforeDoc, afterDoc, beforeOutline, afterOutline, beforeNavTitle, afterNavTitle, beforeNav, beforeHero, afterHero, beforeFeatures, afterFeatures } = props;
|
|
1736
1736
|
const docProps = {
|
|
1737
1737
|
beforeDocFooter,
|
|
1738
1738
|
beforeDoc,
|
|
@@ -1740,6 +1740,12 @@ var Layout = (props) => {
|
|
|
1740
1740
|
beforeOutline,
|
|
1741
1741
|
afterOutline
|
|
1742
1742
|
};
|
|
1743
|
+
const homeProps = {
|
|
1744
|
+
beforeHero,
|
|
1745
|
+
afterHero,
|
|
1746
|
+
beforeFeatures,
|
|
1747
|
+
afterFeatures
|
|
1748
|
+
};
|
|
1743
1749
|
const { siteData: siteData2, page } = usePageData9();
|
|
1744
1750
|
const { themeConfig } = siteData2;
|
|
1745
1751
|
const {
|
|
@@ -1767,7 +1773,7 @@ var Layout = (props) => {
|
|
|
1767
1773
|
const getContentLayout = () => {
|
|
1768
1774
|
switch (pageType) {
|
|
1769
1775
|
case "home":
|
|
1770
|
-
return /* @__PURE__ */ _jsx15(Theme.HomeLayout, {});
|
|
1776
|
+
return /* @__PURE__ */ _jsx15(Theme.HomeLayout, _object_spread10({}, homeProps));
|
|
1771
1777
|
case "doc":
|
|
1772
1778
|
return /* @__PURE__ */ _jsx15(DocLayout, _object_spread10({}, docProps));
|
|
1773
1779
|
case "404":
|
|
@@ -3915,7 +3921,7 @@ var renderTab = (item) => {
|
|
|
3915
3921
|
return item;
|
|
3916
3922
|
};
|
|
3917
3923
|
function Tabs(props) {
|
|
3918
|
-
const { values, defaultValue, onChange, children, groupId, tabContainerClassName } = props;
|
|
3924
|
+
const { values, defaultValue, onChange, children, groupId, tabPosition = "left", tabContainerClassName } = props;
|
|
3919
3925
|
let tabValues = values || [];
|
|
3920
3926
|
if (tabValues.length === 0) {
|
|
3921
3927
|
tabValues = children.map((child) => {
|
|
@@ -3949,6 +3955,9 @@ function Tabs(props) {
|
|
|
3949
3955
|
className: tabContainerClassName,
|
|
3950
3956
|
children: tabValues.length ? /* @__PURE__ */ _jsx38("div", {
|
|
3951
3957
|
className: index_module_default16.tabList,
|
|
3958
|
+
style: {
|
|
3959
|
+
justifyContent: tabPosition === "center" ? "center" : "flex-start"
|
|
3960
|
+
},
|
|
3952
3961
|
children: tabValues.map((item, index) => {
|
|
3953
3962
|
return /* @__PURE__ */ _jsx38("div", {
|
|
3954
3963
|
className: `${index_module_default16.tab} ${activeIndex === index ? index_module_default16.selected : index_module_default16.notSelected}`,
|
|
@@ -7012,7 +7021,8 @@ function _object_spread_props34(target, source) {
|
|
|
7012
7021
|
var A = (props) => {
|
|
7013
7022
|
const { href = "", className = "" } = props;
|
|
7014
7023
|
const { normalizeLinkHref } = usePathUtils();
|
|
7015
|
-
|
|
7024
|
+
const hasHeaderAnchor = className.includes("header-anchor");
|
|
7025
|
+
if (hasHeaderAnchor || href.startsWith("#")) {
|
|
7016
7026
|
return /* @__PURE__ */ _jsx63("a", _object_spread_props34(_object_spread42({}, props), {
|
|
7017
7027
|
className: `${index_module_default17.link} ${className}`
|
|
7018
7028
|
}));
|