@decidables/detectable-elements 0.2.12 → 0.2.14

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.
@@ -193,15 +193,15 @@
193
193
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
194
194
  }
195
195
  _$Ev() {
196
- this._$Eg = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$ES(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
196
+ this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
197
197
  }
198
198
  addController(t) {
199
- (this._$E_ ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
199
+ (this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
200
200
  }
201
201
  removeController(t) {
202
- this._$E_?.delete(t);
202
+ this._$EO?.delete(t);
203
203
  }
204
- _$ES() {
204
+ _$E_() {
205
205
  const t = new Map(),
206
206
  s = this.constructor.elementProperties;
207
207
  for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
@@ -212,16 +212,16 @@
212
212
  return S$1(t, this.constructor.elementStyles), t;
213
213
  }
214
214
  connectedCallback() {
215
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$E_?.forEach(t => t.hostConnected?.());
215
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(t => t.hostConnected?.());
216
216
  }
217
217
  enableUpdating(t) {}
218
218
  disconnectedCallback() {
219
- this._$E_?.forEach(t => t.hostDisconnected?.());
219
+ this._$EO?.forEach(t => t.hostDisconnected?.());
220
220
  }
221
221
  attributeChangedCallback(t, s, i) {
222
222
  this._$AK(t, i);
223
223
  }
224
- _$EO(t, s) {
224
+ _$EC(t, s) {
225
225
  const i = this.constructor.elementProperties.get(t),
226
226
  e = this.constructor._$Eu(t, i);
227
227
  if (void 0 !== e && !0 === i.reflect) {
@@ -240,20 +240,20 @@
240
240
  this._$Em = e, this[e] = r.fromAttribute(s, t.type), this._$Em = null;
241
241
  }
242
242
  }
243
- requestUpdate(t, s, i, e = !1, r) {
243
+ requestUpdate(t, s, i) {
244
244
  if (void 0 !== t) {
245
- if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$1)(e ? r : this[t], s)) return;
246
- this.C(t, s, i);
245
+ if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$1)(this[t], s)) return;
246
+ this.P(t, s, i);
247
247
  }
248
- !1 === this.isUpdatePending && (this._$Eg = this._$EP());
248
+ !1 === this.isUpdatePending && (this._$ES = this._$ET());
249
249
  }
250
- C(t, s, i) {
250
+ P(t, s, i) {
251
251
  this._$AL.has(t) || this._$AL.set(t, s), !0 === i.reflect && this._$Em !== t && (this._$Ej ??= new Set()).add(t);
252
252
  }
253
- async _$EP() {
253
+ async _$ET() {
254
254
  this.isUpdatePending = !0;
255
255
  try {
256
- await this._$Eg;
256
+ await this._$ES;
257
257
  } catch (t) {
258
258
  Promise.reject(t);
259
259
  }
@@ -271,35 +271,35 @@
271
271
  this._$Ep = void 0;
272
272
  }
273
273
  const t = this.constructor.elementProperties;
274
- if (t.size > 0) for (const [s, i] of t) !0 !== i.wrapped || this._$AL.has(s) || void 0 === this[s] || this.C(s, this[s], i);
274
+ if (t.size > 0) for (const [s, i] of t) !0 !== i.wrapped || this._$AL.has(s) || void 0 === this[s] || this.P(s, this[s], i);
275
275
  }
276
276
  let t = !1;
277
277
  const s = this._$AL;
278
278
  try {
279
- t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$E_?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$ET();
279
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EU();
280
280
  } catch (s) {
281
- throw t = !1, this._$ET(), s;
281
+ throw t = !1, this._$EU(), s;
282
282
  }
283
283
  t && this._$AE(s);
284
284
  }
285
285
  willUpdate(t) {}
286
286
  _$AE(t) {
287
- this._$E_?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
287
+ this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
288
288
  }
289
- _$ET() {
289
+ _$EU() {
290
290
  this._$AL = new Map(), this.isUpdatePending = !1;
291
291
  }
292
292
  get updateComplete() {
293
293
  return this.getUpdateComplete();
294
294
  }
295
295
  getUpdateComplete() {
296
- return this._$Eg;
296
+ return this._$ES;
297
297
  }
298
298
  shouldUpdate(t) {
299
299
  return !0;
300
300
  }
301
301
  update(t) {
302
- this._$Ej &&= this._$Ej.forEach(t => this._$EO(t, this[t])), this._$ET();
302
+ this._$Ej &&= this._$Ej.forEach(t => this._$EC(t, this[t])), this._$EU();
303
303
  }
304
304
  updated(t) {}
305
305
  firstUpdated(t) {}
@@ -308,7 +308,7 @@
308
308
  mode: "open"
309
309
  }, b$1[d$1("elementProperties")] = new Map(), b$1[d$1("finalized")] = new Map(), p$1?.({
310
310
  ReactiveElement: b$1
311
- }), (a$1.reactiveElementVersions ??= []).push("2.0.2");
311
+ }), (a$1.reactiveElementVersions ??= []).push("2.0.4");
312
312
 
313
313
  /**
314
314
  * @license
@@ -321,7 +321,7 @@
321
321
  createHTML: t => t
322
322
  }) : void 0,
323
323
  e = "$lit$",
324
- h = `lit$${(Math.random() + "").slice(9)}$`,
324
+ h = `lit$${Math.random().toFixed(9).slice(2)}$`,
325
325
  o$1 = "?" + h,
326
326
  n = `<${o$1}>`,
327
327
  r$1 = document,
@@ -495,18 +495,18 @@
495
495
  return this._$AB;
496
496
  }
497
497
  _$AI(t, i = this) {
498
- t = N(this, t, i), c(t) ? t === T || null == t || "" === t ? (this._$AH !== T && this._$AR(), this._$AH = T) : t !== this._$AH && t !== w && this._(t) : void 0 !== t._$litType$ ? this.g(t) : void 0 !== t.nodeType ? this.$(t) : u(t) ? this.T(t) : this._(t);
498
+ t = N(this, t, i), c(t) ? t === T || null == t || "" === t ? (this._$AH !== T && this._$AR(), this._$AH = T) : t !== this._$AH && t !== w && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : u(t) ? this.k(t) : this._(t);
499
499
  }
500
- k(t) {
500
+ S(t) {
501
501
  return this._$AA.parentNode.insertBefore(t, this._$AB);
502
502
  }
503
- $(t) {
504
- this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
503
+ T(t) {
504
+ this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
505
505
  }
506
506
  _(t) {
507
- this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r$1.createTextNode(t)), this._$AH = t;
507
+ this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$1.createTextNode(t)), this._$AH = t;
508
508
  }
509
- g(t) {
509
+ $(t) {
510
510
  const {
511
511
  values: i,
512
512
  _$litType$: s
@@ -515,19 +515,19 @@
515
515
  if (this._$AH?._$AD === e) this._$AH.p(i);else {
516
516
  const t = new S(e, this),
517
517
  s = t.u(this.options);
518
- t.p(i), this.$(s), this._$AH = t;
518
+ t.p(i), this.T(s), this._$AH = t;
519
519
  }
520
520
  }
521
521
  _$AC(t) {
522
522
  let i = A.get(t.strings);
523
523
  return void 0 === i && A.set(t.strings, i = new V(t)), i;
524
524
  }
525
- T(t) {
525
+ k(t) {
526
526
  a(this._$AH) || (this._$AH = [], this._$AR());
527
527
  const i = this._$AH;
528
528
  let s,
529
529
  e = 0;
530
- for (const h of t) e === i.length ? i.push(s = new M(this.k(l()), this.k(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
530
+ for (const h of t) e === i.length ? i.push(s = new M(this.S(l()), this.S(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
531
531
  e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
532
532
  }
533
533
  _$AR(t = this._$AA.nextSibling, i) {
@@ -558,9 +558,9 @@
558
558
  let n, r;
559
559
  for (t = h[0], n = 0; n < h.length - 1; n++) r = N(this, e[s + n], i, n), r === w && (r = this._$AH[n]), o ||= !c(r) || r !== this._$AH[n], r === T ? t = T : t !== T && (t += (r ?? "") + h[n + 1]), this._$AH[n] = r;
560
560
  }
561
- o && !e && this.O(t);
561
+ o && !e && this.j(t);
562
562
  }
563
- O(t) {
563
+ j(t) {
564
564
  t === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
565
565
  }
566
566
  }
@@ -568,7 +568,7 @@
568
568
  constructor() {
569
569
  super(...arguments), this.type = 3;
570
570
  }
571
- O(t) {
571
+ j(t) {
572
572
  this.element[this.name] = t === T ? void 0 : t;
573
573
  }
574
574
  }
@@ -576,7 +576,7 @@
576
576
  constructor() {
577
577
  super(...arguments), this.type = 4;
578
578
  }
579
- O(t) {
579
+ j(t) {
580
580
  this.element.toggleAttribute(this.name, !!t && t !== T);
581
581
  }
582
582
  }
@@ -607,7 +607,7 @@
607
607
  }
608
608
  }
609
609
  const Z = t.litHtmlPolyfillSupport;
610
- Z?.(V, M), (t.litHtmlVersions ??= []).push("3.1.0");
610
+ Z?.(V, M), (t.litHtmlVersions ??= []).push("3.1.3");
611
611
  const j = (t, i, s) => {
612
612
  const e = s?.renderBefore ?? i;
613
613
  let h = e._$litPart$;
@@ -654,7 +654,7 @@
654
654
  r?.({
655
655
  LitElement: s
656
656
  });
657
- (globalThis.litElementVersions ??= []).push("4.0.2");
657
+ (globalThis.litElementVersions ??= []).push("4.0.5");
658
658
 
659
659
  function ascending$2(a, b) {
660
660
  return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
@@ -725,19 +725,12 @@
725
725
 
726
726
  function count(values, valueof) {
727
727
  let count = 0;
728
- if (valueof === undefined) {
728
+ {
729
729
  for (let value of values) {
730
730
  if (value != null && (value = +value) >= value) {
731
731
  ++count;
732
732
  }
733
733
  }
734
- } else {
735
- let index = -1;
736
- for (let value of values) {
737
- if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {
738
- ++count;
739
- }
740
- }
741
734
  }
742
735
  return count;
743
736
  }
@@ -3151,7 +3144,6 @@
3151
3144
  function interval (callback, delay, time) {
3152
3145
  var t = new Timer(),
3153
3146
  total = delay;
3154
- if (delay == null) return t.restart(callback, delay, time), t;
3155
3147
  t._restart = t.restart;
3156
3148
  t.restart = function (callback, delay, time) {
3157
3149
  delay = +delay, time = time == null ? now() : +time;
@@ -6682,9 +6674,9 @@
6682
6674
  <slot></slot>
6683
6675
  </label>
6684
6676
  <div class="range">
6685
- <input type="range" id="slider" min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
6677
+ <input ?disabled=${this.disabled} type="range" id="slider" min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @change=${this.changed.bind(this)} @input=${this.inputted.bind(this)}>
6686
6678
  </div>
6687
- <decidables-spinner min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
6679
+ <decidables-spinner ?disabled=${this.disabled} min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
6688
6680
  `;
6689
6681
  }
6690
6682
  }
@@ -6987,12 +6979,13 @@
6987
6979
  box-shadow: var(---shadow-4);
6988
6980
  }
6989
6981
 
6990
- /* stylelint-disable-next-line selector-max-compound-selectors */
6982
+ /* stylelint-disable selector-max-compound-selectors */
6991
6983
  :host(.keyboard) input[type=checkbox]:enabled:focus + label + label:active::after,
6992
6984
  :host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {
6993
6985
  box-shadow: var(---shadow-8);
6994
6986
  }
6995
- `];
6987
+ /* stylelint-enable selector-max-compound-selectors */
6988
+ `];
6996
6989
  }
6997
6990
  render() {
6998
6991
  return x$1`