@mintplayer/web-components 2.13.0 → 2.15.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 (54) hide show
  1. package/README.md +15 -0
  2. package/badge/src/styles/badge.styles.d.ts +2 -0
  3. package/chunks/install-light-styles-DbCAGFOC.mjs +209 -0
  4. package/chunks/{mp-datatable-GmKqaN8y.mjs → mp-datatable-UJI8E73X.mjs} +484 -476
  5. package/chunks/{mp-splitter-LszuRDbR.mjs → mp-splitter-Ckn1kN4v.mjs} +33 -19
  6. package/chunks/{mp-treeview-tkWu28iF.mjs → mp-treeview-C8iltDbq.mjs} +61 -63
  7. package/datatable/index.mjs +2 -2
  8. package/datatable/src/components/mp-datatable.d.ts +9 -1
  9. package/datatable/src/index.d.ts +1 -1
  10. package/datatable/src/styles/datatable.light.styles.d.ts +2 -0
  11. package/datatable/src/styles/index.d.ts +1 -1
  12. package/dock/index.mjs +917 -921
  13. package/dock/src/components/mint-dock-manager.element.d.ts +16 -42
  14. package/dock/src/core/geometry.d.ts +36 -0
  15. package/dock/src/core/index.d.ts +6 -0
  16. package/dock/src/core/intersection-sizing.d.ts +83 -0
  17. package/dock/src/core/layout-tree.d.ts +105 -0
  18. package/dock/src/core/resize.d.ts +83 -0
  19. package/dock/src/core/sizes.d.ts +31 -0
  20. package/dock/src/core/types.d.ts +58 -0
  21. package/file-manager/index.mjs +31 -30
  22. package/file-manager/src/components/mp-file-manager.d.ts +2 -0
  23. package/light-dom/index.d.ts +1 -0
  24. package/light-dom/index.mjs +11 -0
  25. package/light-dom/src/index.d.ts +2 -0
  26. package/light-dom/src/install-light-styles.d.ts +25 -0
  27. package/light-dom/src/scoped-html.d.ts +26 -0
  28. package/navbar/index.mjs +71 -44
  29. package/navbar/src/components/mp-navbar.d.ts +17 -1
  30. package/package.json +5 -1
  31. package/query-builder/index.mjs +1472 -2651
  32. package/query-builder/src/index.d.ts +4 -0
  33. package/query-builder/src/mp-query-builder.element.d.ts +1 -1
  34. package/query-builder/src/mp-query-builder.light.styles.d.ts +2 -0
  35. package/query-builder/src/mp-query-condition.element.d.ts +1 -1
  36. package/query-builder/src/mp-query-condition.light.styles.d.ts +2 -0
  37. package/query-builder/src/mp-query-group.element.d.ts +1 -1
  38. package/query-builder/src/mp-query-group.light.styles.d.ts +2 -0
  39. package/query-builder/src/mp-query-subquery.element.d.ts +1 -1
  40. package/query-builder/src/mp-query-subquery.light.styles.d.ts +2 -0
  41. package/ribbon/index.mjs +7 -3
  42. package/ribbon/src/mp-quick-access-toolbar.element.d.ts +11 -0
  43. package/splitter/index.mjs +1 -1
  44. package/splitter/src/state/splitter-state.d.ts +9 -0
  45. package/tree-select/index.mjs +60 -58
  46. package/tree-select/src/components/mp-tree-select.d.ts +1 -1
  47. package/tree-select/src/index.d.ts +1 -1
  48. package/tree-select/src/styles/index.d.ts +1 -1
  49. package/tree-select/src/styles/tree-select.light.styles.d.ts +2 -0
  50. package/treeview/index.mjs +3 -3
  51. package/treeview/src/components/mp-treeview.d.ts +1 -1
  52. package/treeview/src/index.d.ts +1 -1
  53. package/treeview/src/styles/index.d.ts +1 -1
  54. package/treeview/src/styles/treeview.light.styles.d.ts +2 -0
@@ -12,8 +12,22 @@ class R {
12
12
  ...e
13
13
  };
14
14
  }
15
+ /**
16
+ * A snapshot no caller can write back through.
17
+ *
18
+ * The arrays are copied, not just the envelope: every setter here already
19
+ * copies on the way IN, and a shallow spread on the way out quietly undid
20
+ * that — a subscriber holding `panelSizes` was holding the store's own array,
21
+ * so sorting or splicing it reordered the panels with no notification to
22
+ * anyone. The asymmetry is the bug; this is the other half of it.
23
+ */
15
24
  getState() {
16
- return { ...this.state };
25
+ return {
26
+ ...this.state,
27
+ panelSizes: [...this.state.panelSizes],
28
+ previewSizes: this.state.previewSizes ? [...this.state.previewSizes] : null,
29
+ resizeOperation: this.state.resizeOperation ? { ...this.state.resizeOperation, sizes: [...this.state.resizeOperation.sizes] } : null
30
+ };
17
31
  }
18
32
  subscribe(e) {
19
33
  return this.listeners.add(e), () => {
@@ -153,8 +167,8 @@ class P {
153
167
  };
154
168
  }
155
169
  calculatePreviewSizes(e, i, t) {
156
- const { startPosition: s, sizes: n, indexBefore: a, indexAfter: o } = e, d = t === "horizontal" ? i.x - s.x : i.y - s.y, h = [...n], r = n[a], z = n[o];
157
- let p = r + d, l = z - d;
170
+ const { startPosition: s, sizes: n, indexBefore: a, indexAfter: o } = e, d = t === "horizontal" ? i.x - s.x : i.y - s.y, h = [...n], r = n[a], m = n[o];
171
+ let p = r + d, l = m - d;
158
172
  if (p < this.options.minPanelSize) {
159
173
  const c = this.options.minPanelSize - p;
160
174
  p = this.options.minPanelSize, l -= c;
@@ -172,7 +186,7 @@ class P {
172
186
  return this.options.minPanelSize;
173
187
  }
174
188
  }
175
- const L = S(`:host {
189
+ const O = S(`:host {
176
190
  display: block;
177
191
  width: 100%;
178
192
  height: 100%;
@@ -314,10 +328,10 @@ const L = S(`:host {
314
328
  transition: none !important;
315
329
  }
316
330
  }`);
317
- let O = 0;
331
+ let L = 0;
318
332
  class C extends A {
319
333
  constructor() {
320
- super(), this.container = null, this.panelWrappers = [], this.dividers = [], this.slotElement = null, this.mutationObserver = null, this.containerResizeObserver = null, this.unsubscribeState = null, this.instanceId = `mp-splitter-${++O}`, this.dividerFocusRestore = new w(() => this.shadowRoot, {
334
+ super(), this.container = null, this.panelWrappers = [], this.dividers = [], this.slotElement = null, this.mutationObserver = null, this.containerResizeObserver = null, this.unsubscribeState = null, this.instanceId = `mp-splitter-${++L}`, this.dividerFocusRestore = new w(() => this.shadowRoot, {
321
335
  selector: ".divider",
322
336
  keyOf: (e) => e.dataset.key ?? null
323
337
  }), this.stateManager = new R(), this.resizeManager = new P(), this.inputHandler = new y({
@@ -328,7 +342,7 @@ class C extends A {
328
342
  });
329
343
  }
330
344
  static {
331
- this.styles = [L];
345
+ this.styles = [O];
332
346
  }
333
347
  static get observedAttributes() {
334
348
  return [
@@ -441,8 +455,8 @@ class C extends A {
441
455
  this.dividers.forEach((a, o) => {
442
456
  const d = i[o], h = i[o + 1];
443
457
  if (d === void 0 || h === void 0) return;
444
- const r = Math.round(d / s * 100), z = Math.round(n / s * 100), p = d + h, l = Math.round((p - n) / s * 100);
445
- a.setAttribute("aria-valuenow", String(r)), a.setAttribute("aria-valuemin", String(z)), a.setAttribute("aria-valuemax", String(l));
458
+ const r = Math.round(d / s * 100), m = Math.round(n / s * 100), p = d + h, l = Math.round((p - n) / s * 100);
459
+ a.setAttribute("aria-valuenow", String(r)), a.setAttribute("aria-valuemin", String(m)), a.setAttribute("aria-valuemax", String(l));
446
460
  const c = Math.round(h / s * 100);
447
461
  a.setAttribute("aria-valuetext", r + "% / " + c + "%");
448
462
  });
@@ -520,11 +534,11 @@ class C extends A {
520
534
  (l, c) => l + c.getBoundingClientRect()[s],
521
535
  0
522
536
  ), a = this.orientation === "horizontal" ? "marginLeft" : "marginTop", o = this.orientation === "horizontal" ? "marginRight" : "marginBottom", d = this.panelWrappers.reduce((l, c) => {
523
- const m = getComputedStyle(c);
524
- return l + parseFloat(m[a]) + parseFloat(m[o]);
537
+ const z = getComputedStyle(c);
538
+ return l + parseFloat(z[a]) + parseFloat(z[o]);
525
539
  }, 0), h = Math.max(0, t - n - d), r = e.reduce((l, c) => l + c, 0);
526
540
  if (r <= 0 || Math.abs(h - r) < 1) return;
527
- const z = h / r, p = e.map((l) => l * z);
541
+ const m = h / r, p = e.map((l) => l * m);
528
542
  this.applyPanelSizes(p), this.stateManager.setPanelSizes(p), this.updateDividerAriaValues();
529
543
  }
530
544
  updateContainerOrientation() {
@@ -601,20 +615,20 @@ class C extends A {
601
615
  if (a === void 0 || o === void 0) return;
602
616
  const d = this.container.getBoundingClientRect(), h = this.orientation === "horizontal" ? d.width : d.height;
603
617
  if (h <= 0) return;
604
- const r = this.resizeManager.getMinPanelSize(), z = this.orientation === "horizontal", p = z ? "ArrowRight" : "ArrowDown", l = z ? "ArrowLeft" : "ArrowUp";
618
+ const r = this.resizeManager.getMinPanelSize(), m = this.orientation === "horizontal", p = m ? "ArrowRight" : "ArrowDown", l = m ? "ArrowLeft" : "ArrowUp";
605
619
  let c = 0;
606
620
  e === p ? c = 1 : e === l && (c = -1);
607
- let m, v;
621
+ let z, v;
608
622
  if (e === "Home")
609
- m = r, v = a + o - r;
623
+ z = r, v = a + o - r;
610
624
  else if (e === "End")
611
- m = a + o - r, v = r;
625
+ z = a + o - r, v = r;
612
626
  else if (c !== 0) {
613
627
  const f = (i ? 1 : 10) / 100 * h * c;
614
- m = a + f, v = o - f, m < r ? (m = r, v = a + o - r) : v < r && (v = r, m = a + o - r);
628
+ z = a + f, v = o - f, z < r ? (z = r, v = a + o - r) : v < r && (v = r, z = a + o - r);
615
629
  } else
616
630
  return;
617
- m === a && v === o || (n[t] = m, n[t + 1] = v, this.applyPanelSizes(n), this.stateManager.setPanelSizes(n), this.updateDividerAriaValues(), s.classList.add("active"), queueMicrotask(() => s.classList.remove("active")), this.dispatchEvent(
631
+ z === a && v === o || (n[t] = z, n[t + 1] = v, this.applyPanelSizes(n), this.stateManager.setPanelSizes(n), this.updateDividerAriaValues(), s.classList.add("active"), queueMicrotask(() => s.classList.remove("active")), this.dispatchEvent(
618
632
  new CustomEvent("resize-end", {
619
633
  bubbles: !0,
620
634
  detail: { sizes: n, orientation: this.orientation }
@@ -636,5 +650,5 @@ export {
636
650
  R as S,
637
651
  b as a,
638
652
  g as n,
639
- L as s
653
+ O as s
640
654
  };
@@ -1,8 +1,9 @@
1
- import { unsafeCSS as I, LitElement as y, nothing as d, html as n } from "lit";
2
- import { L as $ } from "./live-announcer-Bi0orG4n.mjs";
3
- import { repeat as C } from "lit/directives/repeat.js";
4
- import { unsafeHTML as _ } from "lit/directives/unsafe-html.js";
5
- const S = I(`:host {
1
+ import { unsafeCSS as I, LitElement as y, nothing as d } from "lit";
2
+ import { s as $, i as C } from "./install-light-styles-DbCAGFOC.mjs";
3
+ import { L as S } from "./live-announcer-Bi0orG4n.mjs";
4
+ import { repeat as E } from "lit/directives/repeat.js";
5
+ import { unsafeHTML as g } from "lit/directives/unsafe-html.js";
6
+ const R = I(`mp-treeview {
6
7
  display: block;
7
8
  width: 100%;
8
9
  --mp-treeview-indent: 20px;
@@ -16,28 +17,28 @@ const S = I(`:host {
16
17
  --mp-treeview-border-color: var(--bs-list-group-border-color, var(--bs-border-color, rgba(0, 0, 0, 0.125)));
17
18
  }
18
19
 
19
- * {
20
+ [data-mps=treeview] {
20
21
  box-sizing: border-box;
21
22
  }
22
23
 
23
- ul {
24
+ ul[data-mps=treeview] {
24
25
  list-style: none;
25
26
  margin: 0;
26
27
  padding: 0;
27
28
  }
28
29
 
29
- .treeview-root {
30
+ .treeview-root[data-mps=treeview] {
30
31
  border: 1px solid var(--mp-treeview-border-color);
31
32
  border-radius: var(--bs-list-group-border-radius, 0.375rem);
32
33
  overflow: hidden;
33
34
  }
34
35
 
35
- :host([hide-borders]) .treeview-root {
36
+ mp-treeview[hide-borders] .treeview-root[data-mps=treeview] {
36
37
  border: 0;
37
38
  border-radius: 0;
38
39
  }
39
40
 
40
- .treeview-row {
41
+ .treeview-row[data-mps=treeview] {
41
42
  display: flex;
42
43
  align-items: center;
43
44
  gap: 0.5rem;
@@ -49,33 +50,33 @@ ul {
49
50
  color: inherit;
50
51
  }
51
52
 
52
- :host([hide-borders]) .treeview-row {
53
+ mp-treeview[hide-borders] .treeview-row[data-mps=treeview] {
53
54
  border-top: 0;
54
55
  }
55
56
 
56
- .treeview-row:first-child {
57
+ .treeview-row:first-child[data-mps=treeview] {
57
58
  border-top: 0;
58
59
  }
59
60
 
60
- .treeview-row:hover {
61
+ .treeview-row:hover[data-mps=treeview] {
61
62
  background-color: var(--mp-treeview-row-hover-bg);
62
63
  }
63
64
 
64
- .treeview-row[data-selected=true] {
65
+ .treeview-row[data-selected=true][data-mps=treeview] {
65
66
  background-color: var(--mp-treeview-row-selected-bg);
66
67
  color: var(--mp-treeview-row-selected-color);
67
68
  }
68
69
 
69
- .treeview-row:focus {
70
+ .treeview-row:focus[data-mps=treeview] {
70
71
  outline: none;
71
72
  }
72
73
 
73
- .treeview-row:focus-visible {
74
+ .treeview-row:focus-visible[data-mps=treeview] {
74
75
  outline: var(--mp-treeview-row-focus-outline);
75
76
  outline-offset: -2px;
76
77
  }
77
78
 
78
- .treeview-chevron {
79
+ .treeview-chevron[data-mps=treeview] {
79
80
  display: inline-flex;
80
81
  align-items: center;
81
82
  justify-content: center;
@@ -86,24 +87,22 @@ ul {
86
87
  transition: transform 0.15s ease-in-out;
87
88
  }
88
89
 
89
- .treeview-chevron[data-expanded=true] {
90
+ .treeview-chevron[data-expanded=true][data-mps=treeview] {
90
91
  transform: rotate(90deg);
91
92
  }
92
93
 
93
- .treeview-chevron.invisible {
94
+ .treeview-chevron.invisible[data-mps=treeview] {
94
95
  visibility: hidden;
95
96
  }
96
-
97
- .treeview-chevron svg {
97
+ .treeview-chevron[data-mps=treeview] svg {
98
98
  width: 0.75rem;
99
99
  height: 0.75rem;
100
100
  }
101
-
102
- .treeview-chevron.loading svg {
101
+ .treeview-chevron.loading[data-mps=treeview] svg {
103
102
  display: none;
104
103
  }
105
104
 
106
- .treeview-spinner {
105
+ .treeview-spinner[data-mps=treeview] {
107
106
  display: inline-block;
108
107
  width: 0.75rem;
109
108
  height: 0.75rem;
@@ -118,13 +117,13 @@ ul {
118
117
  transform: rotate(360deg);
119
118
  }
120
119
  }
121
- .treeview-row[data-error=true] .treeview-chevron::after {
120
+ .treeview-row[data-error=true][data-mps=treeview] .treeview-chevron[data-mps=treeview]::after {
122
121
  content: "!";
123
122
  color: var(--bs-danger, #dc3545);
124
123
  margin-left: 0.25rem;
125
124
  }
126
125
 
127
- .treeview-icon {
126
+ .treeview-icon[data-mps=treeview] {
128
127
  display: inline-flex;
129
128
  align-items: center;
130
129
  justify-content: center;
@@ -132,36 +131,34 @@ ul {
132
131
  height: 1rem;
133
132
  flex: 0 0 auto;
134
133
  }
135
-
136
- .treeview-icon svg {
134
+ .treeview-icon[data-mps=treeview] svg {
137
135
  width: 1rem;
138
136
  height: 1rem;
139
137
  }
140
-
141
- .treeview-label {
138
+ .treeview-row[data-mps=treeview] .treeview-label {
142
139
  flex: 1 1 auto;
143
140
  white-space: nowrap;
144
141
  overflow: hidden;
145
142
  text-overflow: ellipsis;
146
143
  }
147
144
 
148
- .treeview-body {
145
+ .treeview-body[data-mps=treeview] {
149
146
  flex: 1 1 auto;
150
147
  min-width: 0;
151
148
  }
152
149
 
153
150
  @media (prefers-reduced-motion: reduce) {
154
- .treeview-chevron {
151
+ .treeview-chevron[data-mps=treeview] {
155
152
  transition: none !important;
156
153
  }
157
- }`), E = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" 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-.708z"/></svg>';
158
- let R = 0;
159
- class U extends y {
154
+ }`), n = $("treeview"), U = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" 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-.708z"/></svg>';
155
+ let q = 0;
156
+ class L extends y {
160
157
  constructor() {
161
- super(...arguments), this.instanceId = `mp-treeview-${++R}`, this._items = [], this._expandedIds = /* @__PURE__ */ new Set(), this._selectedIds = /* @__PURE__ */ new Set(), this._selectionMode = "single", this._hideBorders = !1, this._loadingIds = /* @__PURE__ */ new Set(), this._errorIds = /* @__PURE__ */ new Map(), this.liveAnnouncer = new $(this, { omitRole: !0 }), this._focusedId = null, this._visibleOrder = [], this._byId = /* @__PURE__ */ new Map(), this._parentById = /* @__PURE__ */ new Map(), this._inputLabel = null;
158
+ super(...arguments), this.instanceId = `mp-treeview-${++q}`, this._items = [], this._expandedIds = /* @__PURE__ */ new Set(), this._selectedIds = /* @__PURE__ */ new Set(), this._selectionMode = "single", this._hideBorders = !1, this._loadingIds = /* @__PURE__ */ new Set(), this._errorIds = /* @__PURE__ */ new Map(), this.liveAnnouncer = new S(this, { omitRole: !0 }), this._focusedId = null, this._visibleOrder = [], this._byId = /* @__PURE__ */ new Map(), this._parentById = /* @__PURE__ */ new Map(), this._inputLabel = null;
162
159
  }
163
- static {
164
- this.styles = [S];
160
+ createRenderRoot() {
161
+ return this;
165
162
  }
166
163
  static get observedAttributes() {
167
164
  return [
@@ -283,7 +280,7 @@ class U extends y {
283
280
  }
284
281
  renderNodes(e, t) {
285
282
  return n`
286
- ${C(
283
+ ${E(
287
284
  e,
288
285
  (s) => s.id,
289
286
  (s, i) => this.renderNode(s, t, i, e.length)
@@ -291,44 +288,44 @@ class U extends y {
291
288
  `;
292
289
  }
293
290
  renderNode(e, t, s, i) {
294
- const r = !!(e.children && e.children.length > 0), u = !!e.lazy && !r, p = r || u, l = this._loadingIds.has(e.id), a = this._errorIds.get(e.id), h = this._expandedIds.has(e.id), v = this._selectedIds.has(e.id), w = this._focusedId === e.id, m = w ? 0 : -1, b = e.iconKey && this._iconResolver ? this._iconResolver(e.iconKey, e) : void 0, x = (t - 1) * 20, f = `${this.instanceId}-row-${e.id}`, g = this._nodeRenderer ? this._nodeRenderer(e, {
291
+ const r = !!(e.children && e.children.length > 0), p = !!e.lazy && !r, u = r || p, o = this._loadingIds.has(e.id), l = this._errorIds.get(e.id), h = this._expandedIds.has(e.id), v = this._selectedIds.has(e.id), m = this._focusedId === e.id, _ = m ? 0 : -1, f = e.iconKey && this._iconResolver ? this._iconResolver(e.iconKey, e) : void 0, x = (t - 1) * 20, w = `${this.instanceId}-row-${e.id}`, b = this._nodeRenderer ? this._nodeRenderer(e, {
295
292
  level: t,
296
293
  expanded: h,
297
294
  selected: v,
298
- focused: w,
299
- hasChildren: p
295
+ focused: m,
296
+ hasChildren: u
300
297
  }) : void 0;
301
298
  return n`
302
299
  <li role="none">
303
300
  <div
304
- id=${f}
301
+ id=${w}
305
302
  class="treeview-row"
306
303
  role="treeitem"
307
304
  data-node-id=${e.id}
308
305
  data-selected=${v ? "true" : "false"}
309
- data-loading=${l ? "true" : "false"}
310
- data-error=${a ? "true" : "false"}
306
+ data-loading=${o ? "true" : "false"}
307
+ data-error=${l ? "true" : "false"}
311
308
  aria-level=${t}
312
309
  aria-setsize=${i}
313
310
  aria-posinset=${s + 1}
314
- aria-expanded=${p ? h ? "true" : "false" : d}
315
- aria-busy=${l ? "true" : d}
311
+ aria-expanded=${u ? h ? "true" : "false" : d}
312
+ aria-busy=${o ? "true" : d}
316
313
  aria-selected=${this._selectionMode !== "none" ? v ? "true" : "false" : d}
317
- tabindex=${m}
314
+ tabindex=${_}
318
315
  style=${`padding-left:${x + 12}px`}
319
- @click=${(o) => this.onRowClick(e, o)}
320
- @keydown=${(o) => this.onRowKeydown(e, o)}
321
- aria-describedby=${a ? `${f}-error` : d}
316
+ @click=${(a) => this.onRowClick(e, a)}
317
+ @keydown=${(a) => this.onRowKeydown(e, a)}
318
+ aria-describedby=${l ? `${w}-error` : d}
322
319
  >
323
- ${a ? n`<span id="${f}-error" class="treeview-load-error">${a}</span>` : d}
320
+ ${l ? n`<span id="${w}-error" class="treeview-load-error">${l}</span>` : d}
324
321
  <span
325
- class=${`treeview-chevron${p ? "" : " invisible"}${l ? " loading" : ""}`}
322
+ class=${`treeview-chevron${u ? "" : " invisible"}${o ? " loading" : ""}`}
326
323
  data-expanded=${h ? "true" : "false"}
327
- @click=${(o) => this.onChevronClick(e, o)}
324
+ @click=${(a) => this.onChevronClick(e, a)}
328
325
  aria-hidden="true"
329
- >${l ? n`<span class="treeview-spinner" aria-hidden="true"></span>` : _(E)}</span>
330
- ${g ? n`<span class="treeview-body">${g}</span>` : n`
331
- ${b ? n`<span class="treeview-icon" aria-hidden="true">${_(b)}</span>` : d}
326
+ >${o ? n`<span class="treeview-spinner" aria-hidden="true"></span>` : g(U)}</span>
327
+ ${b ? n`<span class="treeview-body">${b}</span>` : n`
328
+ ${f ? n`<span class="treeview-icon" aria-hidden="true">${g(f)}</span>` : d}
332
329
  <span class="treeview-label">${e.label}</span>
333
330
  `}
334
331
  </div>
@@ -406,14 +403,14 @@ class U extends y {
406
403
  }
407
404
  }
408
405
  focusRelative(e, t) {
409
- const s = this._visibleOrder, i = s.findIndex((u) => u.id === e.id);
406
+ const s = this._visibleOrder, i = s.findIndex((p) => p.id === e.id);
410
407
  if (i === -1) return;
411
408
  const r = Math.max(0, Math.min(s.length - 1, i + t));
412
409
  r !== i && this.focusNode(s[r].id);
413
410
  }
414
411
  focusNode(e) {
415
412
  this._focusedId = e, this.requestUpdate(), requestAnimationFrame(() => {
416
- this.shadowRoot?.querySelector(`[data-node-id="${q(e)}"]`)?.focus({ preventScroll: !1 });
413
+ this.renderRoot?.querySelector(`[data-node-id="${M(e)}"]`)?.focus({ preventScroll: !1 });
417
414
  });
418
415
  }
419
416
  toggleSelection(e, t) {
@@ -488,11 +485,12 @@ class U extends y {
488
485
  );
489
486
  }
490
487
  }
491
- function q(c) {
488
+ function M(c) {
492
489
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(c) : c.replace(/["\\]/g, "\\$&");
493
490
  }
494
- typeof customElements < "u" && !customElements.get("mp-treeview") && customElements.define("mp-treeview", U);
491
+ C("treeview", R);
492
+ typeof customElements < "u" && !customElements.get("mp-treeview") && customElements.define("mp-treeview", L);
495
493
  export {
496
- U as M,
497
- S as t
494
+ L as M,
495
+ R as t
498
496
  };
@@ -1,7 +1,7 @@
1
- import { M as s, c as e, d as o, s as r } from "../chunks/mp-datatable-GmKqaN8y.mjs";
1
+ import { M as s, c as e, d as o, s as r } from "../chunks/mp-datatable-UJI8E73X.mjs";
2
2
  export {
3
3
  s as MpDatatable,
4
4
  e as computeNextSort,
5
- o as datatableStyles,
5
+ o as datatableLightStyles,
6
6
  r as sortRows
7
7
  };
@@ -37,7 +37,15 @@ export interface SelectionChangeEventDetail<T = unknown> {
37
37
  * - Column resize via a 6px handle at the right edge of each header.
38
38
  */
39
39
  export declare class MpDatatable extends LitElement {
40
- static styles: import('lit').CSSResult[];
40
+ /**
41
+ * Light DOM. Consumer-authored row/cell/header content is mounted here by the
42
+ * render callbacks, and inside a shadow root the page's stylesheets — the
43
+ * consumer's own component CSS and Bootstrap's utilities alike — cannot reach
44
+ * it (issue #408). Rendering in the document tree is what makes that content
45
+ * style correctly; encapsulation is preserved by the build-time rescoping
46
+ * instead of by the boundary.
47
+ */
48
+ protected createRenderRoot(): HTMLElement;
41
49
  static get observedAttributes(): string[];
42
50
  private readonly instanceId;
43
51
  private _caption;
@@ -3,4 +3,4 @@ export type { DatatableSelectionMode, RowEventDetail, SortChangeEventDetail, Sel
3
3
  export type { DatatableColumnDef, CellContent, CellRenderer, HeaderRenderer, RowKey, RowRenderer, RowRenderContext, TreeIdKey, TreeSelectionStrategy, DatatableFetchRequest, DatatableFetchResponse, DatatableFetch, TreeRowExpandDetail, TreeExpandedIdsChangeDetail, } from './types';
4
4
  export type { SortColumn, SortDirection } from './sort';
5
5
  export { computeNextSort, sortRows } from './sort';
6
- export { datatableStyles } from './styles';
6
+ export { datatableLightStyles } from './styles';
@@ -0,0 +1,2 @@
1
+ export declare const datatableLightStyles: import('lit').CSSResult;
2
+ export default datatableLightStyles;
@@ -1 +1 @@
1
- export { datatableStyles } from './datatable.styles';
1
+ export { datatableLightStyles } from './datatable.light.styles';