@tarojs/runtime 3.5.0-beta.1 → 3.5.0-beta.4

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/current.d.ts CHANGED
@@ -6,6 +6,7 @@ export interface Router {
6
6
  onReady: string;
7
7
  onHide: string;
8
8
  onShow: string;
9
+ exitState?: any;
9
10
  }
10
11
  interface Current {
11
12
  app: AppInstance | null;
@@ -33,6 +33,6 @@ export declare class TaroElement extends TaroNode {
33
33
  getElementsByClassName(className: string): TaroElement[];
34
34
  dispatchEvent(event: TaroEvent): boolean;
35
35
  addEventListener(type: any, handler: any, options: any): void;
36
- removeEventListener(type: any, handler: any): void;
36
+ removeEventListener(type: any, handler: any, sideEffect?: boolean): void;
37
37
  static extend(methodName: string, options: Func | Record<string, any>): void;
38
38
  }
@@ -1,6 +1,8 @@
1
1
  import type { EventOptions, MpEvent } from '../interface';
2
2
  import type { TaroElement } from './element';
3
3
  export declare class TaroEvent {
4
+ private cacheTarget;
5
+ private cacheCurrentTarget;
4
6
  type: string;
5
7
  bubbles: boolean;
6
8
  cancelable: boolean;
@@ -17,12 +17,8 @@ export declare class TaroNode extends TaroEventTarget {
17
17
  childNodes: TaroNode[];
18
18
  constructor();
19
19
  private hydrate;
20
- /**
21
- * like jQuery's $.empty()
22
- */
23
- private _empty;
24
20
  private updateChildNodes;
25
- protected get _root(): TaroRootElement | null;
21
+ get _root(): TaroRootElement | null;
26
22
  protected findIndex(refChild: TaroNode): number;
27
23
  get _path(): string;
28
24
  get nextSibling(): TaroNode | null;
@@ -7,7 +7,7 @@ export declare class TaroRootElement extends TaroElement {
7
7
  ctx: null | MpInstance;
8
8
  constructor();
9
9
  get _path(): string;
10
- protected get _root(): TaroRootElement;
10
+ get _root(): TaroRootElement;
11
11
  enqueueUpdate(payload: UpdatePayload): void;
12
12
  performUpdate(initRender?: boolean, prerender?: Func): void;
13
13
  enqueueUpdateCallback(cb: Func, ctx?: Record<string, any>): void;
@@ -1,5 +1,6 @@
1
1
  import { TaroElement } from './element';
2
2
  export declare class Style {
3
+ _pending: boolean;
3
4
  _usedStyleProp: Set<string>;
4
5
  _value: Partial<CSSStyleDeclaration>;
5
6
  _element: TaroElement;
@@ -1,9 +1,9 @@
1
+ import type { Component as Vue3Component } from '@vue/runtime-core';
1
2
  import type { Component, ComponentClass } from 'react';
2
3
  import VueCtor, { ComponentOptions, VNode } from 'vue';
3
- import type { Component as Vue3Component } from '@vue/runtime-core';
4
4
  import type { CombinedVueInstance } from 'vue/types/vue';
5
- import type { Func, MpEvent } from '../interface';
6
5
  import type { TaroElement } from '../dom/element';
6
+ import type { Func, MpEvent } from '../interface';
7
7
  export interface Instance<T = Record<string, any>> extends Component<T>, Show, PageInstance {
8
8
  tid?: string;
9
9
  $forceUpdate?(): void;
@@ -53,6 +53,7 @@ export interface PageLifeCycle extends Show {
53
53
  onPullIntercept?(): void;
54
54
  onShareTimeline?(): void;
55
55
  onAddToFavorites?(): void;
56
+ onSaveExitState?(): void;
56
57
  eh?(event: MpEvent): void;
57
58
  onLoad?(options: Record<string, unknown>, cb?: Func): void;
58
59
  onUnload?(): void;
@@ -79,6 +80,7 @@ export interface AppInstance extends Show {
79
80
  onShow?(options?: Record<string, unknown>): void;
80
81
  unmount?(id: string): void;
81
82
  unmount?(id: string, cb: () => void): void;
83
+ onError?(error: string): void;
82
84
  onPageNotFound?(res: any): void;
83
85
  taroGlobalData?: Record<any, any>;
84
86
  }
@@ -9,6 +9,7 @@ export interface MpInstance {
9
9
  $taroPath: string;
10
10
  __data__: any;
11
11
  data: any;
12
+ exitState?: any;
12
13
  selectComponent: (selector: string) => any;
13
14
  }
14
15
  export interface MiniElementData {