@rspress/shared 2.0.7 → 2.0.8

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 CHANGED
@@ -258,6 +258,22 @@ export declare interface MarkdownOptions {
258
258
  * @default false
259
259
  */
260
260
  defaultWrapCode?: boolean;
261
+ /**
262
+ * Default code block overflow behavior when content exceeds the specified height.
263
+ */
264
+ defaultCodeOverflow?: {
265
+ /**
266
+ * Height threshold in pixels. When not set, no overflow behavior is applied.
267
+ */
268
+ height?: number;
269
+ /**
270
+ * How to handle code blocks exceeding the height.
271
+ * - `scroll`: fixed height with scrollbar
272
+ * - `fold`: collapsible with expand button
273
+ * @default 'scroll'
274
+ */
275
+ behavior?: 'fold' | 'scroll';
276
+ };
261
277
  /**
262
278
  * Register global components in mdx files
263
279
  */
@@ -257,6 +257,22 @@ declare interface MarkdownOptions {
257
257
  * @default false
258
258
  */
259
259
  defaultWrapCode?: boolean;
260
+ /**
261
+ * Default code block overflow behavior when content exceeds the specified height.
262
+ */
263
+ defaultCodeOverflow?: {
264
+ /**
265
+ * Height threshold in pixels. When not set, no overflow behavior is applied.
266
+ */
267
+ height?: number;
268
+ /**
269
+ * How to handle code blocks exceeding the height.
270
+ * - `scroll`: fixed height with scrollbar
271
+ * - `fold`: collapsible with expand button
272
+ * @default 'scroll'
273
+ */
274
+ behavior?: 'fold' | 'scroll';
275
+ };
260
276
  /**
261
277
  * Register global components in mdx files
262
278
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/shared",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/web-infra-dev/rspress.git",
@@ -32,14 +32,14 @@
32
32
  "dist"
33
33
  ],
34
34
  "dependencies": {
35
- "@rsbuild/core": "2.0.0-beta.10",
35
+ "@rsbuild/core": "2.0.0-beta.11",
36
36
  "@shikijs/rehype": "^4.0.2",
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.20.0",
42
+ "@rslib/core": "0.20.2",
43
43
  "@types/lodash-es": "^4.17.12",
44
44
  "@types/node": "^22.8.1",
45
45
  "@types/react": "^19.2.14",