x-runtime-lib 0.8.49 → 0.8.51
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Data, Env, Mode } from '@/types';
|
|
1
|
+
import { Data, Env, Mode, SandboxKind } from '@/types';
|
|
2
2
|
export type PropertyKeys = string[] | string;
|
|
3
3
|
export declare function dotPropertyKeys(propertyKeys: PropertyKeys): string;
|
|
4
4
|
interface Hooks {
|
|
@@ -8,6 +8,7 @@ interface Hooks {
|
|
|
8
8
|
onStateChange: (stateId: string, newValue: any, oldValue: any) => void;
|
|
9
9
|
}
|
|
10
10
|
export declare class Sandbox {
|
|
11
|
+
kind: SandboxKind;
|
|
11
12
|
id: string;
|
|
12
13
|
parent: Sandbox | undefined;
|
|
13
14
|
children: {
|
|
@@ -19,7 +20,7 @@ export declare class Sandbox {
|
|
|
19
20
|
type: 'page' | 'comp';
|
|
20
21
|
eventBus: import("mitt").Emitter<Record<import("mitt").EventType, unknown>>;
|
|
21
22
|
private hooks?;
|
|
22
|
-
constructor(id: string, parent: Sandbox | undefined, org: string, env: Env, mode: Mode, type: 'page' | 'comp', hooks: Hooks);
|
|
23
|
+
constructor(kind: SandboxKind, id: string, parent: Sandbox | undefined, org: string, env: Env, mode: Mode, type: 'page' | 'comp', hooks: Hooks);
|
|
23
24
|
dispose(): void;
|
|
24
25
|
private addChild;
|
|
25
26
|
private removeChild;
|
package/dist/types/kind.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type SandboxKind = 'root' | 'reference' | 'multipleRef' | 'slot';
|
|
1
2
|
export type PropertyKind = 'elementProperty' | 'referenceProperty' | 'multipleRefProperty' | 'customProperty' | 'elementSlotProperty' | 'customSlotProperty';
|
|
2
3
|
export declare function isLocaleOfPropertyKind(kind: PropertyKind | ''): kind is "elementProperty" | "elementSlotProperty";
|
|
3
4
|
export type MethodKind = 'elementMethod' | 'referenceMethod' | 'multipleRefMethod' | 'customMethod' | 'elementSlotMethod' | 'customSlotMethod';
|