@rubin-epo/epo-widget-lib 0.9.7 → 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.
- package/dist/CameraFilter.cjs +1 -1
- package/dist/CameraFilter.js +25 -24
- package/dist/Charts.cjs +1 -1
- package/dist/Charts.js +14 -12
- package/dist/ColorTool.cjs +1 -1
- package/dist/ColorTool.js +98 -103
- package/dist/FilterTool.cjs +1 -1
- package/dist/FilterTool.js +1 -1
- package/dist/SupernovaThreeVector.cjs +1 -1
- package/dist/SupernovaThreeVector.js +12 -12
- package/dist/atomic/PlaybackControl/PlaybackControl.d.ts +1 -2
- package/dist/charts/Bars/index.d.ts +1 -1
- package/dist/charts/Base/index.d.ts +1 -1
- package/dist/charts/Guidelines/index.cjs +1 -1
- package/dist/charts/Guidelines/index.d.ts +1 -1
- package/dist/charts/Guidelines/index.js +9 -9
- package/dist/charts/Points/ErrorBar.cjs +1 -0
- package/dist/charts/Points/ErrorBar.d.ts +9 -0
- package/dist/charts/Points/ErrorBar.js +119 -0
- package/dist/charts/Points/index.cjs +1 -1
- package/dist/charts/Points/index.d.ts +5 -11
- package/dist/charts/Points/index.js +44 -22
- package/dist/charts/ScatterPlot/index.cjs +1 -0
- package/dist/charts/ScatterPlot/index.d.ts +24 -0
- package/dist/charts/ScatterPlot/index.js +133 -0
- package/dist/charts/ScatterPlot/styles.cjs +22 -0
- package/dist/charts/ScatterPlot/styles.d.ts +16 -0
- package/dist/charts/ScatterPlot/styles.js +29 -0
- package/dist/charts/XAxis/index.d.ts +1 -1
- package/dist/charts/YAxis/index.d.ts +1 -1
- package/dist/charts/defaults.cjs +1 -0
- package/dist/charts/defaults.d.ts +22 -0
- package/dist/charts/defaults.js +23 -0
- package/dist/charts/hooks/useAxis.d.ts +1 -1
- package/dist/charts/index.d.ts +1 -0
- package/dist/hooks/useInterval.cjs +1 -1
- package/dist/hooks/useInterval.js +10 -10
- package/dist/hooks/useWindowSize.d.ts +4 -0
- package/dist/layout/AspectRatio/index.cjs +1 -0
- package/dist/layout/AspectRatio/index.d.ts +18 -0
- package/dist/layout/AspectRatio/index.js +24 -0
- package/dist/layout/AspectRatio/styles.cjs +16 -0
- package/dist/{widgets/ColorTool/Actions → layout/AspectRatio}/styles.d.ts +1 -1
- package/dist/layout/AspectRatio/styles.js +22 -0
- package/dist/layout/Controls/index.cjs +1 -0
- package/dist/layout/Controls/index.d.ts +10 -0
- package/dist/layout/Controls/index.js +31 -0
- package/dist/layout/Controls/styles.cjs +63 -0
- package/dist/{widgets/ColorTool → layout/Controls}/styles.d.ts +604 -332
- package/dist/layout/Controls/styles.js +75 -0
- package/dist/lib/reimg.cjs +1 -1
- package/dist/lib/reimg.d.ts +2 -2
- package/dist/lib/reimg.js +30 -31
- package/dist/localeStrings/en/epo-widget-lib.json +2 -2
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.cjs +1 -1
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.js +1 -1
- package/dist/widgets/CameraFilter/styles.cjs +24 -20
- package/dist/widgets/CameraFilter/styles.js +36 -32
- package/dist/widgets/ColorTool/Actions/index.cjs +1 -1
- package/dist/widgets/ColorTool/Actions/index.js +24 -25
- package/dist/widgets/ColorTool/FilterControls/styles.cjs +4 -4
- package/dist/widgets/ColorTool/FilterControls/styles.d.ts +1252 -0
- package/dist/widgets/ColorTool/FilterControls/styles.js +1 -1
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.cjs +1 -1
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.js +26 -29
- package/dist/widgets/ColorTool/ImageComposite/styles.cjs +5 -3
- package/dist/widgets/ColorTool/ImageComposite/styles.js +4 -2
- package/dist/widgets/ColorTool/styles.cjs +10 -24
- package/dist/widgets/ColorTool/styles.js +15 -29
- package/dist/widgets/FilterTool/FilterTool.d.ts +1 -1
- package/dist/widgets/FilterTool/styles.cjs +9 -9
- package/dist/widgets/FilterTool/styles.d.ts +6 -269
- package/dist/widgets/FilterTool/styles.js +17 -16
- package/dist/widgets/LightCurvePlot/Plot/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/Plot/index.d.ts +12 -0
- package/dist/widgets/LightCurvePlot/Plot/index.js +99 -0
- package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.cjs +4 -4
- package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.js +7 -6
- package/dist/widgets/LightCurvePlot/PlotWithCurve/A11Y/LightCurveLabel/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/index.d.ts +2 -2
- package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/index.js +2 -2
- package/dist/widgets/LightCurvePlot/PlotWithCurve/DM15Display/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/index.js +2 -2
- package/dist/widgets/LightCurvePlot/PlotWithCurve/LightCurve/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/{LightCurve → PlotWithCurve/LightCurve}/index.d.ts +1 -1
- package/dist/widgets/LightCurvePlot/{LightCurve → PlotWithCurve/LightCurve}/index.js +2 -2
- package/dist/widgets/LightCurvePlot/PlotWithCurve/MagnitudeSlider/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/index.d.ts +0 -2
- package/dist/widgets/LightCurvePlot/PlotWithCurve/MagnitudeSlider/index.js +53 -0
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.js +132 -119
- package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.cjs +9 -11
- package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.js +13 -16
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.d.ts +2 -2
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.js +17 -15
- package/dist/widgets/LightCurvePlot/helpers.cjs +1 -1
- package/dist/widgets/LightCurvePlot/helpers.d.ts +3 -12
- package/dist/widgets/LightCurvePlot/helpers.js +33 -18
- package/dist/widgets/SourceSelector/SourceSelector.cjs +1 -1
- package/dist/widgets/SourceSelector/SourceSelector.js +53 -60
- package/dist/widgets/SupernovaThreeVector/Histogram/index.d.ts +1 -1
- package/dist/widgets/SupernovaThreeVector/index.d.ts +1 -1
- package/dist/widgets/SupernovaThreeVector/styles.cjs +10 -10
- package/dist/widgets/SupernovaThreeVector/styles.js +23 -22
- package/package.json +1 -1
- package/dist/styles/svg.cjs +0 -8
- package/dist/styles/svg.js +0 -13
- package/dist/widgets/ColorTool/Actions/styles.cjs +0 -5
- package/dist/widgets/ColorTool/Actions/styles.js +0 -10
- package/dist/widgets/LightCurvePlot/A11Y/LightCurveLabel/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/DM15Display/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/LightCurve/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/MagnitudeSlider/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/MagnitudeSlider/index.js +0 -55
- package/dist/widgets/LightCurvePlot/Point/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/Point/index.d.ts +0 -11
- package/dist/widgets/LightCurvePlot/Point/index.js +0 -68
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.d.ts +0 -12
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.js +0 -176
- /package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.d.ts +0 -0
- /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.cjs +0 -0
- /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.d.ts +0 -0
- /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.js +0 -0
- /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/index.d.ts +0 -0
- /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.cjs +0 -0
- /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.d.ts +0 -0
- /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.js +0 -0
- /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/styles.cjs +0 -0
- /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/styles.js +0 -0
|
@@ -1,80 +1,73 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as n, jsx as t, Fragment as
|
|
2
|
+
import { jsxs as n, jsx as t, Fragment as _ } from "react/jsx-runtime";
|
|
3
3
|
import { useState as i } from "react";
|
|
4
|
-
import { useTranslation as
|
|
4
|
+
import { useTranslation as q } from "react-i18next";
|
|
5
5
|
import E from "@rubin-epo/epo-react-lib/IconComposer";
|
|
6
|
-
import
|
|
6
|
+
import F from "../../layout/AspectRatio/index.js";
|
|
7
7
|
import { BackgroundBlinker as N, ElapsedDisplay as P } from "./styles.js";
|
|
8
8
|
import R from "./PointSelector/index.js";
|
|
9
9
|
import T from "./Message/Message.js";
|
|
10
|
-
const
|
|
11
|
-
width:
|
|
12
|
-
height:
|
|
10
|
+
const g = ({
|
|
11
|
+
width: h = 600,
|
|
12
|
+
height: p = 600,
|
|
13
13
|
selectedSource: r = [],
|
|
14
14
|
sources: S,
|
|
15
15
|
alerts: e = [],
|
|
16
16
|
activeAlertIndex: c = 0,
|
|
17
17
|
alertChangeCallback: k,
|
|
18
|
-
selectionCallback:
|
|
19
|
-
blinkConfig:
|
|
18
|
+
selectionCallback: l,
|
|
19
|
+
blinkConfig: M,
|
|
20
20
|
isDisplayOnly: o = !1,
|
|
21
|
-
className:
|
|
21
|
+
className: b
|
|
22
22
|
}) => {
|
|
23
|
-
const [
|
|
24
|
-
|
|
25
|
-
/* @__PURE__ */ n(
|
|
23
|
+
const [C, A] = i(!1), [V, d] = i(), [j, a] = i(!1), { t: m } = q(), u = "sourceSelectorWidget", x = (s) => {
|
|
24
|
+
C && !o && (s ? r.includes(s) || (l && l(r.concat(s)), d(
|
|
25
|
+
/* @__PURE__ */ n(_, { children: [
|
|
26
26
|
/* @__PURE__ */ t(E, { icon: "checkmark" }),
|
|
27
|
-
|
|
27
|
+
m("source_selector.messages.success")
|
|
28
28
|
] })
|
|
29
|
-
), a(!0)) : (
|
|
30
|
-
},
|
|
29
|
+
), a(!0)) : (d(m("source_selector.messages.failure")), a(!0)));
|
|
30
|
+
}, B = () => {
|
|
31
31
|
a(!1);
|
|
32
|
-
},
|
|
33
|
-
return /* @__PURE__ */ n(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
)
|
|
69
|
-
]
|
|
70
|
-
}
|
|
71
|
-
)
|
|
72
|
-
]
|
|
73
|
-
}
|
|
74
|
-
);
|
|
32
|
+
}, f = e[c].date - e[0].date, I = Math.round(f), L = Math.round(24 / f % 24) || 0, W = o ? [e[c].image] : e.map(({ image: s }) => s);
|
|
33
|
+
return /* @__PURE__ */ n(F, { ratio: "square", className: b, children: [
|
|
34
|
+
!o && /* @__PURE__ */ t(
|
|
35
|
+
T,
|
|
36
|
+
{
|
|
37
|
+
onMessageChangeCallback: B,
|
|
38
|
+
isVisible: j,
|
|
39
|
+
forIds: [u],
|
|
40
|
+
children: V
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ n(
|
|
44
|
+
N,
|
|
45
|
+
{
|
|
46
|
+
images: W,
|
|
47
|
+
activeIndex: c,
|
|
48
|
+
blinkCallback: k,
|
|
49
|
+
loadedCallback: () => A(!0),
|
|
50
|
+
...M,
|
|
51
|
+
children: [
|
|
52
|
+
e.length > 0 && !o && /* @__PURE__ */ t(P, { day: I, hour: L }),
|
|
53
|
+
/* @__PURE__ */ t(
|
|
54
|
+
R,
|
|
55
|
+
{
|
|
56
|
+
id: u,
|
|
57
|
+
onSelectCallback: x,
|
|
58
|
+
width: h,
|
|
59
|
+
height: p,
|
|
60
|
+
sources: S,
|
|
61
|
+
selectedSource: r
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
] });
|
|
75
68
|
};
|
|
76
|
-
|
|
77
|
-
const X =
|
|
69
|
+
g.displayName = "Widgets.SourceSelector";
|
|
70
|
+
const X = g;
|
|
78
71
|
export {
|
|
79
72
|
X as default
|
|
80
73
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent } from "react";
|
|
2
|
-
import { ChartMargin, Domain, HistogramData, ScaleFunction } from '../../../charts
|
|
2
|
+
import { ChartMargin, Domain, HistogramData, ScaleFunction } from '../../../types/charts';
|
|
3
3
|
interface DistanceHistogramProps {
|
|
4
4
|
data: HistogramData;
|
|
5
5
|
activeRange: Array<number>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FunctionComponent } from "react";
|
|
2
2
|
import { ImageShape } from "@rubin-epo/epo-react-lib/Image";
|
|
3
|
-
import { HistogramData } from '../../charts
|
|
3
|
+
import { HistogramData } from '../../types/charts';
|
|
4
4
|
import { SkymapObject } from "./Skymap";
|
|
5
5
|
interface SupernovaThreeVectorProps {
|
|
6
6
|
histogramData: HistogramData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("styled-components"),t=require("@rubin-epo/epo-react-lib/styles"),r=require("../../atomic/Button/patterns/Reset.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("styled-components"),t=require("@rubin-epo/epo-react-lib/styles"),r=require("../../layout/AspectRatio/index.cjs"),a=require("../../atomic/Button/patterns/Reset.cjs"),o=require("./Histogram/index.cjs"),s=require("./Skymap/index.cjs"),d=n=>n&&n.__esModule?n:{default:n},e=d(i),c=e.default(r.default)`
|
|
2
2
|
container-type: inline-size;
|
|
3
|
-
`,
|
|
3
|
+
`,l=e.default.div`
|
|
4
4
|
--three-vector-gap: calc(var(--PADDING_SMALL, 20px) / 2);
|
|
5
5
|
|
|
6
6
|
display: grid;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"reset";
|
|
14
14
|
gap: var(--three-vector-gap);
|
|
15
15
|
|
|
16
|
-
@container (min-width: ${t.token("
|
|
16
|
+
@container (min-width: ${t.token("BREAK_LARGE_TABLET")}) {
|
|
17
17
|
grid-template-columns: 1fr 1fr;
|
|
18
18
|
grid-template-rows: 1fr min-content min-content;
|
|
19
19
|
grid-template-areas:
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
--three-vector-gap: var(--PADDING_SMALL, 20px);
|
|
27
27
|
gap: var(--three-vector-gap);
|
|
28
28
|
}
|
|
29
|
-
`,
|
|
29
|
+
`,m=e.default.div`
|
|
30
30
|
display: flex;
|
|
31
31
|
flex-direction: column;
|
|
32
32
|
gap: var(--three-vector-gap);
|
|
33
33
|
container-type: inline-size;
|
|
34
34
|
grid-area: histogram;
|
|
35
|
-
`,
|
|
35
|
+
`,u=e.default(o.default)`
|
|
36
36
|
font-size: 2.25em;
|
|
37
37
|
|
|
38
38
|
@container (
|
|
@@ -54,15 +54,15 @@
|
|
|
54
54
|
}
|
|
55
55
|
`,f=e.default.div`
|
|
56
56
|
grid-area: slider;
|
|
57
|
-
`,p=e.default(
|
|
57
|
+
`,p=e.default(a.default)`
|
|
58
58
|
grid-area: reset;
|
|
59
|
-
`,
|
|
59
|
+
`,g=e.default.div`
|
|
60
60
|
display: flex;
|
|
61
61
|
flex-direction: column;
|
|
62
62
|
gap: var(--three-vector-gap);
|
|
63
63
|
container-type: inline-size;
|
|
64
64
|
grid-area: skymap;
|
|
65
|
-
`,
|
|
65
|
+
`,h=e.default(s.default)`
|
|
66
66
|
max-width: 100%;
|
|
67
67
|
font-size: 2.25em;
|
|
68
68
|
|
|
@@ -83,6 +83,6 @@
|
|
|
83
83
|
) {
|
|
84
84
|
font-size: 1em;
|
|
85
85
|
}
|
|
86
|
-
`,
|
|
86
|
+
`,_=e.default.h4`
|
|
87
87
|
margin: 0;
|
|
88
|
-
`;exports.ChartTitle=
|
|
88
|
+
`;exports.ChartTitle=_;exports.Histogram=u;exports.HistogramContainer=m;exports.ResetButton=p;exports.Skymap=h;exports.SkymapContainer=g;exports.SliderContainer=f;exports.ThreeVectorContainer=c;exports.ThreeVectorLayout=l;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import e from "styled-components";
|
|
3
3
|
import { token as t } from "@rubin-epo/epo-react-lib/styles";
|
|
4
|
-
import i from "../../
|
|
5
|
-
import r from "
|
|
6
|
-
import n from "./
|
|
7
|
-
|
|
4
|
+
import i from "../../layout/AspectRatio/index.js";
|
|
5
|
+
import r from "../../atomic/Button/patterns/Reset.js";
|
|
6
|
+
import n from "./Histogram/index.js";
|
|
7
|
+
import o from "./Skymap/index.js";
|
|
8
|
+
const g = e(i)`
|
|
8
9
|
container-type: inline-size;
|
|
9
|
-
`,
|
|
10
|
+
`, l = e.div`
|
|
10
11
|
--three-vector-gap: calc(var(--PADDING_SMALL, 20px) / 2);
|
|
11
12
|
|
|
12
13
|
display: grid;
|
|
@@ -19,7 +20,7 @@ const p = e.div`
|
|
|
19
20
|
"reset";
|
|
20
21
|
gap: var(--three-vector-gap);
|
|
21
22
|
|
|
22
|
-
@container (min-width: ${t("
|
|
23
|
+
@container (min-width: ${t("BREAK_LARGE_TABLET")}) {
|
|
23
24
|
grid-template-columns: 1fr 1fr;
|
|
24
25
|
grid-template-rows: 1fr min-content min-content;
|
|
25
26
|
grid-template-areas:
|
|
@@ -32,13 +33,13 @@ const p = e.div`
|
|
|
32
33
|
--three-vector-gap: var(--PADDING_SMALL, 20px);
|
|
33
34
|
gap: var(--three-vector-gap);
|
|
34
35
|
}
|
|
35
|
-
`,
|
|
36
|
+
`, f = e.div`
|
|
36
37
|
display: flex;
|
|
37
38
|
flex-direction: column;
|
|
38
39
|
gap: var(--three-vector-gap);
|
|
39
40
|
container-type: inline-size;
|
|
40
41
|
grid-area: histogram;
|
|
41
|
-
`,
|
|
42
|
+
`, h = e(n)`
|
|
42
43
|
font-size: 2.25em;
|
|
43
44
|
|
|
44
45
|
@container (
|
|
@@ -58,17 +59,17 @@ const p = e.div`
|
|
|
58
59
|
) {
|
|
59
60
|
font-size: 1em;
|
|
60
61
|
}
|
|
61
|
-
`,
|
|
62
|
+
`, A = e.div`
|
|
62
63
|
grid-area: slider;
|
|
63
|
-
`,
|
|
64
|
+
`, E = e(r)`
|
|
64
65
|
grid-area: reset;
|
|
65
|
-
`,
|
|
66
|
+
`, B = e.div`
|
|
66
67
|
display: flex;
|
|
67
68
|
flex-direction: column;
|
|
68
69
|
gap: var(--three-vector-gap);
|
|
69
70
|
container-type: inline-size;
|
|
70
71
|
grid-area: skymap;
|
|
71
|
-
`,
|
|
72
|
+
`, _ = e(o)`
|
|
72
73
|
max-width: 100%;
|
|
73
74
|
font-size: 2.25em;
|
|
74
75
|
|
|
@@ -89,17 +90,17 @@ const p = e.div`
|
|
|
89
90
|
) {
|
|
90
91
|
font-size: 1em;
|
|
91
92
|
}
|
|
92
|
-
`,
|
|
93
|
+
`, v = e.h4`
|
|
93
94
|
margin: 0;
|
|
94
95
|
`;
|
|
95
96
|
export {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
97
|
+
v as ChartTitle,
|
|
98
|
+
h as Histogram,
|
|
99
|
+
f as HistogramContainer,
|
|
100
|
+
E as ResetButton,
|
|
101
|
+
_ as Skymap,
|
|
102
|
+
B as SkymapContainer,
|
|
103
|
+
A as SliderContainer,
|
|
104
|
+
g as ThreeVectorContainer,
|
|
105
|
+
l as ThreeVectorLayout
|
|
105
106
|
};
|
package/package.json
CHANGED
package/dist/styles/svg.cjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("styled-components"),i=t=>t&&t.__esModule?t:{default:t},n=i(e),o=n.default.div`
|
|
2
|
-
position: relative;
|
|
3
|
-
min-width: var(--BREAK_MOBILE_MIN, 280px);
|
|
4
|
-
|
|
5
|
-
@media print {
|
|
6
|
-
width: var(--BREAK_MOBILE_MIN, 280px);
|
|
7
|
-
}
|
|
8
|
-
`;exports.Container=o;
|
package/dist/styles/svg.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("styled-components"),o=t=>t&&t.__esModule?t:{default:t},l=o(e),a=l.default.div`
|
|
2
|
-
display: flex;
|
|
3
|
-
gap: var(--color-tool-padding, var(--PADDING_SMALL, 20px));
|
|
4
|
-
grid-area: actions;
|
|
5
|
-
`;exports.Actions=a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("react/jsx-runtime"),d=require("react-i18next"),b=require("lodash/minBy"),v=require("../../helpers.cjs"),L=require("../../../../lib/utils.cjs"),f=require("./styles.cjs"),h=e=>e&&e.__esModule?e:{default:e},_=h(b),u=({data:e,gaussianWidth:n,yOffset:s,controlledById:l,estimatedPeak:o})=>{const{t:c,i18n:{language:r}}=d.useTranslation(),a=e.filter(({x:t})=>L.between(t,0,15)).reduce((t,m)=>t+v.calculateResidual(m,n,s),0)/e.length,{y:i}=_.default(e,({y:t})=>t)||{};return g.jsx(f.HiddenOutput,{form:l,children:c("light_curve.curve.description",{residual:a.toLocaleString(r,{minimumFractionDigits:2,maximumFractionDigits:2}),brightest:i==null?void 0:i.toLocaleString(r,{minimumFractionDigits:1,maximumFractionDigits:1}),context:o<Number(i)?"above":"below"})})};u.displayName="Widgets.LightCurvel.A11Y.LightCurveLabel";const p=u;exports.default=p;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),u=require("react-i18next"),d=require("../../../charts/ForeignObject/index.cjs"),s=require("../helpers.cjs"),i=require("./styles.cjs"),n=({gaussianWidth:t,className:r})=>{const{t:a,i18n:{language:l}}=u.useTranslation(),c=s.estimateMagnitude(0,t),o=s.estimateMagnitude(15,t)-c;return e.jsx(d.default,{children:e.jsx(i.DisplayContainer,{children:e.jsxs(i.Display,{className:r,children:[e.jsx(i.Line,{}),e.jsxs("math",{xmlns:"http://www.w3.org/1998/Math/MathML",children:[e.jsx("mn",{children:"Δ"}),e.jsxs("msub",{children:[e.jsx("mi",{children:"m"}),e.jsx("mn",{children:"15"})]}),e.jsx("mo",{children:"="}),e.jsx("mn",{role:"status","aria-live":"polite","aria-label":a("light_curve.deltaM15.label")||void 0,children:Number(o).toLocaleString(l,{minimumFractionDigits:2,maximumFractionDigits:2})})]})]})})})};n.displayName="Widgets.LightCurve.DM15Display";const m=n;exports.default=m;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react/jsx-runtime"),g=require("d3-array"),v=require("../helpers.cjs"),n=({xScale:s,xDomain:t,yScale:r,yDomain:u,gaussianWidth:i,yOffset:a})=>{const o=g.range(t[0],t[1],.5).map(e=>({x:e,y:v.estimateMagnitude(e,i)})).map(({x:e,y:d},l)=>`${l===0?"M":"L"}${s(e)},${r(d)}`).join("");return c.jsx("path",{transform:`translate(0,${r(u[0]-a)})`,d:o,fill:"none",strokeWidth:2,stroke:"var(--black,#000)",pointerEvents:"none"})};n.displayName="Widgets.LightCurve.Curve";const m=n;exports.default=m;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react/jsx-runtime"),h=require("react-i18next"),a=require("./styles.cjs"),x=(t,n,s)=>{const i=Number(Math.abs(n-t).toFixed(1)),u=i.toLocaleString(s,{minimumFractionDigits:1,maximumFractionDigits:1});let e;return i<=.05?(e="equal",{distance:i,context:e}):(t<n?e="above":e="below",{distance:u,context:e})},c=({magnitude:t,yMin:n,yMax:s,onMagnitudeChangeCallback:i,estimatedPeak:u,disabled:e,width:v,height:S})=>{const{t:l,i18n:{language:o}}=h.useTranslation();return r.jsx(a.Slider,{ariaLabel:l("light_curve.magnitude_slider.label")||void 0,orientation:"vertical",value:t,min:n,max:s,step:.1,disabled:e,ariaValuetext:()=>l("light_curve.magnitude_slider.value",{...x(u,t,o),magnitude:t.toLocaleString(o,{minimumFractionDigits:1,maximumFractionDigits:1})}),onChange:i,renderThumb:({key:d,style:m,...g})=>r.jsxs(a.ThumbContainer,{...g,style:m,children:[r.jsx(a.ThumbBar,{}),r.jsx(a.ThumbHandle,{})]},d)})};c.displayName="Widgets.LightCurve.MagnitudeSlider";const b=c;exports.default=b;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
3
|
-
import { useTranslation as h } from "react-i18next";
|
|
4
|
-
import { Slider as b, ThumbContainer as x, ThumbBar as v, ThumbHandle as f } from "./styles.js";
|
|
5
|
-
const p = (t, n, a) => {
|
|
6
|
-
const e = Number(Math.abs(n - t).toFixed(1)), r = e.toLocaleString(a, {
|
|
7
|
-
minimumFractionDigits: 1,
|
|
8
|
-
maximumFractionDigits: 1
|
|
9
|
-
});
|
|
10
|
-
let i;
|
|
11
|
-
return e <= 0.05 ? (i = "equal", { distance: e, context: i }) : (t < n ? i = "above" : i = "below", { distance: r, context: i });
|
|
12
|
-
}, u = ({
|
|
13
|
-
magnitude: t,
|
|
14
|
-
yMin: n,
|
|
15
|
-
yMax: a,
|
|
16
|
-
onMagnitudeChangeCallback: e,
|
|
17
|
-
estimatedPeak: r,
|
|
18
|
-
disabled: i,
|
|
19
|
-
width: S,
|
|
20
|
-
height: D
|
|
21
|
-
}) => {
|
|
22
|
-
const {
|
|
23
|
-
t: l,
|
|
24
|
-
i18n: { language: m }
|
|
25
|
-
} = h();
|
|
26
|
-
return /* @__PURE__ */ o(
|
|
27
|
-
b,
|
|
28
|
-
{
|
|
29
|
-
ariaLabel: l("light_curve.magnitude_slider.label") || void 0,
|
|
30
|
-
orientation: "vertical",
|
|
31
|
-
value: t,
|
|
32
|
-
min: n,
|
|
33
|
-
max: a,
|
|
34
|
-
step: 0.1,
|
|
35
|
-
disabled: i,
|
|
36
|
-
ariaValuetext: () => l("light_curve.magnitude_slider.value", {
|
|
37
|
-
...p(r, t, m),
|
|
38
|
-
magnitude: t.toLocaleString(m, {
|
|
39
|
-
minimumFractionDigits: 1,
|
|
40
|
-
maximumFractionDigits: 1
|
|
41
|
-
})
|
|
42
|
-
}),
|
|
43
|
-
onChange: e,
|
|
44
|
-
renderThumb: ({ key: s, style: c, ...d }) => /* @__PURE__ */ g(x, { ...d, style: c, children: [
|
|
45
|
-
/* @__PURE__ */ o(v, {}),
|
|
46
|
-
/* @__PURE__ */ o(f, {})
|
|
47
|
-
] }, s)
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
};
|
|
51
|
-
u.displayName = "Widgets.LightCurve.MagnitudeSlider";
|
|
52
|
-
const L = u;
|
|
53
|
-
export {
|
|
54
|
-
L as default
|
|
55
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),i=({x:n,y:s,error:t,onMouseOver:l,onMouseOut:a,description:o})=>e.jsxs("g",{role:"listitem","aria-label":o,transform:`translate(${n},${s})`,onMouseOver:l,onMouseOut:a,children:[e.jsx("line",{x:0,y1:t,y2:-t,stroke:"var(--black, #000)",strokeWidth:1,fill:"none"}),e.jsx("line",{x1:-3,x2:3,y1:t,y2:t,stroke:"var(--black, #000)",strokeWidth:1,fill:"none"}),e.jsx("line",{x1:-3,x2:3,y1:-t,y2:-t,stroke:"var(--black, #000)",strokeWidth:1,fill:"none"}),e.jsx("circle",{fill:"var(--turquoise85, #12726D)",r:6,cursor:"pointer"})]});i.displayName="Widgets.LightCurve.Point";const r=i;exports.default=r;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent } from "react";
|
|
2
|
-
interface LightCurvePointProps {
|
|
3
|
-
x: number;
|
|
4
|
-
y: number;
|
|
5
|
-
error: number;
|
|
6
|
-
onMouseOver: () => void;
|
|
7
|
-
onMouseOut: () => void;
|
|
8
|
-
description?: string;
|
|
9
|
-
}
|
|
10
|
-
declare const LightCurvePoint: FunctionComponent<LightCurvePointProps>;
|
|
11
|
-
export default LightCurvePoint;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { jsxs as r, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
const n = ({
|
|
3
|
-
x: e,
|
|
4
|
-
y: a,
|
|
5
|
-
error: t,
|
|
6
|
-
onMouseOver: s,
|
|
7
|
-
onMouseOut: l,
|
|
8
|
-
description: o
|
|
9
|
-
}) => /* @__PURE__ */ r(
|
|
10
|
-
"g",
|
|
11
|
-
{
|
|
12
|
-
role: "listitem",
|
|
13
|
-
"aria-label": o,
|
|
14
|
-
transform: `translate(${e},${a})`,
|
|
15
|
-
onMouseOver: s,
|
|
16
|
-
onMouseOut: l,
|
|
17
|
-
children: [
|
|
18
|
-
/* @__PURE__ */ i(
|
|
19
|
-
"line",
|
|
20
|
-
{
|
|
21
|
-
x: 0,
|
|
22
|
-
y1: t,
|
|
23
|
-
y2: -t,
|
|
24
|
-
stroke: "var(--black, #000)",
|
|
25
|
-
strokeWidth: 1,
|
|
26
|
-
fill: "none"
|
|
27
|
-
}
|
|
28
|
-
),
|
|
29
|
-
/* @__PURE__ */ i(
|
|
30
|
-
"line",
|
|
31
|
-
{
|
|
32
|
-
x1: -3,
|
|
33
|
-
x2: 3,
|
|
34
|
-
y1: t,
|
|
35
|
-
y2: t,
|
|
36
|
-
stroke: "var(--black, #000)",
|
|
37
|
-
strokeWidth: 1,
|
|
38
|
-
fill: "none"
|
|
39
|
-
}
|
|
40
|
-
),
|
|
41
|
-
/* @__PURE__ */ i(
|
|
42
|
-
"line",
|
|
43
|
-
{
|
|
44
|
-
x1: -3,
|
|
45
|
-
x2: 3,
|
|
46
|
-
y1: -t,
|
|
47
|
-
y2: -t,
|
|
48
|
-
stroke: "var(--black, #000)",
|
|
49
|
-
strokeWidth: 1,
|
|
50
|
-
fill: "none"
|
|
51
|
-
}
|
|
52
|
-
),
|
|
53
|
-
/* @__PURE__ */ i(
|
|
54
|
-
"circle",
|
|
55
|
-
{
|
|
56
|
-
fill: "var(--turquoise85, #12726D)",
|
|
57
|
-
r: 6,
|
|
58
|
-
cursor: "pointer"
|
|
59
|
-
}
|
|
60
|
-
)
|
|
61
|
-
]
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
n.displayName = "Widgets.LightCurve.Point";
|
|
65
|
-
const u = n;
|
|
66
|
-
export {
|
|
67
|
-
u as default
|
|
68
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),w=require("react"),G=require("react-i18next"),k=require("d3-array"),F=require("../../../charts/hooks/useAxis.cjs"),J=require("../../../charts/XAxis/index.cjs"),K=require("../../../charts/YAxis/index.cjs"),Q=require("../../../charts/Tooltip/index.cjs"),V=require("../../../charts/ClippingContainer/index.cjs"),X=require("../../../charts/Viewport/index.cjs"),i=require("../defaults.cjs"),Y=require("../Point/index.cjs"),y=require("./styles.cjs"),Z=(o,b,g)=>{const h={};return Object.keys(o).forEach(n=>{const a=n==="top"||n==="bottom"?g:b,c=`${n.charAt(0).toUpperCase()}${n.slice(1)}`;h[`padding${c}`]=`${o[n]/a*100}%`}),h},O=({data:o,activeAlertId:b,xMin:g,xMax:h,yMin:m=i.default.yMin,yMax:n=i.default.yMax,width:a=i.default.width,height:c=i.default.height,name:P,children:R,slider:q,className:W})=>{const{t:d,i18n:{language:C}}=G.useTranslation(),[S,L]=w.useState(),D=d("light_curve.plot.x_label"),_="xAxisLabel",T=d("light_curve.plot.y_label"),M="yAxisLabel",s=typeof S<"u"?o[S]:o.find(({id:r})=>r===b),x={top:10,right:10,bottom:25,left:40},f=[0+x.left,a-x.right],[A,z,l]=F.default({min:g||k.min(o,({x:r})=>r)||i.default.xMin,max:h||k.max(o,({x:r})=>r)||i.default.xMax,step:i.default.xStep,range:f}),v=l(A[0]),p=[c-x.bottom,0+x.top],[u,H,t]=F.default({min:m,max:n,step:m<n?Math.abs(i.default.yStep):i.default.yStep,range:p}),$=t(u[0]);return e.jsxs(y.PlotContainer,{className:W,children:[e.jsxs(y.Chart,{width:a,height:c,horizontalLabel:D,horizontalLabelId:_,verticalLabel:T,verticalLabelId:M,title:P,children:[e.jsxs(V.default,{x:v,y:t(u[1]),width:f[1]-f[0],height:p[0]-p[1],children:[e.jsx("rect",{x:l(0),y:t(u[1]),width:l(15)-l(0),height:$-t(u[1]),fill:"#F5F5F5"}),e.jsx("g",{role:"list","aria-label":d("light_curve.plot.plot_label")||void 0,children:o.map(({x:r,y:I,error:B,id:N},E)=>{const j=Math.round(r),U=j>0?"after":j===0?"peak":"before";return e.jsx(Y.default,{x:l(r),y:t(I),error:t(B)-t(0),onMouseOver:()=>L(E),onMouseOut:()=>L(void 0),description:d("light_curve.plot.point_label",{magnitude:I,count:Math.abs(j),context:U})||void 0},N)})})]}),e.jsx(J.default,{ticks:z,y:$,labelledById:_,xDomain:A,xScale:l}),e.jsx(K.default,{ticks:H,x:v,labelledById:M,yDomain:u,yScale:t}),e.jsx(X.default,{x:v,y:t(u[0]),outerWidth:f[1]-f[0],outerHeight:p[1]-p[0],innerWidth:a,innerHeight:c,children:R}),e.jsx(Q.default,{x:s?l(s.x):void 0,y:s?t(s.y):void 0,visible:!!s,offset:6,children:d("light_curve.plot.tooltip",{magnitude:s==null?void 0:s.y.toLocaleString(C,{minimumFractionDigits:2,maximumFractionDigits:2})})})]}),q&&e.jsx(y.SliderOuterWrapper,{children:e.jsx(y.SliderInnerWrapper,{style:{...Z(x,a,c)},children:q})})]})};O.displayName="Widgets.LightCurve.ScatterPlot";const ee=O;exports.default=ee;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, PropsWithChildren, ReactNode } from "react";
|
|
2
|
-
import { Bounds } from '../../../charts/types';
|
|
3
|
-
import { formatMagnitudePoints } from "../helpers";
|
|
4
|
-
export interface ScatterPlotProps extends Partial<Bounds> {
|
|
5
|
-
data: ReturnType<typeof formatMagnitudePoints>;
|
|
6
|
-
name?: string;
|
|
7
|
-
activeAlertId?: number;
|
|
8
|
-
className?: string;
|
|
9
|
-
slider?: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
declare const ScatterPlot: FunctionComponent<PropsWithChildren<ScatterPlotProps>>;
|
|
12
|
-
export default ScatterPlot;
|