@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 CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.2.14](https://github.com/decidables/decidables/compare/@decidables/detectable-elements@0.2.13...@decidables/detectable-elements@0.2.14) (2025-01-17)
7
+
8
+ **Note:** Version bump only for package @decidables/detectable-elements
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.2.13](https://github.com/decidables/decidables/compare/@decidables/detectable-elements@0.2.12...@decidables/detectable-elements@0.2.13) (2024-05-04)
15
+
16
+ **Note:** Version bump only for package @decidables/detectable-elements
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.2.12](https://github.com/decidables/decidables/compare/@decidables/detectable-elements@0.2.11...@decidables/detectable-elements@0.2.12) (2024-01-27)
7
23
 
8
24
  **Note:** Version bump only for package @decidables/detectable-elements
package/README.md CHANGED
@@ -1249,9 +1249,10 @@ Used to build specialized examples illustrating the implications of unequal vari
1249
1249
  include controls, ROC space, and a visual rendering of signal detection theory. The SDT model and
1250
1250
  ROC space can be interactive.
1251
1251
 
1252
- **Note:** Unequal variance can be included in other examples, such as `<detectable-example-interactive>` as
1253
- well. This example is for a particular bespoke illustration, and illustrates the highly specialized
1254
- demonstrations that are possible by composing the various elements.
1252
+ **Note:** Unequal variance can be included in other examples, such as
1253
+ `<detectable-example-interactive>` as well. This example is for a particular bespoke illustration,
1254
+ and illustrates the highly specialized demonstrations that are possible by composing the various
1255
+ elements.
1255
1256
 
1256
1257
  ##### Slots
1257
1258
 
@@ -187,15 +187,15 @@ let b$1 = class b extends HTMLElement {
187
187
  super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
188
188
  }
189
189
  _$Ev() {
190
- this._$Eg = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$ES(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
190
+ this._$ES = new Promise(t => this.enableUpdating = t), this._$AL = new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(t => t(this));
191
191
  }
192
192
  addController(t) {
193
- (this._$E_ ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
193
+ (this._$EO ??= new Set()).add(t), void 0 !== this.renderRoot && this.isConnected && t.hostConnected?.();
194
194
  }
195
195
  removeController(t) {
196
- this._$E_?.delete(t);
196
+ this._$EO?.delete(t);
197
197
  }
198
- _$ES() {
198
+ _$E_() {
199
199
  const t = new Map(),
200
200
  s = this.constructor.elementProperties;
201
201
  for (const i of s.keys()) this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
@@ -206,16 +206,16 @@ let b$1 = class b extends HTMLElement {
206
206
  return S$1(t, this.constructor.elementStyles), t;
207
207
  }
208
208
  connectedCallback() {
209
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$E_?.forEach(t => t.hostConnected?.());
209
+ this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(t => t.hostConnected?.());
210
210
  }
211
211
  enableUpdating(t) {}
212
212
  disconnectedCallback() {
213
- this._$E_?.forEach(t => t.hostDisconnected?.());
213
+ this._$EO?.forEach(t => t.hostDisconnected?.());
214
214
  }
215
215
  attributeChangedCallback(t, s, i) {
216
216
  this._$AK(t, i);
217
217
  }
218
- _$EO(t, s) {
218
+ _$EC(t, s) {
219
219
  const i = this.constructor.elementProperties.get(t),
220
220
  e = this.constructor._$Eu(t, i);
221
221
  if (void 0 !== e && !0 === i.reflect) {
@@ -234,20 +234,20 @@ let b$1 = class b extends HTMLElement {
234
234
  this._$Em = e, this[e] = r.fromAttribute(s, t.type), this._$Em = null;
235
235
  }
236
236
  }
237
- requestUpdate(t, s, i, e = !1, r) {
237
+ requestUpdate(t, s, i) {
238
238
  if (void 0 !== t) {
239
- if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$1)(e ? r : this[t], s)) return;
240
- this.C(t, s, i);
239
+ if (i ??= this.constructor.getPropertyOptions(t), !(i.hasChanged ?? f$1)(this[t], s)) return;
240
+ this.P(t, s, i);
241
241
  }
242
- !1 === this.isUpdatePending && (this._$Eg = this._$EP());
242
+ !1 === this.isUpdatePending && (this._$ES = this._$ET());
243
243
  }
244
- C(t, s, i) {
244
+ P(t, s, i) {
245
245
  this._$AL.has(t) || this._$AL.set(t, s), !0 === i.reflect && this._$Em !== t && (this._$Ej ??= new Set()).add(t);
246
246
  }
247
- async _$EP() {
247
+ async _$ET() {
248
248
  this.isUpdatePending = !0;
249
249
  try {
250
- await this._$Eg;
250
+ await this._$ES;
251
251
  } catch (t) {
252
252
  Promise.reject(t);
253
253
  }
@@ -265,35 +265,35 @@ let b$1 = class b extends HTMLElement {
265
265
  this._$Ep = void 0;
266
266
  }
267
267
  const t = this.constructor.elementProperties;
268
- 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);
268
+ 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);
269
269
  }
270
270
  let t = !1;
271
271
  const s = this._$AL;
272
272
  try {
273
- t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$E_?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$ET();
273
+ t = this.shouldUpdate(s), t ? (this.willUpdate(s), this._$EO?.forEach(t => t.hostUpdate?.()), this.update(s)) : this._$EU();
274
274
  } catch (s) {
275
- throw t = !1, this._$ET(), s;
275
+ throw t = !1, this._$EU(), s;
276
276
  }
277
277
  t && this._$AE(s);
278
278
  }
279
279
  willUpdate(t) {}
280
280
  _$AE(t) {
281
- this._$E_?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
281
+ this._$EO?.forEach(t => t.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
282
282
  }
283
- _$ET() {
283
+ _$EU() {
284
284
  this._$AL = new Map(), this.isUpdatePending = !1;
285
285
  }
286
286
  get updateComplete() {
287
287
  return this.getUpdateComplete();
288
288
  }
289
289
  getUpdateComplete() {
290
- return this._$Eg;
290
+ return this._$ES;
291
291
  }
292
292
  shouldUpdate(t) {
293
293
  return !0;
294
294
  }
295
295
  update(t) {
296
- this._$Ej &&= this._$Ej.forEach(t => this._$EO(t, this[t])), this._$ET();
296
+ this._$Ej &&= this._$Ej.forEach(t => this._$EC(t, this[t])), this._$EU();
297
297
  }
298
298
  updated(t) {}
299
299
  firstUpdated(t) {}
@@ -302,7 +302,7 @@ b$1.elementStyles = [], b$1.shadowRootOptions = {
302
302
  mode: "open"
303
303
  }, b$1[d$1("elementProperties")] = new Map(), b$1[d$1("finalized")] = new Map(), p$1?.({
304
304
  ReactiveElement: b$1
305
- }), (a$1.reactiveElementVersions ??= []).push("2.0.2");
305
+ }), (a$1.reactiveElementVersions ??= []).push("2.0.4");
306
306
 
307
307
  /**
308
308
  * @license
@@ -315,7 +315,7 @@ const t = globalThis,
315
315
  createHTML: t => t
316
316
  }) : void 0,
317
317
  e = "$lit$",
318
- h = `lit$${(Math.random() + "").slice(9)}$`,
318
+ h = `lit$${Math.random().toFixed(9).slice(2)}$`,
319
319
  o$1 = "?" + h,
320
320
  n = `<${o$1}>`,
321
321
  r$1 = document,
@@ -489,18 +489,18 @@ class M {
489
489
  return this._$AB;
490
490
  }
491
491
  _$AI(t, i = this) {
492
- 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);
492
+ 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);
493
493
  }
494
- k(t) {
494
+ S(t) {
495
495
  return this._$AA.parentNode.insertBefore(t, this._$AB);
496
496
  }
497
- $(t) {
498
- this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
497
+ T(t) {
498
+ this._$AH !== t && (this._$AR(), this._$AH = this.S(t));
499
499
  }
500
500
  _(t) {
501
- this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.$(r$1.createTextNode(t)), this._$AH = t;
501
+ this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$1.createTextNode(t)), this._$AH = t;
502
502
  }
503
- g(t) {
503
+ $(t) {
504
504
  const {
505
505
  values: i,
506
506
  _$litType$: s
@@ -509,19 +509,19 @@ class M {
509
509
  if (this._$AH?._$AD === e) this._$AH.p(i);else {
510
510
  const t = new S(e, this),
511
511
  s = t.u(this.options);
512
- t.p(i), this.$(s), this._$AH = t;
512
+ t.p(i), this.T(s), this._$AH = t;
513
513
  }
514
514
  }
515
515
  _$AC(t) {
516
516
  let i = A.get(t.strings);
517
517
  return void 0 === i && A.set(t.strings, i = new V(t)), i;
518
518
  }
519
- T(t) {
519
+ k(t) {
520
520
  a(this._$AH) || (this._$AH = [], this._$AR());
521
521
  const i = this._$AH;
522
522
  let s,
523
523
  e = 0;
524
- 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++;
524
+ 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++;
525
525
  e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
526
526
  }
527
527
  _$AR(t = this._$AA.nextSibling, i) {
@@ -552,9 +552,9 @@ class R {
552
552
  let n, r;
553
553
  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;
554
554
  }
555
- o && !e && this.O(t);
555
+ o && !e && this.j(t);
556
556
  }
557
- O(t) {
557
+ j(t) {
558
558
  t === T ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
559
559
  }
560
560
  }
@@ -562,7 +562,7 @@ class k extends R {
562
562
  constructor() {
563
563
  super(...arguments), this.type = 3;
564
564
  }
565
- O(t) {
565
+ j(t) {
566
566
  this.element[this.name] = t === T ? void 0 : t;
567
567
  }
568
568
  }
@@ -570,7 +570,7 @@ class H extends R {
570
570
  constructor() {
571
571
  super(...arguments), this.type = 4;
572
572
  }
573
- O(t) {
573
+ j(t) {
574
574
  this.element.toggleAttribute(this.name, !!t && t !== T);
575
575
  }
576
576
  }
@@ -601,7 +601,7 @@ class L {
601
601
  }
602
602
  }
603
603
  const Z = t.litHtmlPolyfillSupport;
604
- Z?.(V, M), (t.litHtmlVersions ??= []).push("3.1.0");
604
+ Z?.(V, M), (t.litHtmlVersions ??= []).push("3.1.3");
605
605
  const j = (t, i, s) => {
606
606
  const e = s?.renderBefore ?? i;
607
607
  let h = e._$litPart$;
@@ -648,7 +648,7 @@ const r = globalThis.litElementPolyfillSupport;
648
648
  r?.({
649
649
  LitElement: s
650
650
  });
651
- (globalThis.litElementVersions ??= []).push("4.0.2");
651
+ (globalThis.litElementVersions ??= []).push("4.0.5");
652
652
 
653
653
  function ascending$2(a, b) {
654
654
  return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
@@ -719,19 +719,12 @@ bisector(number$2).center;
719
719
 
720
720
  function count(values, valueof) {
721
721
  let count = 0;
722
- if (valueof === undefined) {
722
+ {
723
723
  for (let value of values) {
724
724
  if (value != null && (value = +value) >= value) {
725
725
  ++count;
726
726
  }
727
727
  }
728
- } else {
729
- let index = -1;
730
- for (let value of values) {
731
- if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {
732
- ++count;
733
- }
734
- }
735
728
  }
736
729
  return count;
737
730
  }
@@ -3145,7 +3138,6 @@ function timeout (callback, delay, time) {
3145
3138
  function interval (callback, delay, time) {
3146
3139
  var t = new Timer(),
3147
3140
  total = delay;
3148
- if (delay == null) return t.restart(callback, delay, time), t;
3149
3141
  t._restart = t.restart;
3150
3142
  t.restart = function (callback, delay, time) {
3151
3143
  delay = +delay, time = time == null ? now() : +time;
@@ -6676,9 +6668,9 @@ class DecidablesSlider extends DecidablesElement {
6676
6668
  <slot></slot>
6677
6669
  </label>
6678
6670
  <div class="range">
6679
- <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)}>
6671
+ <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)}>
6680
6672
  </div>
6681
- <decidables-spinner min=${o(this.min)} max=${o(this.max)} step=${o(this.step)} .value=${this.value} @input=${this.inputted.bind(this)}></decidables-spinner>
6673
+ <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>
6682
6674
  `;
6683
6675
  }
6684
6676
  }
@@ -6981,12 +6973,13 @@ class DecidablesSwitch extends DecidablesElement {
6981
6973
  box-shadow: var(---shadow-4);
6982
6974
  }
6983
6975
 
6984
- /* stylelint-disable-next-line selector-max-compound-selectors */
6976
+ /* stylelint-disable selector-max-compound-selectors */
6985
6977
  :host(.keyboard) input[type=checkbox]:enabled:focus + label + label:active::after,
6986
6978
  :host(.keyboard) input[type=checkbox]:enabled:focus:active + label + label::after {
6987
6979
  box-shadow: var(---shadow-8);
6988
6980
  }
6989
- `];
6981
+ /* stylelint-enable selector-max-compound-selectors */
6982
+ `];
6990
6983
  }
6991
6984
  render() {
6992
6985
  return x$1`