@mintplayer/web-components 2.16.0 → 2.18.0

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.
Files changed (120) hide show
  1. package/accordion/index.mjs +5 -5
  2. package/calendar/index.mjs +1 -1
  3. package/carousel/index.mjs +57 -143
  4. package/charts/core/index.mjs +30 -20
  5. package/charts/core/src/attributes.d.ts +18 -0
  6. package/charts/core/src/index.d.ts +2 -0
  7. package/charts/core/src/view-window.d.ts +46 -0
  8. package/charts/hierarchy/index.mjs +245 -256
  9. package/charts/hierarchy/src/components/mp-hierarchy-chart.d.ts +1 -3
  10. package/charts/sparkline/index.mjs +27 -26
  11. package/charts/trend/index.mjs +21 -20
  12. package/checkbox/index.mjs +1 -1
  13. package/checkbox/src/components/mp-checkbox.d.ts +1 -0
  14. package/chunks/attributes-L3eKsbdy.mjs +16 -0
  15. package/chunks/color-mode-warning-71FmlzWX.mjs +13 -0
  16. package/chunks/{form-check.styles-B0pxJ6YC.mjs → form-check.styles-DqvBnspm.mjs} +24 -3
  17. package/chunks/{mp-calendar.element-CJ8-t-Zn.mjs → mp-calendar.element-BIHS9SZZ.mjs} +11 -6
  18. package/chunks/{mp-checkbox-CzwS7Y_t.mjs → mp-checkbox-zV83gILn.mjs} +44 -36
  19. package/chunks/{mp-datatable-B7st6G-I.mjs → mp-datatable-CEpSxlkd.mjs} +660 -357
  20. package/chunks/{mp-datetime-picker.element-DsWA1AFs.mjs → mp-datetime-picker.element-Cxu5-qRE.mjs} +29 -32
  21. package/chunks/{mp-pagination-Dea75mD4.mjs → mp-pagination-hGy4dL7p.mjs} +9 -4
  22. package/chunks/{mp-radio-cL46sUA0.mjs → mp-radio-BhRVNdKp.mjs} +32 -28
  23. package/chunks/{mp-select-BNrbPwN4.mjs → mp-select-CgqYFvUj.mjs} +41 -26
  24. package/chunks/{mp-splitter-Ckn1kN4v.mjs → mp-splitter-DLehrw3Y.mjs} +144 -120
  25. package/chunks/{mp-timepicker.element-CwaAAOcm.mjs → mp-timepicker.element-BiB9lkgc.mjs} +58 -45
  26. package/chunks/{mp-toggle-button-eo_aTQtu.mjs → mp-toggle-button-CaS9uYLE.mjs} +26 -24
  27. package/chunks/{mp-treeview-C8iltDbq.mjs → mp-treeview-CaMTDrvY.mjs} +51 -50
  28. package/chunks/{overlay-controller-DifgO6jT.mjs → overlay-controller-BHDagokg.mjs} +96 -92
  29. package/chunks/{id-DNZVAnGC.mjs → resource.service--lqLwEqk.mjs} +144 -206
  30. package/chunks/view-window-DGvFiDnW.mjs +263 -0
  31. package/code-snippet/index.mjs +70 -66
  32. package/code-snippet/src/hljs-loaders.generated.d.ts +1 -1
  33. package/custom-elements.json +66193 -0
  34. package/datatable/index.mjs +1 -1
  35. package/datatable/src/components/column-resize.d.ts +11 -0
  36. package/datatable/src/components/index.d.ts +1 -1
  37. package/datatable/src/components/mp-datatable.d.ts +264 -20
  38. package/datatable/src/index.d.ts +1 -1
  39. package/datatable/src/types/labels.d.ts +11 -0
  40. package/datepicker/index.mjs +10 -9
  41. package/datetime-picker/index.mjs +1 -1
  42. package/datetime-picker/src/mp-datetime-picker.element.d.ts +3 -0
  43. package/dock/index.mjs +430 -463
  44. package/dock/src/components/mint-dock-manager.element.d.ts +25 -2
  45. package/dock/src/core/resize.d.ts +60 -0
  46. package/dropdown-menu/index.mjs +4 -2
  47. package/dropdown-menu/src/components/mp-dropdown-menu.d.ts +6 -1
  48. package/dropdown-menu/src/index.d.ts +1 -1
  49. package/dropdown-menu/src/types/dropdown.d.ts +14 -1
  50. package/dropdown-menu/src/types/index.d.ts +1 -1
  51. package/file-manager/index.mjs +63 -61
  52. package/file-manager/src/components/mp-file-manager.d.ts +4 -3
  53. package/multi-range/index.mjs +56 -50
  54. package/multi-range/src/mint-multi-range.element.d.ts +4 -10
  55. package/multi-range/src/pointer-geometry.d.ts +31 -0
  56. package/navbar/index.mjs +89 -439
  57. package/overlay/index.mjs +1 -1
  58. package/overlay/src/overlay-controller.d.ts +0 -14
  59. package/overlay/src/placement.d.ts +48 -0
  60. package/package.json +7 -1
  61. package/pagination/index.mjs +1 -1
  62. package/phone-input/index.mjs +44 -40
  63. package/phone-input/src/components/stack.d.ts +8 -0
  64. package/query-builder/index.mjs +418 -466
  65. package/query-builder/src/dnd/drag-controller.d.ts +12 -8
  66. package/query-builder/src/mp-query-builder.element.d.ts +5 -1
  67. package/query-builder/src/mp-query-condition.element.d.ts +1 -0
  68. package/radio/index.mjs +1 -1
  69. package/radio-group/index.mjs +1 -1
  70. package/ribbon/index.mjs +477 -498
  71. package/ribbon/src/core/band-text-color.d.ts +10 -0
  72. package/ribbon/src/core/key-tip-allocator.d.ts +10 -0
  73. package/ribbon/src/core/plan-reduce-steps.d.ts +62 -0
  74. package/ribbon/src/mp-ribbon.element.d.ts +0 -27
  75. package/scheduler/index.mjs +726 -711
  76. package/scheduler/src/components/mp-scheduler.d.ts +19 -3
  77. package/scheduler/src/drag/drag-manager.d.ts +1 -9
  78. package/scheduler/src/input/input-handler.d.ts +12 -2
  79. package/scheduler/src/utils/geometry.d.ts +39 -0
  80. package/scheduler/src/views/timeline-view.d.ts +0 -1
  81. package/scheduler-core/index.mjs +84 -71
  82. package/scheduler-core/src/services/resource.service.d.ts +0 -12
  83. package/scheduler-core/src/services/timeline.service.d.ts +0 -9
  84. package/select/index.mjs +1 -1
  85. package/select/src/components/mp-select.d.ts +1 -0
  86. package/signature-pad/index.mjs +21 -23
  87. package/signature-pad/src/canvas-point.d.ts +26 -0
  88. package/signature-pad/src/mp-signature-pad.element.d.ts +1 -7
  89. package/splitter/index.mjs +1 -1
  90. package/splitter/src/components/mp-splitter.d.ts +16 -0
  91. package/splitter/src/managers/index.d.ts +1 -0
  92. package/splitter/src/managers/rescale-panel-sizes.d.ts +14 -0
  93. package/swiper-core/index.mjs +2 -2
  94. package/theming/bs-theme-preboot.js +1 -0
  95. package/theming/color-mode.css +36 -0
  96. package/theming/index.d.ts +1 -0
  97. package/theming/index.mjs +327 -0
  98. package/theming/src/components/mp-theme-toggle.d.ts +71 -0
  99. package/theming/src/cookie.d.ts +31 -0
  100. package/theming/src/index.d.ts +5 -0
  101. package/theming/src/preboot.d.ts +1 -0
  102. package/theming/src/resolve.d.ts +36 -0
  103. package/theming/src/store.d.ts +27 -0
  104. package/theming/src/styles/theme-toggle.styles.d.ts +2 -0
  105. package/theming/src/testing/fake-broadcast-channel.d.ts +35 -0
  106. package/theming/src/toggle-modes.d.ts +23 -0
  107. package/tile-manager/index.mjs +252 -211
  108. package/tile-manager/src/components/mint-tile-manager.element.d.ts +8 -0
  109. package/tile-manager/src/utils/grid-geometry.d.ts +49 -0
  110. package/timeline/index.mjs +156 -164
  111. package/timeline/src/components/mp-timeline.d.ts +41 -7
  112. package/timepicker/index.mjs +7 -4
  113. package/timepicker/src/mp-time-list.element.d.ts +26 -0
  114. package/timepicker/src/mp-timepicker.element.d.ts +3 -0
  115. package/toggle-button/index.mjs +1 -1
  116. package/tree-select/index.mjs +21 -9
  117. package/treeview/index.mjs +1 -1
  118. package/treeview/src/components/mp-treeview.d.ts +6 -4
  119. package/chunks/color-DIeST-IS.mjs +0 -224
  120. package/query-builder/src/mp-query-condition.element.template.d.ts +0 -2
@@ -131,11 +131,6 @@ const h = b(`.accordion {
131
131
  border-radius: 0;
132
132
  }
133
133
 
134
- [data-bs-theme=dark] .accordion-button::after {
135
- --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='rgb%2843.0588235294%, 65.8823529412%, 99.5294117647%%29'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e");
136
- --bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='rgb%2843.0588235294%, 65.8823529412%, 99.5294117647%%29'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e");
137
- }
138
-
139
134
  :host {
140
135
  display: block;
141
136
  --bs-accordion-color: var(--bs-body-color);
@@ -204,6 +199,11 @@ summary.accordion-button::after {
204
199
  -webkit-mask-size: var(--bs-accordion-btn-icon-width);
205
200
  }
206
201
 
202
+ @media (forced-colors: active) {
203
+ summary.accordion-button::after {
204
+ background-color: CanvasText;
205
+ }
206
+ }
207
207
  details[open] > summary.accordion-button {
208
208
  color: var(--bs-accordion-active-color);
209
209
  background-color: var(--bs-accordion-active-bg);
@@ -1,4 +1,4 @@
1
- import { M as r } from "../chunks/mp-calendar.element-CJ8-t-Zn.mjs";
1
+ import { M as r } from "../chunks/mp-calendar.element-BIHS9SZZ.mjs";
2
2
  export {
3
3
  r as MpCalendarElement
4
4
  };
@@ -1,16 +1,14 @@
1
- import { unsafeCSS as p, LitElement as f, adoptStyles as m, nothing as l, html as c } from "lit";
1
+ import { unsafeCSS as p, LitElement as f, adoptStyles as g, nothing as l, html as c } from "lit";
2
2
  import { map as h } from "lit/directives/map.js";
3
3
  import { range as u } from "lit/directives/range.js";
4
- import { unsafeHTML as g } from "lit/directives/unsafe-html.js";
4
+ import { unsafeHTML as m } from "lit/directives/unsafe-html.js";
5
5
  import { keyToIntent as v, IndexMachine as b, PointerArbiter as y } from "../swiper-core/index.mjs";
6
6
  import "lit/directives/ref.js";
7
7
  import { i as x } from "../chunks/inert-regions-DXCnn1LN.mjs";
8
- const w = p(`.carousel {
9
- position: relative;
10
- }
11
-
12
- .carousel.pointer-event {
13
- touch-action: pan-y;
8
+ const w = p(`:host {
9
+ --bs-carousel-indicator-active-bg: #fff;
10
+ --bs-carousel-caption-color: #fff;
11
+ --bs-carousel-control-icon-filter: ;
14
12
  }
15
13
 
16
14
  .carousel-inner {
@@ -18,65 +16,11 @@ const w = p(`.carousel {
18
16
  width: 100%;
19
17
  overflow: hidden;
20
18
  }
21
- .carousel-inner::after {
22
- display: block;
23
- clear: both;
24
- content: "";
25
- }
26
19
 
27
20
  .carousel-item {
28
21
  position: relative;
29
- display: none;
30
- float: left;
31
22
  width: 100%;
32
- margin-right: -100%;
33
23
  backface-visibility: hidden;
34
- transition: transform 0.6s ease-in-out;
35
- }
36
- @media (prefers-reduced-motion: reduce) {
37
- .carousel-item {
38
- transition: none;
39
- }
40
- }
41
-
42
- .carousel-item.active,
43
- .carousel-item-next,
44
- .carousel-item-prev {
45
- display: block;
46
- }
47
-
48
- .carousel-item-next:not(.carousel-item-start),
49
- .active.carousel-item-end {
50
- transform: translateX(100%);
51
- }
52
-
53
- .carousel-item-prev:not(.carousel-item-end),
54
- .active.carousel-item-start {
55
- transform: translateX(-100%);
56
- }
57
-
58
- .carousel-fade .carousel-item {
59
- opacity: 0;
60
- transition-property: opacity;
61
- transform: none;
62
- }
63
- .carousel-fade .carousel-item.active,
64
- .carousel-fade .carousel-item-next.carousel-item-start,
65
- .carousel-fade .carousel-item-prev.carousel-item-end {
66
- z-index: 1;
67
- opacity: 1;
68
- }
69
- .carousel-fade .active.carousel-item-start,
70
- .carousel-fade .active.carousel-item-end {
71
- z-index: 0;
72
- opacity: 0;
73
- transition: opacity 0s 0.6s;
74
- }
75
- @media (prefers-reduced-motion: reduce) {
76
- .carousel-fade .active.carousel-item-start,
77
- .carousel-fade .active.carousel-item-end {
78
- transition: none;
79
- }
80
24
  }
81
25
 
82
26
  .carousel-control-prev,
@@ -132,11 +76,11 @@ const w = p(`.carousel {
132
76
  }
133
77
 
134
78
  .carousel-control-prev-icon {
135
- background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0'/%3e%3c/svg%3e") /*rtl:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e")*/;
79
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0'/%3e%3c/svg%3e");
136
80
  }
137
81
 
138
82
  .carousel-control-next-icon {
139
- background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e") /*rtl:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0'/%3e%3c/svg%3e")*/;
83
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708'/%3e%3c/svg%3e");
140
84
  }
141
85
 
142
86
  .carousel-indicators {
@@ -179,36 +123,6 @@ const w = p(`.carousel {
179
123
  opacity: 1;
180
124
  }
181
125
 
182
- .carousel-caption {
183
- position: absolute;
184
- right: 15%;
185
- bottom: 1.25rem;
186
- left: 15%;
187
- padding-top: 1.25rem;
188
- padding-bottom: 1.25rem;
189
- color: var(--bs-carousel-caption-color);
190
- text-align: center;
191
- }
192
-
193
- .carousel-dark {
194
- --bs-carousel-indicator-active-bg: #000;
195
- --bs-carousel-caption-color: #000;
196
- --bs-carousel-control-icon-filter: invert(1) grayscale(100);
197
- }
198
-
199
- :root,
200
- [data-bs-theme=light] {
201
- --bs-carousel-indicator-active-bg: #fff;
202
- --bs-carousel-caption-color: #fff;
203
- --bs-carousel-control-icon-filter: ;
204
- }
205
-
206
- [data-bs-theme=dark] {
207
- --bs-carousel-indicator-active-bg: #000;
208
- --bs-carousel-caption-color: #000;
209
- --bs-carousel-control-icon-filter: invert(1) grayscale(100);
210
- }
211
-
212
126
  :host,
213
127
  *,
214
128
  *::before,
@@ -492,9 +406,9 @@ class k extends f {
492
406
  this.#r(), this.requestUpdate();
493
407
  }, this.#A = !1, this.#E = !1, this.#T = () => {
494
408
  this.#A = !0, this.#r();
495
- }, this.#q = () => {
496
- this.#A = !1, this.#r();
497
409
  }, this.#P = () => {
410
+ this.#A = !1, this.#r();
411
+ }, this.#U = () => {
498
412
  this.#E = !0, this.#r();
499
413
  }, this.#N = (t) => {
500
414
  const e = t.relatedTarget;
@@ -511,7 +425,7 @@ class k extends f {
511
425
  }, this.#G = () => {
512
426
  this.#a?.abort(), this.#t?.goto(this.#i, { animate: !1 }), this.#o && (this.#o = !1, this.#h());
513
427
  }, this.#J = (t) => {
514
- if (t.target !== t.currentTarget || !this.#B) return;
428
+ if (t.target !== t.currentTarget || !this.#H) return;
515
429
  const e = v(t.key, this.#c);
516
430
  e && (t.preventDefault(), this.#t?.intent(e));
517
431
  }, this.#Q = (t) => {
@@ -553,32 +467,32 @@ class k extends f {
553
467
  createRenderRoot() {
554
468
  if (this.shadowRoot) {
555
469
  const e = [...this.shadowRoot.querySelectorAll(".car-radio")].findIndex((i) => i.checked);
556
- return e > 0 && (this.#v = e), this.shadowRoot.replaceChildren(), m(this.shadowRoot, this.constructor.elementStyles ?? []), this.shadowRoot;
470
+ return e > 0 && (this.#v = e), this.shadowRoot.replaceChildren(), g(this.shadowRoot, this.constructor.elementStyles ?? []), this.shadowRoot;
557
471
  }
558
472
  return super.createRenderRoot();
559
473
  }
560
474
  connectedCallback() {
561
- super.connectedCallback(), this.setAttribute("data-js", ""), this.hasAttribute("role") || this.setAttribute("role", "region"), this.hasAttribute("aria-roledescription") || this.setAttribute("aria-roledescription", "carousel"), typeof window < "u" && window.matchMedia && !this.#n && (this.#n = window.matchMedia("(prefers-reduced-motion: reduce)")), this.#n?.addEventListener("change", this.#I), this.addEventListener("pointerenter", this.#T), this.addEventListener("pointerleave", this.#q), this.addEventListener("focusin", this.#P), this.addEventListener("focusout", this.#N), this.hasUpdated && (this.#O(), this.#L(), this.#r());
475
+ super.connectedCallback(), this.setAttribute("data-js", ""), this.hasAttribute("role") || this.setAttribute("role", "region"), this.hasAttribute("aria-roledescription") || this.setAttribute("aria-roledescription", "carousel"), typeof window < "u" && window.matchMedia && !this.#n && (this.#n = window.matchMedia("(prefers-reduced-motion: reduce)")), this.#n?.addEventListener("change", this.#I), this.addEventListener("pointerenter", this.#T), this.addEventListener("pointerleave", this.#P), this.addEventListener("focusin", this.#U), this.addEventListener("focusout", this.#N), this.hasUpdated && (this.#O(), this.#L(), this.#r(), this.#C());
562
476
  }
563
477
  disconnectedCallback() {
564
- super.disconnectedCallback(), this.#n?.removeEventListener("change", this.#I), this.removeEventListener("pointerenter", this.#T), this.removeEventListener("pointerleave", this.#q), this.removeEventListener("focusin", this.#P), this.removeEventListener("focusout", this.#N), this.#d?.disconnect(), this.#u?.disconnect(), this.#a?.abort(), this.#F(), this.#o && (this.#o = !1, this.#l.resume()), this.#l.dispose();
478
+ super.disconnectedCallback(), this.#n?.removeEventListener("change", this.#I), this.removeEventListener("pointerenter", this.#T), this.removeEventListener("pointerleave", this.#P), this.removeEventListener("focusin", this.#U), this.removeEventListener("focusout", this.#N), this.#d?.disconnect(), this.#u?.disconnect(), this.#a?.abort(), this.#X(), this.#o && (this.#o = !1, this.#l.resume()), this.#l.dispose();
565
479
  }
566
480
  firstUpdated() {
567
481
  this.#_(), this.#O(), this.#L();
568
482
  const t = this.#v;
569
- this.#v = null, t !== null && t < this.#e.length ? this.#t?.goto(t, { animate: !1 }) : this.#m(this.#i), this.#r();
570
- const e = this.#M;
483
+ this.#v = null, t !== null && t < this.#e.length ? this.#t?.goto(t, { animate: !1 }) : this.#g(this.#i), this.#r();
484
+ const e = this.#R;
571
485
  e && (e.addEventListener("touchstart", this.#Y, { passive: !0 }), e.addEventListener("touchmove", this.#W, { passive: !1 }), e.addEventListener("touchend", this.#K, { passive: !1 }), e.addEventListener("touchcancel", this.#G, { passive: !0 }));
572
486
  }
573
487
  updated() {
574
- this.#U();
488
+ this.#C();
575
489
  }
576
490
  /**
577
491
  * Declare the complete hidden set: every non-active slide cell plus both
578
492
  * wrap-clone cells. Complete-set semantics (never deltas) means an
579
493
  * interrupted transition cannot leave a stale inert behind.
580
494
  */
581
- #U() {
495
+ #C() {
582
496
  if (!this.hasAttribute("data-js")) return;
583
497
  const t = this.renderRoot;
584
498
  if (!t) return;
@@ -589,19 +503,19 @@ class k extends f {
589
503
  }
590
504
  /** Re-declare from the committed index, then lift the suspension. */
591
505
  #h() {
592
- this.#U(), this.#l.resume();
506
+ this.#C(), this.#l.resume();
593
507
  }
594
508
  attributeChangedCallback(t, e, i) {
595
509
  if (super.attributeChangedCallback(t, e, i), e !== i)
596
510
  switch (t) {
597
511
  case "orientation":
598
- this.#a?.setOrientation(this.#c), this.#f(), this.#m(this.#i), this.requestUpdate();
512
+ this.#a?.setOrientation(this.#c), this.#f(), this.#g(this.#i), this.requestUpdate();
599
513
  break;
600
514
  case "animation":
601
- this.#t?.setConfig({ durationMs: this.#H }), this.#f(), this.#m(this.#i), this.requestUpdate();
515
+ this.#t?.setConfig({ durationMs: this.#B }), this.#f(), this.#g(this.#i), this.requestUpdate();
602
516
  break;
603
517
  case "wrap":
604
- this.#t?.setConfig({ wrap: this.#C });
518
+ this.#t?.setConfig({ wrap: this.#S });
605
519
  break;
606
520
  case "interval":
607
521
  this.#r(), this.requestUpdate();
@@ -637,10 +551,10 @@ class k extends f {
637
551
  get #c() {
638
552
  return this.getAttribute("orientation") === "vertical" ? "vertical" : "horizontal";
639
553
  }
640
- get #C() {
554
+ get #S() {
641
555
  return this.getAttribute("wrap") !== "false";
642
556
  }
643
- get #B() {
557
+ get #H() {
644
558
  return this.getAttribute("keyboard-events") !== "false";
645
559
  }
646
560
  get interval() {
@@ -676,22 +590,22 @@ class k extends f {
676
590
  #_() {
677
591
  this.#t || (this.#t = new b(
678
592
  {
679
- applyOffsetRatio: (t) => this.#m(t),
593
+ applyOffsetRatio: (t) => this.#g(t),
680
594
  runTransition: (t, e, i, s) => this.#tt(t, e, i, s)
681
595
  },
682
596
  {
683
597
  onIndexChange: (t) => this.#st(t),
684
598
  onAnimationStart: () => {
685
- this.#S?.setAttribute("aria-busy", "true"), this.#j("animation-start", void 0);
599
+ this.#M?.setAttribute("aria-busy", "true"), this.#j("animation-start", void 0);
686
600
  },
687
601
  onAnimationEnd: () => {
688
- this.#S?.removeAttribute("aria-busy"), this.#j("animation-end", void 0);
602
+ this.#M?.removeAttribute("aria-busy"), this.#j("animation-end", void 0);
689
603
  }
690
604
  },
691
605
  {
692
606
  count: this.#e.length,
693
- wrap: this.#C,
694
- durationMs: this.#H,
607
+ wrap: this.#S,
608
+ durationMs: this.#B,
695
609
  minimumOffsetPx: 50,
696
610
  prefersReducedMotion: () => this.#n?.matches ?? !1
697
611
  }
@@ -704,17 +618,17 @@ class k extends f {
704
618
  }
705
619
  ));
706
620
  }
707
- get #H() {
621
+ get #B() {
708
622
  return this.#w === "none" ? 0 : 500;
709
623
  }
710
624
  /** Drag/transform distance for one slide, in px. */
711
625
  #D() {
712
- return this.#c === "horizontal" ? this.#S?.clientWidth ?? 0 : this.#y;
626
+ return this.#c === "horizontal" ? this.#M?.clientWidth ?? 0 : this.#y;
713
627
  }
714
- get #S() {
628
+ get #M() {
715
629
  return this.renderRoot?.querySelector(".carousel-inner") ?? null;
716
630
  }
717
- get #M() {
631
+ get #R() {
718
632
  return this.renderRoot?.querySelector(".carousel-track") ?? null;
719
633
  }
720
634
  // ---- slides -----------------------------------------------------------------
@@ -735,12 +649,12 @@ class k extends f {
735
649
  if (!(t.length !== this.#e.length || t.some((i, s) => i !== this.#e[s])) && !this.#s) {
736
650
  t.forEach((i, s) => {
737
651
  i.getAttribute("slot") !== `s${s}` && i.setAttribute("slot", `s${s}`);
738
- });
652
+ }), this.requestUpdate();
739
653
  return;
740
654
  }
741
- this.#t?.interrupt(), this.#g(), this.#e = t, t.forEach((i, s) => i.setAttribute("slot", `s${s}`)), this.#u?.disconnect(), this.#b = new Map(t.map((i) => [i, i.offsetHeight || 0])), t.forEach((i) => this.#u?.observe(i)), this.#f(), t.forEach((i, s) => {
655
+ this.#t?.interrupt(), this.#m(), this.#e = t, t.forEach((i, s) => i.setAttribute("slot", `s${s}`)), this.#u?.disconnect(), this.#b = new Map(t.map((i) => [i, i.offsetHeight || 0])), t.forEach((i) => this.#u?.observe(i)), this.#f(), t.forEach((i, s) => {
742
656
  (i instanceof HTMLImageElement ? i : i.querySelector("img"))?.setAttribute("fetchpriority", s === 0 ? "high" : "low");
743
- }), this.#t?.setConfig({ count: t.length }), this.#i >= t.length && (this.#i = Math.max(0, t.length - 1)), this.requestUpdate(), this.updateComplete.then(() => this.#m(this.#t?.getIndex() ?? this.#i));
657
+ }), this.#t?.setConfig({ count: t.length }), this.#i >= t.length && (this.#i = Math.max(0, t.length - 1)), this.requestUpdate(), this.updateComplete.then(() => this.#g(this.#t?.getIndex() ?? this.#i));
744
658
  }
745
659
  #f() {
746
660
  const t = this.#e.map((a) => this.#b.get(a) ?? 0), e = t.length ? Math.max(...t) : 0, i = t[this.#i] ?? e;
@@ -754,33 +668,33 @@ class k extends f {
754
668
  * outside [0, N-1] during a wrap). Physical mapping: the wrap-before cell
755
669
  * occupies position 0, so physical = ratio + 1.
756
670
  */
757
- #m(t) {
758
- const e = this.#M;
671
+ #g(t) {
672
+ const e = this.#R;
759
673
  if (e) {
760
674
  if (this.#w === "fade") {
761
- e.style.transform = "", Number.isInteger(t) && this.#z(this.#X(t));
675
+ e.style.transform = "", Number.isInteger(t) && this.#q(this.#F(t));
762
676
  return;
763
677
  }
764
- this.#it(t), e.style.transform = this.#R(t);
678
+ this.#it(t), e.style.transform = this.#z(t);
765
679
  }
766
680
  }
767
- #R(t) {
681
+ #z(t) {
768
682
  const e = t + 1;
769
683
  return this.#c === "horizontal" ? `translate3d(${-e * 100}%, 0, 0)` : `translate3d(0, ${-e * this.#y}px, 0)`;
770
684
  }
771
- #X(t) {
685
+ #F(t) {
772
686
  const e = this.#e.length;
773
687
  return e > 0 ? (t % e + e) % e : 0;
774
688
  }
775
689
  /** Visual `.active` (fade opacity target) — managed imperatively, not bound. */
776
- #z(t) {
690
+ #q(t) {
777
691
  this.renderRoot?.querySelectorAll(".carousel-item[data-i]").forEach((e) => {
778
692
  e.classList.toggle("active", Number(e.dataset.i) === t);
779
693
  });
780
694
  }
781
695
  #tt(t, e, i, s) {
782
696
  if (this.#w === "fade") {
783
- this.#l.suspend(), this.#z(this.#X(e));
697
+ this.#l.suspend(), this.#q(this.#F(e));
784
698
  let r = setTimeout(() => {
785
699
  r = null, s(), this.#h();
786
700
  }, i);
@@ -793,22 +707,22 @@ class k extends f {
793
707
  }
794
708
  };
795
709
  }
796
- const a = this.#M;
710
+ const a = this.#R;
797
711
  if (!a)
798
712
  return s(), { finish: () => {
799
713
  }, cancel: () => {
800
714
  } };
801
715
  if (this.#l.suspend(), this.#et(e), typeof a.animate != "function")
802
- return this.#g(), s(), this.#h(), { finish: () => {
716
+ return this.#m(), s(), this.#h(), { finish: () => {
803
717
  }, cancel: () => {
804
718
  } };
805
719
  const o = a.animate(
806
- [{ transform: this.#R(t) }, { transform: this.#R(e) }],
720
+ [{ transform: this.#z(t) }, { transform: this.#z(e) }],
807
721
  { duration: i, easing: "ease", fill: "forwards" }
808
722
  );
809
723
  let n = !1;
810
724
  const d = (r) => {
811
- n || (n = !0, o.cancel(), this.#g(), r && s(), this.#h());
725
+ n || (n = !0, o.cancel(), this.#m(), r && s(), this.#h());
812
726
  };
813
727
  return o.onfinish = () => d(!0), {
814
728
  finish: () => d(!0),
@@ -823,17 +737,17 @@ class k extends f {
823
737
  /** During a live drag past the deck's edges, keep the wrap cell populated. */
824
738
  #it(t) {
825
739
  const e = this.#e.length;
826
- e < 2 || !this.#C || (t > e - 1 ? this.#k(this.#e[0], "wrapA") : t < 0 ? this.#k(this.#e[e - 1], "wrapB") : this.#s && Number.isInteger(t) && this.#g());
740
+ e < 2 || !this.#S || (t > e - 1 ? this.#k(this.#e[0], "wrapA") : t < 0 ? this.#k(this.#e[e - 1], "wrapB") : this.#s && Number.isInteger(t) && this.#m());
827
741
  }
828
742
  #k(t, e) {
829
- !t || this.#s?.el === t || (this.#g(), this.#s = { el: t, home: t.getAttribute("slot") ?? "" }, t.setAttribute("slot", e));
743
+ !t || this.#s?.el === t || (this.#m(), this.#s = { el: t, home: t.getAttribute("slot") ?? "" }, t.setAttribute("slot", e));
830
744
  }
831
- #g() {
745
+ #m() {
832
746
  this.#s && (this.#s.el.setAttribute("slot", this.#s.home), this.#s = null);
833
747
  }
834
748
  // ---- state sync -----------------------------------------------------------
835
749
  #st(t) {
836
- this.#i = t, this.renderRoot?.querySelectorAll(".car-radio")?.forEach((i, s) => i.checked = s === t), this.#w !== "fade" && this.#z(t), this.#f(), this.requestUpdate(), this.#j("slide-change", { index: t });
750
+ this.#i = t, this.renderRoot?.querySelectorAll(".car-radio")?.forEach((i, s) => i.checked = s === t), this.#w !== "fade" && this.#q(t), this.#f(), this.requestUpdate(), this.#j("slide-change", { index: t });
837
751
  }
838
752
  /** Single write path for `paused` + its event (programmatic writes stay silent). */
839
753
  #$(t, e = !0) {
@@ -841,17 +755,17 @@ class k extends f {
841
755
  }
842
756
  #I;
843
757
  #r() {
844
- this.#F();
758
+ this.#X();
845
759
  const t = this.interval;
846
760
  t > 0 && !this.paused && !this.#A && !this.#E && !(this.#n?.matches ?? !1) && this.isConnected && (this.#p = setInterval(() => this.next(), t));
847
761
  }
848
762
  #A;
849
763
  #E;
850
764
  #T;
851
- #q;
852
765
  #P;
766
+ #U;
853
767
  #N;
854
- #F() {
768
+ #X() {
855
769
  this.#p !== null && (clearInterval(this.#p), this.#p = null);
856
770
  }
857
771
  /**
@@ -894,7 +808,7 @@ class k extends f {
894
808
  render() {
895
809
  const t = this.#e.length || Number(this.getAttribute("slide-count")) || 0, e = this.#i, i = this.interval, s = this.hasAttribute("data-js"), a = i > 0 || s && this.querySelector('[slot="play-pause"]') !== null;
896
810
  return c`
897
- ${g(`<style>${this.#at(t)}</style>`)}
811
+ ${m(`<style>${this.#at(t)}</style>`)}
898
812
  ${a ? c`
899
813
  <div class="carousel-play-pause" part="play-pause">
900
814
  <slot name="play-pause">
@@ -928,7 +842,7 @@ class k extends f {
928
842
  tabindex=${s ? "0" : l}
929
843
  aria-live=${s ? this.#ot : l}
930
844
  aria-atomic=${s ? "false" : l}
931
- aria-keyshortcuts=${s && this.#B ? this.#c === "horizontal" ? "ArrowLeft ArrowRight Home End" : "ArrowUp ArrowDown Home End" : l}
845
+ aria-keyshortcuts=${s && this.#H ? this.#c === "horizontal" ? "ArrowLeft ArrowRight Home End" : "ArrowUp ArrowDown Home End" : l}
932
846
  @keydown=${this.#J}
933
847
  >
934
848
  <div class="carousel-track" part="track">
@@ -1,23 +1,33 @@
1
- import { a as e, b as t, c as r, d as i, e as o, f as l, g as c, h as n, l as f, p as m, i as p, r as u, j as b, s as L, k as T } from "../../chunks/color-DIeST-IS.mjs";
2
- import { l as x, n as d, a as k, t as v } from "../../chunks/scale-B0bRUdc7.mjs";
1
+ import { F as s, a as t, b as o, c as r, d as i, e as c, f as l, g as n, h as b, i as m, l as p, p as u, j as f, k as T, m as L, n as x, r as A, o as h, s as F, q as V, z as d } from "../../chunks/view-window-DGvFiDnW.mjs";
2
+ import { l as v, n as w, a as y, t as D } from "../../chunks/scale-B0bRUdc7.mjs";
3
+ import { b as j, n as q, o as z } from "../../chunks/attributes-L3eKsbdy.mjs";
3
4
  export {
4
- e as arcLabelTransform,
5
- t as arcPath,
5
+ s as FITTED_VIEW,
6
+ t as arcLabelTransform,
7
+ o as arcPath,
8
+ j as booleanAttribute,
6
9
  r as buildIndex,
7
- i as colorScale,
8
- o as composite,
9
- l as contrastText,
10
- c as fitArcLabel,
11
- n as fitCellLabel,
12
- f as levelOf,
13
- x as linearScale,
14
- d as niceDomain,
15
- k as niceTicks,
16
- m as partitionLayout,
17
- p as pathTo,
18
- u as relativeLuminance,
19
- b as resolveFocus,
20
- L as squarifyLayout,
21
- T as subtreeDepth,
22
- v as timeTicks
10
+ i as clampViewOffset,
11
+ c as colorScale,
12
+ l as composite,
13
+ n as contrastText,
14
+ b as fitArcLabel,
15
+ m as fitCellLabel,
16
+ p as levelOf,
17
+ v as linearScale,
18
+ w as niceDomain,
19
+ y as niceTicks,
20
+ q as numberAttribute,
21
+ z as optionalNumberAttribute,
22
+ u as panView,
23
+ f as partitionLayout,
24
+ T as pathTo,
25
+ L as pointFraction,
26
+ x as projectRect,
27
+ A as relativeLuminance,
28
+ h as resolveFocus,
29
+ F as squarifyLayout,
30
+ V as subtreeDepth,
31
+ D as timeTicks,
32
+ d as zoomViewAt
23
33
  };
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Attribute parsing shared by the chart elements' `attributeChangedCallback`s.
3
+ *
4
+ * Each arm used to restate its own `Number(newValue ?? d)` / `!== 'false' &&
5
+ * !== null`, and two failure modes followed: an unparseable number reached the
6
+ * setter as `NaN` (a `y-min="auto"` typo turned the axis into NaN), and a
7
+ * default-ON flag read "attribute removed" as OFF, so clearing a framework
8
+ * binding disabled the feature instead of restoring it.
9
+ */
10
+ /** A numeric attribute: removed (`null`) or unparseable falls back to `fallback`. */
11
+ export declare function numberAttribute(value: string | null, fallback: number): number;
12
+ /** An optional numeric attribute: removed or unparseable reads as `undefined` (unset). */
13
+ export declare function optionalNumberAttribute(value: string | null): number | undefined;
14
+ /**
15
+ * A boolean attribute with a default: removed restores `defaultValue`, the
16
+ * literal "false" switches it off, any other value (including `""`) switches it on.
17
+ */
18
+ export declare function booleanAttribute(value: string | null, defaultValue: boolean): boolean;
@@ -4,3 +4,5 @@ export * from './arc';
4
4
  export * from './label-fit';
5
5
  export * from './scale';
6
6
  export * from './color';
7
+ export * from './view-window';
8
+ export * from './attributes';
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Geometric view window over normalized content coordinates ([0, 1] on both
3
+ * axes). `zoom` is the magnification (1 = fitted); `x`/`y` are the content
4
+ * coordinates of the window's top-left corner. Pure number-in/number-out, so
5
+ * the pointer and pinch maths is testable without a layout box.
6
+ */
7
+ export interface ViewWindow {
8
+ zoom: number;
9
+ x: number;
10
+ y: number;
11
+ }
12
+ export declare const FITTED_VIEW: ViewWindow;
13
+ /** Keep the window inside the content: an offset in [0, 1 - 1/zoom]. */
14
+ export declare function clampViewOffset(value: number, zoom: number): number;
15
+ /**
16
+ * Re-zoom around an anchor given as a fraction of the visible chart: the
17
+ * content point under the anchor stays under the anchor. The zoom is clamped
18
+ * to [1, maxZoom]; a non-numeric zoom resolves to 1.
19
+ */
20
+ export declare function zoomViewAt(view: ViewWindow, zoom: number, anchorX: number, anchorY: number, maxZoom: number): ViewWindow;
21
+ /**
22
+ * Pan by fractions of the visible chart (drag / two-finger move): content
23
+ * follows the pointer, so a positive delta moves the window backwards. A
24
+ * fitted view has nothing to pan and is returned unchanged.
25
+ */
26
+ export declare function panView(view: ViewWindow, dxFraction: number, dyFraction: number): ViewWindow;
27
+ /** Map a normalized content rect through the window to visible-chart fractions. */
28
+ export declare function projectRect(view: ViewWindow, x0: number, y0: number, x1: number, y1: number): {
29
+ x0: number;
30
+ y0: number;
31
+ x1: number;
32
+ y1: number;
33
+ };
34
+ /**
35
+ * A client point as clamped fractions of a box. A box without area (not laid
36
+ * out, or detached) has no meaningful fraction, so the centre is returned.
37
+ */
38
+ export declare function pointFraction(box: {
39
+ left: number;
40
+ top: number;
41
+ width: number;
42
+ height: number;
43
+ } | undefined, clientX: number, clientY: number): {
44
+ x: number;
45
+ y: number;
46
+ };