@rspress/core 2.0.0-beta.22 → 2.0.0-beta.23

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.
@@ -1,7 +1,7 @@
1
1
  import { workerData } from "node:worker_threads";
2
2
  import { fileURLToPath, pathToFileURL } from "node:url";
3
- import { createHead, transformHtmlTemplate } from "@unhead/react/server";
4
3
  import { logger as logger_logger } from "@rspress/shared/logger";
4
+ import { createHead, transformHtmlTemplate } from "@unhead/react/server";
5
5
  import picocolors_0 from "picocolors";
6
6
  import "node:fs/promises";
7
7
  import node_path from "node:path";
@@ -102,7 +102,7 @@ function hintSSGFailed() {
102
102
  1. Fix code to make it SSR-compatible.
103
103
  2. Set \`ssg: false\` if the code in node_modules may be difficult to fix, but the SSG feature will be lost.`);
104
104
  }
105
- var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.22"}');
105
+ var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.23"}');
106
106
  const RSPRESS_VERSION = package_namespaceObject.i8;
107
107
  `{
108
108
  const saved = localStorage.getItem('${APPEARANCE_KEY}')
@@ -1,10 +1,10 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
+ import { PassThrough } from "node:stream";
3
+ import { text as consumers_text } from "node:stream/consumers";
2
4
  import { DataContext, ThemeContext, pathnameToRouteService, withBase } from "@rspress/runtime";
3
5
  import { StaticRouter } from "@rspress/runtime/server";
4
6
  import { UnheadProvider } from "@unhead/react/server";
5
7
  import { renderToPipeableStream } from "react-dom/server";
6
- import { PassThrough } from "node:stream";
7
- import { text as consumers_text } from "node:stream/consumers";
8
8
  import { base } from "virtual-runtime-config";
9
9
  import { App } from "./App.js";
10
10
  import { initPageData } from "./initPageData.js";
@@ -1,17 +1,4 @@
1
1
  /*! For license information please see shiki-transformers.js.LICENSE.txt */
2
- const SHIKI_TRANSFORMER_LINE_NUMBER = 'shiki-transformer:line-number';
3
- function transformerLineNumber(options = {}) {
4
- const { classActiveLine = 'line-number', classActivePre = 'has-line-number' } = options;
5
- return {
6
- name: SHIKI_TRANSFORMER_LINE_NUMBER,
7
- pre (pre) {
8
- return this.addClassToHast(pre, classActivePre);
9
- },
10
- line (node) {
11
- this.addClassToHast(node, classActiveLine);
12
- }
13
- };
14
- }
15
2
  const SHIKI_TRANSFORMER_ADD_TITLE = 'shiki-transformer:add-title';
16
3
  function parseTitleFromMeta(meta) {
17
4
  if (!meta) return '';
@@ -35,6 +22,19 @@ function transformerAddTitle() {
35
22
  }
36
23
  };
37
24
  }
25
+ const SHIKI_TRANSFORMER_LINE_NUMBER = 'shiki-transformer:line-number';
26
+ function transformerLineNumber(options = {}) {
27
+ const { classActiveLine = 'line-number', classActivePre = 'has-line-number' } = options;
28
+ return {
29
+ name: SHIKI_TRANSFORMER_LINE_NUMBER,
30
+ pre (pre) {
31
+ return this.addClassToHast(pre, classActivePre);
32
+ },
33
+ line (node) {
34
+ this.addClassToHast(node, classActiveLine);
35
+ }
36
+ };
37
+ }
38
38
  /**
39
39
  * these codes are copied from @shiki/transformers, transformerMetaHighlight
40
40
  * @source https://github.com/shikijs/shiki/blob/f5cf06f55a0b4643d7b02f15ee2c5033be6f1245/packages/transformers/src/transformers/meta-highlight.ts#L56
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspress/core",
3
- "version": "2.0.0-beta.22",
3
+ "version": "2.0.0-beta.23",
4
4
  "description": "The Rspress Documentation Framework",
5
5
  "bugs": "https://github.com/web-infra-dev/rspress/issues",
6
6
  "repository": {
@@ -54,7 +54,7 @@
54
54
  "@mdx-js/loader": "^3.1.0",
55
55
  "@mdx-js/mdx": "^3.1.0",
56
56
  "@mdx-js/react": "^3.1.0",
57
- "@rsbuild/core": "~1.4.8",
57
+ "@rsbuild/core": "~1.4.11",
58
58
  "@rsbuild/plugin-react": "~1.3.4",
59
59
  "@rspress/mdx-rs": "0.6.6",
60
60
  "@shikijs/rehype": "^3.8.1",
@@ -86,14 +86,13 @@
86
86
  "unified": "^11.0.5",
87
87
  "unist-util-visit": "^5.0.0",
88
88
  "unist-util-visit-children": "^3.0.0",
89
- "@rspress/runtime": "2.0.0-beta.22",
90
- "@rspress/shared": "2.0.0-beta.22",
91
- "@rspress/theme-default": "2.0.0-beta.22"
89
+ "@rspress/runtime": "2.0.0-beta.23",
90
+ "@rspress/shared": "2.0.0-beta.23",
91
+ "@rspress/theme-default": "2.0.0-beta.23"
92
92
  },
93
93
  "devDependencies": {
94
- "@microsoft/api-extractor": "^7.52.8",
95
- "@rslib/core": "0.10.6",
96
- "@rspress-dev/plugin-preview": "link:../plugin-preview",
94
+ "@microsoft/api-extractor": "^7.52.9",
95
+ "@rslib/core": "0.11.0",
97
96
  "@types/hast": "^3.0.4",
98
97
  "@types/html-to-text": "^9.0.4",
99
98
  "@types/jest": "~29.5.14",