x-runtime-lib 0.8.192 → 0.8.194
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/elementSlotMethod.d.ts +1 -0
- package/dist/composables/element/core/elementSlotProperty.d.ts +1 -2
- package/dist/composables/element/core/index.d.ts +0 -2
- package/dist/composables/runtime/sandbox.d.ts +1 -1
- package/dist/index.js +2349 -2258
- package/dist/sandbox/common/index.d.ts +9 -1
- package/dist/sandbox/index.d.ts +1 -0
- package/dist/sandbox/sandbox/hooks.d.ts +2 -7
- package/dist/sandbox/sandbox/index.d.ts +54 -38
- package/dist/types/data.d.ts +0 -1
- package/dist/utils/property.d.ts +0 -1
- package/package.json +1 -1
- package/dist/composables/element/core/multipleElementSlotMethod.d.ts +0 -10
- package/dist/composables/element/core/multipleElementSlotProperty.d.ts +0 -3
- package/dist/sandbox/common/vmUtils.d.ts +0 -2
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import { QuickJSContext } from 'quickjs-emscripten';
|
|
2
|
+
export type InitValues = {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
};
|
|
5
|
+
export interface Inputs {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}
|
|
8
|
+
export declare function newAny(vm: QuickJSContext, value: any): import("quickjs-emscripten").QuickJSHandle;
|
|
9
|
+
export declare function makeFuncInfo(funcName: string, ...params: any[]): string;
|
package/dist/sandbox/index.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
export interface Hooks {
|
|
2
2
|
onReady: () => void;
|
|
3
3
|
onDestroy: () => void;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
onMultipleElementSlotPropertyChange: (nodeId: string, spec: string, elementId: string, slotKey: string, propertyKey: string, newValue: any, oldValue: any) => void;
|
|
7
|
-
onCustomSlotPropetyChange: (propertyKey: string, newValue: any, oldValue: any) => void;
|
|
8
|
-
onMultipleCustomSlotPropertyChange: (spec: string, propertyKey: string, newValue: any, oldValue: any) => void;
|
|
9
|
-
onCustomPropertyChange: (propertyKey: string, newValue: any, oldValue: any) => void;
|
|
10
|
-
onStateChange: (stateId: string, newValue: any, oldValue: any) => void;
|
|
4
|
+
onPropertyChange: (id: string, newValue: any, oldValue: any, instance?: string) => void;
|
|
5
|
+
onStateChange: (id: string, newValue: any, oldValue: any) => void;
|
|
11
6
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { QuickJSContext, QuickJSRuntime } from 'quickjs-emscripten';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
3
|
import { Data, Env, Meta, Mode, SandboxKind } from '@/types';
|
|
4
|
+
import { InitValues, Inputs } from '../common';
|
|
4
5
|
import { Hooks } from './hooks';
|
|
5
6
|
import { PromiseManager } from './promiseManager';
|
|
6
|
-
export type InitValues = {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
};
|
|
9
7
|
export declare class Sandbox {
|
|
10
8
|
kind: SandboxKind;
|
|
11
9
|
nodeId: string;
|
|
12
|
-
|
|
10
|
+
slotId: string;
|
|
11
|
+
instance: string;
|
|
13
12
|
parent: Sandbox | undefined;
|
|
14
13
|
children: {
|
|
15
14
|
[key: string]: Sandbox;
|
|
@@ -22,7 +21,7 @@ export declare class Sandbox {
|
|
|
22
21
|
hooks: Hooks;
|
|
23
22
|
vm: QuickJSContext | undefined;
|
|
24
23
|
promiseManager: PromiseManager | undefined;
|
|
25
|
-
constructor(kind: SandboxKind, nodeId: string,
|
|
24
|
+
constructor(kind: SandboxKind, nodeId: string, slotId: string, instance: string, parent: Sandbox | undefined, org: string, env: Env, mode: Mode, type: 'page' | 'comp', hooks: Hooks);
|
|
26
25
|
dispose(): void;
|
|
27
26
|
debugTrace(...data: any[]): void;
|
|
28
27
|
private addChild;
|
|
@@ -36,42 +35,59 @@ export declare class Sandbox {
|
|
|
36
35
|
getGlobalVariable(key: string): any;
|
|
37
36
|
callFunctionSync(funcName: string, ...params: any[]): any;
|
|
38
37
|
callFunctionAsync(funcName: string, ...params: any[]): Promise<any>;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
isValidOfMultipleElementSlotProperty(propertyKey: string): boolean;
|
|
46
|
-
getMultipleElementSlotProperty(spec: string, propertyKey: string): Promise<any>;
|
|
47
|
-
setMultipeElementSlotProperty(spec: string, propertyKey: string, value: any): Promise<void>;
|
|
48
|
-
private customProperties;
|
|
49
|
-
private resetCustomProperties;
|
|
50
|
-
isValidOfCustomProperty(key: string): boolean;
|
|
51
|
-
getCustomProperty(key: string): Promise<any>;
|
|
52
|
-
setCustomProperty(key: string, newValue: any): Promise<void>;
|
|
53
|
-
private customSlotProperties;
|
|
54
|
-
private resetCustomSlotProperties;
|
|
55
|
-
getCustomSlotProperty(key: string): Promise<any>;
|
|
56
|
-
setCustomSlotProperty(key: string, newValue: any): Promise<void>;
|
|
57
|
-
callElementMethod(id: string, key: string, inputs: {
|
|
38
|
+
isValidOfElementEvent(elementKey: string, eventKey: string): boolean;
|
|
39
|
+
isValidOfElementSlotEvent(elementKey: string, slotKey: string, eventKey: string): boolean;
|
|
40
|
+
isValidOfCustomEvent(eventId: string): boolean;
|
|
41
|
+
isValidOfCustomSlotEvent(slotId: string, eventId: string): boolean;
|
|
42
|
+
triggerEvent(id: string, instance: string, ...params: any[]): Promise<void>;
|
|
43
|
+
customProperties: {
|
|
58
44
|
[key: string]: any;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
}>;
|
|
62
|
-
callElementSlotMethod(methodKey: string, inputs: {
|
|
63
|
-
[key: string]: any;
|
|
64
|
-
}): Promise<{
|
|
65
|
-
[key: string]: any;
|
|
66
|
-
}>;
|
|
67
|
-
callMultipleElementSlotMethod(spec: string, methodKey: string, inputs: {
|
|
68
|
-
[key: string]: any;
|
|
69
|
-
}): Promise<{
|
|
45
|
+
};
|
|
46
|
+
customSlotProperties: {
|
|
70
47
|
[key: string]: any;
|
|
71
|
-
}
|
|
48
|
+
};
|
|
49
|
+
private resetProperties;
|
|
50
|
+
isValidOfElementProperty(elementKey: string, propertyKey: string): boolean;
|
|
51
|
+
isValidOfElementSlotProperty(elementKey: string, slotKey: string, propertyKey: string): boolean;
|
|
52
|
+
isValidOfCustomProperty(propertyId: string): boolean;
|
|
53
|
+
isValidOfCustomSlotProperty(slotId: string, propertyId: string): boolean;
|
|
54
|
+
getProperty(id: string, instance?: string): Promise<any>;
|
|
55
|
+
private getElementProperty;
|
|
56
|
+
private getElementSlotProperty;
|
|
57
|
+
private getMultipleElementSlotProperty;
|
|
58
|
+
private getRefProperty;
|
|
59
|
+
private getMultipleRefProperty;
|
|
60
|
+
private getCustomSlotProperty;
|
|
61
|
+
private getMultipleCustomSlotProperty;
|
|
62
|
+
private getCustomProperty;
|
|
63
|
+
private getElementAdaptSlotProperty;
|
|
64
|
+
private getCustomAdaptSlotProperty;
|
|
65
|
+
setProperty(id: string, newValue: any, instance?: string): Promise<void>;
|
|
66
|
+
private setElementProperty;
|
|
67
|
+
private setElementSlotProperty;
|
|
68
|
+
private setMultipleElementSlotProperty;
|
|
69
|
+
private setRefProperty;
|
|
70
|
+
private setMultipleRefProperty;
|
|
71
|
+
private setCustomSlotProperty;
|
|
72
|
+
private setMultipleCustomSlotProperty;
|
|
73
|
+
private setCustomProperty;
|
|
74
|
+
private setElementAdaptSlotProperty;
|
|
75
|
+
private setCustomAdaptSlotProperty;
|
|
76
|
+
isValidOfElementMethod(elementKey: string, methodKey: string): boolean;
|
|
77
|
+
isValidOfElementSlotMethod(elementKey: string, slotKey: string, methodKey: string): boolean;
|
|
78
|
+
isValidOfCustomMethod(methodId: string): boolean;
|
|
79
|
+
isValidOfCustomSlotMethod(slotId: string, methodId: string): boolean;
|
|
80
|
+
callMethod(id: string, instance: string, inputs: Inputs): Promise<void>;
|
|
81
|
+
private callElementMethod;
|
|
82
|
+
private callElementSlotMethod;
|
|
83
|
+
private callMultipleElementSlotMethod;
|
|
84
|
+
private callRefMethod;
|
|
85
|
+
private callMultipleRefMethod;
|
|
86
|
+
private callElementAdaptSlotMethod;
|
|
87
|
+
private callCustomAdaptSlotMethod;
|
|
72
88
|
private states;
|
|
73
89
|
private resetStates;
|
|
74
90
|
isValidOfState(stateId: string): boolean;
|
|
75
|
-
getState(stateId: string): any
|
|
76
|
-
setState(stateId: string, newValue: any): void
|
|
91
|
+
getState(stateId: string): Promise<any>;
|
|
92
|
+
setState(stateId: string, newValue: any): Promise<void>;
|
|
77
93
|
}
|
package/dist/types/data.d.ts
CHANGED
package/dist/utils/property.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { Node, ZProperty } from '@/types';
|
|
2
2
|
export declare function getPropertyDefault(property: ZProperty, arrayEntry?: boolean): unknown;
|
|
3
3
|
export declare function initProperties(node: Node, properties: ZProperty[]): void;
|
|
4
|
-
export declare function isLeafOfPropertyKeys(elementKey: string, type: string, subtype: string, propertyKeys: string | string[]): boolean;
|
package/package.json
CHANGED