@netless/window-manager 1.0.4 → 1.0.5-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/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/AppManager.ts +18 -2
- package/src/RedoUndo.ts +1 -0
package/dist/index.mjs
CHANGED
@@ -2162,6 +2162,7 @@ class RedoUndo {
|
|
2162
2162
|
this.disposePrevFocusViewRedoUndoListeners(context.focus());
|
2163
2163
|
this.addRedoUndoListeners(context.focus());
|
2164
2164
|
});
|
2165
|
+
console.log("context.focus()===>", context.focus(), context.focus() && context.getAppProxy(context.focus()));
|
2165
2166
|
this.addRedoUndoListeners(context.focus());
|
2166
2167
|
}
|
2167
2168
|
destroy() {
|
@@ -2541,7 +2542,15 @@ class AppManager {
|
|
2541
2542
|
}
|
2542
2543
|
async onCreated() {
|
2543
2544
|
var _a;
|
2545
|
+
if (Object.keys(this.attributes.apps).length && this.store.focus) {
|
2546
|
+
await new Promise((resolve) => {
|
2547
|
+
this._focusAppCreatedResolve = resolve;
|
2548
|
+
}).then(() => {
|
2549
|
+
this.focusByAttributes(this.attributes.apps);
|
2550
|
+
});
|
2551
|
+
}
|
2544
2552
|
await this.attributesUpdateCallback(this.attributes.apps);
|
2553
|
+
this.focusByAttributes(this.attributes.apps);
|
2545
2554
|
internalEmitter.emit("updateManagerRect");
|
2546
2555
|
boxEmitter.on("move", this.onBoxMove);
|
2547
2556
|
boxEmitter.on("resize", this.onBoxResize);
|
@@ -2627,13 +2636,17 @@ class AppManager {
|
|
2627
2636
|
if (!appAttributes) {
|
2628
2637
|
throw new Error("appAttributes is undefined");
|
2629
2638
|
}
|
2630
|
-
this.appCreateQueue.push(() => {
|
2639
|
+
this.appCreateQueue.push(async () => {
|
2631
2640
|
this.appStatus.set(id2, AppStatus.StartCreate);
|
2632
|
-
|
2641
|
+
const appProxy = await this.baseInsertApp({
|
2633
2642
|
kind: app.kind,
|
2634
2643
|
options: app.options,
|
2635
2644
|
isDynamicPPT: app.isDynamicPPT
|
2636
2645
|
}, id2, false);
|
2646
|
+
if (appProxy && this.store.focus === id2 && this._focusAppCreatedResolve) {
|
2647
|
+
this._focusAppCreatedResolve(appProxy);
|
2648
|
+
}
|
2649
|
+
return appProxy;
|
2637
2650
|
});
|
2638
2651
|
this.focusByAttributes(apps);
|
2639
2652
|
} catch (error) {
|
@@ -2854,6 +2867,7 @@ class AppManager {
|
|
2854
2867
|
this.sideEffectManager.flushAll();
|
2855
2868
|
this._prevFocused = void 0;
|
2856
2869
|
this._prevSceneIndex = void 0;
|
2870
|
+
this._focusAppCreatedResolve = void 0;
|
2857
2871
|
}
|
2858
2872
|
}
|
2859
2873
|
const setupWrapper = (root) => {
|
@@ -17934,7 +17948,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter: internalEmitter });
|
|
17934
17948
|
const _WindowManager = class extends InvisiblePlugin {
|
17935
17949
|
constructor(context) {
|
17936
17950
|
super(context);
|
17937
|
-
this.version = "1.0.
|
17951
|
+
this.version = "1.0.5-beta.0";
|
17938
17952
|
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.2.31", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.52" }, "devDependencies": { "@hyrious/dts": "^0.2.2", "@netless/app-docs-viewer": "^0.2.19", "@netless/app-media-player": "0.1.4", "@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", "side-effect-manager": "0.1.5", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.9.9", "vitest": "^0.14.1", "white-web-sdk": "2.16.52" } };
|
17939
17953
|
this.emitter = callbacks$1;
|
17940
17954
|
this.viewMode = ViewMode.Broadcaster;
|