@mintplayer/ng-bootstrap 21.29.0 → 21.31.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 (156) hide show
  1. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +455 -0
  2. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -0
  3. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +8 -5
  4. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  5. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +10 -4
  6. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
  7. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +7 -4
  8. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
  9. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +131 -3
  10. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
  11. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +80 -48
  12. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  13. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +4 -1
  14. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
  15. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +218 -14
  16. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
  17. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +4 -3
  18. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  19. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +2 -2
  20. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
  21. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +294 -3
  22. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
  23. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +163 -18
  24. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
  25. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +179 -7
  26. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
  27. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +14 -4
  28. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
  29. package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +14 -0
  30. package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +1 -1
  31. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +2 -1
  32. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
  33. package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +7 -4
  34. package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
  35. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +70 -6
  36. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
  37. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +693 -0
  38. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -0
  39. package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs +5 -4
  40. package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs.map +1 -1
  41. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +6 -6
  42. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
  43. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +45 -13
  44. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  45. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +51 -5
  46. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
  47. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +5 -3
  48. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  49. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +18 -4
  50. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
  51. package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +6 -6
  52. package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
  53. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +61 -6
  54. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
  55. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +19 -4
  56. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
  57. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +8 -5
  58. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
  59. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +4 -3
  60. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  61. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +34 -4
  62. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
  63. package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs +59 -0
  64. package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs.map +1 -0
  65. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +91 -2
  66. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
  67. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +16 -5
  68. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  69. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +2 -2
  70. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
  71. package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs +28 -5
  72. package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs.map +1 -1
  73. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +4 -3
  74. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  75. package/fesm2022/mintplayer-ng-bootstrap-select2.mjs +18 -4
  76. package/fesm2022/mintplayer-ng-bootstrap-select2.mjs.map +1 -1
  77. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +4 -3
  78. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  79. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +2 -2
  80. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  81. package/fesm2022/mintplayer-ng-bootstrap-table.mjs +10 -3
  82. package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
  83. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +143 -29
  84. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
  85. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +2 -2
  86. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
  87. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +7 -4
  88. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
  89. package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs +42 -21
  90. package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs.map +1 -1
  91. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +33 -4
  92. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
  93. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +17 -7
  94. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
  95. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +50 -8
  96. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  97. package/fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs +34 -12
  98. package/fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs.map +1 -1
  99. package/fesm2022/mintplayer-ng-bootstrap-web-components-a11y.mjs +74 -0
  100. package/fesm2022/mintplayer-ng-bootstrap-web-components-a11y.mjs.map +1 -0
  101. package/fesm2022/mintplayer-ng-bootstrap-web-components-scheduler.mjs +1476 -71
  102. package/fesm2022/mintplayer-ng-bootstrap-web-components-scheduler.mjs.map +1 -1
  103. package/fesm2022/mintplayer-ng-bootstrap-web-components-splitter.mjs +194 -2
  104. package/fesm2022/mintplayer-ng-bootstrap-web-components-splitter.mjs.map +1 -1
  105. package/fesm2022/mintplayer-ng-bootstrap-web-components-tab-control.mjs +4 -0
  106. package/fesm2022/mintplayer-ng-bootstrap-web-components-tab-control.mjs.map +1 -1
  107. package/package.json +18 -2
  108. package/types/mintplayer-ng-bootstrap-a11y.d.ts +196 -0
  109. package/types/mintplayer-ng-bootstrap-accordion.d.ts +4 -2
  110. package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +2 -1
  111. package/types/mintplayer-ng-bootstrap-button-group.d.ts +2 -1
  112. package/types/mintplayer-ng-bootstrap-calendar.d.ts +32 -0
  113. package/types/mintplayer-ng-bootstrap-carousel.d.ts +56 -3
  114. package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +1 -0
  115. package/types/mintplayer-ng-bootstrap-color-picker.d.ts +75 -4
  116. package/types/mintplayer-ng-bootstrap-datatable.d.ts +1 -1
  117. package/types/mintplayer-ng-bootstrap-dock.d.ts +51 -0
  118. package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +54 -9
  119. package/types/mintplayer-ng-bootstrap-dropdown.d.ts +57 -2
  120. package/types/mintplayer-ng-bootstrap-file-upload.d.ts +4 -1
  121. package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +14 -0
  122. package/types/mintplayer-ng-bootstrap-marquee.d.ts +2 -1
  123. package/types/mintplayer-ng-bootstrap-modal.d.ts +25 -1
  124. package/types/mintplayer-ng-bootstrap-multi-range.d.ts +170 -0
  125. package/types/mintplayer-ng-bootstrap-multiselect.d.ts +2 -1
  126. package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +4 -2
  127. package/types/mintplayer-ng-bootstrap-navbar.d.ts +25 -1
  128. package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +23 -1
  129. package/types/mintplayer-ng-bootstrap-pagination.d.ts +3 -1
  130. package/types/mintplayer-ng-bootstrap-placeholder.d.ts +5 -1
  131. package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +4 -2
  132. package/types/mintplayer-ng-bootstrap-popover.d.ts +21 -1
  133. package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +4 -1
  134. package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +4 -2
  135. package/types/mintplayer-ng-bootstrap-range.d.ts +2 -1
  136. package/types/mintplayer-ng-bootstrap-rating.d.ts +3 -0
  137. package/types/mintplayer-ng-bootstrap-reduced-motion.d.ts +36 -0
  138. package/types/mintplayer-ng-bootstrap-resizable.d.ts +4 -0
  139. package/types/mintplayer-ng-bootstrap-scheduler.d.ts +42 -9
  140. package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +1 -1
  141. package/types/mintplayer-ng-bootstrap-searchbox.d.ts +8 -1
  142. package/types/mintplayer-ng-bootstrap-select.d.ts +2 -1
  143. package/types/mintplayer-ng-bootstrap-select2.d.ts +3 -0
  144. package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +2 -1
  145. package/types/mintplayer-ng-bootstrap-table.d.ts +8 -1
  146. package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +21 -2
  147. package/types/mintplayer-ng-bootstrap-toast.d.ts +6 -1
  148. package/types/mintplayer-ng-bootstrap-toggle-button.d.ts +11 -0
  149. package/types/mintplayer-ng-bootstrap-tooltip.d.ts +5 -0
  150. package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -1
  151. package/types/mintplayer-ng-bootstrap-typeahead.d.ts +11 -3
  152. package/types/mintplayer-ng-bootstrap-virtual-datatable.d.ts +14 -1
  153. package/types/mintplayer-ng-bootstrap-web-components-a11y.d.ts +34 -0
  154. package/types/mintplayer-ng-bootstrap-web-components-scheduler-core.d.ts +35 -11
  155. package/types/mintplayer-ng-bootstrap-web-components-scheduler.d.ts +246 -0
  156. package/types/mintplayer-ng-bootstrap-web-components-splitter.d.ts +95 -37
@@ -104,6 +104,9 @@ function normalizePointerEvent(event) {
104
104
  };
105
105
  }
106
106
 
107
+ const RESIZE_KEYS = new Set([
108
+ 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End',
109
+ ]);
107
110
  class InputHandler {
108
111
  constructor(callbacks) {
109
112
  this.isActive = false;
@@ -118,6 +121,15 @@ class InputHandler {
118
121
  attachDividerListeners(divider, index) {
119
122
  divider.addEventListener('mousedown', (e) => this.handleMouseDown(e, index, divider));
120
123
  divider.addEventListener('touchstart', (e) => this.handleTouchStart(e, index, divider), { passive: false });
124
+ divider.addEventListener('keydown', (e) => this.handleKeyDown(e, index, divider));
125
+ }
126
+ handleKeyDown(event, dividerIndex, dividerElement) {
127
+ if (!this.callbacks.onResizeKey)
128
+ return;
129
+ if (!RESIZE_KEYS.has(event.key))
130
+ return;
131
+ event.preventDefault();
132
+ this.callbacks.onResizeKey(event.key, event.shiftKey, dividerIndex, dividerElement);
121
133
  }
122
134
  handleMouseDown(event, dividerIndex, dividerElement) {
123
135
  event.preventDefault();
@@ -305,11 +317,21 @@ const splitterStyles = unsafeCSS(`:host {
305
317
  }
306
318
 
307
319
  .divider:hover::before,
308
- .divider.active::before {
320
+ .divider.active::before,
321
+ .divider:focus-visible::before {
309
322
  background-color: var(--mp-splitter-divider-hover-color);
310
323
  border-radius: calc(var(--mp-splitter-size) / 2);
311
324
  }
312
325
 
326
+ .divider:focus {
327
+ outline: none;
328
+ }
329
+
330
+ .divider:focus-visible {
331
+ outline: 2px solid var(--mp-splitter-divider-hover-color);
332
+ outline-offset: 1px;
333
+ }
334
+
313
335
  /* Horizontal splitter styles */
314
336
  .splitter-container.horizontal > .divider {
315
337
  width: calc(var(--mp-splitter-size) + 2 * var(--mp-splitter-thumb-margin));
@@ -372,8 +394,36 @@ const splitterStyles = unsafeCSS(`:host {
372
394
  ::slotted(*) {
373
395
  width: 100%;
374
396
  height: 100%;
397
+ }
398
+
399
+ @media (prefers-reduced-motion: reduce) {
400
+ .divider {
401
+ transition: none !important;
402
+ }
375
403
  }`);
376
404
 
405
+ let splitterInstanceCounter = 0;
406
+ /**
407
+ * `<mp-splitter>` — resizable panel splitter.
408
+ *
409
+ * Light-DOM children are projected into named slots (`panel-${i}`) inside a
410
+ * shadow-DOM flex container with auto-inserted dividers between them. Drag a
411
+ * divider to redistribute space; sizes survive container resize via a
412
+ * proportional rescale.
413
+ *
414
+ * Pointer + keyboard interactions both flow through the same path:
415
+ * - Pointer drag → `InputHandler` → `handleResizeStart/Move/End`.
416
+ * - Arrow keys ±10% (Shift = ±1%), Home/End to limits → `handleResizeKey`.
417
+ *
418
+ * ARIA: each divider is a `role="separator"` with `aria-orientation`,
419
+ * `aria-controls` referencing the deterministic IDs of the two adjacent
420
+ * panel wrappers, and percent-based `aria-valuenow / valuemin / valuemax`
421
+ * that update on every drag-preview frame, container resize, and keystroke.
422
+ *
423
+ * Public API: `[orientation]`, `[min-panel-size]`, `[touch-mode]`;
424
+ * `getPanelSizes()` / `setPanelSizes()`; events `resize-start`, `resizing`,
425
+ * `resize-end` carrying `{ sizes, orientation }`.
426
+ */
377
427
  class MpSplitter extends LitElement {
378
428
  static { this.styles = [splitterStyles]; }
379
429
  static get observedAttributes() {
@@ -393,12 +443,14 @@ class MpSplitter extends LitElement {
393
443
  this.mutationObserver = null;
394
444
  this.containerResizeObserver = null;
395
445
  this.unsubscribeState = null;
446
+ this.instanceId = `mp-splitter-${++splitterInstanceCounter}`;
396
447
  this.stateManager = new SplitterStateManager();
397
448
  this.resizeManager = new ResizeManager();
398
449
  this.inputHandler = new InputHandler({
399
450
  onResizeStart: this.handleResizeStart.bind(this),
400
451
  onResizeMove: this.handleResizeMove.bind(this),
401
452
  onResizeEnd: this.handleResizeEnd.bind(this),
453
+ onResizeKey: this.handleResizeKey.bind(this),
402
454
  });
403
455
  }
404
456
  render() {
@@ -486,6 +538,22 @@ class MpSplitter extends LitElement {
486
538
  getPanelSizes() {
487
539
  return this.stateManager.getState().panelSizes;
488
540
  }
541
+ /**
542
+ * Drive a keyboard-style resize on a divider programmatically. Used by the
543
+ * dock manager's intersection-handle keymap so a single keystroke can
544
+ * resize both the horizontal and vertical dividers a 2D handle sits on,
545
+ * without re-implementing the percent-step + clamp math here.
546
+ *
547
+ * `key` is one of the keys handled by the divider keymap
548
+ * (Arrow{Left,Right,Up,Down}, Home, End); `fine` halves the step (matches
549
+ * Shift modifier on the keyboard path).
550
+ */
551
+ resizeDividerBy(dividerIndex, key, fine = false) {
552
+ const divider = this.dividers[dividerIndex];
553
+ if (!divider)
554
+ return;
555
+ this.handleResizeKey(key, fine, dividerIndex, divider);
556
+ }
489
557
  setPanelSizes(sizes) {
490
558
  this.applyPanelSizes(sizes);
491
559
  this.stateManager.setPanelSizes(sizes);
@@ -508,6 +576,42 @@ class MpSplitter extends LitElement {
508
576
  else {
509
577
  this.removeAttribute('resizing');
510
578
  }
579
+ this.updateDividerAriaValues();
580
+ });
581
+ }
582
+ /**
583
+ * Mirror current panel sizes to each divider's aria-valuenow / valuemin /
584
+ * valuemax as percent of container. Per §10 Q3 of the WC ARIA PRD: percent
585
+ * is more intuitive for SR users than pixels.
586
+ *
587
+ * Per-divider math: divider i sits between panels[i] and panels[i+1] and
588
+ * "owns" the size of panels[i]. valuemin = minPanelSize as % of container;
589
+ * valuemax = (panels[i].size + panels[i+1].size - minPanelSize) as %.
590
+ */
591
+ updateDividerAriaValues() {
592
+ if (this.dividers.length === 0 || !this.container)
593
+ return;
594
+ const state = this.stateManager.getState();
595
+ const sizes = state.previewSizes ?? state.panelSizes;
596
+ if (sizes.length !== this.panelWrappers.length || sizes.length === 0)
597
+ return;
598
+ const rect = this.container.getBoundingClientRect();
599
+ const containerSize = this.orientation === 'horizontal' ? rect.width : rect.height;
600
+ if (containerSize <= 0)
601
+ return;
602
+ const minPanelSize = this.resizeManager.getMinPanelSize();
603
+ this.dividers.forEach((divider, i) => {
604
+ const before = sizes[i];
605
+ const after = sizes[i + 1];
606
+ if (before === undefined || after === undefined)
607
+ return;
608
+ const valuenow = Math.round((before / containerSize) * 100);
609
+ const valuemin = Math.round((minPanelSize / containerSize) * 100);
610
+ const pairTotal = before + after;
611
+ const valuemax = Math.round(((pairTotal - minPanelSize) / containerSize) * 100);
612
+ divider.setAttribute('aria-valuenow', String(valuenow));
613
+ divider.setAttribute('aria-valuemin', String(valuemin));
614
+ divider.setAttribute('aria-valuemax', String(valuemax));
511
615
  });
512
616
  }
513
617
  updatePanelsFromSlot() {
@@ -521,9 +625,12 @@ class MpSplitter extends LitElement {
521
625
  this.panelWrappers = [];
522
626
  this.dividers = [];
523
627
  // Create panel wrappers with slots for each child
628
+ const panelCount = children.length;
629
+ const dividerAriaOrientation = this.orientation === 'horizontal' ? 'vertical' : 'horizontal';
524
630
  children.forEach((child, index) => {
525
631
  const wrapper = document.createElement('div');
526
632
  wrapper.className = 'panel-wrapper flex-grow';
633
+ wrapper.id = `${this.instanceId}-panel-${index}`;
527
634
  // Create a named slot for this child
528
635
  const namedSlot = document.createElement('slot');
529
636
  const slotName = `panel-${index}`;
@@ -533,9 +640,14 @@ class MpSplitter extends LitElement {
533
640
  this.panelWrappers.push(wrapper);
534
641
  this.container.appendChild(wrapper);
535
642
  // Add divider between panels
536
- if (index < children.length - 1) {
643
+ if (index < panelCount - 1) {
537
644
  const divider = document.createElement('div');
538
645
  divider.className = 'divider';
646
+ divider.setAttribute('role', 'separator');
647
+ divider.setAttribute('aria-orientation', dividerAriaOrientation);
648
+ divider.setAttribute('tabindex', '0');
649
+ divider.setAttribute('aria-controls', `${this.instanceId}-panel-${index} ${this.instanceId}-panel-${index + 1}`);
650
+ divider.setAttribute('aria-label', `Resize between panel ${index + 1} and panel ${index + 2}`);
539
651
  this.inputHandler.attachDividerListeners(divider, index);
540
652
  this.dividers.push(divider);
541
653
  this.container.appendChild(divider);
@@ -652,11 +764,16 @@ class MpSplitter extends LitElement {
652
764
  const newSizes = stored.map((s) => s * scale);
653
765
  this.applyPanelSizes(newSizes);
654
766
  this.stateManager.setPanelSizes(newSizes);
767
+ this.updateDividerAriaValues();
655
768
  }
656
769
  updateContainerOrientation() {
657
770
  if (!this.container)
658
771
  return;
659
772
  this.container.className = `splitter-container ${this.orientation}`;
773
+ const dividerAriaOrientation = this.orientation === 'horizontal' ? 'vertical' : 'horizontal';
774
+ this.dividers.forEach((divider) => {
775
+ divider.setAttribute('aria-orientation', dividerAriaOrientation);
776
+ });
660
777
  }
661
778
  handleResizeStart(event, dividerIndex, dividerElement) {
662
779
  const sizes = this.resizeManager.computePanelSizes(this.panelWrappers, this.orientation);
@@ -703,6 +820,81 @@ class MpSplitter extends LitElement {
703
820
  },
704
821
  }));
705
822
  }
823
+ /**
824
+ * Keyboard-driven resize on a focused divider. ArrowKeys ±10% (Shift = ±1%)
825
+ * along the splitter's axis; Home/End shrink/grow panelBefore to its limit.
826
+ * Fires resize-start → resize-end with the new sizes so consumers don't
827
+ * need to special-case keyboard vs. drag.
828
+ */
829
+ handleResizeKey(key, fine, dividerIndex, dividerElement) {
830
+ if (!this.container)
831
+ return;
832
+ if (this.panelWrappers.length === 0)
833
+ return;
834
+ const sizes = [...this.stateManager.getState().panelSizes];
835
+ if (sizes.length !== this.panelWrappers.length)
836
+ return;
837
+ const before = sizes[dividerIndex];
838
+ const after = sizes[dividerIndex + 1];
839
+ if (before === undefined || after === undefined)
840
+ return;
841
+ const rect = this.container.getBoundingClientRect();
842
+ const containerSize = this.orientation === 'horizontal' ? rect.width : rect.height;
843
+ if (containerSize <= 0)
844
+ return;
845
+ const minPanelSize = this.resizeManager.getMinPanelSize();
846
+ const isHorizontal = this.orientation === 'horizontal';
847
+ const positive = isHorizontal ? 'ArrowRight' : 'ArrowDown';
848
+ const negative = isHorizontal ? 'ArrowLeft' : 'ArrowUp';
849
+ let direction = 0;
850
+ if (key === positive)
851
+ direction = 1;
852
+ else if (key === negative)
853
+ direction = -1;
854
+ let newBefore;
855
+ let newAfter;
856
+ if (key === 'Home') {
857
+ newBefore = minPanelSize;
858
+ newAfter = before + after - minPanelSize;
859
+ }
860
+ else if (key === 'End') {
861
+ newBefore = before + after - minPanelSize;
862
+ newAfter = minPanelSize;
863
+ }
864
+ else if (direction !== 0) {
865
+ const stepPercent = fine ? 1 : 10;
866
+ const deltaPx = (stepPercent / 100) * containerSize * direction;
867
+ newBefore = before + deltaPx;
868
+ newAfter = after - deltaPx;
869
+ // Clamp to min on both sides — symmetric with the pointer path in
870
+ // ResizeManager.calculatePreviewSizes.
871
+ if (newBefore < minPanelSize) {
872
+ newBefore = minPanelSize;
873
+ newAfter = before + after - minPanelSize;
874
+ }
875
+ else if (newAfter < minPanelSize) {
876
+ newAfter = minPanelSize;
877
+ newBefore = before + after - minPanelSize;
878
+ }
879
+ }
880
+ else {
881
+ // Off-axis arrow — silently ignored.
882
+ return;
883
+ }
884
+ if (newBefore === before && newAfter === after)
885
+ return;
886
+ sizes[dividerIndex] = newBefore;
887
+ sizes[dividerIndex + 1] = newAfter;
888
+ this.applyPanelSizes(sizes);
889
+ this.stateManager.setPanelSizes(sizes);
890
+ this.updateDividerAriaValues();
891
+ dividerElement.classList.add('active');
892
+ queueMicrotask(() => dividerElement.classList.remove('active'));
893
+ this.dispatchEvent(new CustomEvent('resize-end', {
894
+ bubbles: true,
895
+ detail: { sizes, orientation: this.orientation },
896
+ }));
897
+ }
706
898
  applyPanelSizes(sizes) {
707
899
  const sizeProperty = this.orientation === 'horizontal' ? 'width' : 'height';
708
900
  const resetProperty = this.orientation === 'horizontal' ? 'height' : 'width';
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-web-components-splitter.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/types/resize-operation.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/state/splitter-state.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/input/pointer-event.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/input/input-handler.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/managers/resize-manager.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/styles/splitter.styles.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/components/mp-splitter.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/mintplayer-ng-bootstrap-web-components-splitter.ts"],"sourcesContent":["import type { Point } from './point';\n\nexport enum ResizeState {\n Idle = 'idle',\n Resizing = 'resizing',\n}\n\nexport interface ResizeOperation {\n state: ResizeState;\n startPosition: Point;\n sizes: number[];\n indexBefore: number;\n indexAfter: number;\n dividerElement: HTMLElement | null;\n}\n","import type { Direction, ResizeOperation } from '../types';\nimport { ResizeState } from '../types';\n\nexport interface SplitterState {\n orientation: Direction;\n panelSizes: number[];\n previewSizes: number[] | null;\n resizeOperation: ResizeOperation | null;\n}\n\nexport type SplitterStateListener = (state: SplitterState) => void;\n\nexport class SplitterStateManager {\n private state: SplitterState;\n private listeners: Set<SplitterStateListener> = new Set();\n\n constructor(initialState?: Partial<SplitterState>) {\n this.state = {\n orientation: 'horizontal',\n panelSizes: [],\n previewSizes: null,\n resizeOperation: null,\n ...initialState,\n };\n }\n\n getState(): SplitterState {\n return { ...this.state };\n }\n\n subscribe(listener: SplitterStateListener): () => void {\n this.listeners.add(listener);\n return () => {\n this.listeners.delete(listener);\n };\n }\n\n private notifyListeners(): void {\n const stateCopy = this.getState();\n for (const listener of this.listeners) {\n listener(stateCopy);\n }\n }\n\n setOrientation(orientation: Direction): void {\n if (this.state.orientation !== orientation) {\n this.state = { ...this.state, orientation };\n this.notifyListeners();\n }\n }\n\n setPanelSizes(sizes: number[]): void {\n this.state = { ...this.state, panelSizes: [...sizes] };\n this.notifyListeners();\n }\n\n setPreviewSizes(sizes: number[] | null): void {\n this.state = { ...this.state, previewSizes: sizes ? [...sizes] : null };\n this.notifyListeners();\n }\n\n startResize(operation: ResizeOperation): void {\n this.state = {\n ...this.state,\n resizeOperation: { ...operation },\n };\n this.notifyListeners();\n }\n\n updateResize(previewSizes: number[]): void {\n this.state = {\n ...this.state,\n previewSizes: [...previewSizes],\n };\n this.notifyListeners();\n }\n\n endResize(finalSizes: number[]): void {\n this.state = {\n ...this.state,\n panelSizes: [...finalSizes],\n previewSizes: null,\n resizeOperation: null,\n };\n this.notifyListeners();\n }\n\n cancelResize(): void {\n this.state = {\n ...this.state,\n previewSizes: null,\n resizeOperation: null,\n };\n this.notifyListeners();\n }\n\n isResizing(): boolean {\n return this.state.resizeOperation?.state === ResizeState.Resizing;\n }\n}\n","import type { Point } from '../types';\n\nexport interface NormalizedPointerEvent {\n clientX: number;\n clientY: number;\n point: Point;\n originalEvent: MouseEvent | TouchEvent;\n isTouch: boolean;\n}\n\nexport function normalizePointerEvent(\n event: MouseEvent | TouchEvent\n): NormalizedPointerEvent {\n const isTouch = 'touches' in event;\n\n let clientX: number;\n let clientY: number;\n\n if (isTouch) {\n const touch = (event as TouchEvent).touches[0] || (event as TouchEvent).changedTouches[0];\n clientX = touch.clientX;\n clientY = touch.clientY;\n } else {\n clientX = (event as MouseEvent).clientX;\n clientY = (event as MouseEvent).clientY;\n }\n\n return {\n clientX,\n clientY,\n point: { x: clientX, y: clientY },\n originalEvent: event,\n isTouch,\n };\n}\n","import type { NormalizedPointerEvent } from './pointer-event';\nimport { normalizePointerEvent } from './pointer-event';\n\nexport interface InputHandlerCallbacks {\n onResizeStart: (event: NormalizedPointerEvent, dividerIndex: number, dividerElement: HTMLElement) => void;\n onResizeMove: (event: NormalizedPointerEvent) => void;\n onResizeEnd: (event: NormalizedPointerEvent) => void;\n}\n\nexport class InputHandler {\n private isActive = false;\n private currentDividerIndex = -1;\n private currentDividerElement: HTMLElement | null = null;\n private callbacks: InputHandlerCallbacks;\n\n private boundMouseMove: (e: MouseEvent) => void;\n private boundMouseUp: (e: MouseEvent) => void;\n private boundTouchMove: (e: TouchEvent) => void;\n private boundTouchEnd: (e: TouchEvent) => void;\n\n constructor(callbacks: InputHandlerCallbacks) {\n this.callbacks = callbacks;\n\n this.boundMouseMove = this.handleMouseMove.bind(this);\n this.boundMouseUp = this.handleMouseUp.bind(this);\n this.boundTouchMove = this.handleTouchMove.bind(this);\n this.boundTouchEnd = this.handleTouchEnd.bind(this);\n }\n\n attachDividerListeners(divider: HTMLElement, index: number): void {\n divider.addEventListener('mousedown', (e) => this.handleMouseDown(e, index, divider));\n divider.addEventListener('touchstart', (e) => this.handleTouchStart(e, index, divider), { passive: false });\n }\n\n private handleMouseDown(event: MouseEvent, dividerIndex: number, dividerElement: HTMLElement): void {\n event.preventDefault();\n this.startResize(event, dividerIndex, dividerElement);\n\n document.addEventListener('mousemove', this.boundMouseMove);\n document.addEventListener('mouseup', this.boundMouseUp);\n }\n\n private handleMouseMove(event: MouseEvent): void {\n if (!this.isActive) return;\n event.preventDefault();\n this.callbacks.onResizeMove(normalizePointerEvent(event));\n }\n\n private handleMouseUp(event: MouseEvent): void {\n if (!this.isActive) return;\n this.endResize(event);\n\n document.removeEventListener('mousemove', this.boundMouseMove);\n document.removeEventListener('mouseup', this.boundMouseUp);\n }\n\n private handleTouchStart(event: TouchEvent, dividerIndex: number, dividerElement: HTMLElement): void {\n event.preventDefault();\n this.startResize(event, dividerIndex, dividerElement);\n\n document.addEventListener('touchmove', this.boundTouchMove, { passive: false });\n document.addEventListener('touchend', this.boundTouchEnd);\n document.addEventListener('touchcancel', this.boundTouchEnd);\n }\n\n private handleTouchMove(event: TouchEvent): void {\n if (!this.isActive) return;\n event.preventDefault();\n this.callbacks.onResizeMove(normalizePointerEvent(event));\n }\n\n private handleTouchEnd(event: TouchEvent): void {\n if (!this.isActive) return;\n this.endResize(event);\n\n document.removeEventListener('touchmove', this.boundTouchMove);\n document.removeEventListener('touchend', this.boundTouchEnd);\n document.removeEventListener('touchcancel', this.boundTouchEnd);\n }\n\n private startResize(event: MouseEvent | TouchEvent, dividerIndex: number, dividerElement: HTMLElement): void {\n this.isActive = true;\n this.currentDividerIndex = dividerIndex;\n this.currentDividerElement = dividerElement;\n this.callbacks.onResizeStart(normalizePointerEvent(event), dividerIndex, dividerElement);\n }\n\n private endResize(event: MouseEvent | TouchEvent): void {\n this.callbacks.onResizeEnd(normalizePointerEvent(event));\n this.isActive = false;\n this.currentDividerIndex = -1;\n this.currentDividerElement = null;\n }\n\n dispose(): void {\n document.removeEventListener('mousemove', this.boundMouseMove);\n document.removeEventListener('mouseup', this.boundMouseUp);\n\n document.removeEventListener('touchmove', this.boundTouchMove);\n document.removeEventListener('touchend', this.boundTouchEnd);\n document.removeEventListener('touchcancel', this.boundTouchEnd);\n\n this.isActive = false;\n this.currentDividerIndex = -1;\n this.currentDividerElement = null;\n }\n\n getIsActive(): boolean {\n return this.isActive;\n }\n}\n","import type { Direction, Point, ResizeOperation } from '../types';\nimport { ResizeState } from '../types';\n\nexport interface ResizeManagerOptions {\n minPanelSize?: number;\n}\n\nexport class ResizeManager {\n private options: Required<ResizeManagerOptions>;\n\n constructor(options: ResizeManagerOptions = {}) {\n this.options = {\n minPanelSize: options.minPanelSize ?? 50,\n };\n }\n\n computePanelSizes(\n panels: HTMLElement[],\n orientation: Direction\n ): number[] {\n return panels.map((panel) => {\n const rect = panel.getBoundingClientRect();\n return orientation === 'horizontal' ? rect.width : rect.height;\n });\n }\n\n createResizeOperation(\n startPoint: Point,\n currentSizes: number[],\n dividerIndex: number,\n dividerElement: HTMLElement\n ): ResizeOperation {\n return {\n state: ResizeState.Resizing,\n startPosition: { ...startPoint },\n sizes: [...currentSizes],\n indexBefore: dividerIndex,\n indexAfter: dividerIndex + 1,\n dividerElement,\n };\n }\n\n calculatePreviewSizes(\n operation: ResizeOperation,\n currentPoint: Point,\n orientation: Direction\n ): number[] {\n const { startPosition, sizes, indexBefore, indexAfter } = operation;\n const delta =\n orientation === 'horizontal'\n ? currentPoint.x - startPosition.x\n : currentPoint.y - startPosition.y;\n\n const newSizes = [...sizes];\n const sizeBefore = sizes[indexBefore];\n const sizeAfter = sizes[indexAfter];\n\n let newSizeBefore = sizeBefore + delta;\n let newSizeAfter = sizeAfter - delta;\n\n // Apply minimum size constraints\n if (newSizeBefore < this.options.minPanelSize) {\n const adjustment = this.options.minPanelSize - newSizeBefore;\n newSizeBefore = this.options.minPanelSize;\n newSizeAfter -= adjustment;\n }\n\n if (newSizeAfter < this.options.minPanelSize) {\n const adjustment = this.options.minPanelSize - newSizeAfter;\n newSizeAfter = this.options.minPanelSize;\n newSizeBefore -= adjustment;\n }\n\n // Final clamp\n newSizeBefore = Math.max(newSizeBefore, this.options.minPanelSize);\n newSizeAfter = Math.max(newSizeAfter, this.options.minPanelSize);\n\n newSizes[indexBefore] = newSizeBefore;\n newSizes[indexAfter] = newSizeAfter;\n\n return newSizes;\n }\n\n setMinPanelSize(size: number): void {\n this.options.minPanelSize = size;\n }\n\n getMinPanelSize(): number {\n return this.options.minPanelSize;\n }\n}\n","// AUTO-GENERATED — do not edit by hand.\n// Source: splitter.styles.scss\n// Regenerate with the codegen-wc Nx target.\n\nimport { unsafeCSS } from 'lit';\n\nexport const splitterStyles = unsafeCSS(`:host {\n display: block;\n width: 100%;\n height: 100%;\n --mp-splitter-size: 8px;\n --mp-splitter-thumb-margin: 3px;\n --mp-splitter-divider-color: #eee;\n --mp-splitter-divider-hover-color: #1389fd;\n}\n\n:host([touch-mode]) {\n --mp-splitter-thumb-margin: 20px;\n}\n\n* {\n box-sizing: border-box;\n}\n\n.splitter-container {\n display: flex;\n width: 100%;\n height: 100%;\n}\n\n.splitter-container.horizontal {\n flex-direction: row;\n}\n\n.splitter-container.vertical {\n flex-direction: column;\n}\n\n.panel-wrapper {\n overflow: hidden;\n position: relative;\n}\n\n.panel-wrapper.flex-grow {\n flex: 1 1 0;\n}\n\n/* Divider base styles */\n.divider {\n flex-shrink: 0;\n transition: background-color 0.15s ease-in-out;\n z-index: 3;\n touch-action: none;\n}\n\n.divider::before {\n content: \"\";\n display: block;\n background-color: var(--mp-splitter-divider-color);\n background-position: center center;\n background-repeat: no-repeat;\n}\n\n.divider:hover::before,\n.divider.active::before {\n background-color: var(--mp-splitter-divider-hover-color);\n border-radius: calc(var(--mp-splitter-size) / 2);\n}\n\n/* Horizontal splitter styles */\n.splitter-container.horizontal > .divider {\n width: calc(var(--mp-splitter-size) + 2 * var(--mp-splitter-thumb-margin));\n height: 100%;\n cursor: col-resize;\n border-left: var(--mp-splitter-thumb-margin) solid transparent;\n border-right: var(--mp-splitter-thumb-margin) solid transparent;\n}\n\n.splitter-container.horizontal > .divider::before {\n height: 100%;\n width: var(--mp-splitter-size);\n margin: 0 auto;\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==);\n}\n\n.splitter-container.horizontal > .panel-wrapper:not(:first-child) {\n margin-left: calc(-1 * var(--mp-splitter-thumb-margin));\n}\n\n.splitter-container.horizontal > .panel-wrapper:not(:last-child) {\n margin-right: calc(-1 * var(--mp-splitter-thumb-margin));\n}\n\n/* Vertical splitter styles */\n.splitter-container.vertical > .divider {\n width: 100%;\n height: calc(var(--mp-splitter-size) + 2 * var(--mp-splitter-thumb-margin));\n cursor: row-resize;\n border-top: var(--mp-splitter-thumb-margin) solid transparent;\n border-bottom: var(--mp-splitter-thumb-margin) solid transparent;\n}\n\n.splitter-container.vertical > .divider::before {\n height: var(--mp-splitter-size);\n width: 100%;\n margin: auto 0;\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFCAMAAABl/6zIAAAABlBMVEUAAADMzMzIT8AyAAAAAXRSTlMAQObYZgAAABRJREFUeAFjYGRkwIMJSeMHlBkOABP7AEGzSuPKAAAAAElFTkSuQmCC);\n}\n\n.splitter-container.vertical > .panel-wrapper:not(:first-child) {\n margin-top: calc(-1 * var(--mp-splitter-thumb-margin));\n}\n\n.splitter-container.vertical > .panel-wrapper:not(:last-child) {\n margin-bottom: calc(-1 * var(--mp-splitter-thumb-margin));\n}\n\n/* Resizing state */\n:host([resizing]) .splitter-container {\n cursor: col-resize;\n user-select: none;\n}\n\n:host([resizing]) .splitter-container.vertical {\n cursor: row-resize;\n}\n\n/* Slot content styling */\n::slotted(*) {\n width: 100%;\n height: 100%;\n}`);\nexport default splitterStyles;\n","import { LitElement, html, type TemplateResult } from 'lit';\nimport { SplitterStateManager } from '../state';\nimport { InputHandler } from '../input';\nimport { ResizeManager } from '../managers';\nimport { splitterStyles } from '../styles';\nimport type { Direction, Point } from '../types';\n\nexport interface SplitterResizeEventDetail {\n sizes: number[];\n orientation: Direction;\n}\n\nexport class MpSplitter extends LitElement {\n static override styles = [splitterStyles];\n\n static override get observedAttributes(): string[] {\n return [\n ...(super.observedAttributes ?? []),\n 'orientation',\n 'min-panel-size',\n 'touch-mode',\n ];\n }\n\n private stateManager: SplitterStateManager;\n private inputHandler: InputHandler;\n private resizeManager: ResizeManager;\n\n private container: HTMLDivElement | null = null;\n private panelWrappers: HTMLDivElement[] = [];\n private dividers: HTMLDivElement[] = [];\n private slotElement: HTMLSlotElement | null = null;\n\n private mutationObserver: MutationObserver | null = null;\n private containerResizeObserver: ResizeObserver | null = null;\n private unsubscribeState: (() => void) | null = null;\n\n constructor() {\n super();\n\n this.stateManager = new SplitterStateManager();\n this.resizeManager = new ResizeManager();\n\n this.inputHandler = new InputHandler({\n onResizeStart: this.handleResizeStart.bind(this),\n onResizeMove: this.handleResizeMove.bind(this),\n onResizeEnd: this.handleResizeEnd.bind(this),\n });\n }\n\n override render(): TemplateResult {\n return html`\n <div class=\"splitter-container\"></div>\n <slot></slot>\n `;\n }\n\n protected override firstUpdated(): void {\n this.container = this.shadowRoot!.querySelector('.splitter-container') as HTMLDivElement;\n this.container.classList.add(this.orientation);\n\n this.slotElement = this.shadowRoot!.querySelector('slot') as HTMLSlotElement;\n // Hide the default slot - we'll project content ourselves via named slots.\n this.slotElement.style.display = 'none';\n this.slotElement.addEventListener('slotchange', () => {\n this.updatePanelsFromSlot();\n });\n\n this.setupMutationObserver();\n this.subscribeToState();\n this.setupContainerResizeObserver();\n\n // Initial setup after first render\n requestAnimationFrame(() => {\n this.updatePanelsFromSlot();\n });\n }\n\n override disconnectedCallback(): void {\n this.inputHandler.dispose();\n\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n this.mutationObserver = null;\n }\n\n if (this.containerResizeObserver) {\n this.containerResizeObserver.disconnect();\n this.containerResizeObserver = null;\n }\n\n if (this.unsubscribeState) {\n this.unsubscribeState();\n this.unsubscribeState = null;\n }\n super.disconnectedCallback();\n }\n\n override attributeChangedCallback(\n name: string,\n oldValue: string | null,\n newValue: string | null\n ): void {\n super.attributeChangedCallback(name, oldValue, newValue);\n if (oldValue === newValue) return;\n\n switch (name) {\n case 'orientation':\n this.stateManager.setOrientation(\n (newValue as Direction) || 'horizontal'\n );\n this.updateContainerOrientation();\n break;\n case 'min-panel-size':\n const parsedSize = newValue ? parseInt(newValue, 10) : 50;\n this.resizeManager.setMinPanelSize(!isNaN(parsedSize) ? parsedSize : 50);\n break;\n case 'touch-mode':\n // Handled by CSS via :host([touch-mode])\n break;\n }\n }\n\n // Public API\n get orientation(): Direction {\n return (this.getAttribute('orientation') as Direction) || 'horizontal';\n }\n\n set orientation(value: Direction) {\n this.setAttribute('orientation', value);\n }\n\n get minPanelSize(): number {\n const attr = this.getAttribute('min-panel-size');\n return attr ? parseInt(attr, 10) : 50;\n }\n\n set minPanelSize(value: number) {\n this.setAttribute('min-panel-size', String(value));\n }\n\n get touchMode(): boolean {\n return this.hasAttribute('touch-mode');\n }\n\n set touchMode(value: boolean) {\n if (value) {\n this.setAttribute('touch-mode', '');\n } else {\n this.removeAttribute('touch-mode');\n }\n }\n\n getPanelSizes(): number[] {\n return this.stateManager.getState().panelSizes;\n }\n\n setPanelSizes(sizes: number[]): void {\n this.applyPanelSizes(sizes);\n this.stateManager.setPanelSizes(sizes);\n }\n\n // Private methods\n private setupMutationObserver(): void {\n this.mutationObserver = new MutationObserver(() => {\n this.updatePanelsFromSlot();\n });\n\n this.mutationObserver.observe(this, {\n childList: true,\n subtree: false,\n });\n }\n\n private subscribeToState(): void {\n this.unsubscribeState = this.stateManager.subscribe((state) => {\n if (state.resizeOperation) {\n this.setAttribute('resizing', '');\n } else {\n this.removeAttribute('resizing');\n }\n });\n }\n\n private updatePanelsFromSlot(): void {\n if (!this.container) return;\n\n const children = Array.from(this.children).filter(\n (child) => child instanceof HTMLElement\n ) as HTMLElement[];\n\n if (children.length === 0) return;\n\n // Clear existing wrappers and dividers\n this.container.innerHTML = '';\n this.panelWrappers = [];\n this.dividers = [];\n\n // Create panel wrappers with slots for each child\n children.forEach((child, index) => {\n const wrapper = document.createElement('div');\n wrapper.className = 'panel-wrapper flex-grow';\n\n // Create a named slot for this child\n const namedSlot = document.createElement('slot');\n const slotName = `panel-${index}`;\n namedSlot.name = slotName;\n child.slot = slotName;\n\n wrapper.appendChild(namedSlot);\n this.panelWrappers.push(wrapper);\n this.container!.appendChild(wrapper);\n\n // Add divider between panels\n if (index < children.length - 1) {\n const divider = document.createElement('div');\n divider.className = 'divider';\n this.inputHandler.attachDividerListeners(divider, index);\n this.dividers.push(divider);\n this.container!.appendChild(divider);\n }\n });\n\n // Re-apply previously-stored sizes when the panel count still matches.\n // Two cases where this matters:\n // 1. setPanelSizes() was called before firstUpdated's raf populated\n // the wrappers (e.g., the dock schedules its own raf inside\n // renderSplit) — without this, the early call is silently dropped.\n // 2. Slot children change after a drag (e.g., layout re-render) — the\n // wrappers get recreated with `flex: 1 1 0` (equal sizes) and would\n // otherwise discard the user's drag result.\n const storedSizes = this.stateManager.getState().panelSizes;\n if (storedSizes.length > 0 && storedSizes.length === this.panelWrappers.length) {\n this.applyPanelSizes(storedSizes);\n // Consumer-supplied sizes (e.g., from the dock's renderSplit) often\n // sum to the full container size because the consumer doesn't know\n // mp-splitter's internal divider widths. Defer one raf so dividers\n // have laid out, then rescale stored sizes against the actual panel\n // space (container - dividers). Without this step ResizeObserver\n // alone can't catch the discrepancy because the container size\n // hasn't changed — only the panel/divider split inside it has.\n requestAnimationFrame(() => this.handleContainerResize());\n return;\n }\n\n // No stored sizes (or count mismatch) — pin from the measured layout\n // once the browser has run layout for the new wrappers. A nested raf\n // is needed because the wrappers were created in this very turn and\n // their getBoundingClientRect would return 0 if read synchronously.\n requestAnimationFrame(() => {\n const current = this.stateManager.getState().panelSizes;\n if (current.length === this.panelWrappers.length && current.length > 0) {\n // A consumer (e.g., the dock) called setPanelSizes() between our\n // raf scheduling and execution. Honour their values instead of\n // overwriting with measurements.\n this.applyPanelSizes(current);\n return;\n }\n this.pinSizesFromCurrentLayout();\n });\n }\n\n /**\n * Read each panel-wrapper's measured pixel size and persist it as the\n * authoritative panel size. After this runs, every wrapper carries an\n * inline `width` (or `height`) — content intrinsic size cannot leak into\n * the parent flex container, so a nested splitter's drag does not shift\n * the parent's layout.\n */\n private pinSizesFromCurrentLayout(): void {\n if (this.panelWrappers.length === 0) return;\n const sizeProperty = this.orientation === 'horizontal' ? 'width' : 'height';\n const measured = this.panelWrappers.map(\n (wrapper) => wrapper.getBoundingClientRect()[sizeProperty]\n );\n // Layout hasn't run yet for these wrappers — bail rather than write\n // 0 px sizes that would collapse every panel.\n if (measured.every((v) => v <= 0)) return;\n this.applyPanelSizes(measured);\n this.stateManager.setPanelSizes(measured);\n }\n\n private setupContainerResizeObserver(): void {\n if (!this.container || typeof ResizeObserver === 'undefined') return;\n this.containerResizeObserver = new ResizeObserver(() => {\n this.handleContainerResize();\n });\n this.containerResizeObserver.observe(this.container);\n }\n\n /**\n * When the splitter's container resizes (window resize, parent splitter\n * pinning its sizes, etc.), scale every panel-wrapper proportionally so\n * the existing ratios are preserved. Without this we'd be stuck with the\n * original pixel sizes when the surrounding viewport changes — what\n * `flex-basis: 0` gave master \"for free\".\n */\n private handleContainerResize(): void {\n if (!this.container || this.panelWrappers.length === 0) return;\n // applyPanelSizes runs continuously during a drag; its writes can fire\n // ResizeObserver via subpixel rounding. The drag math already keeps\n // panels summing to the container — don't fight it.\n if (this.stateManager.isResizing()) return;\n\n const stored = this.stateManager.getState().panelSizes;\n if (stored.length === 0 || stored.length !== this.panelWrappers.length) return;\n\n const rect = this.container.getBoundingClientRect();\n const containerSize = this.orientation === 'horizontal' ? rect.width : rect.height;\n if (containerSize <= 0) return;\n\n const dividerProperty = this.orientation === 'horizontal' ? 'width' : 'height';\n const dividerTotal = this.dividers.reduce(\n (sum, divider) => sum + divider.getBoundingClientRect()[dividerProperty],\n 0\n );\n // Adjacent panel-wrappers carry negative margins (`margin-left` /\n // `margin-right` of `-thumb-margin`) so they visually overlap the\n // divider's transparent borders. In the flex calculation those negative\n // margins reduce a divider's effective width contribution; if we ignore\n // them we under-target by 2 * (N-1) * thumb px and the container gets\n // a gap at the trailing edge.\n const startMarginProp = this.orientation === 'horizontal' ? 'marginLeft' : 'marginTop';\n const endMarginProp = this.orientation === 'horizontal' ? 'marginRight' : 'marginBottom';\n const marginTotal = this.panelWrappers.reduce((sum, wrapper) => {\n const cs = getComputedStyle(wrapper);\n return sum + parseFloat(cs[startMarginProp]) + parseFloat(cs[endMarginProp]);\n }, 0);\n const targetPanelTotal = Math.max(0, containerSize - dividerTotal - marginTotal);\n const previousPanelTotal = stored.reduce((a, b) => a + b, 0);\n if (previousPanelTotal <= 0) return;\n\n // Below 1 px we'd be amplifying our own subpixel writes. Skip.\n if (Math.abs(targetPanelTotal - previousPanelTotal) < 1) return;\n\n const scale = targetPanelTotal / previousPanelTotal;\n const newSizes = stored.map((s) => s * scale);\n this.applyPanelSizes(newSizes);\n this.stateManager.setPanelSizes(newSizes);\n }\n\n private updateContainerOrientation(): void {\n if (!this.container) return;\n\n this.container.className = `splitter-container ${this.orientation}`;\n }\n\n private handleResizeStart(\n event: { point: Point; originalEvent: MouseEvent | TouchEvent },\n dividerIndex: number,\n dividerElement: HTMLElement\n ): void {\n const sizes = this.resizeManager.computePanelSizes(\n this.panelWrappers,\n this.orientation\n );\n\n const operation = this.resizeManager.createResizeOperation(\n event.point,\n sizes,\n dividerIndex,\n dividerElement\n );\n\n this.stateManager.startResize(operation);\n dividerElement.classList.add('active');\n\n this.dispatchEvent(\n new CustomEvent<SplitterResizeEventDetail>('resize-start', {\n bubbles: true,\n detail: {\n sizes,\n orientation: this.orientation,\n },\n })\n );\n }\n\n private handleResizeMove(event: {\n point: Point;\n originalEvent: MouseEvent | TouchEvent;\n }): void {\n const state = this.stateManager.getState();\n if (!state.resizeOperation) return;\n\n const previewSizes = this.resizeManager.calculatePreviewSizes(\n state.resizeOperation,\n event.point,\n this.orientation\n );\n\n this.stateManager.updateResize(previewSizes);\n this.applyPanelSizes(previewSizes);\n\n this.dispatchEvent(\n new CustomEvent<SplitterResizeEventDetail>('resizing', {\n bubbles: true,\n detail: {\n sizes: previewSizes,\n orientation: this.orientation,\n },\n })\n );\n }\n\n private handleResizeEnd(_event: {\n point: Point;\n originalEvent: MouseEvent | TouchEvent;\n }): void {\n const state = this.stateManager.getState();\n if (!state.resizeOperation) return;\n\n const finalSizes = state.previewSizes || state.resizeOperation.sizes;\n\n if (state.resizeOperation.dividerElement) {\n state.resizeOperation.dividerElement.classList.remove('active');\n }\n\n this.stateManager.endResize(finalSizes);\n\n this.dispatchEvent(\n new CustomEvent<SplitterResizeEventDetail>('resize-end', {\n bubbles: true,\n detail: {\n sizes: finalSizes,\n orientation: this.orientation,\n },\n })\n );\n }\n\n private applyPanelSizes(sizes: number[]): void {\n const sizeProperty = this.orientation === 'horizontal' ? 'width' : 'height';\n const resetProperty =\n this.orientation === 'horizontal' ? 'height' : 'width';\n\n this.panelWrappers.forEach((wrapper, index) => {\n if (sizes[index] !== undefined) {\n wrapper.style[sizeProperty] = `${sizes[index]}px`;\n wrapper.style[resetProperty] = '';\n wrapper.classList.remove('flex-grow');\n }\n });\n }\n}\n\n// Auto-register the custom element\nif (\n typeof customElements !== 'undefined' &&\n !customElements.get('mp-splitter')\n) {\n customElements.define('mp-splitter', MpSplitter);\n}\n","// Main component export\nexport { MpSplitter } from './components';\nexport type { SplitterResizeEventDetail } from './components';\n\n// State management\nexport { SplitterStateManager } from './state';\nexport type { SplitterState, SplitterStateListener } from './state';\n\n// Types\nexport type { Direction, Point, ResizeOperation, PanelInfo } from './types';\nexport { ResizeState } from './types';\n\n// Managers\nexport { ResizeManager } from './managers';\nexport type { ResizeManagerOptions } from './managers';\n\n// Input handling\nexport { InputHandler, normalizePointerEvent } from './input';\nexport type { InputHandlerCallbacks, NormalizedPointerEvent } from './input';\n\n// Styles (for custom styling extensions)\nexport { splitterStyles } from './styles';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;IAEY;AAAZ,CAAA,UAAY,WAAW,EAAA;AACrB,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACvB,CAAC,EAHW,WAAW,KAAX,WAAW,GAAA,EAAA,CAAA,CAAA;;MCUV,oBAAoB,CAAA;AAI/B,IAAA,WAAA,CAAY,YAAqC,EAAA;AAFzC,QAAA,IAAA,CAAA,SAAS,GAA+B,IAAI,GAAG,EAAE;QAGvD,IAAI,CAAC,KAAK,GAAG;AACX,YAAA,WAAW,EAAE,YAAY;AACzB,YAAA,UAAU,EAAE,EAAE;AACd,YAAA,YAAY,EAAE,IAAI;AAClB,YAAA,eAAe,EAAE,IAAI;AACrB,YAAA,GAAG,YAAY;SAChB;IACH;IAEA,QAAQ,GAAA;AACN,QAAA,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE;IAC1B;AAEA,IAAA,SAAS,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AAC;QACjE;AAEA,QAAA,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,UAAU,CAAC;AAEvC,QAAA,IAAI,CAAC,aAAa,CAChB,IAAI,WAAW,CAA4B,YAAY,EAAE;AACvD,YAAA,OAAO,EAAE,IAAI;AACb,YAAA,MAAM,EAAE;AACN,gBAAA,KAAK,EAAE,UAAU;gBACjB,WAAW,EAAE,IAAI,CAAC,WAAW;AAC9B,aAAA;AACF,SAAA,CAAC,CACH;IACH;AAEQ,IAAA,eAAe,CAAC,KAAe,EAAA;AACrC,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,KAAK,YAAY,GAAG,OAAO,GAAG,QAAQ;AAC3E,QAAA,MAAM,aAAa,GACjB,IAAI,CAAC,WAAW,KAAK,YAAY,GAAG,QAAQ,GAAG,OAAO;QAExD,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,KAAI;AAC5C,YAAA,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,SAAS,EAAE;AAC9B,gBAAA,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAA,EAAG,KAAK,CAAC,KAAK,CAAC,CAAA,EAAA,CAAI;AACjD,gBAAA,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE;AACjC,gBAAA,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC;YACvC;AACF,QAAA,CAAC,CAAC;IACJ;;AAGF;AACA,IACE,OAAO,cAAc,KAAK,WAAW;AACrC,IAAA,CAAC,cAAc,CAAC,GAAG,CAAC,aAAa,CAAC,EAClC;AACA,IAAA,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC;AAClD;;ACpcA;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-web-components-splitter.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/types/resize-operation.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/state/splitter-state.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/input/pointer-event.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/input/input-handler.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/managers/resize-manager.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/styles/splitter.styles.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/components/mp-splitter.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/web-components/splitter/mintplayer-ng-bootstrap-web-components-splitter.ts"],"sourcesContent":["import type { Point } from './point';\n\nexport enum ResizeState {\n Idle = 'idle',\n Resizing = 'resizing',\n}\n\nexport interface ResizeOperation {\n state: ResizeState;\n startPosition: Point;\n sizes: number[];\n indexBefore: number;\n indexAfter: number;\n dividerElement: HTMLElement | null;\n}\n","import type { Direction, ResizeOperation } from '../types';\nimport { ResizeState } from '../types';\n\nexport interface SplitterState {\n orientation: Direction;\n panelSizes: number[];\n previewSizes: number[] | null;\n resizeOperation: ResizeOperation | null;\n}\n\nexport type SplitterStateListener = (state: SplitterState) => void;\n\nexport class SplitterStateManager {\n private state: SplitterState;\n private listeners: Set<SplitterStateListener> = new Set();\n\n constructor(initialState?: Partial<SplitterState>) {\n this.state = {\n orientation: 'horizontal',\n panelSizes: [],\n previewSizes: null,\n resizeOperation: null,\n ...initialState,\n };\n }\n\n getState(): SplitterState {\n return { ...this.state };\n }\n\n subscribe(listener: SplitterStateListener): () => void {\n this.listeners.add(listener);\n return () => {\n this.listeners.delete(listener);\n };\n }\n\n private notifyListeners(): void {\n const stateCopy = this.getState();\n for (const listener of this.listeners) {\n listener(stateCopy);\n }\n }\n\n setOrientation(orientation: Direction): void {\n if (this.state.orientation !== orientation) {\n this.state = { ...this.state, orientation };\n this.notifyListeners();\n }\n }\n\n setPanelSizes(sizes: number[]): void {\n this.state = { ...this.state, panelSizes: [...sizes] };\n this.notifyListeners();\n }\n\n setPreviewSizes(sizes: number[] | null): void {\n this.state = { ...this.state, previewSizes: sizes ? [...sizes] : null };\n this.notifyListeners();\n }\n\n startResize(operation: ResizeOperation): void {\n this.state = {\n ...this.state,\n resizeOperation: { ...operation },\n };\n this.notifyListeners();\n }\n\n updateResize(previewSizes: number[]): void {\n this.state = {\n ...this.state,\n previewSizes: [...previewSizes],\n };\n this.notifyListeners();\n }\n\n endResize(finalSizes: number[]): void {\n this.state = {\n ...this.state,\n panelSizes: [...finalSizes],\n previewSizes: null,\n resizeOperation: null,\n };\n this.notifyListeners();\n }\n\n cancelResize(): void {\n this.state = {\n ...this.state,\n previewSizes: null,\n resizeOperation: null,\n };\n this.notifyListeners();\n }\n\n isResizing(): boolean {\n return this.state.resizeOperation?.state === ResizeState.Resizing;\n }\n}\n","import type { Point } from '../types';\n\nexport interface NormalizedPointerEvent {\n clientX: number;\n clientY: number;\n point: Point;\n originalEvent: MouseEvent | TouchEvent;\n isTouch: boolean;\n}\n\nexport function normalizePointerEvent(\n event: MouseEvent | TouchEvent\n): NormalizedPointerEvent {\n const isTouch = 'touches' in event;\n\n let clientX: number;\n let clientY: number;\n\n if (isTouch) {\n const touch = (event as TouchEvent).touches[0] || (event as TouchEvent).changedTouches[0];\n clientX = touch.clientX;\n clientY = touch.clientY;\n } else {\n clientX = (event as MouseEvent).clientX;\n clientY = (event as MouseEvent).clientY;\n }\n\n return {\n clientX,\n clientY,\n point: { x: clientX, y: clientY },\n originalEvent: event,\n isTouch,\n };\n}\n","import type { NormalizedPointerEvent } from './pointer-event';\nimport { normalizePointerEvent } from './pointer-event';\n\nexport interface InputHandlerCallbacks {\n onResizeStart: (event: NormalizedPointerEvent, dividerIndex: number, dividerElement: HTMLElement) => void;\n onResizeMove: (event: NormalizedPointerEvent) => void;\n onResizeEnd: (event: NormalizedPointerEvent) => void;\n /**\n * Keyboard-driven resize. Fires once per arrow / Home / End keystroke on a\n * focused divider. Granularity is encoded as the boolean `fine` (Shift held)\n * — translation to percent/px lives in the splitter, not the input layer.\n */\n onResizeKey?: (key: ResizeKey, fine: boolean, dividerIndex: number, dividerElement: HTMLElement) => void;\n}\n\nexport type ResizeKey = 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown' | 'Home' | 'End';\n\nconst RESIZE_KEYS: ReadonlySet<string> = new Set([\n 'ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End',\n]);\n\nexport class InputHandler {\n private isActive = false;\n private currentDividerIndex = -1;\n private currentDividerElement: HTMLElement | null = null;\n private callbacks: InputHandlerCallbacks;\n\n private boundMouseMove: (e: MouseEvent) => void;\n private boundMouseUp: (e: MouseEvent) => void;\n private boundTouchMove: (e: TouchEvent) => void;\n private boundTouchEnd: (e: TouchEvent) => void;\n\n constructor(callbacks: InputHandlerCallbacks) {\n this.callbacks = callbacks;\n\n this.boundMouseMove = this.handleMouseMove.bind(this);\n this.boundMouseUp = this.handleMouseUp.bind(this);\n this.boundTouchMove = this.handleTouchMove.bind(this);\n this.boundTouchEnd = this.handleTouchEnd.bind(this);\n }\n\n attachDividerListeners(divider: HTMLElement, index: number): void {\n divider.addEventListener('mousedown', (e) => this.handleMouseDown(e, index, divider));\n divider.addEventListener('touchstart', (e) => this.handleTouchStart(e, index, divider), { passive: false });\n divider.addEventListener('keydown', (e) => this.handleKeyDown(e, index, divider));\n }\n\n private handleKeyDown(event: KeyboardEvent, dividerIndex: number, dividerElement: HTMLElement): void {\n if (!this.callbacks.onResizeKey) return;\n if (!RESIZE_KEYS.has(event.key)) return;\n event.preventDefault();\n this.callbacks.onResizeKey(event.key as ResizeKey, event.shiftKey, dividerIndex, dividerElement);\n }\n\n private handleMouseDown(event: MouseEvent, dividerIndex: number, dividerElement: HTMLElement): void {\n event.preventDefault();\n this.startResize(event, dividerIndex, dividerElement);\n\n document.addEventListener('mousemove', this.boundMouseMove);\n document.addEventListener('mouseup', this.boundMouseUp);\n }\n\n private handleMouseMove(event: MouseEvent): void {\n if (!this.isActive) return;\n event.preventDefault();\n this.callbacks.onResizeMove(normalizePointerEvent(event));\n }\n\n private handleMouseUp(event: MouseEvent): void {\n if (!this.isActive) return;\n this.endResize(event);\n\n document.removeEventListener('mousemove', this.boundMouseMove);\n document.removeEventListener('mouseup', this.boundMouseUp);\n }\n\n private handleTouchStart(event: TouchEvent, dividerIndex: number, dividerElement: HTMLElement): void {\n event.preventDefault();\n this.startResize(event, dividerIndex, dividerElement);\n\n document.addEventListener('touchmove', this.boundTouchMove, { passive: false });\n document.addEventListener('touchend', this.boundTouchEnd);\n document.addEventListener('touchcancel', this.boundTouchEnd);\n }\n\n private handleTouchMove(event: TouchEvent): void {\n if (!this.isActive) return;\n event.preventDefault();\n this.callbacks.onResizeMove(normalizePointerEvent(event));\n }\n\n private handleTouchEnd(event: TouchEvent): void {\n if (!this.isActive) return;\n this.endResize(event);\n\n document.removeEventListener('touchmove', this.boundTouchMove);\n document.removeEventListener('touchend', this.boundTouchEnd);\n document.removeEventListener('touchcancel', this.boundTouchEnd);\n }\n\n private startResize(event: MouseEvent | TouchEvent, dividerIndex: number, dividerElement: HTMLElement): void {\n this.isActive = true;\n this.currentDividerIndex = dividerIndex;\n this.currentDividerElement = dividerElement;\n this.callbacks.onResizeStart(normalizePointerEvent(event), dividerIndex, dividerElement);\n }\n\n private endResize(event: MouseEvent | TouchEvent): void {\n this.callbacks.onResizeEnd(normalizePointerEvent(event));\n this.isActive = false;\n this.currentDividerIndex = -1;\n this.currentDividerElement = null;\n }\n\n dispose(): void {\n document.removeEventListener('mousemove', this.boundMouseMove);\n document.removeEventListener('mouseup', this.boundMouseUp);\n\n document.removeEventListener('touchmove', this.boundTouchMove);\n document.removeEventListener('touchend', this.boundTouchEnd);\n document.removeEventListener('touchcancel', this.boundTouchEnd);\n\n this.isActive = false;\n this.currentDividerIndex = -1;\n this.currentDividerElement = null;\n }\n\n getIsActive(): boolean {\n return this.isActive;\n }\n}\n","import type { Direction, Point, ResizeOperation } from '../types';\nimport { ResizeState } from '../types';\n\nexport interface ResizeManagerOptions {\n minPanelSize?: number;\n}\n\nexport class ResizeManager {\n private options: Required<ResizeManagerOptions>;\n\n constructor(options: ResizeManagerOptions = {}) {\n this.options = {\n minPanelSize: options.minPanelSize ?? 50,\n };\n }\n\n computePanelSizes(\n panels: HTMLElement[],\n orientation: Direction\n ): number[] {\n return panels.map((panel) => {\n const rect = panel.getBoundingClientRect();\n return orientation === 'horizontal' ? rect.width : rect.height;\n });\n }\n\n createResizeOperation(\n startPoint: Point,\n currentSizes: number[],\n dividerIndex: number,\n dividerElement: HTMLElement\n ): ResizeOperation {\n return {\n state: ResizeState.Resizing,\n startPosition: { ...startPoint },\n sizes: [...currentSizes],\n indexBefore: dividerIndex,\n indexAfter: dividerIndex + 1,\n dividerElement,\n };\n }\n\n calculatePreviewSizes(\n operation: ResizeOperation,\n currentPoint: Point,\n orientation: Direction\n ): number[] {\n const { startPosition, sizes, indexBefore, indexAfter } = operation;\n const delta =\n orientation === 'horizontal'\n ? currentPoint.x - startPosition.x\n : currentPoint.y - startPosition.y;\n\n const newSizes = [...sizes];\n const sizeBefore = sizes[indexBefore];\n const sizeAfter = sizes[indexAfter];\n\n let newSizeBefore = sizeBefore + delta;\n let newSizeAfter = sizeAfter - delta;\n\n // Apply minimum size constraints\n if (newSizeBefore < this.options.minPanelSize) {\n const adjustment = this.options.minPanelSize - newSizeBefore;\n newSizeBefore = this.options.minPanelSize;\n newSizeAfter -= adjustment;\n }\n\n if (newSizeAfter < this.options.minPanelSize) {\n const adjustment = this.options.minPanelSize - newSizeAfter;\n newSizeAfter = this.options.minPanelSize;\n newSizeBefore -= adjustment;\n }\n\n // Final clamp\n newSizeBefore = Math.max(newSizeBefore, this.options.minPanelSize);\n newSizeAfter = Math.max(newSizeAfter, this.options.minPanelSize);\n\n newSizes[indexBefore] = newSizeBefore;\n newSizes[indexAfter] = newSizeAfter;\n\n return newSizes;\n }\n\n setMinPanelSize(size: number): void {\n this.options.minPanelSize = size;\n }\n\n getMinPanelSize(): number {\n return this.options.minPanelSize;\n }\n}\n","// AUTO-GENERATED — do not edit by hand.\n// Source: splitter.styles.scss\n// Regenerate with the codegen-wc Nx target.\n\nimport { unsafeCSS } from 'lit';\n\nexport const splitterStyles = unsafeCSS(`:host {\n display: block;\n width: 100%;\n height: 100%;\n --mp-splitter-size: 8px;\n --mp-splitter-thumb-margin: 3px;\n --mp-splitter-divider-color: #eee;\n --mp-splitter-divider-hover-color: #1389fd;\n}\n\n:host([touch-mode]) {\n --mp-splitter-thumb-margin: 20px;\n}\n\n* {\n box-sizing: border-box;\n}\n\n.splitter-container {\n display: flex;\n width: 100%;\n height: 100%;\n}\n\n.splitter-container.horizontal {\n flex-direction: row;\n}\n\n.splitter-container.vertical {\n flex-direction: column;\n}\n\n.panel-wrapper {\n overflow: hidden;\n position: relative;\n}\n\n.panel-wrapper.flex-grow {\n flex: 1 1 0;\n}\n\n/* Divider base styles */\n.divider {\n flex-shrink: 0;\n transition: background-color 0.15s ease-in-out;\n z-index: 3;\n touch-action: none;\n}\n\n.divider::before {\n content: \"\";\n display: block;\n background-color: var(--mp-splitter-divider-color);\n background-position: center center;\n background-repeat: no-repeat;\n}\n\n.divider:hover::before,\n.divider.active::before,\n.divider:focus-visible::before {\n background-color: var(--mp-splitter-divider-hover-color);\n border-radius: calc(var(--mp-splitter-size) / 2);\n}\n\n.divider:focus {\n outline: none;\n}\n\n.divider:focus-visible {\n outline: 2px solid var(--mp-splitter-divider-hover-color);\n outline-offset: 1px;\n}\n\n/* Horizontal splitter styles */\n.splitter-container.horizontal > .divider {\n width: calc(var(--mp-splitter-size) + 2 * var(--mp-splitter-thumb-margin));\n height: 100%;\n cursor: col-resize;\n border-left: var(--mp-splitter-thumb-margin) solid transparent;\n border-right: var(--mp-splitter-thumb-margin) solid transparent;\n}\n\n.splitter-container.horizontal > .divider::before {\n height: 100%;\n width: var(--mp-splitter-size);\n margin: 0 auto;\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==);\n}\n\n.splitter-container.horizontal > .panel-wrapper:not(:first-child) {\n margin-left: calc(-1 * var(--mp-splitter-thumb-margin));\n}\n\n.splitter-container.horizontal > .panel-wrapper:not(:last-child) {\n margin-right: calc(-1 * var(--mp-splitter-thumb-margin));\n}\n\n/* Vertical splitter styles */\n.splitter-container.vertical > .divider {\n width: 100%;\n height: calc(var(--mp-splitter-size) + 2 * var(--mp-splitter-thumb-margin));\n cursor: row-resize;\n border-top: var(--mp-splitter-thumb-margin) solid transparent;\n border-bottom: var(--mp-splitter-thumb-margin) solid transparent;\n}\n\n.splitter-container.vertical > .divider::before {\n height: var(--mp-splitter-size);\n width: 100%;\n margin: auto 0;\n background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAFCAMAAABl/6zIAAAABlBMVEUAAADMzMzIT8AyAAAAAXRSTlMAQObYZgAAABRJREFUeAFjYGRkwIMJSeMHlBkOABP7AEGzSuPKAAAAAElFTkSuQmCC);\n}\n\n.splitter-container.vertical > .panel-wrapper:not(:first-child) {\n margin-top: calc(-1 * var(--mp-splitter-thumb-margin));\n}\n\n.splitter-container.vertical > .panel-wrapper:not(:last-child) {\n margin-bottom: calc(-1 * var(--mp-splitter-thumb-margin));\n}\n\n/* Resizing state */\n:host([resizing]) .splitter-container {\n cursor: col-resize;\n user-select: none;\n}\n\n:host([resizing]) .splitter-container.vertical {\n cursor: row-resize;\n}\n\n/* Slot content styling */\n::slotted(*) {\n width: 100%;\n height: 100%;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .divider {\n transition: none !important;\n }\n}`);\nexport default splitterStyles;\n","import { LitElement, html, type TemplateResult } from 'lit';\nimport { SplitterStateManager } from '../state';\nimport { InputHandler, type ResizeKey } from '../input';\nimport { ResizeManager } from '../managers';\nimport { splitterStyles } from '../styles';\nimport type { Direction, Point } from '../types';\n\nexport interface SplitterResizeEventDetail {\n sizes: number[];\n orientation: Direction;\n}\n\nlet splitterInstanceCounter = 0;\n\n/**\n * `<mp-splitter>` — resizable panel splitter.\n *\n * Light-DOM children are projected into named slots (`panel-${i}`) inside a\n * shadow-DOM flex container with auto-inserted dividers between them. Drag a\n * divider to redistribute space; sizes survive container resize via a\n * proportional rescale.\n *\n * Pointer + keyboard interactions both flow through the same path:\n * - Pointer drag → `InputHandler` → `handleResizeStart/Move/End`.\n * - Arrow keys ±10% (Shift = ±1%), Home/End to limits → `handleResizeKey`.\n *\n * ARIA: each divider is a `role=\"separator\"` with `aria-orientation`,\n * `aria-controls` referencing the deterministic IDs of the two adjacent\n * panel wrappers, and percent-based `aria-valuenow / valuemin / valuemax`\n * that update on every drag-preview frame, container resize, and keystroke.\n *\n * Public API: `[orientation]`, `[min-panel-size]`, `[touch-mode]`;\n * `getPanelSizes()` / `setPanelSizes()`; events `resize-start`, `resizing`,\n * `resize-end` carrying `{ sizes, orientation }`.\n */\nexport class MpSplitter extends LitElement {\n static override styles = [splitterStyles];\n\n static override get observedAttributes(): string[] {\n return [\n ...(super.observedAttributes ?? []),\n 'orientation',\n 'min-panel-size',\n 'touch-mode',\n ];\n }\n\n private stateManager: SplitterStateManager;\n private inputHandler: InputHandler;\n private resizeManager: ResizeManager;\n\n private container: HTMLDivElement | null = null;\n private panelWrappers: HTMLDivElement[] = [];\n private dividers: HTMLDivElement[] = [];\n private slotElement: HTMLSlotElement | null = null;\n\n private mutationObserver: MutationObserver | null = null;\n private containerResizeObserver: ResizeObserver | null = null;\n private unsubscribeState: (() => void) | null = null;\n\n private readonly instanceId = `mp-splitter-${++splitterInstanceCounter}`;\n\n constructor() {\n super();\n\n this.stateManager = new SplitterStateManager();\n this.resizeManager = new ResizeManager();\n\n this.inputHandler = new InputHandler({\n onResizeStart: this.handleResizeStart.bind(this),\n onResizeMove: this.handleResizeMove.bind(this),\n onResizeEnd: this.handleResizeEnd.bind(this),\n onResizeKey: this.handleResizeKey.bind(this),\n });\n }\n\n override render(): TemplateResult {\n return html`\n <div class=\"splitter-container\"></div>\n <slot></slot>\n `;\n }\n\n protected override firstUpdated(): void {\n this.container = this.shadowRoot!.querySelector('.splitter-container') as HTMLDivElement;\n this.container.classList.add(this.orientation);\n\n this.slotElement = this.shadowRoot!.querySelector('slot') as HTMLSlotElement;\n // Hide the default slot - we'll project content ourselves via named slots.\n this.slotElement.style.display = 'none';\n this.slotElement.addEventListener('slotchange', () => {\n this.updatePanelsFromSlot();\n });\n\n this.setupMutationObserver();\n this.subscribeToState();\n this.setupContainerResizeObserver();\n\n // Initial setup after first render\n requestAnimationFrame(() => {\n this.updatePanelsFromSlot();\n });\n }\n\n override disconnectedCallback(): void {\n this.inputHandler.dispose();\n\n if (this.mutationObserver) {\n this.mutationObserver.disconnect();\n this.mutationObserver = null;\n }\n\n if (this.containerResizeObserver) {\n this.containerResizeObserver.disconnect();\n this.containerResizeObserver = null;\n }\n\n if (this.unsubscribeState) {\n this.unsubscribeState();\n this.unsubscribeState = null;\n }\n super.disconnectedCallback();\n }\n\n override attributeChangedCallback(\n name: string,\n oldValue: string | null,\n newValue: string | null\n ): void {\n super.attributeChangedCallback(name, oldValue, newValue);\n if (oldValue === newValue) return;\n\n switch (name) {\n case 'orientation':\n this.stateManager.setOrientation(\n (newValue as Direction) || 'horizontal'\n );\n this.updateContainerOrientation();\n break;\n case 'min-panel-size':\n const parsedSize = newValue ? parseInt(newValue, 10) : 50;\n this.resizeManager.setMinPanelSize(!isNaN(parsedSize) ? parsedSize : 50);\n break;\n case 'touch-mode':\n // Handled by CSS via :host([touch-mode])\n break;\n }\n }\n\n // Public API\n get orientation(): Direction {\n return (this.getAttribute('orientation') as Direction) || 'horizontal';\n }\n\n set orientation(value: Direction) {\n this.setAttribute('orientation', value);\n }\n\n get minPanelSize(): number {\n const attr = this.getAttribute('min-panel-size');\n return attr ? parseInt(attr, 10) : 50;\n }\n\n set minPanelSize(value: number) {\n this.setAttribute('min-panel-size', String(value));\n }\n\n get touchMode(): boolean {\n return this.hasAttribute('touch-mode');\n }\n\n set touchMode(value: boolean) {\n if (value) {\n this.setAttribute('touch-mode', '');\n } else {\n this.removeAttribute('touch-mode');\n }\n }\n\n getPanelSizes(): number[] {\n return this.stateManager.getState().panelSizes;\n }\n\n /**\n * Drive a keyboard-style resize on a divider programmatically. Used by the\n * dock manager's intersection-handle keymap so a single keystroke can\n * resize both the horizontal and vertical dividers a 2D handle sits on,\n * without re-implementing the percent-step + clamp math here.\n *\n * `key` is one of the keys handled by the divider keymap\n * (Arrow{Left,Right,Up,Down}, Home, End); `fine` halves the step (matches\n * Shift modifier on the keyboard path).\n */\n resizeDividerBy(dividerIndex: number, key: ResizeKey, fine = false): void {\n const divider = this.dividers[dividerIndex];\n if (!divider) return;\n this.handleResizeKey(key, fine, dividerIndex, divider);\n }\n\n setPanelSizes(sizes: number[]): void {\n this.applyPanelSizes(sizes);\n this.stateManager.setPanelSizes(sizes);\n }\n\n // Private methods\n private setupMutationObserver(): void {\n this.mutationObserver = new MutationObserver(() => {\n this.updatePanelsFromSlot();\n });\n\n this.mutationObserver.observe(this, {\n childList: true,\n subtree: false,\n });\n }\n\n private subscribeToState(): void {\n this.unsubscribeState = this.stateManager.subscribe((state) => {\n if (state.resizeOperation) {\n this.setAttribute('resizing', '');\n } else {\n this.removeAttribute('resizing');\n }\n this.updateDividerAriaValues();\n });\n }\n\n /**\n * Mirror current panel sizes to each divider's aria-valuenow / valuemin /\n * valuemax as percent of container. Per §10 Q3 of the WC ARIA PRD: percent\n * is more intuitive for SR users than pixels.\n *\n * Per-divider math: divider i sits between panels[i] and panels[i+1] and\n * \"owns\" the size of panels[i]. valuemin = minPanelSize as % of container;\n * valuemax = (panels[i].size + panels[i+1].size - minPanelSize) as %.\n */\n private updateDividerAriaValues(): void {\n if (this.dividers.length === 0 || !this.container) return;\n const state = this.stateManager.getState();\n const sizes = state.previewSizes ?? state.panelSizes;\n if (sizes.length !== this.panelWrappers.length || sizes.length === 0) return;\n const rect = this.container.getBoundingClientRect();\n const containerSize = this.orientation === 'horizontal' ? rect.width : rect.height;\n if (containerSize <= 0) return;\n const minPanelSize = this.resizeManager.getMinPanelSize();\n\n this.dividers.forEach((divider, i) => {\n const before = sizes[i];\n const after = sizes[i + 1];\n if (before === undefined || after === undefined) return;\n const valuenow = Math.round((before / containerSize) * 100);\n const valuemin = Math.round((minPanelSize / containerSize) * 100);\n const pairTotal = before + after;\n const valuemax = Math.round(((pairTotal - minPanelSize) / containerSize) * 100);\n divider.setAttribute('aria-valuenow', String(valuenow));\n divider.setAttribute('aria-valuemin', String(valuemin));\n divider.setAttribute('aria-valuemax', String(valuemax));\n });\n }\n\n private updatePanelsFromSlot(): void {\n if (!this.container) return;\n\n const children = Array.from(this.children).filter(\n (child) => child instanceof HTMLElement\n ) as HTMLElement[];\n\n if (children.length === 0) return;\n\n // Clear existing wrappers and dividers\n this.container.innerHTML = '';\n this.panelWrappers = [];\n this.dividers = [];\n\n // Create panel wrappers with slots for each child\n const panelCount = children.length;\n const dividerAriaOrientation = this.orientation === 'horizontal' ? 'vertical' : 'horizontal';\n children.forEach((child, index) => {\n const wrapper = document.createElement('div');\n wrapper.className = 'panel-wrapper flex-grow';\n wrapper.id = `${this.instanceId}-panel-${index}`;\n\n // Create a named slot for this child\n const namedSlot = document.createElement('slot');\n const slotName = `panel-${index}`;\n namedSlot.name = slotName;\n child.slot = slotName;\n\n wrapper.appendChild(namedSlot);\n this.panelWrappers.push(wrapper);\n this.container!.appendChild(wrapper);\n\n // Add divider between panels\n if (index < panelCount - 1) {\n const divider = document.createElement('div');\n divider.className = 'divider';\n divider.setAttribute('role', 'separator');\n divider.setAttribute('aria-orientation', dividerAriaOrientation);\n divider.setAttribute('tabindex', '0');\n divider.setAttribute(\n 'aria-controls',\n `${this.instanceId}-panel-${index} ${this.instanceId}-panel-${index + 1}`,\n );\n divider.setAttribute(\n 'aria-label',\n `Resize between panel ${index + 1} and panel ${index + 2}`,\n );\n this.inputHandler.attachDividerListeners(divider, index);\n this.dividers.push(divider);\n this.container!.appendChild(divider);\n }\n });\n\n // Re-apply previously-stored sizes when the panel count still matches.\n // Two cases where this matters:\n // 1. setPanelSizes() was called before firstUpdated's raf populated\n // the wrappers (e.g., the dock schedules its own raf inside\n // renderSplit) — without this, the early call is silently dropped.\n // 2. Slot children change after a drag (e.g., layout re-render) — the\n // wrappers get recreated with `flex: 1 1 0` (equal sizes) and would\n // otherwise discard the user's drag result.\n const storedSizes = this.stateManager.getState().panelSizes;\n if (storedSizes.length > 0 && storedSizes.length === this.panelWrappers.length) {\n this.applyPanelSizes(storedSizes);\n // Consumer-supplied sizes (e.g., from the dock's renderSplit) often\n // sum to the full container size because the consumer doesn't know\n // mp-splitter's internal divider widths. Defer one raf so dividers\n // have laid out, then rescale stored sizes against the actual panel\n // space (container - dividers). Without this step ResizeObserver\n // alone can't catch the discrepancy because the container size\n // hasn't changed — only the panel/divider split inside it has.\n requestAnimationFrame(() => this.handleContainerResize());\n return;\n }\n\n // No stored sizes (or count mismatch) — pin from the measured layout\n // once the browser has run layout for the new wrappers. A nested raf\n // is needed because the wrappers were created in this very turn and\n // their getBoundingClientRect would return 0 if read synchronously.\n requestAnimationFrame(() => {\n const current = this.stateManager.getState().panelSizes;\n if (current.length === this.panelWrappers.length && current.length > 0) {\n // A consumer (e.g., the dock) called setPanelSizes() between our\n // raf scheduling and execution. Honour their values instead of\n // overwriting with measurements.\n this.applyPanelSizes(current);\n return;\n }\n this.pinSizesFromCurrentLayout();\n });\n }\n\n /**\n * Read each panel-wrapper's measured pixel size and persist it as the\n * authoritative panel size. After this runs, every wrapper carries an\n * inline `width` (or `height`) — content intrinsic size cannot leak into\n * the parent flex container, so a nested splitter's drag does not shift\n * the parent's layout.\n */\n private pinSizesFromCurrentLayout(): void {\n if (this.panelWrappers.length === 0) return;\n const sizeProperty = this.orientation === 'horizontal' ? 'width' : 'height';\n const measured = this.panelWrappers.map(\n (wrapper) => wrapper.getBoundingClientRect()[sizeProperty]\n );\n // Layout hasn't run yet for these wrappers — bail rather than write\n // 0 px sizes that would collapse every panel.\n if (measured.every((v) => v <= 0)) return;\n this.applyPanelSizes(measured);\n this.stateManager.setPanelSizes(measured);\n }\n\n private setupContainerResizeObserver(): void {\n if (!this.container || typeof ResizeObserver === 'undefined') return;\n this.containerResizeObserver = new ResizeObserver(() => {\n this.handleContainerResize();\n });\n this.containerResizeObserver.observe(this.container);\n }\n\n /**\n * When the splitter's container resizes (window resize, parent splitter\n * pinning its sizes, etc.), scale every panel-wrapper proportionally so\n * the existing ratios are preserved. Without this we'd be stuck with the\n * original pixel sizes when the surrounding viewport changes — what\n * `flex-basis: 0` gave master \"for free\".\n */\n private handleContainerResize(): void {\n if (!this.container || this.panelWrappers.length === 0) return;\n // applyPanelSizes runs continuously during a drag; its writes can fire\n // ResizeObserver via subpixel rounding. The drag math already keeps\n // panels summing to the container — don't fight it.\n if (this.stateManager.isResizing()) return;\n\n const stored = this.stateManager.getState().panelSizes;\n if (stored.length === 0 || stored.length !== this.panelWrappers.length) return;\n\n const rect = this.container.getBoundingClientRect();\n const containerSize = this.orientation === 'horizontal' ? rect.width : rect.height;\n if (containerSize <= 0) return;\n\n const dividerProperty = this.orientation === 'horizontal' ? 'width' : 'height';\n const dividerTotal = this.dividers.reduce(\n (sum, divider) => sum + divider.getBoundingClientRect()[dividerProperty],\n 0\n );\n // Adjacent panel-wrappers carry negative margins (`margin-left` /\n // `margin-right` of `-thumb-margin`) so they visually overlap the\n // divider's transparent borders. In the flex calculation those negative\n // margins reduce a divider's effective width contribution; if we ignore\n // them we under-target by 2 * (N-1) * thumb px and the container gets\n // a gap at the trailing edge.\n const startMarginProp = this.orientation === 'horizontal' ? 'marginLeft' : 'marginTop';\n const endMarginProp = this.orientation === 'horizontal' ? 'marginRight' : 'marginBottom';\n const marginTotal = this.panelWrappers.reduce((sum, wrapper) => {\n const cs = getComputedStyle(wrapper);\n return sum + parseFloat(cs[startMarginProp]) + parseFloat(cs[endMarginProp]);\n }, 0);\n const targetPanelTotal = Math.max(0, containerSize - dividerTotal - marginTotal);\n const previousPanelTotal = stored.reduce((a, b) => a + b, 0);\n if (previousPanelTotal <= 0) return;\n\n // Below 1 px we'd be amplifying our own subpixel writes. Skip.\n if (Math.abs(targetPanelTotal - previousPanelTotal) < 1) return;\n\n const scale = targetPanelTotal / previousPanelTotal;\n const newSizes = stored.map((s) => s * scale);\n this.applyPanelSizes(newSizes);\n this.stateManager.setPanelSizes(newSizes);\n this.updateDividerAriaValues();\n }\n\n private updateContainerOrientation(): void {\n if (!this.container) return;\n\n this.container.className = `splitter-container ${this.orientation}`;\n\n const dividerAriaOrientation = this.orientation === 'horizontal' ? 'vertical' : 'horizontal';\n this.dividers.forEach((divider) => {\n divider.setAttribute('aria-orientation', dividerAriaOrientation);\n });\n }\n\n private handleResizeStart(\n event: { point: Point; originalEvent: MouseEvent | TouchEvent },\n dividerIndex: number,\n dividerElement: HTMLElement\n ): void {\n const sizes = this.resizeManager.computePanelSizes(\n this.panelWrappers,\n this.orientation\n );\n\n const operation = this.resizeManager.createResizeOperation(\n event.point,\n sizes,\n dividerIndex,\n dividerElement\n );\n\n this.stateManager.startResize(operation);\n dividerElement.classList.add('active');\n\n this.dispatchEvent(\n new CustomEvent<SplitterResizeEventDetail>('resize-start', {\n bubbles: true,\n detail: {\n sizes,\n orientation: this.orientation,\n },\n })\n );\n }\n\n private handleResizeMove(event: {\n point: Point;\n originalEvent: MouseEvent | TouchEvent;\n }): void {\n const state = this.stateManager.getState();\n if (!state.resizeOperation) return;\n\n const previewSizes = this.resizeManager.calculatePreviewSizes(\n state.resizeOperation,\n event.point,\n this.orientation\n );\n\n this.stateManager.updateResize(previewSizes);\n this.applyPanelSizes(previewSizes);\n\n this.dispatchEvent(\n new CustomEvent<SplitterResizeEventDetail>('resizing', {\n bubbles: true,\n detail: {\n sizes: previewSizes,\n orientation: this.orientation,\n },\n })\n );\n }\n\n private handleResizeEnd(_event: {\n point: Point;\n originalEvent: MouseEvent | TouchEvent;\n }): void {\n const state = this.stateManager.getState();\n if (!state.resizeOperation) return;\n\n const finalSizes = state.previewSizes || state.resizeOperation.sizes;\n\n if (state.resizeOperation.dividerElement) {\n state.resizeOperation.dividerElement.classList.remove('active');\n }\n\n this.stateManager.endResize(finalSizes);\n\n this.dispatchEvent(\n new CustomEvent<SplitterResizeEventDetail>('resize-end', {\n bubbles: true,\n detail: {\n sizes: finalSizes,\n orientation: this.orientation,\n },\n })\n );\n }\n\n /**\n * Keyboard-driven resize on a focused divider. ArrowKeys ±10% (Shift = ±1%)\n * along the splitter's axis; Home/End shrink/grow panelBefore to its limit.\n * Fires resize-start → resize-end with the new sizes so consumers don't\n * need to special-case keyboard vs. drag.\n */\n private handleResizeKey(\n key: ResizeKey,\n fine: boolean,\n dividerIndex: number,\n dividerElement: HTMLElement,\n ): void {\n if (!this.container) return;\n if (this.panelWrappers.length === 0) return;\n\n const sizes = [...this.stateManager.getState().panelSizes];\n if (sizes.length !== this.panelWrappers.length) return;\n\n const before = sizes[dividerIndex];\n const after = sizes[dividerIndex + 1];\n if (before === undefined || after === undefined) return;\n\n const rect = this.container.getBoundingClientRect();\n const containerSize = this.orientation === 'horizontal' ? rect.width : rect.height;\n if (containerSize <= 0) return;\n const minPanelSize = this.resizeManager.getMinPanelSize();\n\n const isHorizontal = this.orientation === 'horizontal';\n const positive = isHorizontal ? 'ArrowRight' : 'ArrowDown';\n const negative = isHorizontal ? 'ArrowLeft' : 'ArrowUp';\n\n let direction: 1 | -1 | 0 = 0;\n if (key === positive) direction = 1;\n else if (key === negative) direction = -1;\n\n let newBefore: number;\n let newAfter: number;\n if (key === 'Home') {\n newBefore = minPanelSize;\n newAfter = before + after - minPanelSize;\n } else if (key === 'End') {\n newBefore = before + after - minPanelSize;\n newAfter = minPanelSize;\n } else if (direction !== 0) {\n const stepPercent = fine ? 1 : 10;\n const deltaPx = (stepPercent / 100) * containerSize * direction;\n newBefore = before + deltaPx;\n newAfter = after - deltaPx;\n // Clamp to min on both sides — symmetric with the pointer path in\n // ResizeManager.calculatePreviewSizes.\n if (newBefore < minPanelSize) {\n newBefore = minPanelSize;\n newAfter = before + after - minPanelSize;\n } else if (newAfter < minPanelSize) {\n newAfter = minPanelSize;\n newBefore = before + after - minPanelSize;\n }\n } else {\n // Off-axis arrow — silently ignored.\n return;\n }\n\n if (newBefore === before && newAfter === after) return;\n\n sizes[dividerIndex] = newBefore;\n sizes[dividerIndex + 1] = newAfter;\n\n this.applyPanelSizes(sizes);\n this.stateManager.setPanelSizes(sizes);\n this.updateDividerAriaValues();\n\n dividerElement.classList.add('active');\n queueMicrotask(() => dividerElement.classList.remove('active'));\n\n this.dispatchEvent(\n new CustomEvent<SplitterResizeEventDetail>('resize-end', {\n bubbles: true,\n detail: { sizes, orientation: this.orientation },\n }),\n );\n }\n\n private applyPanelSizes(sizes: number[]): void {\n const sizeProperty = this.orientation === 'horizontal' ? 'width' : 'height';\n const resetProperty =\n this.orientation === 'horizontal' ? 'height' : 'width';\n\n this.panelWrappers.forEach((wrapper, index) => {\n if (sizes[index] !== undefined) {\n wrapper.style[sizeProperty] = `${sizes[index]}px`;\n wrapper.style[resetProperty] = '';\n wrapper.classList.remove('flex-grow');\n }\n });\n }\n}\n\n// Auto-register the custom element\nif (\n typeof customElements !== 'undefined' &&\n !customElements.get('mp-splitter')\n) {\n customElements.define('mp-splitter', MpSplitter);\n}\n","// Main component export\nexport { MpSplitter } from './components';\nexport type { SplitterResizeEventDetail } from './components';\n\n// State management\nexport { SplitterStateManager } from './state';\nexport type { SplitterState, SplitterStateListener } from './state';\n\n// Types\nexport type { Direction, Point, ResizeOperation, PanelInfo } from './types';\nexport { ResizeState } from './types';\n\n// Managers\nexport { ResizeManager } from './managers';\nexport type { ResizeManagerOptions } from './managers';\n\n// Input handling\nexport { InputHandler, normalizePointerEvent } from './input';\nexport type { InputHandlerCallbacks, NormalizedPointerEvent } from './input';\n\n// Styles (for custom styling extensions)\nexport { splitterStyles } from './styles';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;IAEY;AAAZ,CAAA,UAAY,WAAW,EAAA;AACrB,IAAA,WAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,WAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACvB,CAAC,EAHW,WAAW,KAAX,WAAW,GAAA,EAAA,CAAA,CAAA;;MCUV,oBAAoB,CAAA;AAI/B,IAAA,WAAA,CAAY,YAAqC,EAAA;AAFzC,QAAA,IAAA,CAAA,SAAS,GAA+B,IAAI,GAAG,EAAE;QAGvD,IAAI,CAAC,KAAK,GAAG;AACX,YAAA,WAAW,EAAE,YAAY;AACzB,YAAA,UAAU,EAAE,EAAE;AACd,YAAA,YAAY,EAAE,IAAI;AAClB,YAAA,eAAe,EAAE,IAAI;AACrB,YAAA,GAAG,YAAY;SAChB;IACH;IAEA,QAAQ,GAAA;AACN,QAAA,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE;IAC1B;AAEA,IAAA,SAAS,CAAC,QAA+B,EAAA;AACvC,QAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC;AAC5B,QAAA,OAAO,MAAK;AACV,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC;AACjC,QAAA,CAAC;IACH;IAEQ,eAAe,GAAA;AACrB,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,EAAE;AACjC,QAAA,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,SAAS,EAAE;YACrC,QAAQ,CAAC,SAAS,CAAC;QACrB;IACF;AAEA,IAAA,cAAc,CAAC,WAAsB,EAAA;QACnC,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,KAAK,WAAW,EAAE;YAC1C,IAAI,CAAC,KAAK,GAAG,EAAE,GAAG,IAAI,CAAC,K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C,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,KAAK,YAAY,GAAG,OAAO,GAAG,QAAQ;AAC3E,QAAA,MAAM,aAAa,GACjB,IAAI,CAAC,WAAW,KAAK,YAAY,GAAG,QAAQ,GAAG,OAAO;QAExD,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,KAAI;AAC5C,YAAA,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,SAAS,EAAE;AAC9B,gBAAA,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,CAAA,EAAG,KAAK,CAAC,KAAK,CAAC,CAAA,EAAA,CAAI;AACjD,gBAAA,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE;AACjC,gBAAA,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC;YACvC;AACF,QAAA,CAAC,CAAC;IACJ;;AAGF;AACA,IACE,OAAO,cAAc,KAAK,WAAW;AACrC,IAAA,CAAC,cAAc,CAAC,GAAG,CAAC,aAAa,CAAC,EAClC;AACA,IAAA,cAAc,CAAC,MAAM,CAAC,aAAa,EAAE,UAAU,CAAC;AAClD;;ACtnBA;;ACAA;;AAEG;;;;"}
@@ -371,6 +371,10 @@ class MpTabControl extends LitElement {
371
371
  const content = html `
372
372
  <div
373
373
  class="tab-content flex-grow-1 overflow-auto${borderClass}"
374
+ role=${activeId ? 'tabpanel' : nothing}
375
+ id=${activeId ? `${activeId}-panel` : nothing}
376
+ aria-labelledby=${activeId ? `${activeId}-header-button` : nothing}
377
+ tabindex=${activeId ? '0' : nothing}
374
378
  >
375
379
  <slot name=${activeId ? `${activeId}-content` : '__none__'}></slot>
376
380
  </div>