x-runtime-lib 0.8.101 → 0.8.103
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/components/element/3d/camera/orthographicCamera/v1/index.vue.d.ts +2 -2
- package/dist/components/element/3d/camera/perspectiveCamera/v1/index.vue.d.ts +2 -2
- package/dist/components/element/3d/geometry/boxGeometry/v1/index.vue.d.ts +2 -2
- package/dist/components/element/3d/geometry/sphereGeometry/v1/index.vue.d.ts +2 -2
- package/dist/components/element/3d/light/ambientLight/v1/index.vue.d.ts +2 -2
- package/dist/components/element/3d/light/directionalLight/v1/index.vue.d.ts +2 -2
- package/dist/components/element/3d/light/pointLight/v1/index.vue.d.ts +2 -2
- package/dist/components/element/3d/light/spotLight/v1/index.vue.d.ts +2 -2
- package/dist/components/element/3d/object/group/v1/index.vue.d.ts +2 -2
- package/dist/components/element/3d/object/mesh/v1/index.vue.d.ts +2 -2
- package/dist/components/element/chart/barChart/v1/index.vue.d.ts +2 -2
- package/dist/components/element/chart/lineChart/v1/index.vue.d.ts +2 -2
- package/dist/components/element/dynamic/multipleRef/v1/index.vue.d.ts +2 -2
- package/dist/components/element/dynamic/reference/v1/index.vue.d.ts +2 -2
- package/dist/components/element/dynamic/renderSwitch/v1/index.vue.d.ts +2 -2
- package/dist/components/element/dynamic/slot/v1/index.vue.d.ts +2 -7
- package/dist/components/element/regular/badge/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/breadcrumbs/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/btn/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/btnToggle/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/card/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/checkbox/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/chip/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/chipGroup/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/colorPicker/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/combobox/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/container/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/dataTable/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/dialog/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/fileInput/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/flexLayout/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/flexLayoutEntry/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/form/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/icon/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/menu/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/numberInput/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/pagination/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/radio/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/radioGroup/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/rangeSlider/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/rating/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/select/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/slider/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/stepper/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/stepperItem/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/stepperWindowItem/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/switch/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/tab/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/tabs/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/text/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/textField/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/textarea/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/timeline/v1/index.vue.d.ts +2 -2
- package/dist/components/element/regular/window/v1/index.vue.d.ts +2 -2
- package/dist/composables/core/elementBase.d.ts +4 -0
- package/dist/composables/core/elementMethod.d.ts +2 -2
- package/dist/composables/core/elementProperty.d.ts +4 -3
- package/dist/composables/core/index.d.ts +1 -0
- package/dist/composables/element/3d/transform/v1/index.d.ts +6 -5
- package/dist/composables/element/chart/legend/v1/index.d.ts +3 -2
- package/dist/composables/element/chart/series/v1/index.d.ts +3 -2
- package/dist/composables/element/chart/title/v1/index.d.ts +3 -2
- package/dist/composables/element/chart/xAxis/v1/index.d.ts +3 -2
- package/dist/composables/element/chart/yAxis/v1/index.d.ts +3 -2
- package/dist/composables/element/common/border/v1/index.d.ts +3 -3
- package/dist/composables/element/common/margin/v1/index.d.ts +3 -3
- package/dist/composables/element/common/padding/v1/index.d.ts +3 -3
- package/dist/composables/element/common/size/v1/index.d.ts +3 -3
- package/dist/element/3d/geometry/boxGeometry/v1/spawn.d.ts +2 -2
- package/dist/element/3d/geometry/sphereGeometry/v1/spawn.d.ts +2 -2
- package/dist/element/chart/barChart/v1/spawn.d.ts +2 -2
- package/dist/element/chart/lineChart/v1/spawn.d.ts +2 -2
- package/dist/element/dynamic/slot/v1/index.d.ts +0 -0
- package/dist/element/dynamic/slot/v1/meta.d.ts +2 -0
- package/dist/element/regular/btn/v1/spawn.d.ts +2 -2
- package/dist/element/regular/card/v1/spawn.d.ts +2 -2
- package/dist/element/regular/chipGroup/v1/spawn.d.ts +2 -2
- package/dist/element/regular/flexLayout/v1/spawn.d.ts +2 -2
- package/dist/element/regular/form/v1/spawn.d.ts +2 -2
- package/dist/element/regular/numberInput/v1/spawn.d.ts +2 -2
- package/dist/element/regular/radioGroup/v1/spawn.d.ts +2 -2
- package/dist/element/regular/stepper/v1/spawn.d.ts +2 -2
- package/dist/element/regular/tabs/v1/spawn.d.ts +2 -2
- package/dist/element/regular/text/v1/spawn.d.ts +2 -2
- package/dist/element/regular/textarea/v1/spawn.d.ts +2 -2
- package/dist/element/regular/timeline/v1/spawn.d.ts +2 -2
- package/dist/element/regular/window/v1/spawn.d.ts +2 -2
- package/dist/index.js +3505 -3254
- package/dist/sandbox/sandbox/index.d.ts +3 -2
- package/dist/types/data.d.ts +21 -4
- package/dist/types/element.d.ts +3 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/{comp.d.ts → props.d.ts} +3 -5
- package/dist/utils/node.d.ts +2 -2
- package/dist/utils/property.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { QuickJSContext, QuickJSRuntime } from 'quickjs-emscripten';
|
|
2
2
|
import { Data, Env, Mode, SandboxKind } from '@/types';
|
|
3
3
|
import { PromiseManager } from './promiseManager';
|
|
4
|
+
import { Ref } from 'vue';
|
|
4
5
|
interface Hooks {
|
|
5
6
|
onElementPropertyChange: (nodeId: string, propertyKeys: string[], newValue: any, oldValue: any) => void;
|
|
6
7
|
onCustomPropertyChange: (propertyKey: string, newValue: any, oldValue: any) => void;
|
|
@@ -30,8 +31,8 @@ export declare class Sandbox {
|
|
|
30
31
|
createVm(runtime: QuickJSRuntime, code: string): Promise<void>;
|
|
31
32
|
destroyVm(): void;
|
|
32
33
|
callFunction(funcName: string, ...ps: any): void;
|
|
33
|
-
private
|
|
34
|
-
|
|
34
|
+
private data;
|
|
35
|
+
associateData(data: Ref<Data | undefined>): void;
|
|
35
36
|
getElementProperty(nodeId: string, propertyKeys: string[]): any;
|
|
36
37
|
setElementProperty(nodeId: string, propertyKeys: string[], newValue: any): void;
|
|
37
38
|
private customProperties;
|
package/dist/types/data.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type NodeLite = {
|
|
2
|
+
id: string;
|
|
3
|
+
key: string;
|
|
4
|
+
ref?: string;
|
|
5
|
+
children?: NodeLite[];
|
|
6
|
+
};
|
|
7
|
+
export type Node = {
|
|
2
8
|
basic: {
|
|
3
9
|
id: string;
|
|
4
10
|
key: string;
|
|
@@ -7,10 +13,21 @@ export interface Node {
|
|
|
7
13
|
reference?: {
|
|
8
14
|
comp: string | undefined;
|
|
9
15
|
};
|
|
10
|
-
|
|
11
|
-
}
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
export type SpawnedNode = {
|
|
19
|
+
nodeTree: NodeLite;
|
|
20
|
+
nodes: {
|
|
21
|
+
[key: string]: Node;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare function initNode(): Node;
|
|
25
|
+
export declare function toNodeLite(node: Node, children?: NodeLite[]): NodeLite;
|
|
12
26
|
export interface View {
|
|
13
|
-
|
|
27
|
+
nodeTree: NodeLite[];
|
|
28
|
+
nodes: {
|
|
29
|
+
[key: string]: Node;
|
|
30
|
+
};
|
|
14
31
|
}
|
|
15
32
|
interface TriggerElementProperty {
|
|
16
33
|
type: 'elementProperty';
|
package/dist/types/element.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Type } from './basic';
|
|
2
|
-
import {
|
|
2
|
+
import { SpawnedNode } from './data';
|
|
3
3
|
export type ZField = {
|
|
4
4
|
key: string;
|
|
5
5
|
name: string;
|
|
@@ -168,7 +168,7 @@ export type ZSlot = {
|
|
|
168
168
|
methods?: ZMethod[];
|
|
169
169
|
events?: ZEvent[];
|
|
170
170
|
};
|
|
171
|
-
export declare const elementKeys: readonly ["globality_v1", "multiple_ref_v1", "reference_v1", "render_switch_v1", "common_badge_v1", "common_breadcrumbs_v1", "common_bar_chart_v1", "common_btn_v1", "common_btn_group_v1", "common_btn_toggle_v1", "common_card_v1", "common_checkbox_v1", "common_chip_v1", "common_chip_group_v1", "common_color_picker_v1", "common_combobox_v1", "common_container_v1", "common_data_table_v1", "common_date_picker_v1", "common_dialog_v1", "common_file_input_v1", "common_flex_layout_v1", "common_flex_layout_entry_v1", "common_form_v1", "common_icon_v1", "common_line_chart_v1", "common_menu_v1", "common_number_input_v1", "common_pagination_v1", "common_radio_v1", "common_radio_group_v1", "common_range_slider_v1", "common_rating_v1", "common_select_v1", "common_slider_v1", "common_stepper_v1", "common_stepper_header_v1", "common_stepper_item_v1", "common_stepper_window_v1", "common_stepper_window_item_v1", "common_switch_v1", "common_tab_v1", "common_table_v1", "common_tabs_v1", "common_text_v1", "common_textarea_v1", "common_text_field_v1", "common_timeline_v1", "common_timeline_item_v1", "common_window_v1", "common_window_item_v1", "scene_ambient_light_v1", "scene_box_geometry_v1", "scene_directional_light_v1", "scene_group_v1", "scene_keyboard_controls_v1", "scene_map_controls_v1", "scene_mesh_v1", "scene_mesh_basic_material_v1", "scene_orbit_controls_v1", "scene_orthographic_camera_v1", "scene_perspective_camera_v1", "scene_point_light_v1", "scene_sphere_geometry_v1", "scene_spot_light_v1"];
|
|
171
|
+
export declare const elementKeys: readonly ["globality_v1", "multiple_ref_v1", "reference_v1", "render_switch_v1", "slot_v1", "common_badge_v1", "common_breadcrumbs_v1", "common_bar_chart_v1", "common_btn_v1", "common_btn_group_v1", "common_btn_toggle_v1", "common_card_v1", "common_checkbox_v1", "common_chip_v1", "common_chip_group_v1", "common_color_picker_v1", "common_combobox_v1", "common_container_v1", "common_data_table_v1", "common_date_picker_v1", "common_dialog_v1", "common_file_input_v1", "common_flex_layout_v1", "common_flex_layout_entry_v1", "common_form_v1", "common_icon_v1", "common_line_chart_v1", "common_menu_v1", "common_number_input_v1", "common_pagination_v1", "common_radio_v1", "common_radio_group_v1", "common_range_slider_v1", "common_rating_v1", "common_select_v1", "common_slider_v1", "common_stepper_v1", "common_stepper_header_v1", "common_stepper_item_v1", "common_stepper_window_v1", "common_stepper_window_item_v1", "common_switch_v1", "common_tab_v1", "common_table_v1", "common_tabs_v1", "common_text_v1", "common_textarea_v1", "common_text_field_v1", "common_timeline_v1", "common_timeline_item_v1", "common_window_v1", "common_window_item_v1", "scene_ambient_light_v1", "scene_box_geometry_v1", "scene_directional_light_v1", "scene_group_v1", "scene_keyboard_controls_v1", "scene_map_controls_v1", "scene_mesh_v1", "scene_mesh_basic_material_v1", "scene_orbit_controls_v1", "scene_orthographic_camera_v1", "scene_perspective_camera_v1", "scene_point_light_v1", "scene_sphere_geometry_v1", "scene_spot_light_v1"];
|
|
172
172
|
export type ZElementKey = (typeof elementKeys)[number];
|
|
173
173
|
export type ZElement = {
|
|
174
174
|
key: ZElementKey;
|
|
@@ -183,7 +183,7 @@ export type ZElement = {
|
|
|
183
183
|
leaf?: boolean;
|
|
184
184
|
internal?: boolean;
|
|
185
185
|
teleport?: boolean;
|
|
186
|
-
spawn?: (type: string, subtype: string) =>
|
|
186
|
+
spawn?: (type: string, subtype: string) => SpawnedNode | undefined;
|
|
187
187
|
};
|
|
188
188
|
export type ZElements = {
|
|
189
189
|
[key: string]: ZElement;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3,10 +3,8 @@ export interface RefContext {
|
|
|
3
3
|
compId: string;
|
|
4
4
|
}
|
|
5
5
|
export declare function isCircularRef(refContext: RefContext): boolean;
|
|
6
|
-
export interface
|
|
7
|
-
|
|
6
|
+
export interface ElementProps {
|
|
7
|
+
id: string;
|
|
8
8
|
outer?: boolean;
|
|
9
|
-
|
|
10
|
-
export interface RefProps extends BaseProps {
|
|
11
|
-
refContext: RefContext;
|
|
9
|
+
refContext?: RefContext;
|
|
12
10
|
}
|
package/dist/utils/node.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Node } from '../types';
|
|
2
|
-
export declare function spawnNode(type: string, subtype: string, version: string, ref: boolean, keyOrRefId: string):
|
|
1
|
+
import { Node, SpawnedNode } from '../types';
|
|
2
|
+
export declare function spawnNode(type: string, subtype: string, version: string, ref: boolean, keyOrRefId: string): SpawnedNode | undefined;
|
|
3
3
|
export declare function getNode(nodes: Node[], id: string): Node | undefined;
|
|
4
4
|
export declare function duplicateNode(src: Node): Node;
|
|
5
5
|
export declare function duplicateNodes(src: Node[]): Node[];
|
package/dist/utils/property.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ZProperty } from '@/types';
|
|
1
|
+
import { Node, ZProperty } from '@/types';
|
|
2
2
|
export declare function getPropertyTag(type: string, subtype: string): string | undefined;
|
|
3
3
|
export declare function getPropertyDefault(property: ZProperty, arrayEntry?: boolean): unknown;
|
|
4
|
-
export declare function initProperties(node:
|
|
4
|
+
export declare function initProperties(node: Node, properties: ZProperty[]): void;
|