x-runtime-lib 0.8.214 → 0.8.215
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.js +4 -5
- package/dist/types/protocol.d.ts +64 -30
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10229,13 +10229,12 @@ function getPropertyDefault(e, p) {
|
|
|
10229
10229
|
function initProperties(e, p) {
|
|
10230
10230
|
function m(e, p) {
|
|
10231
10231
|
if (p.ui) {
|
|
10232
|
-
if (p.
|
|
10232
|
+
if (p.static) return;
|
|
10233
10233
|
e[p.key] = getPropertyDefault(p);
|
|
10234
|
-
} else p.array
|
|
10235
|
-
|
|
10236
|
-
});
|
|
10234
|
+
} else if (p.array) e[p.key] = getPropertyDefault(p);
|
|
10235
|
+
else for (let g of p.children) e[p.key] || (e[p.key] = {}), m(e[p.key], g);
|
|
10237
10236
|
}
|
|
10238
|
-
|
|
10237
|
+
for (let g of p) m(e, g);
|
|
10239
10238
|
}
|
|
10240
10239
|
function createNode(e, p, m) {
|
|
10241
10240
|
let g = getElement(m);
|
package/dist/types/protocol.d.ts
CHANGED
|
@@ -6,11 +6,6 @@ export declare const compTypes: string[];
|
|
|
6
6
|
export type CompType = (typeof compTypes)[number];
|
|
7
7
|
export type Tag = 'pageUi' | 'compUi' | 'page3d' | 'comp3d';
|
|
8
8
|
export declare function getTag(type: string, subtype: string): Tag;
|
|
9
|
-
export type ZField = {
|
|
10
|
-
key: string;
|
|
11
|
-
name: string;
|
|
12
|
-
type: Type;
|
|
13
|
-
};
|
|
14
9
|
export type ZItem = {
|
|
15
10
|
title: string;
|
|
16
11
|
value: string;
|
|
@@ -33,25 +28,26 @@ type ZTypeNumInput = {
|
|
|
33
28
|
default: string;
|
|
34
29
|
} & ZTypeBase;
|
|
35
30
|
export type ZType = ZTypeWord | ZTypeNumInput;
|
|
36
|
-
type
|
|
31
|
+
type ZPropertyBranch = {
|
|
37
32
|
key: string;
|
|
38
33
|
name: string;
|
|
39
|
-
};
|
|
40
|
-
type ZPropertyBranch = {
|
|
41
34
|
ui?: undefined;
|
|
42
35
|
children: ZProperty[];
|
|
43
36
|
default?: undefined;
|
|
44
|
-
}
|
|
37
|
+
};
|
|
38
|
+
type ZPropertyBase = {
|
|
39
|
+
key: string;
|
|
40
|
+
name: string;
|
|
41
|
+
readonly?: boolean;
|
|
42
|
+
static?: boolean;
|
|
43
|
+
value?: any;
|
|
44
|
+
};
|
|
45
45
|
type ZPropertyDummy = {
|
|
46
46
|
ui: 'dummy';
|
|
47
|
-
|
|
48
|
-
default: string | number | boolean | object | undefined;
|
|
47
|
+
default: any;
|
|
49
48
|
} & ZPropertyBase;
|
|
50
49
|
type ZPropertyStrInput = {
|
|
51
50
|
ui: 'strInput';
|
|
52
|
-
readonly?: boolean;
|
|
53
|
-
static?: boolean;
|
|
54
|
-
value?: unknown;
|
|
55
51
|
default: string;
|
|
56
52
|
} & ZPropertyBase;
|
|
57
53
|
type ZPropertyNumInput = {
|
|
@@ -60,61 +56,52 @@ type ZPropertyNumInput = {
|
|
|
60
56
|
min?: number;
|
|
61
57
|
max?: number;
|
|
62
58
|
step?: number;
|
|
63
|
-
readonly?: boolean;
|
|
64
59
|
default: number;
|
|
65
60
|
} & ZPropertyBase;
|
|
66
61
|
type ZPropertySwitch = {
|
|
67
62
|
ui: 'switch';
|
|
68
|
-
readonly?: boolean;
|
|
69
63
|
default: boolean;
|
|
70
64
|
} & ZPropertyBase;
|
|
71
65
|
type ZPropertySelect = {
|
|
72
66
|
ui: 'select';
|
|
73
67
|
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';
|
|
74
|
-
readonly?: boolean;
|
|
75
68
|
default: string;
|
|
76
69
|
} & ZPropertyBase;
|
|
77
70
|
type ZPropertyColorPicker = {
|
|
78
71
|
ui: 'colorPicker';
|
|
79
|
-
readonly?: boolean;
|
|
80
72
|
default: string | undefined;
|
|
81
73
|
} & ZPropertyBase;
|
|
82
74
|
type ZPropertyJsonEditor = {
|
|
83
75
|
ui: 'jsonEditor';
|
|
84
|
-
readonly?: boolean;
|
|
85
76
|
default: string;
|
|
86
77
|
} & ZPropertyBase;
|
|
87
78
|
type ZPropertyMultiTypes = {
|
|
88
79
|
ui: 'multiTypes';
|
|
89
80
|
types: 'borderWidthTypesV1' | 'leftRightTypesV1' | 'marginTypesV1' | 'paddingTypesV1' | 'sizeTypesV1' | 'tableColumnAlignTypesV1' | 'topBottomTypesV1';
|
|
90
|
-
readonly?: boolean;
|
|
91
81
|
default: string;
|
|
92
82
|
} & ZPropertyBase;
|
|
93
83
|
type ZPropertySelectComp = {
|
|
94
84
|
ui: 'selectComp';
|
|
95
|
-
readonly?: boolean;
|
|
96
85
|
default: string | undefined;
|
|
97
86
|
} & ZPropertyBase;
|
|
98
87
|
type ZPropertySelectSlot = {
|
|
99
88
|
ui: 'selectSlot';
|
|
100
|
-
readonly?: boolean;
|
|
101
89
|
default: string | undefined;
|
|
102
90
|
} & ZPropertyBase;
|
|
103
91
|
type ZPropertySelectAdaptSlot = {
|
|
104
92
|
ui: 'selectAdaptSlot';
|
|
105
|
-
readonly?: boolean;
|
|
106
93
|
default: string | undefined;
|
|
107
94
|
} & ZPropertyBase;
|
|
108
95
|
export type ZProperty = ({
|
|
109
96
|
array?: false;
|
|
110
97
|
} & ZPropertyBranch) | ({
|
|
111
98
|
array: true;
|
|
112
|
-
defaultArray:
|
|
99
|
+
defaultArray: any[];
|
|
113
100
|
} & ZPropertyBranch) | ({
|
|
114
101
|
array?: false;
|
|
115
102
|
} & ZPropertyDummy) | ({
|
|
116
103
|
array: true;
|
|
117
|
-
defaultArray:
|
|
104
|
+
defaultArray: any[];
|
|
118
105
|
} & ZPropertyDummy) | ({
|
|
119
106
|
array?: false;
|
|
120
107
|
} & ZPropertyStrInput) | ({
|
|
@@ -169,27 +156,74 @@ export type ZProperty = ({
|
|
|
169
156
|
export type ZMethod = {
|
|
170
157
|
key: string;
|
|
171
158
|
name: string;
|
|
172
|
-
inputs?:
|
|
173
|
-
|
|
159
|
+
inputs?: {
|
|
160
|
+
key: string;
|
|
161
|
+
name: string;
|
|
162
|
+
type: Type;
|
|
163
|
+
desc?: string;
|
|
164
|
+
}[];
|
|
165
|
+
outputs?: {
|
|
166
|
+
key: string;
|
|
167
|
+
name: string;
|
|
168
|
+
type: Type;
|
|
169
|
+
desc?: string;
|
|
170
|
+
}[];
|
|
171
|
+
desc?: string;
|
|
174
172
|
};
|
|
175
173
|
export type ZEvent = {
|
|
176
174
|
key: string;
|
|
177
175
|
name: string;
|
|
178
|
-
params?:
|
|
176
|
+
params?: {
|
|
177
|
+
key: string;
|
|
178
|
+
name: string;
|
|
179
|
+
type: Type;
|
|
180
|
+
desc?: string;
|
|
181
|
+
}[];
|
|
182
|
+
desc?: string;
|
|
179
183
|
};
|
|
180
184
|
export type ZSlotProperty = {
|
|
181
185
|
key: string;
|
|
182
186
|
name: string;
|
|
183
187
|
type: Type;
|
|
184
188
|
readonly?: boolean;
|
|
189
|
+
desc?: string;
|
|
190
|
+
};
|
|
191
|
+
export type ZSlotMethod = {
|
|
192
|
+
key: string;
|
|
193
|
+
name: string;
|
|
194
|
+
inputs?: {
|
|
195
|
+
key: string;
|
|
196
|
+
name: string;
|
|
197
|
+
type: Type;
|
|
198
|
+
desc?: string;
|
|
199
|
+
}[];
|
|
200
|
+
outputs?: {
|
|
201
|
+
key: string;
|
|
202
|
+
name: string;
|
|
203
|
+
type: Type;
|
|
204
|
+
desc?: string;
|
|
205
|
+
}[];
|
|
206
|
+
desc?: string;
|
|
207
|
+
};
|
|
208
|
+
export type ZSlotEvent = {
|
|
209
|
+
key: string;
|
|
210
|
+
name: string;
|
|
211
|
+
params?: {
|
|
212
|
+
key: string;
|
|
213
|
+
name: string;
|
|
214
|
+
type: Type;
|
|
215
|
+
desc?: string;
|
|
216
|
+
}[];
|
|
217
|
+
desc?: string;
|
|
185
218
|
};
|
|
186
219
|
export type ZSlot = {
|
|
187
220
|
key: string;
|
|
188
221
|
name: string;
|
|
189
222
|
multiple?: boolean;
|
|
190
223
|
properties?: ZSlotProperty[];
|
|
191
|
-
methods?:
|
|
192
|
-
events?:
|
|
224
|
+
methods?: ZSlotMethod[];
|
|
225
|
+
events?: ZSlotEvent[];
|
|
226
|
+
desc?: string;
|
|
193
227
|
};
|
|
194
228
|
export declare const elementKeys: readonly ["globality_v1", "multiple_ref_v1", "multiple_slot_v1", "ref_v1", "render_switch_v1", "slot_v1", "ui_badge_v1", "ui_breadcrumbs_v1", "ui_bar_chart_v1", "ui_btn_v1", "ui_btn_toggle_v1", "ui_btn_toggle_entry_v1", "ui_card_v1", "ui_checkbox_v1", "ui_chip_v1", "ui_chip_group_v1", "ui_color_picker_v1", "ui_combobox_v1", "ui_container_v1", "ui_data_table_v1", "ui_date_picker_v1", "ui_dialog_v1", "ui_file_input_v1", "ui_flex_layout_v1", "ui_flex_layout_entry_v1", "ui_form_v1", "ui_icon_v1", "ui_line_chart_v1", "ui_menu_v1", "ui_number_input_v1", "ui_pagination_v1", "ui_radio_v1", "ui_radio_group_v1", "ui_range_slider_v1", "ui_rating_v1", "ui_select_v1", "ui_slider_v1", "ui_stepper_v1", "ui_stepper_header_v1", "ui_stepper_item_v1", "ui_stepper_window_v1", "ui_stepper_window_item_v1", "ui_switch_v1", "ui_tab_v1", "ui_table_v1", "ui_tabs_v1", "ui_text_v1", "ui_textarea_v1", "ui_text_field_v1", "ui_timeline_v1", "ui_timeline_item_v1", "ui_window_v1", "ui_window_item_v1", "3d_ambient_light_v1", "3d_box_geometry_v1", "3d_directional_light_v1", "3d_group_v1", "3d_keyboard_controls_v1", "3d_map_controls_v1", "3d_mesh_v1", "3d_mesh_basic_material_v1", "3d_orbit_controls_v1", "3d_orthographic_camera_v1", "3d_perspective_camera_v1", "3d_point_light_v1", "3d_sphere_geometry_v1", "3d_spot_light_v1"];
|
|
195
229
|
export type ZElementKey = (typeof elementKeys)[number];
|