@netless/window-manager 0.4.65 → 0.4.66
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/App/AppContext.d.ts +3 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +13 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +116 -75
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/App/AppContext.ts +10 -0
- package/src/App/AppProxy.ts +1 -0
- package/src/index.ts +11 -1
package/dist/App/AppContext.d.ts
CHANGED
@@ -73,4 +73,7 @@ export declare class AppContext<TAttributes extends {} = any, TMagixEventPayload
|
|
73
73
|
addPage: (params?: AddPageParams | undefined) => Promise<void>;
|
74
74
|
removePage: (index?: number | undefined) => Promise<boolean>;
|
75
75
|
get pageState(): PageState;
|
76
|
+
get kind(): string;
|
77
|
+
/** Dispatch a local event to `manager.onAppEvent()`. */
|
78
|
+
dispatchAppEvent(type: string, value?: any): void;
|
76
79
|
}
|
package/dist/index.d.ts
CHANGED
@@ -177,6 +177,17 @@ export declare class WindowManager extends InvisiblePlugin<WindowMangerAttribute
|
|
177
177
|
* app destroy 回调
|
178
178
|
*/
|
179
179
|
onAppDestroy(kind: string, listener: (error: Error) => void): void;
|
180
|
+
/**
|
181
|
+
* app 本地自定义事件回调
|
182
|
+
*
|
183
|
+
* 返回一个用于撤销此监听的函数
|
184
|
+
*/
|
185
|
+
onAppEvent(kind: string, listener: (args: {
|
186
|
+
kind: string;
|
187
|
+
appId: string;
|
188
|
+
type: string;
|
189
|
+
value: any;
|
190
|
+
}) => void): () => void;
|
180
191
|
/**
|
181
192
|
* 设置 ViewMode
|
182
193
|
*/
|