@netless/window-manager 1.0.0-canary.74 → 1.0.0-canary.76
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 +4 -4
- package/dist/index.mjs +4 -4
- package/dist/index.umd.js +4 -4
- package/package.json +1 -1
- package/src/App/AppContext.ts +1 -1
- package/src/View/ScrollMode.ts +2 -2
package/dist/index.js
CHANGED
@@ -988,7 +988,7 @@ class AppContext {
|
|
988
988
|
}
|
989
989
|
}
|
990
990
|
get isWritable() {
|
991
|
-
return this.
|
991
|
+
return this.appProxy.isWritable && !this.destroyed;
|
992
992
|
}
|
993
993
|
get box() {
|
994
994
|
const box = this.appProxy.box$.value;
|
@@ -2557,12 +2557,12 @@ class ScrollMode {
|
|
2557
2557
|
this.onWheel = (ev) => {
|
2558
2558
|
var _a2;
|
2559
2559
|
const target = ev.target;
|
2560
|
-
if (
|
2560
|
+
if ((_a2 = this._whiteboard$.value) == null ? void 0 : _a2.contains(target)) {
|
2561
2561
|
ev.preventDefault();
|
2562
2562
|
ev.stopPropagation();
|
2563
2563
|
const dy = ev.deltaY || 0;
|
2564
2564
|
const { width } = this._size$.value;
|
2565
|
-
if (dy && width > 0) {
|
2565
|
+
if (this.shouldBroadcast() && dy && width > 0) {
|
2566
2566
|
const halfWbHeight = this._size$.value.height / 2 / this._scale$.value;
|
2567
2567
|
const scrollTop = this._scrollTop$.value + dy / this._scale$.value;
|
2568
2568
|
this.scrollStorage.setState({
|
@@ -12322,7 +12322,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
|
|
12322
12322
|
const _WindowManager = class extends whiteWebSdk.InvisiblePlugin {
|
12323
12323
|
constructor(context) {
|
12324
12324
|
super(context);
|
12325
|
-
this.version = "1.0.0-canary.
|
12325
|
+
this.version = "1.0.0-canary.76";
|
12326
12326
|
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.4.0", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "jspdf": "^2.5.1", "lodash": "^4.17.21", "p-retry": "^5.1.2", "side-effect-manager": "^1.2.1", "uuid": "^9.0.0", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "1.0.0-canary.5", "@netless/app-plyr": "^0.2.4", "@playwright/test": "^1.28.1", "@rollup/plugin-commonjs": "^23.0.4", "@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-url": "^8.0.1", "@sveltejs/vite-plugin-svelte": "^2.0.2", "@tsconfig/svelte": "^3.0.0", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.6", "@types/node": "^18.0.3", "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.46.1", "@typescript-eslint/parser": "^5.46.1", "@vitest/ui": "^0.25.7", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^8.29.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^4.0.0", "jsdom": "^19.0.0", "less": "^4.1.3", "prettier": "^2.8.1", "prettier-plugin-svelte": "^2.9.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^4.0.0", "svelte": "^3.54.0", "typescript": "^4.9.4", "vite": "^4.0.3", "vite-plugin-dts": "^1.7.1", "vitest": "^0.25.7", "white-web-sdk": "^2.16.40" } };
|
12327
12327
|
this.emitter = callbacks;
|
12328
12328
|
this.viewMode$ = new valueEnhancer.Val(whiteWebSdk.ViewMode.Broadcaster);
|
package/dist/index.mjs
CHANGED
@@ -968,7 +968,7 @@ class AppContext {
|
|
968
968
|
}
|
969
969
|
}
|
970
970
|
get isWritable() {
|
971
|
-
return this.
|
971
|
+
return this.appProxy.isWritable && !this.destroyed;
|
972
972
|
}
|
973
973
|
get box() {
|
974
974
|
const box = this.appProxy.box$.value;
|
@@ -2537,12 +2537,12 @@ class ScrollMode {
|
|
2537
2537
|
this.onWheel = (ev) => {
|
2538
2538
|
var _a2;
|
2539
2539
|
const target = ev.target;
|
2540
|
-
if (
|
2540
|
+
if ((_a2 = this._whiteboard$.value) == null ? void 0 : _a2.contains(target)) {
|
2541
2541
|
ev.preventDefault();
|
2542
2542
|
ev.stopPropagation();
|
2543
2543
|
const dy = ev.deltaY || 0;
|
2544
2544
|
const { width } = this._size$.value;
|
2545
|
-
if (dy && width > 0) {
|
2545
|
+
if (this.shouldBroadcast() && dy && width > 0) {
|
2546
2546
|
const halfWbHeight = this._size$.value.height / 2 / this._scale$.value;
|
2547
2547
|
const scrollTop = this._scrollTop$.value + dy / this._scale$.value;
|
2548
2548
|
this.scrollStorage.setState({
|
@@ -12302,7 +12302,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
|
|
12302
12302
|
const _WindowManager = class extends InvisiblePlugin {
|
12303
12303
|
constructor(context) {
|
12304
12304
|
super(context);
|
12305
|
-
this.version = "1.0.0-canary.
|
12305
|
+
this.version = "1.0.0-canary.76";
|
12306
12306
|
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.4.0", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "jspdf": "^2.5.1", "lodash": "^4.17.21", "p-retry": "^5.1.2", "side-effect-manager": "^1.2.1", "uuid": "^9.0.0", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "1.0.0-canary.5", "@netless/app-plyr": "^0.2.4", "@playwright/test": "^1.28.1", "@rollup/plugin-commonjs": "^23.0.4", "@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-url": "^8.0.1", "@sveltejs/vite-plugin-svelte": "^2.0.2", "@tsconfig/svelte": "^3.0.0", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.6", "@types/node": "^18.0.3", "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.46.1", "@typescript-eslint/parser": "^5.46.1", "@vitest/ui": "^0.25.7", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^8.29.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^4.0.0", "jsdom": "^19.0.0", "less": "^4.1.3", "prettier": "^2.8.1", "prettier-plugin-svelte": "^2.9.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^4.0.0", "svelte": "^3.54.0", "typescript": "^4.9.4", "vite": "^4.0.3", "vite-plugin-dts": "^1.7.1", "vitest": "^0.25.7", "white-web-sdk": "^2.16.40" } };
|
12307
12307
|
this.emitter = callbacks;
|
12308
12308
|
this.viewMode$ = new Val(ViewMode.Broadcaster);
|
package/dist/index.umd.js
CHANGED
@@ -963,7 +963,7 @@
|
|
963
963
|
}
|
964
964
|
}
|
965
965
|
get isWritable() {
|
966
|
-
return this.
|
966
|
+
return this.appProxy.isWritable && !this.destroyed;
|
967
967
|
}
|
968
968
|
get box() {
|
969
969
|
const box = this.appProxy.box$.value;
|
@@ -2532,12 +2532,12 @@
|
|
2532
2532
|
this.onWheel = (ev) => {
|
2533
2533
|
var _a2;
|
2534
2534
|
const target = ev.target;
|
2535
|
-
if (
|
2535
|
+
if ((_a2 = this._whiteboard$.value) == null ? void 0 : _a2.contains(target)) {
|
2536
2536
|
ev.preventDefault();
|
2537
2537
|
ev.stopPropagation();
|
2538
2538
|
const dy = ev.deltaY || 0;
|
2539
2539
|
const { width } = this._size$.value;
|
2540
|
-
if (dy && width > 0) {
|
2540
|
+
if (this.shouldBroadcast() && dy && width > 0) {
|
2541
2541
|
const halfWbHeight = this._size$.value.height / 2 / this._scale$.value;
|
2542
2542
|
const scrollTop = this._scrollTop$.value + dy / this._scale$.value;
|
2543
2543
|
this.scrollStorage.setState({
|
@@ -12297,7 +12297,7 @@
|
|
12297
12297
|
const _WindowManager = class extends whiteWebSdk.InvisiblePlugin {
|
12298
12298
|
constructor(context) {
|
12299
12299
|
super(context);
|
12300
|
-
this.version = "1.0.0-canary.
|
12300
|
+
this.version = "1.0.0-canary.76";
|
12301
12301
|
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.4.0", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "jspdf": "^2.5.1", "lodash": "^4.17.21", "p-retry": "^5.1.2", "side-effect-manager": "^1.2.1", "uuid": "^9.0.0", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "1.0.0-canary.5", "@netless/app-plyr": "^0.2.4", "@playwright/test": "^1.28.1", "@rollup/plugin-commonjs": "^23.0.4", "@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-url": "^8.0.1", "@sveltejs/vite-plugin-svelte": "^2.0.2", "@tsconfig/svelte": "^3.0.0", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.6", "@types/node": "^18.0.3", "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.46.1", "@typescript-eslint/parser": "^5.46.1", "@vitest/ui": "^0.25.7", "cypress": "^8.7.0", "dotenv": "^10.0.0", "eslint": "^8.29.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-svelte3": "^4.0.0", "jsdom": "^19.0.0", "less": "^4.1.3", "prettier": "^2.8.1", "prettier-plugin-svelte": "^2.9.0", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-styles": "^4.0.0", "svelte": "^3.54.0", "typescript": "^4.9.4", "vite": "^4.0.3", "vite-plugin-dts": "^1.7.1", "vitest": "^0.25.7", "white-web-sdk": "^2.16.40" } };
|
12302
12302
|
this.emitter = callbacks;
|
12303
12303
|
this.viewMode$ = new valueEnhancer.Val(whiteWebSdk.ViewMode.Broadcaster);
|
package/package.json
CHANGED
package/src/App/AppContext.ts
CHANGED
@@ -164,7 +164,7 @@ export class AppContext<TAttributes extends Record<string, any> = any, TMagixEve
|
|
164
164
|
|
165
165
|
/** Get App writable status. */
|
166
166
|
public get isWritable(): boolean {
|
167
|
-
return this.
|
167
|
+
return this.appProxy.isWritable && !this.destroyed;
|
168
168
|
};
|
169
169
|
|
170
170
|
/** Get the App Window UI box. */
|
package/src/View/ScrollMode.ts
CHANGED
@@ -227,12 +227,12 @@ export class ScrollMode {
|
|
227
227
|
|
228
228
|
private onWheel = (ev: WheelEvent): void => {
|
229
229
|
const target = ev.target as HTMLElement | null;
|
230
|
-
if (this.
|
230
|
+
if (this._whiteboard$.value?.contains(target)) {
|
231
231
|
ev.preventDefault();
|
232
232
|
ev.stopPropagation();
|
233
233
|
const dy = ev.deltaY || 0;
|
234
234
|
const { width } = this._size$.value;
|
235
|
-
if (dy && width > 0) {
|
235
|
+
if (this.shouldBroadcast() && dy && width > 0) {
|
236
236
|
const halfWbHeight = this._size$.value.height / 2 / this._scale$.value;
|
237
237
|
const scrollTop = this._scrollTop$.value + dy / this._scale$.value;
|
238
238
|
this.scrollStorage.setState({
|