x-runtime-lib 0.8.54 → 0.8.56
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/elementMethod.d.ts +6 -2
- package/dist/index.js +1976 -1899
- package/dist/sandbox/sandbox/index.d.ts +14 -13
- package/dist/types/kind.d.ts +3 -3
- package/package.json +1 -1
|
@@ -20,11 +20,23 @@ export declare class Sandbox {
|
|
|
20
20
|
mode: Mode;
|
|
21
21
|
type: 'page' | 'comp';
|
|
22
22
|
eventBus: import("mitt").Emitter<Record<import("mitt").EventType, unknown>>;
|
|
23
|
-
private hooks
|
|
23
|
+
private hooks;
|
|
24
24
|
constructor(kind: SandboxKind, id: string, refKey: string, parent: Sandbox | undefined, org: string, env: Env, mode: Mode, type: 'page' | 'comp', hooks: Hooks);
|
|
25
25
|
dispose(): void;
|
|
26
26
|
private addChild;
|
|
27
27
|
private removeChild;
|
|
28
|
+
private interpreter;
|
|
29
|
+
createInterpreter(code: string): void;
|
|
30
|
+
destroyInterpreter(): void;
|
|
31
|
+
bindNativeFunction(name: string, func: Function): void;
|
|
32
|
+
bindAsyncFunction(name: string, func: Function): void;
|
|
33
|
+
pseudoToNative(obj: any): any;
|
|
34
|
+
nativeToPseudo(obj: any): any;
|
|
35
|
+
getVariable(varName: string): any;
|
|
36
|
+
setVariable(varName: string, value: any): void;
|
|
37
|
+
run(): void;
|
|
38
|
+
runCode(code: string): void;
|
|
39
|
+
callFunction(funcName: string, ...params: any): void;
|
|
28
40
|
private nodes;
|
|
29
41
|
syncNodes(data: Data | undefined): void;
|
|
30
42
|
getElementPropertyInner(node: any, propertyKeys: PropertyKeys): any;
|
|
@@ -39,21 +51,10 @@ export declare class Sandbox {
|
|
|
39
51
|
resetAdaptSlotProperties(): void;
|
|
40
52
|
getAdaptSlotProperty(propertyId: string): any;
|
|
41
53
|
setAdaptSlotProperty(propertyId: string, newValue: any): void;
|
|
54
|
+
callMethod(id: string, inputs: any[]): any[] | undefined;
|
|
42
55
|
private states;
|
|
43
56
|
resetStates(): void;
|
|
44
57
|
getState(stateId: string): any;
|
|
45
58
|
setState(stateId: string, newValue: string): void;
|
|
46
|
-
private interpreter;
|
|
47
|
-
createInterpreter(code: string): void;
|
|
48
|
-
destroyInterpreter(): void;
|
|
49
|
-
bindNativeFunction(name: string, func: Function): void;
|
|
50
|
-
bindAsyncFunction(name: string, func: Function): void;
|
|
51
|
-
pseudoToNative(obj: any): any;
|
|
52
|
-
nativeToPseudo(obj: any): any;
|
|
53
|
-
getVariable(varName: string): any;
|
|
54
|
-
setVariable(varName: string, value: any): void;
|
|
55
|
-
run(): void;
|
|
56
|
-
runCode(code: string): void;
|
|
57
|
-
callFunction(funcName: string, ...params: any): void;
|
|
58
59
|
}
|
|
59
60
|
export {};
|
package/dist/types/kind.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type SandboxKind = 'root' | 'reference' | 'multipleRef' | 'slot';
|
|
2
2
|
export type PropertyKind = 'elementProperty' | 'referenceProperty' | 'multipleRefProperty' | 'customProperty' | 'elementSlotProperty' | 'customSlotProperty';
|
|
3
|
-
export declare function isLocaleOfPropertyKind(kind: PropertyKind | ''):
|
|
3
|
+
export declare function isLocaleOfPropertyKind(kind: PropertyKind | ''): boolean;
|
|
4
4
|
export type MethodKind = 'elementMethod' | 'referenceMethod' | 'multipleRefMethod' | 'customMethod' | 'elementSlotMethod' | 'customSlotMethod';
|
|
5
|
-
export declare function isLocaleOfMethodKind(kind: MethodKind | ''):
|
|
5
|
+
export declare function isLocaleOfMethodKind(kind: MethodKind | ''): boolean;
|
|
6
6
|
export type EventKind = 'elementEvent' | 'referenceEvent' | 'multipleRefEvent' | 'customEvent' | 'elementSlotEvent' | 'customSlotEvent' | 'elementPropertyChangeEvent' | 'referencePropertyChangeEvent' | 'multipleRefPropertyChangeEvent' | 'customPropertyChangeEvent' | 'elementSlotPropertyChangeEvent' | 'customSlotPropertyChangeEvent' | 'stateChangeEvent';
|
|
7
|
-
export declare function isLocaleOfEventKind(kind: EventKind | ''):
|
|
7
|
+
export declare function isLocaleOfEventKind(kind: EventKind | ''): boolean;
|