@netless/window-manager 1.0.0-canary.13 → 1.0.0-canary.14

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.es.js CHANGED
@@ -950,6 +950,13 @@ class WhiteBoardView {
950
950
  appProxy.appEmitter.on("pageStateChange", (pageState) => {
951
951
  pageState$.setValue(pageState);
952
952
  });
953
+ const camera$ = new Val(this.view.camera);
954
+ this.camera$ = camera$;
955
+ appProxy.camera$.subscribe((camera) => {
956
+ if (camera) {
957
+ camera$.setValue(camera, true);
958
+ }
959
+ });
953
960
  view.disableCameraTransform = true;
954
961
  }
955
962
  get pageState() {
@@ -963,6 +970,7 @@ class WhiteBoardView {
963
970
  }
964
971
  destroy() {
965
972
  this.pageState$.destroy();
973
+ this.camera$.destroy();
966
974
  this.removeViewWrapper();
967
975
  }
968
976
  }
@@ -2399,7 +2407,7 @@ class AppManager {
2399
2407
  sceneName = (_b = this.callbacksNode) == null ? void 0 : _b.scenes[nextIndex];
2400
2408
  }
2401
2409
  if (sceneName) {
2402
- this.setMainViewScenePath(`${ROOT_DIR}${sceneName}`);
2410
+ await this.setMainViewScenePath(`${ROOT_DIR}${sceneName}`);
2403
2411
  }
2404
2412
  await this.setMainViewSceneIndex(nextIndex);
2405
2413
  } else {
@@ -2639,7 +2647,7 @@ class AppManager {
2639
2647
  this.displayerWritableListener = (isReadonly) => {
2640
2648
  var _a, _b;
2641
2649
  const isWritable = !isReadonly;
2642
- const isManualWritable = this.windowManger.readonly === void 0 || this.windowManger.readonly === false;
2650
+ const isManualWritable = this.windowManger.readonly === void 0 || !this.windowManger.readonly;
2643
2651
  if (this.windowManger.readonly === void 0) {
2644
2652
  (_a = this.boxManager) == null ? void 0 : _a.setReadonly(isReadonly);
2645
2653
  } else {
@@ -2648,7 +2656,7 @@ class AppManager {
2648
2656
  this.appProxies.forEach((appProxy) => {
2649
2657
  appProxy.emitAppIsWritableChange();
2650
2658
  });
2651
- if (isWritable === true) {
2659
+ if (isWritable) {
2652
2660
  if (this.room && this.room.disableSerialization === true) {
2653
2661
  this.room.disableSerialization = false;
2654
2662
  }
@@ -2709,7 +2717,7 @@ class AppManager {
2709
2717
  });
2710
2718
  }
2711
2719
  async onRootDirRemoved(needClose = true) {
2712
- this.setMainViewScenePath(INIT_DIR);
2720
+ await this.setMainViewScenePath(INIT_DIR);
2713
2721
  this.createRootDirScenesCallback();
2714
2722
  for (const [id2, appProxy] of this.appProxies.entries()) {
2715
2723
  if (appProxy.view) {
@@ -2717,7 +2725,7 @@ class AppManager {
2717
2725
  }
2718
2726
  }
2719
2727
  this.mainViewProxy.rebind();
2720
- emitter.emit("rootDirRemoved");
2728
+ await emitter.emit("rootDirRemoved");
2721
2729
  this.updateRootDirRemoving(false);
2722
2730
  }
2723
2731
  get eventName() {
@@ -15539,7 +15547,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
15539
15547
  const _WindowManager = class extends InvisiblePlugin {
15540
15548
  constructor(context) {
15541
15549
  super(context);
15542
- this.version = "1.0.0-canary.13";
15550
+ this.version = "1.0.0-canary.14";
15543
15551
  this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "1.0.0-alpha.16", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^1.1.0", "uuid": "^7.0.3", "value-enhancer": "^1.3.0", "video.js": ">=7" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^0.2.9", "@netless/app-media-player": "0.1.0-beta.5", "@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.22", "@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", "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", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.5.3", "vitest": "^0.14.1", "white-web-sdk": "2.16.10" } };
15544
15552
  this.emitter = callbacks$1;
15545
15553
  this.viewMode = ViewMode.Broadcaster;