@rspress/shared 0.0.0-next-20240201084444 → 0.0.0-next-20240301060745
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.d.ts +14 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
@@ -135,6 +135,11 @@ interface Config$1 {
|
|
135
135
|
* Whether to enable the animation for translation pages
|
136
136
|
*/
|
137
137
|
enableContentAnimation?: boolean;
|
138
|
+
/**
|
139
|
+
* Enable scroll to top button on documentation
|
140
|
+
* @default false
|
141
|
+
*/
|
142
|
+
enableScrollToTop?: boolean;
|
138
143
|
}
|
139
144
|
/**
|
140
145
|
* locale config
|
@@ -201,11 +206,19 @@ interface SidebarGroup {
|
|
201
206
|
items: (SidebarItem | SidebarDivider | SidebarGroup | string)[];
|
202
207
|
collapsible?: boolean;
|
203
208
|
collapsed?: boolean;
|
209
|
+
/**
|
210
|
+
* For hmr usage in development
|
211
|
+
*/
|
212
|
+
_fileKey?: string;
|
204
213
|
}
|
205
214
|
type SidebarItem = {
|
206
215
|
text: string;
|
207
216
|
link: string;
|
208
217
|
tag?: string;
|
218
|
+
/**
|
219
|
+
* For hmr usage in development
|
220
|
+
*/
|
221
|
+
_fileKey?: string;
|
209
222
|
};
|
210
223
|
type SidebarDivider = {
|
211
224
|
dividerType: 'dashed' | 'solid';
|
@@ -237,7 +250,7 @@ interface SocialLink {
|
|
237
250
|
mode: 'link' | 'text' | 'img';
|
238
251
|
content: string;
|
239
252
|
}
|
240
|
-
type SocialLinkIcon = 'lark' | 'discord' | 'facebook' | 'github' | 'instagram' | 'linkedin' | 'slack' | 'twitter' | 'youtube' | 'wechat' | 'qq' | 'juejin' | 'zhihu' | 'bilibili' | 'weibo' | 'gitlab' | {
|
253
|
+
type SocialLinkIcon = 'lark' | 'discord' | 'facebook' | 'github' | 'instagram' | 'linkedin' | 'slack' | 'twitter' | 'youtube' | 'wechat' | 'qq' | 'juejin' | 'zhihu' | 'bilibili' | 'weibo' | 'gitlab' | 'X' | {
|
241
254
|
svg: string;
|
242
255
|
};
|
243
256
|
interface Footer {
|
package/dist/index.js
CHANGED
@@ -1170,7 +1170,7 @@ function normalizePosixPath(id) {
|
|
1170
1170
|
}
|
1171
1171
|
var inBrowser = () => !process.env.__SSR__;
|
1172
1172
|
function addLeadingSlash(url) {
|
1173
|
-
return url.charAt(0) === "/" || url
|
1173
|
+
return url.charAt(0) === "/" || isExternalUrl(url) ? url : `/${url}`;
|
1174
1174
|
}
|
1175
1175
|
function removeLeadingSlash(url) {
|
1176
1176
|
return url.charAt(0) === "/" ? url.slice(1) : url;
|
package/dist/index.mjs
CHANGED
@@ -1112,7 +1112,7 @@ function normalizePosixPath(id) {
|
|
1112
1112
|
}
|
1113
1113
|
var inBrowser = () => !process.env.__SSR__;
|
1114
1114
|
function addLeadingSlash(url) {
|
1115
|
-
return url.charAt(0) === "/" || url
|
1115
|
+
return url.charAt(0) === "/" || isExternalUrl(url) ? url : `/${url}`;
|
1116
1116
|
}
|
1117
1117
|
function removeLeadingSlash(url) {
|
1118
1118
|
return url.charAt(0) === "/" ? url.slice(1) : url;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@rspress/shared",
|
3
|
-
"version": "0.0.0-next-
|
3
|
+
"version": "0.0.0-next-20240301060745",
|
4
4
|
"types": "./dist/index.d.ts",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"module": "./dist/index.mjs",
|
@@ -42,7 +42,7 @@
|
|
42
42
|
}
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
|
-
"@rsbuild/core": "0.
|
45
|
+
"@rsbuild/core": "0.4.0",
|
46
46
|
"unified": "10.1.2",
|
47
47
|
"chalk": "4.1.2",
|
48
48
|
"execa": "5.1.1",
|