@zag-js/rect-utils 0.1.5 → 0.1.6

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.
package/dist/index.js CHANGED
@@ -330,12 +330,24 @@ function getRectFromPoints(...pts) {
330
330
  var { min, max } = Math;
331
331
  function union(...rs) {
332
332
  const pMin = {
333
- x: min.apply(Math, rs.map((r) => r.minX)),
334
- y: min.apply(Math, rs.map((r) => r.minY))
333
+ x: min.apply(
334
+ Math,
335
+ rs.map((r) => r.minX)
336
+ ),
337
+ y: min.apply(
338
+ Math,
339
+ rs.map((r) => r.minY)
340
+ )
335
341
  };
336
342
  const pMax = {
337
- x: max.apply(Math, rs.map((r) => r.maxX)),
338
- y: max.apply(Math, rs.map((r) => r.maxY))
343
+ x: max.apply(
344
+ Math,
345
+ rs.map((r) => r.maxX)
346
+ ),
347
+ y: max.apply(
348
+ Math,
349
+ rs.map((r) => r.maxY)
350
+ )
339
351
  };
340
352
  return getRectFromPoints(pMin, pMax);
341
353
  }
package/dist/index.mjs CHANGED
@@ -269,12 +269,24 @@ function getRectFromPoints(...pts) {
269
269
  var { min, max } = Math;
270
270
  function union(...rs) {
271
271
  const pMin = {
272
- x: min.apply(Math, rs.map((r) => r.minX)),
273
- y: min.apply(Math, rs.map((r) => r.minY))
272
+ x: min.apply(
273
+ Math,
274
+ rs.map((r) => r.minX)
275
+ ),
276
+ y: min.apply(
277
+ Math,
278
+ rs.map((r) => r.minY)
279
+ )
274
280
  };
275
281
  const pMax = {
276
- x: max.apply(Math, rs.map((r) => r.maxX)),
277
- y: max.apply(Math, rs.map((r) => r.maxY))
282
+ x: max.apply(
283
+ Math,
284
+ rs.map((r) => r.maxX)
285
+ ),
286
+ y: max.apply(
287
+ Math,
288
+ rs.map((r) => r.maxY)
289
+ )
278
290
  };
279
291
  return getRectFromPoints(pMin, pMax);
280
292
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/rect-utils",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "js",
@@ -25,8 +25,8 @@
25
25
  "url": "https://github.com/chakra-ui/zag/issues"
26
26
  },
27
27
  "devDependencies": {
28
- "@zag-js/dom-utils": "0.1.8",
29
- "@zag-js/utils": "0.1.3"
28
+ "@zag-js/dom-utils": "0.1.11",
29
+ "@zag-js/utils": "0.1.4"
30
30
  },
31
31
  "scripts": {
32
32
  "build-fast": "tsup src/index.ts --format=esm,cjs",