@netless/window-manager 1.0.0-canary.39 → 1.0.0-canary.41
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.cjs.js +2 -2
- package/dist/index.es.js +23 -11
- package/dist/index.umd.js +2 -2
- package/dist/src/index.d.ts +2 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/pnpm-lock.yaml +4 -4
- package/src/index.ts +22 -8
package/dist/index.es.js
CHANGED
@@ -5111,8 +5111,8 @@ class MaxTitleBar extends DefaultTitleBar {
|
|
5111
5111
|
const $titleBar = super.render();
|
5112
5112
|
$titleBar.classList.add(this.wrapClassName("max-titlebar"));
|
5113
5113
|
this.sideEffect.addDisposer([
|
5114
|
-
this.state
|
5115
|
-
$titleBar.classList.toggle(this.wrapClassName("max-titlebar-
|
5114
|
+
combine$1([this.boxes$, this.state$]).subscribe(([boxes, state]) => {
|
5115
|
+
$titleBar.classList.toggle(this.wrapClassName("max-titlebar-active"), state === TELE_BOX_STATE.Maximized && boxes.length > 0);
|
5116
5116
|
}),
|
5117
5117
|
this.readonly$.subscribe((readonly) => {
|
5118
5118
|
$titleBar.classList.toggle(this.wrapClassName("readonly"), readonly);
|
@@ -12908,15 +12908,17 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
|
|
12908
12908
|
const _WindowManager = class extends InvisiblePlugin {
|
12909
12909
|
constructor(context) {
|
12910
12910
|
super(context);
|
12911
|
-
this.version = "1.0.0-canary.
|
12911
|
+
this.version = "1.0.0-canary.41";
|
12912
12912
|
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "1.0.0-alpha.34", "emittery": "^0.11.0", "lodash": "^4.17.21", "p-retry": "^4.6.2", "side-effect-manager": "^1.1.1", "uuid": "^7.0.3", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^0.3.0", "@netless/app-plyr": "0.2.0", "@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": "^2.5.3", "vite-plugin-dts": "^1.2.1", "vitest": "^0.18.0", "white-web-sdk": "2.16.26" } };
|
12913
12913
|
this.emitter = callbacks;
|
12914
12914
|
this.viewMode = ViewMode.Broadcaster;
|
12915
12915
|
this.viewMode$ = new Val$1(ViewMode.Broadcaster);
|
12916
12916
|
this.isReplay = isPlayer(this.displayer);
|
12917
|
+
this.cameraUpdating = 0;
|
12917
12918
|
this.containerSizeRatio = _WindowManager.containerSizeRatio;
|
12918
12919
|
this.moveCamera = debounce((camera) => {
|
12919
12920
|
var _a;
|
12921
|
+
console.log("moveCamera", performance.now());
|
12920
12922
|
const mainViewCamera = __spreadValues({}, this.mainView.camera);
|
12921
12923
|
const nextCamera = __spreadValues(__spreadValues({}, mainViewCamera), camera);
|
12922
12924
|
if (isEqual(nextCamera, mainViewCamera))
|
@@ -12942,15 +12944,25 @@ const _WindowManager = class extends InvisiblePlugin {
|
|
12942
12944
|
this.mainView.moveCamera(camera);
|
12943
12945
|
}
|
12944
12946
|
this.appManager.dispatchInternalEvent(Events.MoveCamera, camera);
|
12945
|
-
|
12946
|
-
if (
|
12947
|
-
|
12948
|
-
|
12949
|
-
|
12950
|
-
|
12951
|
-
|
12947
|
+
const onCameraUpdated = () => {
|
12948
|
+
if (this.cameraUpdating) {
|
12949
|
+
clearTimeout(this.cameraUpdating);
|
12950
|
+
}
|
12951
|
+
this.cameraUpdating = setTimeout(() => {
|
12952
|
+
this.mainView.callbacks.off("onCameraUpdated", onCameraUpdated);
|
12953
|
+
clearTimeout(this.cameraUpdating);
|
12954
|
+
this.cameraUpdating = 0;
|
12955
|
+
if (!this.appManager)
|
12956
|
+
return;
|
12957
|
+
this.appManager.mainViewProxy.storeCamera(__spreadValues({
|
12958
|
+
id: this.appManager.uid
|
12959
|
+
}, nextCamera));
|
12960
|
+
}, 50);
|
12961
|
+
};
|
12962
|
+
this.mainView.callbacks.off("onCameraUpdated", onCameraUpdated);
|
12963
|
+
this.mainView.callbacks.on("onCameraUpdated", onCameraUpdated);
|
12952
12964
|
}
|
12953
|
-
},
|
12965
|
+
}, 400, { leading: true });
|
12954
12966
|
_WindowManager.displayer = context.displayer;
|
12955
12967
|
window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "1.0.0-alpha.34", "emittery": "^0.11.0", "lodash": "^4.17.21", "p-retry": "^4.6.2", "side-effect-manager": "^1.1.1", "uuid": "^7.0.3", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^0.3.0", "@netless/app-plyr": "0.2.0", "@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": "^2.5.3", "vite-plugin-dts": "^1.2.1", "vitest": "^0.18.0", "white-web-sdk": "2.16.26" } };
|
12956
12968
|
}
|