@rubin-epo/epo-widget-lib 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Charts.cjs +1 -1
- package/dist/Charts.js +12 -8
- package/dist/ColorTool.cjs +1 -1
- package/dist/ColorTool.js +62 -59
- package/dist/LightCurvePlot.cjs +1 -0
- package/dist/LightCurvePlot.d.ts +1 -0
- package/dist/LightCurvePlot.js +6 -0
- package/dist/SupernovaThreeVector.cjs +1 -1
- package/dist/SupernovaThreeVector.js +71 -65
- package/dist/atomic/Button/patterns/Reset.js +9 -9
- package/dist/atomic/LiveRegion/index.cjs +1 -0
- package/dist/atomic/LiveRegion/index.d.ts +5 -0
- package/dist/atomic/LiveRegion/index.js +10 -0
- package/dist/charts/Base/index.cjs +1 -1
- package/dist/charts/Base/index.js +37 -23
- package/dist/charts/Base/styles.cjs +5 -2
- package/dist/charts/Base/styles.js +7 -4
- package/dist/charts/ForeignObject/index.cjs +1 -0
- package/dist/charts/ForeignObject/index.d.ts +5 -0
- package/dist/charts/ForeignObject/index.js +18 -0
- package/dist/charts/Tooltip/index.cjs +1 -1
- package/dist/charts/Tooltip/index.d.ts +2 -2
- package/dist/charts/Tooltip/index.js +23 -24
- package/dist/charts/Viewport/index.cjs +1 -0
- package/dist/charts/Viewport/index.d.ts +11 -0
- package/dist/charts/Viewport/index.js +26 -0
- package/dist/charts/XAxis/index.cjs +1 -1
- package/dist/charts/XAxis/index.js +21 -21
- package/dist/charts/YAxis/index.cjs +1 -1
- package/dist/charts/YAxis/index.js +19 -19
- package/dist/charts/hooks/useAxis.cjs +1 -0
- package/dist/charts/hooks/useAxis.d.ts +16 -0
- package/dist/charts/hooks/useAxis.js +29 -0
- package/dist/charts/index.d.ts +2 -0
- package/dist/hooks/usePrevious.cjs +1 -0
- package/dist/hooks/usePrevious.d.ts +1 -0
- package/dist/hooks/usePrevious.js +11 -0
- package/dist/lib/helpers.cjs +1 -0
- package/dist/lib/helpers.d.ts +2 -0
- package/dist/lib/helpers.js +4 -0
- package/dist/lib/helpers.test.d.ts +1 -0
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.d.ts +5 -1
- package/dist/lib/utils.js +17 -12
- package/dist/localeStrings/en/epo-widget-lib.json +32 -0
- package/dist/widgets/ColorTool/Actions/index.js +9 -9
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.cjs +1 -1
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.d.ts +3 -0
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.js +42 -66
- package/dist/widgets/ColorTool/ImageComposite/styles.cjs +5 -7
- package/dist/widgets/ColorTool/ImageComposite/styles.js +9 -9
- package/dist/widgets/ColorTool/hooks/useFilteredImages.cjs +1 -0
- package/dist/widgets/ColorTool/hooks/useFilteredImages.d.ts +8 -0
- package/dist/widgets/ColorTool/hooks/useFilteredImages.js +36 -0
- package/dist/widgets/LightCurvePlot/A11Y/LightCurveLabel/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/A11Y/LightCurveLabel/index.d.ts +11 -0
- package/dist/widgets/LightCurvePlot/A11Y/LightCurveLabel/index.js +38 -0
- package/dist/widgets/LightCurvePlot/A11Y/LightCurveLabel/styles.cjs +9 -0
- package/dist/widgets/LightCurvePlot/A11Y/LightCurveLabel/styles.d.ts +275 -0
- package/dist/widgets/LightCurvePlot/A11Y/LightCurveLabel/styles.js +14 -0
- package/dist/widgets/LightCurvePlot/DM15Display/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/DM15Display/index.d.ts +15 -0
- package/dist/widgets/LightCurvePlot/DM15Display/index.js +40 -0
- package/dist/widgets/LightCurvePlot/DM15Display/styles.cjs +12 -0
- package/dist/widgets/{ColorTool/ImageComposite → LightCurvePlot/DM15Display}/styles.d.ts +2 -2
- package/dist/widgets/LightCurvePlot/DM15Display/styles.js +18 -0
- package/dist/widgets/LightCurvePlot/LightCurve/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/LightCurve/index.d.ts +12 -0
- package/dist/widgets/LightCurvePlot/LightCurve/index.js +29 -0
- package/dist/widgets/LightCurvePlot/MagnitudeSlider/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/MagnitudeSlider/index.d.ts +10 -0
- package/dist/widgets/LightCurvePlot/MagnitudeSlider/index.js +52 -0
- package/dist/widgets/LightCurvePlot/MagnitudeSlider/styles.cjs +37 -0
- package/dist/widgets/LightCurvePlot/MagnitudeSlider/styles.js +46 -0
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.d.ts +12 -0
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.js +132 -0
- package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.cjs +29 -0
- package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.d.ts +1378 -0
- package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.js +41 -0
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.d.ts +15 -0
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.js +20 -0
- package/dist/widgets/LightCurvePlot/Point/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/Point/index.d.ts +11 -0
- package/dist/widgets/LightCurvePlot/Point/index.js +68 -0
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.d.ts +13 -0
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.js +163 -0
- package/dist/widgets/LightCurvePlot/ScatterPlot/styles.cjs +31 -0
- package/dist/widgets/LightCurvePlot/ScatterPlot/styles.d.ts +557 -0
- package/dist/widgets/LightCurvePlot/ScatterPlot/styles.js +40 -0
- package/dist/widgets/LightCurvePlot/defaults.cjs +1 -0
- package/dist/widgets/LightCurvePlot/defaults.d.ts +17 -0
- package/dist/widgets/LightCurvePlot/defaults.js +19 -0
- package/dist/widgets/LightCurvePlot/helpers.cjs +1 -0
- package/dist/widgets/LightCurvePlot/helpers.d.ts +23 -0
- package/dist/widgets/LightCurvePlot/helpers.js +23 -0
- package/dist/widgets/LightCurvePlot/helpers.test.d.ts +1 -0
- package/dist/widgets/LightCurvePlot/index.d.ts +2 -0
- package/dist/widgets/SupernovaThreeVector/LiveLabel/index.cjs +1 -1
- package/dist/widgets/SupernovaThreeVector/LiveLabel/index.js +15 -15
- package/dist/widgets/SupernovaThreeVector/styles.cjs +30 -20
- package/dist/widgets/SupernovaThreeVector/styles.js +29 -18
- package/package.json +2 -1
- package/dist/hooks/useImage.cjs +0 -1
- package/dist/hooks/useImage.d.ts +0 -10
- package/dist/hooks/useImage.js +0 -31
- package/dist/widgets/ColorTool/CompositeRender/index.cjs +0 -1
- package/dist/widgets/ColorTool/CompositeRender/index.d.ts +0 -9
- package/dist/widgets/ColorTool/CompositeRender/index.js +0 -16
- package/dist/widgets/ColorTool/CompositeRender/styles.cjs +0 -3
- package/dist/widgets/ColorTool/CompositeRender/styles.d.ts +0 -274
- package/dist/widgets/ColorTool/CompositeRender/styles.js +0 -8
- package/dist/widgets/ColorTool/OffscreenFilter/index.cjs +0 -1
- package/dist/widgets/ColorTool/OffscreenFilter/index.d.ts +0 -15
- package/dist/widgets/ColorTool/OffscreenFilter/index.js +0 -27
- /package/dist/{widgets/SupernovaThreeVector/LiveLabel → atomic/LiveRegion}/styles.cjs +0 -0
- /package/dist/{widgets/SupernovaThreeVector/LiveLabel → atomic/LiveRegion}/styles.d.ts +0 -0
- /package/dist/{widgets/SupernovaThreeVector/LiveLabel → atomic/LiveRegion}/styles.js +0 -0
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");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;
|
|
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;
|
package/dist/Charts.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
1
|
+
import { default as t } from "./charts/Base/index.js";
|
|
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
|
|
4
|
+
import { default as l } from "./charts/Guidelines/index.js";
|
|
5
5
|
import { default as d } from "./charts/Points/index.js";
|
|
6
6
|
import { default as u } from "./charts/Tooltip/index.js";
|
|
7
7
|
import { default as n } from "./charts/ClippingContainer/index.js";
|
|
8
|
-
import { default as
|
|
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";
|
|
9
11
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
A as Bars,
|
|
13
|
+
t as Base,
|
|
12
14
|
n as ClippingContainer,
|
|
13
|
-
|
|
15
|
+
c as ForeignObject,
|
|
16
|
+
l as Guidelines,
|
|
14
17
|
d as Points,
|
|
15
18
|
u as Tooltip,
|
|
16
|
-
|
|
19
|
+
C as Viewport,
|
|
20
|
+
a as XAxis,
|
|
17
21
|
s as YAxis
|
|
18
22
|
};
|
package/dist/ColorTool.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),
|
|
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;
|
package/dist/ColorTool.js
CHANGED
|
@@ -1,93 +1,95 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as e, jsxs as c, Fragment as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { getDataFiltersByName as
|
|
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";
|
|
5
|
+
import { getDataFiltersByName as D } from "./widgets/ColorTool/lib/utils.js";
|
|
6
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
7
|
import v from "@rubin-epo/epo-react-lib/SelectListbox";
|
|
8
8
|
import z from "./widgets/ColorTool/Actions/index.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
const
|
|
9
|
+
import T from "./widgets/ColorTool/ImageComposite/ImageComposite.js";
|
|
10
|
+
import G from "./widgets/ColorTool/FilterControls/FilterControls.js";
|
|
11
|
+
const J = ({
|
|
12
12
|
data: p,
|
|
13
|
-
objectOptions:
|
|
13
|
+
objectOptions: j = [],
|
|
14
14
|
selectedData: a,
|
|
15
|
-
colorOptions:
|
|
16
|
-
selectionCallback:
|
|
15
|
+
colorOptions: x = [],
|
|
16
|
+
selectionCallback: i,
|
|
17
17
|
isDisabled: d = !1,
|
|
18
|
-
isDisplayOnly:
|
|
18
|
+
isDisplayOnly: S = !1,
|
|
19
19
|
className: u,
|
|
20
|
-
config:
|
|
20
|
+
config: F = {
|
|
21
21
|
actions: ["reset"],
|
|
22
22
|
width: 600,
|
|
23
23
|
height: 600,
|
|
24
24
|
hideSubtitle: !1
|
|
25
25
|
}
|
|
26
26
|
}) => {
|
|
27
|
-
const
|
|
27
|
+
const w = {
|
|
28
28
|
actions: ["reset"],
|
|
29
29
|
width: 600,
|
|
30
30
|
height: 600,
|
|
31
31
|
hideSubtitle: !1
|
|
32
|
-
}, h =
|
|
33
|
-
...
|
|
34
|
-
...
|
|
35
|
-
};
|
|
36
|
-
if (
|
|
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 }));
|
|
36
|
+
if (S)
|
|
37
37
|
return /* @__PURE__ */ e(
|
|
38
|
-
|
|
38
|
+
T,
|
|
39
39
|
{
|
|
40
40
|
ref: h,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
isDisplayOnly: !0,
|
|
42
|
+
filters: o,
|
|
43
|
+
width: l,
|
|
44
|
+
height: r,
|
|
45
|
+
selectedObjectName: s,
|
|
46
|
+
className: u,
|
|
47
|
+
images: g
|
|
46
48
|
}
|
|
47
49
|
);
|
|
48
|
-
const
|
|
49
|
-
const { label: m } = t, { filters: f } = a,
|
|
50
|
-
(
|
|
50
|
+
const O = (t) => {
|
|
51
|
+
const { label: m } = t, { filters: f } = a, $ = f.map(
|
|
52
|
+
(L) => L.label === m ? t : L
|
|
51
53
|
);
|
|
52
|
-
return
|
|
54
|
+
return i && i({
|
|
53
55
|
...a,
|
|
54
|
-
filters:
|
|
56
|
+
filters: $
|
|
55
57
|
});
|
|
56
58
|
}, W = (t) => {
|
|
57
59
|
if (t)
|
|
58
|
-
return
|
|
60
|
+
return i && i({
|
|
59
61
|
name: t,
|
|
60
|
-
filters:
|
|
62
|
+
filters: D(p, t)
|
|
61
63
|
});
|
|
62
|
-
},
|
|
64
|
+
}, y = p.length > 1, _ = n("colorTool.actions.select_an_object");
|
|
63
65
|
return /* @__PURE__ */ e(E, { className: u, children: /* @__PURE__ */ c(
|
|
64
66
|
H,
|
|
65
67
|
{
|
|
66
68
|
style: {
|
|
67
|
-
"--image-width": typeof
|
|
68
|
-
"--image-height": typeof
|
|
69
|
+
"--image-width": typeof l == "number" ? `${l}px` : l,
|
|
70
|
+
"--image-height": typeof r == "number" ? `${r}px` : r
|
|
69
71
|
},
|
|
70
72
|
children: [
|
|
71
|
-
|
|
72
|
-
/* @__PURE__ */ e("dt", { children:
|
|
73
|
-
/* @__PURE__ */ e("dd", { 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 })
|
|
74
76
|
] }) }),
|
|
75
77
|
/* @__PURE__ */ c(P, { children: [
|
|
76
|
-
|
|
77
|
-
/* @__PURE__ */ e(b, { id: "filterLabel", children:
|
|
78
|
-
/* @__PURE__ */ e(b, { id: "colorLabel", children:
|
|
79
|
-
/* @__PURE__ */ e(b, { id: "intensityLabel", 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") })
|
|
80
82
|
] }),
|
|
81
|
-
|
|
83
|
+
o && o.map((t) => {
|
|
82
84
|
const { label: m, isDisabled: f } = t;
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
-
|
|
85
|
+
return /* @__PURE__ */ R(
|
|
86
|
+
G,
|
|
85
87
|
{
|
|
86
88
|
filter: t,
|
|
87
|
-
colorOptions:
|
|
89
|
+
colorOptions: x,
|
|
88
90
|
key: `filter-${m}`,
|
|
89
91
|
isDisabled: d || f,
|
|
90
|
-
onChangeFilterCallback:
|
|
92
|
+
onChangeFilterCallback: O,
|
|
91
93
|
buttonLabelledById: "filterLabel",
|
|
92
94
|
selectLabelledById: "colorLabel",
|
|
93
95
|
sliderLabelledById: "intensityLabel"
|
|
@@ -96,21 +98,22 @@ const G = ({
|
|
|
96
98
|
})
|
|
97
99
|
] }),
|
|
98
100
|
/* @__PURE__ */ e(
|
|
99
|
-
|
|
101
|
+
T,
|
|
100
102
|
{
|
|
101
103
|
ref: h,
|
|
102
|
-
filters:
|
|
103
|
-
width:
|
|
104
|
-
height:
|
|
105
|
-
selectedObjectName:
|
|
106
|
-
|
|
104
|
+
filters: o,
|
|
105
|
+
width: l,
|
|
106
|
+
height: r,
|
|
107
|
+
selectedObjectName: s,
|
|
108
|
+
images: g,
|
|
109
|
+
children: y && /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(
|
|
107
110
|
v,
|
|
108
111
|
{
|
|
109
112
|
id: "astroObjectSelector",
|
|
110
|
-
placeholder:
|
|
111
|
-
options:
|
|
113
|
+
placeholder: _,
|
|
114
|
+
options: j,
|
|
112
115
|
onChangeCallback: W,
|
|
113
|
-
value:
|
|
116
|
+
value: s,
|
|
114
117
|
isDisabled: d,
|
|
115
118
|
width: "100%",
|
|
116
119
|
maxWidth: "100%"
|
|
@@ -121,18 +124,18 @@ const G = ({
|
|
|
121
124
|
/* @__PURE__ */ e(
|
|
122
125
|
z,
|
|
123
126
|
{
|
|
124
|
-
actions:
|
|
127
|
+
actions: B,
|
|
125
128
|
canvas: h.current,
|
|
126
129
|
selectedData: a,
|
|
127
130
|
isDisabled: d,
|
|
128
|
-
selectionCallback:
|
|
131
|
+
selectionCallback: i
|
|
129
132
|
}
|
|
130
133
|
)
|
|
131
134
|
]
|
|
132
135
|
}
|
|
133
136
|
) });
|
|
134
137
|
};
|
|
135
|
-
|
|
138
|
+
J.displayName = "Widgets.ColorTool";
|
|
136
139
|
export {
|
|
137
|
-
|
|
140
|
+
J as default
|
|
138
141
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./widgets/LightCurvePlot/PlotWithoutCurve/index.cjs"),t=require("./widgets/LightCurvePlot/PlotWithCurve/index.cjs");exports.ObservationsPlot=e.default;exports.ObservationsPlotWithCurve=t.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './widgets/LightCurvePlot/index'
|
|
@@ -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"),
|
|
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,100 +1,106 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { max as
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import { ThreeVectorContainer as
|
|
10
|
-
const
|
|
11
|
-
histogramData:
|
|
12
|
-
userData:
|
|
13
|
-
binnedImages:
|
|
2
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { useState as z } from "react";
|
|
4
|
+
import { useTranslation as E } from "react-i18next";
|
|
5
|
+
import { max as C, min as N, nice as M } from "d3-array";
|
|
6
|
+
import U from "@rubin-epo/epo-react-lib/HorizontalSlider";
|
|
7
|
+
import { getLinearScale as L, between as T } from "./lib/utils.js";
|
|
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";
|
|
10
|
+
const Z = ({
|
|
11
|
+
histogramData: t,
|
|
12
|
+
userData: _,
|
|
13
|
+
binnedImages: $,
|
|
14
14
|
step: s = 100
|
|
15
15
|
}) => {
|
|
16
|
-
const { t:
|
|
16
|
+
const { t: m } = E(), i = {
|
|
17
17
|
top: 30,
|
|
18
18
|
bottom: 30,
|
|
19
19
|
left: 50,
|
|
20
20
|
right: 0
|
|
21
|
-
},
|
|
22
|
-
({ bin: e }) =>
|
|
23
|
-
),
|
|
24
|
-
({ distance: e }) =>
|
|
25
|
-
), w =
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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])
|
|
23
|
+
), k = _.filter(
|
|
24
|
+
({ distance: e }) => T(e, n[0], n[1] + s)
|
|
25
|
+
), w = t.reduce((e, { value: O }, q) => S[q] ? e + O : e, 0);
|
|
26
|
+
return /* @__PURE__ */ l(F, { children: [
|
|
27
|
+
/* @__PURE__ */ l(G, { children: [
|
|
28
|
+
/* @__PURE__ */ l(J, { children: [
|
|
29
|
+
/* @__PURE__ */ r(R, { children: m("supernova_three_vector.histogram.title") }),
|
|
30
|
+
/* @__PURE__ */ r(
|
|
31
|
+
K,
|
|
32
|
+
{
|
|
33
|
+
data: t,
|
|
34
|
+
activeRange: n,
|
|
35
|
+
xDomain: h,
|
|
36
|
+
yDomain: v,
|
|
37
|
+
xScale: f,
|
|
38
|
+
yScale: A,
|
|
39
|
+
yTicks: x,
|
|
40
|
+
xTicks: u,
|
|
41
|
+
step: s,
|
|
42
|
+
margin: i,
|
|
43
|
+
width: c,
|
|
44
|
+
height: p
|
|
45
|
+
}
|
|
46
|
+
)
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ r(
|
|
49
|
+
P,
|
|
47
50
|
{
|
|
48
51
|
style: {
|
|
49
52
|
paddingInlineStart: B,
|
|
50
53
|
paddingInlineEnd: H
|
|
51
54
|
},
|
|
52
|
-
children: /* @__PURE__ */
|
|
53
|
-
|
|
55
|
+
children: /* @__PURE__ */ r(
|
|
56
|
+
U,
|
|
54
57
|
{
|
|
55
58
|
min: a,
|
|
56
|
-
max:
|
|
59
|
+
max: o,
|
|
57
60
|
step: s,
|
|
58
|
-
value:
|
|
59
|
-
ariaValuetext: ({ valueNow: e }) =>
|
|
61
|
+
value: n,
|
|
62
|
+
ariaValuetext: ({ valueNow: e }) => m("supernova_three_vector.slider.valueLabel", { value: e }),
|
|
60
63
|
label: "distanceSlider",
|
|
61
64
|
color: "var(--turquoise85,#12726D)",
|
|
62
65
|
minLabel: `${a} kpc`,
|
|
63
|
-
maxLabel: `${
|
|
66
|
+
maxLabel: `${o} kpc`,
|
|
64
67
|
onChangeCallback: (e) => Array.isArray(e) && y(e)
|
|
65
68
|
}
|
|
66
69
|
)
|
|
67
70
|
}
|
|
68
71
|
),
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
/* @__PURE__ */ l(Q, { children: [
|
|
73
|
+
/* @__PURE__ */ r(R, { children: m("supernova_three_vector.skymap.title") }),
|
|
74
|
+
/* @__PURE__ */ r(
|
|
75
|
+
X,
|
|
76
|
+
{
|
|
77
|
+
objects: k,
|
|
78
|
+
images: $,
|
|
79
|
+
describedById: d,
|
|
80
|
+
visibleImages: S
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
] }),
|
|
84
|
+
/* @__PURE__ */ r(
|
|
85
|
+
Y,
|
|
80
86
|
{
|
|
81
|
-
onResetCallback: () => y([a,
|
|
87
|
+
onResetCallback: () => y([a, o])
|
|
82
88
|
}
|
|
83
89
|
)
|
|
84
90
|
] }),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
|
|
91
|
+
/* @__PURE__ */ r(
|
|
92
|
+
W,
|
|
87
93
|
{
|
|
88
|
-
id:
|
|
89
|
-
objects:
|
|
90
|
-
min:
|
|
91
|
-
max:
|
|
94
|
+
id: d,
|
|
95
|
+
objects: k,
|
|
96
|
+
min: n[0],
|
|
97
|
+
max: n[1] + s,
|
|
92
98
|
supernovaCount: w
|
|
93
99
|
}
|
|
94
100
|
)
|
|
95
101
|
] });
|
|
96
102
|
};
|
|
97
|
-
|
|
103
|
+
Z.displayName = "Widgets.SupernovaThreeVector";
|
|
98
104
|
export {
|
|
99
|
-
|
|
105
|
+
Z as default
|
|
100
106
|
};
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
import { jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import { useTranslation as r } from "react-i18next";
|
|
4
4
|
import c from "@rubin-epo/epo-react-lib/Button";
|
|
5
|
-
const
|
|
6
|
-
isDisabled:
|
|
5
|
+
const e = ({
|
|
6
|
+
isDisabled: o,
|
|
7
7
|
onResetCallback: t,
|
|
8
|
-
className:
|
|
8
|
+
className: i
|
|
9
9
|
}) => {
|
|
10
|
-
const { t:
|
|
10
|
+
const { t: n } = r();
|
|
11
11
|
return /* @__PURE__ */ s(
|
|
12
12
|
c,
|
|
13
13
|
{
|
|
14
14
|
style: { "--button-text-align": "left" },
|
|
15
|
-
disabled:
|
|
15
|
+
disabled: o,
|
|
16
16
|
icon: "RotateLeftWithCenter",
|
|
17
17
|
iconSize: "2em",
|
|
18
18
|
onClick: () => t && t(),
|
|
19
|
-
className:
|
|
19
|
+
className: i,
|
|
20
20
|
isBlock: !0,
|
|
21
|
-
children:
|
|
21
|
+
children: n("colorTool.actions.reset")
|
|
22
22
|
}
|
|
23
23
|
);
|
|
24
24
|
};
|
|
25
|
-
|
|
26
|
-
const a =
|
|
25
|
+
e.displayName = "Atomic.Button.Reset";
|
|
26
|
+
const a = e;
|
|
27
27
|
export {
|
|
28
28
|
a as default
|
|
29
29
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),s=require("./styles.cjs"),e=({id:i,children:t})=>r.jsx(s.OffscreenLabel,{"aria-live":"polite",id:i,children:t});e.displayName="Atomic.LiveRegion";exports.default=e;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { OffscreenLabel as r } from "./styles.js";
|
|
3
|
+
const t = ({
|
|
4
|
+
id: e,
|
|
5
|
+
children: i
|
|
6
|
+
}) => /* @__PURE__ */ o(r, { "aria-live": "polite", id: e, children: i });
|
|
7
|
+
t.displayName = "Atomic.LiveRegion";
|
|
8
|
+
export {
|
|
9
|
+
t as default
|
|
10
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("./styles.cjs"),o=({width:r=900,height:t=300,minX:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("./styles.cjs"),o=({width:r=900,height:t=300,minX:u=0,minY:c=0,verticalLabel:i,verticalLabelId:a,horizontalLabel:n,horizontalLabelId:d,children:l,className:x})=>e.jsxs(s.ChartContainer,{children:[i&&e.jsx(s.VerticalLabel,{id:a,"aria-hidden":!!a,children:i}),e.jsx(s.SVG,{preserveAspectRatio:"xMidYMid meet",viewBox:`${u} ${c} ${r} ${t}`,className:x,style:{"--aspect-ratio":`${r} / ${t}`,"--min-width":`${r}px`},role:"group",children:l}),n&&e.jsx(s.HorizontalLabel,{id:d,"aria-hidden":!!d,children:n})]});o.displayName="Charts.Base";const p=o;exports.default=p;
|
|
@@ -1,36 +1,50 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ChartContainer as
|
|
3
|
-
const
|
|
1
|
+
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { ChartContainer as x, VerticalLabel as B, SVG as C, HorizontalLabel as f } from "./styles.js";
|
|
3
|
+
const d = ({
|
|
4
4
|
width: e = 900,
|
|
5
|
-
height:
|
|
6
|
-
minX:
|
|
7
|
-
minY:
|
|
8
|
-
verticalLabel:
|
|
9
|
-
verticalLabelId:
|
|
10
|
-
horizontalLabel:
|
|
11
|
-
horizontalLabelId:
|
|
12
|
-
children:
|
|
13
|
-
className:
|
|
14
|
-
}) => /* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
/* @__PURE__ */ r(
|
|
5
|
+
height: i = 300,
|
|
6
|
+
minX: n = 0,
|
|
7
|
+
minY: p = 0,
|
|
8
|
+
verticalLabel: s,
|
|
9
|
+
verticalLabelId: a,
|
|
10
|
+
horizontalLabel: t,
|
|
11
|
+
horizontalLabelId: o,
|
|
12
|
+
children: m,
|
|
13
|
+
className: $
|
|
14
|
+
}) => /* @__PURE__ */ c(x, { children: [
|
|
15
|
+
s && /* @__PURE__ */ r(
|
|
17
16
|
B,
|
|
17
|
+
{
|
|
18
|
+
id: a,
|
|
19
|
+
"aria-hidden": !!a,
|
|
20
|
+
children: s
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
/* @__PURE__ */ r(
|
|
24
|
+
C,
|
|
18
25
|
{
|
|
19
26
|
preserveAspectRatio: "xMidYMid meet",
|
|
20
|
-
viewBox: `${
|
|
21
|
-
className:
|
|
27
|
+
viewBox: `${n} ${p} ${e} ${i}`,
|
|
28
|
+
className: $,
|
|
22
29
|
style: {
|
|
23
|
-
"--aspect-ratio": `${e} / ${
|
|
30
|
+
"--aspect-ratio": `${e} / ${i}`,
|
|
24
31
|
"--min-width": `${e}px`
|
|
25
32
|
},
|
|
26
33
|
role: "group",
|
|
27
|
-
children:
|
|
34
|
+
children: m
|
|
28
35
|
}
|
|
29
36
|
),
|
|
30
|
-
|
|
37
|
+
t && /* @__PURE__ */ r(
|
|
38
|
+
f,
|
|
39
|
+
{
|
|
40
|
+
id: o,
|
|
41
|
+
"aria-hidden": !!o,
|
|
42
|
+
children: t
|
|
43
|
+
}
|
|
44
|
+
)
|
|
31
45
|
] });
|
|
32
|
-
|
|
33
|
-
const
|
|
46
|
+
d.displayName = "Charts.Base";
|
|
47
|
+
const u = d;
|
|
34
48
|
export {
|
|
35
|
-
|
|
49
|
+
u as default
|
|
36
50
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("styled-components"),l=e=>e&&e.__esModule?e:{default:e},t=l(a),r=t.default.div`
|
|
2
|
+
--label-gutter: 2em;
|
|
3
|
+
|
|
2
4
|
display: grid;
|
|
3
|
-
grid-template-columns:
|
|
4
|
-
grid-template-rows: 1fr
|
|
5
|
+
grid-template-columns: var(--label-gutter) 1fr;
|
|
6
|
+
grid-template-rows: 1fr var(--label-gutter);
|
|
5
7
|
grid-template-areas:
|
|
6
8
|
"vertical-label chart"
|
|
7
9
|
". horizontal-label";
|
|
10
|
+
padding-inline-end: var(--label-gutter);
|
|
8
11
|
`,i=t.default.span`
|
|
9
12
|
font-size: 80%;
|
|
10
13
|
grid-area: horizontal-label;
|