@tarojs/shared 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/index.d.ts +252 -7
- package/dist/index.js +1123 -1137
- package/dist/index.js.map +1 -1
- package/dist/shared.esm.d.ts +252 -0
- package/dist/shared.esm.js +1123 -1123
- package/dist/shared.esm.js.map +1 -1
- package/dist/template.d.ts +112 -113
- package/dist/template.js +1111 -1111
- package/dist/template.js.map +1 -1
- package/package.json +6 -7
- package/dist/components.d.ts +0 -20
- package/dist/event-emitter.d.ts +0 -27
- package/dist/is.d.ts +0 -9
- package/dist/native-apis.d.ts +0 -16
- package/dist/runtime-hooks.d.ts +0 -119
- package/dist/shortcuts.d.ts +0 -10
- package/dist/utils.d.ts +0 -54
package/dist/template.d.ts
CHANGED
|
@@ -1,113 +1,112 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
protected
|
|
52
|
-
protected
|
|
53
|
-
protected
|
|
54
|
-
protected
|
|
55
|
-
protected
|
|
56
|
-
protected
|
|
57
|
-
protected
|
|
58
|
-
protected
|
|
59
|
-
protected
|
|
60
|
-
protected
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
protected
|
|
73
|
-
protected
|
|
74
|
-
protected
|
|
75
|
-
protected
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
protected
|
|
79
|
-
protected
|
|
80
|
-
protected
|
|
81
|
-
protected
|
|
82
|
-
protected
|
|
83
|
-
protected
|
|
84
|
-
protected
|
|
85
|
-
protected
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
protected
|
|
94
|
-
protected
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
private
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
protected
|
|
109
|
-
protected
|
|
110
|
-
protected
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
export { capitalize, internalComponents, Shortcuts, toCamelCase };
|
|
1
|
+
declare const internalComponents: Record<string, Record<string, string>>;
|
|
2
|
+
// 字符串简写
|
|
3
|
+
declare const enum Shortcuts {
|
|
4
|
+
Container = "container",
|
|
5
|
+
Childnodes = "cn",
|
|
6
|
+
Text = "v",
|
|
7
|
+
NodeType = "nt",
|
|
8
|
+
NodeName = "nn",
|
|
9
|
+
// Attrtibutes
|
|
10
|
+
Style = "st",
|
|
11
|
+
Class = "cl",
|
|
12
|
+
Src = "src"
|
|
13
|
+
}
|
|
14
|
+
declare function toCamelCase(s: string): string;
|
|
15
|
+
declare function capitalize(s: string): string;
|
|
16
|
+
interface Component {
|
|
17
|
+
nodeName: string;
|
|
18
|
+
nodeAlias: string;
|
|
19
|
+
attributes: Attributes;
|
|
20
|
+
}
|
|
21
|
+
interface Components {
|
|
22
|
+
[key: string]: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
interface ComponentConfig {
|
|
25
|
+
includes: Set<string>;
|
|
26
|
+
exclude: Set<string>;
|
|
27
|
+
thirdPartyComponents: Map<string, Set<string>>;
|
|
28
|
+
includeAll: boolean;
|
|
29
|
+
}
|
|
30
|
+
interface IAdapter {
|
|
31
|
+
if: string;
|
|
32
|
+
else: string;
|
|
33
|
+
elseif: string;
|
|
34
|
+
for: string;
|
|
35
|
+
forItem: string;
|
|
36
|
+
forIndex: string;
|
|
37
|
+
key: string;
|
|
38
|
+
xs?: string;
|
|
39
|
+
type: string;
|
|
40
|
+
}
|
|
41
|
+
type Attributes = Record<string, string>;
|
|
42
|
+
declare const styles: {
|
|
43
|
+
style: string;
|
|
44
|
+
class: string;
|
|
45
|
+
};
|
|
46
|
+
declare const events: {
|
|
47
|
+
bindtap: string;
|
|
48
|
+
};
|
|
49
|
+
declare class BaseTemplate {
|
|
50
|
+
protected exportExpr: string;
|
|
51
|
+
protected isSupportRecursive: boolean;
|
|
52
|
+
protected supportXS: boolean;
|
|
53
|
+
protected miniComponents: Components;
|
|
54
|
+
protected thirdPartyPatcher: Record<string, Record<string, string>>;
|
|
55
|
+
protected componentsAlias: any;
|
|
56
|
+
protected modifyCompProps?: (compName: string, target: Record<string, string>) => Record<string, string>;
|
|
57
|
+
protected modifyLoopBody?: (child: string, nodeName: string) => string;
|
|
58
|
+
protected modifyLoopContainer?: (children: string, nodeName: string) => string;
|
|
59
|
+
protected modifyTemplateResult?: (res: string, nodeName: string, level: number, children: string) => string;
|
|
60
|
+
protected modifyThirdPartyLoopBody?: (child: string, nodeName: string) => string;
|
|
61
|
+
Adapter: IAdapter;
|
|
62
|
+
/** 组件列表 */
|
|
63
|
+
internalComponents: Record<string, Record<string, string>>;
|
|
64
|
+
/** 可以 focus 聚焦的组件 */
|
|
65
|
+
focusComponents: Set<string>;
|
|
66
|
+
/** 不需要渲染子节点的元素 */
|
|
67
|
+
voidElements: Set<string>;
|
|
68
|
+
/** 可以递归调用自身的组件 */
|
|
69
|
+
nestElements: Map<string, number>;
|
|
70
|
+
private buildAttribute;
|
|
71
|
+
protected replacePropName(name: string, value: string, _componentName?: string, _componentAlias?: any): string;
|
|
72
|
+
protected createMiniComponents(components: Components): Components;
|
|
73
|
+
protected buildBaseTemplate(): string;
|
|
74
|
+
protected buildThirdPartyAttr(attrs: Set<string>, patcher?: Record<string, string>): string;
|
|
75
|
+
protected buildComponentTemplate(comp: Component, level: number): string;
|
|
76
|
+
private getChildren;
|
|
77
|
+
protected buildFocusComponentTemplte(comp: Component, level: number): string;
|
|
78
|
+
protected buildStandardComponentTemplate(comp: Component, level: number): string;
|
|
79
|
+
protected buildPlainTextTemplate(level: number): string;
|
|
80
|
+
protected buildThirdPartyTemplate(level: number, componentConfig: ComponentConfig): string;
|
|
81
|
+
protected buildContainerTemplate(level: number, restart?: boolean): string;
|
|
82
|
+
protected dataKeymap(keymap: string): string;
|
|
83
|
+
protected getEvents(): any;
|
|
84
|
+
protected getAttrValue(value: string, _key: string, _nodeName: string): string;
|
|
85
|
+
protected buildXsTemplate(): string;
|
|
86
|
+
buildPageTemplate: (baseTempPath: string) => string;
|
|
87
|
+
buildBaseComponentTemplate: (ext: string) => string;
|
|
88
|
+
buildCustomComponentTemplate: (ext: string) => string;
|
|
89
|
+
buildXScript: () => string;
|
|
90
|
+
mergeComponents(ctx: any, patch: Record<string, Record<string, string>>): void;
|
|
91
|
+
mergeThirdPartyComponents(patch: Record<string, Record<string, string>>): void;
|
|
92
|
+
protected buildXSTmplName(): string;
|
|
93
|
+
protected buildXSTepFocus(nn: string): string;
|
|
94
|
+
protected buildXSTmpExtra(): string;
|
|
95
|
+
}
|
|
96
|
+
declare class RecursiveTemplate extends BaseTemplate {
|
|
97
|
+
isSupportRecursive: boolean;
|
|
98
|
+
buildTemplate: (componentConfig: ComponentConfig) => string;
|
|
99
|
+
}
|
|
100
|
+
declare class UnRecursiveTemplate extends BaseTemplate {
|
|
101
|
+
isSupportRecursive: boolean;
|
|
102
|
+
private _baseLevel;
|
|
103
|
+
private componentConfig;
|
|
104
|
+
set baseLevel(lv: number);
|
|
105
|
+
get baseLevel(): number;
|
|
106
|
+
buildTemplate: (componentConfig: ComponentConfig) => string;
|
|
107
|
+
protected buildFloor(level: number, components: string[], restart?: boolean): string;
|
|
108
|
+
protected buildOptimizeFloor(level: number, components: string[], restart?: boolean): string;
|
|
109
|
+
protected buildXSTmplName(): string;
|
|
110
|
+
protected buildXSTmpExtra(): string;
|
|
111
|
+
}
|
|
112
|
+
export { IAdapter, Attributes, styles, events, BaseTemplate, RecursiveTemplate, UnRecursiveTemplate, capitalize, internalComponents, Shortcuts, toCamelCase };
|