@netless/window-manager 0.4.65 → 0.4.66-beta.0
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/App/AppContext.d.ts +3 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/App/AppContext.ts +10 -0
- package/src/App/AppProxy.ts +1 -0
- package/src/index.ts +11 -1
package/dist/index.mjs
CHANGED
@@ -1073,6 +1073,12 @@ class AppContext {
|
|
1073
1073
|
get pageState() {
|
1074
1074
|
return this.appProxy.pageState;
|
1075
1075
|
}
|
1076
|
+
get kind() {
|
1077
|
+
return this.appProxy.kind;
|
1078
|
+
}
|
1079
|
+
dispatchAppEvent(type, value) {
|
1080
|
+
internalEmitter.emit(`custom-${this.kind}`, { type, appId: this.appId, value });
|
1081
|
+
}
|
1076
1082
|
}
|
1077
1083
|
class AppPageStateImpl {
|
1078
1084
|
constructor(params) {
|
@@ -1364,10 +1370,11 @@ class AppProxy {
|
|
1364
1370
|
});
|
1365
1371
|
(_b = this.manager.refresher) == null ? void 0 : _b.add(this.stateKey, () => {
|
1366
1372
|
return autorun(() => {
|
1367
|
-
var _a3, _b2, _c2;
|
1373
|
+
var _a3, _b2, _c2, _d;
|
1368
1374
|
const appState = (_a3 = this.appAttributes) == null ? void 0 : _a3.state;
|
1369
1375
|
if ((appState == null ? void 0 : appState.zIndex) > 0 && appState.zIndex !== ((_b2 = this.box) == null ? void 0 : _b2.zIndex)) {
|
1370
1376
|
(_c2 = this.boxManager) == null ? void 0 : _c2.setZIndex(appId2, appState.zIndex);
|
1377
|
+
(_d = this.boxManager) == null ? void 0 : _d.focusBox({ appId: appId2 });
|
1371
1378
|
}
|
1372
1379
|
});
|
1373
1380
|
});
|
@@ -17468,7 +17475,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter: internalEmitter });
|
|
17468
17475
|
const _WindowManager = class extends InvisiblePlugin {
|
17469
17476
|
constructor(context) {
|
17470
17477
|
super(context);
|
17471
|
-
this.version = "0.4.
|
17478
|
+
this.version = "0.4.66-beta.0";
|
17472
17479
|
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.2.27", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^0.1.5", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^0.2.16", "@netless/app-media-player": "0.1.0-beta.5", "@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.22", "@tsconfig/svelte": "^2.0.1", "@types/debug": "^4.1.7", "@types/lodash": "^4.14.182", "@types/lodash-es": "^4.17.4", "@types/uuid": "^8.3.1", "@typescript-eslint/eslint-plugin": "^4.30.0", "@typescript-eslint/parser": "^4.30.0", "@vitest/ui": "^0.14.1", "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", "jspdf": "^2.5.1", "less": "^4.1.1", "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": "^2.5.3", "vitest": "^0.14.1", "white-web-sdk": "2.16.43" } };
|
17473
17480
|
this.emitter = callbacks$1;
|
17474
17481
|
this.viewMode = ViewMode.Broadcaster;
|
@@ -17701,11 +17708,12 @@ const _WindowManager = class extends InvisiblePlugin {
|
|
17701
17708
|
for (const appId of apps) {
|
17702
17709
|
const appScenePath = appManager.store.getAppScenePath(appId);
|
17703
17710
|
if (appScenePath && appScenePath === scenePath) {
|
17704
|
-
console.warn(`[WindowManager]: ScenePath ${scenePath}
|
17711
|
+
console.warn(`[WindowManager]: ScenePath "${scenePath}" already opened`);
|
17705
17712
|
if (this.boxManager) {
|
17706
17713
|
const topBox = this.boxManager.getTopBox();
|
17707
17714
|
if (topBox) {
|
17708
17715
|
this.boxManager.setZIndex(appId, topBox.zIndex + 1, false);
|
17716
|
+
this.boxManager.focusBox({ appId }, false);
|
17709
17717
|
}
|
17710
17718
|
}
|
17711
17719
|
return;
|
@@ -17827,6 +17835,9 @@ const _WindowManager = class extends InvisiblePlugin {
|
|
17827
17835
|
onAppDestroy(kind2, listener) {
|
17828
17836
|
addEmitterOnceListener(`destroy-${kind2}`, listener);
|
17829
17837
|
}
|
17838
|
+
onAppEvent(kind2, listener) {
|
17839
|
+
return internalEmitter.on(`custom-${kind2}`, listener);
|
17840
|
+
}
|
17830
17841
|
setViewMode(mode) {
|
17831
17842
|
var _a, _b, _c, _d;
|
17832
17843
|
if (mode === ViewMode.Broadcaster || mode === ViewMode.Follower) {
|