@rspress/plugin-preview 0.0.1 → 0.0.3
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.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/virtual-demo.js +1 -1
- package/package.json +2 -2
- package/static/global-components/Container.scss +7 -8
- package/static/global-components/Container.tsx +8 -8
- package/static/global-components/DemoBlock.scss +4 -4
- package/static/global-components/DemoBlock.tsx +3 -3
- package/static/global-components/Device.scss +19 -17
- package/static/global-components/Device.tsx +7 -8
- package/static/global-components/common/mobile-operation.tsx +2 -2
- package/static/global-styles/mobile.css +14 -14
- package/static/global-styles/web.css +4 -4
package/dist/index.js
CHANGED
@@ -2769,11 +2769,13 @@ __export(src_exports, {
|
|
2769
2769
|
module.exports = __toCommonJS(src_exports);
|
2770
2770
|
var import_path3 = __toESM(require("path"));
|
2771
2771
|
var import_rspack_plugin_virtual_module = __toESM(require_dist());
|
2772
|
+
var import_shared2 = require("@rspress/shared");
|
2772
2773
|
|
2773
2774
|
// src/codeToDemo.ts
|
2774
2775
|
var import_path2 = require("path");
|
2775
2776
|
init_unist_util_visit();
|
2776
2777
|
var import_fs_extra = __toESM(require("@modern-js/utils/fs-extra"));
|
2778
|
+
var import_shared = require("@rspress/shared");
|
2777
2779
|
|
2778
2780
|
// src/utils.ts
|
2779
2781
|
var toValidVarName = (str) => {
|
@@ -2895,7 +2897,7 @@ var remarkCodeToDemo = ({ isMobile, getRouteMeta, iframePosition }) => {
|
|
2895
2897
|
const demoDir = (0, import_path2.join)(
|
2896
2898
|
process.cwd(),
|
2897
2899
|
"node_modules",
|
2898
|
-
|
2900
|
+
import_shared.RSPRESS_TEMP_DIR,
|
2899
2901
|
`virtual-demo`
|
2900
2902
|
);
|
2901
2903
|
const id = `${toValidVarName(pageName)}_${index++}`;
|
@@ -3083,7 +3085,7 @@ import Demo from ${JSON.stringify(demoComponentPath)}
|
|
3083
3085
|
const demoDir = (0, import_path3.join)(
|
3084
3086
|
process.cwd(),
|
3085
3087
|
"node_modules",
|
3086
|
-
|
3088
|
+
import_shared2.RSPRESS_TEMP_DIR,
|
3087
3089
|
`virtual-demo`
|
3088
3090
|
);
|
3089
3091
|
const virtualModulePath = (0, import_path3.join)(demoDir, `${id}.tsx`);
|