@synnaxlabs/x 0.28.0 → 0.30.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 +23 -23
- package/dist/binary.cjs +1 -1
- package/dist/binary.js +1 -1
- package/dist/{box-C6r0YnKB.cjs → box-BQID-0jO.cjs} +1 -1
- package/dist/{box-B5SaODGu.js → box-xRqO6NvI.js} +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/{index-CzjnpuXF.js → index-B5THJ1eb.js} +1 -1
- package/dist/{index-tYmAULd8.cjs → index-DgaYJC35.cjs} +1 -1
- package/dist/{index-C9i674Sf.js → index-Duv1uH08.js} +5 -5
- package/dist/index-xk130iQA.cjs +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +17 -15
- package/dist/{location-C6sCnzhU.js → location-DjcaXEps.js} +1 -1
- package/dist/{location-55G2uRZN.cjs → location-gPB1RtfA.cjs} +1 -1
- package/dist/location.cjs +1 -1
- package/dist/location.js +1 -1
- package/dist/{position-BwmbckCe.cjs → position-C71OiHiw.cjs} +1 -1
- package/dist/{position-BY9oBMZB.js → position-DkON65EZ.js} +2 -2
- package/dist/position.cjs +1 -1
- package/dist/position.js +1 -1
- package/dist/{scale-COuYv97b.cjs → scale-COPgp55a.cjs} +1 -1
- package/dist/{scale-BgCpxgAk.js → scale-qw6vRO4s.js} +2 -2
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/{series-DIZdmPCa.js → series-By2HWr-H.js} +5 -5
- package/dist/{series-DMsaUp_n.cjs → series-vJnPOt1M.cjs} +1 -1
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +4 -4
- package/dist/src/caseconv/caseconv.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/zodutil/zodutil.d.ts +16 -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/zodutil.cjs +1 -1
- package/dist/zodutil.js +16 -12
- package/package.json +8 -8
- package/src/caseconv/caseconv.ts +4 -1
- package/src/index.ts +1 -0
- package/src/zodutil/zodutil.ts +27 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/index-BGz7XJIe.cjs +0 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @synnaxlabs/x@0.
|
|
2
|
+
> @synnaxlabs/x@0.30.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.
|
|
6
|
+
[36mvite v5.4.4 [32mbuilding for production...[36m[39m
|
|
7
7
|
transforming...
|
|
8
8
|
[32m✓[39m 81 modules transformed.
|
|
9
9
|
Generated an empty chunk: "destructor".
|
|
@@ -38,33 +38,33 @@ computing gzip size...
|
|
|
38
38
|
[2mdist/[22m[36mtelem.js [39m[1m[2m 0.41 kB[22m[1m[22m[2m │ gzip: 0.25 kB[22m
|
|
39
39
|
[2mdist/[22m[36mspatial.js [39m[1m[2m 0.58 kB[22m[1m[22m[2m │ gzip: 0.28 kB[22m
|
|
40
40
|
[2mdist/[22m[36mdirection-CScbfCdT.js [39m[1m[2m 0.65 kB[22m[1m[22m[2m │ gzip: 0.37 kB[22m
|
|
41
|
-
[2mdist/[22m[36mzodutil.js [39m[1m[2m 0.
|
|
41
|
+
[2mdist/[22m[36mzodutil.js [39m[1m[2m 0.82 kB[22m[1m[22m[2m │ gzip: 0.49 kB[22m
|
|
42
42
|
[2mdist/[22m[36mexternal-CO221aaF.js [39m[1m[2m 0.86 kB[22m[1m[22m[2m │ gzip: 0.51 kB[22m
|
|
43
43
|
[2mdist/[22m[36mworker.js [39m[1m[2m 1.17 kB[22m[1m[22m[2m │ gzip: 0.53 kB[22m
|
|
44
44
|
[2mdist/[22m[36mbase-DnZzEvvz.js [39m[1m[2m 1.21 kB[22m[1m[22m[2m │ gzip: 0.51 kB[22m
|
|
45
45
|
[2mdist/[22m[36mobserve.js [39m[1m[2m 1.41 kB[22m[1m[22m[2m │ gzip: 0.60 kB[22m
|
|
46
46
|
[2mdist/[22m[36mdimensions-D-1PnJVI.js [39m[1m[2m 1.49 kB[22m[1m[22m[2m │ gzip: 0.66 kB[22m
|
|
47
|
-
[2mdist/[22m[36mindex-C9i674Sf.js [39m[1m[2m 1.68 kB[22m[1m[22m[2m │ gzip: 0.80 kB[22m
|
|
48
47
|
[2mdist/[22m[36mpath-B-1-i3qC.js [39m[1m[2m 1.69 kB[22m[1m[22m[2m │ gzip: 0.68 kB[22m
|
|
48
|
+
[2mdist/[22m[36mindex-Duv1uH08.js [39m[1m[2m 1.70 kB[22m[1m[22m[2m │ gzip: 0.81 kB[22m
|
|
49
49
|
[2mdist/[22m[36murl.js [39m[1m[2m 1.98 kB[22m[1m[22m[2m │ gzip: 0.87 kB[22m
|
|
50
|
-
[2mdist/[22m[36mposition-
|
|
50
|
+
[2mdist/[22m[36mposition-DkON65EZ.js [39m[1m[2m 2.25 kB[22m[1m[22m[2m │ gzip: 1.06 kB[22m
|
|
51
51
|
[2mdist/[22m[36mxy-CrgPnICw.js [39m[1m[2m 2.61 kB[22m[1m[22m[2m │ gzip: 1.05 kB[22m
|
|
52
52
|
[2mdist/[22m[36mindex-DPWtMAJa.js [39m[1m[2m 2.76 kB[22m[1m[22m[2m │ gzip: 1.08 kB[22m
|
|
53
|
-
[2mdist/[22m[36mlocation-
|
|
54
|
-
[2mdist/[22m[36mindex-
|
|
53
|
+
[2mdist/[22m[36mlocation-DjcaXEps.js [39m[1m[2m 2.80 kB[22m[1m[22m[2m │ gzip: 1.16 kB[22m
|
|
54
|
+
[2mdist/[22m[36mindex-B5THJ1eb.js [39m[1m[2m 2.95 kB[22m[1m[22m[2m │ gzip: 1.12 kB[22m
|
|
55
55
|
[2mdist/[22m[36mdeep.js [39m[1m[2m 3.24 kB[22m[1m[22m[2m │ gzip: 1.27 kB[22m
|
|
56
56
|
[2mdist/[22m[36mbounds-CpboA0q6.js [39m[1m[2m 4.87 kB[22m[1m[22m[2m │ gzip: 1.63 kB[22m
|
|
57
|
-
[2mdist/[22m[36mscale-
|
|
58
|
-
[2mdist/[22m[36mbox-
|
|
59
|
-
[2mdist/[22m[36mindex.js [39m[1m[2m 6.
|
|
60
|
-
[2mdist/[22m[36mseries-
|
|
61
|
-
[vite:dts] Declaration files built in
|
|
57
|
+
[2mdist/[22m[36mscale-qw6vRO4s.js [39m[1m[2m 5.64 kB[22m[1m[22m[2m │ gzip: 1.77 kB[22m
|
|
58
|
+
[2mdist/[22m[36mbox-xRqO6NvI.js [39m[1m[2m 6.11 kB[22m[1m[22m[2m │ gzip: 2.16 kB[22m
|
|
59
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m 6.86 kB[22m[1m[22m[2m │ gzip: 2.63 kB[22m
|
|
60
|
+
[2mdist/[22m[36mseries-By2HWr-H.js [39m[1m[2m54.51 kB[22m[1m[22m[2m │ gzip: 12.33 kB[22m
|
|
61
|
+
[vite:dts] Declaration files built in 3639ms.
|
|
62
62
|
|
|
63
63
|
Generated an empty chunk: "destructor".
|
|
64
64
|
[2mdist/[22m[36mdestructor.cjs [39m[1m[2m 0.01 kB[22m[1m[22m[2m │ gzip: 0.03 kB[22m
|
|
65
65
|
[2mdist/[22m[36munique.cjs [39m[1m[2m 0.13 kB[22m[1m[22m[2m │ gzip: 0.14 kB[22m
|
|
66
66
|
[2mdist/[22m[36mxy.cjs [39m[1m[2m 0.13 kB[22m[1m[22m[2m │ gzip: 0.14 kB[22m
|
|
67
|
-
[2mdist/[22m[36mbox.cjs [39m[1m[2m 0.14 kB[22m[1m[22m[2m │ gzip: 0.
|
|
67
|
+
[2mdist/[22m[36mbox.cjs [39m[1m[2m 0.14 kB[22m[1m[22m[2m │ gzip: 0.14 kB[22m
|
|
68
68
|
[2mdist/[22m[36mkv.cjs [39m[1m[2m 0.14 kB[22m[1m[22m[2m │ gzip: 0.14 kB[22m
|
|
69
69
|
[2mdist/[22m[36mscale.cjs [39m[1m[2m 0.14 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
70
70
|
[2mdist/[22m[36mbounds.cjs [39m[1m[2m 0.15 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
@@ -87,25 +87,25 @@ Generated an empty chunk: "destructor".
|
|
|
87
87
|
[2mdist/[22m[36mdebounce.cjs [39m[1m[2m 0.33 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m
|
|
88
88
|
[2mdist/[22m[36mdirection-DZbN47uL.cjs [39m[1m[2m 0.53 kB[22m[1m[22m[2m │ gzip: 0.34 kB[22m
|
|
89
89
|
[2mdist/[22m[36mtelem.cjs [39m[1m[2m 0.54 kB[22m[1m[22m[2m │ gzip: 0.27 kB[22m
|
|
90
|
-
[2mdist/[22m[36mzodutil.cjs [39m[1m[2m 0.59 kB[22m[1m[22m[2m │ gzip: 0.38 kB[22m
|
|
91
90
|
[2mdist/[22m[36mspatial.cjs [39m[1m[2m 0.63 kB[22m[1m[22m[2m │ gzip: 0.33 kB[22m
|
|
92
91
|
[2mdist/[22m[36mexternal-B-DoBvh7.cjs [39m[1m[2m 0.68 kB[22m[1m[22m[2m │ gzip: 0.45 kB[22m
|
|
92
|
+
[2mdist/[22m[36mzodutil.cjs [39m[1m[2m 0.70 kB[22m[1m[22m[2m │ gzip: 0.43 kB[22m
|
|
93
93
|
[2mdist/[22m[36mworker.cjs [39m[1m[2m 0.94 kB[22m[1m[22m[2m │ gzip: 0.49 kB[22m
|
|
94
94
|
[2mdist/[22m[36mobserve.cjs [39m[1m[2m 1.00 kB[22m[1m[22m[2m │ gzip: 0.47 kB[22m
|
|
95
95
|
[2mdist/[22m[36murl.cjs [39m[1m[2m 1.10 kB[22m[1m[22m[2m │ gzip: 0.60 kB[22m
|
|
96
96
|
[2mdist/[22m[36mdimensions-zMcb9pMk.cjs [39m[1m[2m 1.17 kB[22m[1m[22m[2m │ gzip: 0.58 kB[22m
|
|
97
97
|
[2mdist/[22m[36mpath-577Fmn5N.cjs [39m[1m[2m 1.27 kB[22m[1m[22m[2m │ gzip: 0.62 kB[22m
|
|
98
|
-
[2mdist/[22m[36mindex-
|
|
98
|
+
[2mdist/[22m[36mindex-xk130iQA.cjs [39m[1m[2m 1.34 kB[22m[1m[22m[2m │ gzip: 0.72 kB[22m
|
|
99
99
|
[2mdist/[22m[36mbase-B48bPNx5.cjs [39m[1m[2m 1.38 kB[22m[1m[22m[2m │ gzip: 0.57 kB[22m
|
|
100
|
-
[2mdist/[22m[36mposition-
|
|
100
|
+
[2mdist/[22m[36mposition-C71OiHiw.cjs [39m[1m[2m 1.71 kB[22m[1m[22m[2m │ gzip: 0.94 kB[22m
|
|
101
101
|
[2mdist/[22m[36mxy-cP-FXJtR.cjs [39m[1m[2m 2.00 kB[22m[1m[22m[2m │ gzip: 0.96 kB[22m
|
|
102
102
|
[2mdist/[22m[36mindex-DYgqYo6X.cjs [39m[1m[2m 2.11 kB[22m[1m[22m[2m │ gzip: 0.97 kB[22m
|
|
103
|
-
[2mdist/[22m[36mindex-
|
|
104
|
-
[2mdist/[22m[36mlocation-
|
|
103
|
+
[2mdist/[22m[36mindex-DgaYJC35.cjs [39m[1m[2m 2.30 kB[22m[1m[22m[2m │ gzip: 1.01 kB[22m
|
|
104
|
+
[2mdist/[22m[36mlocation-gPB1RtfA.cjs [39m[1m[2m 2.37 kB[22m[1m[22m[2m │ gzip: 1.04 kB[22m
|
|
105
105
|
[2mdist/[22m[36mdeep.cjs [39m[1m[2m 2.39 kB[22m[1m[22m[2m │ gzip: 1.09 kB[22m
|
|
106
106
|
[2mdist/[22m[36mbounds-ZZc1c-_Z.cjs [39m[1m[2m 3.72 kB[22m[1m[22m[2m │ gzip: 1.44 kB[22m
|
|
107
|
-
[2mdist/[22m[36mscale-
|
|
108
|
-
[2mdist/[22m[36mbox-
|
|
109
|
-
[2mdist/[22m[36mindex.cjs [39m[1m[2m 5.
|
|
110
|
-
[2mdist/[22m[36mseries-
|
|
111
|
-
[32m✓ built in 4.
|
|
107
|
+
[2mdist/[22m[36mscale-COPgp55a.cjs [39m[1m[2m 4.22 kB[22m[1m[22m[2m │ gzip: 1.56 kB[22m
|
|
108
|
+
[2mdist/[22m[36mbox-BQID-0jO.cjs [39m[1m[2m 4.73 kB[22m[1m[22m[2m │ gzip: 1.94 kB[22m
|
|
109
|
+
[2mdist/[22m[36mindex.cjs [39m[1m[2m 5.76 kB[22m[1m[22m[2m │ gzip: 2.27 kB[22m
|
|
110
|
+
[2mdist/[22m[36mseries-vJnPOt1M.cjs [39m[1m[2m30.04 kB[22m[1m[22m[2m │ gzip: 8.32 kB[22m
|
|
111
|
+
[32m✓ built in 4.16s[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-DgaYJC35.cjs");exports.binary=e.encoder;
|
package/dist/binary.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const y=require("zod"),z=require("./direction-DZbN47uL.cjs"),u=require("./location-
|
|
1
|
+
"use strict";const y=require("zod"),z=require("./direction-DZbN47uL.cjs"),u=require("./location-gPB1RtfA.cjs"),i=require("./xy-cP-FXJtR.cjs"),m=require("./base-B48bPNx5.cjs"),O=y.z.union([y.z.number(),y.z.string()]);y.z.object({top:O,left:O,width:O,height:O});y.z.object({left:y.z.number(),top:y.z.number(),right:y.z.number(),bottom:y.z.number()});const H=y.z.object({one:m.xy,two:m.xy,root:u.corner}),I={one:i.ZERO,two:i.ZERO,root:u.TOP_LEFT},S={one:i.ZERO,two:i.ONE,root:u.BOTTOM_LEFT},q=(t,o)=>({one:t.one,two:t.two,root:o??t.root}),c=(t,o,e=0,n=0,s)=>{const r={one:{...i.ZERO},two:{...i.ZERO},root:s??u.TOP_LEFT};if(typeof t=="number"){if(typeof o!="number")throw new Error("Box constructor called with invalid arguments");return r.one={x:t,y:o},r.two={x:r.one.x+e,y:r.one.y+n},r}return"one"in t&&"two"in t&&"root"in t?{...t,root:s??t.root}:("getBoundingClientRect"in t&&(t=t.getBoundingClientRect()),"left"in t?(r.one={x:t.left,y:t.top},r.two={x:t.right,y:t.bottom},r):(r.one=t,o==null?r.two={x:r.one.x+e,y:r.one.y+n}:typeof o=="number"?r.two={x:r.one.x+o,y:r.one.y+e}:"width"in o?r.two={x:r.one.x+o.width,y:r.one.y+o.height}:"signedWidth"in o?r.two={x:r.one.x+o.signedWidth,y:r.one.y+o.signedHeight}:r.two=o,r))},N=(t,o,e)=>{const n=c(t);if(typeof o=="string"){if(e==null)throw new Error("Invalid arguments for resize");const s=z.construct(o);return c(n.one,void 0,s==="x"?e:l(n),s==="y"?e:w(n),n.root)}return c(n.one,o,void 0,void 0,n.root)},v=(t,o,e=!0)=>{const n=c(t);let s=(r,x)=>r<x;return e&&(s=(r,x)=>r<=x),"one"in o?s(d(n),d(o))&&s(f(o),f(n))&&s(a(n),a(o))&&s(h(o),h(n)):s(d(n),o.x)&&s(o.x,f(n))&&s(a(n),o.y)&&s(o.y,h(n))},D=(t,o)=>i.equals(t.one,o.one)&&i.equals(t.two,o.two)&&u.xyEquals(t.root,o.root),R=t=>({width:l(t),height:w(t)}),G=t=>({signedWidth:b(t),signedHeight:T(t)}),X=t=>({top:a(t),left:d(t),width:l(t),height:w(t)}),M=(t,o,e=!1)=>{const n=z.construct(o)==="y"?T(t):b(t);return e?n:Math.abs(n)},_=(t,o)=>{const e=c(t);return{x:o.x==="center"?E(e).x:g(e,o.x),y:o.y==="center"?E(e).y:g(e,o.y)}},g=(t,o)=>{const e=c(t),n=u.xyCouple(e.root).includes(o)?Math.min:Math.max;return m.X_LOCATIONS.includes(o)?n(e.one.x,e.two.x):n(e.one.y,e.two.y)},$=t=>t.one.x===t.two.x&&t.one.y===t.two.y,l=t=>M(t,"x"),w=t=>M(t,"y"),b=t=>{const o=c(t);return o.two.x-o.one.x},T=t=>{const o=c(t);return o.two.y-o.one.y},C=t=>_(t,u.TOP_LEFT),U=t=>_(t,u.TOP_RIGHT),Y=t=>_(t,u.BOTTOM_LEFT),k=t=>_(t,u.BOTTOM_RIGHT),f=t=>g(t,"right"),h=t=>g(t,"bottom"),d=t=>g(t,"left"),a=t=>g(t,"top"),E=t=>i.translate(C(t),{x:b(t)/2,y:T(t)/2}),L=t=>{const o=c(t);return o.root.x==="left"?d(o):f(o)},B=t=>{const o=c(t);return o.root.y==="top"?a(o):h(o)},J=t=>({x:L(t),y:B(t)}),P=t=>{const o=c(t);return{lower:o.one.x,upper:o.two.x}},Z=t=>{const o=c(t);return{lower:o.one.y,upper:o.two.y}},K=(t,o)=>q(t,o),Q=(t,o)=>{const e=c(t),n=m.X_LOCATIONS.includes(o)?"x":m.Y_LOCATIONS.includes(o)?"y":null;if(n===null)throw new Error(`Invalid location: ${u.location}`);const s=o==="top"||o==="left"?Math.min:Math.max,r={...e.one},x={...e.two};return r[n]=s(e.one[n],e.two[n]),x[n]=s(e.one[n],e.two[n]),[r,x]},V=(t,o)=>{const e=c(t),n=c(o),s=L(n)+(l(n)-l(e))/2,r=B(n)+(w(n)-w(e))/2;return c({x:s,y:r},R(e))},j=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,tt=t=>l(t)/w(t),ot=(t,o,e)=>{if(typeof o=="string"){if(e==null)throw new Error("Undefined amount passed into box.translate");const s=z.construct(o);o=i.construct(s,e)}const n=c(t);return c(i.translate(n.one,o),i.translate(n.two,o),void 0,void 0,n.root)},A=(t,o)=>{const e=Math.max(d(t),d(o)),n=Math.max(a(t),a(o)),s=Math.min(f(t),f(o)),r=Math.min(h(t),h(o));return e>s||n>r?I:c({x:e,y:n},{x:s,y:r},void 0,void 0,t.root)},W=t=>l(t)*w(t),nt=(t,o)=>{const e=c(t);return c(i.truncate(e.one,o),i.truncate(e.two,o),void 0,void 0,e.root)},F=(t,o,e,n,s,r)=>{const x={x:t,y:o},p={x:t+e,y:o+n};return s.x!==r.x&&(s.x==="center"?(x.x-=e/2,p.x-=e/2):(x.x-=e,p.x-=e)),s.y!==r.y&&(s.y==="center"?(x.y-=n/2,p.y-=n/2):(x.y-=n,p.y-=n)),c(x,p,void 0,void 0,r)},et=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:S,ZERO:I,area:W,areaIsZero:$,aspect:tt,bottom:h,bottomLeft:Y,bottomRight:k,box:H,center:E,construct:c,constructWithAlternateRoot:F,contains:v,copy:q,css:X,dim:M,dims:R,edgePoints:Q,equals:D,height:w,intersection:A,isBox:j,left:d,loc:g,positionInCenter:V,reRoot:K,resize:N,right:f,root:J,signedDims:G,signedHeight:T,signedWidth:b,top:a,topLeft:C,topRight:U,translate:ot,truncate:nt,width:l,x:L,xBounds:P,xyLoc:_,y:B,yBounds:Z},Symbol.toStringTag,{value:"Module"}));exports.area=W;exports.box=et;exports.construct=c;exports.constructWithAlternateRoot=F;exports.height=w;exports.intersection=A;exports.isBox=j;exports.width=l;exports.xBounds=P;exports.xyLoc=_;exports.yBounds=Z;
|
|
@@ -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-DjcaXEps.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()]);
|
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-BQID-0jO.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-xk130iQA.cjs");exports.caseconv=e.caseconv;
|
package/dist/caseconv.js
CHANGED
|
@@ -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-Duv1uH08.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-xk130iQA.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;
|
|
@@ -18,15 +18,15 @@ const k = (e) => {
|
|
|
18
18
|
}), f;
|
|
19
19
|
};
|
|
20
20
|
return r;
|
|
21
|
-
}, T = A(k),
|
|
21
|
+
}, T = A(k), g = (e) => e.replace(/([a-z0-9])([A-Z])/g, (r, n, s) => `${n}_${s.toLowerCase()}`), v = A(g), C = (e) => e.length === 0 ? e : e[0].toUpperCase() + e.slice(1), u = {
|
|
22
22
|
recursive: !0,
|
|
23
23
|
recursiveInArray: !0,
|
|
24
24
|
keepTypesOnRecursion: [Number, String, Uint8Array]
|
|
25
25
|
}, m = (e = u) => (e.recursive == null ? e = u : e.recursiveInArray == null && (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
26
|
__proto__: null,
|
|
27
27
|
belongToTypes: y,
|
|
28
|
-
camelToSnake:
|
|
29
|
-
capitalize:
|
|
28
|
+
camelToSnake: v,
|
|
29
|
+
capitalize: C,
|
|
30
30
|
defaultOptions: u,
|
|
31
31
|
isArrayObject: o,
|
|
32
32
|
isValidObject: l,
|
|
@@ -35,7 +35,7 @@ const k = (e) => {
|
|
|
35
35
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
36
36
|
export {
|
|
37
37
|
_ as a,
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
v as b,
|
|
39
|
+
C as c,
|
|
40
40
|
T as s
|
|
41
41
|
};
|
|
@@ -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:r[0].toLowerCase()+r.slice(1)},m=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={},p=n;return Object.keys(p).forEach(c=>{let t=p[c];const v=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[v]=t}),f};return r},A=m(C),g=e=>e.replace(/([a-z0-9])([A-Z])/g,(r,n,s)=>`${n}_${s.toLowerCase()}`),k=m(g),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==null&&(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:k,capitalize:T,defaultOptions:u,isArrayObject:o,isValidObject:l,snakeToCamel:A,validateOptions:O},Symbol.toStringTag,{value:"Module"}));exports.camelToSnake=k;exports.capitalize=T;exports.caseconv=S;exports.snakeToCamel=A;
|
package/dist/index.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var j=Object.defineProperty;var x=(e,t,r)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var g=(e,t,r)=>x(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./index-
|
|
1
|
+
"use strict";var j=Object.defineProperty;var x=(e,t,r)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var g=(e,t,r)=>x(e,typeof t!="symbol"?t+"":t,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("./index-DgaYJC35.cjs"),O=require("./index-xk130iQA.cjs"),L=require("./change-C-YELKx6.cjs"),T=require("./scale-COPgp55a.cjs"),s=require("./index-DYgqYo6X.cjs"),a=require("zod"),E=require("./debounce.cjs"),V=require("./deep.cjs"),i=require("./series-vJnPOt1M.cjs"),Z=require("./identity.cjs"),D=require("./types-zRwnQ1hc.cjs"),A=require("./bounds-ZZc1c-_Z.cjs"),G=require("./observe.cjs"),k=require("./record.cjs"),P=require("./external-B-DoBvh7.cjs"),_=require("./search.cjs"),H=require("./box-BQID-0jO.cjs"),W=require("./dimensions-zMcb9pMk.cjs"),C=require("./direction-DZbN47uL.cjs"),Q=require("./location-gPB1RtfA.cjs"),U=require("./position-C71OiHiw.cjs"),B=require("./spatial-BOhaO8xN.cjs"),I=require("./xy-cP-FXJtR.cjs"),M=require("./toArray.cjs"),K=require("./unique.cjs"),z=require("./url.cjs"),v=require("./worker.cjs"),F=require("./zodutil.cjs"),u=class u extends Number{};g(u,"Absolute",255),g(u,"Default",1),g(u,"z",a.z.union([a.z.instanceof(u),a.z.number().int().min(0).max(255).transform(t=>new u(t)),a.z.instanceof(Number).transform(t=>new u(t))]));let b=u;const R=a.z.object({name:a.z.string(),key:a.z.string()}),J=e=>a.z.object({subject:R,resource:e,authority:b.z}),X=(...e)=>t=>t.filter(r=>{let n=!1;return r.to!=null&&(n=e.includes(r.to.resource)),r.from!=null&&!n&&(n=e.includes(r.from.resource)),n}),Y=Object.freeze(Object.defineProperty({__proto__:null,Authority:b,filterTransfersByChannelKey:X,stateZ:J,subjectZ:R},Symbol.toStringTag,{value:"Module"})),l=class l extends Error{constructor(){super(l.MESSAGE)}matches(t){return typeof t=="string"?t.includes(l.MESSAGE):t instanceof l||t.message.includes(l.MESSAGE)}};g(l,"MESSAGE","canceled");let h=l;const ee=new h,re=Object.freeze(Object.defineProperty({__proto__:null,CANCELED:ee},Symbol.toStringTag,{value:"Module"})),te=e=>e?-1:1,q=a.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 n=q.parse(e),d=q.parse(t),[S,m,f]=n.split(".").map(Number),[o,c,p]=d.split(".").map(Number);if(r.checkMajor){if(S<o)return s.LESS_THAN;if(S>o)return s.GREATER_THAN}if(r.checkMinor){if(m<c)return s.LESS_THAN;if(m>c)return s.GREATER_THAN}if(r.checkPatch){if(f<p)return s.LESS_THAN;if(f>p)return s.GREATER_THAN}return s.EQUAL},ne=(e,t,r={})=>s.isEqualTo(y(e,t,r)),$=(e,t,r={})=>s.isGreaterThan(y(e,t,r)),oe=(e,t,r={})=>s.isLessThan(y(e,t,r)),ie=({name:e,migrate:t})=>r=>{try{const n=t(r);return console.log(`${e} migrated: ${r.version} -> ${n.version}`),n}catch(n){throw console.log(`${e} failed to migrate from ${r.version}`),console.error(n),n}},se=({name:e,migrations:t,targetSchema:r,def:n})=>{const d=Object.keys(t).sort(y).pop();if(d==null)return o=>{if(o.version!==n.version)return console.log(`${e} version ${o.version} is newer than latest version of ${n.version}.
|
|
2
2
|
Returning default instead.
|
|
3
|
-
`),n;try{return r!=null?r.parse(o):o}catch(c){return console.log(`${e} failed to parse default. Exiting with default`),console.error(c),n}};const S=Object.keys(t).length;let m=!1;const f=o=>{try{if(S===0
|
|
3
|
+
`),n;try{return r!=null?r.parse(o):o}catch(c){return console.log(`${e} failed to parse default. Exiting with default`),console.error(c),n}};const S=Object.keys(t).length;let m=!1;const f=o=>{try{if(S===0||$(o.version,d))return console.log(m?`${e} ${o.version} now up to date`:`${e} version ${o.version} is up to date with target version ${n.version}`),o;const c=o.version,p=t[c],w=p(o);return m=!0,f(w)}catch(c){return console.log(`${e} failed to migrate from ${o.version} to ${d}`),console.error(c),n}};return o=>{try{return f(o)}catch(c){return console.log(`${e} failed to parse final result. Exiting with default`),console.error(c),n}}},ce=Object.freeze(Object.defineProperty({__proto__:null,compareSemVer:y,createMigration:ie,migrator:se,semVerNewer:$,semVerOlder:oe,semVerZ:q,versionsEqual:ne},Symbol.toStringTag,{value:"Module"})),ae=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()},ue=e=>Array.isArray(e)?[...e]:typeof e=="object"&&e!==null?{...e}:e;exports.binary=N.encoder;exports.caseconv=O.caseconv;exports.change=L.change;exports.clamp=T.clamp;exports.scale=T.scale;exports.compare=s.compare;exports.isStringer=s.isStringer;exports.primitiveIsZero=s.primitiveIsZero;exports.debounce=E.debounce;exports.throttle=E.throttle;exports.deep=V.deep;exports.DataType=i.DataType;exports.Density=i.Density;exports.MultiSeries=i.MultiSeries;exports.Rate=i.Rate;exports.Series=i.Series;exports.Size=i.Size;exports.TimeRange=i.TimeRange;exports.TimeSpan=i.TimeSpan;exports.TimeStamp=i.TimeStamp;exports.addSamples=i.addSamples;exports.convertDataType=i.convertDataType;exports.id=i.id;exports.isCrudeSeries=i.isCrudeSeries;exports.isTelemValue=i.isTelemValue;exports.typedArrayZ=i.typedArrayZ;exports.isObject=Z.isObject;exports.kv=D.types;exports.bounds=A.bounds;exports.math=A.math;exports.observe=G.observe;exports.getEntries=k.getEntries;exports.unknownRecordZ=k.unknownRecordZ;exports.runtime=P.external;exports.Search=_.Search;exports.box=H.box;exports.dimensions=W.dimensions;exports.direction=C.direction;exports.location=Q.location;exports.position=U.position;exports.spatial=B.spatial;exports.xy=I.xy;exports.nullToArr=M.nullToArr;exports.toArray=M.toArray;exports.unique=K.unique;exports.URL=z.URL;exports.buildQueryString=z.buildQueryString;exports.RoutedWorker=v.RoutedWorker;exports.TypedWorker=v.TypedWorker;exports.createMockWorkers=v.createMockWorkers;exports.zodutil=F.zodutil;exports.control=Y;exports.convertRenderV=ae;exports.errors=re;exports.invert=te;exports.migrate=ce;exports.shallowCopy=ue;
|
package/dist/index.js
CHANGED
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
var T = Object.defineProperty;
|
|
2
2
|
var $ = (r, o, e) => o in r ? T(r, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[o] = e;
|
|
3
3
|
var m = (r, o, e) => $(r, typeof o != "symbol" ? o + "" : o, e);
|
|
4
|
-
import { e as I } from "./index-
|
|
5
|
-
import { a as F } from "./index-
|
|
4
|
+
import { e as I } from "./index-B5THJ1eb.js";
|
|
5
|
+
import { a as F } from "./index-Duv1uH08.js";
|
|
6
6
|
import { c as X } from "./change-DLl6DccR.js";
|
|
7
|
-
import { c as rr, s as er } from "./scale-
|
|
7
|
+
import { c as rr, s as er } from "./scale-qw6vRO4s.js";
|
|
8
8
|
import { L as b, G as y, E as k, i as w, a as j, b as A } from "./index-DPWtMAJa.js";
|
|
9
9
|
import { c as tr, d as nr, p as sr } from "./index-DPWtMAJa.js";
|
|
10
10
|
import { z as i } from "zod";
|
|
11
11
|
import { debounce as ar, throttle as cr } from "./debounce.js";
|
|
12
12
|
import { deep as fr } from "./deep.js";
|
|
13
|
-
import { d as mr, D as pr, M as gr, R as dr, S as xr, e as br, c as yr, b as Sr, T as hr, a as vr, g as Er, h as Mr, i as Tr, f as $r, t as kr } from "./series-
|
|
13
|
+
import { d as mr, D as pr, M as gr, R as dr, S as xr, e as br, c as yr, b as Sr, T as hr, a as vr, g as Er, h as Mr, i as Tr, f as $r, t as kr } from "./series-By2HWr-H.js";
|
|
14
14
|
import { isObject as jr } from "./identity.js";
|
|
15
15
|
import { t as Or } from "./types-BpAJW2TM.js";
|
|
16
|
-
import { b as
|
|
16
|
+
import { b as zr, m as Nr } from "./bounds-CpboA0q6.js";
|
|
17
17
|
import { observe as Lr } from "./observe.js";
|
|
18
18
|
import { getEntries as Vr, unknownRecordZ as Dr } from "./record.js";
|
|
19
19
|
import { e as _r } from "./external-CO221aaF.js";
|
|
20
20
|
import { Search as Cr } from "./search.js";
|
|
21
|
-
import { b as Br } from "./box-
|
|
21
|
+
import { b as Br } from "./box-xRqO6NvI.js";
|
|
22
22
|
import { d as Qr } from "./dimensions-D-1PnJVI.js";
|
|
23
23
|
import { d as Ir } from "./direction-CScbfCdT.js";
|
|
24
|
-
import { l as Fr } from "./location-
|
|
25
|
-
import { p as Xr } from "./position-
|
|
24
|
+
import { l as Fr } from "./location-DjcaXEps.js";
|
|
25
|
+
import { p as Xr } from "./position-DkON65EZ.js";
|
|
26
26
|
import { s as re } from "./spatial-DozyssiN.js";
|
|
27
27
|
import { x as oe } from "./xy-CrgPnICw.js";
|
|
28
28
|
import { nullToArr as ne, toArray as se } from "./toArray.js";
|
|
29
29
|
import { unique as ae } from "./unique.js";
|
|
30
30
|
import { URL as le, buildQueryString as fe } from "./url.js";
|
|
31
31
|
import { RoutedWorker as me, TypedWorker as pe, createMockWorkers as ge } from "./worker.js";
|
|
32
|
+
import { zodutil as xe } from "./zodutil.js";
|
|
32
33
|
const a = class a extends Number {
|
|
33
34
|
};
|
|
34
35
|
m(a, "Absolute", 255), m(a, "Default", 1), m(a, "z", i.union([
|
|
@@ -64,9 +65,9 @@ const v = i.object({
|
|
|
64
65
|
};
|
|
65
66
|
m(c, "MESSAGE", "canceled");
|
|
66
67
|
let S = c;
|
|
67
|
-
const
|
|
68
|
+
const z = new S(), q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
68
69
|
__proto__: null,
|
|
69
|
-
CANCELED:
|
|
70
|
+
CANCELED: z
|
|
70
71
|
}, Symbol.toStringTag, { value: "Module" })), C = (r) => r ? -1 : 1, h = i.string().regex(/^\d+\.\d+\.\d+$/), p = (r, o, e = {}) => {
|
|
71
72
|
e.checkMajor ?? (e.checkMajor = !0), e.checkMinor ?? (e.checkMinor = !0), e.checkPatch ?? (e.checkPatch = !0);
|
|
72
73
|
const t = h.parse(r), l = h.parse(o), [g, f, u] = t.split(".").map(Number), [n, s, d] = l.split(".").map(Number);
|
|
@@ -83,7 +84,7 @@ const N = new S(), q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
83
84
|
if (u > d) return y;
|
|
84
85
|
}
|
|
85
86
|
return k;
|
|
86
|
-
},
|
|
87
|
+
}, N = (r, o, e = {}) => w(p(r, o, e)), E = (r, o, e = {}) => j(p(r, o, e)), G = (r, o, e = {}) => A(p(r, o, e)), L = ({
|
|
87
88
|
name: r,
|
|
88
89
|
migrate: o
|
|
89
90
|
}) => (e) => {
|
|
@@ -143,7 +144,7 @@ const N = new S(), q = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defi
|
|
|
143
144
|
semVerNewer: E,
|
|
144
145
|
semVerOlder: G,
|
|
145
146
|
semVerZ: h,
|
|
146
|
-
versionsEqual:
|
|
147
|
+
versionsEqual: N
|
|
147
148
|
}, Symbol.toStringTag, { value: "Module" })), B = (r) => {
|
|
148
149
|
if (r === void 0 || typeof r == "string" || typeof r == "number")
|
|
149
150
|
return r;
|
|
@@ -166,7 +167,7 @@ export {
|
|
|
166
167
|
le as URL,
|
|
167
168
|
vr as addSamples,
|
|
168
169
|
I as binary,
|
|
169
|
-
|
|
170
|
+
zr as bounds,
|
|
170
171
|
Br as box,
|
|
171
172
|
fe as buildQueryString,
|
|
172
173
|
F as caseconv,
|
|
@@ -191,7 +192,7 @@ export {
|
|
|
191
192
|
$r as isTelemValue,
|
|
192
193
|
Or as kv,
|
|
193
194
|
Fr as location,
|
|
194
|
-
|
|
195
|
+
Nr as math,
|
|
195
196
|
W as migrate,
|
|
196
197
|
ne as nullToArr,
|
|
197
198
|
Lr as observe,
|
|
@@ -206,5 +207,6 @@ export {
|
|
|
206
207
|
kr as typedArrayZ,
|
|
207
208
|
ae as unique,
|
|
208
209
|
Dr as unknownRecordZ,
|
|
209
|
-
oe as xy
|
|
210
|
+
oe as xy,
|
|
211
|
+
xe as zodutil
|
|
210
212
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as O } from "zod";
|
|
2
|
-
import { c as m } from "./index-
|
|
2
|
+
import { c as m } from "./index-Duv1uH08.js";
|
|
3
3
|
import { e as f, f as x, y as a, g, D as C, C as z, X as L, Y as h, l as S, h as d } from "./base-DnZzEvvz.js";
|
|
4
4
|
const N = f, R = a, I = {
|
|
5
5
|
top: "bottom",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const u=require("zod"),I=require("./index-
|
|
1
|
+
"use strict";const u=require("zod"),I=require("./index-xk130iQA.cjs"),c=require("./base-B48bPNx5.cjs"),R=c.xLocation,g=c.yLocation,h={top:"bottom",right:"left",bottom:"top",left:"right",center:"center"},d={top:"left",right:"top",bottom:"right",left:"bottom",center:"center"},m=c.crudeLocation,s=t=>t instanceof String?t:c.DIRECTIONS.includes(t)?t==="x"?"left":"top":t,_=t=>h[s(t)],A=t=>d[s(t)],i=t=>{const o=s(t);return o==="top"||o==="bottom"?"y":"x"},l=u.z.object({x:c.xLocation.or(c.centerLocation),y:c.yLocation.or(c.centerLocation)}),E=u.z.object({x:c.xLocation,y:c.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,o)=>t.x===o.x&&t.y===o.y,S=(t,o)=>{if(typeof o=="object"){let e=!0;return"x"in o&&(t.x===o.x||(e=!1)),"y"in o&&(t.y===o.y||(e=!1)),e}return t.x===o||t.y===o},z=t=>[t.x,t.y],y=t=>i(s(t))==="x",M=t=>i(s(t))==="y",P=t=>`${t.x}${I.capitalize(t.y)}`,X=(t,o)=>{let e,n;if(typeof t=="object"&&"x"in t?(e=t.x,n=t.y):(e=s(t),n=s(o??t)),i(e)===i(n)&&e!=="center"&&n!=="center")throw new Error(`[XYLocation] - encountered two locations with the same direction: ${e.toString()} - ${n.toString()}`);const r={...T};return e==="center"?y(n)?[r.x,r.y]=[n,e]:[r.x,r.y]=[e,n]:n==="center"?y(e)?[r.x,r.y]=[e,n]:[r.x,r.y]=[n,e]:y(e)?[r.x,r.y]=[e,n]:[r.x,r.y]=[n,e],r},Y=Object.freeze(Object.defineProperty({__proto__:null,BOTTOM_CENTER:L,BOTTOM_LEFT:x,BOTTOM_RIGHT:a,CENTER:T,CENTER_LOCATIONS:c.CENTER_LOCATIONS,LEFT_CENTER:C,RIGHT_CENTER:p,TOP_CENTER:b,TOP_LEFT:O,TOP_RIGHT:f,XY_LOCATIONS:N,X_LOCATIONS:c.X_LOCATIONS,Y_LOCATIONS:c.Y_LOCATIONS,construct:s,constructXY:X,corner:E,crude:m,direction:i,isX:y,isY:M,location:c.location,outer:c.outerLocation,rotate90:A,swap:_,x:R,xy:l,xyCouple:z,xyEquals:j,xyMatches:S,xyToString:P,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=E;exports.location=Y;exports.swap=_;exports.xy=l;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-gPB1RtfA.cjs");exports.location=o.location;
|
package/dist/location.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("./box-
|
|
1
|
+
"use strict";const n=require("./box-BQID-0jO.cjs"),T=require("./direction-DZbN47uL.cjs"),r=require("./location-gPB1RtfA.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;
|
|
@@ -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-xRqO6NvI.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-DjcaXEps.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 };
|
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-C71OiHiw.cjs");exports.position=o.position;
|
package/dist/position.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var v=Object.defineProperty;var g=(n,t,e)=>t in n?v(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var i=(n,t,e)=>g(n,typeof t!="symbol"?t+"":t,e);const R=require("zod"),x=require("./bounds-ZZc1c-_Z.cjs"),u=require("./box-
|
|
1
|
+
"use strict";var v=Object.defineProperty;var g=(n,t,e)=>t in n?v(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var i=(n,t,e)=>g(n,typeof t!="symbol"?t+"":t,e);const R=require("zod"),x=require("./bounds-ZZc1c-_Z.cjs"),u=require("./box-BQID-0jO.cjs"),T=require("./location-gPB1RtfA.cjs"),h=require("./xy-cP-FXJtR.cjs"),m=(n,t,e)=>t!==void 0&&n<t?t:e!==void 0&&n>e?e:n,q=R.z.object({offset:h.crudeZ,scale:h.crudeZ}),E=n=>(t,e,s,r)=>e==="dimension"?[t,s]:[t,r?s-n:s+n],I=n=>(t,e,s,r)=>[t,r?s/n:s*n],Y=n=>(t,e,s)=>{if(t===null)return[n,s];const{lower:r,upper:o}=t,{lower:p,upper:l}=n,f=o-r,w=l-p;if(e==="dimension")return[n,s*(w/f)];const B=(s-r)*(w/f)+p;return[n,B]},j=n=>(t,e,s)=>[n,s],z=()=>(n,t,e)=>{if(n===null)throw new Error("cannot invert without bounds");if(t==="dimension")return[n,e];const{lower:s,upper:r}=n;return[n,r-(e-s)]},D=n=>(t,e,s)=>{const{lower:r,upper:o}=n;return s=m(s,r,o),[t,s]},a=class a{constructor(){i(this,"ops",[]);i(this,"currBounds",null);i(this,"currType",null);i(this,"reversed",!1);this.ops=[]}static translate(t){return new a().translate(t)}static magnify(t){return new a().magnify(t)}static scale(t,e){return new a().scale(t,e)}translate(t){const e=this.new(),s=E(t);return s.type="translate",e.ops.push(s),e}magnify(t){const e=this.new(),s=I(t);return s.type="magnify",e.ops.push(s),e}scale(t,e){const s=x.construct(t,e),r=this.new(),o=Y(s);return o.type="scale",r.ops.push(o),r}clamp(t,e){const s=x.construct(t,e),r=this.new(),o=D(s);return o.type="clamp",r.ops.push(o),r}reBound(t,e){const s=x.construct(t,e),r=this.new(),o=j(s);return o.type="re-bound",r.ops.push(o),r}invert(){const t=z();t.type="invert";const e=this.new();return e.ops.push(t),e}pos(t){return this.exec("position",t)}dim(t){return this.exec("dimension",t)}new(){const t=new a;return t.ops=this.ops.slice(),t.reversed=this.reversed,t}exec(t,e){return this.currBounds=null,this.ops.reduce(([s,r],o)=>o(s,t,r,this.reversed),[null,e])[1]}reverse(){const t=this.new();t.ops.reverse();const e=[];return t.ops.forEach((s,r)=>{if(s.type==="scale"||e.some(([p,l])=>r>=p&&r<=l))return;const o=t.ops.findIndex((p,l)=>p.type==="scale"&&l>r);o!==-1&&e.push([r,o])}),e.forEach(([s,r])=>{const o=t.ops.slice(s,r);o.unshift(t.ops[r]),t.ops.splice(s,r-s+1,...o)}),t.reversed=!t.reversed,t}};i(a,"IDENTITY",new a);let y=a;const L=n=>({scale:{x:n.x.dim(1),y:n.y.dim(1)},offset:{x:n.x.pos(0),y:n.y.pos(0)}}),c=class c{constructor(t=new y,e=new y,s=null){i(this,"x");i(this,"y");i(this,"currRoot");this.x=t,this.y=e,this.currRoot=s}static translate(t,e){return new c().translate(t,e)}static translateX(t){return new c().translateX(t)}static translateY(t){return new c().translateY(t)}static clamp(t){return new c().clamp(t)}static magnify(t){return new c().magnify(t)}static scale(t){return new c().scale(t)}static reBound(t){return new c().reBound(t)}translate(t,e){const s=h.construct(t,e),r=this.copy();return r.x=this.x.translate(s.x),r.y=this.y.translate(s.y),r}translateX(t){const e=this.copy();return e.x=this.x.translate(t),e}translateY(t){const e=this.copy();return e.y=this.y.translate(t),e}magnify(t){const e=this.copy();return e.x=this.x.magnify(t.x),e.y=this.y.magnify(t.y),e}scale(t){const e=this.copy();if(u.isBox(t)){const s=this.currRoot;return e.currRoot=t.root,s!=null&&!T.xyEquals(s,t.root)&&(s.x!==t.root.x&&(e.x=e.x.invert()),s.y!==t.root.y&&(e.y=e.y.invert())),e.x=e.x.scale(u.xBounds(t)),e.y=e.y.scale(u.yBounds(t)),e}return e.x=e.x.scale(t.width),e.y=e.y.scale(t.height),e}reBound(t){const e=this.copy();return e.x=this.x.reBound(u.xBounds(t)),e.y=this.y.reBound(u.yBounds(t)),e}clamp(t){const e=this.copy();return e.x=this.x.clamp(u.xBounds(t)),e.y=this.y.clamp(u.yBounds(t)),e}copy(){const t=new c;return t.currRoot=this.currRoot,t.x=this.x,t.y=this.y,t}reverse(){const t=this.copy();return t.x=this.x.reverse(),t.y=this.y.reverse(),t}pos(t){return{x:this.x.pos(t.x),y:this.y.pos(t.y)}}box(t){return u.construct(this.pos(t.one),this.pos(t.two),0,0,this.currRoot??t.root)}};i(c,"IDENTITY",new c);let d=c;const M=Object.freeze(Object.defineProperty({__proto__:null,Scale:y,XY:d,crudeXYTransform:q,xyScaleToTransform:L},Symbol.toStringTag,{value:"Module"}));exports.clamp=m;exports.scale=M;
|
|
@@ -3,8 +3,8 @@ var B = (r, t, e) => t in r ? g(r, t, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var i = (r, t, e) => B(r, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import { z as R } from "zod";
|
|
5
5
|
import { c as l } from "./bounds-CpboA0q6.js";
|
|
6
|
-
import { e as T, f as x, y as h, c as E } from "./box-
|
|
7
|
-
import { b as I } from "./location-
|
|
6
|
+
import { e as T, f as x, y as h, c as E } from "./box-xRqO6NvI.js";
|
|
7
|
+
import { b as I } from "./location-DjcaXEps.js";
|
|
8
8
|
import { b as w, c as Y } from "./xy-CrgPnICw.js";
|
|
9
9
|
const j = (r, t, e) => t !== void 0 && r < t ? t : e !== void 0 && r > e ? e : r, z = R.object({ offset: w, scale: w }), D = (r) => (t, e, s, n) => e === "dimension" ? [t, s] : [
|
|
10
10
|
t,
|
package/dist/scale.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./scale-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./scale-COPgp55a.cjs");exports.scale=e.scale;
|
package/dist/scale.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var W = Object.defineProperty;
|
|
2
2
|
var K = (f, t, e) => t in f ? W(f, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : f[t] = e;
|
|
3
3
|
var s = (f, t, e) => K(f, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
-
import { J as L } from "./index-
|
|
5
|
-
import { s as j } from "./index-
|
|
4
|
+
import { J as L } from "./index-B5THJ1eb.js";
|
|
5
|
+
import { s as j } from "./index-Duv1uH08.js";
|
|
6
6
|
import { n as H } from "./index-DPWtMAJa.js";
|
|
7
7
|
import { c as D } from "./bounds-CpboA0q6.js";
|
|
8
|
-
import "./box-
|
|
8
|
+
import "./box-xRqO6NvI.js";
|
|
9
9
|
import "./dimensions-D-1PnJVI.js";
|
|
10
10
|
import "./base-DnZzEvvz.js";
|
|
11
|
-
import "./location-
|
|
12
|
-
import "./scale-
|
|
11
|
+
import "./location-DjcaXEps.js";
|
|
12
|
+
import "./scale-qw6vRO4s.js";
|
|
13
13
|
import "./xy-CrgPnICw.js";
|
|
14
14
|
import { z as c } from "zod";
|
|
15
15
|
let X = (f, t = 21) => (e = t) => {
|