@synnaxlabs/x 0.33.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +33 -33
- package/dist/binary.cjs +1 -1
- package/dist/binary.js +1 -1
- package/dist/{bounds-CCueigU3.js → bounds-CFI9wDXn.js} +7 -7
- package/dist/bounds-DzCDHgdE.cjs +1 -0
- package/dist/bounds.cjs +1 -1
- package/dist/bounds.js +1 -1
- package/dist/{box-hAkmDC3K.js → box-DVCNGsJG.js} +1 -1
- package/dist/{box-CZVdKCOc.cjs → box-Mf8E1Ypp.cjs} +1 -1
- package/dist/box.cjs +1 -1
- package/dist/box.js +1 -1
- package/dist/caseconv.cjs +1 -1
- package/dist/caseconv.js +1 -1
- package/dist/compare.js +1 -1
- package/dist/deep.cjs +1 -1
- package/dist/deep.js +46 -48
- package/dist/{direction-DZbN47uL.cjs → direction-D7qoo_GJ.cjs} +1 -1
- package/dist/direction.cjs +1 -1
- package/dist/external-B3XSLDq5.cjs +1 -0
- package/dist/{external-CO221aaF.js → external-sVtvYJS6.js} +3 -3
- package/dist/{index-zsix_qnl.js → index-BBa2mWG1.js} +1 -1
- package/dist/{index-DQZfhLnw.cjs → index-CYxQwEdX.cjs} +1 -1
- package/dist/{index-B3BUDIdi.js → index-HQonyH7n.js} +1 -2
- package/dist/index-YsO0EMN8.cjs +1 -0
- package/dist/{index-q_1Jz5rY.js → index-eue4dSQX.js} +10 -6
- package/dist/index.cjs +1 -1
- package/dist/index.js +21 -21
- package/dist/{location-B5rSnQP3.js → location-CI9x53qR.js} +8 -8
- package/dist/{location-YGxhLPDy.cjs → location-DetomF8Z.cjs} +1 -1
- package/dist/location.cjs +1 -1
- package/dist/location.js +1 -1
- package/dist/path-BBCx3K6k.cjs +1 -0
- package/dist/{path-B-1-i3qC.js → path-CmnoH3RC.js} +26 -26
- package/dist/{position-BZOTg74V.js → position-CFc9RsSn.js} +2 -2
- package/dist/{position-CjNCcq8X.cjs → position-DKhPhvPh.cjs} +1 -1
- package/dist/position.cjs +1 -1
- package/dist/position.js +1 -1
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.js +1 -1
- package/dist/{scale-BvbW9p2C.cjs → scale-CT61XD_X.cjs} +1 -1
- package/dist/{scale-C7_4I3pa.js → scale-DNQE1LMm.js} +25 -3
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/series-DWLXo7J6.cjs +11 -0
- package/dist/{series-CZw97Bq2.js → series-sjWkW8qe.js} +25 -27
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +5 -5
- package/dist/src/binary/encoder.d.ts.map +1 -1
- package/dist/src/caseconv/caseconv.d.ts.map +1 -1
- package/dist/src/clamp/clamp.d.ts.map +1 -1
- package/dist/src/compare/compare.d.ts.map +1 -1
- package/dist/src/debounce/debounce.d.ts.map +1 -1
- package/dist/src/deep/difference.d.ts.map +1 -1
- package/dist/src/deep/merge.d.ts.map +1 -1
- package/dist/src/deep/path.d.ts +1 -1
- package/dist/src/deep/path.d.ts.map +1 -1
- package/dist/src/migrate/migrate.d.ts.map +1 -1
- package/dist/src/spatial/bounds/bounds.d.ts +4 -2
- package/dist/src/spatial/bounds/bounds.d.ts.map +1 -1
- package/dist/src/spatial/box/box.d.ts.map +1 -1
- package/dist/src/spatial/scale/scale.d.ts +177 -5
- package/dist/src/spatial/scale/scale.d.ts.map +1 -1
- package/dist/src/telem/generate.d.ts.map +1 -1
- package/dist/src/telem/series.d.ts.map +1 -1
- package/dist/src/telem/telem.d.ts.map +1 -1
- package/dist/src/url/url.d.ts.map +1 -1
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +1 -1
- package/dist/url.cjs +1 -1
- package/dist/url.js +1 -1
- package/dist/{zodutil-BWvwKcpb.cjs → zodutil-C6RYzvXd.cjs} +1 -1
- package/dist/{zodutil-qNM8aVYC.js → zodutil-Tmuc4CNq.js} +1 -1
- package/dist/zodutil.cjs +1 -1
- package/dist/zodutil.js +1 -1
- package/package.json +9 -8
- package/src/binary/encoder.ts +1 -2
- package/src/caseconv/caseconv.ts +7 -15
- package/src/clamp/clamp.ts +1 -1
- package/src/compare/compare.ts +1 -3
- package/src/debounce/debounce.ts +1 -2
- package/src/deep/difference.ts +3 -9
- package/src/deep/merge.ts +8 -15
- package/src/deep/path.spec.ts +1 -1
- package/src/deep/path.ts +3 -3
- package/src/math/math.ts +1 -1
- package/src/migrate/migrate.ts +4 -5
- package/src/runtime/os.ts +2 -2
- package/src/spatial/bounds/bounds.spec.ts +1 -1
- package/src/spatial/bounds/bounds.ts +6 -4
- package/src/spatial/box/box.ts +4 -7
- package/src/spatial/direction/direction.ts +1 -1
- package/src/spatial/location/location.ts +5 -5
- package/src/spatial/scale/scale.ts +196 -12
- package/src/telem/generate.ts +1 -3
- package/src/telem/series.ts +44 -53
- package/src/telem/telem.spec.ts +5 -11
- package/src/telem/telem.ts +12 -16
- package/src/url/url.ts +9 -12
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/bounds-Cudf5M4H.cjs +0 -1
- package/dist/external-B-DoBvh7.cjs +0 -1
- package/dist/index-By0n2R_b.cjs +0 -1
- package/dist/path-577Fmn5N.cjs +0 -1
- package/dist/series-BId9slhU.cjs +0 -11
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @synnaxlabs/x@0.
|
|
2
|
+
> @synnaxlabs/x@0.34.0 build /home/runner/work/synnax/synnax/x/ts
|
|
3
3
|
> tsc --noEmit && vite build
|
|
4
4
|
|
|
5
5
|
[34m Synnax - Production mode[0m
|
|
6
|
-
[36mvite v5.4.
|
|
6
|
+
[36mvite v5.4.10 [32mbuilding for production...[36m[39m
|
|
7
7
|
transforming...
|
|
8
8
|
[32m✓[39m 84 modules transformed.
|
|
9
9
|
Generated an empty chunk: "destructor".
|
|
@@ -39,27 +39,27 @@ computing gzip size...
|
|
|
39
39
|
[2mdist/[22m[36mtelem.js [39m[1m[2m 0.41 kB[22m[1m[22m[2m │ gzip: 0.25 kB[22m
|
|
40
40
|
[2mdist/[22m[36mspatial.js [39m[1m[2m 0.58 kB[22m[1m[22m[2m │ gzip: 0.28 kB[22m
|
|
41
41
|
[2mdist/[22m[36mdirection-CScbfCdT.js [39m[1m[2m 0.65 kB[22m[1m[22m[2m │ gzip: 0.37 kB[22m
|
|
42
|
-
[2mdist/[22m[36mexternal-
|
|
43
|
-
[2mdist/[22m[36mzodutil-
|
|
42
|
+
[2mdist/[22m[36mexternal-sVtvYJS6.js [39m[1m[2m 0.86 kB[22m[1m[22m[2m │ gzip: 0.51 kB[22m
|
|
43
|
+
[2mdist/[22m[36mzodutil-Tmuc4CNq.js [39m[1m[2m 0.91 kB[22m[1m[22m[2m │ gzip: 0.54 kB[22m
|
|
44
44
|
[2mdist/[22m[36mworker.js [39m[1m[2m 1.17 kB[22m[1m[22m[2m │ gzip: 0.53 kB[22m
|
|
45
45
|
[2mdist/[22m[36mbase-DnZzEvvz.js [39m[1m[2m 1.21 kB[22m[1m[22m[2m │ gzip: 0.51 kB[22m
|
|
46
46
|
[2mdist/[22m[36mobserve.js [39m[1m[2m 1.41 kB[22m[1m[22m[2m │ gzip: 0.60 kB[22m
|
|
47
47
|
[2mdist/[22m[36mdimensions-D-1PnJVI.js [39m[1m[2m 1.49 kB[22m[1m[22m[2m │ gzip: 0.66 kB[22m
|
|
48
|
-
[2mdist/[22m[36mpath-
|
|
49
|
-
[2mdist/[22m[36mindex-
|
|
48
|
+
[2mdist/[22m[36mpath-CmnoH3RC.js [39m[1m[2m 1.68 kB[22m[1m[22m[2m │ gzip: 0.67 kB[22m
|
|
49
|
+
[2mdist/[22m[36mindex-eue4dSQX.js [39m[1m[2m 1.83 kB[22m[1m[22m[2m │ gzip: 0.88 kB[22m
|
|
50
50
|
[2mdist/[22m[36murl.js [39m[1m[2m 1.98 kB[22m[1m[22m[2m │ gzip: 0.87 kB[22m
|
|
51
|
-
[2mdist/[22m[36mposition-
|
|
51
|
+
[2mdist/[22m[36mposition-CFc9RsSn.js [39m[1m[2m 2.25 kB[22m[1m[22m[2m │ gzip: 1.06 kB[22m
|
|
52
52
|
[2mdist/[22m[36mxy-CrgPnICw.js [39m[1m[2m 2.61 kB[22m[1m[22m[2m │ gzip: 1.05 kB[22m
|
|
53
|
-
[2mdist/[22m[36mlocation-
|
|
54
|
-
[2mdist/[22m[36mindex-
|
|
55
|
-
[2mdist/[22m[36mindex-
|
|
56
|
-
[2mdist/[22m[36mdeep.js [39m[1m[2m 3.
|
|
57
|
-
[2mdist/[22m[
|
|
58
|
-
[2mdist/[22m[
|
|
59
|
-
[2mdist/[22m[
|
|
60
|
-
[2mdist/[22m[36mindex.js [39m[1m[2m 8.
|
|
61
|
-
[2mdist/[22m[36mseries-
|
|
62
|
-
[vite:dts] Declaration files built in
|
|
53
|
+
[2mdist/[22m[36mlocation-CI9x53qR.js [39m[1m[2m 2.80 kB[22m[1m[22m[2m │ gzip: 1.16 kB[22m
|
|
54
|
+
[2mdist/[22m[36mindex-HQonyH7n.js [39m[1m[2m 2.90 kB[22m[1m[22m[2m │ gzip: 1.14 kB[22m
|
|
55
|
+
[2mdist/[22m[36mindex-BBa2mWG1.js [39m[1m[2m 2.95 kB[22m[1m[22m[2m │ gzip: 1.12 kB[22m
|
|
56
|
+
[2mdist/[22m[36mdeep.js [39m[1m[2m 3.23 kB[22m[1m[22m[2m │ gzip: 1.28 kB[22m
|
|
57
|
+
[2mdist/[22m[36mbox-DVCNGsJG.js [39m[1m[2m 6.14 kB[22m[1m[22m[2m │ gzip: 2.18 kB[22m
|
|
58
|
+
[2mdist/[22m[36mbounds-CFI9wDXn.js [39m[1m[2m 6.44 kB[22m[1m[22m[2m │ gzip: 2.04 kB[22m
|
|
59
|
+
[2mdist/[22m[36mscale-DNQE1LMm.js [39m[1m[2m 6.63 kB[22m[1m[22m[2m │ gzip: 1.99 kB[22m
|
|
60
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m 8.23 kB[22m[1m[22m[2m │ gzip: 3.10 kB[22m
|
|
61
|
+
[2mdist/[22m[36mseries-sjWkW8qe.js [39m[1m[2m60.46 kB[22m[1m[22m[2m │ gzip: 13.45 kB[22m
|
|
62
|
+
[vite:dts] Declaration files built in 3824ms.
|
|
63
63
|
|
|
64
64
|
Generated an empty chunk: "destructor".
|
|
65
65
|
[2mdist/[22m[36mdestructor.cjs [39m[1m[2m 0.01 kB[22m[1m[22m[2m │ gzip: 0.03 kB[22m
|
|
@@ -87,27 +87,27 @@ Generated an empty chunk: "destructor".
|
|
|
87
87
|
[2mdist/[22m[36msearch.cjs [39m[1m[2m 0.25 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m
|
|
88
88
|
[2mdist/[22m[36mrecord.cjs [39m[1m[2m 0.25 kB[22m[1m[22m[2m │ gzip: 0.20 kB[22m
|
|
89
89
|
[2mdist/[22m[36mdebounce.cjs [39m[1m[2m 0.33 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m
|
|
90
|
-
[2mdist/[22m[36mdirection-
|
|
91
|
-
[2mdist/[22m[36mtelem.cjs [39m[1m[2m 0.54 kB[22m[1m[22m[2m │ gzip: 0.
|
|
90
|
+
[2mdist/[22m[36mdirection-D7qoo_GJ.cjs [39m[1m[2m 0.53 kB[22m[1m[22m[2m │ gzip: 0.34 kB[22m
|
|
91
|
+
[2mdist/[22m[36mtelem.cjs [39m[1m[2m 0.54 kB[22m[1m[22m[2m │ gzip: 0.28 kB[22m
|
|
92
92
|
[2mdist/[22m[36mspatial.cjs [39m[1m[2m 0.63 kB[22m[1m[22m[2m │ gzip: 0.33 kB[22m
|
|
93
|
-
[2mdist/[22m[36mexternal-
|
|
94
|
-
[2mdist/[22m[36mzodutil-
|
|
93
|
+
[2mdist/[22m[36mexternal-B3XSLDq5.cjs [39m[1m[2m 0.68 kB[22m[1m[22m[2m │ gzip: 0.45 kB[22m
|
|
94
|
+
[2mdist/[22m[36mzodutil-C6RYzvXd.cjs [39m[1m[2m 0.72 kB[22m[1m[22m[2m │ gzip: 0.47 kB[22m
|
|
95
95
|
[2mdist/[22m[36mworker.cjs [39m[1m[2m 0.94 kB[22m[1m[22m[2m │ gzip: 0.49 kB[22m
|
|
96
96
|
[2mdist/[22m[36mobserve.cjs [39m[1m[2m 1.00 kB[22m[1m[22m[2m │ gzip: 0.47 kB[22m
|
|
97
97
|
[2mdist/[22m[36murl.cjs [39m[1m[2m 1.10 kB[22m[1m[22m[2m │ gzip: 0.60 kB[22m
|
|
98
98
|
[2mdist/[22m[36mdimensions-zMcb9pMk.cjs [39m[1m[2m 1.17 kB[22m[1m[22m[2m │ gzip: 0.58 kB[22m
|
|
99
|
-
[2mdist/[22m[36mpath-
|
|
100
|
-
[2mdist/[22m[36mindex-
|
|
99
|
+
[2mdist/[22m[36mpath-BBCx3K6k.cjs [39m[1m[2m 1.26 kB[22m[1m[22m[2m │ gzip: 0.61 kB[22m
|
|
100
|
+
[2mdist/[22m[36mindex-YsO0EMN8.cjs [39m[1m[2m 1.34 kB[22m[1m[22m[2m │ gzip: 0.72 kB[22m
|
|
101
101
|
[2mdist/[22m[36mbase-B48bPNx5.cjs [39m[1m[2m 1.38 kB[22m[1m[22m[2m │ gzip: 0.57 kB[22m
|
|
102
|
-
[2mdist/[22m[36mposition-
|
|
102
|
+
[2mdist/[22m[36mposition-DKhPhvPh.cjs [39m[1m[2m 1.71 kB[22m[1m[22m[2m │ gzip: 0.94 kB[22m
|
|
103
103
|
[2mdist/[22m[36mxy-cP-FXJtR.cjs [39m[1m[2m 2.00 kB[22m[1m[22m[2m │ gzip: 0.96 kB[22m
|
|
104
104
|
[2mdist/[22m[36mindex-h-QAL9T1.cjs [39m[1m[2m 2.23 kB[22m[1m[22m[2m │ gzip: 1.02 kB[22m
|
|
105
|
-
[2mdist/[22m[36mindex-
|
|
106
|
-
[2mdist/[22m[36mlocation-
|
|
107
|
-
[2mdist/[22m[36mdeep.cjs [39m[1m[2m 2.39 kB[22m[1m[22m[2m │ gzip: 1.
|
|
108
|
-
[2mdist/[22m[36mscale-
|
|
109
|
-
[2mdist/[22m[36mbox-
|
|
110
|
-
[2mdist/[22m[36mbounds-
|
|
111
|
-
[2mdist/[22m[36mindex.cjs [39m[1m[2m 6.
|
|
112
|
-
[2mdist/[22m[36mseries-
|
|
113
|
-
[32m✓ built in 4.
|
|
105
|
+
[2mdist/[22m[36mindex-CYxQwEdX.cjs [39m[1m[2m 2.30 kB[22m[1m[22m[2m │ gzip: 1.01 kB[22m
|
|
106
|
+
[2mdist/[22m[36mlocation-DetomF8Z.cjs [39m[1m[2m 2.37 kB[22m[1m[22m[2m │ gzip: 1.04 kB[22m
|
|
107
|
+
[2mdist/[22m[36mdeep.cjs [39m[1m[2m 2.39 kB[22m[1m[22m[2m │ gzip: 1.08 kB[22m
|
|
108
|
+
[2mdist/[22m[36mscale-CT61XD_X.cjs [39m[1m[2m 4.22 kB[22m[1m[22m[2m │ gzip: 1.56 kB[22m
|
|
109
|
+
[2mdist/[22m[36mbox-Mf8E1Ypp.cjs [39m[1m[2m 4.75 kB[22m[1m[22m[2m │ gzip: 1.95 kB[22m
|
|
110
|
+
[2mdist/[22m[36mbounds-DzCDHgdE.cjs [39m[1m[2m 4.83 kB[22m[1m[22m[2m │ gzip: 1.78 kB[22m
|
|
111
|
+
[2mdist/[22m[36mindex.cjs [39m[1m[2m 6.78 kB[22m[1m[22m[2m │ gzip: 2.67 kB[22m
|
|
112
|
+
[2mdist/[22m[36mseries-DWLXo7J6.cjs [39m[1m[2m34.64 kB[22m[1m[22m[2m │ gzip: 9.30 kB[22m
|
|
113
|
+
[32m✓ built in 4.35s[39m
|
package/dist/binary.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-CYxQwEdX.cjs");exports.binary=e.encoder;
|
package/dist/binary.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { j as
|
|
1
|
+
import { j as h } from "./base-DnZzEvvz.js";
|
|
2
2
|
const c = (e) => typeof e == "bigint" || e instanceof BigInt, m = (e, r) => c(e) ? e.valueOf() - BigInt(r.valueOf().valueOf()) : e.valueOf() - Number(r.valueOf()), b = (e, r) => c(e) ? e.valueOf() + BigInt(r.valueOf().valueOf()) : e + Number(r.valueOf()), x = (e, r, n = 1e-4) => Math.abs(e - r) < n, O = (e, r) => c(e) ? e === BigInt(r.valueOf().valueOf()) : e === Number(r.valueOf()), _ = (e) => {
|
|
3
|
-
const r =
|
|
3
|
+
const r = 10 ** Math.floor(Math.log10(e));
|
|
4
4
|
return Math.round(e / r) * r;
|
|
5
|
-
},
|
|
5
|
+
}, y = (e, r) => c(e) ? e.valueOf() < BigInt(r.valueOf()) ? e : BigInt(r.valueOf()) : e.valueOf() < Number(r.valueOf()) ? e : Number(r.valueOf()), N = (e, r) => c(e) ? e.valueOf() > BigInt(r.valueOf()) ? e : BigInt(r.valueOf()) : e.valueOf() > Number(r.valueOf()) ? e : Number(r.valueOf()), B = (e) => c(e) || e instanceof BigInt ? e.valueOf() < 0n ? -e : e : e.valueOf() < 0 ? -e : e, M = (e, r) => c(e) ? e.valueOf() * BigInt(r.valueOf()) : e.valueOf() * Number(r.valueOf()), j = (e, r) => c(e) ? e.valueOf() / BigInt(r.valueOf()) : e.valueOf() / Number(r.valueOf()), W = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6
6
|
__proto__: null,
|
|
7
|
-
abs:
|
|
7
|
+
abs: B,
|
|
8
8
|
add: b,
|
|
9
9
|
closeTo: x,
|
|
10
10
|
div: j,
|
|
11
11
|
equal: O,
|
|
12
12
|
max: N,
|
|
13
|
-
min:
|
|
13
|
+
min: y,
|
|
14
14
|
mult: M,
|
|
15
15
|
roundToNearestMagnitude: _,
|
|
16
16
|
sub: m
|
|
@@ -101,7 +101,7 @@ const c = (e) => typeof e == "bigint" || e instanceof BigInt, m = (e, r) => c(e)
|
|
|
101
101
|
const s = t[f];
|
|
102
102
|
let p;
|
|
103
103
|
if (o > 0 ? p = m(s.upper, u) : p = m(u, s.lower), p > 0) {
|
|
104
|
-
const v =
|
|
104
|
+
const v = y(B(l), p);
|
|
105
105
|
if (u = b(
|
|
106
106
|
u,
|
|
107
107
|
o > 0 ? v : -v
|
|
@@ -140,7 +140,7 @@ const c = (e) => typeof e == "bigint" || e instanceof BigInt, m = (e, r) => c(e)
|
|
|
140
140
|
DECIMAL: z,
|
|
141
141
|
INFINITE: P,
|
|
142
142
|
ZERO: A,
|
|
143
|
-
bounds:
|
|
143
|
+
bounds: h,
|
|
144
144
|
buildInsertionPlan: R,
|
|
145
145
|
clamp: T,
|
|
146
146
|
construct: i,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const M=require("./base-B48bPNx5.cjs"),a=e=>typeof e=="bigint"||e instanceof BigInt,m=(e,r)=>a(e)?e.valueOf()-BigInt(r.valueOf().valueOf()):e.valueOf()-Number(r.valueOf()),b=(e,r)=>a(e)?e.valueOf()+BigInt(r.valueOf().valueOf()):e+Number(r.valueOf()),A=(e,r,n=1e-4)=>Math.abs(e-r)<n,O=(e,r)=>a(e)?e===BigInt(r.valueOf().valueOf()):e===Number(r.valueOf()),j=e=>{const r=10**Math.floor(Math.log10(e));return Math.round(e/r)*r},h=(e,r)=>a(e)?e.valueOf()<BigInt(r.valueOf())?e:BigInt(r.valueOf()):e.valueOf()<Number(r.valueOf())?e:Number(r.valueOf()),P=(e,r)=>a(e)?e.valueOf()>BigInt(r.valueOf())?e:BigInt(r.valueOf()):e.valueOf()>Number(r.valueOf())?e:Number(r.valueOf()),y=e=>a(e)||e instanceof BigInt?e.valueOf()<0n?-e:e:e.valueOf()<0?-e:e,B=(e,r)=>a(e)?e.valueOf()*BigInt(r.valueOf()):e.valueOf()*Number(r.valueOf()),z=(e,r)=>a(e)?e.valueOf()/BigInt(r.valueOf()):e.valueOf()/Number(r.valueOf()),E=Object.freeze(Object.defineProperty({__proto__:null,abs:y,add:b,closeTo:A,div:z,equal:O,max:P,min:h,mult:B,roundToNearestMagnitude:j,sub:m},Symbol.toStringTag,{value:"Module"})),i=(e,r)=>{const n={};if(typeof e=="number"||typeof e=="bigint")r!=null?(n.lower=e,n.upper=r):(n.lower=typeof e=="bigint"?0n:0,n.upper=e);else if(Array.isArray(e)){if(e.length!==2)throw new Error("bounds: expected array of length 2");[n.lower,n.upper]=e}else return g(e);return g(n)},S=Object.freeze({lower:0,upper:0}),T=Object.freeze({lower:-1/0,upper:1/0}),D=Object.freeze({lower:0,upper:1}),F=Object.freeze({lower:-1,upper:1}),L=(e,r)=>{if(e==null&&r==null)return!0;if(e==null||r==null)return!1;const n=i(e),t=i(r);return(n==null?void 0:n.lower)===(t==null?void 0:t.lower)&&(n==null?void 0:n.upper)===(t==null?void 0:t.upper)},g=e=>e.lower>e.upper?{lower:e.upper,upper:e.lower}:e,x=(e,r)=>{const n=i(e);return r<n.lower?n.lower:r>=n.upper?n.upper-(typeof n.upper=="number"?1:1n):r},c=(e,r)=>{const n=i(e);if(typeof r=="number"||typeof r=="bigint")return r>=n.lower&&r<n.upper;const t=i(r);return t.lower>=n.lower&&t.upper<=n.upper},Z=(e,r)=>{const n=i(e),t=i(r);return n.lower===t.lower?!0:t.upper===n.lower||t.lower===n.upper?!1:c(n,t.upper)||c(n,t.lower)||c(t,n.upper)||c(t,n.lower)},w=e=>{const r=i(e);return r.upper-r.lower},q=e=>{const r=i(e);return typeof r.lower=="bigint"?r.lower===0n&&r.upper===0n:r.lower===0&&r.upper===0},C=e=>{const r=w(e);return typeof r=="number"?r===0:r===0n},R=e=>{const r=i(e);return typeof r.lower=="bigint"?!0:Number.isFinite(r.lower)&&Number.isFinite(r.upper)},$=e=>({lower:Math.min(...e.map(r=>i(r).lower)),upper:Math.max(...e.map(r=>i(r).upper))}),k=e=>({lower:Math.max(...e.map(r=>i(r).lower)),upper:Math.min(...e.map(r=>i(r).upper))}),U=e=>{const r=i(e),n=typeof r.lower=="bigint";return Array.from({length:Number(w(e))},(t,o)=>n?r.lower+BigInt(o):r.lower+o)},I=(e,r)=>{const n=e.map(l=>i(l)),t=n.findIndex(l=>c(l,r)||r<l.lower);if(t===-1)return{index:e.length,position:0};const o=n[t];return c(o,r)?{index:t,position:Number(r-o.lower)}:{index:t,position:0}},d={removeBefore:0,removeAfter:0,insertInto:0,deleteInBetween:0},V=(e,r)=>{const n=e.map(p=>i(p)),t=i(r);if(n.length===0)return d;const o=I(n,t.lower),l=I(n,t.upper);if(o.index===e.length)return{...d,insertInto:e.length};if(l.index===0)return{...d,removeAfter:l.position};if(o.index===l.index)return o.position!==0&&l.position!==0?null:{removeAfter:l.position,removeBefore:o.position,insertInto:o.index,deleteInBetween:0};let u=l.index-o.index,f=o.index,s=m(Number(w(n[o.index])),o.position);return o.position!==0?(u-=1,f+=1):s=0,{removeBefore:s,removeAfter:l.position,insertInto:f,deleteInBetween:u}},_=(e,r,n)=>{const t=e.map(f=>i(f)),o=n>0?1:n<0?-1:0;if(o===0)return r;let l=n,u=r;for(;O(l,0)===!1;){const f=t.findIndex(s=>o>0?u>=s.lower&&u<s.upper:u>s.lower&&u<=s.upper);if(f!==-1){const s=t[f];let p;if(o>0?p=m(s.upper,u):p=m(u,s.lower),p>0){const v=h(y(l),p);if(u=b(u,o>0?v:-v),l=m(l,o>0?v:-v),O(l,0))return u;continue}}if(o>0){const s=t.filter(p=>p.lower>u);if(s.length>0)u=s[0].lower;else return u}else{const s=t.filter(p=>p.upper<u);if(s.length>0)u=s[s.length-1].upper;else return u}}return u},N=(e,r,n)=>{const t=e.map(u=>i(u));if(r===n)return typeof r=="bigint"?0n:0;const o=r<n?i([r,n]):i([n,r]);let l=typeof r=="bigint"?0n:0;for(const u of t){const f=u.lower>o.lower?u.lower:o.lower,s=u.upper<o.upper?u.upper:o.upper;if(f<s){const p=s-f;l=l+p}}return l},W=Object.freeze(Object.defineProperty({__proto__:null,CLIP:F,DECIMAL:D,INFINITE:T,ZERO:S,bounds:M.bounds,buildInsertionPlan:V,clamp:x,construct:i,contains:c,distance:N,equals:L,findInsertPosition:I,isFinite:R,isZero:q,linspace:U,makeValid:g,max:$,min:k,overlapsWith:Z,span:w,spanIsZero:C,traverse:_},Symbol.toStringTag,{value:"Module"}));exports.bounds=W;exports.clamp=x;exports.construct=i;exports.contains=c;exports.distance=N;exports.math=E;exports.mult=B;exports.traverse=_;
|
package/dist/bounds.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bounds-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bounds-DzCDHgdE.cjs");exports.bounds=e.bounds;
|
package/dist/bounds.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z as x } from "zod";
|
|
2
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-
|
|
3
|
+
import { c as S, T as E, B as H, b as Z, d as q, e as v, f as N, l as D } from "./location-CI9x53qR.js";
|
|
4
4
|
import { Z as p, O as F, e as $, t as O, c as G, a as C } from "./xy-CrgPnICw.js";
|
|
5
5
|
import { x as j, X as P, Y as X } from "./base-DnZzEvvz.js";
|
|
6
6
|
const h = x.union([x.number(), x.string()]), Y = x.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const u=require("zod"),z=require("./direction-D7qoo_GJ.cjs"),y=require("./location-DetomF8Z.cjs"),i=require("./xy-cP-FXJtR.cjs"),p=require("./base-B48bPNx5.cjs"),O=u.z.union([u.z.number(),u.z.string()]),H=u.z.object({top:O,left:O,width:O,height:O}),S=u.z.object({left:u.z.number(),top:u.z.number(),right:u.z.number(),bottom:u.z.number()}),N=u.z.object({one:p.xy,two:p.xy,root:y.corner}),I={one:i.ZERO,two:i.ZERO,root:y.TOP_LEFT},v={one:i.ZERO,two:i.ONE,root:y.BOTTOM_LEFT},R=(t,o)=>({one:t.one,two:t.two,root:o??t.root}),c=(t,o,e=0,n=0,s)=>{const r={one:{...i.ZERO},two:{...i.ZERO},root:s??y.TOP_LEFT};if(typeof t=="number"){if(typeof o!="number")throw new Error("Box constructor called with invalid arguments");return r.one={x:t,y:o},r.two={x:r.one.x+e,y:r.one.y+n},r}return"one"in t&&"two"in t&&"root"in t?{...t,root:s??t.root}:("getBoundingClientRect"in t&&(t=t.getBoundingClientRect()),"left"in t?(r.one={x:t.left,y:t.top},r.two={x:t.right,y:t.bottom},r):(r.one=t,o==null?r.two={x:r.one.x+e,y:r.one.y+n}:typeof o=="number"?r.two={x:r.one.x+o,y:r.one.y+e}:"width"in o?r.two={x:r.one.x+o.width,y:r.one.y+o.height}:"signedWidth"in o?r.two={x:r.one.x+o.signedWidth,y:r.one.y+o.signedHeight}:r.two=o,r))},D=(t,o,e)=>{const n=c(t);if(typeof o=="string"){if(e==null)throw new Error("Invalid arguments for resize");const s=z.construct(o);return c(n.one,void 0,s==="x"?e:l(n),s==="y"?e:w(n),n.root)}return c(n.one,o,void 0,void 0,n.root)},G=(t,o,e=!0)=>{const n=c(t);let s=(r,x)=>r<x;return e&&(s=(r,x)=>r<=x),"one"in o?s(d(n),d(o))&&s(f(o),f(n))&&s(a(n),a(o))&&s(h(o),h(n)):s(d(n),o.x)&&s(o.x,f(n))&&s(a(n),o.y)&&s(o.y,h(n))},X=(t,o)=>i.equals(t.one,o.one)&&i.equals(t.two,o.two)&&y.xyEquals(t.root,o.root),q=t=>({width:l(t),height:w(t)}),$=t=>({signedWidth:b(t),signedHeight:T(t)}),U=t=>({top:a(t),left:d(t),width:l(t),height:w(t)}),M=(t,o,e=!1)=>{const n=z.construct(o)==="y"?T(t):b(t);return e?n:Math.abs(n)},_=(t,o)=>{const e=c(t);return{x:o.x==="center"?E(e).x:g(e,o.x),y:o.y==="center"?E(e).y:g(e,o.y)}},g=(t,o)=>{const e=c(t),n=y.xyCouple(e.root).includes(o)?Math.min:Math.max;return p.X_LOCATIONS.includes(o)?n(e.one.x,e.two.x):n(e.one.y,e.two.y)},Y=t=>t.one.x===t.two.x&&t.one.y===t.two.y,l=t=>M(t,"x"),w=t=>M(t,"y"),b=t=>{const o=c(t);return o.two.x-o.one.x},T=t=>{const o=c(t);return o.two.y-o.one.y},C=t=>_(t,y.TOP_LEFT),k=t=>_(t,y.TOP_RIGHT),J=t=>_(t,y.BOTTOM_LEFT),K=t=>_(t,y.BOTTOM_RIGHT),f=t=>g(t,"right"),h=t=>g(t,"bottom"),d=t=>g(t,"left"),a=t=>g(t,"top"),E=t=>i.translate(C(t),{x:b(t)/2,y:T(t)/2}),B=t=>{const o=c(t);return o.root.x==="left"?d(o):f(o)},L=t=>{const o=c(t);return o.root.y==="top"?a(o):h(o)},Q=t=>({x:B(t),y:L(t)}),P=t=>{const o=c(t);return{lower:o.one.x,upper:o.two.x}},Z=t=>{const o=c(t);return{lower:o.one.y,upper:o.two.y}},V=(t,o)=>R(t,o),tt=(t,o)=>{const e=c(t),n=p.X_LOCATIONS.includes(o)?"x":p.Y_LOCATIONS.includes(o)?"y":null;if(n===null)throw new Error(`Invalid location: ${y.location}`);const s=o==="top"||o==="left"?Math.min:Math.max,r={...e.one},x={...e.two};return r[n]=s(e.one[n],e.two[n]),x[n]=s(e.one[n],e.two[n]),[r,x]},ot=(t,o)=>{const e=c(t),n=c(o),s=B(n)+(l(n)-l(e))/2,r=L(n)+(w(n)-w(e))/2;return c({x:s,y:r},q(e))},j=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,nt=t=>l(t)/w(t),et=(t,o,e)=>{if(typeof o=="string"){if(e==null)throw new Error("Undefined amount passed into box.translate");const s=z.construct(o);o=i.construct(s,e)}const n=c(t);return c(i.translate(n.one,o),i.translate(n.two,o),void 0,void 0,n.root)},A=(t,o)=>{const e=Math.max(d(t),d(o)),n=Math.max(a(t),a(o)),s=Math.min(f(t),f(o)),r=Math.min(h(t),h(o));return e>s||n>r?I:c({x:e,y:n},{x:s,y:r},void 0,void 0,t.root)},W=t=>l(t)*w(t),rt=(t,o)=>{const e=c(t);return c(i.truncate(e.one,o),i.truncate(e.two,o),void 0,void 0,e.root)},F=(t,o,e,n,s,r)=>{const x={x:t,y:o},m={x:t+e,y:o+n};return s.x!==r.x&&(s.x==="center"?(x.x-=e/2,m.x-=e/2):(x.x-=e,m.x-=e)),s.y!==r.y&&(s.y==="center"?(x.y-=n/2,m.y-=n/2):(x.y-=n,m.y-=n)),c(x,m,void 0,void 0,r)},st=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:v,ZERO:I,area:W,areaIsZero:Y,aspect:nt,bottom:h,bottomLeft:J,bottomRight:K,box:N,center:E,construct:c,constructWithAlternateRoot:F,contains:G,copy:R,css:U,cssBox:H,dim:M,dims:q,domRect:S,edgePoints:tt,equals:X,height:w,intersection:A,isBox:j,left:d,loc:g,positionInCenter:ot,reRoot:V,resize:D,right:f,root:Q,signedDims:$,signedHeight:T,signedWidth:b,top:a,topLeft:C,topRight:k,translate:et,truncate:rt,width:l,x:B,xBounds:P,xyLoc:_,y:L,yBounds:Z},Symbol.toStringTag,{value:"Module"}));exports.area=W;exports.box=st;exports.construct=c;exports.constructWithAlternateRoot=F;exports.height=w;exports.intersection=A;exports.isBox=j;exports.width=l;exports.xBounds=P;exports.xyLoc=_;exports.yBounds=Z;
|
package/dist/box.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./box-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./box-Mf8E1Ypp.cjs");exports.box=e.box;
|
package/dist/box.js
CHANGED
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-YsO0EMN8.cjs");exports.caseconv=e.caseconv;
|
package/dist/caseconv.js
CHANGED
package/dist/compare.js
CHANGED
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-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./identity.cjs"),y=require("./path-BBCx3K6k.cjs"),h=t=>JSON.parse(JSON.stringify(t)),j=(t,...f)=>(f.forEach(i=>{let r=t;const n=i.split(".");n.forEach((s,e)=>{e===n.length-1?delete r[s]:s in r&&(r=r[s])})}),t),d=(t,f,i="")=>{const r={},n=(s,e,o)=>{if(typeof s!=typeof e||s===null||e===null){r[o]=[s,e];return}if(typeof s=="object"&&typeof e=="object")if(Array.isArray(s)&&Array.isArray(e)){if(s.length!==e.length){r[o]=[s,e];return}for(let l=0;l<s.length;l++)n(s[l],e[l],`${o}[${l}]`)}else new Set([...Object.keys(s),...Object.keys(e)]).forEach(c=>{n(s[c],e[c],o!==""?`${o}.${c}`:c)});else s!==e&&(r[o]=[s,e])};return n(t,f,i),r},p=(t,f)=>{const i=Array.isArray(t),r=Array.isArray(f);if(i!==r)return!1;if(i&&r){const e=t,o=f;if(e.length!==o.length)return!1;for(let l=0;l<e.length;l++)if(!p(e[l],o[l]))return!1;return!0}if(t==null||f==null||typeof t!="object"||typeof f!="object")return t===f;if("equals"in t)return t.equals(f);const n=Object.keys(t),s=Object.keys(f);if(n.length!==s.length)return!1;for(const e of n){const o=t[e],l=f[e];if(typeof o=="object"&&typeof l=="object"){if(!p(o,l))return!1}else if(o!==l)return!1}return!0},g=(t,f)=>{if(typeof t!="object"||t==null)return t===f;const i=Object.keys(t),r=Object.keys(f);if(r.length>i.length)return!1;for(const n of r){const s=t[n],e=f[n];if(typeof s=="object"&&typeof e=="object"){if(!g(s,e))return!1}else if(s!==e)return!1}return!0},a=(t,...f)=>{if(f.length===0)return t;const i=f.shift();if(u.isObject(t)&&u.isObject(i))for(const r in i)try{u.isObject(i[r])?(r in t||Object.assign(t,{[r]:{}}),a(t[r],i[r])):Object.assign(t,{[r]:i[r]})}catch(n){throw n instanceof TypeError?new TypeError(`.${r}: ${n.message}`):n}return a(t,...f)},A=(t,f,i)=>{const r=(n,s,e)=>{for(const o in s){const l=s[o];if(e!=null&&e.shape[o]){const c=e.shape[o].safeParse(l);c.success&&(n[o]=c.data)}else typeof l=="object"&&!Array.isArray(l)&&l!==null&&e&&e.shape&&e.shape[o]&&(n[o]||(n[o]={}),r(n[o],l,e.shape[o]))}return n};return r({...t},f,i)},O=Object.freeze(Object.defineProperty({__proto__:null,copy:h,deleteD:j,difference:d,element:y.element,equal:p,get:y.get,has:y.has,override:a,overrideValidItems:A,partialEqual:g,pathsMatch:y.pathsMatch,remove:y.remove,set:y.set,transformPath:y.transformPath},Symbol.toStringTag,{value:"Module"}));exports.deep=O;
|
package/dist/deep.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { isObject as y } from "./identity.js";
|
|
2
|
-
import { e as g, g as
|
|
3
|
-
const
|
|
2
|
+
import { e as g, g as h, h as A, p as j, r as d, s as V, t as E } from "./path-CmnoH3RC.js";
|
|
3
|
+
const $ = (t) => JSON.parse(JSON.stringify(t)), k = (t, ...f) => (f.forEach((i) => {
|
|
4
4
|
let r = t;
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
e ===
|
|
5
|
+
const n = i.split(".");
|
|
6
|
+
n.forEach((s, e) => {
|
|
7
|
+
e === n.length - 1 ? delete r[s] : s in r && (r = r[s]);
|
|
8
8
|
});
|
|
9
|
-
}), t),
|
|
10
|
-
const r = {},
|
|
9
|
+
}), t), O = (t, f, i = "") => {
|
|
10
|
+
const r = {}, n = (s, e, o) => {
|
|
11
11
|
if (typeof s != typeof e || s === null || e === null) {
|
|
12
12
|
r[o] = [s, e];
|
|
13
13
|
return;
|
|
@@ -18,87 +18,85 @@ const V = (t) => JSON.parse(JSON.stringify(t)), E = (t, ...n) => (n.forEach((i)
|
|
|
18
18
|
r[o] = [s, e];
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
for (let l = 0; l < s.length; l++)
|
|
22
|
-
f(s[l], e[l], `${o}[${l}]`);
|
|
21
|
+
for (let l = 0; l < s.length; l++) n(s[l], e[l], `${o}[${l}]`);
|
|
23
22
|
} else
|
|
24
23
|
(/* @__PURE__ */ new Set([...Object.keys(s), ...Object.keys(e)])).forEach((c) => {
|
|
25
|
-
|
|
24
|
+
n(s[c], e[c], o !== "" ? `${o}.${c}` : c);
|
|
26
25
|
});
|
|
27
|
-
else
|
|
28
|
-
s !== e && (r[o] = [s, e]);
|
|
26
|
+
else s !== e && (r[o] = [s, e]);
|
|
29
27
|
};
|
|
30
|
-
return
|
|
31
|
-
}, p = (t,
|
|
32
|
-
const i = Array.isArray(t), r = Array.isArray(
|
|
28
|
+
return n(t, f, i), r;
|
|
29
|
+
}, p = (t, f) => {
|
|
30
|
+
const i = Array.isArray(t), r = Array.isArray(f);
|
|
33
31
|
if (i !== r) return !1;
|
|
34
32
|
if (i && r) {
|
|
35
|
-
const e = t, o =
|
|
33
|
+
const e = t, o = f;
|
|
36
34
|
if (e.length !== o.length) return !1;
|
|
37
35
|
for (let l = 0; l < e.length; l++) if (!p(e[l], o[l])) return !1;
|
|
38
36
|
return !0;
|
|
39
37
|
}
|
|
40
|
-
if (t == null ||
|
|
41
|
-
return t ===
|
|
42
|
-
if ("equals" in t) return t.equals(
|
|
43
|
-
const
|
|
44
|
-
if (
|
|
45
|
-
for (const e of
|
|
46
|
-
const o = t[e], l =
|
|
38
|
+
if (t == null || f == null || typeof t != "object" || typeof f != "object")
|
|
39
|
+
return t === f;
|
|
40
|
+
if ("equals" in t) return t.equals(f);
|
|
41
|
+
const n = Object.keys(t), s = Object.keys(f);
|
|
42
|
+
if (n.length !== s.length) return !1;
|
|
43
|
+
for (const e of n) {
|
|
44
|
+
const o = t[e], l = f[e];
|
|
47
45
|
if (typeof o == "object" && typeof l == "object") {
|
|
48
46
|
if (!p(o, l)) return !1;
|
|
49
47
|
} else if (o !== l) return !1;
|
|
50
48
|
}
|
|
51
49
|
return !0;
|
|
52
|
-
}, a = (t,
|
|
53
|
-
if (typeof t != "object" || t == null) return t ===
|
|
54
|
-
const i = Object.keys(t), r = Object.keys(
|
|
50
|
+
}, a = (t, f) => {
|
|
51
|
+
if (typeof t != "object" || t == null) return t === f;
|
|
52
|
+
const i = Object.keys(t), r = Object.keys(f);
|
|
55
53
|
if (r.length > i.length) return !1;
|
|
56
|
-
for (const
|
|
57
|
-
const s = t[
|
|
54
|
+
for (const n of r) {
|
|
55
|
+
const s = t[n], e = f[n];
|
|
58
56
|
if (typeof s == "object" && typeof e == "object") {
|
|
59
57
|
if (!a(s, e)) return !1;
|
|
60
58
|
} else if (s !== e) return !1;
|
|
61
59
|
}
|
|
62
60
|
return !0;
|
|
63
|
-
}, u = (t, ...
|
|
64
|
-
if (
|
|
65
|
-
const i =
|
|
61
|
+
}, u = (t, ...f) => {
|
|
62
|
+
if (f.length === 0) return t;
|
|
63
|
+
const i = f.shift();
|
|
66
64
|
if (y(t) && y(i))
|
|
67
65
|
for (const r in i)
|
|
68
66
|
try {
|
|
69
67
|
y(i[r]) ? (r in t || Object.assign(t, { [r]: {} }), u(t[r], i[r])) : Object.assign(t, { [r]: i[r] });
|
|
70
|
-
} catch (
|
|
71
|
-
throw
|
|
68
|
+
} catch (n) {
|
|
69
|
+
throw n instanceof TypeError ? new TypeError(`.${r}: ${n.message}`) : n;
|
|
72
70
|
}
|
|
73
|
-
return u(t, ...
|
|
74
|
-
}, q = (t,
|
|
75
|
-
const r = (
|
|
71
|
+
return u(t, ...f);
|
|
72
|
+
}, q = (t, f, i) => {
|
|
73
|
+
const r = (n, s, e) => {
|
|
76
74
|
for (const o in s) {
|
|
77
75
|
const l = s[o];
|
|
78
76
|
if (e != null && e.shape[o]) {
|
|
79
77
|
const c = e.shape[o].safeParse(l);
|
|
80
|
-
c.success && (
|
|
81
|
-
} else typeof l == "object" && !Array.isArray(l) && l !== null && e && e.shape && e.shape[o] && (
|
|
78
|
+
c.success && (n[o] = c.data);
|
|
79
|
+
} else typeof l == "object" && !Array.isArray(l) && l !== null && e && e.shape && e.shape[o] && (n[o] || (n[o] = {}), r(n[o], l, e.shape[o]));
|
|
82
80
|
}
|
|
83
|
-
return
|
|
81
|
+
return n;
|
|
84
82
|
};
|
|
85
|
-
return r({ ...t },
|
|
83
|
+
return r({ ...t }, f, i);
|
|
86
84
|
}, _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
87
85
|
__proto__: null,
|
|
88
|
-
copy:
|
|
89
|
-
deleteD:
|
|
90
|
-
difference:
|
|
86
|
+
copy: $,
|
|
87
|
+
deleteD: k,
|
|
88
|
+
difference: O,
|
|
91
89
|
element: g,
|
|
92
90
|
equal: p,
|
|
93
|
-
get:
|
|
94
|
-
has:
|
|
91
|
+
get: h,
|
|
92
|
+
has: A,
|
|
95
93
|
override: u,
|
|
96
94
|
overrideValidItems: q,
|
|
97
95
|
partialEqual: a,
|
|
98
|
-
pathsMatch:
|
|
96
|
+
pathsMatch: j,
|
|
99
97
|
remove: d,
|
|
100
|
-
set:
|
|
101
|
-
transformPath:
|
|
98
|
+
set: V,
|
|
99
|
+
transformPath: E
|
|
102
100
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
103
101
|
export {
|
|
104
102
|
_ as deep
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("./base-B48bPNx5.cjs"),n=i.crudeDirection,t=e=>i.DIRECTIONS.includes(e)?e:i.Y_LOCATIONS.includes(e)?"y":"x",
|
|
1
|
+
"use strict";const i=require("./base-B48bPNx5.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,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;
|
package/dist/direction.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./direction-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./direction-D7qoo_GJ.cjs");exports.direction=e.direction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("zod"),o=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null?"node":typeof window>"u"||window.document===void 0?"webworker":"browser",s=o(),t=["MacOS","Windows","Linux","Docker"],d=i.z.enum(t);let n;const c=()=>{if(typeof window>"u")return;const e=window.navigator.userAgent.toLowerCase();if(e.includes("mac"))return"MacOS";if(e.includes("win"))return"Windows";if(e.includes("linux"))return"Linux"},l=(e={})=>{const{force:r,default:u}=e;return r??n??(n=c(),n??u)},f=Object.freeze(Object.defineProperty({__proto__:null,OPERATING_SYSTEMS:t,RUNTIME:s,detect:o,getOS:l,osZ:d},Symbol.toStringTag,{value:"Module"}));exports.external=f;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as
|
|
2
|
-
const r = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser",
|
|
1
|
+
import { z as u } from "zod";
|
|
2
|
+
const r = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", s = r(), t = ["MacOS", "Windows", "Linux", "Docker"], d = u.enum(t);
|
|
3
3
|
let n;
|
|
4
4
|
const c = () => {
|
|
5
5
|
if (typeof window > "u") return;
|
|
@@ -13,7 +13,7 @@ const c = () => {
|
|
|
13
13
|
}, w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14
14
|
__proto__: null,
|
|
15
15
|
OPERATING_SYSTEMS: t,
|
|
16
|
-
RUNTIME:
|
|
16
|
+
RUNTIME: s,
|
|
17
17
|
detect: r,
|
|
18
18
|
getOS: l,
|
|
19
19
|
osZ: d
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var m = Object.defineProperty;
|
|
2
2
|
var C = (o, e, t) => e in o ? m(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
3
|
var i = (o, e, t) => C(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { s as y, b } from "./index-
|
|
4
|
+
import { s as y, b } from "./index-eue4dSQX.js";
|
|
5
5
|
import { isObject as l } from "./identity.js";
|
|
6
6
|
class f {
|
|
7
7
|
constructor() {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var y=Object.defineProperty;var O=(o,e,t)=>e in o?y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var i=(o,e,t)=>O(o,typeof e!="symbol"?e+"":e,t);const f=require("./index-
|
|
1
|
+
"use strict";var y=Object.defineProperty;var O=(o,e,t)=>e in o?y(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var i=(o,e,t)=>O(o,typeof e!="symbol"?e+"":e,t);const f=require("./index-YsO0EMN8.cjs"),p=require("./identity.cjs");class S{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=JSON.parse(e),n=f.snakeToCamel(r);return t!=null?t.parse(n):n}encodeString(e){const t=f.camelToSnake(e);return JSON.stringify(t,(r,n)=>ArrayBuffer.isView(n)?Array.from(n):p.isObject(n)&&"encode_value"in n?typeof n.value=="bigint"?n.value.toString():n.value:typeof n=="bigint"?n.toString():n)}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||!p.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(n=>{const d=t.map(s=>JSON.stringify(n[s]??""));r.push(d.join(","))}),r.join(`
|
|
2
2
|
`)}decodeString(e,t){const[r,...n]=e.trim().split(`
|
|
3
3
|
`).map(c=>c.trim());if(r.length===0)return t!=null?t.parse({}):{};const d=r.split(",").map(c=>c.trim()),s={};return d.forEach(c=>{s[c]=[]}),n.forEach(c=>{const C=c.split(",").map(u=>u.trim());d.forEach((u,T)=>{const l=this.parseValue(C[T]);l!=null&&s[u].push(l)})}),t!=null?t.parse(s):s}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 h{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 a=new S,E=new g,b=new h,w=[a],m=Object.freeze(Object.defineProperty({__proto__:null,CSVCodec:g,CSV_CODEC:E,ENCODERS:w,JSONCodec:S,JSON_CODEC:a,TEXT_CODEC:b,TextCodec:h},Symbol.toStringTag,{value:"Module"}));exports.JSON_CODEC=a;exports.encoder=m;
|
|
@@ -63,8 +63,7 @@ const m = (e) => e != null && typeof e == "object" && "toString" in e, w = (e) =
|
|
|
63
63
|
} else if (!isNaN(Number(i)) && !isNaN(Number(u))) {
|
|
64
64
|
const c = Number(i) - Number(u);
|
|
65
65
|
if (c !== 0) return c;
|
|
66
|
-
} else
|
|
67
|
-
return isNaN(Number(i)) ? -1 : 1;
|
|
66
|
+
} else return isNaN(Number(i)) ? -1 : 1;
|
|
68
67
|
}
|
|
69
68
|
return r.length - n.length;
|
|
70
69
|
}, F = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const C=e=>{const r=e.replace(/_[a-z]/g,n=>n[1].toUpperCase());return r.length>1&&r[0]===r[0].toUpperCase()&&r[1]===r[1].toUpperCase()||r.length===0?r:r[0].toLowerCase()+r.slice(1)},p=e=>{const r=(n,s=u)=>{if(typeof n=="string")return e(n);if(Array.isArray(n))return n.map(c=>r(c,s));if(!l(n))return n;s=O(s);const f={},m=n;return Object.keys(m).forEach(c=>{let t=m[c];const g=e(c);s.recursive&&(l(t)?y(t,s.keepTypesOnRecursion)||(t=r(t,s)):s.recursiveInArray&&o(t)&&(t=[...t].map(a=>{let i=a;return l(a)?y(i,s.keepTypesOnRecursion)||(i=r(a,s)):o(a)&&(i=r({key:a},s).key),i}))),f[g]=t}),f};return r},k=p(C),v=e=>e.replace(/([a-z0-9])([A-Z])/g,(r,n,s)=>`${n}_${s.toLowerCase()}`),A=p(v),T=e=>e.length===0?e:e[0].toUpperCase()+e.slice(1),u={recursive:!0,recursiveInArray:!0,keepTypesOnRecursion:[Number,String,Uint8Array]},O=(e=u)=>(e.recursive==null?e=u:e.recursiveInArray??(e.recursiveInArray=!1),e),o=e=>e!=null&&Array.isArray(e),l=e=>e!=null&&typeof e=="object"&&!Array.isArray(e),y=(e,r)=>(r||[]).some(n=>e instanceof n),S=Object.freeze(Object.defineProperty({__proto__:null,belongToTypes:y,camelToSnake:A,capitalize:T,defaultOptions:u,isArrayObject:o,isValidObject:l,snakeToCamel:k,validateOptions:O},Symbol.toStringTag,{value:"Module"}));exports.camelToSnake=A;exports.capitalize=T;exports.caseconv=S;exports.snakeToCamel=k;
|
|
@@ -18,15 +18,19 @@ const g = (e) => {
|
|
|
18
18
|
}), f;
|
|
19
19
|
};
|
|
20
20
|
return r;
|
|
21
|
-
}, k = A(g), T = (e) =>
|
|
21
|
+
}, k = A(g), T = (e) => (
|
|
22
|
+
// Don't convert the first character and don't convert a character that is after a
|
|
23
|
+
// non-alphanumeric character
|
|
24
|
+
e.replace(/([a-z0-9])([A-Z])/g, (r, n, s) => `${n}_${s.toLowerCase()}`)
|
|
25
|
+
), C = A(T), v = (e) => e.length === 0 ? e : e[0].toUpperCase() + e.slice(1), u = {
|
|
22
26
|
recursive: !0,
|
|
23
27
|
recursiveInArray: !0,
|
|
24
28
|
keepTypesOnRecursion: [Number, String, Uint8Array]
|
|
25
|
-
}, m = (e = u) => (e.recursive == null ? e = u : e.recursiveInArray
|
|
29
|
+
}, m = (e = u) => (e.recursive == null ? e = u : e.recursiveInArray ?? (e.recursiveInArray = !1), e), o = (e) => e != null && Array.isArray(e), l = (e) => e != null && typeof e == "object" && !Array.isArray(e), y = (e, r) => (r || []).some((n) => e instanceof n), _ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
26
30
|
__proto__: null,
|
|
27
31
|
belongToTypes: y,
|
|
28
|
-
camelToSnake:
|
|
29
|
-
capitalize:
|
|
32
|
+
camelToSnake: C,
|
|
33
|
+
capitalize: v,
|
|
30
34
|
defaultOptions: u,
|
|
31
35
|
isArrayObject: o,
|
|
32
36
|
isValidObject: l,
|
|
@@ -35,7 +39,7 @@ const g = (e) => {
|
|
|
35
39
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
36
40
|
export {
|
|
37
41
|
_ as a,
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
C as b,
|
|
43
|
+
v as c,
|
|
40
44
|
k as s
|
|
41
45
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var x=Object.defineProperty;var _=(e,t,r)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var p=(e,t,r)=>_(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./index-
|
|
1
|
+
"use strict";var x=Object.defineProperty;var _=(e,t,r)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var p=(e,t,r)=>_(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./index-CYxQwEdX.cjs"),O=require("./index-YsO0EMN8.cjs"),L=require("./change-C-YELKx6.cjs"),$=require("./scale-CT61XD_X.cjs"),u=require("./index-h-QAL9T1.cjs"),l=require("zod"),A=require("./debounce.cjs"),P=require("./deep.cjs"),s=require("./series-DWLXo7J6.cjs"),Z=require("./identity.cjs"),C=require("./types-zRwnQ1hc.cjs"),M=require("./bounds-DzCDHgdE.cjs"),D=require("./observe.cjs"),j=require("./record.cjs"),G=require("./external-B3XSLDq5.cjs"),W=require("./search.cjs"),H=require("./box-Mf8E1Ypp.cjs"),V=require("./dimensions-zMcb9pMk.cjs"),I=require("./direction-D7qoo_GJ.cjs"),Q=require("./location-DetomF8Z.cjs"),U=require("./position-DKhPhvPh.cjs"),B=require("./spatial-BOhaO8xN.cjs"),J=require("./xy-cP-FXJtR.cjs"),k=require("./toArray.cjs"),K=require("./unique.cjs"),w=require("./url.cjs"),E=require("./worker.cjs"),F=require("./zodutil-C6RYzvXd.cjs"),d=class d extends Number{};p(d,"Absolute",255),p(d,"Default",1),p(d,"z",l.z.union([l.z.instanceof(d),l.z.number().int().min(0).max(255).transform(t=>new d(t)),l.z.instanceof(Number).transform(t=>new d(t))]));let h=d;const z=l.z.object({name:l.z.string(),key:l.z.string()}),X=e=>l.z.object({subject:z,resource:e,authority:h.z}),Y=(...e)=>t=>t.filter(r=>{let o=!1;return r.to!=null&&(o=e.includes(r.to.resource)),r.from!=null&&!o&&(o=e.includes(r.from.resource)),o}),ee=Object.freeze(Object.defineProperty({__proto__:null,Authority:h,filterTransfersByChannelKey:Y,stateZ:X,subjectZ:z},Symbol.toStringTag,{value:"Module"})),m=class m extends Error{constructor(){super(m.MESSAGE)}matches(t){return typeof t=="string"?t.includes(m.MESSAGE):t instanceof m||t.message.includes(m.MESSAGE)}};p(m,"MESSAGE","canceled");let T=m;const re=new T,te=Object.freeze(Object.defineProperty({__proto__:null,CANCELED:re},Symbol.toStringTag,{value:"Module"})),ne=e=>e?-1:1,q=l.z.string().regex(/^\d+\.\d+\.\d+$/),y=(e,t,r={})=>{r.checkMajor??(r.checkMajor=!0),r.checkMinor??(r.checkMinor=!0),r.checkPatch??(r.checkPatch=!0);const o=q.parse(e),c=q.parse(t),[f,g,b]=o.split(".").map(Number),[i,n,a]=c.split(".").map(Number);if(r.checkMajor){if(f<i)return u.LESS_THAN;if(f>i)return u.GREATER_THAN}if(r.checkMinor){if(g<n)return u.LESS_THAN;if(g>n)return u.GREATER_THAN}if(r.checkPatch){if(b<a)return u.LESS_THAN;if(b>a)return u.GREATER_THAN}return u.EQUAL},oe=(e,t,r={})=>u.isEqualTo(y(e,t,r)),R=(e,t,r={})=>u.isGreaterThan(y(e,t,r)),ie=(e,t,r={})=>u.isLessThan(y(e,t,r)),se=({name:e,migrate:t})=>r=>{try{const o=t(r);return console.log(`${e} migrated: ${r.version} -> ${o.version}`),o}catch(o){throw console.log(`${e} failed to migrate from ${r.version}`),console.error(o),o}},ce=({name:e,migrations:t,targetSchema:r,defaultVersion:o,def:c})=>{const f=Object.keys(t).sort(y).pop();if(f==null)return n=>{if(n.version??(n.version=o),n.version!==c.version)return console.log(`${e} version ${n.version} is newer than latest version of ${c.version}.
|
|
2
2
|
Returning default instead.
|
|
3
3
|
`),c;try{return r!=null?r.parse(n):n}catch(a){return console.log(`${e} failed to parse default. Exiting with default`),console.error(a),c}};const g=Object.keys(t).length;let b=!1;const i=n=>{try{if(g===0||R(n.version,f))return console.log(b?`${e} ${n.version} now up to date`:`${e} version ${n.version} is up to date with target version ${c.version}`),n;const a=n.version,S=t[a],v=S(n);return b=!0,i(v)}catch(a){return console.log(`${e} failed to migrate from ${n.version} to ${f}`),console.error(a),c}};return n=>{try{if(n.version==null)if(o!=null)console.log(`${e} version is null. Setting version to default of ${o}`),n.version=o;else return console.log(`${e} version is null and no default version set. Exiting with default`),c;return i(n)}catch(a){return console.log(`${e} failed to parse final result. Exiting with default`),console.error(a),c}}},ae=Object.freeze(Object.defineProperty({__proto__:null,compareSemVer:y,createMigration:se,migrator:ce,semVerNewer:R,semVerOlder:ie,semVerZ:q,versionsEqual:oe},Symbol.toStringTag,{value:"Module"})),ue=e=>{if(e===void 0||typeof e=="string"||typeof e=="number")return e;if(e.toString===void 0)throw new Error("invalid renderer");return e.toString()},le=e=>Array.isArray(e)?[...e]:typeof e=="object"&&e!==null?{...e}:e,de=(e,t="")=>{const r=e.length;return r===0?t:r===1?e[0]:r===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")}, and ${e[r-1]}`},fe=e=>{const t=e.split(" "),r=new Set,o=t.map(i=>i.charAt(0).toLowerCase()).join("");r.add(o),r.add(o.replace(/(.)(.)/g,"$1_$2"));const c=/\d+/g;e.match(c)&&t.forEach((i,n)=>{if(c.test(i)){const a=t.map((S,v)=>v!==n?S.charAt(0).toLowerCase():S).join("");r.add(a),r.add(a.replace(/(.)(.)/g,"$1_$2"))}});const g=t.map(i=>(i.length>3?i.substring(0,3):i).toLowerCase());return r.add(g.join("")),r.add(g.join("_")),Array.from(r).filter(i=>i.length>=2&&i.length<=12)},ge=Object.freeze(Object.defineProperty({__proto__:null,generateShortIdentifiers:fe,naturalLanguageJoin:de},Symbol.toStringTag,{value:"Module"}));exports.binary=N.encoder;exports.caseconv=O.caseconv;exports.change=L.change;exports.clamp=$.clamp;exports.scale=$.scale;exports.compare=u.compare;exports.isStringer=u.isStringer;exports.primitiveIsZero=u.primitiveIsZero;exports.debounce=A.debounce;exports.throttle=A.throttle;exports.deep=P.deep;exports.DataType=s.DataType;exports.Density=s.Density;exports.MultiSeries=s.MultiSeries;exports.Rate=s.Rate;exports.Series=s.Series;exports.Size=s.Size;exports.TimeRange=s.TimeRange;exports.TimeSpan=s.TimeSpan;exports.TimeStamp=s.TimeStamp;exports.addSamples=s.addSamples;exports.convertDataType=s.convertDataType;exports.id=s.id;exports.isCrudeSeries=s.isCrudeSeries;exports.isTelemValue=s.isTelemValue;exports.typedArrayZ=s.typedArrayZ;exports.isObject=Z.isObject;exports.kv=C.types;exports.bounds=M.bounds;exports.math=M.math;exports.observe=D.observe;exports.getEntries=j.getEntries;exports.unknownRecordZ=j.unknownRecordZ;exports.runtime=G.external;exports.Search=W.Search;exports.box=H.box;exports.dimensions=V.dimensions;exports.direction=I.direction;exports.location=Q.location;exports.position=U.position;exports.spatial=B.spatial;exports.xy=J.xy;exports.nullToArr=k.nullToArr;exports.toArray=k.toArray;exports.unique=K.unique;exports.URL=w.URL;exports.buildQueryString=w.buildQueryString;exports.RoutedWorker=E.RoutedWorker;exports.TypedWorker=E.TypedWorker;exports.createMockWorkers=E.createMockWorkers;exports.zodutil=F.zodutil;exports.control=ee;exports.convertRenderV=ue;exports.errors=te;exports.invert=ne;exports.migrate=ae;exports.shallowCopy=le;exports.strings=ge;
|