@netless/window-manager 1.0.7-beta.9 → 1.0.8
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.d.ts +0 -2
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/AppListener.ts +17 -17
- package/src/AppManager.ts +0 -4
- package/src/index.ts +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import pRetry from "p-retry";
|
|
2
2
|
import Emittery from "emittery";
|
|
3
|
-
import { debounce,
|
|
3
|
+
import { debounce, isObject, has, get, size as size$1, mapValues, noop as noop$2, isEmpty, omit, pick, isEqual, isInteger, orderBy, isFunction, isNumber, isNull } from "lodash";
|
|
4
4
|
import { ScenePathType, UpdateEventKind, listenUpdated, unlistenUpdated, reaction, autorun, toJS, listenDisposed, unlistenDisposed, WhiteVersion, ApplianceNames, isRoom, ViewMode, AnimationMode, isPlayer, RoomPhase, PlayerPhase, InvisiblePlugin } from "white-web-sdk";
|
|
5
5
|
import { v4 } from "uuid";
|
|
6
6
|
import { ResizeObserver as ResizeObserver$3 } from "@juggle/resize-observer";
|
|
@@ -466,14 +466,6 @@ class AppListeners {
|
|
|
466
466
|
this.setMainViewScenePathHandler(data.payload);
|
|
467
467
|
break;
|
|
468
468
|
}
|
|
469
|
-
case Events.MoveCamera: {
|
|
470
|
-
this.moveCameraHandler(data.payload);
|
|
471
|
-
break;
|
|
472
|
-
}
|
|
473
|
-
case Events.MoveCameraToContain: {
|
|
474
|
-
this.moveCameraToContainHandler(data.payload);
|
|
475
|
-
break;
|
|
476
|
-
}
|
|
477
469
|
case Events.CursorMove: {
|
|
478
470
|
this.cursorMoveHandler(data.payload);
|
|
479
471
|
break;
|
|
@@ -513,14 +505,6 @@ class AppListeners {
|
|
|
513
505
|
setViewFocusScenePath(this.manager.mainView, nextScenePath);
|
|
514
506
|
callbacks$1.emit("mainViewScenePathChange", nextScenePath);
|
|
515
507
|
};
|
|
516
|
-
this.moveCameraHandler = (payload) => {
|
|
517
|
-
if (isEqual(omit(payload, ["animationMode"]), { ...this.manager.mainView.camera }))
|
|
518
|
-
return;
|
|
519
|
-
this.manager.mainView.moveCamera(payload);
|
|
520
|
-
};
|
|
521
|
-
this.moveCameraToContainHandler = (payload) => {
|
|
522
|
-
this.manager.mainView.moveCameraToContain(payload);
|
|
523
|
-
};
|
|
524
508
|
this.cursorMoveHandler = (payload) => {
|
|
525
509
|
internalEmitter.emit("cursorMove", payload);
|
|
526
510
|
};
|
|
@@ -8517,15 +8501,12 @@ class AppManager {
|
|
|
8517
8501
|
var _a;
|
|
8518
8502
|
if (Object.keys(this.attributes.apps).length && this.store.focus) {
|
|
8519
8503
|
this._focusAppId = this.store.focus;
|
|
8520
|
-
console.log("onCreated===>", this._focusAppId);
|
|
8521
8504
|
await new Promise((resolve) => {
|
|
8522
8505
|
this._focusAppCreatedResolve = resolve;
|
|
8523
8506
|
this._resolveTimer = setTimeout(() => {
|
|
8524
|
-
console.log("onCreated===>3333", this._focusAppId);
|
|
8525
8507
|
resolve(this.appProxies.get(this._focusAppId || ""));
|
|
8526
8508
|
}, 500);
|
|
8527
8509
|
}).then(() => {
|
|
8528
|
-
console.log("onCreated===>2222", this._focusAppId);
|
|
8529
8510
|
this.focusByAttributes(this.attributes.apps);
|
|
8530
8511
|
});
|
|
8531
8512
|
}
|
|
@@ -8637,7 +8618,6 @@ class AppManager {
|
|
|
8637
8618
|
false
|
|
8638
8619
|
);
|
|
8639
8620
|
if (appProxy && this._focusAppId === id2 && this._focusAppCreatedResolve) {
|
|
8640
|
-
console.log("onCreated===>4444", this._focusAppId);
|
|
8641
8621
|
if (this._resolveTimer) {
|
|
8642
8622
|
clearTimeout(this._resolveTimer);
|
|
8643
8623
|
}
|
|
@@ -19657,7 +19637,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter: internalEmitter });
|
|
|
19657
19637
|
const _WindowManager = class extends InvisiblePlugin {
|
|
19658
19638
|
constructor(context) {
|
|
19659
19639
|
super(context);
|
|
19660
|
-
this.version = "1.0.
|
|
19640
|
+
this.version = "1.0.8";
|
|
19661
19641
|
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" } };
|
|
19662
19642
|
this.emitter = callbacks$1;
|
|
19663
19643
|
this.viewMode = ViewMode.Broadcaster;
|
|
@@ -20270,25 +20250,21 @@ const _WindowManager = class extends InvisiblePlugin {
|
|
|
20270
20250
|
}
|
|
20271
20251
|
}
|
|
20272
20252
|
moveCamera(camera) {
|
|
20273
|
-
var _a;
|
|
20274
20253
|
const pureCamera = omit(camera, ["animationMode"]);
|
|
20275
20254
|
const mainViewCamera = { ...this.mainView.camera };
|
|
20276
20255
|
if (isEqual({ ...mainViewCamera, ...pureCamera }, mainViewCamera))
|
|
20277
20256
|
return;
|
|
20278
20257
|
this.mainView.moveCamera(camera);
|
|
20279
|
-
(_a = this.appManager) == null ? void 0 : _a.dispatchInternalEvent(Events.MoveCamera, camera);
|
|
20280
20258
|
setTimeout(() => {
|
|
20281
|
-
var
|
|
20282
|
-
(
|
|
20259
|
+
var _a;
|
|
20260
|
+
(_a = this.appManager) == null ? void 0 : _a.mainViewProxy.setCameraAndSize();
|
|
20283
20261
|
}, 500);
|
|
20284
20262
|
}
|
|
20285
20263
|
moveCameraToContain(rectangle) {
|
|
20286
|
-
var _a;
|
|
20287
20264
|
this.mainView.moveCameraToContain(rectangle);
|
|
20288
|
-
(_a = this.appManager) == null ? void 0 : _a.dispatchInternalEvent(Events.MoveCameraToContain, rectangle);
|
|
20289
20265
|
setTimeout(() => {
|
|
20290
|
-
var
|
|
20291
|
-
(
|
|
20266
|
+
var _a;
|
|
20267
|
+
(_a = this.appManager) == null ? void 0 : _a.mainViewProxy.setCameraAndSize();
|
|
20292
20268
|
}, 500);
|
|
20293
20269
|
}
|
|
20294
20270
|
convertToPointInWorld(point) {
|