@rspress/core 2.0.0-beta.21 → 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.
- package/bin/rspress.js +15 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +144 -0
- package/dist/index.d.ts +17 -11
- package/dist/index.js +517 -431
- package/dist/index.js.LICENSE.txt +10 -0
- package/dist/loader.d.ts +4 -7
- package/dist/loader.js +3 -4
- package/dist/processor.d.ts +6 -8
- package/dist/processor.js +287 -244
- package/dist/renderPageWorker.js +193 -0
- package/dist/runtime/ssrClientEntry.js +2 -1
- package/dist/runtime/ssrServerEntry.js +2 -2
- package/dist/shiki-transformers.js +14 -14
- package/meta-json-schema.json +382 -0
- package/nav-json-schema.json +118 -0
- package/package.json +20 -10
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$ref": "#/definitions/NavJson",
|
|
4
|
+
"definitions": {
|
|
5
|
+
"NavJson": {
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"$ref": "#/definitions/NavItem"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"NavItem": {
|
|
12
|
+
"anyOf": [
|
|
13
|
+
{
|
|
14
|
+
"$ref": "#/definitions/NavItemWithLink"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"$ref": "#/definitions/NavItemWithChildren"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"$ref": "#/definitions/NavItemWithLinkAndChildren"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"NavItemWithLink": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"properties": {
|
|
27
|
+
"text": {
|
|
28
|
+
"type": "string"
|
|
29
|
+
},
|
|
30
|
+
"link": {
|
|
31
|
+
"type": "string"
|
|
32
|
+
},
|
|
33
|
+
"tag": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"activeMatch": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"position": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": [
|
|
42
|
+
"left",
|
|
43
|
+
"right"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"required": [
|
|
48
|
+
"text",
|
|
49
|
+
"link"
|
|
50
|
+
],
|
|
51
|
+
"additionalProperties": false
|
|
52
|
+
},
|
|
53
|
+
"NavItemWithChildren": {
|
|
54
|
+
"type": "object",
|
|
55
|
+
"properties": {
|
|
56
|
+
"text": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"tag": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
"items": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": {
|
|
65
|
+
"$ref": "#/definitions/NavItemWithLink"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"position": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"enum": [
|
|
71
|
+
"left",
|
|
72
|
+
"right"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": [
|
|
77
|
+
"items"
|
|
78
|
+
],
|
|
79
|
+
"additionalProperties": false
|
|
80
|
+
},
|
|
81
|
+
"NavItemWithLinkAndChildren": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"properties": {
|
|
84
|
+
"text": {
|
|
85
|
+
"type": "string"
|
|
86
|
+
},
|
|
87
|
+
"link": {
|
|
88
|
+
"type": "string"
|
|
89
|
+
},
|
|
90
|
+
"items": {
|
|
91
|
+
"type": "array",
|
|
92
|
+
"items": {
|
|
93
|
+
"$ref": "#/definitions/NavItemWithLink"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"tag": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"activeMatch": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"position": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"enum": [
|
|
105
|
+
"left",
|
|
106
|
+
"right"
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"required": [
|
|
111
|
+
"text",
|
|
112
|
+
"link",
|
|
113
|
+
"items"
|
|
114
|
+
],
|
|
115
|
+
"additionalProperties": false
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspress/core",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
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": {
|
|
@@ -39,8 +39,14 @@
|
|
|
39
39
|
"main": "./dist/index.js",
|
|
40
40
|
"module": "./dist/index.js",
|
|
41
41
|
"types": "./dist/index.d.ts",
|
|
42
|
+
"bin": {
|
|
43
|
+
"rspress": "./bin/rspress.js"
|
|
44
|
+
},
|
|
42
45
|
"files": [
|
|
46
|
+
"bin",
|
|
43
47
|
"dist",
|
|
48
|
+
"meta-json-schema.json",
|
|
49
|
+
"nav-json-schema.json",
|
|
44
50
|
"static",
|
|
45
51
|
"index.html"
|
|
46
52
|
],
|
|
@@ -48,12 +54,14 @@
|
|
|
48
54
|
"@mdx-js/loader": "^3.1.0",
|
|
49
55
|
"@mdx-js/mdx": "^3.1.0",
|
|
50
56
|
"@mdx-js/react": "^3.1.0",
|
|
51
|
-
"@rsbuild/core": "~1.4.
|
|
57
|
+
"@rsbuild/core": "~1.4.11",
|
|
52
58
|
"@rsbuild/plugin-react": "~1.3.4",
|
|
53
59
|
"@rspress/mdx-rs": "0.6.6",
|
|
54
|
-
"@shikijs/rehype": "^3.
|
|
60
|
+
"@shikijs/rehype": "^3.8.1",
|
|
55
61
|
"@types/unist": "^3.0.3",
|
|
56
62
|
"@unhead/react": "^2.0.12",
|
|
63
|
+
"cac": "^6.7.14",
|
|
64
|
+
"chokidar": "^3.6.0",
|
|
57
65
|
"enhanced-resolve": "5.18.2",
|
|
58
66
|
"github-slugger": "^2.0.0",
|
|
59
67
|
"hast-util-from-html": "^2.0.3",
|
|
@@ -72,19 +80,19 @@
|
|
|
72
80
|
"remark": "^15.0.1",
|
|
73
81
|
"remark-gfm": "^4.0.1",
|
|
74
82
|
"rspack-plugin-virtual-module": "1.0.1",
|
|
75
|
-
"shiki": "^3.
|
|
83
|
+
"shiki": "^3.8.1",
|
|
76
84
|
"tinyglobby": "^0.2.14",
|
|
85
|
+
"tinypool": "^1.1.1",
|
|
77
86
|
"unified": "^11.0.5",
|
|
78
87
|
"unist-util-visit": "^5.0.0",
|
|
79
88
|
"unist-util-visit-children": "^3.0.0",
|
|
80
|
-
"@rspress/runtime": "2.0.0-beta.
|
|
81
|
-
"@rspress/shared": "2.0.0-beta.
|
|
82
|
-
"@rspress/theme-default": "2.0.0-beta.
|
|
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"
|
|
83
92
|
},
|
|
84
93
|
"devDependencies": {
|
|
85
|
-
"@microsoft/api-extractor": "^7.52.
|
|
86
|
-
"@rslib/core": "0.
|
|
87
|
-
"@rspress-dev/plugin-preview": "link:../plugin-preview",
|
|
94
|
+
"@microsoft/api-extractor": "^7.52.9",
|
|
95
|
+
"@rslib/core": "0.11.0",
|
|
88
96
|
"@types/hast": "^3.0.4",
|
|
89
97
|
"@types/html-to-text": "^9.0.4",
|
|
90
98
|
"@types/jest": "~29.5.14",
|
|
@@ -94,6 +102,7 @@
|
|
|
94
102
|
"@types/react": "^19.1.8",
|
|
95
103
|
"@types/react-dom": "^19.1.6",
|
|
96
104
|
"execa": "8.0.1",
|
|
105
|
+
"mdast-util-directive": "^3.1.0",
|
|
97
106
|
"mdast-util-mdx-expression": "^2.0.1",
|
|
98
107
|
"memfs": "^4.17.2",
|
|
99
108
|
"p-map": "^7.0.3",
|
|
@@ -108,6 +117,7 @@
|
|
|
108
117
|
"rsbuild-plugin-publint": "^0.3.2",
|
|
109
118
|
"rsbuild-plugin-virtual-module": "0.3.0",
|
|
110
119
|
"tailwindcss": "^3.4.17",
|
|
120
|
+
"ts-json-schema-generator": "^2.4.0",
|
|
111
121
|
"typescript": "^5.8.2",
|
|
112
122
|
"vfile": "^6.0.3",
|
|
113
123
|
"@rspress/config": "1.0.0"
|