@rubin-epo/epo-widget-lib 1.0.9 → 1.1.1

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 +149 -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 +6 -6
  22. package/dist/charts/ScatterPlot/index.cjs +1 -1
  23. package/dist/charts/ScatterPlot/index.js +49 -50
  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 +22 -22
  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 +37 -0
  54. package/dist/widgets/ViewIndicator/styles.d.ts +1510 -0
  55. package/dist/widgets/ViewIndicator/styles.js +45 -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"),k=require("react"),j=require("d3-geo"),u=require("./widgets/ViewIndicator/styles.cjs"),O=require("./lib/utils.cjs"),g=10,q=10,A=[g,q],m=100,v=100,d=j.geoGraticule();d.step([180,180]);d.precision(90);const b=t=>{const{backFaces:n=!1,applyRotation:i=!0}=t||{},e=j.geoOrthographic();e.fitExtent([[0,0],[m,v]],d.outline()),i&&e.rotate(A),n&&e.clipAngle(null);const s=j.geoPath(e).digits(1);return{projection:e,pathGenerator:c=>s(c)||void 0}},C=()=>{const{pathGenerator:t}=b({applyRotation:!1});return o.jsx("path",{strokeWidth:3,d:t(d.outline())})},$=({backFaces:t})=>{const{pathGenerator:n}=b({backFaces:t});return o.jsx("path",{d:n(d()),opacity:t?.8:void 0})},N=(t,n)=>{const i=t>90-g&&t<270-g,e=n>0+q,s=t>180-g,r=["top","bottom"],c=["left","right"];e&&r.reverse(),s&&c.reverse();const a=["plane",r[0],...c,r[1]];return i&&a.reverse(),a},z=({ra:t,dec:n,fov:i})=>{const{pathGenerator:e}=b({backFaces:!0}),[s,r]=i,c=Math.max(s,.1)/2,a=Math.max(r,.1)/2,S=n+a,M=n-a,w=t+c,G=t-c,l=[w,S],f=[G,S],y=[w,M],x=[G,M],P=m/2,V=v/2,h=p=>`${p}L${P},${V}`,L={plane:o.jsx("path",{opacity:.8,d:e({type:"Polygon",coordinates:[[l,f,x,y,l]]})}),top:o.jsx("path",{opacity:.5,d:h(e({type:"LineString",coordinates:[l,f]}))}),bottom:o.jsx("path",{opacity:.5,d:h(e({type:"LineString",coordinates:[x,y]}))}),left:o.jsx("path",{opacity:.3,d:h(e({type:"LineString",coordinates:[y,l]}))}),right:o.jsx("path",{opacity:.3,d:h(e({type:"LineString",coordinates:[f,x]}))})},W=N(t,n),R=O.getLinearScale([0,180],[0,100],{clamp:!0,fractionDigits:0})(Math.abs(180-t));return o.jsx(u.ViewCone,{style:{"--percent-mix-primary":`${R}%`,"--percent-mix-secondary":`${100-R}%`},children:W.map(p=>{if(L[p])return o.jsx(k.Fragment,{children:L[p]},p)})})},F=({size:t="var(--size-spacing-m)",className:n,ra:i,dec:e,fov:s})=>{const r=typeof i<"u"&&typeof e<"u"&&typeof s<"u";return o.jsxs(u.Container,{style:{"--size-container":t},className:n,children:[o.jsx(u.NorthDirection,{children:"N"}),o.jsxs(u.SVG,{preserveAspectRatio:"xMidYMid meet",viewBox:`0 0 ${m} ${v}`,children:[o.jsx($,{backFaces:!0}),r&&o.jsx(z,{ra:i,dec:e,fov:s}),o.jsx($,{}),o.jsx(C,{})]})]})};F.displayName="Widget.ViewIndicator";exports.default=F;
@@ -0,0 +1,3 @@
1
+ export * from './widgets/ViewIndicator/index'
2
+ import _default from './widgets/ViewIndicator/index'
3
+ export default _default
@@ -0,0 +1,149 @@
1
+ import { jsxs as $, jsx as o } from "react/jsx-runtime";
2
+ import { Fragment as j } from "react";
3
+ import { geoGraticule as k, geoOrthographic as A, geoPath as C } from "d3-geo";
4
+ import { Container as N, NorthDirection as O, SVG as z, ViewCone as B } from "./widgets/ViewIndicator/styles.js";
5
+ import { getLinearScale as D } from "./lib/utils.js";
6
+ const f = 10, R = 10, E = [f, R], y = 100, v = 100, d = k();
7
+ d.step([180, 180]);
8
+ d.precision(90);
9
+ const x = (t) => {
10
+ const { backFaces: n = !1, applyRotation: i = !0 } = t || {}, e = A();
11
+ e.fitExtent(
12
+ [
13
+ [0, 0],
14
+ [y, v]
15
+ ],
16
+ d.outline()
17
+ ), i && e.rotate(E), n && e.clipAngle(null);
18
+ const r = C(e).digits(1);
19
+ return { projection: e, pathGenerator: (s) => r(s) || void 0 };
20
+ }, H = () => {
21
+ const { pathGenerator: t } = x({ applyRotation: !1 });
22
+ return /* @__PURE__ */ o("path", { strokeWidth: 3, d: t(d.outline()) });
23
+ }, F = ({ backFaces: t }) => {
24
+ const { pathGenerator: n } = x({ backFaces: t });
25
+ return /* @__PURE__ */ o(
26
+ "path",
27
+ {
28
+ d: n(d()),
29
+ opacity: t ? 0.8 : void 0
30
+ }
31
+ );
32
+ }, I = (t, n) => {
33
+ const i = t > 90 - f && t < 270 - f, e = n > 0 + R, r = t > 180 - f, c = ["top", "bottom"], s = ["left", "right"];
34
+ e && c.reverse(), r && s.reverse();
35
+ const a = ["plane", c[0], ...s, c[1]];
36
+ return i && a.reverse(), a;
37
+ }, Y = ({ ra: t, dec: n, fov: i }) => {
38
+ 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, w = n - a, L = t + s, S = t - s, h = [L, b], g = [S, b], m = [L, w], u = [S, w], P = y / 2, V = v / 2, l = (p) => `${p}L${P},${V}`, G = {
39
+ plane: /* @__PURE__ */ o(
40
+ "path",
41
+ {
42
+ opacity: 0.8,
43
+ d: e({
44
+ type: "Polygon",
45
+ coordinates: [[h, g, u, m, h]]
46
+ })
47
+ }
48
+ ),
49
+ top: /* @__PURE__ */ o(
50
+ "path",
51
+ {
52
+ opacity: 0.5,
53
+ d: l(
54
+ e({
55
+ type: "LineString",
56
+ coordinates: [h, g]
57
+ })
58
+ )
59
+ }
60
+ ),
61
+ bottom: /* @__PURE__ */ o(
62
+ "path",
63
+ {
64
+ opacity: 0.5,
65
+ d: l(
66
+ e({
67
+ type: "LineString",
68
+ coordinates: [u, m]
69
+ })
70
+ )
71
+ }
72
+ ),
73
+ left: /* @__PURE__ */ o(
74
+ "path",
75
+ {
76
+ opacity: 0.3,
77
+ d: l(
78
+ e({
79
+ type: "LineString",
80
+ coordinates: [m, h]
81
+ })
82
+ )
83
+ }
84
+ ),
85
+ right: /* @__PURE__ */ o(
86
+ "path",
87
+ {
88
+ opacity: 0.3,
89
+ d: l(
90
+ e({
91
+ type: "LineString",
92
+ coordinates: [g, u]
93
+ })
94
+ )
95
+ }
96
+ )
97
+ }, W = I(t, n), M = D([0, 180], [0, 100], {
98
+ clamp: !0,
99
+ fractionDigits: 0
100
+ })(Math.abs(180 - t));
101
+ return /* @__PURE__ */ o(
102
+ B,
103
+ {
104
+ style: {
105
+ "--percent-mix-primary": `${M}%`,
106
+ "--percent-mix-secondary": `${100 - M}%`
107
+ },
108
+ children: W.map((p) => {
109
+ if (G[p])
110
+ return /* @__PURE__ */ o(j, { children: G[p] }, p);
111
+ })
112
+ }
113
+ );
114
+ }, q = ({
115
+ size: t = "var(--size-spacing-m)",
116
+ className: n,
117
+ ra: i,
118
+ dec: e,
119
+ fov: r
120
+ }) => {
121
+ const c = typeof i < "u" && typeof e < "u" && typeof r < "u";
122
+ return /* @__PURE__ */ $(
123
+ N,
124
+ {
125
+ style: { "--size-container": t },
126
+ className: n,
127
+ children: [
128
+ /* @__PURE__ */ o(O, { children: "N" }),
129
+ /* @__PURE__ */ $(
130
+ z,
131
+ {
132
+ preserveAspectRatio: "xMidYMid meet",
133
+ viewBox: `0 0 ${y} ${v}`,
134
+ children: [
135
+ /* @__PURE__ */ o(F, { backFaces: !0 }),
136
+ c && /* @__PURE__ */ o(Y, { ra: i, dec: e, fov: r }),
137
+ /* @__PURE__ */ o(F, {}),
138
+ /* @__PURE__ */ o(H, {})
139
+ ]
140
+ }
141
+ )
142
+ ]
143
+ }
144
+ );
145
+ };
146
+ q.displayName = "Widget.ViewIndicator";
147
+ export {
148
+ q as default
149
+ };
@@ -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"),u=require("@rubin-epo/epo-react-lib/styles"),o=require("./styles.cjs"),d=require("../ForeignObject/index.cjs"),y=require("../Viewport/index.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(d.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(y.default,{...s,children:l}):l};c.displayName="Charts.Readout";exports.default=c;