@netless/window-manager 0.4.0-canary.24 → 0.4.0-canary.25
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.d.ts +0 -1
- package/dist/index.es.js +3 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/AppManager.ts +8 -8
- package/src/Cursor/index.ts +1 -0
- package/src/index.ts +0 -4
package/package.json
CHANGED
package/src/AppManager.ts
CHANGED
@@ -20,7 +20,7 @@ import { store } from "./AttributesDelegate";
|
|
20
20
|
import { ViewManager } from "./View/ViewManager";
|
21
21
|
import type { ReconnectRefresher } from "./ReconnectRefresher";
|
22
22
|
import type { BoxManager } from "./BoxManager";
|
23
|
-
import type { Displayer, DisplayerState, Room
|
23
|
+
import type { Displayer, DisplayerState, Room, ScenesCallbacksNode } from "white-web-sdk";
|
24
24
|
import type { AddAppParams, BaseInsertParams, TeleBoxRect, EmitterEvent } from "./index";
|
25
25
|
import { appRegister } from "./Register";
|
26
26
|
|
@@ -83,11 +83,11 @@ export class AppManager {
|
|
83
83
|
}
|
84
84
|
});
|
85
85
|
this.callbacksNode = this.displayer.createScenesCallback(ROOT_DIR, {
|
86
|
-
onAddScene:
|
86
|
+
onAddScene: scenesCallback => {
|
87
87
|
this.mainViewScenesLength = scenesCallback.scenes.length;
|
88
88
|
callbacks.emit("mainViewScenesLengthChange", this.mainViewScenesLength);
|
89
89
|
},
|
90
|
-
onRemoveScene:
|
90
|
+
onRemoveScene: scenesCallback => {
|
91
91
|
this.mainViewScenesLength = scenesCallback.scenes.length;
|
92
92
|
callbacks.emit("mainViewScenesLengthChange", this.mainViewScenesLength);
|
93
93
|
},
|
@@ -126,7 +126,7 @@ export class AppManager {
|
|
126
126
|
public get uid() {
|
127
127
|
return this.room?.uid || "";
|
128
128
|
}
|
129
|
-
|
129
|
+
|
130
130
|
public getMainViewSceneDir() {
|
131
131
|
const scenePath = this.store.getMainViewScenePath();
|
132
132
|
if (scenePath) {
|
@@ -186,6 +186,10 @@ export class AppManager {
|
|
186
186
|
const focused = get(this.attributes, "focus");
|
187
187
|
if (this._prevFocused !== focused) {
|
188
188
|
this.boxManager?.focusBox({ appId: focused });
|
189
|
+
const appProxy = this.appProxies.get(focused);
|
190
|
+
if (appProxy) {
|
191
|
+
appRegister.notifyApp(appProxy.kind, "focus", { appId: focused });
|
192
|
+
}
|
189
193
|
callbacks.emit("focusedChange", focused);
|
190
194
|
this._prevFocused = focused;
|
191
195
|
}
|
@@ -498,10 +502,6 @@ export class AppManager {
|
|
498
502
|
}
|
499
503
|
case "focus": {
|
500
504
|
this.windowManger.safeSetAttributes({ focus: payload.appId });
|
501
|
-
const appProxy = this.appProxies.get(payload.appId);
|
502
|
-
if (appProxy) {
|
503
|
-
appRegister.notifyApp(appProxy.kind, "focus", { appId: payload.appId });
|
504
|
-
}
|
505
505
|
break;
|
506
506
|
}
|
507
507
|
case "resize": {
|
package/src/Cursor/index.ts
CHANGED
package/src/index.ts
CHANGED