@synnaxlabs/x 0.23.0 → 0.24.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 (108) hide show
  1. package/.turbo/turbo-build.log +41 -41
  2. package/dist/{base-D3FrPu8C.cjs → base-B48bPNx5.cjs} +1 -1
  3. package/dist/{base-Cz4DfmJf.js → base-DnZzEvvz.js} +11 -10
  4. package/dist/binary.cjs +3 -1
  5. package/dist/binary.js +83 -20
  6. package/dist/{bounds-1ouRnRJS.cjs → bounds-Bh_QBZZK.cjs} +1 -1
  7. package/dist/{bounds-BYz3mV9U.js → bounds-Dmn-hd_-.js} +1 -1
  8. package/dist/bounds.cjs +1 -1
  9. package/dist/bounds.js +1 -1
  10. package/dist/box-C92jYSNY.js +205 -0
  11. package/dist/box-m3dlc1kR.cjs +1 -0
  12. package/dist/box.cjs +1 -1
  13. package/dist/box.js +1 -1
  14. package/dist/caseconv.cjs +1 -1
  15. package/dist/caseconv.js +1 -1
  16. package/dist/compare.cjs +1 -1
  17. package/dist/compare.js +1 -1
  18. package/dist/deep.cjs +1 -1
  19. package/dist/deep.js +26 -24
  20. package/dist/{dimensions-9gLSFjFx.js → dimensions-BAuHfd-b.js} +1 -1
  21. package/dist/{dimensions-Fe8DhhXU.cjs → dimensions-zMcb9pMk.cjs} +1 -1
  22. package/dist/dimensions.cjs +1 -1
  23. package/dist/dimensions.js +1 -1
  24. package/dist/direction-CScbfCdT.js +16 -0
  25. package/dist/direction-DZbN47uL.cjs +1 -0
  26. package/dist/direction.cjs +1 -1
  27. package/dist/direction.js +1 -1
  28. package/dist/index-BpCPHf78.cjs +1 -0
  29. package/dist/index-Bt5ivtN9.js +95 -0
  30. package/dist/{index-POWYBOZm.js → index-BwkQTA-j.js} +113 -109
  31. package/dist/index-CuG8fceO.cjs +1 -0
  32. package/dist/index.cjs +3 -1
  33. package/dist/index.js +165 -123
  34. package/dist/{location-C4YaXxjI.js → location-CfP9TAnW.js} +5 -5
  35. package/dist/{location-CZOgJmu5.cjs → location-c3g6WKs-.cjs} +1 -1
  36. package/dist/location.cjs +1 -1
  37. package/dist/location.js +1 -1
  38. package/dist/path-BO4pyGZf.cjs +1 -0
  39. package/dist/path-nTHmt_4i.js +65 -0
  40. package/dist/{position-BjhXUSEO.cjs → position-BBnkwGX1.cjs} +1 -1
  41. package/dist/{position-PSYLZzqw.js → position-B_aphAR0.js} +4 -4
  42. package/dist/position.cjs +1 -1
  43. package/dist/position.js +1 -1
  44. package/dist/{scale-DUBO0Q4s.cjs → scale-C8axypQ2.cjs} +1 -1
  45. package/dist/{scale-DCbi48di.js → scale-CgtgqlYU.js} +4 -4
  46. package/dist/scale.cjs +1 -1
  47. package/dist/scale.js +1 -1
  48. package/dist/{series-CSutMOtt.cjs → series-8E6FnWBU.cjs} +1 -1
  49. package/dist/{series-DCv8f29w.js → series-DCJSrg1P.js} +9 -9
  50. package/dist/{spatial-R5OeJgR6.cjs → spatial-BOhaO8xN.cjs} +1 -1
  51. package/dist/{spatial-6OGCmDve.js → spatial-DozyssiN.js} +1 -1
  52. package/dist/spatial.cjs +1 -1
  53. package/dist/spatial.js +9 -9
  54. package/dist/src/binary/encoder.d.ts +19 -0
  55. package/dist/src/binary/encoder.d.ts.map +1 -1
  56. package/dist/src/caseconv/caseconv.d.ts +2 -0
  57. package/dist/src/caseconv/caseconv.d.ts.map +1 -1
  58. package/dist/src/compare/compare.d.ts +1 -0
  59. package/dist/src/compare/compare.d.ts.map +1 -1
  60. package/dist/src/compare/compare.spec.d.ts +2 -0
  61. package/dist/src/compare/compare.spec.d.ts.map +1 -0
  62. package/dist/src/deep/path.d.ts +13 -4
  63. package/dist/src/deep/path.d.ts.map +1 -1
  64. package/dist/src/migrate/migrate.d.ts +22 -10
  65. package/dist/src/migrate/migrate.d.ts.map +1 -1
  66. package/dist/src/spatial/box/box.d.ts +4 -2
  67. package/dist/src/spatial/box/box.d.ts.map +1 -1
  68. package/dist/src/spatial/direction/direction.d.ts +1 -1
  69. package/dist/src/spatial/direction/direction.d.ts.map +1 -1
  70. package/dist/src/spatial/xy/xy.d.ts +1 -1
  71. package/dist/src/spatial/xy/xy.d.ts.map +1 -1
  72. package/dist/src/zodutil/zodutil.d.ts.map +1 -1
  73. package/dist/telem.cjs +1 -1
  74. package/dist/telem.js +1 -1
  75. package/dist/{xy-H8aUVW_X.js → xy-D1ZbIqpT.js} +12 -12
  76. package/dist/xy-cP-FXJtR.cjs +1 -0
  77. package/dist/xy.cjs +1 -1
  78. package/dist/xy.js +1 -1
  79. package/dist/zodutil.cjs +1 -1
  80. package/dist/zodutil.js +2 -3
  81. package/package.json +3 -3
  82. package/src/binary/encoder.spec.ts +121 -3
  83. package/src/binary/encoder.ts +91 -1
  84. package/src/caseconv/caseconv.ts +10 -1
  85. package/src/compare/compare.spec.ts +49 -0
  86. package/src/compare/compare.ts +32 -2
  87. package/src/deep/path.spec.ts +3 -2
  88. package/src/deep/path.ts +27 -21
  89. package/src/migrate/migrate.spec.ts +55 -54
  90. package/src/migrate/migrate.ts +117 -17
  91. package/src/spatial/box/box.spec.ts +70 -22
  92. package/src/spatial/box/box.ts +15 -11
  93. package/src/spatial/direction/direction.ts +2 -2
  94. package/src/spatial/xy/xy.ts +3 -2
  95. package/src/telem/telem.spec.ts +35 -10
  96. package/src/zodutil/zodutil.spec.ts +2 -2
  97. package/src/zodutil/zodutil.ts +2 -3
  98. package/tsconfig.tsbuildinfo +1 -1
  99. package/dist/box-CHDDKvN3.cjs +0 -1
  100. package/dist/box-Q7p9JFnX.js +0 -204
  101. package/dist/direction-dXjlmg4_.cjs +0 -1
  102. package/dist/direction-wsPTe9a1.js +0 -15
  103. package/dist/index-Bcm6lEr8.js +0 -73
  104. package/dist/index-CnZb0cyW.cjs +0 -1
  105. package/dist/index-xjptNL6Z.cjs +0 -1
  106. package/dist/path-BfHj5x9k.js +0 -62
  107. package/dist/path-By98WcWm.cjs +0 -1
  108. package/dist/xy-B4SvvNaG.cjs +0 -1
@@ -1,5 +1,5 @@
1
1
 
2
- > @synnaxlabs/x@0.23.0 build /home/runner/work/synnax/synnax/x/ts
2
+ > @synnaxlabs/x@0.24.0 build /home/runner/work/synnax/synnax/x/ts
3
3
  > tsc --noEmit && vite build
4
4
 
5
5
   Synnax - Production mode
@@ -31,39 +31,39 @@ computing gzip size...
31
31
  dist/kv.js  0.17 kB │ gzip: 0.15 kB
32
32
  dist/record.js  0.20 kB │ gzip: 0.17 kB
33
33
  dist/search.js  0.27 kB │ gzip: 0.20 kB
34
- dist/spatial-6OGCmDve.js  0.28 kB │ gzip: 0.23 kB
34
+ dist/spatial-DozyssiN.js  0.28 kB │ gzip: 0.23 kB
35
35
  dist/change-DLl6DccR.js  0.30 kB │ gzip: 0.23 kB
36
36
  dist/debounce.js  0.36 kB │ gzip: 0.18 kB
37
37
  dist/telem.js  0.41 kB │ gzip: 0.25 kB
38
- dist/spatial.js  0.58 kB │ gzip: 0.29 kB
39
- dist/direction-wsPTe9a1.js  0.63 kB │ gzip: 0.36 kB
38
+ dist/spatial.js  0.58 kB │ gzip: 0.28 kB
39
+ dist/direction-CScbfCdT.js  0.65 kB │ gzip: 0.37 kB
40
40
  dist/zodutil.js  0.68 kB │ gzip: 0.43 kB
41
41
  dist/external-DI9122wF.js  0.87 kB │ gzip: 0.51 kB
42
42
  dist/observe.js  1.13 kB │ gzip: 0.47 kB
43
43
  dist/worker.js  1.17 kB │ gzip: 0.53 kB
44
- dist/base-Cz4DfmJf.js  1.20 kB │ gzip: 0.51 kB
45
- dist/binary.js  1.29 kB │ gzip: 0.64 kB
46
- dist/path-BfHj5x9k.js  1.35 kB │ gzip: 0.54 kB
47
- dist/dimensions-9gLSFjFx.js  1.50 kB │ gzip: 0.66 kB
44
+ dist/base-DnZzEvvz.js  1.21 kB │ gzip: 0.51 kB
45
+ dist/dimensions-BAuHfd-b.js  1.50 kB │ gzip: 0.66 kB
46
+ dist/path-nTHmt_4i.js  1.50 kB │ gzip: 0.62 kB
48
47
  dist/url.js  1.98 kB │ gzip: 0.87 kB
49
- dist/index-Bcm6lEr8.js  2.02 kB │ gzip: 0.82 kB
50
- dist/position-PSYLZzqw.js  2.25 kB │ gzip: 1.07 kB
51
- dist/xy-H8aUVW_X.js  2.60 kB │ gzip: 1.05 kB
52
- dist/location-C4YaXxjI.js  2.81 kB │ gzip: 1.17 kB
53
- dist/deep.js  3.30 kB │ gzip: 1.27 kB
54
- dist/bounds-BYz3mV9U.js  4.52 kB │ gzip: 1.55 kB
55
- dist/index.js  4.53 kB │ gzip: 1.92 kB
56
- dist/scale-DCbi48di.js  5.66 kB │ gzip: 1.78 kB
57
- dist/box-Q7p9JFnX.js  6.06 kB │ gzip: 2.14 kB
58
- dist/index-POWYBOZm.js 12.56 kB │ gzip: 2.21 kB
59
- dist/series-DCv8f29w.js 53.98 kB │ gzip: 12.12 kB
60
- [vite:dts] Declaration files built in 3579ms.
48
+ dist/position-B_aphAR0.js  2.25 kB │ gzip: 1.07 kB
49
+ dist/xy-D1ZbIqpT.js  2.61 kB │ gzip: 1.05 kB
50
+ dist/index-Bt5ivtN9.js  2.70 kB │ gzip: 1.05 kB
51
+ dist/location-CfP9TAnW.js  2.80 kB │ gzip: 1.16 kB
52
+ dist/binary.js  2.96 kB │ gzip: 1.11 kB
53
+ dist/deep.js  3.35 kB │ gzip: 1.30 kB
54
+ dist/bounds-Dmn-hd_-.js  4.52 kB │ gzip: 1.55 kB
55
+ dist/scale-CgtgqlYU.js  5.66 kB │ gzip: 1.77 kB
56
+ dist/index.js  5.75 kB │ gzip: 2.27 kB
57
+ dist/box-C92jYSNY.js  6.13 kB │ gzip: 2.16 kB
58
+ dist/index-BwkQTA-j.js 12.69 kB │ gzip: 2.25 kB
59
+ dist/series-DCJSrg1P.js 53.98 kB gzip: 12.12 kB
60
+ [vite:dts] Declaration files built in 3702ms.
61
61
  
62
62
  Generated an empty chunk: "destructor".
63
63
  dist/destructor.cjs  0.01 kB │ gzip: 0.03 kB
64
64
  dist/unique.cjs  0.13 kB │ gzip: 0.14 kB
65
65
  dist/xy.cjs  0.13 kB │ gzip: 0.14 kB
66
- dist/box.cjs  0.14 kB │ gzip: 0.15 kB
66
+ dist/box.cjs  0.14 kB │ gzip: 0.14 kB
67
67
  dist/scale.cjs  0.14 kB │ gzip: 0.15 kB
68
68
  dist/bounds.cjs  0.15 kB │ gzip: 0.15 kB
69
69
  dist/change.cjs  0.15 kB │ gzip: 0.15 kB
@@ -78,31 +78,31 @@ Generated an empty chunk: "destructor".
78
78
  dist/toArray.cjs  0.19 kB │ gzip: 0.16 kB
79
79
  dist/kv.cjs  0.19 kB │ gzip: 0.14 kB
80
80
  dist/change-C-YELKx6.cjs  0.23 kB │ gzip: 0.20 kB
81
- dist/spatial-R5OeJgR6.cjs  0.24 kB │ gzip: 0.21 kB
81
+ dist/spatial-BOhaO8xN.cjs  0.24 kB │ gzip: 0.21 kB
82
82
  dist/search.cjs  0.25 kB │ gzip: 0.22 kB
83
83
  dist/record.cjs  0.25 kB │ gzip: 0.20 kB
84
84
  dist/debounce.cjs  0.33 kB │ gzip: 0.22 kB
85
- dist/direction-dXjlmg4_.cjs  0.51 kB │ gzip: 0.33 kB
86
- dist/telem.cjs  0.54 kB │ gzip: 0.27 kB
87
- dist/zodutil.cjs  0.59 kB │ gzip: 0.38 kB
85
+ dist/direction-DZbN47uL.cjs  0.53 kB │ gzip: 0.34 kB
86
+ dist/telem.cjs  0.54 kB │ gzip: 0.28 kB
87
+ dist/zodutil.cjs  0.59 kB │ gzip: 0.39 kB
88
88
  dist/spatial.cjs  0.63 kB │ gzip: 0.33 kB
89
89
  dist/external-B-DoBvh7.cjs  0.68 kB │ gzip: 0.45 kB
90
90
  dist/observe.cjs  0.88 kB │ gzip: 0.42 kB
91
91
  dist/worker.cjs  0.95 kB │ gzip: 0.49 kB
92
- dist/path-By98WcWm.cjs  1.02 kB │ gzip: 0.49 kB
93
- dist/binary.cjs  1.10 kB │ gzip: 0.58 kB
94
92
  dist/url.cjs  1.10 kB │ gzip: 0.60 kB
95
- dist/dimensions-Fe8DhhXU.cjs  1.17 kB │ gzip: 0.58 kB
96
- dist/base-D3FrPu8C.cjs  1.36 kB │ gzip: 0.56 kB
97
- dist/index-CnZb0cyW.cjs  1.49 kB │ gzip: 0.74 kB
98
- dist/position-BjhXUSEO.cjs  1.71 kB │ gzip: 0.94 kB
99
- dist/xy-B4SvvNaG.cjs  1.99 kB │ gzip: 0.95 kB
100
- dist/location-CZOgJmu5.cjs  2.37 kB │ gzip: 1.04 kB
101
- dist/deep.cjs  2.38 kB │ gzip: 1.08 kB
102
- dist/bounds-1ouRnRJS.cjs  3.42 kB │ gzip: 1.37 kB
103
- dist/index.cjs  3.95 kB │ gzip: 1.67 kB
104
- dist/scale-DUBO0Q4s.cjs  4.24 kB │ gzip: 1.57 kB
105
- dist/box-CHDDKvN3.cjs  4.67 kB │ gzip: 1.92 kB
106
- dist/index-xjptNL6Z.cjs 10.01 kB │ gzip: 1.99 kB
107
- dist/series-CSutMOtt.cjs 29.66 kB │ gzip: 8.16 kB
108
- ✓ built in 4.15s
93
+ dist/path-BO4pyGZf.cjs  1.17 kB │ gzip: 0.58 kB
94
+ dist/dimensions-zMcb9pMk.cjs  1.17 kB │ gzip: 0.58 kB
95
+ dist/base-B48bPNx5.cjs  1.38 kB │ gzip: 0.57 kB
96
+ dist/position-BBnkwGX1.cjs  1.71 kB │ gzip: 0.94 kB
97
+ dist/index-CuG8fceO.cjs  1.99 kB │ gzip: 0.93 kB
98
+ dist/xy-cP-FXJtR.cjs  2.00 kB │ gzip: 0.96 kB
99
+ dist/binary.cjs  2.35 kB │ gzip: 1.01 kB
100
+ dist/location-c3g6WKs-.cjs  2.37 kB │ gzip: 1.04 kB
101
+ dist/deep.cjs  2.43 kB │ gzip: 1.10 kB
102
+ dist/bounds-Bh_QBZZK.cjs  3.42 kB │ gzip: 1.37 kB
103
+ dist/scale-C8axypQ2.cjs  4.24 kB │ gzip: 1.56 kB
104
+ dist/box-m3dlc1kR.cjs  4.73 kB │ gzip: 1.94 kB
105
+ dist/index.cjs  4.88 kB │ gzip: 1.98 kB
106
+ dist/index-BpCPHf78.cjs 10.14 kB gzip: 2.03 kB
107
+ dist/series-8E6FnWBU.cjs 29.66 kB │ gzip: 8.16 kB
108
+ ✓ built in 4.31s
@@ -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 i=["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()}),c=["x","y"],s=n.z.enum(c),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),o=["center"],T=n.z.enum(o),C=[...u,...o],e=n.z.enum(C),E=n.z.enum(i),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([s,e]),A=n.z.union([s,e,n.z.instanceof(String)]);exports.ALIGNMENTS=i;exports.CENTER_LOCATIONS=o;exports.DIRECTIONS=c;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.location=e;exports.numberCouple=t;exports.order=h;exports.outerLocation=I;exports.signedDimensions=O;exports.xLocation=a;exports.xy=L;exports.yLocation=l;
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"], A = n.enum(d), O = n.object({ lower: n.number(), upper: n.number() }), l = n.object({ lower: n.bigint(), upper: n.bigint() });
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 f = n.union([o, c]), j = n.union([o, c, n.instanceof(String)]);
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
- C as b,
24
- f as c,
23
+ o as b,
24
+ A as c,
25
25
  S as d,
26
- T as e,
27
- j as f,
28
- L as g,
29
- p as h,
30
- O as i,
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
- A as o,
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 u=Object.defineProperty;var s=(n,e,t)=>e in n?u(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var o=(n,e,t)=>(s(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-xjptNL6Z.cjs"),a=require("./identity.cjs");class c{constructor(){o(this,"contentType","application/json");o(this,"decoder");o(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=i.toCamel(JSON.parse(e));return t!=null?t.parse(r):r}encodeString(e){return JSON.stringify(i.toSnake(e),(t,r)=>ArrayBuffer.isView(r)?Array.from(r):a.isObject(r)&&"encode_value"in r?typeof r.value=="bigint"?r.value.toString():r.value:typeof r=="bigint"?r.toString():r)}static registerCustomType(){}}const d=new c,l=[d],S=Object.freeze(Object.defineProperty({__proto__:null,ENCODERS:l,JSONEncoderDecoder:c,JSON_ECD:d},Symbol.toStringTag,{value:"Module"}));exports.binary=S;
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 d = Object.defineProperty;
2
- var s = (n, e, t) => e in n ? d(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var o = (n, e, t) => (s(n, typeof e != "symbol" ? e + "" : e, t), t);
4
- import { t as u, b as a } from "./index-POWYBOZm.js";
5
- import { isObject as f } from "./identity.js";
6
- class i {
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
- o(this, "contentType", "application/json");
9
- o(this, "decoder");
10
- o(this, "encoder");
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, t) {
17
- return this.decodeString(this.decoder.decode(e), t);
16
+ decode(e, r) {
17
+ return this.decodeString(this.decoder.decode(e), r);
18
18
  }
19
- decodeString(e, t) {
20
- const r = u(JSON.parse(e));
21
- return t != null ? t.parse(r) : r;
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(a(e), (t, r) => ArrayBuffer.isView(r) ? Array.from(r) : f(r) && "encode_value" in r ? typeof r.value == "bigint" ? r.value.toString() : r.value : typeof r == "bigint" ? r.toString() : r);
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
- const c = new i(), l = [c], y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
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
- ENCODERS: l,
32
- JSONEncoderDecoder: i,
33
- JSON_ECD: c
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
- y as binary
99
+ N as binary
37
100
  };
@@ -1 +1 @@
1
- "use strict";const y=require("./base-D3FrPu8C.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
+ "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 { i as g } from "./base-Cz4DfmJf.js";
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-1ouRnRJS.cjs");exports.bounds=e.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
@@ -1,4 +1,4 @@
1
- import { b as r } from "./bounds-BYz3mV9U.js";
1
+ import { b as r } from "./bounds-Dmn-hd_-.js";
2
2
  export {
3
3
  r as bounds
4
4
  };
@@ -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-CHDDKvN3.cjs");exports.box=e.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
@@ -1,4 +1,4 @@
1
- import { b as r } from "./box-Q7p9JFnX.js";
1
+ import { b as r } from "./box-C92jYSNY.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-xjptNL6Z.cjs");exports.caseconv=e.caseconv;
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
@@ -1,4 +1,4 @@
1
- import { a as c } from "./index-POWYBOZm.js";
1
+ import { b as c } from "./index-BwkQTA-j.js";
2
2
  export {
3
3
  c as caseconv
4
4
  };
package/dist/compare.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CnZb0cyW.cjs");exports.compare=e.compare;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CuG8fceO.cjs");exports.compare=e.compare;
package/dist/compare.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as a } from "./index-Bcm6lEr8.js";
1
+ import { c as a } from "./index-Bt5ivtN9.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-By98WcWm.cjs"),j=t=>JSON.parse(JSON.stringify(t)),h=(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(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:j,deleteD:h,difference:d,element:y.element,equal:p,get:y.get,has:y.has,join:y.join,override:a,overrideValidItems:A,partialEqual:g,pathsMatch:y.pathsMatch,set:y.set,transformPath:y.transformPath},Symbol.toStringTag,{value:"Module"}));exports.deep=O;
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;