@netless/window-manager 1.0.0-canary.68 → 1.0.0-canary.69
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 +8 -8
- package/dist/index.mjs +8 -8
- package/dist/index.umd.js +8 -8
- package/package.json +13 -13
- package/src/AppManager.ts +8 -8
- package/src/BoxManager.ts +2 -2
- package/pnpm-lock.yaml +0 -4960
package/dist/index.js
CHANGED
@@ -3201,8 +3201,8 @@ class AppManager {
|
|
3201
3201
|
this.onBoxMove = (payload) => {
|
3202
3202
|
this.dispatchInternalEvent(Events.AppMove, payload);
|
3203
3203
|
this.store.updateAppState(payload.appId, AppAttributes.Position, {
|
3204
|
-
x:
|
3205
|
-
y:
|
3204
|
+
x: payload.x || 0,
|
3205
|
+
y: payload.y || 0
|
3206
3206
|
});
|
3207
3207
|
};
|
3208
3208
|
this.onBoxResize = (payload) => {
|
@@ -3242,7 +3242,7 @@ class AppManager {
|
|
3242
3242
|
return safeListenPropsUpdated(
|
3243
3243
|
() => this.attributes.apps,
|
3244
3244
|
(events) => {
|
3245
|
-
if (events.
|
3245
|
+
if (events.some((e) => e.kind === whiteWebSdk.UpdateEventKind.Removed)) {
|
3246
3246
|
this.onAppDelete(this.attributes.apps);
|
3247
3247
|
}
|
3248
3248
|
}
|
@@ -3661,8 +3661,8 @@ class AppManager {
|
|
3661
3661
|
const box = appProxy.box;
|
3662
3662
|
boxEmitter.emit("move", {
|
3663
3663
|
appId: appProxy.id,
|
3664
|
-
x: box
|
3665
|
-
y: box
|
3664
|
+
x: box.intrinsicX || 0,
|
3665
|
+
y: box.intrinsicY || 0
|
3666
3666
|
});
|
3667
3667
|
this.store.updateAppState(appProxy.id, AppAttributes.ZIndex, box.zIndex);
|
3668
3668
|
}
|
@@ -6545,8 +6545,8 @@ class BoxManager {
|
|
6545
6545
|
if (state.size) {
|
6546
6546
|
box._intrinsicSize$.setValue(state.size, true);
|
6547
6547
|
}
|
6548
|
-
if (state.position) {
|
6549
|
-
box._intrinsicCoord$.setValue(state.position, true);
|
6548
|
+
if (state.position && state.position.x !== void 0 && state.position.y !== void 0) {
|
6549
|
+
box._intrinsicCoord$.setValue({ x: state.position.x, y: state.position.y }, true);
|
6550
6550
|
}
|
6551
6551
|
if (state.zIndex) {
|
6552
6552
|
box._zIndex$.setValue(state.zIndex, true);
|
@@ -12798,7 +12798,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
|
|
12798
12798
|
const _WindowManager = class extends whiteWebSdk.InvisiblePlugin {
|
12799
12799
|
constructor(context) {
|
12800
12800
|
super(context);
|
12801
|
-
this.version = "1.0.0-canary.
|
12801
|
+
this.version = "1.0.0-canary.69";
|
12802
12802
|
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "lodash": "^4.17.21", "p-retry": "^4.6.2", "side-effect-manager": "^1.2.1", "uuid": "^7.0.3", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^1.0.0-canary.3", "@netless/app-plyr": "^0.2.4", "@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": "^3.1.3", "vite-plugin-dts": "^1.5.0", "vitest": "^0.23.4", "white-web-sdk": "^2.16.35" } };
|
12803
12803
|
this.emitter = callbacks;
|
12804
12804
|
this.viewMode$ = new valueEnhancer.Val(whiteWebSdk.ViewMode.Broadcaster);
|
package/dist/index.mjs
CHANGED
@@ -3196,8 +3196,8 @@ class AppManager {
|
|
3196
3196
|
this.onBoxMove = (payload) => {
|
3197
3197
|
this.dispatchInternalEvent(Events.AppMove, payload);
|
3198
3198
|
this.store.updateAppState(payload.appId, AppAttributes.Position, {
|
3199
|
-
x:
|
3200
|
-
y:
|
3199
|
+
x: payload.x || 0,
|
3200
|
+
y: payload.y || 0
|
3201
3201
|
});
|
3202
3202
|
};
|
3203
3203
|
this.onBoxResize = (payload) => {
|
@@ -3237,7 +3237,7 @@ class AppManager {
|
|
3237
3237
|
return safeListenPropsUpdated(
|
3238
3238
|
() => this.attributes.apps,
|
3239
3239
|
(events) => {
|
3240
|
-
if (events.
|
3240
|
+
if (events.some((e) => e.kind === UpdateEventKind.Removed)) {
|
3241
3241
|
this.onAppDelete(this.attributes.apps);
|
3242
3242
|
}
|
3243
3243
|
}
|
@@ -3656,8 +3656,8 @@ class AppManager {
|
|
3656
3656
|
const box = appProxy.box;
|
3657
3657
|
boxEmitter.emit("move", {
|
3658
3658
|
appId: appProxy.id,
|
3659
|
-
x: box
|
3660
|
-
y: box
|
3659
|
+
x: box.intrinsicX || 0,
|
3660
|
+
y: box.intrinsicY || 0
|
3661
3661
|
});
|
3662
3662
|
this.store.updateAppState(appProxy.id, AppAttributes.ZIndex, box.zIndex);
|
3663
3663
|
}
|
@@ -6540,8 +6540,8 @@ class BoxManager {
|
|
6540
6540
|
if (state.size) {
|
6541
6541
|
box._intrinsicSize$.setValue(state.size, true);
|
6542
6542
|
}
|
6543
|
-
if (state.position) {
|
6544
|
-
box._intrinsicCoord$.setValue(state.position, true);
|
6543
|
+
if (state.position && state.position.x !== void 0 && state.position.y !== void 0) {
|
6544
|
+
box._intrinsicCoord$.setValue({ x: state.position.x, y: state.position.y }, true);
|
6545
6545
|
}
|
6546
6546
|
if (state.zIndex) {
|
6547
6547
|
box._zIndex$.setValue(state.zIndex, true);
|
@@ -12793,7 +12793,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
|
|
12793
12793
|
const _WindowManager = class extends InvisiblePlugin {
|
12794
12794
|
constructor(context) {
|
12795
12795
|
super(context);
|
12796
|
-
this.version = "1.0.0-canary.
|
12796
|
+
this.version = "1.0.0-canary.69";
|
12797
12797
|
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "lodash": "^4.17.21", "p-retry": "^4.6.2", "side-effect-manager": "^1.2.1", "uuid": "^7.0.3", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^1.0.0-canary.3", "@netless/app-plyr": "^0.2.4", "@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": "^3.1.3", "vite-plugin-dts": "^1.5.0", "vitest": "^0.23.4", "white-web-sdk": "^2.16.35" } };
|
12798
12798
|
this.emitter = callbacks;
|
12799
12799
|
this.viewMode$ = new Val(ViewMode.Broadcaster);
|
package/dist/index.umd.js
CHANGED
@@ -3194,8 +3194,8 @@
|
|
3194
3194
|
this.onBoxMove = (payload) => {
|
3195
3195
|
this.dispatchInternalEvent(Events.AppMove, payload);
|
3196
3196
|
this.store.updateAppState(payload.appId, AppAttributes.Position, {
|
3197
|
-
x:
|
3198
|
-
y:
|
3197
|
+
x: payload.x || 0,
|
3198
|
+
y: payload.y || 0
|
3199
3199
|
});
|
3200
3200
|
};
|
3201
3201
|
this.onBoxResize = (payload) => {
|
@@ -3235,7 +3235,7 @@
|
|
3235
3235
|
return safeListenPropsUpdated(
|
3236
3236
|
() => this.attributes.apps,
|
3237
3237
|
(events) => {
|
3238
|
-
if (events.
|
3238
|
+
if (events.some((e) => e.kind === whiteWebSdk.UpdateEventKind.Removed)) {
|
3239
3239
|
this.onAppDelete(this.attributes.apps);
|
3240
3240
|
}
|
3241
3241
|
}
|
@@ -3654,8 +3654,8 @@
|
|
3654
3654
|
const box = appProxy.box;
|
3655
3655
|
boxEmitter.emit("move", {
|
3656
3656
|
appId: appProxy.id,
|
3657
|
-
x: box
|
3658
|
-
y: box
|
3657
|
+
x: box.intrinsicX || 0,
|
3658
|
+
y: box.intrinsicY || 0
|
3659
3659
|
});
|
3660
3660
|
this.store.updateAppState(appProxy.id, AppAttributes.ZIndex, box.zIndex);
|
3661
3661
|
}
|
@@ -6538,8 +6538,8 @@
|
|
6538
6538
|
if (state.size) {
|
6539
6539
|
box._intrinsicSize$.setValue(state.size, true);
|
6540
6540
|
}
|
6541
|
-
if (state.position) {
|
6542
|
-
box._intrinsicCoord$.setValue(state.position, true);
|
6541
|
+
if (state.position && state.position.x !== void 0 && state.position.y !== void 0) {
|
6542
|
+
box._intrinsicCoord$.setValue({ x: state.position.x, y: state.position.y }, true);
|
6543
6543
|
}
|
6544
6544
|
if (state.zIndex) {
|
6545
6545
|
box._zIndex$.setValue(state.zIndex, true);
|
@@ -12791,7 +12791,7 @@
|
|
12791
12791
|
const _WindowManager = class extends whiteWebSdk.InvisiblePlugin {
|
12792
12792
|
constructor(context) {
|
12793
12793
|
super(context);
|
12794
|
-
this.version = "1.0.0-canary.
|
12794
|
+
this.version = "1.0.0-canary.69";
|
12795
12795
|
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/synced-store": "^2.0.7", "@netless/telebox-insider": "1.0.0-alpha.37", "emittery": "^0.11.0", "lodash": "^4.17.21", "p-retry": "^4.6.2", "side-effect-manager": "^1.2.1", "uuid": "^7.0.3", "value-enhancer": "^1.3.2" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^1.0.0-canary.3", "@netless/app-plyr": "^0.2.4", "@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": "^3.1.3", "vite-plugin-dts": "^1.5.0", "vitest": "^0.23.4", "white-web-sdk": "^2.16.35" } };
|
12796
12796
|
this.emitter = callbacks;
|
12797
12797
|
this.viewMode$ = new valueEnhancer.Val(whiteWebSdk.ViewMode.Broadcaster);
|
package/package.json
CHANGED
@@ -1,22 +1,11 @@
|
|
1
1
|
{
|
2
2
|
"name": "@netless/window-manager",
|
3
|
-
"version": "1.0.0-canary.
|
3
|
+
"version": "1.0.0-canary.69",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"module": "dist/index.mjs",
|
7
7
|
"types": "dist/src/index.d.ts",
|
8
8
|
"repository": "netless-io/window-manager",
|
9
|
-
"scripts": {
|
10
|
-
"prettier": "prettier --write .",
|
11
|
-
"dev": "vite build --watch",
|
12
|
-
"build": "vite build",
|
13
|
-
"type-gen": "tsc --emitDeclarationOnly",
|
14
|
-
"predev": "yarn type-gen",
|
15
|
-
"build:lib:types": "tsc --emitDeclarationOnly",
|
16
|
-
"lint": "eslint --ext .ts,.tsx,.svelte . && prettier --check .",
|
17
|
-
"test": "vitest",
|
18
|
-
"e2e": "playwright test"
|
19
|
-
},
|
20
9
|
"keywords": [],
|
21
10
|
"author": "",
|
22
11
|
"license": "ISC",
|
@@ -68,5 +57,16 @@
|
|
68
57
|
"vite-plugin-dts": "^1.5.0",
|
69
58
|
"vitest": "^0.23.4",
|
70
59
|
"white-web-sdk": "^2.16.35"
|
60
|
+
},
|
61
|
+
"scripts": {
|
62
|
+
"prettier": "prettier --write .",
|
63
|
+
"dev": "vite build --watch",
|
64
|
+
"build": "vite build",
|
65
|
+
"type-gen": "tsc --emitDeclarationOnly",
|
66
|
+
"predev": "yarn type-gen",
|
67
|
+
"build:lib:types": "tsc --emitDeclarationOnly",
|
68
|
+
"lint": "eslint --ext .ts,.tsx,.svelte . && prettier --check .",
|
69
|
+
"test": "vitest",
|
70
|
+
"e2e": "playwright test"
|
71
71
|
}
|
72
|
-
}
|
72
|
+
}
|
package/src/AppManager.ts
CHANGED
@@ -40,7 +40,8 @@ import type {
|
|
40
40
|
ScenesCallbacksNode,
|
41
41
|
SceneState,
|
42
42
|
RoomState,
|
43
|
-
|
43
|
+
Size,
|
44
|
+
} from "white-web-sdk";
|
44
45
|
import type { AddAppParams, BaseInsertParams, TeleBoxRect } from "./index";
|
45
46
|
import type {
|
46
47
|
BoxClosePayload,
|
@@ -81,7 +82,6 @@ export class AppManager {
|
|
81
82
|
|
82
83
|
public rootDirRemoving = false;
|
83
84
|
|
84
|
-
|
85
85
|
constructor(public windowManger: WindowManager) {
|
86
86
|
this.displayer = windowManger.displayer;
|
87
87
|
this.store.setContext({
|
@@ -395,8 +395,8 @@ export class AppManager {
|
|
395
395
|
private onBoxMove = (payload: BoxMovePayload) => {
|
396
396
|
this.dispatchInternalEvent(Events.AppMove, payload);
|
397
397
|
this.store.updateAppState(payload.appId, AppAttributes.Position, {
|
398
|
-
x:
|
399
|
-
y:
|
398
|
+
x: payload.x || 0,
|
399
|
+
y: payload.y || 0,
|
400
400
|
});
|
401
401
|
};
|
402
402
|
|
@@ -440,8 +440,8 @@ export class AppManager {
|
|
440
440
|
this.refresher?.add("appsClose", () => {
|
441
441
|
return safeListenPropsUpdated(
|
442
442
|
() => this.attributes.apps,
|
443
|
-
|
444
|
-
if (events.
|
443
|
+
events => {
|
444
|
+
if (events.some(e => e.kind === UpdateEventKind.Removed)) {
|
445
445
|
this.onAppDelete(this.attributes.apps);
|
446
446
|
}
|
447
447
|
}
|
@@ -658,8 +658,8 @@ export class AppManager {
|
|
658
658
|
const box = appProxy.box;
|
659
659
|
boxEmitter.emit("move", {
|
660
660
|
appId: appProxy.id,
|
661
|
-
x: box
|
662
|
-
y: box
|
661
|
+
x: box.intrinsicX || 0,
|
662
|
+
y: box.intrinsicY || 0,
|
663
663
|
});
|
664
664
|
this.store.updateAppState(appProxy.id, AppAttributes.ZIndex, box.zIndex);
|
665
665
|
}
|
package/src/BoxManager.ts
CHANGED
@@ -331,8 +331,8 @@ export class BoxManager {
|
|
331
331
|
if (state.size) {
|
332
332
|
box._intrinsicSize$.setValue(state.size, true);
|
333
333
|
}
|
334
|
-
if (state.position) {
|
335
|
-
box._intrinsicCoord$.setValue(state.position, true);
|
334
|
+
if (state.position && state.position.x !== undefined && state.position.y !== undefined) {
|
335
|
+
box._intrinsicCoord$.setValue({ x: state.position.x, y: state.position.y }, true);
|
336
336
|
}
|
337
337
|
if (state.zIndex) {
|
338
338
|
box._zIndex$.setValue(state.zIndex, true);
|