@hyext/builder-revues 1.5.9 → 1.5.10-alpha.1

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.
Files changed (46) hide show
  1. package/dist/index.js +43 -2
  2. package/package.json +6 -5
  3. package/static/.DS_Store +0 -0
  4. package/static/projects/.DS_Store +0 -0
  5. package/static/projects/empty/.eslintrc.js +31 -0
  6. package/static/projects/empty/app.js +2 -0
  7. package/static/projects/empty/app.json +11 -0
  8. package/static/projects/empty/app.wxss +10 -0
  9. package/static/projects/empty/components/navigation-bar/navigation-bar.js +105 -0
  10. package/static/projects/empty/components/navigation-bar/navigation-bar.json +5 -0
  11. package/static/projects/empty/components/navigation-bar/navigation-bar.wxml +64 -0
  12. package/static/projects/empty/components/navigation-bar/navigation-bar.wxss +96 -0
  13. package/static/projects/empty/pages/index/index.js +2 -0
  14. package/static/projects/empty/pages/index/index.json +5 -0
  15. package/static/projects/empty/pages/index/index.wxml +7 -0
  16. package/static/projects/empty/pages/index/index.wxss +10 -0
  17. package/static/projects/empty/project.config.json +25 -0
  18. package/static/projects/empty/sitemap.json +7 -0
  19. package/static/projects/ts/.DS_Store +0 -0
  20. package/static/projects/ts/.eslintrc.js +31 -0
  21. package/static/projects/ts/app.json +11 -0
  22. package/static/projects/ts/app.ts +8 -0
  23. package/static/projects/ts/app.wxss +10 -0
  24. package/static/projects/ts/components/navigation-bar/navigation-bar.js +105 -0
  25. package/static/projects/ts/components/navigation-bar/navigation-bar.json +5 -0
  26. package/static/projects/ts/components/navigation-bar/navigation-bar.wxml +64 -0
  27. package/static/projects/ts/components/navigation-bar/navigation-bar.wxss +96 -0
  28. package/static/projects/ts/pages/index/index.json +5 -0
  29. package/static/projects/ts/pages/index/index.ts +2 -0
  30. package/static/projects/ts/pages/index/index.wxml +7 -0
  31. package/static/projects/ts/pages/index/index.wxss +10 -0
  32. package/static/projects/ts/project.config.json +27 -0
  33. package/static/projects/ts/sitemap.json +7 -0
  34. package/static/projects/ts/tsconfig.json +26 -0
  35. package/static/projects/ts/typings/wechat-miniprogram/LICENSE +21 -0
  36. package/static/projects/ts/typings/wechat-miniprogram/README.md +15 -0
  37. package/static/projects/ts/typings/wechat-miniprogram/index.d.ts +143 -0
  38. package/static/projects/ts/typings/wechat-miniprogram/lib.wx.api.d.ts +22112 -0
  39. package/static/projects/ts/typings/wechat-miniprogram/lib.wx.app.d.ts +249 -0
  40. package/static/projects/ts/typings/wechat-miniprogram/lib.wx.behavior.d.ts +47 -0
  41. package/static/projects/ts/typings/wechat-miniprogram/lib.wx.cloud.d.ts +903 -0
  42. package/static/projects/ts/typings/wechat-miniprogram/lib.wx.component.d.ts +613 -0
  43. package/static/projects/ts/typings/wechat-miniprogram/lib.wx.event.d.ts +1413 -0
  44. package/static/projects/ts/typings/wechat-miniprogram/lib.wx.page.d.ts +246 -0
  45. package/static/projects/ts/typings/wechat-miniprogram/package.json +63 -0
  46. package/static/projects/ts/util.ts +3 -0
@@ -0,0 +1,249 @@
1
+ declare namespace WechatMiniprogram.App {
2
+ interface ReferrerInfo {
3
+ /** 来源小程序或公众号或App的 appId
4
+ *
5
+ * 以下场景支持返回 referrerInfo.appId:
6
+ * - 1020(公众号 profile 页相关小程序列表): appId
7
+ * - 1035(公众号自定义菜单):来源公众号 appId
8
+ * - 1036(App 分享消息卡片):来源应用 appId
9
+ * - 1037(小程序打开小程序):来源小程序 appId
10
+ * - 1038(从另一个小程序返回):来源小程序 appId
11
+ * - 1043(公众号模板消息):来源公众号 appId
12
+ */
13
+ appId: string;
14
+ /** 来源小程序传过来的数据,scene=1037或1038时支持 */
15
+ extraData?: any;
16
+ }
17
+
18
+ type SceneValues =
19
+ | 1001
20
+ | 1005
21
+ | 1006
22
+ | 1007
23
+ | 1008
24
+ | 1011
25
+ | 1012
26
+ | 1013
27
+ | 1014
28
+ | 1017
29
+ | 1019
30
+ | 1020
31
+ | 1023
32
+ | 1024
33
+ | 1025
34
+ | 1026
35
+ | 1027
36
+ | 1028
37
+ | 1029
38
+ | 1030
39
+ | 1031
40
+ | 1032
41
+ | 1034
42
+ | 1035
43
+ | 1036
44
+ | 1037
45
+ | 1038
46
+ | 1039
47
+ | 1042
48
+ | 1043
49
+ | 1044
50
+ | 1045
51
+ | 1046
52
+ | 1047
53
+ | 1048
54
+ | 1049
55
+ | 1052
56
+ | 1053
57
+ | 1056
58
+ | 1057
59
+ | 1058
60
+ | 1059
61
+ | 1064
62
+ | 1067
63
+ | 1069
64
+ | 1071
65
+ | 1072
66
+ | 1073
67
+ | 1074
68
+ | 1077
69
+ | 1078
70
+ | 1079
71
+ | 1081
72
+ | 1082
73
+ | 1084
74
+ | 1089
75
+ | 1090
76
+ | 1091
77
+ | 1092
78
+ | 1095
79
+ | 1096
80
+ | 1097
81
+ | 1099
82
+ | 1102
83
+ | 1124
84
+ | 1125
85
+ | 1126
86
+ | 1129;
87
+
88
+ interface LaunchShowOption {
89
+ /** 打开小程序的路径 */
90
+ path: string;
91
+ /** 打开小程序的query */
92
+ query: IAnyObject;
93
+ /** 打开小程序的场景值
94
+ * - 1001:发现栏小程序主入口,「最近使用」列表(基础库2.2.4版本起包含「我的小程序」列表)
95
+ * - 1005:微信首页顶部搜索框的搜索结果页
96
+ * - 1006:发现栏小程序主入口搜索框的搜索结果页
97
+ * - 1007:单人聊天会话中的小程序消息卡片
98
+ * - 1008:群聊会话中的小程序消息卡片
99
+ * - 1011:扫描二维码
100
+ * - 1012:长按图片识别二维码
101
+ * - 1013:扫描手机相册中选取的二维码
102
+ * - 1014:小程序模板消息
103
+ * - 1017:前往小程序体验版的入口页
104
+ * - 1019:微信钱包(微信客户端7.0.0版本改为支付入口)
105
+ * - 1020:公众号 profile 页相关小程序列表
106
+ * - 1023:安卓系统桌面图标
107
+ * - 1024:小程序 profile 页
108
+ * - 1025:扫描一维码
109
+ * - 1026:发现栏小程序主入口,「附近的小程序」列表
110
+ * - 1027:微信首页顶部搜索框搜索结果页「使用过的小程序」列表
111
+ * - 1028:我的卡包
112
+ * - 1029:小程序中的卡券详情页
113
+ * - 1030:自动化测试下打开小程序
114
+ * - 1031:长按图片识别一维码
115
+ * - 1032:扫描手机相册中选取的一维码
116
+ * - 1034:微信支付完成页
117
+ * - 1035:公众号自定义菜单
118
+ * - 1036:App 分享消息卡片
119
+ * - 1037:小程序打开小程序
120
+ * - 1038:从另一个小程序返回
121
+ * - 1039:摇电视
122
+ * - 1042:添加好友搜索框的搜索结果页
123
+ * - 1043:公众号模板消息
124
+ * - 1044:带 shareTicket 的小程序消息卡片 [详情](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html)
125
+ * - 1045:朋友圈广告
126
+ * - 1046:朋友圈广告详情页
127
+ * - 1047:扫描小程序码
128
+ * - 1048:长按图片识别小程序码
129
+ * - 1049:扫描手机相册中选取的小程序码
130
+ * - 1052:卡券的适用门店列表
131
+ * - 1053:搜一搜的结果页
132
+ * - 1056:聊天顶部音乐播放器右上角菜单
133
+ * - 1057:钱包中的银行卡详情页
134
+ * - 1058:公众号文章
135
+ * - 1059:体验版小程序绑定邀请页
136
+ * - 1064:微信首页连Wi-Fi状态栏
137
+ * - 1067:公众号文章广告
138
+ * - 1069:移动应用
139
+ * - 1071:钱包中的银行卡列表页
140
+ * - 1072:二维码收款页面
141
+ * - 1073:客服消息列表下发的小程序消息卡片
142
+ * - 1074:公众号会话下发的小程序消息卡片
143
+ * - 1077:摇周边
144
+ * - 1078:微信连Wi-Fi成功提示页
145
+ * - 1079:微信游戏中心
146
+ * - 1081:客服消息下发的文字链
147
+ * - 1082:公众号会话下发的文字链
148
+ * - 1084:朋友圈广告原生页
149
+ * - 1089:微信聊天主界面下拉,「最近使用」栏(基础库2.2.4版本起包含「我的小程序」栏)
150
+ * - 1090:长按小程序右上角菜单唤出最近使用历史
151
+ * - 1091:公众号文章商品卡片
152
+ * - 1092:城市服务入口
153
+ * - 1095:小程序广告组件
154
+ * - 1096:聊天记录
155
+ * - 1097:微信支付签约页
156
+ * - 1099:页面内嵌插件
157
+ * - 1102:公众号 profile 页服务预览
158
+ * - 1124:扫“一物一码”打开小程序
159
+ * - 1125:长按图片识别“一物一码”
160
+ * - 1126:扫描手机相册中选取的“一物一码”
161
+ * - 1129:微信爬虫访问 [详情](https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/sitemap.html)
162
+ */
163
+ scene: SceneValues;
164
+ /** shareTicket,详见 [获取更多转发信息]((转发#获取更多转发信息)) */
165
+ shareTicket: string;
166
+ /** 当场景为由从另一个小程序或公众号或App打开时,返回此字段 */
167
+ referrerInfo?: ReferrerInfo | undefined;
168
+ }
169
+
170
+ interface PageNotFoundOption {
171
+ /** 不存在页面的路径 */
172
+ path: string;
173
+ /** 打开不存在页面的 query */
174
+ query: IAnyObject;
175
+ /** 是否本次启动的首个页面(例如从分享等入口进来,首个页面是开发者配置的分享页面) */
176
+ isEntryPage: boolean;
177
+ }
178
+
179
+ interface Option {
180
+ /** 生命周期回调—监听小程序初始化
181
+ *
182
+ * 小程序初始化完成时触发,全局只触发一次。
183
+ */
184
+ onLaunch(options: LaunchShowOption): void;
185
+ /** 生命周期回调—监听小程序显示
186
+ *
187
+ * 小程序启动,或从后台进入前台显示时
188
+ */
189
+ onShow(options: LaunchShowOption): void;
190
+ /** 生命周期回调—监听小程序隐藏
191
+ *
192
+ * 小程序从前台进入后台时
193
+ */
194
+ onHide(): void;
195
+ /** 错误监听函数
196
+ *
197
+ * 小程序发生脚本错误,或者 api
198
+ */
199
+ onError(/** 错误信息,包含堆栈 */ error: string): void;
200
+ /** 页面不存在监听函数
201
+ *
202
+ * 小程序要打开的页面不存在时触发,会带上页面信息回调该函数
203
+ *
204
+ * **注意:**
205
+ * 1. 如果开发者没有添加 `onPageNotFound` 监听,当跳转页面不存在时,将推入微信客户端原生的页面不存在提示页面。
206
+ * 2. 如果 `onPageNotFound` 回调中又重定向到另一个不存在的页面,将推入微信客户端原生的页面不存在提示页面,并且不再回调 `onPageNotFound`。
207
+ *
208
+ * 最低基础库: 1.9.90
209
+ */
210
+ onPageNotFound(options: PageNotFoundOption): void;
211
+ /**
212
+ * 小程序有未处理的 Promise 拒绝时触发。也可以使用 [wx.onUnhandledRejection](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onUnhandledRejection.html) 绑定监听。注意事项请参考 [wx.onUnhandledRejection](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onUnhandledRejection.html)。
213
+ * **参数**:与 [wx.onUnhandledRejection](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onUnhandledRejection.html) 一致
214
+ */
215
+ onUnhandledRejection: OnUnhandledRejectionCallback;
216
+ /**
217
+ * 系统切换主题时触发。也可以使用 wx.onThemeChange 绑定监听。
218
+ *
219
+ * 最低基础库: 2.11.0
220
+ */
221
+ onThemeChange: OnThemeChangeCallback;
222
+ }
223
+
224
+ type Instance<T extends IAnyObject> = Option & T;
225
+ type Options<T extends IAnyObject> =
226
+ & Partial<Option>
227
+ & T
228
+ & ThisType<Instance<T>>;
229
+ type TrivialInstance = Instance<IAnyObject>;
230
+
231
+ interface Constructor {
232
+ <T extends IAnyObject>(options: Options<T>): void;
233
+ }
234
+
235
+ interface GetAppOption {
236
+ /** 在 `App` 未定义时返回默认实现。当App被调用时,默认实现中定义的属性会被覆盖合并到App中。一般用于独立分包
237
+ *
238
+ * 最低基础库: 2.2.4
239
+ */
240
+ allowDefault?: boolean | undefined;
241
+ }
242
+
243
+ interface GetApp {
244
+ <T extends IAnyObject = IAnyObject>(opts?: GetAppOption): Instance<T>;
245
+ }
246
+ }
247
+
248
+ declare let App: WechatMiniprogram.App.Constructor;
249
+ declare let getApp: WechatMiniprogram.App.GetApp;
@@ -0,0 +1,47 @@
1
+ declare namespace WechatMiniprogram.Behavior {
2
+ type BehaviorIdentifier = string;
3
+ type Instance<
4
+ TData extends DataOption,
5
+ TProperty extends PropertyOption,
6
+ TMethod extends MethodOption,
7
+ TCustomInstanceProperty extends IAnyObject = Record<string, never>,
8
+ > = Component.Instance<TData, TProperty, TMethod, TCustomInstanceProperty>;
9
+ type TrivialInstance = Instance<IAnyObject, IAnyObject, IAnyObject>;
10
+ type TrivialOption = Options<IAnyObject, IAnyObject, IAnyObject>;
11
+ type Options<
12
+ TData extends DataOption,
13
+ TProperty extends PropertyOption,
14
+ TMethod extends MethodOption,
15
+ TCustomInstanceProperty extends IAnyObject = Record<string, never>,
16
+ > =
17
+ & Partial<Data<TData>>
18
+ & Partial<Property<TProperty>>
19
+ & Partial<Method<TMethod>>
20
+ & Partial<OtherOption>
21
+ & Partial<Lifetimes>
22
+ & ThisType<Instance<TData, TProperty, TMethod, TCustomInstanceProperty>>;
23
+ interface Constructor {
24
+ <
25
+ TData extends DataOption,
26
+ TProperty extends PropertyOption,
27
+ TMethod extends MethodOption,
28
+ TCustomInstanceProperty extends IAnyObject = Record<string, never>,
29
+ >(
30
+ options: Options<TData, TProperty, TMethod, TCustomInstanceProperty>,
31
+ ): BehaviorIdentifier;
32
+ }
33
+
34
+ type DataOption = Component.DataOption;
35
+ type PropertyOption = Component.PropertyOption;
36
+ type MethodOption = Component.MethodOption;
37
+ type Data<D extends DataOption> = Component.Data<D>;
38
+ type Property<P extends PropertyOption> = Component.Property<P>;
39
+ type Method<M extends MethodOption> = Component.Method<M>;
40
+
41
+ type DefinitionFilter = Component.DefinitionFilter;
42
+ type Lifetimes = Component.Lifetimes;
43
+
44
+ type OtherOption = Omit<Component.OtherOption, "options">;
45
+ }
46
+ /** 注册一个 `behavior`,接受一个 `Object` 类型的参数。*/
47
+ declare let Behavior: WechatMiniprogram.Behavior.Constructor;