@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 CHANGED
@@ -10,246 +10,246 @@ type JsonExt = 'json' | 'js' | 'ts' | (string & {});
10
10
  * 全局配置, 小程序根目录下的 app.json 文件用来对微信小程序进行全局配置。
11
11
  */
12
12
  interface App$1 {
13
+ appBar?: {
14
+ [k: string]: unknown;
15
+ };
16
+ componentFramework?: string;
17
+ convertRpxToVw?: boolean;
18
+ darkmode?: boolean;
19
+ debug?: boolean;
20
+ debugOptions?: {
21
+ [k: string]: unknown;
22
+ };
23
+ embeddedAppIdList?: string[];
24
+ enablePassiveEvent?: {
25
+ [k: string]: unknown;
26
+ } | boolean;
27
+ entranceDeclare?: {
28
+ [k: string]: unknown;
29
+ };
13
30
  /**
14
31
  * 指定小程序的默认启动路径(首页),常见情景是从微信聊天列表页下拉启动、小程序列表启动等。如果不填,将默认为 pages 列表的第一项。不支持带页面路径参数。
15
32
  */
16
33
  entryPagePath?: string;
34
+ functionalPages?: boolean;
35
+ halfPage?: {
36
+ [k: string]: unknown;
37
+ };
38
+ lazyCodeLoading?: string;
39
+ miniApp?: {
40
+ [k: string]: unknown;
41
+ };
42
+ networkTimeout?: {
43
+ connectSocket?: number;
44
+ downloadFile?: number;
45
+ request?: number;
46
+ uploadFile?: number;
47
+ [k: string]: unknown;
48
+ };
17
49
  /**
18
50
  * 用于指定小程序由哪些页面组成,每一项都对应一个页面的 路径(含文件名) 信息。文件名不需要写文件后缀,框架会自动去寻找对应位置的 .json, .js, .wxml, .wxss 四个文件进行处理。
19
51
  */
20
52
  pages: string[];
21
- window?: {
22
- navigationBarBackgroundColor?: string;
23
- navigationBarTextStyle?: string;
24
- navigationBarTitleText?: string;
25
- navigationStyle?: "default" | "custom";
26
- homeButton?: boolean;
27
- backgroundColor?: string;
28
- backgroundTextStyle?: "dark" | "light";
29
- backgroundColorTop?: string;
30
- backgroundColorBottom?: string;
31
- enablePullDownRefresh?: boolean;
32
- onReachBottomDistance?: number;
33
- pageOrientation?: "portrait" | "auto" | "landscape";
34
- restartStrategy?: "homePage" | "homePageAndLatestPage";
35
- initialRenderingCache?: "static" | "dynamic";
36
- visualEffectInBackground?: "none" | "hidden";
37
- handleWebviewPreload?: "static" | "manual" | "auto";
53
+ permission?: {
54
+ [k: string]: unknown;
55
+ };
56
+ plugins?: {
57
+ [k: string]: unknown;
58
+ };
59
+ preloadRule?: {
60
+ [k: string]: unknown;
61
+ };
62
+ renderer?: "webview" | "skyline";
63
+ rendererOptions?: {
64
+ skyline?: {
65
+ defaultContentBox?: boolean;
66
+ defaultDisplayBlock?: boolean;
67
+ disableABTest?: boolean;
68
+ [k: string]: unknown;
69
+ };
70
+ [k: string]: unknown;
71
+ };
72
+ requiredBackgroundModes?: string[];
73
+ requiredPrivateInfos?: string[];
74
+ resizable?: boolean;
75
+ resolveAlias?: {
76
+ [k: string]: unknown;
77
+ };
78
+ serviceProviderTicket?: string;
79
+ singlePage?: {
80
+ [k: string]: unknown;
81
+ };
82
+ sitemapLocation?: string;
83
+ static?: {
84
+ [k: string]: unknown;
85
+ };
86
+ style?: string;
87
+ subPackages?: {
88
+ entry?: string;
89
+ independent?: boolean;
90
+ name?: string;
91
+ pages?: string[];
92
+ root?: string;
93
+ [k: string]: unknown;
94
+ }[];
95
+ subpackages?: {
96
+ entry?: string;
97
+ independent?: boolean;
98
+ name?: string;
99
+ pages?: string[];
100
+ root?: string;
101
+ [k: string]: unknown;
102
+ }[];
103
+ supportedMaterials?: {
38
104
  [k: string]: unknown;
39
105
  };
40
106
  tabBar?: {
41
- color: string;
42
- selectedColor: string;
43
107
  backgroundColor: string;
44
108
  borderStyle?: "black" | "white";
109
+ color: string;
110
+ custom?: boolean;
45
111
  /**
46
112
  * @minItems 2
47
113
  * @maxItems 5
48
114
  */
49
115
  list: [
50
116
  {
51
- pagePath: string;
52
- text: string;
53
117
  iconPath?: string;
118
+ pagePath: string;
54
119
  selectedIconPath?: string;
120
+ text: string;
55
121
  [k: string]: unknown;
56
122
  },
57
123
  {
58
- pagePath: string;
59
- text: string;
60
124
  iconPath?: string;
125
+ pagePath: string;
61
126
  selectedIconPath?: string;
127
+ text: string;
62
128
  [k: string]: unknown;
63
129
  }
64
130
  ] | [
65
131
  {
66
- pagePath: string;
67
- text: string;
68
132
  iconPath?: string;
133
+ pagePath: string;
69
134
  selectedIconPath?: string;
135
+ text: string;
70
136
  [k: string]: unknown;
71
137
  },
72
138
  {
73
- pagePath: string;
74
- text: string;
75
139
  iconPath?: string;
140
+ pagePath: string;
76
141
  selectedIconPath?: string;
142
+ text: string;
77
143
  [k: string]: unknown;
78
144
  },
79
145
  {
80
- pagePath: string;
81
- text: string;
82
146
  iconPath?: string;
147
+ pagePath: string;
83
148
  selectedIconPath?: string;
149
+ text: string;
84
150
  [k: string]: unknown;
85
151
  }
86
152
  ] | [
87
153
  {
88
- pagePath: string;
89
- text: string;
90
154
  iconPath?: string;
155
+ pagePath: string;
91
156
  selectedIconPath?: string;
157
+ text: string;
92
158
  [k: string]: unknown;
93
159
  },
94
160
  {
95
- pagePath: string;
96
- text: string;
97
161
  iconPath?: string;
162
+ pagePath: string;
98
163
  selectedIconPath?: string;
164
+ text: string;
99
165
  [k: string]: unknown;
100
166
  },
101
167
  {
102
- pagePath: string;
103
- text: string;
104
168
  iconPath?: string;
169
+ pagePath: string;
105
170
  selectedIconPath?: string;
171
+ text: string;
106
172
  [k: string]: unknown;
107
173
  },
108
174
  {
109
- pagePath: string;
110
- text: string;
111
175
  iconPath?: string;
176
+ pagePath: string;
112
177
  selectedIconPath?: string;
178
+ text: string;
113
179
  [k: string]: unknown;
114
180
  }
115
181
  ] | [
116
182
  {
117
- pagePath: string;
118
- text: string;
119
183
  iconPath?: string;
184
+ pagePath: string;
120
185
  selectedIconPath?: string;
186
+ text: string;
121
187
  [k: string]: unknown;
122
188
  },
123
189
  {
124
- pagePath: string;
125
- text: string;
126
190
  iconPath?: string;
191
+ pagePath: string;
127
192
  selectedIconPath?: string;
193
+ text: string;
128
194
  [k: string]: unknown;
129
195
  },
130
196
  {
131
- pagePath: string;
132
- text: string;
133
197
  iconPath?: string;
198
+ pagePath: string;
134
199
  selectedIconPath?: string;
200
+ text: string;
135
201
  [k: string]: unknown;
136
202
  },
137
203
  {
138
- pagePath: string;
139
- text: string;
140
204
  iconPath?: string;
205
+ pagePath: string;
141
206
  selectedIconPath?: string;
207
+ text: string;
142
208
  [k: string]: unknown;
143
209
  },
144
210
  {
145
- pagePath: string;
146
- text: string;
147
211
  iconPath?: string;
212
+ pagePath: string;
148
213
  selectedIconPath?: string;
214
+ text: string;
149
215
  [k: string]: unknown;
150
216
  }
151
217
  ];
152
218
  position?: "bottom" | "top";
153
- custom?: boolean;
154
- [k: string]: unknown;
155
- };
156
- networkTimeout?: {
157
- request?: number;
158
- connectSocket?: number;
159
- uploadFile?: number;
160
- downloadFile?: number;
161
- [k: string]: unknown;
162
- };
163
- debug?: boolean;
164
- functionalPages?: boolean;
165
- subpackages?: {
166
- root?: string;
167
- name?: string;
168
- pages?: string[];
169
- independent?: boolean;
170
- entry?: string;
171
- [k: string]: unknown;
172
- }[];
173
- subPackages?: {
174
- root?: string;
175
- name?: string;
176
- pages?: string[];
177
- independent?: boolean;
178
- entry?: string;
179
- [k: string]: unknown;
180
- }[];
181
- workers?: string | {
182
- path?: string;
183
- isSubpackage?: boolean;
184
- [k: string]: unknown;
185
- };
186
- requiredBackgroundModes?: string[];
187
- requiredPrivateInfos?: string[];
188
- plugins?: {
189
- [k: string]: unknown;
190
- };
191
- preloadRule?: {
192
- [k: string]: unknown;
193
- };
194
- resizable?: boolean;
195
- permission?: {
196
- [k: string]: unknown;
197
- };
198
- sitemapLocation?: string;
199
- useExtendedLib?: {
200
- [k: string]: unknown;
201
- };
202
- entranceDeclare?: {
219
+ selectedColor: string;
203
220
  [k: string]: unknown;
204
221
  };
205
- darkmode?: boolean;
206
222
  themeLocation?: string;
207
- lazyCodeLoading?: string;
208
- supportedMaterials?: {
209
- [k: string]: unknown;
210
- };
211
- serviceProviderTicket?: string;
212
- embeddedAppIdList?: string[];
213
- halfPage?: {
214
- [k: string]: unknown;
215
- };
216
- debugOptions?: {
217
- [k: string]: unknown;
218
- };
219
- resolveAlias?: {
220
- [k: string]: unknown;
221
- };
222
- miniApp?: {
223
- [k: string]: unknown;
224
- };
225
- static?: {
223
+ useExtendedLib?: {
226
224
  [k: string]: unknown;
227
225
  };
228
- convertRpxToVw?: boolean;
229
- appBar?: {
230
- [k: string]: unknown;
226
+ usingComponents?: {
227
+ [k: string]: string;
231
228
  };
232
- style?: string;
233
- singlePage?: {
229
+ window?: {
230
+ backgroundColor?: string;
231
+ backgroundColorBottom?: string;
232
+ backgroundColorTop?: string;
233
+ backgroundTextStyle?: "dark" | "light";
234
+ enablePullDownRefresh?: boolean;
235
+ handleWebviewPreload?: "static" | "manual" | "auto";
236
+ homeButton?: boolean;
237
+ initialRenderingCache?: "static" | "dynamic";
238
+ navigationBarBackgroundColor?: string;
239
+ navigationBarTextStyle?: string;
240
+ navigationBarTitleText?: string;
241
+ navigationStyle?: "default" | "custom";
242
+ onReachBottomDistance?: number;
243
+ pageOrientation?: "portrait" | "auto" | "landscape";
244
+ restartStrategy?: "homePage" | "homePageAndLatestPage";
245
+ visualEffectInBackground?: "none" | "hidden";
234
246
  [k: string]: unknown;
235
247
  };
236
- enablePassiveEvent?: {
237
- [k: string]: unknown;
238
- } | boolean;
239
- renderer?: "webview" | "skyline";
240
- rendererOptions?: {
241
- skyline?: {
242
- defaultDisplayBlock?: boolean;
243
- defaultContentBox?: boolean;
244
- disableABTest?: boolean;
245
- [k: string]: unknown;
246
- };
248
+ workers?: string | {
249
+ isSubpackage?: boolean;
250
+ path?: string;
247
251
  [k: string]: unknown;
248
252
  };
249
- usingComponents?: {
250
- [k: string]: string;
251
- };
252
- componentFramework?: string;
253
253
  [k: string]: unknown;
254
254
  }
255
255
  /**
@@ -262,17 +262,17 @@ interface App$1 {
262
262
  */
263
263
  interface Component$1 {
264
264
  component?: boolean;
265
- styleIsolation?: "isolated" | "apply-shared" | "shared";
265
+ componentFramework?: string;
266
266
  componentGenerics?: {
267
267
  [k: string]: unknown;
268
268
  };
269
269
  componentPlaceholder?: {
270
270
  [k: string]: unknown;
271
271
  };
272
+ styleIsolation?: "isolated" | "apply-shared" | "shared";
272
273
  usingComponents?: {
273
274
  [k: string]: string;
274
275
  };
275
- componentFramework?: string;
276
276
  [k: string]: unknown;
277
277
  }
278
278
  /**
@@ -284,49 +284,49 @@ interface Component$1 {
284
284
  * 页面配置, 支持对单个页面进行配置,可以在页面对应的 .json 文件来对本页面的表现进行配置
285
285
  */
286
286
  interface Page$1 {
287
+ backgroundColor?: string;
288
+ backgroundColorBottom?: string;
287
289
  backgroundColorContent?: string;
288
- disableScroll?: boolean;
289
- styleIsolation?: "page-isolated" | "page-apply-shared" | "page-shared";
290
- style?: string;
291
- singlePage?: {
290
+ backgroundColorTop?: string;
291
+ backgroundTextStyle?: "dark" | "light";
292
+ componentFramework?: string;
293
+ componentPlaceholder?: {
292
294
  [k: string]: unknown;
293
295
  };
296
+ disableScroll?: boolean;
294
297
  enablePassiveEvent?: {
295
298
  [k: string]: unknown;
296
299
  } | boolean;
300
+ enablePullDownRefresh?: boolean;
301
+ handleWebviewPreload?: "static" | "manual" | "auto";
302
+ homeButton?: boolean;
303
+ initialRenderingCache?: "static" | "dynamic";
304
+ navigationBarBackgroundColor?: string;
305
+ navigationBarTextStyle?: string;
306
+ navigationBarTitleText?: string;
307
+ navigationStyle?: "default" | "custom";
308
+ onReachBottomDistance?: number;
309
+ pageOrientation?: "portrait" | "auto" | "landscape";
297
310
  renderer?: "webview" | "skyline";
298
311
  rendererOptions?: {
299
312
  skyline?: {
300
- defaultDisplayBlock?: boolean;
301
313
  defaultContentBox?: boolean;
314
+ defaultDisplayBlock?: boolean;
302
315
  disableABTest?: boolean;
303
316
  [k: string]: unknown;
304
317
  };
305
318
  [k: string]: unknown;
306
319
  };
320
+ restartStrategy?: "homePage" | "homePageAndLatestPage";
321
+ singlePage?: {
322
+ [k: string]: unknown;
323
+ };
324
+ style?: string;
325
+ styleIsolation?: "page-isolated" | "page-apply-shared" | "page-shared";
307
326
  usingComponents?: {
308
327
  [k: string]: string;
309
328
  };
310
- componentFramework?: string;
311
- componentPlaceholder?: {
312
- [k: string]: unknown;
313
- };
314
- navigationBarBackgroundColor?: string;
315
- navigationBarTextStyle?: string;
316
- navigationBarTitleText?: string;
317
- navigationStyle?: "default" | "custom";
318
- homeButton?: boolean;
319
- backgroundColor?: string;
320
- backgroundTextStyle?: "dark" | "light";
321
- backgroundColorTop?: string;
322
- backgroundColorBottom?: string;
323
- enablePullDownRefresh?: boolean;
324
- onReachBottomDistance?: number;
325
- pageOrientation?: "portrait" | "auto" | "landscape";
326
- restartStrategy?: "homePage" | "homePageAndLatestPage";
327
- initialRenderingCache?: "static" | "dynamic";
328
329
  visualEffectInBackground?: "none" | "hidden";
329
- handleWebviewPreload?: "static" | "manual" | "auto";
330
330
  [k: string]: unknown;
331
331
  }
332
332
  /**
@@ -340,9 +340,9 @@ interface Page$1 {
340
340
  interface Sitemap$1 {
341
341
  rules: {
342
342
  action?: "allow" | "disallow";
343
+ matching?: "exact" | "inclusive" | "exclusive" | "partial";
343
344
  page: string;
344
345
  params?: string[];
345
- matching?: "exact" | "inclusive" | "exclusive" | "partial";
346
346
  priority?: number;
347
347
  }[];
348
348
  [k: string]: unknown;
@@ -353,10 +353,10 @@ interface Sitemap$1 {
353
353
  * and run json-schema-to-typescript to regenerate this file.
354
354
  */
355
355
  interface Theme$1 {
356
- light: {
356
+ dark: {
357
357
  [k: string]: unknown;
358
358
  };
359
- dark: {
359
+ light: {
360
360
  [k: string]: unknown;
361
361
  };
362
362
  [k: string]: unknown;
@@ -370,13 +370,13 @@ interface Theme$1 {
370
370
  * 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
371
371
  */
372
372
  interface Plugin$1 {
373
- publicComponents?: {
373
+ main?: string;
374
+ pages?: {
374
375
  [k: string]: string;
375
376
  };
376
- pages?: {
377
+ publicComponents?: {
377
378
  [k: string]: string;
378
379
  };
379
- main?: string;
380
380
  [k: string]: unknown;
381
381
  }
382
382