@netless/window-manager 1.0.9 → 1.0.10-beta.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.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/App/AppProxy.ts +3 -0
- package/src/AppManager.ts +10 -6
- package/src/BoxManager.ts +3 -1
package/dist/index.mjs
CHANGED
|
@@ -5614,7 +5614,9 @@ class BoxManager {
|
|
|
5614
5614
|
this.teleBoxManager.setMinimized(Boolean(state.minimized), true);
|
|
5615
5615
|
}
|
|
5616
5616
|
}, 50);
|
|
5617
|
-
|
|
5617
|
+
if (!state.boxStatus) {
|
|
5618
|
+
this.context.callbacks.emit("boxStateChange", this.teleBoxManager.state);
|
|
5619
|
+
}
|
|
5618
5620
|
}
|
|
5619
5621
|
}
|
|
5620
5622
|
updateManagerRect() {
|
|
@@ -7518,13 +7520,16 @@ const _AppProxy = class {
|
|
|
7518
7520
|
await this.destroy(true, false, true);
|
|
7519
7521
|
return;
|
|
7520
7522
|
}
|
|
7523
|
+
console.log("onReconnected====>", this.id);
|
|
7521
7524
|
this.appEmitter.emit("reconnected", void 0);
|
|
7522
7525
|
const currentAppState = this.getAppInitState(this.id);
|
|
7526
|
+
console.log("onReconnected====>0000", currentAppState == null ? void 0 : currentAppState.boxStatus);
|
|
7523
7527
|
await this.destroy(true, false, true);
|
|
7524
7528
|
const params = this.params;
|
|
7525
7529
|
const AppProxyClass = getExtendClass$1(_AppProxy, WindowManager.extendClass);
|
|
7526
7530
|
const appProxy = new AppProxyClass(params, this.manager, this.id, this.isAddApp);
|
|
7527
7531
|
await appProxy.baseInsertApp(true);
|
|
7532
|
+
console.log("onReconnected====>", currentAppState == null ? void 0 : currentAppState.boxStatus);
|
|
7528
7533
|
(_a = this.boxManager) == null ? void 0 : _a.updateBoxState(currentAppState);
|
|
7529
7534
|
}
|
|
7530
7535
|
async onRemoveScene(scenePath) {
|
|
@@ -8115,7 +8120,7 @@ class AppManager {
|
|
|
8115
8120
|
await this.closeAll();
|
|
8116
8121
|
};
|
|
8117
8122
|
this.onPlayerSeekDone = async (time2) => {
|
|
8118
|
-
await this.
|
|
8123
|
+
await this._attributesUpdateCallback(this.attributes.apps);
|
|
8119
8124
|
this.appProxies.forEach((appProxy) => {
|
|
8120
8125
|
appProxy.onSeek(time2);
|
|
8121
8126
|
});
|
|
@@ -8241,6 +8246,9 @@ class AppManager {
|
|
|
8241
8246
|
callbacks$1.emit("onBoxStateChange", payload);
|
|
8242
8247
|
};
|
|
8243
8248
|
this.notifyBoxesStatusChange = debounce(() => {
|
|
8249
|
+
var _a;
|
|
8250
|
+
console.log("setBoxesStatus====>", this.attributes.boxesStatus);
|
|
8251
|
+
(_a = this.boxManager) == null ? void 0 : _a.setBoxesStatus(this.attributes.boxesStatus);
|
|
8244
8252
|
const entries = Object.entries(this.attributes.boxesStatus);
|
|
8245
8253
|
if (entries.length > 0) {
|
|
8246
8254
|
entries.forEach(([appId, status]) => {
|
|
@@ -8250,14 +8258,13 @@ class AppManager {
|
|
|
8250
8258
|
}
|
|
8251
8259
|
});
|
|
8252
8260
|
}
|
|
8253
|
-
},
|
|
8261
|
+
}, 100);
|
|
8254
8262
|
this.addBoxesStatusChangeListener = () => {
|
|
8255
8263
|
this.refresher.add("boxesStatus", () => {
|
|
8256
8264
|
return safeListenPropsUpdated(
|
|
8257
8265
|
() => this.attributes.boxesStatus,
|
|
8258
8266
|
() => {
|
|
8259
|
-
|
|
8260
|
-
(_a = this.boxManager) == null ? void 0 : _a.setBoxesStatus(this.attributes.boxesStatus);
|
|
8267
|
+
console.log("setBoxesStatus====>000", this.attributes.boxesStatus);
|
|
8261
8268
|
this.notifyBoxesStatusChange();
|
|
8262
8269
|
}
|
|
8263
8270
|
);
|
|
@@ -8507,11 +8514,12 @@ class AppManager {
|
|
|
8507
8514
|
resolve(this.appProxies.get(this._focusAppId || ""));
|
|
8508
8515
|
}, 500);
|
|
8509
8516
|
}).then(() => {
|
|
8517
|
+
this._resolveTimer = void 0;
|
|
8518
|
+
this._focusAppCreatedResolve = void 0;
|
|
8510
8519
|
this.focusByAttributes(this.attributes.apps);
|
|
8511
8520
|
});
|
|
8512
8521
|
}
|
|
8513
|
-
await this.
|
|
8514
|
-
this.focusByAttributes(this.attributes.apps);
|
|
8522
|
+
await this._attributesUpdateCallback(this.attributes.apps);
|
|
8515
8523
|
internalEmitter.emit("updateManagerRect");
|
|
8516
8524
|
boxEmitter.on("move", this.onBoxMove);
|
|
8517
8525
|
boxEmitter.on("resize", this.onBoxResize);
|
|
@@ -8561,6 +8569,7 @@ class AppManager {
|
|
|
8561
8569
|
}
|
|
8562
8570
|
this.displayerWritableListener(!((_a = this.room) == null ? void 0 : _a.isWritable));
|
|
8563
8571
|
this.displayer.callbacks.on("onEnableWriteNowChanged", this.displayerWritableListener);
|
|
8572
|
+
this.focusByAttributes(this.attributes.apps);
|
|
8564
8573
|
this._prevFocused = this.attributes.focus;
|
|
8565
8574
|
if (!WindowManager.supportAppliancePlugin) {
|
|
8566
8575
|
this.sideEffectManager.add(() => {
|
|
@@ -8810,7 +8819,7 @@ class AppManager {
|
|
|
8810
8819
|
}
|
|
8811
8820
|
}
|
|
8812
8821
|
async onReconnected() {
|
|
8813
|
-
this.
|
|
8822
|
+
await this._attributesUpdateCallback(this.attributes.apps);
|
|
8814
8823
|
const appProxies = Array.from(this.appProxies.values());
|
|
8815
8824
|
const reconnected = appProxies.map((appProxy) => {
|
|
8816
8825
|
return appProxy.onReconnected();
|
|
@@ -19639,7 +19648,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter: internalEmitter });
|
|
|
19639
19648
|
const _WindowManager = class extends InvisiblePlugin {
|
|
19640
19649
|
constructor(context) {
|
|
19641
19650
|
super(context);
|
|
19642
|
-
this.version = "1.0.
|
|
19651
|
+
this.version = "1.0.10-beta.1";
|
|
19643
19652
|
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0-beta.14", "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.52" }, "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.52" } };
|
|
19644
19653
|
this.emitter = callbacks$1;
|
|
19645
19654
|
this.viewMode = ViewMode.Broadcaster;
|