@rubin-epo/epo-widget-lib 1.0.9 → 1.1.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 (76) hide show
  1. package/dist/ColorTool.d.ts +2 -2
  2. package/dist/FilterTool.d.ts +2 -2
  3. package/dist/IsochronePlot.js +14 -14
  4. package/dist/ViewIndicator.cjs +1 -0
  5. package/dist/ViewIndicator.d.ts +3 -0
  6. package/dist/ViewIndicator.js +143 -0
  7. package/dist/charts/Bars/index.cjs +1 -1
  8. package/dist/charts/Bars/index.js +18 -19
  9. package/dist/charts/Base/index.cjs +1 -1
  10. package/dist/charts/Base/index.js +22 -23
  11. package/dist/charts/Base/styles.d.ts +1 -1
  12. package/dist/charts/ClippingContainer/index.cjs +1 -1
  13. package/dist/charts/ClippingContainer/index.js +9 -10
  14. package/dist/charts/ForeignObject/index.cjs +1 -1
  15. package/dist/charts/ForeignObject/index.js +8 -9
  16. package/dist/charts/Guidelines/index.cjs +1 -1
  17. package/dist/charts/Guidelines/index.js +10 -11
  18. package/dist/charts/Points/index.cjs +1 -1
  19. package/dist/charts/Points/index.js +30 -31
  20. package/dist/charts/Readout/index.cjs +1 -1
  21. package/dist/charts/Readout/index.js +24 -17
  22. package/dist/charts/ScatterPlot/index.cjs +1 -1
  23. package/dist/charts/ScatterPlot/index.js +79 -77
  24. package/dist/charts/Tooltip/index.cjs +1 -1
  25. package/dist/charts/Tooltip/index.js +14 -15
  26. package/dist/charts/Viewport/index.cjs +1 -1
  27. package/dist/charts/Viewport/index.js +13 -14
  28. package/dist/charts/XAxis/index.cjs +1 -1
  29. package/dist/charts/XAxis/index.js +21 -22
  30. package/dist/charts/YAxis/index.cjs +1 -1
  31. package/dist/charts/YAxis/index.js +17 -18
  32. package/dist/charts/styles.d.ts +6 -6
  33. package/dist/lib/utils.cjs +1 -1
  34. package/dist/lib/utils.js +11 -15
  35. package/dist/widgets/CameraFilter/styles.d.ts +5 -5
  36. package/dist/widgets/ColorTool/Actions/index.d.ts +1 -1
  37. package/dist/widgets/ColorTool/FilterControls/FilterControls.d.ts +1 -1
  38. package/dist/widgets/ColorTool/ImageComposite/ImageComposite.d.ts +1 -1
  39. package/dist/widgets/ColorTool/__mocks__/index.d.ts +1 -1
  40. package/dist/widgets/ColorTool/hooks/useFilteredImages.d.ts +1 -1
  41. package/dist/widgets/ColorTool/index.d.ts +46 -1
  42. package/dist/widgets/ColorTool/lib/server.d.ts +1 -1
  43. package/dist/widgets/ColorTool/lib/utils.d.ts +1 -1
  44. package/dist/widgets/FilterTool/index.d.ts +12 -1
  45. package/dist/widgets/FilterTool/styles.d.ts +6 -6
  46. package/dist/widgets/SourceSelector/SourceMap/styles.d.ts +2 -2
  47. package/dist/widgets/SupernovaThreeVector/Histogram/index.js +6 -6
  48. package/dist/widgets/SupernovaThreeVector/Histogram/styles.d.ts +1 -1
  49. package/dist/widgets/SupernovaThreeVector/Skymap/index.cjs +1 -1
  50. package/dist/widgets/SupernovaThreeVector/Skymap/index.js +36 -30
  51. package/dist/widgets/SupernovaThreeVector/Skymap/styles.d.ts +7 -7
  52. package/dist/widgets/ViewIndicator/index.d.ts +13 -0
  53. package/dist/widgets/ViewIndicator/styles.cjs +52 -0
  54. package/dist/widgets/ViewIndicator/styles.d.ts +4402 -0
  55. package/dist/widgets/ViewIndicator/styles.js +67 -0
  56. package/package.json +2 -1
  57. package/dist/CameraFilter.cjs +0 -1
  58. package/dist/CameraFilter.d.ts +0 -3
  59. package/dist/CameraFilter.js +0 -102
  60. package/dist/Charts.cjs +0 -1
  61. package/dist/Charts.d.ts +0 -1
  62. package/dist/Charts.js +0 -24
  63. package/dist/widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.cjs +0 -1
  64. package/dist/widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.js +0 -61
  65. package/dist/widgets/CameraFilter/SpectrumDisplay/ColorLabels/ColorLabels.cjs +0 -1
  66. package/dist/widgets/CameraFilter/SpectrumDisplay/ColorLabels/ColorLabels.js +0 -99
  67. package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.cjs +0 -1
  68. package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.js +0 -97
  69. package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumLabels/SpectrumLabels.cjs +0 -1
  70. package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumLabels/SpectrumLabels.js +0 -58
  71. package/dist/widgets/CameraFilter/data.cjs +0 -1
  72. package/dist/widgets/CameraFilter/data.js +0 -84
  73. package/dist/widgets/CameraFilter/styles.cjs +0 -105
  74. package/dist/widgets/CameraFilter/styles.js +0 -128
  75. package/dist/widgets/ColorTool/ColorTool.d.ts +0 -46
  76. package/dist/widgets/FilterTool/FilterTool.d.ts +0 -12
@@ -1,3 +1,3 @@
1
- export * from './widgets/ColorTool/ColorTool'
2
- import _default from './widgets/ColorTool/ColorTool'
1
+ export * from './widgets/ColorTool/index'
2
+ import _default from './widgets/ColorTool/index'
3
3
  export default _default
@@ -1,3 +1,3 @@
1
- export * from './widgets/FilterTool/FilterTool'
2
- import _default from './widgets/FilterTool/FilterTool'
1
+ export * from './widgets/FilterTool/index'
2
+ import _default from './widgets/FilterTool/index'
3
3
  export default _default
@@ -23,7 +23,7 @@ const ct = (t) => t ? t < parseFloat(j("BREAK_PHABLET_MIN")) ? s.pointRadius.md
23
23
  }, dt = (t, n, r, i) => {
24
24
  const u = E(t, Object.keys(i)), l = i[u];
25
25
  return l ? l.map(({ x: g, y: f }) => ({ x: n(g), y: r(f) })) : [];
26
- }, Dt = ({
26
+ }, It = ({
27
27
  data: t,
28
28
  value: n,
29
29
  ageLibrary: r,
@@ -66,7 +66,7 @@ const ct = (t) => t ? t < parseFloat(j("BREAK_PHABLET_MIN")) ? s.pointRadius.md
66
66
  distance: (o) => lt(o).toLocaleString(v, {
67
67
  maximumFractionDigits: 0
68
68
  })
69
- }, B = {
69
+ }, D = {
70
70
  age: L.age(d),
71
71
  distance: L.distance(F)
72
72
  }, G = /* @__PURE__ */ e(mt, { ref: z, children: /* @__PURE__ */ e(
@@ -89,18 +89,18 @@ const ct = (t) => t ? t < parseFloat(j("BREAK_PHABLET_MIN")) ? s.pointRadius.md
89
89
  xScale: p,
90
90
  yScale: R,
91
91
  yStart: S,
92
- yEnd: D,
93
- xStart: I,
92
+ yEnd: I,
93
+ xStart: T,
94
94
  xEnd: N,
95
95
  yDomain: $
96
96
  }) => {
97
- const T = dt(d, p, R, _), K = R(F + $[1]);
97
+ const B = dt(d, p, R, _), K = R(F + $[1]);
98
98
  return /* @__PURE__ */ q(J, { children: [
99
99
  o,
100
100
  d && /* @__PURE__ */ e(
101
101
  rt,
102
102
  {
103
- points: T,
103
+ points: B,
104
104
  svgProps: {
105
105
  strokeWidth: 2,
106
106
  transform: `translate(0,${K})`
@@ -111,10 +111,10 @@ const ct = (t) => t ? t < parseFloat(j("BREAK_PHABLET_MIN")) ? s.pointRadius.md
111
111
  et,
112
112
  {
113
113
  viewport: {
114
- x: I,
115
- y: D,
116
- outerHeight: S - D,
117
- outerWidth: N - I,
114
+ x: T,
115
+ y: I,
116
+ outerHeight: S - I,
117
+ outerWidth: N - T,
118
118
  innerWidth: b,
119
119
  innerHeight: y
120
120
  },
@@ -124,8 +124,8 @@ const ct = (t) => t ? t < parseFloat(j("BREAK_PHABLET_MIN")) ? s.pointRadius.md
124
124
  nt,
125
125
  {
126
126
  points: t,
127
- value: B,
128
- isochrone: T,
127
+ value: D,
128
+ isochrone: B,
129
129
  offset: K,
130
130
  xScale: p,
131
131
  yScale: R,
@@ -134,7 +134,7 @@ const ct = (t) => t ? t < parseFloat(j("BREAK_PHABLET_MIN")) ? s.pointRadius.md
134
134
  }
135
135
  ),
136
136
  children: x("isochrone_plot.output", {
137
- ...B
137
+ ...D
138
138
  })
139
139
  }
140
140
  )
@@ -178,5 +178,5 @@ const ct = (t) => t ? t < parseFloat(j("BREAK_PHABLET_MIN")) ? s.pointRadius.md
178
178
  );
179
179
  };
180
180
  export {
181
- Dt as default
181
+ It as default
182
182
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),V=require("react"),j=require("d3-geo"),s=require("./widgets/ViewIndicator/styles.cjs"),W=require("./lib/utils.cjs"),h=10,$=10,k=[h,$],m=100,v=100,g=j.geoGraticule();g.step([180,180]);const b=t=>{const{backFaces:n=!1,applyRotation:i=!0}=t||{},e=j.geoOrthographic();e.fitExtent([[0,0],[m,v]],g.outline()),i&&e.rotate(k),n&&e.clipAngle(null);const r=j.geoPath(e);return{projection:e,pathGenerator:a=>r(a)||void 0}},A=()=>{const{pathGenerator:t}=b({applyRotation:!1});return o.jsx(s.Outline,{d:t(g.outline())})},R=({backFaces:t})=>{const{pathGenerator:n}=b({backFaces:t});return o.jsx(s.Meridian,{d:n(g()),opacity:t?.8:void 0})},C=(t,n)=>{const i=t>90-h&&t<270-h,e=n>0+$,r=t>180-h,c=["top","bottom"],a=["left","right"];e&&c.reverse(),r&&a.reverse();const d=["plane",c[0],...a,c[1]];return i&&d.reverse(),d},N=({ra:t,dec:n,fov:i})=>{const{pathGenerator:e}=b({backFaces:!0}),[r,c]=i,a=Math.max(r,.1)/2,d=Math.max(c,.1)/2,S=n+d,M=n-d,w=t+a,G=t-a,p=[w,S],f=[G,S],x=[w,M],y=[G,M],E=m/2,F=v/2,u=l=>`${l}L${E},${F}`,L={plane:o.jsx(s.Plane,{d:e({type:"Polygon",coordinates:[[p,f,y,x,p]]})}),top:o.jsx(s.TopEdges,{d:u(e({type:"LineString",coordinates:[p,f]}))}),bottom:o.jsx(s.TopEdges,{d:u(e({type:"LineString",coordinates:[y,x]}))}),left:o.jsx(s.SideEdges,{d:u(e({type:"LineString",coordinates:[x,p]}))}),right:o.jsx(s.SideEdges,{d:u(e({type:"LineString",coordinates:[f,y]}))})},O=C(t,n),P=W.getLinearScale([0,180],[0,100],{clamp:!0,fractionDigits:0})(Math.abs(180-t));return o.jsx(s.ViewCone,{style:{"--percent-mix-primary":`${P}%`,"--percent-mix-secondary":`${100-P}%`},children:O.map(l=>{if(L[l])return o.jsx(V.Fragment,{children:L[l]},l)})})},q=({size:t="var(--size-spacing-m)",className:n,ra:i,dec:e,fov:r})=>{const c=typeof i<"u"&&typeof e<"u"&&typeof r<"u";return o.jsxs(s.Container,{style:{"--size-container":t},className:n,children:[o.jsx(s.NorthDirection,{children:"N"}),o.jsxs(s.SVG,{preserveAspectRatio:"xMidYMid meet",viewBox:`0 0 ${m} ${v}`,children:[o.jsx(R,{backFaces:!0}),c&&o.jsx(N,{ra:i,dec:e,fov:r}),o.jsx(R,{}),o.jsx(A,{})]})]})};q.displayName="Widget.ViewIndicator";exports.default=q;
@@ -0,0 +1,3 @@
1
+ export * from './widgets/ViewIndicator/index'
2
+ import _default from './widgets/ViewIndicator/index'
3
+ export default _default
@@ -0,0 +1,143 @@
1
+ import { jsxs as G, jsx as o } from "react/jsx-runtime";
2
+ import { Fragment as W } from "react";
3
+ import { geoGraticule as k, geoOrthographic as A, geoPath as C } from "d3-geo";
4
+ import { Container as N, NorthDirection as z, SVG as B, Outline as D, Meridian as H, Plane as I, TopEdges as F, SideEdges as P, ViewCone as Y } from "./widgets/ViewIndicator/styles.js";
5
+ import { getLinearScale as q } from "./lib/utils.js";
6
+ const h = 10, O = 10, T = [h, O], y = 100, v = 100, f = k();
7
+ f.step([180, 180]);
8
+ const x = (t) => {
9
+ const { backFaces: n = !1, applyRotation: i = !0 } = t || {}, e = A();
10
+ e.fitExtent(
11
+ [
12
+ [0, 0],
13
+ [y, v]
14
+ ],
15
+ f.outline()
16
+ ), i && e.rotate(T), n && e.clipAngle(null);
17
+ const r = C(e);
18
+ return { projection: e, pathGenerator: (s) => r(s) || void 0 };
19
+ }, X = () => {
20
+ const { pathGenerator: t } = x({ applyRotation: !1 });
21
+ return /* @__PURE__ */ o(D, { d: t(f.outline()) });
22
+ }, R = ({ backFaces: t }) => {
23
+ const { pathGenerator: n } = x({ backFaces: t });
24
+ return /* @__PURE__ */ o(
25
+ H,
26
+ {
27
+ d: n(f()),
28
+ opacity: t ? 0.8 : void 0
29
+ }
30
+ );
31
+ }, J = (t, n) => {
32
+ const i = t > 90 - h && t < 270 - h, e = n > 0 + O, r = t > 180 - h, c = ["top", "bottom"], s = ["left", "right"];
33
+ e && c.reverse(), r && s.reverse();
34
+ const a = ["plane", c[0], ...s, c[1]];
35
+ return i && a.reverse(), a;
36
+ }, K = ({ ra: t, dec: n, fov: i }) => {
37
+ const { pathGenerator: e } = x({ backFaces: !0 }), [r, c] = i, s = Math.max(r, 0.1) / 2, a = Math.max(c, 0.1) / 2, b = n + a, M = n - a, S = t + s, $ = t - s, p = [S, b], g = [$, b], m = [S, M], u = [$, M], V = y / 2, j = v / 2, l = (d) => `${d}L${V},${j}`, w = {
38
+ plane: /* @__PURE__ */ o(
39
+ I,
40
+ {
41
+ d: e({
42
+ type: "Polygon",
43
+ coordinates: [[p, g, u, m, p]]
44
+ })
45
+ }
46
+ ),
47
+ top: /* @__PURE__ */ o(
48
+ F,
49
+ {
50
+ d: l(
51
+ e({
52
+ type: "LineString",
53
+ coordinates: [p, g]
54
+ })
55
+ )
56
+ }
57
+ ),
58
+ bottom: /* @__PURE__ */ o(
59
+ F,
60
+ {
61
+ d: l(
62
+ e({
63
+ type: "LineString",
64
+ coordinates: [u, m]
65
+ })
66
+ )
67
+ }
68
+ ),
69
+ left: /* @__PURE__ */ o(
70
+ P,
71
+ {
72
+ d: l(
73
+ e({
74
+ type: "LineString",
75
+ coordinates: [m, p]
76
+ })
77
+ )
78
+ }
79
+ ),
80
+ right: /* @__PURE__ */ o(
81
+ P,
82
+ {
83
+ d: l(
84
+ e({
85
+ type: "LineString",
86
+ coordinates: [g, u]
87
+ })
88
+ )
89
+ }
90
+ )
91
+ }, E = J(t, n), L = q([0, 180], [0, 100], {
92
+ clamp: !0,
93
+ fractionDigits: 0
94
+ })(Math.abs(180 - t));
95
+ return /* @__PURE__ */ o(
96
+ Y,
97
+ {
98
+ style: {
99
+ "--percent-mix-primary": `${L}%`,
100
+ "--percent-mix-secondary": `${100 - L}%`
101
+ },
102
+ children: E.map((d) => {
103
+ if (w[d])
104
+ return /* @__PURE__ */ o(W, { children: w[d] }, d);
105
+ })
106
+ }
107
+ );
108
+ }, Q = ({
109
+ size: t = "var(--size-spacing-m)",
110
+ className: n,
111
+ ra: i,
112
+ dec: e,
113
+ fov: r
114
+ }) => {
115
+ const c = typeof i < "u" && typeof e < "u" && typeof r < "u";
116
+ return /* @__PURE__ */ G(
117
+ N,
118
+ {
119
+ style: { "--size-container": t },
120
+ className: n,
121
+ children: [
122
+ /* @__PURE__ */ o(z, { children: "N" }),
123
+ /* @__PURE__ */ G(
124
+ B,
125
+ {
126
+ preserveAspectRatio: "xMidYMid meet",
127
+ viewBox: `0 0 ${y} ${v}`,
128
+ children: [
129
+ /* @__PURE__ */ o(R, { backFaces: !0 }),
130
+ c && /* @__PURE__ */ o(K, { ra: i, dec: e, fov: r }),
131
+ /* @__PURE__ */ o(R, {}),
132
+ /* @__PURE__ */ o(X, {})
133
+ ]
134
+ }
135
+ )
136
+ ]
137
+ }
138
+ );
139
+ };
140
+ Q.displayName = "Widget.ViewIndicator";
141
+ export {
142
+ Q as default
143
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("react/jsx-runtime"),d=require("react"),h=require("../styles.cjs"),a=({data:e,yDomain:i,xScale:o,yScale:r,y:t=r(i[0])})=>e.length===0?null:b.jsx("g",{role:"list",children:e.map(({stroke:u,fill:c,width:s=8,x:f,value:l,props:m},g)=>{if(l===0)return null;const n=t-r(l);return d.createElement(h.Bar,{role:"listitem",height:n,y:t,width:s,x:o(f),fill:c||"var(--bar-fill, #12726D)",stroke:u||"var(--bar-stroke, transparent)",key:g,transform:`translate(-${s/2} -${n})`,...m})})});a.displayName="Charts.Bars";const p=a;exports.default=p;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const b=require("react/jsx-runtime"),d=require("react"),h=require("../styles.cjs"),a=({data:e,yDomain:i,xScale:u,yScale:r,y:t=r(i[0])})=>e.length===0?null:b.jsx("g",{role:"list",children:e.map(({stroke:o,fill:c,width:s=8,x:f,value:l,props:m},g)=>{if(l===0)return null;const n=t-r(l);return d.createElement(h.Bar,{role:"listitem",height:n,y:t,width:s,x:u(f),fill:c||"var(--bar-fill, #12726D)",stroke:o||"var(--bar-stroke, transparent)",key:g,transform:`translate(-${s/2} -${n})`,...m})})});a.displayName="Charts.Bars";exports.default=a;
@@ -1,33 +1,32 @@
1
1
  import { jsx as h } from "react/jsx-runtime";
2
- import { createElement as B } from "react";
2
+ import { createElement as c } from "react";
3
3
  import { Bar as g } from "../styles.js";
4
- const n = ({
4
+ const k = ({
5
5
  data: r,
6
- yDomain: o,
7
- xScale: i,
6
+ yDomain: s,
7
+ xScale: o,
8
8
  yScale: t,
9
- y: e = t(o[0])
10
- }) => r.length === 0 ? null : /* @__PURE__ */ h("g", { role: "list", children: r.map(({ stroke: m, fill: f, width: s = 8, x: p, value: a, props: u }, c) => {
9
+ y: e = t(s[0])
10
+ }) => r.length === 0 ? null : /* @__PURE__ */ h("g", { role: "list", children: r.map(({ stroke: i, fill: m, width: l = 8, x: f, value: a, props: p }, u) => {
11
11
  if (a === 0) return null;
12
- const l = e - t(a);
13
- return /* @__PURE__ */ B(
12
+ const n = e - t(a);
13
+ return /* @__PURE__ */ c(
14
14
  g,
15
15
  {
16
16
  role: "listitem",
17
- height: l,
17
+ height: n,
18
18
  y: e,
19
- width: s,
20
- x: i(p),
21
- fill: f || "var(--bar-fill, #12726D)",
22
- stroke: m || "var(--bar-stroke, transparent)",
23
- key: c,
24
- transform: `translate(-${s / 2} -${l})`,
25
- ...u
19
+ width: l,
20
+ x: o(f),
21
+ fill: m || "var(--bar-fill, #12726D)",
22
+ stroke: i || "var(--bar-stroke, transparent)",
23
+ key: u,
24
+ transform: `translate(-${l / 2} -${n})`,
25
+ ...p
26
26
  }
27
27
  );
28
28
  }) });
29
- n.displayName = "Charts.Bars";
30
- const b = n;
29
+ k.displayName = "Charts.Bars";
31
30
  export {
32
- b as default
31
+ k as default
33
32
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),r=require("./styles.cjs"),c=({width:s=900,height:i=300,xMin:o=0,yMin:x=0,verticalLabel:a,verticalLabelId:t,horizontalLabel:n,horizontalLabelId:l,title:d,children:j,className:p})=>e.jsxs(r.ChartContainer,{children:[d&&e.jsx(r.TitleWrapper,{children:e.jsx(r.Title,{children:d})}),a&&e.jsxs(e.Fragment,{children:[e.jsx(r.VerticalLabelWrapper,{children:e.jsx(r.Label,{id:t,"aria-hidden":!!t,children:a})}),e.jsx(r.Filler,{})]}),e.jsx(r.SVG,{preserveAspectRatio:"xMidYMid meet",viewBox:`${o} ${x} ${s} ${i}`,className:p,style:{"--aspect-ratio":`${s} / ${i}`},role:"group",children:j}),n&&e.jsx(r.HorizontalLabelWrapper,{children:e.jsx(r.Label,{id:l,"aria-hidden":!!l,children:n})})]});c.displayName="Charts.Base";const u=c;exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),r=require("./styles.cjs"),c=({width:s=900,height:i=300,xMin:x=0,yMin:j=0,verticalLabel:a,verticalLabelId:t,horizontalLabel:l,horizontalLabelId:n,title:d,children:o,className:p})=>e.jsxs(r.ChartContainer,{children:[d&&e.jsx(r.TitleWrapper,{children:e.jsx(r.Title,{children:d})}),a&&e.jsxs(e.Fragment,{children:[e.jsx(r.VerticalLabelWrapper,{children:e.jsx(r.Label,{id:t,"aria-hidden":!!t,children:a})}),e.jsx(r.Filler,{})]}),e.jsx(r.SVG,{preserveAspectRatio:"xMidYMid meet",viewBox:`${x} ${j} ${s} ${i}`,className:p,style:{"--aspect-ratio":`${s} / ${i}`},role:"group",children:o}),l&&e.jsx(r.HorizontalLabelWrapper,{children:e.jsx(r.Label,{id:n,"aria-hidden":!!n,children:l})})]});c.displayName="Charts.Base";exports.default=c;
@@ -1,47 +1,46 @@
1
- import { jsxs as t, jsx as r, Fragment as x } from "react/jsx-runtime";
2
- import { ChartContainer as B, TitleWrapper as C, Title as f, VerticalLabelWrapper as u, Label as l, Filler as W, SVG as j, HorizontalLabelWrapper as y } from "./styles.js";
3
- const c = ({
1
+ import { jsxs as t, jsx as r, Fragment as $ } from "react/jsx-runtime";
2
+ import { ChartContainer as x, TitleWrapper as C, Title as f, VerticalLabelWrapper as u, Label as l, Filler as B, SVG as W, HorizontalLabelWrapper as j } from "./styles.js";
3
+ const y = ({
4
4
  width: e = 900,
5
5
  height: i = 300,
6
- xMin: o = 0,
7
- yMin: h = 0,
6
+ xMin: c = 0,
7
+ yMin: o = 0,
8
8
  verticalLabel: a,
9
9
  verticalLabelId: d,
10
10
  horizontalLabel: n,
11
- horizontalLabelId: s,
12
- title: p,
13
- children: m,
14
- className: $
15
- }) => /* @__PURE__ */ t(B, { children: [
16
- p && /* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(f, { children: p }) }),
17
- a && /* @__PURE__ */ t(x, { children: [
11
+ horizontalLabelId: p,
12
+ title: s,
13
+ children: h,
14
+ className: m
15
+ }) => /* @__PURE__ */ t(x, { children: [
16
+ s && /* @__PURE__ */ r(C, { children: /* @__PURE__ */ r(f, { children: s }) }),
17
+ a && /* @__PURE__ */ t($, { children: [
18
18
  /* @__PURE__ */ r(u, { children: /* @__PURE__ */ r(l, { id: d, "aria-hidden": !!d, children: a }) }),
19
- /* @__PURE__ */ r(W, {})
19
+ /* @__PURE__ */ r(B, {})
20
20
  ] }),
21
21
  /* @__PURE__ */ r(
22
- j,
22
+ W,
23
23
  {
24
24
  preserveAspectRatio: "xMidYMid meet",
25
- viewBox: `${o} ${h} ${e} ${i}`,
26
- className: $,
25
+ viewBox: `${c} ${o} ${e} ${i}`,
26
+ className: m,
27
27
  style: {
28
28
  "--aspect-ratio": `${e} / ${i}`
29
29
  },
30
30
  role: "group",
31
- children: m
31
+ children: h
32
32
  }
33
33
  ),
34
- n && /* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(
34
+ n && /* @__PURE__ */ r(j, { children: /* @__PURE__ */ r(
35
35
  l,
36
36
  {
37
- id: s,
38
- "aria-hidden": !!s,
37
+ id: p,
38
+ "aria-hidden": !!p,
39
39
  children: n
40
40
  }
41
41
  ) })
42
42
  ] });
43
- c.displayName = "Charts.Base";
44
- const T = c;
43
+ y.displayName = "Charts.Base";
45
44
  export {
46
- T as default
45
+ y as default
47
46
  };
@@ -1109,7 +1109,7 @@ export declare const SVG: import('styled-components').IStyledComponent<"web", {
1109
1109
  accentHeight?: string | number | undefined;
1110
1110
  accumulate?: "none" | "sum" | undefined;
1111
1111
  additive?: "replace" | "sum" | undefined;
1112
- alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "middle" | "baseline" | "before-edge" | "text-before-edge" | "central" | "after-edge" | "text-after-edge" | undefined;
1112
+ alignmentBaseline?: "inherit" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "auto" | "baseline" | "before-edge" | "text-before-edge" | "middle" | "central" | "after-edge" | "text-after-edge" | undefined;
1113
1113
  allowReorder?: "yes" | "no" | undefined;
1114
1114
  alphabetic?: string | number | undefined;
1115
1115
  amplitude?: string | number | undefined;
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),u=require("react"),i=({x:n,y:r,width:s,height:l,className:c,children:a})=>{const t=u.useId();return e.jsxs(e.Fragment,{children:[e.jsx("defs",{children:e.jsx("clipPath",{id:t,children:e.jsx("rect",{x:n,y:r,width:s,height:l})})}),e.jsx("g",{clipPath:`url(#${t})`,className:c,children:a})]})};i.displayName="Charts.Clip";const o=i;exports.default=o;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),a=require("react"),r=({x:i,y:s,width:n,height:l,className:c,children:u})=>{const t=a.useId();return e.jsxs(e.Fragment,{children:[e.jsx("defs",{children:e.jsx("clipPath",{id:t,children:e.jsx("rect",{x:i,y:s,width:n,height:l})})}),e.jsx("g",{clipPath:`url(#${t})`,className:c,children:u})]})};r.displayName="Charts.Clip";exports.default=r;
@@ -1,15 +1,14 @@
1
1
  "use client";
2
- import { jsxs as o, Fragment as p, jsx as i } from "react/jsx-runtime";
3
- import { useId as d } from "react";
4
- const r = ({ x: t, y: e, width: l, height: s, className: a, children: c }) => {
5
- const n = d();
6
- return /* @__PURE__ */ o(p, { children: [
7
- /* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: n, children: /* @__PURE__ */ i("rect", { x: t, y: e, width: l, height: s }) }) }),
8
- /* @__PURE__ */ i("g", { clipPath: `url(#${n})`, className: a, children: c })
2
+ import { jsxs as c, Fragment as d, jsx as r } from "react/jsx-runtime";
3
+ import { useId as o } from "react";
4
+ const p = ({ x: i, y: t, width: n, height: l, className: s, children: a }) => {
5
+ const e = o();
6
+ return /* @__PURE__ */ c(d, { children: [
7
+ /* @__PURE__ */ r("defs", { children: /* @__PURE__ */ r("clipPath", { id: e, children: /* @__PURE__ */ r("rect", { x: i, y: t, width: n, height: l }) }) }),
8
+ /* @__PURE__ */ r("g", { clipPath: `url(#${e})`, className: s, children: a })
9
9
  ] });
10
10
  };
11
- r.displayName = "Charts.Clip";
12
- const C = r;
11
+ p.displayName = "Charts.Clip";
13
12
  export {
14
- C as default
13
+ p as default
15
14
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),e=({children:t,className:n,width:r="100%",height:o="100%"})=>i.jsx("foreignObject",{x:0,y:0,pointerEvents:"none",className:n,width:r,height:o,children:t});e.displayName="Charts.ForeignObject";const s=e;exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("react/jsx-runtime"),e=({children:t,className:r,width:n="100%",height:o="100%"})=>i.jsx("foreignObject",{x:0,y:0,pointerEvents:"none",className:r,width:n,height:o,children:t});e.displayName="Charts.ForeignObject";exports.default=e;
@@ -1,18 +1,17 @@
1
- import { jsx as i } from "react/jsx-runtime";
2
- const e = ({ children: t, className: n, width: o = "100%", height: r = "100%" }) => /* @__PURE__ */ i(
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ const i = ({ children: e, className: t, width: r = "100%", height: n = "100%" }) => /* @__PURE__ */ o(
3
3
  "foreignObject",
4
4
  {
5
5
  x: 0,
6
6
  y: 0,
7
7
  pointerEvents: "none",
8
- className: n,
9
- width: o,
10
- height: r,
11
- children: t
8
+ className: t,
9
+ width: r,
10
+ height: n,
11
+ children: e
12
12
  }
13
13
  );
14
- e.displayName = "Charts.ForeignObject";
15
- const c = e;
14
+ i.displayName = "Charts.ForeignObject";
16
15
  export {
17
- c as default
16
+ i as default
18
17
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),b=require("d3-array"),G=require("../styles.cjs"),c=({guides:l=0,direction:t="horizontal",xScale:n,xDomain:e,yScale:r,yDomain:i,margin:d,className:h})=>{if(l===0)return null;const u=t==="horizontal"?i:e,f=t==="horizontal"?r:n,s={...{top:0,right:0,bottom:0,left:0},...d},g=b.ticks(u[1],u[0],l);return a.jsx("g",{className:h,children:g.map((p,j)=>{const o=f(p),z=t==="horizontal"?[n(e[0])-s.left,o]:[o-s.top,r(i[0])],M=t==="horizontal"?[n(e[1])+s.right,o]:[o,r(i[1])+s.bottom];return a.jsx(G.Guide,{points:`${z.join()} ${M.join()}`},j)})})};c.displayName="Charts.Guidelines";const m=c;exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),b=require("d3-array"),m=require("../styles.cjs"),c=({guides:l=0,direction:t="horizontal",xScale:r,xDomain:n,yScale:e,yDomain:i,margin:d,className:h})=>{if(l===0)return null;const u=t==="horizontal"?i:n,f=t==="horizontal"?e:r,o={...{top:0,right:0,bottom:0,left:0},...d},g=b.ticks(u[1],u[0],l);return a.jsx("g",{className:h,children:g.map((p,j)=>{const s=f(p),z=t==="horizontal"?[r(n[0])-o.left,s]:[s-o.top,e(i[0])],M=t==="horizontal"?[r(n[1])+o.right,s]:[s,e(i[1])+o.bottom];return a.jsx(m.Guide,{points:`${z.join()} ${M.join()}`},j)})})};c.displayName="Charts.Guidelines";exports.default=c;
@@ -1,25 +1,24 @@
1
1
  import { jsx as f } from "react/jsx-runtime";
2
2
  import { ticks as j } from "d3-array";
3
- import { Guide as M } from "../styles.js";
4
- const p = ({
3
+ import { Guide as G } from "../styles.js";
4
+ const M = ({
5
5
  guides: a = 0,
6
6
  direction: t = "horizontal",
7
- xScale: r,
7
+ xScale: n,
8
8
  xDomain: s,
9
9
  yScale: i,
10
10
  yDomain: l,
11
- margin: u,
11
+ margin: p,
12
12
  className: h
13
13
  }) => {
14
14
  if (a === 0) return null;
15
- const e = t === "horizontal" ? l : s, c = t === "horizontal" ? i : r, o = { ...{ top: 0, right: 0, bottom: 0, left: 0 }, ...u }, d = j(e[1], e[0], a);
16
- return /* @__PURE__ */ f("g", { className: h, children: d.map((m, g) => {
17
- const n = c(m), z = t === "horizontal" ? [r(s[0]) - o.left, n] : [n - o.top, i(l[0])], G = t === "horizontal" ? [r(s[1]) + o.right, n] : [n, i(l[1]) + o.bottom];
18
- return /* @__PURE__ */ f(M, { points: `${z.join()} ${G.join()}` }, g);
15
+ const e = t === "horizontal" ? l : s, u = t === "horizontal" ? i : n, o = { ...{ top: 0, right: 0, bottom: 0, left: 0 }, ...p }, m = j(e[1], e[0], a);
16
+ return /* @__PURE__ */ f("g", { className: h, children: m.map((c, d) => {
17
+ const r = u(c), g = t === "horizontal" ? [n(s[0]) - o.left, r] : [r - o.top, i(l[0])], z = t === "horizontal" ? [n(s[1]) + o.right, r] : [r, i(l[1]) + o.bottom];
18
+ return /* @__PURE__ */ f(G, { points: `${g.join()} ${z.join()}` }, d);
19
19
  }) });
20
20
  };
21
- p.displayName = "Charts.Guidelines";
22
- const C = p;
21
+ M.displayName = "Charts.Guidelines";
23
22
  export {
24
- C as default
23
+ M as default
25
24
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),E=require("react"),$=require("./ErrorBar.cjs"),y=require("../defaults.cjs"),l=({data:r,label:a,xScale:t,yScale:s,onHoverCallback:i,onHoverOutCallback:n,onLoadedCallback:o,className:c})=>(E.useEffect(()=>{o&&o()},[]),r.length===0?null:e.jsx("g",{role:"list","aria-label":a,className:c,children:r.map((d,f)=>{const{stroke:p,fill:j,radius:m,x,y:g,description:h,error:u,id:q,index:M,props:P}={...y.default.point,...d};return e.jsxs("g",{role:"listitem","aria-label":h,transform:`translate(${t(x)},${s(g)})`,onMouseEnter:()=>i&&i(f),onMouseLeave:()=>n&&n(),children:[u&&e.jsx($.default,{error:u,xScale:t,yScale:s}),e.jsx("circle",{cursor:"pointer",r:m,stroke:p,fill:j,...P})]},q||M)})}));l.displayName="Charts.Points";const _=l;exports.default=_;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),P=require("react"),y=require("./ErrorBar.cjs"),_=require("../defaults.cjs"),l=({data:r,label:a,xScale:t,yScale:s,onHoverCallback:i,onHoverOutCallback:n,onLoadedCallback:u,className:c})=>(P.useEffect(()=>{u&&u()},[]),r.length===0?null:e.jsx("g",{role:"list","aria-label":a,className:c,children:r.map((d,f)=>{const{stroke:p,fill:j,radius:m,x,y:g,description:h,error:o,id:q,index:M,props:E}={..._.default.point,...d};return e.jsxs("g",{role:"listitem","aria-label":h,transform:`translate(${t(x)},${s(g)})`,onMouseEnter:()=>i&&i(f),onMouseLeave:()=>n&&n(),children:[o&&e.jsx(y.default,{error:o,xScale:t,yScale:s}),e.jsx("circle",{cursor:"pointer",r:m,stroke:p,fill:j,...E})]},q||M)})}));l.displayName="Charts.Points";exports.default=l;
@@ -1,62 +1,61 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as M } from "react/jsx-runtime";
3
- import { useEffect as y } from "react";
4
- import B from "./ErrorBar.js";
5
- import N from "../defaults.js";
6
- const m = ({
2
+ import { jsx as r, jsxs as P } from "react/jsx-runtime";
3
+ import { useEffect as $ } from "react";
4
+ import y from "./ErrorBar.js";
5
+ import B from "../defaults.js";
6
+ const N = ({
7
7
  data: t,
8
- label: p,
8
+ label: m,
9
9
  xScale: e,
10
10
  yScale: i,
11
11
  onHoverCallback: s,
12
12
  onHoverOutCallback: o,
13
13
  onLoadedCallback: n,
14
- className: f
15
- }) => (y(() => {
14
+ className: p
15
+ }) => ($(() => {
16
16
  n && n();
17
- }, []), t.length === 0 ? null : /* @__PURE__ */ r("g", { role: "list", "aria-label": p, className: f, children: t.map((u, a) => {
17
+ }, []), t.length === 0 ? null : /* @__PURE__ */ r("g", { role: "list", "aria-label": m, className: p, children: t.map((f, u) => {
18
18
  const {
19
- stroke: c,
19
+ stroke: a,
20
20
  fill: d,
21
- radius: h,
22
- x,
23
- y: g,
24
- description: E,
21
+ radius: c,
22
+ x: h,
23
+ y: x,
24
+ description: g,
25
25
  error: l,
26
- id: P,
27
- index: $,
28
- props: j
26
+ id: E,
27
+ index: j,
28
+ props: M
29
29
  } = {
30
- ...N.point,
31
- ...u
30
+ ...B.point,
31
+ ...f
32
32
  };
33
- return /* @__PURE__ */ M(
33
+ return /* @__PURE__ */ P(
34
34
  "g",
35
35
  {
36
36
  role: "listitem",
37
- "aria-label": E,
38
- transform: `translate(${e(x)},${i(g)})`,
39
- onMouseEnter: () => s && s(a),
37
+ "aria-label": g,
38
+ transform: `translate(${e(h)},${i(x)})`,
39
+ onMouseEnter: () => s && s(u),
40
40
  onMouseLeave: () => o && o(),
41
41
  children: [
42
- l && /* @__PURE__ */ r(B, { error: l, xScale: e, yScale: i }),
42
+ l && /* @__PURE__ */ r(y, { error: l, xScale: e, yScale: i }),
43
43
  /* @__PURE__ */ r(
44
44
  "circle",
45
45
  {
46
46
  cursor: "pointer",
47
- r: h,
48
- stroke: c,
47
+ r: c,
48
+ stroke: a,
49
49
  fill: d,
50
- ...j
50
+ ...M
51
51
  }
52
52
  )
53
53
  ]
54
54
  },
55
- P || $
55
+ E || j
56
56
  );
57
57
  }) }));
58
- m.displayName = "Charts.Points";
59
- const D = m;
58
+ N.displayName = "Charts.Points";
60
59
  export {
61
- D as default
60
+ N as default
62
61
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),u=require("@rubin-epo/epo-react-lib/styles"),d=require("../Viewport/index.cjs"),y=require("../ForeignObject/index.cjs"),o=require("./styles.cjs"),j=(n="")=>{const r=["top","right"],a=["center","center"],s=n?[...n.split(" "),...a].slice(0,2):r,e={justifyContent:null,alignItems:null};return s.forEach(i=>{switch(i){case"center":e.alignItems=e.alignItems??"center",e.justifyContent=e.justifyContent??"center";break;case"top":e.alignItems="start";break;case"right":e.justifyContent="end";break;case"bottom":e.alignItems="end";break;case"left":e.justifyContent="start";break}}),e},c=({className:n,children:r,position:a,viewport:s,forIds:e,forScreenreaders:i})=>{const l=t.jsx(y.default,{children:t.jsx(o.DisplayContainer,{style:j(a),children:t.jsxs(o.Display,{form:Array.isArray(e)?e.join(" "):e,className:n,children:[t.jsx("span",{"aria-hidden":!!i,children:r}),t.jsx(u.ScreenreaderText,{children:i})]})})});return s?t.jsx(d.default,{...s,children:l}):l};c.displayName="Charts.Readout";exports.default=c;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),c=require("@rubin-epo/epo-react-lib/styles");require("../Base/index.cjs");require("../XAxis/index.cjs");require("../YAxis/index.cjs");require("../Guidelines/index.cjs");require("../Tooltip/index.cjs");require("../Bars/index.cjs");const d=require("../Viewport/index.cjs"),y=require("../ForeignObject/index.cjs");require("../ScatterPlot/index.cjs");const o=require("./styles.cjs"),j=(r="")=>{const i=["top","right"],a=["center","center"],n=r?[...r.split(" "),...a].slice(0,2):i,e={justifyContent:null,alignItems:null};return n.forEach(s=>{switch(s){case"center":e.alignItems=e.alignItems??"center",e.justifyContent=e.justifyContent??"center";break;case"top":e.alignItems="start";break;case"right":e.justifyContent="end";break;case"bottom":e.alignItems="end";break;case"left":e.justifyContent="start";break}}),e},u=({className:r,children:i,position:a,viewport:n,forIds:e,forScreenreaders:s})=>{const l=t.jsx(y.default,{children:t.jsx(o.DisplayContainer,{style:j(a),children:t.jsxs(o.Display,{form:Array.isArray(e)?e.join(" "):e,className:r,children:[t.jsx("span",{"aria-hidden":!!s,children:i}),t.jsx(c.ScreenreaderText,{children:s})]})})});return n?t.jsx(d.default,{...n,children:l}):l};u.displayName="Charts.Readout";exports.default=u;