@netless/window-manager 1.0.0-canary.67 → 1.0.0-canary.68

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.js CHANGED
@@ -2777,7 +2777,7 @@ const safeListenPropsUpdated = (getProps, callback, onDestroyed) => {
2777
2777
  disposeReaction();
2778
2778
  };
2779
2779
  };
2780
- const onObjectRemoved = onObjectByEvent(whiteWebSdk.UpdateEventKind.Removed);
2780
+ onObjectByEvent(whiteWebSdk.UpdateEventKind.Removed);
2781
2781
  onObjectByEvent(whiteWebSdk.UpdateEventKind.Inserted);
2782
2782
  class RedoUndo {
2783
2783
  constructor(context) {
@@ -3239,9 +3239,14 @@ class AppManager {
3239
3239
  this.addAppCloseListener = () => {
3240
3240
  var _a2;
3241
3241
  (_a2 = this.refresher) == null ? void 0 : _a2.add("appsClose", () => {
3242
- return onObjectRemoved(this.attributes.apps, () => {
3243
- this.onAppDelete(this.attributes.apps);
3244
- });
3242
+ return safeListenPropsUpdated(
3243
+ () => this.attributes.apps,
3244
+ (events) => {
3245
+ if (events.map((e) => e.kind).includes(whiteWebSdk.UpdateEventKind.Removed)) {
3246
+ this.onAppDelete(this.attributes.apps);
3247
+ }
3248
+ }
3249
+ );
3245
3250
  });
3246
3251
  };
3247
3252
  this.onMainViewIndexChange = (index2) => {
@@ -12793,7 +12798,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
12793
12798
  const _WindowManager = class extends whiteWebSdk.InvisiblePlugin {
12794
12799
  constructor(context) {
12795
12800
  super(context);
12796
- this.version = "1.0.0-canary.67";
12801
+ this.version = "1.0.0-canary.68";
12797
12802
  this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "lodash": "^4.17.21", "p-retry": "^4.6.2", "side-effect-manager": "^1.2.1", "uuid": "^7.0.3", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^1.0.0-canary.3", "@netless/app-plyr": "^0.2.4", "@playwright/test": "^1.23.2", "@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.49", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.6", "@types/node": "^18.0.3", "@types/uuid": "^8.3.4", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.2", "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.3", "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": "^3.1.3", "vite-plugin-dts": "^1.5.0", "vitest": "^0.23.4", "white-web-sdk": "^2.16.35" } };
12798
12803
  this.emitter = callbacks;
12799
12804
  this.viewMode$ = new valueEnhancer.Val(whiteWebSdk.ViewMode.Broadcaster);
package/dist/index.mjs CHANGED
@@ -2772,7 +2772,7 @@ const safeListenPropsUpdated = (getProps, callback, onDestroyed) => {
2772
2772
  disposeReaction();
2773
2773
  };
2774
2774
  };
2775
- const onObjectRemoved = onObjectByEvent(UpdateEventKind.Removed);
2775
+ onObjectByEvent(UpdateEventKind.Removed);
2776
2776
  onObjectByEvent(UpdateEventKind.Inserted);
2777
2777
  class RedoUndo {
2778
2778
  constructor(context) {
@@ -3234,9 +3234,14 @@ class AppManager {
3234
3234
  this.addAppCloseListener = () => {
3235
3235
  var _a2;
3236
3236
  (_a2 = this.refresher) == null ? void 0 : _a2.add("appsClose", () => {
3237
- return onObjectRemoved(this.attributes.apps, () => {
3238
- this.onAppDelete(this.attributes.apps);
3239
- });
3237
+ return safeListenPropsUpdated(
3238
+ () => this.attributes.apps,
3239
+ (events) => {
3240
+ if (events.map((e) => e.kind).includes(UpdateEventKind.Removed)) {
3241
+ this.onAppDelete(this.attributes.apps);
3242
+ }
3243
+ }
3244
+ );
3240
3245
  });
3241
3246
  };
3242
3247
  this.onMainViewIndexChange = (index2) => {
@@ -12788,7 +12793,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
12788
12793
  const _WindowManager = class extends InvisiblePlugin {
12789
12794
  constructor(context) {
12790
12795
  super(context);
12791
- this.version = "1.0.0-canary.67";
12796
+ this.version = "1.0.0-canary.68";
12792
12797
  this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "lodash": "^4.17.21", "p-retry": "^4.6.2", "side-effect-manager": "^1.2.1", "uuid": "^7.0.3", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^1.0.0-canary.3", "@netless/app-plyr": "^0.2.4", "@playwright/test": "^1.23.2", "@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.49", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.6", "@types/node": "^18.0.3", "@types/uuid": "^8.3.4", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.2", "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.3", "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": "^3.1.3", "vite-plugin-dts": "^1.5.0", "vitest": "^0.23.4", "white-web-sdk": "^2.16.35" } };
12793
12798
  this.emitter = callbacks;
12794
12799
  this.viewMode$ = new Val(ViewMode.Broadcaster);
package/dist/index.umd.js CHANGED
@@ -2770,7 +2770,7 @@
2770
2770
  disposeReaction();
2771
2771
  };
2772
2772
  };
2773
- const onObjectRemoved = onObjectByEvent(whiteWebSdk.UpdateEventKind.Removed);
2773
+ onObjectByEvent(whiteWebSdk.UpdateEventKind.Removed);
2774
2774
  onObjectByEvent(whiteWebSdk.UpdateEventKind.Inserted);
2775
2775
  class RedoUndo {
2776
2776
  constructor(context) {
@@ -3232,9 +3232,14 @@
3232
3232
  this.addAppCloseListener = () => {
3233
3233
  var _a2;
3234
3234
  (_a2 = this.refresher) == null ? void 0 : _a2.add("appsClose", () => {
3235
- return onObjectRemoved(this.attributes.apps, () => {
3236
- this.onAppDelete(this.attributes.apps);
3237
- });
3235
+ return safeListenPropsUpdated(
3236
+ () => this.attributes.apps,
3237
+ (events) => {
3238
+ if (events.map((e) => e.kind).includes(whiteWebSdk.UpdateEventKind.Removed)) {
3239
+ this.onAppDelete(this.attributes.apps);
3240
+ }
3241
+ }
3242
+ );
3238
3243
  });
3239
3244
  };
3240
3245
  this.onMainViewIndexChange = (index2) => {
@@ -12786,7 +12791,7 @@
12786
12791
  const _WindowManager = class extends whiteWebSdk.InvisiblePlugin {
12787
12792
  constructor(context) {
12788
12793
  super(context);
12789
- this.version = "1.0.0-canary.67";
12794
+ this.version = "1.0.0-canary.68";
12790
12795
  this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "lodash": "^4.17.21", "p-retry": "^4.6.2", "side-effect-manager": "^1.2.1", "uuid": "^7.0.3", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^1.0.0-canary.3", "@netless/app-plyr": "^0.2.4", "@playwright/test": "^1.23.2", "@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.49", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.6", "@types/node": "^18.0.3", "@types/uuid": "^8.3.4", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.2", "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.3", "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": "^3.1.3", "vite-plugin-dts": "^1.5.0", "vitest": "^0.23.4", "white-web-sdk": "^2.16.35" } };
12791
12796
  this.emitter = callbacks;
12792
12797
  this.viewMode$ = new valueEnhancer.Val(whiteWebSdk.ViewMode.Broadcaster);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "1.0.0-canary.67",
3
+ "version": "1.0.0-canary.68",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
package/src/AppManager.ts CHANGED
@@ -3,7 +3,7 @@ import { AppCreateQueue } from "./Utils/AppCreateQueue";
3
3
  import { AppListeners } from "./AppListener";
4
4
  import { AppProxy } from "./App";
5
5
  import { appRegister } from "./Register";
6
- import { autorun, isPlayer, isRoom, ScenePathType, toJS } from "white-web-sdk";
6
+ import { autorun, isPlayer, isRoom, ScenePathType, toJS, UpdateEventKind } from "white-web-sdk";
7
7
  import { boxEmitter } from "./BoxEmitter";
8
8
  import { calculateNextIndex } from "./Page";
9
9
  import { callbacks } from "./callback";
@@ -12,7 +12,7 @@ import { emitter } from "./InternalEmitter";
12
12
  import { Fields, store } from "./AttributesDelegate";
13
13
  import { log } from "./Utils/log";
14
14
  import { MainViewProxy } from "./View/MainView";
15
- import { onObjectRemoved, safeListenPropsUpdated } from "./Utils/Reactive";
15
+ import { safeListenPropsUpdated } from "./Utils/Reactive";
16
16
  import { reconnectRefresher, WindowManager } from "./index";
17
17
  import { RedoUndo } from "./RedoUndo";
18
18
  import { serializeRoomMembers } from "./Helper";
@@ -438,9 +438,14 @@ export class AppManager {
438
438
 
439
439
  public addAppCloseListener = () => {
440
440
  this.refresher?.add("appsClose", () => {
441
- return onObjectRemoved(this.attributes.apps, () => {
442
- this.onAppDelete(this.attributes.apps);
443
- });
441
+ return safeListenPropsUpdated(
442
+ () => this.attributes.apps,
443
+ (events) => {
444
+ if (events.map(e => e.kind).includes(UpdateEventKind.Removed)) {
445
+ this.onAppDelete(this.attributes.apps);
446
+ }
447
+ }
448
+ );
444
449
  });
445
450
  };
446
451