x-runtime-lib 0.9.32 → 0.9.34
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/index.d.ts +13 -22
- package/dist/index.js +2975 -2906
- package/dist/{vendor.jsm93uq6.js → vendor.gtr2b2v9.js} +5086 -5086
- package/package.json +19 -19
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare type BindContext = {
|
|
|
24
24
|
nodeIds?: {
|
|
25
25
|
[alias: string]: string;
|
|
26
26
|
};
|
|
27
|
-
hooks:
|
|
27
|
+
hooks: Hooks;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
export declare type BindHandle = (ctx: BindContext, state: BlockState) => void;
|
|
@@ -146,7 +146,7 @@ declare interface EventInfo {
|
|
|
146
146
|
key: string;
|
|
147
147
|
name: string;
|
|
148
148
|
type: Type;
|
|
149
|
-
};
|
|
149
|
+
}[];
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
export declare type EventKind = 'elementEvent' | 'elementPropertyChangeEvent' | 'elementSlotEvent' | 'elementSlotPropertyChangeEvent' | 'multipleElementSlotEvent' | 'multipleElementSlotPropertyChangeEvent' | 'refEvent' | 'refPropertyChangeEvent' | 'multipleRefEvent' | 'multipleRefPropertyChangeEvent' | 'customSlotEvent' | 'customSlotPropertyChangeEvent' | 'multipleCustomSlotEvent' | 'multipleCustomSlotPropertyChangeEvent' | 'customEvent' | 'customPropertyChangeEvent' | 'elementAdaptSlotEvent' | 'elementAdaptSlotPropertyChangeEvent' | 'customAdaptSlotEvent' | 'customAdaptSlotPropertyChangeEvent' | 'stateChangeEvent';
|
|
@@ -202,14 +202,7 @@ export declare function hasInlineSlot(element: ZElement): boolean | undefined;
|
|
|
202
202
|
|
|
203
203
|
export declare function hasSlot(key: string): boolean;
|
|
204
204
|
|
|
205
|
-
declare
|
|
206
|
-
onReady: () => Promise<void>;
|
|
207
|
-
onDestroy: () => void;
|
|
208
|
-
onPropertyChange: (id: string, newValue: any, oldValue: any, instance?: string) => Promise<void>;
|
|
209
|
-
onStateChange: (id: string, newValue: any, oldValue: any) => Promise<void>;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
declare type Hooks_2 = {
|
|
205
|
+
declare type Hooks = {
|
|
213
206
|
getNodeInfo: (id: string) => NodeInfo | undefined;
|
|
214
207
|
getPropertyInfo: (id: string) => PropertyInfo | undefined;
|
|
215
208
|
getOnEventInfo: (id: string) => EventInfo | undefined;
|
|
@@ -218,6 +211,13 @@ declare type Hooks_2 = {
|
|
|
218
211
|
getImplementMethodInfo: (id: string) => MethodInfo | undefined;
|
|
219
212
|
};
|
|
220
213
|
|
|
214
|
+
declare interface Hooks_2 {
|
|
215
|
+
onReady: () => Promise<void>;
|
|
216
|
+
onDestroy: () => void;
|
|
217
|
+
onPropertyChange: (id: string, newValue: any, oldValue: any, instance?: string) => Promise<void>;
|
|
218
|
+
onStateChange: (id: string, newValue: any, oldValue: any) => Promise<void>;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
221
|
export declare function initProperties(node: Node_2, properties: ZProperty[]): void;
|
|
222
222
|
|
|
223
223
|
export declare function initQuickJS(): Promise<void>;
|
|
@@ -423,15 +423,6 @@ declare interface PropertyInfo {
|
|
|
423
423
|
id: string;
|
|
424
424
|
kind: PropertyKind;
|
|
425
425
|
names: string[];
|
|
426
|
-
meta: {
|
|
427
|
-
element: true;
|
|
428
|
-
raw: ZProperty;
|
|
429
|
-
} | {
|
|
430
|
-
element?: false;
|
|
431
|
-
raw: {
|
|
432
|
-
type: Type;
|
|
433
|
-
};
|
|
434
|
-
};
|
|
435
426
|
}
|
|
436
427
|
|
|
437
428
|
export declare type PropertyKind = 'elementProperty' | 'elementSlotProperty' | 'multipleElementSlotProperty' | 'refProperty' | 'multipleRefProperty' | 'customSlotProperty' | 'multipleCustomSlotProperty' | 'customProperty' | 'elementAdaptSlotProperty' | 'customAdaptSlotProperty';
|
|
@@ -514,10 +505,10 @@ declare class Sandbox {
|
|
|
514
505
|
mode: Mode;
|
|
515
506
|
type: 'page' | 'comp';
|
|
516
507
|
eventBus: Emitter<Record<EventType, unknown>>;
|
|
517
|
-
hooks:
|
|
508
|
+
hooks: Hooks_2;
|
|
518
509
|
vm: QuickJSContext | undefined;
|
|
519
510
|
promiseManager: PromiseManager | undefined;
|
|
520
|
-
constructor(kind: SandboxKind, nodeId: string, slotId: string, instance: string, parent: Sandbox | undefined, org: string, env: Env, mode: Mode, type: 'page' | 'comp', hooks:
|
|
511
|
+
constructor(kind: SandboxKind, nodeId: string, slotId: string, instance: string, parent: Sandbox | undefined, org: string, env: Env, mode: Mode, type: 'page' | 'comp', hooks: Hooks_2);
|
|
521
512
|
dispose(): void;
|
|
522
513
|
debugTrace(...data: any[]): void;
|
|
523
514
|
private addChild;
|
|
@@ -615,7 +606,7 @@ export declare type SandboxKind = 'root' | 'ref' | 'multipleRef' | 'elementSlot'
|
|
|
615
606
|
|
|
616
607
|
export declare function setField(object: any, keys: string | string[], value: any): void;
|
|
617
608
|
|
|
618
|
-
export declare function setupHooks(hooks:
|
|
609
|
+
export declare function setupHooks(hooks: Hooks): void;
|
|
619
610
|
|
|
620
611
|
export declare type Slot = {
|
|
621
612
|
id: string;
|