@rspress/plugin-preview 2.0.0-rc.1 → 2.0.0-rc.2
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 +7 -24
- package/dist/index.js +273 -273
- package/dist/utils.d.ts +0 -2
- package/dist/utils.js +1 -5
- package/package.json +8 -11
- package/static/global-components/{Device.css → FixedDevice.css} +31 -23
- package/static/global-components/FixedDevice.tsx +68 -0
- package/static/global-components/Preview.css +133 -0
- package/static/global-components/Preview.tsx +130 -0
- package/static/global-components/common/PreviewOperations.css +61 -0
- package/static/global-components/common/{mobile-operation.tsx → PreviewOperations.tsx} +20 -7
- package/static/{global-styles → iframe}/entry.css +3 -4
- package/static/iframe/entry.js +25 -0
- package/static/global-components/Container.tsx +0 -92
- package/static/global-components/DemoBlock.css +0 -23
- package/static/global-components/DemoBlock.tsx +0 -16
- package/static/global-components/Device.tsx +0 -76
- package/static/global-components/common/index.css +0 -103
- package/static/global-styles/iframe.css +0 -31
- package/static/global-styles/internal.css +0 -5
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type { RsbuildConfig } from '@rsbuild/core';
|
|
|
2
2
|
import { RspressPlugin } from '@rspress/core';
|
|
3
3
|
|
|
4
4
|
declare interface CustomEntry {
|
|
5
|
-
entryCssPath: string;
|
|
6
5
|
demoPath: string;
|
|
7
6
|
}
|
|
8
7
|
|
|
@@ -10,13 +9,9 @@ declare type IframeOptions = {
|
|
|
10
9
|
/**
|
|
11
10
|
* framework in the iframe
|
|
12
11
|
* @default 'react'
|
|
12
|
+
* @deprecated
|
|
13
13
|
*/
|
|
14
|
-
framework?: 'react'
|
|
15
|
-
/**
|
|
16
|
-
* position of the iframe
|
|
17
|
-
* @default 'follow'
|
|
18
|
-
*/
|
|
19
|
-
position?: 'fixed' | 'follow';
|
|
14
|
+
framework?: 'react';
|
|
20
15
|
/**
|
|
21
16
|
* dev server port for the iframe
|
|
22
17
|
* @default 7890
|
|
@@ -31,31 +26,19 @@ declare type IframeOptions = {
|
|
|
31
26
|
|
|
32
27
|
export declare type Options = {
|
|
33
28
|
/**
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* false = 'internal'
|
|
37
|
-
*/
|
|
38
|
-
isMobile?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* @deprecated Use iframeOptions.position instead.
|
|
29
|
+
* determine how to handle a internal code block without meta like \`\`\`tsx
|
|
30
|
+
* @default 'preview'
|
|
41
31
|
*/
|
|
42
|
-
|
|
32
|
+
defaultRenderMode?: 'pure' | 'preview';
|
|
43
33
|
/**
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* iframe mode: component will be rendered in iframe, note that aside will hide.
|
|
34
|
+
* determine how to preview \`\`\`tsx preview code block
|
|
47
35
|
* @default 'internal'
|
|
48
36
|
*/
|
|
49
|
-
|
|
37
|
+
defaultPreviewMode?: 'internal' | 'iframe-fixed' | 'iframe-follow';
|
|
50
38
|
/**
|
|
51
39
|
* enable when preview mode is iframe.
|
|
52
40
|
*/
|
|
53
41
|
iframeOptions?: IframeOptions;
|
|
54
|
-
/**
|
|
55
|
-
* determine how to handle a internal code block without meta
|
|
56
|
-
* @default 'preview'
|
|
57
|
-
*/
|
|
58
|
-
defaultRenderMode?: 'pure' | 'preview';
|
|
59
42
|
/**
|
|
60
43
|
* Supported languages to be previewed
|
|
61
44
|
*/
|