@synnaxlabs/x 0.48.0 → 0.49.2

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 (247) hide show
  1. package/.turbo/turbo-build.log +6 -104
  2. package/dist/src/csv/csv.d.ts +5 -7
  3. package/dist/src/csv/csv.d.ts.map +1 -1
  4. package/dist/src/deep/join.d.ts.map +1 -0
  5. package/dist/src/deep/path.d.ts +1 -1
  6. package/dist/src/deep/path.d.ts.map +1 -1
  7. package/dist/src/destructor/destructor.d.ts +7 -0
  8. package/dist/src/destructor/destructor.d.ts.map +1 -0
  9. package/dist/src/destructor/index.d.ts +2 -0
  10. package/dist/src/destructor/index.d.ts.map +1 -0
  11. package/dist/src/index.d.ts +5 -10
  12. package/dist/src/index.d.ts.map +1 -1
  13. package/dist/src/math/constants.d.ts +1 -0
  14. package/dist/src/math/constants.d.ts.map +1 -1
  15. package/dist/src/migrate/migrate.d.ts +3 -3
  16. package/dist/src/migrate/migrate.d.ts.map +1 -1
  17. package/dist/src/narrow/index.d.ts +2 -0
  18. package/dist/src/narrow/index.d.ts.map +1 -0
  19. package/dist/src/narrow/narrow.d.ts +4 -0
  20. package/dist/src/narrow/narrow.d.ts.map +1 -0
  21. package/dist/src/narrow/narrow.spec.d.ts +2 -0
  22. package/dist/src/narrow/narrow.spec.d.ts.map +1 -0
  23. package/dist/src/numeric/numeric.d.ts +0 -1
  24. package/dist/src/numeric/numeric.d.ts.map +1 -1
  25. package/dist/src/observe/observe.d.ts +4 -4
  26. package/dist/src/observe/observe.d.ts.map +1 -1
  27. package/dist/src/optional/index.d.ts +2 -0
  28. package/dist/src/optional/index.d.ts.map +1 -0
  29. package/dist/src/optional/optional.d.ts.map +1 -0
  30. package/dist/src/scheduler/index.d.ts +2 -0
  31. package/dist/src/scheduler/index.d.ts.map +1 -0
  32. package/dist/src/{flush.d.ts → scheduler/scheduler.d.ts} +1 -1
  33. package/dist/src/scheduler/scheduler.d.ts.map +1 -0
  34. package/dist/src/scheduler/scheduler.spec.d.ts +2 -0
  35. package/dist/src/scheduler/scheduler.spec.d.ts.map +1 -0
  36. package/dist/src/shallow/copy.d.ts +2 -0
  37. package/dist/src/shallow/copy.d.ts.map +1 -0
  38. package/dist/src/shallow/copy.spec.d.ts +2 -0
  39. package/dist/src/shallow/copy.spec.d.ts.map +1 -0
  40. package/dist/src/shallow/index.d.ts +2 -0
  41. package/dist/src/shallow/index.d.ts.map +1 -0
  42. package/dist/src/spatial/base.d.ts +5 -38
  43. package/dist/src/spatial/base.d.ts.map +1 -1
  44. package/dist/src/spatial/direction/direction.d.ts +2 -1
  45. package/dist/src/spatial/direction/direction.d.ts.map +1 -1
  46. package/dist/src/spatial/external.d.ts +2 -1
  47. package/dist/src/spatial/external.d.ts.map +1 -1
  48. package/dist/src/spatial/location/location.d.ts +2 -2
  49. package/dist/src/spatial/location/location.d.ts.map +1 -1
  50. package/dist/src/spatial/sticky/index.d.ts +2 -0
  51. package/dist/src/spatial/sticky/index.d.ts.map +1 -0
  52. package/dist/src/spatial/sticky/sticky.d.ts +74 -0
  53. package/dist/src/spatial/sticky/sticky.d.ts.map +1 -0
  54. package/dist/src/spatial/sticky/sticky.spec.d.ts +2 -0
  55. package/dist/src/spatial/sticky/sticky.spec.d.ts.map +1 -0
  56. package/dist/src/spatial/xy/xy.d.ts +10 -2
  57. package/dist/src/spatial/xy/xy.d.ts.map +1 -1
  58. package/dist/src/status/status.d.ts +2 -2
  59. package/dist/src/status/status.d.ts.map +1 -1
  60. package/dist/src/telem/series.d.ts +4 -4
  61. package/dist/src/telem/series.d.ts.map +1 -1
  62. package/dist/src/telem/telem.d.ts +0 -1
  63. package/dist/src/telem/telem.d.ts.map +1 -1
  64. package/dist/src/types/index.d.ts +2 -0
  65. package/dist/src/types/index.d.ts.map +1 -0
  66. package/dist/src/zod/external.d.ts +1 -0
  67. package/dist/src/zod/external.d.ts.map +1 -1
  68. package/dist/src/zod/schemas.d.ts +3 -0
  69. package/dist/src/zod/schemas.d.ts.map +1 -0
  70. package/dist/src/zod/schemas.spec.d.ts +2 -0
  71. package/dist/src/zod/schemas.spec.d.ts.map +1 -0
  72. package/dist/x.cjs +12 -0
  73. package/dist/x.js +5537 -0
  74. package/package.json +4 -142
  75. package/src/binary/codec.ts +2 -2
  76. package/src/csv/csv.spec.ts +59 -11
  77. package/src/csv/csv.ts +27 -11
  78. package/src/deep/merge.ts +3 -3
  79. package/src/deep/path.ts +1 -1
  80. package/src/{destructor.ts → destructor/destructor.ts} +1 -1
  81. package/src/{invert.ts → destructor/index.ts} +1 -1
  82. package/src/index.ts +5 -10
  83. package/src/math/constants.ts +1 -0
  84. package/src/migrate/migrate.ts +5 -3
  85. package/src/{mock → narrow}/index.ts +1 -1
  86. package/src/narrow/narrow.spec.ts +70 -0
  87. package/src/{identity.ts → narrow/narrow.ts} +6 -0
  88. package/src/numeric/numeric.ts +0 -5
  89. package/src/observe/observe.ts +4 -4
  90. package/src/{replace.ts → optional/index.ts} +1 -1
  91. package/src/scheduler/index.ts +10 -0
  92. package/src/scheduler/scheduler.spec.ts +82 -0
  93. package/src/shallow/copy.spec.ts +141 -0
  94. package/src/{shallowCopy.ts → shallow/copy.ts} +1 -1
  95. package/src/shallow/index.ts +10 -0
  96. package/src/spatial/base.ts +6 -15
  97. package/src/spatial/direction/direction.ts +2 -0
  98. package/src/spatial/external.ts +2 -1
  99. package/src/spatial/location/location.spec.ts +16 -0
  100. package/src/spatial/location/location.ts +7 -7
  101. package/src/spatial/sticky/index.ts +10 -0
  102. package/src/spatial/sticky/sticky.spec.ts +584 -0
  103. package/src/spatial/sticky/sticky.ts +98 -0
  104. package/src/spatial/xy/xy.spec.ts +55 -0
  105. package/src/spatial/xy/xy.ts +27 -2
  106. package/src/status/status.ts +5 -5
  107. package/src/telem/series.ts +5 -6
  108. package/src/telem/telem.spec.ts +0 -28
  109. package/src/telem/telem.ts +1 -9
  110. package/src/{clamp → types}/index.ts +1 -1
  111. package/src/zod/external.ts +1 -0
  112. package/src/zod/schemas.spec.ts +51 -0
  113. package/src/zod/schemas.ts +14 -0
  114. package/tsconfig.tsbuildinfo +1 -1
  115. package/vite.config.ts +1 -36
  116. package/dist/array.cjs +0 -1
  117. package/dist/array.js +0 -4
  118. package/dist/base-DRybODwJ.js +0 -42
  119. package/dist/base-KIBsp6TI.cjs +0 -1
  120. package/dist/binary.cjs +0 -1
  121. package/dist/binary.js +0 -4
  122. package/dist/bounds-4BWKPqaP.js +0 -183
  123. package/dist/bounds-C2TKFgVk.cjs +0 -1
  124. package/dist/bounds.cjs +0 -1
  125. package/dist/bounds.js +0 -4
  126. package/dist/box-BXWXSkKu.js +0 -203
  127. package/dist/box-rH3ggwXk.cjs +0 -1
  128. package/dist/box.cjs +0 -1
  129. package/dist/box.js +0 -4
  130. package/dist/caseconv.cjs +0 -1
  131. package/dist/caseconv.js +0 -4
  132. package/dist/change-C-YELKx6.cjs +0 -1
  133. package/dist/change-DLl6DccR.js +0 -12
  134. package/dist/change.cjs +0 -1
  135. package/dist/change.js +0 -4
  136. package/dist/compare-Bnx9CdjS.js +0 -119
  137. package/dist/compare-GPoFaKRW.cjs +0 -1
  138. package/dist/compare.cjs +0 -1
  139. package/dist/compare.js +0 -36
  140. package/dist/debounce.cjs +0 -1
  141. package/dist/debounce.js +0 -17
  142. package/dist/deep.cjs +0 -1
  143. package/dist/deep.js +0 -247
  144. package/dist/destructor.cjs +0 -1
  145. package/dist/destructor.js +0 -1
  146. package/dist/dimensions-Cg5Owbwn.cjs +0 -1
  147. package/dist/dimensions-DC0uLPwn.js +0 -43
  148. package/dist/dimensions.cjs +0 -1
  149. package/dist/dimensions.js +0 -4
  150. package/dist/direction-C_b4tfRN.js +0 -19
  151. package/dist/direction-DqQB9M37.cjs +0 -1
  152. package/dist/direction.cjs +0 -1
  153. package/dist/direction.js +0 -4
  154. package/dist/external-2YWy569j.js +0 -23
  155. package/dist/external-B6edOwoQ.cjs +0 -1
  156. package/dist/external-B80i4ymZ.js +0 -29
  157. package/dist/external-B9AAGv50.cjs +0 -1
  158. package/dist/external-BYuXBYJh.js +0 -40
  159. package/dist/external-BxmTQZ6m.cjs +0 -1
  160. package/dist/external-DLiGrXn7.cjs +0 -1
  161. package/dist/external-Du5qzfYv.js +0 -35
  162. package/dist/get-CtJEJIC_.js +0 -82
  163. package/dist/get-D2VRwUw4.cjs +0 -1
  164. package/dist/identity.cjs +0 -1
  165. package/dist/identity.js +0 -4
  166. package/dist/index-Bfvg0v-N.cjs +0 -3
  167. package/dist/index-Bv029kh3.js +0 -19
  168. package/dist/index-CqisIWWC.cjs +0 -1
  169. package/dist/index-CyNZHQFw.cjs +0 -1
  170. package/dist/index-qmkoZBNO.js +0 -57
  171. package/dist/index-yz34Wc2p.js +0 -92
  172. package/dist/index.cjs +0 -5
  173. package/dist/index.js +0 -1004
  174. package/dist/kv.cjs +0 -1
  175. package/dist/kv.js +0 -4
  176. package/dist/link.cjs +0 -1
  177. package/dist/link.js +0 -10
  178. package/dist/location-0qDBiCqP.cjs +0 -1
  179. package/dist/location-BIzpxczO.js +0 -95
  180. package/dist/location.cjs +0 -1
  181. package/dist/location.js +0 -4
  182. package/dist/observe.cjs +0 -1
  183. package/dist/observe.js +0 -48
  184. package/dist/record-BwjIgrpU.cjs +0 -1
  185. package/dist/record-tSFQKmdG.js +0 -19
  186. package/dist/record.cjs +0 -1
  187. package/dist/record.js +0 -4
  188. package/dist/runtime.cjs +0 -1
  189. package/dist/runtime.js +0 -4
  190. package/dist/scale-BXy1w8R_.cjs +0 -1
  191. package/dist/scale-DJCMZbfU.js +0 -228
  192. package/dist/scale.cjs +0 -1
  193. package/dist/scale.js +0 -4
  194. package/dist/series-B7l2au4y.cjs +0 -6
  195. package/dist/series-TpAaBlEg.js +0 -2837
  196. package/dist/spatial-DnsaOypA.js +0 -11
  197. package/dist/spatial-DrxzaD5U.cjs +0 -1
  198. package/dist/spatial.cjs +0 -1
  199. package/dist/spatial.js +0 -18
  200. package/dist/src/clamp/index.d.ts +0 -2
  201. package/dist/src/clamp/index.d.ts.map +0 -1
  202. package/dist/src/destructor.d.ts +0 -7
  203. package/dist/src/destructor.d.ts.map +0 -1
  204. package/dist/src/flush.d.ts.map +0 -1
  205. package/dist/src/identity.d.ts +0 -3
  206. package/dist/src/identity.d.ts.map +0 -1
  207. package/dist/src/invert.d.ts +0 -2
  208. package/dist/src/invert.d.ts.map +0 -1
  209. package/dist/src/join.d.ts.map +0 -1
  210. package/dist/src/mock/index.d.ts +0 -2
  211. package/dist/src/mock/index.d.ts.map +0 -1
  212. package/dist/src/optional.d.ts.map +0 -1
  213. package/dist/src/renderable.d.ts +0 -5
  214. package/dist/src/renderable.d.ts.map +0 -1
  215. package/dist/src/replace.d.ts +0 -2
  216. package/dist/src/replace.d.ts.map +0 -1
  217. package/dist/src/shallowCopy.d.ts +0 -2
  218. package/dist/src/shallowCopy.d.ts.map +0 -1
  219. package/dist/src/telem/generate.d.ts +0 -3
  220. package/dist/src/telem/generate.d.ts.map +0 -1
  221. package/dist/src/transform.d.ts +0 -6
  222. package/dist/src/transform.d.ts.map +0 -1
  223. package/dist/src/undefined.d.ts +0 -2
  224. package/dist/src/undefined.d.ts.map +0 -1
  225. package/dist/telem.cjs +0 -1
  226. package/dist/telem.js +0 -18
  227. package/dist/unique.cjs +0 -1
  228. package/dist/unique.js +0 -4
  229. package/dist/url.cjs +0 -1
  230. package/dist/url.js +0 -51
  231. package/dist/worker.cjs +0 -1
  232. package/dist/worker.js +0 -43
  233. package/dist/xy-C-MUIjVs.cjs +0 -1
  234. package/dist/xy-DnrCAZaw.js +0 -154
  235. package/dist/xy.cjs +0 -1
  236. package/dist/xy.js +0 -4
  237. package/dist/zod.cjs +0 -1
  238. package/dist/zod.js +0 -4
  239. package/src/renderable.ts +0 -20
  240. package/src/telem/generate.ts +0 -17
  241. package/src/transform.ts +0 -17
  242. package/src/undefined.ts +0 -14
  243. /package/dist/src/{join.d.ts → deep/join.d.ts} +0 -0
  244. /package/dist/src/{optional.d.ts → optional/optional.d.ts} +0 -0
  245. /package/src/{join.ts → deep/join.ts} +0 -0
  246. /package/src/{optional.ts → optional/optional.ts} +0 -0
  247. /package/src/{flush.ts → scheduler/scheduler.ts} +0 -0
package/vite.config.ts CHANGED
@@ -16,40 +16,5 @@ import { defineConfig } from "vite";
16
16
  export default defineConfig({
17
17
  base: "/x/",
18
18
  plugins: [lib({ name: "x" })],
19
- build: {
20
- lib: {
21
- entry: {
22
- index: path.resolve(".", "src/index.ts"),
23
- binary: path.resolve(".", "src/binary/index.ts"),
24
- compare: path.resolve(".", "src/compare/index.ts"),
25
- deep: path.resolve(".", "src/deep/index.ts"),
26
- kv: path.resolve(".", "src/kv/index.ts"),
27
- runtime: path.resolve(".", "src/runtime/index.ts"),
28
- observe: path.resolve(".", "src/observe/index.ts"),
29
- box: path.resolve(".", "src/spatial/box/index.ts"),
30
- bounds: path.resolve(".", "src/spatial/bounds/index.ts"),
31
- dimensions: path.resolve(".", "src/spatial/dimensions/index.ts"),
32
- direction: path.resolve(".", "src/spatial/direction/index.ts"),
33
- location: path.resolve(".", "src/spatial/location/index.ts"),
34
- link: path.resolve(".", "src/link/index.ts"),
35
- scale: path.resolve(".", "src/spatial/scale/index.ts"),
36
- xy: path.resolve(".", "src/spatial/xy/index.ts"),
37
- spatial: path.resolve(".", "src/spatial/index.ts"),
38
- telem: path.resolve(".", "src/telem/index.ts"),
39
- url: path.resolve(".", "src/url/index.ts"),
40
- worker: path.resolve(".", "src/worker/index.ts"),
41
- debounce: path.resolve(".", "src/debounce/index.ts"),
42
- destructor: path.resolve(".", "src/destructor.ts"),
43
- array: path.resolve(".", "src/array/index.ts"),
44
- unique: path.resolve(".", "src/unique/index.ts"),
45
- record: path.resolve(".", "src/record/index.ts"),
46
- change: path.resolve(".", "src/change/index.ts"),
47
- identity: path.resolve(".", "src/identity.ts"),
48
- caseconv: path.resolve(".", "src/caseconv/index.ts"),
49
- zod: path.resolve(".", "src/zod/index.ts"),
50
- },
51
- },
52
- rollupOptions: { external: ["zod"] },
53
- },
54
- test: { globals: true, environment: "jsdom" },
19
+ build: { rollupOptions: { external: ["zod"] } },
55
20
  });
package/dist/array.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-DLiGrXn7.cjs");exports.array=e.external;
package/dist/array.js DELETED
@@ -1,4 +0,0 @@
1
- import { e } from "./external-Du5qzfYv.js";
2
- export {
3
- e as array
4
- };
@@ -1,42 +0,0 @@
1
- import { z as n } from "zod";
2
- const t = n.tuple([n.number(), n.number()]);
3
- n.tuple([n.bigint(), n.bigint()]);
4
- const p = n.object({ width: n.number(), height: n.number() }), N = n.object({
5
- signedWidth: n.number(),
6
- signedHeight: n.number()
7
- }), c = ["width", "height"];
8
- n.enum(c);
9
- const u = ["start", "center", "end"], r = ["signedWidth", "signedHeight"];
10
- n.enum(r);
11
- const S = n.object({ x: n.number(), y: n.number() }), I = 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], i = n.enum(g), D = n.enum(u), d = ["first", "last"], f = n.enum(d), O = n.object({ lower: n.number(), upper: n.number() }), l = n.object({ lower: n.bigint(), upper: n.bigint() });
12
- n.union([O, t]);
13
- n.union([l, t]);
14
- const j = n.enum([...o.options, ...i.options]);
15
- n.enum(["x", "left", "right"]);
16
- n.enum(["y", "top", "bottom"]);
17
- const x = n.union([o, i, n.instanceof(String)]);
18
- export {
19
- u as A,
20
- s as C,
21
- a as D,
22
- d as O,
23
- m as X,
24
- b as Y,
25
- D as a,
26
- o as b,
27
- j as c,
28
- p as d,
29
- C as e,
30
- T as f,
31
- x as g,
32
- e as h,
33
- L as i,
34
- I as j,
35
- O as k,
36
- i as l,
37
- t as n,
38
- f as o,
39
- N as s,
40
- S as x,
41
- E as y
42
- };
@@ -1 +0,0 @@
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 O=n.z.object({width:n.z.number(),height:n.z.number()}),d=n.z.object({signedWidth:n.z.number(),signedHeight:n.z.number()}),N=["width","height"];n.z.enum(N);const s=["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()}),u=["x","y"],o=n.z.enum(u),e=["top","right","bottom","left"],I=n.z.enum(e),r=["left","right"],l=n.z.enum(r),z=["top","bottom"],a=n.z.enum(z),i=["center"],T=n.z.enum(i),C=[...e,...i],c=n.z.enum(C),E=n.z.enum(s),m=["first","last"],h=n.z.enum(m),b=n.z.object({lower:n.z.number(),upper:n.z.number()}),p=n.z.object({lower:n.z.bigint(),upper:n.z.bigint()});n.z.union([b,t]);n.z.union([p,t]);const A=n.z.enum([...o.options,...c.options]);n.z.enum(["x","left","right"]);n.z.enum(["y","top","bottom"]);const D=n.z.union([o,c,n.z.instanceof(String)]);exports.ALIGNMENTS=s;exports.CENTER_LOCATIONS=i;exports.DIRECTIONS=u;exports.ORDERS=m;exports.OUTER_LOCATIONS=e;exports.X_LOCATIONS=r;exports.Y_LOCATIONS=z;exports.alignment=E;exports.bounds=b;exports.centerLocation=T;exports.clientXY=S;exports.crudeDirection=A;exports.crudeLocation=D;exports.dimensions=O;exports.direction=o;exports.location=c;exports.numberCouple=t;exports.order=h;exports.outerLocation=I;exports.signedDimensions=d;exports.xLocation=l;exports.xy=L;exports.yLocation=a;
package/dist/binary.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Bfvg0v-N.cjs");exports.binary=e.codec;
package/dist/binary.js DELETED
@@ -1,4 +0,0 @@
1
- import { c as o } from "./index-yz34Wc2p.js";
2
- export {
3
- o as binary
4
- };
@@ -1,183 +0,0 @@
1
- import { k as x } from "./base-DRybODwJ.js";
2
- const a = (r) => (e, n) => {
3
- if (typeof e == "bigint") {
4
- if (g(n))
5
- return r(e, BigInt(n));
6
- const t = r(Number(e), Number(n));
7
- return typeof t == "number" ? BigInt(Math.round(t)) : t;
8
- }
9
- return r(Number(e), Number(n));
10
- }, w = a((r, e) => r - e), v = a((r, e) => r + e), q = (r, e, n = 1e-4) => Math.abs(r - e) < n, y = (r, e) => {
11
- const n = typeof r == "bigint", t = typeof e == "bigint";
12
- return n && t ? r === e : n && g(e) ? r === BigInt(e) : t && g(r) ? e === BigInt(r) : r === e;
13
- }, R = (r) => {
14
- const e = 10 ** Math.floor(Math.log10(r));
15
- return Math.round(r / e) * e;
16
- }, B = a((r, e) => r <= e ? r : e), g = (r) => typeof r == "bigint" ? !0 : Number.isInteger(r), U = a((r, e) => r >= e ? r : e), _ = (r) => typeof r == "bigint" ? r < 0n ? -r : r : r < 0 ? -r : r, W = a((r, e) => r * e), G = a((r, e) => r / e), s = (r, e, n) => {
17
- const t = {};
18
- if (typeof e == "object" && (n = e, e = void 0), n = { makeValid: !0, ...n }, typeof r == "number" || typeof r == "bigint")
19
- e != null ? (t.lower = r, t.upper = e) : (t.lower = typeof r == "bigint" ? 0n : 0, t.upper = r);
20
- else if (Array.isArray(r)) {
21
- if (r.length !== 2) throw new Error("bounds: expected array of length 2");
22
- [t.lower, t.upper] = r;
23
- } else
24
- t.lower = r.lower, t.upper = r.upper;
25
- return n?.makeValid ? h(t) : t;
26
- }, N = Object.freeze({ lower: 0, upper: 0 }), M = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), A = Object.freeze({ lower: 0, upper: 1 }), O = Object.freeze({ lower: -1, upper: 1 }), j = (r, e) => {
27
- if (r == null && e == null) return !0;
28
- if (r == null || e == null) return !1;
29
- const n = s(r), t = s(e);
30
- return n?.lower === t?.lower && n?.upper === t?.upper;
31
- }, h = (r) => r.lower > r.upper ? { lower: r.upper, upper: r.lower } : r, P = (r, e) => {
32
- const n = s(r);
33
- return e < n.lower ? n.lower : e >= n.upper ? n.upper - (typeof n.upper == "number" ? 1 : 1n) : e;
34
- }, f = (r, e) => {
35
- const n = s(r);
36
- if (typeof e == "number" || typeof e == "bigint")
37
- return e >= n.lower && e < n.upper;
38
- const t = s(e);
39
- return t.lower >= n.lower && t.upper <= n.upper;
40
- }, k = (r, e) => {
41
- const n = s(r), t = s(e);
42
- return n.lower === t.lower ? !0 : t.upper === n.lower || t.lower === n.upper ? !1 : f(n, t.upper) || f(n, t.lower) || f(t, n.upper) || f(t, n.lower);
43
- }, d = (r) => {
44
- const e = s(r);
45
- return e.upper - e.lower;
46
- }, z = (r) => {
47
- const e = s(r);
48
- return typeof e.lower == "bigint" ? e.lower === 0n && e.upper === 0n : e.lower === 0 && e.upper === 0;
49
- }, E = (r) => {
50
- const e = d(r);
51
- return typeof e == "number" ? e === 0 : e === 0n;
52
- }, D = (r) => {
53
- const e = s(r);
54
- return typeof e.lower == "bigint" ? !0 : Number.isFinite(e.lower) && Number.isFinite(e.upper);
55
- }, F = (r) => {
56
- const e = s(r);
57
- return (e.upper + e.lower) / 2;
58
- }, L = (r) => ({
59
- lower: Math.min(...r.map((e) => s(e).lower)),
60
- upper: Math.max(...r.map((e) => s(e).upper))
61
- }), T = (r) => ({
62
- lower: Math.max(...r.map((e) => s(e).lower)),
63
- upper: Math.min(...r.map((e) => s(e).upper))
64
- }), Z = (r) => {
65
- const e = s(r), n = typeof e.lower == "bigint";
66
- return Array.from({ length: Number(d(r)) }, (t, o) => n ? e.lower + BigInt(o) : e.lower + o);
67
- }, I = (r, e) => {
68
- const n = r.map((u) => s(u)), t = n.findIndex((u) => f(u, e) || e < u.lower);
69
- if (t === -1) return { index: r.length, position: 0 };
70
- const o = n[t];
71
- return f(o, e) ? { index: t, position: Number(e - o.lower) } : { index: t, position: 0 };
72
- }, b = {
73
- removeBefore: 0,
74
- removeAfter: 0,
75
- insertInto: 0,
76
- deleteInBetween: 0
77
- }, C = (r, e) => {
78
- const n = r.map((l) => s(l)), t = s(e);
79
- if (n.length === 0) return b;
80
- const o = I(n, t.lower), u = I(n, t.upper);
81
- if (o.index === r.length) return { ...b, insertInto: r.length };
82
- if (u.index === 0) return { ...b, removeAfter: u.position };
83
- if (o.index === u.index)
84
- return o.position !== 0 && u.position !== 0 ? null : {
85
- removeAfter: u.position,
86
- removeBefore: o.position,
87
- insertInto: o.index,
88
- deleteInBetween: 0
89
- };
90
- let i = u.index - o.index, c = o.index, p = w(Number(d(n[o.index])), o.position);
91
- return o.position !== 0 ? (i -= 1, c += 1) : p = 0, {
92
- removeBefore: p,
93
- removeAfter: u.position,
94
- insertInto: c,
95
- deleteInBetween: i
96
- };
97
- }, S = (r, e, n) => {
98
- const t = r.map((c) => s(c)), o = n > 0 ? 1 : n < 0 ? -1 : 0;
99
- if (o === 0) return e;
100
- let u = n, i = e;
101
- for (; y(u, 0) === !1; ) {
102
- const c = t.findIndex((p) => o > 0 ? i >= p.lower && i < p.upper : i > p.lower && i <= p.upper);
103
- if (c !== -1) {
104
- const p = t[c];
105
- let l;
106
- if (o > 0 ? l = w(p.upper, i) : l = w(i, p.lower), l > 0) {
107
- const m = B(_(u), l);
108
- if (i = v(i, o > 0 ? m : -m), u = w(u, o > 0 ? m : -m), y(u, 0)) return i;
109
- continue;
110
- }
111
- }
112
- if (o > 0) {
113
- const p = t.filter((l) => l.lower > i);
114
- if (p.length > 0) i = p[0].lower;
115
- else return i;
116
- } else {
117
- const p = t.filter((l) => l.upper < i);
118
- if (p.length > 0)
119
- i = p[p.length - 1].upper;
120
- else return i;
121
- }
122
- }
123
- return i;
124
- }, V = (r, e, n) => {
125
- const t = r.map((i) => s(i));
126
- if (e === n) return typeof e == "bigint" ? 0n : 0;
127
- const o = e < n ? s([e, n]) : s([n, e]);
128
- let u = typeof e == "bigint" ? 0n : 0;
129
- for (const i of t) {
130
- const c = i.lower > o.lower ? i.lower : o.lower, p = i.upper < o.upper ? i.upper : o.upper;
131
- if (c < p) {
132
- const l = p - c;
133
- u = u + l;
134
- }
135
- }
136
- return u;
137
- }, H = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
138
- __proto__: null,
139
- CLIP: O,
140
- DECIMAL: A,
141
- INFINITE: M,
142
- ZERO: N,
143
- bounds: x,
144
- buildInsertionPlan: C,
145
- clamp: P,
146
- construct: s,
147
- contains: f,
148
- distance: V,
149
- equals: j,
150
- findInsertPosition: I,
151
- isFinite: D,
152
- isZero: z,
153
- linspace: Z,
154
- makeValid: h,
155
- max: L,
156
- mean: F,
157
- min: T,
158
- overlapsWith: k,
159
- span: d,
160
- spanIsZero: E,
161
- traverse: S
162
- }, Symbol.toStringTag, { value: "Module" }));
163
- export {
164
- v as a,
165
- H as b,
166
- s as c,
167
- G as d,
168
- P as e,
169
- f,
170
- L as g,
171
- V as h,
172
- d as i,
173
- _ as j,
174
- q as k,
175
- y as l,
176
- W as m,
177
- g as n,
178
- U as o,
179
- B as p,
180
- R as r,
181
- w as s,
182
- S as t
183
- };
@@ -1 +0,0 @@
1
- "use strict";const O=require("./base-KIBsp6TI.cjs"),d=r=>(e,n)=>{if(typeof e=="bigint"){if(b(n))return r(e,BigInt(n));const t=r(Number(e),Number(n));return typeof t=="number"?BigInt(Math.round(t)):t}return r(Number(e),Number(n))},m=d((r,e)=>r-e),h=d((r,e)=>r+e),j=(r,e,n=1e-4)=>Math.abs(r-e)<n,I=(r,e)=>{const n=typeof r=="bigint",t=typeof e=="bigint";return n&&t?r===e:n&&b(e)?r===BigInt(e):t&&b(r)?e===BigInt(r):r===e},P=r=>{const e=10**Math.floor(Math.log10(r));return Math.round(r/e)*e},x=d((r,e)=>r<=e?r:e),b=r=>typeof r=="bigint"?!0:Number.isInteger(r),T=d((r,e)=>r>=e?r:e),v=r=>typeof r=="bigint"?r<0n?-r:r:r<0?-r:r,z=d((r,e)=>r*e),E=d((r,e)=>r/e),u=(r,e,n)=>{const t={};if(typeof e=="object"&&(n=e,e=void 0),n={makeValid:!0,...n},typeof r=="number"||typeof r=="bigint")e!=null?(t.lower=r,t.upper=e):(t.lower=typeof r=="bigint"?0n:0,t.upper=r);else if(Array.isArray(r)){if(r.length!==2)throw new Error("bounds: expected array of length 2");[t.lower,t.upper]=r}else t.lower=r.lower,t.upper=r.upper;return n?.makeValid?B(t):t},q=Object.freeze({lower:0,upper:0}),D=Object.freeze({lower:-1/0,upper:1/0}),F=Object.freeze({lower:0,upper:1}),L=Object.freeze({lower:-1,upper:1}),Z=(r,e)=>{if(r==null&&e==null)return!0;if(r==null||e==null)return!1;const n=u(r),t=u(e);return n?.lower===t?.lower&&n?.upper===t?.upper},B=r=>r.lower>r.upper?{lower:r.upper,upper:r.lower}:r,_=(r,e)=>{const n=u(r);return e<n.lower?n.lower:e>=n.upper?n.upper-(typeof n.upper=="number"?1:1n):e},f=(r,e)=>{const n=u(r);if(typeof e=="number"||typeof e=="bigint")return e>=n.lower&&e<n.upper;const t=u(e);return t.lower>=n.lower&&t.upper<=n.upper},k=(r,e)=>{const n=u(r),t=u(e);return n.lower===t.lower?!0:t.upper===n.lower||t.lower===n.upper?!1:f(n,t.upper)||f(n,t.lower)||f(t,n.upper)||f(t,n.lower)},w=r=>{const e=u(r);return e.upper-e.lower},C=r=>{const e=u(r);return typeof e.lower=="bigint"?e.lower===0n&&e.upper===0n:e.lower===0&&e.upper===0},S=r=>{const e=w(r);return typeof e=="number"?e===0:e===0n},V=r=>{const e=u(r);return typeof e.lower=="bigint"?!0:Number.isFinite(e.lower)&&Number.isFinite(e.upper)},$=r=>{const e=u(r);return(e.upper+e.lower)/2},N=r=>({lower:Math.min(...r.map(e=>u(e).lower)),upper:Math.max(...r.map(e=>u(e).upper))}),R=r=>({lower:Math.max(...r.map(e=>u(e).lower)),upper:Math.min(...r.map(e=>u(e).upper))}),U=r=>{const e=u(r),n=typeof e.lower=="bigint";return Array.from({length:Number(w(r))},(t,o)=>n?e.lower+BigInt(o):e.lower+o)},y=(r,e)=>{const n=r.map(s=>u(s)),t=n.findIndex(s=>f(s,e)||e<s.lower);if(t===-1)return{index:r.length,position:0};const o=n[t];return f(o,e)?{index:t,position:Number(e-o.lower)}:{index:t,position:0}},g={removeBefore:0,removeAfter:0,insertInto:0,deleteInBetween:0},W=(r,e)=>{const n=r.map(l=>u(l)),t=u(e);if(n.length===0)return g;const o=y(n,t.lower),s=y(n,t.upper);if(o.index===r.length)return{...g,insertInto:r.length};if(s.index===0)return{...g,removeAfter:s.position};if(o.index===s.index)return o.position!==0&&s.position!==0?null:{removeAfter:s.position,removeBefore:o.position,insertInto:o.index,deleteInBetween:0};let i=s.index-o.index,c=o.index,p=m(Number(w(n[o.index])),o.position);return o.position!==0?(i-=1,c+=1):p=0,{removeBefore:p,removeAfter:s.position,insertInto:c,deleteInBetween:i}},M=(r,e,n)=>{const t=r.map(c=>u(c)),o=n>0?1:n<0?-1:0;if(o===0)return e;let s=n,i=e;for(;I(s,0)===!1;){const c=t.findIndex(p=>o>0?i>=p.lower&&i<p.upper:i>p.lower&&i<=p.upper);if(c!==-1){const p=t[c];let l;if(o>0?l=m(p.upper,i):l=m(i,p.lower),l>0){const a=x(v(s),l);if(i=h(i,o>0?a:-a),s=m(s,o>0?a:-a),I(s,0))return i;continue}}if(o>0){const p=t.filter(l=>l.lower>i);if(p.length>0)i=p[0].lower;else return i}else{const p=t.filter(l=>l.upper<i);if(p.length>0)i=p[p.length-1].upper;else return i}}return i},A=(r,e,n)=>{const t=r.map(i=>u(i));if(e===n)return typeof e=="bigint"?0n:0;const o=e<n?u([e,n]):u([n,e]);let s=typeof e=="bigint"?0n:0;for(const i of t){const c=i.lower>o.lower?i.lower:o.lower,p=i.upper<o.upper?i.upper:o.upper;if(c<p){const l=p-c;s=s+l}}return s},G=Object.freeze(Object.defineProperty({__proto__:null,CLIP:L,DECIMAL:F,INFINITE:D,ZERO:q,bounds:O.bounds,buildInsertionPlan:W,clamp:_,construct:u,contains:f,distance:A,equals:Z,findInsertPosition:y,isFinite:V,isZero:C,linspace:U,makeValid:B,max:N,mean:$,min:R,overlapsWith:k,span:w,spanIsZero:S,traverse:M},Symbol.toStringTag,{value:"Module"}));exports.abs=v;exports.add=h;exports.bounds=G;exports.clamp=_;exports.closeTo=j;exports.construct=u;exports.contains=f;exports.distance=A;exports.div=E;exports.equal=I;exports.isInteger=b;exports.max=N;exports.max$1=T;exports.min=x;exports.mult=z;exports.roundToNearestMagnitude=P;exports.span=w;exports.sub=m;exports.traverse=M;
package/dist/bounds.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bounds-C2TKFgVk.cjs");exports.bounds=e.bounds;
package/dist/bounds.js DELETED
@@ -1,4 +0,0 @@
1
- import { b as r } from "./bounds-4BWKPqaP.js";
2
- export {
3
- r as bounds
4
- };
@@ -1,203 +0,0 @@
1
- import { z as x } from "zod";
2
- import { c as O } from "./direction-C_b4tfRN.js";
3
- import { c as S, T as C, B as j, x as Z, a as q, b as F, d as G, e as D, f as X, C as Y, g as U } from "./location-BIzpxczO.js";
4
- import { Z as g, O as k, e as I, t as T, c as J, a as L, r as $ } from "./xy-DnrCAZaw.js";
5
- import { x as N, X as H, Y as K } from "./base-DRybODwJ.js";
6
- const _ = x.union([x.number(), x.string()]), Q = x.object({
7
- top: _,
8
- left: _,
9
- width: _,
10
- height: _
11
- }), V = x.object({
12
- left: x.number(),
13
- top: x.number(),
14
- right: x.number(),
15
- bottom: x.number()
16
- }), tt = x.object({
17
- one: N,
18
- two: N,
19
- root: S
20
- }), P = { one: g, two: g, root: C }, ot = { one: g, two: k, root: j }, v = (t, o) => ({
21
- one: t.one,
22
- two: t.two,
23
- root: o ?? t.root
24
- }), c = (t, o, e = 0, n = 0, s) => {
25
- const r = {
26
- one: { ...g },
27
- two: { ...g },
28
- root: s ?? C
29
- };
30
- if (typeof t == "number") {
31
- if (typeof o != "number")
32
- throw new Error("Box constructor called with invalid arguments");
33
- return r.one = { x: t, y: o }, r.two = { x: r.one.x + e, y: r.one.y + n }, r;
34
- }
35
- 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 = {
36
- x: r.one.x + o.width,
37
- y: r.one.y + o.height
38
- } : "signedWidth" in o ? r.two = {
39
- x: r.one.x + o.signedWidth,
40
- y: r.one.y + o.signedHeight
41
- } : r.two = o, r));
42
- }, nt = (t, o, e) => {
43
- const n = c(t);
44
- if (typeof o == "string") {
45
- if (e == null) throw new Error("Invalid arguments for resize");
46
- const s = O(o);
47
- return c(
48
- n.one,
49
- void 0,
50
- s === "x" ? e : d(n),
51
- s === "y" ? e : f(n),
52
- n.root
53
- );
54
- }
55
- return c(n.one, o, void 0, void 0, n.root);
56
- }, et = (t, o, e = !0) => {
57
- const n = c(t);
58
- let s = (r, i) => r < i;
59
- return e && (s = (r, i) => r <= i), "one" in o ? s(u(n), u(o)) && s(w(o), w(n)) && s(a(n), a(o)) && s(l(o), l(n)) : s(u(n), o.x) && s(o.x, w(n)) && s(a(n), o.y) && s(o.y, l(n));
60
- }, rt = (t, o) => I(t.one, o.one) && I(t.two, o.two) && Z(t.root, o.root), W = (t) => ({
61
- width: d(t),
62
- height: f(t)
63
- }), st = (t) => ({
64
- signedWidth: h(t),
65
- signedHeight: b(t)
66
- }), ct = (t) => ({
67
- top: a(t),
68
- left: u(t),
69
- width: d(t),
70
- height: f(t)
71
- }), M = (t, o, e = !1) => {
72
- const n = O(o) === "y" ? b(t) : h(t);
73
- return e ? n : Math.abs(n);
74
- }, y = (t, o) => {
75
- const e = c(t);
76
- return {
77
- x: o.x === "center" ? E(e).x : m(e, o.x),
78
- y: o.y === "center" ? E(e).y : m(e, o.y)
79
- };
80
- }, m = (t, o) => {
81
- const e = c(t), n = q(e.root).includes(o) ? Math.min : Math.max;
82
- return H.includes(o) ? n(e.one.x, e.two.x) : n(e.one.y, e.two.y);
83
- }, it = (t) => A(t) === 0, d = (t) => M(t, "x"), f = (t) => M(t, "y"), h = (t) => {
84
- const o = c(t);
85
- return o.two.x - o.one.x;
86
- }, b = (t) => {
87
- const o = c(t);
88
- return o.two.y - o.one.y;
89
- }, z = (t) => y(t, C), xt = (t) => y(t, F), yt = (t) => y(t, G), ut = (t) => y(t, j), at = (t) => y(t, D), dt = (t) => y(t, X), ft = (t) => y(t, Y), wt = (t) => y(t, U), w = (t) => m(t, "right"), l = (t) => m(t, "bottom"), u = (t) => m(t, "left"), a = (t) => m(t, "top"), E = (t) => T(z(t), {
90
- x: h(t) / 2,
91
- y: b(t) / 2
92
- }), B = (t) => {
93
- const o = c(t);
94
- return o.root.x === "left" ? u(o) : w(o);
95
- }, R = (t) => {
96
- const o = c(t);
97
- return o.root.y === "top" ? a(o) : l(o);
98
- }, lt = (t) => ({ x: B(t), y: R(t) }), mt = (t) => {
99
- const o = c(t);
100
- return { lower: o.one.x, upper: o.two.x };
101
- }, pt = (t) => {
102
- const o = c(t);
103
- return { lower: o.one.y, upper: o.two.y };
104
- }, gt = (t, o) => v(t, o), _t = (t, o) => {
105
- const e = c(t), n = H.includes(o) ? "x" : K.includes(o) ? "y" : null;
106
- if (n === null) throw new Error(`Invalid location: ${o}`);
107
- const s = o === "top" || o === "left" ? Math.min : Math.max, r = { ...e.one }, i = { ...e.two };
108
- return r[n] = s(e.one[n], e.two[n]), i[n] = s(e.one[n], e.two[n]), [r, i];
109
- }, ht = (t, o) => {
110
- const e = c(t), n = c(o), s = B(n) + (d(n) - d(e)) / 2, r = R(n) + (f(n) - f(e)) / 2;
111
- return c({ x: s, y: r }, W(e));
112
- }, bt = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, Tt = (t) => d(t) / f(t), Et = (t, o, e) => {
113
- if (typeof o == "string") {
114
- if (e == null) throw new Error("Undefined amount passed into box.translate");
115
- const s = O(o);
116
- o = J(s, e);
117
- }
118
- const n = c(t);
119
- return c(
120
- T(n.one, o),
121
- T(n.two, o),
122
- void 0,
123
- void 0,
124
- n.root
125
- );
126
- }, Ot = (t, o) => {
127
- const e = Math.max(u(t), u(o)), n = Math.max(a(t), a(o)), s = Math.min(w(t), w(o)), r = Math.min(l(t), l(o));
128
- return e > s || n > r ? P : c({ x: e, y: n }, { x: s, y: r }, void 0, void 0, t.root);
129
- }, A = (t) => d(t) * f(t), Ct = (t, o) => {
130
- const e = c(t);
131
- return c(
132
- L(e.one, o),
133
- L(e.two, o),
134
- void 0,
135
- void 0,
136
- e.root
137
- );
138
- }, Mt = (t, o, e, n, s, r) => {
139
- const i = { x: t, y: o }, p = { x: t + e, y: o + n };
140
- return s.x !== r.x && (s.x === "center" ? (i.x -= e / 2, p.x -= e / 2) : (i.x -= e, p.x -= e)), s.y !== r.y && (s.y === "center" ? (i.y -= n / 2, p.y -= n / 2) : (i.y -= n, p.y -= n)), c(i, p, void 0, void 0, r);
141
- }, Bt = (t) => {
142
- const o = c(t);
143
- return c($(o.one), $(o.two), void 0, void 0, o.root);
144
- }, jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
145
- __proto__: null,
146
- DECIMAL: ot,
147
- ZERO: P,
148
- area: A,
149
- areaIsZero: it,
150
- aspect: Tt,
151
- bottom: l,
152
- bottomCenter: at,
153
- bottomLeft: ut,
154
- bottomRight: dt,
155
- box: tt,
156
- center: E,
157
- centerLeft: ft,
158
- centerRight: wt,
159
- construct: c,
160
- constructWithAlternateRoot: Mt,
161
- contains: et,
162
- copy: v,
163
- css: ct,
164
- cssBox: Q,
165
- dim: M,
166
- dims: W,
167
- domRect: V,
168
- edgePoints: _t,
169
- equals: rt,
170
- height: f,
171
- intersection: Ot,
172
- isBox: bt,
173
- left: u,
174
- loc: m,
175
- positionInCenter: ht,
176
- reRoot: gt,
177
- resize: nt,
178
- right: w,
179
- root: lt,
180
- round: Bt,
181
- signedDims: st,
182
- signedHeight: b,
183
- signedWidth: h,
184
- top: a,
185
- topCenter: xt,
186
- topLeft: z,
187
- topRight: yt,
188
- translate: Et,
189
- truncate: Ct,
190
- width: d,
191
- x: B,
192
- xBounds: mt,
193
- xyLoc: y,
194
- y: R,
195
- yBounds: pt
196
- }, Symbol.toStringTag, { value: "Module" }));
197
- export {
198
- jt as b,
199
- c,
200
- bt as i,
201
- mt as x,
202
- pt as y
203
- };
@@ -1 +0,0 @@
1
- "use strict";const y=require("zod"),M=require("./direction-DqQB9M37.cjs"),u=require("./location-0qDBiCqP.cjs"),i=require("./xy-C-MUIjVs.cjs"),m=require("./base-KIBsp6TI.cjs"),p=y.z.union([y.z.number(),y.z.string()]),F=y.z.object({top:p,left:p,width:p,height:p}),H=y.z.object({left:y.z.number(),top:y.z.number(),right:y.z.number(),bottom:y.z.number()}),v=y.z.object({one:m.xy,two:m.xy,root:u.corner}),C={one:i.ZERO,two:i.ZERO,root:u.TOP_LEFT},A={one:i.ZERO,two:i.ONE,root:u.BOTTOM_LEFT},L=(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))},S=(t,o,e)=>{const n=c(t);if(typeof o=="string"){if(e==null)throw new Error("Invalid arguments for resize");const s=M.construct(o);return c(n.one,void 0,s==="x"?e:f(n),s==="y"?e:_(n),n.root)}return c(n.one,o,void 0,void 0,n.root)},W=(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(l(n),l(o))&&s(a(o),a(n))&&s(w(n),w(o))&&s(g(o),g(n)):s(l(n),o.x)&&s(o.x,a(n))&&s(w(n),o.y)&&s(o.y,g(n))},G=(t,o)=>i.equals(t.one,o.one)&&i.equals(t.two,o.two)&&u.xyEquals(t.root,o.root),I=t=>({width:f(t),height:_(t)}),D=t=>({signedWidth:O(t),signedHeight:E(t)}),X=t=>({top:w(t),left:l(t),width:f(t),height:_(t)}),R=(t,o,e=!1)=>{const n=M.construct(o)==="y"?E(t):O(t);return e?n:Math.abs(n)},d=(t,o)=>{const e=c(t);return{x:o.x==="center"?b(e).x:T(e,o.x),y:o.y==="center"?b(e).y:T(e,o.y)}},T=(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=>j(t)===0,f=t=>R(t,"x"),_=t=>R(t,"y"),O=t=>{const o=c(t);return o.two.x-o.one.x},E=t=>{const o=c(t);return o.two.y-o.one.y},q=t=>d(t,u.TOP_LEFT),U=t=>d(t,u.TOP_CENTER),Y=t=>d(t,u.TOP_RIGHT),k=t=>d(t,u.BOTTOM_LEFT),J=t=>d(t,u.BOTTOM_CENTER),K=t=>d(t,u.BOTTOM_RIGHT),Q=t=>d(t,u.CENTER_LEFT),V=t=>d(t,u.CENTER_RIGHT),a=t=>T(t,"right"),g=t=>T(t,"bottom"),l=t=>T(t,"left"),w=t=>T(t,"top"),b=t=>i.translate(q(t),{x:O(t)/2,y:E(t)/2}),z=t=>{const o=c(t);return o.root.x==="left"?l(o):a(o)},B=t=>{const o=c(t);return o.root.y==="top"?w(o):g(o)},tt=t=>({x:z(t),y:B(t)}),N=t=>{const o=c(t);return{lower:o.one.x,upper:o.two.x}},P=t=>{const o=c(t);return{lower:o.one.y,upper:o.two.y}},ot=(t,o)=>L(t,o),nt=(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: ${o}`);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]},et=(t,o)=>{const e=c(t),n=c(o),s=z(n)+(f(n)-f(e))/2,r=B(n)+(_(n)-_(e))/2;return c({x:s,y:r},I(e))},Z=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,rt=t=>f(t)/_(t),st=(t,o,e)=>{if(typeof o=="string"){if(e==null)throw new Error("Undefined amount passed into box.translate");const s=M.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)},ct=(t,o)=>{const e=Math.max(l(t),l(o)),n=Math.max(w(t),w(o)),s=Math.min(a(t),a(o)),r=Math.min(g(t),g(o));return e>s||n>r?C:c({x:e,y:n},{x:s,y:r},void 0,void 0,t.root)},j=t=>f(t)*_(t),it=(t,o)=>{const e=c(t);return c(i.truncate(e.one,o),i.truncate(e.two,o),void 0,void 0,e.root)},ut=(t,o,e,n,s,r)=>{const x={x:t,y:o},h={x:t+e,y:o+n};return s.x!==r.x&&(s.x==="center"?(x.x-=e/2,h.x-=e/2):(x.x-=e,h.x-=e)),s.y!==r.y&&(s.y==="center"?(x.y-=n/2,h.y-=n/2):(x.y-=n,h.y-=n)),c(x,h,void 0,void 0,r)},xt=t=>{const o=c(t);return c(i.round(o.one),i.round(o.two),void 0,void 0,o.root)},yt=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:A,ZERO:C,area:j,areaIsZero:$,aspect:rt,bottom:g,bottomCenter:J,bottomLeft:k,bottomRight:K,box:v,center:b,centerLeft:Q,centerRight:V,construct:c,constructWithAlternateRoot:ut,contains:W,copy:L,css:X,cssBox:F,dim:R,dims:I,domRect:H,edgePoints:nt,equals:G,height:_,intersection:ct,isBox:Z,left:l,loc:T,positionInCenter:et,reRoot:ot,resize:S,right:a,root:tt,round:xt,signedDims:D,signedHeight:E,signedWidth:O,top:w,topCenter:U,topLeft:q,topRight:Y,translate:st,truncate:it,width:f,x:z,xBounds:N,xyLoc:d,y:B,yBounds:P},Symbol.toStringTag,{value:"Module"}));exports.box=yt;exports.construct=c;exports.isBox=Z;exports.xBounds=N;exports.yBounds=P;
package/dist/box.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./box-rH3ggwXk.cjs");exports.box=e.box;
package/dist/box.js DELETED
@@ -1,4 +0,0 @@
1
- import { b as r } from "./box-BXWXSkKu.js";
2
- export {
3
- r as box
4
- };
package/dist/caseconv.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CyNZHQFw.cjs");exports.caseconv=e.caseconv;
package/dist/caseconv.js DELETED
@@ -1,4 +0,0 @@
1
- import { a as c } from "./index-qmkoZBNO.js";
2
- export {
3
- c as caseconv
4
- };
@@ -1 +0,0 @@
1
- "use strict";const e=require("zod"),n=t=>e.z.object({variant:e.z.enum(["set","delete"]),key:e.z.string(),value:t}),o=Object.freeze(Object.defineProperty({__proto__:null,Z:n},Symbol.toStringTag,{value:"Module"}));exports.change=o;
@@ -1,12 +0,0 @@
1
- import { z as e } from "zod";
2
- const o = (t) => e.object({
3
- variant: e.enum(["set", "delete"]),
4
- key: e.string(),
5
- value: t
6
- }), n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7
- __proto__: null,
8
- Z: o
9
- }, Symbol.toStringTag, { value: "Module" }));
10
- export {
11
- n as c
12
- };
package/dist/change.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./change-C-YELKx6.cjs");exports.change=e.change;
package/dist/change.js DELETED
@@ -1,4 +0,0 @@
1
- import { c as e } from "./change-DLl6DccR.js";
2
- export {
3
- e as change
4
- };