rspress 2.0.0-beta.17 → 2.0.0-beta.18
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 +1 -1
- package/nav-json-schema.json +118 -0
- package/package.json +9 -7
- package/shiki-transformers.ts +2 -1
package/dist/index.js
CHANGED
@@ -6,7 +6,7 @@ import chokidar from "chokidar";
|
|
6
6
|
import picocolors from "picocolors";
|
7
7
|
import node_fs from "node:fs";
|
8
8
|
import { DEFAULT_CONFIG_EXTENSIONS, DEFAULT_CONFIG_NAME } from "@rspress/shared/constants";
|
9
|
-
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.
|
9
|
+
var package_namespaceObject = JSON.parse('{"i8":"2.0.0-beta.18"}');
|
10
10
|
const findConfig = (basePath)=>DEFAULT_CONFIG_EXTENSIONS.map((ext)=>basePath + ext).find(node_fs.existsSync);
|
11
11
|
async function loadConfigFile(customConfigFile) {
|
12
12
|
const baseDir = process.cwd();
|
@@ -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",
|
3
|
-
"version": "2.0.0-beta.
|
3
|
+
"version": "2.0.0-beta.18",
|
4
4
|
"repository": {
|
5
5
|
"type": "git",
|
6
6
|
"url": "git+https://github.com/web-infra-dev/rspress.git",
|
@@ -23,7 +23,8 @@
|
|
23
23
|
},
|
24
24
|
"./shiki-transformers": {
|
25
25
|
"default": "./shiki-transformers.ts"
|
26
|
-
}
|
26
|
+
},
|
27
|
+
"./package.json": "./package.json"
|
27
28
|
},
|
28
29
|
"main": "./dist/index.js",
|
29
30
|
"module": "./dist/index.js",
|
@@ -38,19 +39,20 @@
|
|
38
39
|
"theme.ts",
|
39
40
|
"config.ts",
|
40
41
|
"shiki-transformers.ts",
|
41
|
-
"meta-json-schema.json"
|
42
|
+
"meta-json-schema.json",
|
43
|
+
"nav-json-schema.json"
|
42
44
|
],
|
43
45
|
"dependencies": {
|
44
|
-
"@rsbuild/core": "~1.4.0
|
46
|
+
"@rsbuild/core": "~1.4.0",
|
45
47
|
"cac": "^6.7.14",
|
46
48
|
"chokidar": "^3.6.0",
|
47
49
|
"picocolors": "^1.1.1",
|
48
|
-
"@rspress/core": "2.0.0-beta.
|
49
|
-
"@rspress/shared": "2.0.0-beta.
|
50
|
+
"@rspress/core": "2.0.0-beta.18",
|
51
|
+
"@rspress/shared": "2.0.0-beta.18"
|
50
52
|
},
|
51
53
|
"devDependencies": {
|
52
54
|
"@microsoft/api-extractor": "^7.52.8",
|
53
|
-
"@rslib/core": "0.10.
|
55
|
+
"@rslib/core": "0.10.3",
|
54
56
|
"@types/jest": "~29.5.14",
|
55
57
|
"@types/node": "^22.8.1",
|
56
58
|
"@types/react": "^19.1.8",
|
package/shiki-transformers.ts
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
export * from '@rspress/core/shiki-transformers';
|
1
|
+
// FIXME: rspack-resolver bug, export * from '@rspress/core/shiki-transformers';
|
2
|
+
export * from '@rspress/core/dist/shiki-transformers.js';
|