@netless/app-slide 0.0.35 → 0.0.36

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
@@ -35542,7 +35542,7 @@ cs.get.hsl = function(string) {
35542
35542
  if (!string) {
35543
35543
  return null;
35544
35544
  }
35545
- var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?[\d\.]+)\s*)?\)$/;
35545
+ var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
35546
35546
  var match = string.match(hsl);
35547
35547
  if (match) {
35548
35548
  var alpha = parseFloat(match[4]);
@@ -35558,7 +35558,7 @@ cs.get.hwb = function(string) {
35558
35558
  if (!string) {
35559
35559
  return null;
35560
35560
  }
35561
- var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/;
35561
+ var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/;
35562
35562
  var match = string.match(hwb);
35563
35563
  if (match) {
35564
35564
  var alpha = parseFloat(match[4]);
@@ -37116,6 +37116,7 @@ class SlidePreviewer {
37116
37116
  constructor(config) {
37117
37117
  this.slide = null;
37118
37118
  this.debug = false;
37119
+ this.sideEffect = new o();
37119
37120
  this.ready = false;
37120
37121
  this.readyPromise = new Promise((resolve) => {
37121
37122
  this.resolveReady = () => {
@@ -37165,6 +37166,22 @@ class SlidePreviewer {
37165
37166
  }
37166
37167
  render() {
37167
37168
  this.viewer.$content.appendChild(this.renderSlideContainer());
37169
+ this.sideEffect.addEventListener(window, "keydown", (ev) => {
37170
+ if (this.slide) {
37171
+ switch (ev.key) {
37172
+ case "ArrowUp":
37173
+ case "ArrowLeft": {
37174
+ this.slide.prevStep();
37175
+ break;
37176
+ }
37177
+ case "ArrowRight":
37178
+ case "ArrowDown": {
37179
+ this.slide.nextStep();
37180
+ break;
37181
+ }
37182
+ }
37183
+ }
37184
+ });
37168
37185
  }
37169
37186
  mount(taskId, url) {
37170
37187
  this.target.appendChild(this.renderStyle());
@@ -37207,6 +37224,7 @@ class SlidePreviewer {
37207
37224
  this.readyPromise.then(this.refreshPages);
37208
37225
  }
37209
37226
  destroy() {
37227
+ this.sideEffect.flushAll();
37210
37228
  if (this.slide && !this.destroyed) {
37211
37229
  log("[Slide] destroy slide (once)");
37212
37230
  this.slide.destroy();