@rspress/shared 2.0.3 → 2.0.5
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 +20 -0
- package/dist/node-utils.d.ts +20 -0
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -187,6 +187,13 @@ export declare type LlmsUI = {
|
|
|
187
187
|
* @default ['markdownLink', 'chatgpt', 'claude']
|
|
188
188
|
*/
|
|
189
189
|
viewOptions?: LlmsViewOption[];
|
|
190
|
+
/**
|
|
191
|
+
* Where to display the LLM UI components.
|
|
192
|
+
* - 'title': Show as buttons below the H1 title (default)
|
|
193
|
+
* - 'outline': Show as separate rows in the outline sidebar
|
|
194
|
+
* @default 'title'
|
|
195
|
+
*/
|
|
196
|
+
placement?: 'title' | 'outline';
|
|
190
197
|
} | boolean;
|
|
191
198
|
|
|
192
199
|
/**
|
|
@@ -231,6 +238,7 @@ export declare type LocalSearchOptions = SearchHooks & {
|
|
|
231
238
|
mode?: 'local';
|
|
232
239
|
/**
|
|
233
240
|
* Whether to generate separate search index for each version
|
|
241
|
+
* @default true
|
|
234
242
|
*/
|
|
235
243
|
versioned?: boolean;
|
|
236
244
|
/**
|
|
@@ -269,6 +277,14 @@ export declare interface MarkdownOptions {
|
|
|
269
277
|
* @default true
|
|
270
278
|
*/
|
|
271
279
|
extractDescription?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* Whether to enable CJK-friendly emphasis and strikethrough handling.
|
|
282
|
+
* This fixes a CommonMark specification issue where emphasis/strong and strikethrough markers (`*`, `**`, `~~`)
|
|
283
|
+
* are not recognized correctly when CJK characters are adjacent.
|
|
284
|
+
* @default true
|
|
285
|
+
* @see {@link https://github.com/tats-u/markdown-cjk-friendly}
|
|
286
|
+
*/
|
|
287
|
+
cjkFriendlyEmphasis?: boolean;
|
|
272
288
|
}
|
|
273
289
|
|
|
274
290
|
export declare const matchNavbar: (item: NavItemWithLink, currentPathname: string) => boolean;
|
|
@@ -301,6 +317,8 @@ export declare type NavItemWithLink = {
|
|
|
301
317
|
tag?: string;
|
|
302
318
|
activeMatch?: string;
|
|
303
319
|
position?: 'left' | 'right';
|
|
320
|
+
lang?: string;
|
|
321
|
+
rel?: string;
|
|
304
322
|
};
|
|
305
323
|
|
|
306
324
|
export declare interface NavItemWithLinkAndChildren {
|
|
@@ -310,6 +328,8 @@ export declare interface NavItemWithLinkAndChildren {
|
|
|
310
328
|
tag?: string;
|
|
311
329
|
activeMatch?: string;
|
|
312
330
|
position?: 'left' | 'right';
|
|
331
|
+
lang?: string;
|
|
332
|
+
rel?: string;
|
|
313
333
|
}
|
|
314
334
|
|
|
315
335
|
export declare interface NormalizedLocales extends Omit<LocaleConfig, 'sidebar'> {
|
package/dist/node-utils.d.ts
CHANGED
|
@@ -180,6 +180,13 @@ declare type LlmsUI = {
|
|
|
180
180
|
* @default ['markdownLink', 'chatgpt', 'claude']
|
|
181
181
|
*/
|
|
182
182
|
viewOptions?: LlmsViewOption[];
|
|
183
|
+
/**
|
|
184
|
+
* Where to display the LLM UI components.
|
|
185
|
+
* - 'title': Show as buttons below the H1 title (default)
|
|
186
|
+
* - 'outline': Show as separate rows in the outline sidebar
|
|
187
|
+
* @default 'title'
|
|
188
|
+
*/
|
|
189
|
+
placement?: 'title' | 'outline';
|
|
183
190
|
} | boolean;
|
|
184
191
|
|
|
185
192
|
/**
|
|
@@ -230,6 +237,7 @@ declare type LocalSearchOptions = SearchHooks & {
|
|
|
230
237
|
mode?: 'local';
|
|
231
238
|
/**
|
|
232
239
|
* Whether to generate separate search index for each version
|
|
240
|
+
* @default true
|
|
233
241
|
*/
|
|
234
242
|
versioned?: boolean;
|
|
235
243
|
/**
|
|
@@ -268,6 +276,14 @@ declare interface MarkdownOptions {
|
|
|
268
276
|
* @default true
|
|
269
277
|
*/
|
|
270
278
|
extractDescription?: boolean;
|
|
279
|
+
/**
|
|
280
|
+
* Whether to enable CJK-friendly emphasis and strikethrough handling.
|
|
281
|
+
* This fixes a CommonMark specification issue where emphasis/strong and strikethrough markers (`*`, `**`, `~~`)
|
|
282
|
+
* are not recognized correctly when CJK characters are adjacent.
|
|
283
|
+
* @default true
|
|
284
|
+
* @see {@link https://github.com/tats-u/markdown-cjk-friendly}
|
|
285
|
+
*/
|
|
286
|
+
cjkFriendlyEmphasis?: boolean;
|
|
271
287
|
}
|
|
272
288
|
|
|
273
289
|
export declare const mergeDocConfig: (...configs: UserConfig[]) => Promise<UserConfig>;
|
|
@@ -291,6 +307,8 @@ declare type NavItemWithLink = {
|
|
|
291
307
|
tag?: string;
|
|
292
308
|
activeMatch?: string;
|
|
293
309
|
position?: 'left' | 'right';
|
|
310
|
+
lang?: string;
|
|
311
|
+
rel?: string;
|
|
294
312
|
};
|
|
295
313
|
|
|
296
314
|
declare interface NavItemWithLinkAndChildren {
|
|
@@ -300,6 +318,8 @@ declare interface NavItemWithLinkAndChildren {
|
|
|
300
318
|
tag?: string;
|
|
301
319
|
activeMatch?: string;
|
|
302
320
|
position?: 'left' | 'right';
|
|
321
|
+
lang?: string;
|
|
322
|
+
rel?: string;
|
|
303
323
|
}
|
|
304
324
|
|
|
305
325
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspress/shared",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/web-infra-dev/rspress.git",
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@rsbuild/core": "2.0.0-beta.
|
|
36
|
-
"@shikijs/rehype": "^
|
|
35
|
+
"@rsbuild/core": "2.0.0-beta.6",
|
|
36
|
+
"@shikijs/rehype": "^4.0.1",
|
|
37
37
|
"gray-matter": "4.0.3",
|
|
38
38
|
"lodash-es": "^4.17.23",
|
|
39
39
|
"unified": "^11.0.5"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@rslib/core": "0.19.
|
|
42
|
+
"@rslib/core": "0.19.6",
|
|
43
43
|
"@types/lodash-es": "^4.17.12",
|
|
44
44
|
"@types/node": "^22.8.1",
|
|
45
|
-
"@types/react": "^19.2.
|
|
45
|
+
"@types/react": "^19.2.14",
|
|
46
46
|
"mdast-util-mdx-jsx": "^3.2.0",
|
|
47
47
|
"medium-zoom": "1.1.0",
|
|
48
|
-
"rimraf": "^6.1.
|
|
48
|
+
"rimraf": "^6.1.3",
|
|
49
49
|
"rsbuild-plugin-publint": "^0.3.4",
|
|
50
50
|
"typescript": "^5.8.2"
|
|
51
51
|
},
|