@netless/window-manager 0.4.66-beta.0 → 0.4.67-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.mjs CHANGED
@@ -22,7 +22,7 @@ import Emittery from "emittery";
22
22
  import { debounce, isEqual, omit, isObject, has, get, size as size$1, mapValues, noop as noop$2, pick, isEmpty, isInteger, orderBy, isFunction, isNumber, isNull } from "lodash";
23
23
  import { ScenePathType, UpdateEventKind, listenUpdated, unlistenUpdated, reaction, autorun, toJS, listenDisposed, unlistenDisposed, ViewMode, AnimationMode, isPlayer, isRoom, WhiteVersion, ApplianceNames, RoomPhase, PlayerPhase, InvisiblePlugin } from "white-web-sdk";
24
24
  import { v4 } from "uuid";
25
- import { genUID, SideEffectManager } from "side-effect-manager";
25
+ import { genUID as genUID$1, SideEffectManager as SideEffectManager$1 } from "side-effect-manager";
26
26
  import { ResizeObserver as ResizeObserver$3 } from "@juggle/resize-observer";
27
27
  import p$1 from "video.js";
28
28
  var Events = /* @__PURE__ */ ((Events2) => {
@@ -691,12 +691,12 @@ function isRef(e2) {
691
691
  return Boolean(has(e2, "__isRef"));
692
692
  }
693
693
  function makeRef(v2) {
694
- return { k: genUID(), v: v2, __isRef: true };
694
+ return { k: genUID$1(), v: v2, __isRef: true };
695
695
  }
696
696
  const STORAGE_NS = "_WM-STORAGE_";
697
697
  class Storage {
698
698
  constructor(context, id2, defaultState) {
699
- this._sideEffect = new SideEffectManager();
699
+ this._sideEffect = new SideEffectManager$1();
700
700
  this._destroyed = false;
701
701
  this._refMap = /* @__PURE__ */ new WeakMap();
702
702
  this._lastValue = /* @__PURE__ */ new Map();
@@ -1077,7 +1077,7 @@ class AppContext {
1077
1077
  return this.appProxy.kind;
1078
1078
  }
1079
1079
  dispatchAppEvent(type, value) {
1080
- internalEmitter.emit(`custom-${this.kind}`, { type, appId: this.appId, value });
1080
+ internalEmitter.emit(`custom-${this.kind}`, { kind: this.kind, appId: this.appId, type, value });
1081
1081
  }
1082
1082
  }
1083
1083
  class AppPageStateImpl {
@@ -1240,9 +1240,13 @@ class AttributesDelegate {
1240
1240
  this.context.safeSetAttributes({ ["mainViewCamera"]: __spreadValues({}, camera) });
1241
1241
  }
1242
1242
  setMainViewSize(size2) {
1243
+ if (size2.width === 0 || size2.height === 0)
1244
+ return;
1243
1245
  this.context.safeSetAttributes({ ["mainViewSize"]: __spreadValues({}, size2) });
1244
1246
  }
1245
1247
  setMainViewCameraAndSize(camera, size2) {
1248
+ if (size2.width === 0 || size2.height === 0)
1249
+ return;
1246
1250
  this.context.safeSetAttributes({
1247
1251
  ["mainViewCamera"]: __spreadValues({}, camera),
1248
1252
  ["mainViewSize"]: __spreadValues({}, size2)
@@ -1790,7 +1794,7 @@ class MainViewProxy {
1790
1794
  this.mainViewIsAddListener = false;
1791
1795
  this.store = this.manager.store;
1792
1796
  this.viewMode = this.manager.windowManger.viewMode;
1793
- this.sideEffectManager = new SideEffectManager();
1797
+ this.sideEffectManager = new SideEffectManager$1();
1794
1798
  this.startListenWritableChange = () => {
1795
1799
  this.sideEffectManager.add(() => {
1796
1800
  return internalEmitter.on("writableChange", (isWritable) => {
@@ -1845,6 +1849,9 @@ class MainViewProxy {
1845
1849
  clearTimeout(this._syncMainViewTimer);
1846
1850
  this._syncMainViewTimer = setTimeout(this.syncMainView, 100, this.manager.room);
1847
1851
  }
1852
+ if ((!this.mainViewSize || this.mainViewSize.width === 0 || this.mainViewSize.height === 0) && this.mainView.size.width > 0 && this.mainView.size.height > 0) {
1853
+ this.setMainViewSize(this.mainView.size);
1854
+ }
1848
1855
  };
1849
1856
  this.syncMainView = (room) => {
1850
1857
  if (room.isWritable) {
@@ -2097,7 +2104,7 @@ class AppManager {
2097
2104
  this.mainViewScenesLength = 0;
2098
2105
  this.callbacksNode = null;
2099
2106
  this.appCreateQueue = new AppCreateQueue();
2100
- this.sideEffectManager = new SideEffectManager();
2107
+ this.sideEffectManager = new SideEffectManager$1();
2101
2108
  this.sceneState = null;
2102
2109
  this.rootDirRemoving = false;
2103
2110
  this.onRemoveScenes = async (params) => {
@@ -2948,7 +2955,7 @@ var objectAssign = shouldUseNative$1() ? Object.assign : function(target, source
2948
2955
  * This source code is licensed under the MIT license found in the
2949
2956
  * LICENSE file in the root directory of this source tree.
2950
2957
  */
2951
- var l$1 = objectAssign, n$3 = typeof Symbol === "function" && Symbol.for, p = n$3 ? Symbol.for("react.element") : 60103, q = n$3 ? Symbol.for("react.portal") : 60106, r$4 = n$3 ? Symbol.for("react.fragment") : 60107, t$3 = n$3 ? Symbol.for("react.strict_mode") : 60108, u$3 = n$3 ? Symbol.for("react.profiler") : 60114, v$2 = n$3 ? Symbol.for("react.provider") : 60109, w$1 = n$3 ? Symbol.for("react.context") : 60110, x$1 = n$3 ? Symbol.for("react.forward_ref") : 60112, y$1 = n$3 ? Symbol.for("react.suspense") : 60113, z$1 = n$3 ? Symbol.for("react.memo") : 60115, A$1 = n$3 ? Symbol.for("react.lazy") : 60116, B$1 = typeof Symbol === "function" && Symbol.iterator;
2958
+ var l$1 = objectAssign, n$2 = typeof Symbol === "function" && Symbol.for, p = n$2 ? Symbol.for("react.element") : 60103, q = n$2 ? Symbol.for("react.portal") : 60106, r$3 = n$2 ? Symbol.for("react.fragment") : 60107, t$3 = n$2 ? Symbol.for("react.strict_mode") : 60108, u$3 = n$2 ? Symbol.for("react.profiler") : 60114, v$2 = n$2 ? Symbol.for("react.provider") : 60109, w$1 = n$2 ? Symbol.for("react.context") : 60110, x$1 = n$2 ? Symbol.for("react.forward_ref") : 60112, y$1 = n$2 ? Symbol.for("react.suspense") : 60113, z$1 = n$2 ? Symbol.for("react.memo") : 60115, A$1 = n$2 ? Symbol.for("react.lazy") : 60116, B$1 = typeof Symbol === "function" && Symbol.iterator;
2952
2959
  function C$2(a2) {
2953
2960
  for (var b2 = "https://reactjs.org/docs/error-decoder.html?invariant=" + a2, c2 = 1; c2 < arguments.length; c2++)
2954
2961
  b2 += "&args[]=" + encodeURIComponent(arguments[c2]);
@@ -3136,7 +3143,7 @@ react_production_min.Children = { map: function(a2, b2, c2) {
3136
3143
  return a2;
3137
3144
  } };
3138
3145
  react_production_min.Component = F$2;
3139
- react_production_min.Fragment = r$4;
3146
+ react_production_min.Fragment = r$3;
3140
3147
  react_production_min.Profiler = u$3;
3141
3148
  react_production_min.PureComponent = H$2;
3142
3149
  react_production_min.StrictMode = t$3;
@@ -4296,10 +4303,10 @@ var shallowequal = function shallowEqual(objA, objB, compare, compareContext) {
4296
4303
  }
4297
4304
  return true;
4298
4305
  };
4299
- const e$1$1 = "!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", s$1$1 = e$1$1.length, t$1$1 = Array(20), r$1$1 = () => {
4306
+ const e$1 = "!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", s$1 = e$1.length, t$1 = Array(20), r$1$1 = () => {
4300
4307
  for (let r2 = 0; r2 < 20; r2++)
4301
- t$1$1[r2] = e$1$1.charAt(Math.random() * s$1$1);
4302
- return t$1$1.join("");
4308
+ t$1[r2] = e$1.charAt(Math.random() * s$1);
4309
+ return t$1.join("");
4303
4310
  };
4304
4311
  class o$1 {
4305
4312
  constructor() {
@@ -4354,7 +4361,7 @@ class o$1 {
4354
4361
  var e$2 = Object.defineProperty, s$2 = (typeof require != "undefined" && require, (s2, r2, t2) => (((s3, r3, t3) => {
4355
4362
  r3 in s3 ? e$2(s3, r3, { enumerable: true, configurable: true, writable: true, value: t3 }) : s3[r3] = t3;
4356
4363
  })(s2, typeof r2 != "symbol" ? r2 + "" : r2, t2), t2));
4357
- class r$3 {
4364
+ class r$2 {
4358
4365
  constructor(e2, r2) {
4359
4366
  s$2(this, "_value"), s$2(this, "_beforeDestroys"), s$2(this, "_subscribers"), this._value = e2, r2 && (this.compare = r2);
4360
4367
  }
@@ -4377,7 +4384,7 @@ class r$3 {
4377
4384
  return e2(this._value, void 0, s2), r2;
4378
4385
  }
4379
4386
  derive(e2, s2, t2) {
4380
- const i2 = new r$3(e2(this.value, void 0, t2), s2), o2 = this.reaction((s3, r2, t3) => {
4387
+ const i2 = new r$2(e2(this.value, void 0, t2), s2), o2 = this.reaction((s3, r2, t3) => {
4381
4388
  i2.setValue(e2(s3, r2, t3));
4382
4389
  });
4383
4390
  return i2.addBeforeDestroy(o2), i2;
@@ -4396,7 +4403,7 @@ class r$3 {
4396
4403
  }
4397
4404
  function t$2(e2, s2, t2, i2) {
4398
4405
  let o2 = e2.map((e3) => e3.value);
4399
- const u2 = new r$3(s2(o2, void 0, i2), t2);
4406
+ const u2 = new r$2(s2(o2, void 0, i2), t2);
4400
4407
  return e2.forEach((e3, r2) => {
4401
4408
  const t3 = e3.reaction((e4, t4, i3) => {
4402
4409
  const c2 = o2.slice();
@@ -4407,7 +4414,7 @@ function t$2(e2, s2, t2, i2) {
4407
4414
  u2.addBeforeDestroy(t3);
4408
4415
  }), u2;
4409
4416
  }
4410
- function i$2(e2, s2) {
4417
+ function i$1(e2, s2) {
4411
4418
  Object.keys(s2).forEach((r2) => {
4412
4419
  u$2(e2, r2, s2[r2]);
4413
4420
  });
@@ -4425,7 +4432,7 @@ function c(e2) {
4425
4432
  e2.remove(r2);
4426
4433
  }), s3;
4427
4434
  };
4428
- return { bindSideEffect: s2, combine: (e3, r2, i2, o2) => s2(t$2(e3, r2, i2, o2)), createVal: (e3, t2) => s2(new r$3(e3, t2)) };
4435
+ return { bindSideEffect: s2, combine: (e3, r2, i2, o2) => s2(t$2(e3, r2, i2, o2)), createVal: (e3, t2) => s2(new r$2(e3, t2)) };
4429
4436
  }
4430
4437
  var TELE_BOX_COLOR_SCHEME;
4431
4438
  (function(TELE_BOX_COLOR_SCHEME2) {
@@ -4975,7 +4982,7 @@ class TeleBox {
4975
4982
  $userFooter: $userFooter$,
4976
4983
  $userStyles: $userStyles$
4977
4984
  };
4978
- i$2(this, valConfig);
4985
+ i$1(this, valConfig);
4979
4986
  this._state$ = state$;
4980
4987
  this._minSize$ = minSize$;
4981
4988
  this._size$ = size$;
@@ -5895,7 +5902,7 @@ class TeleBoxManager {
5895
5902
  minimized: minimized$,
5896
5903
  maximized: maximized$
5897
5904
  };
5898
- i$2(this, valConfig);
5905
+ i$1(this, valConfig);
5899
5906
  this._state$ = state$;
5900
5907
  this.root.appendChild(this.maxTitleBar.render());
5901
5908
  }
@@ -6060,7 +6067,7 @@ class TeleBoxManager {
6060
6067
  this.removeAll(skipUpdate);
6061
6068
  Object.keys(this).forEach((key) => {
6062
6069
  const value = this[key];
6063
- if (value instanceof r$3) {
6070
+ if (value instanceof r$2) {
6064
6071
  value.destroy();
6065
6072
  }
6066
6073
  });
@@ -7302,7 +7309,7 @@ class CursorManager {
7302
7309
  this.manager = manager;
7303
7310
  this.enableCursor = enableCursor;
7304
7311
  this.cursorInstances = /* @__PURE__ */ new Map();
7305
- this.sideEffectManager = new SideEffectManager();
7312
+ this.sideEffectManager = new SideEffectManager$1();
7306
7313
  this.store = this.manager.store;
7307
7314
  this.applianceIcons = ApplianceMap;
7308
7315
  this.onCursorMove = (payload) => {
@@ -7786,65 +7793,79 @@ const debounceFn = (inputFunction, options = {}) => {
7786
7793
  };
7787
7794
  return debouncedFunction;
7788
7795
  };
7789
- const s$1 = "!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", e$1 = s$1.length, t$1 = Array(20), i$1 = () => {
7790
- for (let i2 = 0; i2 < 20; i2++)
7791
- t$1[i2] = s$1.charAt(Math.random() * e$1);
7792
- return t$1.join("");
7796
+ const SOUP = "!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
7797
+ const SOUP_LEN = 87;
7798
+ const ID_LEN = 20;
7799
+ const reusedIdCarrier = [];
7800
+ const genUID = () => {
7801
+ for (let i2 = 0; i2 < ID_LEN; i2++) {
7802
+ reusedIdCarrier[i2] = SOUP.charAt(Math.random() * SOUP_LEN);
7803
+ }
7804
+ return reusedIdCarrier.join("");
7793
7805
  };
7794
- function r$2(s2) {
7806
+ function invoke(fn) {
7795
7807
  try {
7796
- return s2();
7808
+ return fn();
7797
7809
  } catch (e2) {
7798
7810
  console.error(e2);
7799
7811
  }
7800
7812
  }
7801
- class n$2 {
7813
+ class SideEffectManager {
7802
7814
  constructor() {
7815
+ this.push = this.addDisposer;
7803
7816
  this.disposers = /* @__PURE__ */ new Map();
7804
7817
  }
7805
- addDisposer(s2, e2 = this.genUID()) {
7806
- return this.flush(e2), this.disposers.set(e2, Array.isArray(s2) ? () => s2.forEach(r$2) : s2), e2;
7807
- }
7808
- add(s2, e2 = this.genUID()) {
7809
- return this.addDisposer(s2(), e2);
7810
- }
7811
- addEventListener(s2, e2, t2, i2, r2 = this.genUID()) {
7812
- return s2.addEventListener(e2, t2, i2), this.addDisposer(() => s2.removeEventListener(e2, t2, i2), r2), r2;
7813
- }
7814
- setTimeout(s2, e2, t2 = this.genUID()) {
7815
- const i2 = window.setTimeout(() => {
7816
- this.remove(t2), s2();
7817
- }, e2);
7818
- return this.addDisposer(() => window.clearTimeout(i2), t2);
7819
- }
7820
- setInterval(s2, e2, t2 = this.genUID()) {
7821
- const i2 = window.setInterval(s2, e2);
7822
- return this.addDisposer(() => window.clearInterval(i2), t2);
7823
- }
7824
- remove(s2) {
7825
- const e2 = this.disposers.get(s2);
7826
- return this.disposers.delete(s2), e2;
7827
- }
7828
- flush(s2) {
7829
- const e2 = this.remove(s2);
7830
- if (e2)
7831
- try {
7832
- e2();
7833
- } catch (t2) {
7834
- console.error(t2);
7835
- }
7818
+ addDisposer(disposer, disposerID = this.genUID()) {
7819
+ this.flush(disposerID);
7820
+ this.disposers.set(disposerID, Array.isArray(disposer) ? joinDisposers(disposer) : disposer);
7821
+ return disposerID;
7822
+ }
7823
+ add(executor, disposerID = this.genUID()) {
7824
+ const disposers = executor();
7825
+ return disposers ? this.addDisposer(disposers, disposerID) : disposerID;
7826
+ }
7827
+ addEventListener(el, type, listener, options, disposerID = this.genUID()) {
7828
+ el.addEventListener(type, listener, options);
7829
+ this.addDisposer(() => el.removeEventListener(type, listener, options), disposerID);
7830
+ return disposerID;
7831
+ }
7832
+ setTimeout(handler, timeout, disposerID = this.genUID()) {
7833
+ const ticket = window.setTimeout(() => {
7834
+ this.remove(disposerID);
7835
+ handler();
7836
+ }, timeout);
7837
+ return this.addDisposer(() => window.clearTimeout(ticket), disposerID);
7838
+ }
7839
+ setInterval(handler, timeout, disposerID = this.genUID()) {
7840
+ const ticket = window.setInterval(handler, timeout);
7841
+ return this.addDisposer(() => window.clearInterval(ticket), disposerID);
7842
+ }
7843
+ remove(disposerID) {
7844
+ const disposer = this.disposers.get(disposerID);
7845
+ this.disposers.delete(disposerID);
7846
+ return disposer;
7847
+ }
7848
+ flush(disposerID) {
7849
+ const disposer = this.remove(disposerID);
7850
+ if (disposer) {
7851
+ disposer();
7852
+ }
7836
7853
  }
7837
7854
  flushAll() {
7838
- this.disposers.forEach(r$2), this.disposers.clear();
7855
+ this.disposers.forEach(invoke);
7856
+ this.disposers.clear();
7839
7857
  }
7840
7858
  genUID() {
7841
- let s2;
7859
+ let uid;
7842
7860
  do {
7843
- s2 = i$1();
7844
- } while (this.disposers.has(s2));
7845
- return s2;
7861
+ uid = genUID();
7862
+ } while (this.disposers.has(uid));
7863
+ return uid;
7846
7864
  }
7847
7865
  }
7866
+ function joinDisposers(disposers) {
7867
+ return () => disposers.forEach(invoke);
7868
+ }
7848
7869
  var resizeObservers = [];
7849
7870
  var hasActiveObservations = function() {
7850
7871
  return resizeObservers.some(function(ro) {
@@ -7920,11 +7941,11 @@ var isHidden = function(target) {
7920
7941
  return !(offsetWidth || offsetHeight || target.getClientRects().length);
7921
7942
  };
7922
7943
  var isElement = function(obj) {
7923
- var _a, _b;
7944
+ var _a;
7924
7945
  if (obj instanceof Element) {
7925
7946
  return true;
7926
7947
  }
7927
- var scope = (_b = (_a = obj) === null || _a === void 0 ? void 0 : _a.ownerDocument) === null || _b === void 0 ? void 0 : _b.defaultView;
7948
+ var scope = (_a = obj === null || obj === void 0 ? void 0 : obj.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
7928
7949
  return !!(scope && obj instanceof scope.Element);
7929
7950
  };
7930
7951
  var isReplacedElement = function(target) {
@@ -8121,7 +8142,7 @@ var queueMicroTask = function(callback) {
8121
8142
  return notify();
8122
8143
  }).observe(el_1, config);
8123
8144
  trigger = function() {
8124
- el_1.textContent = "" + (toggle_1 ? toggle_1-- : toggle_1++);
8145
+ el_1.textContent = "".concat(toggle_1 ? toggle_1-- : toggle_1++);
8125
8146
  };
8126
8147
  }
8127
8148
  callbacks.push(callback);
@@ -9085,7 +9106,7 @@ class DocsViewer {
9085
9106
  this.namespace = "netless-app-docs-viewer";
9086
9107
  this.isShowPreview = false;
9087
9108
  this.isSmallBox = false;
9088
- this.sideEffect = new n$2();
9109
+ this.sideEffect = new SideEffectManager();
9089
9110
  if (pages.length <= 0) {
9090
9111
  throw new Error("[DocsViewer] Empty pages.");
9091
9112
  }
@@ -9094,6 +9115,7 @@ class DocsViewer {
9094
9115
  this.pages = pages;
9095
9116
  this.onNewPageIndex = onNewPageIndex;
9096
9117
  this.onPlay = onPlay;
9118
+ this.onPageIndexChanged = () => void 0;
9097
9119
  this.render();
9098
9120
  }
9099
9121
  mount() {
@@ -9127,6 +9149,7 @@ class DocsViewer {
9127
9149
  if (!Number.isNaN(pageIndex)) {
9128
9150
  this.pageIndex = pageIndex;
9129
9151
  this.$pageNumberInput.value = String(pageIndex + 1);
9152
+ this.onPageIndexChanged(pageIndex);
9130
9153
  }
9131
9154
  }
9132
9155
  setSmallBox(isSmallBox) {
@@ -9646,7 +9669,7 @@ class PageRenderer {
9646
9669
  const SCROLLBAR_DEFAULT_MIN_HEIGHT = 30;
9647
9670
  class ScrollBar {
9648
9671
  constructor(config) {
9649
- this.sideEffect = new n$2();
9672
+ this.sideEffect = new SideEffectManager();
9650
9673
  this.pagesScrollTop = config.pagesScrollTop || 0;
9651
9674
  this.containerWidth = config.containerWidth || 1;
9652
9675
  this.containerHeight = config.containerHeight || 1;
@@ -9777,7 +9800,7 @@ class StaticDocsViewer {
9777
9800
  baseScenePath,
9778
9801
  appId
9779
9802
  }) {
9780
- this.sideEffect = new n$2();
9803
+ this.sideEffect = new SideEffectManager();
9781
9804
  this.userScrolling = false;
9782
9805
  this.onNewPageIndex = (index2) => {
9783
9806
  this.scrollToPage(index2);
@@ -10139,7 +10162,7 @@ class StaticDocsViewer {
10139
10162
  }
10140
10163
  class DynamicDocsViewer {
10141
10164
  constructor({ context, whiteboardView, box, pages }) {
10142
- this.sideEffect = new n$2();
10165
+ this.sideEffect = new SideEffectManager();
10143
10166
  this.onPlayPPT = () => {
10144
10167
  const room = this.context.getRoom();
10145
10168
  if (room) {
@@ -10368,6 +10391,13 @@ function setupStaticDocsViewer(context, whiteboardView, box, pages) {
10368
10391
  baseScenePath: context.getInitScenePath(),
10369
10392
  appId: context.appId
10370
10393
  }).mount();
10394
+ docsViewer.viewer.onPageIndexChanged = (index2) => {
10395
+ context.dispatchAppEvent("pageStateChange", { index: index2, length: pages.length });
10396
+ };
10397
+ context.dispatchAppEvent("pageStateChange", {
10398
+ index: docsViewer.viewer.pageIndex,
10399
+ length: pages.length
10400
+ });
10371
10401
  context.emitter.on("attributesUpdate", (attributes) => {
10372
10402
  if (attributes) {
10373
10403
  if (attributes.pageScrollTop != null) {
@@ -10388,6 +10418,13 @@ function setupDynamicDocsViewer(context, whiteboardView, box, pages) {
10388
10418
  box,
10389
10419
  pages
10390
10420
  }).mount();
10421
+ docsViewer.viewer.onPageIndexChanged = (index2) => {
10422
+ context.dispatchAppEvent("pageStateChange", { index: index2, length: pages.length });
10423
+ };
10424
+ context.dispatchAppEvent("pageStateChange", {
10425
+ index: docsViewer.getPageIndex(),
10426
+ length: pages.length
10427
+ });
10391
10428
  context.mountView(docsViewer.$whiteboardView);
10392
10429
  if (context.isAddApp) {
10393
10430
  whiteboardView.callbacks.once("onSizeUpdated", ({ width: contentWidth, height: contentHeight }) => {
@@ -17016,7 +17053,7 @@ const _IframeBridge = class {
17016
17053
  this.allowAppliances = ["clicker"];
17017
17054
  this.bridgeDisposer = noop$2;
17018
17055
  this.rootRect = null;
17019
- this.sideEffectManager = new SideEffectManager();
17056
+ this.sideEffectManager = new SideEffectManager$1();
17020
17057
  this.execListenIframe = debounce((options) => {
17021
17058
  this.listenIframe(options);
17022
17059
  }, 50);
@@ -17475,14 +17512,14 @@ const reconnectRefresher = new ReconnectRefresher({ emitter: internalEmitter });
17475
17512
  const _WindowManager = class extends InvisiblePlugin {
17476
17513
  constructor(context) {
17477
17514
  super(context);
17478
- this.version = "0.4.66-beta.0";
17479
- this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.2.27", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^0.1.5", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^0.2.16", "@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", "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", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.5.3", "vitest": "^0.14.1", "white-web-sdk": "2.16.43" } };
17515
+ this.version = "0.4.67-beta.0";
17516
+ this.dependencies = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.2.27", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^0.1.5", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^0.2.17", "@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", "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", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.5.3", "vitest": "^0.14.1", "white-web-sdk": "2.16.43" } };
17480
17517
  this.emitter = callbacks$1;
17481
17518
  this.viewMode = ViewMode.Broadcaster;
17482
17519
  this.isReplay = isPlayer(this.displayer);
17483
17520
  this.containerSizeRatio = _WindowManager.containerSizeRatio;
17484
17521
  _WindowManager.displayer = context.displayer;
17485
- window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.2.27", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^0.1.5", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^0.2.16", "@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", "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", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.5.3", "vitest": "^0.14.1", "white-web-sdk": "2.16.43" } };
17522
+ window.NETLESS_DEPS = { "dependencies": { "@juggle/resize-observer": "^3.3.1", "@netless/telebox-insider": "0.2.27", "emittery": "^0.9.2", "lodash": "^4.17.21", "p-retry": "^4.6.1", "side-effect-manager": "^0.1.5", "uuid": "^7.0.3", "video.js": ">=7" }, "peerDependencies": { "jspdf": "2.5.1", "white-web-sdk": "^2.16.0" }, "devDependencies": { "@netless/app-docs-viewer": "^0.2.17", "@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", "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", "svelte": "^3.42.4", "typescript": "^4.5.5", "vite": "^2.5.3", "vitest": "^0.14.1", "white-web-sdk": "2.16.43" } };
17486
17523
  }
17487
17524
  static async mount(params) {
17488
17525
  const room = params.room;