@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.
Files changed (72) hide show
  1. package/.turbo/turbo-build.log +25 -25
  2. package/dist/{box-Mf8E1Ypp.cjs → box-BpSX4si6.cjs} +1 -1
  3. package/dist/{box-DVCNGsJG.js → box-CYXc9-qp.js} +2 -2
  4. package/dist/box.cjs +1 -1
  5. package/dist/box.js +1 -1
  6. package/dist/deep.cjs +1 -1
  7. package/dist/deep.js +1 -1
  8. package/dist/index.cjs +2 -2
  9. package/dist/index.js +38 -37
  10. package/dist/location-Cn1ByVTZ.js +95 -0
  11. package/dist/location-DLP2ZS0o.cjs +1 -0
  12. package/dist/location.cjs +1 -1
  13. package/dist/location.js +1 -1
  14. package/dist/path-1tZLZ4AN.cjs +1 -0
  15. package/dist/path-DD6ytXzr.js +76 -0
  16. package/dist/{position-CFc9RsSn.js → position-DJXB-pDS.js} +2 -2
  17. package/dist/{position-DKhPhvPh.cjs → position-JCN6-sJC.cjs} +1 -1
  18. package/dist/position.cjs +1 -1
  19. package/dist/position.js +1 -1
  20. package/dist/record.cjs +1 -1
  21. package/dist/record.js +5 -4
  22. package/dist/{scale-DNQE1LMm.js → scale-Coub2bPH.js} +70 -67
  23. package/dist/scale-Dj7-5FQQ.cjs +1 -0
  24. package/dist/scale.cjs +1 -1
  25. package/dist/scale.js +1 -1
  26. package/dist/{series-DWLXo7J6.cjs → series-CAP8K7YO.cjs} +1 -1
  27. package/dist/{series-sjWkW8qe.js → series-DOxur2pj.js} +5 -5
  28. package/dist/spatial.cjs +1 -1
  29. package/dist/spatial.js +5 -5
  30. package/dist/src/deep/path.d.ts.map +1 -1
  31. package/dist/src/record.d.ts +1 -0
  32. package/dist/src/record.d.ts.map +1 -1
  33. package/dist/src/record.spec.d.ts +2 -0
  34. package/dist/src/record.spec.d.ts.map +1 -0
  35. package/dist/src/spatial/location/location.d.ts +1 -0
  36. package/dist/src/spatial/location/location.d.ts.map +1 -1
  37. package/dist/src/spatial/scale/scale.d.ts +17 -1
  38. package/dist/src/spatial/scale/scale.d.ts.map +1 -1
  39. package/dist/src/spatial/xy/xy.d.ts +36 -1
  40. package/dist/src/spatial/xy/xy.d.ts.map +1 -1
  41. package/dist/src/zodutil/zodutil.d.ts.map +1 -1
  42. package/dist/telem.cjs +1 -1
  43. package/dist/telem.js +1 -1
  44. package/dist/xy-DQdccWlc.js +128 -0
  45. package/dist/xy-LADI2wVU.cjs +1 -0
  46. package/dist/xy.cjs +1 -1
  47. package/dist/xy.js +1 -1
  48. package/dist/zodutil-BRjUdYAv.cjs +1 -0
  49. package/dist/{zodutil-Tmuc4CNq.js → zodutil-DI4gVZkT.js} +11 -11
  50. package/dist/zodutil.cjs +1 -1
  51. package/dist/zodutil.js +1 -1
  52. package/package.json +2 -2
  53. package/src/deep/path.ts +6 -1
  54. package/src/record.spec.ts +29 -0
  55. package/src/record.ts +6 -0
  56. package/src/spatial/location/location.ts +1 -0
  57. package/src/spatial/scale/scale.spec.ts +62 -51
  58. package/src/spatial/scale/scale.ts +21 -12
  59. package/src/spatial/xy/xy.spec.ts +22 -1
  60. package/src/spatial/xy/xy.ts +101 -5
  61. package/src/strings/strings.spec.ts +0 -4
  62. package/src/telem/series.spec.ts +0 -1
  63. package/src/zodutil/zodutil.ts +4 -1
  64. package/tsconfig.tsbuildinfo +1 -1
  65. package/dist/location-CI9x53qR.js +0 -94
  66. package/dist/location-DetomF8Z.cjs +0 -1
  67. package/dist/path-BBCx3K6k.cjs +0 -1
  68. package/dist/path-CmnoH3RC.js +0 -72
  69. package/dist/scale-CT61XD_X.cjs +0 -1
  70. package/dist/xy-CrgPnICw.js +0 -89
  71. package/dist/xy-cP-FXJtR.cjs +0 -1
  72. package/dist/zodutil-C6RYzvXd.cjs +0 -1
@@ -1,5 +1,5 @@
1
1
 
2
- > @synnaxlabs/x@0.34.0 build /home/runner/work/synnax/synnax/x/ts
2
+ > @synnaxlabs/x@0.35.0 build /home/runner/work/synnax/synnax/x/ts
3
3
  > tsc --noEmit && vite build
4
4
 
5
5
   Synnax - Production mode
@@ -30,41 +30,41 @@ computing gzip size...
30
30
  dist/position.js  0.08 kB │ gzip: 0.09 kB
31
31
  dist/identity.js  0.10 kB │ gzip: 0.11 kB
32
32
  dist/toArray.js  0.15 kB │ gzip: 0.12 kB
33
- dist/record.js  0.20 kB │ gzip: 0.17 kB
34
33
  dist/search.js  0.26 kB │ gzip: 0.19 kB
35
34
  dist/types-BpAJW2TM.js  0.27 kB │ gzip: 0.21 kB
36
35
  dist/spatial-DozyssiN.js  0.28 kB │ gzip: 0.23 kB
36
+ dist/record.js  0.29 kB │ gzip: 0.21 kB
37
37
  dist/change-DLl6DccR.js  0.30 kB │ gzip: 0.23 kB
38
38
  dist/debounce.js  0.36 kB │ gzip: 0.18 kB
39
39
  dist/telem.js  0.41 kB │ gzip: 0.25 kB
40
40
  dist/spatial.js  0.58 kB │ gzip: 0.28 kB
41
41
  dist/direction-CScbfCdT.js  0.65 kB │ gzip: 0.37 kB
42
42
  dist/external-sVtvYJS6.js  0.86 kB │ gzip: 0.51 kB
43
- dist/zodutil-Tmuc4CNq.js  0.91 kB │ gzip: 0.54 kB
43
+ dist/zodutil-DI4gVZkT.js  0.91 kB │ gzip: 0.54 kB
44
44
  dist/worker.js  1.17 kB │ gzip: 0.53 kB
45
45
  dist/base-DnZzEvvz.js  1.21 kB │ gzip: 0.51 kB
46
46
  dist/observe.js  1.41 kB │ gzip: 0.60 kB
47
47
  dist/dimensions-D-1PnJVI.js  1.49 kB │ gzip: 0.66 kB
48
- dist/path-CmnoH3RC.js  1.68 kB │ gzip: 0.67 kB
48
+ dist/path-DD6ytXzr.js  1.79 kB │ gzip: 0.72 kB
49
49
  dist/index-eue4dSQX.js  1.83 kB │ gzip: 0.88 kB
50
50
  dist/url.js  1.98 kB │ gzip: 0.87 kB
51
- dist/position-CFc9RsSn.js  2.25 kB │ gzip: 1.06 kB
52
- dist/xy-CrgPnICw.js  2.61 kB │ gzip: 1.05 kB
53
- dist/location-CI9x53qR.js  2.80 kB │ gzip: 1.16 kB
51
+ dist/position-DJXB-pDS.js  2.25 kB │ gzip: 1.06 kB
52
+ dist/location-Cn1ByVTZ.js  2.81 kB │ gzip: 1.16 kB
54
53
  dist/index-HQonyH7n.js  2.90 kB │ gzip: 1.14 kB
55
54
  dist/index-BBa2mWG1.js  2.95 kB │ gzip: 1.12 kB
56
55
  dist/deep.js  3.23 kB │ gzip: 1.28 kB
57
- dist/box-DVCNGsJG.js  6.14 kB │ gzip: 2.18 kB
56
+ dist/xy-DQdccWlc.js  3.76 kB │ gzip: 1.43 kB
57
+ dist/box-CYXc9-qp.js  6.14 kB │ gzip: 2.17 kB
58
58
  dist/bounds-CFI9wDXn.js  6.44 kB │ gzip: 2.04 kB
59
- dist/scale-DNQE1LMm.js  6.63 kB │ gzip: 1.99 kB
60
- dist/index.js  8.23 kB │ gzip: 3.10 kB
61
- dist/series-sjWkW8qe.js 60.46 kB │ gzip: 13.45 kB
62
- [vite:dts] Declaration files built in 3824ms.
59
+ dist/scale-Coub2bPH.js  6.82 kB │ gzip: 2.03 kB
60
+ dist/index.js  8.26 kB │ gzip: 3.11 kB
61
+ dist/series-DOxur2pj.js 60.46 kB │ gzip: 13.45 kB
62
+ [vite:dts] Declaration files built in 3725ms.
63
63
 
64
64
  Generated an empty chunk: "destructor".
65
65
  dist/destructor.cjs  0.01 kB │ gzip: 0.03 kB
66
66
  dist/unique.cjs  0.13 kB │ gzip: 0.14 kB
67
- dist/xy.cjs  0.13 kB │ gzip: 0.14 kB
67
+ dist/xy.cjs  0.13 kB │ gzip: 0.15 kB
68
68
  dist/box.cjs  0.14 kB │ gzip: 0.14 kB
69
69
  dist/kv.cjs  0.14 kB │ gzip: 0.14 kB
70
70
  dist/scale.cjs  0.14 kB │ gzip: 0.15 kB
@@ -85,29 +85,29 @@ Generated an empty chunk: "destructor".
85
85
  dist/change-C-YELKx6.cjs  0.23 kB │ gzip: 0.20 kB
86
86
  dist/spatial-BOhaO8xN.cjs  0.24 kB │ gzip: 0.21 kB
87
87
  dist/search.cjs  0.25 kB │ gzip: 0.22 kB
88
- dist/record.cjs  0.25 kB │ gzip: 0.20 kB
89
88
  dist/debounce.cjs  0.33 kB │ gzip: 0.22 kB
89
+ dist/record.cjs  0.33 kB │ gzip: 0.24 kB
90
90
  dist/direction-D7qoo_GJ.cjs  0.53 kB │ gzip: 0.34 kB
91
- dist/telem.cjs  0.54 kB │ gzip: 0.28 kB
91
+ dist/telem.cjs  0.54 kB │ gzip: 0.27 kB
92
92
  dist/spatial.cjs  0.63 kB │ gzip: 0.33 kB
93
93
  dist/external-B3XSLDq5.cjs  0.68 kB │ gzip: 0.45 kB
94
- dist/zodutil-C6RYzvXd.cjs  0.72 kB │ gzip: 0.47 kB
94
+ dist/zodutil-BRjUdYAv.cjs  0.72 kB │ gzip: 0.46 kB
95
95
  dist/worker.cjs  0.94 kB │ gzip: 0.49 kB
96
96
  dist/observe.cjs  1.00 kB │ gzip: 0.47 kB
97
97
  dist/url.cjs  1.10 kB │ gzip: 0.60 kB
98
98
  dist/dimensions-zMcb9pMk.cjs  1.17 kB │ gzip: 0.58 kB
99
- dist/path-BBCx3K6k.cjs  1.26 kB │ gzip: 0.61 kB
100
99
  dist/index-YsO0EMN8.cjs  1.34 kB │ gzip: 0.72 kB
100
+ dist/path-1tZLZ4AN.cjs  1.35 kB │ gzip: 0.66 kB
101
101
  dist/base-B48bPNx5.cjs  1.38 kB │ gzip: 0.57 kB
102
- dist/position-DKhPhvPh.cjs  1.71 kB │ gzip: 0.94 kB
103
- dist/xy-cP-FXJtR.cjs  2.00 kB │ gzip: 0.96 kB
102
+ dist/position-JCN6-sJC.cjs  1.71 kB │ gzip: 0.94 kB
104
103
  dist/index-h-QAL9T1.cjs  2.23 kB │ gzip: 1.02 kB
105
104
  dist/index-CYxQwEdX.cjs  2.30 kB │ gzip: 1.01 kB
106
- dist/location-DetomF8Z.cjs  2.37 kB │ gzip: 1.04 kB
107
105
  dist/deep.cjs  2.39 kB │ gzip: 1.08 kB
108
- dist/scale-CT61XD_X.cjs  4.22 kB │ gzip: 1.56 kB
109
- dist/box-Mf8E1Ypp.cjs  4.75 kB │ gzip: 1.95 kB
106
+ dist/location-DLP2ZS0o.cjs  2.40 kB │ gzip: 1.05 kB
107
+ dist/xy-LADI2wVU.cjs  2.75 kB │ gzip: 1.28 kB
108
+ dist/scale-Dj7-5FQQ.cjs  4.37 kB │ gzip: 1.60 kB
109
+ dist/box-BpSX4si6.cjs  4.75 kB │ gzip: 1.96 kB
110
110
  dist/bounds-DzCDHgdE.cjs  4.83 kB │ gzip: 1.78 kB
111
- dist/index.cjs  6.78 kB │ gzip: 2.67 kB
112
- dist/series-DWLXo7J6.cjs 34.64 kB │ gzip: 9.30 kB
113
- ✓ built in 4.35s
111
+ dist/index.cjs  6.81 kB │ gzip: 2.68 kB
112
+ dist/series-CAP8K7YO.cjs 34.64 kB │ gzip: 9.30 kB
113
+ ✓ built in 4.26s
@@ -1 +1 @@
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;
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-CI9x53qR.js";
4
- import { Z as p, O as F, e as $, t as O, c as G, a as C } from "./xy-CrgPnICw.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-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-Mf8E1Ypp.cjs");exports.box=e.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
@@ -1,4 +1,4 @@
1
- import { b as r } from "./box-DVCNGsJG.js";
1
+ import { b as r } from "./box-CYXc9-qp.js";
2
2
  export {
3
3
  r as box
4
4
  };
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-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;
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-CmnoH3RC.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-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 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}.
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 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;
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-DNQE1LMm.js";
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-sjWkW8qe.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-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 Ve } from "./record.js";
19
- import { e as qe } from "./external-sVtvYJS6.js";
20
- import { Search as He } from "./search.js";
21
- import { b as Ue } from "./box-DVCNGsJG.js";
22
- import { d as Ke } from "./dimensions-D-1PnJVI.js";
23
- import { d as Xe } from "./direction-CScbfCdT.js";
24
- import { l as er } from "./location-CI9x53qR.js";
25
- import { p as tr } from "./position-CFc9RsSn.js";
26
- import { s as nr } from "./spatial-DozyssiN.js";
27
- import { x as ir } from "./xy-CrgPnICw.js";
28
- import { nullToArr as cr, toArray as lr } from "./toArray.js";
29
- import { unique as ur } from "./unique.js";
30
- import { URL as dr, buildQueryString as pr } from "./url.js";
31
- import { RoutedWorker as br, TypedWorker as hr, createMockWorkers as xr } from "./worker.js";
32
- import { z as yr } from "./zodutil-Tmuc4CNq.js";
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
- br as RoutedWorker,
193
- He as Search,
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
- hr as TypedWorker,
200
- dr as URL,
199
+ xr as TypedWorker,
200
+ pr as URL,
201
201
  je as addSamples,
202
202
  X as binary,
203
203
  Pe as bounds,
204
- Ue as box,
205
- pr as buildQueryString,
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
- xr as createMockWorkers,
213
+ Sr as createMockWorkers,
214
214
  ue as debounce,
215
215
  pe as deep,
216
- Ke as dimensions,
217
- Xe as direction,
216
+ Fe as dimensions,
217
+ Ye as direction,
218
218
  q as errors,
219
- Ie as getEntries,
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
- er as location,
227
+ rr as location,
228
+ Ie as mapValues,
228
229
  Ge as math,
229
230
  H as migrate,
230
- cr as nullToArr,
231
+ lr as nullToArr,
231
232
  De as observe,
232
- tr as position,
233
+ or as position,
233
234
  le as primitiveIsZero,
234
- qe as runtime,
235
+ Be as runtime,
235
236
  se as scale,
236
237
  U as shallowCopy,
237
- nr as spatial,
238
+ sr as spatial,
238
239
  J as strings,
239
240
  me as throttle,
240
- lr as toArray,
241
+ fr as toArray,
241
242
  Oe as typedArrayZ,
242
- ur as unique,
243
- Ve as unknownRecordZ,
244
- ir as xy,
245
- yr as zodutil
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-DetomF8Z.cjs");exports.location=o.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
@@ -1,4 +1,4 @@
1
- import { l } from "./location-CI9x53qR.js";
1
+ import { l } from "./location-Cn1ByVTZ.js";
2
2
  export {
3
3
  l as location
4
4
  };
@@ -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-DVCNGsJG.js";
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-CI9x53qR.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-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-Mf8E1Ypp.cjs"),T=require("./direction-D7qoo_GJ.cjs"),r=require("./location-DetomF8Z.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
+ "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-DKhPhvPh.cjs");exports.position=o.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
@@ -1,4 +1,4 @@
1
- import { p as i } from "./position-CFc9RsSn.js";
1
+ import { p as i } from "./position-DJXB-pDS.js";
2
2
  export {
3
3
  i as position
4
4
  };
package/dist/record.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("zod"),o=n.z.record(n.z.union([n.z.number(),n.z.string(),n.z.symbol()]),n.z.unknown()),t=e=>Object.entries(e);exports.getEntries=t;exports.unknownRecordZ=o;
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 e = n.record(
2
+ const m = n.record(
3
3
  n.union([n.number(), n.string(), n.symbol()]),
4
4
  n.unknown()
5
- ), t = (o) => Object.entries(o);
5
+ ), s = (o) => Object.entries(o), i = (o, t) => Object.fromEntries(s(o).map(([r, e]) => [r, t(e, r)]));
6
6
  export {
7
- t as getEntries,
8
- e as unknownRecordZ
7
+ s as getEntries,
8
+ i as mapValues,
9
+ m as unknownRecordZ
9
10
  };