@breadstone/mosaik-elements-foundation 0.0.211 → 0.0.214

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 (171) hide show
  1. package/Controls/Components/Abstracts/CustomElement.js.map +1 -1
  2. package/Controls/Components/Overlays/Dialog/DialogService.d.ts +0 -22
  3. package/Controls/Components/Overlays/Dialog/DialogService.d.ts.map +1 -1
  4. package/Controls/Components/Overlays/Dialog/DialogService.js +2 -12
  5. package/Controls/Components/Overlays/Dialog/DialogService.js.map +1 -1
  6. package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Cosmopolitan.d.ts.map +1 -1
  7. package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Cosmopolitan.js +13 -0
  8. package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Cosmopolitan.js.map +1 -1
  9. package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Joy.d.ts.map +1 -1
  10. package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Joy.js +13 -0
  11. package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Joy.js.map +1 -1
  12. package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Memphis.d.ts.map +1 -1
  13. package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Memphis.js +13 -0
  14. package/Controls/Components/Overlays/Dialog/Themes/DialogElement.Memphis.js.map +1 -1
  15. package/Controls/Components/Overlays/Dialog/behaviors/DialogStackBehavior.d.ts +119 -0
  16. package/Controls/Components/Overlays/Dialog/behaviors/DialogStackBehavior.d.ts.map +1 -0
  17. package/Controls/Components/Overlays/Dialog/behaviors/DialogStackBehavior.js +246 -0
  18. package/Controls/Components/Overlays/Dialog/behaviors/DialogStackBehavior.js.map +1 -0
  19. package/Controls/Components/Overlays/Dialog/behaviors/IDialogStackBehaviorConfig.d.ts +64 -0
  20. package/Controls/Components/Overlays/Dialog/behaviors/IDialogStackBehaviorConfig.d.ts.map +1 -0
  21. package/Controls/Components/Overlays/Dialog/behaviors/IDialogStackBehaviorConfig.js +15 -0
  22. package/Controls/Components/Overlays/Dialog/behaviors/IDialogStackBehaviorConfig.js.map +1 -0
  23. package/Controls/Components/Overlays/Dialog/behaviors/withDialogStackBehavior.d.ts +11 -0
  24. package/Controls/Components/Overlays/Dialog/behaviors/withDialogStackBehavior.d.ts.map +1 -0
  25. package/Controls/Components/Overlays/Dialog/behaviors/withDialogStackBehavior.js +14 -0
  26. package/Controls/Components/Overlays/Dialog/behaviors/withDialogStackBehavior.js.map +1 -0
  27. package/Controls/Components/Overlays/Drawer/DrawerActionsElement.d.ts +44 -0
  28. package/Controls/Components/Overlays/Drawer/DrawerActionsElement.d.ts.map +1 -0
  29. package/Controls/Components/Overlays/Drawer/DrawerActionsElement.js +71 -0
  30. package/Controls/Components/Overlays/Drawer/DrawerActionsElement.js.map +1 -0
  31. package/Controls/Components/Overlays/Drawer/DrawerActionsElementTemplate.d.ts +9 -0
  32. package/Controls/Components/Overlays/Drawer/DrawerActionsElementTemplate.d.ts.map +1 -0
  33. package/Controls/Components/Overlays/Drawer/DrawerActionsElementTemplate.js +36 -0
  34. package/Controls/Components/Overlays/Drawer/DrawerActionsElementTemplate.js.map +1 -0
  35. package/Controls/Components/Overlays/Drawer/DrawerElement.d.ts +4 -2
  36. package/Controls/Components/Overlays/Drawer/DrawerElement.d.ts.map +1 -1
  37. package/Controls/Components/Overlays/Drawer/DrawerElement.js +4 -2
  38. package/Controls/Components/Overlays/Drawer/DrawerElement.js.map +1 -1
  39. package/Controls/Components/Overlays/Drawer/DrawerElementTemplate.d.ts.map +1 -1
  40. package/Controls/Components/Overlays/Drawer/DrawerElementTemplate.js +6 -1
  41. package/Controls/Components/Overlays/Drawer/DrawerElementTemplate.js.map +1 -1
  42. package/Controls/Components/Overlays/Drawer/DrawerService.d.ts +0 -17
  43. package/Controls/Components/Overlays/Drawer/DrawerService.d.ts.map +1 -1
  44. package/Controls/Components/Overlays/Drawer/DrawerService.js +4 -16
  45. package/Controls/Components/Overlays/Drawer/DrawerService.js.map +1 -1
  46. package/Controls/Components/Overlays/Drawer/IDrawerActionsElementProps.d.ts +9 -0
  47. package/Controls/Components/Overlays/Drawer/IDrawerActionsElementProps.d.ts.map +1 -0
  48. package/Controls/Components/Overlays/Drawer/IDrawerActionsElementProps.js +3 -0
  49. package/Controls/Components/Overlays/Drawer/IDrawerActionsElementProps.js.map +1 -0
  50. package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Cosmopolitan.d.ts +6 -0
  51. package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Cosmopolitan.d.ts.map +1 -0
  52. package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Cosmopolitan.js +76 -0
  53. package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Cosmopolitan.js.map +1 -0
  54. package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Joy.d.ts +6 -0
  55. package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Joy.d.ts.map +1 -0
  56. package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Joy.js +76 -0
  57. package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Joy.js.map +1 -0
  58. package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Memphis.d.ts +6 -0
  59. package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Memphis.d.ts.map +1 -0
  60. package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Memphis.js +76 -0
  61. package/Controls/Components/Overlays/Drawer/Themes/DrawerActionsElement.Memphis.js.map +1 -0
  62. package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Cosmopolitan.d.ts.map +1 -1
  63. package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Cosmopolitan.js +48 -1
  64. package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Cosmopolitan.js.map +1 -1
  65. package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Joy.d.ts.map +1 -1
  66. package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Joy.js +48 -1
  67. package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Joy.js.map +1 -1
  68. package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Memphis.d.ts.map +1 -1
  69. package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Memphis.js +48 -1
  70. package/Controls/Components/Overlays/Drawer/Themes/DrawerElement.Memphis.js.map +1 -1
  71. package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Cosmopolitan.d.ts.map +1 -1
  72. package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Cosmopolitan.js +0 -6
  73. package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Cosmopolitan.js.map +1 -1
  74. package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Joy.d.ts.map +1 -1
  75. package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Joy.js +0 -6
  76. package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Joy.js.map +1 -1
  77. package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Memphis.d.ts.map +1 -1
  78. package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Memphis.js +0 -6
  79. package/Controls/Components/Overlays/Drawer/Themes/DrawerFooterElement.Memphis.js.map +1 -1
  80. package/Controls/Components/Overlays/Drawer/behaviors/DrawerStackBehavior.d.ts +136 -0
  81. package/Controls/Components/Overlays/Drawer/behaviors/DrawerStackBehavior.d.ts.map +1 -0
  82. package/Controls/Components/Overlays/Drawer/behaviors/DrawerStackBehavior.js +309 -0
  83. package/Controls/Components/Overlays/Drawer/behaviors/DrawerStackBehavior.js.map +1 -0
  84. package/Controls/Components/Overlays/Drawer/behaviors/IDrawerStackBehaviorConfig.d.ts +57 -0
  85. package/Controls/Components/Overlays/Drawer/behaviors/IDrawerStackBehaviorConfig.d.ts.map +1 -0
  86. package/Controls/Components/Overlays/Drawer/behaviors/IDrawerStackBehaviorConfig.js +14 -0
  87. package/Controls/Components/Overlays/Drawer/behaviors/IDrawerStackBehaviorConfig.js.map +1 -0
  88. package/Controls/Components/Overlays/Drawer/behaviors/withDrawerStackBehavior.d.ts +11 -0
  89. package/Controls/Components/Overlays/Drawer/behaviors/withDrawerStackBehavior.d.ts.map +1 -0
  90. package/Controls/Components/Overlays/Drawer/behaviors/withDrawerStackBehavior.js +14 -0
  91. package/Controls/Components/Overlays/Drawer/behaviors/withDrawerStackBehavior.js.map +1 -0
  92. package/Controls/Components/Overlays/MessageBox/MessageBoxService.d.ts +0 -1
  93. package/Controls/Components/Overlays/MessageBox/MessageBoxService.d.ts.map +1 -1
  94. package/Controls/Components/Overlays/MessageBox/MessageBoxService.js +0 -5
  95. package/Controls/Components/Overlays/MessageBox/MessageBoxService.js.map +1 -1
  96. package/Controls/Components/Overlays/Sheet/SheetService.d.ts +0 -1
  97. package/Controls/Components/Overlays/Sheet/SheetService.d.ts.map +1 -1
  98. package/Controls/Components/Overlays/Sheet/SheetService.js +0 -5
  99. package/Controls/Components/Overlays/Sheet/SheetService.js.map +1 -1
  100. package/Controls/Components/Overlays/Toast/ToastElement.d.ts.map +1 -1
  101. package/Controls/Components/Overlays/Toast/ToastElement.js +8 -3
  102. package/Controls/Components/Overlays/Toast/ToastElement.js.map +1 -1
  103. package/Controls/Components/Overlays/Toast/ToastElementTemplate.js +1 -1
  104. package/Controls/Components/Overlays/Toast/ToastElementTemplate.js.map +1 -1
  105. package/Controls/Components/Overlays/Toast/ToastService.d.ts +0 -1
  106. package/Controls/Components/Overlays/Toast/ToastService.d.ts.map +1 -1
  107. package/Controls/Components/Overlays/Toast/ToastService.js +0 -5
  108. package/Controls/Components/Overlays/Toast/ToastService.js.map +1 -1
  109. package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeEndEvent.d.ts +42 -0
  110. package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeEndEvent.d.ts.map +1 -0
  111. package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeEndEvent.js +3 -0
  112. package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeEndEvent.js.map +1 -0
  113. package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeStartEvent.d.ts +32 -0
  114. package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeStartEvent.d.ts.map +1 -0
  115. package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeStartEvent.js +3 -0
  116. package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizeStartEvent.js.map +1 -0
  117. package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizingEvent.d.ts +50 -0
  118. package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizingEvent.d.ts.map +1 -0
  119. package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizingEvent.js +3 -0
  120. package/Controls/Components/Primitives/ResizeThumb/Events/ResizeThumbResizingEvent.js.map +1 -0
  121. package/Controls/Components/Primitives/ResizeThumb/IResizeThumbElementProps.d.ts +40 -0
  122. package/Controls/Components/Primitives/ResizeThumb/IResizeThumbElementProps.d.ts.map +1 -0
  123. package/Controls/Components/Primitives/ResizeThumb/IResizeThumbElementProps.js +3 -0
  124. package/Controls/Components/Primitives/ResizeThumb/IResizeThumbElementProps.js.map +1 -0
  125. package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElement.d.ts +251 -0
  126. package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElement.d.ts.map +1 -0
  127. package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElement.js +474 -0
  128. package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElement.js.map +1 -0
  129. package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElementTemplate.d.ts +9 -0
  130. package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElementTemplate.d.ts.map +1 -0
  131. package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElementTemplate.js +14 -0
  132. package/Controls/Components/Primitives/ResizeThumb/ResizeThumbElementTemplate.js.map +1 -0
  133. package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Cosmopolitan.d.ts +6 -0
  134. package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Cosmopolitan.d.ts.map +1 -0
  135. package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Cosmopolitan.js +104 -0
  136. package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Cosmopolitan.js.map +1 -0
  137. package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Joy.d.ts +6 -0
  138. package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Joy.d.ts.map +1 -0
  139. package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Joy.js +142 -0
  140. package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Joy.js.map +1 -0
  141. package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Memphis.d.ts +6 -0
  142. package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Memphis.d.ts.map +1 -0
  143. package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Memphis.js +104 -0
  144. package/Controls/Components/Primitives/ResizeThumb/Themes/ResizeThumbElement.Memphis.js.map +1 -0
  145. package/Controls/Components/Ranges/MeterBar/MeterBarElement.d.ts +4 -1
  146. package/Controls/Components/Ranges/MeterBar/MeterBarElement.d.ts.map +1 -1
  147. package/Controls/Components/Ranges/MeterBar/MeterBarElement.js +4 -1
  148. package/Controls/Components/Ranges/MeterBar/MeterBarElement.js.map +1 -1
  149. package/Controls/Components/Ranges/MeterBar/Themes/MeterBarElement.Cosmopolitan.js +2 -2
  150. package/Controls/Components/Ranges/MeterBar/Themes/MeterBarElement.Joy.js +2 -2
  151. package/Controls/Components/Ranges/MeterBar/Themes/MeterBarElement.Memphis.js +2 -2
  152. package/Controls/Components/Selectors/Abstracts/Selector/SelectorElement.d.ts.map +1 -1
  153. package/Controls/Controllers/ResizeThumbController.d.ts +349 -0
  154. package/Controls/Controllers/ResizeThumbController.d.ts.map +1 -0
  155. package/Controls/Controllers/ResizeThumbController.js +520 -0
  156. package/Controls/Controllers/ResizeThumbController.js.map +1 -0
  157. package/Controls/Types/ResizeDirection.d.ts +54 -0
  158. package/Controls/Types/ResizeDirection.d.ts.map +1 -0
  159. package/Controls/Types/ResizeDirection.js +60 -0
  160. package/Controls/Types/ResizeDirection.js.map +1 -0
  161. package/Dom/Interval.d.ts +16 -1
  162. package/Dom/Interval.d.ts.map +1 -1
  163. package/Dom/Interval.js +25 -2
  164. package/Dom/Interval.js.map +1 -1
  165. package/Index.d.ts +15 -6
  166. package/Index.d.ts.map +1 -1
  167. package/Index.js +10 -4
  168. package/Index.js.map +1 -1
  169. package/Routing/PathToRegexp.d.ts +1 -1
  170. package/custom-elements.json +2088 -1155
  171. package/package.json +3 -3
@@ -0,0 +1,520 @@
1
+ // #region Imports
2
+ import { ResizeDirection } from '../Types/ResizeDirection';
3
+ /**
4
+ * ResizeThumbController - A standalone controller for programmatic resize operations.
5
+ *
6
+ * @description
7
+ * This controller encapsulates all resize logic and can be used independently
8
+ * of any visual component. It accepts any HTMLElement as target and provides
9
+ * full control over the resize operation.
10
+ *
11
+ * Use this controller when:
12
+ * - You need programmatic resize without a visual thumb element
13
+ * - You want to use a custom visual for the resize handle
14
+ * - You're working in a non-Web-Component context (Angular, React, vanilla JS)
15
+ * - You need resize logic for Canvas, WebGL, or other rendering contexts
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * // Basic usage with custom handle
20
+ * const controller = new ResizeThumbController({
21
+ * target: document.getElementById('my-box'),
22
+ * direction: ResizeDirection.SouthEast,
23
+ * minWidth: 100,
24
+ * maxWidth: 500,
25
+ * onResizing: (e) => console.log('New size:', e.newWidth, e.newHeight)
26
+ * });
27
+ *
28
+ * // Attach to your own handle element
29
+ * myHandle.addEventListener('mousedown', (e) => {
30
+ * controller.startResize(e.clientX, e.clientY);
31
+ * });
32
+ *
33
+ * // Or use the built-in handle attachment
34
+ * controller.attachHandle(myHandle);
35
+ * ```
36
+ *
37
+ * @public
38
+ */
39
+ export class ResizeThumbController {
40
+ // #region Fields
41
+ _target;
42
+ _direction;
43
+ _minWidth;
44
+ _minHeight;
45
+ _maxWidth;
46
+ _maxHeight;
47
+ _autoApply;
48
+ _onResizeStart;
49
+ _onResizing;
50
+ _onResizeEnd;
51
+ _isResizing;
52
+ _startX;
53
+ _startY;
54
+ _startWidth;
55
+ _startHeight;
56
+ _startLeft;
57
+ _startTop;
58
+ _attachedHandles;
59
+ _handleListeners;
60
+ _boundHandleMouseMove;
61
+ _boundHandleMouseUp;
62
+ _boundHandleTouchMove;
63
+ _boundHandleTouchEnd;
64
+ // #endregion
65
+ // #region Ctor
66
+ /**
67
+ * Creates a new ResizeThumbController instance.
68
+ *
69
+ * @param options - Configuration options for the controller.
70
+ * @public
71
+ */
72
+ constructor(options) {
73
+ this._target = options.target;
74
+ this._direction = options.direction ?? ResizeDirection.SouthEast;
75
+ this._minWidth = options.minWidth ?? 0;
76
+ this._minHeight = options.minHeight ?? 0;
77
+ this._maxWidth = options.maxWidth ?? Number.MAX_SAFE_INTEGER;
78
+ this._maxHeight = options.maxHeight ?? Number.MAX_SAFE_INTEGER;
79
+ this._autoApply = options.autoApply ?? true;
80
+ this._onResizeStart = options.onResizeStart;
81
+ this._onResizing = options.onResizing;
82
+ this._onResizeEnd = options.onResizeEnd;
83
+ this._isResizing = false;
84
+ this._startX = 0;
85
+ this._startY = 0;
86
+ this._startWidth = 0;
87
+ this._startHeight = 0;
88
+ this._startLeft = 0;
89
+ this._startTop = 0;
90
+ this._attachedHandles = new Set();
91
+ this._handleListeners = new WeakMap();
92
+ // Bind event handlers
93
+ this._boundHandleMouseMove = this.handleMouseMove.bind(this);
94
+ this._boundHandleMouseUp = this.handleMouseUp.bind(this);
95
+ this._boundHandleTouchMove = this.handleTouchMove.bind(this);
96
+ this._boundHandleTouchEnd = this.handleTouchEnd.bind(this);
97
+ }
98
+ // #endregion
99
+ // #region Properties
100
+ /**
101
+ * Gets or sets the target element to resize.
102
+ *
103
+ * @public
104
+ */
105
+ get target() {
106
+ return this._target;
107
+ }
108
+ set target(value) {
109
+ this._target = value;
110
+ }
111
+ /**
112
+ * Gets or sets the resize direction.
113
+ *
114
+ * @public
115
+ */
116
+ get direction() {
117
+ return this._direction;
118
+ }
119
+ set direction(value) {
120
+ this._direction = value;
121
+ }
122
+ /**
123
+ * Gets or sets the minimum width constraint.
124
+ *
125
+ * @public
126
+ */
127
+ get minWidth() {
128
+ return this._minWidth;
129
+ }
130
+ set minWidth(value) {
131
+ this._minWidth = value;
132
+ }
133
+ /**
134
+ * Gets or sets the minimum height constraint.
135
+ *
136
+ * @public
137
+ */
138
+ get minHeight() {
139
+ return this._minHeight;
140
+ }
141
+ set minHeight(value) {
142
+ this._minHeight = value;
143
+ }
144
+ /**
145
+ * Gets or sets the maximum width constraint.
146
+ *
147
+ * @public
148
+ */
149
+ get maxWidth() {
150
+ return this._maxWidth;
151
+ }
152
+ set maxWidth(value) {
153
+ this._maxWidth = value;
154
+ }
155
+ /**
156
+ * Gets or sets the maximum height constraint.
157
+ *
158
+ * @public
159
+ */
160
+ get maxHeight() {
161
+ return this._maxHeight;
162
+ }
163
+ set maxHeight(value) {
164
+ this._maxHeight = value;
165
+ }
166
+ /**
167
+ * Gets or sets whether dimension changes are automatically applied.
168
+ *
169
+ * @public
170
+ */
171
+ get autoApply() {
172
+ return this._autoApply;
173
+ }
174
+ set autoApply(value) {
175
+ this._autoApply = value;
176
+ }
177
+ /**
178
+ * Gets whether a resize operation is currently in progress.
179
+ *
180
+ * @public
181
+ * @readonly
182
+ */
183
+ get isResizing() {
184
+ return this._isResizing;
185
+ }
186
+ // #endregion
187
+ // #region Methods
188
+ /**
189
+ * Attaches the controller to a handle element.
190
+ * The handle will automatically trigger resize on mousedown/touchstart.
191
+ *
192
+ * @param handle - The element to use as resize handle.
193
+ * @public
194
+ */
195
+ attachHandle(handle) {
196
+ if (this._attachedHandles.has(handle)) {
197
+ return;
198
+ }
199
+ const mousedownHandler = (e) => {
200
+ e.preventDefault();
201
+ this.startResize(e.clientX, e.clientY);
202
+ };
203
+ const touchstartHandler = (e) => {
204
+ if (e.touches.length === 1) {
205
+ e.preventDefault();
206
+ this.startResize(e.touches[0].clientX, e.touches[0].clientY);
207
+ }
208
+ };
209
+ handle.addEventListener('mousedown', mousedownHandler);
210
+ handle.addEventListener('touchstart', touchstartHandler, { passive: false });
211
+ this._attachedHandles.add(handle);
212
+ this._handleListeners.set(handle, {
213
+ mousedown: mousedownHandler,
214
+ touchstart: touchstartHandler
215
+ });
216
+ }
217
+ /**
218
+ * Detaches the controller from a handle element.
219
+ *
220
+ * @param handle - The handle element to detach.
221
+ * @public
222
+ */
223
+ detachHandle(handle) {
224
+ const listeners = this._handleListeners.get(handle);
225
+ if (listeners) {
226
+ handle.removeEventListener('mousedown', listeners.mousedown);
227
+ handle.removeEventListener('touchstart', listeners.touchstart);
228
+ this._attachedHandles.delete(handle);
229
+ this._handleListeners.delete(handle);
230
+ }
231
+ }
232
+ /**
233
+ * Detaches the controller from all handle elements.
234
+ *
235
+ * @public
236
+ */
237
+ detachAllHandles() {
238
+ for (const handle of this._attachedHandles) {
239
+ this.detachHandle(handle);
240
+ }
241
+ }
242
+ /**
243
+ * Starts a resize operation programmatically.
244
+ *
245
+ * @param clientX - The initial X coordinate.
246
+ * @param clientY - The initial Y coordinate.
247
+ * @public
248
+ */
249
+ startResize(clientX, clientY) {
250
+ if (this._isResizing || !this._target) {
251
+ return;
252
+ }
253
+ this._isResizing = true;
254
+ this._startX = clientX;
255
+ this._startY = clientY;
256
+ // Capture initial dimensions
257
+ const rect = this._target.getBoundingClientRect();
258
+ const computedStyle = window.getComputedStyle(this._target);
259
+ this._startWidth = rect.width;
260
+ this._startHeight = rect.height;
261
+ this._startLeft = parseFloat(computedStyle.left) || 0;
262
+ this._startTop = parseFloat(computedStyle.top) || 0;
263
+ // Emit start event
264
+ this._onResizeStart?.({
265
+ direction: this._direction,
266
+ startX: this._startX,
267
+ startY: this._startY,
268
+ startWidth: this._startWidth,
269
+ startHeight: this._startHeight
270
+ });
271
+ // Add global listeners
272
+ this.addGlobalListeners();
273
+ }
274
+ /**
275
+ * Updates the resize operation with new coordinates.
276
+ * Call this during mousemove/touchmove if not using attachHandle.
277
+ *
278
+ * @param clientX - The current X coordinate.
279
+ * @param clientY - The current Y coordinate.
280
+ * @public
281
+ */
282
+ updateResize(clientX, clientY) {
283
+ if (!this._isResizing || !this._target) {
284
+ return;
285
+ }
286
+ const deltaX = clientX - this._startX;
287
+ const deltaY = clientY - this._startY;
288
+ const dimensions = this.calculateDimensions(deltaX, deltaY);
289
+ if (this._autoApply) {
290
+ this.applyDimensions(dimensions);
291
+ }
292
+ this._onResizing?.({
293
+ direction: this._direction,
294
+ deltaX,
295
+ deltaY,
296
+ currentX: clientX,
297
+ currentY: clientY,
298
+ newWidth: dimensions.width,
299
+ newHeight: dimensions.height,
300
+ newLeft: dimensions.left,
301
+ newTop: dimensions.top
302
+ });
303
+ }
304
+ /**
305
+ * Ends the resize operation.
306
+ *
307
+ * @param clientX - The final X coordinate.
308
+ * @param clientY - The final Y coordinate.
309
+ * @public
310
+ */
311
+ endResize(clientX, clientY) {
312
+ if (!this._isResizing) {
313
+ return;
314
+ }
315
+ this._isResizing = false;
316
+ const totalDeltaX = clientX - this._startX;
317
+ const totalDeltaY = clientY - this._startY;
318
+ const dimensions = this.calculateDimensions(totalDeltaX, totalDeltaY);
319
+ this._onResizeEnd?.({
320
+ direction: this._direction,
321
+ totalDeltaX,
322
+ totalDeltaY,
323
+ finalWidth: dimensions.width,
324
+ finalHeight: dimensions.height,
325
+ finalLeft: dimensions.left,
326
+ finalTop: dimensions.top
327
+ });
328
+ this.removeGlobalListeners();
329
+ }
330
+ /**
331
+ * Cancels the current resize operation without applying final changes.
332
+ *
333
+ * @public
334
+ */
335
+ cancelResize() {
336
+ if (!this._isResizing) {
337
+ return;
338
+ }
339
+ this._isResizing = false;
340
+ // Restore original dimensions if autoApply was enabled
341
+ if (this._autoApply && this._target) {
342
+ this._target.style.width = `${this._startWidth}px`;
343
+ this._target.style.height = `${this._startHeight}px`;
344
+ this._target.style.left = `${this._startLeft}px`;
345
+ this._target.style.top = `${this._startTop}px`;
346
+ }
347
+ this.removeGlobalListeners();
348
+ }
349
+ /**
350
+ * Calculates the new dimensions based on delta movement.
351
+ * This method can be used externally to preview dimensions without applying.
352
+ *
353
+ * @param deltaX - The horizontal delta from start position.
354
+ * @param deltaY - The vertical delta from start position.
355
+ * @returns The calculated dimensions.
356
+ * @public
357
+ */
358
+ calculateDimensions(deltaX, deltaY) {
359
+ let width = this._startWidth;
360
+ let height = this._startHeight;
361
+ let left = this._startLeft;
362
+ let top = this._startTop;
363
+ const direction = this._direction;
364
+ // Handle horizontal resize
365
+ if (direction === ResizeDirection.East ||
366
+ direction === ResizeDirection.NorthEast ||
367
+ direction === ResizeDirection.SouthEast) {
368
+ width = this._startWidth + deltaX;
369
+ }
370
+ else if (direction === ResizeDirection.West ||
371
+ direction === ResizeDirection.NorthWest ||
372
+ direction === ResizeDirection.SouthWest) {
373
+ width = this._startWidth - deltaX;
374
+ left = this._startLeft + deltaX;
375
+ }
376
+ // Handle vertical resize
377
+ if (direction === ResizeDirection.South ||
378
+ direction === ResizeDirection.SouthEast ||
379
+ direction === ResizeDirection.SouthWest) {
380
+ height = this._startHeight + deltaY;
381
+ }
382
+ else if (direction === ResizeDirection.North ||
383
+ direction === ResizeDirection.NorthEast ||
384
+ direction === ResizeDirection.NorthWest) {
385
+ height = this._startHeight - deltaY;
386
+ top = this._startTop + deltaY;
387
+ }
388
+ // Apply constraints
389
+ width = Math.max(this._minWidth, Math.min(this._maxWidth, width));
390
+ height = Math.max(this._minHeight, Math.min(this._maxHeight, height));
391
+ // Adjust position if constrained
392
+ if (direction === ResizeDirection.West ||
393
+ direction === ResizeDirection.NorthWest ||
394
+ direction === ResizeDirection.SouthWest) {
395
+ left = this._startLeft + (this._startWidth - width);
396
+ }
397
+ if (direction === ResizeDirection.North ||
398
+ direction === ResizeDirection.NorthEast ||
399
+ direction === ResizeDirection.NorthWest) {
400
+ top = this._startTop + (this._startHeight - height);
401
+ }
402
+ return {
403
+ width,
404
+ height,
405
+ left,
406
+ top
407
+ };
408
+ }
409
+ /**
410
+ * Applies dimensions to the target element.
411
+ *
412
+ * @param dimensions - The dimensions to apply.
413
+ * @public
414
+ */
415
+ applyDimensions(dimensions) {
416
+ if (!this._target) {
417
+ return;
418
+ }
419
+ const direction = this._direction;
420
+ // Apply width changes
421
+ if (direction === ResizeDirection.East ||
422
+ direction === ResizeDirection.West ||
423
+ direction === ResizeDirection.NorthEast ||
424
+ direction === ResizeDirection.NorthWest ||
425
+ direction === ResizeDirection.SouthEast ||
426
+ direction === ResizeDirection.SouthWest) {
427
+ this._target.style.width = `${dimensions.width}px`;
428
+ }
429
+ // Apply height changes
430
+ if (direction === ResizeDirection.North ||
431
+ direction === ResizeDirection.South ||
432
+ direction === ResizeDirection.NorthEast ||
433
+ direction === ResizeDirection.NorthWest ||
434
+ direction === ResizeDirection.SouthEast ||
435
+ direction === ResizeDirection.SouthWest) {
436
+ this._target.style.height = `${dimensions.height}px`;
437
+ }
438
+ // Apply position changes for north/west directions
439
+ if (direction === ResizeDirection.West ||
440
+ direction === ResizeDirection.NorthWest ||
441
+ direction === ResizeDirection.SouthWest) {
442
+ this._target.style.left = `${dimensions.left}px`;
443
+ }
444
+ if (direction === ResizeDirection.North ||
445
+ direction === ResizeDirection.NorthEast ||
446
+ direction === ResizeDirection.NorthWest) {
447
+ this._target.style.top = `${dimensions.top}px`;
448
+ }
449
+ }
450
+ /**
451
+ * Disposes the controller and cleans up all resources.
452
+ *
453
+ * @public
454
+ */
455
+ dispose() {
456
+ this.cancelResize();
457
+ this.detachAllHandles();
458
+ }
459
+ /**
460
+ * Adds global listeners for mouse/touch events.
461
+ *
462
+ * @private
463
+ */
464
+ addGlobalListeners() {
465
+ window.addEventListener('mousemove', this._boundHandleMouseMove);
466
+ window.addEventListener('mouseup', this._boundHandleMouseUp);
467
+ window.addEventListener('touchmove', this._boundHandleTouchMove, { passive: false });
468
+ window.addEventListener('touchend', this._boundHandleTouchEnd);
469
+ window.addEventListener('touchcancel', this._boundHandleTouchEnd);
470
+ }
471
+ /**
472
+ * Removes global listeners for mouse/touch events.
473
+ *
474
+ * @private
475
+ */
476
+ removeGlobalListeners() {
477
+ window.removeEventListener('mousemove', this._boundHandleMouseMove);
478
+ window.removeEventListener('mouseup', this._boundHandleMouseUp);
479
+ window.removeEventListener('touchmove', this._boundHandleTouchMove);
480
+ window.removeEventListener('touchend', this._boundHandleTouchEnd);
481
+ window.removeEventListener('touchcancel', this._boundHandleTouchEnd);
482
+ }
483
+ /**
484
+ * Handles mouse move events during resize.
485
+ *
486
+ * @private
487
+ */
488
+ handleMouseMove(e) {
489
+ this.updateResize(e.clientX, e.clientY);
490
+ }
491
+ /**
492
+ * Handles mouse up events to end resize.
493
+ *
494
+ * @private
495
+ */
496
+ handleMouseUp(e) {
497
+ this.endResize(e.clientX, e.clientY);
498
+ }
499
+ /**
500
+ * Handles touch move events during resize.
501
+ *
502
+ * @private
503
+ */
504
+ handleTouchMove(e) {
505
+ if (e.touches.length === 1) {
506
+ e.preventDefault();
507
+ this.updateResize(e.touches[0].clientX, e.touches[0].clientY);
508
+ }
509
+ }
510
+ /**
511
+ * Handles touch end events to end resize.
512
+ *
513
+ * @private
514
+ */
515
+ handleTouchEnd(e) {
516
+ const touch = e.changedTouches[0];
517
+ this.endResize(touch.clientX, touch.clientY);
518
+ }
519
+ }
520
+ //# sourceMappingURL=ResizeThumbController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResizeThumbController.js","sourceRoot":"","sources":["../../../src/Controls/Controllers/ResizeThumbController.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAEl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mB,CAAC,CAAC;QAChE,MAAM,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACpE,MAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;QAClE,MAAM,CAAC,mBAAmB,CAAC,aAAa,EAAE,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACzE,CAAC;IAED;;;;OAIG;IACK,eAAe,CAAC,CAAa;QACjC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED;;;;OAIG;IACK,aAAa,CAAC,CAAa;QAC/B,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACK,eAAe,CAAC,CAAa;QACjC,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzB,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QAClE,CAAC;IACL,CAAC;IAED;;;;OAIG;IACK,cAAc,CAAC,CAAa;QAChC,MAAM,KAAK,GAAG,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;QAClC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;CAIJ"}
@@ -0,0 +1,54 @@
1
+ import type { ValuesOf } from '../../Types/ValuesOf';
2
+ /**
3
+ * `ResizeDirection` - Defines the directions in which an element can be resized.
4
+ *
5
+ * Used to configure resize handles and determine valid resize behaviors.
6
+ * Directions can be combined to enable multi-directional resizing.
7
+ *
8
+ * @public
9
+ */
10
+ export declare const ResizeDirection: {
11
+ /**
12
+ * Resize from the north (top) edge.
13
+ */
14
+ readonly North: "north";
15
+ /**
16
+ * Resize from the south (bottom) edge.
17
+ */
18
+ readonly South: "south";
19
+ /**
20
+ * Resize from the east (right) edge.
21
+ */
22
+ readonly East: "east";
23
+ /**
24
+ * Resize from the west (left) edge.
25
+ */
26
+ readonly West: "west";
27
+ /**
28
+ * Resize from the north-west (top-left) corner.
29
+ */
30
+ readonly NorthWest: "north-west";
31
+ /**
32
+ * Resize from the north-east (top-right) corner.
33
+ */
34
+ readonly NorthEast: "north-east";
35
+ /**
36
+ * Resize from the south-west (bottom-left) corner.
37
+ */
38
+ readonly SouthWest: "south-west";
39
+ /**
40
+ * Resize from the south-east (bottom-right) corner.
41
+ */
42
+ readonly SouthEast: "south-east";
43
+ };
44
+ /**
45
+ * @public
46
+ */
47
+ export type ResizeDirection = ValuesOf<typeof ResizeDirection>;
48
+ /**
49
+ * An array containing all possible resize directions.
50
+ *
51
+ * @public
52
+ */
53
+ export declare const ALL_RESIZE_DIRECTIONS: ReadonlyArray<ResizeDirection>;
54
+ //# sourceMappingURL=ResizeDirection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResizeDirection.d.ts","sourceRoot":"","sources":["../../../src/Controls/Types/ResizeDirection.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAIrD;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;IAExB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEG,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AAE/D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,eAAe,CASvD,CAAC"}
@@ -0,0 +1,60 @@
1
+ // #region Imports
2
+ // #endregion
3
+ /**
4
+ * `ResizeDirection` - Defines the directions in which an element can be resized.
5
+ *
6
+ * Used to configure resize handles and determine valid resize behaviors.
7
+ * Directions can be combined to enable multi-directional resizing.
8
+ *
9
+ * @public
10
+ */
11
+ export const ResizeDirection = {
12
+ /**
13
+ * Resize from the north (top) edge.
14
+ */
15
+ North: 'north',
16
+ /**
17
+ * Resize from the south (bottom) edge.
18
+ */
19
+ South: 'south',
20
+ /**
21
+ * Resize from the east (right) edge.
22
+ */
23
+ East: 'east',
24
+ /**
25
+ * Resize from the west (left) edge.
26
+ */
27
+ West: 'west',
28
+ /**
29
+ * Resize from the north-west (top-left) corner.
30
+ */
31
+ NorthWest: 'north-west',
32
+ /**
33
+ * Resize from the north-east (top-right) corner.
34
+ */
35
+ NorthEast: 'north-east',
36
+ /**
37
+ * Resize from the south-west (bottom-left) corner.
38
+ */
39
+ SouthWest: 'south-west',
40
+ /**
41
+ * Resize from the south-east (bottom-right) corner.
42
+ */
43
+ SouthEast: 'south-east'
44
+ };
45
+ /**
46
+ * An array containing all possible resize directions.
47
+ *
48
+ * @public
49
+ */
50
+ export const ALL_RESIZE_DIRECTIONS = [
51
+ ResizeDirection.North,
52
+ ResizeDirection.South,
53
+ ResizeDirection.East,
54
+ ResizeDirection.West,
55
+ ResizeDirection.NorthWest,
56
+ ResizeDirection.NorthEast,
57
+ ResizeDirection.SouthWest,
58
+ ResizeDirection.SouthEast
59
+ ];
60
+ //# sourceMappingURL=ResizeDirection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResizeDirection.js","sourceRoot":"","sources":["../../../src/Controls/Types/ResizeDirection.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAIlB,aAAa;AAEb;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAE3B;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,SAAS,EAAE,YAAY;IAEvB;;OAEG;IACH,SAAS,EAAE,YAAY;CACjB,CAAC;AAOX;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAmC;IACjE,eAAe,CAAC,KAAK;IACrB,eAAe,CAAC,KAAK;IACrB,eAAe,CAAC,IAAI;IACpB,eAAe,CAAC,IAAI;IACpB,eAAe,CAAC,SAAS;IACzB,eAAe,CAAC,SAAS;IACzB,eAAe,CAAC,SAAS;IACzB,eAAe,CAAC,SAAS;CACnB,CAAC"}
package/Dom/Interval.d.ts CHANGED
@@ -4,14 +4,29 @@ export declare class Interval {
4
4
  private _intervalId;
5
5
  private _tick;
6
6
  constructor(period: number, sideEffect: (tick: number) => void);
7
+ /**
8
+ * Gets the current tick value.
9
+ *
10
+ * @public
11
+ * @readonly
12
+ */
13
+ get tick(): number;
7
14
  /**
8
15
  * Starts emitting values at the specified interval.
16
+ * If already running, this is a no-op.
9
17
  */
10
18
  start(): void;
11
19
  /**
12
- * Stops emitting values.
20
+ * Stops emitting values without resetting the tick.
13
21
  */
14
22
  stop(): void;
23
+ /**
24
+ * Resets the tick counter to zero.
25
+ */
26
+ reset(): void;
27
+ /**
28
+ * Stops and resets the interval.
29
+ */
15
30
  destroy(): void;
16
31
  }
17
32
  //# sourceMappingURL=Interval.d.ts.map