@tarojs/runtime 4.0.13-alpha.0 → 4.0.13
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/bom/URL.d.ts +3 -6
- package/dist/bom/URLSearchParams.d.ts +1 -2
- package/dist/bom/document.d.ts +2 -3
- package/dist/bom/getComputedStyle.d.ts +4 -5
- package/dist/bom/history.d.ts +5 -7
- package/dist/bom/location.d.ts +3 -5
- package/dist/bom/navigator.d.ts +1 -2
- package/dist/bom/raf.d.ts +2 -2
- package/dist/bom/window.d.ts +8 -9
- package/dist/constants/index.d.ts +52 -53
- package/dist/current.d.ts +5 -5
- package/dist/dom/anchor-element.d.ts +2 -3
- package/dist/dom/class-list.d.ts +2 -3
- package/dist/dom/document.d.ts +6 -10
- package/dist/dom/element.d.ts +6 -7
- package/dist/dom/event-source.d.ts +3 -3
- package/dist/dom/event-target.d.ts +2 -3
- package/dist/dom/event.d.ts +5 -6
- package/dist/dom/form.d.ts +3 -4
- package/dist/dom/node.d.ts +8 -39
- package/dist/{node_types-9ac5b4dd.d.ts → dom/node_types.d.ts} +1 -2
- package/dist/dom/root.d.ts +3 -4
- package/dist/dom/style.d.ts +2 -3
- package/dist/dom/style_properties.js +1 -0
- package/dist/dom/style_properties.js.map +1 -1
- package/dist/dom/svg.d.ts +2 -3
- package/dist/dom/text.d.ts +3 -4
- package/dist/dom/transfer.d.ts +2 -3
- package/dist/dom/tree.d.ts +3 -3
- package/dist/dom-external/element.d.ts +3 -4
- package/dist/dom-external/inner-html/html.d.ts +2 -3
- package/dist/dom-external/inner-html/parser.d.ts +7 -7
- package/dist/dom-external/inner-html/scaner.d.ts +3 -3
- package/dist/dom-external/inner-html/style.d.ts +3 -3
- package/dist/dom-external/inner-html/tags.d.ts +5 -6
- package/dist/dom-external/inner-html/utils.d.ts +1 -2
- package/dist/dom-external/mutation-observer/implements.d.ts +6 -25
- package/dist/dom-external/mutation-observer/index.d.ts +6 -5
- package/dist/{record-32b054d8.d.ts → dom-external/mutation-observer/record.d.ts} +3 -4
- package/dist/dom-external/node.d.ts +5 -6
- package/dist/dsl/common.d.ts +14 -15
- package/dist/{instance-530729bd.d.ts → dsl/instance.d.ts} +13 -14
- package/dist/emitter/emitter.d.ts +2 -2
- package/dist/env.d.ts +2 -2
- package/dist/hydrate.d.ts +4 -5
- package/dist/index.cjs.js +5 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +33 -32
- package/dist/interface/element.d.ts +4 -0
- package/dist/interface/event-target.d.ts +11 -0
- package/dist/interface/event.d.ts +15 -0
- package/dist/interface/hydrate.d.ts +29 -0
- package/dist/interface/index.d.ts +7 -0
- package/dist/interface/node.d.ts +7 -0
- package/dist/{options-530729bd.d.ts → interface/options.d.ts} +4 -5
- package/dist/interface/utils.d.ts +2 -0
- package/dist/next-tick.d.ts +2 -3
- package/dist/options.d.ts +2 -3
- package/dist/perf.d.ts +2 -2
- package/dist/polyfill/array.d.ts +2 -3
- package/dist/polyfill/intersection-observer.d.ts +1 -2
- package/dist/polyfill/object.d.ts +3 -4
- package/dist/runtime.esm.js +1 -0
- package/dist/runtime.esm.js.map +1 -1
- package/dist/utils/cache.d.ts +1 -2
- package/dist/utils/index.d.ts +17 -18
- package/dist/utils/lodash.d.ts +2 -3
- package/dist/utils/router.d.ts +7 -8
- package/package.json +4 -4
- package/dist/index-26658829.d.ts +0 -23
- package/dist/index.cjs.d.ts +0 -813
- package/dist/runtime.esm.d.ts +0 -813
package/dist/index.d.ts
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
|
-
import
|
|
1
|
+
import './dom-external';
|
|
2
|
+
import env from './env';
|
|
2
3
|
export { hooks } from '@tarojs/shared';
|
|
3
|
-
export { taroDocumentProvider as document } from
|
|
4
|
-
export { taroGetComputedStyleProvider as getComputedStyle } from
|
|
5
|
-
export { History } from
|
|
6
|
-
export { Location } from
|
|
7
|
-
export { nav as navigator } from
|
|
8
|
-
export { caf as cancelAnimationFrame, now, raf as requestAnimationFrame } from
|
|
9
|
-
export { parseUrl, TaroURLProvider as URL } from
|
|
10
|
-
export { URLSearchParams } from
|
|
11
|
-
export { taroHistoryProvider as history, taroLocationProvider as location, taroWindowProvider as window } from
|
|
12
|
-
export { TaroElement } from
|
|
13
|
-
export { createEvent, eventHandler, TaroEvent } from
|
|
14
|
-
export { FormElement } from
|
|
15
|
-
export { TaroNode } from
|
|
16
|
-
export { TaroRootElement } from
|
|
17
|
-
export { Style } from
|
|
18
|
-
export { SVGElement } from
|
|
19
|
-
export { TaroText } from
|
|
20
|
-
export { MutationObserver } from
|
|
4
|
+
export { taroDocumentProvider as document } from './bom/document';
|
|
5
|
+
export { taroGetComputedStyleProvider as getComputedStyle } from './bom/getComputedStyle';
|
|
6
|
+
export { History } from './bom/history';
|
|
7
|
+
export { Location } from './bom/location';
|
|
8
|
+
export { nav as navigator } from './bom/navigator';
|
|
9
|
+
export { caf as cancelAnimationFrame, now, raf as requestAnimationFrame } from './bom/raf';
|
|
10
|
+
export { parseUrl, TaroURLProvider as URL } from './bom/URL';
|
|
11
|
+
export { URLSearchParams } from './bom/URLSearchParams';
|
|
12
|
+
export { taroHistoryProvider as history, taroLocationProvider as location, taroWindowProvider as window } from './bom/window';
|
|
13
|
+
export { TaroElement } from './dom/element';
|
|
14
|
+
export { createEvent, eventHandler, TaroEvent } from './dom/event';
|
|
15
|
+
export { FormElement } from './dom/form';
|
|
16
|
+
export { TaroNode } from './dom/node';
|
|
17
|
+
export { TaroRootElement } from './dom/root';
|
|
18
|
+
export { Style } from './dom/style';
|
|
19
|
+
export { SVGElement } from './dom/svg';
|
|
20
|
+
export { TaroText } from './dom/text';
|
|
21
|
+
export { MutationObserver } from './dom-external/mutation-observer';
|
|
21
22
|
export { env };
|
|
22
|
-
export * from
|
|
23
|
-
export { Current, getCurrentInstance } from
|
|
24
|
-
export { eventSource } from
|
|
25
|
-
export { createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify } from
|
|
26
|
-
export * from
|
|
27
|
-
export { hydrate } from
|
|
28
|
-
export { nextTick } from
|
|
29
|
-
export { options } from
|
|
30
|
-
export * from
|
|
31
|
-
export * from
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
23
|
+
export * from './constants';
|
|
24
|
+
export { Current, getCurrentInstance } from './current';
|
|
25
|
+
export { eventSource } from './dom/event-source';
|
|
26
|
+
export { createComponentConfig, createPageConfig, createRecursiveComponentConfig, getOnHideEventKey, getOnReadyEventKey, getOnShowEventKey, getPageInstance, getPath, injectPageInstance, removePageInstance, safeExecute, stringify } from './dsl/common';
|
|
27
|
+
export * from './emitter/emitter';
|
|
28
|
+
export { hydrate } from './hydrate';
|
|
29
|
+
export { nextTick } from './next-tick';
|
|
30
|
+
export { options } from './options';
|
|
31
|
+
export * from './perf';
|
|
32
|
+
export * from './utils';
|
|
33
|
+
export * from './dsl/instance';
|
|
34
|
+
export * from './interface';
|
|
35
|
+
export * from './polyfill';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface EventListenerOptions {
|
|
2
|
+
capture?: boolean;
|
|
3
|
+
}
|
|
4
|
+
export interface AddEventListenerOptions extends EventListenerOptions {
|
|
5
|
+
once?: boolean;
|
|
6
|
+
passive?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface EventHandler<T = any, R = void> {
|
|
9
|
+
(...args: T[]): R;
|
|
10
|
+
_stop?: boolean;
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface EventOptions {
|
|
2
|
+
bubbles: boolean;
|
|
3
|
+
cancelable: boolean;
|
|
4
|
+
}
|
|
5
|
+
type Target = Record<string, unknown> & {
|
|
6
|
+
dataset: Record<string, unknown>;
|
|
7
|
+
id: string;
|
|
8
|
+
};
|
|
9
|
+
export interface MpEvent {
|
|
10
|
+
type: string;
|
|
11
|
+
detail: Record<string, unknown>;
|
|
12
|
+
target: Target;
|
|
13
|
+
currentTarget: Target;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Shortcuts } from '@tarojs/shared';
|
|
2
|
+
import type { PageConfig } from './utils';
|
|
3
|
+
export interface MpInstance {
|
|
4
|
+
config: PageConfig;
|
|
5
|
+
setData: (data: unknown, cb: () => void) => void;
|
|
6
|
+
route?: string;
|
|
7
|
+
__route__: string;
|
|
8
|
+
$taroParams?: Record<string, unknown>;
|
|
9
|
+
$taroPath: string;
|
|
10
|
+
__data__: any;
|
|
11
|
+
data: any;
|
|
12
|
+
exitState?: any;
|
|
13
|
+
selectComponent: (selector: string) => any;
|
|
14
|
+
}
|
|
15
|
+
export interface MiniElementData {
|
|
16
|
+
[Shortcuts.Childnodes]?: MiniData[];
|
|
17
|
+
[Shortcuts.NodeName]: string;
|
|
18
|
+
[Shortcuts.Class]?: string;
|
|
19
|
+
[Shortcuts.Style]?: string;
|
|
20
|
+
uid?: string;
|
|
21
|
+
sid: string;
|
|
22
|
+
[key: string]: unknown;
|
|
23
|
+
}
|
|
24
|
+
export interface MiniTextData {
|
|
25
|
+
[Shortcuts.Text]: string;
|
|
26
|
+
[Shortcuts.NodeName]: string;
|
|
27
|
+
}
|
|
28
|
+
export type MiniData = MiniElementData | MiniTextData;
|
|
29
|
+
export type HydratedData = () => MiniData | MiniData[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HydratedData } from './index';
|
|
2
|
+
export type UpdatePayloadValue = string | boolean | HydratedData;
|
|
3
|
+
export type DataTree = Record<string, UpdatePayloadValue | ReturnType<HydratedData>>;
|
|
4
|
+
export interface UpdatePayload {
|
|
5
|
+
path: string;
|
|
6
|
+
value: UpdatePayloadValue;
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TaroElement } from
|
|
2
|
-
import { TaroText } from
|
|
3
|
-
import { Element, Text } from
|
|
4
|
-
interface Options {
|
|
1
|
+
import type { TaroElement } from '../dom/element';
|
|
2
|
+
import type { TaroText } from '../dom/text';
|
|
3
|
+
import type { Element, Text } from '../dom-external/inner-html/parser';
|
|
4
|
+
export interface Options {
|
|
5
5
|
prerender: boolean;
|
|
6
6
|
debug: boolean;
|
|
7
7
|
html?: {
|
|
@@ -14,4 +14,3 @@ interface Options {
|
|
|
14
14
|
};
|
|
15
15
|
miniGlobal?: any;
|
|
16
16
|
}
|
|
17
|
-
export { Options };
|
package/dist/next-tick.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { TFunc } from
|
|
2
|
-
declare const nextTick: (cb: TFunc, ctx?: Record<string, any>) => void;
|
|
3
|
-
export { nextTick };
|
|
1
|
+
import type { TFunc } from './interface';
|
|
2
|
+
export declare const nextTick: (cb: TFunc, ctx?: Record<string, any>) => void;
|
package/dist/options.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { Options } from
|
|
2
|
-
declare const options: Options;
|
|
3
|
-
export { options };
|
|
1
|
+
import type { Options } from './interface';
|
|
2
|
+
export declare const options: Options;
|
package/dist/perf.d.ts
CHANGED
package/dist/polyfill/array.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
declare function handleArrayFindPolyfill(): void;
|
|
2
|
-
declare function handleArrayIncludesPolyfill(): void;
|
|
3
|
-
export { handleArrayFindPolyfill, handleArrayIncludesPolyfill };
|
|
1
|
+
export declare function handleArrayFindPolyfill(): void;
|
|
2
|
+
export declare function handleArrayIncludesPolyfill(): void;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
declare function handleIntersectionObserverPolyfill(): void;
|
|
2
|
-
export { handleIntersectionObserverPolyfill };
|
|
1
|
+
export declare function handleIntersectionObserverPolyfill(): void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
declare function handleObjectAssignPolyfill(): void;
|
|
2
|
-
declare function handleObjectEntriesPolyfill(): void;
|
|
3
|
-
declare function handleObjectDefinePropertyPolyfill(): void;
|
|
4
|
-
export { handleObjectAssignPolyfill, handleObjectEntriesPolyfill, handleObjectDefinePropertyPolyfill };
|
|
1
|
+
export declare function handleObjectAssignPolyfill(): void;
|
|
2
|
+
export declare function handleObjectEntriesPolyfill(): void;
|
|
3
|
+
export declare function handleObjectDefinePropertyPolyfill(): void;
|