@mintplayer/web-components 2.16.0 → 2.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/accordion/index.mjs +5 -5
  2. package/calendar/index.mjs +1 -1
  3. package/carousel/index.mjs +57 -143
  4. package/charts/core/index.mjs +30 -20
  5. package/charts/core/src/attributes.d.ts +18 -0
  6. package/charts/core/src/index.d.ts +2 -0
  7. package/charts/core/src/view-window.d.ts +46 -0
  8. package/charts/hierarchy/index.mjs +245 -256
  9. package/charts/hierarchy/src/components/mp-hierarchy-chart.d.ts +1 -3
  10. package/charts/sparkline/index.mjs +27 -26
  11. package/charts/trend/index.mjs +21 -20
  12. package/checkbox/index.mjs +1 -1
  13. package/checkbox/src/components/mp-checkbox.d.ts +1 -0
  14. package/chunks/attributes-L3eKsbdy.mjs +16 -0
  15. package/chunks/color-mode-warning-71FmlzWX.mjs +13 -0
  16. package/chunks/{form-check.styles-B0pxJ6YC.mjs → form-check.styles-DqvBnspm.mjs} +24 -3
  17. package/chunks/{mp-calendar.element-CJ8-t-Zn.mjs → mp-calendar.element-BIHS9SZZ.mjs} +11 -6
  18. package/chunks/{mp-checkbox-CzwS7Y_t.mjs → mp-checkbox-zV83gILn.mjs} +44 -36
  19. package/chunks/{mp-datatable-B7st6G-I.mjs → mp-datatable-CEpSxlkd.mjs} +660 -357
  20. package/chunks/{mp-datetime-picker.element-DsWA1AFs.mjs → mp-datetime-picker.element-Cxu5-qRE.mjs} +29 -32
  21. package/chunks/{mp-pagination-Dea75mD4.mjs → mp-pagination-hGy4dL7p.mjs} +9 -4
  22. package/chunks/{mp-radio-cL46sUA0.mjs → mp-radio-BhRVNdKp.mjs} +32 -28
  23. package/chunks/{mp-select-BNrbPwN4.mjs → mp-select-CgqYFvUj.mjs} +41 -26
  24. package/chunks/{mp-splitter-Ckn1kN4v.mjs → mp-splitter-DLehrw3Y.mjs} +144 -120
  25. package/chunks/{mp-timepicker.element-CwaAAOcm.mjs → mp-timepicker.element-BiB9lkgc.mjs} +58 -45
  26. package/chunks/{mp-toggle-button-eo_aTQtu.mjs → mp-toggle-button-CaS9uYLE.mjs} +26 -24
  27. package/chunks/{mp-treeview-C8iltDbq.mjs → mp-treeview-CaMTDrvY.mjs} +51 -50
  28. package/chunks/{overlay-controller-DifgO6jT.mjs → overlay-controller-BHDagokg.mjs} +96 -92
  29. package/chunks/{id-DNZVAnGC.mjs → resource.service--lqLwEqk.mjs} +144 -206
  30. package/chunks/view-window-DGvFiDnW.mjs +263 -0
  31. package/code-snippet/index.mjs +70 -66
  32. package/code-snippet/src/hljs-loaders.generated.d.ts +1 -1
  33. package/custom-elements.json +66193 -0
  34. package/datatable/index.mjs +1 -1
  35. package/datatable/src/components/column-resize.d.ts +11 -0
  36. package/datatable/src/components/index.d.ts +1 -1
  37. package/datatable/src/components/mp-datatable.d.ts +264 -20
  38. package/datatable/src/index.d.ts +1 -1
  39. package/datatable/src/types/labels.d.ts +11 -0
  40. package/datepicker/index.mjs +10 -9
  41. package/datetime-picker/index.mjs +1 -1
  42. package/datetime-picker/src/mp-datetime-picker.element.d.ts +3 -0
  43. package/dock/index.mjs +430 -463
  44. package/dock/src/components/mint-dock-manager.element.d.ts +25 -2
  45. package/dock/src/core/resize.d.ts +60 -0
  46. package/dropdown-menu/index.mjs +4 -2
  47. package/dropdown-menu/src/components/mp-dropdown-menu.d.ts +6 -1
  48. package/dropdown-menu/src/index.d.ts +1 -1
  49. package/dropdown-menu/src/types/dropdown.d.ts +14 -1
  50. package/dropdown-menu/src/types/index.d.ts +1 -1
  51. package/file-manager/index.mjs +63 -61
  52. package/file-manager/src/components/mp-file-manager.d.ts +4 -3
  53. package/multi-range/index.mjs +56 -50
  54. package/multi-range/src/mint-multi-range.element.d.ts +4 -10
  55. package/multi-range/src/pointer-geometry.d.ts +31 -0
  56. package/navbar/index.mjs +89 -439
  57. package/overlay/index.mjs +1 -1
  58. package/overlay/src/overlay-controller.d.ts +0 -14
  59. package/overlay/src/placement.d.ts +48 -0
  60. package/package.json +7 -1
  61. package/pagination/index.mjs +1 -1
  62. package/phone-input/index.mjs +44 -40
  63. package/phone-input/src/components/stack.d.ts +8 -0
  64. package/query-builder/index.mjs +418 -466
  65. package/query-builder/src/dnd/drag-controller.d.ts +12 -8
  66. package/query-builder/src/mp-query-builder.element.d.ts +5 -1
  67. package/query-builder/src/mp-query-condition.element.d.ts +1 -0
  68. package/radio/index.mjs +1 -1
  69. package/radio-group/index.mjs +1 -1
  70. package/ribbon/index.mjs +477 -498
  71. package/ribbon/src/core/band-text-color.d.ts +10 -0
  72. package/ribbon/src/core/key-tip-allocator.d.ts +10 -0
  73. package/ribbon/src/core/plan-reduce-steps.d.ts +62 -0
  74. package/ribbon/src/mp-ribbon.element.d.ts +0 -27
  75. package/scheduler/index.mjs +726 -711
  76. package/scheduler/src/components/mp-scheduler.d.ts +19 -3
  77. package/scheduler/src/drag/drag-manager.d.ts +1 -9
  78. package/scheduler/src/input/input-handler.d.ts +12 -2
  79. package/scheduler/src/utils/geometry.d.ts +39 -0
  80. package/scheduler/src/views/timeline-view.d.ts +0 -1
  81. package/scheduler-core/index.mjs +84 -71
  82. package/scheduler-core/src/services/resource.service.d.ts +0 -12
  83. package/scheduler-core/src/services/timeline.service.d.ts +0 -9
  84. package/select/index.mjs +1 -1
  85. package/select/src/components/mp-select.d.ts +1 -0
  86. package/signature-pad/index.mjs +21 -23
  87. package/signature-pad/src/canvas-point.d.ts +26 -0
  88. package/signature-pad/src/mp-signature-pad.element.d.ts +1 -7
  89. package/splitter/index.mjs +1 -1
  90. package/splitter/src/components/mp-splitter.d.ts +16 -0
  91. package/splitter/src/managers/index.d.ts +1 -0
  92. package/splitter/src/managers/rescale-panel-sizes.d.ts +14 -0
  93. package/swiper-core/index.mjs +2 -2
  94. package/theming/bs-theme-preboot.js +1 -0
  95. package/theming/color-mode.css +36 -0
  96. package/theming/index.d.ts +1 -0
  97. package/theming/index.mjs +327 -0
  98. package/theming/src/components/mp-theme-toggle.d.ts +71 -0
  99. package/theming/src/cookie.d.ts +31 -0
  100. package/theming/src/index.d.ts +5 -0
  101. package/theming/src/preboot.d.ts +1 -0
  102. package/theming/src/resolve.d.ts +36 -0
  103. package/theming/src/store.d.ts +27 -0
  104. package/theming/src/styles/theme-toggle.styles.d.ts +2 -0
  105. package/theming/src/testing/fake-broadcast-channel.d.ts +35 -0
  106. package/theming/src/toggle-modes.d.ts +23 -0
  107. package/tile-manager/index.mjs +252 -211
  108. package/tile-manager/src/components/mint-tile-manager.element.d.ts +8 -0
  109. package/tile-manager/src/utils/grid-geometry.d.ts +49 -0
  110. package/timeline/index.mjs +156 -164
  111. package/timeline/src/components/mp-timeline.d.ts +41 -7
  112. package/timepicker/index.mjs +7 -4
  113. package/timepicker/src/mp-time-list.element.d.ts +26 -0
  114. package/timepicker/src/mp-timepicker.element.d.ts +3 -0
  115. package/toggle-button/index.mjs +1 -1
  116. package/tree-select/index.mjs +21 -9
  117. package/treeview/index.mjs +1 -1
  118. package/treeview/src/components/mp-treeview.d.ts +6 -4
  119. package/chunks/color-DIeST-IS.mjs +0 -224
  120. package/query-builder/src/mp-query-condition.element.template.d.ts +0 -2
@@ -131,6 +131,11 @@ export declare class MpScheduler extends LitElement {
131
131
  set options(value: Partial<SchedulerOptions>);
132
132
  get selectedEvent(): SchedulerEvent | null;
133
133
  set selectedEvent(value: SchedulerEvent | null);
134
+ /**
135
+ * The active time-range selection: the same range `selection-change`
136
+ * reports, and the one Enter turns into an `event-create` request. Not the
137
+ * drag or move-mode preview, which is transient and never a selection.
138
+ */
134
139
  get selectedRange(): {
135
140
  start: Date;
136
141
  end: Date;
@@ -520,11 +525,14 @@ export declare class MpScheduler extends LitElement {
520
525
  */
521
526
  private applyHeaderLabels;
522
527
  private updateUI;
528
+ private cancelPendingDragUpdate;
523
529
  private scheduleDragUpdate;
524
530
  private handlePointerDown;
525
531
  private allowsGesture;
526
532
  private handlePointerMove;
527
533
  private handlePointerUp;
534
+ /** Abandon a pointer drag without committing it (the platform cancelled the touch). */
535
+ private cancelPointerDrag;
528
536
  /** Distance from a scroller edge at which auto-scroll engages. */
529
537
  private static readonly EDGE_SCROLL_ZONE_PX;
530
538
  /** Fastest scroll step, in px per frame, reached at the very edge. */
@@ -709,9 +717,10 @@ export declare class MpScheduler extends LitElement {
709
717
  */
710
718
  private scrollAndFocusDateCell;
711
719
  /**
712
- * Emit `event-create` covering the focused day (month view) or focused
713
- * month (year view). No internal mutation per PRD
714
- * scheduler-controlled-selection — consumer constructs the actual event.
720
+ * Emit `event-create` covering the focused day (month view). No internal
721
+ * mutation per PRD scheduler-controlled-selection — consumer constructs the
722
+ * actual event. (Year view's Enter drills into the month instead, so there
723
+ * is no month-spanning variant.)
715
724
  */
716
725
  private commitFocusedDateAsCreate;
717
726
  private moveCellByTime;
@@ -856,6 +865,13 @@ export declare class MpScheduler extends LitElement {
856
865
  private cancelEventMoveMode;
857
866
  private startNowIndicatorTimer;
858
867
  private stopNowIndicatorTimer;
868
+ /**
869
+ * The one hit-test seam (PRD test-coverage P2-D4): which elements sit under a
870
+ * viewport point, topmost first. Every pointer-to-slot resolution goes
871
+ * through here, so a spec can answer "what is under the pointer" without
872
+ * inventing a single rect value.
873
+ */
874
+ private elementsAt;
859
875
  private getSlotAtPosition;
860
876
  private getSlotFromElement;
861
877
  }
@@ -1,4 +1,4 @@
1
- import { SchedulerEvent, TimeSlot } from '@mintplayer/web-components/scheduler-core';
1
+ import { TimeSlot } from '@mintplayer/web-components/scheduler-core';
2
2
  import { SchedulerStateManager } from '../state/scheduler-state';
3
3
  import { DragConfig, DragCompletionResult, PointerTarget } from './drag-types';
4
4
  import { NormalizedPointerEvent } from '../input/pointer-event';
@@ -67,14 +67,6 @@ export declare class DragManager {
67
67
  * Clean up resources.
68
68
  */
69
69
  destroy(): void;
70
- /**
71
- * Create a new event from a completed create drag.
72
- */
73
- createEventFromResult(result: DragCompletionResult): SchedulerEvent;
74
- /**
75
- * Update an event from a completed move/resize drag.
76
- */
77
- updateEventFromResult(result: DragCompletionResult, event: SchedulerEvent): SchedulerEvent;
78
70
  /**
79
71
  * Process pending pointer move using RAF.
80
72
  */
@@ -19,6 +19,8 @@ export interface InputHandlerCallbacks {
19
19
  onTouchDragActivated?: () => void;
20
20
  /** Called when touch drag mode is deactivated */
21
21
  onTouchDragDeactivated?: () => void;
22
+ /** Called when the platform cancels an active touch drag; the drag must be abandoned, not committed */
23
+ onPointerCancel?: () => void;
22
24
  /** Called to get the scrollable container for panning */
23
25
  getScrollContainer?: () => HTMLElement | null;
24
26
  }
@@ -66,7 +68,8 @@ export declare class InputHandler {
66
68
  private touchStartPosition;
67
69
  private isTouchDragMode;
68
70
  private touchHoldTarget;
69
- private touchHoldPointer;
71
+ /** The element the current gesture started on; see bindGestureElement. */
72
+ private gestureElement;
70
73
  private isPanMode;
71
74
  private panStartPosition;
72
75
  private panStartScroll;
@@ -115,12 +118,19 @@ export declare class InputHandler {
115
118
  private handleTouchMove;
116
119
  private handleTouchEnd;
117
120
  private handleTouchCancel;
121
+ /**
122
+ * Listen for the rest of the gesture on the element the touch started on.
123
+ * At most one element is bound at a time, and it is released when the
124
+ * gesture ends — before, every touchstart added three listeners that were
125
+ * never removed.
126
+ */
127
+ private bindGestureElement;
128
+ private unbindGestureElement;
118
129
  private activateTouchDragMode;
119
130
  private cancelTouchHold;
120
131
  private exitTouchDragMode;
121
132
  private addTouchFeedback;
122
133
  private removeTouchFeedback;
123
- private triggerHapticFeedback;
124
134
  private enterPanMode;
125
135
  private exitPanMode;
126
136
  private performPan;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Pure geometry for the scheduler's pointer paths.
3
+ *
4
+ * These take numbers and return numbers so the arithmetic can be pinned by
5
+ * specs without faking a single rect value (R3, PRD test-coverage P2-D4). The
6
+ * callers read the live geometry and pass it in.
7
+ */
8
+ export interface EdgeRect {
9
+ left: number;
10
+ top: number;
11
+ right: number;
12
+ bottom: number;
13
+ }
14
+ export interface Vector {
15
+ x: number;
16
+ y: number;
17
+ }
18
+ /**
19
+ * Per-frame auto-scroll step while a drag is near a scroller edge.
20
+ *
21
+ * Each axis is 0 outside the `zone`-wide band along an edge and ramps
22
+ * linearly to `max` px per frame at the edge itself (clamped beyond it), with
23
+ * the sign pointing toward that edge: negative scrolls toward left/top.
24
+ */
25
+ export declare function edgeScrollVector(point: Vector, rect: EdgeRect, zone: number, max: number): Vector;
26
+ /**
27
+ * Clamp a requested resource-column width to what the scroller can hold.
28
+ *
29
+ * Never narrower than `minColumn`, and never so wide that less than `minGrid`
30
+ * px of grid remains; when the scroller is too narrow for both, `minColumn`
31
+ * wins. The result is rounded to a whole pixel.
32
+ */
33
+ export declare function clampColumnWidth(requested: number, containerWidth: number, minColumn: number, minGrid: number): number;
34
+ /**
35
+ * The resource column's share of the scroller, as the whole percentage the
36
+ * window-splitter pattern reports in `aria-valuenow`. A zero-width scroller
37
+ * (not laid out yet) is treated as 1px rather than dividing by zero.
38
+ */
39
+ export declare function columnWidthPercent(width: number, containerWidth: number): number;
@@ -85,7 +85,6 @@ export declare class TimelineView extends BaseView {
85
85
  */
86
86
  private createColumnResizer;
87
87
  private currentColumnWidth;
88
- private maxColumnWidth;
89
88
  private applyColumnWidth;
90
89
  /** aria-valuenow as a percentage of the scroller, per the splitter pattern. */
91
90
  private updateResizerValue;
@@ -1,27 +1,27 @@
1
- import { D as C, d as $ } from "../chunks/id-DNZVAnGC.mjs";
2
- import { a as U, b as V, c as j, e as G, f as X, R as Y, T as q, g as J, h as K, i as Q, j as Z, k as tt, l as et, m as ot, n as st, o as nt, p as it, q as ct, r as rt, s as at, t as lt, u as dt, v as gt, w as ht, x as ut, y as ft, z as mt } from "../chunks/id-DNZVAnGC.mjs";
1
+ import { D as C, d as v } from "../chunks/resource.service--lqLwEqk.mjs";
2
+ import { a as X, b as Y, c as q, e as J, f as K, R as Q, T as Z, g as tt, h as et, i as ot, j as nt, k as st, l as it, m as ct, n as rt, o as at, p as lt, r as dt, q as gt, s as ut, t as ht, u as ft, v as mt } from "../chunks/resource.service--lqLwEqk.mjs";
3
3
  class x {
4
4
  /**
5
5
  * Calculate position for an event part in week/day view
6
6
  */
7
- calculateWeekPosition(t, e, s, n, i, l = {}) {
7
+ calculateWeekPosition(t, e, n, s, i, l = {}) {
8
8
  const c = { ...C, ...l };
9
9
  new Date(t.start).setHours(0, 0, 0, 0);
10
- const a = $.getSecondsFromMidnight(t.start), u = $.getSecondsFromMidnight(t.end) - a, [d] = c.slotMinTime.split(":").map(Number), [f] = c.slotMaxTime.split(":").map(Number), g = (f - d) * 3600, m = (a - d * 3600) / g * 100, v = u / g * 100, S = 10, p = (100 - S) / i, T = p / s, b = S + n * p + e * T;
10
+ const a = v.getSecondsFromMidnight(t.start), h = v.getSecondsFromMidnight(t.end) - a, [d] = c.slotMinTime.split(":").map(Number), [f] = c.slotMaxTime.split(":").map(Number), g = (f - d) * 3600, S = (a - d * 3600) / g * 100, b = h / g * 100, p = 10, T = (100 - p) / i, $ = T / n, w = p + s * T + e * $;
11
11
  return {
12
- top: m,
13
- left: b,
14
- width: T,
15
- height: v,
12
+ top: S,
13
+ left: w,
14
+ width: $,
15
+ height: b,
16
16
  zIndex: e + 1
17
17
  };
18
18
  }
19
19
  /**
20
20
  * Calculate position for an event in timeline view
21
21
  */
22
- calculateTimelinePosition(t, e, s, n, i, l = {}) {
22
+ calculateTimelinePosition(t, e, n, s, i, l = {}) {
23
23
  ({ ...C, ...l });
24
- const c = i.getTime() - n.getTime(), r = Math.max(t.start.getTime(), n.getTime()), a = Math.min(t.end.getTime(), i.getTime()), h = r - n.getTime(), u = a - r, d = h / c * 100, f = u / c * 100, g = 100 / s;
24
+ const c = i.getTime() - s.getTime(), r = Math.max(t.start.getTime(), s.getTime()), a = Math.min(t.end.getTime(), i.getTime()), u = r - s.getTime(), h = a - r, d = u / c * 100, f = h / c * 100, g = 100 / n;
25
25
  return {
26
26
  top: e * g,
27
27
  left: d,
@@ -33,12 +33,12 @@ class x {
33
33
  /**
34
34
  * Calculate position for an all-day event in month view
35
35
  */
36
- calculateMonthEventPosition(t, e, s, n, i, l = 7) {
37
- const c = 100 / l, r = 100 / s, a = n * c, h = (i - n + 1) * c;
36
+ calculateMonthEventPosition(t, e, n, s, i, l = 7) {
37
+ const c = 100 / l, r = 100 / n, a = s * c, u = (i - s + 1) * c;
38
38
  return {
39
39
  top: e * r,
40
40
  left: a,
41
- width: h,
41
+ width: u,
42
42
  height: r,
43
43
  zIndex: e + 1
44
44
  };
@@ -46,12 +46,12 @@ class x {
46
46
  /**
47
47
  * Convert percentage-based position to pixel-based
48
48
  */
49
- toPixelPosition(t, e, s) {
49
+ toPixelPosition(t, e, n) {
50
50
  return {
51
- top: t.top / 100 * s,
51
+ top: t.top / 100 * n,
52
52
  left: t.left / 100 * e,
53
53
  width: t.width / 100 * e,
54
- height: t.height / 100 * s,
54
+ height: t.height / 100 * n,
55
55
  zIndex: t.zIndex
56
56
  };
57
57
  }
@@ -82,103 +82,116 @@ class x {
82
82
  };
83
83
  }
84
84
  }
85
- const I = new x();
86
- function P(o, t) {
87
- const e = Object.entries(t).map(([s, n]) => `[data-${s}="${n}"]`).join("");
85
+ const D = new x();
86
+ function m(o = "evt") {
87
+ const t = Date.now().toString(36), e = Math.random().toString(36).substring(2, 9);
88
+ return `${o}-${t}-${e}`;
89
+ }
90
+ function M() {
91
+ return m("evt");
92
+ }
93
+ function P() {
94
+ return m("res");
95
+ }
96
+ function L() {
97
+ return m("grp");
98
+ }
99
+ function z(o, t) {
100
+ const e = Object.entries(t).map(([n, s]) => `[data-${n}="${s}"]`).join("");
88
101
  return o.querySelector(e);
89
102
  }
90
- function z(o) {
103
+ function O(o) {
91
104
  const t = o.dataset, e = {};
92
- for (const s in t) {
93
- const n = t[s];
94
- n !== void 0 && (e[s] = n);
105
+ for (const n in t) {
106
+ const s = t[n];
107
+ s !== void 0 && (e[n] = s);
95
108
  }
96
109
  return e;
97
110
  }
98
- function D(o, t) {
111
+ function B(o, t) {
99
112
  return o.closest(`[data-${t}]`);
100
113
  }
101
- function L(o) {
114
+ function W(o) {
102
115
  return {
103
116
  top: o.scrollTop,
104
117
  left: o.scrollLeft
105
118
  };
106
119
  }
107
- function M(o, t, e = "smooth") {
108
- const s = o.getBoundingClientRect(), i = t.getBoundingClientRect().top - s.top + o.scrollTop;
120
+ function A(o, t, e = "smooth") {
121
+ const n = o.getBoundingClientRect(), i = t.getBoundingClientRect().top - n.top + o.scrollTop;
109
122
  o.scrollTo({
110
123
  top: i,
111
124
  behavior: e
112
125
  });
113
126
  }
114
- function O(o, t) {
115
- const e = o.getBoundingClientRect(), s = t ? t.getBoundingClientRect() : { top: 0, left: 0, bottom: window.innerHeight, right: window.innerWidth };
116
- return e.top >= s.top && e.left >= s.left && e.bottom <= s.bottom && e.right <= s.right;
127
+ function F(o, t) {
128
+ const e = o.getBoundingClientRect(), n = t ? t.getBoundingClientRect() : { top: 0, left: 0, bottom: window.innerHeight, right: window.innerWidth };
129
+ return e.top >= n.top && e.left >= n.left && e.bottom <= n.bottom && e.right <= n.right;
117
130
  }
118
- function B(o, t) {
119
- const e = t.getBoundingClientRect(), s = "touches" in o ? o.touches[0].clientX : o.clientX, n = "touches" in o ? o.touches[0].clientY : o.clientY;
131
+ function _(o, t) {
132
+ const e = t.getBoundingClientRect(), n = "touches" in o ? o.touches[0].clientX : o.clientX, s = "touches" in o ? o.touches[0].clientY : o.clientY;
120
133
  return {
121
- x: s - e.left,
122
- y: n - e.top
134
+ x: n - e.left,
135
+ y: s - e.top
123
136
  };
124
137
  }
125
- function W(o, t, e) {
138
+ function k(o, t, e) {
126
139
  o.style.setProperty(`--${t}`, e);
127
140
  }
128
- function A(o, t) {
141
+ function H(o, t) {
129
142
  return getComputedStyle(o).getPropertyValue(`--${t}`).trim();
130
143
  }
131
- function F(o, ...t) {
144
+ function N(o, ...t) {
132
145
  o.classList.add(...t.filter(Boolean));
133
146
  }
134
- function _(o, ...t) {
147
+ function U(o, ...t) {
135
148
  o.classList.remove(...t.filter(Boolean));
136
149
  }
137
- function k(o, t, e) {
150
+ function V(o, t, e) {
138
151
  o.classList.toggle(t, e);
139
152
  }
140
153
  export {
141
- U as DEFAULT_COLORS,
142
- V as DEFAULT_EVENT_COLOR,
143
- j as DEFAULT_MESSAGES,
154
+ X as DEFAULT_COLORS,
155
+ Y as DEFAULT_EVENT_COLOR,
156
+ q as DEFAULT_MESSAGES,
144
157
  C as DEFAULT_OPTIONS,
145
- G as DEFAULT_PERMISSIONS,
146
- X as DateService,
158
+ J as DEFAULT_PERMISSIONS,
159
+ K as DateService,
147
160
  x as PositionService,
148
- Y as ResourceService,
149
- q as TimelineService,
150
- J as addAlpha,
151
- F as addClasses,
152
- K as contrastRatioWith,
153
- Q as darkenColor,
154
- $ as dateService,
155
- D as findClosestWithData,
156
- Z as formatMessage,
157
- tt as generateEventId,
158
- et as generateGroupId,
159
- ot as generateId,
160
- st as generateResourceId,
161
- A as getCSSVariable,
162
- nt as getColorByIndex,
161
+ Q as ResourceService,
162
+ Z as TimelineService,
163
+ tt as addAlpha,
164
+ N as addClasses,
165
+ et as contrastRatioWith,
166
+ ot as darkenColor,
167
+ v as dateService,
168
+ B as findClosestWithData,
169
+ nt as formatMessage,
170
+ M as generateEventId,
171
+ L as generateGroupId,
172
+ m as generateId,
173
+ P as generateResourceId,
174
+ H as getCSSVariable,
175
+ st as getColorByIndex,
163
176
  it as getContrastColor,
164
- z as getDataAttributes,
165
- P as getElementByData,
177
+ O as getDataAttributes,
178
+ z as getElementByData,
166
179
  ct as getReadableTextColor,
167
- B as getRelativePosition,
168
- L as getScrollPosition,
169
- O as isInViewport,
180
+ _ as getRelativePosition,
181
+ W as getScrollPosition,
182
+ F as isInViewport,
170
183
  rt as isResource,
171
184
  at as isResourceGroup,
172
185
  lt as lightenColor,
173
- I as positionService,
174
- _ as removeClasses,
186
+ D as positionService,
187
+ U as removeClasses,
175
188
  dt as resolveCapability,
176
189
  gt as resolveEventColor,
177
- ht as resolveMessages,
178
- ut as resolveResizeEdge,
190
+ ut as resolveMessages,
191
+ ht as resolveResizeEdge,
179
192
  ft as resourceService,
180
- M as scrollToTime,
181
- W as setCSSVariable,
193
+ A as scrollToTime,
194
+ k as setCSSVariable,
182
195
  mt as timelineService,
183
- k as toggleClass
196
+ V as toggleClass
184
197
  };
@@ -66,18 +66,6 @@ export declare class ResourceService {
66
66
  * Set collapse state of a group
67
67
  */
68
68
  setGroupCollapse(items: (Resource | ResourceGroup)[], groupId: string, collapsed: boolean): (Resource | ResourceGroup)[];
69
- /**
70
- * Collapse all groups
71
- */
72
- collapseAll(items: (Resource | ResourceGroup)[]): (Resource | ResourceGroup)[];
73
- /**
74
- * Expand all groups
75
- */
76
- expandAll(items: (Resource | ResourceGroup)[]): (Resource | ResourceGroup)[];
77
- /**
78
- * Map over all resources in the hierarchy
79
- */
80
- private mapResources;
81
69
  /**
82
70
  * Map over all groups in the hierarchy
83
71
  */
@@ -67,11 +67,6 @@ export declare class TimelineService {
67
67
  * Check if two events overlap in time
68
68
  */
69
69
  private eventsOverlap;
70
- /**
71
- * Calculate the relative track position for an event part (legacy method)
72
- * @deprecated Use getColspanLayout instead for better layout
73
- */
74
- private getRelativeTrackPosition;
75
70
  /**
76
71
  * Filter events that fall within a date range
77
72
  */
@@ -92,10 +87,6 @@ export declare class TimelineService {
92
87
  * Get events for a specific day
93
88
  */
94
89
  getEventsForDay(events: SchedulerEvent[], day: Date): SchedulerEvent[];
95
- /**
96
- * Get event parts for a specific day
97
- */
98
- getPartsForDay(parts: SchedulerEventPart[], day: Date): SchedulerEventPart[];
99
90
  }
100
91
  /**
101
92
  * Singleton instance of TimelineService
package/select/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { M as p } from "../chunks/mp-select-BNrbPwN4.mjs";
1
+ import { M as p } from "../chunks/mp-select-CgqYFvUj.mjs";
2
2
  export {
3
3
  p as MpSelect
4
4
  };
@@ -141,6 +141,7 @@ export declare class MpSelect extends MpSelect_base {
141
141
  get optionRenderer(): MpSelectOptionRenderer | null;
142
142
  set optionRenderer(value: MpSelectOptionRenderer | null);
143
143
  attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
144
+ connectedCallback(): void;
144
145
  disconnectedCallback(): void;
145
146
  /**
146
147
  * Rich rendering is on only when everything holds at once: an engine that
@@ -66,10 +66,16 @@ button.control-btn:focus-visible {
66
66
  outline: 2px solid var(--bs-primary, #0d6efd);
67
67
  outline-offset: 2px;
68
68
  }`);
69
- var y = Object.defineProperty, u = (o, t, e, i) => {
70
- for (var r = void 0, s = o.length - 1, n; s >= 0; s--)
71
- (n = o[s]) && (r = n(t, e, r) || r);
72
- return r && y(t, e, r), r;
69
+ function y(n, t, e, i) {
70
+ return !e.width || !e.height ? { x: t.x, y: t.y } : {
71
+ x: (n.x - e.left) * (i.width / e.width),
72
+ y: (n.y - e.top) * (i.height / e.height)
73
+ };
74
+ }
75
+ var m = Object.defineProperty, u = (n, t, e, i) => {
76
+ for (var r = void 0, s = n.length - 1, o; s >= 0; s--)
77
+ (o = n[s]) && (r = o(t, e, r) || r);
78
+ return r && m(t, e, r), r;
73
79
  };
74
80
  class l extends b {
75
81
  constructor() {
@@ -78,12 +84,15 @@ class l extends b {
78
84
  }), this.onPointerStart = (t) => {
79
85
  t.preventDefault(), this._isDrawing = !0;
80
86
  const e = this.toCanvasPoint(t);
81
- this._signature.strokes.push({ points: [e] }), this._signature = { ...this._signature }, this._context && (this._context.strokeStyle = "black", this._context.beginPath(), this._context.moveTo(e.x, e.y)), this.dispatchSignatureChange();
87
+ this._signature = { ...this._signature, strokes: [...this._signature.strokes, { points: [e] }] }, this._context && (this._context.strokeStyle = "black", this._context.beginPath(), this._context.moveTo(e.x, e.y)), this.dispatchSignatureChange();
82
88
  }, this.onPointerMove = (t) => {
83
89
  if (!this._isDrawing) return;
84
90
  t.preventDefault();
85
- const e = this.toCanvasPoint(t);
86
- this._signature.strokes.at(-1)?.points.push(e), this._signature = { ...this._signature }, this._context && (this._context.lineTo(e.x, e.y), this._context.stroke()), this.dispatchSignatureChange();
91
+ const e = this.toCanvasPoint(t), i = this._signature.strokes, r = i.at(-1);
92
+ r && (this._signature = {
93
+ ...this._signature,
94
+ strokes: [...i.slice(0, -1), { ...r, points: [...r.points, e] }]
95
+ }), this._context && (this._context.lineTo(e.x, e.y), this._context.stroke()), this.dispatchSignatureChange();
87
96
  }, this.onPointerEnd = (t) => {
88
97
  this._isDrawing && (t.preventDefault(), this._isDrawing = !1);
89
98
  }, this.onTypedInput = (t) => {
@@ -151,21 +160,10 @@ class l extends b {
151
160
  this.hostAria.syncReferences(), (t.has("signature") || t.has("width") || t.has("height")) && this.redraw();
152
161
  }
153
162
  /* ---- Drawing ---- */
154
- /**
155
- * Map a pointer event into canvas BITMAP coordinates. `offsetX/offsetY` are
156
- * CSS pixels of the rendered box; when the canvas is CSS-sized (e.g.
157
- * `width: 100%`) those disagree with the `width`/`height` drawing space and
158
- * every stroke would land offset and stretched. Scaling by
159
- * bitmap-size / rendered-rect keeps drawing correct under any CSS sizing.
160
- */
163
+ /** Map a pointer event into canvas bitmap coordinates; see toBitmapPoint. */
161
164
  toCanvasPoint(t) {
162
- const e = this.canvasEl;
163
- if (!e) return { x: t.offsetX, y: t.offsetY };
164
- const i = e.getBoundingClientRect();
165
- return !i.width || !i.height ? { x: t.offsetX, y: t.offsetY } : {
166
- x: (t.clientX - i.left) * (e.width / i.width),
167
- y: (t.clientY - i.top) * (e.height / i.height)
168
- };
165
+ const e = this.canvasEl, i = { x: t.offsetX, y: t.offsetY };
166
+ return e ? y({ x: t.clientX, y: t.clientY }, i, e.getBoundingClientRect(), e) : i;
169
167
  }
170
168
  /** Repaint the canvas from the model: every stroke, then the typed text. */
171
169
  redraw() {
@@ -174,10 +172,10 @@ class l extends b {
174
172
  const { strokes: e, text: i } = this._signature;
175
173
  t.clearRect(0, 0, this.width, this.height), t.fillStyle = "black", t.strokeStyle = "black";
176
174
  for (const r of e) {
177
- const [s, ...n] = r.points;
175
+ const [s, ...o] = r.points;
178
176
  if (s) {
179
177
  t.beginPath(), t.moveTo(s.x, s.y);
180
- for (const h of n)
178
+ for (const h of o)
181
179
  t.lineTo(h.x, h.y);
182
180
  t.stroke();
183
181
  }
@@ -0,0 +1,26 @@
1
+ export interface CanvasPoint {
2
+ x: number;
3
+ y: number;
4
+ }
5
+ /** The rendered box of the canvas, in CSS pixels (a DOMRect's relevant part). */
6
+ export interface RenderedBox {
7
+ left: number;
8
+ top: number;
9
+ width: number;
10
+ height: number;
11
+ }
12
+ /**
13
+ * Map a pointer position into canvas BITMAP coordinates.
14
+ *
15
+ * `offsetX/offsetY` are CSS pixels of the rendered box; when the canvas is
16
+ * CSS-sized (e.g. `width: 100%`) those disagree with the `width`/`height`
17
+ * drawing space and every stroke would land offset and stretched. Scaling by
18
+ * bitmap-size / rendered-box keeps drawing correct under any CSS sizing.
19
+ *
20
+ * A box with no area (no layout yet, a hidden pad) cannot be scaled against,
21
+ * so the offset coordinates are used as they are.
22
+ */
23
+ export declare function toBitmapPoint(client: CanvasPoint, offset: CanvasPoint, box: RenderedBox, bitmap: {
24
+ width: number;
25
+ height: number;
26
+ }): CanvasPoint;
@@ -119,13 +119,7 @@ export declare class MpSignaturePadElement extends LitElement {
119
119
  clear(): void;
120
120
  protected firstUpdated(): void;
121
121
  protected updated(changed: Map<string, unknown>): void;
122
- /**
123
- * Map a pointer event into canvas BITMAP coordinates. `offsetX/offsetY` are
124
- * CSS pixels of the rendered box; when the canvas is CSS-sized (e.g.
125
- * `width: 100%`) those disagree with the `width`/`height` drawing space and
126
- * every stroke would land offset and stretched. Scaling by
127
- * bitmap-size / rendered-rect keeps drawing correct under any CSS sizing.
128
- */
122
+ /** Map a pointer event into canvas bitmap coordinates; see toBitmapPoint. */
129
123
  private toCanvasPoint;
130
124
  private onPointerStart;
131
125
  private onPointerMove;
@@ -1,4 +1,4 @@
1
- import { I as t, M as s, R as r, a as n, S as i, n as l, s as p } from "../chunks/mp-splitter-Ckn1kN4v.mjs";
1
+ import { I as t, M as s, R as r, a as n, S as i, n as l, s as p } from "../chunks/mp-splitter-DLehrw3Y.mjs";
2
2
  export {
3
3
  t as InputHandler,
4
4
  s as MpSplitter,
@@ -43,10 +43,26 @@ export declare class MpSplitter extends LitElement {
43
43
  constructor();
44
44
  render(): TemplateResult;
45
45
  protected firstUpdated(): void;
46
+ connectedCallback(): void;
47
+ /**
48
+ * Observers + state subscription, plus a deferred panel rebuild so children
49
+ * changed while detached are picked up. Paired with disconnectedCallback.
50
+ */
51
+ private attachObservers;
46
52
  disconnectedCallback(): void;
47
53
  attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
54
+ /**
55
+ * Anything but "vertical" is horizontal. The attribute was cast straight to
56
+ * `Direction`, so an unknown value was reported as the orientation and added
57
+ * to the container as a class, matching neither layout rule.
58
+ */
48
59
  get orientation(): Direction;
49
60
  set orientation(value: Direction);
61
+ /**
62
+ * The minimum panel size the resize maths enforces. Read from the resize
63
+ * manager, the single source of truth, so a non-numeric attribute reads
64
+ * back as the 50 px fallback actually in use rather than NaN.
65
+ */
50
66
  get minPanelSize(): number;
51
67
  set minPanelSize(value: number);
52
68
  get touchMode(): boolean;
@@ -1,2 +1,3 @@
1
1
  export { ResizeManager } from './resize-manager';
2
2
  export type { ResizeManagerOptions } from './resize-manager';
3
+ export { rescalePanelSizes } from './rescale-panel-sizes';
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Proportionally rescale stored panel sizes so they fill `availableSpace`
3
+ * (the container minus dividers and their overlap margins), preserving the
4
+ * ratios between panels.
5
+ *
6
+ * Returns null when there is nothing to do, so the caller writes nothing:
7
+ * - no stored sizes, or they sum to zero or less (no ratio to preserve);
8
+ * - `availableSpace` is not a finite number (a style read failed);
9
+ * - the change is below 1 px. Applying the sizes can itself nudge the
10
+ * container by a subpixel, and rescaling on that would chase our own writes.
11
+ *
12
+ * A negative `availableSpace` is treated as 0.
13
+ */
14
+ export declare function rescalePanelSizes(stored: readonly number[], availableSpace: number): number[] | null;