@synnaxlabs/x 0.34.0 → 0.35.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 +25 -25
- package/dist/{box-Mf8E1Ypp.cjs → box-BpSX4si6.cjs} +1 -1
- package/dist/{box-DVCNGsJG.js → box-CYXc9-qp.js} +2 -2
- package/dist/box.cjs +1 -1
- package/dist/box.js +1 -1
- package/dist/deep.cjs +1 -1
- package/dist/deep.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +38 -37
- package/dist/location-Cn1ByVTZ.js +95 -0
- package/dist/location-DLP2ZS0o.cjs +1 -0
- package/dist/location.cjs +1 -1
- package/dist/location.js +1 -1
- package/dist/path-1tZLZ4AN.cjs +1 -0
- package/dist/path-DD6ytXzr.js +76 -0
- package/dist/{position-CFc9RsSn.js → position-DJXB-pDS.js} +2 -2
- package/dist/{position-DKhPhvPh.cjs → position-JCN6-sJC.cjs} +1 -1
- package/dist/position.cjs +1 -1
- package/dist/position.js +1 -1
- package/dist/record.cjs +1 -1
- package/dist/record.js +5 -4
- package/dist/{scale-DNQE1LMm.js → scale-Coub2bPH.js} +70 -67
- package/dist/scale-Dj7-5FQQ.cjs +1 -0
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/{series-DWLXo7J6.cjs → series-CAP8K7YO.cjs} +1 -1
- package/dist/{series-sjWkW8qe.js → series-DOxur2pj.js} +5 -5
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +5 -5
- package/dist/src/deep/path.d.ts.map +1 -1
- package/dist/src/record.d.ts +1 -0
- package/dist/src/record.d.ts.map +1 -1
- package/dist/src/record.spec.d.ts +2 -0
- package/dist/src/record.spec.d.ts.map +1 -0
- package/dist/src/spatial/location/location.d.ts +1 -0
- package/dist/src/spatial/location/location.d.ts.map +1 -1
- package/dist/src/spatial/scale/scale.d.ts +17 -1
- package/dist/src/spatial/scale/scale.d.ts.map +1 -1
- package/dist/src/spatial/xy/xy.d.ts +36 -1
- package/dist/src/spatial/xy/xy.d.ts.map +1 -1
- package/dist/src/zodutil/zodutil.d.ts.map +1 -1
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +1 -1
- package/dist/xy-DQdccWlc.js +128 -0
- package/dist/xy-LADI2wVU.cjs +1 -0
- package/dist/xy.cjs +1 -1
- package/dist/xy.js +1 -1
- package/dist/zodutil-BRjUdYAv.cjs +1 -0
- package/dist/{zodutil-Tmuc4CNq.js → zodutil-DI4gVZkT.js} +11 -11
- package/dist/zodutil.cjs +1 -1
- package/dist/zodutil.js +1 -1
- package/package.json +2 -2
- package/src/deep/path.ts +6 -1
- package/src/record.spec.ts +29 -0
- package/src/record.ts +6 -0
- package/src/spatial/location/location.ts +1 -0
- package/src/spatial/scale/scale.spec.ts +62 -51
- package/src/spatial/scale/scale.ts +21 -12
- package/src/spatial/xy/xy.spec.ts +22 -1
- package/src/spatial/xy/xy.ts +101 -5
- package/src/strings/strings.spec.ts +0 -4
- package/src/telem/series.spec.ts +0 -1
- package/src/zodutil/zodutil.ts +4 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/location-CI9x53qR.js +0 -94
- package/dist/location-DetomF8Z.cjs +0 -1
- package/dist/path-BBCx3K6k.cjs +0 -1
- package/dist/path-CmnoH3RC.js +0 -72
- package/dist/scale-CT61XD_X.cjs +0 -1
- package/dist/xy-CrgPnICw.js +0 -89
- package/dist/xy-cP-FXJtR.cjs +0 -1
- package/dist/zodutil-C6RYzvXd.cjs +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @synnaxlabs/x@0.
|
|
2
|
+
> @synnaxlabs/x@0.35.0 build /home/runner/work/synnax/synnax/x/ts
|
|
3
3
|
> tsc --noEmit && vite build
|
|
4
4
|
|
|
5
5
|
[34m Synnax - Production mode[0m
|
|
@@ -30,41 +30,41 @@ computing gzip size...
|
|
|
30
30
|
[2mdist/[22m[36mposition.js [39m[1m[2m 0.08 kB[22m[1m[22m[2m │ gzip: 0.09 kB[22m
|
|
31
31
|
[2mdist/[22m[36midentity.js [39m[1m[2m 0.10 kB[22m[1m[22m[2m │ gzip: 0.11 kB[22m
|
|
32
32
|
[2mdist/[22m[36mtoArray.js [39m[1m[2m 0.15 kB[22m[1m[22m[2m │ gzip: 0.12 kB[22m
|
|
33
|
-
[2mdist/[22m[36mrecord.js [39m[1m[2m 0.20 kB[22m[1m[22m[2m │ gzip: 0.17 kB[22m
|
|
34
33
|
[2mdist/[22m[36msearch.js [39m[1m[2m 0.26 kB[22m[1m[22m[2m │ gzip: 0.19 kB[22m
|
|
35
34
|
[2mdist/[22m[36mtypes-BpAJW2TM.js [39m[1m[2m 0.27 kB[22m[1m[22m[2m │ gzip: 0.21 kB[22m
|
|
36
35
|
[2mdist/[22m[36mspatial-DozyssiN.js [39m[1m[2m 0.28 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m
|
|
36
|
+
[2mdist/[22m[36mrecord.js [39m[1m[2m 0.29 kB[22m[1m[22m[2m │ gzip: 0.21 kB[22m
|
|
37
37
|
[2mdist/[22m[36mchange-DLl6DccR.js [39m[1m[2m 0.30 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m
|
|
38
38
|
[2mdist/[22m[36mdebounce.js [39m[1m[2m 0.36 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
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
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-
|
|
43
|
+
[2mdist/[22m[36mzodutil-DI4gVZkT.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-
|
|
48
|
+
[2mdist/[22m[36mpath-DD6ytXzr.js [39m[1m[2m 1.79 kB[22m[1m[22m[2m │ gzip: 0.72 kB[22m
|
|
49
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-
|
|
52
|
-
[2mdist/[22m[
|
|
53
|
-
[2mdist/[22m[36mlocation-CI9x53qR.js [39m[1m[2m 2.80 kB[22m[1m[22m[2m │ gzip: 1.16 kB[22m
|
|
51
|
+
[2mdist/[22m[36mposition-DJXB-pDS.js [39m[1m[2m 2.25 kB[22m[1m[22m[2m │ gzip: 1.06 kB[22m
|
|
52
|
+
[2mdist/[22m[36mlocation-Cn1ByVTZ.js [39m[1m[2m 2.81 kB[22m[1m[22m[2m │ gzip: 1.16 kB[22m
|
|
54
53
|
[2mdist/[22m[36mindex-HQonyH7n.js [39m[1m[2m 2.90 kB[22m[1m[22m[2m │ gzip: 1.14 kB[22m
|
|
55
54
|
[2mdist/[22m[36mindex-BBa2mWG1.js [39m[1m[2m 2.95 kB[22m[1m[22m[2m │ gzip: 1.12 kB[22m
|
|
56
55
|
[2mdist/[22m[36mdeep.js [39m[1m[2m 3.23 kB[22m[1m[22m[2m │ gzip: 1.28 kB[22m
|
|
57
|
-
[2mdist/[22m[
|
|
56
|
+
[2mdist/[22m[36mxy-DQdccWlc.js [39m[1m[2m 3.76 kB[22m[1m[22m[2m │ gzip: 1.43 kB[22m
|
|
57
|
+
[2mdist/[22m[36mbox-CYXc9-qp.js [39m[1m[2m 6.14 kB[22m[1m[22m[2m │ gzip: 2.17 kB[22m
|
|
58
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-
|
|
60
|
-
[2mdist/[22m[36mindex.js [39m[1m[2m 8.
|
|
61
|
-
[2mdist/[22m[36mseries-
|
|
62
|
-
[vite:dts] Declaration files built in
|
|
59
|
+
[2mdist/[22m[36mscale-Coub2bPH.js [39m[1m[2m 6.82 kB[22m[1m[22m[2m │ gzip: 2.03 kB[22m
|
|
60
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m 8.26 kB[22m[1m[22m[2m │ gzip: 3.11 kB[22m
|
|
61
|
+
[2mdist/[22m[36mseries-DOxur2pj.js [39m[1m[2m60.46 kB[22m[1m[22m[2m │ gzip: 13.45 kB[22m
|
|
62
|
+
[vite:dts] Declaration files built in 3725ms.
|
|
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
|
|
66
66
|
[2mdist/[22m[36munique.cjs [39m[1m[2m 0.13 kB[22m[1m[22m[2m │ gzip: 0.14 kB[22m
|
|
67
|
-
[2mdist/[22m[36mxy.cjs [39m[1m[2m 0.13 kB[22m[1m[22m[2m │ gzip: 0.
|
|
67
|
+
[2mdist/[22m[36mxy.cjs [39m[1m[2m 0.13 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
68
68
|
[2mdist/[22m[36mbox.cjs [39m[1m[2m 0.14 kB[22m[1m[22m[2m │ gzip: 0.14 kB[22m
|
|
69
69
|
[2mdist/[22m[36mkv.cjs [39m[1m[2m 0.14 kB[22m[1m[22m[2m │ gzip: 0.14 kB[22m
|
|
70
70
|
[2mdist/[22m[36mscale.cjs [39m[1m[2m 0.14 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
@@ -85,29 +85,29 @@ Generated an empty chunk: "destructor".
|
|
|
85
85
|
[2mdist/[22m[36mchange-C-YELKx6.cjs [39m[1m[2m 0.23 kB[22m[1m[22m[2m │ gzip: 0.20 kB[22m
|
|
86
86
|
[2mdist/[22m[36mspatial-BOhaO8xN.cjs [39m[1m[2m 0.24 kB[22m[1m[22m[2m │ gzip: 0.21 kB[22m
|
|
87
87
|
[2mdist/[22m[36msearch.cjs [39m[1m[2m 0.25 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m
|
|
88
|
-
[2mdist/[22m[36mrecord.cjs [39m[1m[2m 0.25 kB[22m[1m[22m[2m │ gzip: 0.20 kB[22m
|
|
89
88
|
[2mdist/[22m[36mdebounce.cjs [39m[1m[2m 0.33 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m
|
|
89
|
+
[2mdist/[22m[36mrecord.cjs [39m[1m[2m 0.33 kB[22m[1m[22m[2m │ gzip: 0.24 kB[22m
|
|
90
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.
|
|
91
|
+
[2mdist/[22m[36mtelem.cjs [39m[1m[2m 0.54 kB[22m[1m[22m[2m │ gzip: 0.27 kB[22m
|
|
92
92
|
[2mdist/[22m[36mspatial.cjs [39m[1m[2m 0.63 kB[22m[1m[22m[2m │ gzip: 0.33 kB[22m
|
|
93
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-
|
|
94
|
+
[2mdist/[22m[36mzodutil-BRjUdYAv.cjs [39m[1m[2m 0.72 kB[22m[1m[22m[2m │ gzip: 0.46 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-BBCx3K6k.cjs [39m[1m[2m 1.26 kB[22m[1m[22m[2m │ gzip: 0.61 kB[22m
|
|
100
99
|
[2mdist/[22m[36mindex-YsO0EMN8.cjs [39m[1m[2m 1.34 kB[22m[1m[22m[2m │ gzip: 0.72 kB[22m
|
|
100
|
+
[2mdist/[22m[36mpath-1tZLZ4AN.cjs [39m[1m[2m 1.35 kB[22m[1m[22m[2m │ gzip: 0.66 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-
|
|
103
|
-
[2mdist/[22m[36mxy-cP-FXJtR.cjs [39m[1m[2m 2.00 kB[22m[1m[22m[2m │ gzip: 0.96 kB[22m
|
|
102
|
+
[2mdist/[22m[36mposition-JCN6-sJC.cjs [39m[1m[2m 1.71 kB[22m[1m[22m[2m │ gzip: 0.94 kB[22m
|
|
104
103
|
[2mdist/[22m[36mindex-h-QAL9T1.cjs [39m[1m[2m 2.23 kB[22m[1m[22m[2m │ gzip: 1.02 kB[22m
|
|
105
104
|
[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
105
|
[2mdist/[22m[36mdeep.cjs [39m[1m[2m 2.39 kB[22m[1m[22m[2m │ gzip: 1.08 kB[22m
|
|
108
|
-
[2mdist/[22m[
|
|
109
|
-
[2mdist/[22m[
|
|
106
|
+
[2mdist/[22m[36mlocation-DLP2ZS0o.cjs [39m[1m[2m 2.40 kB[22m[1m[22m[2m │ gzip: 1.05 kB[22m
|
|
107
|
+
[2mdist/[22m[36mxy-LADI2wVU.cjs [39m[1m[2m 2.75 kB[22m[1m[22m[2m │ gzip: 1.28 kB[22m
|
|
108
|
+
[2mdist/[22m[36mscale-Dj7-5FQQ.cjs [39m[1m[2m 4.37 kB[22m[1m[22m[2m │ gzip: 1.60 kB[22m
|
|
109
|
+
[2mdist/[22m[36mbox-BpSX4si6.cjs [39m[1m[2m 4.75 kB[22m[1m[22m[2m │ gzip: 1.96 kB[22m
|
|
110
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.
|
|
112
|
-
[2mdist/[22m[36mseries-
|
|
113
|
-
[32m✓ built in 4.
|
|
111
|
+
[2mdist/[22m[36mindex.cjs [39m[1m[2m 6.81 kB[22m[1m[22m[2m │ gzip: 2.68 kB[22m
|
|
112
|
+
[2mdist/[22m[36mseries-CAP8K7YO.cjs [39m[1m[2m34.64 kB[22m[1m[22m[2m │ gzip: 9.30 kB[22m
|
|
113
|
+
[32m✓ built in 4.26s[39m
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("zod"),z=require("./direction-D7qoo_GJ.cjs"),y=require("./location-
|
|
1
|
+
"use strict";const u=require("zod"),z=require("./direction-D7qoo_GJ.cjs"),y=require("./location-DLP2ZS0o.cjs"),i=require("./xy-LADI2wVU.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;
|
|
@@ -1,7 +1,7 @@
|
|
|
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-
|
|
4
|
-
import { Z as p, O as F, e as $, t as O, c as G, a as C } from "./xy-
|
|
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-Cn1ByVTZ.js";
|
|
4
|
+
import { Z as p, O as F, e as $, t as O, c as G, a as C } from "./xy-DQdccWlc.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({
|
|
7
7
|
top: h,
|
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-BpSX4si6.cjs");exports.box=e.box;
|
package/dist/box.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-1tZLZ4AN.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,5 +1,5 @@
|
|
|
1
1
|
import { isObject as y } from "./identity.js";
|
|
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-
|
|
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-DD6ytXzr.js";
|
|
3
3
|
const $ = (t) => JSON.parse(JSON.stringify(t)), k = (t, ...f) => (f.forEach((i) => {
|
|
4
4
|
let r = t;
|
|
5
5
|
const n = i.split(".");
|
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
|
|
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 b=(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"),A=require("./scale-Dj7-5FQQ.cjs"),u=require("./index-h-QAL9T1.cjs"),l=require("zod"),M=require("./debounce.cjs"),P=require("./deep.cjs"),s=require("./series-CAP8K7YO.cjs"),Z=require("./identity.cjs"),C=require("./types-zRwnQ1hc.cjs"),j=require("./bounds-DzCDHgdE.cjs"),D=require("./observe.cjs"),E=require("./record.cjs"),G=require("./external-B3XSLDq5.cjs"),V=require("./search.cjs"),W=require("./box-BpSX4si6.cjs"),H=require("./dimensions-zMcb9pMk.cjs"),I=require("./direction-D7qoo_GJ.cjs"),Q=require("./location-DLP2ZS0o.cjs"),U=require("./position-JCN6-sJC.cjs"),B=require("./spatial-BOhaO8xN.cjs"),J=require("./xy-LADI2wVU.cjs"),k=require("./toArray.cjs"),K=require("./unique.cjs"),w=require("./url.cjs"),$=require("./worker.cjs"),F=require("./zodutil-BRjUdYAv.cjs"),d=class d extends Number{};b(d,"Absolute",255),b(d,"Default",1),b(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)}};b(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,p]=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(p<a)return u.LESS_THAN;if(p>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
|
-
`),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
|
|
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 p=!1;const i=n=>{try{if(g===0||R(n.version,f))return console.log(p?`${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 p=!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=A.clamp;exports.scale=A.scale;exports.compare=u.compare;exports.isStringer=u.isStringer;exports.primitiveIsZero=u.primitiveIsZero;exports.debounce=M.debounce;exports.throttle=M.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=j.bounds;exports.math=j.math;exports.observe=D.observe;exports.getEntries=E.getEntries;exports.mapValues=E.mapValues;exports.unknownRecordZ=E.unknownRecordZ;exports.runtime=G.external;exports.Search=V.Search;exports.box=W.box;exports.dimensions=H.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=$.RoutedWorker;exports.TypedWorker=$.TypedWorker;exports.createMockWorkers=$.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;
|
package/dist/index.js
CHANGED
|
@@ -4,32 +4,32 @@ var p = (e, t, r) => T(e, typeof t != "symbol" ? t + "" : t, r);
|
|
|
4
4
|
import { e as X } from "./index-BBa2mWG1.js";
|
|
5
5
|
import { a as ee } from "./index-eue4dSQX.js";
|
|
6
6
|
import { c as te } from "./change-DLl6DccR.js";
|
|
7
|
-
import { c as ne, s as se } from "./scale-
|
|
7
|
+
import { c as ne, s as se } from "./scale-Coub2bPH.js";
|
|
8
8
|
import { L as S, G as y, E as w, i as A, a as k, b as O } from "./index-HQonyH7n.js";
|
|
9
9
|
import { c as ae, d as ce, p as le } from "./index-HQonyH7n.js";
|
|
10
10
|
import { z as c } from "zod";
|
|
11
11
|
import { debounce as ue, throttle as me } from "./debounce.js";
|
|
12
12
|
import { deep as pe } from "./deep.js";
|
|
13
|
-
import { d as be, D as he, M as xe, R as Se, S as ye, e as $e, c as ve, b as Ee, T as Me, a as je, g as Te, h as we, i as Ae, f as ke, t as Oe } from "./series-
|
|
13
|
+
import { d as be, D as he, M as xe, R as Se, S as ye, e as $e, c as ve, b as Ee, T as Me, a as je, g as Te, h as we, i as Ae, f as ke, t as Oe } from "./series-DOxur2pj.js";
|
|
14
14
|
import { isObject as _e } from "./identity.js";
|
|
15
15
|
import { t as Ne } from "./types-BpAJW2TM.js";
|
|
16
16
|
import { b as Pe, f as Ge } from "./bounds-CFI9wDXn.js";
|
|
17
17
|
import { observe as De } from "./observe.js";
|
|
18
|
-
import { getEntries as Ie, unknownRecordZ as
|
|
19
|
-
import { e as
|
|
20
|
-
import { Search as
|
|
21
|
-
import { b as
|
|
22
|
-
import { d as
|
|
23
|
-
import { d as
|
|
24
|
-
import { l as
|
|
25
|
-
import { p as
|
|
26
|
-
import { s as
|
|
27
|
-
import { x as
|
|
28
|
-
import { nullToArr as
|
|
29
|
-
import { unique as
|
|
30
|
-
import { URL as
|
|
31
|
-
import { RoutedWorker as
|
|
32
|
-
import { z as
|
|
18
|
+
import { getEntries as Ve, mapValues as Ie, unknownRecordZ as We } from "./record.js";
|
|
19
|
+
import { e as Be } from "./external-sVtvYJS6.js";
|
|
20
|
+
import { Search as Qe } from "./search.js";
|
|
21
|
+
import { b as Je } from "./box-CYXc9-qp.js";
|
|
22
|
+
import { d as Fe } from "./dimensions-D-1PnJVI.js";
|
|
23
|
+
import { d as Ye } from "./direction-CScbfCdT.js";
|
|
24
|
+
import { l as rr } from "./location-Cn1ByVTZ.js";
|
|
25
|
+
import { p as or } from "./position-DJXB-pDS.js";
|
|
26
|
+
import { s as sr } from "./spatial-DozyssiN.js";
|
|
27
|
+
import { x as ar } from "./xy-DQdccWlc.js";
|
|
28
|
+
import { nullToArr as lr, toArray as fr } from "./toArray.js";
|
|
29
|
+
import { unique as mr } from "./unique.js";
|
|
30
|
+
import { URL as pr, buildQueryString as gr } from "./url.js";
|
|
31
|
+
import { RoutedWorker as hr, TypedWorker as xr, createMockWorkers as Sr } from "./worker.js";
|
|
32
|
+
import { z as $r } from "./zodutil-DI4gVZkT.js";
|
|
33
33
|
const l = class l extends Number {
|
|
34
34
|
};
|
|
35
35
|
p(l, "Absolute", 255), p(l, "Default", 1), p(l, "z", c.union([
|
|
@@ -189,20 +189,20 @@ export {
|
|
|
189
189
|
he as Density,
|
|
190
190
|
xe as MultiSeries,
|
|
191
191
|
Se as Rate,
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
hr as RoutedWorker,
|
|
193
|
+
Qe as Search,
|
|
194
194
|
ye as Series,
|
|
195
195
|
$e as Size,
|
|
196
196
|
ve as TimeRange,
|
|
197
197
|
Ee as TimeSpan,
|
|
198
198
|
Me as TimeStamp,
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
xr as TypedWorker,
|
|
200
|
+
pr as URL,
|
|
201
201
|
je as addSamples,
|
|
202
202
|
X as binary,
|
|
203
203
|
Pe as bounds,
|
|
204
|
-
|
|
205
|
-
|
|
204
|
+
Je as box,
|
|
205
|
+
gr as buildQueryString,
|
|
206
206
|
ee as caseconv,
|
|
207
207
|
te as change,
|
|
208
208
|
ne as clamp,
|
|
@@ -210,13 +210,13 @@ export {
|
|
|
210
210
|
W as control,
|
|
211
211
|
Te as convertDataType,
|
|
212
212
|
Q as convertRenderV,
|
|
213
|
-
|
|
213
|
+
Sr as createMockWorkers,
|
|
214
214
|
ue as debounce,
|
|
215
215
|
pe as deep,
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
Fe as dimensions,
|
|
217
|
+
Ye as direction,
|
|
218
218
|
q as errors,
|
|
219
|
-
|
|
219
|
+
Ve as getEntries,
|
|
220
220
|
we as id,
|
|
221
221
|
B as invert,
|
|
222
222
|
Ae as isCrudeSeries,
|
|
@@ -224,23 +224,24 @@ export {
|
|
|
224
224
|
ce as isStringer,
|
|
225
225
|
ke as isTelemValue,
|
|
226
226
|
Ne as kv,
|
|
227
|
-
|
|
227
|
+
rr as location,
|
|
228
|
+
Ie as mapValues,
|
|
228
229
|
Ge as math,
|
|
229
230
|
H as migrate,
|
|
230
|
-
|
|
231
|
+
lr as nullToArr,
|
|
231
232
|
De as observe,
|
|
232
|
-
|
|
233
|
+
or as position,
|
|
233
234
|
le as primitiveIsZero,
|
|
234
|
-
|
|
235
|
+
Be as runtime,
|
|
235
236
|
se as scale,
|
|
236
237
|
U as shallowCopy,
|
|
237
|
-
|
|
238
|
+
sr as spatial,
|
|
238
239
|
J as strings,
|
|
239
240
|
me as throttle,
|
|
240
|
-
|
|
241
|
+
fr as toArray,
|
|
241
242
|
Oe as typedArrayZ,
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
mr as unique,
|
|
244
|
+
We as unknownRecordZ,
|
|
245
|
+
ar as xy,
|
|
246
|
+
$r as zodutil
|
|
246
247
|
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { z as O } from "zod";
|
|
2
|
+
import { c as m } from "./index-eue4dSQX.js";
|
|
3
|
+
import { e as a, f, y, g, D as C, C as z, X as L, Y as h, l as S, h as d } from "./base-DnZzEvvz.js";
|
|
4
|
+
const N = a, R = y, I = f, X = {
|
|
5
|
+
top: "bottom",
|
|
6
|
+
right: "left",
|
|
7
|
+
bottom: "top",
|
|
8
|
+
left: "right",
|
|
9
|
+
center: "center"
|
|
10
|
+
}, Y = {
|
|
11
|
+
top: "left",
|
|
12
|
+
right: "top",
|
|
13
|
+
bottom: "right",
|
|
14
|
+
left: "bottom",
|
|
15
|
+
center: "center"
|
|
16
|
+
}, A = g, r = (t) => t instanceof String || !C.includes(t) ? t : t === "x" ? "left" : "top", P = (t) => X[r(t)], k = (t) => Y[r(t)], s = (t) => {
|
|
17
|
+
const o = r(t);
|
|
18
|
+
return o === "top" || o === "bottom" ? "y" : "x";
|
|
19
|
+
}, w = O.object({
|
|
20
|
+
x: a.or(f),
|
|
21
|
+
y: y.or(f)
|
|
22
|
+
}), M = O.object({ x: a, y }), T = Object.freeze({ x: "left", y: "top" }), b = Object.freeze({ x: "right", y: "top" }), l = Object.freeze({ x: "left", y: "bottom" }), u = Object.freeze({ x: "right", y: "bottom" }), x = Object.freeze({ x: "center", y: "center" }), p = Object.freeze({ x: "center", y: "top" }), _ = Object.freeze({ x: "center", y: "bottom" }), E = Object.freeze({ x: "right", y: "center" }), j = Object.freeze({ x: "left", y: "center" }), $ = Object.freeze([
|
|
23
|
+
j,
|
|
24
|
+
E,
|
|
25
|
+
p,
|
|
26
|
+
_,
|
|
27
|
+
T,
|
|
28
|
+
b,
|
|
29
|
+
l,
|
|
30
|
+
u,
|
|
31
|
+
x
|
|
32
|
+
]), B = (t, o) => t.x === o.x && t.y === o.y, D = (t, o) => {
|
|
33
|
+
if (typeof o == "object") {
|
|
34
|
+
let e = !0;
|
|
35
|
+
return "x" in o && (t.x === o.x || (e = !1)), "y" in o && (t.y === o.y || (e = !1)), e;
|
|
36
|
+
}
|
|
37
|
+
return t.x === o || t.y === o;
|
|
38
|
+
}, F = (t) => [t.x, t.y], i = (t) => s(r(t)) === "x", G = (t) => s(r(t)) === "y", H = (t) => `${t.x}${m(t.y)}`, q = (t, o) => {
|
|
39
|
+
let e, n;
|
|
40
|
+
if (typeof t == "object" && "x" in t ? (e = t.x, n = t.y) : (e = r(t), n = r(o ?? t)), s(e) === s(n) && e !== "center" && n !== "center")
|
|
41
|
+
throw new Error(
|
|
42
|
+
`[XYLocation] - encountered two locations with the same direction: ${e.toString()} - ${n.toString()}`
|
|
43
|
+
);
|
|
44
|
+
const c = { ...x };
|
|
45
|
+
return e === "center" ? i(n) ? [c.x, c.y] = [n, e] : [c.x, c.y] = [e, n] : n === "center" ? i(e) ? [c.x, c.y] = [e, n] : [c.x, c.y] = [n, e] : i(e) ? [c.x, c.y] = [e, n] : [c.x, c.y] = [n, e], c;
|
|
46
|
+
}, K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
47
|
+
__proto__: null,
|
|
48
|
+
BOTTOM_CENTER: _,
|
|
49
|
+
BOTTOM_LEFT: l,
|
|
50
|
+
BOTTOM_RIGHT: u,
|
|
51
|
+
CENTER: x,
|
|
52
|
+
CENTER_LOCATIONS: z,
|
|
53
|
+
LEFT_CENTER: j,
|
|
54
|
+
RIGHT_CENTER: E,
|
|
55
|
+
TOP_CENTER: p,
|
|
56
|
+
TOP_LEFT: T,
|
|
57
|
+
TOP_RIGHT: b,
|
|
58
|
+
XY_LOCATIONS: $,
|
|
59
|
+
X_LOCATIONS: L,
|
|
60
|
+
Y_LOCATIONS: h,
|
|
61
|
+
center: I,
|
|
62
|
+
construct: r,
|
|
63
|
+
constructXY: q,
|
|
64
|
+
corner: M,
|
|
65
|
+
crude: A,
|
|
66
|
+
direction: s,
|
|
67
|
+
isX: i,
|
|
68
|
+
isY: G,
|
|
69
|
+
location: S,
|
|
70
|
+
outer: d,
|
|
71
|
+
rotate90: k,
|
|
72
|
+
swap: P,
|
|
73
|
+
x: N,
|
|
74
|
+
xy: w,
|
|
75
|
+
xyCouple: F,
|
|
76
|
+
xyEquals: B,
|
|
77
|
+
xyMatches: D,
|
|
78
|
+
xyToString: H,
|
|
79
|
+
y: R
|
|
80
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
81
|
+
export {
|
|
82
|
+
l as B,
|
|
83
|
+
x as C,
|
|
84
|
+
T,
|
|
85
|
+
$ as X,
|
|
86
|
+
D as a,
|
|
87
|
+
B as b,
|
|
88
|
+
M as c,
|
|
89
|
+
F as d,
|
|
90
|
+
b as e,
|
|
91
|
+
u as f,
|
|
92
|
+
K as l,
|
|
93
|
+
P as s,
|
|
94
|
+
w as x
|
|
95
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("zod"),I=require("./index-YsO0EMN8.cjs"),o=require("./base-B48bPNx5.cjs"),R=o.xLocation,g=o.yLocation,h=o.centerLocation,d={top:"bottom",right:"left",bottom:"top",left:"right",center:"center"},m={top:"left",right:"top",bottom:"right",left:"bottom",center:"center"},A=o.crudeLocation,s=t=>t instanceof String||!o.DIRECTIONS.includes(t)?t:t==="x"?"left":"top",_=t=>d[s(t)],M=t=>m[s(t)],i=t=>{const n=s(t);return n==="top"||n==="bottom"?"y":"x"},E=u.z.object({x:o.xLocation.or(o.centerLocation),y:o.yLocation.or(o.centerLocation)}),l=u.z.object({x:o.xLocation,y:o.yLocation}),O=Object.freeze({x:"left",y:"top"}),f=Object.freeze({x:"right",y:"top"}),x=Object.freeze({x:"left",y:"bottom"}),a=Object.freeze({x:"right",y:"bottom"}),T=Object.freeze({x:"center",y:"center"}),b=Object.freeze({x:"center",y:"top"}),L=Object.freeze({x:"center",y:"bottom"}),p=Object.freeze({x:"right",y:"center"}),C=Object.freeze({x:"left",y:"center"}),N=Object.freeze([C,p,b,L,O,f,x,a,T]),j=(t,n)=>t.x===n.x&&t.y===n.y,S=(t,n)=>{if(typeof n=="object"){let e=!0;return"x"in n&&(t.x===n.x||(e=!1)),"y"in n&&(t.y===n.y||(e=!1)),e}return t.x===n||t.y===n},z=t=>[t.x,t.y],y=t=>i(s(t))==="x",P=t=>i(s(t))==="y",X=t=>`${t.x}${I.capitalize(t.y)}`,Y=(t,n)=>{let e,c;if(typeof t=="object"&&"x"in t?(e=t.x,c=t.y):(e=s(t),c=s(n??t)),i(e)===i(c)&&e!=="center"&&c!=="center")throw new Error(`[XYLocation] - encountered two locations with the same direction: ${e.toString()} - ${c.toString()}`);const r={...T};return e==="center"?y(c)?[r.x,r.y]=[c,e]:[r.x,r.y]=[e,c]:c==="center"?y(e)?[r.x,r.y]=[e,c]:[r.x,r.y]=[c,e]:y(e)?[r.x,r.y]=[e,c]:[r.x,r.y]=[c,e],r},w=Object.freeze(Object.defineProperty({__proto__:null,BOTTOM_CENTER:L,BOTTOM_LEFT:x,BOTTOM_RIGHT:a,CENTER:T,CENTER_LOCATIONS:o.CENTER_LOCATIONS,LEFT_CENTER:C,RIGHT_CENTER:p,TOP_CENTER:b,TOP_LEFT:O,TOP_RIGHT:f,XY_LOCATIONS:N,X_LOCATIONS:o.X_LOCATIONS,Y_LOCATIONS:o.Y_LOCATIONS,center:h,construct:s,constructXY:Y,corner:l,crude:A,direction:i,isX:y,isY:P,location:o.location,outer:o.outerLocation,rotate90:M,swap:_,x:R,xy:E,xyCouple:z,xyEquals:j,xyMatches:S,xyToString:X,y:g},Symbol.toStringTag,{value:"Module"}));exports.BOTTOM_LEFT=x;exports.BOTTOM_RIGHT=a;exports.CENTER=T;exports.TOP_LEFT=O;exports.TOP_RIGHT=f;exports.XY_LOCATIONS=N;exports.corner=l;exports.location=w;exports.swap=_;exports.xy=E;exports.xyCouple=z;exports.xyEquals=j;exports.xyMatches=S;
|
package/dist/location.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./location-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./location-DLP2ZS0o.cjs");exports.location=o.location;
|
package/dist/location.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=(l,n,t=".")=>{const e=l.split(t);return e.map((s,o)=>{const a=n(s,o,e);return a==null?null:typeof a=="string"?a:a.join(t)}).filter(s=>s!=null).join(t)},c=(l,n,t={optional:!1,separator:"."})=>{t.separator??(t.separator=".");const{optional:e,getter:r=(a,i)=>a[i]}=t,s=n.split(t.separator);if(s.length===1&&s[0]==="")return l;let o=l;for(const a of s){const i=r(o,a);if(i==null){if(e)return null;throw new Error(`Path ${n} does not exist. ${a} is null`)}o=i}return o},f=(l,n,t)=>{const e=n.split(".");let r=l;for(let s=0;s<e.length-1;s++){const o=e[s];r[o]??(r[o]={}),r=r[o]}try{r[e[e.length-1]]=t}catch(s){throw console.error("failed to set value",t,"at path",n,"on object",l),s}},h=(l,n)=>{const t=n.split(".");let e=l;for(let r=0;r<t.length-1;r++){const s=t[r];if(e[s]==null)return;e=e[s]}if(Array.isArray(e)){const r=parseInt(t[t.length-1]);if(isNaN(r))return;e.splice(r,1);return}delete e[t[t.length-1]]},p=(l,n)=>{const t=l.split(".");return n<0?t[t.length+n]:t[n]},g=(l,n)=>{try{return c(l,n),!0}catch{return!1}},m=(l,n)=>{if(n.length===0)return!0;const t=l.split("."),e=n.split(".");if(e.length>t.length)return!1;for(let r=0;r<e.length;r++){const s=t[r],o=e[r];if(o!=="*"&&s!==o)return!1}return!0};exports.element=p;exports.get=c;exports.has=g;exports.pathsMatch=m;exports.remove=h;exports.set=f;exports.transformPath=u;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
const u = (l, n, t = ".") => {
|
|
2
|
+
const e = l.split(t);
|
|
3
|
+
return e.map((s, o) => {
|
|
4
|
+
const a = n(s, o, e);
|
|
5
|
+
return a == null ? null : typeof a == "string" ? a : a.join(t);
|
|
6
|
+
}).filter((s) => s != null).join(t);
|
|
7
|
+
}, c = (l, n, t = { optional: !1, separator: "." }) => {
|
|
8
|
+
t.separator ?? (t.separator = ".");
|
|
9
|
+
const { optional: e, getter: r = (a, i) => a[i] } = t, s = n.split(t.separator);
|
|
10
|
+
if (s.length === 1 && s[0] === "") return l;
|
|
11
|
+
let o = l;
|
|
12
|
+
for (const a of s) {
|
|
13
|
+
const i = r(o, a);
|
|
14
|
+
if (i == null) {
|
|
15
|
+
if (e) return null;
|
|
16
|
+
throw new Error(`Path ${n} does not exist. ${a} is null`);
|
|
17
|
+
}
|
|
18
|
+
o = i;
|
|
19
|
+
}
|
|
20
|
+
return o;
|
|
21
|
+
}, f = (l, n, t) => {
|
|
22
|
+
const e = n.split(".");
|
|
23
|
+
let r = l;
|
|
24
|
+
for (let s = 0; s < e.length - 1; s++) {
|
|
25
|
+
const o = e[s];
|
|
26
|
+
r[o] ?? (r[o] = {}), r = r[o];
|
|
27
|
+
}
|
|
28
|
+
try {
|
|
29
|
+
r[e[e.length - 1]] = t;
|
|
30
|
+
} catch (s) {
|
|
31
|
+
throw console.error("failed to set value", t, "at path", n, "on object", l), s;
|
|
32
|
+
}
|
|
33
|
+
}, h = (l, n) => {
|
|
34
|
+
const t = n.split(".");
|
|
35
|
+
let e = l;
|
|
36
|
+
for (let r = 0; r < t.length - 1; r++) {
|
|
37
|
+
const s = t[r];
|
|
38
|
+
if (e[s] == null) return;
|
|
39
|
+
e = e[s];
|
|
40
|
+
}
|
|
41
|
+
if (Array.isArray(e)) {
|
|
42
|
+
const r = parseInt(t[t.length - 1]);
|
|
43
|
+
if (isNaN(r)) return;
|
|
44
|
+
e.splice(r, 1);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
delete e[t[t.length - 1]];
|
|
48
|
+
}, p = (l, n) => {
|
|
49
|
+
const t = l.split(".");
|
|
50
|
+
return n < 0 ? t[t.length + n] : t[n];
|
|
51
|
+
}, g = (l, n) => {
|
|
52
|
+
try {
|
|
53
|
+
return c(l, n), !0;
|
|
54
|
+
} catch {
|
|
55
|
+
return !1;
|
|
56
|
+
}
|
|
57
|
+
}, y = (l, n) => {
|
|
58
|
+
if (n.length === 0) return !0;
|
|
59
|
+
const t = l.split("."), e = n.split(".");
|
|
60
|
+
if (e.length > t.length) return !1;
|
|
61
|
+
for (let r = 0; r < e.length; r++) {
|
|
62
|
+
const s = t[r], o = e[r];
|
|
63
|
+
if (o !== "*" && s !== o)
|
|
64
|
+
return !1;
|
|
65
|
+
}
|
|
66
|
+
return !0;
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
p as e,
|
|
70
|
+
c as g,
|
|
71
|
+
g as h,
|
|
72
|
+
y as p,
|
|
73
|
+
h as r,
|
|
74
|
+
f as s,
|
|
75
|
+
u as t
|
|
76
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as g, x as v, a as I, h as M, w as N, d as X, i as j } from "./box-
|
|
1
|
+
import { c as g, x as v, a as I, h as M, w as N, d as X, i as j } from "./box-CYXc9-qp.js";
|
|
2
2
|
import { c as w } from "./direction-CScbfCdT.js";
|
|
3
|
-
import { x as B, a as h, b as C, C as O, T as R, s as m, X as S } from "./location-
|
|
3
|
+
import { x as B, a as h, b as C, C as O, T as R, s as m, X as S } from "./location-Cn1ByVTZ.js";
|
|
4
4
|
import { l as Y } from "./base-DnZzEvvz.js";
|
|
5
5
|
const P = (t) => {
|
|
6
6
|
if (t == null) return { x: void 0, y: void 0 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("./box-
|
|
1
|
+
"use strict";const n=require("./box-BpSX4si6.cjs"),T=require("./direction-D7qoo_GJ.cjs"),r=require("./location-DLP2ZS0o.cjs"),b=require("./base-B48bPNx5.cjs"),P=t=>{if(t==null)return{x:void 0,y:void 0};const s=r.xy.safeParse(t);if(s.success)return s.data;const e=b.location.safeParse(t);return e.success?T.construct(e.data)==="x"?{x:e.data,y:void 0}:{x:void 0,y:e.data}:t},N=({container:t,target:s,dialog:e,initial:u,prefer:a,alignments:l=["start"],disable:f=[]})=>{const i=P(u);let x=r.XY_LOCATIONS;if(a!=null){const o=a.map(c=>P(c));x=x.slice().sort((c,p)=>{const d=o.findIndex(g=>r.xyMatches(c,g)),h=o.findIndex(g=>r.xyMatches(p,g));return d>-1&&h>-1?d-h:d>-1?-1:h>-1?1:0})}const O=x.filter(o=>!r.xyEquals(o,r.CENTER)&&(i.x==null||o.x===i.x)&&(i.y==null||o.y===i.y)&&!f.some(c=>r.xyMatches(o,c))).map(o=>l==null?void 0:l.map(c=>[o,c])).flat(),A=n.construct(t),M=n.construct(s),_=n.construct(e);let E=-1/0;const y={location:r.CENTER,adjustedDialog:_};return O.forEach(([o,c])=>{const[p,d]=v({option:o,alignment:c,container:A,target:M,dialog:_});d>E&&(E=d,y.location=o,y.adjustedDialog=p)}),y},v=({option:t,alignment:s,container:e,target:u,dialog:a})=>{const l=L(t,s),f=n.xyLoc(u,t),i=n.constructWithAlternateRoot(f.x,f.y,n.width(a),n.height(a),l,r.TOP_LEFT),x=n.area(n.intersection(i,e));return[i,x]},I={start:"left",center:"center",end:"right"},j={start:"bottom",center:"center",end:"top"},L=(t,s)=>{const e={x:"center",y:"center"};if(t.y!=="center"){e.y=r.swap(t.y);const u=t.x==="left"?r.swap:a=>a;e.x=u(I[s])}else e.x=r.swap(t.x),e.y=j[s];return e},q=Object.freeze(Object.defineProperty({__proto__:null,dialog:N,getRoot:L,parseLocationOptions:P},Symbol.toStringTag,{value:"Module"}));exports.position=q;
|
package/dist/position.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./position-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./position-JCN6-sJC.cjs");exports.position=o.position;
|
package/dist/position.js
CHANGED
package/dist/record.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("zod"),c=e.z.record(e.z.union([e.z.number(),e.z.string(),e.z.symbol()]),e.z.unknown()),o=n=>Object.entries(n),u=(n,r)=>Object.fromEntries(o(n).map(([t,s])=>[t,r(s,t)]));exports.getEntries=o;exports.mapValues=u;exports.unknownRecordZ=c;
|
package/dist/record.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { z as n } from "zod";
|
|
2
|
-
const
|
|
2
|
+
const m = n.record(
|
|
3
3
|
n.union([n.number(), n.string(), n.symbol()]),
|
|
4
4
|
n.unknown()
|
|
5
|
-
),
|
|
5
|
+
), s = (o) => Object.entries(o), i = (o, t) => Object.fromEntries(s(o).map(([r, e]) => [r, t(e, r)]));
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
s as getEntries,
|
|
8
|
+
i as mapValues,
|
|
9
|
+
m as unknownRecordZ
|
|
9
10
|
};
|