@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.
- package/CHANGELOG.md +16 -0
- package/README.md +4 -3
- package/lib/detectableElements.esm.js +44 -51
- package/lib/detectableElements.esm.js.map +1 -1
- package/lib/detectableElements.esm.min.js +9 -8
- package/lib/detectableElements.esm.min.js.map +1 -1
- package/lib/detectableElements.umd.js +44 -51
- package/lib/detectableElements.umd.js.map +1 -1
- package/lib/detectableElements.umd.min.js +10 -9
- package/lib/detectableElements.umd.min.js.map +1 -1
- package/package.json +7 -7
|
@@ -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._$
|
|
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._$
|
|
199
|
+
(this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
|
|
200
200
|
}
|
|
201
201
|
removeController(t) {
|
|
202
|
-
this._$
|
|
202
|
+
this._$EO?.delete(t);
|
|
203
203
|
}
|
|
204
|
-
_$
|
|
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._$
|
|
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._$
|
|
219
|
+
this._$EO?.forEach(t => t.hostDisconnected?.());
|
|
220
220
|
}
|
|
221
221
|
attributeChangedCallback(t, s, i) {
|
|
222
222
|
this._$AK(t, i);
|
|
223
223
|
}
|
|
224
|
-
_$
|
|
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
|
|
243
|
+
requestUpdate(t, s, i) {
|
|
244
244
|
if (void 0 !== t) {
|
|
245
|
-
if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$1)(
|
|
246
|
-
this.
|
|
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._$
|
|
248
|
+
!1 === this.isUpdatePending && (this._$ES = this._$ET());
|
|
249
249
|
}
|
|
250
|
-
|
|
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 _$
|
|
253
|
+
async _$ET() {
|
|
254
254
|
this.isUpdatePending = !0;
|
|
255
255
|
try {
|
|
256
|
-
await this._$
|
|
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.
|
|
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._$
|
|
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._$
|
|
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._$
|
|
287
|
+
this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
288
288
|
}
|
|
289
|
-
_$
|
|
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._$
|
|
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._$
|
|
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.
|
|
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$${
|
|
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
|
|
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
|
-
|
|
500
|
+
S(t) {
|
|
501
501
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
502
502
|
}
|
|
503
|
-
|
|
504
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.
|
|
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
|
|
507
|
+
this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$1.createTextNode(t)), this._$AH = t;
|
|
508
508
|
}
|
|
509
|
-
|
|
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
|
|
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
|
-
|
|
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.
|
|
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.
|
|
561
|
+
o && !e && this.j(t);
|
|
562
562
|
}
|
|
563
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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
|
|
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`
|