@base-framework/ui 1.0.201 → 1.0.202

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.
@@ -1,11 +1,11 @@
1
1
  var y = Object.defineProperty;
2
- var S = (i, t, e) => t in i ? y(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
- var m = (i, t, e) => S(i, typeof t != "symbol" ? t + "" : t, e);
4
- import { DateTime as g, base as l } from "@base-framework/base";
2
+ var S = (i, t, n) => t in i ? y(i, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : i[t] = n;
3
+ var g = (i, t, n) => S(i, typeof t != "symbol" ? t + "" : t, n);
4
+ import { DateTime as f, base as l } from "@base-framework/base";
5
5
  const h = (i, t) => (typeof i == "string" && (i = [i]), Array.isArray(i) ? (i.push(t), i) : {
6
6
  ...i,
7
7
  callBack: t
8
- }), p = (i, t = "") => i ?? t, z = {
8
+ }), x = (i, t = "") => i ?? t, z = {
9
9
  /**
10
10
  * Formats a number with commas.
11
11
  *
@@ -14,10 +14,12 @@ const h = (i, t) => (typeof i == "string" && (i = [i]), Array.isArray(i) ? (i.pu
14
14
  * @returns {object|array}
15
15
  */
16
16
  number(i, t = null) {
17
- return h(i, (n) => {
18
- n = p(n, t);
19
- const s = /\B(?=(\d{3})+(?!\d))/g;
20
- return n.toString().replace(s, ",");
17
+ return h(i, (e) => {
18
+ if (!isNaN(e)) {
19
+ const s = /\B(?=(\d{3})+(?!\d))/g;
20
+ return e.toString().replace(s, ",");
21
+ }
22
+ return t || "";
21
23
  });
22
24
  },
23
25
  /**
@@ -28,8 +30,8 @@ const h = (i, t) => (typeof i == "string" && (i = [i]), Array.isArray(i) ? (i.pu
28
30
  * @param {string} no - Text for false values.
29
31
  * @returns {object|array}
30
32
  */
31
- yesno(i, t = "Yes", e = "No") {
32
- return h(i, (s) => s ? t : e);
33
+ yesno(i, t = "Yes", n = "No") {
34
+ return h(i, (s) => s ? t : n);
33
35
  },
34
36
  /**
35
37
  * Formats a value as money with two decimals.
@@ -39,12 +41,11 @@ const h = (i, t) => (typeof i == "string" && (i = [i]), Array.isArray(i) ? (i.pu
39
41
  * @param {*} defaultValue - Value if original is invalid.
40
42
  * @returns {object|array}
41
43
  */
42
- money(i, t = "$", e = null) {
44
+ money(i, t = "$", n = null) {
43
45
  return h(i, (s) => {
44
- s = p(s, e);
45
46
  const o = parseFloat(s);
46
47
  if (isNaN(o))
47
- return e;
48
+ return n || "";
48
49
  const r = /\B(?=(\d{3})+(?!\d))/g;
49
50
  return t + o.toFixed(2).toString().replace(r, ",");
50
51
  });
@@ -57,10 +58,10 @@ const h = (i, t) => (typeof i == "string" && (i = [i]), Array.isArray(i) ? (i.pu
57
58
  * @returns {object|array}
58
59
  */
59
60
  phone(i, t = null) {
60
- return h(i, (n) => {
61
- n = p(n, t);
62
- const s = n.toString().replace(/\D/g, "");
63
- return s.length === 10 ? "(" + s.slice(0, 3) + ") " + s.slice(3, 6) + "-" + s.slice(6) : n;
61
+ return h(i, (e) => {
62
+ e = e || "";
63
+ const s = String(e.toString()).replace(/\D/g, "");
64
+ return s.length === 10 ? "(" + s.slice(0, 3) + ") " + s.slice(3, 6) + "-" + s.slice(6) : e || t;
64
65
  });
65
66
  },
66
67
  /**
@@ -71,9 +72,9 @@ const h = (i, t) => (typeof i == "string" && (i = [i]), Array.isArray(i) ? (i.pu
71
72
  * @returns {object|array}
72
73
  */
73
74
  integer(i, t = null) {
74
- return h(i, (n) => {
75
- n = p(n, t);
76
- const s = parseInt(n, 10);
75
+ return h(i, (e) => {
76
+ e = x(e, t);
77
+ const s = parseInt(e, 10);
77
78
  return isNaN(s) ? t : s.toString();
78
79
  });
79
80
  },
@@ -85,7 +86,7 @@ const h = (i, t) => (typeof i == "string" && (i = [i]), Array.isArray(i) ? (i.pu
85
86
  * @returns {object|array}
86
87
  */
87
88
  date(i, t = null) {
88
- return h(i, (n) => n ? g.format("standard", n) : t || "");
89
+ return h(i, (e) => e ? f.format("standard", e) : t || "");
89
90
  },
90
91
  /**
91
92
  * Formats a date and time value to a standard date and time format.
@@ -95,7 +96,7 @@ const h = (i, t) => (typeof i == "string" && (i = [i]), Array.isArray(i) ? (i.pu
95
96
  * @returns {object|array}
96
97
  */
97
98
  dateTime(i, t = null) {
98
- return h(i, (n) => n ? g.format("standard", n) + " " + g.formatTime(n, 12) : t || "");
99
+ return h(i, (e) => e ? f.format("standard", e) + " " + f.formatTime(e, 12) : t || "");
99
100
  },
100
101
  /**
101
102
  * Formats a time value to a standard time format.
@@ -105,7 +106,7 @@ const h = (i, t) => (typeof i == "string" && (i = [i]), Array.isArray(i) ? (i.pu
105
106
  * @returns {object|array}
106
107
  */
107
108
  time(i, t = null) {
108
- return h(i, (n) => n ? g.formatTime(n, 12) : t || "");
109
+ return h(i, (e) => e ? f.formatTime(e, 12) : t || "");
109
110
  },
110
111
  /**
111
112
  * Formats a value with a default value if null or undefined.
@@ -115,10 +116,10 @@ const h = (i, t) => (typeof i == "string" && (i = [i]), Array.isArray(i) ? (i.pu
115
116
  * @returns {object|array}
116
117
  */
117
118
  default(i, t = null) {
118
- return h(i, (n) => p(n, t));
119
+ return h(i, (e) => x(e, t));
119
120
  }
120
121
  };
121
- class D {
122
+ class v {
122
123
  /**
123
124
  * Creates an instance of ElementScaler.
124
125
  *
@@ -174,10 +175,10 @@ class D {
174
175
  * @param {number} scale - Scale factor (e.g., 1.0 = 100%, 0.5 = 50%).
175
176
  * @returns {{width: number, height: number}} The new width and height after scaling.
176
177
  */
177
- transform(t, e, n) {
178
+ transform(t, n, e) {
178
179
  const s = this.element, o = s.style;
179
- o.top = e + "px", o.left = t + "px";
180
- const r = s.naturalWidth * n, c = s.naturalHeight * n;
180
+ o.top = n + "px", o.left = t + "px";
181
+ const r = s.naturalWidth * e, c = s.naturalHeight * e;
181
182
  return o.width = r + "px", o.height = c + "px", { width: r, height: c };
182
183
  }
183
184
  /**
@@ -189,7 +190,7 @@ class D {
189
190
  this.setBoundingBox(), this.containerSize = this.container.getBoundingClientRect();
190
191
  }
191
192
  }
192
- class v {
193
+ class D {
193
194
  /**
194
195
  * Creates an EventController instance.
195
196
  *
@@ -197,11 +198,11 @@ class v {
197
198
  * @param {object} parent - The parent object (ImageScaler) that handles actions.
198
199
  * @param {HTMLElement} container - The DOM element to attach events to.
199
200
  */
200
- constructor(t, e) {
201
+ constructor(t, n) {
201
202
  /**
202
203
  * Tracks and measures distances between touches for pinch gestures.
203
204
  */
204
- m(this, "pinchTracker", {
205
+ g(this, "pinchTracker", {
205
206
  /** @type {number|null} */
206
207
  previousDistance: null,
207
208
  /** @type {number|null} */
@@ -215,9 +216,9 @@ class v {
215
216
  * @param {number} y2
216
217
  * @returns {number}
217
218
  */
218
- distance(t, e, n, s) {
219
+ distance(t, n, e, s) {
219
220
  return Math.sqrt(
220
- (t - n) * (t - n) + (e - s) * (e - s)
221
+ (t - e) * (t - e) + (n - s) * (n - s)
221
222
  );
222
223
  },
223
224
  /**
@@ -235,8 +236,8 @@ class v {
235
236
  * @param {object} touch2
236
237
  * @returns {void}
237
238
  */
238
- setCurrentDistance(t, e) {
239
- this.currentDistance = this.distance(t.x, t.y, e.x, e.y);
239
+ setCurrentDistance(t, n) {
240
+ this.currentDistance = this.distance(t.x, t.y, n.x, n.y);
240
241
  },
241
242
  /**
242
243
  * Updates currentDistance and keeps track of the previous distance.
@@ -245,8 +246,8 @@ class v {
245
246
  * @param {object} touch2
246
247
  * @returns {number} The updated current distance.
247
248
  */
248
- updateCurrentDistance(t, e) {
249
- return this.setPreviousDistance(), this.setCurrentDistance(t, e), this.currentDistance;
249
+ updateCurrentDistance(t, n) {
250
+ return this.setPreviousDistance(), this.setCurrentDistance(t, n), this.currentDistance;
250
251
  },
251
252
  /**
252
253
  * Determines the scale direction (zoom in/out) based on distance changes.
@@ -255,10 +256,10 @@ class v {
255
256
  * @param {object} touch2
256
257
  * @returns {number} 1 for zoom in, -1 for zoom out, 0 if below threshold.
257
258
  */
258
- getScale(t, e) {
259
- let n = 0;
260
- const s = this.updateCurrentDistance(t, e), o = this.previousDistance;
261
- return o === null || Math.abs(s - o) < 2 || (s > o ? n = 1 : s < o && (n = -1)), n;
259
+ getScale(t, n) {
260
+ let e = 0;
261
+ const s = this.updateCurrentDistance(t, n), o = this.previousDistance;
262
+ return o === null || Math.abs(s - o) < 2 || (s > o ? e = 1 : s < o && (e = -1)), e;
262
263
  },
263
264
  /**
264
265
  * Resets the distance measurements.
@@ -269,7 +270,7 @@ class v {
269
270
  this.previousDistance = null, this.currentDistance = null;
270
271
  }
271
272
  });
272
- this.parent = t, this.container = e, this.pointer = { x: 0, y: 0, status: "up" }, this.setup();
273
+ this.parent = t, this.container = n, this.pointer = { x: 0, y: 0, status: "up" }, this.setup();
273
274
  }
274
275
  /**
275
276
  * Initializes event setup.
@@ -293,11 +294,11 @@ class v {
293
294
  * @returns {void}
294
295
  */
295
296
  setupEvents() {
296
- const t = this.container, e = l.bind(this, this.pointerMove), n = l.bind(this, this.pointerUp), s = l.bind(this, this.pointerDown), o = l.bind(this, this.wheel), r = l.bind(this, this.resize);
297
+ const t = this.container, n = l.bind(this, this.pointerMove), e = l.bind(this, this.pointerUp), s = l.bind(this, this.pointerDown), o = l.bind(this, this.wheel), r = l.bind(this, this.resize);
297
298
  this.addEvents = function() {
298
- l.on(["mousemove", "touchmove"], t, e), l.on(["mouseup", "mouseout", "touchend", "touchcancel"], t, n), l.on(["mousedown", "touchstart"], t, s), l.onMouseWheel(o, t, !0), l.on("resize", globalThis, r);
299
+ l.on(["mousemove", "touchmove"], t, n), l.on(["mouseup", "mouseout", "touchend", "touchcancel"], t, e), l.on(["mousedown", "touchstart"], t, s), l.onMouseWheel(o, t, !0), l.on("resize", globalThis, r);
299
300
  }, this.addEvents(), this.removeEvents = function() {
300
- l.off(["mousemove", "touchmove"], t, e), l.off(["mouseup", "mouseout", "touchend", "touchcancel"], t, n), l.off(["mousedown", "touchstart"], t, s), l.offMouseWheel(o, t), l.off("resize", globalThis, r);
301
+ l.off(["mousemove", "touchmove"], t, n), l.off(["mouseup", "mouseout", "touchend", "touchcancel"], t, e), l.off(["mousedown", "touchstart"], t, s), l.offMouseWheel(o, t), l.off("resize", globalThis, r);
301
302
  };
302
303
  }
303
304
  /**
@@ -307,8 +308,8 @@ class v {
307
308
  * @param {Event} e - The associated event.
308
309
  * @returns {void}
309
310
  */
310
- wheel(t, e) {
311
- this.parent.callAction("pinch", e, t);
311
+ wheel(t, n) {
312
+ this.parent.callAction("pinch", n, t);
312
313
  }
313
314
  /**
314
315
  * Extracts the position from mouse or touch events and updates `this.pointer`.
@@ -317,14 +318,14 @@ class v {
317
318
  * @returns {void}
318
319
  */
319
320
  getEventPosition(t) {
320
- let e, n;
321
+ let n, e;
321
322
  const s = t.touches;
322
323
  if (s && s.length) {
323
324
  const o = s[0];
324
- e = o.clientX, n = o.clientY;
325
+ n = o.clientX, e = o.clientY;
325
326
  } else
326
- e = t.clientX, n = t.clientY;
327
- this.pointer.x = e, this.pointer.y = n;
327
+ n = t.clientX, e = t.clientY;
328
+ this.pointer.x = n, this.pointer.y = e;
328
329
  }
329
330
  /**
330
331
  * Called when the pointer goes down (mouse/touch).
@@ -359,11 +360,11 @@ class v {
359
360
  * @returns {Array<object>} Array of touch points.
360
361
  */
361
362
  getTouches(t) {
362
- const e = [], n = t.touches;
363
- if (n && n.length)
364
- for (let s = 0; s < n.length; s++)
365
- e.push(n[s]);
366
- return e;
363
+ const n = [], e = t.touches;
364
+ if (e && e.length)
365
+ for (let s = 0; s < e.length; s++)
366
+ n.push(e[s]);
367
+ return n;
367
368
  }
368
369
  /**
369
370
  * Calculates the midpoint (center) between two sets of coordinates.
@@ -374,10 +375,10 @@ class v {
374
375
  * @param {number} y2
375
376
  * @returns {{x: number, y: number}} The center coordinates.
376
377
  */
377
- getCenter(t, e, n, s) {
378
+ getCenter(t, n, e, s) {
378
379
  return {
379
- x: (t + n) / 2,
380
- y: (e + s) / 2
380
+ x: (t + e) / 2,
381
+ y: (n + s) / 2
381
382
  };
382
383
  }
383
384
  /**
@@ -387,11 +388,11 @@ class v {
387
388
  * @returns {void}
388
389
  */
389
390
  pinch(t) {
390
- const e = this.getTouches(t);
391
- if (e.length === 2) {
391
+ const n = this.getTouches(t);
392
+ if (n.length === 2) {
392
393
  this.pointer.status = "down";
393
- const n = e[0], s = e[1], o = this.getPosition(n.clientX, n.clientY), r = this.getPosition(s.clientX, s.clientY);
394
- this.centerMousePinch(n, s);
394
+ const e = n[0], s = n[1], o = this.getPosition(e.clientX, e.clientY), r = this.getPosition(s.clientX, s.clientY);
395
+ this.centerMousePinch(e, s);
395
396
  const c = this.pinchTracker.getScale(o, r);
396
397
  this.parent.callAction("pinch", t, c);
397
398
  }
@@ -403,10 +404,10 @@ class v {
403
404
  * @param {number} eY
404
405
  * @returns {{x: number, y: number}}
405
406
  */
406
- getPosition(t, e) {
407
+ getPosition(t, n) {
407
408
  return {
408
409
  x: parseInt(String(t)),
409
- y: parseInt(String(e))
410
+ y: parseInt(String(n))
410
411
  };
411
412
  }
412
413
  /**
@@ -416,14 +417,14 @@ class v {
416
417
  * @param {Touch} touch2
417
418
  * @returns {void}
418
419
  */
419
- centerMousePinch(t, e) {
420
- const n = this.getCenter(
420
+ centerMousePinch(t, n) {
421
+ const e = this.getCenter(
421
422
  t.clientX,
422
423
  t.clientY,
423
- e.clientX,
424
- e.clientY
424
+ n.clientX,
425
+ n.clientY
425
426
  ), s = this.pointer;
426
- s.x = n.x, s.y = n.y;
427
+ s.x = e.x, s.y = e.y;
427
428
  }
428
429
  /**
429
430
  * Called on a rotate gesture (currently not used).
@@ -441,9 +442,9 @@ class v {
441
442
  * @returns {boolean} True if it was a gesture (pinch); false otherwise.
442
443
  */
443
444
  isGesture(t) {
444
- let e = !1;
445
- const n = t.touches;
446
- return n && n.length > 1 && (t.preventDefault(), this.pinch(t), e = !0), e;
445
+ let n = !1;
446
+ const e = t.touches;
447
+ return e && e.length > 1 && (t.preventDefault(), this.pinch(t), n = !0), n;
447
448
  }
448
449
  /**
449
450
  * Called when the pointer moves (mouse/touch) but might also detect pinch.
@@ -464,8 +465,8 @@ class E {
464
465
  */
465
466
  constructor(t) {
466
467
  /** @type {number} Minimum allowed scale factor. */
467
- m(this, "minScale", 0.2);
468
- this.elementScaler = new D(t), this.scale = this.getImageScale(t), this.panning = !1, this.events = null, this.start = { x: 0, y: 0 }, this.delta = { x: 0, y: 0 }, this.setup();
468
+ g(this, "minScale", 0.2);
469
+ this.elementScaler = new v(t), this.scale = this.getImageScale(t), this.panning = !1, this.events = null, this.start = { x: 0, y: 0 }, this.delta = { x: 0, y: 0 }, this.setup();
469
470
  }
470
471
  /**
471
472
  * Initializes event handling and centers the image.
@@ -491,8 +492,8 @@ class E {
491
492
  * @param {*} [data] - Additional data passed to the method.
492
493
  * @returns {void}
493
494
  */
494
- callAction(t, e, n) {
495
- this[t](e, n);
495
+ callAction(t, n, e) {
496
+ this[t](n, e);
496
497
  }
497
498
  /**
498
499
  * Sets up the event controller for the image.
@@ -500,7 +501,7 @@ class E {
500
501
  * @returns {void}
501
502
  */
502
503
  setupEvents() {
503
- this.events = new v(this, this.elementScaler.element);
504
+ this.events = new D(this, this.elementScaler.element);
504
505
  }
505
506
  /**
506
507
  * Calculates an initial scale based on the element's offsetWidth vs. naturalWidth.
@@ -518,10 +519,10 @@ class E {
518
519
  * @returns {{x: number, y: number}} The pointer offset without scale.
519
520
  */
520
521
  getOffset(t) {
521
- const e = this.scale, n = this.delta, s = this.getPointerPosition();
522
+ const n = this.scale, e = this.delta, s = this.getPointerPosition();
522
523
  return {
523
- x: (s.x - n.x) / e,
524
- y: (s.y - n.y) / e
524
+ x: (s.x - e.x) / n,
525
+ y: (s.y - e.y) / n
525
526
  };
526
527
  }
527
528
  /**
@@ -532,8 +533,8 @@ class E {
532
533
  * @param {number} scale - The scale factor.
533
534
  * @returns {void}
534
535
  */
535
- scaleElement(t, e, n) {
536
- const s = this.elementScaler.transform(t, e, n);
536
+ scaleElement(t, n, e) {
537
+ const s = this.elementScaler.transform(t, n, e);
537
538
  this.center(s.width, s.height);
538
539
  }
539
540
  /**
@@ -543,28 +544,28 @@ class E {
543
544
  * @param {number} [height] - Height of the scaled element.
544
545
  * @returns {void}
545
546
  */
546
- center(t, e) {
547
- const n = this.elementScaler, s = n.containerSize, o = n.elementBoundingBox, r = this.delta;
548
- t = t || o.width, e = e || o.height;
547
+ center(t, n) {
548
+ const e = this.elementScaler, s = e.containerSize, o = e.elementBoundingBox, r = this.delta;
549
+ t = t || o.width, n = n || o.height;
549
550
  let c, a;
550
- const d = s.width;
551
- if (t < d)
552
- c = d / 2 - t / 2, c = c > 0 ? c : 0;
551
+ const p = s.width;
552
+ if (t < p)
553
+ c = p / 2 - t / 2, c = c > 0 ? c : 0;
553
554
  else {
554
555
  c = r.x;
555
556
  const u = t + r.x;
556
- u < d && (c = u + (d - u) - t), r.x > 0 && (c = 0);
557
+ u < p && (c = u + (p - u) - t), r.x > 0 && (c = 0);
557
558
  }
558
- const f = s.height;
559
- if (e < f)
560
- a = f / 2 - e / 2, a = a > 0 ? a : 0;
559
+ const d = s.height;
560
+ if (n < d)
561
+ a = d / 2 - n / 2, a = a > 0 ? a : 0;
561
562
  else {
562
563
  a = r.y;
563
- const u = e + r.y;
564
- u < f && (a = u + (f - u) - e), r.y > 0 && (a = 0);
564
+ const u = n + r.y;
565
+ u < d && (a = u + (d - u) - n), r.y > 0 && (a = 0);
565
566
  }
566
- const x = n.element.style;
567
- x.left = c + "px", x.top = a + "px", this.delta = { x: c, y: a };
567
+ const m = e.element.style;
568
+ m.left = c + "px", m.top = a + "px", this.delta = { x: c, y: a };
568
569
  }
569
570
  /**
570
571
  * Updates the current scale (zoom) value based on scroll delta.
@@ -573,8 +574,8 @@ class E {
573
574
  * @returns {number} The updated scale factor.
574
575
  */
575
576
  updateScale(t) {
576
- let e = this.scale;
577
- return t !== 0 && (e = t > 0 ? this.scale *= 1.05 : this.scale /= 1.05), e <= this.minScale && (this.scale = this.minScale), this.scale;
577
+ let n = this.scale;
578
+ return t !== 0 && (n = t > 0 ? this.scale *= 1.05 : this.scale /= 1.05), n <= this.minScale && (this.scale = this.minScale), this.scale;
578
579
  }
579
580
  /**
580
581
  * Returns the pointer position relative to the container.
@@ -582,10 +583,10 @@ class E {
582
583
  * @returns {{x: number, y: number}} The pointer coordinates.
583
584
  */
584
585
  getPointerPosition() {
585
- const t = this.elementScaler.containerSize, e = this.events.pointer;
586
+ const t = this.elementScaler.containerSize, n = this.events.pointer;
586
587
  return {
587
- x: e.x - t.left,
588
- y: e.y - t.top
588
+ x: n.x - t.left,
589
+ y: n.y - t.top
589
590
  };
590
591
  }
591
592
  /**
@@ -595,10 +596,10 @@ class E {
595
596
  * @returns {void}
596
597
  */
597
598
  pointerDown(t) {
598
- const e = this.delta, n = this.getPointerPosition();
599
+ const n = this.delta, e = this.getPointerPosition();
599
600
  this.start = {
600
- x: n.x - e.x,
601
- y: n.y - e.y
601
+ x: e.x - n.x,
602
+ y: e.y - n.y
602
603
  }, this.panning = !0;
603
604
  }
604
605
  /**
@@ -610,8 +611,8 @@ class E {
610
611
  pointerMove(t) {
611
612
  if (t.preventDefault(), !this.panning)
612
613
  return;
613
- const e = this.getPointerPosition(), n = this.delta, s = this.start;
614
- n.x = e.x - s.x, n.y = e.y - s.y, this.scaleElement(n.x, n.y, this.scale);
614
+ const n = this.getPointerPosition(), e = this.delta, s = this.start;
615
+ e.x = n.x - s.x, e.y = n.y - s.y, this.scaleElement(e.x, e.y, this.scale);
615
616
  }
616
617
  /**
617
618
  * Called when the user releases the pointer (mouse/touch).
@@ -637,11 +638,11 @@ class E {
637
638
  * @param {number} delta - Positive = zoom in, negative = zoom out.
638
639
  * @returns {void}
639
640
  */
640
- pinch(t, e) {
641
- const n = this.getOffset(t);
641
+ pinch(t, n) {
642
+ const e = this.getOffset(t);
642
643
  t.preventDefault();
643
- const s = this.updateScale(e), o = this.getPointerPosition(), r = this.delta;
644
- r.x = o.x - n.x * s, r.y = o.y - n.y * s, this.scaleElement(r.x, r.y, s);
644
+ const s = this.updateScale(n), o = this.getPointerPosition(), r = this.delta;
645
+ r.x = o.x - e.x * s, r.y = o.y - e.y * s, this.scaleElement(r.x, r.y, s);
645
646
  }
646
647
  }
647
648
  export {
package/dist/index.es.js CHANGED
@@ -10,7 +10,7 @@ import { B as De, I as Ie, M as Se, d as Be, e as Pe, g as Fe, N as Me, b as ke,
10
10
  import { B as He, a as Le, C as Ae, F as we, b as Ue, c as Re, M as Ee, P as Oe, S as Ge } from "./sidebar-menu-page-BVryQj2Z.js";
11
11
  import { A as je, F as qe, M as ze, a as Je, T as _e } from "./aside-template-McEj_Gxc.js";
12
12
  import { B as Qe } from "./bside-template-Du2m3rsE.js";
13
- import { F as Ye, I as Ze, c as $e } from "./image-scaler-BIZ0dtU2.js";
13
+ import { F as Ye, I as Ze, c as $e } from "./image-scaler-BQ7WdtlV.js";
14
14
  export {
15
15
  O as Alert,
16
16
  je as AsideTemplate,
package/dist/utils.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { F as r, I as c, c as t } from "./image-scaler-BIZ0dtU2.js";
1
+ import { F as r, I as c, c as t } from "./image-scaler-BQ7WdtlV.js";
2
2
  export {
3
3
  r as Format,
4
4
  c as ImageScaler,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/ui",
3
- "version": "1.0.201",
3
+ "version": "1.0.202",
4
4
  "description": "This is a UI package that adds components and atoms that use Tailwind CSS and a theme based on Shadcn.",
5
5
  "main": "./dist/index.es.js",
6
6
  "scripts": {