@netless/window-manager 1.0.0-canary.6 → 1.0.0-canary.7
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/View/CameraSynchronizer.d.ts +2 -2
- package/dist/index.cjs.js +5 -5
- package/dist/index.es.js +20 -18
- package/dist/index.umd.js +7 -7
- package/package.json +2 -2
- package/pnpm-lock.yaml +4 -4
- package/src/App/AppProxy.ts +2 -0
- package/src/App/AppViewSync.ts +2 -2
- package/src/View/CameraSynchronizer.ts +2 -2
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@netless/window-manager",
|
3
|
-
"version": "1.0.0-canary.
|
3
|
+
"version": "1.0.0-canary.7",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/index.cjs.js",
|
6
6
|
"module": "dist/index.es.js",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
25
|
"@juggle/resize-observer": "^3.3.1",
|
26
|
-
"@netless/telebox-insider": "1.0.0-alpha.
|
26
|
+
"@netless/telebox-insider": "1.0.0-alpha.14",
|
27
27
|
"emittery": "^0.9.2",
|
28
28
|
"lodash": "^4.17.21",
|
29
29
|
"p-retry": "^4.6.1",
|
package/pnpm-lock.yaml
CHANGED
@@ -4,7 +4,7 @@ specifiers:
|
|
4
4
|
'@juggle/resize-observer': ^3.3.1
|
5
5
|
'@netless/app-docs-viewer': ^0.2.9
|
6
6
|
'@netless/app-media-player': 0.1.0-beta.5
|
7
|
-
'@netless/telebox-insider': 1.0.0-alpha.
|
7
|
+
'@netless/telebox-insider': 1.0.0-alpha.14
|
8
8
|
'@rollup/plugin-commonjs': ^20.0.0
|
9
9
|
'@rollup/plugin-node-resolve': ^13.0.4
|
10
10
|
'@rollup/plugin-url': ^6.1.0
|
@@ -43,7 +43,7 @@ specifiers:
|
|
43
43
|
|
44
44
|
dependencies:
|
45
45
|
'@juggle/resize-observer': registry.npmmirror.com/@juggle/resize-observer/3.3.1
|
46
|
-
'@netless/telebox-insider': 1.0.0-alpha.
|
46
|
+
'@netless/telebox-insider': 1.0.0-alpha.14
|
47
47
|
emittery: registry.npmmirror.com/emittery/0.9.2
|
48
48
|
lodash: registry.npmmirror.com/lodash/4.17.21
|
49
49
|
p-retry: registry.npmmirror.com/p-retry/4.6.1
|
@@ -97,8 +97,8 @@ packages:
|
|
97
97
|
vanilla-lazyload: 17.6.1
|
98
98
|
dev: true
|
99
99
|
|
100
|
-
/@netless/telebox-insider/1.0.0-alpha.
|
101
|
-
resolution: {integrity: sha512-
|
100
|
+
/@netless/telebox-insider/1.0.0-alpha.14:
|
101
|
+
resolution: {integrity: sha512-kDhoxnEZUOCjQDf/lDgHVBb/TaKywlnUXhSlSbyVDWefcVXcaXi6/zEPwDR0gMYWCqQQoEPFz9Jr8hd8hcEkyQ==}
|
102
102
|
dependencies:
|
103
103
|
'@juggle/resize-observer': 3.3.1
|
104
104
|
'@types/shallowequal': 1.1.1
|
package/src/App/AppProxy.ts
CHANGED
@@ -140,6 +140,7 @@ export class AppProxy implements PageRemoveService {
|
|
140
140
|
this.storeCamera({
|
141
141
|
centerX: 0, centerY: 0, scale: 1, id: this.uid,
|
142
142
|
});
|
143
|
+
this.camera$.setValue(toJS(this.appAttributes.camera));
|
143
144
|
}
|
144
145
|
if (!this.size$.value && box.contentStageRect) {
|
145
146
|
this.storeSize({
|
@@ -147,6 +148,7 @@ export class AppProxy implements PageRemoveService {
|
|
147
148
|
width: box.contentStageRect?.width,
|
148
149
|
height: box.contentStageRect?.height,
|
149
150
|
});
|
151
|
+
this.size$.setValue(toJS(this.appAttributes.size));
|
150
152
|
}
|
151
153
|
this.appViewSync = new AppViewSync(this);
|
152
154
|
this.sideEffectManager.add(() => () => this.appViewSync?.destroy());
|
package/src/App/AppViewSync.ts
CHANGED
@@ -34,11 +34,11 @@ export class AppViewSync {
|
|
34
34
|
}),
|
35
35
|
);
|
36
36
|
}
|
37
|
-
combine([this.appProxy.camera$, this.appProxy.size$]).subscribe(([camera, size]) => {
|
37
|
+
this.sem.add(() => combine([this.appProxy.camera$, this.appProxy.size$]).subscribe(([camera, size]) => {
|
38
38
|
if (camera && size) {
|
39
39
|
this.synchronizer.onRemoteUpdate(camera, size);
|
40
40
|
}
|
41
|
-
});
|
41
|
+
}));
|
42
42
|
}
|
43
43
|
|
44
44
|
public bindView = (view?: View) => {
|
@@ -7,8 +7,8 @@ import type { ISize } from "../AttributesDelegate";
|
|
7
7
|
export type SaveCamera = (camera: Camera) => void;
|
8
8
|
|
9
9
|
export class CameraSynchronizer {
|
10
|
-
|
11
|
-
|
10
|
+
public remoteCamera?: Camera;
|
11
|
+
public remoteSize?: ISize;
|
12
12
|
protected rect?: TeleBoxRect;
|
13
13
|
protected view?: View;
|
14
14
|
|