@netless/app-slide 0.1.3 → 0.1.4

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/main.es.js CHANGED
@@ -36563,11 +36563,22 @@ class Logger {
36563
36563
  this.apps = {};
36564
36564
  this.level = "debug";
36565
36565
  this._onMessage = (ev) => {
36566
- if (isObj(ev.data)) {
36567
- if (typeof ev.data.slide === "boolean") {
36568
- this.enable = ev.data.slide;
36569
- } else if (ev.data.slide === "__instance") {
36566
+ let data;
36567
+ if (ev instanceof CustomEvent) {
36568
+ data = ev.detail;
36569
+ } else if (isObj(ev.data)) {
36570
+ data = ev.data;
36571
+ }
36572
+ if (data) {
36573
+ if (typeof data.slide === "boolean") {
36574
+ this.enable = data.slide;
36575
+ } else if (data.slide === "__instance") {
36570
36576
  console.log(this);
36577
+ } else if (data.slide === "__debug") {
36578
+ Object.values(this.apps).forEach((app) => {
36579
+ var _a, _b;
36580
+ (_b = (_a = app.controller) == null ? void 0 : _a.slide) == null ? void 0 : _b.createController();
36581
+ });
36571
36582
  }
36572
36583
  }
36573
36584
  };
@@ -36864,7 +36875,7 @@ class SlideController {
36864
36875
  return this.slide.slideState.currentSlideIndex;
36865
36876
  }
36866
36877
  createSlide(anchor) {
36867
- var _a, _b;
36878
+ var _a, _b, _c, _d, _e, _f;
36868
36879
  const slide = new Slide.Slide({
36869
36880
  anchor,
36870
36881
  interactive: true,
@@ -36873,12 +36884,12 @@ class SlideController {
36873
36884
  controller: logger.enable,
36874
36885
  enableGlobalClick: true,
36875
36886
  renderOptions: {
36876
- minFPS: 25,
36877
- maxFPS: 30,
36887
+ minFPS: ((_a = this.context.getAppOptions()) == null ? void 0 : _a.minFPS) || 25,
36888
+ maxFPS: ((_b = this.context.getAppOptions()) == null ? void 0 : _b.maxFPS) || 30,
36878
36889
  autoFPS: true,
36879
- autoResolution: true,
36880
- resolution: (_a = this.context.getAppOptions()) == null ? void 0 : _a.resolution,
36881
- transactionBgColor: ((_b = this.context.getAppOptions()) == null ? void 0 : _b.bgColor) || cachedGetBgColor(anchor)
36890
+ autoResolution: (_d = (_c = this.context.getAppOptions()) == null ? void 0 : _c.autoResolution) != null ? _d : true,
36891
+ resolution: (_e = this.context.getAppOptions()) == null ? void 0 : _e.resolution,
36892
+ transactionBgColor: ((_f = this.context.getAppOptions()) == null ? void 0 : _f.bgColor) || cachedGetBgColor(anchor)
36882
36893
  },
36883
36894
  timestamp: this.timestamp
36884
36895
  });
@@ -38234,7 +38245,7 @@ class SlidePreviewer {
38234
38245
  return `${this.namespace}-${className}`;
38235
38246
  }
38236
38247
  }
38237
- const version = "0.1.3";
38248
+ const version = "0.1.4";
38238
38249
  const SlideApp = {
38239
38250
  kind: "Slide",
38240
38251
  setup(context) {