@netless/window-manager 1.0.0-canary.30 → 1.0.0-canary.33
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.cjs.js +23 -23
- package/dist/index.es.js +83 -46
- package/dist/index.umd.js +23 -23
- package/dist/src/BoxManager.d.ts +2 -1
- package/dist/src/index.d.ts +4 -1
- package/dist/src/typings.d.ts +2 -2
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/playwright.config.ts +1 -0
- package/pnpm-lock.yaml +4 -4
- package/src/App/AppProxy.ts +3 -1
- package/src/BoxManager.ts +6 -0
- package/src/Cursor/Cursor.ts +1 -1
- package/src/Cursor/index.ts +3 -2
- package/src/View/ViewSync.ts +1 -1
- package/src/index.ts +15 -1
- package/src/style.css +1 -1
- package/src/typings.ts +2 -2
package/dist/index.es.js
CHANGED
@@ -1351,7 +1351,7 @@ class ViewSync {
|
|
1351
1351
|
this.synchronizer.onRemoteSizeUpdate(size2);
|
1352
1352
|
}
|
1353
1353
|
}),
|
1354
|
-
this.context.stageRect$.
|
1354
|
+
this.context.stageRect$.subscribe((rect) => {
|
1355
1355
|
if (rect) {
|
1356
1356
|
this.synchronizer.setRect(rect);
|
1357
1357
|
}
|
@@ -1919,7 +1919,9 @@ class AppProxy {
|
|
1919
1919
|
this.appResult = result;
|
1920
1920
|
appRegister.notifyApp(this.kind, "created", { appId, result });
|
1921
1921
|
this.fixMobileSize();
|
1922
|
-
this.
|
1922
|
+
if (this.isAddApp) {
|
1923
|
+
this.setupDone();
|
1924
|
+
}
|
1923
1925
|
}, SETUP_APP_DELAY);
|
1924
1926
|
});
|
1925
1927
|
const box = (_a = this.boxManager) == null ? void 0 : _a.createBox({
|
@@ -4021,7 +4023,7 @@ var shallowequal = function shallowEqual(objA, objB, compare, compareContext) {
|
|
4021
4023
|
}
|
4022
4024
|
return true;
|
4023
4025
|
};
|
4024
|
-
var shadowStyles = /* @__PURE__ */ (() => '.tele-fancy-scrollbar {\n overscroll-behavior: contain;\n overflow: auto;\n overflow-y: scroll;\n overflow-y: overlay;\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n scrollbar-width: auto;\n}\n.tele-fancy-scrollbar::-webkit-scrollbar {\n height: 8px;\n width: 8px;\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-track {\n background-color: transparent;\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb {\n background-color: rgba(68, 78, 96, 0.1);\n background-color: transparent;\n border-radius: 4px;\n transition: background-color 0.4s;\n}\n.tele-fancy-scrollbar:hover::-webkit-scrollbar-thumb {\n background-color: rgba(68, 78, 96, 0.1);\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb:hover {\n background-color: rgba(68, 78, 96, 0.2);\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb:active {\n background-color: rgba(68, 78, 96, 0.2);\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb:vertical {\n min-height: 50px;\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb:horizontal {\n min-width: 50px;\n}\n.telebox-quarantine {\n all: initial;\n position: relative;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n.telebox-body-wrap {\n color: #191919;\n color: var(--tele-
|
4026
|
+
var shadowStyles = /* @__PURE__ */ (() => '.tele-fancy-scrollbar {\n overscroll-behavior: contain;\n overflow: auto;\n overflow-y: scroll;\n overflow-y: overlay;\n -webkit-overflow-scrolling: touch;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n scrollbar-width: auto;\n}\n.tele-fancy-scrollbar::-webkit-scrollbar {\n height: 8px;\n width: 8px;\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-track {\n background-color: transparent;\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb {\n background-color: rgba(68, 78, 96, 0.1);\n background-color: transparent;\n border-radius: 4px;\n transition: background-color 0.4s;\n}\n.tele-fancy-scrollbar:hover::-webkit-scrollbar-thumb {\n background-color: rgba(68, 78, 96, 0.1);\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb:hover {\n background-color: rgba(68, 78, 96, 0.2);\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb:active {\n background-color: rgba(68, 78, 96, 0.2);\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb:vertical {\n min-height: 50px;\n}\n.tele-fancy-scrollbar::-webkit-scrollbar-thumb:horizontal {\n min-width: 50px;\n}\n.telebox-quarantine {\n all: initial;\n position: relative;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n.telebox-body-wrap {\n color: #191919;\n color: var(--tele-boxColor, #191919);\n flex: 1;\n width: 100%;\n overflow: hidden;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n}\n.telebox-content {\n width: 100%;\n height: 100%;\n position: relative;\n background-color: #f9f9f9;\n background-color: var(--tele-boxContainerBackground, #f9f9f9);\n}\n.telebox-box-stage {\n position: absolute;\n z-index: 1;\n overflow: hidden;\n background-color: #fff;\n background-color: var(--tele-boxStageBackground, #fff);\n box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.08);\n box-shadow: var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, 0.08));\n}\n.telebox-footer-wrap {\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n color: #191919;\n color: var(--tele-boxFooterColor, #191919);\n background-color: #fff;\n background-color: var(--tele-boxFooterBackground, #fff);\n}\n.telebox-footer-wrap::before {\n content: "";\n display: block;\n flex: 1;\n}\n.telebox-color-scheme-dark {\n color-scheme: dark;\n}\n.telebox-color-scheme-dark .telebox-body-wrap {\n color: #e9e9e9;\n color: var(--tele-boxColor, #e9e9e9);\n}\n.telebox-color-scheme-dark .telebox-content {\n background-color: #25282e;\n background-color: var(--tele-boxContainerBackground, #25282e);\n}\n.telebox-color-scheme-dark .telebox-box-stage {\n background-color: #272a30;\n background-color: var(--tele-boxStageBackground, #272a30);\n box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.24);\n box-shadow: var(--tele-boxStageShadow, 0px 0px 16px rgba(0, 0, 0, 0.24));\n}\n.telebox-color-scheme-dark .telebox-footer-wrap {\n color: #e9e9e9;\n color: var(--tele-boxFooterColor, #e9e9e9);\n background-color: #383b42;\n background-color: var(--tele-boxFooterBackground, #383b42);\n}')();
|
4025
4027
|
var TELE_BOX_COLOR_SCHEME = /* @__PURE__ */ ((TELE_BOX_COLOR_SCHEME2) => {
|
4026
4028
|
TELE_BOX_COLOR_SCHEME2["Light"] = "light";
|
4027
4029
|
TELE_BOX_COLOR_SCHEME2["Dark"] = "dark";
|
@@ -4180,9 +4182,9 @@ class DefaultTitleBar {
|
|
4180
4182
|
}
|
4181
4183
|
});
|
4182
4184
|
}), "render-state-btns");
|
4183
|
-
this.sideEffect.addEventListener($buttonsContainer, "
|
4185
|
+
this.sideEffect.addEventListener($buttonsContainer, "click", (ev) => {
|
4184
4186
|
var _a;
|
4185
|
-
if (
|
4187
|
+
if (this.readonly$.value) {
|
4186
4188
|
return;
|
4187
4189
|
}
|
4188
4190
|
const target = ev.target;
|
@@ -4906,7 +4908,8 @@ class TeleBoxCollector {
|
|
4906
4908
|
darkMode$,
|
4907
4909
|
namespace = "telebox",
|
4908
4910
|
styles: styles2 = {},
|
4909
|
-
root
|
4911
|
+
root,
|
4912
|
+
onClick
|
4910
4913
|
}) {
|
4911
4914
|
this._sideEffect = new SideEffectManager();
|
4912
4915
|
this.namespace = namespace;
|
@@ -4921,10 +4924,6 @@ class TeleBoxCollector {
|
|
4921
4924
|
$collector: el$
|
4922
4925
|
};
|
4923
4926
|
withValueEnhancer(this, valConfig, valManager);
|
4924
|
-
const propsValConfig = {
|
4925
|
-
root: root$
|
4926
|
-
};
|
4927
|
-
withReadonlyValueEnhancer(this, propsValConfig);
|
4928
4927
|
const myReadonlyValConfig = {
|
4929
4928
|
rect: rect$,
|
4930
4929
|
visible: visible$
|
@@ -4933,9 +4932,13 @@ class TeleBoxCollector {
|
|
4933
4932
|
el$.value.className = this.wrapClassName("collector");
|
4934
4933
|
el$.value.style.backgroundImage = `url('${collectorSVG}')`;
|
4935
4934
|
this._sideEffect.addDisposer(el$.subscribe(($collector) => {
|
4936
|
-
this._sideEffect.
|
4937
|
-
|
4938
|
-
|
4935
|
+
this._sideEffect.add(() => {
|
4936
|
+
root.appendChild($collector);
|
4937
|
+
return () => $collector.remove();
|
4938
|
+
}, "telebox-collector-mount");
|
4939
|
+
this._sideEffect.addEventListener($collector, "click", () => {
|
4940
|
+
if (!readonly$.value) {
|
4941
|
+
onClick == null ? void 0 : onClick();
|
4939
4942
|
}
|
4940
4943
|
}, {}, "telebox-collector-click");
|
4941
4944
|
this._sideEffect.addDisposer([
|
@@ -4957,13 +4960,8 @@ class TeleBoxCollector {
|
|
4957
4960
|
}
|
4958
4961
|
});
|
4959
4962
|
}),
|
4960
|
-
|
4961
|
-
if (
|
4962
|
-
root.appendChild($collector);
|
4963
|
-
}
|
4964
|
-
}),
|
4965
|
-
combine([minimized$, root$]).subscribe(([minimized, root]) => {
|
4966
|
-
if (minimized && root) {
|
4963
|
+
minimized$.subscribe((minimized) => {
|
4964
|
+
if (minimized) {
|
4967
4965
|
const { x: x2, y: y2, width, height } = $collector.getBoundingClientRect();
|
4968
4966
|
const rootRect = root.getBoundingClientRect();
|
4969
4967
|
rect$.setValue({
|
@@ -5092,6 +5090,7 @@ const ResizeObserver$2 = window.ResizeObserver || ResizeObserver$3;
|
|
5092
5090
|
class TeleBoxManager {
|
5093
5091
|
constructor({
|
5094
5092
|
root = null,
|
5093
|
+
fullscreen = false,
|
5095
5094
|
prefersColorScheme = TELE_BOX_COLOR_SCHEME.Light,
|
5096
5095
|
minimized = false,
|
5097
5096
|
maximized = false,
|
@@ -5103,7 +5102,8 @@ class TeleBoxManager {
|
|
5103
5102
|
containerStyle = "",
|
5104
5103
|
stageStyle = "",
|
5105
5104
|
defaultBoxBodyStyle = null,
|
5106
|
-
defaultBoxStageStyle = null
|
5105
|
+
defaultBoxStageStyle = null,
|
5106
|
+
theme = {}
|
5107
5107
|
} = {}) {
|
5108
5108
|
this.events = new Emittery();
|
5109
5109
|
this._sideEffect = new SideEffectManager();
|
@@ -5112,14 +5112,19 @@ class TeleBoxManager {
|
|
5112
5112
|
this._sideEffect.addDisposer(() => valManager.destroy());
|
5113
5113
|
const root$ = new Val(root);
|
5114
5114
|
const readonly$ = new Val(readonly);
|
5115
|
-
const minimized$ = new Val(minimized);
|
5116
|
-
const maximized$ = new Val(maximized);
|
5117
5115
|
const fence$ = new Val(fence);
|
5118
5116
|
const containerStyle$ = new Val(containerStyle);
|
5119
5117
|
const stageStyle$ = new Val(stageStyle);
|
5120
5118
|
const stageRatio$ = new Val(stageRatio);
|
5121
5119
|
const defaultBoxBodyStyle$ = new Val(defaultBoxBodyStyle);
|
5122
5120
|
const defaultBoxStageStyle$ = new Val(defaultBoxStageStyle);
|
5121
|
+
const fullscreen$ = new Val(fullscreen);
|
5122
|
+
const input_minimized$ = new Val(minimized);
|
5123
|
+
const input_maximized$ = new Val(maximized);
|
5124
|
+
const maximized$ = combine([input_maximized$, fullscreen$], ([maximized2, fullscreen2]) => fullscreen2 ? true : maximized2);
|
5125
|
+
const minimized$ = combine([input_minimized$, fullscreen$], ([minimized2, fullscreen2]) => fullscreen2 ? false : minimized2);
|
5126
|
+
this.setMaximized = (maximized2, skipUpdate) => input_maximized$.setValue(maximized2, skipUpdate);
|
5127
|
+
this.setMinimized = (minimized2, skipUpdate) => input_minimized$.setValue(minimized2, skipUpdate);
|
5123
5128
|
const rootRect$ = new Val({
|
5124
5129
|
x: 0,
|
5125
5130
|
y: 0,
|
@@ -5177,27 +5182,21 @@ class TeleBoxManager {
|
|
5177
5182
|
}));
|
5178
5183
|
const darkMode$ = combine([prefersDark$, prefersColorScheme$], ([prefersDark, prefersColorScheme2]) => prefersColorScheme2 === "auto" ? prefersDark : prefersColorScheme2 === "dark");
|
5179
5184
|
const state$ = combine([minimized$, maximized$], ([minimized2, maximized2]) => minimized2 ? TELE_BOX_STATE.Minimized : maximized2 ? TELE_BOX_STATE.Maximized : TELE_BOX_STATE.Normal);
|
5180
|
-
this.collector = collector != null ? collector : new TeleBoxCollector({
|
5181
|
-
minimized$,
|
5182
|
-
readonly$,
|
5183
|
-
darkMode$,
|
5184
|
-
namespace,
|
5185
|
-
root$
|
5186
|
-
});
|
5187
5185
|
const readonlyValConfig = {
|
5188
5186
|
darkMode: darkMode$,
|
5189
5187
|
state: state$,
|
5190
5188
|
root: root$,
|
5191
5189
|
rootRect: rootRect$,
|
5192
|
-
stageRect: stageRect
|
5190
|
+
stageRect: stageRect$,
|
5191
|
+
minimized: minimized$,
|
5192
|
+
maximized: maximized$
|
5193
5193
|
};
|
5194
5194
|
withReadonlyValueEnhancer(this, readonlyValConfig, valManager);
|
5195
5195
|
const valConfig = {
|
5196
|
+
fullscreen: fullscreen$,
|
5196
5197
|
prefersColorScheme: prefersColorScheme$,
|
5197
5198
|
readonly: readonly$,
|
5198
5199
|
fence: fence$,
|
5199
|
-
minimized: minimized$,
|
5200
|
-
maximized: maximized$,
|
5201
5200
|
stageRatio: stageRatio$,
|
5202
5201
|
containerStyle: containerStyle$,
|
5203
5202
|
stageStyle: stageStyle$,
|
@@ -5233,6 +5232,7 @@ class TeleBoxManager {
|
|
5233
5232
|
this._sideEffect.addEventListener(window, "pointerdown", checkFocusBox, true);
|
5234
5233
|
this.$container = document.createElement("div");
|
5235
5234
|
this.$container.className = this.wrapClassName("manager-container");
|
5235
|
+
this.setTheme(theme);
|
5236
5236
|
this.$stage = document.createElement("div");
|
5237
5237
|
this.$stage.className = this.wrapClassName("manager-stage");
|
5238
5238
|
this.$container.appendChild(this.$stage);
|
@@ -5241,11 +5241,17 @@ class TeleBoxManager {
|
|
5241
5241
|
this.$container.classList.toggle(this.wrapClassName("color-scheme-dark"), darkMode);
|
5242
5242
|
this.$container.classList.toggle(this.wrapClassName("color-scheme-light"), !darkMode);
|
5243
5243
|
}),
|
5244
|
+
fullscreen$.subscribe((fullscreen2) => {
|
5245
|
+
this.$container.classList.toggle(this.wrapClassName("is-fullscreen"), Boolean(fullscreen2));
|
5246
|
+
}),
|
5247
|
+
combine([this.boxes$, fullscreen$], ([boxes, fullscreen2]) => fullscreen2 === "no-titlebar" || fullscreen2 === true && boxes.length <= 1).subscribe((hideSingleTabTitlebar) => {
|
5248
|
+
this.$container.classList.toggle(this.wrapClassName("hide-fullscreen-titlebar"), hideSingleTabTitlebar);
|
5249
|
+
}),
|
5244
5250
|
maximized$.subscribe((maximized2) => {
|
5245
|
-
this.$container.classList.toggle("is-maximized", maximized2);
|
5251
|
+
this.$container.classList.toggle(this.wrapClassName("is-maximized"), maximized2);
|
5246
5252
|
}),
|
5247
5253
|
minimized$.subscribe((minimized2) => {
|
5248
|
-
this.$container.classList.toggle("is-minimized", minimized2);
|
5254
|
+
this.$container.classList.toggle(this.wrapClassName("is-minimized"), minimized2);
|
5249
5255
|
}),
|
5250
5256
|
containerStyle$.subscribe((containerStyle2) => {
|
5251
5257
|
this.$container.style.cssText = containerStyle2;
|
@@ -5267,6 +5273,14 @@ class TeleBoxManager {
|
|
5267
5273
|
}
|
5268
5274
|
})
|
5269
5275
|
]);
|
5276
|
+
this.collector = collector != null ? collector : new TeleBoxCollector({
|
5277
|
+
minimized$,
|
5278
|
+
readonly$,
|
5279
|
+
darkMode$,
|
5280
|
+
namespace,
|
5281
|
+
root: this.$container,
|
5282
|
+
onClick: () => input_minimized$.setValue(false)
|
5283
|
+
});
|
5270
5284
|
this.titleBar = new MaxTitleBar({
|
5271
5285
|
namespace: this.namespace,
|
5272
5286
|
title$: derive(this.topBox$, (topBox) => (topBox == null ? void 0 : topBox.title) || ""),
|
@@ -5279,11 +5293,11 @@ class TeleBoxManager {
|
|
5279
5293
|
onEvent: (event) => {
|
5280
5294
|
switch (event.type) {
|
5281
5295
|
case TELE_BOX_DELEGATE_EVENT.Maximize: {
|
5282
|
-
|
5296
|
+
this.setMaximized(!maximized$.value);
|
5283
5297
|
break;
|
5284
5298
|
}
|
5285
5299
|
case TELE_BOX_DELEGATE_EVENT.Minimize: {
|
5286
|
-
|
5300
|
+
this.setMinimized(true);
|
5287
5301
|
break;
|
5288
5302
|
}
|
5289
5303
|
case TELE_BOX_EVENT.Close: {
|
@@ -5456,6 +5470,12 @@ class TeleBoxManager {
|
|
5456
5470
|
}
|
5457
5471
|
return deletedBoxes;
|
5458
5472
|
}
|
5473
|
+
setTheme(theme) {
|
5474
|
+
Object.keys(theme).forEach((key) => {
|
5475
|
+
var _a;
|
5476
|
+
this.$container.style.setProperty(`--tele-${key}`, (_a = theme[key]) != null ? _a : null);
|
5477
|
+
});
|
5478
|
+
}
|
5459
5479
|
mount(root) {
|
5460
5480
|
this._root$.setValue(root);
|
5461
5481
|
}
|
@@ -5787,6 +5807,9 @@ class BoxManager {
|
|
5787
5807
|
if (createTeleBoxManagerConfig == null ? void 0 : createTeleBoxManagerConfig.stageStyle) {
|
5788
5808
|
initManagerState.stageStyle = createTeleBoxManagerConfig.stageStyle;
|
5789
5809
|
}
|
5810
|
+
if (createTeleBoxManagerConfig == null ? void 0 : createTeleBoxManagerConfig.fullscreen) {
|
5811
|
+
initManagerState.fullscreen = createTeleBoxManagerConfig.fullscreen;
|
5812
|
+
}
|
5790
5813
|
const manager = new TeleBoxManager(initManagerState);
|
5791
5814
|
if (this.teleBoxManager) {
|
5792
5815
|
this.teleBoxManager.destroy();
|
@@ -6497,16 +6520,16 @@ class Cursor {
|
|
6497
6520
|
this.cursorManager = cursorManager;
|
6498
6521
|
this.wrapper = wrapper;
|
6499
6522
|
this.move = (position) => {
|
6500
|
-
var _a;
|
6523
|
+
var _a, _b;
|
6501
6524
|
if (position.type === "main") {
|
6502
|
-
const rect = this.
|
6525
|
+
const rect = (_a = this.manager.boxManager) == null ? void 0 : _a.stageRect;
|
6503
6526
|
if (this.component && rect) {
|
6504
6527
|
this.autoHidden();
|
6505
6528
|
this.moveCursor(position, rect, this.manager.mainView);
|
6506
6529
|
}
|
6507
6530
|
} else {
|
6508
6531
|
const focusView = this.cursorManager.focusView;
|
6509
|
-
const viewRect = (
|
6532
|
+
const viewRect = (_b = focusView == null ? void 0 : focusView.divElement) == null ? void 0 : _b.getBoundingClientRect();
|
6510
6533
|
const viewCamera = focusView == null ? void 0 : focusView.camera;
|
6511
6534
|
if (focusView && viewRect && viewCamera && this.component) {
|
6512
6535
|
this.autoHidden();
|
@@ -6706,7 +6729,7 @@ class CursorManager {
|
|
6706
6729
|
return;
|
6707
6730
|
}
|
6708
6731
|
this.updateCursor(this.getType(event), event.clientX, event.clientY);
|
6709
|
-
},
|
6732
|
+
}, 48);
|
6710
6733
|
this.getPoint = (view, clientX, clientY) => {
|
6711
6734
|
var _a2;
|
6712
6735
|
const rect = (_a2 = view == null ? void 0 : view.divElement) == null ? void 0 : _a2.getBoundingClientRect();
|
@@ -6767,6 +6790,7 @@ class CursorManager {
|
|
6767
6790
|
wrapper.removeEventListener("pointerleave", this.mouseLeaveListener);
|
6768
6791
|
};
|
6769
6792
|
});
|
6793
|
+
this.updateContainerRect();
|
6770
6794
|
}
|
6771
6795
|
setMainViewDivElement(div) {
|
6772
6796
|
this.mainViewElement = div;
|
@@ -6796,7 +6820,7 @@ class CursorManager {
|
|
6796
6820
|
}
|
6797
6821
|
updateContainerRect() {
|
6798
6822
|
var _a, _b;
|
6799
|
-
this.wrapperRect = (_a = this.manager.boxManager) == null ? void 0 : _a.
|
6823
|
+
this.wrapperRect = (_a = this.manager.boxManager) == null ? void 0 : _a.stageRect;
|
6800
6824
|
this.playgroundRect = (_b = WindowManager.playground) == null ? void 0 : _b.getBoundingClientRect();
|
6801
6825
|
}
|
6802
6826
|
deleteCursor(uid) {
|
@@ -16547,15 +16571,15 @@ const reconnectRefresher = new ReconnectRefresher({ emitter });
|
|
16547
16571
|
const _WindowManager = class extends InvisiblePlugin {
|
16548
16572
|
constructor(context) {
|
16549
16573
|
super(context);
|
16550
|
-
this.version = "1.0.0-canary.
|
16551
|
-
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "1.0.0-alpha.
|
16574
|
+
this.version = "1.0.0-canary.33";
|
16575
|
+
this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "1.0.0-alpha.30", "emittery": "^0.11.0", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^1.1.0", "uuid": "^7.0.3", "value-enhancer": "^1.3.0", "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", "@playwright/test": "^1.23.0", "@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/node": "^18.0.0", "@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", "vite-plugin-dts": "^1.2.0", "vitest": "^0.14.1", "white-web-sdk": "2.16.10" } };
|
16552
16576
|
this.emitter = callbacks$1;
|
16553
16577
|
this.viewMode = ViewMode.Broadcaster;
|
16554
16578
|
this.viewMode$ = new Val(ViewMode.Broadcaster);
|
16555
16579
|
this.isReplay = isPlayer(this.displayer);
|
16556
16580
|
this.containerSizeRatio = _WindowManager.containerSizeRatio;
|
16557
16581
|
_WindowManager.displayer = context.displayer;
|
16558
|
-
window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "1.0.0-alpha.
|
16582
|
+
window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "1.0.0-alpha.30", "emittery": "^0.11.0", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^1.1.0", "uuid": "^7.0.3", "value-enhancer": "^1.3.0", "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", "@playwright/test": "^1.23.0", "@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/node": "^18.0.0", "@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", "vite-plugin-dts": "^1.2.0", "vitest": "^0.14.1", "white-web-sdk": "2.16.10" } };
|
16559
16583
|
}
|
16560
16584
|
static async mount(params) {
|
16561
16585
|
var _a;
|
@@ -16611,7 +16635,8 @@ const _WindowManager = class extends InvisiblePlugin {
|
|
16611
16635
|
prefersColorScheme: params.prefersColorScheme,
|
16612
16636
|
stageRatio: _WindowManager.containerSizeRatio,
|
16613
16637
|
containerStyle: params.containerStyle,
|
16614
|
-
stageStyle: params.stageStyle
|
16638
|
+
stageStyle: params.stageStyle,
|
16639
|
+
fullscreen: params.fullscreen
|
16615
16640
|
});
|
16616
16641
|
(_a = manager.appManager) == null ? void 0 : _a.setBoxManager(manager.boxManager);
|
16617
16642
|
if (params.container) {
|
@@ -16996,6 +17021,14 @@ const _WindowManager = class extends InvisiblePlugin {
|
|
16996
17021
|
throw new AppManagerNotInitError();
|
16997
17022
|
}
|
16998
17023
|
}
|
17024
|
+
get fullscreen() {
|
17025
|
+
var _a;
|
17026
|
+
if (this.appManager) {
|
17027
|
+
return (_a = this.appManager.boxManager) == null ? void 0 : _a.teleBoxManager.fullscreen;
|
17028
|
+
} else {
|
17029
|
+
throw new AppManagerNotInitError();
|
17030
|
+
}
|
17031
|
+
}
|
16999
17032
|
get focused() {
|
17000
17033
|
return this.attributes.focus;
|
17001
17034
|
}
|
@@ -17139,6 +17172,10 @@ const _WindowManager = class extends InvisiblePlugin {
|
|
17139
17172
|
var _a, _b;
|
17140
17173
|
(_b = (_a = this.appManager) == null ? void 0 : _a.boxManager) == null ? void 0 : _b.setPrefersColorScheme(scheme);
|
17141
17174
|
}
|
17175
|
+
setFullscreen(fullscreen) {
|
17176
|
+
var _a, _b;
|
17177
|
+
(_b = (_a = this.appManager) == null ? void 0 : _a.boxManager) == null ? void 0 : _b.teleBoxManager.setFullscreen(fullscreen);
|
17178
|
+
}
|
17142
17179
|
cleanCurrentScene() {
|
17143
17180
|
var _a;
|
17144
17181
|
(_a = this.focusedView) == null ? void 0 : _a.cleanCurrentScene();
|