@netless/window-manager 0.4.52 → 0.4.53
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/CHANGELOG.md +4 -0
- package/dist/Cursor/index.d.ts +3 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +18 -12
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +11 -11
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/Cursor/index.ts +18 -11
package/dist/index.es.js
CHANGED
@@ -19,7 +19,7 @@ var __spreadValues = (a2, b2) => {
|
|
19
19
|
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
20
20
|
import pRetry from "p-retry";
|
21
21
|
import Emittery from "emittery";
|
22
|
-
import { debounce, isEqual, omit, isObject, has, get, size as size$1, mapValues, noop as noop$2, pick, isEmpty, isInteger, orderBy, isFunction,
|
22
|
+
import { debounce, isEqual, omit, isObject, has, get, size as size$1, mapValues, noop as noop$2, pick, isEmpty, isInteger, orderBy, isFunction, isNumber, isNull } from "lodash";
|
23
23
|
import { ScenePathType, UpdateEventKind, listenUpdated, unlistenUpdated, reaction, autorun, toJS, listenDisposed, unlistenDisposed, ViewMode, AnimationMode, isPlayer, isRoom, WhiteVersion, ApplianceNames, RoomPhase, InvisiblePlugin } from "white-web-sdk";
|
24
24
|
import { v4 } from "uuid";
|
25
25
|
import { genUID, SideEffectManager } from "side-effect-manager";
|
@@ -7258,16 +7258,25 @@ class CursorManager {
|
|
7258
7258
|
}
|
7259
7259
|
return cursorInstance;
|
7260
7260
|
};
|
7261
|
-
this.
|
7262
|
-
const isTouch = event.pointerType === "touch";
|
7263
|
-
if (isTouch) {
|
7264
|
-
if (!event.isPrimary)
|
7265
|
-
return;
|
7266
|
-
}
|
7261
|
+
this.mouseMoveListener_ = (event, isTouch) => {
|
7267
7262
|
const type = this.getType(event);
|
7268
7263
|
this.updateCursor(type, event.clientX, event.clientY);
|
7269
7264
|
isTouch && this.showPencilEraserIfNeeded(type, event.clientX, event.clientY);
|
7270
|
-
}
|
7265
|
+
};
|
7266
|
+
this.mouseMoveTimer = 0;
|
7267
|
+
this.mouseMoveListener = (event) => {
|
7268
|
+
const isTouch = event.pointerType === "touch";
|
7269
|
+
if (isTouch && !event.isPrimary)
|
7270
|
+
return;
|
7271
|
+
const now = Date.now();
|
7272
|
+
if (now - this.mouseMoveTimer > 48) {
|
7273
|
+
this.mouseMoveTimer = now;
|
7274
|
+
this.mouseMoveListener_(event, isTouch);
|
7275
|
+
}
|
7276
|
+
};
|
7277
|
+
this.mouseLeaveListener = () => {
|
7278
|
+
this.hideCursor(this.manager.uid);
|
7279
|
+
};
|
7271
7280
|
this.getPoint = (view, clientX, clientY) => {
|
7272
7281
|
var _a2;
|
7273
7282
|
const rect = (_a2 = view == null ? void 0 : view.divElement) == null ? void 0 : _a2.getBoundingClientRect();
|
@@ -7295,9 +7304,6 @@ class CursorManager {
|
|
7295
7304
|
}
|
7296
7305
|
}
|
7297
7306
|
};
|
7298
|
-
this.mouseLeaveListener = () => {
|
7299
|
-
this.hideCursor(this.manager.uid);
|
7300
|
-
};
|
7301
7307
|
this.roomMembers = (_a = this.manager.room) == null ? void 0 : _a.state.roomMembers;
|
7302
7308
|
const wrapper = WindowManager.wrapper;
|
7303
7309
|
if (wrapper) {
|
@@ -16876,7 +16882,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
|
|
16876
16882
|
const _WindowManager = class extends InvisiblePlugin {
|
16877
16883
|
constructor(context) {
|
16878
16884
|
super(context);
|
16879
|
-
this.version = "0.4.
|
16885
|
+
this.version = "0.4.53";
|
16880
16886
|
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.2.27", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^0.1.5", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^0.2.11", "@netless/app-media-player": "0.1.0-beta.5", "@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.22", "@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", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.5.3", "vitest": "^0.14.1", "white-web-sdk": "2.16.33" } };
|
16881
16887
|
this.emitter = callbacks$1;
|
16882
16888
|
this.viewMode = ViewMode.Broadcaster;
|