@netless/window-manager 0.4.34 → 0.4.37

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
@@ -2285,14 +2285,6 @@ class AppManager {
2285
2285
  this.appProxies.forEach((appProxy) => {
2286
2286
  appProxy.emitAppIsWritableChange();
2287
2287
  });
2288
- if (isWritable === true) {
2289
- this.mainView.disableCameraTransform = false;
2290
- if (this.room && this.room.disableSerialization === true) {
2291
- this.room.disableSerialization = false;
2292
- }
2293
- } else {
2294
- this.mainView.disableCameraTransform = true;
2295
- }
2296
2288
  emitter.emit("writableChange", isWritable);
2297
2289
  };
2298
2290
  this.updateSceneIndex = () => {
@@ -4591,6 +4583,16 @@ class BoxManager {
4591
4583
  this.teleBoxManager._prefersColorScheme$.reaction((colorScheme) => {
4592
4584
  callbacks2.emit("prefersColorSchemeChange", colorScheme);
4593
4585
  });
4586
+ this.teleBoxManager._minimized$.reaction((minimized) => {
4587
+ if (!minimized) {
4588
+ setTimeout(() => {
4589
+ const offset = 1e-3 * (Math.random() > 0.5 ? 1 : -1);
4590
+ this.teleBoxManager.boxes.forEach((box) => {
4591
+ box.resize(box.intrinsicWidth + offset, box.intrinsicHeight + offset, true);
4592
+ });
4593
+ }, 400);
4594
+ }
4595
+ });
4594
4596
  this.teleBoxManager.events.on("minimized", (minimized) => {
4595
4597
  this.context.safeSetAttributes({ minimized });
4596
4598
  if (minimized) {
@@ -5628,7 +5630,7 @@ class CursorManager {
5628
5630
  return;
5629
5631
  }
5630
5632
  this.updateCursor(this.getType(event), event.clientX, event.clientY);
5631
- }, 16);
5633
+ }, 48);
5632
5634
  this.getPoint = (view, clientX, clientY) => {
5633
5635
  var _a2;
5634
5636
  const rect = (_a2 = view == null ? void 0 : view.divElement) == null ? void 0 : _a2.getBoundingClientRect();
@@ -15102,7 +15104,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
15102
15104
  const _WindowManager = class extends InvisiblePlugin {
15103
15105
  constructor(context) {
15104
15106
  super(context);
15105
- this.version = "0.4.34";
15107
+ this.version = "0.4.37";
15106
15108
  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" } };
15107
15109
  this.emitter = callbacks$1;
15108
15110
  this.viewMode = ViewMode.Broadcaster;