@netless/window-manager 1.0.13-beta.1 → 1.0.13-test.1

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,6 +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
356
  room.setScenePath(nextScenePath);
356
357
  }
357
358
  }
@@ -463,6 +464,7 @@ class AppListeners {
463
464
  break;
464
465
  }
465
466
  case Events.SetMainViewScenePath: {
467
+ console.log("[window-manager] mainMagixEventListener====>", data.payload);
466
468
  this.setMainViewScenePathHandler(data.payload);
467
469
  break;
468
470
  }
@@ -7127,9 +7129,11 @@ class AttributesDelegate {
7127
7129
  return this.attributes["boxState"];
7128
7130
  }
7129
7131
  setMainViewScenePath(scenePath) {
7132
+ console.log("[window-manager] setMainViewScenePath====>", scenePath);
7130
7133
  this.context.safeSetAttributes({ _mainScenePath: scenePath });
7131
7134
  }
7132
7135
  setMainViewSceneIndex(index2) {
7136
+ console.log("[window-manager] setMainViewSceneIndex====>", index2);
7133
7137
  this.context.safeSetAttributes({ _mainSceneIndex: index2 });
7134
7138
  }
7135
7139
  getMainViewCamera() {
@@ -7139,16 +7143,19 @@ class AttributesDelegate {
7139
7143
  return get(this.attributes, ["mainViewSize"]);
7140
7144
  }
7141
7145
  setMainViewCamera(camera) {
7146
+ console.log("[window-manager] setMainViewCamera", camera);
7142
7147
  this.context.safeSetAttributes({ ["mainViewCamera"]: { ...camera } });
7143
7148
  }
7144
7149
  setMainViewSize(size2) {
7145
7150
  if (size2.width === 0 || size2.height === 0)
7146
7151
  return;
7152
+ console.log("[window-manager] setMainViewSize", size2);
7147
7153
  this.context.safeSetAttributes({ ["mainViewSize"]: { ...size2 } });
7148
7154
  }
7149
7155
  setMainViewCameraAndSize(camera, size2) {
7150
7156
  if (size2.width === 0 || size2.height === 0)
7151
7157
  return;
7158
+ console.log("[window-manager] setMainViewCameraAndSize", camera, size2);
7152
7159
  this.context.safeSetAttributes({
7153
7160
  ["mainViewCamera"]: { ...camera },
7154
7161
  ["mainViewSize"]: { ...size2 }
@@ -7782,6 +7789,7 @@ class MainViewProxy {
7782
7789
  () => this.mainViewCamera,
7783
7790
  (camera) => {
7784
7791
  if (camera && camera.id !== this.manager.uid) {
7792
+ console.log("[window-manager] cameraReaction====>", camera, this.mainViewSize);
7785
7793
  this.moveCameraToContian(this.mainViewSize);
7786
7794
  this.moveCamera(camera);
7787
7795
  }
@@ -7791,6 +7799,7 @@ class MainViewProxy {
7791
7799
  };
7792
7800
  this.sizeChangeHandler = debounce((size2) => {
7793
7801
  if (size2) {
7802
+ console.log("[window-manager] sizeChangeHandler====>", size2, this.mainViewCamera);
7794
7803
  this.moveCameraToContian(size2);
7795
7804
  this.moveCamera(this.mainViewCamera);
7796
7805
  }
@@ -7798,6 +7807,7 @@ class MainViewProxy {
7798
7807
  }, 30);
7799
7808
  this.onUpdateContainerSizeRatio = () => {
7800
7809
  const size2 = this.store.getMainViewSize();
7810
+ console.log("[window-manager] onUpdateContainerSizeRatio====>", size2);
7801
7811
  this.sizeChangeHandler(size2);
7802
7812
  };
7803
7813
  this.onCameraUpdatedByDevice = (camera) => {
@@ -7840,6 +7850,7 @@ class MainViewProxy {
7840
7850
  this.startListenWritableChange();
7841
7851
  });
7842
7852
  const playgroundSizeChangeListener = () => {
7853
+ console.log("[window-manager] playgroundSizeChangeListener====>", this.mainViewSize);
7843
7854
  this.sizeChangeHandler(this.mainViewSize);
7844
7855
  };
7845
7856
  this.sideEffectManager.add(() => {
@@ -7879,6 +7890,7 @@ class MainViewProxy {
7879
7890
  this.moveCamera(this.mainViewCamera);
7880
7891
  }
7881
7892
  start() {
7893
+ console.log("[window-manager] start====>", this.mainViewSize);
7882
7894
  this.sizeChangeHandler(this.mainViewSize);
7883
7895
  if (this.started)
7884
7896
  return;
@@ -8404,6 +8416,7 @@ class AppManager {
8404
8416
  const pageName = scenePath.replace(sceneDir, "").replace("/", "");
8405
8417
  const index2 = scenes.findIndex((scene) => scene.name === pageName);
8406
8418
  if (isInteger(index2) && index2 >= 0) {
8419
+ console.log("[window-manager] updateSceneIndex====>", index2);
8407
8420
  this.safeSetAttributes({ _mainSceneIndex: index2 });
8408
8421
  }
8409
8422
  }
@@ -8790,6 +8803,7 @@ class AppManager {
8790
8803
  async _setMainViewScenePath(scenePath) {
8791
8804
  const success = this.setMainViewFocusPath(scenePath);
8792
8805
  if (success) {
8806
+ console.log("[window-manager] _setMainViewScenePath====>", scenePath);
8793
8807
  this.safeSetAttributes({ _mainScenePath: scenePath });
8794
8808
  this.store.setMainViewFocusPath(this.mainView);
8795
8809
  this.updateSceneIndex();
@@ -8817,6 +8831,7 @@ class AppManager {
8817
8831
  }
8818
8832
  }
8819
8833
  dispatchSetMainViewScenePath(scenePath) {
8834
+ console.log("[window-manager] dispatchSetMainViewScenePath====>", scenePath);
8820
8835
  this.dispatchInternalEvent(Events.SetMainViewScenePath, { nextScenePath: scenePath });
8821
8836
  callbacks$1.emit("mainViewScenePathChange", scenePath);
8822
8837
  setScenePath(this.room, scenePath);
@@ -19672,7 +19687,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter: internalEmitter });
19672
19687
  const _WindowManager = class extends InvisiblePlugin {
19673
19688
  constructor(context) {
19674
19689
  super(context);
19675
- this.version = "1.0.13-beta.1";
19690
+ this.version = "1.0.13-test.1";
19676
19691
  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" } };
19677
19692
  this.emitter = callbacks$1;
19678
19693
  this.viewMode = ViewMode.Broadcaster;