@netless/window-manager 1.0.7-beta.5 → 1.0.7-beta.7

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.mjs CHANGED
@@ -2394,6 +2394,8 @@ var TELE_BOX_EVENT = /* @__PURE__ */ ((TELE_BOX_EVENT2) => {
2394
2394
  TELE_BOX_EVENT2["Destroyed"] = "destroyed";
2395
2395
  TELE_BOX_EVENT2["BoxStatus"] = "box_status";
2396
2396
  TELE_BOX_EVENT2["LastNotMinimizedBoxStatus"] = "last_not_minimized_box_status";
2397
+ TELE_BOX_EVENT2["ForceTop"] = "force_top";
2398
+ TELE_BOX_EVENT2["ForceNormal"] = "force_normal";
2397
2399
  return TELE_BOX_EVENT2;
2398
2400
  })(TELE_BOX_EVENT || {});
2399
2401
  var TELE_BOX_DELEGATE_EVENT = /* @__PURE__ */ ((TELE_BOX_DELEGATE_EVENT2) => {
@@ -2448,7 +2450,9 @@ class DefaultTitleBar {
2448
2450
  onDragStart,
2449
2451
  namespace = "telebox",
2450
2452
  state = TELE_BOX_STATE.Normal,
2451
- boxStatus
2453
+ boxStatus,
2454
+ forceTop = false,
2455
+ forceNormal = false
2452
2456
  } = {}) {
2453
2457
  this.$btns = [];
2454
2458
  this.sideEffect = new o$1();
@@ -2522,7 +2526,14 @@ class DefaultTitleBar {
2522
2526
  this.title = title;
2523
2527
  this.state = state;
2524
2528
  this.boxStatus = boxStatus;
2525
- this.buttons = buttons || [
2529
+ this.forceTop = forceTop;
2530
+ this.forceNormal = forceNormal;
2531
+ this.buttons = buttons || (forceNormal ? [
2532
+ {
2533
+ type: TELE_BOX_DELEGATE_EVENT.Close,
2534
+ iconClassName: this.wrapClassName("titlebar-icon-close")
2535
+ }
2536
+ ] : [
2526
2537
  {
2527
2538
  type: TELE_BOX_DELEGATE_EVENT.Minimize,
2528
2539
  iconClassName: this.wrapClassName("titlebar-icon-minimize")
@@ -2536,7 +2547,7 @@ class DefaultTitleBar {
2536
2547
  type: TELE_BOX_DELEGATE_EVENT.Close,
2537
2548
  iconClassName: this.wrapClassName("titlebar-icon-close")
2538
2549
  }
2539
- ];
2550
+ ]);
2540
2551
  this.$dragArea = this.renderDragArea();
2541
2552
  }
2542
2553
  setTitle(title) {
@@ -2709,7 +2720,10 @@ class TeleBox {
2709
2720
  },
2710
2721
  collectorRect,
2711
2722
  boxStatus,
2712
- lastNotMinimizedBoxStatus
2723
+ lastNotMinimizedBoxStatus,
2724
+ forceTop = false,
2725
+ forceNormal = false,
2726
+ isDragContent = false
2713
2727
  } = {}) {
2714
2728
  this._renderSideEffect = new o$1();
2715
2729
  this.handleTrackStart = (ev) => {
@@ -2776,6 +2790,19 @@ class TeleBox {
2776
2790
  });
2777
2791
  const containerRect$ = createVal(containerRect, shallowequal);
2778
2792
  const collectorRect$ = createVal(collectorRect, shallowequal);
2793
+ const forceTop$ = createVal(forceTop);
2794
+ forceTop$.reaction((forceTop2, _2, skipUpdate) => {
2795
+ if (!skipUpdate) {
2796
+ this.events.emit(TELE_BOX_EVENT.ForceTop, forceTop2 || false);
2797
+ }
2798
+ });
2799
+ const forceNormal$ = createVal(forceNormal);
2800
+ forceNormal$.reaction((forceNormal2, _2, skipUpdate) => {
2801
+ if (!skipUpdate) {
2802
+ this.events.emit(TELE_BOX_EVENT.ForceNormal, forceNormal2 || false);
2803
+ }
2804
+ });
2805
+ const isDragContent$ = createVal(isDragContent);
2779
2806
  const title$ = createVal(title);
2780
2807
  title$.reaction((title2, _2, skipUpdate) => {
2781
2808
  if (!skipUpdate) {
@@ -2953,6 +2980,8 @@ class TeleBox {
2953
2980
  title: title$.value,
2954
2981
  namespace: this.namespace,
2955
2982
  boxStatus: boxStatus$.value,
2983
+ forceTop: forceTop$.value,
2984
+ forceNormal: forceNormal$.value,
2956
2985
  onDragStart: (event) => {
2957
2986
  var _a;
2958
2987
  return (_a = this._handleTrackStart) == null ? void 0 : _a.call(this, event);
@@ -3016,7 +3045,10 @@ class TeleBox {
3016
3045
  maximized: maximized$,
3017
3046
  $userContent: $userContent$,
3018
3047
  $userFooter: $userFooter$,
3019
- $userStyles: $userStyles$
3048
+ $userStyles: $userStyles$,
3049
+ forceTop: forceTop$,
3050
+ forceNormal: forceNormal$,
3051
+ isDragContent: isDragContent$
3020
3052
  };
3021
3053
  i$1(this, valConfig);
3022
3054
  this._state$ = state$;
@@ -3353,6 +3385,9 @@ class TeleBox {
3353
3385
  const $content = document.createElement("div");
3354
3386
  $content.className = this.wrapClassName("content") + " tele-fancy-scrollbar";
3355
3387
  this.$content = $content;
3388
+ if (this.isDragContent) {
3389
+ this.$content.appendChild(this.titleBar.$dragArea);
3390
+ }
3356
3391
  this._renderSideEffect.add(() => {
3357
3392
  let last$userStyles;
3358
3393
  return this._$userStyles$.subscribe(($userStyles) => {
@@ -3828,7 +3863,7 @@ class MaxTitleBar extends DefaultTitleBar {
3828
3863
  if (this.getBoxesStatus) {
3829
3864
  const boxesStatus = this.getBoxesStatus();
3830
3865
  if (boxesStatus) {
3831
- return this.boxes.filter((box) => boxesStatus && boxesStatus.get(box.id) === TELE_BOX_STATE.Maximized);
3866
+ return this.boxes.filter((box) => boxesStatus && boxesStatus.get(box.id) === TELE_BOX_STATE.Maximized && !box.forceTop);
3832
3867
  }
3833
3868
  }
3834
3869
  return [];
@@ -4169,6 +4204,9 @@ class TeleBoxManager {
4169
4204
  if (boxes.length > 0) {
4170
4205
  let currentTopBox = void 0;
4171
4206
  const topBox = boxes.reduce((topBox2, box) => {
4207
+ if (box.forceTop) {
4208
+ return topBox2;
4209
+ }
4172
4210
  if (box.boxStatus && box.boxStatus === TELE_BOX_STATE.Minimized) {
4173
4211
  return topBox2;
4174
4212
  }
@@ -4519,6 +4557,21 @@ class TeleBoxManager {
4519
4557
  get topBox() {
4520
4558
  return this.topBox$.value;
4521
4559
  }
4560
+ get forceTopBoxes() {
4561
+ return this.boxes.find((box) => box.forceTop);
4562
+ }
4563
+ get maxForceTopBox() {
4564
+ return this.boxes.reduce((maxTopBox, box) => {
4565
+ var _a;
4566
+ if (box.forceTop && box.zIndex > ((_a = maxTopBox == null ? void 0 : maxTopBox.zIndex) != null ? _a : 0)) {
4567
+ return box;
4568
+ }
4569
+ return maxTopBox;
4570
+ }, void 0);
4571
+ }
4572
+ get forceNormalBoxes() {
4573
+ return this.boxes.find((box) => box.forceNormal);
4574
+ }
4522
4575
  get darkMode() {
4523
4576
  return this._darkMode$.value;
4524
4577
  }
@@ -4605,7 +4658,7 @@ class TeleBoxManager {
4605
4658
  var _a;
4606
4659
  const boxStatus = this.boxesStatus$.get(box.id);
4607
4660
  if (boxStatus) {
4608
- if (boxStatus !== TELE_BOX_STATE.Minimized && box.zIndex > ((_a = newTopBox == null ? void 0 : newTopBox.zIndex) != null ? _a : 0)) {
4661
+ if (boxStatus !== TELE_BOX_STATE.Minimized && !this.isForceTop(box) && box.zIndex > ((_a = newTopBox == null ? void 0 : newTopBox.zIndex) != null ? _a : 0)) {
4609
4662
  newTopBox = box;
4610
4663
  }
4611
4664
  box.setBoxStatus(boxStatus, skipUpdate);
@@ -4789,7 +4842,7 @@ class TeleBoxManager {
4789
4842
  return this.getUnabledBoxesStatusZIndex();
4790
4843
  }
4791
4844
  return this.boxes.reduce((maxZIndex, box) => {
4792
- if (box.boxStatus && box.boxStatus === TELE_BOX_STATE.Maximized) {
4845
+ if (box.boxStatus && box.boxStatus === TELE_BOX_STATE.Maximized && !this.isForceTop(box)) {
4793
4846
  return Math.max(maxZIndex, box.zIndex);
4794
4847
  }
4795
4848
  return maxZIndex;
@@ -4800,15 +4853,32 @@ class TeleBoxManager {
4800
4853
  return this.getUnabledBoxesStatusZIndex();
4801
4854
  }
4802
4855
  return this.boxes.reduce((maxZIndex, box) => {
4803
- if (box.boxStatus && box.boxStatus === TELE_BOX_STATE.Normal) {
4856
+ if (box.boxStatus && box.boxStatus === TELE_BOX_STATE.Normal && !this.isForceTop(box)) {
4804
4857
  return Math.max(maxZIndex, box.zIndex);
4805
4858
  }
4806
4859
  return maxZIndex;
4807
4860
  }, 299);
4808
4861
  }
4862
+ getMaxForceTopBoxZIndex() {
4863
+ if (!this.useBoxesStatus) {
4864
+ return this.getUnabledBoxesStatusZIndex();
4865
+ }
4866
+ return this.boxes.reduce((maxZIndex, box) => {
4867
+ if (box.boxStatus && this.isForceTop(box)) {
4868
+ return Math.max(maxZIndex, box.zIndex);
4869
+ }
4870
+ return maxZIndex;
4871
+ }, 699);
4872
+ }
4873
+ isForceNormal(box) {
4874
+ return box._forceNormal$.value;
4875
+ }
4876
+ isForceTop(box) {
4877
+ return box._forceTop$.value;
4878
+ }
4809
4879
  create(config = {}, smartPosition = true) {
4810
4880
  const box = new TeleBox({
4811
- zIndex: this.getMaxNormalBoxZIndex() + 1,
4881
+ zIndex: config.forceTop ? this.getMaxForceTopBoxZIndex() + 1 : this.getMaxNormalBoxZIndex() + 1,
4812
4882
  ...smartPosition ? this.smartPosition(config) : config,
4813
4883
  darkMode: this.darkMode,
4814
4884
  prefersColorScheme: this.prefersColorScheme,
@@ -4836,13 +4906,16 @@ class TeleBoxManager {
4836
4906
  }
4837
4907
  box._delegateEvents.on(TELE_BOX_DELEGATE_EVENT.Maximize, () => {
4838
4908
  if (this.useBoxesStatus && box.boxStatus) {
4909
+ if (box._forceNormal$.value) {
4910
+ return;
4911
+ }
4839
4912
  if (box.boxStatus === TELE_BOX_STATE.Maximized) {
4840
4913
  this.setBox(box.id, {
4841
4914
  status: TELE_BOX_STATE.Normal,
4842
4915
  zIndex: this.getMaxNormalBoxZIndex() + 1
4843
4916
  }, false);
4844
4917
  } else {
4845
- [...this.boxes].filter((box2) => box2.boxStatus === TELE_BOX_STATE.Normal).sort((a2, b2) => a2.zIndex - b2.zIndex).forEach((box2) => {
4918
+ [...this.boxes].filter((box2) => box2.boxStatus === TELE_BOX_STATE.Normal && !this.isForceNormal(box2)).sort((a2, b2) => a2.zIndex - b2.zIndex).forEach((box2) => {
4846
4919
  if (box2.boxStatus === TELE_BOX_STATE.Normal) {
4847
4920
  this.setBox(box2.id, {
4848
4921
  status: TELE_BOX_STATE.Maximized,
@@ -4858,6 +4931,9 @@ class TeleBoxManager {
4858
4931
  });
4859
4932
  box._delegateEvents.on(TELE_BOX_DELEGATE_EVENT.Minimize, () => {
4860
4933
  if (box.boxStatus && this.useBoxesStatus) {
4934
+ if (box._forceNormal$.value) {
4935
+ return;
4936
+ }
4861
4937
  if (box.focus) {
4862
4938
  this.blurBox(box);
4863
4939
  }
@@ -4907,6 +4983,9 @@ class TeleBoxManager {
4907
4983
  if (this.boxes.length > 0) {
4908
4984
  let currentTopBox = void 0;
4909
4985
  const topBox = this.boxes.reduce((topBox2, box2) => {
4986
+ if (this.isForceTop(box2)) {
4987
+ return topBox2;
4988
+ }
4910
4989
  if (box2.boxStatus && box2.boxStatus === TELE_BOX_STATE.Minimized) {
4911
4990
  return topBox2;
4912
4991
  }
@@ -5136,13 +5215,27 @@ class TeleBoxManager {
5136
5215
  lastNotMinimizedBoxStatus: config.lastNotMinimizedBoxStatus
5137
5216
  }, skipUpdate);
5138
5217
  }
5218
+ if (config.forceTop != null) {
5219
+ box.setForceTop(config.forceTop, skipUpdate);
5220
+ }
5221
+ if (config.forceNormal != null) {
5222
+ box.setForceNormal(config.forceNormal, skipUpdate);
5223
+ }
5139
5224
  }
5140
5225
  smartPosition(config = {}) {
5141
5226
  let { x: x2, y: y2 } = config;
5142
5227
  const { width = 0.5, height = 0.5 } = config;
5143
5228
  if (x2 == null) {
5144
5229
  let vx = 20;
5145
- if (this.topBox) {
5230
+ if (config.forceTop) {
5231
+ const forceTopBox = this.maxForceTopBox || this.topBox;
5232
+ if (forceTopBox) {
5233
+ vx = forceTopBox.intrinsicX * this.containerRect.width + 20;
5234
+ if (vx > this.containerRect.width - width * this.containerRect.width) {
5235
+ vx = 20;
5236
+ }
5237
+ }
5238
+ } else if (this.topBox) {
5146
5239
  vx = this.topBox.intrinsicX * this.containerRect.width + 20;
5147
5240
  if (vx > this.containerRect.width - width * this.containerRect.width) {
5148
5241
  vx = 20;
@@ -5156,7 +5249,15 @@ class TeleBoxManager {
5156
5249
  }
5157
5250
  if (y2 == null) {
5158
5251
  let vy = 20;
5159
- if (this.topBox) {
5252
+ if (config.forceTop) {
5253
+ const forceTopBox = this.maxForceTopBox || this.topBox;
5254
+ if (forceTopBox) {
5255
+ vy = forceTopBox.intrinsicY * this.containerRect.height + 20;
5256
+ if (vy > this.containerRect.height - height * this.containerRect.height) {
5257
+ vy = 20;
5258
+ }
5259
+ }
5260
+ } else if (this.topBox) {
5160
5261
  vy = this.topBox.intrinsicY * this.containerRect.height + 20;
5161
5262
  if (vy > this.containerRect.height - height * this.containerRect.height) {
5162
5263
  vy = 20;
@@ -5408,7 +5509,10 @@ class BoxManager {
5408
5509
  width,
5409
5510
  height,
5410
5511
  id: params.appId,
5411
- boxStatus: params.boxStatus
5512
+ boxStatus: params.boxStatus,
5513
+ forceTop: params.forceTop,
5514
+ forceNormal: params.forceNormal,
5515
+ isDragContent: params.isDragContent
5412
5516
  };
5413
5517
  this.teleBoxManager.create(createBoxConfig, params.smartPosition);
5414
5518
  this.context.emitter.emit(`${params.appId}${Events.WindowCreated}`);
@@ -5433,18 +5537,12 @@ class BoxManager {
5433
5537
  this.context.callbacks.emit("onBoxesStatusChange", map);
5434
5538
  this.context.emitter.emit("boxesStatusChange", map);
5435
5539
  }
5436
- setBoxStatus(appId, status) {
5437
- this.teleBoxManager.update(appId, { boxStatus: status }, true);
5438
- }
5439
5540
  setLastNotMinimizedBoxesStatus(status) {
5440
5541
  const map = new Map(Object.entries(status != null ? status : {}));
5441
5542
  this.teleBoxManager.setLastNotMinimizedBoxesStatus(map, true);
5442
5543
  this.context.callbacks.emit("onLastNotMinimizedBoxesStatusChange", map);
5443
5544
  this.context.emitter.emit("lastNotMinimizedBoxesStatusChange", map);
5444
5545
  }
5445
- setLastNotMinimizedBoxStatus(appId, status) {
5446
- this.teleBoxManager.update(appId, { lastNotMinimizedBoxStatus: status }, true);
5447
- }
5448
5546
  setupBoxManager(createTeleBoxManagerConfig) {
5449
5547
  const root = WindowManager.wrapper ? WindowManager.wrapper : document.body;
5450
5548
  const rect = root.getBoundingClientRect();
@@ -5511,7 +5609,10 @@ class BoxManager {
5511
5609
  height: state.height || 0.5,
5512
5610
  zIndex: state.zIndex,
5513
5611
  boxStatus: state.boxStatus,
5514
- lastNotMinimizedBoxStatus: state.lastNotMinimizedBoxStatus
5612
+ lastNotMinimizedBoxStatus: state.lastNotMinimizedBoxStatus,
5613
+ forceTop: state.forceTop,
5614
+ forceNormal: state.forceNormal,
5615
+ isDragContent: state.isDragContent
5515
5616
  },
5516
5617
  true
5517
5618
  );
@@ -6979,7 +7080,14 @@ class AttributesDelegate {
6979
7080
  attrNames.push("scenes");
6980
7081
  }
6981
7082
  const options = pick(params.options, attrNames);
6982
- const attrs = { kind: params.kind, options, isDynamicPPT };
7083
+ const attrs = {
7084
+ kind: params.kind,
7085
+ options,
7086
+ isDynamicPPT,
7087
+ forceTop: params.forceTop,
7088
+ forceNormal: params.forceNormal,
7089
+ isDragContent: params.isDragContent
7090
+ };
6983
7091
  if (typeof params.src === "string") {
6984
7092
  attrs.src = params.src;
6985
7093
  }
@@ -7146,6 +7254,7 @@ class AppProxy {
7146
7254
  const minimized = (_b = this.attributes) == null ? void 0 : _b["minimized"];
7147
7255
  const boxStatus = (_c = this.store.getBoxStatus(id2)) != null ? _c : void 0;
7148
7256
  const lastNotMinimizedBoxStatus = (_d = this.store.getLastNotMinimizedBoxStatus(id2)) != null ? _d : void 0;
7257
+ const { forceTop, forceNormal, isDragContent } = this.store.getAppAttributes(id2);
7149
7258
  const zIndex = attrs == null ? void 0 : attrs.zIndex;
7150
7259
  let payload = { maximized, minimized, zIndex };
7151
7260
  if (position) {
@@ -7166,6 +7275,15 @@ class AppProxy {
7166
7275
  if (lastNotMinimizedBoxStatus) {
7167
7276
  payload = { ...payload, lastNotMinimizedBoxStatus };
7168
7277
  }
7278
+ if (forceTop) {
7279
+ payload = { ...payload, forceTop };
7280
+ }
7281
+ if (forceNormal) {
7282
+ payload = { ...payload, forceNormal };
7283
+ }
7284
+ if (isDragContent) {
7285
+ payload = { ...payload, isDragContent };
7286
+ }
7169
7287
  return payload;
7170
7288
  };
7171
7289
  this.appAttributesUpdateListener = (appId2) => {
@@ -7290,7 +7408,10 @@ class AppProxy {
7290
7408
  appImpl,
7291
7409
  params.options,
7292
7410
  appParams == null ? void 0 : appParams.appOptions,
7293
- this.manager.useBoxesStatus ? TELE_BOX_STATE.Normal : void 0
7411
+ this.manager.useBoxesStatus ? TELE_BOX_STATE.Normal : void 0,
7412
+ params.forceTop,
7413
+ params.forceNormal,
7414
+ params.isDragContent
7294
7415
  );
7295
7416
  } else {
7296
7417
  throw new Error(`[WindowManager]: app load failed ${params.kind} ${params.src}`);
@@ -7305,9 +7426,9 @@ class AppProxy {
7305
7426
  var _a;
7306
7427
  return (_a = this.boxManager) == null ? void 0 : _a.getBox(this.id);
7307
7428
  }
7308
- async setupApp(appId, skipUpdate, app, options, appOptions, boxStatus) {
7429
+ async setupApp(appId, skipUpdate, app, options, appOptions, boxStatus, forceTop, forceNormal, isDragContent) {
7309
7430
  var _a;
7310
- log("setupApp", appId, app, options, boxStatus);
7431
+ log("setupApp", appId, app, options, boxStatus, forceTop, forceNormal, isDragContent);
7311
7432
  if (!this.boxManager) {
7312
7433
  throw new BoxManagerNotFoundError();
7313
7434
  }
@@ -7348,7 +7469,10 @@ class AppProxy {
7348
7469
  options,
7349
7470
  canOperate: this.manager.canOperate,
7350
7471
  smartPosition: this.isAddApp,
7351
- boxStatus
7472
+ boxStatus,
7473
+ forceTop,
7474
+ forceNormal,
7475
+ isDragContent
7352
7476
  });
7353
7477
  if (this.isAddApp && this.box) {
7354
7478
  if (boxStatus) {
@@ -8486,7 +8610,10 @@ class AppManager {
8486
8610
  {
8487
8611
  kind: app.kind,
8488
8612
  options: app.options,
8489
- isDynamicPPT: app.isDynamicPPT
8613
+ isDynamicPPT: app.isDynamicPPT,
8614
+ forceNormal: app.forceNormal,
8615
+ forceTop: app.forceTop,
8616
+ isDragContent: app.isDragContent
8490
8617
  },
8491
8618
  id2,
8492
8619
  false
@@ -19500,15 +19627,15 @@ const reconnectRefresher = new ReconnectRefresher({ emitter: internalEmitter });
19500
19627
  const _WindowManager = class extends InvisiblePlugin {
19501
19628
  constructor(context) {
19502
19629
  super(context);
19503
- this.version = "1.0.7-beta.5";
19504
- this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0-beta.10", "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" } };
19630
+ this.version = "1.0.7-beta.7";
19631
+ this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0-beta.13", "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" } };
19505
19632
  this.emitter = callbacks$1;
19506
19633
  this.viewMode = ViewMode.Broadcaster;
19507
19634
  this.isReplay = isPlayer(this.displayer);
19508
19635
  this._cursorUIDs = [];
19509
19636
  this.containerSizeRatio = _WindowManager.containerSizeRatio;
19510
19637
  _WindowManager.displayer = context.displayer;
19511
- window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0-beta.10", "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" } };
19638
+ window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.3.0-beta.13", "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" } };
19512
19639
  }
19513
19640
  static onCreate(manager) {
19514
19641
  _WindowManager._resolve(manager);
@@ -19925,13 +20052,13 @@ const _WindowManager = class extends InvisiblePlugin {
19925
20052
  var _a;
19926
20053
  if (!this.canOperate)
19927
20054
  return;
19928
- (_a = this.boxManager) == null ? void 0 : _a.setBoxStatus(boxId, boxStatus);
20055
+ (_a = this.appManager) == null ? void 0 : _a.store.setBoxStatus(boxId, boxStatus);
19929
20056
  }
19930
20057
  setLastNotMinimizedBoxStatus(boxId, lastNotMinimizedBoxStatus) {
19931
20058
  var _a;
19932
20059
  if (!this.canOperate)
19933
20060
  return;
19934
- (_a = this.boxManager) == null ? void 0 : _a.setLastNotMinimizedBoxStatus(boxId, lastNotMinimizedBoxStatus);
20061
+ (_a = this.appManager) == null ? void 0 : _a.store.setLastNotMinimizedBoxStatus(boxId, lastNotMinimizedBoxStatus);
19935
20062
  }
19936
20063
  setFullscreen(fullscreen) {
19937
20064
  var _a;