@synnaxlabs/x 0.23.0 → 0.24.1
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/.turbo/turbo-build.log +40 -40
- package/dist/{base-D3FrPu8C.cjs → base-B48bPNx5.cjs} +1 -1
- package/dist/{base-Cz4DfmJf.js → base-DnZzEvvz.js} +11 -10
- package/dist/binary.cjs +3 -1
- package/dist/binary.js +83 -20
- package/dist/{bounds-1ouRnRJS.cjs → bounds-Bh_QBZZK.cjs} +1 -1
- package/dist/{bounds-BYz3mV9U.js → bounds-Dmn-hd_-.js} +1 -1
- package/dist/bounds.cjs +1 -1
- package/dist/bounds.js +1 -1
- package/dist/box-C92jYSNY.js +205 -0
- package/dist/box-m3dlc1kR.cjs +1 -0
- package/dist/box.cjs +1 -1
- package/dist/box.js +1 -1
- package/dist/caseconv.cjs +1 -1
- package/dist/caseconv.js +1 -1
- package/dist/compare.cjs +1 -1
- package/dist/compare.js +1 -1
- package/dist/deep.cjs +1 -1
- package/dist/deep.js +26 -24
- package/dist/{dimensions-9gLSFjFx.js → dimensions-BAuHfd-b.js} +1 -1
- package/dist/{dimensions-Fe8DhhXU.cjs → dimensions-zMcb9pMk.cjs} +1 -1
- package/dist/dimensions.cjs +1 -1
- package/dist/dimensions.js +1 -1
- package/dist/direction-CScbfCdT.js +16 -0
- package/dist/direction-DZbN47uL.cjs +1 -0
- package/dist/direction.cjs +1 -1
- package/dist/direction.js +1 -1
- package/dist/index-BhEWuRmo.cjs +1 -0
- package/dist/index-BpCPHf78.cjs +1 -0
- package/dist/{index-POWYBOZm.js → index-BwkQTA-j.js} +113 -109
- package/dist/index-IGDDLWef.js +96 -0
- package/dist/index.cjs +3 -1
- package/dist/index.js +167 -122
- package/dist/{location-C4YaXxjI.js → location-CfP9TAnW.js} +5 -5
- package/dist/{location-CZOgJmu5.cjs → location-c3g6WKs-.cjs} +1 -1
- package/dist/location.cjs +1 -1
- package/dist/location.js +1 -1
- package/dist/path-BO4pyGZf.cjs +1 -0
- package/dist/path-nTHmt_4i.js +65 -0
- package/dist/{position-BjhXUSEO.cjs → position-BBnkwGX1.cjs} +1 -1
- package/dist/{position-PSYLZzqw.js → position-B_aphAR0.js} +4 -4
- package/dist/position.cjs +1 -1
- package/dist/position.js +1 -1
- package/dist/{scale-DUBO0Q4s.cjs → scale-C8axypQ2.cjs} +1 -1
- package/dist/{scale-DCbi48di.js → scale-CgtgqlYU.js} +4 -4
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/{series-CSutMOtt.cjs → series-Cgjkfl5S.cjs} +1 -1
- package/dist/{series-DCv8f29w.js → series-w7kOJP17.js} +9 -9
- package/dist/{spatial-R5OeJgR6.cjs → spatial-BOhaO8xN.cjs} +1 -1
- package/dist/{spatial-6OGCmDve.js → spatial-DozyssiN.js} +1 -1
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +9 -9
- package/dist/src/binary/encoder.d.ts +19 -0
- package/dist/src/binary/encoder.d.ts.map +1 -1
- package/dist/src/caseconv/caseconv.d.ts +2 -0
- package/dist/src/caseconv/caseconv.d.ts.map +1 -1
- package/dist/src/compare/compare.d.ts +1 -0
- package/dist/src/compare/compare.d.ts.map +1 -1
- package/dist/src/compare/compare.spec.d.ts +2 -0
- package/dist/src/compare/compare.spec.d.ts.map +1 -0
- package/dist/src/deep/path.d.ts +13 -4
- package/dist/src/deep/path.d.ts.map +1 -1
- package/dist/src/migrate/migrate.d.ts +45 -10
- package/dist/src/migrate/migrate.d.ts.map +1 -1
- package/dist/src/spatial/box/box.d.ts +4 -2
- package/dist/src/spatial/box/box.d.ts.map +1 -1
- package/dist/src/spatial/direction/direction.d.ts +1 -1
- package/dist/src/spatial/direction/direction.d.ts.map +1 -1
- package/dist/src/spatial/xy/xy.d.ts +1 -1
- package/dist/src/spatial/xy/xy.d.ts.map +1 -1
- package/dist/src/zodutil/zodutil.d.ts.map +1 -1
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +1 -1
- package/dist/{xy-H8aUVW_X.js → xy-D1ZbIqpT.js} +12 -12
- package/dist/xy-cP-FXJtR.cjs +1 -0
- package/dist/xy.cjs +1 -1
- package/dist/xy.js +1 -1
- package/dist/zodutil.cjs +1 -1
- package/dist/zodutil.js +2 -3
- package/package.json +3 -3
- package/src/binary/encoder.spec.ts +121 -3
- package/src/binary/encoder.ts +91 -1
- package/src/caseconv/caseconv.ts +10 -1
- package/src/compare/compare.spec.ts +49 -0
- package/src/compare/compare.ts +32 -2
- package/src/deep/path.spec.ts +3 -2
- package/src/deep/path.ts +27 -21
- package/src/migrate/migrate.spec.ts +62 -54
- package/src/migrate/migrate.ts +131 -19
- package/src/spatial/box/box.spec.ts +70 -22
- package/src/spatial/box/box.ts +15 -11
- package/src/spatial/direction/direction.ts +2 -2
- package/src/spatial/xy/xy.ts +3 -2
- package/src/telem/telem.spec.ts +35 -10
- package/src/zodutil/zodutil.spec.ts +2 -2
- package/src/zodutil/zodutil.ts +2 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/box-CHDDKvN3.cjs +0 -1
- package/dist/box-Q7p9JFnX.js +0 -204
- package/dist/direction-dXjlmg4_.cjs +0 -1
- package/dist/direction-wsPTe9a1.js +0 -15
- package/dist/index-Bcm6lEr8.js +0 -73
- package/dist/index-CnZb0cyW.cjs +0 -1
- package/dist/index-xjptNL6Z.cjs +0 -1
- package/dist/path-BfHj5x9k.js +0 -62
- package/dist/path-By98WcWm.cjs +0 -1
- package/dist/xy-B4SvvNaG.cjs +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @synnaxlabs/x@0.
|
|
2
|
+
> @synnaxlabs/x@0.24.1 build /home/runner/work/synnax/synnax/x/ts
|
|
3
3
|
> tsc --noEmit && vite build
|
|
4
4
|
|
|
5
5
|
[34m Synnax - Production mode[0m
|
|
@@ -31,39 +31,39 @@ computing gzip size...
|
|
|
31
31
|
[2mdist/[22m[36mkv.js [39m[1m[2m 0.17 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
32
32
|
[2mdist/[22m[36mrecord.js [39m[1m[2m 0.20 kB[22m[1m[22m[2m │ gzip: 0.17 kB[22m
|
|
33
33
|
[2mdist/[22m[36msearch.js [39m[1m[2m 0.27 kB[22m[1m[22m[2m │ gzip: 0.20 kB[22m
|
|
34
|
-
[2mdist/[22m[36mspatial-
|
|
34
|
+
[2mdist/[22m[36mspatial-DozyssiN.js [39m[1m[2m 0.28 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m
|
|
35
35
|
[2mdist/[22m[36mchange-DLl6DccR.js [39m[1m[2m 0.30 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m
|
|
36
36
|
[2mdist/[22m[36mdebounce.js [39m[1m[2m 0.36 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
37
37
|
[2mdist/[22m[36mtelem.js [39m[1m[2m 0.41 kB[22m[1m[22m[2m │ gzip: 0.25 kB[22m
|
|
38
|
-
[2mdist/[22m[36mspatial.js [39m[1m[2m 0.58 kB[22m[1m[22m[2m │ gzip: 0.
|
|
39
|
-
[2mdist/[22m[36mdirection-
|
|
38
|
+
[2mdist/[22m[36mspatial.js [39m[1m[2m 0.58 kB[22m[1m[22m[2m │ gzip: 0.28 kB[22m
|
|
39
|
+
[2mdist/[22m[36mdirection-CScbfCdT.js [39m[1m[2m 0.65 kB[22m[1m[22m[2m │ gzip: 0.37 kB[22m
|
|
40
40
|
[2mdist/[22m[36mzodutil.js [39m[1m[2m 0.68 kB[22m[1m[22m[2m │ gzip: 0.43 kB[22m
|
|
41
41
|
[2mdist/[22m[36mexternal-DI9122wF.js [39m[1m[2m 0.87 kB[22m[1m[22m[2m │ gzip: 0.51 kB[22m
|
|
42
42
|
[2mdist/[22m[36mobserve.js [39m[1m[2m 1.13 kB[22m[1m[22m[2m │ gzip: 0.47 kB[22m
|
|
43
43
|
[2mdist/[22m[36mworker.js [39m[1m[2m 1.17 kB[22m[1m[22m[2m │ gzip: 0.53 kB[22m
|
|
44
|
-
[2mdist/[22m[36mbase-
|
|
45
|
-
[2mdist/[22m[
|
|
46
|
-
[2mdist/[22m[36mpath-
|
|
47
|
-
[2mdist/[22m[36mdimensions-9gLSFjFx.js [39m[1m[2m 1.50 kB[22m[1m[22m[2m │ gzip: 0.66 kB[22m
|
|
44
|
+
[2mdist/[22m[36mbase-DnZzEvvz.js [39m[1m[2m 1.21 kB[22m[1m[22m[2m │ gzip: 0.51 kB[22m
|
|
45
|
+
[2mdist/[22m[36mdimensions-BAuHfd-b.js [39m[1m[2m 1.50 kB[22m[1m[22m[2m │ gzip: 0.66 kB[22m
|
|
46
|
+
[2mdist/[22m[36mpath-nTHmt_4i.js [39m[1m[2m 1.50 kB[22m[1m[22m[2m │ gzip: 0.62 kB[22m
|
|
48
47
|
[2mdist/[22m[36murl.js [39m[1m[2m 1.98 kB[22m[1m[22m[2m │ gzip: 0.87 kB[22m
|
|
49
|
-
[2mdist/[22m[
|
|
50
|
-
[2mdist/[22m[
|
|
51
|
-
[2mdist/[22m[
|
|
52
|
-
[2mdist/[22m[36mlocation-
|
|
53
|
-
[2mdist/[22m[
|
|
54
|
-
[2mdist/[22m[
|
|
55
|
-
[2mdist/[22m[
|
|
56
|
-
[2mdist/[22m[36mscale-
|
|
57
|
-
[2mdist/[22m[
|
|
58
|
-
[2mdist/[22m[
|
|
59
|
-
[2mdist/[22m[
|
|
60
|
-
[
|
|
48
|
+
[2mdist/[22m[36mposition-B_aphAR0.js [39m[1m[2m 2.25 kB[22m[1m[22m[2m │ gzip: 1.07 kB[22m
|
|
49
|
+
[2mdist/[22m[36mxy-D1ZbIqpT.js [39m[1m[2m 2.61 kB[22m[1m[22m[2m │ gzip: 1.05 kB[22m
|
|
50
|
+
[2mdist/[22m[36mindex-IGDDLWef.js [39m[1m[2m 2.71 kB[22m[1m[22m[2m │ gzip: 1.05 kB[22m
|
|
51
|
+
[2mdist/[22m[36mlocation-CfP9TAnW.js [39m[1m[2m 2.80 kB[22m[1m[22m[2m │ gzip: 1.16 kB[22m
|
|
52
|
+
[2mdist/[22m[36mbinary.js [39m[1m[2m 2.96 kB[22m[1m[22m[2m │ gzip: 1.11 kB[22m
|
|
53
|
+
[2mdist/[22m[36mdeep.js [39m[1m[2m 3.35 kB[22m[1m[22m[2m │ gzip: 1.30 kB[22m
|
|
54
|
+
[2mdist/[22m[36mbounds-Dmn-hd_-.js [39m[1m[2m 4.52 kB[22m[1m[22m[2m │ gzip: 1.55 kB[22m
|
|
55
|
+
[2mdist/[22m[36mscale-CgtgqlYU.js [39m[1m[2m 5.66 kB[22m[1m[22m[2m │ gzip: 1.77 kB[22m
|
|
56
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m 5.84 kB[22m[1m[22m[2m │ gzip: 2.30 kB[22m
|
|
57
|
+
[2mdist/[22m[36mbox-C92jYSNY.js [39m[1m[2m 6.13 kB[22m[1m[22m[2m │ gzip: 2.16 kB[22m
|
|
58
|
+
[2mdist/[22m[36mindex-BwkQTA-j.js [39m[1m[2m12.69 kB[22m[1m[22m[2m │ gzip: 2.25 kB[22m
|
|
59
|
+
[2mdist/[22m[36mseries-w7kOJP17.js [39m[1m[2m53.98 kB[22m[1m[22m[2m │ gzip: 12.12 kB[22m
|
|
60
|
+
[32m[36m[vite:dts][32m Declaration files built in 3553ms.
|
|
61
61
|
[39m
|
|
62
62
|
Generated an empty chunk: "destructor".
|
|
63
63
|
[2mdist/[22m[36mdestructor.cjs [39m[1m[2m 0.01 kB[22m[1m[22m[2m │ gzip: 0.03 kB[22m
|
|
64
64
|
[2mdist/[22m[36munique.cjs [39m[1m[2m 0.13 kB[22m[1m[22m[2m │ gzip: 0.14 kB[22m
|
|
65
65
|
[2mdist/[22m[36mxy.cjs [39m[1m[2m 0.13 kB[22m[1m[22m[2m │ gzip: 0.14 kB[22m
|
|
66
|
-
[2mdist/[22m[36mbox.cjs [39m[1m[2m 0.14 kB[22m[1m[22m[2m │ gzip: 0.
|
|
66
|
+
[2mdist/[22m[36mbox.cjs [39m[1m[2m 0.14 kB[22m[1m[22m[2m │ gzip: 0.14 kB[22m
|
|
67
67
|
[2mdist/[22m[36mscale.cjs [39m[1m[2m 0.14 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
68
68
|
[2mdist/[22m[36mbounds.cjs [39m[1m[2m 0.15 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
69
69
|
[2mdist/[22m[36mchange.cjs [39m[1m[2m 0.15 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
@@ -78,31 +78,31 @@ Generated an empty chunk: "destructor".
|
|
|
78
78
|
[2mdist/[22m[36mtoArray.cjs [39m[1m[2m 0.19 kB[22m[1m[22m[2m │ gzip: 0.16 kB[22m
|
|
79
79
|
[2mdist/[22m[36mkv.cjs [39m[1m[2m 0.19 kB[22m[1m[22m[2m │ gzip: 0.14 kB[22m
|
|
80
80
|
[2mdist/[22m[36mchange-C-YELKx6.cjs [39m[1m[2m 0.23 kB[22m[1m[22m[2m │ gzip: 0.20 kB[22m
|
|
81
|
-
[2mdist/[22m[36mspatial-
|
|
81
|
+
[2mdist/[22m[36mspatial-BOhaO8xN.cjs [39m[1m[2m 0.24 kB[22m[1m[22m[2m │ gzip: 0.21 kB[22m
|
|
82
82
|
[2mdist/[22m[36msearch.cjs [39m[1m[2m 0.25 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m
|
|
83
83
|
[2mdist/[22m[36mrecord.cjs [39m[1m[2m 0.25 kB[22m[1m[22m[2m │ gzip: 0.20 kB[22m
|
|
84
84
|
[2mdist/[22m[36mdebounce.cjs [39m[1m[2m 0.33 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m
|
|
85
|
-
[2mdist/[22m[36mdirection-
|
|
85
|
+
[2mdist/[22m[36mdirection-DZbN47uL.cjs [39m[1m[2m 0.53 kB[22m[1m[22m[2m │ gzip: 0.34 kB[22m
|
|
86
86
|
[2mdist/[22m[36mtelem.cjs [39m[1m[2m 0.54 kB[22m[1m[22m[2m │ gzip: 0.27 kB[22m
|
|
87
|
-
[2mdist/[22m[36mzodutil.cjs [39m[1m[2m 0.59 kB[22m[1m[22m[2m │ gzip: 0.
|
|
87
|
+
[2mdist/[22m[36mzodutil.cjs [39m[1m[2m 0.59 kB[22m[1m[22m[2m │ gzip: 0.39 kB[22m
|
|
88
88
|
[2mdist/[22m[36mspatial.cjs [39m[1m[2m 0.63 kB[22m[1m[22m[2m │ gzip: 0.33 kB[22m
|
|
89
89
|
[2mdist/[22m[36mexternal-B-DoBvh7.cjs [39m[1m[2m 0.68 kB[22m[1m[22m[2m │ gzip: 0.45 kB[22m
|
|
90
90
|
[2mdist/[22m[36mobserve.cjs [39m[1m[2m 0.88 kB[22m[1m[22m[2m │ gzip: 0.42 kB[22m
|
|
91
91
|
[2mdist/[22m[36mworker.cjs [39m[1m[2m 0.95 kB[22m[1m[22m[2m │ gzip: 0.49 kB[22m
|
|
92
|
-
[2mdist/[22m[36mpath-By98WcWm.cjs [39m[1m[2m 1.02 kB[22m[1m[22m[2m │ gzip: 0.49 kB[22m
|
|
93
|
-
[2mdist/[22m[36mbinary.cjs [39m[1m[2m 1.10 kB[22m[1m[22m[2m │ gzip: 0.58 kB[22m
|
|
94
92
|
[2mdist/[22m[36murl.cjs [39m[1m[2m 1.10 kB[22m[1m[22m[2m │ gzip: 0.60 kB[22m
|
|
95
|
-
[2mdist/[22m[36mdimensions-
|
|
96
|
-
[2mdist/[22m[
|
|
97
|
-
[2mdist/[22m[
|
|
98
|
-
[2mdist/[22m[36mposition-
|
|
99
|
-
[2mdist/[22m[36mxy-
|
|
100
|
-
[2mdist/[22m[
|
|
101
|
-
[2mdist/[22m[
|
|
102
|
-
[2mdist/[22m[
|
|
103
|
-
[2mdist/[22m[
|
|
104
|
-
[2mdist/[22m[
|
|
105
|
-
[2mdist/[22m[
|
|
106
|
-
[2mdist/[22m[
|
|
107
|
-
[2mdist/[22m[
|
|
108
|
-
[
|
|
93
|
+
[2mdist/[22m[36mdimensions-zMcb9pMk.cjs [39m[1m[2m 1.17 kB[22m[1m[22m[2m │ gzip: 0.58 kB[22m
|
|
94
|
+
[2mdist/[22m[36mpath-BO4pyGZf.cjs [39m[1m[2m 1.17 kB[22m[1m[22m[2m │ gzip: 0.58 kB[22m
|
|
95
|
+
[2mdist/[22m[36mbase-B48bPNx5.cjs [39m[1m[2m 1.38 kB[22m[1m[22m[2m │ gzip: 0.57 kB[22m
|
|
96
|
+
[2mdist/[22m[36mposition-BBnkwGX1.cjs [39m[1m[2m 1.71 kB[22m[1m[22m[2m │ gzip: 0.94 kB[22m
|
|
97
|
+
[2mdist/[22m[36mxy-cP-FXJtR.cjs [39m[1m[2m 2.00 kB[22m[1m[22m[2m │ gzip: 0.96 kB[22m
|
|
98
|
+
[2mdist/[22m[36mindex-BhEWuRmo.cjs [39m[1m[2m 2.01 kB[22m[1m[22m[2m │ gzip: 0.94 kB[22m
|
|
99
|
+
[2mdist/[22m[36mbinary.cjs [39m[1m[2m 2.35 kB[22m[1m[22m[2m │ gzip: 1.01 kB[22m
|
|
100
|
+
[2mdist/[22m[36mlocation-c3g6WKs-.cjs [39m[1m[2m 2.37 kB[22m[1m[22m[2m │ gzip: 1.04 kB[22m
|
|
101
|
+
[2mdist/[22m[36mdeep.cjs [39m[1m[2m 2.43 kB[22m[1m[22m[2m │ gzip: 1.10 kB[22m
|
|
102
|
+
[2mdist/[22m[36mbounds-Bh_QBZZK.cjs [39m[1m[2m 3.42 kB[22m[1m[22m[2m │ gzip: 1.37 kB[22m
|
|
103
|
+
[2mdist/[22m[36mscale-C8axypQ2.cjs [39m[1m[2m 4.24 kB[22m[1m[22m[2m │ gzip: 1.56 kB[22m
|
|
104
|
+
[2mdist/[22m[36mbox-m3dlc1kR.cjs [39m[1m[2m 4.73 kB[22m[1m[22m[2m │ gzip: 1.94 kB[22m
|
|
105
|
+
[2mdist/[22m[36mindex.cjs [39m[1m[2m 4.96 kB[22m[1m[22m[2m │ gzip: 2.01 kB[22m
|
|
106
|
+
[2mdist/[22m[36mindex-BpCPHf78.cjs [39m[1m[2m10.14 kB[22m[1m[22m[2m │ gzip: 2.03 kB[22m
|
|
107
|
+
[2mdist/[22m[36mseries-Cgjkfl5S.cjs [39m[1m[2m29.66 kB[22m[1m[22m[2m │ gzip: 8.16 kB[22m
|
|
108
|
+
[32m✓ built in 4.14s[39m
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("zod"),t=n.z.tuple([n.z.number(),n.z.number()]);n.z.tuple([n.z.bigint(),n.z.bigint()]);const d=n.z.object({width:n.z.number(),height:n.z.number()}),O=n.z.object({signedWidth:n.z.number(),signedHeight:n.z.number()}),N=["width","height"];n.z.enum(N);const
|
|
1
|
+
"use strict";const n=require("zod"),t=n.z.tuple([n.z.number(),n.z.number()]);n.z.tuple([n.z.bigint(),n.z.bigint()]);const d=n.z.object({width:n.z.number(),height:n.z.number()}),O=n.z.object({signedWidth:n.z.number(),signedHeight:n.z.number()}),N=["width","height"];n.z.enum(N);const c=["start","center","end"],g=["signedWidth","signedHeight"];n.z.enum(g);const L=n.z.object({x:n.z.number(),y:n.z.number()}),S=n.z.object({clientX:n.z.number(),clientY:n.z.number()}),s=["x","y"],o=n.z.enum(s),u=["top","right","bottom","left"],I=n.z.enum(u),r=["left","right"],a=n.z.enum(r),z=["top","bottom"],l=n.z.enum(z),e=["center"],T=n.z.enum(e),C=[...u,...e],i=n.z.enum(C),E=n.z.enum(c),m=["first","last"],h=n.z.enum(m),b=n.z.object({lower:n.z.number(),upper:n.z.number()}),D=n.z.object({lower:n.z.bigint(),upper:n.z.bigint()});n.z.union([b,t]);n.z.union([D,t]);const p=n.z.union([o,i]),A=n.z.union([o,i,n.z.instanceof(String)]);exports.ALIGNMENTS=c;exports.CENTER_LOCATIONS=e;exports.DIRECTIONS=s;exports.ORDERS=m;exports.X_LOCATIONS=r;exports.Y_LOCATIONS=z;exports.alignment=E;exports.bounds=b;exports.centerLocation=T;exports.clientXY=S;exports.crudeDirection=p;exports.crudeLocation=A;exports.dimensions=d;exports.direction=o;exports.location=i;exports.numberCouple=t;exports.order=h;exports.outerLocation=I;exports.signedDimensions=O;exports.xLocation=a;exports.xy=L;exports.yLocation=l;
|
|
@@ -8,10 +8,10 @@ const S = n.object({ width: n.number(), height: n.number() }), h = n.object({
|
|
|
8
8
|
n.enum(i);
|
|
9
9
|
const u = ["start", "center", "end"], r = ["signedWidth", "signedHeight"];
|
|
10
10
|
n.enum(r);
|
|
11
|
-
const I = n.object({ x: n.number(), y: n.number() }), p = n.object({ clientX: n.number(), clientY: n.number() }), a = ["x", "y"], o = n.enum(a), e = ["top", "right", "bottom", "left"], L = n.enum(e), m = ["left", "right"], C = n.enum(m), b = ["top", "bottom"], E = n.enum(b), s = ["center"], T = n.enum(s), g = [...e, ...s], c = n.enum(g), D = n.enum(u), d = ["first", "last"],
|
|
11
|
+
const I = n.object({ x: n.number(), y: n.number() }), p = n.object({ clientX: n.number(), clientY: n.number() }), a = ["x", "y"], o = n.enum(a), e = ["top", "right", "bottom", "left"], L = n.enum(e), m = ["left", "right"], C = n.enum(m), b = ["top", "bottom"], E = n.enum(b), s = ["center"], T = n.enum(s), g = [...e, ...s], c = n.enum(g), D = n.enum(u), d = ["first", "last"], j = n.enum(d), O = n.object({ lower: n.number(), upper: n.number() }), l = n.object({ lower: n.bigint(), upper: n.bigint() });
|
|
12
12
|
n.union([O, t]);
|
|
13
13
|
n.union([l, t]);
|
|
14
|
-
const
|
|
14
|
+
const A = n.union([o, c]), f = n.union([o, c, n.instanceof(String)]);
|
|
15
15
|
export {
|
|
16
16
|
u as A,
|
|
17
17
|
s as C,
|
|
@@ -20,17 +20,18 @@ export {
|
|
|
20
20
|
m as X,
|
|
21
21
|
b as Y,
|
|
22
22
|
D as a,
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
o as b,
|
|
24
|
+
A as c,
|
|
25
25
|
S as d,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
C as e,
|
|
27
|
+
T as f,
|
|
28
|
+
f as g,
|
|
29
|
+
L as h,
|
|
30
|
+
p as i,
|
|
31
|
+
O as j,
|
|
31
32
|
c as l,
|
|
32
33
|
t as n,
|
|
33
|
-
|
|
34
|
+
j as o,
|
|
34
35
|
h as s,
|
|
35
36
|
I as x,
|
|
36
37
|
E as y
|
package/dist/binary.cjs
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var E=Object.defineProperty;var T=(n,e,t)=>e in n?E(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var i=(n,e,t)=>(T(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-BpCPHf78.cjs"),f=require("./identity.cjs");class p{constructor(){i(this,"contentType","application/json");i(this,"decoder");i(this,"encoder");this.decoder=new TextDecoder,this.encoder=new TextEncoder}encode(e){return this.encoder.encode(this.encodeString(e)).buffer}decode(e,t){return this.decodeString(this.decoder.decode(e),t)}decodeString(e,t){const r=a.toCamel(JSON.parse(e));return t!=null?t.parse(r):r}encodeString(e){return JSON.stringify(a.toSnake(e),(t,r)=>ArrayBuffer.isView(r)?Array.from(r):f.isObject(r)&&"encode_value"in r?typeof r.value=="bigint"?r.value.toString():r.value:typeof r=="bigint"?r.toString():r)}static registerCustomType(){}}class g{constructor(){i(this,"contentType","text/csv")}encode(e){const t=this.encodeString(e);return new TextEncoder().encode(t).buffer}decode(e,t){const r=new TextDecoder().decode(e);return this.decodeString(r,t)}encodeString(e){if(!Array.isArray(e)||e.length===0||!f.isObject(e[0]))throw new Error("Payload must be an array of objects");const t=Object.keys(e[0]),r=[t.join(",")];return e.forEach(d=>{const s=t.map(c=>JSON.stringify(d[c]??""));r.push(s.join(","))}),r.join(`
|
|
2
|
+
`)}decodeString(e,t){const[r,...d]=e.trim().split(`
|
|
3
|
+
`).map(o=>o.trim());if(r.length===0)return t!=null?t.parse({}):{};const s=r.split(",").map(o=>o.trim()),c={};return s.forEach(o=>{c[o]=[]}),d.forEach(o=>{const h=o.split(",").map(u=>u.trim());s.forEach((u,b)=>{const l=this.parseValue(h[b]);l!=null&&c[u].push(l)})}),t!=null?t.parse(c):c}parseValue(e){if(e==null||e.length===0)return null;const t=Number(e);return isNaN(t)?e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e:t}static registerCustomType(){}}class S{constructor(){i(this,"contentType","text/plain")}encode(e){return new TextEncoder().encode(e).buffer}decode(e,t){const r=new TextDecoder().decode(e);return t!=null?t.parse(r):r}}const y=new p,w=new g,m=new S,O=[y],j=Object.freeze(Object.defineProperty({__proto__:null,CSVEncoderDecoder:g,CSV_ECD:w,ENCODERS:O,JSONEncoderDecoder:p,JSON_ECD:y,TEXT_ECD:m,TextEncoderDecoder:S},Symbol.toStringTag,{value:"Module"}));exports.binary=j;
|
package/dist/binary.js
CHANGED
|
@@ -1,37 +1,100 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { t as
|
|
5
|
-
import { isObject as
|
|
6
|
-
class
|
|
1
|
+
var y = Object.defineProperty;
|
|
2
|
+
var m = (n, e, r) => e in n ? y(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r;
|
|
3
|
+
var s = (n, e, r) => (m(n, typeof e != "symbol" ? e + "" : e, r), r);
|
|
4
|
+
import { t as T, d as b } from "./index-BwkQTA-j.js";
|
|
5
|
+
import { isObject as l } from "./identity.js";
|
|
6
|
+
class f {
|
|
7
7
|
constructor() {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
s(this, "contentType", "application/json");
|
|
9
|
+
s(this, "decoder");
|
|
10
|
+
s(this, "encoder");
|
|
11
11
|
this.decoder = new TextDecoder(), this.encoder = new TextEncoder();
|
|
12
12
|
}
|
|
13
13
|
encode(e) {
|
|
14
14
|
return this.encoder.encode(this.encodeString(e)).buffer;
|
|
15
15
|
}
|
|
16
|
-
decode(e,
|
|
17
|
-
return this.decodeString(this.decoder.decode(e),
|
|
16
|
+
decode(e, r) {
|
|
17
|
+
return this.decodeString(this.decoder.decode(e), r);
|
|
18
18
|
}
|
|
19
|
-
decodeString(e,
|
|
20
|
-
const
|
|
21
|
-
return
|
|
19
|
+
decodeString(e, r) {
|
|
20
|
+
const t = T(JSON.parse(e));
|
|
21
|
+
return r != null ? r.parse(t) : t;
|
|
22
22
|
}
|
|
23
23
|
encodeString(e) {
|
|
24
|
-
return JSON.stringify(
|
|
24
|
+
return JSON.stringify(b(e), (r, t) => ArrayBuffer.isView(t) ? Array.from(t) : l(t) && "encode_value" in t ? typeof t.value == "bigint" ? t.value.toString() : t.value : typeof t == "bigint" ? t.toString() : t);
|
|
25
25
|
}
|
|
26
26
|
static registerCustomType() {
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
|
|
29
|
+
class p {
|
|
30
|
+
constructor() {
|
|
31
|
+
s(this, "contentType", "text/csv");
|
|
32
|
+
}
|
|
33
|
+
encode(e) {
|
|
34
|
+
const r = this.encodeString(e);
|
|
35
|
+
return new TextEncoder().encode(r).buffer;
|
|
36
|
+
}
|
|
37
|
+
decode(e, r) {
|
|
38
|
+
const t = new TextDecoder().decode(e);
|
|
39
|
+
return this.decodeString(t, r);
|
|
40
|
+
}
|
|
41
|
+
encodeString(e) {
|
|
42
|
+
if (!Array.isArray(e) || e.length === 0 || !l(e[0]))
|
|
43
|
+
throw new Error("Payload must be an array of objects");
|
|
44
|
+
const r = Object.keys(e[0]), t = [r.join(",")];
|
|
45
|
+
return e.forEach((d) => {
|
|
46
|
+
const i = r.map((c) => JSON.stringify(d[c] ?? ""));
|
|
47
|
+
t.push(i.join(","));
|
|
48
|
+
}), t.join(`
|
|
49
|
+
`);
|
|
50
|
+
}
|
|
51
|
+
decodeString(e, r) {
|
|
52
|
+
const [t, ...d] = e.trim().split(`
|
|
53
|
+
`).map((o) => o.trim());
|
|
54
|
+
if (t.length === 0)
|
|
55
|
+
return r != null ? r.parse({}) : {};
|
|
56
|
+
const i = t.split(",").map((o) => o.trim()), c = {};
|
|
57
|
+
return i.forEach((o) => {
|
|
58
|
+
c[o] = [];
|
|
59
|
+
}), d.forEach((o) => {
|
|
60
|
+
const h = o.split(",").map((u) => u.trim());
|
|
61
|
+
i.forEach((u, E) => {
|
|
62
|
+
const a = this.parseValue(h[E]);
|
|
63
|
+
a != null && c[u].push(a);
|
|
64
|
+
});
|
|
65
|
+
}), r != null ? r.parse(c) : c;
|
|
66
|
+
}
|
|
67
|
+
parseValue(e) {
|
|
68
|
+
if (e == null || e.length === 0)
|
|
69
|
+
return null;
|
|
70
|
+
const r = Number(e);
|
|
71
|
+
return isNaN(r) ? e.startsWith('"') && e.endsWith('"') ? e.slice(1, -1) : e : r;
|
|
72
|
+
}
|
|
73
|
+
static registerCustomType() {
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
class g {
|
|
77
|
+
constructor() {
|
|
78
|
+
s(this, "contentType", "text/plain");
|
|
79
|
+
}
|
|
80
|
+
encode(e) {
|
|
81
|
+
return new TextEncoder().encode(e).buffer;
|
|
82
|
+
}
|
|
83
|
+
decode(e, r) {
|
|
84
|
+
const t = new TextDecoder().decode(e);
|
|
85
|
+
return r != null ? r.parse(t) : t;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
const S = new f(), w = new p(), x = new g(), D = [S], N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
30
89
|
__proto__: null,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
90
|
+
CSVEncoderDecoder: p,
|
|
91
|
+
CSV_ECD: w,
|
|
92
|
+
ENCODERS: D,
|
|
93
|
+
JSONEncoderDecoder: f,
|
|
94
|
+
JSON_ECD: S,
|
|
95
|
+
TEXT_ECD: x,
|
|
96
|
+
TextEncoderDecoder: g
|
|
34
97
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
35
98
|
export {
|
|
36
|
-
|
|
99
|
+
N as binary
|
|
37
100
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const y=require("./base-
|
|
1
|
+
"use strict";const y=require("./base-B48bPNx5.cjs"),m=(e,r)=>typeof e=="bigint"?e-BigInt(r):e-Number(r),b=(e,r)=>typeof e=="bigint"?e+BigInt(r):e+Number(r),g=(e,r,n=1e-4)=>Math.abs(e-r)<n,_=e=>{const r=Math.pow(10,Math.floor(Math.log10(e)));return Math.round(e/r)*r},x=Object.freeze(Object.defineProperty({__proto__:null,add:b,closeTo:g,roundToNearestMagnitude:_,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 f(e);return f(n)},M=Object.freeze({lower:0,upper:0}),B=Object.freeze({lower:-1/0,upper:1/0}),v=Object.freeze({lower:0,upper:1}),N=Object.freeze({lower:-1,upper:1}),A=(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)},f=e=>e.lower>e.upper?{lower:e.upper,upper:e.lower}:e,O=(e,r)=>{const n=i(e);return r<n.lower?n.lower:r>=n.upper?n.upper-(typeof n.upper=="number"?1:1n):r},p=(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},j=(e,r)=>{const n=i(e),t=i(r);return n.lower===t.lower?!0:t.upper===n.lower||t.lower===n.upper?!1:p(n,t.upper)||p(n,t.lower)||p(t,n.upper)||p(t,n.lower)},l=e=>{const r=i(e);return r.upper-r.lower},z=e=>{const r=i(e);return typeof r.lower=="bigint"?r.lower===0n&&r.upper===0n:r.lower===0&&r.upper===0},P=e=>l(e)===0,E=e=>{const r=i(e);return Number.isFinite(r.lower)&&Number.isFinite(r.upper)},T=e=>({lower:Math.min(...e.map(r=>i(r).lower)),upper:Math.max(...e.map(r=>i(r).upper))}),F=e=>({lower:Math.max(...e.map(r=>i(r).lower)),upper:Math.min(...e.map(r=>i(r).upper))}),S=e=>{const r=i(e),n=typeof r.lower=="bigint";return Array.from({length:Number(l(e))},(t,o)=>n?r.lower+BigInt(o):r.lower+o)},w=(e,r)=>{const n=e.map(u=>i(u)),t=n.findIndex((u,s)=>p(u,r)||r<n[s].lower);if(t===-1)return{index:e.length,position:0};const o=n[t];return p(o,r)?{index:t,position:Number(r-o.lower)}:{index:t,position:0}},c={removeBefore:0,removeAfter:0,insertInto:0,deleteInBetween:0},I=(e,r)=>{const n=e.map(h=>i(h)),t=i(r);if(n.length===0)return c;const o=w(n,t.lower),u=w(n,t.upper);if(o.index===e.length)return{...c,insertInto:e.length};if(u.index===0)return{...c,removeAfter:u.position};if(o.index===u.index)return o.position!==0&&u.position!==0?null:{removeAfter:u.position,removeBefore:o.position,insertInto:o.index,deleteInBetween:0};let s=u.index-o.index,d=o.index,a=m(Number(l(n[o.index])),o.position);return o.position!==0?(s-=1,d+=1):a=0,{removeBefore:a,removeAfter:u.position,insertInto:d,deleteInBetween:s}},Z=(e,r)=>{const n=I(e,r),t=e.map(u=>i(u));if(n==null)return t;const o=i(r);return o.lower=b(o.lower,n.removeBefore),o.upper=m(o.upper,n.removeAfter),t.splice(n.insertInto,n.deleteInBetween,o),t},L=Object.freeze(Object.defineProperty({__proto__:null,CLIP:N,DECIMAL:v,INFINITE:B,ZERO:M,bounds:y.bounds,buildInsertionPlan:I,clamp:O,construct:i,contains:p,equals:A,findInsertPosition:w,insert:Z,isFinite:E,isZero:z,linspace:S,makeValid:f,max:T,min:F,overlapsWith:j,span:l,spanIsZero:P},Symbol.toStringTag,{value:"Module"}));exports.bounds=L;exports.construct=i;exports.math=x;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as g } from "./base-DnZzEvvz.js";
|
|
2
2
|
const w = (e, r) => typeof e == "bigint" ? e - BigInt(r) : e - Number(r), b = (e, r) => typeof e == "bigint" ? e + BigInt(r) : e + Number(r), h = (e, r, n = 1e-4) => Math.abs(e - r) < n, _ = (e) => {
|
|
3
3
|
const r = Math.pow(10, Math.floor(Math.log10(e)));
|
|
4
4
|
return Math.round(e / r) * r;
|
package/dist/bounds.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bounds-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bounds-Bh_QBZZK.cjs");exports.bounds=e.bounds;
|
package/dist/bounds.js
CHANGED
|
@@ -0,0 +1,205 @@
|
|
|
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-CfP9TAnW.js";
|
|
4
|
+
import { Z as p, O as F, e as $, t as O, c as G, a as C } from "./xy-D1ZbIqpT.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()]);
|
|
7
|
+
x.object({
|
|
8
|
+
top: h,
|
|
9
|
+
left: h,
|
|
10
|
+
width: h,
|
|
11
|
+
height: h
|
|
12
|
+
});
|
|
13
|
+
x.object({
|
|
14
|
+
left: x.number(),
|
|
15
|
+
top: x.number(),
|
|
16
|
+
right: x.number(),
|
|
17
|
+
bottom: x.number()
|
|
18
|
+
});
|
|
19
|
+
const Y = x.object({
|
|
20
|
+
one: j,
|
|
21
|
+
two: j,
|
|
22
|
+
root: S
|
|
23
|
+
}), W = { one: p, two: p, root: E }, U = { one: p, two: F, root: H }, z = (o, t) => ({
|
|
24
|
+
one: o.one,
|
|
25
|
+
two: o.two,
|
|
26
|
+
root: t ?? o.root
|
|
27
|
+
}), c = (o, t, e = 0, n = 0, s) => {
|
|
28
|
+
const r = {
|
|
29
|
+
one: { ...p },
|
|
30
|
+
two: { ...p },
|
|
31
|
+
root: s ?? E
|
|
32
|
+
};
|
|
33
|
+
if (typeof o == "number") {
|
|
34
|
+
if (typeof t != "number")
|
|
35
|
+
throw new Error("Box constructor called with invalid arguments");
|
|
36
|
+
return r.one = { x: o, y: t }, r.two = { x: r.one.x + e, y: r.one.y + n }, r;
|
|
37
|
+
}
|
|
38
|
+
return "one" in o && "two" in o && "root" in o ? { ...o, root: s ?? o.root } : ("getBoundingClientRect" in o && (o = o.getBoundingClientRect()), "left" in o ? (r.one = { x: o.left, y: o.top }, r.two = { x: o.right, y: o.bottom }, r) : (r.one = o, t == null ? r.two = { x: r.one.x + e, y: r.one.y + n } : typeof t == "number" ? r.two = { x: r.one.x + t, y: r.one.y + e } : "width" in t ? r.two = {
|
|
39
|
+
x: r.one.x + t.width,
|
|
40
|
+
y: r.one.y + t.height
|
|
41
|
+
} : "signedWidth" in t ? r.two = {
|
|
42
|
+
x: r.one.x + t.signedWidth,
|
|
43
|
+
y: r.one.y + t.signedHeight
|
|
44
|
+
} : r.two = t, r));
|
|
45
|
+
}, k = (o, t, e) => {
|
|
46
|
+
const n = c(o);
|
|
47
|
+
if (typeof t == "string") {
|
|
48
|
+
if (e == null)
|
|
49
|
+
throw new Error("Invalid arguments for resize");
|
|
50
|
+
const s = M(t);
|
|
51
|
+
return c(
|
|
52
|
+
n.one,
|
|
53
|
+
void 0,
|
|
54
|
+
s === "x" ? e : u(n),
|
|
55
|
+
s === "y" ? e : l(n),
|
|
56
|
+
n.root
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
return c(n.one, t, void 0, void 0, n.root);
|
|
60
|
+
}, J = (o, t, e = !0) => {
|
|
61
|
+
const n = c(o);
|
|
62
|
+
let s = (r, i) => r < i;
|
|
63
|
+
return e && (s = (r, i) => r <= i), "one" in t ? s(y(n), y(t)) && s(w(t), w(n)) && s(a(n), a(t)) && s(f(t), f(n)) : s(y(n), t.x) && s(t.x, w(n)) && s(a(n), t.y) && s(t.y, f(n));
|
|
64
|
+
}, K = (o, t) => $(o.one, t.one) && $(o.two, t.two) && Z(o.root, t.root), A = (o) => ({
|
|
65
|
+
width: u(o),
|
|
66
|
+
height: l(o)
|
|
67
|
+
}), Q = (o) => ({
|
|
68
|
+
signedWidth: _(o),
|
|
69
|
+
signedHeight: b(o)
|
|
70
|
+
}), V = (o) => ({
|
|
71
|
+
top: a(o),
|
|
72
|
+
left: y(o),
|
|
73
|
+
width: u(o),
|
|
74
|
+
height: l(o)
|
|
75
|
+
}), B = (o, t, e = !1) => {
|
|
76
|
+
const n = M(t) === "y" ? b(o) : _(o);
|
|
77
|
+
return e ? n : Math.abs(n);
|
|
78
|
+
}, g = (o, t) => {
|
|
79
|
+
const e = c(o);
|
|
80
|
+
return {
|
|
81
|
+
x: t.x === "center" ? T(e).x : d(e, t.x),
|
|
82
|
+
y: t.y === "center" ? T(e).y : d(e, t.y)
|
|
83
|
+
};
|
|
84
|
+
}, d = (o, t) => {
|
|
85
|
+
const e = c(o), n = q(e.root).includes(t) ? Math.min : Math.max;
|
|
86
|
+
return P.includes(t) ? n(e.one.x, e.two.x) : n(e.one.y, e.two.y);
|
|
87
|
+
}, oo = (o) => o.one.x === o.two.x && o.one.y === o.two.y, u = (o) => B(o, "x"), l = (o) => B(o, "y"), _ = (o) => {
|
|
88
|
+
const t = c(o);
|
|
89
|
+
return t.two.x - t.one.x;
|
|
90
|
+
}, b = (o) => {
|
|
91
|
+
const t = c(o);
|
|
92
|
+
return t.two.y - t.one.y;
|
|
93
|
+
}, R = (o) => g(o, E), to = (o) => g(o, v), no = (o) => g(o, H), eo = (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(R(o), {
|
|
94
|
+
x: _(o) / 2,
|
|
95
|
+
y: b(o) / 2
|
|
96
|
+
}), I = (o) => {
|
|
97
|
+
const t = c(o);
|
|
98
|
+
return t.root.x === "left" ? y(t) : w(t);
|
|
99
|
+
}, L = (o) => {
|
|
100
|
+
const t = c(o);
|
|
101
|
+
return t.root.y === "top" ? a(t) : f(t);
|
|
102
|
+
}, ro = (o) => ({ x: I(o), y: L(o) }), so = (o) => {
|
|
103
|
+
const t = c(o);
|
|
104
|
+
return { lower: t.one.x, upper: t.two.x };
|
|
105
|
+
}, co = (o) => {
|
|
106
|
+
const t = c(o);
|
|
107
|
+
return { lower: t.one.y, upper: t.two.y };
|
|
108
|
+
}, io = (o, t) => z(o, t), xo = (o, t) => {
|
|
109
|
+
const e = c(o), n = P.includes(t) ? "x" : X.includes(t) ? "y" : null;
|
|
110
|
+
if (n === null)
|
|
111
|
+
throw new Error(`Invalid location: ${D}`);
|
|
112
|
+
const s = t === "top" || t === "left" ? Math.min : Math.max, r = { ...e.one }, i = { ...e.two };
|
|
113
|
+
return r[n] = s(e.one[n], e.two[n]), i[n] = s(e.one[n], e.two[n]), [r, i];
|
|
114
|
+
}, yo = (o, t) => {
|
|
115
|
+
const e = c(o), n = c(t), s = I(n) + (u(n) - u(e)) / 2, r = L(n) + (l(n) - l(e)) / 2;
|
|
116
|
+
return c({ x: s, y: r }, A(e));
|
|
117
|
+
}, ao = (o) => typeof o != "object" || o == null ? !1 : "one" in o && "two" in o && "root" in o, uo = (o) => u(o) / l(o), lo = (o, t, e) => {
|
|
118
|
+
if (typeof t == "string") {
|
|
119
|
+
if (e == null)
|
|
120
|
+
throw new Error("Undefined amount passed into box.translate");
|
|
121
|
+
const s = M(t);
|
|
122
|
+
t = G(s, e);
|
|
123
|
+
}
|
|
124
|
+
const n = c(o);
|
|
125
|
+
return c(
|
|
126
|
+
O(n.one, t),
|
|
127
|
+
O(n.two, t),
|
|
128
|
+
void 0,
|
|
129
|
+
void 0,
|
|
130
|
+
n.root
|
|
131
|
+
);
|
|
132
|
+
}, wo = (o, t) => {
|
|
133
|
+
const e = Math.max(y(o), y(t)), n = Math.max(a(o), a(t)), s = Math.min(w(o), w(t)), r = Math.min(f(o), f(t));
|
|
134
|
+
return e > s || n > r ? W : c({ x: e, y: n }, { x: s, y: r }, void 0, void 0, o.root);
|
|
135
|
+
}, fo = (o) => u(o) * l(o), mo = (o, t) => {
|
|
136
|
+
const e = c(o);
|
|
137
|
+
return c(
|
|
138
|
+
C(e.one, t),
|
|
139
|
+
C(e.two, t),
|
|
140
|
+
void 0,
|
|
141
|
+
void 0,
|
|
142
|
+
e.root
|
|
143
|
+
);
|
|
144
|
+
}, po = (o, t, e, n, s, r) => {
|
|
145
|
+
const i = { x: o, y: t }, m = { x: o + e, y: t + n };
|
|
146
|
+
return s.x !== r.x && (s.x === "center" ? (i.x -= e / 2, m.x -= e / 2) : (i.x -= e, m.x -= e)), s.y !== r.y && (s.y === "center" ? (i.y -= n / 2, m.y -= n / 2) : (i.y -= n, m.y -= n)), c(i, m, void 0, void 0, r);
|
|
147
|
+
}, To = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
148
|
+
__proto__: null,
|
|
149
|
+
DECIMAL: U,
|
|
150
|
+
ZERO: W,
|
|
151
|
+
area: fo,
|
|
152
|
+
areaIsZero: oo,
|
|
153
|
+
aspect: uo,
|
|
154
|
+
bottom: f,
|
|
155
|
+
bottomLeft: no,
|
|
156
|
+
bottomRight: eo,
|
|
157
|
+
box: Y,
|
|
158
|
+
center: T,
|
|
159
|
+
construct: c,
|
|
160
|
+
constructWithAlternateRoot: po,
|
|
161
|
+
contains: J,
|
|
162
|
+
copy: z,
|
|
163
|
+
css: V,
|
|
164
|
+
dim: B,
|
|
165
|
+
dims: A,
|
|
166
|
+
edgePoints: xo,
|
|
167
|
+
equals: K,
|
|
168
|
+
height: l,
|
|
169
|
+
intersection: wo,
|
|
170
|
+
isBox: ao,
|
|
171
|
+
left: y,
|
|
172
|
+
loc: d,
|
|
173
|
+
positionInCenter: yo,
|
|
174
|
+
reRoot: io,
|
|
175
|
+
resize: k,
|
|
176
|
+
right: w,
|
|
177
|
+
root: ro,
|
|
178
|
+
signedDims: Q,
|
|
179
|
+
signedHeight: b,
|
|
180
|
+
signedWidth: _,
|
|
181
|
+
top: a,
|
|
182
|
+
topLeft: R,
|
|
183
|
+
topRight: to,
|
|
184
|
+
translate: lo,
|
|
185
|
+
truncate: mo,
|
|
186
|
+
width: u,
|
|
187
|
+
x: I,
|
|
188
|
+
xBounds: so,
|
|
189
|
+
xyLoc: g,
|
|
190
|
+
y: L,
|
|
191
|
+
yBounds: co
|
|
192
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
193
|
+
export {
|
|
194
|
+
po as a,
|
|
195
|
+
To as b,
|
|
196
|
+
c,
|
|
197
|
+
fo as d,
|
|
198
|
+
ao as e,
|
|
199
|
+
so as f,
|
|
200
|
+
l as h,
|
|
201
|
+
wo as i,
|
|
202
|
+
u as w,
|
|
203
|
+
g as x,
|
|
204
|
+
co as y
|
|
205
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const y=require("zod"),z=require("./direction-DZbN47uL.cjs"),u=require("./location-c3g6WKs-.cjs"),i=require("./xy-cP-FXJtR.cjs"),m=require("./base-B48bPNx5.cjs"),O=y.z.union([y.z.number(),y.z.string()]);y.z.object({top:O,left:O,width:O,height:O});y.z.object({left:y.z.number(),top:y.z.number(),right:y.z.number(),bottom:y.z.number()});const H=y.z.object({one:m.xy,two:m.xy,root:u.corner}),I={one:i.ZERO,two:i.ZERO,root:u.TOP_LEFT},S={one:i.ZERO,two:i.ONE,root:u.BOTTOM_LEFT},q=(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??u.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))},N=(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)},v=(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))},D=(t,o)=>i.equals(t.one,o.one)&&i.equals(t.two,o.two)&&u.xyEquals(t.root,o.root),R=t=>({width:l(t),height:w(t)}),G=t=>({signedWidth:b(t),signedHeight:T(t)}),X=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=u.xyCouple(e.root).includes(o)?Math.min:Math.max;return m.X_LOCATIONS.includes(o)?n(e.one.x,e.two.x):n(e.one.y,e.two.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,u.TOP_LEFT),U=t=>_(t,u.TOP_RIGHT),Y=t=>_(t,u.BOTTOM_LEFT),k=t=>_(t,u.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}),L=t=>{const o=c(t);return o.root.x==="left"?d(o):f(o)},B=t=>{const o=c(t);return o.root.y==="top"?a(o):h(o)},J=t=>({x:L(t),y:B(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}},K=(t,o)=>q(t,o),Q=(t,o)=>{const e=c(t),n=m.X_LOCATIONS.includes(o)?"x":m.Y_LOCATIONS.includes(o)?"y":null;if(n===null)throw new Error(`Invalid location: ${u.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]},V=(t,o)=>{const e=c(t),n=c(o),s=L(n)+(l(n)-l(e))/2,r=B(n)+(w(n)-w(e))/2;return c({x:s,y:r},R(e))},j=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,tt=t=>l(t)/w(t),ot=(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),nt=(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},p={x:t+e,y:o+n};return s.x!==r.x&&(s.x==="center"?(x.x-=e/2,p.x-=e/2):(x.x-=e,p.x-=e)),s.y!==r.y&&(s.y==="center"?(x.y-=n/2,p.y-=n/2):(x.y-=n,p.y-=n)),c(x,p,void 0,void 0,r)},et=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:S,ZERO:I,area:W,areaIsZero:$,aspect:tt,bottom:h,bottomLeft:Y,bottomRight:k,box:H,center:E,construct:c,constructWithAlternateRoot:F,contains:v,copy:q,css:X,dim:M,dims:R,edgePoints:Q,equals:D,height:w,intersection:A,isBox:j,left:d,loc:g,positionInCenter:V,reRoot:K,resize:N,right:f,root:J,signedDims:G,signedHeight:T,signedWidth:b,top:a,topLeft:C,topRight:U,translate:ot,truncate:nt,width:l,x:L,xBounds:P,xyLoc:_,y:B,yBounds:Z},Symbol.toStringTag,{value:"Module"}));exports.area=W;exports.box=et;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-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./box-m3dlc1kR.cjs");exports.box=e.box;
|
package/dist/box.js
CHANGED
package/dist/caseconv.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BpCPHf78.cjs");exports.caseconv=e.caseconv;
|
package/dist/caseconv.js
CHANGED
package/dist/compare.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BhEWuRmo.cjs");exports.compare=e.compare;
|
package/dist/compare.js
CHANGED
package/dist/deep.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./identity.cjs"),c=require("./path-BO4pyGZf.cjs"),g=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]: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(y=>{f(s[y],e[y],o!==""?`${o}.${y}`:y)});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},h=(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(!h(s,e))return!1}else if(s!==e)return!1}return!0},u=(t,...n)=>{if(n.length===0)return t;const i=n.shift();if(a.isObject(t)&&a.isObject(i))for(const r in i)try{a.isObject(i[r])?(r in t||Object.assign(t,{[r]:{}}),u(t[r],i[r])):Object.assign(t,{[r]:i[r]})}catch(f){throw f instanceof TypeError?new TypeError(`.${r}: ${f.message}`):f}return u(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 y=e.shape[o].safeParse(l);y.success&&(f[o]=y.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:g,deleteD:j,difference:d,element:c.element,equal:p,get:c.get,has:c.has,join:c.join,override:u,overrideValidItems:A,partialEqual:h,pathToCamel:c.pathToCamel,pathToSnake:c.pathToSnake,pathsMatch:c.pathsMatch,set:c.set,transformPath:c.transformPath},Symbol.toStringTag,{value:"Module"}));exports.deep=O;
|