@mybricks/taro-core 0.0.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.
- package/dist/index.cjs.js +2555 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +692 -0
- package/dist/index.esm.js +2504 -0
- package/dist/index.esm.js.map +1 -0
- package/package.json +43 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 深度代理,支持自动路径初始化和响应式更新(鸿蒙化处理方案)
|
|
5
|
+
*/
|
|
6
|
+
declare function deepProxy(target: any, onSet?: () => void): any;
|
|
7
|
+
declare function useModel(rawData: any): any;
|
|
8
|
+
declare function useBindInputs(scope: any, id: string, initialHandlers?: Record<string, any>): any;
|
|
9
|
+
declare function useBindEvents(props: any, context?: {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
parentSlot?: any;
|
|
13
|
+
}): any;
|
|
14
|
+
|
|
15
|
+
interface WithComProps {
|
|
16
|
+
component: React.ComponentType<any>;
|
|
17
|
+
intputRef?: any;
|
|
18
|
+
id?: string;
|
|
19
|
+
data?: any;
|
|
20
|
+
className?: string;
|
|
21
|
+
style?: any;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
declare const WithCom: React.FC<WithComProps>;
|
|
25
|
+
declare const WithWrapper: (id: string, Component: React.ComponentType<any>) => (props: any) => any;
|
|
26
|
+
|
|
27
|
+
interface PopupRendererProps {
|
|
28
|
+
popupMap: Record<string, any>;
|
|
29
|
+
}
|
|
30
|
+
declare const PopupRenderer: React.FC<PopupRendererProps>;
|
|
31
|
+
|
|
32
|
+
declare function createJSHandle(fn: any, options: any): (...args: any[]) => {};
|
|
33
|
+
|
|
34
|
+
declare const SUBJECT_NEXT: unique symbol;
|
|
35
|
+
declare const SUBJECT_VALUE: unique symbol;
|
|
36
|
+
declare const SUBJECT_SUBSCRIBE: unique symbol;
|
|
37
|
+
declare const SUBJECT_UNSUBSCRIBE: unique symbol;
|
|
38
|
+
declare const SUBJECT_EMPTY: unique symbol;
|
|
39
|
+
declare const SUBJECT_SETVALUE: unique symbol;
|
|
40
|
+
|
|
41
|
+
/** 数据流 */
|
|
42
|
+
declare class Subject {
|
|
43
|
+
constructor(params?: {});
|
|
44
|
+
_values: any[];
|
|
45
|
+
_observers: Set<any>;
|
|
46
|
+
_log: any;
|
|
47
|
+
_empty: boolean;
|
|
48
|
+
get [SUBJECT_VALUE](): any;
|
|
49
|
+
get [SUBJECT_EMPTY](): boolean;
|
|
50
|
+
[SUBJECT_SETVALUE](value: any): void;
|
|
51
|
+
[SUBJECT_NEXT](value: any, extra: any): void;
|
|
52
|
+
[SUBJECT_SUBSCRIBE](observer: any): void;
|
|
53
|
+
[SUBJECT_UNSUBSCRIBE](observer: any): void;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare function createVariable(...args: any[]): {};
|
|
57
|
+
|
|
58
|
+
declare function merge(...subjects: any[]): Subject;
|
|
59
|
+
declare class Page {
|
|
60
|
+
constructor(appRouter: any);
|
|
61
|
+
appRouter: any;
|
|
62
|
+
/** 获取当前页面入参 */
|
|
63
|
+
getParams(name: any): Subject;
|
|
64
|
+
/** 打开 */
|
|
65
|
+
open(name: any, value: any): {
|
|
66
|
+
commit: Subject;
|
|
67
|
+
cancel: Subject;
|
|
68
|
+
apply: Subject;
|
|
69
|
+
close: Subject;
|
|
70
|
+
};
|
|
71
|
+
/** 打开 */
|
|
72
|
+
replace(name: any, value: any): {
|
|
73
|
+
commit: Subject;
|
|
74
|
+
cancel: Subject;
|
|
75
|
+
apply: Subject;
|
|
76
|
+
close: Subject;
|
|
77
|
+
};
|
|
78
|
+
/** 确定 */
|
|
79
|
+
commit(name: any, value: any): void;
|
|
80
|
+
/** 取消 */
|
|
81
|
+
cancel(name: any, value: any): void;
|
|
82
|
+
/** 应用,不关闭 */
|
|
83
|
+
apply(name: any, value: any): void;
|
|
84
|
+
/** 关闭 */
|
|
85
|
+
close(name: any, value: any): void;
|
|
86
|
+
}
|
|
87
|
+
declare function createFx(fx: any): (value: any, ...args: any[]) => {};
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Taro 路由驱动 (纯粹版)
|
|
91
|
+
* 只负责处理真正的 Taro 页面跳转
|
|
92
|
+
*/
|
|
93
|
+
declare class TaroRouter {
|
|
94
|
+
private paramsBackup;
|
|
95
|
+
getParams(name: string): {
|
|
96
|
+
value: Partial<Record<string, string>>;
|
|
97
|
+
};
|
|
98
|
+
push(name: string, { value }: any): void;
|
|
99
|
+
replace(name: string, { value }: any): void;
|
|
100
|
+
pop(): void;
|
|
101
|
+
}
|
|
102
|
+
declare const router: TaroRouter;
|
|
103
|
+
declare const pageRouter: Page;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 订阅弹窗状态变化(统一入口,避免外部依赖内部实现细节)
|
|
107
|
+
*/
|
|
108
|
+
declare const subscribePopupRouter: (listener: (state: any) => void) => () => void;
|
|
109
|
+
/** 弹窗控制器(命名与文件名保持一致) */
|
|
110
|
+
declare const popupRouter: Page;
|
|
111
|
+
/**
|
|
112
|
+
* 关闭当前激活的弹窗(用于 TabBar 点击等场景)
|
|
113
|
+
* 不需要知道弹窗 id
|
|
114
|
+
*/
|
|
115
|
+
declare const closeActivePopupRouter: () => void;
|
|
116
|
+
|
|
117
|
+
interface ComContextStore {
|
|
118
|
+
comRefs: any;
|
|
119
|
+
$vars: any;
|
|
120
|
+
$fxs: any;
|
|
121
|
+
appContext: any;
|
|
122
|
+
popupState: {
|
|
123
|
+
visible: boolean;
|
|
124
|
+
name: string;
|
|
125
|
+
value: any;
|
|
126
|
+
controller: any;
|
|
127
|
+
};
|
|
128
|
+
setPopupState: (state: any) => void;
|
|
129
|
+
}
|
|
130
|
+
declare function useAppCreateContext(id: string): ComContextStore;
|
|
131
|
+
|
|
132
|
+
declare function useAppContext(): ComContextStore;
|
|
133
|
+
declare const SlotProvider: any;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* 参考鸿蒙的 createSlotsIO:
|
|
137
|
+
* - 确保每个 slot 都具备 inputs / outputs / _inputs 三套通道,避免 runtime 访问时报 undefined
|
|
138
|
+
* - render 时通过 SlotProvider 注入 parentSlot(slot 内子组件可 useParentSlot 获取)
|
|
139
|
+
*/
|
|
140
|
+
declare function useEnhancedSlots(rawSlots: any, id: string): any;
|
|
141
|
+
declare function ScopedComContextProvider(props: {
|
|
142
|
+
comRefs?: any;
|
|
143
|
+
scopeId: string;
|
|
144
|
+
children: React.ReactNode;
|
|
145
|
+
}): any;
|
|
146
|
+
/** parentSlot 解析:props 优先,其次用 SlotProvider 注入的 context */
|
|
147
|
+
declare function useResolvedParentSlot(parentSlotProp: any): any;
|
|
148
|
+
|
|
149
|
+
type DataType$p = {
|
|
150
|
+
dynamic?: boolean;
|
|
151
|
+
title?: string;
|
|
152
|
+
duration?: number;
|
|
153
|
+
mask?: boolean;
|
|
154
|
+
asynchronous?: boolean;
|
|
155
|
+
icon?: 'success' | 'error' | 'loading' | 'none';
|
|
156
|
+
image?: string;
|
|
157
|
+
};
|
|
158
|
+
interface Inputs$p {
|
|
159
|
+
showToast?: (fn: (config: DataType$p | string, relOutputs?: any) => void) => void;
|
|
160
|
+
}
|
|
161
|
+
interface Outputs$p {
|
|
162
|
+
afterShowToast: (value?: any) => void;
|
|
163
|
+
}
|
|
164
|
+
interface IOContext$p {
|
|
165
|
+
data: DataType$p;
|
|
166
|
+
inputs: Inputs$p;
|
|
167
|
+
outputs: Outputs$p;
|
|
168
|
+
}
|
|
169
|
+
declare const _default$p: (context: IOContext$p) => void;
|
|
170
|
+
|
|
171
|
+
type DataType$o = {
|
|
172
|
+
onlyFromCamera?: boolean;
|
|
173
|
+
scanType?: ('barCode' | 'qrCode' | 'datamatrix' | 'pdf417')[];
|
|
174
|
+
};
|
|
175
|
+
interface Inputs$o {
|
|
176
|
+
scan?: (fn: (val: DataType$o | any, relOutputs?: any) => void) => void;
|
|
177
|
+
}
|
|
178
|
+
interface Outputs$o {
|
|
179
|
+
onSuccess: (value?: any) => void;
|
|
180
|
+
onFail: (value?: any) => void;
|
|
181
|
+
}
|
|
182
|
+
interface IOContext$o {
|
|
183
|
+
data: DataType$o;
|
|
184
|
+
inputs: Inputs$o;
|
|
185
|
+
outputs: Outputs$o;
|
|
186
|
+
}
|
|
187
|
+
declare const _default$o: (context: IOContext$o) => void;
|
|
188
|
+
|
|
189
|
+
type DataType$n = {
|
|
190
|
+
key?: string;
|
|
191
|
+
value?: any;
|
|
192
|
+
sync?: boolean;
|
|
193
|
+
};
|
|
194
|
+
interface Inputs$n {
|
|
195
|
+
setStorage?: (fn: (config: DataType$n, relOutputs?: any) => void) => void;
|
|
196
|
+
}
|
|
197
|
+
interface Outputs$n {
|
|
198
|
+
onSuccess: (value?: any) => void;
|
|
199
|
+
onFail: (value?: any) => void;
|
|
200
|
+
}
|
|
201
|
+
interface IOContext$n {
|
|
202
|
+
data: DataType$n;
|
|
203
|
+
inputs: Inputs$n;
|
|
204
|
+
outputs: Outputs$n;
|
|
205
|
+
}
|
|
206
|
+
declare const _default$n: (context: IOContext$n) => void;
|
|
207
|
+
|
|
208
|
+
type DataType$m = {
|
|
209
|
+
key?: string;
|
|
210
|
+
sync?: boolean;
|
|
211
|
+
};
|
|
212
|
+
interface Inputs$m {
|
|
213
|
+
getStorage?: (fn: (config: DataType$m, relOutputs?: any) => void) => void;
|
|
214
|
+
}
|
|
215
|
+
interface Outputs$m {
|
|
216
|
+
onSuccess: (value?: any) => void;
|
|
217
|
+
onFail: (value?: any) => void;
|
|
218
|
+
}
|
|
219
|
+
interface IOContext$m {
|
|
220
|
+
data: DataType$m;
|
|
221
|
+
inputs: Inputs$m;
|
|
222
|
+
outputs: Outputs$m;
|
|
223
|
+
}
|
|
224
|
+
declare const _default$m: (context: IOContext$m) => void;
|
|
225
|
+
|
|
226
|
+
type DataType$l = {
|
|
227
|
+
key?: string;
|
|
228
|
+
sync?: boolean;
|
|
229
|
+
};
|
|
230
|
+
interface Inputs$l {
|
|
231
|
+
removeStorage?: (fn: (config: DataType$l, relOutputs?: any) => void) => void;
|
|
232
|
+
}
|
|
233
|
+
interface Outputs$l {
|
|
234
|
+
onSuccess: (value?: any) => void;
|
|
235
|
+
onFail: (value?: any) => void;
|
|
236
|
+
}
|
|
237
|
+
interface IOContext$l {
|
|
238
|
+
data: DataType$l;
|
|
239
|
+
inputs: Inputs$l;
|
|
240
|
+
outputs: Outputs$l;
|
|
241
|
+
}
|
|
242
|
+
declare const _default$l: (context: IOContext$l) => void;
|
|
243
|
+
|
|
244
|
+
type DataType$k = {
|
|
245
|
+
type?: 'wgs84' | 'gcj02';
|
|
246
|
+
altitude?: boolean;
|
|
247
|
+
timeout?: number;
|
|
248
|
+
};
|
|
249
|
+
interface Inputs$k {
|
|
250
|
+
getLocation?: (fn: (config: DataType$k, relOutputs?: any) => void) => void;
|
|
251
|
+
}
|
|
252
|
+
interface Outputs$k {
|
|
253
|
+
onSuccess: (value?: any) => void;
|
|
254
|
+
onFail: (value?: any) => void;
|
|
255
|
+
}
|
|
256
|
+
interface IOContext$k {
|
|
257
|
+
data: DataType$k;
|
|
258
|
+
inputs: Inputs$k;
|
|
259
|
+
outputs: Outputs$k;
|
|
260
|
+
}
|
|
261
|
+
declare const _default$k: (context: IOContext$k) => void;
|
|
262
|
+
|
|
263
|
+
type DataType$j = {
|
|
264
|
+
type?: 'short' | 'long';
|
|
265
|
+
duration?: number;
|
|
266
|
+
};
|
|
267
|
+
interface Inputs$j {
|
|
268
|
+
vibrate?: (fn: (config: DataType$j, relOutputs?: any) => void) => void;
|
|
269
|
+
}
|
|
270
|
+
interface Outputs$j {
|
|
271
|
+
onSuccess: (value?: any) => void;
|
|
272
|
+
onFail: (value?: any) => void;
|
|
273
|
+
}
|
|
274
|
+
interface IOContext$j {
|
|
275
|
+
data: DataType$j;
|
|
276
|
+
inputs: Inputs$j;
|
|
277
|
+
outputs: Outputs$j;
|
|
278
|
+
}
|
|
279
|
+
declare const _default$j: (context: IOContext$j) => void;
|
|
280
|
+
|
|
281
|
+
type DataType$i = {
|
|
282
|
+
phoneNumber?: string;
|
|
283
|
+
};
|
|
284
|
+
interface Inputs$i {
|
|
285
|
+
callPhone?: (fn: (config: DataType$i | string, relOutputs?: any) => void) => void;
|
|
286
|
+
}
|
|
287
|
+
interface Outputs$i {
|
|
288
|
+
onSuccess: (value?: any) => void;
|
|
289
|
+
onFail: (value?: any) => void;
|
|
290
|
+
}
|
|
291
|
+
interface IOContext$i {
|
|
292
|
+
data: DataType$i;
|
|
293
|
+
inputs: Inputs$i;
|
|
294
|
+
outputs: Outputs$i;
|
|
295
|
+
}
|
|
296
|
+
declare const _default$i: (context: IOContext$i) => void;
|
|
297
|
+
|
|
298
|
+
type DataType$h = {
|
|
299
|
+
camera?: 'back' | 'front';
|
|
300
|
+
flash?: 'auto' | 'on' | 'off';
|
|
301
|
+
quality?: 'high' | 'normal' | 'low';
|
|
302
|
+
};
|
|
303
|
+
interface Inputs$h {
|
|
304
|
+
openCamera?: (fn: (config: DataType$h, relOutputs?: any) => void) => void;
|
|
305
|
+
}
|
|
306
|
+
interface Outputs$h {
|
|
307
|
+
onSuccess: (value?: any) => void;
|
|
308
|
+
onFail: (value?: any) => void;
|
|
309
|
+
}
|
|
310
|
+
interface IOContext$h {
|
|
311
|
+
data: DataType$h;
|
|
312
|
+
inputs: Inputs$h;
|
|
313
|
+
outputs: Outputs$h;
|
|
314
|
+
}
|
|
315
|
+
declare const _default$h: (context: IOContext$h) => void;
|
|
316
|
+
|
|
317
|
+
type DataType$g = {
|
|
318
|
+
url?: string;
|
|
319
|
+
target?: '_blank' | '_self';
|
|
320
|
+
};
|
|
321
|
+
interface Inputs$g {
|
|
322
|
+
openUrl?: (fn: (config: DataType$g | string, relOutputs?: any) => void) => void;
|
|
323
|
+
}
|
|
324
|
+
interface Outputs$g {
|
|
325
|
+
onSuccess: (value?: any) => void;
|
|
326
|
+
onFail: (value?: any) => void;
|
|
327
|
+
}
|
|
328
|
+
interface IOContext$g {
|
|
329
|
+
data: DataType$g;
|
|
330
|
+
inputs: Inputs$g;
|
|
331
|
+
outputs: Outputs$g;
|
|
332
|
+
}
|
|
333
|
+
declare const _default$g: (context: IOContext$g) => void;
|
|
334
|
+
|
|
335
|
+
type DataType$f = {
|
|
336
|
+
title?: string;
|
|
337
|
+
path?: string;
|
|
338
|
+
imageUrl?: string;
|
|
339
|
+
};
|
|
340
|
+
interface Inputs$f {
|
|
341
|
+
share?: (fn: (config: DataType$f, relOutputs?: any) => void) => void;
|
|
342
|
+
}
|
|
343
|
+
interface Outputs$f {
|
|
344
|
+
onSuccess: (value?: any) => void;
|
|
345
|
+
onFail: (value?: any) => void;
|
|
346
|
+
onCancel: (value?: any) => void;
|
|
347
|
+
}
|
|
348
|
+
interface IOContext$f {
|
|
349
|
+
data: DataType$f;
|
|
350
|
+
inputs: Inputs$f;
|
|
351
|
+
outputs: Outputs$f;
|
|
352
|
+
}
|
|
353
|
+
declare const _default$f: (context: IOContext$f) => void;
|
|
354
|
+
|
|
355
|
+
type DataType$e = {
|
|
356
|
+
sync?: boolean;
|
|
357
|
+
};
|
|
358
|
+
interface Inputs$e {
|
|
359
|
+
getSystemInfo?: (fn: (config: DataType$e, relOutputs?: any) => void) => void;
|
|
360
|
+
}
|
|
361
|
+
interface Outputs$e {
|
|
362
|
+
onSuccess: (value?: any) => void;
|
|
363
|
+
onFail: (value?: any) => void;
|
|
364
|
+
}
|
|
365
|
+
interface IOContext$e {
|
|
366
|
+
data: DataType$e;
|
|
367
|
+
inputs: Inputs$e;
|
|
368
|
+
outputs: Outputs$e;
|
|
369
|
+
}
|
|
370
|
+
declare const _default$e: (context: IOContext$e) => void;
|
|
371
|
+
|
|
372
|
+
type DataType$d = {
|
|
373
|
+
key?: string;
|
|
374
|
+
iv?: string;
|
|
375
|
+
mode?: 'CBC' | 'ECB' | 'CFB' | 'OFB' | 'CTR';
|
|
376
|
+
padding?: 'Pkcs7' | 'Iso97971' | 'AnsiX923' | 'Iso10126' | 'ZeroPadding' | 'NoPadding';
|
|
377
|
+
};
|
|
378
|
+
interface Inputs$d {
|
|
379
|
+
encrypt?: (fn: (config: DataType$d & {
|
|
380
|
+
text: string;
|
|
381
|
+
}, relOutputs?: any) => void) => void;
|
|
382
|
+
decrypt?: (fn: (config: DataType$d & {
|
|
383
|
+
encryptedText: string;
|
|
384
|
+
}, relOutputs?: any) => void) => void;
|
|
385
|
+
}
|
|
386
|
+
interface Outputs$d {
|
|
387
|
+
onEncryptSuccess: (value?: any) => void;
|
|
388
|
+
onDecryptSuccess: (value?: any) => void;
|
|
389
|
+
onFail: (value?: any) => void;
|
|
390
|
+
}
|
|
391
|
+
interface IOContext$d {
|
|
392
|
+
data: DataType$d;
|
|
393
|
+
inputs: Inputs$d;
|
|
394
|
+
outputs: Outputs$d;
|
|
395
|
+
}
|
|
396
|
+
declare const _default$d: (context: IOContext$d) => void;
|
|
397
|
+
|
|
398
|
+
type DataType$c = {
|
|
399
|
+
dynamic?: boolean;
|
|
400
|
+
title?: string;
|
|
401
|
+
content?: string;
|
|
402
|
+
/** 微信/部分端支持,可编辑输入框 */
|
|
403
|
+
editable?: boolean;
|
|
404
|
+
showCancel?: boolean;
|
|
405
|
+
cancelText?: string;
|
|
406
|
+
cancelColor?: string;
|
|
407
|
+
confirmText?: string;
|
|
408
|
+
confirmColor?: string;
|
|
409
|
+
};
|
|
410
|
+
interface Inputs$c {
|
|
411
|
+
/** 显示模态对话框 */
|
|
412
|
+
show?: (fn: (config?: DataType$c | string, relOutputs?: any) => void) => void;
|
|
413
|
+
}
|
|
414
|
+
interface Outputs$c {
|
|
415
|
+
onConfirm: (value?: any) => void;
|
|
416
|
+
onCancel: (value?: any) => void;
|
|
417
|
+
}
|
|
418
|
+
interface IOContext$c {
|
|
419
|
+
data: DataType$c;
|
|
420
|
+
inputs: Inputs$c;
|
|
421
|
+
outputs: Outputs$c;
|
|
422
|
+
}
|
|
423
|
+
declare const _default$c: (context: IOContext$c) => void;
|
|
424
|
+
|
|
425
|
+
type DataType$b = {
|
|
426
|
+
input?: any;
|
|
427
|
+
format?: 'json' | 'string' | 'number' | 'boolean' | 'date' | 'base64' | 'urlEncode' | 'urlDecode';
|
|
428
|
+
options?: {
|
|
429
|
+
dateFormat?: string;
|
|
430
|
+
precision?: number;
|
|
431
|
+
radix?: number;
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
interface Inputs$b {
|
|
435
|
+
format?: (fn: (config: DataType$b, relOutputs?: any) => void) => void;
|
|
436
|
+
}
|
|
437
|
+
interface Outputs$b {
|
|
438
|
+
onSuccess: (value?: any) => void;
|
|
439
|
+
onFail: (value?: any) => void;
|
|
440
|
+
}
|
|
441
|
+
interface IOContext$b {
|
|
442
|
+
data: DataType$b;
|
|
443
|
+
inputs: Inputs$b;
|
|
444
|
+
outputs: Outputs$b;
|
|
445
|
+
}
|
|
446
|
+
declare const _default$b: (context: IOContext$b) => void;
|
|
447
|
+
|
|
448
|
+
type DataType$a = {
|
|
449
|
+
accept?: string;
|
|
450
|
+
multiple?: boolean;
|
|
451
|
+
capture?: 'camera' | 'album' | 'both';
|
|
452
|
+
compressed?: boolean;
|
|
453
|
+
maxDuration?: number;
|
|
454
|
+
camera?: 'back' | 'front';
|
|
455
|
+
};
|
|
456
|
+
interface Inputs$a {
|
|
457
|
+
chooseFile?: (fn: (config: DataType$a, relOutputs?: any) => void) => void;
|
|
458
|
+
}
|
|
459
|
+
interface Outputs$a {
|
|
460
|
+
onSuccess: (value?: any) => void;
|
|
461
|
+
onFail: (value?: any) => void;
|
|
462
|
+
}
|
|
463
|
+
interface IOContext$a {
|
|
464
|
+
data: DataType$a;
|
|
465
|
+
inputs: Inputs$a;
|
|
466
|
+
outputs: Outputs$a;
|
|
467
|
+
}
|
|
468
|
+
declare const _default$a: (context: IOContext$a) => void;
|
|
469
|
+
|
|
470
|
+
type DataType$9 = {
|
|
471
|
+
mediaType?: ('image' | 'video')[];
|
|
472
|
+
sourceType?: ('album' | 'camera')[];
|
|
473
|
+
count?: number;
|
|
474
|
+
sizeType?: ('original' | 'compressed')[];
|
|
475
|
+
maxDuration?: number;
|
|
476
|
+
camera?: 'back' | 'front';
|
|
477
|
+
};
|
|
478
|
+
interface Inputs$9 {
|
|
479
|
+
chooseMedia?: (fn: (config: DataType$9, relOutputs?: any) => void) => void;
|
|
480
|
+
}
|
|
481
|
+
interface Outputs$9 {
|
|
482
|
+
onSuccess: (value?: any) => void;
|
|
483
|
+
onFail: (value?: any) => void;
|
|
484
|
+
}
|
|
485
|
+
interface IOContext$9 {
|
|
486
|
+
data: DataType$9;
|
|
487
|
+
inputs: Inputs$9;
|
|
488
|
+
outputs: Outputs$9;
|
|
489
|
+
}
|
|
490
|
+
declare const _default$9: (context: IOContext$9) => void;
|
|
491
|
+
|
|
492
|
+
type DataType$8 = {
|
|
493
|
+
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
494
|
+
url?: string;
|
|
495
|
+
headers?: Record<string, string>;
|
|
496
|
+
data?: any;
|
|
497
|
+
timeout?: number;
|
|
498
|
+
dataType?: 'json' | 'text' | 'base64';
|
|
499
|
+
responseType?: 'text' | 'arraybuffer';
|
|
500
|
+
};
|
|
501
|
+
interface Inputs$8 {
|
|
502
|
+
request?: (fn: (config: DataType$8, relOutputs?: any) => void) => void;
|
|
503
|
+
}
|
|
504
|
+
interface Outputs$8 {
|
|
505
|
+
onSuccess: (value?: any) => void;
|
|
506
|
+
onFail: (value?: any) => void;
|
|
507
|
+
}
|
|
508
|
+
interface IOContext$8 {
|
|
509
|
+
data: DataType$8;
|
|
510
|
+
inputs: Inputs$8;
|
|
511
|
+
outputs: Outputs$8;
|
|
512
|
+
}
|
|
513
|
+
declare const _default$8: (context: IOContext$8) => void;
|
|
514
|
+
|
|
515
|
+
type DataType$7 = {
|
|
516
|
+
headers?: Record<string, string>;
|
|
517
|
+
};
|
|
518
|
+
interface Inputs$7 {
|
|
519
|
+
setGlobalHeaders?: (fn: (config: DataType$7, relOutputs?: any) => void) => void;
|
|
520
|
+
getGlobalHeaders?: (fn: (config: {}, relOutputs?: any) => void) => void;
|
|
521
|
+
clearGlobalHeaders?: (fn: (config: {}, relOutputs?: any) => void) => void;
|
|
522
|
+
}
|
|
523
|
+
interface Outputs$7 {
|
|
524
|
+
onSuccess: (value?: any) => void;
|
|
525
|
+
onFail: (value?: any) => void;
|
|
526
|
+
}
|
|
527
|
+
interface IOContext$7 {
|
|
528
|
+
data: DataType$7;
|
|
529
|
+
inputs: Inputs$7;
|
|
530
|
+
outputs: Outputs$7;
|
|
531
|
+
}
|
|
532
|
+
declare const _default$7: (context: IOContext$7) => void;
|
|
533
|
+
|
|
534
|
+
type DataType$6 = {
|
|
535
|
+
delta?: number;
|
|
536
|
+
animation?: boolean;
|
|
537
|
+
};
|
|
538
|
+
interface Inputs$6 {
|
|
539
|
+
back?: (fn: (config: DataType$6, relOutputs?: any) => void) => void;
|
|
540
|
+
}
|
|
541
|
+
interface Outputs$6 {
|
|
542
|
+
onSuccess: (value?: any) => void;
|
|
543
|
+
onFail: (value?: any) => void;
|
|
544
|
+
}
|
|
545
|
+
interface IOContext$6 {
|
|
546
|
+
data: DataType$6;
|
|
547
|
+
inputs: Inputs$6;
|
|
548
|
+
outputs: Outputs$6;
|
|
549
|
+
}
|
|
550
|
+
declare const _default$6: (context: IOContext$6) => void;
|
|
551
|
+
|
|
552
|
+
type DataType$5 = {
|
|
553
|
+
path?: string;
|
|
554
|
+
params?: Record<string, any>;
|
|
555
|
+
type?: 'navigateTo' | 'redirectTo' | 'switchTab' | 'reLaunch' | 'navigateBack';
|
|
556
|
+
delta?: number;
|
|
557
|
+
};
|
|
558
|
+
interface Inputs$5 {
|
|
559
|
+
navigate?: (fn: (config: DataType$5, relOutputs?: any) => void) => void;
|
|
560
|
+
}
|
|
561
|
+
interface Outputs$5 {
|
|
562
|
+
onSuccess: (value?: any) => void;
|
|
563
|
+
onFail: (value?: any) => void;
|
|
564
|
+
}
|
|
565
|
+
interface IOContext$5 {
|
|
566
|
+
data: DataType$5;
|
|
567
|
+
inputs: Inputs$5;
|
|
568
|
+
outputs: Outputs$5;
|
|
569
|
+
}
|
|
570
|
+
declare const _default$5: (context: IOContext$5) => void;
|
|
571
|
+
|
|
572
|
+
type DataType$4 = {
|
|
573
|
+
latitude?: number;
|
|
574
|
+
longitude?: number;
|
|
575
|
+
scale?: number;
|
|
576
|
+
markers?: Array<{
|
|
577
|
+
id: string;
|
|
578
|
+
latitude: number;
|
|
579
|
+
longitude: number;
|
|
580
|
+
title?: string;
|
|
581
|
+
iconPath?: string;
|
|
582
|
+
}>;
|
|
583
|
+
showLocation?: boolean;
|
|
584
|
+
};
|
|
585
|
+
interface Inputs$4 {
|
|
586
|
+
openMap?: (fn: (config: DataType$4, relOutputs?: any) => void) => void;
|
|
587
|
+
}
|
|
588
|
+
interface Outputs$4 {
|
|
589
|
+
onSuccess: (value?: any) => void;
|
|
590
|
+
onFail: (value?: any) => void;
|
|
591
|
+
}
|
|
592
|
+
interface IOContext$4 {
|
|
593
|
+
data: DataType$4;
|
|
594
|
+
inputs: Inputs$4;
|
|
595
|
+
outputs: Outputs$4;
|
|
596
|
+
}
|
|
597
|
+
declare const _default$4: (context: IOContext$4) => void;
|
|
598
|
+
|
|
599
|
+
type DataType$3 = {
|
|
600
|
+
text?: string;
|
|
601
|
+
lang?: string;
|
|
602
|
+
rate?: number;
|
|
603
|
+
pitch?: number;
|
|
604
|
+
volume?: number;
|
|
605
|
+
};
|
|
606
|
+
interface Inputs$3 {
|
|
607
|
+
speak?: (fn: (config: DataType$3, relOutputs?: any) => void) => void;
|
|
608
|
+
stop?: (fn: (config: {}, relOutputs?: any) => void) => void;
|
|
609
|
+
pause?: (fn: (config: {}, relOutputs?: any) => void) => void;
|
|
610
|
+
resume?: (fn: (config: {}, relOutputs?: any) => void) => void;
|
|
611
|
+
}
|
|
612
|
+
interface Outputs$3 {
|
|
613
|
+
onStart: (value?: any) => void;
|
|
614
|
+
onEnd: (value?: any) => void;
|
|
615
|
+
onError: (value?: any) => void;
|
|
616
|
+
onSuccess: (value?: any) => void;
|
|
617
|
+
onFail: (value?: any) => void;
|
|
618
|
+
}
|
|
619
|
+
interface IOContext$3 {
|
|
620
|
+
data: DataType$3;
|
|
621
|
+
inputs: Inputs$3;
|
|
622
|
+
outputs: Outputs$3;
|
|
623
|
+
}
|
|
624
|
+
declare const _default$3: (context: IOContext$3) => void;
|
|
625
|
+
|
|
626
|
+
type DataType$2 = {
|
|
627
|
+
delay?: number;
|
|
628
|
+
leading?: boolean;
|
|
629
|
+
trailing?: boolean;
|
|
630
|
+
};
|
|
631
|
+
interface Inputs$2 {
|
|
632
|
+
debounce?: (fn: (config: DataType$2, relOutputs?: any) => void) => void;
|
|
633
|
+
}
|
|
634
|
+
interface Outputs$2 {
|
|
635
|
+
onExecute: (value?: any) => void;
|
|
636
|
+
onComplete: (value?: any) => void;
|
|
637
|
+
}
|
|
638
|
+
interface IOContext$2 {
|
|
639
|
+
data: DataType$2;
|
|
640
|
+
inputs: Inputs$2;
|
|
641
|
+
outputs: Outputs$2;
|
|
642
|
+
}
|
|
643
|
+
declare const _default$2: (context: IOContext$2) => void;
|
|
644
|
+
|
|
645
|
+
type DataType$1 = {
|
|
646
|
+
delay?: number;
|
|
647
|
+
};
|
|
648
|
+
interface Inputs$1 {
|
|
649
|
+
delay?: (fn: (config: DataType$1, relOutputs?: any) => void) => void;
|
|
650
|
+
cancel?: (fn: (config: {}, relOutputs?: any) => void) => void;
|
|
651
|
+
/**
|
|
652
|
+
* 兼容老协议:直接传入任意 payload,延迟后从 outputs.trigger 原样输出
|
|
653
|
+
*(生成器里常见 inputs:["trigger"], outputs:["trigger"])
|
|
654
|
+
*/
|
|
655
|
+
trigger?: (fn: (payload: any, relOutputs?: any) => void) => void;
|
|
656
|
+
}
|
|
657
|
+
interface Outputs$1 {
|
|
658
|
+
onStart: (value?: any) => void;
|
|
659
|
+
onExecute: (value?: any) => void;
|
|
660
|
+
onCancel: (value?: any) => void;
|
|
661
|
+
/** 兼容老协议 */
|
|
662
|
+
trigger?: (value?: any) => void;
|
|
663
|
+
}
|
|
664
|
+
interface IOContext$1 {
|
|
665
|
+
data: DataType$1;
|
|
666
|
+
inputs: Inputs$1;
|
|
667
|
+
outputs: Outputs$1;
|
|
668
|
+
}
|
|
669
|
+
declare const _default$1: (context: IOContext$1) => void;
|
|
670
|
+
|
|
671
|
+
type DataType = {
|
|
672
|
+
interval?: number;
|
|
673
|
+
leading?: boolean;
|
|
674
|
+
trailing?: boolean;
|
|
675
|
+
};
|
|
676
|
+
interface Inputs {
|
|
677
|
+
throttle?: (fn: (config: DataType, relOutputs?: any) => void) => void;
|
|
678
|
+
}
|
|
679
|
+
interface Outputs {
|
|
680
|
+
onExecute: (value?: any) => void;
|
|
681
|
+
onSkip: (value?: any) => void;
|
|
682
|
+
onComplete: (value?: any) => void;
|
|
683
|
+
}
|
|
684
|
+
interface IOContext {
|
|
685
|
+
data: DataType;
|
|
686
|
+
inputs: Inputs;
|
|
687
|
+
outputs: Outputs;
|
|
688
|
+
}
|
|
689
|
+
declare const _default: (context: IOContext) => void;
|
|
690
|
+
|
|
691
|
+
export { PopupRenderer, SUBJECT_SUBSCRIBE, SUBJECT_VALUE, ScopedComContextProvider, SlotProvider, WithCom, WithWrapper, closeActivePopupRouter, createFx, createJSHandle, createVariable, deepProxy, merge, _default$d as mybricks_taro_aesEncode, _default$6 as mybricks_taro_backTo, _default$i as mybricks_taro_callPhone, _default$a as mybricks_taro_chooseFile, _default$9 as mybricks_taro_chooseMedia, _default$8 as mybricks_taro_connector, _default$7 as mybricks_taro_connectorGlobalHeaders, _default$b as mybricks_taro_format, _default$k as mybricks_taro_getLocation, _default$m as mybricks_taro_getStorage, _default$e as mybricks_taro_getSystemInfo, _default$c as mybricks_taro_modal, _default$h as mybricks_taro_openCamera, _default$4 as mybricks_taro_openPetalMap, _default$g as mybricks_taro_openUrl, _default$l as mybricks_taro_removeStorage, _default$5 as mybricks_taro_router, _default$o as mybricks_taro_scanQrcode, _default$n as mybricks_taro_setStorage, _default$f as mybricks_taro_share, _default$p as mybricks_taro_showToast, _default$3 as mybricks_taro_textToSpeech, _default$2 as mybricks_taro_timerDebounce, _default$1 as mybricks_taro_timerDelay, _default as mybricks_taro_timerThrottle, _default$j as mybricks_taro_vibrate, pageRouter, popupRouter, router, subscribePopupRouter, useAppContext, useAppCreateContext, useBindEvents, useBindInputs, useEnhancedSlots, useModel, useResolvedParentSlot };
|
|
692
|
+
export type { DataType$d as mybricks_taro_aesEncode_DataType, DataType$6 as mybricks_taro_backTo_DataType, DataType$i as mybricks_taro_callPhone_DataType, DataType$a as mybricks_taro_chooseFile_DataType, DataType$9 as mybricks_taro_chooseMedia_DataType, DataType$7 as mybricks_taro_connectorGlobalHeaders_DataType, DataType$8 as mybricks_taro_connector_DataType, DataType$b as mybricks_taro_format_DataType, DataType$k as mybricks_taro_getLocation_DataType, DataType$m as mybricks_taro_getStorage_DataType, DataType$e as mybricks_taro_getSystemInfo_DataType, DataType$c as mybricks_taro_modal_DataType, DataType$h as mybricks_taro_openCamera_DataType, DataType$4 as mybricks_taro_openPetalMap_DataType, DataType$g as mybricks_taro_openUrl_DataType, DataType$l as mybricks_taro_removeStorage_DataType, DataType$5 as mybricks_taro_router_DataType, DataType$o as mybricks_taro_scanQrcode_DataType, DataType$n as mybricks_taro_setStorage_DataType, DataType$f as mybricks_taro_share_DataType, DataType$p as mybricks_taro_showToast_DataType, DataType$3 as mybricks_taro_textToSpeech_DataType, DataType$2 as mybricks_taro_timerDebounce_DataType, DataType$1 as mybricks_taro_timerDelay_DataType, DataType as mybricks_taro_timerThrottle_DataType, DataType$j as mybricks_taro_vibrate_DataType };
|