@synnaxlabs/x 0.43.0 → 0.44.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.
- package/.turbo/turbo-build.log +105 -93
- package/dist/base-BAM2mqCy.cjs +1 -0
- package/dist/base-DFq0vvGn.js +38 -0
- package/dist/binary.cjs +1 -1
- package/dist/binary.js +1 -1
- package/dist/bounds-D6e9xoHt.cjs +1 -0
- package/dist/bounds-Dj9nG39I.js +174 -0
- package/dist/bounds.cjs +1 -1
- package/dist/bounds.js +2 -2
- package/dist/box-BcGdqkt4.cjs +1 -0
- package/dist/box-D_qdUyEe.js +205 -0
- package/dist/box.cjs +1 -1
- package/dist/box.js +1 -1
- package/dist/caseconv.cjs +1 -1
- package/dist/caseconv.js +2 -2
- package/dist/change-C-YELKx6.cjs +1 -0
- package/dist/change-DLl6DccR.js +12 -0
- package/dist/change.cjs +1 -1
- package/dist/change.js +2 -10
- package/dist/compare.cjs +1 -1
- package/dist/compare.js +1 -1
- package/dist/deep.cjs +1 -1
- package/dist/deep.js +95 -96
- package/dist/dimensions-CRgergMS.js +43 -0
- package/dist/dimensions-D2QGoNXO.cjs +1 -0
- package/dist/dimensions.cjs +1 -1
- package/dist/dimensions.js +2 -41
- package/dist/direction-386XDm2w.cjs +1 -0
- package/dist/{index-DxU1zwsd.js → direction-8etxfKaR.js} +4 -3
- package/dist/direction.cjs +1 -1
- package/dist/direction.js +1 -1
- package/dist/external-B9AAGv50.cjs +1 -0
- package/dist/external-BFgJjMcS.js +23 -0
- package/dist/external-BPgtxa8d.js +29 -0
- package/dist/external-BYuXBYJh.js +40 -0
- package/dist/external-mffsMzJx.cjs +1 -0
- package/dist/external-uXk0Avrg.cjs +1 -0
- package/dist/index-B1m2qvBT.cjs +1 -0
- package/dist/{index-4GlOgZuh.js → index-B5l_quQn.js} +35 -42
- package/dist/index-BQe8OIgm.cjs +3 -0
- package/dist/index-D2xcvEO5.js +46 -0
- package/dist/index-DdhM_E4k.cjs +1 -0
- package/dist/index-PNh31WTW.js +125 -0
- package/dist/index.cjs +3 -5
- package/dist/index.js +685 -5363
- package/dist/kv.cjs +1 -1
- package/dist/kv.js +2 -45
- package/dist/{index-D6V-8SKw.js → location-Ar5y2DX2.js} +26 -26
- package/dist/location-DZi8ftXp.cjs +1 -0
- package/dist/location.cjs +1 -1
- package/dist/location.js +1 -1
- package/dist/observe.cjs +1 -1
- package/dist/observe.js +16 -20
- package/dist/path-BXdMenka.js +101 -0
- package/dist/path-st_E5-LJ.cjs +1 -0
- package/dist/position-DAL0Qqdf.cjs +1 -0
- package/dist/position-bA6pUwLn.js +85 -0
- package/dist/position.cjs +1 -1
- package/dist/position.js +2 -83
- package/dist/record-CAcQ5PNX.js +14 -0
- package/dist/record-YvCh7bzB.cjs +1 -0
- package/dist/record.cjs +1 -1
- package/dist/record.js +2 -8
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.js +2 -27
- package/dist/scale-Bzn1Cl0r.cjs +1 -0
- package/dist/{index-BUa-NXAX.js → scale-CdTNWu-d.js} +55 -59
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/{index-DBGAIs_7.js → series-BeJyqCoP.js} +835 -759
- package/dist/series-anlpaR_I.cjs +6 -0
- package/dist/spatial-BSWPzMkK.js +11 -0
- package/dist/spatial-DGpZ2sO3.cjs +1 -0
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +18 -25
- package/dist/src/binary/codec.d.ts +1 -1
- package/dist/src/binary/codec.d.ts.map +1 -1
- package/dist/src/breaker/breaker.d.ts +2 -2
- package/dist/src/breaker/breaker.d.ts.map +1 -1
- package/dist/src/caseconv/caseconv.d.ts +0 -1
- package/dist/src/caseconv/caseconv.d.ts.map +1 -1
- package/dist/src/change/change.d.ts +1 -1
- package/dist/src/change/change.d.ts.map +1 -1
- package/dist/src/color/color.d.ts +2 -2
- package/dist/src/color/color.d.ts.map +1 -1
- package/dist/src/color/gradient.d.ts +1 -1
- package/dist/src/color/gradient.d.ts.map +1 -1
- package/dist/src/color/palette.d.ts +3 -3
- package/dist/src/color/palette.d.ts.map +1 -1
- package/dist/src/compare/compare.d.ts +4 -4
- package/dist/src/compare/compare.d.ts.map +1 -1
- package/dist/src/control/control.d.ts +9 -9
- package/dist/src/control/control.d.ts.map +1 -1
- package/dist/src/deep/merge.d.ts +1 -1
- package/dist/src/deep/merge.d.ts.map +1 -1
- package/dist/src/deep/path.d.ts +6 -6
- package/dist/src/deep/path.d.ts.map +1 -1
- package/dist/src/destructor.d.ts +6 -2
- package/dist/src/destructor.d.ts.map +1 -1
- package/dist/src/errors/errors.d.ts +5 -1
- package/dist/src/errors/errors.d.ts.map +1 -1
- package/dist/src/flush.d.ts +11 -0
- package/dist/src/flush.d.ts.map +1 -0
- package/dist/src/id/id.d.ts +1 -0
- package/dist/src/id/id.d.ts.map +1 -1
- package/dist/src/identity.d.ts +2 -2
- package/dist/src/identity.d.ts.map +1 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/jsonrpc/jsonrpc.d.ts +1 -1
- package/dist/src/jsonrpc/jsonrpc.d.ts.map +1 -1
- package/dist/src/kv/types.d.ts +1 -1
- package/dist/src/kv/types.d.ts.map +1 -1
- package/dist/src/map/index.d.ts +2 -0
- package/dist/src/map/index.d.ts.map +1 -0
- package/dist/src/map/map.d.ts +2 -0
- package/dist/src/map/map.d.ts.map +1 -0
- package/dist/src/map/map.spec.d.ts +2 -0
- package/dist/src/map/map.spec.d.ts.map +1 -0
- package/dist/src/math/math.d.ts +2 -4
- package/dist/src/math/math.d.ts.map +1 -1
- package/dist/src/migrate/migrate.d.ts +1 -1
- package/dist/src/migrate/migrate.d.ts.map +1 -1
- package/dist/src/notation/notation.d.ts +1 -1
- package/dist/src/notation/notation.d.ts.map +1 -1
- package/dist/src/optional.d.ts +0 -3
- package/dist/src/optional.d.ts.map +1 -1
- package/dist/src/record/index.d.ts +2 -0
- package/dist/src/record/index.d.ts.map +1 -0
- package/dist/src/record/record.d.ts +90 -0
- package/dist/src/record/record.d.ts.map +1 -0
- package/dist/src/record/record.spec.d.ts.map +1 -0
- package/dist/src/runtime/os.d.ts +1 -1
- package/dist/src/runtime/os.d.ts.map +1 -1
- package/dist/src/spatial/base.d.ts +1 -1
- package/dist/src/spatial/base.d.ts.map +1 -1
- package/dist/src/spatial/box/box.d.ts +1 -1
- package/dist/src/spatial/box/box.d.ts.map +1 -1
- package/dist/src/spatial/dimensions/dimensions.d.ts +1 -1
- package/dist/src/spatial/dimensions/dimensions.d.ts.map +1 -1
- package/dist/src/spatial/direction/direction.d.ts +3 -3
- package/dist/src/spatial/direction/direction.d.ts.map +1 -1
- package/dist/src/spatial/location/location.d.ts +1 -1
- package/dist/src/spatial/location/location.d.ts.map +1 -1
- package/dist/src/spatial/scale/scale.d.ts +1 -1
- package/dist/src/spatial/scale/scale.d.ts.map +1 -1
- package/dist/src/spatial/xy/xy.d.ts +1 -1
- package/dist/src/spatial/xy/xy.d.ts.map +1 -1
- package/dist/src/status/index.d.ts +1 -1
- package/dist/src/status/index.d.ts.map +1 -1
- package/dist/src/status/status.d.ts +42 -0
- package/dist/src/status/status.d.ts.map +1 -0
- package/dist/src/status/status.spec.d.ts +2 -0
- package/dist/src/status/status.spec.d.ts.map +1 -0
- package/dist/src/strings/strings.d.ts +16 -0
- package/dist/src/strings/strings.d.ts.map +1 -1
- package/dist/src/telem/gl.d.ts +1 -1
- package/dist/src/telem/gl.d.ts.map +1 -1
- package/dist/src/telem/series.d.ts +17 -16
- package/dist/src/telem/series.d.ts.map +1 -1
- package/dist/src/telem/telem.d.ts +42 -19
- package/dist/src/telem/telem.d.ts.map +1 -1
- package/dist/src/testutil/testutil.d.ts +1 -0
- package/dist/src/testutil/testutil.d.ts.map +1 -1
- package/dist/src/testutil/testutil.spec.d.ts +2 -0
- package/dist/src/testutil/testutil.spec.d.ts.map +1 -0
- package/dist/src/zod/external.d.ts +1 -0
- package/dist/src/zod/external.d.ts.map +1 -1
- package/dist/src/zod/nullToUndefined.d.ts +1 -1
- package/dist/src/zod/nullToUndefined.d.ts.map +1 -1
- package/dist/src/zod/toArray.d.ts +3 -0
- package/dist/src/zod/toArray.d.ts.map +1 -0
- package/dist/src/zod/toArray.spec.d.ts +2 -0
- package/dist/src/zod/toArray.spec.d.ts.map +1 -0
- package/dist/src/zod/util.d.ts +1 -1
- package/dist/src/zod/util.d.ts.map +1 -1
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +10 -11
- package/dist/url.cjs +1 -1
- package/dist/url.js +16 -19
- package/dist/worker.cjs +1 -1
- package/dist/worker.js +18 -22
- package/dist/xy-B7065J2S.cjs +1 -0
- package/dist/{index-C-qYOegc.js → xy-D_LqxaGt.js} +62 -62
- package/dist/xy.cjs +1 -1
- package/dist/xy.js +1 -1
- package/dist/zod.cjs +1 -1
- package/dist/zod.js +2 -19
- package/package.json +13 -18
- package/src/binary/codec.spec.ts +1 -1
- package/src/binary/codec.ts +1 -1
- package/src/breaker/breaker.ts +1 -1
- package/src/caseconv/caseconv.ts +10 -12
- package/src/change/change.ts +1 -1
- package/src/color/color.ts +1 -1
- package/src/color/gradient.ts +1 -1
- package/src/color/palette.ts +1 -1
- package/src/compare/compare.ts +5 -5
- package/src/control/control.ts +2 -2
- package/src/deep/merge.spec.ts +2 -15
- package/src/deep/merge.ts +1 -1
- package/src/deep/path.spec.ts +41 -0
- package/src/deep/path.ts +48 -17
- package/src/destructor.ts +6 -2
- package/src/errors/errors.spec.ts +20 -20
- package/src/errors/errors.ts +4 -1
- package/src/flush.ts +21 -0
- package/src/id/id.spec.ts +1 -1
- package/src/id/id.ts +3 -1
- package/src/identity.ts +2 -2
- package/src/index.ts +3 -1
- package/src/instance/matcher.spec.ts +7 -7
- package/src/jsonrpc/jsonrpc.ts +1 -1
- package/src/kv/types.ts +1 -1
- package/src/map/index.ts +10 -0
- package/src/map/map.spec.ts +132 -0
- package/src/map/map.ts +17 -0
- package/src/math/math.ts +19 -27
- package/src/migrate/migrate.spec.ts +2 -2
- package/src/migrate/migrate.ts +2 -2
- package/src/notation/notation.ts +1 -1
- package/src/optional.ts +0 -4
- package/src/primitive/primitive.spec.ts +1 -1
- package/src/record/index.ts +10 -0
- package/src/record/record.spec.ts +319 -0
- package/src/record/record.ts +118 -0
- package/src/runtime/os.ts +1 -1
- package/src/spatial/base.ts +1 -1
- package/src/spatial/box/box.ts +1 -1
- package/src/spatial/dimensions/dimensions.ts +1 -1
- package/src/spatial/direction/direction.ts +1 -1
- package/src/spatial/location/location.ts +1 -1
- package/src/spatial/scale/scale.ts +1 -1
- package/src/spatial/xy/xy.ts +1 -1
- package/src/status/index.ts +1 -1
- package/src/status/status.spec.ts +25 -0
- package/src/status/status.ts +91 -0
- package/src/strings/strings.spec.ts +51 -13
- package/src/strings/strings.ts +20 -0
- package/src/telem/gl.ts +1 -1
- package/src/telem/series.spec.ts +193 -53
- package/src/telem/series.ts +53 -18
- package/src/telem/telem.spec.ts +202 -83
- package/src/telem/telem.ts +53 -35
- package/src/testutil/testutil.spec.ts +161 -0
- package/src/testutil/testutil.ts +12 -0
- package/src/zod/external.ts +1 -0
- package/src/zod/nullToUndefined.spec.ts +1 -1
- package/src/zod/nullToUndefined.ts +1 -1
- package/src/zod/toArray.spec.ts +182 -0
- package/src/{status/types.ts → zod/toArray.ts} +3 -12
- package/src/zod/util.spec.ts +2 -2
- package/src/zod/util.ts +3 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/vite.config.ts +1 -2
- package/dist/base-B5lQIJKc.js +0 -38
- package/dist/base-CTq-lhpU.cjs +0 -1
- package/dist/index-B58dnYRu.cjs +0 -1
- package/dist/index-BMGaoK93.cjs +0 -1
- package/dist/index-BTet04Hd.cjs +0 -6
- package/dist/index-C07SBJhr.js +0 -128
- package/dist/index-C9EdKeu1.js +0 -174
- package/dist/index-CM8ZDZ6s.cjs +0 -1
- package/dist/index-CV2JaHfw.cjs +0 -1
- package/dist/index-CeBvOwG8.cjs +0 -3
- package/dist/index-ClrGyGDp.js +0 -205
- package/dist/index-CqQXXeCI.cjs +0 -1
- package/dist/index-DEdq2tza.cjs +0 -1
- package/dist/index-DKMnHBGR.cjs +0 -1
- package/dist/index-Dql5FMcH.js +0 -47
- package/dist/index-WwMnwoLy.cjs +0 -1
- package/dist/path-1tZLZ4AN.cjs +0 -1
- package/dist/path-DD6ytXzr.js +0 -76
- package/dist/schemas-55Usj0Fg.js +0 -3998
- package/dist/schemas-DbXuI2Qr.cjs +0 -27
- package/dist/search.cjs +0 -1
- package/dist/search.js +0 -14
- package/dist/src/record.d.ts +0 -18
- package/dist/src/record.d.ts.map +0 -1
- package/dist/src/record.spec.d.ts.map +0 -1
- package/dist/src/search.d.ts +0 -18
- package/dist/src/search.d.ts.map +0 -1
- package/dist/src/status/types.d.ts +0 -11
- package/dist/src/status/types.d.ts.map +0 -1
- package/src/record.spec.ts +0 -38
- package/src/record.ts +0 -45
- package/src/search.ts +0 -42
- /package/dist/src/{record.spec.d.ts → record/record.spec.d.ts} +0 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { z as x } from "zod";
|
|
2
|
+
import { c as O } from "./direction-8etxfKaR.js";
|
|
3
|
+
import { c as A, T as M, B as j, b as S, d as Z, e as q, f as v, g as F, h as G, i as D, j as X } from "./location-Ar5y2DX2.js";
|
|
4
|
+
import { Z as g, O as Y, e as I, t as b, c as U, a as L } from "./xy-D_LqxaGt.js";
|
|
5
|
+
import { x as $, X as N, Y as k } from "./base-DFq0vvGn.js";
|
|
6
|
+
const h = x.union([x.number(), x.string()]), J = x.object({
|
|
7
|
+
top: h,
|
|
8
|
+
left: h,
|
|
9
|
+
width: h,
|
|
10
|
+
height: h
|
|
11
|
+
}), K = x.object({
|
|
12
|
+
left: x.number(),
|
|
13
|
+
top: x.number(),
|
|
14
|
+
right: x.number(),
|
|
15
|
+
bottom: x.number()
|
|
16
|
+
}), Q = x.object({
|
|
17
|
+
one: $,
|
|
18
|
+
two: $,
|
|
19
|
+
root: A
|
|
20
|
+
}), H = { one: g, two: g, root: M }, V = { one: g, two: Y, root: j }, P = (t, o) => ({
|
|
21
|
+
one: t.one,
|
|
22
|
+
two: t.two,
|
|
23
|
+
root: o ?? t.root
|
|
24
|
+
}), c = (t, o, e = 0, n = 0, r) => {
|
|
25
|
+
const s = {
|
|
26
|
+
one: { ...g },
|
|
27
|
+
two: { ...g },
|
|
28
|
+
root: r ?? M
|
|
29
|
+
};
|
|
30
|
+
if (typeof t == "number") {
|
|
31
|
+
if (typeof o != "number")
|
|
32
|
+
throw new Error("Box constructor called with invalid arguments");
|
|
33
|
+
return s.one = { x: t, y: o }, s.two = { x: s.one.x + e, y: s.one.y + n }, s;
|
|
34
|
+
}
|
|
35
|
+
return "one" in t && "two" in t && "root" in t ? { ...t, root: r ?? t.root } : ("getBoundingClientRect" in t && (t = t.getBoundingClientRect()), "left" in t ? (s.one = { x: t.left, y: t.top }, s.two = { x: t.right, y: t.bottom }, s) : (s.one = t, o == null ? s.two = { x: s.one.x + e, y: s.one.y + n } : typeof o == "number" ? s.two = { x: s.one.x + o, y: s.one.y + e } : "width" in o ? s.two = {
|
|
36
|
+
x: s.one.x + o.width,
|
|
37
|
+
y: s.one.y + o.height
|
|
38
|
+
} : "signedWidth" in o ? s.two = {
|
|
39
|
+
x: s.one.x + o.signedWidth,
|
|
40
|
+
y: s.one.y + o.signedHeight
|
|
41
|
+
} : s.two = o, s));
|
|
42
|
+
}, tt = (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 r = O(o);
|
|
47
|
+
return c(
|
|
48
|
+
n.one,
|
|
49
|
+
void 0,
|
|
50
|
+
r === "x" ? e : f(n),
|
|
51
|
+
r === "y" ? e : w(n),
|
|
52
|
+
n.root
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
return c(n.one, o, void 0, void 0, n.root);
|
|
56
|
+
}, ot = (t, o, e = !0) => {
|
|
57
|
+
const n = c(t);
|
|
58
|
+
let r = (s, i) => s < i;
|
|
59
|
+
return e && (r = (s, i) => s <= i), "one" in o ? r(a(n), a(o)) && r(l(o), l(n)) && r(u(n), u(o)) && r(m(o), m(n)) : r(a(n), o.x) && r(o.x, l(n)) && r(u(n), o.y) && r(o.y, m(n));
|
|
60
|
+
}, nt = (t, o) => I(t.one, o.one) && I(t.two, o.two) && S(t.root, o.root), W = (t) => ({
|
|
61
|
+
width: f(t),
|
|
62
|
+
height: w(t)
|
|
63
|
+
}), et = (t) => ({
|
|
64
|
+
signedWidth: _(t),
|
|
65
|
+
signedHeight: T(t)
|
|
66
|
+
}), st = (t) => ({
|
|
67
|
+
top: u(t),
|
|
68
|
+
left: a(t),
|
|
69
|
+
width: f(t),
|
|
70
|
+
height: w(t)
|
|
71
|
+
}), C = (t, o, e = !1) => {
|
|
72
|
+
const n = O(o) === "y" ? T(t) : _(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 : d(e, o.x),
|
|
78
|
+
y: o.y === "center" ? E(e).y : d(e, o.y)
|
|
79
|
+
};
|
|
80
|
+
}, d = (t, o) => {
|
|
81
|
+
const e = c(t), n = Z(e.root).includes(o) ? Math.min : Math.max;
|
|
82
|
+
return N.includes(o) ? n(e.one.x, e.two.x) : n(e.one.y, e.two.y);
|
|
83
|
+
}, rt = (t) => t.one.x === t.two.x && t.one.y === t.two.y, f = (t) => C(t, "x"), w = (t) => C(t, "y"), _ = (t) => {
|
|
84
|
+
const o = c(t);
|
|
85
|
+
return o.two.x - o.one.x;
|
|
86
|
+
}, T = (t) => {
|
|
87
|
+
const o = c(t);
|
|
88
|
+
return o.two.y - o.one.y;
|
|
89
|
+
}, z = (t) => y(t, M), ct = (t) => y(t, q), it = (t) => y(t, v), xt = (t) => y(t, j), yt = (t) => y(t, F), at = (t) => y(t, G), ut = (t) => y(t, D), ft = (t) => y(t, X), l = (t) => d(t, "right"), m = (t) => d(t, "bottom"), a = (t) => d(t, "left"), u = (t) => d(t, "top"), E = (t) => b(z(t), {
|
|
90
|
+
x: _(t) / 2,
|
|
91
|
+
y: T(t) / 2
|
|
92
|
+
}), B = (t) => {
|
|
93
|
+
const o = c(t);
|
|
94
|
+
return o.root.x === "left" ? a(o) : l(o);
|
|
95
|
+
}, R = (t) => {
|
|
96
|
+
const o = c(t);
|
|
97
|
+
return o.root.y === "top" ? u(o) : m(o);
|
|
98
|
+
}, wt = (t) => ({ x: B(t), y: R(t) }), lt = (t) => {
|
|
99
|
+
const o = c(t);
|
|
100
|
+
return { lower: o.one.x, upper: o.two.x };
|
|
101
|
+
}, mt = (t) => {
|
|
102
|
+
const o = c(t);
|
|
103
|
+
return { lower: o.one.y, upper: o.two.y };
|
|
104
|
+
}, dt = (t, o) => P(t, o), pt = (t, o) => {
|
|
105
|
+
const e = c(t), n = N.includes(o) ? "x" : k.includes(o) ? "y" : null;
|
|
106
|
+
if (n === null) throw new Error(`Invalid location: ${o}`);
|
|
107
|
+
const r = o === "top" || o === "left" ? Math.min : Math.max, s = { ...e.one }, i = { ...e.two };
|
|
108
|
+
return s[n] = r(e.one[n], e.two[n]), i[n] = r(e.one[n], e.two[n]), [s, i];
|
|
109
|
+
}, gt = (t, o) => {
|
|
110
|
+
const e = c(t), n = c(o), r = B(n) + (f(n) - f(e)) / 2, s = R(n) + (w(n) - w(e)) / 2;
|
|
111
|
+
return c({ x: r, y: s }, W(e));
|
|
112
|
+
}, ht = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, _t = (t) => f(t) / w(t), Tt = (t, o, e) => {
|
|
113
|
+
if (typeof o == "string") {
|
|
114
|
+
if (e == null) throw new Error("Undefined amount passed into box.translate");
|
|
115
|
+
const r = O(o);
|
|
116
|
+
o = U(r, e);
|
|
117
|
+
}
|
|
118
|
+
const n = c(t);
|
|
119
|
+
return c(
|
|
120
|
+
b(n.one, o),
|
|
121
|
+
b(n.two, o),
|
|
122
|
+
void 0,
|
|
123
|
+
void 0,
|
|
124
|
+
n.root
|
|
125
|
+
);
|
|
126
|
+
}, bt = (t, o) => {
|
|
127
|
+
const e = Math.max(a(t), a(o)), n = Math.max(u(t), u(o)), r = Math.min(l(t), l(o)), s = Math.min(m(t), m(o));
|
|
128
|
+
return e > r || n > s ? H : c({ x: e, y: n }, { x: r, y: s }, void 0, void 0, t.root);
|
|
129
|
+
}, Et = (t) => f(t) * w(t), Ot = (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, r, s) => {
|
|
139
|
+
const i = { x: t, y: o }, p = { x: t + e, y: o + n };
|
|
140
|
+
return r.x !== s.x && (r.x === "center" ? (i.x -= e / 2, p.x -= e / 2) : (i.x -= e, p.x -= e)), r.y !== s.y && (r.y === "center" ? (i.y -= n / 2, p.y -= n / 2) : (i.y -= n, p.y -= n)), c(i, p, void 0, void 0, s);
|
|
141
|
+
}, $t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
142
|
+
__proto__: null,
|
|
143
|
+
DECIMAL: V,
|
|
144
|
+
ZERO: H,
|
|
145
|
+
area: Et,
|
|
146
|
+
areaIsZero: rt,
|
|
147
|
+
aspect: _t,
|
|
148
|
+
bottom: m,
|
|
149
|
+
bottomCenter: yt,
|
|
150
|
+
bottomLeft: xt,
|
|
151
|
+
bottomRight: at,
|
|
152
|
+
box: Q,
|
|
153
|
+
center: E,
|
|
154
|
+
centerLeft: ut,
|
|
155
|
+
centerRight: ft,
|
|
156
|
+
construct: c,
|
|
157
|
+
constructWithAlternateRoot: Mt,
|
|
158
|
+
contains: ot,
|
|
159
|
+
copy: P,
|
|
160
|
+
css: st,
|
|
161
|
+
cssBox: J,
|
|
162
|
+
dim: C,
|
|
163
|
+
dims: W,
|
|
164
|
+
domRect: K,
|
|
165
|
+
edgePoints: pt,
|
|
166
|
+
equals: nt,
|
|
167
|
+
height: w,
|
|
168
|
+
intersection: bt,
|
|
169
|
+
isBox: ht,
|
|
170
|
+
left: a,
|
|
171
|
+
loc: d,
|
|
172
|
+
positionInCenter: gt,
|
|
173
|
+
reRoot: dt,
|
|
174
|
+
resize: tt,
|
|
175
|
+
right: l,
|
|
176
|
+
root: wt,
|
|
177
|
+
signedDims: et,
|
|
178
|
+
signedHeight: T,
|
|
179
|
+
signedWidth: _,
|
|
180
|
+
top: u,
|
|
181
|
+
topCenter: ct,
|
|
182
|
+
topLeft: z,
|
|
183
|
+
topRight: it,
|
|
184
|
+
translate: Tt,
|
|
185
|
+
truncate: Ot,
|
|
186
|
+
width: f,
|
|
187
|
+
x: B,
|
|
188
|
+
xBounds: lt,
|
|
189
|
+
xyLoc: y,
|
|
190
|
+
y: R,
|
|
191
|
+
yBounds: mt
|
|
192
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
193
|
+
export {
|
|
194
|
+
Mt as a,
|
|
195
|
+
$t as b,
|
|
196
|
+
c,
|
|
197
|
+
Et as d,
|
|
198
|
+
ht as e,
|
|
199
|
+
lt as f,
|
|
200
|
+
w as h,
|
|
201
|
+
bt as i,
|
|
202
|
+
f as w,
|
|
203
|
+
y as x,
|
|
204
|
+
mt as y
|
|
205
|
+
};
|
package/dist/box.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./box-BcGdqkt4.cjs");exports.box=e.box;
|
package/dist/box.js
CHANGED
package/dist/caseconv.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DdhM_E4k.cjs");exports.caseconv=e.caseconv;
|
package/dist/caseconv.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
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
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const n = (e) => t({
|
|
3
|
-
variant: r(["set", "delete"]),
|
|
4
|
-
key: o(),
|
|
5
|
-
value: e
|
|
6
|
-
}), s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
7
|
-
__proto__: null,
|
|
8
|
-
Z: n
|
|
9
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
1
|
+
import { c as e } from "./change-DLl6DccR.js";
|
|
10
2
|
export {
|
|
11
|
-
|
|
3
|
+
e as change
|
|
12
4
|
};
|
package/dist/compare.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-B1m2qvBT.cjs");exports.compare=e.compare;
|
package/dist/compare.js
CHANGED
package/dist/deep.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./identity.cjs"),y=require("./path-st_E5-LJ.cjs"),d=t=>JSON.parse(JSON.stringify(t)),j=(t,...l)=>(l.forEach(i=>{let r=t;const f=i.split(".");f.forEach((n,e)=>{typeof r!="object"||r===null||(e===f.length-1?delete r[n]:n in r&&(r=r[n]))})}),t),A=(t,l,i="")=>{const r={},f=(n,e,s)=>{if(typeof n!=typeof e||n===null||e===null){r[s]=[n,e];return}if(typeof n=="object"&&typeof e=="object")if(Array.isArray(n)&&Array.isArray(e)){if(n.length!==e.length){r[s]=[n,e];return}for(let o=0;o<n.length;o++)f(n[o],e[o],`${s}[${o}]`)}else new Set([...Object.keys(n),...Object.keys(e)]).forEach(c=>{f(n[c],e[c],s!==""?`${s}.${c}`:c)});else n!==e&&(r[s]=[n,e])};return f(t,l,i),r},p=(t,l)=>{const i=Array.isArray(t),r=Array.isArray(l);if(i!==r)return!1;if(i&&r){const e=t,s=l;if(e.length!==s.length)return!1;for(let o=0;o<e.length;o++)if(!p(e[o],s[o]))return!1;return!0}if(t==null||l==null||typeof t!="object"||typeof l!="object")return t===l;if("equals"in t)return t.equals(l);const f=Object.keys(t),n=Object.keys(l);if(f.length!==n.length)return!1;for(const e of f){const s=t[e],o=l[e];if(typeof s=="object"&&typeof o=="object"){if(!p(s,o))return!1}else if(s!==o)return!1}return!0},h=(t,l)=>{if(typeof t!="object"||t==null)return t===l;const i=Object.keys(t),r=Object.keys(l);if(r.length>i.length)return!1;for(const f of r){const n=t[f],e=l[f];if(typeof n=="object"&&typeof e=="object"){if(!h(n,e))return!1}else if(n!==e)return!1}return!0},a=(t,...l)=>{if(l.length===0)return t;const i=l.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,...l)},k=(t,l,i)=>{const r=(f,n,e)=>{if(e.def?.type==="union")return e.def.options.reduce((s,o)=>r(s,n,o),f);if(e.def?.type==="intersection"){const s=r(f,n,e.def.left);return r(s,n,e.def.right)}for(const s in n){const o=n[s];let c=e?.shape;if(c!=null)for(;c!=null;){if(c[s]!=null){const g=c[s].safeParse(o);if(g.success){f[s]=g.data;break}}c=c.def?.shape}typeof o=="object"&&!Array.isArray(o)&&o!==null&&e&&e.shape&&e.shape[s]&&(f[s]||={},r(f[s],o,e.shape[s]))}return f};return r({...t},l,i)},O=Object.freeze(Object.defineProperty({__proto__:null,copy:d,deleteD:j,difference:A,element:y.element,equal:p,get:y.get,has:y.has,override:a,overrideValidItems:k,partialEqual:h,pathsMatch:y.pathsMatch,remove:y.remove,set:y.set,transformPath:y.transformPath},Symbol.toStringTag,{value:"Module"}));exports.deep=O;
|
package/dist/deep.js
CHANGED
|
@@ -1,126 +1,125 @@
|
|
|
1
|
-
import { isObject as
|
|
2
|
-
import { e as
|
|
3
|
-
const
|
|
4
|
-
let
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
typeof
|
|
1
|
+
import { isObject as y } from "./identity.js";
|
|
2
|
+
import { e as h, g as d, h as A, p as j, r as k, s as V, t as E } from "./path-BXdMenka.js";
|
|
3
|
+
const $ = (t) => JSON.parse(JSON.stringify(t)), w = (t, ...l) => (l.forEach((i) => {
|
|
4
|
+
let r = t;
|
|
5
|
+
const f = i.split(".");
|
|
6
|
+
f.forEach((s, e) => {
|
|
7
|
+
typeof r != "object" || r === null || (e === f.length - 1 ? delete r[s] : s in r && (r = r[s]));
|
|
8
8
|
});
|
|
9
|
-
}), t),
|
|
10
|
-
const
|
|
11
|
-
if (typeof
|
|
12
|
-
|
|
9
|
+
}), t), q = (t, l, i = "") => {
|
|
10
|
+
const r = {}, f = (s, e, n) => {
|
|
11
|
+
if (typeof s != typeof e || s === null || e === null) {
|
|
12
|
+
r[n] = [s, e];
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
|
-
if (typeof
|
|
16
|
-
if (Array.isArray(
|
|
17
|
-
if (
|
|
18
|
-
|
|
15
|
+
if (typeof s == "object" && typeof e == "object")
|
|
16
|
+
if (Array.isArray(s) && Array.isArray(e)) {
|
|
17
|
+
if (s.length !== e.length) {
|
|
18
|
+
r[n] = [s, e];
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
for (let
|
|
21
|
+
for (let o = 0; o < s.length; o++) f(s[o], e[o], `${n}[${o}]`);
|
|
22
22
|
} else
|
|
23
|
-
(/* @__PURE__ */ new Set([...Object.keys(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
e[
|
|
27
|
-
|
|
23
|
+
(/* @__PURE__ */ new Set([...Object.keys(s), ...Object.keys(e)])).forEach((c) => {
|
|
24
|
+
f(
|
|
25
|
+
s[c],
|
|
26
|
+
e[c],
|
|
27
|
+
n !== "" ? `${n}.${c}` : c
|
|
28
28
|
);
|
|
29
29
|
});
|
|
30
|
-
else
|
|
30
|
+
else s !== e && (r[n] = [s, e]);
|
|
31
31
|
};
|
|
32
|
-
return
|
|
33
|
-
},
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
36
|
-
if (
|
|
37
|
-
const e = t,
|
|
38
|
-
if (e.length !==
|
|
39
|
-
for (let
|
|
32
|
+
return f(t, l, i), r;
|
|
33
|
+
}, u = (t, l) => {
|
|
34
|
+
const i = Array.isArray(t), r = Array.isArray(l);
|
|
35
|
+
if (i !== r) return !1;
|
|
36
|
+
if (i && r) {
|
|
37
|
+
const e = t, n = l;
|
|
38
|
+
if (e.length !== n.length) return !1;
|
|
39
|
+
for (let o = 0; o < e.length; o++) if (!u(e[o], n[o])) return !1;
|
|
40
40
|
return !0;
|
|
41
41
|
}
|
|
42
|
-
if (t == null ||
|
|
43
|
-
return t ===
|
|
44
|
-
if ("equals" in t) return t.equals(
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
47
|
-
for (const e of
|
|
48
|
-
const
|
|
49
|
-
if (typeof
|
|
50
|
-
if (!
|
|
51
|
-
} else if (
|
|
42
|
+
if (t == null || l == null || typeof t != "object" || typeof l != "object")
|
|
43
|
+
return t === l;
|
|
44
|
+
if ("equals" in t) return t.equals(l);
|
|
45
|
+
const f = Object.keys(t), s = Object.keys(l);
|
|
46
|
+
if (f.length !== s.length) return !1;
|
|
47
|
+
for (const e of f) {
|
|
48
|
+
const n = t[e], o = l[e];
|
|
49
|
+
if (typeof n == "object" && typeof o == "object") {
|
|
50
|
+
if (!u(n, o)) return !1;
|
|
51
|
+
} else if (n !== o) return !1;
|
|
52
52
|
}
|
|
53
53
|
return !0;
|
|
54
|
-
},
|
|
55
|
-
if (typeof t != "object" || t == null) return t ===
|
|
56
|
-
const
|
|
57
|
-
if (
|
|
58
|
-
for (const
|
|
59
|
-
const
|
|
60
|
-
if (typeof
|
|
61
|
-
if (!
|
|
62
|
-
} else if (
|
|
54
|
+
}, g = (t, l) => {
|
|
55
|
+
if (typeof t != "object" || t == null) return t === l;
|
|
56
|
+
const i = Object.keys(t), r = Object.keys(l);
|
|
57
|
+
if (r.length > i.length) return !1;
|
|
58
|
+
for (const f of r) {
|
|
59
|
+
const s = t[f], e = l[f];
|
|
60
|
+
if (typeof s == "object" && typeof e == "object") {
|
|
61
|
+
if (!g(s, e)) return !1;
|
|
62
|
+
} else if (s !== e) return !1;
|
|
63
63
|
}
|
|
64
64
|
return !0;
|
|
65
|
-
},
|
|
66
|
-
if (
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
69
|
-
for (const
|
|
65
|
+
}, p = (t, ...l) => {
|
|
66
|
+
if (l.length === 0) return t;
|
|
67
|
+
const i = l.shift();
|
|
68
|
+
if (y(t) && y(i))
|
|
69
|
+
for (const r in i)
|
|
70
70
|
try {
|
|
71
|
-
|
|
72
|
-
} catch (
|
|
73
|
-
throw
|
|
71
|
+
y(i[r]) ? (r in t || Object.assign(t, { [r]: {} }), p(t[r], i[r])) : Object.assign(t, { [r]: i[r] });
|
|
72
|
+
} catch (f) {
|
|
73
|
+
throw f instanceof TypeError ? new TypeError(`.${r}: ${f.message}`) : f;
|
|
74
74
|
}
|
|
75
|
-
return
|
|
76
|
-
},
|
|
77
|
-
const
|
|
78
|
-
|
|
79
|
-
if (((i = e.def) == null ? void 0 : i.type) === "union")
|
|
75
|
+
return p(t, ...l);
|
|
76
|
+
}, K = (t, l, i) => {
|
|
77
|
+
const r = (f, s, e) => {
|
|
78
|
+
if (e.def?.type === "union")
|
|
80
79
|
return e.def.options.reduce(
|
|
81
|
-
(
|
|
82
|
-
|
|
80
|
+
(n, o) => r(n, s, o),
|
|
81
|
+
f
|
|
83
82
|
);
|
|
84
|
-
if (
|
|
85
|
-
const
|
|
86
|
-
return
|
|
83
|
+
if (e.def?.type === "intersection") {
|
|
84
|
+
const n = r(f, s, e.def.left);
|
|
85
|
+
return r(n, s, e.def.right);
|
|
87
86
|
}
|
|
88
|
-
for (const
|
|
89
|
-
const
|
|
90
|
-
let
|
|
91
|
-
if (
|
|
92
|
-
for (;
|
|
93
|
-
if (
|
|
94
|
-
const
|
|
95
|
-
if (
|
|
96
|
-
|
|
87
|
+
for (const n in s) {
|
|
88
|
+
const o = s[n];
|
|
89
|
+
let c = e?.shape;
|
|
90
|
+
if (c != null)
|
|
91
|
+
for (; c != null; ) {
|
|
92
|
+
if (c[n] != null) {
|
|
93
|
+
const a = c[n].safeParse(o);
|
|
94
|
+
if (a.success) {
|
|
95
|
+
f[n] = a.data;
|
|
97
96
|
break;
|
|
98
97
|
}
|
|
99
98
|
}
|
|
100
|
-
|
|
99
|
+
c = c.def?.shape;
|
|
101
100
|
}
|
|
102
|
-
typeof
|
|
101
|
+
typeof o == "object" && !Array.isArray(o) && o !== null && e && e.shape && e.shape[n] && (f[n] ||= {}, r(f[n], o, e.shape[n]));
|
|
103
102
|
}
|
|
104
|
-
return
|
|
103
|
+
return f;
|
|
105
104
|
};
|
|
106
|
-
return
|
|
107
|
-
},
|
|
105
|
+
return r({ ...t }, l, i);
|
|
106
|
+
}, m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
108
107
|
__proto__: null,
|
|
109
|
-
copy:
|
|
110
|
-
deleteD:
|
|
111
|
-
difference:
|
|
112
|
-
element:
|
|
113
|
-
equal:
|
|
114
|
-
get:
|
|
115
|
-
has:
|
|
116
|
-
override:
|
|
117
|
-
overrideValidItems:
|
|
118
|
-
partialEqual:
|
|
119
|
-
pathsMatch:
|
|
120
|
-
remove:
|
|
121
|
-
set:
|
|
122
|
-
transformPath:
|
|
108
|
+
copy: $,
|
|
109
|
+
deleteD: w,
|
|
110
|
+
difference: q,
|
|
111
|
+
element: h,
|
|
112
|
+
equal: u,
|
|
113
|
+
get: d,
|
|
114
|
+
has: A,
|
|
115
|
+
override: p,
|
|
116
|
+
overrideValidItems: K,
|
|
117
|
+
partialEqual: g,
|
|
118
|
+
pathsMatch: j,
|
|
119
|
+
remove: k,
|
|
120
|
+
set: V,
|
|
121
|
+
transformPath: E
|
|
123
122
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
124
123
|
export {
|
|
125
|
-
|
|
124
|
+
m as deep
|
|
126
125
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z as h } from "zod";
|
|
2
|
+
import { d as o, x as g, n as a } from "./base-DFq0vvGn.js";
|
|
3
|
+
const r = h.object({ signedWidth: h.number(), signedHeight: h.number() }), c = h.union([o, r, g, a]), u = { width: 0, height: 0 }, m = { width: 1, height: 1 }, n = (t, e) => typeof t == "number" ? { width: t, height: e ?? t } : Array.isArray(t) ? { width: t[0], height: t[1] } : "x" in t ? { width: t.x, height: t.y } : "signedWidth" in t ? { width: t.signedWidth, height: t.signedHeight } : { ...t }, d = (t, e) => {
|
|
4
|
+
if (e == null) return !1;
|
|
5
|
+
const i = n(t), s = n(e);
|
|
6
|
+
return i.width === s.width && i.height === s.height;
|
|
7
|
+
}, p = (t) => {
|
|
8
|
+
const e = n(t);
|
|
9
|
+
return { width: e.height, height: e.width };
|
|
10
|
+
}, l = (t) => {
|
|
11
|
+
const e = n(t);
|
|
12
|
+
return `0 0 ${e.width} ${e.height}`;
|
|
13
|
+
}, f = (t) => {
|
|
14
|
+
const e = n(t);
|
|
15
|
+
return [e.width, e.height];
|
|
16
|
+
}, x = (t) => ({
|
|
17
|
+
width: Math.max(...t.map((e) => n(e).width)),
|
|
18
|
+
height: Math.max(...t.map((e) => n(e).height))
|
|
19
|
+
}), b = (t) => ({
|
|
20
|
+
width: Math.min(...t.map((e) => n(e).width)),
|
|
21
|
+
height: Math.min(...t.map((e) => n(e).height))
|
|
22
|
+
}), w = (t, e) => {
|
|
23
|
+
const i = n(t);
|
|
24
|
+
return { width: i.width * e, height: i.height * e };
|
|
25
|
+
}, _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
26
|
+
__proto__: null,
|
|
27
|
+
DECIMAL: m,
|
|
28
|
+
ZERO: u,
|
|
29
|
+
construct: n,
|
|
30
|
+
couple: f,
|
|
31
|
+
crude: c,
|
|
32
|
+
dimensions: o,
|
|
33
|
+
equals: d,
|
|
34
|
+
max: x,
|
|
35
|
+
min: b,
|
|
36
|
+
scale: w,
|
|
37
|
+
signed: r,
|
|
38
|
+
svgViewBox: l,
|
|
39
|
+
swap: p
|
|
40
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
41
|
+
export {
|
|
42
|
+
_ as d
|
|
43
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const h=require("zod"),s=require("./base-BAM2mqCy.cjs"),o=h.z.object({signedWidth:h.z.number(),signedHeight:h.z.number()}),g=h.z.union([s.dimensions,o,s.xy,s.numberCouple]),c={width:0,height:0},u={width:1,height:1},n=(t,e)=>typeof t=="number"?{width:t,height:e??t}:Array.isArray(t)?{width:t[0],height:t[1]}:"x"in t?{width:t.x,height:t.y}:"signedWidth"in t?{width:t.signedWidth,height:t.signedHeight}:{...t},a=(t,e)=>{if(e==null)return!1;const i=n(t),r=n(e);return i.width===r.width&&i.height===r.height},d=t=>{const e=n(t);return{width:e.height,height:e.width}},m=t=>{const e=n(t);return`0 0 ${e.width} ${e.height}`},l=t=>{const e=n(t);return[e.width,e.height]},p=t=>({width:Math.max(...t.map(e=>n(e).width)),height:Math.max(...t.map(e=>n(e).height))}),b=t=>({width:Math.min(...t.map(e=>n(e).width)),height:Math.min(...t.map(e=>n(e).height))}),f=(t,e)=>{const i=n(t);return{width:i.width*e,height:i.height*e}},w=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:u,ZERO:c,construct:n,couple:l,crude:g,dimensions:s.dimensions,equals:a,max:p,min:b,scale:f,signed:o,svgViewBox:m,swap:d},Symbol.toStringTag,{value:"Module"}));exports.dimensions=w;
|
package/dist/dimensions.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./dimensions-D2QGoNXO.cjs");exports.dimensions=e.dimensions;
|
package/dist/dimensions.js
CHANGED
|
@@ -1,43 +1,4 @@
|
|
|
1
|
-
import { d
|
|
2
|
-
import { o as c, n as s, u } from "./schemas-55Usj0Fg.js";
|
|
3
|
-
const r = c({ signedWidth: s(), signedHeight: s() }), m = u([o, r, a, g]), d = { width: 0, height: 0 }, p = { width: 1, height: 1 }, n = (t, e) => typeof t == "number" ? { width: t, height: e ?? t } : Array.isArray(t) ? { width: t[0], height: t[1] } : "x" in t ? { width: t.x, height: t.y } : "signedWidth" in t ? { width: t.signedWidth, height: t.signedHeight } : { ...t }, l = (t, e) => {
|
|
4
|
-
if (e == null) return !1;
|
|
5
|
-
const i = n(t), h = n(e);
|
|
6
|
-
return i.width === h.width && i.height === h.height;
|
|
7
|
-
}, f = (t) => {
|
|
8
|
-
const e = n(t);
|
|
9
|
-
return { width: e.height, height: e.width };
|
|
10
|
-
}, x = (t) => {
|
|
11
|
-
const e = n(t);
|
|
12
|
-
return `0 0 ${e.width} ${e.height}`;
|
|
13
|
-
}, b = (t) => {
|
|
14
|
-
const e = n(t);
|
|
15
|
-
return [e.width, e.height];
|
|
16
|
-
}, w = (t) => ({
|
|
17
|
-
width: Math.max(...t.map((e) => n(e).width)),
|
|
18
|
-
height: Math.max(...t.map((e) => n(e).height))
|
|
19
|
-
}), y = (t) => ({
|
|
20
|
-
width: Math.min(...t.map((e) => n(e).width)),
|
|
21
|
-
height: Math.min(...t.map((e) => n(e).height))
|
|
22
|
-
}), M = (t, e) => {
|
|
23
|
-
const i = n(t);
|
|
24
|
-
return { width: i.width * e, height: i.height * e };
|
|
25
|
-
}, A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
26
|
-
__proto__: null,
|
|
27
|
-
DECIMAL: p,
|
|
28
|
-
ZERO: d,
|
|
29
|
-
construct: n,
|
|
30
|
-
couple: b,
|
|
31
|
-
crude: m,
|
|
32
|
-
dimensions: o,
|
|
33
|
-
equals: l,
|
|
34
|
-
max: w,
|
|
35
|
-
min: y,
|
|
36
|
-
scale: M,
|
|
37
|
-
signed: r,
|
|
38
|
-
svgViewBox: x,
|
|
39
|
-
swap: f
|
|
40
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
1
|
+
import { d } from "./dimensions-CRgergMS.js";
|
|
41
2
|
export {
|
|
42
|
-
|
|
3
|
+
d as dimensions
|
|
43
4
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./base-BAM2mqCy.cjs"),n=i.crudeDirection,t=e=>i.DIRECTIONS.includes(e)?e:i.Y_LOCATIONS.includes(e)?"y":"x",o=e=>t(e)==="x"?"y":"x",s=e=>t(e)==="x"?"width":"height",c=e=>t(e)==="x"?"left":"top",r=e=>n.safeParse(e).success,d=e=>t(e)==="x"?"signedWidth":"signedHeight",u=Object.freeze(Object.defineProperty({__proto__:null,DIRECTIONS:i.DIRECTIONS,construct:t,crude:n,dimension:s,direction:i.direction,isDirection:r,location:c,signedDimension:d,swap:o},Symbol.toStringTag,{value:"Module"}));exports.construct=t;exports.direction=u;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
const
|
|
1
|
+
import { c as s, D as i, Y as o, b as c } from "./base-DFq0vvGn.js";
|
|
2
|
+
const n = s, t = (e) => i.includes(e) ? e : o.includes(e) ? "y" : "x", r = (e) => t(e) === "x" ? "y" : "x", d = (e) => t(e) === "x" ? "width" : "height", a = (e) => t(e) === "x" ? "left" : "top", u = (e) => n.safeParse(e).success, l = (e) => t(e) === "x" ? "signedWidth" : "signedHeight", g = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3
3
|
__proto__: null,
|
|
4
|
+
DIRECTIONS: i,
|
|
4
5
|
construct: t,
|
|
5
|
-
crude:
|
|
6
|
+
crude: n,
|
|
6
7
|
dimension: d,
|
|
7
8
|
direction: c,
|
|
8
9
|
isDirection: u,
|
package/dist/direction.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./direction-386XDm2w.cjs");exports.direction=e.direction;
|