@tarojs/runtime 3.5.0-beta.4 → 3.5.0-theta.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.
Files changed (57) hide show
  1. package/dist/runtime.esm.d.ts +537 -0
  2. package/dist/runtime.esm.js +3118 -3135
  3. package/dist/runtime.esm.js.map +1 -1
  4. package/package.json +4 -5
  5. package/LICENSE +0 -21
  6. package/dist/bom/document.d.ts +0 -2
  7. package/dist/bom/getComputedStyle.d.ts +0 -3
  8. package/dist/bom/navigator.d.ts +0 -1
  9. package/dist/bom/raf.d.ts +0 -5
  10. package/dist/bom/window.d.ts +0 -2
  11. package/dist/constants/index.d.ts +0 -47
  12. package/dist/current.d.ts +0 -19
  13. package/dist/dom/class-list.d.ts +0 -14
  14. package/dist/dom/document.d.ts +0 -20
  15. package/dist/dom/element.d.ts +0 -38
  16. package/dist/dom/event-source.d.ts +0 -7
  17. package/dist/dom/event-target.d.ts +0 -7
  18. package/dist/dom/event.d.ts +0 -22
  19. package/dist/dom/form.d.ts +0 -7
  20. package/dist/dom/node.d.ts +0 -75
  21. package/dist/dom/node_types.d.ts +0 -10
  22. package/dist/dom/root.d.ts +0 -15
  23. package/dist/dom/style.d.ts +0 -14
  24. package/dist/dom/style_properties.d.ts +0 -3
  25. package/dist/dom/svg.d.ts +0 -3
  26. package/dist/dom/text.d.ts +0 -14
  27. package/dist/dom/tree.d.ts +0 -4
  28. package/dist/dom-external/element.d.ts +0 -3
  29. package/dist/dom-external/index.d.ts +0 -1
  30. package/dist/dom-external/inner-html/html.d.ts +0 -2
  31. package/dist/dom-external/inner-html/parser.d.ts +0 -25
  32. package/dist/dom-external/inner-html/scaner.d.ts +0 -30
  33. package/dist/dom-external/inner-html/style.d.ts +0 -27
  34. package/dist/dom-external/inner-html/tags.d.ts +0 -8
  35. package/dist/dom-external/inner-html/utils.d.ts +0 -1
  36. package/dist/dom-external/mutation-observer/implements.d.ts +0 -52
  37. package/dist/dom-external/mutation-observer/index.d.ts +0 -13
  38. package/dist/dom-external/mutation-observer/record.d.ts +0 -24
  39. package/dist/dom-external/node.d.ts +0 -11
  40. package/dist/dsl/common.d.ts +0 -15
  41. package/dist/dsl/instance.d.ts +0 -87
  42. package/dist/emitter/emitter.d.ts +0 -4
  43. package/dist/env.d.ts +0 -7
  44. package/dist/hydrate.d.ts +0 -10
  45. package/dist/index.d.ts +0 -26
  46. package/dist/interface/element.d.ts +0 -4
  47. package/dist/interface/event-target.d.ts +0 -10
  48. package/dist/interface/event.d.ts +0 -15
  49. package/dist/interface/hydrate.d.ts +0 -30
  50. package/dist/interface/index.d.ts +0 -7
  51. package/dist/interface/node.d.ts +0 -7
  52. package/dist/interface/options.d.ts +0 -16
  53. package/dist/interface/utils.d.ts +0 -2
  54. package/dist/next-tick.d.ts +0 -2
  55. package/dist/options.d.ts +0 -2
  56. package/dist/perf.d.ts +0 -7
  57. package/dist/utils/index.d.ts +0 -23
@@ -0,0 +1,537 @@
1
+ import { Shortcuts, Events } from "@tarojs/shared";
2
+ import { PageConfig } from "@tarojs/taro";
3
+ import { Component as Vue3Component } from "@vue/runtime-core";
4
+ import { Component, ComponentClass } from "react";
5
+ import VueCtor from "vue";
6
+ import { ComponentOptions, VNode } from "vue";
7
+ import { CombinedVueInstance } from "vue/types/vue";
8
+ declare let document: any;
9
+ interface Attributes {
10
+ name: string;
11
+ value: string;
12
+ }
13
+ interface EventOptions {
14
+ bubbles: boolean;
15
+ cancelable: boolean;
16
+ }
17
+ type Target = Record<string, unknown> & {
18
+ dataset: Record<string, unknown>;
19
+ id: string;
20
+ };
21
+ interface MpEvent {
22
+ type: string;
23
+ detail: Record<string, unknown>;
24
+ target: Target;
25
+ currentTarget: Target;
26
+ }
27
+ interface EventListenerOptions {
28
+ capture?: boolean;
29
+ }
30
+ interface AddEventListenerOptions extends EventListenerOptions {
31
+ once?: boolean;
32
+ passive?: boolean;
33
+ }
34
+ interface EventHandler extends Function {
35
+ _stop?: boolean;
36
+ }
37
+ interface MpInstance {
38
+ config: PageConfig;
39
+ setData: (data: unknown, cb: () => void) => void;
40
+ route?: string;
41
+ __route__: string;
42
+ $taroParams?: Record<string, unknown>;
43
+ $taroPath: string;
44
+ __data__: any;
45
+ data: any;
46
+ exitState?: any;
47
+ selectComponent: (selector: string) => any;
48
+ }
49
+ interface MiniElementData {
50
+ [Shortcuts.Childnodes]?: MiniData[];
51
+ [Shortcuts.NodeName]: string;
52
+ [Shortcuts.Class]?: string;
53
+ [Shortcuts.Style]?: string;
54
+ uid?: string;
55
+ sid: string;
56
+ [key: string]: unknown;
57
+ }
58
+ interface MiniTextData {
59
+ [Shortcuts.Text]: string;
60
+ [Shortcuts.NodeName]: string;
61
+ }
62
+ type MiniData = MiniElementData | MiniTextData;
63
+ type HydratedData = () => MiniData | MiniData[];
64
+ type UpdatePayloadValue = string | boolean | HydratedData;
65
+ type DataTree = Record<string, UpdatePayloadValue | ReturnType<HydratedData>>;
66
+ interface UpdatePayload {
67
+ path: string;
68
+ value: UpdatePayloadValue;
69
+ }
70
+ // Taro 事件对象。以 Web 标准的事件对象为基础,加入小程序事件对象中携带的部分信息,并模拟实现事件冒泡。
71
+ declare class TaroEvent {
72
+ type: string;
73
+ bubbles: boolean;
74
+ cancelable: boolean;
75
+ _stop: boolean;
76
+ _end: boolean;
77
+ defaultPrevented: boolean;
78
+ // timestamp can either be hi-res ( relative to page load) or low-res (relative to UNIX epoch)
79
+ // here use hi-res timestamp
80
+ timeStamp: number;
81
+ mpEvent: MpEvent | undefined;
82
+ constructor(type: string, opts: EventOptions, event?: MpEvent);
83
+ stopPropagation(): void;
84
+ stopImmediatePropagation(): void;
85
+ preventDefault(): void;
86
+ get target(): any;
87
+ get currentTarget(): any;
88
+ }
89
+ declare function createEvent(event: MpEvent | string, node?: TaroElement): TaroEvent;
90
+ // 小程序的事件代理回调函数
91
+ declare function eventHandler(event: MpEvent): void;
92
+ declare class FormElement extends TaroElement {
93
+ get value(): string | boolean | number | any[];
94
+ set value(val: string | boolean | number | any[]);
95
+ dispatchEvent(event: TaroEvent): boolean;
96
+ }
97
+ declare class TaroRootElement extends TaroElement {
98
+ private updatePayloads;
99
+ private updateCallbacks;
100
+ pendingUpdate: boolean;
101
+ ctx: null | MpInstance;
102
+ constructor();
103
+ get _path(): string;
104
+ get _root(): TaroRootElement;
105
+ enqueueUpdate(payload: UpdatePayload): void;
106
+ performUpdate(initRender?: boolean, prerender?: Func): void;
107
+ enqueueUpdateCallback(cb: Func, ctx?: Record<string, any>): void;
108
+ flushUpdateCallback(): void;
109
+ }
110
+ declare class TaroDocument extends TaroElement {
111
+ documentElement: TaroElement;
112
+ head: TaroElement;
113
+ body: TaroElement;
114
+ createEvent: typeof createEvent;
115
+ constructor();
116
+ createElement(type: string): TaroElement | TaroRootElement | FormElement;
117
+ // an ugly fake createElementNS to deal with @vue/runtime-dom's
118
+ // support mounting app to svg container since vue@3.0.8
119
+ createElementNS(_svgNS: string, type: string): TaroElement | TaroRootElement | FormElement;
120
+ createTextNode(text: string): TaroText;
121
+ getElementById<T extends TaroElement>(id: string | undefined | null): T | null;
122
+ querySelector<T extends TaroElement>(query: string): T | null;
123
+ querySelectorAll(): never[];
124
+ // @TODO: @PERF: 在 hydrate 移除掉空的 node
125
+ createComment(): TaroText;
126
+ get defaultView(): any;
127
+ }
128
+ declare class TaroEventTarget {
129
+ __handlers: Record<string, EventHandler[]>;
130
+ addEventListener(type: string, handler: EventHandler, options?: boolean | AddEventListenerOptions): void;
131
+ removeEventListener(type: string, handler: EventHandler): void;
132
+ isAnyEventBinded(): boolean;
133
+ }
134
+ declare const enum NodeType {
135
+ ELEMENT_NODE = 1,
136
+ ATTRIBUTE_NODE = 2,
137
+ TEXT_NODE = 3,
138
+ CDATA_SECTION_NODE = 4,
139
+ ENTITY_REFERENCE_NODE = 5,
140
+ COMMENT_NODE = 6,
141
+ PROCESSING_INSTRUCTION_NODE = 7,
142
+ DOCUMENT_NODE = 9
143
+ }
144
+ interface RemoveChildOptions {
145
+ cleanRef?: boolean;
146
+ doUpdate?: boolean;
147
+ }
148
+ declare class TaroNode extends TaroEventTarget {
149
+ uid: string;
150
+ sid: string;
151
+ nodeType: NodeType;
152
+ nodeName: string;
153
+ parentNode: TaroNode | null;
154
+ childNodes: TaroNode[];
155
+ constructor();
156
+ private hydrate;
157
+ private updateChildNodes;
158
+ get _root(): TaroRootElement | null;
159
+ protected findIndex(refChild: TaroNode): number;
160
+ get _path(): string;
161
+ get nextSibling(): TaroNode | null;
162
+ get previousSibling(): TaroNode | null;
163
+ get parentElement(): TaroElement | null;
164
+ get firstChild(): TaroNode | null;
165
+ get lastChild(): TaroNode | null;
166
+ /**
167
+ * @textContent 目前只能置空子元素
168
+ * @TODO 等待完整 innerHTML 实现
169
+ */
170
+ // eslint-disable-next-line accessor-pairs
171
+ set textContent(text: string);
172
+ /**
173
+ * @doc https://developer.mozilla.org/zh-CN/docs/Web/API/Node/insertBefore
174
+ * @scenario
175
+ * [A,B,C]
176
+ * 1. insert D before C, D has no parent
177
+ * 2. insert D before C, D has the same parent of C
178
+ * 3. insert D before C, D has the different parent of C
179
+ */
180
+ insertBefore<T extends TaroNode>(newChild: T, refChild?: TaroNode | null, isReplace?: boolean): T;
181
+ /**
182
+ * @doc https://developer.mozilla.org/zh-CN/docs/Web/API/Node/appendChild
183
+ * @scenario
184
+ * [A,B,C]
185
+ * 1. append C, C has no parent
186
+ * 2. append C, C has the same parent of B
187
+ * 3. append C, C has the different parent of B
188
+ */
189
+ appendChild(newChild: TaroNode): TaroNode;
190
+ /**
191
+ * @doc https://developer.mozilla.org/zh-CN/docs/Web/API/Node/replaceChild
192
+ * @scenario
193
+ * [A,B,C]
194
+ * 1. replace B with C, C has no parent
195
+ * 2. replace B with C, C has no parent, C has the same parent of B
196
+ * 3. replace B with C, C has no parent, C has the different parent of B
197
+ */
198
+ replaceChild(newChild: TaroNode, oldChild: TaroNode): TaroNode | undefined;
199
+ /**
200
+ * @doc https://developer.mozilla.org/zh-CN/docs/Web/API/Node/removeChild
201
+ * @scenario
202
+ * [A,B,C]
203
+ * 1. remove A or B
204
+ * 2. remove C
205
+ */
206
+ removeChild<T extends TaroNode>(child: T, options?: RemoveChildOptions): T;
207
+ remove(options?: RemoveChildOptions): void;
208
+ hasChildNodes(): boolean;
209
+ enqueueUpdate(payload: UpdatePayload): void;
210
+ get ownerDocument(): TaroDocument;
211
+ static extend(methodName: string, options: Func | Record<string, any>): void;
212
+ }
213
+ declare class TaroText extends TaroNode {
214
+ _value: string;
215
+ nodeType: NodeType;
216
+ nodeName: string;
217
+ constructor(value: any);
218
+ set textContent(text: string);
219
+ get textContent(): string;
220
+ set nodeValue(text: string);
221
+ get nodeValue(): string;
222
+ set data(text: string);
223
+ get data(): string;
224
+ }
225
+ interface Node {
226
+ type: string;
227
+ }
228
+ interface Comment extends Node {
229
+ type: "comment";
230
+ content: string;
231
+ }
232
+ interface Text extends Node {
233
+ type: "text";
234
+ content: string;
235
+ }
236
+ interface Element extends Node {
237
+ type: "element";
238
+ tagName: string;
239
+ children: ChildNode[];
240
+ attributes: string[];
241
+ }
242
+ type ChildNode = Comment | Text | Element;
243
+ interface Options {
244
+ prerender: boolean;
245
+ debug: boolean;
246
+ html?: {
247
+ skipElements: Set<string>;
248
+ voidElements: Set<string>;
249
+ closingElements: Set<string>;
250
+ transformText?: (taroText: TaroText, text: Text) => TaroText;
251
+ transformElement?: (taroElement: TaroElement, element: Element) => TaroElement;
252
+ renderHTMLTag: boolean;
253
+ };
254
+ miniGlobal?: any;
255
+ }
256
+ type Func = (...args: any[]) => any;
257
+ type Ctx = Record<string, any>;
258
+ declare class ClassList extends Set<string> {
259
+ private el;
260
+ constructor(className: string, el: TaroElement);
261
+ get value(): string;
262
+ add(s: string): this;
263
+ get length(): number;
264
+ remove(s: string): void;
265
+ toggle(s: string): void;
266
+ replace(s1: string, s2: string): void;
267
+ contains(s: string): boolean;
268
+ toString(): string;
269
+ private _update;
270
+ }
271
+ declare class Style {
272
+ _pending: boolean;
273
+ _usedStyleProp: Set<string>;
274
+ _value: Partial<CSSStyleDeclaration>;
275
+ _element: TaroElement;
276
+ constructor(element: TaroElement);
277
+ private setCssVariables;
278
+ get cssText(): string;
279
+ set cssText(str: string);
280
+ setProperty(propertyName: string, value?: string | null): void;
281
+ removeProperty(propertyName: string): string;
282
+ getPropertyValue(propertyName: string): any;
283
+ }
284
+ declare class TaroElement extends TaroNode {
285
+ tagName: string;
286
+ props: Record<string, any>;
287
+ style: Style;
288
+ dataset: Record<string, unknown>;
289
+ innerHTML: string;
290
+ constructor();
291
+ private _stopPropagation;
292
+ get id(): string;
293
+ set id(val: string);
294
+ get className(): string;
295
+ set className(val: string);
296
+ get cssText(): string;
297
+ get classList(): ClassList;
298
+ get children(): TaroElement[];
299
+ get attributes(): Attributes[];
300
+ get textContent(): string;
301
+ set textContent(text: string);
302
+ hasAttribute(qualifiedName: string): boolean;
303
+ hasAttributes(): boolean;
304
+ get focus(): () => void;
305
+ // 兼容 Vue3,详情请见:https://github.com/NervJS/taro/issues/10579
306
+ set focus(value: () => void);
307
+ blur(): void;
308
+ setAttribute(qualifiedName: string, value: any): void;
309
+ removeAttribute(qualifiedName: string): void;
310
+ getAttribute(qualifiedName: string): string;
311
+ getElementsByTagName(tagName: string): TaroElement[];
312
+ getElementsByClassName(className: string): TaroElement[];
313
+ dispatchEvent(event: TaroEvent): boolean;
314
+ addEventListener(type: any, handler: any, options: any): void;
315
+ removeEventListener(type: any, handler: any, sideEffect?: boolean): void;
316
+ static extend(methodName: string, options: Func | Record<string, any>): void;
317
+ }
318
+ declare function getComputedStyle(element: TaroElement): Style;
319
+ declare const navigator: any;
320
+ // https://github.com/myrne/performance-now
321
+ declare let now: () => number;
322
+ // https://gist.github.com/paulirish/1579671
323
+ // https://gist.github.com/jalbam/5fe05443270fa6d8136238ec72accbc0
324
+ declare const raf: typeof requestAnimationFrame | ((callback: any) => NodeJS.Timeout);
325
+ declare const caf: typeof cancelAnimationFrame;
326
+ declare let window: any;
327
+ // for Vue3
328
+ declare class SVGElement extends TaroElement {
329
+ }
330
+ /**
331
+ * A MutationRecord represents an individual DOM mutation.
332
+ * It is the object that is passed to MutationObserver's callback.
333
+ * @see https://dom.spec.whatwg.org/#interface-mutationrecord
334
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationRecord
335
+ */
336
+ interface MutationRecord {
337
+ readonly target: TaroNode;
338
+ readonly addedNodes?: TaroNode[];
339
+ readonly removedNodes?: TaroNode[];
340
+ readonly previousSibling?: TaroNode | null;
341
+ readonly nextSibling?: TaroNode | null;
342
+ readonly attributeName?: string | null;
343
+ readonly attributeNamespace?: string | null;
344
+ oldValue?: string | null;
345
+ // extended
346
+ readonly type: MutationRecordType;
347
+ readonly value?: string | null;
348
+ }
349
+ declare const enum MutationRecordType {
350
+ ATTRIBUTES = "attributes",
351
+ CHARACTER_DATA = "characterData",
352
+ CHILD_LIST = "childList"
353
+ }
354
+ type MutationCallback = (mutations: MutationRecord[]) => any;
355
+ /**
356
+ * @see https://dom.spec.whatwg.org/#dictdef-mutationobserverinit
357
+ */
358
+ interface MutationObserverInit {
359
+ attributeFilter?: string[];
360
+ attributeOldValue?: boolean;
361
+ attributes?: boolean;
362
+ characterData?: boolean;
363
+ characterDataOldValue?: boolean;
364
+ childList?: boolean;
365
+ subtree?: boolean;
366
+ }
367
+ /**
368
+ * The MutationObserver provides the ability
369
+ * to watch for changes being made to the DOM tree.
370
+ * It will invoke a specified callback function
371
+ * when DOM changes occur.
372
+ * @see https://dom.spec.whatwg.org/#mutationobserver
373
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
374
+ */
375
+ declare class MutationObserverImpl {
376
+ callback: MutationCallback;
377
+ target: TaroNode | null;
378
+ options: MutationObserverInit;
379
+ records: MutationRecord[];
380
+ constructor(callback: MutationCallback);
381
+ /**
382
+ * Configures the MutationObserver
383
+ * to begin receiving notifications
384
+ * through its callback function
385
+ * when DOM changes matching the given options occur.
386
+ *
387
+ * Options matching is to be implemented.
388
+ */
389
+ observe(target: TaroNode, options?: MutationObserverInit): void;
390
+ /**
391
+ * Stop the MutationObserver instance
392
+ * from receiving further notifications
393
+ * until and unless observe() is called again.
394
+ */
395
+ disconnect(): void;
396
+ /**
397
+ * Removes all pending notifications
398
+ * from the MutationObserver's notification queue
399
+ * and returns them in a new Array of MutationRecord objects.
400
+ */
401
+ takeRecords(): MutationRecord[];
402
+ }
403
+ declare class MutationObserver {
404
+ core: Pick<MutationObserverImpl, "observe" | "disconnect" | "takeRecords">;
405
+ constructor(callback: MutationCallback);
406
+ observe(...args: [
407
+ TaroNode,
408
+ MutationObserverInit?
409
+ ]): void;
410
+ disconnect(): void;
411
+ takeRecords(): MutationRecord[];
412
+ static record(record: MutationRecord): void;
413
+ }
414
+ interface Instance<T = Record<string, any>> extends Component<T>, Show, PageInstance {
415
+ tid?: string;
416
+ $forceUpdate?(): void;
417
+ $nextTick?(cb: () => void): void;
418
+ $options: Instance;
419
+ }
420
+ interface VueAppInstance extends ComponentOptions<VueCtor> {
421
+ $options: AppInstance;
422
+ }
423
+ type VueInstance<M = Record<string, any>, P = Record<string, any>> = CombinedVueInstance<VueCtor, Record<string, any>, M, P, Record<never, any>> & VueInternal;
424
+ interface VueInternal {
425
+ _render(): VNode;
426
+ _update(vnode: VNode, hyrate: boolean): void;
427
+ }
428
+ interface PageProps {
429
+ tid?: string;
430
+ }
431
+ interface ReactPageComponent<T = PageProps> extends ComponentClass<T>, PageInstance {
432
+ }
433
+ interface ReactPageInstance<T = PageProps> extends Component<T>, PageInstance {
434
+ componentDidShow?(): void;
435
+ componentDidHide?(): void;
436
+ }
437
+ interface ReactAppInstance<T = AppInstance> extends Component<T>, AppInstance {
438
+ }
439
+ interface PageLifeCycle extends Show {
440
+ onPullDownRefresh?(): void;
441
+ onReachBottom?(): void;
442
+ onPageScroll?(obj: {
443
+ scrollTop: number;
444
+ }): void;
445
+ onShareAppMessage?(obj: {
446
+ from: string;
447
+ target?: TaroElement;
448
+ webViewUrl: string;
449
+ }): void;
450
+ onResize?(options: unknown): void;
451
+ onTabItemTap?(obj: {
452
+ index: string;
453
+ pagePath: string;
454
+ text: string;
455
+ }): void;
456
+ onTitleClick?(): void;
457
+ onOptionMenuClick?(): void;
458
+ onPopMenuClick?(): void;
459
+ onReady?(): void;
460
+ onPullIntercept?(): void;
461
+ onShareTimeline?(): void;
462
+ onAddToFavorites?(): void;
463
+ onSaveExitState?(): void;
464
+ eh?(event: MpEvent): void;
465
+ onLoad?(options: Record<string, unknown>, cb?: Func): void;
466
+ onUnload?(): void;
467
+ }
468
+ interface PageInstance extends PageLifeCycle {
469
+ /** 页面的初始数据 */
470
+ data?: Record<string, unknown>;
471
+ /** 页面路径 */
472
+ path?: string;
473
+ /** 页面的组件选项 */
474
+ options?: Record<string, unknown>;
475
+ }
476
+ interface Show {
477
+ componentDidShow?(): void;
478
+ componentDidHide?(): void;
479
+ onShow?(): void;
480
+ onHide?(): void;
481
+ }
482
+ interface AppInstance extends Show {
483
+ onLaunch?(options?: Record<string, unknown>): void;
484
+ mount?(component: React.ComponentClass | ComponentOptions<VueCtor> | Vue3Component, id: string, cb: (...args: any[]) => void): void;
485
+ mount?(component: React.ComponentClass | ComponentOptions<VueCtor> | Vue3Component, id: string, cb: () => void): void;
486
+ componentDidShow?(options?: Record<string, unknown>): void;
487
+ onShow?(options?: Record<string, unknown>): void;
488
+ unmount?(id: string): void;
489
+ unmount?(id: string, cb: () => void): void;
490
+ onError?(error: string): void;
491
+ onPageNotFound?(res: any): void;
492
+ taroGlobalData?: Record<any, any>;
493
+ }
494
+ interface Router {
495
+ params: Record<string, unknown>;
496
+ path: string;
497
+ $taroPath: string;
498
+ onReady: string;
499
+ onHide: string;
500
+ onShow: string;
501
+ exitState?: any;
502
+ }
503
+ interface Current {
504
+ app: AppInstance | null;
505
+ router: Router | null;
506
+ page: PageInstance | null;
507
+ preloadData?: any;
508
+ }
509
+ declare const Current: Current;
510
+ declare const getCurrentInstance: () => Current;
511
+ interface IEventSource extends Map<string | undefined | null, TaroNode> {
512
+ removeNode(child: TaroNode): void;
513
+ removeNodeTree(child: TaroNode): void;
514
+ }
515
+ declare const eventSource: IEventSource;
516
+ declare function injectPageInstance(inst: Instance<PageProps>, id: string): void;
517
+ declare function getPageInstance(id: string): Instance | undefined;
518
+ declare function addLeadingSlash(path?: string): string;
519
+ declare function safeExecute(path: string, lifecycle: string, ...args: unknown[]): any;
520
+ declare function stringify(obj?: Record<string, unknown>): string;
521
+ declare function createPageConfig(component: any, pageName?: string, data?: Record<string, unknown>, pageConfig?: PageConfig): PageInstance;
522
+ declare function createComponentConfig(component: React.ComponentClass, componentName?: string, data?: Record<string, unknown>): any;
523
+ declare function createRecursiveComponentConfig(componentName?: string): any;
524
+ declare const eventCenter: Events;
525
+ type EventsType = typeof Events;
526
+ /**
527
+ * React also has a fancy function's name for this: `hydrate()`.
528
+ * You may have been heard `hydrate` as a SSR-related function,
529
+ * actually, `hydrate` basicly do the `render()` thing, but ignore some properties,
530
+ * it's a vnode traverser and modifier: that's exactly what Taro's doing in here.
531
+ */
532
+ declare function hydrate(node: TaroElement | TaroText): MiniData;
533
+ declare const nextTick: (cb: Func, ctx?: Record<string, any> | undefined) => void;
534
+ declare const options: Options;
535
+ declare const incrementId: () => () => string;
536
+ export { hooks } from '@tarojs/shared';
537
+ export { document, getComputedStyle, navigator, caf as cancelAnimationFrame, now, raf as requestAnimationFrame, window, TaroElement, createEvent, eventHandler, TaroEvent, FormElement, TaroNode, TaroRootElement, Style, SVGElement, TaroText, MutationObserver, Current, getCurrentInstance, eventSource, addLeadingSlash, createComponentConfig, createPageConfig, createRecursiveComponentConfig, getPageInstance, injectPageInstance, safeExecute, stringify, EventsType, eventCenter, Events, hydrate, nextTick, options, incrementId, Instance, VueAppInstance, VueInstance, PageProps, ReactPageComponent, ReactPageInstance, ReactAppInstance, PageLifeCycle, PageInstance, AppInstance, Attributes, EventOptions, MpEvent, EventListenerOptions, AddEventListenerOptions, EventHandler, MpInstance, MiniElementData, MiniData, HydratedData, UpdatePayloadValue, DataTree, UpdatePayload, Options, Func, Ctx };