@rspress/plugin-preview 2.0.0-beta.21 → 2.0.0-beta.22

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
@@ -1,5 +1,5 @@
1
1
  import type { RsbuildConfig } from '@rsbuild/core';
2
- import { RspressPlugin } from 'rspress/core';
2
+ import { RspressPlugin } from '@rspress/core';
3
3
 
4
4
  declare interface CustomEntry {
5
5
  entryCssPath: string;
package/dist/index.js CHANGED
@@ -4,8 +4,8 @@ import { createRsbuild, mergeRsbuildConfig } from "@rsbuild/core";
4
4
  import { pluginBabel } from "@rsbuild/plugin-babel";
5
5
  import { pluginReact } from "@rsbuild/plugin-react";
6
6
  import { pluginSolid } from "@rsbuild/plugin-solid";
7
+ import { RSPRESS_TEMP_DIR, normalizePosixPath, removeTrailingSlash } from "@rspress/core";
7
8
  import { cloneDeep, isEqual } from "lodash";
8
- import { RSPRESS_TEMP_DIR, normalizePosixPath, removeTrailingSlash } from "rspress/core";
9
9
  import node_fs, { writeFileSync } from "node:fs";
10
10
  const staticPath = node_path.join(__dirname, '..', 'static');
11
11
  const demoBlockComponentPath = node_path.join(staticPath, 'global-components', 'DemoBlock.tsx');
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare module 'rspress/core' {
1
+ declare module '@rspress/core' {
2
2
  interface PageIndexInfo {
3
3
  devPort?: number;
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/plugin-preview",
3
- "version": "2.0.0-beta.21",
3
+ "version": "2.0.0-beta.22",
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": {
@@ -23,18 +23,18 @@
23
23
  "static"
24
24
  ],
25
25
  "dependencies": {
26
- "@rsbuild/core": "~1.4.6",
26
+ "@rsbuild/core": "~1.4.8",
27
27
  "@rsbuild/plugin-babel": "~1.0.5",
28
- "@rsbuild/plugin-less": "~1.2.5",
28
+ "@rsbuild/plugin-less": "~1.3.0",
29
29
  "@rsbuild/plugin-react": "~1.3.4",
30
30
  "@rsbuild/plugin-sass": "~1.3.3",
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.21"
34
+ "@rspress/theme-default": "2.0.0-beta.22"
35
35
  },
36
36
  "devDependencies": {
37
- "@rslib/core": "0.10.5",
37
+ "@rslib/core": "0.10.6",
38
38
  "@types/lodash": "^4.17.20",
39
39
  "@types/mdast": "^4.0.4",
40
40
  "@types/node": "^22.8.1",
@@ -51,9 +51,9 @@
51
51
  "unist-util-visit": "^5.0.0"
52
52
  },
53
53
  "peerDependencies": {
54
+ "@rspress/core": "^2.0.0-beta.22",
54
55
  "react": ">=18.0.0",
55
- "react-router-dom": "^6.8.1",
56
- "rspress": "^2.0.0-beta.21"
56
+ "react-router-dom": "^6.8.1"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">=18.0.0"
@@ -1,5 +1,5 @@
1
+ import { NoSSR, useLang, usePageData, withBase } from '@rspress/core/runtime';
1
2
  import { type MouseEvent, useCallback, useState } from 'react';
2
- import { NoSSR, useLang, usePageData, withBase } from 'rspress/runtime';
3
3
  import MobileOperation from './common/mobile-operation';
4
4
  import IconCode from './icons/Code';
5
5
 
@@ -1,5 +1,10 @@
1
+ import {
2
+ NoSSR,
3
+ usePageData,
4
+ useWindowSize,
5
+ withBase,
6
+ } from '@rspress/core/runtime';
1
7
  import { useCallback, useEffect, useState } from 'react';
2
- import { NoSSR, usePageData, useWindowSize, withBase } from 'rspress/runtime';
3
8
  // @ts-ignore
4
9
  import { normalizeId } from '../../dist/utils';
5
10
  import MobileOperation from './common/mobile-operation';
@@ -1,3 +1,4 @@
1
+ import { useLang } from '@rspress/core/runtime';
1
2
  import { QRCodeSVG } from 'qrcode.react';
2
3
  import {
3
4
  type MouseEventHandler,
@@ -6,7 +7,6 @@ import {
6
7
  useRef,
7
8
  useState,
8
9
  } from 'react';
9
- import { useLang } from 'rspress/runtime';
10
10
  import IconLaunch from '../icons/Launch';
11
11
  import IconQrcode from '../icons/Qrcode';
12
12
  import IconRefresh from '../icons/Refresh';