@weapp-core/schematics 4.0.1-alpha.0 → 6.0.0
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 +169 -169
- package/dist/index.js +420 -131
- package/package.json +6 -4
- package/schemas/app.json +370 -370
- package/schemas/component.json +24 -24
- package/schemas/page.json +113 -113
- package/schemas/plugin.json +14 -14
- package/schemas/sitemap.json +21 -21
- package/schemas/theme.json +10 -10
- package/dist/index.cjs +0 -6943
- package/dist/index.d.cts +0 -421
package/schemas/component.json
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"additionalProperties": {},
|
|
3
4
|
"description": "自定义组件配置",
|
|
4
|
-
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
|
+
"$schema": {
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
6
9
|
"component": {
|
|
7
10
|
"default": true,
|
|
8
11
|
"type": "boolean"
|
|
9
12
|
},
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"type": "string",
|
|
13
|
-
"enum": [
|
|
14
|
-
"isolated",
|
|
15
|
-
"apply-shared",
|
|
16
|
-
"shared"
|
|
17
|
-
]
|
|
13
|
+
"componentFramework": {
|
|
14
|
+
"type": "string"
|
|
18
15
|
},
|
|
19
16
|
"componentGenerics": {
|
|
20
|
-
"
|
|
17
|
+
"additionalProperties": {},
|
|
21
18
|
"properties": {},
|
|
22
|
-
"
|
|
19
|
+
"type": "object"
|
|
23
20
|
},
|
|
24
21
|
"componentPlaceholder": {
|
|
25
|
-
"
|
|
22
|
+
"additionalProperties": {},
|
|
26
23
|
"properties": {},
|
|
27
|
-
"
|
|
24
|
+
"type": "object"
|
|
25
|
+
},
|
|
26
|
+
"styleIsolation": {
|
|
27
|
+
"default": "isolated",
|
|
28
|
+
"enum": [
|
|
29
|
+
"isolated",
|
|
30
|
+
"apply-shared",
|
|
31
|
+
"shared"
|
|
32
|
+
],
|
|
33
|
+
"type": "string"
|
|
28
34
|
},
|
|
29
35
|
"usingComponents": {
|
|
30
|
-
"
|
|
31
|
-
"propertyNames": {
|
|
36
|
+
"additionalProperties": {
|
|
32
37
|
"type": "string"
|
|
33
38
|
},
|
|
34
|
-
"
|
|
39
|
+
"propertyNames": {
|
|
35
40
|
"type": "string"
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
"componentFramework": {
|
|
39
|
-
"type": "string"
|
|
40
|
-
},
|
|
41
|
-
"$schema": {
|
|
42
|
-
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"type": "object"
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
-
"
|
|
45
|
+
"type": "object"
|
|
46
46
|
}
|
package/schemas/page.json
CHANGED
|
@@ -1,95 +1,82 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"additionalProperties": {},
|
|
3
4
|
"description": "页面配置, 支持对单个页面进行配置,可以在页面对应的 .json 文件来对本页面的表现进行配置",
|
|
4
|
-
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
|
+
"$schema": {
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
"backgroundColor": {
|
|
10
|
+
"default": "#ffffff",
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"backgroundColorBottom": {
|
|
14
|
+
"default": "#ffffff",
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
6
17
|
"backgroundColorContent": {
|
|
7
18
|
"default": "#RRGGBBAA",
|
|
8
19
|
"type": "string"
|
|
9
20
|
},
|
|
10
|
-
"
|
|
11
|
-
"default":
|
|
12
|
-
"type": "
|
|
21
|
+
"backgroundColorTop": {
|
|
22
|
+
"default": "#ffffff",
|
|
23
|
+
"type": "string"
|
|
13
24
|
},
|
|
14
|
-
"
|
|
15
|
-
"
|
|
25
|
+
"backgroundTextStyle": {
|
|
26
|
+
"default": "dark",
|
|
16
27
|
"enum": [
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
28
|
+
"dark",
|
|
29
|
+
"light"
|
|
30
|
+
],
|
|
31
|
+
"type": "string"
|
|
21
32
|
},
|
|
22
|
-
"
|
|
33
|
+
"componentFramework": {
|
|
23
34
|
"type": "string"
|
|
24
35
|
},
|
|
25
|
-
"
|
|
26
|
-
"
|
|
36
|
+
"componentPlaceholder": {
|
|
37
|
+
"additionalProperties": {},
|
|
27
38
|
"properties": {},
|
|
28
|
-
"
|
|
39
|
+
"type": "object"
|
|
40
|
+
},
|
|
41
|
+
"disableScroll": {
|
|
42
|
+
"default": false,
|
|
43
|
+
"type": "boolean"
|
|
29
44
|
},
|
|
30
45
|
"enablePassiveEvent": {
|
|
31
46
|
"anyOf": [
|
|
32
47
|
{
|
|
33
|
-
"
|
|
48
|
+
"additionalProperties": {},
|
|
34
49
|
"properties": {},
|
|
35
|
-
"
|
|
50
|
+
"type": "object"
|
|
36
51
|
},
|
|
37
52
|
{
|
|
38
53
|
"type": "boolean"
|
|
39
54
|
}
|
|
40
55
|
]
|
|
41
56
|
},
|
|
42
|
-
"
|
|
43
|
-
"default":
|
|
44
|
-
"type": "
|
|
45
|
-
"enum": [
|
|
46
|
-
"webview",
|
|
47
|
-
"skyline"
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
"rendererOptions": {
|
|
51
|
-
"type": "object",
|
|
52
|
-
"properties": {
|
|
53
|
-
"skyline": {
|
|
54
|
-
"type": "object",
|
|
55
|
-
"properties": {
|
|
56
|
-
"defaultDisplayBlock": {
|
|
57
|
-
"default": false,
|
|
58
|
-
"type": "boolean"
|
|
59
|
-
},
|
|
60
|
-
"defaultContentBox": {
|
|
61
|
-
"default": false,
|
|
62
|
-
"type": "boolean"
|
|
63
|
-
},
|
|
64
|
-
"disableABTest": {
|
|
65
|
-
"default": false,
|
|
66
|
-
"type": "boolean"
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
"additionalProperties": {}
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
"additionalProperties": {}
|
|
73
|
-
},
|
|
74
|
-
"usingComponents": {
|
|
75
|
-
"type": "object",
|
|
76
|
-
"propertyNames": {
|
|
77
|
-
"type": "string"
|
|
78
|
-
},
|
|
79
|
-
"additionalProperties": {
|
|
80
|
-
"type": "string"
|
|
81
|
-
}
|
|
57
|
+
"enablePullDownRefresh": {
|
|
58
|
+
"default": false,
|
|
59
|
+
"type": "boolean"
|
|
82
60
|
},
|
|
83
|
-
"
|
|
61
|
+
"handleWebviewPreload": {
|
|
62
|
+
"default": "static",
|
|
63
|
+
"enum": [
|
|
64
|
+
"static",
|
|
65
|
+
"manual",
|
|
66
|
+
"auto"
|
|
67
|
+
],
|
|
84
68
|
"type": "string"
|
|
85
69
|
},
|
|
86
|
-
"
|
|
87
|
-
"
|
|
70
|
+
"homeButton": {
|
|
71
|
+
"default": false,
|
|
72
|
+
"type": "boolean"
|
|
88
73
|
},
|
|
89
|
-
"
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
74
|
+
"initialRenderingCache": {
|
|
75
|
+
"enum": [
|
|
76
|
+
"static",
|
|
77
|
+
"dynamic"
|
|
78
|
+
],
|
|
79
|
+
"type": "string"
|
|
93
80
|
},
|
|
94
81
|
"navigationBarBackgroundColor": {
|
|
95
82
|
"default": "#000000",
|
|
@@ -104,85 +91,98 @@
|
|
|
104
91
|
},
|
|
105
92
|
"navigationStyle": {
|
|
106
93
|
"default": "default",
|
|
107
|
-
"type": "string",
|
|
108
94
|
"enum": [
|
|
109
95
|
"default",
|
|
110
96
|
"custom"
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
"homeButton": {
|
|
114
|
-
"default": false,
|
|
115
|
-
"type": "boolean"
|
|
116
|
-
},
|
|
117
|
-
"backgroundColor": {
|
|
118
|
-
"default": "#ffffff",
|
|
97
|
+
],
|
|
119
98
|
"type": "string"
|
|
120
99
|
},
|
|
121
|
-
"backgroundTextStyle": {
|
|
122
|
-
"default": "dark",
|
|
123
|
-
"type": "string",
|
|
124
|
-
"enum": [
|
|
125
|
-
"dark",
|
|
126
|
-
"light"
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
"backgroundColorTop": {
|
|
130
|
-
"default": "#ffffff",
|
|
131
|
-
"type": "string"
|
|
132
|
-
},
|
|
133
|
-
"backgroundColorBottom": {
|
|
134
|
-
"default": "#ffffff",
|
|
135
|
-
"type": "string"
|
|
136
|
-
},
|
|
137
|
-
"enablePullDownRefresh": {
|
|
138
|
-
"default": false,
|
|
139
|
-
"type": "boolean"
|
|
140
|
-
},
|
|
141
100
|
"onReachBottomDistance": {
|
|
142
101
|
"default": 50,
|
|
143
102
|
"type": "number"
|
|
144
103
|
},
|
|
145
104
|
"pageOrientation": {
|
|
146
105
|
"default": "portrait",
|
|
147
|
-
"type": "string",
|
|
148
106
|
"enum": [
|
|
149
107
|
"portrait",
|
|
150
108
|
"auto",
|
|
151
109
|
"landscape"
|
|
152
|
-
]
|
|
110
|
+
],
|
|
111
|
+
"type": "string"
|
|
112
|
+
},
|
|
113
|
+
"renderer": {
|
|
114
|
+
"default": "webview",
|
|
115
|
+
"enum": [
|
|
116
|
+
"webview",
|
|
117
|
+
"skyline"
|
|
118
|
+
],
|
|
119
|
+
"type": "string"
|
|
120
|
+
},
|
|
121
|
+
"rendererOptions": {
|
|
122
|
+
"additionalProperties": {},
|
|
123
|
+
"properties": {
|
|
124
|
+
"skyline": {
|
|
125
|
+
"additionalProperties": {},
|
|
126
|
+
"properties": {
|
|
127
|
+
"defaultContentBox": {
|
|
128
|
+
"default": false,
|
|
129
|
+
"type": "boolean"
|
|
130
|
+
},
|
|
131
|
+
"defaultDisplayBlock": {
|
|
132
|
+
"default": false,
|
|
133
|
+
"type": "boolean"
|
|
134
|
+
},
|
|
135
|
+
"disableABTest": {
|
|
136
|
+
"default": false,
|
|
137
|
+
"type": "boolean"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"type": "object"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"type": "object"
|
|
153
144
|
},
|
|
154
145
|
"restartStrategy": {
|
|
155
146
|
"default": "homePage",
|
|
156
|
-
"type": "string",
|
|
157
147
|
"enum": [
|
|
158
148
|
"homePage",
|
|
159
149
|
"homePageAndLatestPage"
|
|
160
|
-
]
|
|
150
|
+
],
|
|
151
|
+
"type": "string"
|
|
161
152
|
},
|
|
162
|
-
"
|
|
163
|
-
"
|
|
153
|
+
"singlePage": {
|
|
154
|
+
"additionalProperties": {},
|
|
155
|
+
"properties": {},
|
|
156
|
+
"type": "object"
|
|
157
|
+
},
|
|
158
|
+
"style": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
},
|
|
161
|
+
"styleIsolation": {
|
|
164
162
|
"enum": [
|
|
165
|
-
"
|
|
166
|
-
"
|
|
167
|
-
|
|
163
|
+
"page-isolated",
|
|
164
|
+
"page-apply-shared",
|
|
165
|
+
"page-shared"
|
|
166
|
+
],
|
|
167
|
+
"type": "string"
|
|
168
|
+
},
|
|
169
|
+
"usingComponents": {
|
|
170
|
+
"additionalProperties": {
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
"propertyNames": {
|
|
174
|
+
"type": "string"
|
|
175
|
+
},
|
|
176
|
+
"type": "object"
|
|
168
177
|
},
|
|
169
178
|
"visualEffectInBackground": {
|
|
170
179
|
"default": "none",
|
|
171
|
-
"type": "string",
|
|
172
180
|
"enum": [
|
|
173
181
|
"none",
|
|
174
182
|
"hidden"
|
|
175
|
-
]
|
|
176
|
-
|
|
177
|
-
"handleWebviewPreload": {
|
|
178
|
-
"default": "static",
|
|
179
|
-
"type": "string",
|
|
180
|
-
"enum": [
|
|
181
|
-
"static",
|
|
182
|
-
"manual",
|
|
183
|
-
"auto"
|
|
184
|
-
]
|
|
183
|
+
],
|
|
184
|
+
"type": "string"
|
|
185
185
|
}
|
|
186
186
|
},
|
|
187
|
-
"
|
|
187
|
+
"type": "object"
|
|
188
188
|
}
|
package/schemas/plugin.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"additionalProperties": {},
|
|
3
4
|
"description": "https://developers.weixin.qq.com/miniprogram/dev/framework/plugin/development.html#%E6%8F%92%E4%BB%B6%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6",
|
|
4
|
-
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
|
-
"
|
|
7
|
-
"type": "
|
|
6
|
+
"main": {
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
"pages": {
|
|
10
|
+
"additionalProperties": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
8
13
|
"propertyNames": {
|
|
9
14
|
"type": "string"
|
|
10
15
|
},
|
|
16
|
+
"type": "object"
|
|
17
|
+
},
|
|
18
|
+
"publicComponents": {
|
|
11
19
|
"additionalProperties": {
|
|
12
20
|
"type": "string"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"pages": {
|
|
16
|
-
"type": "object",
|
|
21
|
+
},
|
|
17
22
|
"propertyNames": {
|
|
18
23
|
"type": "string"
|
|
19
24
|
},
|
|
20
|
-
"
|
|
21
|
-
"type": "string"
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
"main": {
|
|
25
|
-
"type": "string"
|
|
25
|
+
"type": "object"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
"
|
|
28
|
+
"type": "object"
|
|
29
29
|
}
|
package/schemas/sitemap.json
CHANGED
|
@@ -1,39 +1,41 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"additionalProperties": {},
|
|
3
4
|
"description": "https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/sitemap.html",
|
|
4
|
-
"type": "object",
|
|
5
5
|
"properties": {
|
|
6
|
+
"$schema": {
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
6
9
|
"rules": {
|
|
7
|
-
"type": "array",
|
|
8
10
|
"items": {
|
|
9
|
-
"
|
|
11
|
+
"additionalProperties": false,
|
|
10
12
|
"properties": {
|
|
11
13
|
"action": {
|
|
12
14
|
"default": "allow",
|
|
13
|
-
"type": "string",
|
|
14
15
|
"enum": [
|
|
15
16
|
"allow",
|
|
16
17
|
"disallow"
|
|
17
|
-
]
|
|
18
|
-
},
|
|
19
|
-
"page": {
|
|
18
|
+
],
|
|
20
19
|
"type": "string"
|
|
21
20
|
},
|
|
22
|
-
"params": {
|
|
23
|
-
"type": "array",
|
|
24
|
-
"items": {
|
|
25
|
-
"type": "string"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
21
|
"matching": {
|
|
29
22
|
"default": "inclusive",
|
|
30
|
-
"type": "string",
|
|
31
23
|
"enum": [
|
|
32
24
|
"exact",
|
|
33
25
|
"inclusive",
|
|
34
26
|
"exclusive",
|
|
35
27
|
"partial"
|
|
36
|
-
]
|
|
28
|
+
],
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"page": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"params": {
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
},
|
|
38
|
+
"type": "array"
|
|
37
39
|
},
|
|
38
40
|
"priority": {
|
|
39
41
|
"type": "number"
|
|
@@ -42,15 +44,13 @@
|
|
|
42
44
|
"required": [
|
|
43
45
|
"page"
|
|
44
46
|
],
|
|
45
|
-
"
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
"$schema": {
|
|
49
|
-
"type": "string"
|
|
47
|
+
"type": "object"
|
|
48
|
+
},
|
|
49
|
+
"type": "array"
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"required": [
|
|
53
53
|
"rules"
|
|
54
54
|
],
|
|
55
|
-
"
|
|
55
|
+
"type": "object"
|
|
56
56
|
}
|
package/schemas/theme.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"
|
|
3
|
+
"additionalProperties": {},
|
|
4
4
|
"properties": {
|
|
5
|
-
"
|
|
6
|
-
"type": "
|
|
7
|
-
"properties": {},
|
|
8
|
-
"additionalProperties": {}
|
|
5
|
+
"$schema": {
|
|
6
|
+
"type": "string"
|
|
9
7
|
},
|
|
10
8
|
"dark": {
|
|
11
|
-
"
|
|
9
|
+
"additionalProperties": {},
|
|
12
10
|
"properties": {},
|
|
13
|
-
"
|
|
11
|
+
"type": "object"
|
|
14
12
|
},
|
|
15
|
-
"
|
|
16
|
-
"
|
|
13
|
+
"light": {
|
|
14
|
+
"additionalProperties": {},
|
|
15
|
+
"properties": {},
|
|
16
|
+
"type": "object"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"required": [
|
|
20
20
|
"light",
|
|
21
21
|
"dark"
|
|
22
22
|
],
|
|
23
|
-
"
|
|
23
|
+
"type": "object"
|
|
24
24
|
}
|