@rspress/plugin-preview 2.0.0-beta.8 → 2.0.0-beta.9

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/README.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  > Preview plugin for rspress
4
4
 
5
- [Documentation](https://rspress.dev/plugin/official-plugins/preview)
5
+ [Documentation](https://rspress.rs/plugin/official-plugins/preview)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/plugin-preview",
3
- "version": "2.0.0-beta.8",
3
+ "version": "2.0.0-beta.9",
4
4
  "description": "A plugin for rspress to preview the code block in markdown/mdx file.",
5
5
  "bugs": "https://github.com/web-infra-dev/rspress/issues",
6
6
  "repository": {
@@ -31,8 +31,8 @@
31
31
  "@rsbuild/plugin-solid": "~1.0.5",
32
32
  "lodash": "4.17.21",
33
33
  "qrcode.react": "^4.2.0",
34
- "@rspress/theme-default": "2.0.0-beta.8",
35
- "@rspress/shared": "2.0.0-beta.8"
34
+ "@rspress/shared": "2.0.0-beta.9",
35
+ "@rspress/theme-default": "2.0.0-beta.9"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@rslib/core": "0.8.0",
@@ -52,7 +52,7 @@
52
52
  "unist-util-visit": "^5.0.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "@rspress/core": "^2.0.0-beta.8",
55
+ "@rspress/core": "^2.0.0-beta.9",
56
56
  "react": ">=18.0.0",
57
57
  "react-router-dom": "^6.8.1"
58
58
  },
@@ -1,12 +1,29 @@
1
- @import url(@rspress/theme-default/bundle.css);
2
-
3
1
  :root {
4
- --rp-iframe-bg: var(--rp-code-block-bg);
2
+ --rp-iframe-bg: #f6f8fa;
3
+ --rp-iframe-nav-bg: #ffffff;
5
4
  }
6
5
 
6
+ /* TODO: support dark mode */
7
+ /* .dark {
8
+ --rp-iframe-bg: #242424;
9
+ --rp-iframe-nav-bg: #191d24;
10
+ } */
11
+
7
12
  body {
8
- background-color: var(--rp-iframe-bg);
13
+ background-color: var(--rp-iframe-bg) !important;
14
+ margin: 0px; /* copied from preflight.css */
15
+ }
16
+
17
+ /* #region copied from preflight.css */
18
+ *,
19
+ ::before,
20
+ ::after {
21
+ box-sizing: border-box; /* 1 */
22
+ border-width: 0; /* 2 */
23
+ border-style: solid; /* 2 */
24
+ border-color: theme('borderColor.DEFAULT', currentColor); /* 2 */
9
25
  }
26
+ /* #endregion copied from preflight.css */
10
27
 
11
28
  .preview-nav {
12
29
  position: relative;
@@ -14,7 +31,7 @@ body {
14
31
  align-items: center;
15
32
  justify-content: center;
16
33
  height: 56px;
17
- background-color: var(--rp-c-bg);
34
+ background-color: var(--rp-iframe-nav-bg) !important;
18
35
  font-weight: 600;
19
36
  font-size: 17px;
20
37
  }