@netless/window-manager 1.0.13-test.16 → 1.0.13-test.18

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.mjs CHANGED
@@ -352,7 +352,7 @@ const setScenePath = (room, scenePath) => {
352
352
  if (room && room.isWritable) {
353
353
  if (room.state.sceneState.scenePath !== scenePath) {
354
354
  const nextScenePath = scenePath === "/" ? "" : scenePath;
355
- console.log("[window-manager] real setScenePath for current room ", nextScenePath);
355
+ console.log("[window-manager] real setScenePath for current room " + nextScenePath);
356
356
  room.setScenePath(nextScenePath);
357
357
  }
358
358
  }
@@ -5626,7 +5626,6 @@ class BoxManager {
5626
5626
  const rect = (_a = this.mainView.divElement) == null ? void 0 : _a.getBoundingClientRect();
5627
5627
  if (rect && rect.width > 0 && rect.height > 0) {
5628
5628
  const containerRect = { x: 0, y: 0, width: rect.width, height: rect.height };
5629
- console.log("[window-manager] updateManagerRect" + JSON.stringify(containerRect) + "mainView" + this.mainView.size);
5630
5629
  this.teleBoxManager.setContainerRect(containerRect);
5631
5630
  this.context.notifyContainerRectUpdate(this.teleBoxManager.containerRect);
5632
5631
  }
@@ -7034,7 +7033,7 @@ var Fields = /* @__PURE__ */ ((Fields2) => {
7034
7033
  class AttributesDelegate {
7035
7034
  constructor(context) {
7036
7035
  this.context = context;
7037
- this.setMainViewCameraConsole = new LocalConsole("setMainViewCamera", 50);
7036
+ this.setMainViewCameraConsole = new LocalConsole("setMainViewCamera", 30);
7038
7037
  this.setAppFocus = (appId, focus) => {
7039
7038
  if (focus) {
7040
7039
  this.context.safeSetAttributes({ ["focus"]: appId });
@@ -7160,11 +7159,11 @@ class AttributesDelegate {
7160
7159
  return this.attributes["boxState"];
7161
7160
  }
7162
7161
  setMainViewScenePath(scenePath) {
7163
- console.log("[window-manager] setMainViewScenePath ", scenePath);
7162
+ console.log("[window-manager] setMainViewScenePath " + scenePath);
7164
7163
  this.context.safeSetAttributes({ _mainScenePath: scenePath });
7165
7164
  }
7166
7165
  setMainViewSceneIndex(index2) {
7167
- console.log("[window-manager] setMainViewSceneIndex ", index2);
7166
+ console.log("[window-manager] setMainViewSceneIndex " + index2);
7168
7167
  this.context.safeSetAttributes({ _mainSceneIndex: index2 });
7169
7168
  }
7170
7169
  getMainViewCamera() {
@@ -7180,13 +7179,13 @@ class AttributesDelegate {
7180
7179
  setMainViewSize(size2) {
7181
7180
  if (size2.width === 0 || size2.height === 0)
7182
7181
  return;
7183
- console.log("[window-manager] setMainViewSize ", JSON.stringify(size2));
7182
+ console.log("[window-manager] setMainViewSize size:" + JSON.stringify(size2));
7184
7183
  this.context.safeSetAttributes({ ["mainViewSize"]: { ...size2 } });
7185
7184
  }
7186
7185
  setMainViewCameraAndSize(camera, size2) {
7187
7186
  if (size2.width === 0 || size2.height === 0)
7188
7187
  return;
7189
- console.log("[window-manager] setMainViewCameraAndSize ", JSON.stringify(camera), JSON.stringify(size2));
7188
+ console.log("[window-manager] setMainViewCameraAndSize camera:" + JSON.stringify(camera) + ", size:" + JSON.stringify(size2));
7190
7189
  this.context.safeSetAttributes({
7191
7190
  ["mainViewCamera"]: { ...camera },
7192
7191
  ["mainViewSize"]: { ...size2 }
@@ -7797,6 +7796,8 @@ class MainViewProxy {
7797
7796
  this.viewMode = this.manager.windowManger.viewMode;
7798
7797
  this.sideEffectManager = new o$2();
7799
7798
  this.playgroundSizeChangeListenerLocalConsole = new LocalConsole("playgroundSizeChangeListener", 30);
7799
+ this.sizeUpdatedLocalConsole = new LocalConsole("sizeUpdated", 30);
7800
+ this.cameraUpdatedLocalConsole = new LocalConsole("cameraUpdated", 30);
7800
7801
  this.syncCamera = () => {
7801
7802
  if (!this.polling || this.viewMode !== ViewMode.Broadcaster)
7802
7803
  return;
@@ -7818,10 +7819,6 @@ class MainViewProxy {
7818
7819
  };
7819
7820
  this.onWrapperRectChange = (payload) => {
7820
7821
  this.pendingWrapperRectChange = payload;
7821
- console.log("[window-manager] onWrapperRectChange " + JSON.stringify({
7822
- ...payload,
7823
- viewSize: this.mainView.size
7824
- }));
7825
7822
  if (this.wrapperRectWorkaroundFrame) {
7826
7823
  cancelAnimationFrame(this.wrapperRectWorkaroundFrame);
7827
7824
  }
@@ -7838,14 +7835,6 @@ class MainViewProxy {
7838
7835
  const observedSize = { width: rect.width, height: rect.height };
7839
7836
  const wrapperMatchesDom = Math.abs(payload.width - observedSize.width) <= 0.5 && Math.abs(payload.height - observedSize.height) <= 0.5;
7840
7837
  const viewIsStale = Math.abs(this.mainView.size.width - observedSize.width) > 0.5 || Math.abs(this.mainView.size.height - observedSize.height) > 0.5;
7841
- console.log("[window-manager] runWrapperRectWorkaround " + JSON.stringify({
7842
- origin: payload.origin,
7843
- wrapperRect: payload,
7844
- domRect: observedSize,
7845
- viewSize: this.mainView.size,
7846
- wrapperMatchesDom,
7847
- viewIsStale
7848
- }));
7849
7838
  if (wrapperMatchesDom && viewIsStale) {
7850
7839
  this.forceSyncMainViewDivElement(
7851
7840
  `wrapperRectChange:${payload.origin || "unknown"}`,
@@ -7874,7 +7863,7 @@ class MainViewProxy {
7874
7863
  if (size2) {
7875
7864
  this.moveCameraToContian(size2);
7876
7865
  this.moveCamera(this.mainViewCamera);
7877
- console.log("[window-manager] sizeChangeHandler current size and camera" + JSON.stringify(size2) + JSON.stringify(this.mainViewCamera) + JSON.stringify(this.mainView.camera) + JSON.stringify(this.mainView.size));
7866
+ console.log("[window-manager] sizeChangeHandler current size and camera" + JSON.stringify(size2) + JSON.stringify(this.mainViewCamera) + JSON.stringify(this.mainView.camera) + JSON.stringify(this.mainView.size));
7878
7867
  }
7879
7868
  this.ensureMainViewSize();
7880
7869
  }, 30);
@@ -7897,53 +7886,8 @@ class MainViewProxy {
7897
7886
  this.setMainViewSize = debounce((size2) => {
7898
7887
  this.store.setMainViewSize({ ...size2, id: this.manager.uid });
7899
7888
  }, 50);
7900
- this.onResize = (entries) => {
7901
- const entry = entries[0];
7902
- if (!entry)
7903
- return;
7904
- const target = entry.target;
7905
- const child = target.children[0];
7906
- const observedSize = {
7907
- width: entry.contentRect.width,
7908
- height: entry.contentRect.height
7909
- };
7910
- console.log("[window-manager] mainViewResizeObserver " + JSON.stringify({
7911
- sameTarget: target === this.mainView.divElement,
7912
- contentRect: {
7913
- width: observedSize.width,
7914
- height: observedSize.height
7915
- },
7916
- client: {
7917
- width: target.clientWidth,
7918
- height: target.clientHeight
7919
- },
7920
- offset: {
7921
- width: target.offsetWidth,
7922
- height: target.offsetHeight
7923
- },
7924
- rect: {
7925
- width: target.getBoundingClientRect().width,
7926
- height: target.getBoundingClientRect().height
7927
- },
7928
- childRect: child ? {
7929
- width: child.getBoundingClientRect().width,
7930
- height: child.getBoundingClientRect().height
7931
- } : null,
7932
- viewSize: this.mainView.size
7933
- }));
7934
- };
7935
7889
  this._syncMainViewTimer = 0;
7936
- this.handleCameraOrSizeUpdated = (source, payload) => {
7937
- console.log("[window-manager] " + source + " payload " + JSON.stringify(payload));
7938
- console.log("[window-manager] " + source + " state " + JSON.stringify(this.cameraState));
7939
- if (this.mainView.divElement) {
7940
- const children2 = this.mainView.divElement.children;
7941
- console.log("[window-manager] " + source + " rect " + JSON.stringify(this.mainView.divElement.getBoundingClientRect()));
7942
- const child = children2[0];
7943
- if (child) {
7944
- console.log("[window-manager] " + source + " child" + JSON.stringify(child.getBoundingClientRect()));
7945
- }
7946
- }
7890
+ this.handleCameraOrSizeUpdated = () => {
7947
7891
  callbacks$1.emit("cameraStateChange", this.cameraState);
7948
7892
  if (this.manager.room && this.manager.room.syncMainView) {
7949
7893
  clearTimeout(this._syncMainViewTimer);
@@ -7952,10 +7896,12 @@ class MainViewProxy {
7952
7896
  this.ensureMainViewSize();
7953
7897
  };
7954
7898
  this.onCameraUpdated = (camera) => {
7955
- this.handleCameraOrSizeUpdated("onCameraUpdated", camera);
7899
+ this.cameraUpdatedLocalConsole.log(JSON.stringify(camera));
7900
+ this.handleCameraOrSizeUpdated();
7956
7901
  };
7957
7902
  this.onSizeUpdated = (size2) => {
7958
- this.handleCameraOrSizeUpdated("onSizeUpdated", size2);
7903
+ this.sizeUpdatedLocalConsole.log(JSON.stringify(size2));
7904
+ this.handleCameraOrSizeUpdated();
7959
7905
  };
7960
7906
  this.syncMainView = (room) => {
7961
7907
  if (room.isWritable) {
@@ -7969,7 +7915,6 @@ class MainViewProxy {
7969
7915
  this.mainView = this.createMainView();
7970
7916
  this.moveCameraSizeByAttributes();
7971
7917
  internalEmitter.once("mainViewMounted").then(() => {
7972
- this.observeMainViewDivElement();
7973
7918
  this.addMainViewListener();
7974
7919
  this.start();
7975
7920
  this.ensureCameraAndSize();
@@ -8030,15 +7975,6 @@ class MainViewProxy {
8030
7975
  this.moveCameraToContian(this.mainViewSize);
8031
7976
  this.moveCamera(this.mainViewCamera);
8032
7977
  }
8033
- refreshScreenSizeIfStale() {
8034
- const element2 = this.mainView.divElement;
8035
- if (!element2)
8036
- return;
8037
- const { width, height } = element2.getBoundingClientRect();
8038
- if (width <= 0 || height <= 0)
8039
- return;
8040
- this.forceSyncMainViewDivElement("playgroundSizeChange", { width, height }, element2);
8041
- }
8042
7978
  forceSyncMainViewDivElement(reason, observedSize, element2) {
8043
7979
  const { width: viewWidth, height: viewHeight } = this.mainView.size;
8044
7980
  if (Math.abs(viewWidth - observedSize.width) <= 0.5 && Math.abs(viewHeight - observedSize.height) <= 0.5) {
@@ -8073,7 +8009,7 @@ class MainViewProxy {
8073
8009
  });
8074
8010
  }
8075
8011
  start() {
8076
- console.log("[window-manager] start " + JSON.stringify(this.mainViewSize));
8012
+ console.log("[window-manager] start attributes size:" + JSON.stringify(this.mainViewSize));
8077
8013
  this.sizeChangeHandler(this.mainViewSize);
8078
8014
  if (this.started)
8079
8015
  return;
@@ -8082,7 +8018,10 @@ class MainViewProxy {
8082
8018
  if (this.manager.room)
8083
8019
  this.syncMainView(this.manager.room);
8084
8020
  this.started = true;
8085
- console.log("[window-manager] start end " + JSON.stringify(this.mainViewSize), JSON.stringify(this.mainView.size));
8021
+ if (this.mainView.focusScenePath) {
8022
+ this.manager.windowManger.onMainViewScenePathChangeHandler(this.mainView.focusScenePath);
8023
+ }
8024
+ console.log("[window-manager] start end mainView size:" + JSON.stringify(this.mainView.size));
8086
8025
  }
8087
8026
  setCameraAndSize() {
8088
8027
  const camera = { ...this.mainView.camera, id: this.manager.uid };
@@ -8124,11 +8063,9 @@ class MainViewProxy {
8124
8063
  this.mainView.release();
8125
8064
  }
8126
8065
  this.removeMainViewListener();
8127
- this.disconnectMainViewResizeObserver();
8128
8066
  this.mainView = this.createMainView();
8129
8067
  this.mainView.disableCameraTransform = disableCameraTransform;
8130
8068
  this.mainView.divElement = divElement;
8131
- this.observeMainViewDivElement();
8132
8069
  this.addMainViewListener();
8133
8070
  this.start();
8134
8071
  callbacks$1.emit("onMainViewRebind", this.mainView);
@@ -8166,24 +8103,6 @@ class MainViewProxy {
8166
8103
  this.view.callbacks.off("onCameraUpdated", this.onCameraUpdated);
8167
8104
  this.view.callbacks.off("onSizeUpdated", this.onSizeUpdated);
8168
8105
  }
8169
- observeMainViewDivElement() {
8170
- this.disconnectMainViewResizeObserver();
8171
- if (!("ResizeObserver" in window))
8172
- return;
8173
- if (!this.mainView.divElement)
8174
- return;
8175
- console.log("[window-manager] observeMainViewDivElement " + JSON.stringify({
8176
- rect: this.mainView.divElement.getBoundingClientRect(),
8177
- viewSize: this.mainView.size
8178
- }));
8179
- this.mainViewResizeObserver = new window.ResizeObserver(this.onResize);
8180
- this.mainViewResizeObserver.observe(this.mainView.divElement);
8181
- }
8182
- disconnectMainViewResizeObserver() {
8183
- var _a;
8184
- (_a = this.mainViewResizeObserver) == null ? void 0 : _a.disconnect();
8185
- this.mainViewResizeObserver = void 0;
8186
- }
8187
8106
  ensureMainViewSize() {
8188
8107
  if ((!this.mainViewSize || this.mainViewSize.width === 0 || this.mainViewSize.height === 0) && this.mainView.size.width > 0 && this.mainView.size.height > 0) {
8189
8108
  this.setMainViewSize(this.mainView.size);
@@ -8228,7 +8147,6 @@ class MainViewProxy {
8228
8147
  this.wrapperRectWorkaroundFrame = 0;
8229
8148
  }
8230
8149
  this.removeMainViewListener();
8231
- this.disconnectMainViewResizeObserver();
8232
8150
  this.stop();
8233
8151
  this.sideEffectManager.flushAll();
8234
8152
  }
@@ -8317,7 +8235,7 @@ class AppManager {
8317
8235
  var _a, _b;
8318
8236
  const { scenePath } = params;
8319
8237
  if (scenePath === ROOT_DIR) {
8320
- console.log("[window-manager] onRemoveScenes ROOT_DIR");
8238
+ console.log("[window-manager] onRemoveScenes ROOT_DIR");
8321
8239
  await this.onRootDirRemoved();
8322
8240
  this.dispatchInternalEvent(Events.RootDirRemoved);
8323
8241
  return;
@@ -8330,7 +8248,7 @@ class AppManager {
8330
8248
  sceneName = (_b = this.callbacksNode) == null ? void 0 : _b.scenes[nextIndex];
8331
8249
  }
8332
8250
  if (sceneName) {
8333
- console.log(`[window-manager] onRemoveScenes setMainViewScenePath${ROOT_DIR}${sceneName}`);
8251
+ console.log(`[window-manager] onRemoveScenes setMainViewScenePath ${ROOT_DIR}${sceneName}`);
8334
8252
  this.setMainViewScenePath(`${ROOT_DIR}${sceneName}`);
8335
8253
  }
8336
8254
  await this.setMainViewSceneIndex(nextIndex);
@@ -8628,7 +8546,7 @@ class AppManager {
8628
8546
  const pageName = scenePath.replace(sceneDir, "").replace("/", "");
8629
8547
  const index2 = scenes.findIndex((scene) => scene.name === pageName);
8630
8548
  if (isInteger(index2) && index2 >= 0) {
8631
- console.log("[window-manager] updateSceneIndex ", index2);
8549
+ console.log("[window-manager] updateSceneIndex " + index2);
8632
8550
  this.safeSetAttributes({ _mainSceneIndex: index2 });
8633
8551
  }
8634
8552
  }
@@ -8896,7 +8814,6 @@ class AppManager {
8896
8814
  (_a = this.boxManager) == null ? void 0 : _a.setMinimized(Boolean(this.store.getMinimized()));
8897
8815
  }
8898
8816
  bindMainView(divElement, disableCameraTransform) {
8899
- var _a, _b, _c, _d, _e, _f, _g, _h;
8900
8817
  const mainView = this.mainViewProxy.view;
8901
8818
  mainView.disableCameraTransform = disableCameraTransform;
8902
8819
  mainView.divElement = divElement;
@@ -8907,13 +8824,12 @@ class AppManager {
8907
8824
  callbacks$1.emit("onMainViewMounted", mainView);
8908
8825
  const hasRoot = this.hasRoot(mainView.divElement);
8909
8826
  const rect = this.getRectByDivElement(mainView.divElement);
8910
- console.log(
8911
- "[window-manager] bindMainView hasRoot" + hasRoot + JSON.stringify(rect) + window.outerHeight + window.outerWidth,
8912
- (_b = (_a = window.visualViewport) == null ? void 0 : _a.width) != null ? _b : "null",
8913
- (_d = (_c = window.visualViewport) == null ? void 0 : _c.height) != null ? _d : "null",
8914
- (_f = (_e = window.visualViewport) == null ? void 0 : _e.offsetLeft) != null ? _f : "null",
8915
- (_h = (_g = window.visualViewport) == null ? void 0 : _g.offsetTop) != null ? _h : "null"
8916
- );
8827
+ let log2 = `[window-manager] bindMainView hasRoot:${hasRoot}, rect:${JSON.stringify(rect)}, outerHeight:${window.outerHeight}, outerWidth:${window.outerWidth}`;
8828
+ const visualViewport = window.visualViewport;
8829
+ if (visualViewport) {
8830
+ log2 += `, visualViewportWidth:${visualViewport.width}, visualViewportHeight:${visualViewport.height}, visualViewportOffsetLeft:${visualViewport.offsetLeft}, visualViewportOffsetTop:${visualViewport.offsetTop}`;
8831
+ }
8832
+ console.log(log2);
8917
8833
  }
8918
8834
  hasRoot(divElement) {
8919
8835
  let current = divElement;
@@ -9039,7 +8955,7 @@ class AppManager {
9039
8955
  async _setMainViewScenePath(scenePath) {
9040
8956
  const success = this.setMainViewFocusPath(scenePath);
9041
8957
  if (success) {
9042
- console.log("[window-manager] _setMainViewScenePath ", scenePath);
8958
+ console.log("[window-manager] _setMainViewScenePath " + scenePath);
9043
8959
  this.safeSetAttributes({ _mainScenePath: scenePath });
9044
8960
  this.store.setMainViewFocusPath(this.mainView);
9045
8961
  this.updateSceneIndex();
@@ -9067,7 +8983,7 @@ class AppManager {
9067
8983
  }
9068
8984
  }
9069
8985
  dispatchSetMainViewScenePath(scenePath) {
9070
- console.log("[window-manager] dispatchSetMainViewScenePath ", JSON.stringify(scenePath));
8986
+ console.log("[window-manager] dispatchSetMainViewScenePath " + scenePath);
9071
8987
  this.dispatchInternalEvent(Events.SetMainViewScenePath, { nextScenePath: scenePath });
9072
8988
  callbacks$1.emit("mainViewScenePathChange", scenePath);
9073
8989
  setScenePath(this.room, scenePath);
@@ -9143,6 +9059,7 @@ const ResizeObserver$2 = window.ResizeObserver || ResizeObserver$3;
9143
9059
  class ContainerResizeObserver {
9144
9060
  constructor(emitter) {
9145
9061
  this.emitter = emitter;
9062
+ this.updateSizerLocalConsole = new LocalConsole("updateSizer", 30);
9146
9063
  }
9147
9064
  static create(container, sizer, wrapper, emitter) {
9148
9065
  const containerResizeObserver = new ContainerResizeObserver(emitter);
@@ -9150,20 +9067,17 @@ class ContainerResizeObserver {
9150
9067
  return containerResizeObserver;
9151
9068
  }
9152
9069
  observePlaygroundSize(container, sizer, wrapper) {
9153
- console.log(`[window-manager] observePlaygroundSize ${JSON.stringify(container.getBoundingClientRect())}, ${JSON.stringify(sizer.getBoundingClientRect())}, ${JSON.stringify(wrapper.getBoundingClientRect())}`);
9154
9070
  this.updateSizer(container.getBoundingClientRect(), sizer, wrapper, "observePlaygroundSize");
9155
9071
  this.containerResizeObserver = new ResizeObserver$2((entries) => {
9156
9072
  var _a;
9157
9073
  const containerRect = (_a = entries[0]) == null ? void 0 : _a.contentRect;
9158
9074
  if (containerRect) {
9159
9075
  this.updateSizer(containerRect, sizer, wrapper, "containerResizeObserver");
9160
- console.log(`[window-manager] containerResizeObserver ${JSON.stringify(containerRect)}`);
9161
9076
  this.emitter.emit("playgroundSizeChange", containerRect);
9162
9077
  }
9163
9078
  });
9164
9079
  this.disposer = this.emitter.on("containerSizeRatioUpdate", () => {
9165
9080
  const containerRect = container.getBoundingClientRect();
9166
- console.log(`[window-manager] containerSizeRatioUpdate ${JSON.stringify(containerRect)}`);
9167
9081
  this.updateSizer(containerRect, sizer, wrapper, "containerSizeRatioUpdate");
9168
9082
  this.emitter.emit("playgroundSizeChange", containerRect);
9169
9083
  });
@@ -9180,9 +9094,8 @@ class ContainerResizeObserver {
9180
9094
  }
9181
9095
  wrapper.style.width = `${width}px`;
9182
9096
  wrapper.style.height = `${height}px`;
9183
- wrapper.style.backgroundColor = "green";
9184
9097
  const wrapperRect = wrapper.getBoundingClientRect();
9185
- console.log(`[window-manager] updateSizer from ${origin}: ${JSON.stringify({ width, height })} ${wrapper.style.width} ${wrapper.style.height} ${JSON.stringify(wrapperRect)}`);
9098
+ this.updateSizerLocalConsole.log(`from ${origin}, traget size: ${JSON.stringify({ width, height })}, wrapperRect: ${wrapperRect.width} ${wrapperRect.height}`);
9186
9099
  this.emitter.emit("wrapperRectChange", {
9187
9100
  width: wrapperRect.width,
9188
9101
  height: wrapperRect.height,
@@ -9349,7 +9262,7 @@ const replaceRoomFunction = (room, manager) => {
9349
9262
  var _a;
9350
9263
  _scalePptToFit.call(room, ...args);
9351
9264
  if ((_a = manager.appManager) == null ? void 0 : _a.mainViewProxy) {
9352
- console.log("[window-manager] scalePptToFit " + JSON.stringify(args));
9265
+ console.log("[window-manager] scalePptToFit " + JSON.stringify(args));
9353
9266
  manager.appManager.mainViewProxy.setCameraAndSize();
9354
9267
  }
9355
9268
  };
@@ -19943,7 +19856,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter: internalEmitter });
19943
19856
  const _WindowManager = class extends InvisiblePlugin {
19944
19857
  constructor(context) {
19945
19858
  super(context);
19946
- this.version = "1.0.13-test.16";
19859
+ this.version = "1.0.13-test.18";
19947
19860
  this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.53" }, "devDependencies": { "@hyrious/dts": "^0.2.2", "@netless/app-docs-viewer": "^0.2.19", "@netless/app-media-player": "0.1.4", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-url": "^6.1.0", "@sveltejs/vite-plugin-svelte": "1.0.0-next.30", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.4", "@types/uuid": "^8.3.1", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.1", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^3.2.0", "jsdom": "^19.0.0", "jspdf": "^2.5.1", "less": "^4.1.1", "prettier": "^2.3.2", "prettier-plugin-svelte": "^2.4.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^3.14.1", "side-effect-manager": "0.1.5", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.9.9", "vitest": "^0.14.1", "white-web-sdk": "^2.16.53" } };
19948
19861
  this.emitter = callbacks$1;
19949
19862
  this.viewMode = ViewMode.Broadcaster;
@@ -19961,12 +19874,14 @@ const _WindowManager = class extends InvisiblePlugin {
19961
19874
  const backgroundImageRect = backgroundImage == null ? void 0 : backgroundImage.getBoundingClientRect();
19962
19875
  const backgroundImageCSS = window.getComputedStyle(backgroundImage);
19963
19876
  const backgroundImageVisible = (backgroundImageRect == null ? void 0 : backgroundImageRect.width) > 0 && (backgroundImageRect == null ? void 0 : backgroundImageRect.height) > 0 && backgroundImageCSS.display !== "none";
19964
- console.log("[window-manager] backgroundImageVisible" + backgroundImageVisible);
19877
+ const camera = this.mainView.camera;
19878
+ console.log("[window-manager] backgroundImageVisible:" + backgroundImageVisible + " camera:" + JSON.stringify(camera));
19965
19879
  return;
19966
19880
  }
19967
- console.log("[window-manager] onMainViewScenePathChange" + scenePath + "backgroundImageVisible is not found");
19881
+ console.log("[window-manager] onMainViewScenePathChange scenePath:" + scenePath + " backgroundImageVisible is not found");
19882
+ return;
19968
19883
  }
19969
- console.log("[window-manager] onMainViewScenePathChange" + scenePath + "mainViewElement is not found");
19884
+ console.log("[window-manager] onMainViewScenePathChange scenePath:" + scenePath + " mainViewElement is not found");
19970
19885
  };
19971
19886
  _WindowManager.displayer = context.displayer;
19972
19887
  window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.53" }, "devDependencies": { "@hyrious/dts": "^0.2.2", "@netless/app-docs-viewer": "^0.2.19", "@netless/app-media-player": "0.1.4", "@rollup/plugin-commonjs": "^20.0.0", "@rollup/plugin-node-resolve": "^13.0.4", "@rollup/plugin-url": "^6.1.0", "@sveltejs/vite-plugin-svelte": "1.0.0-next.30", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.4", "@types/uuid": "^8.3.1", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.1", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^3.2.0", "jsdom": "^19.0.0", "jspdf": "^2.5.1", "less": "^4.1.1", "prettier": "^2.3.2", "prettier-plugin-svelte": "^2.4.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^3.14.1", "side-effect-manager": "0.1.5", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.9.9", "vitest": "^0.14.1", "white-web-sdk": "^2.16.53" } };
@@ -20617,7 +20532,6 @@ const _WindowManager = class extends InvisiblePlugin {
20617
20532
  }, 500);
20618
20533
  }
20619
20534
  moveCameraToContain(rectangle) {
20620
- console.log("[window-manager] moveCameraToContain" + JSON.stringify(rectangle));
20621
20535
  this.mainView.moveCameraToContain(rectangle);
20622
20536
  setTimeout(() => {
20623
20537
  var _a;