@rspress/shared 1.11.1 → 1.12.0

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/index.d.ts +19 -1
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -123,6 +123,10 @@ interface Config$1 {
123
123
  * Whether to open the full text search
124
124
  */
125
125
  search?: boolean;
126
+ /**
127
+ * The placeholder of search input
128
+ */
129
+ searchPlaceholderText?: string;
126
130
  /**
127
131
  * The behavior of hiding navbar
128
132
  */
@@ -131,6 +135,11 @@ interface Config$1 {
131
135
  * Whether to enable the animation for translation pages
132
136
  */
133
137
  enableContentAnimation?: boolean;
138
+ /**
139
+ * Enable scroll to top button on documentation
140
+ * @default false
141
+ */
142
+ enableScrollToTop?: boolean;
134
143
  }
135
144
  /**
136
145
  * locale config
@@ -156,6 +165,7 @@ interface LocaleConfig {
156
165
  nextPageText?: string;
157
166
  sourceCodeText?: string;
158
167
  langRoutePrefix?: string;
168
+ searchPlaceholderText?: string;
159
169
  }
160
170
  type Nav = NavItem[] | {
161
171
  [key: string]: NavItem[];
@@ -196,11 +206,19 @@ interface SidebarGroup {
196
206
  items: (SidebarItem | SidebarDivider | SidebarGroup | string)[];
197
207
  collapsible?: boolean;
198
208
  collapsed?: boolean;
209
+ /**
210
+ * For hmr usage in development
211
+ */
212
+ _fileKey?: string;
199
213
  }
200
214
  type SidebarItem = {
201
215
  text: string;
202
216
  link: string;
203
217
  tag?: string;
218
+ /**
219
+ * For hmr usage in development
220
+ */
221
+ _fileKey?: string;
204
222
  };
205
223
  type SidebarDivider = {
206
224
  dividerType: 'dashed' | 'solid';
@@ -232,7 +250,7 @@ interface SocialLink {
232
250
  mode: 'link' | 'text' | 'img';
233
251
  content: string;
234
252
  }
235
- 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' | {
236
254
  svg: string;
237
255
  };
238
256
  interface Footer {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/shared",
3
- "version": "1.11.1",
3
+ "version": "1.12.0",
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.3.1",
45
+ "@rsbuild/core": "0.4.0",
46
46
  "unified": "10.1.2",
47
47
  "chalk": "4.1.2",
48
48
  "execa": "5.1.1",