@rubin-epo/epo-widget-lib 0.8.1 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/SourceSelector.cjs +1 -1
- package/dist/SourceSelector.d.ts +2 -0
- package/dist/SourceSelector.js +8 -8
- package/dist/SupernovaThreeVector.js +4 -4
- 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.d.ts +3 -5
- package/dist/charts/Base/index.js +40 -24
- package/dist/charts/Base/styles.cjs +18 -7
- package/dist/charts/Base/styles.d.ts +272 -0
- package/dist/charts/Base/styles.js +18 -6
- 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 +20 -22
- package/dist/charts/Tooltip/styles.cjs +5 -3
- package/dist/charts/Tooltip/styles.d.ts +7 -0
- package/dist/charts/Tooltip/styles.js +9 -5
- 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.d.ts +2 -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 +30 -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 +33 -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 +11 -0
- package/dist/widgets/LightCurvePlot/MagnitudeSlider/index.js +54 -0
- package/dist/widgets/LightCurvePlot/MagnitudeSlider/styles.cjs +42 -0
- package/dist/widgets/LightCurvePlot/MagnitudeSlider/styles.js +51 -0
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.d.ts +13 -0
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.js +134 -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 +9 -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 +11 -0
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.js +158 -0
- package/dist/widgets/LightCurvePlot/ScatterPlot/styles.cjs +30 -0
- package/dist/widgets/LightCurvePlot/ScatterPlot/styles.d.ts +288 -0
- package/dist/widgets/LightCurvePlot/ScatterPlot/styles.js +38 -0
- package/dist/widgets/LightCurvePlot/defaults.cjs +1 -0
- package/dist/widgets/LightCurvePlot/defaults.d.ts +19 -0
- package/dist/widgets/LightCurvePlot/defaults.js +21 -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/SourceSelector/SourceSelector.cjs +1 -1
- package/dist/widgets/SourceSelector/SourceSelector.d.ts +2 -2
- package/dist/widgets/SourceSelector/SourceSelector.js +28 -28
- package/dist/widgets/SourceSelector/index.d.ts +2 -1
- package/dist/widgets/SupernovaThreeVector/Histogram/index.cjs +1 -1
- package/dist/widgets/SupernovaThreeVector/Histogram/index.js +35 -35
- package/dist/widgets/SupernovaThreeVector/LiveLabel/index.cjs +1 -1
- package/dist/widgets/SupernovaThreeVector/LiveLabel/index.js +15 -15
- 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'
|
package/dist/SourceSelector.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./widgets/SourceSelector/
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./widgets/SourceSelector/SourceSelector.cjs"),t=require("./widgets/SourceSelector/PointSelector/index.cjs"),r=require("./widgets/SourceSelector/SelectionList/index.cjs"),u=require("./widgets/SourceSelector/Message/Message.cjs");exports.default=e.default;exports.PointSelector=t.default;exports.SelectionList=r.default;exports.Message=u.default;
|
package/dist/SourceSelector.d.ts
CHANGED
package/dist/SourceSelector.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { default as a } from "./widgets/SourceSelector/
|
|
3
|
-
import { default as l } from "./widgets/SourceSelector/
|
|
4
|
-
import { default as
|
|
1
|
+
import o from "./widgets/SourceSelector/SourceSelector.js";
|
|
2
|
+
import { default as a } from "./widgets/SourceSelector/PointSelector/index.js";
|
|
3
|
+
import { default as l } from "./widgets/SourceSelector/SelectionList/index.js";
|
|
4
|
+
import { default as m } from "./widgets/SourceSelector/Message/Message.js";
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
m as Message,
|
|
7
|
+
a as PointSelector,
|
|
8
|
+
l as SelectionList,
|
|
9
|
+
o as default
|
|
10
10
|
};
|
|
@@ -4,7 +4,7 @@ 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 {
|
|
7
|
+
import { getLinearScale as L, between as T } from "./lib/utils.js";
|
|
8
8
|
import W from "./widgets/SupernovaThreeVector/LiveLabel/index.js";
|
|
9
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
10
|
const Z = ({
|
|
@@ -18,10 +18,10 @@ 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 =
|
|
22
|
-
({ bin: e }) =>
|
|
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
23
|
), k = _.filter(
|
|
24
|
-
({ distance: e }) =>
|
|
24
|
+
({ distance: e }) => T(e, n[0], n[1] + s)
|
|
25
25
|
), w = t.reduce((e, { value: O }, q) => S[q] ? e + O : e, 0);
|
|
26
26
|
return /* @__PURE__ */ l(F, { children: [
|
|
27
27
|
/* @__PURE__ */ l(G, { children: [
|
|
@@ -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"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("./styles.cjs"),u=({width:r=900,height:i=300,xMin:c=0,yMin:l=0,verticalLabel:t,verticalLabelId:a,horizontalLabel:n,horizontalLabelId:d,title:o,children:x,className:j})=>e.jsxs(s.ChartContainer,{children:[o&&e.jsx(s.Title,{children:o}),t&&e.jsx(s.VerticalLabel,{id:a,"aria-hidden":!!a,children:t}),e.jsx(s.SVG,{preserveAspectRatio:"xMidYMid meet",viewBox:`${c} ${l} ${r} ${i}`,className:j,style:{"--aspect-ratio":`${r} / ${i}`,"--min-width":`${r}px`},role:"group",children:x}),n&&e.jsx(s.HorizontalLabel,{id:d,"aria-hidden":!!d,children:n})]});u.displayName="Charts.Base";const p=u;exports.default=p;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { FunctionComponent, PropsWithChildren } from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
height?: number;
|
|
5
|
-
minX?: number;
|
|
6
|
-
minY?: number;
|
|
2
|
+
import { Bounds } from "../types";
|
|
3
|
+
export interface BaseChartProps extends Partial<Bounds> {
|
|
7
4
|
className?: string;
|
|
5
|
+
title?: string;
|
|
8
6
|
verticalLabel?: string;
|
|
9
7
|
verticalLabelId?: string;
|
|
10
8
|
horizontalLabel?: string;
|
|
@@ -1,36 +1,52 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ChartContainer as
|
|
3
|
-
const
|
|
4
|
-
width:
|
|
5
|
-
height:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
verticalLabel:
|
|
9
|
-
verticalLabelId:
|
|
10
|
-
horizontalLabel:
|
|
1
|
+
import { jsxs as x, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { ChartContainer as h, Title as l, VerticalLabel as B, SVG as C, HorizontalLabel as f } from "./styles.js";
|
|
3
|
+
const o = ({
|
|
4
|
+
width: r = 900,
|
|
5
|
+
height: i = 300,
|
|
6
|
+
xMin: p = 0,
|
|
7
|
+
yMin: c = 0,
|
|
8
|
+
verticalLabel: s,
|
|
9
|
+
verticalLabelId: a,
|
|
10
|
+
horizontalLabel: t,
|
|
11
11
|
horizontalLabelId: d,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/* @__PURE__ */
|
|
12
|
+
title: n,
|
|
13
|
+
children: m,
|
|
14
|
+
className: $
|
|
15
|
+
}) => /* @__PURE__ */ x(h, { children: [
|
|
16
|
+
n && /* @__PURE__ */ e(l, { children: n }),
|
|
17
|
+
s && /* @__PURE__ */ e(
|
|
17
18
|
B,
|
|
19
|
+
{
|
|
20
|
+
id: a,
|
|
21
|
+
"aria-hidden": !!a,
|
|
22
|
+
children: s
|
|
23
|
+
}
|
|
24
|
+
),
|
|
25
|
+
/* @__PURE__ */ e(
|
|
26
|
+
C,
|
|
18
27
|
{
|
|
19
28
|
preserveAspectRatio: "xMidYMid meet",
|
|
20
|
-
viewBox: `${
|
|
21
|
-
className:
|
|
29
|
+
viewBox: `${p} ${c} ${r} ${i}`,
|
|
30
|
+
className: $,
|
|
22
31
|
style: {
|
|
23
|
-
"--aspect-ratio": `${
|
|
24
|
-
"--min-width": `${
|
|
32
|
+
"--aspect-ratio": `${r} / ${i}`,
|
|
33
|
+
"--min-width": `${r}px`
|
|
25
34
|
},
|
|
26
35
|
role: "group",
|
|
27
|
-
children:
|
|
36
|
+
children: m
|
|
28
37
|
}
|
|
29
38
|
),
|
|
30
|
-
|
|
39
|
+
t && /* @__PURE__ */ e(
|
|
40
|
+
f,
|
|
41
|
+
{
|
|
42
|
+
id: d,
|
|
43
|
+
"aria-hidden": !!d,
|
|
44
|
+
children: t
|
|
45
|
+
}
|
|
46
|
+
)
|
|
31
47
|
] });
|
|
32
|
-
|
|
33
|
-
const
|
|
48
|
+
o.displayName = "Charts.Base";
|
|
49
|
+
const y = o;
|
|
34
50
|
export {
|
|
35
|
-
|
|
51
|
+
y as default
|
|
36
52
|
};
|
|
@@ -1,25 +1,36 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("styled-components"),l=
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("styled-components"),l=t=>t&&t.__esModule?t:{default:t},e=l(a),r=e.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: auto 1fr var(--label-gutter);
|
|
5
7
|
grid-template-areas:
|
|
8
|
+
"title title"
|
|
6
9
|
"vertical-label chart"
|
|
7
10
|
". horizontal-label";
|
|
8
|
-
|
|
11
|
+
padding-inline-end: calc(var(--label-gutter) / 2);
|
|
12
|
+
`,i=e.default.span`
|
|
9
13
|
font-size: 80%;
|
|
10
14
|
grid-area: horizontal-label;
|
|
11
15
|
place-self: center;
|
|
12
16
|
align-self: center;
|
|
13
|
-
`,n=
|
|
17
|
+
`,n=e.default.span`
|
|
14
18
|
font-size: 80%;
|
|
15
19
|
grid-area: vertical-label;
|
|
16
20
|
place-self: center;
|
|
17
21
|
align-self: center;
|
|
18
22
|
writing-mode: vertical-rl;
|
|
19
23
|
transform: rotate(180deg);
|
|
20
|
-
`,o=
|
|
24
|
+
`,o=e.default.svg`
|
|
21
25
|
grid-area: chart;
|
|
22
26
|
height: 100%;
|
|
23
27
|
max-width: 100%;
|
|
24
28
|
aspect-ratio: var(--aspect-ratio);
|
|
25
|
-
|
|
29
|
+
`,c=e.default.h3`
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
grid-area: title;
|
|
33
|
+
height: var(--label-gutter);
|
|
34
|
+
padding-inline: calc(var(--label-gutter) / 2);
|
|
35
|
+
margin: 0;
|
|
36
|
+
`;exports.ChartContainer=r;exports.HorizontalLabel=i;exports.SVG=o;exports.Title=c;exports.VerticalLabel=n;
|