@netless/window-manager 1.0.7-beta.7 → 1.0.7-beta.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/index.d.ts +7 -1
- package/dist/index.js +14 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +61 -44
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/App/AppContext.ts +1 -0
- package/src/App/AppProxy.ts +1 -0
- package/src/AppManager.ts +1 -0
- package/src/AttributesDelegate.ts +1 -0
- package/src/BoxManager.ts +1 -0
- package/src/Cursor/index.ts +1 -0
- package/src/Utils/extendClass.ts +23 -19
- package/src/index.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1174,6 +1174,7 @@ class AppContext {
|
|
|
1174
1174
|
});
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
1177
|
+
AppContext.kind = "AppContext";
|
|
1177
1178
|
class AppPageStateImpl {
|
|
1178
1179
|
constructor(params) {
|
|
1179
1180
|
this.params = params;
|
|
@@ -3816,6 +3817,7 @@ class TeleBoxCollector {
|
|
|
3816
3817
|
return `${this.namespace}-${className}`;
|
|
3817
3818
|
}
|
|
3818
3819
|
}
|
|
3820
|
+
TeleBoxCollector.kind = "TeleBoxCollector";
|
|
3819
3821
|
var TELE_BOX_MANAGER_EVENT = /* @__PURE__ */ ((TELE_BOX_MANAGER_EVENT2) => {
|
|
3820
3822
|
TELE_BOX_MANAGER_EVENT2["Focused"] = "focused";
|
|
3821
3823
|
TELE_BOX_MANAGER_EVENT2["Blurred"] = "blurred";
|
|
@@ -5322,6 +5324,7 @@ class TeleBoxManager {
|
|
|
5322
5324
|
return;
|
|
5323
5325
|
}
|
|
5324
5326
|
}
|
|
5327
|
+
TeleBoxManager.kind = "TeleBoxManager";
|
|
5325
5328
|
const createBoxManager = (manager, callbacks2, emitter, boxEmitter2, options) => {
|
|
5326
5329
|
const BoxManagerClass = getExtendClass$1(BoxManager, WindowManager.extendClass);
|
|
5327
5330
|
return new BoxManagerClass(
|
|
@@ -5700,6 +5703,7 @@ class BoxManager {
|
|
|
5700
5703
|
this.teleBoxManager.destroy();
|
|
5701
5704
|
}
|
|
5702
5705
|
}
|
|
5706
|
+
BoxManager.kind = "BoxManager";
|
|
5703
5707
|
const log = (...args) => {
|
|
5704
5708
|
if (WindowManager.debug) {
|
|
5705
5709
|
console.log(`[WindowManager]:`, ...args);
|
|
@@ -6965,26 +6969,31 @@ class CursorManager {
|
|
|
6965
6969
|
}
|
|
6966
6970
|
}
|
|
6967
6971
|
}
|
|
6972
|
+
CursorManager.kind = "CursorManager";
|
|
6968
6973
|
function getExtendClass$1(baseClass, extendClass) {
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6974
|
+
if (baseClass.kind && extendClass && Object.keys(extendClass).includes(baseClass.kind)) {
|
|
6975
|
+
switch (baseClass.kind) {
|
|
6976
|
+
case "AppManager":
|
|
6977
|
+
return (extendClass == null ? void 0 : extendClass.AppManager) || AppManager;
|
|
6978
|
+
case "BoxManager":
|
|
6979
|
+
return (extendClass == null ? void 0 : extendClass.BoxManager) || BoxManager;
|
|
6980
|
+
case "AttributesDelegate":
|
|
6981
|
+
return (extendClass == null ? void 0 : extendClass.AttributesDelegate) || AttributesDelegate;
|
|
6982
|
+
case "CursorManager":
|
|
6983
|
+
return (extendClass == null ? void 0 : extendClass.CursorManager) || CursorManager;
|
|
6984
|
+
case "AppProxy":
|
|
6985
|
+
return (extendClass == null ? void 0 : extendClass.AppProxy) || AppProxy;
|
|
6986
|
+
case "AppContext":
|
|
6987
|
+
return (extendClass == null ? void 0 : extendClass.AppContext) || AppContext;
|
|
6988
|
+
case "TeleBoxManager":
|
|
6989
|
+
return (extendClass == null ? void 0 : extendClass.TeleBoxManager) || TeleBoxManager;
|
|
6990
|
+
case "TeleBoxCollector":
|
|
6991
|
+
return (extendClass == null ? void 0 : extendClass.TeleBoxCollector) || TeleBoxCollector;
|
|
6992
|
+
default:
|
|
6993
|
+
return baseClass;
|
|
6994
|
+
}
|
|
6995
|
+
} else {
|
|
6996
|
+
return baseClass;
|
|
6988
6997
|
}
|
|
6989
6998
|
}
|
|
6990
6999
|
var Fields = /* @__PURE__ */ ((Fields2) => {
|
|
@@ -7202,6 +7211,7 @@ class AttributesDelegate {
|
|
|
7202
7211
|
}
|
|
7203
7212
|
}
|
|
7204
7213
|
}
|
|
7214
|
+
AttributesDelegate.kind = "AttributesDelegate";
|
|
7205
7215
|
const createAttributesDelegate = (extendClass, context = {
|
|
7206
7216
|
getAttributes: () => {
|
|
7207
7217
|
throw new Error("getAttributes not implemented");
|
|
@@ -7231,7 +7241,7 @@ const calculateNextIndex = (index2, pageState) => {
|
|
|
7231
7241
|
return nextIndex;
|
|
7232
7242
|
};
|
|
7233
7243
|
const boxEmitter = new Emittery();
|
|
7234
|
-
class
|
|
7244
|
+
const _AppProxy = class {
|
|
7235
7245
|
constructor(params, manager, appId, isAddApp) {
|
|
7236
7246
|
var _a;
|
|
7237
7247
|
this.params = params;
|
|
@@ -7529,7 +7539,7 @@ class AppProxy {
|
|
|
7529
7539
|
const currentAppState = this.getAppInitState(this.id);
|
|
7530
7540
|
await this.destroy(true, false, true);
|
|
7531
7541
|
const params = this.params;
|
|
7532
|
-
const AppProxyClass = getExtendClass$1(
|
|
7542
|
+
const AppProxyClass = getExtendClass$1(_AppProxy, WindowManager.extendClass);
|
|
7533
7543
|
const appProxy = new AppProxyClass(params, this.manager, this.id, this.isAddApp);
|
|
7534
7544
|
await appProxy.baseInsertApp(true);
|
|
7535
7545
|
(_a = this.boxManager) == null ? void 0 : _a.updateBoxState(currentAppState);
|
|
@@ -7690,7 +7700,9 @@ class AppProxy {
|
|
|
7690
7700
|
close() {
|
|
7691
7701
|
return this.destroy(true, true, false);
|
|
7692
7702
|
}
|
|
7693
|
-
}
|
|
7703
|
+
};
|
|
7704
|
+
let AppProxy = _AppProxy;
|
|
7705
|
+
AppProxy.kind = "AppProxy";
|
|
7694
7706
|
class ViewManager {
|
|
7695
7707
|
constructor(displayer) {
|
|
7696
7708
|
this.displayer = displayer;
|
|
@@ -8846,6 +8858,7 @@ class AppManager {
|
|
|
8846
8858
|
this._focusAppCreatedResolve = void 0;
|
|
8847
8859
|
}
|
|
8848
8860
|
}
|
|
8861
|
+
AppManager.kind = "AppManager";
|
|
8849
8862
|
const ResizeObserver$2 = window.ResizeObserver || ResizeObserver$3;
|
|
8850
8863
|
class ContainerResizeObserver {
|
|
8851
8864
|
constructor(emitter) {
|
|
@@ -19602,40 +19615,44 @@ class ExtendPluginManager {
|
|
|
19602
19615
|
}
|
|
19603
19616
|
}
|
|
19604
19617
|
function getExtendClass(baseClass, extendClass) {
|
|
19605
|
-
|
|
19606
|
-
|
|
19607
|
-
|
|
19608
|
-
|
|
19609
|
-
|
|
19610
|
-
|
|
19611
|
-
|
|
19612
|
-
|
|
19613
|
-
|
|
19614
|
-
|
|
19615
|
-
|
|
19616
|
-
|
|
19617
|
-
|
|
19618
|
-
|
|
19619
|
-
|
|
19620
|
-
|
|
19621
|
-
|
|
19622
|
-
|
|
19623
|
-
|
|
19618
|
+
if (baseClass.kind && extendClass && Object.keys(extendClass).includes(baseClass.kind)) {
|
|
19619
|
+
switch (baseClass.kind) {
|
|
19620
|
+
case "AppManager":
|
|
19621
|
+
return (extendClass == null ? void 0 : extendClass.AppManager) || AppManager;
|
|
19622
|
+
case "BoxManager":
|
|
19623
|
+
return (extendClass == null ? void 0 : extendClass.BoxManager) || BoxManager;
|
|
19624
|
+
case "AttributesDelegate":
|
|
19625
|
+
return (extendClass == null ? void 0 : extendClass.AttributesDelegate) || AttributesDelegate;
|
|
19626
|
+
case "CursorManager":
|
|
19627
|
+
return (extendClass == null ? void 0 : extendClass.CursorManager) || CursorManager;
|
|
19628
|
+
case "AppProxy":
|
|
19629
|
+
return (extendClass == null ? void 0 : extendClass.AppProxy) || AppProxy;
|
|
19630
|
+
case "AppContext":
|
|
19631
|
+
return (extendClass == null ? void 0 : extendClass.AppContext) || AppContext;
|
|
19632
|
+
case "TeleBoxManager":
|
|
19633
|
+
return (extendClass == null ? void 0 : extendClass.TeleBoxManager) || TeleBoxManager;
|
|
19634
|
+
case "TeleBoxCollector":
|
|
19635
|
+
return (extendClass == null ? void 0 : extendClass.TeleBoxCollector) || TeleBoxCollector;
|
|
19636
|
+
default:
|
|
19637
|
+
return baseClass;
|
|
19638
|
+
}
|
|
19639
|
+
} else {
|
|
19640
|
+
return baseClass;
|
|
19624
19641
|
}
|
|
19625
19642
|
}
|
|
19626
19643
|
const reconnectRefresher = new ReconnectRefresher({ emitter: internalEmitter });
|
|
19627
19644
|
const _WindowManager = class extends InvisiblePlugin {
|
|
19628
19645
|
constructor(context) {
|
|
19629
19646
|
super(context);
|
|
19630
|
-
this.version = "1.0.7-beta.
|
|
19631
|
-
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0-beta.
|
|
19647
|
+
this.version = "1.0.7-beta.8";
|
|
19648
|
+
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0-beta.14", "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.30", "@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" } };
|
|
19632
19649
|
this.emitter = callbacks$1;
|
|
19633
19650
|
this.viewMode = ViewMode.Broadcaster;
|
|
19634
19651
|
this.isReplay = isPlayer(this.displayer);
|
|
19635
19652
|
this._cursorUIDs = [];
|
|
19636
19653
|
this.containerSizeRatio = _WindowManager.containerSizeRatio;
|
|
19637
19654
|
_WindowManager.displayer = context.displayer;
|
|
19638
|
-
window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0-beta.
|
|
19655
|
+
window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0-beta.14", "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.30", "@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" } };
|
|
19639
19656
|
}
|
|
19640
19657
|
static onCreate(manager) {
|
|
19641
19658
|
_WindowManager._resolve(manager);
|