@rubin-epo/epo-widget-lib 0.9.7 → 0.9.8
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/localeStrings/en/epo-widget-lib.json +2 -2
- package/dist/widgets/LightCurvePlot/LightCurve/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/LightCurve/index.js +1 -1
- package/dist/widgets/LightCurvePlot/MagnitudeSlider/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/MagnitudeSlider/index.js +31 -33
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.js +1 -1
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.js +36 -34
- package/package.json +1 -1
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
},
|
|
108
108
|
"curve": {
|
|
109
109
|
"controls": {
|
|
110
|
-
"gaussian_width": "
|
|
111
|
-
"y_offset": "
|
|
110
|
+
"gaussian_width": "Curve Width",
|
|
111
|
+
"y_offset": "Vertical (y) Offset"
|
|
112
112
|
},
|
|
113
113
|
"description_above": "Mean distance from observations is {{residual}}, your peak is above the brightest measurement of {{brightest}}",
|
|
114
114
|
"description_below": "Mean distance from observations is {{residual}}, your peak is below the brightest measurement of {{brightest}}"
|
|
@@ -1 +1 @@
|
|
|
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[
|
|
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[1]-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 +1 @@
|
|
|
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"),
|
|
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"),s=require("./styles.cjs"),v=(t,i,a)=>{const n=Number(Math.abs(i-t).toFixed(1)),u=n.toLocaleString(a,{minimumFractionDigits:1,maximumFractionDigits:1});let e;return n<=.05?(e="equal",{distance:n,context:e}):(t<i?e="above":e="below",{distance:u,context:e})},c=({magnitude:t,yMin:i,yMax:a,onMagnitudeChangeCallback:n,estimatedPeak:u,disabled:e})=>{const{t:o,i18n:{language:l}}=h.useTranslation(),m=Math.min(i,a),d=Math.max(i,a);return r.jsx(s.Slider,{ariaLabel:o("light_curve.magnitude_slider.label")||void 0,orientation:"vertical",value:t,step:.1,ariaValuetext:()=>o("light_curve.magnitude_slider.value",{...v(u,t,l),magnitude:t.toLocaleString(l,{minimumFractionDigits:1,maximumFractionDigits:1})}),onChange:n,renderThumb:({key:g,style:x,...b})=>r.jsxs(s.ThumbContainer,{...b,style:x,children:[r.jsx(s.ThumbBar,{}),r.jsx(s.ThumbHandle,{})]},g),min:m,max:d,disabled:e})};c.displayName="Widgets.LightCurve.MagnitudeSlider";const S=c;exports.default=S;
|
|
@@ -1,55 +1,53 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as o, jsxs as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { Slider as
|
|
5
|
-
const
|
|
6
|
-
const
|
|
2
|
+
import { jsx as o, jsxs as b } from "react/jsx-runtime";
|
|
3
|
+
import { useTranslation as x } from "react-i18next";
|
|
4
|
+
import { Slider as v, ThumbContainer as f, ThumbBar as p, ThumbHandle as S } from "./styles.js";
|
|
5
|
+
const D = (i, e, a) => {
|
|
6
|
+
const n = Number(Math.abs(e - i).toFixed(1)), r = n.toLocaleString(a, {
|
|
7
7
|
minimumFractionDigits: 1,
|
|
8
8
|
maximumFractionDigits: 1
|
|
9
9
|
});
|
|
10
|
-
let
|
|
11
|
-
return
|
|
12
|
-
},
|
|
13
|
-
magnitude:
|
|
14
|
-
yMin:
|
|
10
|
+
let t;
|
|
11
|
+
return n <= 0.05 ? (t = "equal", { distance: n, context: t }) : (i < e ? t = "above" : t = "below", { distance: r, context: t });
|
|
12
|
+
}, s = ({
|
|
13
|
+
magnitude: i,
|
|
14
|
+
yMin: e,
|
|
15
15
|
yMax: a,
|
|
16
|
-
onMagnitudeChangeCallback:
|
|
16
|
+
onMagnitudeChangeCallback: n,
|
|
17
17
|
estimatedPeak: r,
|
|
18
|
-
disabled:
|
|
19
|
-
width: S,
|
|
20
|
-
height: D
|
|
18
|
+
disabled: t
|
|
21
19
|
}) => {
|
|
22
20
|
const {
|
|
23
|
-
t:
|
|
24
|
-
i18n: { language:
|
|
25
|
-
} =
|
|
21
|
+
t: m,
|
|
22
|
+
i18n: { language: l }
|
|
23
|
+
} = x(), u = Math.min(e, a), c = Math.max(e, a);
|
|
26
24
|
return /* @__PURE__ */ o(
|
|
27
|
-
|
|
25
|
+
v,
|
|
28
26
|
{
|
|
29
|
-
ariaLabel:
|
|
27
|
+
ariaLabel: m("light_curve.magnitude_slider.label") || void 0,
|
|
30
28
|
orientation: "vertical",
|
|
31
|
-
value:
|
|
32
|
-
min: n,
|
|
33
|
-
max: a,
|
|
29
|
+
value: i,
|
|
34
30
|
step: 0.1,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
magnitude: t.toLocaleString(m, {
|
|
31
|
+
ariaValuetext: () => m("light_curve.magnitude_slider.value", {
|
|
32
|
+
...D(r, i, l),
|
|
33
|
+
magnitude: i.toLocaleString(l, {
|
|
39
34
|
minimumFractionDigits: 1,
|
|
40
35
|
maximumFractionDigits: 1
|
|
41
36
|
})
|
|
42
37
|
}),
|
|
43
|
-
onChange:
|
|
44
|
-
renderThumb: ({ key:
|
|
45
|
-
/* @__PURE__ */ o(
|
|
46
|
-
/* @__PURE__ */ o(
|
|
47
|
-
] },
|
|
38
|
+
onChange: n,
|
|
39
|
+
renderThumb: ({ key: d, style: g, ...h }) => /* @__PURE__ */ b(f, { ...h, style: g, children: [
|
|
40
|
+
/* @__PURE__ */ o(p, {}),
|
|
41
|
+
/* @__PURE__ */ o(S, {})
|
|
42
|
+
] }, d),
|
|
43
|
+
min: u,
|
|
44
|
+
max: c,
|
|
45
|
+
disabled: t
|
|
48
46
|
}
|
|
49
47
|
);
|
|
50
48
|
};
|
|
51
|
-
|
|
52
|
-
const L =
|
|
49
|
+
s.displayName = "Widgets.LightCurve.MagnitudeSlider";
|
|
50
|
+
const L = s;
|
|
53
51
|
export {
|
|
54
52
|
L as default
|
|
55
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),F=require("react-i18next"),g=require("d3-array"),H=require("@rubin-epo/epo-react-lib/HorizontalSlider"),_=require("../../../charts/hooks/useAxis.cjs"),t=require("../defaults.cjs"),B=require("../ScatterPlot/index.cjs"),N=require("../LightCurve/index.cjs"),w=require("../A11Y/LightCurveLabel/index.cjs"),S=require("../helpers.cjs"),E=require("../../../atomic/Button/patterns/Reset.cjs"),J=require("../MagnitudeSlider/index.cjs"),i=require("./styles.cjs"),K=l=>l&&l.__esModule?l:{default:l},y=K(H),L=({gaussianWidth:l=t.default.gaussianWidth,yOffset:a=t.default.yOffset,alerts:I,peakMjd:D,yMin:r=t.default.yMin,yMax:d=t.default.yMax,width:f=t.default.width,height:x=t.default.height,userMagnitude:P=(d-r)/2+r,onUserMagnitudeChangeCallback:o,onGaussianChangeCallback:n,onYOffsetChangeCallback:c,className:M,isDisplayOnly:m,...R})=>{const{t:j}=F.useTranslation(),p="lightCurveControls",q="gaussianWidthLabel",h="yOffsetLabel",u=S.formatMagnitudePoints(I,D),T=g.min(u,({x:s})=>s)||Math.min(...u.map(({x:s})=>s)),W=g.max(u,({x:s})=>s)||Math.max(...u.map(({x:s})=>s)),$=()=>{o&&o((d-r)/2+r),c&&c(t.default.yOffset),n&&n(t.default.gaussianWidth)},[O,V,z]=_.default({min:T,max:W,step:t.default.xStep,range:[0,f]}),[A,X,v]=_.default({min:r,max:d,step:t.default.yStep,range:[0
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),F=require("react-i18next"),g=require("d3-array"),H=require("@rubin-epo/epo-react-lib/HorizontalSlider"),_=require("../../../charts/hooks/useAxis.cjs"),t=require("../defaults.cjs"),B=require("../ScatterPlot/index.cjs"),N=require("../LightCurve/index.cjs"),w=require("../A11Y/LightCurveLabel/index.cjs"),S=require("../helpers.cjs"),E=require("../../../atomic/Button/patterns/Reset.cjs"),J=require("../MagnitudeSlider/index.cjs"),i=require("./styles.cjs"),K=l=>l&&l.__esModule?l:{default:l},y=K(H),L=({gaussianWidth:l=t.default.gaussianWidth,yOffset:a=t.default.yOffset,alerts:I,peakMjd:D,yMin:r=t.default.yMin,yMax:d=t.default.yMax,width:f=t.default.width,height:x=t.default.height,userMagnitude:P=(d-r)/2+r,onUserMagnitudeChangeCallback:o,onGaussianChangeCallback:n,onYOffsetChangeCallback:c,className:M,isDisplayOnly:m,...R})=>{const{t:j}=F.useTranslation(),p="lightCurveControls",q="gaussianWidthLabel",h="yOffsetLabel",u=S.formatMagnitudePoints(I,D),T=g.min(u,({x:s})=>s)||Math.min(...u.map(({x:s})=>s)),W=g.max(u,({x:s})=>s)||Math.max(...u.map(({x:s})=>s)),$=()=>{o&&o((d-r)/2+r),c&&c(t.default.yOffset),n&&n(t.default.gaussianWidth)},[O,V,z]=_.default({min:T,max:W,step:t.default.xStep,range:[0,f]}),[A,X,v]=_.default({min:r,max:d,step:t.default.yStep,range:[x,0]}),b=S.estimateMagnitudeWithOffset(0,l,a);return e.jsxs(i.Container,{className:M,children:[e.jsx(B.default,{slider:e.jsx(J.default,{magnitude:P,onMagnitudeChangeCallback:s=>o&&o(s),disabled:m,yMin:r,yMax:d,yScale:v,estimatedPeak:b,width:f,height:x}),...R,data:u,width:f,height:x,yMin:r,yMax:d,children:u.length>0?e.jsxs(e.Fragment,{children:[e.jsx(N.default,{gaussianWidth:l,yOffset:a,xDomain:O,xScale:z,yScale:v,yDomain:A}),e.jsx(i.DM15Display,{gaussianWidth:l})]}):null}),!m&&e.jsxs(i.Controls,{id:p,children:[e.jsxs("div",{children:[e.jsx(i.ControlLabel,{id:q,children:j("light_curve.curve.controls.gaussian_width")}),e.jsx(y.default,{label:"Gaussian Width",labelledbyId:q,color:"var(--turquoise85, #12726D)",min:t.default.gaussianMin,max:t.default.gaussianMax,step:t.default.gaussianStep,value:l,onChangeCallback:s=>typeof s=="number"&&n&&n(s)})]}),e.jsxs("div",{children:[e.jsx(i.ControlLabel,{id:h,children:j("light_curve.curve.controls.y_offset")}),e.jsx(y.default,{label:"Y Offset",labelledbyId:h,color:"var(--turquoise85, #12726D)",min:t.default.yOffsetMin,max:t.default.yOffsetMax,step:t.default.yOffsetStep,value:a,onChangeCallback:s=>typeof s=="number"&&c&&c(s)})]}),e.jsx(E.default,{onResetCallback:$})]}),e.jsx(w.default,{controlledById:p,data:u,gaussianWidth:l,yOffset:a,estimatedPeak:b})]})};L.displayName="Widgets.LightCurve";const Q=L;exports.default=Q;
|
|
@@ -1 +1 @@
|
|
|
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"),
|
|
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"),D=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"),r=require("../defaults.cjs"),Y=require("../Point/index.cjs"),y=require("./styles.cjs"),Z=(i,b,g)=>{const p={};return Object.keys(i).forEach(o=>{const a=o==="top"||o==="bottom"?g:b,c=`${o.charAt(0).toUpperCase()}${o.slice(1)}`;p[`padding${c}`]=`${i[o]/a*100}%`}),p},C=({data:i,activeAlertId:b,xMin:g,xMax:p,yMin:m=r.default.yMin,yMax:o=r.default.yMax,width:a=r.default.width,height:c=r.default.height,name:E,children:O,slider:q,className:P})=>{const{t:d,i18n:{language:R}}=G.useTranslation(),[S,L]=w.useState(),W=d("light_curve.plot.x_label"),_="xAxisLabel",T=d("light_curve.plot.y_label"),A="yAxisLabel",s=typeof S<"u"?i[S]:i.find(({id:n})=>n===b),x={top:10,right:10,bottom:25,left:40},f=[0+x.left,a-x.right],[M,z,l]=D.default({min:g||k.min(i,({x:n})=>n)||r.default.xMin,max:p||k.max(i,({x:n})=>n)||r.default.xMax,step:r.default.xStep,range:f}),v=l(M[0]),h=[c-x.bottom,0+x.top],[u,H,t]=D.default({min:m,max:o,step:m<o?Math.abs(r.default.yStep):r.default.yStep,range:h}),$=t(u[0]);return e.jsxs(y.PlotContainer,{className:P,children:[e.jsxs(y.Chart,{width:a,height:c,horizontalLabel:W,horizontalLabelId:_,verticalLabel:T,verticalLabelId:A,title:E,children:[e.jsxs(V.default,{x:v,y:t(u[1]),width:f[1]-f[0],height:h[0]-h[1],children:[e.jsx("rect",{x:l(0),y:t(u[1]),width:l(15)-l(0),height:$-t(u[1]),stroke:"var(--neutral60,##6A6E6E)",strokeDasharray:6,fill:"var(--neutral20,#DCE0E3)"}),e.jsx("g",{role:"list","aria-label":d("light_curve.plot.plot_label")||void 0,children:i.map(({x:n,y:I,error:B,id:F},N)=>{const j=Math.round(n),U=j>0?"after":j===0?"peak":"before";return e.jsx(Y.default,{x:l(n),y:t(I),error:t(B)-t(0),onMouseOver:()=>L(N),onMouseOut:()=>L(void 0),description:d("light_curve.plot.point_label",{magnitude:I,count:Math.abs(j),context:U})||void 0},F)})})]}),e.jsx(J.default,{ticks:z,y:$,labelledById:_,xDomain:M,xScale:l}),e.jsx(K.default,{ticks:H,x:v,labelledById:A,yDomain:u,yScale:t}),e.jsx(X.default,{x:v,y:t(u[1]),outerWidth:f[1]-f[0],outerHeight:h[0]-h[1],innerWidth:a,innerHeight:c,children:O}),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(R,{minimumFractionDigits:2,maximumFractionDigits:2})})})]}),q&&e.jsx(y.SliderOuterWrapper,{children:e.jsx(y.SliderInnerWrapper,{style:{...Z(x,a,c)},children:q})})]})};C.displayName="Widgets.LightCurve.ScatterPlot";const ee=C;exports.default=ee;
|
|
@@ -3,7 +3,7 @@ import { jsxs as L, jsx as o } from "react/jsx-runtime";
|
|
|
3
3
|
import { useState as U } from "react";
|
|
4
4
|
import { useTranslation as V } from "react-i18next";
|
|
5
5
|
import { min as X, max as Y } from "d3-array";
|
|
6
|
-
import
|
|
6
|
+
import E from "../../../charts/hooks/useAxis.js";
|
|
7
7
|
import q from "../../../charts/XAxis/index.js";
|
|
8
8
|
import G from "../../../charts/YAxis/index.js";
|
|
9
9
|
import J from "../../../charts/Tooltip/index.js";
|
|
@@ -18,39 +18,39 @@ const rt = (i, f, g) => {
|
|
|
18
18
|
const a = r === "top" || r === "bottom" ? g : f, c = `${r.charAt(0).toUpperCase()}${r.slice(1)}`;
|
|
19
19
|
h[`padding${c}`] = `${i[r] / a * 100}%`;
|
|
20
20
|
}), h;
|
|
21
|
-
},
|
|
21
|
+
}, P = ({
|
|
22
22
|
data: i,
|
|
23
23
|
activeAlertId: f,
|
|
24
24
|
xMin: g,
|
|
25
25
|
xMax: h,
|
|
26
|
-
yMin:
|
|
26
|
+
yMin: y = e.yMin,
|
|
27
27
|
yMax: r = e.yMax,
|
|
28
28
|
width: a = e.width,
|
|
29
29
|
height: c = e.height,
|
|
30
|
-
name:
|
|
30
|
+
name: W,
|
|
31
31
|
children: O,
|
|
32
|
-
slider:
|
|
32
|
+
slider: A,
|
|
33
33
|
className: R
|
|
34
34
|
}) => {
|
|
35
35
|
const {
|
|
36
36
|
t: p,
|
|
37
37
|
i18n: { language: T }
|
|
38
|
-
} = V(), [
|
|
38
|
+
} = V(), [S, _] = U(), $ = p("light_curve.plot.x_label"), M = "xAxisLabel", j = p("light_curve.plot.y_label"), k = "yAxisLabel", n = typeof S < "u" ? i[S] : i.find(({ id: l }) => l === f), d = {
|
|
39
39
|
top: 10,
|
|
40
40
|
right: 10,
|
|
41
41
|
bottom: 25,
|
|
42
42
|
left: 40
|
|
43
|
-
}, x = [0 + d.left, a - d.right], [C, z, s] =
|
|
43
|
+
}, x = [0 + d.left, a - d.right], [C, z, s] = E({
|
|
44
44
|
min: g || X(i, ({ x: l }) => l) || e.xMin,
|
|
45
45
|
max: h || Y(i, ({ x: l }) => l) || e.xMax,
|
|
46
46
|
step: e.xStep,
|
|
47
47
|
range: x
|
|
48
|
-
}),
|
|
49
|
-
min:
|
|
48
|
+
}), b = s(C[0]), u = [c - d.bottom, 0 + d.top], [m, H, t] = E({
|
|
49
|
+
min: y,
|
|
50
50
|
max: r,
|
|
51
|
-
step:
|
|
51
|
+
step: y < r ? Math.abs(e.yStep) : e.yStep,
|
|
52
52
|
range: u
|
|
53
|
-
}),
|
|
53
|
+
}), I = t(m[0]);
|
|
54
54
|
return /* @__PURE__ */ L(tt, { className: R, children: [
|
|
55
55
|
/* @__PURE__ */ L(
|
|
56
56
|
ot,
|
|
@@ -60,13 +60,13 @@ const rt = (i, f, g) => {
|
|
|
60
60
|
horizontalLabel: $,
|
|
61
61
|
horizontalLabelId: M,
|
|
62
62
|
verticalLabel: j,
|
|
63
|
-
verticalLabelId:
|
|
64
|
-
title:
|
|
63
|
+
verticalLabelId: k,
|
|
64
|
+
title: W,
|
|
65
65
|
children: [
|
|
66
66
|
/* @__PURE__ */ L(
|
|
67
67
|
K,
|
|
68
68
|
{
|
|
69
|
-
x:
|
|
69
|
+
x: b,
|
|
70
70
|
y: t(m[1]),
|
|
71
71
|
width: x[1] - x[0],
|
|
72
72
|
height: u[0] - u[1],
|
|
@@ -77,8 +77,10 @@ const rt = (i, f, g) => {
|
|
|
77
77
|
x: s(0),
|
|
78
78
|
y: t(m[1]),
|
|
79
79
|
width: s(15) - s(0),
|
|
80
|
-
height:
|
|
81
|
-
|
|
80
|
+
height: I - t(m[1]),
|
|
81
|
+
stroke: "var(--neutral60,##6A6E6E)",
|
|
82
|
+
strokeDasharray: 6,
|
|
83
|
+
fill: "var(--neutral20,#DCE0E3)"
|
|
82
84
|
}
|
|
83
85
|
),
|
|
84
86
|
/* @__PURE__ */ o(
|
|
@@ -86,23 +88,23 @@ const rt = (i, f, g) => {
|
|
|
86
88
|
{
|
|
87
89
|
role: "list",
|
|
88
90
|
"aria-label": p("light_curve.plot.plot_label") || void 0,
|
|
89
|
-
children: i.map(({ x: l, y:
|
|
90
|
-
const v = Math.round(l),
|
|
91
|
+
children: i.map(({ x: l, y: D, error: B, id: F }, N) => {
|
|
92
|
+
const v = Math.round(l), w = v > 0 ? "after" : v === 0 ? "peak" : "before";
|
|
91
93
|
return /* @__PURE__ */ o(
|
|
92
94
|
Z,
|
|
93
95
|
{
|
|
94
96
|
x: s(l),
|
|
95
|
-
y: t(
|
|
97
|
+
y: t(D),
|
|
96
98
|
error: t(B) - t(0),
|
|
97
|
-
onMouseOver: () => _(
|
|
99
|
+
onMouseOver: () => _(N),
|
|
98
100
|
onMouseOut: () => _(void 0),
|
|
99
101
|
description: p("light_curve.plot.point_label", {
|
|
100
|
-
magnitude:
|
|
102
|
+
magnitude: D,
|
|
101
103
|
count: Math.abs(v),
|
|
102
|
-
context:
|
|
104
|
+
context: w
|
|
103
105
|
}) || void 0
|
|
104
106
|
},
|
|
105
|
-
|
|
107
|
+
F
|
|
106
108
|
);
|
|
107
109
|
})
|
|
108
110
|
}
|
|
@@ -114,7 +116,7 @@ const rt = (i, f, g) => {
|
|
|
114
116
|
q,
|
|
115
117
|
{
|
|
116
118
|
ticks: z,
|
|
117
|
-
y:
|
|
119
|
+
y: I,
|
|
118
120
|
labelledById: M,
|
|
119
121
|
xDomain: C,
|
|
120
122
|
xScale: s
|
|
@@ -124,8 +126,8 @@ const rt = (i, f, g) => {
|
|
|
124
126
|
G,
|
|
125
127
|
{
|
|
126
128
|
ticks: H,
|
|
127
|
-
x:
|
|
128
|
-
labelledById:
|
|
129
|
+
x: b,
|
|
130
|
+
labelledById: k,
|
|
129
131
|
yDomain: m,
|
|
130
132
|
yScale: t
|
|
131
133
|
}
|
|
@@ -133,10 +135,10 @@ const rt = (i, f, g) => {
|
|
|
133
135
|
/* @__PURE__ */ o(
|
|
134
136
|
Q,
|
|
135
137
|
{
|
|
136
|
-
x:
|
|
137
|
-
y: t(m[
|
|
138
|
+
x: b,
|
|
139
|
+
y: t(m[1]),
|
|
138
140
|
outerWidth: x[1] - x[0],
|
|
139
|
-
outerHeight: u[
|
|
141
|
+
outerHeight: u[0] - u[1],
|
|
140
142
|
innerWidth: a,
|
|
141
143
|
innerHeight: c,
|
|
142
144
|
children: O
|
|
@@ -160,17 +162,17 @@ const rt = (i, f, g) => {
|
|
|
160
162
|
]
|
|
161
163
|
}
|
|
162
164
|
),
|
|
163
|
-
|
|
165
|
+
A && /* @__PURE__ */ o(et, { children: /* @__PURE__ */ o(
|
|
164
166
|
it,
|
|
165
167
|
{
|
|
166
168
|
style: { ...rt(d, a, c) },
|
|
167
|
-
children:
|
|
169
|
+
children: A
|
|
168
170
|
}
|
|
169
171
|
) })
|
|
170
172
|
] });
|
|
171
173
|
};
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
+
P.displayName = "Widgets.LightCurve.ScatterPlot";
|
|
175
|
+
const yt = P;
|
|
174
176
|
export {
|
|
175
|
-
|
|
177
|
+
yt as default
|
|
176
178
|
};
|
package/package.json
CHANGED