@netless/window-manager 1.0.13-test.1 → 1.0.13-test.2
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 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/AppListener.ts +1 -1
- package/src/AppManager.ts +1 -1
- package/src/AttributesDelegate.ts +3 -3
- package/src/Utils/RoomHacker.ts +5 -1
- package/src/View/MainView.ts +7 -5
package/dist/index.mjs
CHANGED
|
@@ -464,7 +464,7 @@ class AppListeners {
|
|
|
464
464
|
break;
|
|
465
465
|
}
|
|
466
466
|
case Events.SetMainViewScenePath: {
|
|
467
|
-
console.log("[window-manager] mainMagixEventListener====>", data.payload);
|
|
467
|
+
console.log("[window-manager] mainMagixEventListener====>", JSON.stringify(data.payload));
|
|
468
468
|
this.setMainViewScenePathHandler(data.payload);
|
|
469
469
|
break;
|
|
470
470
|
}
|
|
@@ -7143,19 +7143,19 @@ class AttributesDelegate {
|
|
|
7143
7143
|
return get(this.attributes, ["mainViewSize"]);
|
|
7144
7144
|
}
|
|
7145
7145
|
setMainViewCamera(camera) {
|
|
7146
|
-
console.log("[window-manager] setMainViewCamera", camera);
|
|
7146
|
+
console.log("[window-manager] setMainViewCamera====>", JSON.stringify(camera));
|
|
7147
7147
|
this.context.safeSetAttributes({ ["mainViewCamera"]: { ...camera } });
|
|
7148
7148
|
}
|
|
7149
7149
|
setMainViewSize(size2) {
|
|
7150
7150
|
if (size2.width === 0 || size2.height === 0)
|
|
7151
7151
|
return;
|
|
7152
|
-
console.log("[window-manager] setMainViewSize", size2);
|
|
7152
|
+
console.log("[window-manager] setMainViewSize====>", JSON.stringify(size2));
|
|
7153
7153
|
this.context.safeSetAttributes({ ["mainViewSize"]: { ...size2 } });
|
|
7154
7154
|
}
|
|
7155
7155
|
setMainViewCameraAndSize(camera, size2) {
|
|
7156
7156
|
if (size2.width === 0 || size2.height === 0)
|
|
7157
7157
|
return;
|
|
7158
|
-
console.log("[window-manager] setMainViewCameraAndSize", camera, size2);
|
|
7158
|
+
console.log("[window-manager] setMainViewCameraAndSize====>", JSON.stringify(camera), JSON.stringify(size2));
|
|
7159
7159
|
this.context.safeSetAttributes({
|
|
7160
7160
|
["mainViewCamera"]: { ...camera },
|
|
7161
7161
|
["mainViewSize"]: { ...size2 }
|
|
@@ -7789,7 +7789,7 @@ class MainViewProxy {
|
|
|
7789
7789
|
() => this.mainViewCamera,
|
|
7790
7790
|
(camera) => {
|
|
7791
7791
|
if (camera && camera.id !== this.manager.uid) {
|
|
7792
|
-
console.log("[window-manager] cameraReaction====>", camera, this.mainViewSize);
|
|
7792
|
+
console.log("[window-manager] cameraReaction====>", JSON.stringify(camera), JSON.stringify(this.mainViewSize));
|
|
7793
7793
|
this.moveCameraToContian(this.mainViewSize);
|
|
7794
7794
|
this.moveCamera(camera);
|
|
7795
7795
|
}
|
|
@@ -7799,15 +7799,15 @@ class MainViewProxy {
|
|
|
7799
7799
|
};
|
|
7800
7800
|
this.sizeChangeHandler = debounce((size2) => {
|
|
7801
7801
|
if (size2) {
|
|
7802
|
-
console.log("[window-manager] sizeChangeHandler====>", size2, this.mainViewCamera);
|
|
7803
7802
|
this.moveCameraToContian(size2);
|
|
7804
7803
|
this.moveCamera(this.mainViewCamera);
|
|
7804
|
+
console.log("[window-manager] sizeChangeHandler====> current size and camera", JSON.stringify(size2), JSON.stringify(this.mainViewCamera));
|
|
7805
7805
|
}
|
|
7806
7806
|
this.ensureMainViewSize();
|
|
7807
7807
|
}, 30);
|
|
7808
7808
|
this.onUpdateContainerSizeRatio = () => {
|
|
7809
7809
|
const size2 = this.store.getMainViewSize();
|
|
7810
|
-
console.log("[window-manager] onUpdateContainerSizeRatio====>", size2);
|
|
7810
|
+
console.log("[window-manager] onUpdateContainerSizeRatio====>", JSON.stringify(size2));
|
|
7811
7811
|
this.sizeChangeHandler(size2);
|
|
7812
7812
|
};
|
|
7813
7813
|
this.onCameraUpdatedByDevice = (camera) => {
|
|
@@ -7831,10 +7831,12 @@ class MainViewProxy {
|
|
|
7831
7831
|
clearTimeout(this._syncMainViewTimer);
|
|
7832
7832
|
this._syncMainViewTimer = setTimeout(this.syncMainView, 100, this.manager.room);
|
|
7833
7833
|
}
|
|
7834
|
+
console.log("[window-manager] onCameraOrSizeUpdated====>", JSON.stringify(this.cameraState));
|
|
7834
7835
|
this.ensureMainViewSize();
|
|
7835
7836
|
};
|
|
7836
7837
|
this.syncMainView = (room) => {
|
|
7837
7838
|
if (room.isWritable) {
|
|
7839
|
+
console.log("[window-manager] syncMainView====>");
|
|
7838
7840
|
room.syncMainView(this.mainView);
|
|
7839
7841
|
}
|
|
7840
7842
|
};
|
|
@@ -7850,7 +7852,7 @@ class MainViewProxy {
|
|
|
7850
7852
|
this.startListenWritableChange();
|
|
7851
7853
|
});
|
|
7852
7854
|
const playgroundSizeChangeListener = () => {
|
|
7853
|
-
console.log("[window-manager] playgroundSizeChangeListener====>", this.mainViewSize);
|
|
7855
|
+
console.log("[window-manager] playgroundSizeChangeListener====>", JSON.stringify(this.mainViewSize));
|
|
7854
7856
|
this.sizeChangeHandler(this.mainViewSize);
|
|
7855
7857
|
};
|
|
7856
7858
|
this.sideEffectManager.add(() => {
|
|
@@ -7890,7 +7892,7 @@ class MainViewProxy {
|
|
|
7890
7892
|
this.moveCamera(this.mainViewCamera);
|
|
7891
7893
|
}
|
|
7892
7894
|
start() {
|
|
7893
|
-
console.log("[window-manager] start====>", this.mainViewSize);
|
|
7895
|
+
console.log("[window-manager] start====>", JSON.stringify(this.mainViewSize));
|
|
7894
7896
|
this.sizeChangeHandler(this.mainViewSize);
|
|
7895
7897
|
if (this.started)
|
|
7896
7898
|
return;
|
|
@@ -8831,7 +8833,7 @@ class AppManager {
|
|
|
8831
8833
|
}
|
|
8832
8834
|
}
|
|
8833
8835
|
dispatchSetMainViewScenePath(scenePath) {
|
|
8834
|
-
console.log("[window-manager] dispatchSetMainViewScenePath====>", scenePath);
|
|
8836
|
+
console.log("[window-manager] dispatchSetMainViewScenePath====>", JSON.stringify(scenePath));
|
|
8835
8837
|
this.dispatchInternalEvent(Events.SetMainViewScenePath, { nextScenePath: scenePath });
|
|
8836
8838
|
callbacks$1.emit("mainViewScenePathChange", scenePath);
|
|
8837
8839
|
setScenePath(this.room, scenePath);
|
|
@@ -9097,6 +9099,11 @@ const replaceRoomFunction = (room, manager) => {
|
|
|
9097
9099
|
return manager.canRedoSteps;
|
|
9098
9100
|
}
|
|
9099
9101
|
});
|
|
9102
|
+
const _scalePptToFit = room.scalePptToFit;
|
|
9103
|
+
room.scalePptToFit = (...args) => {
|
|
9104
|
+
console.log("[window-manager] scalePptToFit====>", JSON.stringify(args));
|
|
9105
|
+
_scalePptToFit.call(room, ...args);
|
|
9106
|
+
};
|
|
9100
9107
|
room.moveCamera = (camera) => manager.moveCamera(camera);
|
|
9101
9108
|
room.moveCameraToContain = (...args) => manager.moveCameraToContain(...args);
|
|
9102
9109
|
room.convertToPointInWorld = (...args) => manager.mainView.convertToPointInWorld(...args);
|
|
@@ -19687,7 +19694,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter: internalEmitter });
|
|
|
19687
19694
|
const _WindowManager = class extends InvisiblePlugin {
|
|
19688
19695
|
constructor(context) {
|
|
19689
19696
|
super(context);
|
|
19690
|
-
this.version = "1.0.13-test.
|
|
19697
|
+
this.version = "1.0.13-test.2";
|
|
19691
19698
|
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0", "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.53" }, "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.53" } };
|
|
19692
19699
|
this.emitter = callbacks$1;
|
|
19693
19700
|
this.viewMode = ViewMode.Broadcaster;
|