x-runtime-lib 0.8.206 → 0.8.208
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/element/3d/geometry/boxGeometry/v1/spawn.d.ts +1 -1
- package/dist/element/3d/geometry/sphereGeometry/v1/spawn.d.ts +1 -1
- package/dist/element/_common/global/index.d.ts +1 -3
- package/dist/element/chart/barChart/v1/spawn.d.ts +1 -1
- package/dist/element/chart/lineChart/v1/spawn.d.ts +1 -1
- package/dist/element/ui/btn/v1/spawn.d.ts +1 -1
- package/dist/element/ui/card/v1/spawn.d.ts +1 -1
- package/dist/element/ui/chipGroup/v1/spawn.d.ts +1 -1
- package/dist/element/ui/dataTable/v1/spawn.d.ts +1 -1
- package/dist/element/ui/flexLayout/v1/spawn.d.ts +1 -1
- package/dist/element/ui/form/v1/spawn.d.ts +1 -1
- package/dist/element/ui/numberInput/v1/spawn.d.ts +1 -1
- package/dist/element/ui/radioGroup/v1/spawn.d.ts +1 -1
- package/dist/element/ui/stepper/v1/spawn.d.ts +1 -1
- package/dist/element/ui/tabs/v1/spawn.d.ts +1 -1
- package/dist/element/ui/text/v1/spawn.d.ts +1 -1
- package/dist/element/ui/textarea/v1/spawn.d.ts +1 -1
- package/dist/element/ui/timeline/v1/spawn.d.ts +1 -1
- package/dist/element/ui/window/v1/spawn.d.ts +1 -1
- package/dist/index.js +307 -375
- package/dist/types/data.d.ts +0 -1
- package/dist/types/protocol.d.ts +2 -2
- package/dist/utils/node.d.ts +3 -2
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { ZElement, ZElementKey, ZElements
|
|
1
|
+
import { ZElement, ZElementKey, ZElements } from '@/types';
|
|
2
2
|
export declare const regElement: (element: ZElement) => void;
|
|
3
3
|
export declare function getAllElements(): ZElements;
|
|
4
4
|
export declare function getElement(key: ZElementKey | string): ZElement | undefined;
|
|
5
|
-
export declare function getElementMust(key: ZElementKey): ZElement;
|
|
6
|
-
export declare function getProperties(element: ZElement, type: string, subtype: string): ZProperty[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { NodePair } from '@/types';
|
|
2
|
-
export declare function spawn(type: string, subtype: string): NodePair
|
|
2
|
+
export declare function spawn(type: string, subtype: string): NodePair;
|
package/dist/index.js
CHANGED
|
@@ -224,94 +224,12 @@ function toEventName(e, p) {
|
|
|
224
224
|
m = makePrefix("adaptSlot", "propertyChange"), g = !1;
|
|
225
225
|
break;
|
|
226
226
|
case "stateChangeEvent":
|
|
227
|
-
m = makePrefix("
|
|
227
|
+
m = makePrefix("stateChange"), g = !1;
|
|
228
228
|
break;
|
|
229
229
|
default: console.assert(!1, `not implemented kind=${e}`);
|
|
230
230
|
}
|
|
231
231
|
return joinNames(m, p, g);
|
|
232
232
|
}
|
|
233
|
-
function isExecutableMode(e) {
|
|
234
|
-
return e === "runtime" || e === "preview";
|
|
235
|
-
}
|
|
236
|
-
function isCircularReference(e, p) {
|
|
237
|
-
if (e.compId === p) return !0;
|
|
238
|
-
let m = e;
|
|
239
|
-
for (; m;) {
|
|
240
|
-
if (m.parent && m.compId === m.parent.compId) return !0;
|
|
241
|
-
m = m.parent;
|
|
242
|
-
}
|
|
243
|
-
return !1;
|
|
244
|
-
}
|
|
245
|
-
function initNode() {
|
|
246
|
-
return { basic: {
|
|
247
|
-
id: "",
|
|
248
|
-
key: ""
|
|
249
|
-
} };
|
|
250
|
-
}
|
|
251
|
-
function toNodeLite(e, p) {
|
|
252
|
-
return {
|
|
253
|
-
id: e.basic.id,
|
|
254
|
-
key: e.basic.key,
|
|
255
|
-
slotId: e.settings?.slot,
|
|
256
|
-
compId: e.settings?.comp,
|
|
257
|
-
children: p
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
function dataStringify({ type: e, version: p, view: m, code: g }) {
|
|
261
|
-
let _ = (e, p) => {
|
|
262
|
-
let m = { id: p.id };
|
|
263
|
-
p.children && (m.children = [], p.children.forEach((e) => {
|
|
264
|
-
_(m.children, e);
|
|
265
|
-
})), e.push(m);
|
|
266
|
-
}, v = [];
|
|
267
|
-
m.nodeLites.forEach((e) => {
|
|
268
|
-
_(v, e);
|
|
269
|
-
});
|
|
270
|
-
let y = {
|
|
271
|
-
type: e,
|
|
272
|
-
version: p,
|
|
273
|
-
view: {
|
|
274
|
-
nodeLites: v,
|
|
275
|
-
nodes: m.nodes
|
|
276
|
-
},
|
|
277
|
-
code: g
|
|
278
|
-
};
|
|
279
|
-
return JSON.stringify(y);
|
|
280
|
-
}
|
|
281
|
-
function parseData(e) {
|
|
282
|
-
let p = JSON.parse(e), m = (e, g) => {
|
|
283
|
-
e.key = g.basic.key, e.alias = g.basic.alias, e.slotId = g.settings?.slot, e.compId = g.settings?.comp, e.children?.forEach((e) => {
|
|
284
|
-
m(e, p.view.nodes[e.id]);
|
|
285
|
-
});
|
|
286
|
-
};
|
|
287
|
-
return p.view.nodeLites.forEach((e) => {
|
|
288
|
-
m(e, p.view.nodes[e.id]);
|
|
289
|
-
}), p;
|
|
290
|
-
}
|
|
291
|
-
function metaStringify(e) {
|
|
292
|
-
return JSON.stringify(e);
|
|
293
|
-
}
|
|
294
|
-
function parseMeta(e) {
|
|
295
|
-
return JSON.parse(e);
|
|
296
|
-
}
|
|
297
|
-
const pageTypes = [
|
|
298
|
-
"ui",
|
|
299
|
-
"2d",
|
|
300
|
-
"3d"
|
|
301
|
-
], compTypes = [
|
|
302
|
-
"ui",
|
|
303
|
-
"2d",
|
|
304
|
-
"3d"
|
|
305
|
-
];
|
|
306
|
-
function getTag(e, p) {
|
|
307
|
-
if (e === "page") {
|
|
308
|
-
if (!pageTypes.includes(p)) throw Error("invalid page type");
|
|
309
|
-
} else if (e === "comp") {
|
|
310
|
-
if (!compTypes.includes(p)) throw Error("invalid comp type");
|
|
311
|
-
} else throw Error("invalid type");
|
|
312
|
-
return `${e}${capitalize_default(p)}`;
|
|
313
|
-
}
|
|
314
|
-
const elementKeys = /* @__PURE__ */ "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_group_v1.ui_btn_toggle_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".split(".");
|
|
315
233
|
var elements = {};
|
|
316
234
|
const regElement = (e) => {
|
|
317
235
|
elements[e.key] = e;
|
|
@@ -322,16 +240,6 @@ function getAllElements() {
|
|
|
322
240
|
function getElement(e) {
|
|
323
241
|
return elements[e];
|
|
324
242
|
}
|
|
325
|
-
function getElementMust(e) {
|
|
326
|
-
let p = elements[e];
|
|
327
|
-
if (!p) throw Error(`element not found key=${e}`);
|
|
328
|
-
return p;
|
|
329
|
-
}
|
|
330
|
-
function getProperties(e, p, m) {
|
|
331
|
-
let g = e.properties[getTag(p, m)];
|
|
332
|
-
if (!g) throw Error(`properties not found key=${e.key} type=${p} subtype=${m}`);
|
|
333
|
-
return g;
|
|
334
|
-
}
|
|
335
243
|
const alignTabsItemsV1 = [
|
|
336
244
|
{
|
|
337
245
|
title: "x-runtime-lib.title",
|
|
@@ -1503,6 +1411,74 @@ function useElementSlotProperty(e, p, m, g) {
|
|
|
1503
1411
|
await e.hooks.onPropertyChange(makePropertyId("elementAdaptSlotProperty", "globality", makePropertyKeyOfElementSlot(p.value.basic.key, e.slotId, m)), g, _, e.instance);
|
|
1504
1412
|
}, { immediate: !0 });
|
|
1505
1413
|
}
|
|
1414
|
+
function isExecutableMode(e) {
|
|
1415
|
+
return e === "runtime" || e === "preview";
|
|
1416
|
+
}
|
|
1417
|
+
function isCircularReference(e, p) {
|
|
1418
|
+
if (e.compId === p) return !0;
|
|
1419
|
+
let m = e;
|
|
1420
|
+
for (; m;) {
|
|
1421
|
+
if (m.parent && m.compId === m.parent.compId) return !0;
|
|
1422
|
+
m = m.parent;
|
|
1423
|
+
}
|
|
1424
|
+
return !1;
|
|
1425
|
+
}
|
|
1426
|
+
function toNodeLite(e, p) {
|
|
1427
|
+
return {
|
|
1428
|
+
id: e.basic.id,
|
|
1429
|
+
key: e.basic.key,
|
|
1430
|
+
slotId: e.settings?.slot,
|
|
1431
|
+
compId: e.settings?.comp,
|
|
1432
|
+
children: p
|
|
1433
|
+
};
|
|
1434
|
+
}
|
|
1435
|
+
function dataStringify({ type: e, version: p, view: m, code: g }) {
|
|
1436
|
+
let _ = (e, p) => {
|
|
1437
|
+
let m = { id: p.id };
|
|
1438
|
+
p.children && (m.children = [], p.children.forEach((e) => {
|
|
1439
|
+
_(m.children, e);
|
|
1440
|
+
})), e.push(m);
|
|
1441
|
+
}, v = [];
|
|
1442
|
+
m.nodeLites.forEach((e) => {
|
|
1443
|
+
_(v, e);
|
|
1444
|
+
});
|
|
1445
|
+
let y = {
|
|
1446
|
+
type: e,
|
|
1447
|
+
version: p,
|
|
1448
|
+
view: {
|
|
1449
|
+
nodeLites: v,
|
|
1450
|
+
nodes: m.nodes
|
|
1451
|
+
},
|
|
1452
|
+
code: g
|
|
1453
|
+
};
|
|
1454
|
+
return JSON.stringify(y);
|
|
1455
|
+
}
|
|
1456
|
+
function parseData(e) {
|
|
1457
|
+
let p = JSON.parse(e), m = (e, g) => {
|
|
1458
|
+
e.key = g.basic.key, e.alias = g.basic.alias, e.slotId = g.settings?.slot, e.compId = g.settings?.comp, e.children?.forEach((e) => {
|
|
1459
|
+
m(e, p.view.nodes[e.id]);
|
|
1460
|
+
});
|
|
1461
|
+
};
|
|
1462
|
+
return p.view.nodeLites.forEach((e) => {
|
|
1463
|
+
m(e, p.view.nodes[e.id]);
|
|
1464
|
+
}), p;
|
|
1465
|
+
}
|
|
1466
|
+
function metaStringify(e) {
|
|
1467
|
+
return JSON.stringify(e);
|
|
1468
|
+
}
|
|
1469
|
+
function parseMeta(e) {
|
|
1470
|
+
return JSON.parse(e);
|
|
1471
|
+
}
|
|
1472
|
+
const pageTypes = ["ui", "3d"], compTypes = ["ui", "3d"];
|
|
1473
|
+
function getTag(e, p) {
|
|
1474
|
+
if (e === "page") {
|
|
1475
|
+
if (!pageTypes.includes(p)) throw Error("invalid page type");
|
|
1476
|
+
} else if (e === "comp") {
|
|
1477
|
+
if (!compTypes.includes(p)) throw Error("invalid comp type");
|
|
1478
|
+
} else throw Error("invalid type");
|
|
1479
|
+
return `${e}${capitalize_default(p)}`;
|
|
1480
|
+
}
|
|
1481
|
+
const elementKeys = /* @__PURE__ */ "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_group_v1.ui_btn_toggle_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".split(".");
|
|
1506
1482
|
function useElementSlotRender(e, p, m) {
|
|
1507
1483
|
function g(p) {
|
|
1508
1484
|
let m = getElement(p.key);
|
|
@@ -6002,8 +5978,8 @@ const orbitControlsV1 = {
|
|
|
6002
5978
|
};
|
|
6003
5979
|
regElement(orbitControlsV1);
|
|
6004
5980
|
function spawn$17(e, p) {
|
|
6005
|
-
let m =
|
|
6006
|
-
|
|
5981
|
+
let m = createNode(e, p, "3d_mesh_v1");
|
|
5982
|
+
m.transform = {
|
|
6007
5983
|
position: {
|
|
6008
5984
|
x: 0,
|
|
6009
5985
|
y: 0,
|
|
@@ -6020,19 +5996,19 @@ function spawn$17(e, p) {
|
|
|
6020
5996
|
z: 1
|
|
6021
5997
|
}
|
|
6022
5998
|
};
|
|
6023
|
-
let
|
|
5999
|
+
let g = spawnBoxGeometry(e, p), _ = spawnMeshBasicMaterial$1(e, p);
|
|
6024
6000
|
return {
|
|
6025
|
-
nodeLite: toNodeLite(
|
|
6001
|
+
nodeLite: toNodeLite(m, [g.nodeLite, _.nodeLite]),
|
|
6026
6002
|
nodes: {
|
|
6027
|
-
[
|
|
6028
|
-
...
|
|
6029
|
-
...
|
|
6003
|
+
[m.basic.id]: m,
|
|
6004
|
+
...g.nodes,
|
|
6005
|
+
..._.nodes
|
|
6030
6006
|
}
|
|
6031
6007
|
};
|
|
6032
6008
|
}
|
|
6033
6009
|
function spawnBoxGeometry(e, p) {
|
|
6034
|
-
let m =
|
|
6035
|
-
return
|
|
6010
|
+
let m = createNode(e, p, "3d_box_geometry_v1");
|
|
6011
|
+
return m.settings = {
|
|
6036
6012
|
width: 1,
|
|
6037
6013
|
height: 1,
|
|
6038
6014
|
depth: 1,
|
|
@@ -6040,15 +6016,15 @@ function spawnBoxGeometry(e, p) {
|
|
|
6040
6016
|
heightSegements: 1,
|
|
6041
6017
|
depthSegements: 1
|
|
6042
6018
|
}, {
|
|
6043
|
-
nodeLite: toNodeLite(
|
|
6044
|
-
nodes: { [
|
|
6019
|
+
nodeLite: toNodeLite(m),
|
|
6020
|
+
nodes: { [m.basic.id]: m }
|
|
6045
6021
|
};
|
|
6046
6022
|
}
|
|
6047
6023
|
function spawnMeshBasicMaterial$1(e, p) {
|
|
6048
|
-
let m =
|
|
6049
|
-
return
|
|
6050
|
-
nodeLite: toNodeLite(
|
|
6051
|
-
nodes: { [
|
|
6024
|
+
let m = createNode(e, p, "3d_mesh_basic_material_v1");
|
|
6025
|
+
return {
|
|
6026
|
+
nodeLite: toNodeLite(m),
|
|
6027
|
+
nodes: { [m.basic.id]: m }
|
|
6052
6028
|
};
|
|
6053
6029
|
}
|
|
6054
6030
|
var settings$43 = {
|
|
@@ -6112,8 +6088,8 @@ const boxGeometryV1 = {
|
|
|
6112
6088
|
};
|
|
6113
6089
|
regElement(boxGeometryV1);
|
|
6114
6090
|
function spawn$16(e, p) {
|
|
6115
|
-
let m =
|
|
6116
|
-
|
|
6091
|
+
let m = createNode(e, p, "3d_mesh_v1");
|
|
6092
|
+
m.transform = {
|
|
6117
6093
|
position: {
|
|
6118
6094
|
x: 0,
|
|
6119
6095
|
y: 0,
|
|
@@ -6130,19 +6106,19 @@ function spawn$16(e, p) {
|
|
|
6130
6106
|
z: 1
|
|
6131
6107
|
}
|
|
6132
6108
|
};
|
|
6133
|
-
let
|
|
6109
|
+
let g = spawnSphereGeometry(e, p), _ = spawnMeshBasicMaterial(e, p);
|
|
6134
6110
|
return {
|
|
6135
|
-
nodeLite: toNodeLite(
|
|
6111
|
+
nodeLite: toNodeLite(m, [g.nodeLite, _.nodeLite]),
|
|
6136
6112
|
nodes: {
|
|
6137
|
-
[
|
|
6138
|
-
...
|
|
6139
|
-
...
|
|
6113
|
+
[m.basic.id]: m,
|
|
6114
|
+
...g.nodes,
|
|
6115
|
+
..._.nodes
|
|
6140
6116
|
}
|
|
6141
6117
|
};
|
|
6142
6118
|
}
|
|
6143
6119
|
function spawnSphereGeometry(e, p) {
|
|
6144
|
-
let m =
|
|
6145
|
-
return
|
|
6120
|
+
let m = createNode(e, p, "3d_sphere_geometry_v1");
|
|
6121
|
+
return m.settings = {
|
|
6146
6122
|
radius: 1,
|
|
6147
6123
|
widthSegements: 32,
|
|
6148
6124
|
heightSegements: 16,
|
|
@@ -6151,15 +6127,15 @@ function spawnSphereGeometry(e, p) {
|
|
|
6151
6127
|
thetaStart: 0,
|
|
6152
6128
|
thetaLength: 3.141592653589793
|
|
6153
6129
|
}, {
|
|
6154
|
-
nodeLite: toNodeLite(
|
|
6155
|
-
nodes: { [
|
|
6130
|
+
nodeLite: toNodeLite(m),
|
|
6131
|
+
nodes: { [m.basic.id]: m }
|
|
6156
6132
|
};
|
|
6157
6133
|
}
|
|
6158
6134
|
function spawnMeshBasicMaterial(e, p) {
|
|
6159
|
-
let m =
|
|
6160
|
-
return
|
|
6161
|
-
nodeLite: toNodeLite(
|
|
6162
|
-
nodes: { [
|
|
6135
|
+
let m = createNode(e, p, "3d_mesh_basic_material_v1");
|
|
6136
|
+
return {
|
|
6137
|
+
nodeLite: toNodeLite(m),
|
|
6138
|
+
nodes: { [m.basic.id]: m }
|
|
6163
6139
|
};
|
|
6164
6140
|
}
|
|
6165
6141
|
var settings$42 = {
|
|
@@ -6458,8 +6434,8 @@ const meshV1 = {
|
|
|
6458
6434
|
};
|
|
6459
6435
|
regElement(meshV1);
|
|
6460
6436
|
function spawn$15(e, p) {
|
|
6461
|
-
let m =
|
|
6462
|
-
return
|
|
6437
|
+
let m = createNode(e, p, "ui_bar_chart_v1");
|
|
6438
|
+
return m.size.height = "300px", m.xAxis.data = [
|
|
6463
6439
|
"Mon",
|
|
6464
6440
|
"Tue",
|
|
6465
6441
|
"Wed",
|
|
@@ -6467,7 +6443,7 @@ function spawn$15(e, p) {
|
|
|
6467
6443
|
"Fri",
|
|
6468
6444
|
"Sat",
|
|
6469
6445
|
"Sun"
|
|
6470
|
-
],
|
|
6446
|
+
], m.series = [{
|
|
6471
6447
|
type: "bar",
|
|
6472
6448
|
data: [
|
|
6473
6449
|
120,
|
|
@@ -6479,8 +6455,8 @@ function spawn$15(e, p) {
|
|
|
6479
6455
|
130
|
|
6480
6456
|
]
|
|
6481
6457
|
}], {
|
|
6482
|
-
nodeLite: toNodeLite(
|
|
6483
|
-
nodes: { [
|
|
6458
|
+
nodeLite: toNodeLite(m),
|
|
6459
|
+
nodes: { [m.basic.id]: m }
|
|
6484
6460
|
};
|
|
6485
6461
|
}
|
|
6486
6462
|
var series$1 = {
|
|
@@ -6531,8 +6507,8 @@ const barChartV1 = {
|
|
|
6531
6507
|
};
|
|
6532
6508
|
regElement(barChartV1);
|
|
6533
6509
|
function spawn$14(e, p) {
|
|
6534
|
-
let m =
|
|
6535
|
-
return
|
|
6510
|
+
let m = createNode(e, p, "ui_line_chart_v1");
|
|
6511
|
+
return m.size.height = "300px", m.xAxis.data = [
|
|
6536
6512
|
"Mon",
|
|
6537
6513
|
"Tue",
|
|
6538
6514
|
"Wed",
|
|
@@ -6540,7 +6516,7 @@ function spawn$14(e, p) {
|
|
|
6540
6516
|
"Fri",
|
|
6541
6517
|
"Sat",
|
|
6542
6518
|
"Sun"
|
|
6543
|
-
],
|
|
6519
|
+
], m.series = [{
|
|
6544
6520
|
type: "line",
|
|
6545
6521
|
data: [
|
|
6546
6522
|
120,
|
|
@@ -6552,8 +6528,8 @@ function spawn$14(e, p) {
|
|
|
6552
6528
|
130
|
|
6553
6529
|
]
|
|
6554
6530
|
}], {
|
|
6555
|
-
nodeLite: toNodeLite(
|
|
6556
|
-
nodes: { [
|
|
6531
|
+
nodeLite: toNodeLite(m),
|
|
6532
|
+
nodes: { [m.basic.id]: m }
|
|
6557
6533
|
};
|
|
6558
6534
|
}
|
|
6559
6535
|
var series = {
|
|
@@ -6923,10 +6899,10 @@ const badgeV1 = {
|
|
|
6923
6899
|
};
|
|
6924
6900
|
regElement(badgeV1);
|
|
6925
6901
|
function spawn$13(e, p) {
|
|
6926
|
-
let m =
|
|
6927
|
-
return
|
|
6928
|
-
nodeLite: toNodeLite(
|
|
6929
|
-
nodes: { [
|
|
6902
|
+
let m = createNode(e, p, "ui_btn_v1");
|
|
6903
|
+
return m.settings.text = "button", {
|
|
6904
|
+
nodeLite: toNodeLite(m),
|
|
6905
|
+
nodes: { [m.basic.id]: m }
|
|
6930
6906
|
};
|
|
6931
6907
|
}
|
|
6932
6908
|
var settings$31 = {
|
|
@@ -7121,10 +7097,10 @@ const btnToggleV1 = {
|
|
|
7121
7097
|
};
|
|
7122
7098
|
regElement(btnToggleV1);
|
|
7123
7099
|
function spawn$12(e, p) {
|
|
7124
|
-
let m =
|
|
7125
|
-
return
|
|
7126
|
-
nodeLite: toNodeLite(
|
|
7127
|
-
nodes: { [
|
|
7100
|
+
let m = createNode(e, p, "ui_card_v1");
|
|
7101
|
+
return m.children = [], m.settings.title = "title", m.settings.subtitle = "subtitle", m.settings.text = "text", {
|
|
7102
|
+
nodeLite: toNodeLite(m),
|
|
7103
|
+
nodes: { [m.basic.id]: m }
|
|
7128
7104
|
};
|
|
7129
7105
|
}
|
|
7130
7106
|
var settings$29 = {
|
|
@@ -7316,34 +7292,32 @@ const chipV1 = {
|
|
|
7316
7292
|
};
|
|
7317
7293
|
regElement(chipV1);
|
|
7318
7294
|
function spawn$11(e, p) {
|
|
7319
|
-
let m =
|
|
7320
|
-
initProperties(_, g), _.basic.id = genId(16), _.basic.key = m.key;
|
|
7321
|
-
let v = spawnChip(e, p, "chip1", "chip 1"), y = spawnChip(e, p, "chip2", "chip 2"), b = spawnChip(e, p, "chip3", "chip 3"), x = spawnChip(e, p, "chip4", "chip 4"), S = spawnChip(e, p, "chip5", "chip 5"), C = spawnChip(e, p, "chip6", "chip 6");
|
|
7295
|
+
let m = createNode(e, p, "ui_chip_group_v1"), g = spawnChip(e, p, "chip1", "chip 1"), _ = spawnChip(e, p, "chip2", "chip 2"), v = spawnChip(e, p, "chip3", "chip 3"), y = spawnChip(e, p, "chip4", "chip 4"), b = spawnChip(e, p, "chip5", "chip 5"), x = spawnChip(e, p, "chip6", "chip 6");
|
|
7322
7296
|
return {
|
|
7323
|
-
nodeLite: toNodeLite(
|
|
7297
|
+
nodeLite: toNodeLite(m, [
|
|
7298
|
+
g.nodeLite,
|
|
7299
|
+
_.nodeLite,
|
|
7324
7300
|
v.nodeLite,
|
|
7325
7301
|
y.nodeLite,
|
|
7326
7302
|
b.nodeLite,
|
|
7327
|
-
x.nodeLite
|
|
7328
|
-
S.nodeLite,
|
|
7329
|
-
C.nodeLite
|
|
7303
|
+
x.nodeLite
|
|
7330
7304
|
]),
|
|
7331
7305
|
nodes: {
|
|
7332
|
-
[
|
|
7306
|
+
[m.basic.id]: m,
|
|
7307
|
+
...g.nodes,
|
|
7308
|
+
..._.nodes,
|
|
7333
7309
|
...v.nodes,
|
|
7334
7310
|
...y.nodes,
|
|
7335
7311
|
...b.nodes,
|
|
7336
|
-
...x.nodes
|
|
7337
|
-
...S.nodes,
|
|
7338
|
-
...C.nodes
|
|
7312
|
+
...x.nodes
|
|
7339
7313
|
}
|
|
7340
7314
|
};
|
|
7341
7315
|
}
|
|
7342
7316
|
function spawnChip(e, p, m, g) {
|
|
7343
|
-
let _ =
|
|
7344
|
-
return
|
|
7345
|
-
nodeLite: toNodeLite(
|
|
7346
|
-
nodes: { [
|
|
7317
|
+
let _ = createNode(e, p, "ui_chip_v1");
|
|
7318
|
+
return _.settings.value = m, _.settings.text = g, {
|
|
7319
|
+
nodeLite: toNodeLite(_),
|
|
7320
|
+
nodes: { [_.basic.id]: _ }
|
|
7347
7321
|
};
|
|
7348
7322
|
}
|
|
7349
7323
|
var settings$26 = {
|
|
@@ -7512,16 +7486,16 @@ const containerV1 = {
|
|
|
7512
7486
|
};
|
|
7513
7487
|
regElement(containerV1);
|
|
7514
7488
|
function spawn$10(e, p) {
|
|
7515
|
-
let m =
|
|
7516
|
-
return
|
|
7489
|
+
let m = createNode(e, p, "ui_data_table_v1");
|
|
7490
|
+
return m.settings.headers = [{
|
|
7517
7491
|
value: "name",
|
|
7518
7492
|
title: "Name"
|
|
7519
7493
|
}, {
|
|
7520
7494
|
value: "price",
|
|
7521
7495
|
title: "Price"
|
|
7522
|
-
}],
|
|
7523
|
-
nodeLite: toNodeLite(
|
|
7524
|
-
nodes: { [
|
|
7496
|
+
}], m.settings.data = "[\n { \"name\": \"Apple\", \"price\": 5.5 },\n { \"name\": \"Orange\", \"price\": 3.0 },\n { \"name\": \"Berry\", \"price\": 13.5 }\n]", {
|
|
7497
|
+
nodeLite: toNodeLite(m),
|
|
7498
|
+
nodes: { [m.basic.id]: m }
|
|
7525
7499
|
};
|
|
7526
7500
|
}
|
|
7527
7501
|
var size$1 = {
|
|
@@ -7747,40 +7721,36 @@ const fileInputV1 = {
|
|
|
7747
7721
|
leaf: !0
|
|
7748
7722
|
};
|
|
7749
7723
|
function spawn$9(e, p) {
|
|
7750
|
-
let m =
|
|
7751
|
-
initProperties(_, g), _.basic.id = genId(16), _.basic.key = m.key;
|
|
7752
|
-
let v = spawnContainer(e, p, "#ff0000", "40px", void 0, void 0, "40px", void 0, void 0), y = spawnContainer(e, p, "#00ff00", "60px", void 0, void 0, "60px", void 0, void 0), b = spawnEntry$3(e, p);
|
|
7724
|
+
let m = createNode(e, p, "ui_flex_layout_v1"), g = spawnContainer(e, p, "#ff0000", "40px", void 0, void 0, "40px", void 0, void 0), _ = spawnContainer(e, p, "#00ff00", "60px", void 0, void 0, "60px", void 0, void 0), v = spawnEntry$3(e, p);
|
|
7753
7725
|
return {
|
|
7754
|
-
nodeLite: toNodeLite(
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7726
|
+
nodeLite: toNodeLite(m, [
|
|
7727
|
+
g.nodeLite,
|
|
7728
|
+
_.nodeLite,
|
|
7729
|
+
v.nodeLite
|
|
7758
7730
|
]),
|
|
7759
7731
|
nodes: {
|
|
7760
|
-
[
|
|
7761
|
-
...
|
|
7762
|
-
...
|
|
7763
|
-
...
|
|
7732
|
+
[m.basic.id]: m,
|
|
7733
|
+
...g.nodes,
|
|
7734
|
+
..._.nodes,
|
|
7735
|
+
...v.nodes
|
|
7764
7736
|
}
|
|
7765
7737
|
};
|
|
7766
7738
|
}
|
|
7767
7739
|
function spawnEntry$3(e, p) {
|
|
7768
|
-
let m =
|
|
7769
|
-
initProperties(_, g), _.basic.id = genId(16), _.basic.key = m.key;
|
|
7770
|
-
let v = spawnContainer(e, p, "#0000ff", void 0, "80px", void 0, void 0, "80px", void 0);
|
|
7740
|
+
let m = createNode(e, p, "ui_flex_layout_entry_v1"), g = spawnContainer(e, p, "#0000ff", void 0, "80px", void 0, void 0, "80px", void 0);
|
|
7771
7741
|
return {
|
|
7772
|
-
nodeLite: toNodeLite(
|
|
7742
|
+
nodeLite: toNodeLite(m, [g.nodeLite]),
|
|
7773
7743
|
nodes: {
|
|
7774
|
-
[
|
|
7775
|
-
...
|
|
7744
|
+
[m.basic.id]: m,
|
|
7745
|
+
...g.nodes
|
|
7776
7746
|
}
|
|
7777
7747
|
};
|
|
7778
7748
|
}
|
|
7779
7749
|
function spawnContainer(e, p, m, g, _, v, y, b, x) {
|
|
7780
|
-
let S =
|
|
7781
|
-
return
|
|
7782
|
-
nodeLite: toNodeLite(
|
|
7783
|
-
nodes: { [
|
|
7750
|
+
let S = createNode(e, p, "ui_container_v1");
|
|
7751
|
+
return g && (S.size.width = g), _ && (S.size.minWidth = _), v && (S.size.maxWidth = v), y && (S.size.height = y), b && (S.size.minHeight = b), x && (S.size.maxHeight = x), m && (S.settings.backgroundColor.mode = "custom", S.settings.backgroundColor.custom.light = m, S.settings.backgroundColor.custom.dark = m), {
|
|
7752
|
+
nodeLite: toNodeLite(S, []),
|
|
7753
|
+
nodes: { [S.basic.id]: S }
|
|
7784
7754
|
};
|
|
7785
7755
|
}
|
|
7786
7756
|
var backgroundColor$1 = cloneDeep_default(colorV1);
|
|
@@ -8019,22 +7989,20 @@ const flexLayoutEntryV1 = {
|
|
|
8019
7989
|
};
|
|
8020
7990
|
regElement(flexLayoutEntryV1);
|
|
8021
7991
|
function spawn$8(e, p) {
|
|
8022
|
-
let m =
|
|
8023
|
-
initProperties(_, g), _.basic.id = genId(16), _.basic.key = m.key;
|
|
8024
|
-
let v = spawnTextField(e, p);
|
|
7992
|
+
let m = createNode(e, p, "ui_form_v1"), g = spawnTextField(e, p);
|
|
8025
7993
|
return {
|
|
8026
|
-
nodeLite: toNodeLite(
|
|
7994
|
+
nodeLite: toNodeLite(m, [g.nodeLite]),
|
|
8027
7995
|
nodes: {
|
|
8028
|
-
[
|
|
8029
|
-
...
|
|
7996
|
+
[m.basic.id]: m,
|
|
7997
|
+
...g.nodes
|
|
8030
7998
|
}
|
|
8031
7999
|
};
|
|
8032
8000
|
}
|
|
8033
8001
|
function spawnTextField(e, p) {
|
|
8034
|
-
let m =
|
|
8035
|
-
return
|
|
8036
|
-
nodeLite: toNodeLite(
|
|
8037
|
-
nodes: { [
|
|
8002
|
+
let m = createNode(e, p, "ui_text_field_v1");
|
|
8003
|
+
return {
|
|
8004
|
+
nodeLite: toNodeLite(m),
|
|
8005
|
+
nodes: { [m.basic.id]: m }
|
|
8038
8006
|
};
|
|
8039
8007
|
}
|
|
8040
8008
|
var settings$19 = {
|
|
@@ -8138,10 +8106,10 @@ const menuV1 = {
|
|
|
8138
8106
|
};
|
|
8139
8107
|
regElement(menuV1);
|
|
8140
8108
|
function spawn$7(e, p) {
|
|
8141
|
-
let m =
|
|
8142
|
-
return
|
|
8143
|
-
nodeLite: toNodeLite(
|
|
8144
|
-
nodes: { [
|
|
8109
|
+
let m = createNode(e, p, "ui_number_input_v1");
|
|
8110
|
+
return m.settings.label = "label", m.settings.placeholder = "placeholder", {
|
|
8111
|
+
nodeLite: toNodeLite(m),
|
|
8112
|
+
nodes: { [m.basic.id]: m }
|
|
8145
8113
|
};
|
|
8146
8114
|
}
|
|
8147
8115
|
var size = {
|
|
@@ -8479,28 +8447,28 @@ const radioV1 = {
|
|
|
8479
8447
|
};
|
|
8480
8448
|
regElement(radioV1);
|
|
8481
8449
|
function spawn$6(e, p) {
|
|
8482
|
-
let m =
|
|
8483
|
-
|
|
8484
|
-
let
|
|
8450
|
+
let m = createNode(e, p, "ui_radio_group_v1");
|
|
8451
|
+
m.settings.value = "option1";
|
|
8452
|
+
let g = spawnEntry$2(e, p, "option1", "Option 1"), _ = spawnEntry$2(e, p, "option2", "Option 2"), v = spawnEntry$2(e, p, "option3", "Option 3");
|
|
8485
8453
|
return {
|
|
8486
|
-
nodeLite: toNodeLite(
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8454
|
+
nodeLite: toNodeLite(m, [
|
|
8455
|
+
g.nodeLite,
|
|
8456
|
+
_.nodeLite,
|
|
8457
|
+
v.nodeLite
|
|
8490
8458
|
]),
|
|
8491
8459
|
nodes: {
|
|
8492
|
-
[
|
|
8493
|
-
...
|
|
8494
|
-
...
|
|
8495
|
-
...
|
|
8460
|
+
[m.basic.id]: m,
|
|
8461
|
+
...g.nodes,
|
|
8462
|
+
..._.nodes,
|
|
8463
|
+
...v.nodes
|
|
8496
8464
|
}
|
|
8497
8465
|
};
|
|
8498
8466
|
}
|
|
8499
8467
|
function spawnEntry$2(e, p, m, g) {
|
|
8500
|
-
let _ =
|
|
8501
|
-
return
|
|
8502
|
-
nodeLite: toNodeLite(
|
|
8503
|
-
nodes: { [
|
|
8468
|
+
let _ = createNode(e, p, "ui_radio_v1");
|
|
8469
|
+
return _.settings.value = m, _.settings.label = g, {
|
|
8470
|
+
nodeLite: toNodeLite(_),
|
|
8471
|
+
nodes: { [_.basic.id]: _ }
|
|
8504
8472
|
};
|
|
8505
8473
|
}
|
|
8506
8474
|
var settings$14 = {
|
|
@@ -8945,78 +8913,72 @@ const sliderV1 = {
|
|
|
8945
8913
|
};
|
|
8946
8914
|
regElement(sliderV1);
|
|
8947
8915
|
function spawn$5(e, p) {
|
|
8948
|
-
let m =
|
|
8949
|
-
initProperties(_, g), _.basic.id = genId(16), _.basic.key = m.key;
|
|
8950
|
-
let v = spawnHeader(e, p), y = spawnWindow(e, p);
|
|
8916
|
+
let m = createNode(e, p, "ui_stepper_v1"), g = spawnHeader(e, p), _ = spawnWindow(e, p);
|
|
8951
8917
|
return {
|
|
8952
|
-
nodeLite: toNodeLite(
|
|
8918
|
+
nodeLite: toNodeLite(m, [g.nodeLite, _.nodeLite]),
|
|
8953
8919
|
nodes: {
|
|
8954
|
-
[
|
|
8955
|
-
...
|
|
8956
|
-
...
|
|
8920
|
+
[m.basic.id]: m,
|
|
8921
|
+
...g.nodes,
|
|
8922
|
+
..._.nodes
|
|
8957
8923
|
}
|
|
8958
8924
|
};
|
|
8959
8925
|
}
|
|
8960
8926
|
function spawnHeader(e, p) {
|
|
8961
|
-
let m =
|
|
8962
|
-
initProperties(_, g), _.basic.id = genId(16), _.basic.key = m.key;
|
|
8963
|
-
let v = spawnItem(e, p, "step1"), y = spawnItem(e, p, "step2"), b = spawnItem(e, p, "step3");
|
|
8927
|
+
let m = createNode(e, p, "ui_stepper_header_v1"), g = spawnItem(e, p, "step1"), _ = spawnItem(e, p, "step2"), v = spawnItem(e, p, "step3");
|
|
8964
8928
|
return {
|
|
8965
|
-
nodeLite: toNodeLite(
|
|
8966
|
-
|
|
8967
|
-
|
|
8968
|
-
|
|
8929
|
+
nodeLite: toNodeLite(m, [
|
|
8930
|
+
g.nodeLite,
|
|
8931
|
+
_.nodeLite,
|
|
8932
|
+
v.nodeLite
|
|
8969
8933
|
]),
|
|
8970
8934
|
nodes: {
|
|
8971
|
-
[
|
|
8972
|
-
...
|
|
8973
|
-
...
|
|
8974
|
-
...
|
|
8935
|
+
[m.basic.id]: m,
|
|
8936
|
+
...g.nodes,
|
|
8937
|
+
..._.nodes,
|
|
8938
|
+
...v.nodes
|
|
8975
8939
|
}
|
|
8976
8940
|
};
|
|
8977
8941
|
}
|
|
8978
8942
|
function spawnItem(e, p, m) {
|
|
8979
|
-
let g =
|
|
8980
|
-
return
|
|
8981
|
-
nodeLite: toNodeLite(
|
|
8982
|
-
nodes: { [
|
|
8943
|
+
let g = createNode(e, p, "ui_stepper_item_v1");
|
|
8944
|
+
return g.settings.value = m, {
|
|
8945
|
+
nodeLite: toNodeLite(g, []),
|
|
8946
|
+
nodes: { [g.basic.id]: g }
|
|
8983
8947
|
};
|
|
8984
8948
|
}
|
|
8985
8949
|
function spawnWindow(e, p) {
|
|
8986
|
-
let m =
|
|
8987
|
-
initProperties(_, g), _.basic.id = genId(16), _.basic.key = m.key;
|
|
8988
|
-
let v = spawnWindowItem(e, p, "step1", "step 1"), y = spawnWindowItem(e, p, "step2", "step 2"), b = spawnWindowItem(e, p, "step3", "step 3");
|
|
8950
|
+
let m = createNode(e, p, "ui_stepper_window_v1"), g = spawnWindowItem(e, p, "step1", "step 1"), _ = spawnWindowItem(e, p, "step2", "step 2"), v = spawnWindowItem(e, p, "step3", "step 3");
|
|
8989
8951
|
return {
|
|
8990
|
-
nodeLite: toNodeLite(
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8952
|
+
nodeLite: toNodeLite(m, [
|
|
8953
|
+
g.nodeLite,
|
|
8954
|
+
_.nodeLite,
|
|
8955
|
+
v.nodeLite
|
|
8994
8956
|
]),
|
|
8995
8957
|
nodes: {
|
|
8996
|
-
[
|
|
8997
|
-
...
|
|
8998
|
-
...
|
|
8999
|
-
...
|
|
8958
|
+
[m.basic.id]: m,
|
|
8959
|
+
...g.nodes,
|
|
8960
|
+
..._.nodes,
|
|
8961
|
+
...v.nodes
|
|
9000
8962
|
}
|
|
9001
8963
|
};
|
|
9002
8964
|
}
|
|
9003
8965
|
function spawnWindowItem(e, p, m, g) {
|
|
9004
|
-
let _ =
|
|
9005
|
-
|
|
9006
|
-
let
|
|
8966
|
+
let _ = createNode(e, p, "ui_stepper_window_item_v1");
|
|
8967
|
+
_.settings.value = m;
|
|
8968
|
+
let v = spawnCard(e, p, g);
|
|
9007
8969
|
return {
|
|
9008
|
-
nodeLite: toNodeLite(
|
|
8970
|
+
nodeLite: toNodeLite(_, [v.nodeLite]),
|
|
9009
8971
|
nodes: {
|
|
9010
|
-
[
|
|
9011
|
-
...
|
|
8972
|
+
[_.basic.id]: _,
|
|
8973
|
+
...v.nodes
|
|
9012
8974
|
}
|
|
9013
8975
|
};
|
|
9014
8976
|
}
|
|
9015
8977
|
function spawnCard(e, p, m) {
|
|
9016
|
-
let g =
|
|
9017
|
-
return
|
|
9018
|
-
nodeLite: toNodeLite(
|
|
9019
|
-
nodes: { [
|
|
8978
|
+
let g = createNode(e, p, "ui_card_v1");
|
|
8979
|
+
return g.settings.title = m, {
|
|
8980
|
+
nodeLite: toNodeLite(g, []),
|
|
8981
|
+
nodes: { [g.basic.id]: g }
|
|
9020
8982
|
};
|
|
9021
8983
|
}
|
|
9022
8984
|
var settings$9 = {
|
|
@@ -9143,28 +9105,26 @@ const tabV1 = {
|
|
|
9143
9105
|
};
|
|
9144
9106
|
regElement(tabV1);
|
|
9145
9107
|
function spawn$4(e, p) {
|
|
9146
|
-
let m =
|
|
9147
|
-
initProperties(_, g), _.basic.id = genId(16), _.basic.key = m.key;
|
|
9148
|
-
let v = spawnTab(e, p, "tab1", "tab 1"), y = spawnTab(e, p, "tab2", "tab 2"), b = spawnTab(e, p, "tab3", "tab 3");
|
|
9108
|
+
let m = createNode(e, p, "ui_tabs_v1"), g = spawnTab(e, p, "tab1", "tab 1"), _ = spawnTab(e, p, "tab2", "tab 2"), v = spawnTab(e, p, "tab3", "tab 3");
|
|
9149
9109
|
return {
|
|
9150
|
-
nodeLite: toNodeLite(
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9110
|
+
nodeLite: toNodeLite(m, [
|
|
9111
|
+
g.nodeLite,
|
|
9112
|
+
_.nodeLite,
|
|
9113
|
+
v.nodeLite
|
|
9154
9114
|
]),
|
|
9155
9115
|
nodes: {
|
|
9156
|
-
[
|
|
9157
|
-
...
|
|
9158
|
-
...
|
|
9159
|
-
...
|
|
9116
|
+
[m.basic.id]: m,
|
|
9117
|
+
...g.nodes,
|
|
9118
|
+
..._.nodes,
|
|
9119
|
+
...v.nodes
|
|
9160
9120
|
}
|
|
9161
9121
|
};
|
|
9162
9122
|
}
|
|
9163
9123
|
function spawnTab(e, p, m, g) {
|
|
9164
|
-
let _ =
|
|
9165
|
-
return
|
|
9166
|
-
nodeLite: toNodeLite(
|
|
9167
|
-
nodes: { [
|
|
9124
|
+
let _ = createNode(e, p, "ui_tab_v1");
|
|
9125
|
+
return _.settings.value = m, _.settings.text = g, {
|
|
9126
|
+
nodeLite: toNodeLite(_),
|
|
9127
|
+
nodes: { [_.basic.id]: _ }
|
|
9168
9128
|
};
|
|
9169
9129
|
}
|
|
9170
9130
|
var backgroundColor = cloneDeep_default(colorV1);
|
|
@@ -9269,10 +9229,10 @@ const tabsV1 = {
|
|
|
9269
9229
|
};
|
|
9270
9230
|
regElement(tabsV1);
|
|
9271
9231
|
function spawn$3(e, p) {
|
|
9272
|
-
let m =
|
|
9273
|
-
return
|
|
9274
|
-
nodeLite: toNodeLite(
|
|
9275
|
-
nodes: { [
|
|
9232
|
+
let m = createNode(e, p, "ui_text_v1");
|
|
9233
|
+
return m.settings.text = "text", {
|
|
9234
|
+
nodeLite: toNodeLite(m),
|
|
9235
|
+
nodes: { [m.basic.id]: m }
|
|
9276
9236
|
};
|
|
9277
9237
|
}
|
|
9278
9238
|
var settings$4 = {
|
|
@@ -9375,10 +9335,10 @@ const textV1 = {
|
|
|
9375
9335
|
};
|
|
9376
9336
|
regElement(textV1);
|
|
9377
9337
|
function spawn$2(e, p) {
|
|
9378
|
-
let m =
|
|
9379
|
-
return
|
|
9380
|
-
nodeLite: toNodeLite(
|
|
9381
|
-
nodes: { [
|
|
9338
|
+
let m = createNode(e, p, "ui_textarea_v1");
|
|
9339
|
+
return m.settings.label = "label", {
|
|
9340
|
+
nodeLite: toNodeLite(m),
|
|
9341
|
+
nodes: { [m.basic.id]: m }
|
|
9382
9342
|
};
|
|
9383
9343
|
}
|
|
9384
9344
|
var settings$3 = {
|
|
@@ -9720,40 +9680,36 @@ const textFieldV1 = {
|
|
|
9720
9680
|
};
|
|
9721
9681
|
regElement(textFieldV1);
|
|
9722
9682
|
function spawn$1(e, p) {
|
|
9723
|
-
let m =
|
|
9724
|
-
initProperties(_, g), _.basic.id = genId(16), _.basic.key = m.key;
|
|
9725
|
-
let v = spawnEntry$1(e, p, "timeline 1"), y = spawnEntry$1(e, p, "timeline 2"), b = spawnEntry$1(e, p, "timeline 3");
|
|
9683
|
+
let m = createNode(e, p, "ui_timeline_v1"), g = spawnEntry$1(e, p, "timeline 1"), _ = spawnEntry$1(e, p, "timeline 2"), v = spawnEntry$1(e, p, "timeline 3");
|
|
9726
9684
|
return {
|
|
9727
|
-
nodeLite: toNodeLite(
|
|
9728
|
-
|
|
9729
|
-
|
|
9730
|
-
|
|
9685
|
+
nodeLite: toNodeLite(m, [
|
|
9686
|
+
g.nodeLite,
|
|
9687
|
+
_.nodeLite,
|
|
9688
|
+
v.nodeLite
|
|
9731
9689
|
]),
|
|
9732
9690
|
nodes: {
|
|
9733
|
-
[
|
|
9734
|
-
...
|
|
9735
|
-
...
|
|
9736
|
-
...
|
|
9691
|
+
[m.basic.id]: m,
|
|
9692
|
+
...g.nodes,
|
|
9693
|
+
..._.nodes,
|
|
9694
|
+
...v.nodes
|
|
9737
9695
|
}
|
|
9738
9696
|
};
|
|
9739
9697
|
}
|
|
9740
9698
|
function spawnEntry$1(e, p, m) {
|
|
9741
|
-
let g =
|
|
9742
|
-
initProperties(v, _), v.basic.id = genId(16), v.basic.key = g.key;
|
|
9743
|
-
let y = spawnText$1(e, p, m);
|
|
9699
|
+
let g = createNode(e, p, "ui_timeline_item_v1"), _ = spawnText$1(e, p, m);
|
|
9744
9700
|
return {
|
|
9745
|
-
nodeLite: toNodeLite(
|
|
9701
|
+
nodeLite: toNodeLite(g, [_.nodeLite]),
|
|
9746
9702
|
nodes: {
|
|
9747
|
-
[
|
|
9748
|
-
...
|
|
9703
|
+
[g.basic.id]: g,
|
|
9704
|
+
..._.nodes
|
|
9749
9705
|
}
|
|
9750
9706
|
};
|
|
9751
9707
|
}
|
|
9752
9708
|
function spawnText$1(e, p, m) {
|
|
9753
|
-
let g =
|
|
9754
|
-
return
|
|
9755
|
-
nodeLite: toNodeLite(
|
|
9756
|
-
nodes: { [
|
|
9709
|
+
let g = createNode(e, p, "ui_text_v1");
|
|
9710
|
+
return g.settings.text = m, {
|
|
9711
|
+
nodeLite: toNodeLite(g),
|
|
9712
|
+
nodes: { [g.basic.id]: g }
|
|
9757
9713
|
};
|
|
9758
9714
|
}
|
|
9759
9715
|
var dotColor = cloneDeep_default(colorV1), lineColor = cloneDeep_default(colorV1), settings$1 = {
|
|
@@ -9854,52 +9810,48 @@ const timelineItemV1 = {
|
|
|
9854
9810
|
};
|
|
9855
9811
|
regElement(timelineItemV1);
|
|
9856
9812
|
function spawn(e, p) {
|
|
9857
|
-
let m =
|
|
9858
|
-
initProperties(_, g), _.basic.id = genId(16), _.basic.key = m.key;
|
|
9859
|
-
let v = spawnEntry(e, p, "window 1"), y = spawnEntry(e, p, "window 2"), b = spawnEntry(e, p, "window 3");
|
|
9813
|
+
let m = createNode(e, p, "ui_window_v1"), g = spawnEntry(e, p, "window 1"), _ = spawnEntry(e, p, "window 2"), v = spawnEntry(e, p, "window 3");
|
|
9860
9814
|
return {
|
|
9861
|
-
nodeLite: toNodeLite(
|
|
9862
|
-
|
|
9863
|
-
|
|
9864
|
-
|
|
9815
|
+
nodeLite: toNodeLite(m, [
|
|
9816
|
+
g.nodeLite,
|
|
9817
|
+
_.nodeLite,
|
|
9818
|
+
v.nodeLite
|
|
9865
9819
|
]),
|
|
9866
9820
|
nodes: {
|
|
9867
|
-
[
|
|
9868
|
-
...
|
|
9869
|
-
...
|
|
9870
|
-
...
|
|
9821
|
+
[m.basic.id]: m,
|
|
9822
|
+
...g.nodes,
|
|
9823
|
+
..._.nodes,
|
|
9824
|
+
...v.nodes
|
|
9871
9825
|
}
|
|
9872
9826
|
};
|
|
9873
9827
|
}
|
|
9874
9828
|
function spawnEntry(e, p, m) {
|
|
9875
|
-
let g =
|
|
9876
|
-
initProperties(v, _), v.basic.id = genId(16), v.basic.key = g.key;
|
|
9877
|
-
let y = spawnFlexLayout(e, p, m);
|
|
9829
|
+
let g = createNode(e, p, "ui_window_item_v1"), _ = spawnFlexLayout(e, p, m);
|
|
9878
9830
|
return {
|
|
9879
|
-
nodeLite: toNodeLite(
|
|
9831
|
+
nodeLite: toNodeLite(g, [_.nodeLite]),
|
|
9880
9832
|
nodes: {
|
|
9881
|
-
[
|
|
9882
|
-
...
|
|
9833
|
+
[g.basic.id]: g,
|
|
9834
|
+
..._.nodes
|
|
9883
9835
|
}
|
|
9884
9836
|
};
|
|
9885
9837
|
}
|
|
9886
9838
|
function spawnFlexLayout(e, p, m) {
|
|
9887
|
-
let g =
|
|
9888
|
-
|
|
9889
|
-
let
|
|
9839
|
+
let g = createNode(e, p, "ui_flex_layout_v1");
|
|
9840
|
+
g.size.height = "200px", g.settings.mainAlign.xs = "center", g.settings.crossAlign.xs = "center", g.settings.backgroundColor.mode = "theme", g.settings.backgroundColor.theme = "background2";
|
|
9841
|
+
let _ = spawnText(e, p, m);
|
|
9890
9842
|
return {
|
|
9891
|
-
nodeLite: toNodeLite(
|
|
9843
|
+
nodeLite: toNodeLite(g, [_.nodeLite]),
|
|
9892
9844
|
nodes: {
|
|
9893
|
-
[
|
|
9894
|
-
...
|
|
9845
|
+
[g.basic.id]: g,
|
|
9846
|
+
..._.nodes
|
|
9895
9847
|
}
|
|
9896
9848
|
};
|
|
9897
9849
|
}
|
|
9898
9850
|
function spawnText(e, p, m) {
|
|
9899
|
-
let g =
|
|
9900
|
-
return
|
|
9901
|
-
nodeLite: toNodeLite(
|
|
9902
|
-
nodes: { [
|
|
9851
|
+
let g = createNode(e, p, "ui_text_v1");
|
|
9852
|
+
return g.settings.text = m, g.settings.style.xs = "h6", {
|
|
9853
|
+
nodeLite: toNodeLite(g),
|
|
9854
|
+
nodes: { [g.basic.id]: g }
|
|
9903
9855
|
};
|
|
9904
9856
|
}
|
|
9905
9857
|
var settings = {
|
|
@@ -10017,59 +9969,39 @@ function initProperties(e, p) {
|
|
|
10017
9969
|
}
|
|
10018
9970
|
p.forEach((p) => m(e, p));
|
|
10019
9971
|
}
|
|
9972
|
+
function createNode(e, p, m) {
|
|
9973
|
+
let g = getElement(m);
|
|
9974
|
+
if (!g) throw Error(`element not found key=${m}`);
|
|
9975
|
+
let _ = g.properties[getTag(e, p)];
|
|
9976
|
+
if (!_) throw Error(`properties not found key=${m}`);
|
|
9977
|
+
let v = { basic: {
|
|
9978
|
+
id: "",
|
|
9979
|
+
key: ""
|
|
9980
|
+
} };
|
|
9981
|
+
return initProperties(v, _), v.basic.id = genId(16), v.basic.key = g.key, v;
|
|
9982
|
+
}
|
|
10020
9983
|
function spawnNode(e, p, m, g, _) {
|
|
10021
|
-
let v =
|
|
10022
|
-
if (!
|
|
10023
|
-
console.error(`spawnNode pkg not found version, ${v}`);
|
|
10024
|
-
return;
|
|
10025
|
-
}
|
|
9984
|
+
let v = pkgs[m];
|
|
9985
|
+
if (!v) throw Error(`pkg not found version=${m}`);
|
|
10026
9986
|
if (g) {
|
|
10027
|
-
let
|
|
10028
|
-
if (!
|
|
10029
|
-
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
if (!m) {
|
|
10034
|
-
console.error(`spawnNode [ref] element not found in global, ${v}`);
|
|
10035
|
-
return;
|
|
10036
|
-
}
|
|
10037
|
-
let g = m.properties[y];
|
|
10038
|
-
if (!g) {
|
|
10039
|
-
console.error(`spawnNode [ref] properties not found, ${v}`);
|
|
10040
|
-
return;
|
|
10041
|
-
}
|
|
10042
|
-
let x = initNode();
|
|
10043
|
-
return initProperties(x, g), x.basic.id = genId(16), x.basic.key = e, x.settings ||= {}, x.settings.comp = p, {
|
|
10044
|
-
nodeLite: toNodeLite(x),
|
|
10045
|
-
nodes: { [x.basic.id]: x }
|
|
9987
|
+
let g = v.refKey, y = _;
|
|
9988
|
+
if (!v.elements.has(g)) throw Error(`element not found in pkg, key=${g} version=${m}`);
|
|
9989
|
+
let b = createNode(e, p, g);
|
|
9990
|
+
return b.settings ||= {}, b.settings.comp = y, {
|
|
9991
|
+
nodeLite: toNodeLite(b),
|
|
9992
|
+
nodes: { [b.basic.id]: b }
|
|
10046
9993
|
};
|
|
10047
9994
|
} else {
|
|
10048
|
-
let
|
|
10049
|
-
if (!
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
let
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10057
|
-
}
|
|
10058
|
-
if (g.spawn) return g.spawn(e, p);
|
|
10059
|
-
{
|
|
10060
|
-
let e = g.properties[y];
|
|
10061
|
-
if (!e) {
|
|
10062
|
-
console.error(`spawnNode [key] properties not found, ${v}`);
|
|
10063
|
-
return;
|
|
10064
|
-
}
|
|
10065
|
-
let p = initNode();
|
|
10066
|
-
initProperties(p, e), p.basic.id = genId(16), p.basic.key = m;
|
|
10067
|
-
let _;
|
|
10068
|
-
return g.leaf || (_ = []), {
|
|
10069
|
-
nodeLite: toNodeLite(p, _),
|
|
10070
|
-
nodes: { [p.basic.id]: p }
|
|
10071
|
-
};
|
|
10072
|
-
}
|
|
9995
|
+
let g = _;
|
|
9996
|
+
if (!v.elements.has(g)) throw Error(`element not found in pkg, key=${g} version=${m}`);
|
|
9997
|
+
let y = getElement(g);
|
|
9998
|
+
if (!y) throw Error(`element not found key=${g}`);
|
|
9999
|
+
if (y.spawn) return y.spawn(e, p);
|
|
10000
|
+
let b = createNode(e, p, g), x;
|
|
10001
|
+
return y.leaf || (x = []), {
|
|
10002
|
+
nodeLite: toNodeLite(b, x),
|
|
10003
|
+
nodes: { [b.basic.id]: b }
|
|
10004
|
+
};
|
|
10073
10005
|
}
|
|
10074
10006
|
}
|
|
10075
10007
|
function getNodeLite(e, p) {
|
|
@@ -11237,4 +11169,4 @@ async function loadLocaleMessageRuntime(e) {
|
|
|
11237
11169
|
"./locales/zhHans/index.ts": () => import("./zhHans.gwvwcjmv.js")
|
|
11238
11170
|
}, `./locales/${e}/index.ts`, 4)).default;
|
|
11239
11171
|
}
|
|
11240
|
-
export { addIndent, ambientLightV1, badgeV1, barChartV1, boxGeometryV1, breakpoints, btnGroupV1, btnToggleV1, btnV1, calcBreakpoint, cardV1, checkboxV1, chipGroupV1, chipV1, colorPickerV1, comboboxV1, compTypes, containerV1, dataStringify, dataTableV1, datePickerV1, dialogV1, directionalLightV1, duplicateNodePair, duplicateNodePairs, elementKeys, fileInputV1, finalProperties, flexLayoutEntryV1, flexLayoutV1, formV1, fromDotString, genId, getAllElements, getBreakpointProp, getElement,
|
|
11172
|
+
export { addIndent, ambientLightV1, badgeV1, barChartV1, boxGeometryV1, breakpoints, btnGroupV1, btnToggleV1, btnV1, calcBreakpoint, cardV1, checkboxV1, chipGroupV1, chipV1, colorPickerV1, comboboxV1, compTypes, containerV1, createNode, dataStringify, dataTableV1, datePickerV1, dialogV1, directionalLightV1, duplicateNodePair, duplicateNodePairs, elementKeys, fileInputV1, finalProperties, flexLayoutEntryV1, flexLayoutV1, formV1, fromDotString, genId, getAllElements, getBreakpointProp, getElement, getField, getImplementMethodName, getIndexOfBreakpoint, getNodeLite, getPropertyDefault, getTag, globalityV1, groupV1, hasComp, hasSlot, iconV1, initProperties, injectDark, injectData, injectDepends, injectDevice, injectEnv, injectId, injectMeta, injectMode, injectNode, injectOrg, injectRuntime, injectSandbox, injectType, isCircularReference, isExecutableMode, isPercentStr, isPixelStr, keyboardControlsV1, lineChartV1, loadLocaleMessageRuntime, makeEventId, makeEventKeyOfCustomSlot, makeEventKeyOfElementSlot, makeMethodId, makeMethodKeyOfCustomSlot, makeMethodKeyOfElementSlot, makePropertyId, makePropertyKeyOfCustomSlot, makePropertyKeyOfElementSlot, makeSlotId, makeTriggerId, mapControlsV1, menuV1, meshBasicMaterialV1, meshV1, metaStringify, multipleRefV1, multipleSlotV1, numberInputV1, orbitControlsV1, orthographicCameraV1, pageTypes, paginationV1, parseData, parseMeta, parsePercentStr, parsePixelStr, perspectiveCameraV1, pkgs, pointLightV1, provideDark, provideData, provideDepends, provideDevice, provideEnv, provideId, provideMeta, provideMode, provideNode, provideOrg, provideRuntime, provideSandbox, provideType, radioGroupV1, radioV1, rangeSliderV1, ratingV1, referenceV1, regElement, renderSwitchV1, reverseBreakpoints, selectV1, setField, sliderV1, slotV1, spawnNode, sphereGeometryV1, spotLightV1, stepperHeaderV1, stepperItemV1, stepperV1, stepperWindowItemV1, stepperWindowV1, switchV1, tabV1, tabsV1, textFieldV1, textV1, textareaV1, timelineItemV1, timelineV1, toDotString, toEventName, toMethodName, toNodeLite, toPropertyName, unwrapEventId, unwrapEventKeyOfCustomSlot, unwrapEventKeyOfElementSlot, unwrapMethodId, unwrapMethodKeyOfCustomSlot, unwrapMethodKeyOfElementSlot, unwrapPropertyId, unwrapPropertyKeyOfCustomSlot, unwrapPropertyKeyOfElementSlot, unwrapSlotId, unwrapTriggerId, useDepend, useRuntime, useSandbox, useTheme, windowItemV1, windowV1 };
|
package/dist/types/data.d.ts
CHANGED
package/dist/types/protocol.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const pageTypes: string[];
|
|
|
4
4
|
export type PageType = (typeof pageTypes)[number];
|
|
5
5
|
export declare const compTypes: string[];
|
|
6
6
|
export type CompType = (typeof compTypes)[number];
|
|
7
|
-
export type Tag = 'pageUi' | 'compUi' | '
|
|
7
|
+
export type Tag = 'pageUi' | 'compUi' | 'page3d' | 'comp3d';
|
|
8
8
|
export declare function getTag(type: string, subtype: string): Tag;
|
|
9
9
|
export type ZField = {
|
|
10
10
|
key: string;
|
|
@@ -206,7 +206,7 @@ export type ZElement = {
|
|
|
206
206
|
leaf?: boolean;
|
|
207
207
|
internal?: boolean;
|
|
208
208
|
teleport?: boolean;
|
|
209
|
-
spawn?: (type: string, subtype: string) => NodePair
|
|
209
|
+
spawn?: (type: string, subtype: string) => NodePair;
|
|
210
210
|
};
|
|
211
211
|
export type ZElements = {
|
|
212
212
|
[key: string]: ZElement;
|
package/dist/utils/node.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { NodeLite, NodePair } from '../types';
|
|
2
|
-
export declare function
|
|
1
|
+
import { Node, NodeLite, NodePair, ZElementKey } from '../types';
|
|
2
|
+
export declare function createNode(type: string, subtype: string, key: ZElementKey): Node;
|
|
3
|
+
export declare function spawnNode(type: string, subtype: string, version: string, ref: boolean, keyOrRefId: string): NodePair;
|
|
3
4
|
export declare function getNodeLite(nodeLites: NodeLite[], id: string): NodeLite | undefined;
|
|
4
5
|
export declare function duplicateNodePair(src: NodePair): NodePair;
|
|
5
6
|
export declare function duplicateNodePairs(srcs: NodePair[]): NodePair[];
|