@netless/window-manager 0.4.65-beta.0 → 0.4.66-beta.0

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.
@@ -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,16 @@ 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
+ type: string;
187
+ appId: string;
188
+ value: any;
189
+ }) => void): () => void;
180
190
  /**
181
191
  * 设置 ViewMode
182
192
  */