@netless/window-manager 1.0.0-canary.7 → 1.0.0-canary.8
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 +2 -1
- package/dist/App/AppProxy.d.ts +1 -1
- package/dist/App/WhiteboardView.d.ts +4 -3
- package/dist/index.cjs.js +9 -9
- package/dist/index.es.js +13 -13
- package/dist/index.umd.js +9 -9
- package/package.json +1 -1
- package/src/App/AppContext.ts +11 -11
- package/src/App/AppProxy.ts +1 -1
- package/src/App/WhiteboardView.ts +4 -6
package/dist/index.es.js
CHANGED
@@ -898,10 +898,12 @@ class Storage {
|
|
898
898
|
}
|
899
899
|
}
|
900
900
|
class WhiteBoardView {
|
901
|
-
constructor(appContext, appProxy, removeViewWrapper) {
|
901
|
+
constructor(view, appContext, appProxy, removeViewWrapper, ensureSize) {
|
902
|
+
this.view = view;
|
902
903
|
this.appContext = appContext;
|
903
904
|
this.appProxy = appProxy;
|
904
905
|
this.removeViewWrapper = removeViewWrapper;
|
906
|
+
this.ensureSize = ensureSize;
|
905
907
|
this.nextPage = async () => {
|
906
908
|
const nextIndex = this.pageState.index + 1;
|
907
909
|
return this.jumpPage(nextIndex);
|
@@ -949,9 +951,6 @@ class WhiteBoardView {
|
|
949
951
|
pageState$.setValue(pageState);
|
950
952
|
});
|
951
953
|
}
|
952
|
-
get view() {
|
953
|
-
return this.appContext.view;
|
954
|
-
}
|
955
954
|
get pageState() {
|
956
955
|
return this.pageState$.value;
|
957
956
|
}
|
@@ -1043,12 +1042,13 @@ class AppContext {
|
|
1043
1042
|
};
|
1044
1043
|
view.divElement = viewWrapper;
|
1045
1044
|
if (this.isAddApp) {
|
1046
|
-
this.
|
1045
|
+
this.ensurePageSize(size2);
|
1047
1046
|
}
|
1048
|
-
this.whiteBoardView = new WhiteBoardView(this, this.appProxy, removeViewWrapper);
|
1047
|
+
this.whiteBoardView = new WhiteBoardView(view, this, this.appProxy, removeViewWrapper, this.ensurePageSize);
|
1049
1048
|
return this.whiteBoardView;
|
1050
1049
|
};
|
1051
|
-
this.
|
1050
|
+
this.ensurePageSize = (size2) => {
|
1051
|
+
var _a;
|
1052
1052
|
if (!isNumber(size2))
|
1053
1053
|
return;
|
1054
1054
|
if (!this.appProxy.scenePath)
|
@@ -1059,11 +1059,8 @@ class AppContext {
|
|
1059
1059
|
throw Error(`[WindowManager]: size ${size2} muse be in range [1, ${MAX_PAGE_SIZE}]`);
|
1060
1060
|
}
|
1061
1061
|
const needInsert = size2 - this.appProxy.pageState.length;
|
1062
|
-
const
|
1063
|
-
|
1064
|
-
return { name: `${startPageNumber + index2 + 1}` };
|
1065
|
-
});
|
1066
|
-
putScenes(this.room, this.appProxy.scenePath, scenes);
|
1062
|
+
const scenes = new Array(needInsert).fill({});
|
1063
|
+
(_a = this.room) == null ? void 0 : _a.putScenes(this.appProxy.scenePath, scenes);
|
1067
1064
|
};
|
1068
1065
|
this.getInitScenePath = () => {
|
1069
1066
|
return this.manager.getAppInitPath(this.appId);
|
@@ -1110,6 +1107,9 @@ class AppContext {
|
|
1110
1107
|
get displayer() {
|
1111
1108
|
return this.manager.displayer;
|
1112
1109
|
}
|
1110
|
+
get destroyed() {
|
1111
|
+
return this.appProxy.status === "destroyed";
|
1112
|
+
}
|
1113
1113
|
get view() {
|
1114
1114
|
return this.appProxy.view;
|
1115
1115
|
}
|
@@ -15497,7 +15497,7 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
|
|
15497
15497
|
const _WindowManager = class extends InvisiblePlugin {
|
15498
15498
|
constructor(context) {
|
15499
15499
|
super(context);
|
15500
|
-
this.version = "1.0.0-canary.
|
15500
|
+
this.version = "1.0.0-canary.8";
|
15501
15501
|
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "1.0.0-alpha.14", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^1.1.0", "uuid": "^7.0.3", "value-enhancer": "^1.2.1", "video.js": ">=7" }, "peerDependencies": { "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^0.2.9", "@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", "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.10" } };
|
15502
15502
|
this.emitter = callbacks$1;
|
15503
15503
|
this.viewMode = ViewMode.Broadcaster;
|