@synnaxlabs/x 0.32.0 → 0.34.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 (124) hide show
  1. package/.turbo/turbo-build.log +32 -32
  2. package/dist/binary.cjs +1 -1
  3. package/dist/binary.js +1 -1
  4. package/dist/bounds-CFI9wDXn.js +171 -0
  5. package/dist/bounds-DzCDHgdE.cjs +1 -0
  6. package/dist/bounds.cjs +1 -1
  7. package/dist/bounds.js +1 -1
  8. package/dist/box-DVCNGsJG.js +201 -0
  9. package/dist/box-Mf8E1Ypp.cjs +1 -0
  10. package/dist/box.cjs +1 -1
  11. package/dist/box.js +1 -1
  12. package/dist/caseconv.cjs +1 -1
  13. package/dist/caseconv.js +1 -1
  14. package/dist/compare.js +1 -1
  15. package/dist/deep.cjs +1 -1
  16. package/dist/deep.js +46 -48
  17. package/dist/{direction-DZbN47uL.cjs → direction-D7qoo_GJ.cjs} +1 -1
  18. package/dist/direction.cjs +1 -1
  19. package/dist/external-B3XSLDq5.cjs +1 -0
  20. package/dist/{external-CO221aaF.js → external-sVtvYJS6.js} +3 -3
  21. package/dist/{index-B5THJ1eb.js → index-BBa2mWG1.js} +1 -1
  22. package/dist/{index-DgaYJC35.cjs → index-CYxQwEdX.cjs} +1 -1
  23. package/dist/{index-B3BUDIdi.js → index-HQonyH7n.js} +1 -2
  24. package/dist/index-YsO0EMN8.cjs +1 -0
  25. package/dist/{index-Duv1uH08.js → index-eue4dSQX.js} +14 -10
  26. package/dist/index.cjs +2 -2
  27. package/dist/index.js +162 -145
  28. package/dist/{location-DjcaXEps.js → location-CI9x53qR.js} +8 -8
  29. package/dist/{location-gPB1RtfA.cjs → location-DetomF8Z.cjs} +1 -1
  30. package/dist/location.cjs +1 -1
  31. package/dist/location.js +1 -1
  32. package/dist/path-BBCx3K6k.cjs +1 -0
  33. package/dist/{path-B-1-i3qC.js → path-CmnoH3RC.js} +26 -26
  34. package/dist/{position-DkON65EZ.js → position-CFc9RsSn.js} +2 -2
  35. package/dist/{position-C71OiHiw.cjs → position-DKhPhvPh.cjs} +1 -1
  36. package/dist/position.cjs +1 -1
  37. package/dist/position.js +1 -1
  38. package/dist/runtime.cjs +1 -1
  39. package/dist/runtime.js +1 -1
  40. package/dist/{scale-COPgp55a.cjs → scale-CT61XD_X.cjs} +1 -1
  41. package/dist/{scale-qw6vRO4s.js → scale-DNQE1LMm.js} +25 -3
  42. package/dist/scale.cjs +1 -1
  43. package/dist/scale.js +1 -1
  44. package/dist/series-DWLXo7J6.cjs +11 -0
  45. package/dist/{series-B5eA90Ci.js → series-sjWkW8qe.js} +627 -466
  46. package/dist/spatial.cjs +1 -1
  47. package/dist/spatial.js +5 -5
  48. package/dist/src/binary/encoder.d.ts.map +1 -1
  49. package/dist/src/caseconv/caseconv.d.ts.map +1 -1
  50. package/dist/src/clamp/clamp.d.ts.map +1 -1
  51. package/dist/src/compare/compare.d.ts.map +1 -1
  52. package/dist/src/debounce/debounce.d.ts.map +1 -1
  53. package/dist/src/deep/difference.d.ts.map +1 -1
  54. package/dist/src/deep/merge.d.ts.map +1 -1
  55. package/dist/src/deep/path.d.ts +2 -2
  56. package/dist/src/deep/path.d.ts.map +1 -1
  57. package/dist/src/math/math.d.ts +26 -6
  58. package/dist/src/math/math.d.ts.map +1 -1
  59. package/dist/src/math/math.spec.d.ts +2 -0
  60. package/dist/src/math/math.spec.d.ts.map +1 -0
  61. package/dist/src/migrate/migrate.d.ts.map +1 -1
  62. package/dist/src/record.d.ts +4 -0
  63. package/dist/src/record.d.ts.map +1 -1
  64. package/dist/src/spatial/bounds/bounds.d.ts +208 -4
  65. package/dist/src/spatial/bounds/bounds.d.ts.map +1 -1
  66. package/dist/src/spatial/box/box.d.ts +4 -4
  67. package/dist/src/spatial/box/box.d.ts.map +1 -1
  68. package/dist/src/spatial/scale/scale.d.ts +177 -5
  69. package/dist/src/spatial/scale/scale.d.ts.map +1 -1
  70. package/dist/src/strings/strings.d.ts +14 -0
  71. package/dist/src/strings/strings.d.ts.map +1 -1
  72. package/dist/src/telem/generate.d.ts.map +1 -1
  73. package/dist/src/telem/series.d.ts +35 -10
  74. package/dist/src/telem/series.d.ts.map +1 -1
  75. package/dist/src/telem/telem.d.ts +12 -10
  76. package/dist/src/telem/telem.d.ts.map +1 -1
  77. package/dist/src/url/url.d.ts.map +1 -1
  78. package/dist/telem.cjs +1 -1
  79. package/dist/telem.js +1 -1
  80. package/dist/url.cjs +1 -1
  81. package/dist/url.js +1 -1
  82. package/dist/{zodutil-BWvwKcpb.cjs → zodutil-C6RYzvXd.cjs} +1 -1
  83. package/dist/{zodutil-qNM8aVYC.js → zodutil-Tmuc4CNq.js} +1 -1
  84. package/dist/zodutil.cjs +1 -1
  85. package/dist/zodutil.js +1 -1
  86. package/package.json +10 -9
  87. package/src/binary/encoder.ts +1 -2
  88. package/src/caseconv/caseconv.ts +8 -15
  89. package/src/clamp/clamp.ts +1 -1
  90. package/src/compare/compare.ts +1 -3
  91. package/src/debounce/debounce.ts +1 -2
  92. package/src/deep/difference.ts +3 -9
  93. package/src/deep/merge.ts +8 -15
  94. package/src/deep/path.spec.ts +1 -1
  95. package/src/deep/path.ts +4 -4
  96. package/src/math/math.spec.ts +149 -0
  97. package/src/math/math.ts +61 -10
  98. package/src/migrate/migrate.ts +4 -5
  99. package/src/record.ts +5 -0
  100. package/src/runtime/os.ts +2 -2
  101. package/src/spatial/bounds/bounds.spec.ts +135 -270
  102. package/src/spatial/bounds/bounds.ts +296 -29
  103. package/src/spatial/box/box.ts +13 -12
  104. package/src/spatial/direction/direction.ts +1 -1
  105. package/src/spatial/location/location.ts +5 -5
  106. package/src/spatial/scale/scale.ts +196 -12
  107. package/src/strings/strings.spec.ts +33 -1
  108. package/src/strings/strings.ts +52 -0
  109. package/src/telem/generate.ts +1 -3
  110. package/src/telem/series.spec.ts +235 -0
  111. package/src/telem/series.ts +310 -100
  112. package/src/telem/telem.spec.ts +27 -11
  113. package/src/telem/telem.ts +56 -36
  114. package/src/url/url.ts +9 -12
  115. package/src/zodutil/zodutil.spec.ts +5 -7
  116. package/tsconfig.tsbuildinfo +1 -1
  117. package/dist/bounds-CpboA0q6.js +0 -127
  118. package/dist/bounds-ZZc1c-_Z.cjs +0 -1
  119. package/dist/box-BQID-0jO.cjs +0 -1
  120. package/dist/box-xRqO6NvI.js +0 -202
  121. package/dist/external-B-DoBvh7.cjs +0 -1
  122. package/dist/index-xk130iQA.cjs +0 -1
  123. package/dist/path-577Fmn5N.cjs +0 -1
  124. package/dist/series-CJ65b1Uz.cjs +0 -11
@@ -1,9 +1,9 @@
1
1
 
2
- > @synnaxlabs/x@0.32.0 build /home/runner/work/synnax/synnax/x/ts
2
+ > @synnaxlabs/x@0.34.0 build /home/runner/work/synnax/synnax/x/ts
3
3
  > tsc --noEmit && vite build
4
4
 
5
5
   Synnax - Production mode
6
- vite v5.4.4 building for production...
6
+ vite v5.4.10 building for production...
7
7
  transforming...
8
8
  ✓ 84 modules transformed.
9
9
  Generated an empty chunk: "destructor".
@@ -39,27 +39,27 @@ computing gzip size...
39
39
  dist/telem.js  0.41 kB │ gzip: 0.25 kB
40
40
  dist/spatial.js  0.58 kB │ gzip: 0.28 kB
41
41
  dist/direction-CScbfCdT.js  0.65 kB │ gzip: 0.37 kB
42
- dist/external-CO221aaF.js  0.86 kB │ gzip: 0.51 kB
43
- dist/zodutil-qNM8aVYC.js  0.91 kB │ gzip: 0.54 kB
42
+ dist/external-sVtvYJS6.js  0.86 kB │ gzip: 0.51 kB
43
+ dist/zodutil-Tmuc4CNq.js  0.91 kB │ gzip: 0.54 kB
44
44
  dist/worker.js  1.17 kB │ gzip: 0.53 kB
45
45
  dist/base-DnZzEvvz.js  1.21 kB │ gzip: 0.51 kB
46
46
  dist/observe.js  1.41 kB │ gzip: 0.60 kB
47
47
  dist/dimensions-D-1PnJVI.js  1.49 kB │ gzip: 0.66 kB
48
- dist/path-B-1-i3qC.js  1.69 kB │ gzip: 0.68 kB
49
- dist/index-Duv1uH08.js  1.70 kB │ gzip: 0.81 kB
48
+ dist/path-CmnoH3RC.js  1.68 kB │ gzip: 0.67 kB
49
+ dist/index-eue4dSQX.js  1.83 kB │ gzip: 0.88 kB
50
50
  dist/url.js  1.98 kB │ gzip: 0.87 kB
51
- dist/position-DkON65EZ.js  2.25 kB │ gzip: 1.06 kB
51
+ dist/position-CFc9RsSn.js  2.25 kB │ gzip: 1.06 kB
52
52
  dist/xy-CrgPnICw.js  2.61 kB │ gzip: 1.05 kB
53
- dist/location-DjcaXEps.js  2.80 kB │ gzip: 1.16 kB
54
- dist/index-B3BUDIdi.js  2.91 kB │ gzip: 1.14 kB
55
- dist/index-B5THJ1eb.js  2.95 kB │ gzip: 1.12 kB
56
- dist/deep.js  3.24 kB │ gzip: 1.27 kB
57
- dist/bounds-CpboA0q6.js  4.87 kB │ gzip: 1.63 kB
58
- dist/scale-qw6vRO4s.js  5.64 kB │ gzip: 1.77 kB
59
- dist/box-xRqO6NvI.js  6.11 kB │ gzip: 2.16 kB
60
- dist/index.js  7.59 kB │ gzip: 2.84 kB
61
- dist/series-B5eA90Ci.js 55.09 kB │ gzip: 12.56 kB
62
- [vite:dts] Declaration files built in 3658ms.
53
+ dist/location-CI9x53qR.js  2.80 kB │ gzip: 1.16 kB
54
+ dist/index-HQonyH7n.js  2.90 kB │ gzip: 1.14 kB
55
+ dist/index-BBa2mWG1.js  2.95 kB │ gzip: 1.12 kB
56
+ dist/deep.js  3.23 kB │ gzip: 1.28 kB
57
+ dist/box-DVCNGsJG.js  6.14 kB │ gzip: 2.18 kB
58
+ dist/bounds-CFI9wDXn.js  6.44 kB │ gzip: 2.04 kB
59
+ dist/scale-DNQE1LMm.js  6.63 kB │ gzip: 1.99 kB
60
+ dist/index.js  8.23 kB │ gzip: 3.10 kB
61
+ dist/series-sjWkW8qe.js 60.46 kB │ gzip: 13.45 kB
62
+ [vite:dts] Declaration files built in 3824ms.
63
63
 
64
64
  Generated an empty chunk: "destructor".
65
65
  dist/destructor.cjs  0.01 kB │ gzip: 0.03 kB
@@ -87,27 +87,27 @@ Generated an empty chunk: "destructor".
87
87
  dist/search.cjs  0.25 kB │ gzip: 0.22 kB
88
88
  dist/record.cjs  0.25 kB │ gzip: 0.20 kB
89
89
  dist/debounce.cjs  0.33 kB │ gzip: 0.22 kB
90
- dist/direction-DZbN47uL.cjs  0.53 kB │ gzip: 0.34 kB
90
+ dist/direction-D7qoo_GJ.cjs  0.53 kB │ gzip: 0.34 kB
91
91
  dist/telem.cjs  0.54 kB │ gzip: 0.28 kB
92
92
  dist/spatial.cjs  0.63 kB │ gzip: 0.33 kB
93
- dist/external-B-DoBvh7.cjs  0.68 kB │ gzip: 0.45 kB
94
- dist/zodutil-BWvwKcpb.cjs  0.72 kB │ gzip: 0.46 kB
93
+ dist/external-B3XSLDq5.cjs  0.68 kB │ gzip: 0.45 kB
94
+ dist/zodutil-C6RYzvXd.cjs  0.72 kB │ gzip: 0.47 kB
95
95
  dist/worker.cjs  0.94 kB │ gzip: 0.49 kB
96
96
  dist/observe.cjs  1.00 kB │ gzip: 0.47 kB
97
97
  dist/url.cjs  1.10 kB │ gzip: 0.60 kB
98
98
  dist/dimensions-zMcb9pMk.cjs  1.17 kB │ gzip: 0.58 kB
99
- dist/path-577Fmn5N.cjs  1.27 kB │ gzip: 0.62 kB
100
- dist/index-xk130iQA.cjs  1.34 kB │ gzip: 0.72 kB
99
+ dist/path-BBCx3K6k.cjs  1.26 kB │ gzip: 0.61 kB
100
+ dist/index-YsO0EMN8.cjs  1.34 kB │ gzip: 0.72 kB
101
101
  dist/base-B48bPNx5.cjs  1.38 kB │ gzip: 0.57 kB
102
- dist/position-C71OiHiw.cjs  1.71 kB │ gzip: 0.94 kB
102
+ dist/position-DKhPhvPh.cjs  1.71 kB │ gzip: 0.94 kB
103
103
  dist/xy-cP-FXJtR.cjs  2.00 kB │ gzip: 0.96 kB
104
104
  dist/index-h-QAL9T1.cjs  2.23 kB │ gzip: 1.02 kB
105
- dist/index-DgaYJC35.cjs  2.30 kB │ gzip: 1.01 kB
106
- dist/location-gPB1RtfA.cjs  2.37 kB │ gzip: 1.04 kB
107
- dist/deep.cjs  2.39 kB │ gzip: 1.09 kB
108
- dist/bounds-ZZc1c-_Z.cjs  3.72 kB │ gzip: 1.44 kB
109
- dist/scale-COPgp55a.cjs  4.22 kB │ gzip: 1.56 kB
110
- dist/box-BQID-0jO.cjs  4.73 kB │ gzip: 1.94 kB
111
- dist/index.cjs  6.30 kB │ gzip: 2.45 kB
112
- dist/series-CJ65b1Uz.cjs 30.55 kB │ gzip: 8.51 kB
113
- ✓ built in 4.18s
105
+ dist/index-CYxQwEdX.cjs  2.30 kB │ gzip: 1.01 kB
106
+ dist/location-DetomF8Z.cjs  2.37 kB │ gzip: 1.04 kB
107
+ dist/deep.cjs  2.39 kB │ gzip: 1.08 kB
108
+ dist/scale-CT61XD_X.cjs  4.22 kB │ gzip: 1.56 kB
109
+ dist/box-Mf8E1Ypp.cjs  4.75 kB │ gzip: 1.95 kB
110
+ dist/bounds-DzCDHgdE.cjs  4.83 kB │ gzip: 1.78 kB
111
+ dist/index.cjs  6.78 kB │ gzip: 2.67 kB
112
+ dist/series-DWLXo7J6.cjs 34.64 kB │ gzip: 9.30 kB
113
+ ✓ built in 4.35s
package/dist/binary.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DgaYJC35.cjs");exports.binary=e.encoder;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CYxQwEdX.cjs");exports.binary=e.encoder;
package/dist/binary.js CHANGED
@@ -1,4 +1,4 @@
1
- import { e } from "./index-B5THJ1eb.js";
1
+ import { e } from "./index-BBa2mWG1.js";
2
2
  export {
3
3
  e as binary
4
4
  };
@@ -0,0 +1,171 @@
1
+ import { j as h } from "./base-DnZzEvvz.js";
2
+ const c = (e) => typeof e == "bigint" || e instanceof BigInt, m = (e, r) => c(e) ? e.valueOf() - BigInt(r.valueOf().valueOf()) : e.valueOf() - Number(r.valueOf()), b = (e, r) => c(e) ? e.valueOf() + BigInt(r.valueOf().valueOf()) : e + Number(r.valueOf()), x = (e, r, n = 1e-4) => Math.abs(e - r) < n, O = (e, r) => c(e) ? e === BigInt(r.valueOf().valueOf()) : e === Number(r.valueOf()), _ = (e) => {
3
+ const r = 10 ** Math.floor(Math.log10(e));
4
+ return Math.round(e / r) * r;
5
+ }, y = (e, r) => c(e) ? e.valueOf() < BigInt(r.valueOf()) ? e : BigInt(r.valueOf()) : e.valueOf() < Number(r.valueOf()) ? e : Number(r.valueOf()), N = (e, r) => c(e) ? e.valueOf() > BigInt(r.valueOf()) ? e : BigInt(r.valueOf()) : e.valueOf() > Number(r.valueOf()) ? e : Number(r.valueOf()), B = (e) => c(e) || e instanceof BigInt ? e.valueOf() < 0n ? -e : e : e.valueOf() < 0 ? -e : e, M = (e, r) => c(e) ? e.valueOf() * BigInt(r.valueOf()) : e.valueOf() * Number(r.valueOf()), j = (e, r) => c(e) ? e.valueOf() / BigInt(r.valueOf()) : e.valueOf() / Number(r.valueOf()), W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6
+ __proto__: null,
7
+ abs: B,
8
+ add: b,
9
+ closeTo: x,
10
+ div: j,
11
+ equal: O,
12
+ max: N,
13
+ min: y,
14
+ mult: M,
15
+ roundToNearestMagnitude: _,
16
+ sub: m
17
+ }, Symbol.toStringTag, { value: "Module" })), i = (e, r) => {
18
+ const n = {};
19
+ if (typeof e == "number" || typeof e == "bigint")
20
+ r != null ? (n.lower = e, n.upper = r) : (n.lower = typeof e == "bigint" ? 0n : 0, n.upper = e);
21
+ else if (Array.isArray(e)) {
22
+ if (e.length !== 2) throw new Error("bounds: expected array of length 2");
23
+ [n.lower, n.upper] = e;
24
+ } else return g(e);
25
+ return g(n);
26
+ }, A = Object.freeze({ lower: 0, upper: 0 }), P = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), z = Object.freeze({ lower: 0, upper: 1 }), E = Object.freeze({ lower: -1, upper: 1 }), S = (e, r) => {
27
+ if (e == null && r == null) return !0;
28
+ if (e == null || r == null) return !1;
29
+ const n = i(e), t = i(r);
30
+ return (n == null ? void 0 : n.lower) === (t == null ? void 0 : t.lower) && (n == null ? void 0 : n.upper) === (t == null ? void 0 : t.upper);
31
+ }, g = (e) => e.lower > e.upper ? { lower: e.upper, upper: e.lower } : e, T = (e, r) => {
32
+ const n = i(e);
33
+ return r < n.lower ? n.lower : r >= n.upper ? n.upper - (typeof n.upper == "number" ? 1 : 1n) : r;
34
+ }, a = (e, r) => {
35
+ const n = i(e);
36
+ if (typeof r == "number" || typeof r == "bigint")
37
+ return r >= n.lower && r < n.upper;
38
+ const t = i(r);
39
+ return t.lower >= n.lower && t.upper <= n.upper;
40
+ }, D = (e, r) => {
41
+ const n = i(e), t = i(r);
42
+ return n.lower === t.lower ? !0 : t.upper === n.lower || t.lower === n.upper ? !1 : a(n, t.upper) || a(n, t.lower) || a(t, n.upper) || a(t, n.lower);
43
+ }, w = (e) => {
44
+ const r = i(e);
45
+ return r.upper - r.lower;
46
+ }, F = (e) => {
47
+ const r = i(e);
48
+ return typeof r.lower == "bigint" ? r.lower === 0n && r.upper === 0n : r.lower === 0 && r.upper === 0;
49
+ }, L = (e) => {
50
+ const r = w(e);
51
+ return typeof r == "number" ? r === 0 : r === 0n;
52
+ }, Z = (e) => {
53
+ const r = i(e);
54
+ return typeof r.lower == "bigint" ? !0 : Number.isFinite(r.lower) && Number.isFinite(r.upper);
55
+ }, $ = (e) => ({
56
+ lower: Math.min(...e.map((r) => i(r).lower)),
57
+ upper: Math.max(...e.map((r) => i(r).upper))
58
+ }), q = (e) => ({
59
+ lower: Math.max(...e.map((r) => i(r).lower)),
60
+ upper: Math.min(...e.map((r) => i(r).upper))
61
+ }), C = (e) => {
62
+ const r = i(e), n = typeof r.lower == "bigint";
63
+ return Array.from({ length: Number(w(e)) }, (t, o) => n ? r.lower + BigInt(o) : r.lower + o);
64
+ }, I = (e, r) => {
65
+ const n = e.map((l) => i(l)), t = n.findIndex((l) => a(l, r) || r < l.lower);
66
+ if (t === -1) return { index: e.length, position: 0 };
67
+ const o = n[t];
68
+ return a(o, r) ? { index: t, position: Number(r - o.lower) } : { index: t, position: 0 };
69
+ }, d = {
70
+ removeBefore: 0,
71
+ removeAfter: 0,
72
+ insertInto: 0,
73
+ deleteInBetween: 0
74
+ }, R = (e, r) => {
75
+ const n = e.map((p) => i(p)), t = i(r);
76
+ if (n.length === 0) return d;
77
+ const o = I(n, t.lower), l = I(n, t.upper);
78
+ if (o.index === e.length) return { ...d, insertInto: e.length };
79
+ if (l.index === 0) return { ...d, removeAfter: l.position };
80
+ if (o.index === l.index)
81
+ return o.position !== 0 && l.position !== 0 ? null : {
82
+ removeAfter: l.position,
83
+ removeBefore: o.position,
84
+ insertInto: o.index,
85
+ deleteInBetween: 0
86
+ };
87
+ let u = l.index - o.index, f = o.index, s = m(Number(w(n[o.index])), o.position);
88
+ return o.position !== 0 ? (u -= 1, f += 1) : s = 0, {
89
+ removeBefore: s,
90
+ removeAfter: l.position,
91
+ insertInto: f,
92
+ deleteInBetween: u
93
+ };
94
+ }, k = (e, r, n) => {
95
+ const t = e.map((f) => i(f)), o = n > 0 ? 1 : n < 0 ? -1 : 0;
96
+ if (o === 0) return r;
97
+ let l = n, u = r;
98
+ for (; O(l, 0) === !1; ) {
99
+ const f = t.findIndex((s) => o > 0 ? u >= s.lower && u < s.upper : u > s.lower && u <= s.upper);
100
+ if (f !== -1) {
101
+ const s = t[f];
102
+ let p;
103
+ if (o > 0 ? p = m(s.upper, u) : p = m(u, s.lower), p > 0) {
104
+ const v = y(B(l), p);
105
+ if (u = b(
106
+ u,
107
+ o > 0 ? v : -v
108
+ ), l = m(l, o > 0 ? v : -v), O(l, 0)) return u;
109
+ continue;
110
+ }
111
+ }
112
+ if (o > 0) {
113
+ const s = t.filter((p) => p.lower > u);
114
+ if (s.length > 0) u = s[0].lower;
115
+ else return u;
116
+ } else {
117
+ const s = t.filter((p) => p.upper < u);
118
+ if (s.length > 0)
119
+ u = s[s.length - 1].upper;
120
+ else return u;
121
+ }
122
+ }
123
+ return u;
124
+ }, U = (e, r, n) => {
125
+ const t = e.map((u) => i(u));
126
+ if (r === n) return typeof r == "bigint" ? 0n : 0;
127
+ const o = r < n ? i([r, n]) : i([n, r]);
128
+ let l = typeof r == "bigint" ? 0n : 0;
129
+ for (const u of t) {
130
+ const f = u.lower > o.lower ? u.lower : o.lower, s = u.upper < o.upper ? u.upper : o.upper;
131
+ if (f < s) {
132
+ const p = s - f;
133
+ l = l + p;
134
+ }
135
+ }
136
+ return l;
137
+ }, G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
138
+ __proto__: null,
139
+ CLIP: E,
140
+ DECIMAL: z,
141
+ INFINITE: P,
142
+ ZERO: A,
143
+ bounds: h,
144
+ buildInsertionPlan: R,
145
+ clamp: T,
146
+ construct: i,
147
+ contains: a,
148
+ distance: U,
149
+ equals: S,
150
+ findInsertPosition: I,
151
+ isFinite: Z,
152
+ isZero: F,
153
+ linspace: C,
154
+ makeValid: g,
155
+ max: $,
156
+ min: q,
157
+ overlapsWith: D,
158
+ span: w,
159
+ spanIsZero: L,
160
+ traverse: k
161
+ }, Symbol.toStringTag, { value: "Module" }));
162
+ export {
163
+ T as a,
164
+ G as b,
165
+ i as c,
166
+ a as d,
167
+ U as e,
168
+ W as f,
169
+ M as m,
170
+ k as t
171
+ };
@@ -0,0 +1 @@
1
+ "use strict";const M=require("./base-B48bPNx5.cjs"),a=e=>typeof e=="bigint"||e instanceof BigInt,m=(e,r)=>a(e)?e.valueOf()-BigInt(r.valueOf().valueOf()):e.valueOf()-Number(r.valueOf()),b=(e,r)=>a(e)?e.valueOf()+BigInt(r.valueOf().valueOf()):e+Number(r.valueOf()),A=(e,r,n=1e-4)=>Math.abs(e-r)<n,O=(e,r)=>a(e)?e===BigInt(r.valueOf().valueOf()):e===Number(r.valueOf()),j=e=>{const r=10**Math.floor(Math.log10(e));return Math.round(e/r)*r},h=(e,r)=>a(e)?e.valueOf()<BigInt(r.valueOf())?e:BigInt(r.valueOf()):e.valueOf()<Number(r.valueOf())?e:Number(r.valueOf()),P=(e,r)=>a(e)?e.valueOf()>BigInt(r.valueOf())?e:BigInt(r.valueOf()):e.valueOf()>Number(r.valueOf())?e:Number(r.valueOf()),y=e=>a(e)||e instanceof BigInt?e.valueOf()<0n?-e:e:e.valueOf()<0?-e:e,B=(e,r)=>a(e)?e.valueOf()*BigInt(r.valueOf()):e.valueOf()*Number(r.valueOf()),z=(e,r)=>a(e)?e.valueOf()/BigInt(r.valueOf()):e.valueOf()/Number(r.valueOf()),E=Object.freeze(Object.defineProperty({__proto__:null,abs:y,add:b,closeTo:A,div:z,equal:O,max:P,min:h,mult:B,roundToNearestMagnitude:j,sub:m},Symbol.toStringTag,{value:"Module"})),i=(e,r)=>{const n={};if(typeof e=="number"||typeof e=="bigint")r!=null?(n.lower=e,n.upper=r):(n.lower=typeof e=="bigint"?0n:0,n.upper=e);else if(Array.isArray(e)){if(e.length!==2)throw new Error("bounds: expected array of length 2");[n.lower,n.upper]=e}else return g(e);return g(n)},S=Object.freeze({lower:0,upper:0}),T=Object.freeze({lower:-1/0,upper:1/0}),D=Object.freeze({lower:0,upper:1}),F=Object.freeze({lower:-1,upper:1}),L=(e,r)=>{if(e==null&&r==null)return!0;if(e==null||r==null)return!1;const n=i(e),t=i(r);return(n==null?void 0:n.lower)===(t==null?void 0:t.lower)&&(n==null?void 0:n.upper)===(t==null?void 0:t.upper)},g=e=>e.lower>e.upper?{lower:e.upper,upper:e.lower}:e,x=(e,r)=>{const n=i(e);return r<n.lower?n.lower:r>=n.upper?n.upper-(typeof n.upper=="number"?1:1n):r},c=(e,r)=>{const n=i(e);if(typeof r=="number"||typeof r=="bigint")return r>=n.lower&&r<n.upper;const t=i(r);return t.lower>=n.lower&&t.upper<=n.upper},Z=(e,r)=>{const n=i(e),t=i(r);return n.lower===t.lower?!0:t.upper===n.lower||t.lower===n.upper?!1:c(n,t.upper)||c(n,t.lower)||c(t,n.upper)||c(t,n.lower)},w=e=>{const r=i(e);return r.upper-r.lower},q=e=>{const r=i(e);return typeof r.lower=="bigint"?r.lower===0n&&r.upper===0n:r.lower===0&&r.upper===0},C=e=>{const r=w(e);return typeof r=="number"?r===0:r===0n},R=e=>{const r=i(e);return typeof r.lower=="bigint"?!0:Number.isFinite(r.lower)&&Number.isFinite(r.upper)},$=e=>({lower:Math.min(...e.map(r=>i(r).lower)),upper:Math.max(...e.map(r=>i(r).upper))}),k=e=>({lower:Math.max(...e.map(r=>i(r).lower)),upper:Math.min(...e.map(r=>i(r).upper))}),U=e=>{const r=i(e),n=typeof r.lower=="bigint";return Array.from({length:Number(w(e))},(t,o)=>n?r.lower+BigInt(o):r.lower+o)},I=(e,r)=>{const n=e.map(l=>i(l)),t=n.findIndex(l=>c(l,r)||r<l.lower);if(t===-1)return{index:e.length,position:0};const o=n[t];return c(o,r)?{index:t,position:Number(r-o.lower)}:{index:t,position:0}},d={removeBefore:0,removeAfter:0,insertInto:0,deleteInBetween:0},V=(e,r)=>{const n=e.map(p=>i(p)),t=i(r);if(n.length===0)return d;const o=I(n,t.lower),l=I(n,t.upper);if(o.index===e.length)return{...d,insertInto:e.length};if(l.index===0)return{...d,removeAfter:l.position};if(o.index===l.index)return o.position!==0&&l.position!==0?null:{removeAfter:l.position,removeBefore:o.position,insertInto:o.index,deleteInBetween:0};let u=l.index-o.index,f=o.index,s=m(Number(w(n[o.index])),o.position);return o.position!==0?(u-=1,f+=1):s=0,{removeBefore:s,removeAfter:l.position,insertInto:f,deleteInBetween:u}},_=(e,r,n)=>{const t=e.map(f=>i(f)),o=n>0?1:n<0?-1:0;if(o===0)return r;let l=n,u=r;for(;O(l,0)===!1;){const f=t.findIndex(s=>o>0?u>=s.lower&&u<s.upper:u>s.lower&&u<=s.upper);if(f!==-1){const s=t[f];let p;if(o>0?p=m(s.upper,u):p=m(u,s.lower),p>0){const v=h(y(l),p);if(u=b(u,o>0?v:-v),l=m(l,o>0?v:-v),O(l,0))return u;continue}}if(o>0){const s=t.filter(p=>p.lower>u);if(s.length>0)u=s[0].lower;else return u}else{const s=t.filter(p=>p.upper<u);if(s.length>0)u=s[s.length-1].upper;else return u}}return u},N=(e,r,n)=>{const t=e.map(u=>i(u));if(r===n)return typeof r=="bigint"?0n:0;const o=r<n?i([r,n]):i([n,r]);let l=typeof r=="bigint"?0n:0;for(const u of t){const f=u.lower>o.lower?u.lower:o.lower,s=u.upper<o.upper?u.upper:o.upper;if(f<s){const p=s-f;l=l+p}}return l},W=Object.freeze(Object.defineProperty({__proto__:null,CLIP:F,DECIMAL:D,INFINITE:T,ZERO:S,bounds:M.bounds,buildInsertionPlan:V,clamp:x,construct:i,contains:c,distance:N,equals:L,findInsertPosition:I,isFinite:R,isZero:q,linspace:U,makeValid:g,max:$,min:k,overlapsWith:Z,span:w,spanIsZero:C,traverse:_},Symbol.toStringTag,{value:"Module"}));exports.bounds=W;exports.clamp=x;exports.construct=i;exports.contains=c;exports.distance=N;exports.math=E;exports.mult=B;exports.traverse=_;
package/dist/bounds.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bounds-ZZc1c-_Z.cjs");exports.bounds=e.bounds;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bounds-DzCDHgdE.cjs");exports.bounds=e.bounds;
package/dist/bounds.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as r } from "./bounds-CpboA0q6.js";
1
+ import { b as r } from "./bounds-CFI9wDXn.js";
2
2
  export {
3
3
  r as bounds
4
4
  };
@@ -0,0 +1,201 @@
1
+ import { z as x } from "zod";
2
+ import { c as M } from "./direction-CScbfCdT.js";
3
+ import { c as S, T as E, B as H, b as Z, d as q, e as v, f as N, l as D } from "./location-CI9x53qR.js";
4
+ import { Z as p, O as F, e as $, t as O, c as G, a as C } from "./xy-CrgPnICw.js";
5
+ import { x as j, X as P, Y as X } from "./base-DnZzEvvz.js";
6
+ const h = x.union([x.number(), x.string()]), Y = x.object({
7
+ top: h,
8
+ left: h,
9
+ width: h,
10
+ height: h
11
+ }), U = x.object({
12
+ left: x.number(),
13
+ top: x.number(),
14
+ right: x.number(),
15
+ bottom: x.number()
16
+ }), k = x.object({
17
+ one: j,
18
+ two: j,
19
+ root: S
20
+ }), R = { one: p, two: p, root: E }, J = { one: p, two: F, root: H }, W = (o, t) => ({
21
+ one: o.one,
22
+ two: o.two,
23
+ root: t ?? o.root
24
+ }), c = (o, t, e = 0, n = 0, r) => {
25
+ const s = {
26
+ one: { ...p },
27
+ two: { ...p },
28
+ root: r ?? E
29
+ };
30
+ if (typeof o == "number") {
31
+ if (typeof t != "number")
32
+ throw new Error("Box constructor called with invalid arguments");
33
+ return s.one = { x: o, y: t }, s.two = { x: s.one.x + e, y: s.one.y + n }, s;
34
+ }
35
+ return "one" in o && "two" in o && "root" in o ? { ...o, root: r ?? o.root } : ("getBoundingClientRect" in o && (o = o.getBoundingClientRect()), "left" in o ? (s.one = { x: o.left, y: o.top }, s.two = { x: o.right, y: o.bottom }, s) : (s.one = o, t == null ? s.two = { x: s.one.x + e, y: s.one.y + n } : typeof t == "number" ? s.two = { x: s.one.x + t, y: s.one.y + e } : "width" in t ? s.two = {
36
+ x: s.one.x + t.width,
37
+ y: s.one.y + t.height
38
+ } : "signedWidth" in t ? s.two = {
39
+ x: s.one.x + t.signedWidth,
40
+ y: s.one.y + t.signedHeight
41
+ } : s.two = t, s));
42
+ }, K = (o, t, e) => {
43
+ const n = c(o);
44
+ if (typeof t == "string") {
45
+ if (e == null) throw new Error("Invalid arguments for resize");
46
+ const r = M(t);
47
+ return c(
48
+ n.one,
49
+ void 0,
50
+ r === "x" ? e : u(n),
51
+ r === "y" ? e : l(n),
52
+ n.root
53
+ );
54
+ }
55
+ return c(n.one, t, void 0, void 0, n.root);
56
+ }, Q = (o, t, e = !0) => {
57
+ const n = c(o);
58
+ let r = (s, i) => s < i;
59
+ return e && (r = (s, i) => s <= i), "one" in t ? r(y(n), y(t)) && r(w(t), w(n)) && r(a(n), a(t)) && r(f(t), f(n)) : r(y(n), t.x) && r(t.x, w(n)) && r(a(n), t.y) && r(t.y, f(n));
60
+ }, V = (o, t) => $(o.one, t.one) && $(o.two, t.two) && Z(o.root, t.root), z = (o) => ({
61
+ width: u(o),
62
+ height: l(o)
63
+ }), oo = (o) => ({
64
+ signedWidth: _(o),
65
+ signedHeight: b(o)
66
+ }), to = (o) => ({
67
+ top: a(o),
68
+ left: y(o),
69
+ width: u(o),
70
+ height: l(o)
71
+ }), B = (o, t, e = !1) => {
72
+ const n = M(t) === "y" ? b(o) : _(o);
73
+ return e ? n : Math.abs(n);
74
+ }, g = (o, t) => {
75
+ const e = c(o);
76
+ return {
77
+ x: t.x === "center" ? T(e).x : d(e, t.x),
78
+ y: t.y === "center" ? T(e).y : d(e, t.y)
79
+ };
80
+ }, d = (o, t) => {
81
+ const e = c(o), n = q(e.root).includes(t) ? Math.min : Math.max;
82
+ return P.includes(t) ? n(e.one.x, e.two.x) : n(e.one.y, e.two.y);
83
+ }, no = (o) => o.one.x === o.two.x && o.one.y === o.two.y, u = (o) => B(o, "x"), l = (o) => B(o, "y"), _ = (o) => {
84
+ const t = c(o);
85
+ return t.two.x - t.one.x;
86
+ }, b = (o) => {
87
+ const t = c(o);
88
+ return t.two.y - t.one.y;
89
+ }, A = (o) => g(o, E), eo = (o) => g(o, v), so = (o) => g(o, H), ro = (o) => g(o, N), w = (o) => d(o, "right"), f = (o) => d(o, "bottom"), y = (o) => d(o, "left"), a = (o) => d(o, "top"), T = (o) => O(A(o), {
90
+ x: _(o) / 2,
91
+ y: b(o) / 2
92
+ }), I = (o) => {
93
+ const t = c(o);
94
+ return t.root.x === "left" ? y(t) : w(t);
95
+ }, L = (o) => {
96
+ const t = c(o);
97
+ return t.root.y === "top" ? a(t) : f(t);
98
+ }, co = (o) => ({ x: I(o), y: L(o) }), io = (o) => {
99
+ const t = c(o);
100
+ return { lower: t.one.x, upper: t.two.x };
101
+ }, xo = (o) => {
102
+ const t = c(o);
103
+ return { lower: t.one.y, upper: t.two.y };
104
+ }, yo = (o, t) => W(o, t), ao = (o, t) => {
105
+ const e = c(o), n = P.includes(t) ? "x" : X.includes(t) ? "y" : null;
106
+ if (n === null) throw new Error(`Invalid location: ${D}`);
107
+ const r = t === "top" || t === "left" ? Math.min : Math.max, s = { ...e.one }, i = { ...e.two };
108
+ return s[n] = r(e.one[n], e.two[n]), i[n] = r(e.one[n], e.two[n]), [s, i];
109
+ }, uo = (o, t) => {
110
+ const e = c(o), n = c(t), r = I(n) + (u(n) - u(e)) / 2, s = L(n) + (l(n) - l(e)) / 2;
111
+ return c({ x: r, y: s }, z(e));
112
+ }, lo = (o) => typeof o != "object" || o == null ? !1 : "one" in o && "two" in o && "root" in o, wo = (o) => u(o) / l(o), fo = (o, t, e) => {
113
+ if (typeof t == "string") {
114
+ if (e == null) throw new Error("Undefined amount passed into box.translate");
115
+ const r = M(t);
116
+ t = G(r, e);
117
+ }
118
+ const n = c(o);
119
+ return c(
120
+ O(n.one, t),
121
+ O(n.two, t),
122
+ void 0,
123
+ void 0,
124
+ n.root
125
+ );
126
+ }, mo = (o, t) => {
127
+ const e = Math.max(y(o), y(t)), n = Math.max(a(o), a(t)), r = Math.min(w(o), w(t)), s = Math.min(f(o), f(t));
128
+ return e > r || n > s ? R : c({ x: e, y: n }, { x: r, y: s }, void 0, void 0, o.root);
129
+ }, po = (o) => u(o) * l(o), go = (o, t) => {
130
+ const e = c(o);
131
+ return c(
132
+ C(e.one, t),
133
+ C(e.two, t),
134
+ void 0,
135
+ void 0,
136
+ e.root
137
+ );
138
+ }, ho = (o, t, e, n, r, s) => {
139
+ const i = { x: o, y: t }, m = { x: o + e, y: t + n };
140
+ return r.x !== s.x && (r.x === "center" ? (i.x -= e / 2, m.x -= e / 2) : (i.x -= e, m.x -= e)), r.y !== s.y && (r.y === "center" ? (i.y -= n / 2, m.y -= n / 2) : (i.y -= n, m.y -= n)), c(i, m, void 0, void 0, s);
141
+ }, Eo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
142
+ __proto__: null,
143
+ DECIMAL: J,
144
+ ZERO: R,
145
+ area: po,
146
+ areaIsZero: no,
147
+ aspect: wo,
148
+ bottom: f,
149
+ bottomLeft: so,
150
+ bottomRight: ro,
151
+ box: k,
152
+ center: T,
153
+ construct: c,
154
+ constructWithAlternateRoot: ho,
155
+ contains: Q,
156
+ copy: W,
157
+ css: to,
158
+ cssBox: Y,
159
+ dim: B,
160
+ dims: z,
161
+ domRect: U,
162
+ edgePoints: ao,
163
+ equals: V,
164
+ height: l,
165
+ intersection: mo,
166
+ isBox: lo,
167
+ left: y,
168
+ loc: d,
169
+ positionInCenter: uo,
170
+ reRoot: yo,
171
+ resize: K,
172
+ right: w,
173
+ root: co,
174
+ signedDims: oo,
175
+ signedHeight: b,
176
+ signedWidth: _,
177
+ top: a,
178
+ topLeft: A,
179
+ topRight: eo,
180
+ translate: fo,
181
+ truncate: go,
182
+ width: u,
183
+ x: I,
184
+ xBounds: io,
185
+ xyLoc: g,
186
+ y: L,
187
+ yBounds: xo
188
+ }, Symbol.toStringTag, { value: "Module" }));
189
+ export {
190
+ ho as a,
191
+ Eo as b,
192
+ c,
193
+ po as d,
194
+ lo as e,
195
+ io as f,
196
+ l as h,
197
+ mo as i,
198
+ u as w,
199
+ g as x,
200
+ xo as y
201
+ };
@@ -0,0 +1 @@
1
+ "use strict";const u=require("zod"),z=require("./direction-D7qoo_GJ.cjs"),y=require("./location-DetomF8Z.cjs"),i=require("./xy-cP-FXJtR.cjs"),p=require("./base-B48bPNx5.cjs"),O=u.z.union([u.z.number(),u.z.string()]),H=u.z.object({top:O,left:O,width:O,height:O}),S=u.z.object({left:u.z.number(),top:u.z.number(),right:u.z.number(),bottom:u.z.number()}),N=u.z.object({one:p.xy,two:p.xy,root:y.corner}),I={one:i.ZERO,two:i.ZERO,root:y.TOP_LEFT},v={one:i.ZERO,two:i.ONE,root:y.BOTTOM_LEFT},R=(t,o)=>({one:t.one,two:t.two,root:o??t.root}),c=(t,o,e=0,n=0,s)=>{const r={one:{...i.ZERO},two:{...i.ZERO},root:s??y.TOP_LEFT};if(typeof t=="number"){if(typeof o!="number")throw new Error("Box constructor called with invalid arguments");return r.one={x:t,y:o},r.two={x:r.one.x+e,y:r.one.y+n},r}return"one"in t&&"two"in t&&"root"in t?{...t,root:s??t.root}:("getBoundingClientRect"in t&&(t=t.getBoundingClientRect()),"left"in t?(r.one={x:t.left,y:t.top},r.two={x:t.right,y:t.bottom},r):(r.one=t,o==null?r.two={x:r.one.x+e,y:r.one.y+n}:typeof o=="number"?r.two={x:r.one.x+o,y:r.one.y+e}:"width"in o?r.two={x:r.one.x+o.width,y:r.one.y+o.height}:"signedWidth"in o?r.two={x:r.one.x+o.signedWidth,y:r.one.y+o.signedHeight}:r.two=o,r))},D=(t,o,e)=>{const n=c(t);if(typeof o=="string"){if(e==null)throw new Error("Invalid arguments for resize");const s=z.construct(o);return c(n.one,void 0,s==="x"?e:l(n),s==="y"?e:w(n),n.root)}return c(n.one,o,void 0,void 0,n.root)},G=(t,o,e=!0)=>{const n=c(t);let s=(r,x)=>r<x;return e&&(s=(r,x)=>r<=x),"one"in o?s(d(n),d(o))&&s(f(o),f(n))&&s(a(n),a(o))&&s(h(o),h(n)):s(d(n),o.x)&&s(o.x,f(n))&&s(a(n),o.y)&&s(o.y,h(n))},X=(t,o)=>i.equals(t.one,o.one)&&i.equals(t.two,o.two)&&y.xyEquals(t.root,o.root),q=t=>({width:l(t),height:w(t)}),$=t=>({signedWidth:b(t),signedHeight:T(t)}),U=t=>({top:a(t),left:d(t),width:l(t),height:w(t)}),M=(t,o,e=!1)=>{const n=z.construct(o)==="y"?T(t):b(t);return e?n:Math.abs(n)},_=(t,o)=>{const e=c(t);return{x:o.x==="center"?E(e).x:g(e,o.x),y:o.y==="center"?E(e).y:g(e,o.y)}},g=(t,o)=>{const e=c(t),n=y.xyCouple(e.root).includes(o)?Math.min:Math.max;return p.X_LOCATIONS.includes(o)?n(e.one.x,e.two.x):n(e.one.y,e.two.y)},Y=t=>t.one.x===t.two.x&&t.one.y===t.two.y,l=t=>M(t,"x"),w=t=>M(t,"y"),b=t=>{const o=c(t);return o.two.x-o.one.x},T=t=>{const o=c(t);return o.two.y-o.one.y},C=t=>_(t,y.TOP_LEFT),k=t=>_(t,y.TOP_RIGHT),J=t=>_(t,y.BOTTOM_LEFT),K=t=>_(t,y.BOTTOM_RIGHT),f=t=>g(t,"right"),h=t=>g(t,"bottom"),d=t=>g(t,"left"),a=t=>g(t,"top"),E=t=>i.translate(C(t),{x:b(t)/2,y:T(t)/2}),B=t=>{const o=c(t);return o.root.x==="left"?d(o):f(o)},L=t=>{const o=c(t);return o.root.y==="top"?a(o):h(o)},Q=t=>({x:B(t),y:L(t)}),P=t=>{const o=c(t);return{lower:o.one.x,upper:o.two.x}},Z=t=>{const o=c(t);return{lower:o.one.y,upper:o.two.y}},V=(t,o)=>R(t,o),tt=(t,o)=>{const e=c(t),n=p.X_LOCATIONS.includes(o)?"x":p.Y_LOCATIONS.includes(o)?"y":null;if(n===null)throw new Error(`Invalid location: ${y.location}`);const s=o==="top"||o==="left"?Math.min:Math.max,r={...e.one},x={...e.two};return r[n]=s(e.one[n],e.two[n]),x[n]=s(e.one[n],e.two[n]),[r,x]},ot=(t,o)=>{const e=c(t),n=c(o),s=B(n)+(l(n)-l(e))/2,r=L(n)+(w(n)-w(e))/2;return c({x:s,y:r},q(e))},j=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,nt=t=>l(t)/w(t),et=(t,o,e)=>{if(typeof o=="string"){if(e==null)throw new Error("Undefined amount passed into box.translate");const s=z.construct(o);o=i.construct(s,e)}const n=c(t);return c(i.translate(n.one,o),i.translate(n.two,o),void 0,void 0,n.root)},A=(t,o)=>{const e=Math.max(d(t),d(o)),n=Math.max(a(t),a(o)),s=Math.min(f(t),f(o)),r=Math.min(h(t),h(o));return e>s||n>r?I:c({x:e,y:n},{x:s,y:r},void 0,void 0,t.root)},W=t=>l(t)*w(t),rt=(t,o)=>{const e=c(t);return c(i.truncate(e.one,o),i.truncate(e.two,o),void 0,void 0,e.root)},F=(t,o,e,n,s,r)=>{const x={x:t,y:o},m={x:t+e,y:o+n};return s.x!==r.x&&(s.x==="center"?(x.x-=e/2,m.x-=e/2):(x.x-=e,m.x-=e)),s.y!==r.y&&(s.y==="center"?(x.y-=n/2,m.y-=n/2):(x.y-=n,m.y-=n)),c(x,m,void 0,void 0,r)},st=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:v,ZERO:I,area:W,areaIsZero:Y,aspect:nt,bottom:h,bottomLeft:J,bottomRight:K,box:N,center:E,construct:c,constructWithAlternateRoot:F,contains:G,copy:R,css:U,cssBox:H,dim:M,dims:q,domRect:S,edgePoints:tt,equals:X,height:w,intersection:A,isBox:j,left:d,loc:g,positionInCenter:ot,reRoot:V,resize:D,right:f,root:Q,signedDims:$,signedHeight:T,signedWidth:b,top:a,topLeft:C,topRight:k,translate:et,truncate:rt,width:l,x:B,xBounds:P,xyLoc:_,y:L,yBounds:Z},Symbol.toStringTag,{value:"Module"}));exports.area=W;exports.box=st;exports.construct=c;exports.constructWithAlternateRoot=F;exports.height=w;exports.intersection=A;exports.isBox=j;exports.width=l;exports.xBounds=P;exports.xyLoc=_;exports.yBounds=Z;
package/dist/box.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./box-BQID-0jO.cjs");exports.box=e.box;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./box-Mf8E1Ypp.cjs");exports.box=e.box;
package/dist/box.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as r } from "./box-xRqO6NvI.js";
1
+ import { b as r } from "./box-DVCNGsJG.js";
2
2
  export {
3
3
  r as box
4
4
  };
package/dist/caseconv.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-xk130iQA.cjs");exports.caseconv=e.caseconv;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-YsO0EMN8.cjs");exports.caseconv=e.caseconv;
package/dist/caseconv.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as c } from "./index-Duv1uH08.js";
1
+ import { a as c } from "./index-eue4dSQX.js";
2
2
  export {
3
3
  c as caseconv
4
4
  };
package/dist/compare.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as a } from "./index-B3BUDIdi.js";
1
+ import { c as a } from "./index-HQonyH7n.js";
2
2
  export {
3
3
  a as compare
4
4
  };
package/dist/deep.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./identity.cjs"),y=require("./path-577Fmn5N.cjs"),h=t=>JSON.parse(JSON.stringify(t)),j=(t,...n)=>(n.forEach(i=>{let r=t;const f=i.split(".");f.forEach((s,e)=>{e===f.length-1?delete r[s]:s in r&&(r=r[s])})}),t),d=(t,n,i="")=>{const r={},f=(s,e,o)=>{if(typeof s!=typeof e||s===null||e===null){r[o]=[s,e];return}if(typeof s=="object"&&typeof e=="object")if(Array.isArray(s)&&Array.isArray(e)){if(s.length!==e.length){r[o]=[s,e];return}for(let l=0;l<s.length;l++)f(s[l],e[l],`${o}[${l}]`)}else new Set([...Object.keys(s),...Object.keys(e)]).forEach(c=>{f(s[c],e[c],o!==""?`${o}.${c}`:c)});else s!==e&&(r[o]=[s,e])};return f(t,n,i),r},p=(t,n)=>{const i=Array.isArray(t),r=Array.isArray(n);if(i!==r)return!1;if(i&&r){const e=t,o=n;if(e.length!==o.length)return!1;for(let l=0;l<e.length;l++)if(!p(e[l],o[l]))return!1;return!0}if(t==null||n==null||typeof t!="object"||typeof n!="object")return t===n;if("equals"in t)return t.equals(n);const f=Object.keys(t),s=Object.keys(n);if(f.length!==s.length)return!1;for(const e of f){const o=t[e],l=n[e];if(typeof o=="object"&&typeof l=="object"){if(!p(o,l))return!1}else if(o!==l)return!1}return!0},g=(t,n)=>{if(typeof t!="object"||t==null)return t===n;const i=Object.keys(t),r=Object.keys(n);if(r.length>i.length)return!1;for(const f of r){const s=t[f],e=n[f];if(typeof s=="object"&&typeof e=="object"){if(!g(s,e))return!1}else if(s!==e)return!1}return!0},a=(t,...n)=>{if(n.length===0)return t;const i=n.shift();if(u.isObject(t)&&u.isObject(i))for(const r in i)try{u.isObject(i[r])?(r in t||Object.assign(t,{[r]:{}}),a(t[r],i[r])):Object.assign(t,{[r]:i[r]})}catch(f){throw f instanceof TypeError?new TypeError(`.${r}: ${f.message}`):f}return a(t,...n)},A=(t,n,i)=>{const r=(f,s,e)=>{for(const o in s){const l=s[o];if(e!=null&&e.shape[o]){const c=e.shape[o].safeParse(l);c.success&&(f[o]=c.data)}else typeof l=="object"&&!Array.isArray(l)&&l!==null&&e&&e.shape&&e.shape[o]&&(f[o]||(f[o]={}),r(f[o],l,e.shape[o]))}return f};return r({...t},n,i)},O=Object.freeze(Object.defineProperty({__proto__:null,copy:h,deleteD:j,difference:d,element:y.element,equal:p,get:y.get,has:y.has,override:a,overrideValidItems:A,partialEqual:g,pathsMatch:y.pathsMatch,remove:y.remove,set:y.set,transformPath:y.transformPath},Symbol.toStringTag,{value:"Module"}));exports.deep=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./identity.cjs"),y=require("./path-BBCx3K6k.cjs"),h=t=>JSON.parse(JSON.stringify(t)),j=(t,...f)=>(f.forEach(i=>{let r=t;const n=i.split(".");n.forEach((s,e)=>{e===n.length-1?delete r[s]:s in r&&(r=r[s])})}),t),d=(t,f,i="")=>{const r={},n=(s,e,o)=>{if(typeof s!=typeof e||s===null||e===null){r[o]=[s,e];return}if(typeof s=="object"&&typeof e=="object")if(Array.isArray(s)&&Array.isArray(e)){if(s.length!==e.length){r[o]=[s,e];return}for(let l=0;l<s.length;l++)n(s[l],e[l],`${o}[${l}]`)}else new Set([...Object.keys(s),...Object.keys(e)]).forEach(c=>{n(s[c],e[c],o!==""?`${o}.${c}`:c)});else s!==e&&(r[o]=[s,e])};return n(t,f,i),r},p=(t,f)=>{const i=Array.isArray(t),r=Array.isArray(f);if(i!==r)return!1;if(i&&r){const e=t,o=f;if(e.length!==o.length)return!1;for(let l=0;l<e.length;l++)if(!p(e[l],o[l]))return!1;return!0}if(t==null||f==null||typeof t!="object"||typeof f!="object")return t===f;if("equals"in t)return t.equals(f);const n=Object.keys(t),s=Object.keys(f);if(n.length!==s.length)return!1;for(const e of n){const o=t[e],l=f[e];if(typeof o=="object"&&typeof l=="object"){if(!p(o,l))return!1}else if(o!==l)return!1}return!0},g=(t,f)=>{if(typeof t!="object"||t==null)return t===f;const i=Object.keys(t),r=Object.keys(f);if(r.length>i.length)return!1;for(const n of r){const s=t[n],e=f[n];if(typeof s=="object"&&typeof e=="object"){if(!g(s,e))return!1}else if(s!==e)return!1}return!0},a=(t,...f)=>{if(f.length===0)return t;const i=f.shift();if(u.isObject(t)&&u.isObject(i))for(const r in i)try{u.isObject(i[r])?(r in t||Object.assign(t,{[r]:{}}),a(t[r],i[r])):Object.assign(t,{[r]:i[r]})}catch(n){throw n instanceof TypeError?new TypeError(`.${r}: ${n.message}`):n}return a(t,...f)},A=(t,f,i)=>{const r=(n,s,e)=>{for(const o in s){const l=s[o];if(e!=null&&e.shape[o]){const c=e.shape[o].safeParse(l);c.success&&(n[o]=c.data)}else typeof l=="object"&&!Array.isArray(l)&&l!==null&&e&&e.shape&&e.shape[o]&&(n[o]||(n[o]={}),r(n[o],l,e.shape[o]))}return n};return r({...t},f,i)},O=Object.freeze(Object.defineProperty({__proto__:null,copy:h,deleteD:j,difference:d,element:y.element,equal:p,get:y.get,has:y.has,override:a,overrideValidItems:A,partialEqual:g,pathsMatch:y.pathsMatch,remove:y.remove,set:y.set,transformPath:y.transformPath},Symbol.toStringTag,{value:"Module"}));exports.deep=O;