x-runtime-lib 0.8.28 → 0.8.31
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/composables/element/core/elementProperty.d.ts +4 -0
- package/dist/composables/element/index.d.ts +1 -1
- package/dist/element/_common/props/basic/v1/index.d.ts +2 -2
- package/dist/element/_common/props/border/v1/index.d.ts +2 -2
- package/dist/element/_common/props/color/v1/index.d.ts +2 -2
- package/dist/element/_common/props/legend/v1/index.d.ts +2 -2
- package/dist/element/_common/props/margin/v1/index.d.ts +2 -2
- package/dist/element/_common/props/padding/v1/index.d.ts +2 -2
- package/dist/element/_common/props/size/v1/index.d.ts +2 -2
- package/dist/element/_common/props/title/v1/index.d.ts +2 -2
- package/dist/element/_common/props/transform/v1/index.d.ts +2 -2
- package/dist/element/_common/props/xAxis/v1/index.d.ts +2 -2
- package/dist/element/_common/props/yAxis/v1/index.d.ts +2 -2
- package/dist/index.js +1496 -1379
- package/dist/types/data.d.ts +10 -10
- package/dist/types/element.d.ts +46 -46
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/name.d.ts +4 -3
- package/dist/utils/property.d.ts +4 -0
- package/dist/utils/sandbox.d.ts +16 -16
- package/package.json +1 -1
- package/dist/composables/element/core/elementProp.d.ts +0 -4
- package/dist/utils/prop.d.ts +0 -4
package/dist/types/data.d.ts
CHANGED
|
@@ -12,24 +12,24 @@ export interface Node {
|
|
|
12
12
|
export interface View {
|
|
13
13
|
nodes: Node[];
|
|
14
14
|
}
|
|
15
|
-
interface
|
|
16
|
-
type: '
|
|
15
|
+
interface TriggerElementProperty {
|
|
16
|
+
type: 'elementProperty';
|
|
17
17
|
nodeId: string;
|
|
18
|
-
|
|
18
|
+
propertyKeys: string;
|
|
19
19
|
}
|
|
20
|
-
interface
|
|
21
|
-
type: '
|
|
22
|
-
|
|
20
|
+
interface TriggerCustomProperty {
|
|
21
|
+
type: 'customProperty';
|
|
22
|
+
propertyId: string;
|
|
23
23
|
}
|
|
24
24
|
interface TriggerCustomState {
|
|
25
25
|
type: 'customState';
|
|
26
26
|
stateId: string;
|
|
27
27
|
}
|
|
28
|
-
interface
|
|
29
|
-
type: '
|
|
30
|
-
|
|
28
|
+
interface TriggerAdaptSlotProperty {
|
|
29
|
+
type: 'adaptSlotProperty';
|
|
30
|
+
propertyId: string;
|
|
31
31
|
}
|
|
32
|
-
export type Trigger = (
|
|
32
|
+
export type Trigger = (TriggerElementProperty | TriggerCustomProperty | TriggerCustomState | TriggerAdaptSlotProperty) & {
|
|
33
33
|
subKeys?: string;
|
|
34
34
|
};
|
|
35
35
|
export interface Reactivity {
|
package/dist/types/element.d.ts
CHANGED
|
@@ -22,28 +22,28 @@ type ZTypeNumInput = {
|
|
|
22
22
|
default: string;
|
|
23
23
|
} & ZTypeBase;
|
|
24
24
|
export type ZType = ZTypeWord | ZTypeNumInput;
|
|
25
|
-
type
|
|
25
|
+
type ZPropertyBase = {
|
|
26
26
|
key: string;
|
|
27
27
|
name: string;
|
|
28
28
|
};
|
|
29
|
-
type
|
|
29
|
+
type ZPropertyBranch = {
|
|
30
30
|
ui?: undefined;
|
|
31
|
-
children:
|
|
31
|
+
children: ZProperty[];
|
|
32
32
|
default?: undefined;
|
|
33
|
-
} &
|
|
34
|
-
type
|
|
33
|
+
} & ZPropertyBase;
|
|
34
|
+
type ZPropertyDummy = {
|
|
35
35
|
ui: 'dummy';
|
|
36
36
|
readonly?: boolean;
|
|
37
37
|
default: string | number | boolean | object | undefined;
|
|
38
|
-
} &
|
|
39
|
-
type
|
|
38
|
+
} & ZPropertyBase;
|
|
39
|
+
type ZPropertyStrInput = {
|
|
40
40
|
ui: 'strInput';
|
|
41
41
|
readonly?: boolean;
|
|
42
42
|
static?: boolean;
|
|
43
43
|
value?: unknown;
|
|
44
44
|
default: string;
|
|
45
|
-
} &
|
|
46
|
-
type
|
|
45
|
+
} & ZPropertyBase;
|
|
46
|
+
type ZPropertyNumInput = {
|
|
47
47
|
ui: 'numInput';
|
|
48
48
|
precision?: number;
|
|
49
49
|
min?: number;
|
|
@@ -51,92 +51,92 @@ type ZPropNumInput = {
|
|
|
51
51
|
step?: number;
|
|
52
52
|
readonly?: boolean;
|
|
53
53
|
default: number;
|
|
54
|
-
} &
|
|
55
|
-
type
|
|
54
|
+
} & ZPropertyBase;
|
|
55
|
+
type ZPropertySwitch = {
|
|
56
56
|
ui: 'switch';
|
|
57
57
|
readonly?: boolean;
|
|
58
58
|
default: boolean;
|
|
59
|
-
} &
|
|
60
|
-
type
|
|
59
|
+
} & ZPropertyBase;
|
|
60
|
+
type ZPropertySelect = {
|
|
61
61
|
ui: 'select';
|
|
62
62
|
items: 'alignTabsItemsV1' | 'axisTypeItemsV1' | 'borderStyleItemsV1' | 'colorModeItemsV1' | 'densityItemsV1' | 'directionItemsV1' | 'fieldVariantItemsV1' | 'flexCrossAlignItemsV1' | 'flexDirectionItemsV1' | 'flexMainAlignItemsV1' | 'flexWrapItemsV1' | 'fontWeightItemsV1' | 'sheetVariantItemsV1' | 'showTicksItemsV1' | 'sizeItemsV1' | 'textAlignItemsV1' | 'textDecorationItemsV1' | 'textEmphasisItemsV1' | 'textStyleItemsV1' | 'themeColorItemsV1' | 'thumbLabelItemsV1' | 'timelineAlignItemsV1' | 'timelineDirectionItemsV1' | 'timelineSideItemsV1' | 'timelineTruncateLineItemsV1';
|
|
63
63
|
readonly?: boolean;
|
|
64
64
|
default: string;
|
|
65
|
-
} &
|
|
66
|
-
type
|
|
65
|
+
} & ZPropertyBase;
|
|
66
|
+
type ZPropertyColorPicker = {
|
|
67
67
|
ui: 'colorPicker';
|
|
68
68
|
readonly?: boolean;
|
|
69
69
|
default: string | undefined;
|
|
70
|
-
} &
|
|
71
|
-
type
|
|
70
|
+
} & ZPropertyBase;
|
|
71
|
+
type ZPropertyJsonEditor = {
|
|
72
72
|
ui: 'jsonEditor';
|
|
73
73
|
readonly?: boolean;
|
|
74
74
|
default: string;
|
|
75
|
-
} &
|
|
76
|
-
type
|
|
75
|
+
} & ZPropertyBase;
|
|
76
|
+
type ZPropertyMultiTypes = {
|
|
77
77
|
ui: 'multiTypes';
|
|
78
78
|
types: 'borderWidthTypesV1' | 'leftRightTypesV1' | 'marginTypesV1' | 'paddingTypesV1' | 'sizeTypesV1' | 'tableColumnAlignTypesV1' | 'topBottomTypesV1';
|
|
79
79
|
readonly?: boolean;
|
|
80
80
|
default: string;
|
|
81
|
-
} &
|
|
82
|
-
type
|
|
81
|
+
} & ZPropertyBase;
|
|
82
|
+
type ZPropertyCompSelect = {
|
|
83
83
|
ui: 'compSelect';
|
|
84
84
|
readonly?: boolean;
|
|
85
85
|
default: string | undefined;
|
|
86
|
-
} &
|
|
87
|
-
export type
|
|
86
|
+
} & ZPropertyBase;
|
|
87
|
+
export type ZProperty = ({
|
|
88
88
|
array?: false;
|
|
89
|
-
} &
|
|
89
|
+
} & ZPropertyBranch) | ({
|
|
90
90
|
array: true;
|
|
91
91
|
defaultArray: object[];
|
|
92
|
-
} &
|
|
92
|
+
} & ZPropertyBranch) | ({
|
|
93
93
|
array?: false;
|
|
94
|
-
} &
|
|
94
|
+
} & ZPropertyDummy) | ({
|
|
95
95
|
array: true;
|
|
96
96
|
defaultArray: string[] | number[] | boolean | object[];
|
|
97
|
-
} &
|
|
97
|
+
} & ZPropertyDummy) | ({
|
|
98
98
|
array?: false;
|
|
99
|
-
} &
|
|
99
|
+
} & ZPropertyStrInput) | ({
|
|
100
100
|
array: true;
|
|
101
101
|
defaultArray: string[];
|
|
102
|
-
} &
|
|
102
|
+
} & ZPropertyStrInput) | ({
|
|
103
103
|
array?: false;
|
|
104
|
-
} &
|
|
104
|
+
} & ZPropertyNumInput) | ({
|
|
105
105
|
array: true;
|
|
106
106
|
defaultArray: number[];
|
|
107
|
-
} &
|
|
107
|
+
} & ZPropertyNumInput) | ({
|
|
108
108
|
array?: false;
|
|
109
|
-
} &
|
|
109
|
+
} & ZPropertySwitch) | ({
|
|
110
110
|
array: true;
|
|
111
111
|
defaultArray: boolean[];
|
|
112
|
-
} &
|
|
112
|
+
} & ZPropertySwitch) | ({
|
|
113
113
|
array?: false;
|
|
114
|
-
} &
|
|
114
|
+
} & ZPropertySelect) | ({
|
|
115
115
|
array: true;
|
|
116
116
|
defaultArray: string[];
|
|
117
|
-
} &
|
|
117
|
+
} & ZPropertySelect) | ({
|
|
118
118
|
array?: false;
|
|
119
|
-
} &
|
|
119
|
+
} & ZPropertyColorPicker) | ({
|
|
120
120
|
array: true;
|
|
121
121
|
defaultArray: string[];
|
|
122
|
-
} &
|
|
122
|
+
} & ZPropertyColorPicker) | ({
|
|
123
123
|
array?: false;
|
|
124
|
-
} &
|
|
124
|
+
} & ZPropertyJsonEditor) | ({
|
|
125
125
|
array: true;
|
|
126
126
|
defaultArray: string[];
|
|
127
|
-
} &
|
|
127
|
+
} & ZPropertyJsonEditor) | ({
|
|
128
128
|
array?: false;
|
|
129
|
-
} &
|
|
129
|
+
} & ZPropertyMultiTypes) | ({
|
|
130
130
|
array: true;
|
|
131
131
|
defaultArray: string[];
|
|
132
|
-
} &
|
|
132
|
+
} & ZPropertyMultiTypes) | ({
|
|
133
133
|
array?: false;
|
|
134
|
-
} &
|
|
134
|
+
} & ZPropertyCompSelect) | ({
|
|
135
135
|
array: true;
|
|
136
136
|
defaultArray: string[];
|
|
137
|
-
} &
|
|
138
|
-
export type
|
|
139
|
-
[key: string]:
|
|
137
|
+
} & ZPropertyCompSelect);
|
|
138
|
+
export type ZProperties = {
|
|
139
|
+
[key: string]: ZProperty[];
|
|
140
140
|
};
|
|
141
141
|
export type ZEvent = {
|
|
142
142
|
key: string;
|
|
@@ -190,7 +190,7 @@ export type ZElement = {
|
|
|
190
190
|
key: string;
|
|
191
191
|
name: string;
|
|
192
192
|
comp: any;
|
|
193
|
-
|
|
193
|
+
properties: ZProperties;
|
|
194
194
|
events: ZEvent[];
|
|
195
195
|
methods: ZMethod[];
|
|
196
196
|
slots: ZSlot[];
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/name.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function
|
|
1
|
+
import { EventKind, MethodKind, PropertyKind } from '@/types';
|
|
2
|
+
export declare function toPropertyName(kind: PropertyKind, names: string[]): string;
|
|
3
|
+
export declare function toMethodName(kind: MethodKind, names: string[]): string;
|
|
4
|
+
export declare function toEventName(kind: EventKind, names: string[]): string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ZProperty } from '@/types';
|
|
2
|
+
export declare function getPropertyTag(type: string, subtype: string): string | undefined;
|
|
3
|
+
export declare function getPropertyDefault(property: ZProperty, arrayEntry?: boolean): unknown;
|
|
4
|
+
export declare function initProperties(node: any, properties: ZProperty[]): void;
|
package/dist/utils/sandbox.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Data, Env, Mode } from '@/types';
|
|
2
|
-
export type
|
|
2
|
+
export type PropertyKeys = string[] | string;
|
|
3
3
|
interface Hooks {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
onElementPropertyChange: (nodeId: string, propertyKeys: PropertyKeys, newValue: any, oldValue: any) => void;
|
|
5
|
+
onCustomPropertyChange: (propertyId: string, newValue: any, oldValue: any) => void;
|
|
6
6
|
onCustomStateChange: (stateId: string, newValue: any, oldValue: any) => void;
|
|
7
|
-
|
|
7
|
+
onAdaptSlotPropertyChange: (propertyId: string, newValue: any, oldValue: any) => void;
|
|
8
8
|
}
|
|
9
9
|
export declare class Sandbox {
|
|
10
10
|
org: string;
|
|
@@ -16,22 +16,22 @@ export declare class Sandbox {
|
|
|
16
16
|
constructor(org: string, env: Env, mode: Mode, type: 'page' | 'comp', hooks?: Hooks);
|
|
17
17
|
private nodes;
|
|
18
18
|
syncNodes(data: Data | undefined): void;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
private
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
getElementPropertyInner(node: any, propertyKeys: PropertyKeys): any;
|
|
20
|
+
getElementProperty(nodeId: string, propertyKeys: PropertyKeys): any;
|
|
21
|
+
setElementPropertyInner(node: any, propertyKeys: PropertyKeys, newValue: any): void;
|
|
22
|
+
setElementProperty(nodeId: string, propertyKeys: PropertyKeys, newValue: any): void;
|
|
23
|
+
private customProperties;
|
|
24
|
+
resetCustomProperties(): void;
|
|
25
|
+
getCustomProperty(propertyId: string): any;
|
|
26
|
+
setCustomProperty(propertyId: string, newValue: any): void;
|
|
27
27
|
private customStates;
|
|
28
28
|
resetCustomStates(): void;
|
|
29
29
|
getCustomState(stateId: string): any;
|
|
30
30
|
setCustomState(stateId: string, newValue: string): void;
|
|
31
|
-
private
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
private adaptSlotProperties;
|
|
32
|
+
resetAdaptSlotProperties(): void;
|
|
33
|
+
getAdaptSlotProperty(propertyId: string): any;
|
|
34
|
+
setAdaptSlotProperty(propertyId: string, newValue: any): void;
|
|
35
35
|
private interpreter;
|
|
36
36
|
createInterpreter(code: string): void;
|
|
37
37
|
destroyInterpreter(): void;
|
package/package.json
CHANGED
package/dist/utils/prop.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ZProp } from '@/types';
|
|
2
|
-
export declare function getPropTag(type: string, subtype: string): string | undefined;
|
|
3
|
-
export declare function getPropDefault(prop: ZProp, arrayEntry?: boolean): unknown;
|
|
4
|
-
export declare function initProps(node: any, props: ZProp[]): void;
|