@netless/window-manager 0.4.35 → 0.4.38

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
@@ -1769,9 +1769,6 @@ class MainViewProxy {
1769
1769
  this.onUpdateContainerSizeRatio = () => {
1770
1770
  const size2 = this.store.getMainViewSize();
1771
1771
  this.sizeChangeHandler(size2);
1772
- if (size2.id === this.manager.uid) {
1773
- this.setCameraAndSize();
1774
- }
1775
1772
  };
1776
1773
  this.onCameraUpdatedByDevice = (camera) => {
1777
1774
  this.store.setMainViewCamera(__spreadProps(__spreadValues({}, camera), { id: this.manager.uid }));
@@ -1807,7 +1804,9 @@ class MainViewProxy {
1807
1804
  });
1808
1805
  this.sideEffectManager.add(() => {
1809
1806
  return emitter.on("startReconnect", () => {
1810
- this.mainView.release();
1807
+ if (!this.didRelease) {
1808
+ this.mainView.release();
1809
+ }
1811
1810
  });
1812
1811
  });
1813
1812
  }
@@ -4583,6 +4582,16 @@ class BoxManager {
4583
4582
  this.teleBoxManager._prefersColorScheme$.reaction((colorScheme) => {
4584
4583
  callbacks2.emit("prefersColorSchemeChange", colorScheme);
4585
4584
  });
4585
+ this.teleBoxManager._minimized$.reaction((minimized) => {
4586
+ if (!minimized) {
4587
+ setTimeout(() => {
4588
+ const offset = 1e-3 * (Math.random() > 0.5 ? 1 : -1);
4589
+ this.teleBoxManager.boxes.forEach((box) => {
4590
+ box.resize(box.intrinsicWidth + offset, box.intrinsicHeight + offset, true);
4591
+ });
4592
+ }, 400);
4593
+ }
4594
+ });
4586
4595
  this.teleBoxManager.events.on("minimized", (minimized) => {
4587
4596
  this.context.safeSetAttributes({ minimized });
4588
4597
  if (minimized) {
@@ -15094,7 +15103,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
15094
15103
  const _WindowManager = class extends InvisiblePlugin {
15095
15104
  constructor(context) {
15096
15105
  super(context);
15097
- this.version = "0.4.35";
15106
+ this.version = "0.4.38";
15098
15107
  this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.2.26", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^0.1.5", "uuid": "^7.0.3", "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" } };
15099
15108
  this.emitter = callbacks$1;
15100
15109
  this.viewMode = ViewMode.Broadcaster;