@netless/window-manager 1.0.9-beta.0 → 1.0.10-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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "1.0.9-beta.0",
3
+ "version": "1.0.10-beta.0",
4
4
  "description": "Multi-window mode for Netless Whiteboard",
5
5
  "author": "l1shen <lishen1635@gmail.com> (https://github.com/l1shen)",
6
6
  "license": "MIT",
package/src/AppManager.ts CHANGED
@@ -202,7 +202,7 @@ export class AppManager {
202
202
  };
203
203
 
204
204
  private onPlayerSeekDone = async (time: number) => {
205
- await this.attributesUpdateCallback(this.attributes.apps);
205
+ await this._attributesUpdateCallback(this.attributes.apps);
206
206
  this.appProxies.forEach(appProxy => {
207
207
  appProxy.onSeek(time);
208
208
  });
@@ -351,11 +351,11 @@ export class AppManager {
351
351
  resolve(this.appProxies.get(this._focusAppId || ""));
352
352
  }, 500);
353
353
  }).then(() => {
354
+ this._resolveTimer = undefined;
355
+ this._focusAppCreatedResolve = undefined;
354
356
  this.focusByAttributes(this.attributes.apps);
355
357
  });
356
358
  }
357
- await this.attributesUpdateCallback(this.attributes.apps);
358
- this.focusByAttributes(this.attributes.apps);
359
359
  internalEmitter.emit("updateManagerRect");
360
360
  boxEmitter.on("move", this.onBoxMove);
361
361
  boxEmitter.on("resize", this.onBoxResize);
@@ -367,6 +367,7 @@ export class AppManager {
367
367
  this.addAppsChangeListener();
368
368
  this.addAppCloseListener();
369
369
  this.addBoxesStatusChangeListener();
370
+ await this._attributesUpdateCallback(this.attributes.apps);
370
371
  this.refresher.add("maximized", () => {
371
372
  return autorun(() => {
372
373
  const maximized = this.attributes.maximized;
@@ -404,6 +405,7 @@ export class AppManager {
404
405
  }
405
406
  this.displayerWritableListener(!this.room?.isWritable);
406
407
  this.displayer.callbacks.on("onEnableWriteNowChanged", this.displayerWritableListener);
408
+ this.focusByAttributes(this.attributes.apps);
407
409
  this._prevFocused = this.attributes.focus;
408
410
 
409
411
  if (!WindowManager.supportAppliancePlugin) {
@@ -908,7 +910,7 @@ export class AppManager {
908
910
  }
909
911
 
910
912
  public async onReconnected() {
911
- this.attributesUpdateCallback(this.attributes.apps);
913
+ await this._attributesUpdateCallback(this.attributes.apps);
912
914
  const appProxies = Array.from(this.appProxies.values());
913
915
  const reconnected = appProxies.map(appProxy => {
914
916
  return appProxy.onReconnected();
package/src/BoxManager.ts CHANGED
@@ -410,7 +410,9 @@ export class BoxManager {
410
410
  this.teleBoxManager.setMinimized(Boolean(state.minimized), true);
411
411
  }
412
412
  }, 50);
413
- this.context.callbacks.emit("boxStateChange", this.teleBoxManager.state);
413
+ if (!state.boxStatus) {
414
+ this.context.callbacks.emit("boxStateChange", this.teleBoxManager.state);
415
+ }
414
416
  }
415
417
  }
416
418
 
package/src/index.ts CHANGED
@@ -66,7 +66,6 @@ import type { ExtendPluginInstance } from "./ExtendPluginManager";
66
66
  import { ExtendPluginManager } from "./ExtendPluginManager";
67
67
  import { getExtendClass } from "./Utils/extendClass";
68
68
  import type { ExtendClass } from "./Utils/extendClass";
69
- // import type { AppliancePluginInstance } from "@netless/appliance-plugin/dist/plugin/types";
70
69
 
71
70
  export * from "./utils/extendClass";
72
71
 
@@ -193,6 +192,7 @@ export type MountParams = {
193
192
  applianceIcons?: ApplianceIcons;
194
193
  fullscreen?: boolean;
195
194
  polling?: boolean;
195
+ /** 是否支持 appliance plugin */
196
196
  supportAppliancePlugin?: boolean;
197
197
  /** 是否使用 boxesStatus 状态管理窗口 */
198
198
  useBoxesStatus?: boolean;