@netless/window-manager 0.4.66-beta.0 → 0.4.66

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 {
@@ -1790,7 +1790,7 @@ class MainViewProxy {
1790
1790
  this.mainViewIsAddListener = false;
1791
1791
  this.store = this.manager.store;
1792
1792
  this.viewMode = this.manager.windowManger.viewMode;
1793
- this.sideEffectManager = new SideEffectManager();
1793
+ this.sideEffectManager = new SideEffectManager$1();
1794
1794
  this.startListenWritableChange = () => {
1795
1795
  this.sideEffectManager.add(() => {
1796
1796
  return internalEmitter.on("writableChange", (isWritable) => {
@@ -2097,7 +2097,7 @@ class AppManager {
2097
2097
  this.mainViewScenesLength = 0;
2098
2098
  this.callbacksNode = null;
2099
2099
  this.appCreateQueue = new AppCreateQueue();
2100
- this.sideEffectManager = new SideEffectManager();
2100
+ this.sideEffectManager = new SideEffectManager$1();
2101
2101
  this.sceneState = null;
2102
2102
  this.rootDirRemoving = false;
2103
2103
  this.onRemoveScenes = async (params) => {
@@ -2948,7 +2948,7 @@ var objectAssign = shouldUseNative$1() ? Object.assign : function(target, source
2948
2948
  * This source code is licensed under the MIT license found in the
2949
2949
  * LICENSE file in the root directory of this source tree.
2950
2950
  */
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;
2951
+ 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
2952
  function C$2(a2) {
2953
2953
  for (var b2 = "https://reactjs.org/docs/error-decoder.html?invariant=" + a2, c2 = 1; c2 < arguments.length; c2++)
2954
2954
  b2 += "&args[]=" + encodeURIComponent(arguments[c2]);
@@ -3136,7 +3136,7 @@ react_production_min.Children = { map: function(a2, b2, c2) {
3136
3136
  return a2;
3137
3137
  } };
3138
3138
  react_production_min.Component = F$2;
3139
- react_production_min.Fragment = r$4;
3139
+ react_production_min.Fragment = r$3;
3140
3140
  react_production_min.Profiler = u$3;
3141
3141
  react_production_min.PureComponent = H$2;
3142
3142
  react_production_min.StrictMode = t$3;
@@ -4296,10 +4296,10 @@ var shallowequal = function shallowEqual(objA, objB, compare, compareContext) {
4296
4296
  }
4297
4297
  return true;
4298
4298
  };
4299
- const e$1$1 = "!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", s$1$1 = e$1$1.length, t$1$1 = Array(20), r$1$1 = () => {
4299
+ const e$1 = "!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", s$1 = e$1.length, t$1 = Array(20), r$1$1 = () => {
4300
4300
  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("");
4301
+ t$1[r2] = e$1.charAt(Math.random() * s$1);
4302
+ return t$1.join("");
4303
4303
  };
4304
4304
  class o$1 {
4305
4305
  constructor() {
@@ -4354,7 +4354,7 @@ class o$1 {
4354
4354
  var e$2 = Object.defineProperty, s$2 = (typeof require != "undefined" && require, (s2, r2, t2) => (((s3, r3, t3) => {
4355
4355
  r3 in s3 ? e$2(s3, r3, { enumerable: true, configurable: true, writable: true, value: t3 }) : s3[r3] = t3;
4356
4356
  })(s2, typeof r2 != "symbol" ? r2 + "" : r2, t2), t2));
4357
- class r$3 {
4357
+ class r$2 {
4358
4358
  constructor(e2, r2) {
4359
4359
  s$2(this, "_value"), s$2(this, "_beforeDestroys"), s$2(this, "_subscribers"), this._value = e2, r2 && (this.compare = r2);
4360
4360
  }
@@ -4377,7 +4377,7 @@ class r$3 {
4377
4377
  return e2(this._value, void 0, s2), r2;
4378
4378
  }
4379
4379
  derive(e2, s2, t2) {
4380
- const i2 = new r$3(e2(this.value, void 0, t2), s2), o2 = this.reaction((s3, r2, t3) => {
4380
+ const i2 = new r$2(e2(this.value, void 0, t2), s2), o2 = this.reaction((s3, r2, t3) => {
4381
4381
  i2.setValue(e2(s3, r2, t3));
4382
4382
  });
4383
4383
  return i2.addBeforeDestroy(o2), i2;
@@ -4396,7 +4396,7 @@ class r$3 {
4396
4396
  }
4397
4397
  function t$2(e2, s2, t2, i2) {
4398
4398
  let o2 = e2.map((e3) => e3.value);
4399
- const u2 = new r$3(s2(o2, void 0, i2), t2);
4399
+ const u2 = new r$2(s2(o2, void 0, i2), t2);
4400
4400
  return e2.forEach((e3, r2) => {
4401
4401
  const t3 = e3.reaction((e4, t4, i3) => {
4402
4402
  const c2 = o2.slice();
@@ -4407,7 +4407,7 @@ function t$2(e2, s2, t2, i2) {
4407
4407
  u2.addBeforeDestroy(t3);
4408
4408
  }), u2;
4409
4409
  }
4410
- function i$2(e2, s2) {
4410
+ function i$1(e2, s2) {
4411
4411
  Object.keys(s2).forEach((r2) => {
4412
4412
  u$2(e2, r2, s2[r2]);
4413
4413
  });
@@ -4425,7 +4425,7 @@ function c(e2) {
4425
4425
  e2.remove(r2);
4426
4426
  }), s3;
4427
4427
  };
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)) };
4428
+ 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
4429
  }
4430
4430
  var TELE_BOX_COLOR_SCHEME;
4431
4431
  (function(TELE_BOX_COLOR_SCHEME2) {
@@ -4975,7 +4975,7 @@ class TeleBox {
4975
4975
  $userFooter: $userFooter$,
4976
4976
  $userStyles: $userStyles$
4977
4977
  };
4978
- i$2(this, valConfig);
4978
+ i$1(this, valConfig);
4979
4979
  this._state$ = state$;
4980
4980
  this._minSize$ = minSize$;
4981
4981
  this._size$ = size$;
@@ -5895,7 +5895,7 @@ class TeleBoxManager {
5895
5895
  minimized: minimized$,
5896
5896
  maximized: maximized$
5897
5897
  };
5898
- i$2(this, valConfig);
5898
+ i$1(this, valConfig);
5899
5899
  this._state$ = state$;
5900
5900
  this.root.appendChild(this.maxTitleBar.render());
5901
5901
  }
@@ -6060,7 +6060,7 @@ class TeleBoxManager {
6060
6060
  this.removeAll(skipUpdate);
6061
6061
  Object.keys(this).forEach((key) => {
6062
6062
  const value = this[key];
6063
- if (value instanceof r$3) {
6063
+ if (value instanceof r$2) {
6064
6064
  value.destroy();
6065
6065
  }
6066
6066
  });
@@ -7302,7 +7302,7 @@ class CursorManager {
7302
7302
  this.manager = manager;
7303
7303
  this.enableCursor = enableCursor;
7304
7304
  this.cursorInstances = /* @__PURE__ */ new Map();
7305
- this.sideEffectManager = new SideEffectManager();
7305
+ this.sideEffectManager = new SideEffectManager$1();
7306
7306
  this.store = this.manager.store;
7307
7307
  this.applianceIcons = ApplianceMap;
7308
7308
  this.onCursorMove = (payload) => {
@@ -7786,65 +7786,79 @@ const debounceFn = (inputFunction, options = {}) => {
7786
7786
  };
7787
7787
  return debouncedFunction;
7788
7788
  };
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("");
7789
+ const SOUP = "!#%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
7790
+ const SOUP_LEN = 87;
7791
+ const ID_LEN = 20;
7792
+ const reusedIdCarrier = [];
7793
+ const genUID = () => {
7794
+ for (let i2 = 0; i2 < ID_LEN; i2++) {
7795
+ reusedIdCarrier[i2] = SOUP.charAt(Math.random() * SOUP_LEN);
7796
+ }
7797
+ return reusedIdCarrier.join("");
7793
7798
  };
7794
- function r$2(s2) {
7799
+ function invoke(fn) {
7795
7800
  try {
7796
- return s2();
7801
+ return fn();
7797
7802
  } catch (e2) {
7798
7803
  console.error(e2);
7799
7804
  }
7800
7805
  }
7801
- class n$2 {
7806
+ class SideEffectManager {
7802
7807
  constructor() {
7808
+ this.push = this.addDisposer;
7803
7809
  this.disposers = /* @__PURE__ */ new Map();
7804
7810
  }
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
- }
7811
+ addDisposer(disposer, disposerID = this.genUID()) {
7812
+ this.flush(disposerID);
7813
+ this.disposers.set(disposerID, Array.isArray(disposer) ? joinDisposers(disposer) : disposer);
7814
+ return disposerID;
7815
+ }
7816
+ add(executor, disposerID = this.genUID()) {
7817
+ const disposers = executor();
7818
+ return disposers ? this.addDisposer(disposers, disposerID) : disposerID;
7819
+ }
7820
+ addEventListener(el, type, listener, options, disposerID = this.genUID()) {
7821
+ el.addEventListener(type, listener, options);
7822
+ this.addDisposer(() => el.removeEventListener(type, listener, options), disposerID);
7823
+ return disposerID;
7824
+ }
7825
+ setTimeout(handler, timeout, disposerID = this.genUID()) {
7826
+ const ticket = window.setTimeout(() => {
7827
+ this.remove(disposerID);
7828
+ handler();
7829
+ }, timeout);
7830
+ return this.addDisposer(() => window.clearTimeout(ticket), disposerID);
7831
+ }
7832
+ setInterval(handler, timeout, disposerID = this.genUID()) {
7833
+ const ticket = window.setInterval(handler, timeout);
7834
+ return this.addDisposer(() => window.clearInterval(ticket), disposerID);
7835
+ }
7836
+ remove(disposerID) {
7837
+ const disposer = this.disposers.get(disposerID);
7838
+ this.disposers.delete(disposerID);
7839
+ return disposer;
7840
+ }
7841
+ flush(disposerID) {
7842
+ const disposer = this.remove(disposerID);
7843
+ if (disposer) {
7844
+ disposer();
7845
+ }
7836
7846
  }
7837
7847
  flushAll() {
7838
- this.disposers.forEach(r$2), this.disposers.clear();
7848
+ this.disposers.forEach(invoke);
7849
+ this.disposers.clear();
7839
7850
  }
7840
7851
  genUID() {
7841
- let s2;
7852
+ let uid;
7842
7853
  do {
7843
- s2 = i$1();
7844
- } while (this.disposers.has(s2));
7845
- return s2;
7854
+ uid = genUID();
7855
+ } while (this.disposers.has(uid));
7856
+ return uid;
7846
7857
  }
7847
7858
  }
7859
+ function joinDisposers(disposers) {
7860
+ return () => disposers.forEach(invoke);
7861
+ }
7848
7862
  var resizeObservers = [];
7849
7863
  var hasActiveObservations = function() {
7850
7864
  return resizeObservers.some(function(ro) {
@@ -7920,11 +7934,11 @@ var isHidden = function(target) {
7920
7934
  return !(offsetWidth || offsetHeight || target.getClientRects().length);
7921
7935
  };
7922
7936
  var isElement = function(obj) {
7923
- var _a, _b;
7937
+ var _a;
7924
7938
  if (obj instanceof Element) {
7925
7939
  return true;
7926
7940
  }
7927
- var scope = (_b = (_a = obj) === null || _a === void 0 ? void 0 : _a.ownerDocument) === null || _b === void 0 ? void 0 : _b.defaultView;
7941
+ var scope = (_a = obj === null || obj === void 0 ? void 0 : obj.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
7928
7942
  return !!(scope && obj instanceof scope.Element);
7929
7943
  };
7930
7944
  var isReplacedElement = function(target) {
@@ -8121,7 +8135,7 @@ var queueMicroTask = function(callback) {
8121
8135
  return notify();
8122
8136
  }).observe(el_1, config);
8123
8137
  trigger = function() {
8124
- el_1.textContent = "" + (toggle_1 ? toggle_1-- : toggle_1++);
8138
+ el_1.textContent = "".concat(toggle_1 ? toggle_1-- : toggle_1++);
8125
8139
  };
8126
8140
  }
8127
8141
  callbacks.push(callback);
@@ -9085,7 +9099,7 @@ class DocsViewer {
9085
9099
  this.namespace = "netless-app-docs-viewer";
9086
9100
  this.isShowPreview = false;
9087
9101
  this.isSmallBox = false;
9088
- this.sideEffect = new n$2();
9102
+ this.sideEffect = new SideEffectManager();
9089
9103
  if (pages.length <= 0) {
9090
9104
  throw new Error("[DocsViewer] Empty pages.");
9091
9105
  }
@@ -9094,6 +9108,7 @@ class DocsViewer {
9094
9108
  this.pages = pages;
9095
9109
  this.onNewPageIndex = onNewPageIndex;
9096
9110
  this.onPlay = onPlay;
9111
+ this.onPageIndexChanged = () => void 0;
9097
9112
  this.render();
9098
9113
  }
9099
9114
  mount() {
@@ -9127,6 +9142,7 @@ class DocsViewer {
9127
9142
  if (!Number.isNaN(pageIndex)) {
9128
9143
  this.pageIndex = pageIndex;
9129
9144
  this.$pageNumberInput.value = String(pageIndex + 1);
9145
+ this.onPageIndexChanged(pageIndex);
9130
9146
  }
9131
9147
  }
9132
9148
  setSmallBox(isSmallBox) {
@@ -9646,7 +9662,7 @@ class PageRenderer {
9646
9662
  const SCROLLBAR_DEFAULT_MIN_HEIGHT = 30;
9647
9663
  class ScrollBar {
9648
9664
  constructor(config) {
9649
- this.sideEffect = new n$2();
9665
+ this.sideEffect = new SideEffectManager();
9650
9666
  this.pagesScrollTop = config.pagesScrollTop || 0;
9651
9667
  this.containerWidth = config.containerWidth || 1;
9652
9668
  this.containerHeight = config.containerHeight || 1;
@@ -9777,7 +9793,7 @@ class StaticDocsViewer {
9777
9793
  baseScenePath,
9778
9794
  appId
9779
9795
  }) {
9780
- this.sideEffect = new n$2();
9796
+ this.sideEffect = new SideEffectManager();
9781
9797
  this.userScrolling = false;
9782
9798
  this.onNewPageIndex = (index2) => {
9783
9799
  this.scrollToPage(index2);
@@ -10139,7 +10155,7 @@ class StaticDocsViewer {
10139
10155
  }
10140
10156
  class DynamicDocsViewer {
10141
10157
  constructor({ context, whiteboardView, box, pages }) {
10142
- this.sideEffect = new n$2();
10158
+ this.sideEffect = new SideEffectManager();
10143
10159
  this.onPlayPPT = () => {
10144
10160
  const room = this.context.getRoom();
10145
10161
  if (room) {
@@ -10368,6 +10384,13 @@ function setupStaticDocsViewer(context, whiteboardView, box, pages) {
10368
10384
  baseScenePath: context.getInitScenePath(),
10369
10385
  appId: context.appId
10370
10386
  }).mount();
10387
+ docsViewer.viewer.onPageIndexChanged = (index2) => {
10388
+ context.dispatchAppEvent("pageStateChange", { index: index2, length: pages.length });
10389
+ };
10390
+ context.dispatchAppEvent("pageStateChange", {
10391
+ index: docsViewer.viewer.pageIndex,
10392
+ length: pages.length
10393
+ });
10371
10394
  context.emitter.on("attributesUpdate", (attributes) => {
10372
10395
  if (attributes) {
10373
10396
  if (attributes.pageScrollTop != null) {
@@ -10388,6 +10411,13 @@ function setupDynamicDocsViewer(context, whiteboardView, box, pages) {
10388
10411
  box,
10389
10412
  pages
10390
10413
  }).mount();
10414
+ docsViewer.viewer.onPageIndexChanged = (index2) => {
10415
+ context.dispatchAppEvent("pageStateChange", { index: index2, length: pages.length });
10416
+ };
10417
+ context.dispatchAppEvent("pageStateChange", {
10418
+ index: docsViewer.getPageIndex(),
10419
+ length: pages.length
10420
+ });
10391
10421
  context.mountView(docsViewer.$whiteboardView);
10392
10422
  if (context.isAddApp) {
10393
10423
  whiteboardView.callbacks.once("onSizeUpdated", ({ width: contentWidth, height: contentHeight }) => {
@@ -17016,7 +17046,7 @@ const _IframeBridge = class {
17016
17046
  this.allowAppliances = ["clicker"];
17017
17047
  this.bridgeDisposer = noop$2;
17018
17048
  this.rootRect = null;
17019
- this.sideEffectManager = new SideEffectManager();
17049
+ this.sideEffectManager = new SideEffectManager$1();
17020
17050
  this.execListenIframe = debounce((options) => {
17021
17051
  this.listenIframe(options);
17022
17052
  }, 50);
@@ -17476,13 +17506,13 @@ const _WindowManager = class extends InvisiblePlugin {
17476
17506
  constructor(context) {
17477
17507
  super(context);
17478
17508
  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" } };
17509
+ 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
17510
  this.emitter = callbacks$1;
17481
17511
  this.viewMode = ViewMode.Broadcaster;
17482
17512
  this.isReplay = isPlayer(this.displayer);
17483
17513
  this.containerSizeRatio = _WindowManager.containerSizeRatio;
17484
17514
  _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" } };
17515
+ 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
17516
  }
17487
17517
  static async mount(params) {
17488
17518
  const room = params.room;