@netless/window-manager 0.4.0-canary.19 → 0.4.0-canary.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "0.4.0-canary.19",
3
+ "version": "0.4.0-canary.22",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",
@@ -31,7 +31,7 @@
31
31
  "video.js": ">=7"
32
32
  },
33
33
  "devDependencies": {
34
- "@netless/app-docs-viewer": "^0.2.5",
34
+ "@netless/app-docs-viewer": "^0.2.6",
35
35
  "@netless/app-media-player": "0.1.0-beta.5",
36
36
  "@netless/telebox-insider": "0.2.21",
37
37
  "@rollup/plugin-commonjs": "^20.0.0",
package/src/AppProxy.ts CHANGED
@@ -187,6 +187,8 @@ export class AppProxy {
187
187
  });
188
188
  if (this.isAddApp && this.box) {
189
189
  this.store.updateAppState(appId, AppAttributes.ZIndex, this.box.zIndex);
190
+ this.store.setAppFocus(appId, true);
191
+ this.focusBox();
190
192
  }
191
193
  } catch (error: any) {
192
194
  console.error(error);
@@ -45,6 +45,12 @@ export class CursorManager {
45
45
  cursorInstance.move(payload.position);
46
46
  }
47
47
  });
48
+ this.sideEffectManager.add(() => {
49
+ const unsubscribe = emitter.on("playgroundSizeChange", () => {
50
+ this.updateContainerRect();
51
+ });
52
+ return unsubscribe;
53
+ })
48
54
  }
49
55
 
50
56
  public setupWrapper(wrapper: HTMLElement) {
@@ -18,7 +18,7 @@ export const getScript = async (url: string): Promise<string> => {
18
18
  };
19
19
 
20
20
  export const executeScript = (text: string, appName: string): NetlessApp => {
21
- let result = Function(text + `;return ${appName}`)();
21
+ let result = Function(text + `\n;return ${appName}`)();
22
22
  if (typeof result === "undefined") {
23
23
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
24
24
  // @ts-ignore