@fluid-topics/ft-snap-scroll 2.1.18 → 2.1.20

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.
@@ -4,9 +4,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { html } from "lit";
8
- import { property, query, state } from "lit/decorators.js";
9
- import { Debouncer, FtLitElement, isSafari } from "@fluid-topics/ft-wc-utils";
7
+ import { html, } from "lit";
8
+ import { property, query, state, } from "lit/decorators.js";
9
+ import { Debouncer, FtLitElement, isSafari, } from "@fluid-topics/ft-wc-utils";
10
10
  import { FtButton } from "@fluid-topics/ft-button";
11
11
  import { classMap } from "lit/directives/class-map.js";
12
12
  import { styles } from "./ft-snap-scroll.styles";
@@ -40,7 +40,7 @@ export class FtSnapScroll extends FtLitElement {
40
40
  this.scrollToElement(this.elements[index]);
41
41
  }
42
42
  scrollIndexIntoView(index) {
43
- let element = this.elements[index];
43
+ const element = this.elements[index];
44
44
  if (element) {
45
45
  const endLimit = this.contentSlot[this.scrollAttribute] + this.contentSlot[this.sizeAttribute] - this.nextSize;
46
46
  const startLimit = this.contentSlot[this.scrollAttribute] + this.prevSize;
@@ -153,7 +153,7 @@ export class FtSnapScroll extends FtLitElement {
153
153
  }
154
154
  onSlotChange() {
155
155
  var _a, _b;
156
- this.elements = (_b = (_a = this.contentSlot) === null || _a === void 0 ? void 0 : _a.assignedElements().map(e => e)) !== null && _b !== void 0 ? _b : [];
156
+ this.elements = (_b = (_a = this.contentSlot) === null || _a === void 0 ? void 0 : _a.assignedElements().map((e) => e)) !== null && _b !== void 0 ? _b : [];
157
157
  this.scheduleUpdateScroll();
158
158
  }
159
159
  closestElementFromStart() {
@@ -187,7 +187,7 @@ export class FtSnapScroll extends FtLitElement {
187
187
  return this.elements[this.elements.length - 1];
188
188
  }
189
189
  get firstElementOffset() {
190
- let first = this.elements[0];
190
+ const first = this.elements[0];
191
191
  return first ? first[this.offsetAttribute] : 0;
192
192
  }
193
193
  get controlsSize() {