@decidables/discountable-elements 0.6.4 → 0.6.5

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.
@@ -12170,9 +12170,9 @@
12170
12170
  }
12171
12171
  update(t, [i]) {
12172
12172
  const s = void 0 === this.u;
12173
- return s && (this.u = t.options?.host, this.u.addController(this), this.u.updateComplete.then(t => this.t = true), this.element = t.element, j.set(this.element, this)), this.optionsOrCallback = i, (s || "function" != typeof i) && this.p(i), this.render(i);
12173
+ return s && (this.u = t.options?.host, this.u.addController(this), this.u.updateComplete.then(t => this.t = true), this.element = t.element, j.set(this.element, this)), this.optionsOrCallback = i, (s || "function" != typeof i) && this.m(i), this.render(i);
12174
12174
  }
12175
- p(t) {
12175
+ m(t) {
12176
12176
  t = t ?? {};
12177
12177
  const i = this.getController();
12178
12178
  void 0 !== i && ((t = {
@@ -12183,7 +12183,7 @@
12183
12183
  ...t.keyframeOptions
12184
12184
  }), t.properties ??= b, this.options = t;
12185
12185
  }
12186
- m() {
12186
+ p() {
12187
12187
  const t = {},
12188
12188
  i = this.element.getBoundingClientRect(),
12189
12189
  s = getComputedStyle(this.element);
@@ -12204,20 +12204,20 @@
12204
12204
  })(t, this._)), this.h = this.t && !this.isDisabled() && !this.isAnimating() && i && this.element.isConnected, this.h && (this._ = Array.isArray(t) ? Array.from(t) : t), this.h;
12205
12205
  }
12206
12206
  hostUpdate() {
12207
- "function" == typeof this.optionsOrCallback && this.p(this.optionsOrCallback()), this.v() && (this.A = this.m(), this.i = this.i ?? this.element.parentNode, this.o = this.element.nextSibling);
12207
+ "function" == typeof this.optionsOrCallback && this.m(this.optionsOrCallback()), this.v() && (this.A = this.p(), this.i = this.i ?? this.element.parentNode, this.o = this.element.nextSibling);
12208
12208
  }
12209
12209
  async hostUpdated() {
12210
12210
  if (!this.h || !this.element.isConnected || this.options.skipInitial && !this.isHostRendered) return;
12211
12211
  let t;
12212
12212
  this.prepare(), await a;
12213
- const i = this.O(),
12214
- s = this.j(this.options.keyframeOptions, i),
12215
- e = this.m();
12213
+ const i = this.P(),
12214
+ s = this.V(this.options.keyframeOptions, i),
12215
+ e = this.p();
12216
12216
  if (void 0 !== this.A) {
12217
12217
  const {
12218
12218
  from: s,
12219
12219
  to: h
12220
- } = this.N(this.A, e, i);
12220
+ } = this.O(this.A, e, i);
12221
12221
  this.log("measured", [this.A, e, s, h]), t = this.calculateKeyframes(s, h);
12222
12222
  } else {
12223
12223
  const s = r.get(this.options.inId);
@@ -12226,7 +12226,7 @@
12226
12226
  const {
12227
12227
  from: h,
12228
12228
  to: n
12229
- } = this.N(s, e, i);
12229
+ } = this.O(s, e, i);
12230
12230
  t = this.calculateKeyframes(h, n), t = this.options.in ? [{
12231
12231
  ...this.options.in[0],
12232
12232
  ...t[0]
@@ -12236,10 +12236,10 @@
12236
12236
  this.animate(t, s);
12237
12237
  }
12238
12238
  resetStyles() {
12239
- void 0 !== this.P && (this.element.setAttribute("style", this.P ?? ""), this.P = void 0);
12239
+ void 0 !== this.j && (this.element.setAttribute("style", this.j ?? ""), this.j = void 0);
12240
12240
  }
12241
12241
  commitStyles() {
12242
- this.P = this.element.getAttribute("style"), this.webAnimation?.commitStyles(), this.webAnimation?.cancel();
12242
+ this.j = this.element.getAttribute("style"), this.webAnimation?.commitStyles(), this.webAnimation?.cancel();
12243
12243
  }
12244
12244
  reconnected() {}
12245
12245
  async disconnected() {
@@ -12248,14 +12248,14 @@
12248
12248
  if (this.prepare(), await a(), this.i?.isConnected) {
12249
12249
  const t = this.o && this.o.parentNode === this.i ? this.o : null;
12250
12250
  if (this.i.insertBefore(this.element, t), this.options.stabilizeOut) {
12251
- const t = this.m();
12251
+ const t = this.p();
12252
12252
  this.log("stabilizing out");
12253
12253
  const i = this.A.left - t.left,
12254
12254
  s = this.A.top - t.top;
12255
12255
  !("static" === getComputedStyle(this.element).position) || 0 === i && 0 === s || (this.element.style.position = "relative"), 0 !== i && (this.element.style.left = i + "px"), 0 !== s && (this.element.style.top = s + "px");
12256
12256
  }
12257
12257
  }
12258
- const t = this.j(this.options.keyframeOptions);
12258
+ const t = this.V(this.options.keyframeOptions);
12259
12259
  await this.animate(this.options.out, t), this.element.remove();
12260
12260
  }
12261
12261
  prepare() {
@@ -12267,7 +12267,7 @@
12267
12267
  didFinish(t) {
12268
12268
  t && this.options.onComplete?.(this), this.A = void 0, this.animatingProperties = void 0, this.frames = void 0, this.resolveFinished();
12269
12269
  }
12270
- O() {
12270
+ P() {
12271
12271
  const t = [];
12272
12272
  for (let i = this.element.parentNode; i; i = i?.parentNode) {
12273
12273
  const s = j.get(i);
@@ -12281,13 +12281,13 @@
12281
12281
  n.add(this.u);
12282
12282
  }), t;
12283
12283
  }
12284
- j(t, i = this.O()) {
12284
+ V(t, i = this.P()) {
12285
12285
  const s = {
12286
12286
  ...A
12287
12287
  };
12288
12288
  return i.forEach(t => Object.assign(s, t.options.keyframeOptions)), Object.assign(s, t), s;
12289
12289
  }
12290
- N(t, i, s) {
12290
+ O(t, i, s) {
12291
12291
  t = {
12292
12292
  ...t
12293
12293
  }, i = {
@@ -13062,7 +13062,7 @@
13062
13062
  transform: translateY(0);
13063
13063
  }
13064
13064
 
13065
- :host(.keyboard) .option .body.interactive:has(~ .point:focus-within) {
13065
+ :host(.keyboard) .body.interactive:has(~ .point:focus-within) {
13066
13066
  filter: url("#shadow-8");
13067
13067
 
13068
13068
  /* HACK: This gets Safari to correctly apply the filter! */