@rubin-epo/epo-widget-lib 0.9.8 → 0.9.9

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 (128) hide show
  1. package/dist/CameraFilter.cjs +1 -1
  2. package/dist/CameraFilter.js +25 -24
  3. package/dist/Charts.cjs +1 -1
  4. package/dist/Charts.js +14 -12
  5. package/dist/ColorTool.cjs +1 -1
  6. package/dist/ColorTool.js +98 -103
  7. package/dist/FilterTool.cjs +1 -1
  8. package/dist/FilterTool.js +1 -1
  9. package/dist/SupernovaThreeVector.cjs +1 -1
  10. package/dist/SupernovaThreeVector.js +12 -12
  11. package/dist/atomic/PlaybackControl/PlaybackControl.d.ts +1 -2
  12. package/dist/charts/Bars/index.d.ts +1 -1
  13. package/dist/charts/Base/index.d.ts +1 -1
  14. package/dist/charts/Guidelines/index.cjs +1 -1
  15. package/dist/charts/Guidelines/index.d.ts +1 -1
  16. package/dist/charts/Guidelines/index.js +9 -9
  17. package/dist/charts/Points/ErrorBar.cjs +1 -0
  18. package/dist/charts/Points/ErrorBar.d.ts +9 -0
  19. package/dist/charts/Points/ErrorBar.js +119 -0
  20. package/dist/charts/Points/index.cjs +1 -1
  21. package/dist/charts/Points/index.d.ts +5 -11
  22. package/dist/charts/Points/index.js +44 -22
  23. package/dist/charts/ScatterPlot/index.cjs +1 -0
  24. package/dist/charts/ScatterPlot/index.d.ts +24 -0
  25. package/dist/charts/ScatterPlot/index.js +133 -0
  26. package/dist/charts/ScatterPlot/styles.cjs +22 -0
  27. package/dist/charts/ScatterPlot/styles.d.ts +16 -0
  28. package/dist/charts/ScatterPlot/styles.js +29 -0
  29. package/dist/charts/XAxis/index.d.ts +1 -1
  30. package/dist/charts/YAxis/index.d.ts +1 -1
  31. package/dist/charts/defaults.cjs +1 -0
  32. package/dist/charts/defaults.d.ts +22 -0
  33. package/dist/charts/defaults.js +23 -0
  34. package/dist/charts/hooks/useAxis.d.ts +1 -1
  35. package/dist/charts/index.d.ts +1 -0
  36. package/dist/hooks/useInterval.cjs +1 -1
  37. package/dist/hooks/useInterval.js +10 -10
  38. package/dist/hooks/useWindowSize.d.ts +4 -0
  39. package/dist/layout/AspectRatio/index.cjs +1 -0
  40. package/dist/layout/AspectRatio/index.d.ts +18 -0
  41. package/dist/layout/AspectRatio/index.js +24 -0
  42. package/dist/layout/AspectRatio/styles.cjs +16 -0
  43. package/dist/{widgets/ColorTool/Actions → layout/AspectRatio}/styles.d.ts +1 -1
  44. package/dist/layout/AspectRatio/styles.js +22 -0
  45. package/dist/layout/Controls/index.cjs +1 -0
  46. package/dist/layout/Controls/index.d.ts +10 -0
  47. package/dist/layout/Controls/index.js +31 -0
  48. package/dist/layout/Controls/styles.cjs +63 -0
  49. package/dist/{widgets/ColorTool → layout/Controls}/styles.d.ts +604 -332
  50. package/dist/layout/Controls/styles.js +75 -0
  51. package/dist/lib/reimg.cjs +1 -1
  52. package/dist/lib/reimg.d.ts +2 -2
  53. package/dist/lib/reimg.js +30 -31
  54. package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.cjs +1 -1
  55. package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.js +1 -1
  56. package/dist/widgets/CameraFilter/styles.cjs +24 -20
  57. package/dist/widgets/CameraFilter/styles.js +36 -32
  58. package/dist/widgets/ColorTool/Actions/index.cjs +1 -1
  59. package/dist/widgets/ColorTool/Actions/index.js +24 -25
  60. package/dist/widgets/ColorTool/FilterControls/styles.cjs +4 -4
  61. package/dist/widgets/ColorTool/FilterControls/styles.d.ts +1252 -0
  62. package/dist/widgets/ColorTool/FilterControls/styles.js +1 -1
  63. package/dist/widgets/ColorTool/ImageComposite/ImageComposite.cjs +1 -1
  64. package/dist/widgets/ColorTool/ImageComposite/ImageComposite.js +26 -29
  65. package/dist/widgets/ColorTool/ImageComposite/styles.cjs +5 -3
  66. package/dist/widgets/ColorTool/ImageComposite/styles.js +4 -2
  67. package/dist/widgets/ColorTool/styles.cjs +10 -24
  68. package/dist/widgets/ColorTool/styles.js +15 -29
  69. package/dist/widgets/FilterTool/FilterTool.d.ts +1 -1
  70. package/dist/widgets/FilterTool/styles.cjs +9 -9
  71. package/dist/widgets/FilterTool/styles.d.ts +6 -269
  72. package/dist/widgets/FilterTool/styles.js +17 -16
  73. package/dist/widgets/LightCurvePlot/Plot/index.cjs +1 -0
  74. package/dist/widgets/LightCurvePlot/Plot/index.d.ts +12 -0
  75. package/dist/widgets/LightCurvePlot/Plot/index.js +99 -0
  76. package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.cjs +4 -4
  77. package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.js +7 -6
  78. package/dist/widgets/LightCurvePlot/PlotWithCurve/A11Y/LightCurveLabel/index.cjs +1 -0
  79. package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/index.d.ts +2 -2
  80. package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/index.js +2 -2
  81. package/dist/widgets/LightCurvePlot/PlotWithCurve/DM15Display/index.cjs +1 -0
  82. package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/index.js +2 -2
  83. package/dist/widgets/LightCurvePlot/PlotWithCurve/LightCurve/index.cjs +1 -0
  84. package/dist/widgets/LightCurvePlot/{LightCurve → PlotWithCurve/LightCurve}/index.d.ts +1 -1
  85. package/dist/widgets/LightCurvePlot/{LightCurve → PlotWithCurve/LightCurve}/index.js +1 -1
  86. package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/index.d.ts +0 -2
  87. package/dist/widgets/LightCurvePlot/PlotWithCurve/index.cjs +1 -1
  88. package/dist/widgets/LightCurvePlot/PlotWithCurve/index.js +132 -119
  89. package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.cjs +9 -11
  90. package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.js +13 -16
  91. package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.cjs +1 -1
  92. package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.d.ts +2 -2
  93. package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.js +17 -15
  94. package/dist/widgets/LightCurvePlot/helpers.cjs +1 -1
  95. package/dist/widgets/LightCurvePlot/helpers.d.ts +3 -12
  96. package/dist/widgets/LightCurvePlot/helpers.js +33 -18
  97. package/dist/widgets/SourceSelector/SourceSelector.cjs +1 -1
  98. package/dist/widgets/SourceSelector/SourceSelector.js +53 -60
  99. package/dist/widgets/SupernovaThreeVector/Histogram/index.d.ts +1 -1
  100. package/dist/widgets/SupernovaThreeVector/index.d.ts +1 -1
  101. package/dist/widgets/SupernovaThreeVector/styles.cjs +10 -10
  102. package/dist/widgets/SupernovaThreeVector/styles.js +23 -22
  103. package/package.json +1 -1
  104. package/dist/styles/svg.cjs +0 -8
  105. package/dist/styles/svg.js +0 -13
  106. package/dist/widgets/ColorTool/Actions/styles.cjs +0 -5
  107. package/dist/widgets/ColorTool/Actions/styles.js +0 -10
  108. package/dist/widgets/LightCurvePlot/A11Y/LightCurveLabel/index.cjs +0 -1
  109. package/dist/widgets/LightCurvePlot/DM15Display/index.cjs +0 -1
  110. package/dist/widgets/LightCurvePlot/LightCurve/index.cjs +0 -1
  111. package/dist/widgets/LightCurvePlot/Point/index.cjs +0 -1
  112. package/dist/widgets/LightCurvePlot/Point/index.d.ts +0 -11
  113. package/dist/widgets/LightCurvePlot/Point/index.js +0 -68
  114. package/dist/widgets/LightCurvePlot/ScatterPlot/index.cjs +0 -1
  115. package/dist/widgets/LightCurvePlot/ScatterPlot/index.d.ts +0 -12
  116. package/dist/widgets/LightCurvePlot/ScatterPlot/index.js +0 -178
  117. /package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.d.ts +0 -0
  118. /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.cjs +0 -0
  119. /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.d.ts +0 -0
  120. /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.js +0 -0
  121. /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/index.d.ts +0 -0
  122. /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.cjs +0 -0
  123. /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.d.ts +0 -0
  124. /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.js +0 -0
  125. /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/index.cjs +0 -0
  126. /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/index.js +0 -0
  127. /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/styles.cjs +0 -0
  128. /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/styles.js +0 -0
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),v=require("react"),q=require("@rubin-epo/epo-react-lib/SelectListbox"),y=require("@rubin-epo/epo-react-lib/styles"),S=require("react-i18next"),C=require("use-resize-observer"),r=require("./widgets/CameraFilter/data.cjs"),l=require("./widgets/CameraFilter/styles.cjs"),R=require("./widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.cjs"),L=require("./widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.cjs"),x=i=>i&&i.__esModule?i:{default:i},M=x(q),O=x(C),m=()=>{const{t:i}=S.useTranslation(),{ref:h,width:j=1}=O.default(),[c,b]=v.useState(null),{BREAK_TABLET:p}=y.tokens,s=j<parseInt(p),{[s?"condensed":"default"]:{min:o,max:g,range:n}}=r.rangeConfig,d=r.filters[0].range[0],u=r.filters[r.filters.length-1].range[1]-d,f=r.filters.filter(({band:e})=>e),F=[{value:"none",label:i("camera_filter.labels.option",{context:"none"})}].concat(f.map(({band:e})=>({value:e,label:i("camera_filter.labels.option",{band:e})}))),_=r.filters.find(({band:e})=>e===c);return t.jsxs(l.FilterContainer,{ref:h,children:[t.jsx(l.FilterTitle,{children:i("camera_filter.title")}),s&&t.jsx(R.default,{filters:f,min:o,spectrumRange:n}),t.jsxs(l.FilterTable,{style:{"--filter-table-margin-inline-start":`${((d-o)/n*100).toFixed(2)}%`,"--filter-table-width":`${(u/n*100).toFixed(2)}%`},"data-testid":"expanded-filters",children:[t.jsx("colgroup",{children:r.filters.map(({range:e})=>t.jsx("col",{style:{width:`${(e[1]-e[0])/u*100}%`}},e.join("")))}),t.jsx(l.FilterNames,{children:t.jsx("tr",{children:r.filters.map(({band:e},a)=>t.jsx(l.FilterName,{id:`${e}-name`,style:{"--filter-name-border":e?"solid #b2b2b2":"none"},scope:"col","aria-hidden":!e,children:e},a))})}),!s&&t.jsx(l.FilterRanges,{children:t.jsx("tr",{children:r.filters.map(({band:e,range:a})=>t.jsx(l.FilterRange,{"aria-hidden":!e,children:e&&t.jsxs(t.Fragment,{children:[a.join("–"),t.jsx("br",{}),t.jsx(l.Wavelength,{children:"nm"})]})},a.join()))})})]}),t.jsx(L.default,{min:o,max:g,range:n,isCondensed:s,activeFilter:_}),t.jsxs(l.SelectContainer,{children:[t.jsx(l.SelectLabel,{id:"filterSelectLabel",children:i("camera_filter.labels.select")}),t.jsx(M.default,{options:F,value:c,onChangeCallback:e=>b(e),width:"100%",maxWidth:"100%",labelledById:"filterSelectLabel"})]})]})};m.displayName="Widgets.CameraFilter";exports.default=m;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),q=require("react"),v=require("@rubin-epo/epo-react-lib/SelectListbox"),y=require("@rubin-epo/epo-react-lib/styles"),S=require("react-i18next"),C=require("use-resize-observer"),r=require("./widgets/CameraFilter/data.cjs"),l=require("./widgets/CameraFilter/styles.cjs"),R=require("./layout/AspectRatio/index.cjs"),L=require("./widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.cjs"),M=require("./widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.cjs"),x=i=>i&&i.__esModule?i:{default:i},O=x(v),T=x(C),h=()=>{const{t:i}=S.useTranslation(),{ref:j,width:m=1}=T.default(),[o,p]=q.useState(null),{BREAK_TABLET:b}=y.tokens,s=m<parseInt(b),{[s?"condensed":"default"]:{min:c,max:g,range:n}}=r.rangeConfig,d=r.filters[0].range[0],u=r.filters[r.filters.length-1].range[1]-d,f=r.filters.filter(({band:t})=>t),F=[{value:"none",label:i("camera_filter.labels.option",{context:"none"})}].concat(f.map(({band:t})=>({value:t,label:i("camera_filter.labels.option",{band:t})}))),_=r.filters.find(({band:t})=>t===o);return e.jsx(R.default,{ratio:"landscape",children:e.jsxs(l.FilterContainer,{ref:j,children:[e.jsx(l.FilterTitle,{children:i("camera_filter.title")}),s&&e.jsx(L.default,{filters:f,min:c,spectrumRange:n}),e.jsxs(l.FilterTable,{style:{"--filter-table-margin-inline-start":`${((d-c)/n*100).toFixed(2)}%`,"--filter-table-width":`${(u/n*100).toFixed(2)}%`},"data-testid":"expanded-filters",children:[e.jsx("colgroup",{children:r.filters.map(({range:t})=>e.jsx("col",{style:{width:`${(t[1]-t[0])/u*100}%`}},t.join("")))}),e.jsx(l.FilterNames,{children:e.jsx("tr",{children:r.filters.map(({band:t},a)=>e.jsx(l.FilterName,{id:`${t}-name`,style:{"--filter-name-border":t?"solid #b2b2b2":"none"},scope:"col","aria-hidden":!t,children:t},a))})}),!s&&e.jsx(l.FilterRanges,{children:e.jsx("tr",{children:r.filters.map(({band:t,range:a})=>e.jsx(l.FilterRange,{"aria-hidden":!t,children:t&&e.jsxs(e.Fragment,{children:[a.join("–"),e.jsx("br",{}),e.jsx(l.Wavelength,{children:"nm"})]})},a.join()))})})]}),e.jsx(M.default,{min:c,max:g,range:n,isCondensed:s,activeFilter:_}),e.jsxs(l.SelectContainer,{children:[e.jsx(l.SelectLabel,{id:"filterSelectLabel",children:i("camera_filter.labels.select")}),e.jsx(O.default,{options:F,value:o,onChangeCallback:t=>p(t),width:"100%",maxWidth:"100%",labelledById:"filterSelectLabel"})]})]})})};h.displayName="Widgets.CameraFilter";exports.default=h;
@@ -1,30 +1,31 @@
1
1
  "use client";
2
- import { jsxs as o, jsx as t, Fragment as C } from "react/jsx-runtime";
2
+ import { jsx as t, jsxs as o, Fragment as C } from "react/jsx-runtime";
3
3
  import { useState as v } from "react";
4
- import y from "@rubin-epo/epo-react-lib/SelectListbox";
5
- import { tokens as R } from "@rubin-epo/epo-react-lib/styles";
4
+ import R from "@rubin-epo/epo-react-lib/SelectListbox";
5
+ import { tokens as y } from "@rubin-epo/epo-react-lib/styles";
6
6
  import { useTranslation as S } from "react-i18next";
7
7
  import j from "use-resize-observer";
8
8
  import { filters as i, rangeConfig as B } from "./widgets/CameraFilter/data.js";
9
- import { FilterContainer as L, FilterTitle as T, FilterTable as _, FilterNames as w, FilterName as O, FilterRanges as $, FilterRange as A, Wavelength as M, SelectContainer as N, SelectLabel as W } from "./widgets/CameraFilter/styles.js";
10
- import k from "./widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.js";
11
- import E from "./widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.js";
12
- const I = () => {
13
- const { t: l } = S(), { ref: p, width: h = 1 } = j(), [c, F] = v(null), { BREAK_TABLET: b } = R, r = h < parseInt(b), {
14
- [r ? "condensed" : "default"]: { min: s, max: g, range: n }
9
+ import { FilterContainer as L, FilterTitle as T, FilterTable as _, FilterNames as w, FilterName as A, FilterRanges as O, FilterRange as $, Wavelength as M, SelectContainer as N, SelectLabel as W } from "./widgets/CameraFilter/styles.js";
10
+ import k from "./layout/AspectRatio/index.js";
11
+ import E from "./widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.js";
12
+ import I from "./widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.js";
13
+ const z = () => {
14
+ const { t: r } = S(), { ref: p, width: h = 1 } = j(), [c, F] = v(null), { BREAK_TABLET: b } = y, l = h < parseInt(b), {
15
+ [l ? "condensed" : "default"]: { min: s, max: g, range: n }
15
16
  } = B, d = i[0].range[0], m = i[i.length - 1].range[1] - d, f = i.filter(({ band: e }) => e), u = [{
16
17
  value: "none",
17
- label: l("camera_filter.labels.option", { context: "none" })
18
+ label: r("camera_filter.labels.option", { context: "none" })
18
19
  }].concat(
19
20
  f.map(({ band: e }) => ({
20
21
  value: e,
21
- label: l("camera_filter.labels.option", { band: e })
22
+ label: r("camera_filter.labels.option", { band: e })
22
23
  }))
23
24
  ), x = i.find(({ band: e }) => e === c);
24
- return /* @__PURE__ */ o(L, { ref: p, children: [
25
- /* @__PURE__ */ t(T, { children: l("camera_filter.title") }),
26
- r && /* @__PURE__ */ t(
27
- k,
25
+ return /* @__PURE__ */ t(k, { ratio: "landscape", children: /* @__PURE__ */ o(L, { ref: p, children: [
26
+ /* @__PURE__ */ t(T, { children: r("camera_filter.title") }),
27
+ l && /* @__PURE__ */ t(
28
+ E,
28
29
  {
29
30
  filters: f,
30
31
  min: s,
@@ -50,7 +51,7 @@ const I = () => {
50
51
  e.join("")
51
52
  )) }),
52
53
  /* @__PURE__ */ t(w, { children: /* @__PURE__ */ t("tr", { children: i.map(({ band: e }, a) => /* @__PURE__ */ t(
53
- O,
54
+ A,
54
55
  {
55
56
  id: `${e}-name`,
56
57
  style: {
@@ -62,7 +63,7 @@ const I = () => {
62
63
  },
63
64
  a
64
65
  )) }) }),
65
- !r && /* @__PURE__ */ t($, { children: /* @__PURE__ */ t("tr", { children: i.map(({ band: e, range: a }) => /* @__PURE__ */ t(A, { "aria-hidden": !e, children: e && /* @__PURE__ */ o(C, { children: [
66
+ !l && /* @__PURE__ */ t(O, { children: /* @__PURE__ */ t("tr", { children: i.map(({ band: e, range: a }) => /* @__PURE__ */ t($, { "aria-hidden": !e, children: e && /* @__PURE__ */ o(C, { children: [
66
67
  a.join("–"),
67
68
  /* @__PURE__ */ t("br", {}),
68
69
  /* @__PURE__ */ t(M, { children: "nm" })
@@ -71,19 +72,19 @@ const I = () => {
71
72
  }
72
73
  ),
73
74
  /* @__PURE__ */ t(
74
- E,
75
+ I,
75
76
  {
76
77
  min: s,
77
78
  max: g,
78
79
  range: n,
79
- isCondensed: r,
80
+ isCondensed: l,
80
81
  activeFilter: x
81
82
  }
82
83
  ),
83
84
  /* @__PURE__ */ o(N, { children: [
84
- /* @__PURE__ */ t(W, { id: "filterSelectLabel", children: l("camera_filter.labels.select") }),
85
+ /* @__PURE__ */ t(W, { id: "filterSelectLabel", children: r("camera_filter.labels.select") }),
85
86
  /* @__PURE__ */ t(
86
- y,
87
+ R,
87
88
  {
88
89
  options: u,
89
90
  value: c,
@@ -94,9 +95,9 @@ const I = () => {
94
95
  }
95
96
  )
96
97
  ] })
97
- ] });
98
+ ] }) });
98
99
  };
99
- I.displayName = "Widgets.CameraFilter";
100
+ z.displayName = "Widgets.CameraFilter";
100
101
  export {
101
- I as default
102
+ z as default
102
103
  };
package/dist/Charts.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./charts/Base/index.cjs"),i=require("./charts/XAxis/index.cjs"),t=require("./charts/YAxis/index.cjs"),n=require("./charts/Guidelines/index.cjs"),r=require("./charts/Points/index.cjs"),u=require("./charts/Tooltip/index.cjs"),d=require("./charts/ClippingContainer/index.cjs"),o=require("./charts/Bars/index.cjs"),s=require("./charts/Viewport/index.cjs"),l=require("./charts/ForeignObject/index.cjs");exports.Base=e.default;exports.XAxis=i.default;exports.YAxis=t.default;exports.Guidelines=n.default;exports.Points=r.default;exports.Tooltip=u.default;exports.ClippingContainer=d.default;exports.Bars=o.default;exports.Viewport=s.default;exports.ForeignObject=l.default;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./charts/Base/index.cjs"),i=require("./charts/XAxis/index.cjs"),t=require("./charts/YAxis/index.cjs"),r=require("./charts/Guidelines/index.cjs"),n=require("./charts/Points/index.cjs"),u=require("./charts/Tooltip/index.cjs"),d=require("./charts/ClippingContainer/index.cjs"),o=require("./charts/Bars/index.cjs"),s=require("./charts/Viewport/index.cjs"),a=require("./charts/ForeignObject/index.cjs"),l=require("./charts/ScatterPlot/index.cjs");exports.Base=e.default;exports.XAxis=i.default;exports.YAxis=t.default;exports.Guidelines=r.default;exports.Points=n.default;exports.Tooltip=u.default;exports.ClippingContainer=d.default;exports.Bars=o.default;exports.Viewport=s.default;exports.ForeignObject=a.default;exports.ScatterPlot=l.default;
package/dist/Charts.js CHANGED
@@ -1,22 +1,24 @@
1
- import { default as t } from "./charts/Base/index.js";
1
+ import { default as o } from "./charts/Base/index.js";
2
2
  import { default as a } from "./charts/XAxis/index.js";
3
3
  import { default as s } from "./charts/YAxis/index.js";
4
- import { default as l } from "./charts/Guidelines/index.js";
4
+ import { default as p } from "./charts/Guidelines/index.js";
5
5
  import { default as d } from "./charts/Points/index.js";
6
- import { default as u } from "./charts/Tooltip/index.js";
6
+ import { default as i } from "./charts/Tooltip/index.js";
7
7
  import { default as n } from "./charts/ClippingContainer/index.js";
8
- import { default as A } from "./charts/Bars/index.js";
9
- import { default as C } from "./charts/Viewport/index.js";
10
- import { default as c } from "./charts/ForeignObject/index.js";
8
+ import { default as g } from "./charts/Bars/index.js";
9
+ import { default as B } from "./charts/Viewport/index.js";
10
+ import { default as P } from "./charts/ForeignObject/index.js";
11
+ import { default as j } from "./charts/ScatterPlot/index.js";
11
12
  export {
12
- A as Bars,
13
- t as Base,
13
+ g as Bars,
14
+ o as Base,
14
15
  n as ClippingContainer,
15
- c as ForeignObject,
16
- l as Guidelines,
16
+ P as ForeignObject,
17
+ p as Guidelines,
17
18
  d as Points,
18
- u as Tooltip,
19
- C as Viewport,
19
+ j as ScatterPlot,
20
+ i as Tooltip,
21
+ B as Viewport,
20
22
  a as XAxis,
21
23
  s as YAxis
22
24
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),y=require("react"),W=require("react-i18next"),H=require("./widgets/ColorTool/lib/utils.cjs"),l=require("./widgets/ColorTool/styles.cjs"),R=require("@rubin-epo/epo-react-lib/SelectListbox"),$=require("./widgets/ColorTool/Actions/index.cjs"),p=require("./widgets/ColorTool/ImageComposite/ImageComposite.cjs"),v=require("./widgets/ColorTool/FilterControls/FilterControls.cjs"),D=o=>o&&o.__esModule?o:{default:o},N=D(R),T=({data:o,objectOptions:L=[],selectedData:d,colorOptions:C=[],selectionCallback:n,isDisabled:u=!1,isDisplayOnly:S=!1,className:x,config:_={actions:["reset"],width:600,height:600,hideSubtitle:!1}})=>{const q={actions:["reset"],width:600,height:600,hideSubtitle:!1},h=y.useRef(null),{t:a}=W.useTranslation(),{filters:r,name:c}=d,{actions:F,width:s,height:i,hideSubtitle:w}={...q,..._},j=r.map(({image:t})=>({url:t,width:s,height:i}));if(S)return e.jsx(p.default,{ref:h,isDisplayOnly:!0,filters:r,width:s,height:i,selectedObjectName:c,className:x,images:j});const I=t=>{const{label:f}=t,{filters:b}=d,M=b.map(m=>m.label===f?t:m);return n&&n({...d,filters:M})},O=t=>{if(t)return n&&n({name:t,filters:H.getDataFiltersByName(o,t)})},g=o.length>1,B=a("colorTool.actions.select_an_object");return e.jsx(l.WidgetContainer,{className:x,children:e.jsxs(l.WidgetLayout,{style:{"--image-width":typeof s=="number"?`${s}px`:s,"--image-height":typeof i=="number"?`${i}px`:i},children:[c&&g&&e.jsx(l.Title,{children:!w&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:a("colorTool.labels.object")}),e.jsx("dd",{children:c})]})}),e.jsxs(l.ControlsContainer,{children:[r&&e.jsxs(e.Fragment,{children:[e.jsx(l.ToolsHeader,{id:"filterLabel",children:a("colorTool.labels.filter")}),e.jsx(l.ToolsHeader,{id:"colorLabel",children:a("colorTool.labels.color")}),e.jsx(l.ToolsHeader,{id:"intensityLabel",children:a("colorTool.labels.color_intensity")})]}),r&&r.map(t=>{const{label:f,isDisabled:b}=t;return y.createElement(v.default,{filter:t,colorOptions:C,key:`filter-${f}`,isDisabled:u||b,onChangeFilterCallback:I,buttonLabelledById:"filterLabel",selectLabelledById:"colorLabel",sliderLabelledById:"intensityLabel"})})]}),e.jsx(p.default,{ref:h,filters:r,width:s,height:i,selectedObjectName:c,images:j,children:g&&e.jsx(l.SelectionContainer,{children:e.jsx(N.default,{id:"astroObjectSelector",placeholder:B,options:L,onChangeCallback:O,value:c,isDisabled:u,width:"100%",maxWidth:"100%"})})}),e.jsx($.default,{actions:F,canvas:h.current,selectedData:d,isDisabled:u,selectionCallback:n})]})})};T.displayName="Widgets.ColorTool";exports.default=T;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),m=require("react"),H=require("react-i18next"),N=require("./widgets/ColorTool/lib/utils.cjs"),o=require("./widgets/ColorTool/styles.cjs"),R=require("@rubin-epo/epo-react-lib/SelectListbox"),W=require("./widgets/ColorTool/Actions/index.cjs"),v=require("./layout/AspectRatio/index.cjs"),y=require("./widgets/ColorTool/ImageComposite/ImageComposite.cjs"),D=require("./widgets/ColorTool/FilterControls/FilterControls.cjs"),P=l=>l&&l.__esModule?l:{default:l},$=P(R),T=({data:l,objectOptions:p=[],selectedData:a,colorOptions:L=[],selectionCallback:s,isDisabled:c=!1,isDisplayOnly:q=!1,className:S,config:_={actions:["reset"],width:600,height:600,hideSubtitle:!1}})=>{const C={actions:["reset"],width:600,height:600,hideSubtitle:!1},d=m.useRef(null),{t:i}=H.useTranslation(),{filters:r,name:n}=a,{actions:F,width:u,height:h,hideSubtitle:w}={...C,..._},j=r.map(({image:t})=>({url:t,width:u,height:h}));if(q)return e.jsx(v.default,{ratio:"square",children:e.jsx(y.default,{ref:d,isDisplayOnly:!0,filters:r,width:u,height:h,selectedObjectName:n,className:S,images:j})});const I=t=>{const{label:f}=t,{filters:b}=a,M=b.map(g=>g.label===f?t:g);return s&&s({...a,filters:M})},O=t=>{if(t)return s&&s({name:t,filters:N.getDataFiltersByName(l,t)})},x=l.length>1,B=i("colorTool.actions.select_an_object");return e.jsx(o.WidgetLayout,{widget:e.jsx(y.default,{ref:d,filters:r,width:u,height:h,selectedObjectName:n,images:j,children:x&&e.jsx(o.SelectionContainer,{children:e.jsx($.default,{id:"astroObjectSelector",placeholder:B,options:p,onChangeCallback:O,value:n,isDisabled:c,width:"100%",maxWidth:"100%"})})}),controls:e.jsxs(o.ControlsContainer,{children:[r&&e.jsxs(e.Fragment,{children:[e.jsx(o.ToolsHeader,{id:"filterLabel",children:i("colorTool.labels.filter")}),e.jsx(o.ToolsHeader,{id:"colorLabel",children:i("colorTool.labels.color")}),e.jsx(o.ToolsHeader,{id:"intensityLabel",children:i("colorTool.labels.color_intensity")})]}),r&&r.map(t=>{const{label:f,isDisabled:b}=t;return m.createElement(D.default,{filter:t,colorOptions:L,key:`filter-${f}`,isDisabled:c||b,onChangeFilterCallback:I,buttonLabelledById:"filterLabel",selectLabelledById:"colorLabel",sliderLabelledById:"intensityLabel"})})]}),actions:e.jsx(W.default,{actions:F,canvas:d.current,selectedData:a,isDisabled:c,selectionCallback:s}),caption:n&&x&&e.jsx(o.Title,{children:!w&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:i("colorTool.labels.object")}),e.jsx("dd",{children:n})]})})})};T.displayName="Widgets.ColorTool";exports.default=T;
package/dist/ColorTool.js CHANGED
@@ -1,139 +1,134 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as c, Fragment as C } from "react/jsx-runtime";
3
- import { useRef as N, createElement as R } from "react";
4
- import { useTranslation as A } from "react-i18next";
2
+ import { jsx as e, jsxs as f, Fragment as L } from "react/jsx-runtime";
3
+ import { useRef as _, createElement as A } from "react";
4
+ import { useTranslation as q } from "react-i18next";
5
5
  import { getDataFiltersByName as D } from "./widgets/ColorTool/lib/utils.js";
6
- import { WidgetContainer as E, WidgetLayout as H, Title as M, ControlsContainer as P, ToolsHeader as b, SelectionContainer as q } from "./widgets/ColorTool/styles.js";
7
- import v from "@rubin-epo/epo-react-lib/SelectListbox";
8
- import z from "./widgets/ColorTool/Actions/index.js";
6
+ import { WidgetLayout as E, SelectionContainer as H, ControlsContainer as M, ToolsHeader as b, Title as P } from "./widgets/ColorTool/styles.js";
7
+ import $ from "@rubin-epo/epo-react-lib/SelectListbox";
8
+ import v from "./widgets/ColorTool/Actions/index.js";
9
+ import z from "./layout/AspectRatio/index.js";
9
10
  import T from "./widgets/ColorTool/ImageComposite/ImageComposite.js";
10
11
  import G from "./widgets/ColorTool/FilterControls/FilterControls.js";
11
12
  const J = ({
12
13
  data: p,
13
- objectOptions: j = [],
14
- selectedData: a,
15
- colorOptions: x = [],
16
- selectionCallback: i,
17
- isDisabled: d = !1,
14
+ objectOptions: C = [],
15
+ selectedData: n,
16
+ colorOptions: j = [],
17
+ selectionCallback: l,
18
+ isDisabled: s = !1,
18
19
  isDisplayOnly: S = !1,
19
- className: u,
20
- config: F = {
20
+ className: F,
21
+ config: w = {
21
22
  actions: ["reset"],
22
23
  width: 600,
23
24
  height: 600,
24
25
  hideSubtitle: !1
25
26
  }
26
27
  }) => {
27
- const w = {
28
+ const x = {
28
29
  actions: ["reset"],
29
30
  width: 600,
30
31
  height: 600,
31
32
  hideSubtitle: !1
32
- }, h = N(null), { t: n } = A(), { filters: o, name: s } = a, { actions: B, width: l, height: r, hideSubtitle: I } = {
33
- ...w,
34
- ...F
35
- }, g = o.map(({ image: t }) => ({ url: t, width: l, height: r }));
33
+ }, a = _(null), { t: r } = q(), { filters: o, name: i } = n, { actions: B, width: c, height: d, hideSubtitle: I } = {
34
+ ...x,
35
+ ...w
36
+ }, u = o.map(({ image: t }) => ({ url: t, width: c, height: d }));
36
37
  if (S)
37
- return /* @__PURE__ */ e(
38
+ return /* @__PURE__ */ e(z, { ratio: "square", children: /* @__PURE__ */ e(
38
39
  T,
39
40
  {
40
- ref: h,
41
+ ref: a,
41
42
  isDisplayOnly: !0,
42
43
  filters: o,
43
- width: l,
44
- height: r,
45
- selectedObjectName: s,
46
- className: u,
47
- images: g
44
+ width: c,
45
+ height: d,
46
+ selectedObjectName: i,
47
+ className: F,
48
+ images: u
48
49
  }
49
- );
50
+ ) });
50
51
  const O = (t) => {
51
- const { label: m } = t, { filters: f } = a, $ = f.map(
52
- (L) => L.label === m ? t : L
52
+ const { label: h } = t, { filters: m } = n, W = m.map(
53
+ (y) => y.label === h ? t : y
53
54
  );
54
- return i && i({
55
- ...a,
56
- filters: $
55
+ return l && l({
56
+ ...n,
57
+ filters: W
57
58
  });
58
- }, W = (t) => {
59
+ }, N = (t) => {
59
60
  if (t)
60
- return i && i({
61
+ return l && l({
61
62
  name: t,
62
63
  filters: D(p, t)
63
64
  });
64
- }, y = p.length > 1, _ = n("colorTool.actions.select_an_object");
65
- return /* @__PURE__ */ e(E, { className: u, children: /* @__PURE__ */ c(
66
- H,
65
+ }, g = p.length > 1, R = r("colorTool.actions.select_an_object");
66
+ return /* @__PURE__ */ e(
67
+ E,
67
68
  {
68
- style: {
69
- "--image-width": typeof l == "number" ? `${l}px` : l,
70
- "--image-height": typeof r == "number" ? `${r}px` : r
71
- },
72
- children: [
73
- s && y && /* @__PURE__ */ e(M, { children: !I && /* @__PURE__ */ c(C, { children: [
74
- /* @__PURE__ */ e("dt", { children: n("colorTool.labels.object") }),
75
- /* @__PURE__ */ e("dd", { children: s })
76
- ] }) }),
77
- /* @__PURE__ */ c(P, { children: [
78
- o && /* @__PURE__ */ c(C, { children: [
79
- /* @__PURE__ */ e(b, { id: "filterLabel", children: n("colorTool.labels.filter") }),
80
- /* @__PURE__ */ e(b, { id: "colorLabel", children: n("colorTool.labels.color") }),
81
- /* @__PURE__ */ e(b, { id: "intensityLabel", children: n("colorTool.labels.color_intensity") })
82
- ] }),
83
- o && o.map((t) => {
84
- const { label: m, isDisabled: f } = t;
85
- return /* @__PURE__ */ R(
86
- G,
87
- {
88
- filter: t,
89
- colorOptions: x,
90
- key: `filter-${m}`,
91
- isDisabled: d || f,
92
- onChangeFilterCallback: O,
93
- buttonLabelledById: "filterLabel",
94
- selectLabelledById: "colorLabel",
95
- sliderLabelledById: "intensityLabel"
96
- }
97
- );
98
- })
69
+ widget: /* @__PURE__ */ e(
70
+ T,
71
+ {
72
+ ref: a,
73
+ filters: o,
74
+ width: c,
75
+ height: d,
76
+ selectedObjectName: i,
77
+ images: u,
78
+ children: g && /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(
79
+ $,
80
+ {
81
+ id: "astroObjectSelector",
82
+ placeholder: R,
83
+ options: C,
84
+ onChangeCallback: N,
85
+ value: i,
86
+ isDisabled: s,
87
+ width: "100%",
88
+ maxWidth: "100%"
89
+ }
90
+ ) })
91
+ }
92
+ ),
93
+ controls: /* @__PURE__ */ f(M, { children: [
94
+ o && /* @__PURE__ */ f(L, { children: [
95
+ /* @__PURE__ */ e(b, { id: "filterLabel", children: r("colorTool.labels.filter") }),
96
+ /* @__PURE__ */ e(b, { id: "colorLabel", children: r("colorTool.labels.color") }),
97
+ /* @__PURE__ */ e(b, { id: "intensityLabel", children: r("colorTool.labels.color_intensity") })
99
98
  ] }),
100
- /* @__PURE__ */ e(
101
- T,
102
- {
103
- ref: h,
104
- filters: o,
105
- width: l,
106
- height: r,
107
- selectedObjectName: s,
108
- images: g,
109
- children: y && /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(
110
- v,
111
- {
112
- id: "astroObjectSelector",
113
- placeholder: _,
114
- options: j,
115
- onChangeCallback: W,
116
- value: s,
117
- isDisabled: d,
118
- width: "100%",
119
- maxWidth: "100%"
120
- }
121
- ) })
122
- }
123
- ),
124
- /* @__PURE__ */ e(
125
- z,
126
- {
127
- actions: B,
128
- canvas: h.current,
129
- selectedData: a,
130
- isDisabled: d,
131
- selectionCallback: i
132
- }
133
- )
134
- ]
99
+ o && o.map((t) => {
100
+ const { label: h, isDisabled: m } = t;
101
+ return /* @__PURE__ */ A(
102
+ G,
103
+ {
104
+ filter: t,
105
+ colorOptions: j,
106
+ key: `filter-${h}`,
107
+ isDisabled: s || m,
108
+ onChangeFilterCallback: O,
109
+ buttonLabelledById: "filterLabel",
110
+ selectLabelledById: "colorLabel",
111
+ sliderLabelledById: "intensityLabel"
112
+ }
113
+ );
114
+ })
115
+ ] }),
116
+ actions: /* @__PURE__ */ e(
117
+ v,
118
+ {
119
+ actions: B,
120
+ canvas: a.current,
121
+ selectedData: n,
122
+ isDisabled: s,
123
+ selectionCallback: l
124
+ }
125
+ ),
126
+ caption: i && g && /* @__PURE__ */ e(P, { children: !I && /* @__PURE__ */ f(L, { children: [
127
+ /* @__PURE__ */ e("dt", { children: r("colorTool.labels.object") }),
128
+ /* @__PURE__ */ e("dd", { children: i })
129
+ ] }) })
135
130
  }
136
- ) });
131
+ );
137
132
  };
138
133
  J.displayName = "Widgets.ColorTool";
139
134
  export {
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),i=require("react-i18next"),m=require("@rubin-epo/epo-react-lib/SelectListbox"),_=require("@rubin-epo/epo-react-lib/ColorSwatch"),r=require("./widgets/FilterTool/styles.cjs"),d=e=>e&&e.__esModule?e:{default:e},b=d(m),C=d(_),j=({selectedColor:e="none",selectionCallback:f,isDisabled:c=!1,id:h,labelledById:u})=>{const{t:l}=i.useTranslation(),t={violet:"#861cff",blue:"#0019ff",green:"#6bd853",yellow:"#ffdd15",orange:"#f18922",red:"#ec1c24",none:"transparent"},p={violet:"M546.1,312.5l212.8,1.9h0.4l0.5,0.2L1396,522.8c6.9,2.3,10.7,9.7,8.5,16.7s-9.7,10.7-16.7,8.5l0,0l-0.4-0.1L757.8,320.4l0.9,0.2L546.1,312.5z",blue:"M546.1,312.4l206.5-4.4h0.4l0.4,0.1l641.1,164c7,1.8,11.2,8.9,9.4,15.9c-1.8,7-8.9,11.2-15.9,9.4l-0.4-0.1L751.8,313.8l0.8,0.1L546.1,312.4z",green:"M547.8,312l200.6-10.6h0.3l0.4,0.1l644.8,120.3c7,1.4,11.5,8.2,10.1,15.2c-1.4,6.9-8,11.4-14.9,10.2l-0.4-0.1L747.8,307.4l0.7,0.1L547.8,312z",yellow:"M546.1,312.5l205.8-17.3h0.3h0.4l640.4,75.3c7.1,0.8,12.2,7.2,11.3,14.3c-0.8,7.1-7.2,12.2-14.3,11.3l-0.4-0.1l-637.9-94.5h0.6L546.1,312.5z",orange:"M546.1,311l189.3-21.8h0.2h0.3l656.5,33.3c7,0.4,12.4,6.3,12,13.3s-6.3,12.4-13.3,12h-0.4l-655.2-52.9h0.5L546.1,311z",red:"M546.1,311L730,283.9h0.1h0.2l661.4-9.9c6.9-0.1,12.6,5.4,12.7,12.3s-5.4,12.6-12.3,12.7h-0.4l-661.4-9.8h0.4L546.1,311z"},n={violet:[[1426.5,547.9],[1353.2,550.6],[1377.9,530.1],[1372.3,498.5]],blue:[[1431.5,496.4],[1358.6,504.1],[1381.8,482],[1374.1,450.9]],green:[[1437.9,443.4],[1366.1,458.4],[1387,434.1],[1376.2,403.9]],yellow:[[1438.9,389.7],[1368,408.2],[1387.6,382.8],[1375.4,353.3]],orange:[[1443.7,340.3],[1373.9,362.8],[1392.1,336.4],[1378.2,307.5]],red:[[1441.9,290],[1372.4,313.2],[1390.3,286.6],[1376.1,257.9]]},g=Object.keys(t).map(s=>({value:s,label:l(`filterTool.colors.${s}`),icon:o.jsx(C.default,{color:s,size:"small"})})),x=s=>e!==s&&e!=="none",y=l("filterTool.selectLabel"),a=e==="none";return o.jsxs(r.Wrapper,{children:[o.jsxs(r.PrismSVG,{version:"1.1",viewBox:"0 0 1551.6 736.7","aria-labelledby":u,children:[o.jsxs("defs",{children:[o.jsxs("linearGradient",{id:"no-arrow-red",children:[o.jsx("stop",{offset:"0%",stopColor:t.red}),o.jsx("stop",{offset:"81%",stopColor:t.red}),o.jsx("stop",{offset:"81%",stopColor:"transparent"}),o.jsx("stop",{offset:"100%",stopColor:"transparent"})]}),o.jsxs("linearGradient",{id:"no-arrow-orange",children:[o.jsx("stop",{offset:"0%",stopColor:t.orange}),o.jsx("stop",{offset:"80%",stopColor:t.orange}),o.jsx("stop",{offset:"80%",stopColor:"transparent"}),o.jsx("stop",{offset:"100%",stopColor:"transparent"})]}),o.jsxs("linearGradient",{id:"no-arrow-yellow",children:[o.jsx("stop",{offset:"0%",stopColor:t.yellow}),o.jsx("stop",{offset:"79%",stopColor:t.yellow}),o.jsx("stop",{offset:"79%",stopColor:"transparent"}),o.jsx("stop",{offset:"100%",stopColor:"transparent"})]}),o.jsxs("linearGradient",{id:"no-arrow-green",children:[o.jsx("stop",{offset:"0%",stopColor:t.green}),o.jsx("stop",{offset:"78%",stopColor:t.green}),o.jsx("stop",{offset:"78%",stopColor:"transparent"}),o.jsx("stop",{offset:"100%",stopColor:"transparent"})]}),o.jsxs("linearGradient",{id:"no-arrow-blue",children:[o.jsx("stop",{offset:"0%",stopColor:t.blue}),o.jsx("stop",{offset:"77%",stopColor:t.blue}),o.jsx("stop",{offset:"77%",stopColor:"transparent"}),o.jsx("stop",{offset:"100%",stopColor:"transparent"})]}),o.jsxs("linearGradient",{id:"no-arrow-violet",children:[o.jsx("stop",{offset:"0%",stopColor:t.violet}),o.jsx("stop",{offset:"77%",stopColor:t.violet}),o.jsx("stop",{offset:"77%",stopColor:"transparent"}),o.jsx("stop",{offset:"100%",stopColor:"transparent"})]})]}),o.jsxs("radialGradient",{id:"gradient_1_",cx:"718.4264",cy:"-294.6529",r:"417.8",fx:"638.9412",fy:"-303.5418",gradientTransform:"matrix(1 0 0 1 0 534)",gradientUnits:"userSpaceOnUse",children:[o.jsx("stop",{offset:"0.12",style:{stopColor:"#FFFFFF"}}),o.jsx("stop",{offset:"1",style:{stopColor:"#000000"}})]}),o.jsxs("g",{children:[o.jsx(r.WhiteLine,{id:"white_ray",x1:"108.2",y1:"463.3",x2:"546.1",y2:"312.5"}),o.jsx(r.WhiteLine,{id:"white_light_arrow_line",x1:"376.8",y1:"327.9",x2:"430",y2:"309.6"}),o.jsx("polygon",{id:"white_light_arrow",points:"420.7,325.4 428.1,310.3 413,302.9 422.5,299.7 437.6,307 430.2,322.1",fill:"#ffffff"}),o.jsx("text",{transform:"matrix(0.9446 -0.3282 0.3282 0.9446 152.0965 417.697)",fill:"#ffffff",children:o.jsx(i.Trans,{i18nKey:"filterTool.whiteLight"})})]}),o.jsxs("g",{children:[o.jsx("text",{transform:"matrix(1 0 0 1 598.2964 606.0872)",fill:"#ffffff",children:o.jsx(i.Trans,{i18nKey:"filterTool.prism"})}),o.jsx("polygon",{id:"gradient",points:"653.2,127 867.4,498 438.9,498",fill:"url(#gradient_1_)",style:{opacity:.3}})]}),o.jsx(r.PrismOutline,{id:"outline",points:"653.2,127 760.3,312.5 867.4,498 653.2,498 438.9,498 546.1,312.5 "}),o.jsx("g",{role:"list",id:"rays_out","aria-label":l("filterTool.light_out"),children:Object.keys(p).map(s=>o.jsx(r.Ray,{id:`${s}_ray`,style:{"--ray-fill":x(s)?`url(#no-arrow-${s})`:t[s]},d:p[s],role:"listitem","aria-label":l(`filterTool.colors.${s}`)},s))}),o.jsxs("g",{children:[o.jsx("text",{transform:"matrix(1 0 0 1 1206.5464 164.1372)",fill:"#ffffff",children:o.jsx(i.Trans,{i18nKey:"filterTool.filter"})}),o.jsx(r.Filter,{id:"filter",x1:"1255.6",y1:"235.7",x2:"1193.1",y2:"550.3",stroke:t[e],fill:"#ffffff","aria-label":l(`filterTool.colors.${e}`)})]}),o.jsxs("g",{role:"list",id:"rays_filtered","aria-label":l("filterTool.light_filtered"),children:[Object.keys(n).map(s=>o.jsx(r.Arrow,{id:`${s}_arrow`,style:{"--arrow-opacity":x(s)&&0,"--arrow-fill":t[s]},points:n[s].map(w=>w.join(",")).join(" "),role:a?"listitem":"presentation","aria-label":a?l(`filterTool.colors.${s}`):void 0},s)),!a&&o.jsx("text",{role:"listitem",x:n[e][3][0],y:n[e][3][1],fill:"#ffffff",dy:"-25",children:o.jsx(i.Trans,{i18nKey:`filterTool.colors.${e}`})})]})]}),o.jsx(r.SelectContainer,{children:o.jsx(b.default,{options:g,isDisabled:c,value:e,onChangeCallback:s=>f&&f(s||"none"),placeholder:y,maxWidth:"100%",width:"200px",id:h})})]})};j.displayName="Widgets.FilterTool";exports.default=j;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),i=require("react-i18next"),m=require("@rubin-epo/epo-react-lib/SelectListbox"),_=require("@rubin-epo/epo-react-lib/ColorSwatch"),r=require("./widgets/FilterTool/styles.cjs"),d=e=>e&&e.__esModule?e:{default:e},b=d(m),C=d(_),j=({selectedColor:e="none",selectionCallback:f,isDisabled:c=!1,id:h,labelledById:u})=>{const{t:l}=i.useTranslation(),t={violet:"#861cff",blue:"#0019ff",green:"#6bd853",yellow:"#ffdd15",orange:"#f18922",red:"#ec1c24",none:"transparent"},p={violet:"M546.1,312.5l212.8,1.9h0.4l0.5,0.2L1396,522.8c6.9,2.3,10.7,9.7,8.5,16.7s-9.7,10.7-16.7,8.5l0,0l-0.4-0.1L757.8,320.4l0.9,0.2L546.1,312.5z",blue:"M546.1,312.4l206.5-4.4h0.4l0.4,0.1l641.1,164c7,1.8,11.2,8.9,9.4,15.9c-1.8,7-8.9,11.2-15.9,9.4l-0.4-0.1L751.8,313.8l0.8,0.1L546.1,312.4z",green:"M547.8,312l200.6-10.6h0.3l0.4,0.1l644.8,120.3c7,1.4,11.5,8.2,10.1,15.2c-1.4,6.9-8,11.4-14.9,10.2l-0.4-0.1L747.8,307.4l0.7,0.1L547.8,312z",yellow:"M546.1,312.5l205.8-17.3h0.3h0.4l640.4,75.3c7.1,0.8,12.2,7.2,11.3,14.3c-0.8,7.1-7.2,12.2-14.3,11.3l-0.4-0.1l-637.9-94.5h0.6L546.1,312.5z",orange:"M546.1,311l189.3-21.8h0.2h0.3l656.5,33.3c7,0.4,12.4,6.3,12,13.3s-6.3,12.4-13.3,12h-0.4l-655.2-52.9h0.5L546.1,311z",red:"M546.1,311L730,283.9h0.1h0.2l661.4-9.9c6.9-0.1,12.6,5.4,12.7,12.3s-5.4,12.6-12.3,12.7h-0.4l-661.4-9.8h0.4L546.1,311z"},n={violet:[[1426.5,547.9],[1353.2,550.6],[1377.9,530.1],[1372.3,498.5]],blue:[[1431.5,496.4],[1358.6,504.1],[1381.8,482],[1374.1,450.9]],green:[[1437.9,443.4],[1366.1,458.4],[1387,434.1],[1376.2,403.9]],yellow:[[1438.9,389.7],[1368,408.2],[1387.6,382.8],[1375.4,353.3]],orange:[[1443.7,340.3],[1373.9,362.8],[1392.1,336.4],[1378.2,307.5]],red:[[1441.9,290],[1372.4,313.2],[1390.3,286.6],[1376.1,257.9]]},g=Object.keys(t).map(s=>({value:s,label:l(`filterTool.colors.${s}`),icon:o.jsx(C.default,{color:s,size:"small"})})),x=s=>e!==s&&e!=="none",y=l("filterTool.selectLabel"),a=e==="none";return o.jsxs(r.Wrapper,{ratio:"landscape",children:[o.jsxs(r.PrismSVG,{version:"1.1",viewBox:"0 0 1551.6 736.7","aria-labelledby":u,children:[o.jsxs("defs",{children:[o.jsxs("linearGradient",{id:"no-arrow-red",children:[o.jsx("stop",{offset:"0%",stopColor:t.red}),o.jsx("stop",{offset:"81%",stopColor:t.red}),o.jsx("stop",{offset:"81%",stopColor:"transparent"}),o.jsx("stop",{offset:"100%",stopColor:"transparent"})]}),o.jsxs("linearGradient",{id:"no-arrow-orange",children:[o.jsx("stop",{offset:"0%",stopColor:t.orange}),o.jsx("stop",{offset:"80%",stopColor:t.orange}),o.jsx("stop",{offset:"80%",stopColor:"transparent"}),o.jsx("stop",{offset:"100%",stopColor:"transparent"})]}),o.jsxs("linearGradient",{id:"no-arrow-yellow",children:[o.jsx("stop",{offset:"0%",stopColor:t.yellow}),o.jsx("stop",{offset:"79%",stopColor:t.yellow}),o.jsx("stop",{offset:"79%",stopColor:"transparent"}),o.jsx("stop",{offset:"100%",stopColor:"transparent"})]}),o.jsxs("linearGradient",{id:"no-arrow-green",children:[o.jsx("stop",{offset:"0%",stopColor:t.green}),o.jsx("stop",{offset:"78%",stopColor:t.green}),o.jsx("stop",{offset:"78%",stopColor:"transparent"}),o.jsx("stop",{offset:"100%",stopColor:"transparent"})]}),o.jsxs("linearGradient",{id:"no-arrow-blue",children:[o.jsx("stop",{offset:"0%",stopColor:t.blue}),o.jsx("stop",{offset:"77%",stopColor:t.blue}),o.jsx("stop",{offset:"77%",stopColor:"transparent"}),o.jsx("stop",{offset:"100%",stopColor:"transparent"})]}),o.jsxs("linearGradient",{id:"no-arrow-violet",children:[o.jsx("stop",{offset:"0%",stopColor:t.violet}),o.jsx("stop",{offset:"77%",stopColor:t.violet}),o.jsx("stop",{offset:"77%",stopColor:"transparent"}),o.jsx("stop",{offset:"100%",stopColor:"transparent"})]})]}),o.jsxs("radialGradient",{id:"gradient_1_",cx:"718.4264",cy:"-294.6529",r:"417.8",fx:"638.9412",fy:"-303.5418",gradientTransform:"matrix(1 0 0 1 0 534)",gradientUnits:"userSpaceOnUse",children:[o.jsx("stop",{offset:"0.12",style:{stopColor:"#FFFFFF"}}),o.jsx("stop",{offset:"1",style:{stopColor:"#000000"}})]}),o.jsxs("g",{children:[o.jsx(r.WhiteLine,{id:"white_ray",x1:"108.2",y1:"463.3",x2:"546.1",y2:"312.5"}),o.jsx(r.WhiteLine,{id:"white_light_arrow_line",x1:"376.8",y1:"327.9",x2:"430",y2:"309.6"}),o.jsx("polygon",{id:"white_light_arrow",points:"420.7,325.4 428.1,310.3 413,302.9 422.5,299.7 437.6,307 430.2,322.1",fill:"#ffffff"}),o.jsx("text",{transform:"matrix(0.9446 -0.3282 0.3282 0.9446 152.0965 417.697)",fill:"#ffffff",children:o.jsx(i.Trans,{i18nKey:"filterTool.whiteLight"})})]}),o.jsxs("g",{children:[o.jsx("text",{transform:"matrix(1 0 0 1 598.2964 606.0872)",fill:"#ffffff",children:o.jsx(i.Trans,{i18nKey:"filterTool.prism"})}),o.jsx("polygon",{id:"gradient",points:"653.2,127 867.4,498 438.9,498",fill:"url(#gradient_1_)",style:{opacity:.3}})]}),o.jsx(r.PrismOutline,{id:"outline",points:"653.2,127 760.3,312.5 867.4,498 653.2,498 438.9,498 546.1,312.5 "}),o.jsx("g",{role:"list",id:"rays_out","aria-label":l("filterTool.light_out"),children:Object.keys(p).map(s=>o.jsx(r.Ray,{id:`${s}_ray`,style:{"--ray-fill":x(s)?`url(#no-arrow-${s})`:t[s]},d:p[s],role:"listitem","aria-label":l(`filterTool.colors.${s}`)},s))}),o.jsxs("g",{children:[o.jsx("text",{transform:"matrix(1 0 0 1 1206.5464 164.1372)",fill:"#ffffff",children:o.jsx(i.Trans,{i18nKey:"filterTool.filter"})}),o.jsx(r.Filter,{id:"filter",x1:"1255.6",y1:"235.7",x2:"1193.1",y2:"550.3",stroke:t[e],fill:"#ffffff","aria-label":l(`filterTool.colors.${e}`)})]}),o.jsxs("g",{role:"list",id:"rays_filtered","aria-label":l("filterTool.light_filtered"),children:[Object.keys(n).map(s=>o.jsx(r.Arrow,{id:`${s}_arrow`,style:{"--arrow-opacity":x(s)&&0,"--arrow-fill":t[s]},points:n[s].map(w=>w.join(",")).join(" "),role:a?"listitem":"presentation","aria-label":a?l(`filterTool.colors.${s}`):void 0},s)),!a&&o.jsx("text",{role:"listitem",x:n[e][3][0],y:n[e][3][1],fill:"#ffffff",dy:"-25",children:o.jsx(i.Trans,{i18nKey:`filterTool.colors.${e}`})})]})]}),o.jsx(r.SelectContainer,{children:o.jsx(b.default,{options:g,isDisabled:c,value:e,onChangeCallback:s=>f&&f(s||"none"),placeholder:y,maxWidth:"100%",width:"200px",id:h})})]})};j.displayName="Widgets.FilterTool";exports.default=j;
@@ -68,7 +68,7 @@ const j = ({
68
68
  label: i(`filterTool.colors.${t}`),
69
69
  icon: /* @__PURE__ */ o(u, { color: t, size: "small" })
70
70
  })), d = (t) => e !== t && e !== "none", w = i("filterTool.selectLabel"), f = e === "none";
71
- return /* @__PURE__ */ l(L, { children: [
71
+ return /* @__PURE__ */ l(L, { ratio: "landscape", children: [
72
72
  /* @__PURE__ */ l(
73
73
  T,
74
74
  {
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),B=require("react"),O=require("react-i18next"),l=require("d3-array"),z=require("@rubin-epo/epo-react-lib/HorizontalSlider"),d=require("./lib/utils.cjs"),E=require("./widgets/SupernovaThreeVector/LiveLabel/index.cjs"),r=require("./widgets/SupernovaThreeVector/styles.cjs"),N=t=>t&&t.__esModule?t:{default:t},P=N(z),k=({histogramData:t,userData:C,binnedImages:T,step:u=100})=>{const{t:x}=O.useTranslation(),i={top:30,bottom:30,left:50,right:0},m="skyMapDescription",o=600,p=o/1.6,q=[i.left,o-i.right],R=[p-i.bottom,i.top],b=6,h=7,v=0,L=l.max(t,e=>e.value)||Math.max(...t.map(({value:e})=>e)),a=l.min(t,e=>e.bin)||0,c=l.max(t,e=>e.bin)||Math.max(...t.map(({bin:e})=>e)),y=l.nice(a,c,b),g=l.nice(v,L||v,h),j=d.getLinearScale(y,q),I=d.getLinearScale(g,R),[s,S]=B.useState([a,c]),f=15,$=`calc(${i.left/o*100}% - ${f}px)`,V=`calc(${(1-j(c)/o)*100}% - ${f}px)`,_=t.map(({bin:e})=>d.between(e,s[0],s[1])),M=C.filter(({distance:e})=>d.between(e,s[0],s[1]+u)),A=t.reduce((e,{value:H},w)=>_[w]?e+H:e,0);return n.jsxs(r.ThreeVectorContainer,{children:[n.jsxs(r.ThreeVectorLayout,{children:[n.jsxs(r.HistogramContainer,{children:[n.jsx(r.ChartTitle,{children:x("supernova_three_vector.histogram.title")}),n.jsx(r.Histogram,{data:t,activeRange:s,xDomain:y,yDomain:g,xScale:j,yScale:I,yTicks:h,xTicks:b,step:u,margin:i,width:o,height:p})]}),n.jsx(r.SliderContainer,{style:{paddingInlineStart:$,paddingInlineEnd:V},children:n.jsx(P.default,{min:a,max:c,step:u,value:s,ariaValuetext:({valueNow:e})=>x("supernova_three_vector.slider.valueLabel",{value:e}),label:"distanceSlider",color:"var(--turquoise85,#12726D)",minLabel:`${a} kpc`,maxLabel:`${c} kpc`,onChangeCallback:e=>Array.isArray(e)&&S(e)})}),n.jsxs(r.SkymapContainer,{children:[n.jsx(r.ChartTitle,{children:x("supernova_three_vector.skymap.title")}),n.jsx(r.Skymap,{objects:M,images:T,describedById:m,visibleImages:_})]}),n.jsx(r.ResetButton,{onResetCallback:()=>S([a,c])})]}),n.jsx(E.default,{id:m,objects:M,min:s[0],max:s[1]+u,supernovaCount:A})]})};k.displayName="Widgets.SupernovaThreeVector";exports.default=k;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),B=require("react"),O=require("react-i18next"),l=require("d3-array"),z=require("@rubin-epo/epo-react-lib/HorizontalSlider"),d=require("./lib/utils.cjs"),E=require("./widgets/SupernovaThreeVector/LiveLabel/index.cjs"),r=require("./widgets/SupernovaThreeVector/styles.cjs"),N=t=>t&&t.__esModule?t:{default:t},P=N(z),k=({histogramData:t,userData:C,binnedImages:T,step:u=100})=>{const{t:x}=O.useTranslation(),i={top:30,bottom:30,left:50,right:0},m="skyMapDescription",o=600,p=o/1.6,q=[i.left,o-i.right],R=[p-i.bottom,i.top],b=6,h=7,v=0,L=l.max(t,e=>e.value)||Math.max(...t.map(({value:e})=>e)),a=l.min(t,e=>e.bin)||0,c=l.max(t,e=>e.bin)||Math.max(...t.map(({bin:e})=>e)),y=l.nice(a,c,b),g=l.nice(v,L||v,h),j=d.getLinearScale(y,q),I=d.getLinearScale(g,R),[s,S]=B.useState([a,c]),f=15,$=`calc(${i.left/o*100}% - ${f}px)`,V=`calc(${(1-j(c)/o)*100}% - ${f}px)`,_=t.map(({bin:e})=>d.between(e,s[0],s[1])),M=C.filter(({distance:e})=>d.between(e,s[0],s[1]+u)),A=t.reduce((e,{value:H},w)=>_[w]?e+H:e,0);return n.jsxs(r.ThreeVectorContainer,{ratio:"landscape",smallScreenRatio:"portrait",children:[n.jsxs(r.ThreeVectorLayout,{children:[n.jsxs(r.HistogramContainer,{children:[n.jsx(r.ChartTitle,{children:x("supernova_three_vector.histogram.title")}),n.jsx(r.Histogram,{data:t,activeRange:s,xDomain:y,yDomain:g,xScale:j,yScale:I,yTicks:h,xTicks:b,step:u,margin:i,width:o,height:p})]}),n.jsx(r.SliderContainer,{style:{paddingInlineStart:$,paddingInlineEnd:V},children:n.jsx(P.default,{min:a,max:c,step:u,value:s,ariaValuetext:({valueNow:e})=>x("supernova_three_vector.slider.valueLabel",{value:e}),label:"distanceSlider",color:"var(--turquoise85,#12726D)",minLabel:`${a} kpc`,maxLabel:`${c} kpc`,onChangeCallback:e=>Array.isArray(e)&&S(e)})}),n.jsxs(r.SkymapContainer,{children:[n.jsx(r.ChartTitle,{children:x("supernova_three_vector.skymap.title")}),n.jsx(r.Skymap,{objects:M,images:T,describedById:m,visibleImages:_})]}),n.jsx(r.ResetButton,{onResetCallback:()=>S([a,c])})]}),n.jsx(E.default,{id:m,objects:M,min:s[0],max:s[1]+u,supernovaCount:A})]})};k.displayName="Widgets.SupernovaThreeVector";exports.default=k;
@@ -4,9 +4,9 @@ import { useState as z } from "react";
4
4
  import { useTranslation as E } from "react-i18next";
5
5
  import { max as C, min as N, nice as M } from "d3-array";
6
6
  import U from "@rubin-epo/epo-react-lib/HorizontalSlider";
7
- import { getLinearScale as L, between as T } from "./lib/utils.js";
7
+ import { getLinearScale as L, between as R } from "./lib/utils.js";
8
8
  import W from "./widgets/SupernovaThreeVector/LiveLabel/index.js";
9
- import { ThreeVectorContainer as F, ThreeVectorLayout as G, HistogramContainer as J, ChartTitle as R, Histogram as K, SliderContainer as P, SkymapContainer as Q, Skymap as X, ResetButton as Y } from "./widgets/SupernovaThreeVector/styles.js";
9
+ import { ThreeVectorContainer as F, ThreeVectorLayout as G, HistogramContainer as J, ChartTitle as T, Histogram as K, SliderContainer as P, SkymapContainer as Q, Skymap as X, ResetButton as Y } from "./widgets/SupernovaThreeVector/styles.js";
10
10
  const Z = ({
11
11
  histogramData: t,
12
12
  userData: _,
@@ -18,15 +18,15 @@ const Z = ({
18
18
  bottom: 30,
19
19
  left: 50,
20
20
  right: 0
21
- }, d = "skyMapDescription", c = 600, p = c / 1.6, j = [i.left, c - i.right], I = [p - i.bottom, i.top], u = 6, x = 7, b = 0, V = C(t, (e) => e.value) || Math.max(...t.map(({ value: e }) => e)), a = N(t, (e) => e.bin) || 0, o = C(t, (e) => e.bin) || Math.max(...t.map(({ bin: e }) => e)), h = M(a, o, u), v = M(b, V || b, x), f = L(h, j), A = L(v, I), [n, y] = z([a, o]), g = 15, B = `calc(${i.left / c * 100}% - ${g}px)`, H = `calc(${(1 - f(o) / c) * 100}% - ${g}px)`, S = t.map(
22
- ({ bin: e }) => T(e, n[0], n[1])
21
+ }, d = "skyMapDescription", a = 600, p = a / 1.6, j = [i.left, a - i.right], I = [p - i.bottom, i.top], u = 6, x = 7, b = 0, V = C(t, (e) => e.value) || Math.max(...t.map(({ value: e }) => e)), c = N(t, (e) => e.bin) || 0, o = C(t, (e) => e.bin) || Math.max(...t.map(({ bin: e }) => e)), h = M(c, o, u), v = M(b, V || b, x), f = L(h, j), A = L(v, I), [n, y] = z([c, o]), g = 15, B = `calc(${i.left / a * 100}% - ${g}px)`, H = `calc(${(1 - f(o) / a) * 100}% - ${g}px)`, S = t.map(
22
+ ({ bin: e }) => R(e, n[0], n[1])
23
23
  ), k = _.filter(
24
- ({ distance: e }) => T(e, n[0], n[1] + s)
24
+ ({ distance: e }) => R(e, n[0], n[1] + s)
25
25
  ), w = t.reduce((e, { value: O }, q) => S[q] ? e + O : e, 0);
26
- return /* @__PURE__ */ l(F, { children: [
26
+ return /* @__PURE__ */ l(F, { ratio: "landscape", smallScreenRatio: "portrait", children: [
27
27
  /* @__PURE__ */ l(G, { children: [
28
28
  /* @__PURE__ */ l(J, { children: [
29
- /* @__PURE__ */ r(R, { children: m("supernova_three_vector.histogram.title") }),
29
+ /* @__PURE__ */ r(T, { children: m("supernova_three_vector.histogram.title") }),
30
30
  /* @__PURE__ */ r(
31
31
  K,
32
32
  {
@@ -40,7 +40,7 @@ const Z = ({
40
40
  xTicks: u,
41
41
  step: s,
42
42
  margin: i,
43
- width: c,
43
+ width: a,
44
44
  height: p
45
45
  }
46
46
  )
@@ -55,14 +55,14 @@ const Z = ({
55
55
  children: /* @__PURE__ */ r(
56
56
  U,
57
57
  {
58
- min: a,
58
+ min: c,
59
59
  max: o,
60
60
  step: s,
61
61
  value: n,
62
62
  ariaValuetext: ({ valueNow: e }) => m("supernova_three_vector.slider.valueLabel", { value: e }),
63
63
  label: "distanceSlider",
64
64
  color: "var(--turquoise85,#12726D)",
65
- minLabel: `${a} kpc`,
65
+ minLabel: `${c} kpc`,
66
66
  maxLabel: `${o} kpc`,
67
67
  onChangeCallback: (e) => Array.isArray(e) && y(e)
68
68
  }
@@ -70,7 +70,7 @@ const Z = ({
70
70
  }
71
71
  ),
72
72
  /* @__PURE__ */ l(Q, { children: [
73
- /* @__PURE__ */ r(R, { children: m("supernova_three_vector.skymap.title") }),
73
+ /* @__PURE__ */ r(T, { children: m("supernova_three_vector.skymap.title") }),
74
74
  /* @__PURE__ */ r(
75
75
  X,
76
76
  {
@@ -84,7 +84,7 @@ const Z = ({
84
84
  /* @__PURE__ */ r(
85
85
  Y,
86
86
  {
87
- onResetCallback: () => y([a, o])
87
+ onResetCallback: () => y([c, o])
88
88
  }
89
89
  )
90
90
  ] }),
@@ -1,7 +1,6 @@
1
1
  import { FunctionComponent, HTMLProps, MouseEventHandler } from "react";
2
- import { IconKey } from "@rubin-epo/epo-react-lib";
3
2
  interface PlaybackControlProps extends HTMLProps<HTMLButtonElement> {
4
- icon: IconKey;
3
+ icon: string;
5
4
  label: string;
6
5
  handleClick: MouseEventHandler<HTMLButtonElement>;
7
6
  }
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent, HTMLProps } from "react";
2
- import { Domain, ScaleFunction } from "../types";
2
+ import { Domain, ScaleFunction } from "../../types/charts";
3
3
  export interface Bar {
4
4
  stroke?: string;
5
5
  fill?: string;
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent, PropsWithChildren } from "react";
2
- import { Bounds } from "../types";
2
+ import { Bounds } from '../../types/charts';
3
3
  export interface BaseChartProps extends Partial<Bounds> {
4
4
  className?: string;
5
5
  title?: string;
@@ -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:u=0,direction:s="horizontal",xScale:e=t=>t,xDomain:r=[0,1],yScale:i=t=>t,yDomain:l=[0,1],margin:d,className:h})=>{if(u===0)return null;const t=s==="horizontal"?l:r,f=s==="horizontal"?i:e,o={...{top:0,right:0,bottom:0,left:0},...d},g=b.ticks(t[1],t[0],u);return a.jsx("g",{className:h,children:g.map((p,j)=>{const n=f(p),z=s==="horizontal"?[e(r[0])-o.left,n]:[n-o.top,i(l[0])],M=s==="horizontal"?[e(r[1])+o.right,n]:[n,i(l[1])+o.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"),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,5 +1,5 @@
1
1
  import { FunctionComponent } from "react";
2
- import { ChartMargin, Domain, ScaleFunction } from "../types";
2
+ import { ChartMargin, Domain, ScaleFunction } from '../../types/charts';
3
3
  export interface GuidelinesProps {
4
4
  guides: number;
5
5
  direction?: "horizontal" | "vertical";