@tarojs/runtime 3.5.0-beta.3 → 3.5.0-beta.6
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/document.d.ts +2 -2
- package/dist/bom/getComputedStyle.d.ts +3 -3
- package/dist/bom/navigator.d.ts +1 -1
- package/dist/bom/raf.d.ts +5 -5
- package/dist/bom/window.d.ts +2 -2
- package/dist/constants/index.d.ts +47 -47
- package/dist/current.d.ts +19 -19
- package/dist/dom/class-list.d.ts +14 -14
- package/dist/dom/document.d.ts +20 -20
- package/dist/dom/element.d.ts +38 -38
- package/dist/dom/event-source.d.ts +7 -7
- package/dist/dom/event-target.d.ts +7 -7
- package/dist/dom/event.d.ts +22 -20
- package/dist/dom/form.d.ts +7 -7
- package/dist/dom/node.d.ts +75 -75
- package/dist/dom/node_types.d.ts +10 -10
- package/dist/dom/root.d.ts +15 -15
- package/dist/dom/style.d.ts +14 -14
- package/dist/dom/style_properties.d.ts +3 -3
- package/dist/dom/svg.d.ts +3 -3
- package/dist/dom/text.d.ts +14 -14
- package/dist/dom/tree.d.ts +4 -4
- package/dist/dom-external/element.d.ts +3 -3
- package/dist/dom-external/index.d.ts +1 -1
- package/dist/dom-external/inner-html/html.d.ts +2 -2
- package/dist/dom-external/inner-html/parser.d.ts +25 -25
- package/dist/dom-external/inner-html/scaner.d.ts +30 -30
- package/dist/dom-external/inner-html/style.d.ts +27 -27
- package/dist/dom-external/inner-html/tags.d.ts +8 -8
- package/dist/dom-external/inner-html/utils.d.ts +1 -1
- package/dist/dom-external/mutation-observer/implements.d.ts +52 -52
- package/dist/dom-external/mutation-observer/index.d.ts +13 -13
- package/dist/dom-external/mutation-observer/record.d.ts +24 -24
- package/dist/dom-external/node.d.ts +11 -11
- package/dist/dsl/common.d.ts +15 -15
- package/dist/dsl/instance.d.ts +85 -87
- package/dist/emitter/emitter.d.ts +4 -4
- package/dist/env.d.ts +7 -7
- package/dist/hydrate.d.ts +10 -10
- package/dist/index.d.ts +26 -26
- package/dist/interface/element.d.ts +4 -4
- package/dist/interface/event-target.d.ts +10 -10
- package/dist/interface/event.d.ts +15 -15
- package/dist/interface/hydrate.d.ts +30 -30
- package/dist/interface/index.d.ts +7 -7
- package/dist/interface/node.d.ts +7 -7
- package/dist/interface/options.d.ts +16 -16
- package/dist/interface/utils.d.ts +2 -2
- package/dist/next-tick.d.ts +2 -2
- package/dist/options.d.ts +2 -2
- package/dist/perf.d.ts +7 -7
- package/dist/runtime.esm.d.ts +537 -0
- package/dist/runtime.esm.js +3136 -3119
- package/dist/runtime.esm.js.map +1 -1
- package/dist/utils/index.d.ts +23 -23
- package/package.json +9 -10
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const styleProperties: string[];
|
|
2
|
-
/** 非常用 style */
|
|
3
|
-
export { styleProperties };
|
|
1
|
+
declare const styleProperties: string[];
|
|
2
|
+
/** 非常用 style */
|
|
3
|
+
export { styleProperties };
|
package/dist/dom/svg.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { TaroElement } from './element';
|
|
2
|
-
export declare class SVGElement extends TaroElement {
|
|
3
|
-
}
|
|
1
|
+
import { TaroElement } from './element';
|
|
2
|
+
export declare class SVGElement extends TaroElement {
|
|
3
|
+
}
|
package/dist/dom/text.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { TaroNode } from './node';
|
|
2
|
-
import { NodeType } from './node_types';
|
|
3
|
-
export declare class TaroText extends TaroNode {
|
|
4
|
-
_value: string;
|
|
5
|
-
nodeType: NodeType;
|
|
6
|
-
nodeName: string;
|
|
7
|
-
constructor(value: any);
|
|
8
|
-
set textContent(text: string);
|
|
9
|
-
get textContent(): string;
|
|
10
|
-
set nodeValue(text: string);
|
|
11
|
-
get nodeValue(): string;
|
|
12
|
-
set data(text: string);
|
|
13
|
-
get data(): string;
|
|
14
|
-
}
|
|
1
|
+
import { TaroNode } from './node';
|
|
2
|
+
import { NodeType } from './node_types';
|
|
3
|
+
export declare class TaroText extends TaroNode {
|
|
4
|
+
_value: string;
|
|
5
|
+
nodeType: NodeType;
|
|
6
|
+
nodeName: string;
|
|
7
|
+
constructor(value: any);
|
|
8
|
+
set textContent(text: string);
|
|
9
|
+
get textContent(): string;
|
|
10
|
+
set nodeValue(text: string);
|
|
11
|
+
get nodeValue(): string;
|
|
12
|
+
set data(text: string);
|
|
13
|
+
get data(): string;
|
|
14
|
+
}
|
package/dist/dom/tree.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TaroElement } from './element';
|
|
2
|
-
declare type Filter = (element: TaroElement) => boolean;
|
|
3
|
-
export declare function treeToArray(root: TaroElement, predict?: Filter): TaroElement[];
|
|
4
|
-
export {};
|
|
1
|
+
import type { TaroElement } from './element';
|
|
2
|
+
declare type Filter = (element: TaroElement) => boolean;
|
|
3
|
+
export declare function treeToArray(root: TaroElement, predict?: Filter): TaroElement[];
|
|
4
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TaroElement } from 'src/dom/element';
|
|
2
|
-
export declare function getBoundingClientRectImpl(this: TaroElement): Promise<null>;
|
|
3
|
-
export declare function getTemplateContent(ctx: TaroElement): TaroElement | undefined;
|
|
1
|
+
import type { TaroElement } from 'src/dom/element';
|
|
2
|
+
export declare function getBoundingClientRectImpl(this: TaroElement): Promise<null>;
|
|
3
|
+
export declare function getTemplateContent(ctx: TaroElement): TaroElement | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { TaroNode } from '../../dom/node';
|
|
2
|
-
export declare function setInnerHTML(element: TaroNode, html: string): void;
|
|
1
|
+
import type { TaroNode } from '../../dom/node';
|
|
2
|
+
export declare function setInnerHTML(element: TaroNode, html: string): void;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
interface Node {
|
|
4
|
-
type: string;
|
|
5
|
-
}
|
|
6
|
-
interface Comment extends Node {
|
|
7
|
-
type: 'comment';
|
|
8
|
-
content: string;
|
|
9
|
-
}
|
|
10
|
-
export interface Text extends Node {
|
|
11
|
-
type: 'text';
|
|
12
|
-
content: string;
|
|
13
|
-
}
|
|
14
|
-
export interface Element extends Node {
|
|
15
|
-
type: 'element';
|
|
16
|
-
tagName: string;
|
|
17
|
-
children: ChildNode[];
|
|
18
|
-
attributes: string[];
|
|
19
|
-
}
|
|
20
|
-
export interface ParsedTaroElement extends TaroElement {
|
|
21
|
-
h5tagName?: string;
|
|
22
|
-
}
|
|
23
|
-
declare type ChildNode = Comment | Text | Element;
|
|
24
|
-
export declare function parser(html: string, document: TaroDocument): (
|
|
25
|
-
export {};
|
|
1
|
+
import type { TaroDocument } from '../../dom/document';
|
|
2
|
+
import type { TaroElement } from '../../dom/element';
|
|
3
|
+
interface Node {
|
|
4
|
+
type: string;
|
|
5
|
+
}
|
|
6
|
+
interface Comment extends Node {
|
|
7
|
+
type: 'comment';
|
|
8
|
+
content: string;
|
|
9
|
+
}
|
|
10
|
+
export interface Text extends Node {
|
|
11
|
+
type: 'text';
|
|
12
|
+
content: string;
|
|
13
|
+
}
|
|
14
|
+
export interface Element extends Node {
|
|
15
|
+
type: 'element';
|
|
16
|
+
tagName: string;
|
|
17
|
+
children: ChildNode[];
|
|
18
|
+
attributes: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface ParsedTaroElement extends TaroElement {
|
|
21
|
+
h5tagName?: string;
|
|
22
|
+
}
|
|
23
|
+
declare type ChildNode = Comment | Text | Element;
|
|
24
|
+
export declare function parser(html: string, document: TaroDocument): (import("../..").TaroText | TaroElement)[];
|
|
25
|
+
export {};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
interface Position {
|
|
2
|
-
index: number;
|
|
3
|
-
column: number;
|
|
4
|
-
line: number;
|
|
5
|
-
}
|
|
6
|
-
export interface Token {
|
|
7
|
-
type: string;
|
|
8
|
-
content?: string;
|
|
9
|
-
position?: {
|
|
10
|
-
start?: Position;
|
|
11
|
-
end?: Position;
|
|
12
|
-
};
|
|
13
|
-
close?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export declare class Scaner {
|
|
16
|
-
private tokens;
|
|
17
|
-
private position;
|
|
18
|
-
private html;
|
|
19
|
-
constructor(html: string);
|
|
20
|
-
scan(): Token[];
|
|
21
|
-
private scanText;
|
|
22
|
-
private scanComment;
|
|
23
|
-
private scanTag;
|
|
24
|
-
private scanTagStart;
|
|
25
|
-
private scanTagEnd;
|
|
26
|
-
private scanTagName;
|
|
27
|
-
private scanAttrs;
|
|
28
|
-
private scanSkipTag;
|
|
29
|
-
}
|
|
30
|
-
export {};
|
|
1
|
+
interface Position {
|
|
2
|
+
index: number;
|
|
3
|
+
column: number;
|
|
4
|
+
line: number;
|
|
5
|
+
}
|
|
6
|
+
export interface Token {
|
|
7
|
+
type: string;
|
|
8
|
+
content?: string;
|
|
9
|
+
position?: {
|
|
10
|
+
start?: Position;
|
|
11
|
+
end?: Position;
|
|
12
|
+
};
|
|
13
|
+
close?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare class Scaner {
|
|
16
|
+
private tokens;
|
|
17
|
+
private position;
|
|
18
|
+
private html;
|
|
19
|
+
constructor(html: string);
|
|
20
|
+
scan(): Token[];
|
|
21
|
+
private scanText;
|
|
22
|
+
private scanComment;
|
|
23
|
+
private scanTag;
|
|
24
|
+
private scanTagStart;
|
|
25
|
+
private scanTagEnd;
|
|
26
|
+
private scanTagName;
|
|
27
|
+
private scanAttrs;
|
|
28
|
+
private scanSkipTag;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import type { ParsedTaroElement } from './parser';
|
|
2
|
-
interface ISelector {
|
|
3
|
-
isChild: boolean;
|
|
4
|
-
isGeneralSibling: boolean;
|
|
5
|
-
isAdjacentSibling: boolean;
|
|
6
|
-
tag: string | null;
|
|
7
|
-
id: string | null;
|
|
8
|
-
class: string[];
|
|
9
|
-
attrs: {
|
|
10
|
-
all: boolean;
|
|
11
|
-
key: string;
|
|
12
|
-
value?: string | null;
|
|
13
|
-
}[];
|
|
14
|
-
}
|
|
15
|
-
interface IStyle {
|
|
16
|
-
content: string;
|
|
17
|
-
selectorList: ISelector[];
|
|
18
|
-
}
|
|
19
|
-
export default class StyleTagParser {
|
|
20
|
-
styles: IStyle[];
|
|
21
|
-
extractStyle(src: string): string;
|
|
22
|
-
stringToSelector(style: string): void;
|
|
23
|
-
parseSelector(src: string): ISelector[];
|
|
24
|
-
matchStyle(tagName: string, el: ParsedTaroElement, list: number[]): string;
|
|
25
|
-
matchCurrent(tagName: string, el: ParsedTaroElement, selector: ISelector): boolean;
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
1
|
+
import type { ParsedTaroElement } from './parser';
|
|
2
|
+
interface ISelector {
|
|
3
|
+
isChild: boolean;
|
|
4
|
+
isGeneralSibling: boolean;
|
|
5
|
+
isAdjacentSibling: boolean;
|
|
6
|
+
tag: string | null;
|
|
7
|
+
id: string | null;
|
|
8
|
+
class: string[];
|
|
9
|
+
attrs: {
|
|
10
|
+
all: boolean;
|
|
11
|
+
key: string;
|
|
12
|
+
value?: string | null;
|
|
13
|
+
}[];
|
|
14
|
+
}
|
|
15
|
+
interface IStyle {
|
|
16
|
+
content: string;
|
|
17
|
+
selectorList: ISelector[];
|
|
18
|
+
}
|
|
19
|
+
export default class StyleTagParser {
|
|
20
|
+
styles: IStyle[];
|
|
21
|
+
extractStyle(src: string): string;
|
|
22
|
+
stringToSelector(style: string): void;
|
|
23
|
+
parseSelector(src: string): ISelector[];
|
|
24
|
+
matchStyle(tagName: string, el: ParsedTaroElement, list: number[]): string;
|
|
25
|
+
matchCurrent(tagName: string, el: ParsedTaroElement, selector: ISelector): boolean;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare function makeMap(str: string, expectsLowerCase?: boolean): (key: string) => boolean;
|
|
2
|
-
export declare const specialMiniElements: {
|
|
3
|
-
img: string;
|
|
4
|
-
iframe: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const isMiniElements: (key: string) => boolean;
|
|
7
|
-
export declare const isInlineElements: (key: string) => boolean;
|
|
8
|
-
export declare const isBlockElements: (key: string) => boolean;
|
|
1
|
+
export declare function makeMap(str: string, expectsLowerCase?: boolean): (key: string) => boolean;
|
|
2
|
+
export declare const specialMiniElements: {
|
|
3
|
+
img: string;
|
|
4
|
+
iframe: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const isMiniElements: (key: string) => boolean;
|
|
7
|
+
export declare const isInlineElements: (key: string) => boolean;
|
|
8
|
+
export declare const isBlockElements: (key: string) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function unquote(str: string): string;
|
|
1
|
+
export declare function unquote(str: string): string;
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import type { TaroNode } from '../../dom/node';
|
|
2
|
-
import type { MutationRecord } from './record';
|
|
3
|
-
export declare type MutationCallback = (mutations: MutationRecord[]) => any;
|
|
4
|
-
/**
|
|
5
|
-
* @see https://dom.spec.whatwg.org/#dictdef-mutationobserverinit
|
|
6
|
-
*/
|
|
7
|
-
export interface MutationObserverInit {
|
|
8
|
-
attributeFilter?: string[];
|
|
9
|
-
attributeOldValue?: boolean;
|
|
10
|
-
attributes?: boolean;
|
|
11
|
-
characterData?: boolean;
|
|
12
|
-
characterDataOldValue?: boolean;
|
|
13
|
-
childList?: boolean;
|
|
14
|
-
subtree?: boolean;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* The MutationObserver provides the ability
|
|
18
|
-
* to watch for changes being made to the DOM tree.
|
|
19
|
-
* It will invoke a specified callback function
|
|
20
|
-
* when DOM changes occur.
|
|
21
|
-
* @see https://dom.spec.whatwg.org/#mutationobserver
|
|
22
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
|
|
23
|
-
*/
|
|
24
|
-
export declare class MutationObserverImpl {
|
|
25
|
-
callback: MutationCallback;
|
|
26
|
-
target: TaroNode | null;
|
|
27
|
-
options: MutationObserverInit;
|
|
28
|
-
records: MutationRecord[];
|
|
29
|
-
constructor(callback: MutationCallback);
|
|
30
|
-
/**
|
|
31
|
-
* Configures the MutationObserver
|
|
32
|
-
* to begin receiving notifications
|
|
33
|
-
* through its callback function
|
|
34
|
-
* when DOM changes matching the given options occur.
|
|
35
|
-
*
|
|
36
|
-
* Options matching is to be implemented.
|
|
37
|
-
*/
|
|
38
|
-
observe(target: TaroNode, options?: MutationObserverInit): void;
|
|
39
|
-
/**
|
|
40
|
-
* Stop the MutationObserver instance
|
|
41
|
-
* from receiving further notifications
|
|
42
|
-
* until and unless observe() is called again.
|
|
43
|
-
*/
|
|
44
|
-
disconnect(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Removes all pending notifications
|
|
47
|
-
* from the MutationObserver's notification queue
|
|
48
|
-
* and returns them in a new Array of MutationRecord objects.
|
|
49
|
-
*/
|
|
50
|
-
takeRecords(): MutationRecord[];
|
|
51
|
-
}
|
|
52
|
-
export declare function recordMutation(record: MutationRecord): void;
|
|
1
|
+
import type { TaroNode } from '../../dom/node';
|
|
2
|
+
import type { MutationRecord } from './record';
|
|
3
|
+
export declare type MutationCallback = (mutations: MutationRecord[]) => any;
|
|
4
|
+
/**
|
|
5
|
+
* @see https://dom.spec.whatwg.org/#dictdef-mutationobserverinit
|
|
6
|
+
*/
|
|
7
|
+
export interface MutationObserverInit {
|
|
8
|
+
attributeFilter?: string[];
|
|
9
|
+
attributeOldValue?: boolean;
|
|
10
|
+
attributes?: boolean;
|
|
11
|
+
characterData?: boolean;
|
|
12
|
+
characterDataOldValue?: boolean;
|
|
13
|
+
childList?: boolean;
|
|
14
|
+
subtree?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The MutationObserver provides the ability
|
|
18
|
+
* to watch for changes being made to the DOM tree.
|
|
19
|
+
* It will invoke a specified callback function
|
|
20
|
+
* when DOM changes occur.
|
|
21
|
+
* @see https://dom.spec.whatwg.org/#mutationobserver
|
|
22
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
|
|
23
|
+
*/
|
|
24
|
+
export declare class MutationObserverImpl {
|
|
25
|
+
callback: MutationCallback;
|
|
26
|
+
target: TaroNode | null;
|
|
27
|
+
options: MutationObserverInit;
|
|
28
|
+
records: MutationRecord[];
|
|
29
|
+
constructor(callback: MutationCallback);
|
|
30
|
+
/**
|
|
31
|
+
* Configures the MutationObserver
|
|
32
|
+
* to begin receiving notifications
|
|
33
|
+
* through its callback function
|
|
34
|
+
* when DOM changes matching the given options occur.
|
|
35
|
+
*
|
|
36
|
+
* Options matching is to be implemented.
|
|
37
|
+
*/
|
|
38
|
+
observe(target: TaroNode, options?: MutationObserverInit): void;
|
|
39
|
+
/**
|
|
40
|
+
* Stop the MutationObserver instance
|
|
41
|
+
* from receiving further notifications
|
|
42
|
+
* until and unless observe() is called again.
|
|
43
|
+
*/
|
|
44
|
+
disconnect(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Removes all pending notifications
|
|
47
|
+
* from the MutationObserver's notification queue
|
|
48
|
+
* and returns them in a new Array of MutationRecord objects.
|
|
49
|
+
*/
|
|
50
|
+
takeRecords(): MutationRecord[];
|
|
51
|
+
}
|
|
52
|
+
export declare function recordMutation(record: MutationRecord): void;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { TaroNode } from '../../dom/node';
|
|
2
|
-
import type { MutationCallback, MutationObserverInit } from './implements';
|
|
3
|
-
import { MutationObserverImpl } from './implements';
|
|
4
|
-
import { MutationRecord, MutationRecordType } from './record';
|
|
5
|
-
export declare class MutationObserver {
|
|
6
|
-
core: Pick<MutationObserverImpl, 'observe' | 'disconnect' | 'takeRecords'>;
|
|
7
|
-
constructor(callback: MutationCallback);
|
|
8
|
-
observe(...args: [TaroNode, MutationObserverInit?]): void;
|
|
9
|
-
disconnect(): void;
|
|
10
|
-
takeRecords(): MutationRecord[];
|
|
11
|
-
static record(record: MutationRecord): void;
|
|
12
|
-
}
|
|
13
|
-
export { MutationRecordType };
|
|
1
|
+
import type { TaroNode } from '../../dom/node';
|
|
2
|
+
import type { MutationCallback, MutationObserverInit } from './implements';
|
|
3
|
+
import { MutationObserverImpl } from './implements';
|
|
4
|
+
import { MutationRecord, MutationRecordType } from './record';
|
|
5
|
+
export declare class MutationObserver {
|
|
6
|
+
core: Pick<MutationObserverImpl, 'observe' | 'disconnect' | 'takeRecords'>;
|
|
7
|
+
constructor(callback: MutationCallback);
|
|
8
|
+
observe(...args: [TaroNode, MutationObserverInit?]): void;
|
|
9
|
+
disconnect(): void;
|
|
10
|
+
takeRecords(): MutationRecord[];
|
|
11
|
+
static record(record: MutationRecord): void;
|
|
12
|
+
}
|
|
13
|
+
export { MutationRecordType };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import type { TaroNode } from '../../dom/node';
|
|
2
|
-
/**
|
|
3
|
-
* A MutationRecord represents an individual DOM mutation.
|
|
4
|
-
* It is the object that is passed to MutationObserver's callback.
|
|
5
|
-
* @see https://dom.spec.whatwg.org/#interface-mutationrecord
|
|
6
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationRecord
|
|
7
|
-
*/
|
|
8
|
-
export interface MutationRecord {
|
|
9
|
-
readonly target: TaroNode;
|
|
10
|
-
readonly addedNodes?: TaroNode[];
|
|
11
|
-
readonly removedNodes?: TaroNode[];
|
|
12
|
-
readonly previousSibling?: TaroNode | null;
|
|
13
|
-
readonly nextSibling?: TaroNode | null;
|
|
14
|
-
readonly attributeName?: string | null;
|
|
15
|
-
readonly attributeNamespace?: string | null;
|
|
16
|
-
oldValue?: string | null;
|
|
17
|
-
readonly type: MutationRecordType;
|
|
18
|
-
readonly value?: string | null;
|
|
19
|
-
}
|
|
20
|
-
export declare const enum MutationRecordType {
|
|
21
|
-
ATTRIBUTES = "attributes",
|
|
22
|
-
CHARACTER_DATA = "characterData",
|
|
23
|
-
CHILD_LIST = "childList"
|
|
24
|
-
}
|
|
1
|
+
import type { TaroNode } from '../../dom/node';
|
|
2
|
+
/**
|
|
3
|
+
* A MutationRecord represents an individual DOM mutation.
|
|
4
|
+
* It is the object that is passed to MutationObserver's callback.
|
|
5
|
+
* @see https://dom.spec.whatwg.org/#interface-mutationrecord
|
|
6
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationRecord
|
|
7
|
+
*/
|
|
8
|
+
export interface MutationRecord {
|
|
9
|
+
readonly target: TaroNode;
|
|
10
|
+
readonly addedNodes?: TaroNode[];
|
|
11
|
+
readonly removedNodes?: TaroNode[];
|
|
12
|
+
readonly previousSibling?: TaroNode | null;
|
|
13
|
+
readonly nextSibling?: TaroNode | null;
|
|
14
|
+
readonly attributeName?: string | null;
|
|
15
|
+
readonly attributeNamespace?: string | null;
|
|
16
|
+
oldValue?: string | null;
|
|
17
|
+
readonly type: MutationRecordType;
|
|
18
|
+
readonly value?: string | null;
|
|
19
|
+
}
|
|
20
|
+
export declare const enum MutationRecordType {
|
|
21
|
+
ATTRIBUTES = "attributes",
|
|
22
|
+
CHARACTER_DATA = "characterData",
|
|
23
|
+
CHILD_LIST = "childList"
|
|
24
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { TaroNode } from 'src/dom/node';
|
|
2
|
-
export declare type IPosition = 'beforebegin' | 'afterbegin' | 'beforeend' | 'afterend';
|
|
3
|
-
/**
|
|
4
|
-
* An implementation of `Element.insertAdjacentHTML()`
|
|
5
|
-
* to support Vue 3 with a version of or greater than `vue@3.1.2`
|
|
6
|
-
*/
|
|
7
|
-
export declare function insertAdjacentHTML(this: TaroNode, position: IPosition, html: string): void;
|
|
8
|
-
export declare function cloneNode(this: TaroNode, isDeep?: boolean): any;
|
|
9
|
-
export declare function contains(this: TaroNode, node: TaroNode & {
|
|
10
|
-
id?: string;
|
|
11
|
-
}): boolean;
|
|
1
|
+
import type { TaroNode } from 'src/dom/node';
|
|
2
|
+
export declare type IPosition = 'beforebegin' | 'afterbegin' | 'beforeend' | 'afterend';
|
|
3
|
+
/**
|
|
4
|
+
* An implementation of `Element.insertAdjacentHTML()`
|
|
5
|
+
* to support Vue 3 with a version of or greater than `vue@3.1.2`
|
|
6
|
+
*/
|
|
7
|
+
export declare function insertAdjacentHTML(this: TaroNode, position: IPosition, html: string): void;
|
|
8
|
+
export declare function cloneNode(this: TaroNode, isDeep?: boolean): any;
|
|
9
|
+
export declare function contains(this: TaroNode, node: TaroNode & {
|
|
10
|
+
id?: string;
|
|
11
|
+
}): boolean;
|
package/dist/dsl/common.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { PageConfig } from '@tarojs/taro';
|
|
3
|
-
import type { Instance, PageInstance, PageProps } from './instance';
|
|
4
|
-
export declare function injectPageInstance(inst: Instance<PageProps>, id: string): void;
|
|
5
|
-
export declare function getPageInstance(id: string): Instance | undefined;
|
|
6
|
-
export declare function addLeadingSlash(path?: string): string;
|
|
7
|
-
export declare function safeExecute(path: string, lifecycle: string, ...args: unknown[]): any;
|
|
8
|
-
export declare function stringify(obj?: Record<string, unknown>): string;
|
|
9
|
-
export declare function getPath(id: string, options?: Record<string, unknown>): string;
|
|
10
|
-
export declare function getOnReadyEventKey(path: string): string;
|
|
11
|
-
export declare function getOnShowEventKey(path: string): string;
|
|
12
|
-
export declare function getOnHideEventKey(path: string): string;
|
|
13
|
-
export declare function createPageConfig(component: any, pageName?: string, data?: Record<string, unknown>, pageConfig?: PageConfig): PageInstance;
|
|
14
|
-
export declare function createComponentConfig(component: React.ComponentClass, componentName?: string, data?: Record<string, unknown>): any;
|
|
15
|
-
export declare function createRecursiveComponentConfig(componentName?: string): any;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { PageConfig } from '@tarojs/taro';
|
|
3
|
+
import type { Instance, PageInstance, PageProps } from './instance';
|
|
4
|
+
export declare function injectPageInstance(inst: Instance<PageProps>, id: string): void;
|
|
5
|
+
export declare function getPageInstance(id: string): Instance | undefined;
|
|
6
|
+
export declare function addLeadingSlash(path?: string): string;
|
|
7
|
+
export declare function safeExecute(path: string, lifecycle: string, ...args: unknown[]): any;
|
|
8
|
+
export declare function stringify(obj?: Record<string, unknown>): string;
|
|
9
|
+
export declare function getPath(id: string, options?: Record<string, unknown>): string;
|
|
10
|
+
export declare function getOnReadyEventKey(path: string): string;
|
|
11
|
+
export declare function getOnShowEventKey(path: string): string;
|
|
12
|
+
export declare function getOnHideEventKey(path: string): string;
|
|
13
|
+
export declare function createPageConfig(component: any, pageName?: string, data?: Record<string, unknown>, pageConfig?: PageConfig): PageInstance;
|
|
14
|
+
export declare function createComponentConfig(component: React.ComponentClass, componentName?: string, data?: Record<string, unknown>): any;
|
|
15
|
+
export declare function createRecursiveComponentConfig(componentName?: string): any;
|