@rubin-epo/epo-widget-lib 0.8.1 → 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.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.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 +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 +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/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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ImageShape } from "@rubin-epo/epo-react-lib/Image";
|
|
2
|
+
import { ImageFilter } from "../ColorTool";
|
|
3
|
+
interface useFilteredImagesProps {
|
|
4
|
+
images: Array<ImageShape>;
|
|
5
|
+
filters: Array<ImageFilter>;
|
|
6
|
+
}
|
|
7
|
+
declare const useFilteredImages: ({ images, filters, }: useFilteredImagesProps) => [Array<HTMLCanvasElement>, boolean];
|
|
8
|
+
export default useFilteredImages;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useState as l, useLayoutEffect as w } from "react";
|
|
3
|
+
import x from "lodash/isEqual";
|
|
4
|
+
import F from "../../../hooks/usePrevious.js";
|
|
5
|
+
import { getFilters as L, updateColor as y } from "../lib/canvas.js";
|
|
6
|
+
const C = ({
|
|
7
|
+
images: s,
|
|
8
|
+
filters: u
|
|
9
|
+
}) => {
|
|
10
|
+
const f = F(s), [g, m] = l(0), [n, p] = l(), v = n == null ? void 0 : n.some(({ complete: e }) => !e), i = g !== s.length && v;
|
|
11
|
+
if (w(() => {
|
|
12
|
+
x(f, s) || (m(0), p(
|
|
13
|
+
s.map(({ url: e, width: a, height: r }) => {
|
|
14
|
+
const t = new Image(a, r);
|
|
15
|
+
return t.onload = () => {
|
|
16
|
+
m((o) => o + 1);
|
|
17
|
+
}, t.src = e, t;
|
|
18
|
+
})
|
|
19
|
+
));
|
|
20
|
+
}, [s]), i)
|
|
21
|
+
return [[], !!i];
|
|
22
|
+
const d = [...n || []].map((e, a) => {
|
|
23
|
+
if (!u[a].active)
|
|
24
|
+
return;
|
|
25
|
+
const r = document.createElement("canvas"), t = r.getContext("2d");
|
|
26
|
+
if (t) {
|
|
27
|
+
const { width: o, height: c } = e, { color: I = "transparent", brightness: h } = u[a];
|
|
28
|
+
t.canvas.width = o, t.canvas.height = c, t.clearRect(0, 0, o, c), t.filter = L({ brightness: h, contrast: 1.3 }), t.drawImage(e, 0, 0, o, c), y(t, I, o, c);
|
|
29
|
+
}
|
|
30
|
+
return r;
|
|
31
|
+
}).filter((e) => !!e);
|
|
32
|
+
return console.log({ canvases: d }), [d, !!i];
|
|
33
|
+
}, R = C;
|
|
34
|
+
export {
|
|
35
|
+
R as default
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FunctionComponent } from "react";
|
|
2
|
+
import { formatMagnitudePoints } from "../../helpers";
|
|
3
|
+
interface LightCurveLabelProps {
|
|
4
|
+
data: ReturnType<typeof formatMagnitudePoints>;
|
|
5
|
+
controlledById?: string;
|
|
6
|
+
estimatedPeak: number;
|
|
7
|
+
gaussianWidth: number;
|
|
8
|
+
yOffset: number;
|
|
9
|
+
}
|
|
10
|
+
declare const LightCurveLabel: FunctionComponent<LightCurveLabelProps>;
|
|
11
|
+
export default LightCurveLabel;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as g } from "react/jsx-runtime";
|
|
3
|
+
import { useTranslation as p } from "react-i18next";
|
|
4
|
+
import d from "lodash/minBy";
|
|
5
|
+
import { calculateResidual as f } from "../../helpers.js";
|
|
6
|
+
import { between as L } from "../../../../lib/utils.js";
|
|
7
|
+
import { HiddenOutput as b } from "./styles.js";
|
|
8
|
+
const o = ({
|
|
9
|
+
data: e,
|
|
10
|
+
gaussianWidth: m,
|
|
11
|
+
yOffset: n,
|
|
12
|
+
controlledById: u,
|
|
13
|
+
estimatedPeak: a
|
|
14
|
+
}) => {
|
|
15
|
+
const {
|
|
16
|
+
t: l,
|
|
17
|
+
i18n: { language: r }
|
|
18
|
+
} = p(), c = e.filter(({ x: i }) => L(i, 0, 15)).reduce(
|
|
19
|
+
(i, s) => i + f(s, m, n),
|
|
20
|
+
0
|
|
21
|
+
) / e.length, { y: t } = d(e, ({ y: i }) => i) || {};
|
|
22
|
+
return /* @__PURE__ */ g(b, { form: u, children: l("light_curve.curve.description", {
|
|
23
|
+
residual: c.toLocaleString(r, {
|
|
24
|
+
minimumFractionDigits: 2,
|
|
25
|
+
maximumFractionDigits: 2
|
|
26
|
+
}),
|
|
27
|
+
brightest: t == null ? void 0 : t.toLocaleString(r, {
|
|
28
|
+
minimumFractionDigits: 1,
|
|
29
|
+
maximumFractionDigits: 1
|
|
30
|
+
}),
|
|
31
|
+
context: a < Number(t) ? "above" : "below"
|
|
32
|
+
}) });
|
|
33
|
+
};
|
|
34
|
+
o.displayName = "Widgets.LightCurvel.A11Y.LightCurveLabel";
|
|
35
|
+
const y = o;
|
|
36
|
+
export {
|
|
37
|
+
y as default
|
|
38
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("styled-components"),p=t=>t&&t.__esModule?t:{default:t},o=p(e),u=o.default.output`
|
|
2
|
+
clip: rect(1px 1px 1px 1px); /* IE 6/7 */
|
|
3
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
4
|
+
height: 1px;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
position: absolute;
|
|
7
|
+
white-space: nowrap;
|
|
8
|
+
width: 1px;
|
|
9
|
+
`;exports.HiddenOutput=u;
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
export declare const HiddenOutput: import("styled-components").IStyledComponent<"web", {
|
|
2
|
+
ref?: import("react").LegacyRef<HTMLOutputElement> | undefined;
|
|
3
|
+
key?: import("react").Key | null | undefined;
|
|
4
|
+
form?: string | undefined;
|
|
5
|
+
htmlFor?: string | undefined;
|
|
6
|
+
name?: string | undefined;
|
|
7
|
+
defaultChecked?: boolean | undefined;
|
|
8
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
9
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
10
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
11
|
+
accessKey?: string | undefined;
|
|
12
|
+
autoFocus?: boolean | undefined;
|
|
13
|
+
className?: string | undefined;
|
|
14
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
|
|
15
|
+
contextMenu?: string | undefined;
|
|
16
|
+
dir?: string | undefined;
|
|
17
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
18
|
+
hidden?: boolean | undefined;
|
|
19
|
+
id?: string | undefined;
|
|
20
|
+
lang?: string | undefined;
|
|
21
|
+
nonce?: string | undefined;
|
|
22
|
+
placeholder?: string | undefined;
|
|
23
|
+
slot?: string | undefined;
|
|
24
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
25
|
+
style?: import("react").CSSProperties | undefined;
|
|
26
|
+
tabIndex?: number | undefined;
|
|
27
|
+
title?: string | undefined;
|
|
28
|
+
translate?: "yes" | "no" | undefined;
|
|
29
|
+
radioGroup?: string | undefined;
|
|
30
|
+
role?: import("react").AriaRole | undefined;
|
|
31
|
+
about?: string | undefined;
|
|
32
|
+
content?: string | undefined;
|
|
33
|
+
datatype?: string | undefined;
|
|
34
|
+
inlist?: any;
|
|
35
|
+
prefix?: string | undefined;
|
|
36
|
+
property?: string | undefined;
|
|
37
|
+
rel?: string | undefined;
|
|
38
|
+
resource?: string | undefined;
|
|
39
|
+
rev?: string | undefined;
|
|
40
|
+
typeof?: string | undefined;
|
|
41
|
+
vocab?: string | undefined;
|
|
42
|
+
autoCapitalize?: string | undefined;
|
|
43
|
+
autoCorrect?: string | undefined;
|
|
44
|
+
autoSave?: string | undefined;
|
|
45
|
+
color?: string | undefined;
|
|
46
|
+
itemProp?: string | undefined;
|
|
47
|
+
itemScope?: boolean | undefined;
|
|
48
|
+
itemType?: string | undefined;
|
|
49
|
+
itemID?: string | undefined;
|
|
50
|
+
itemRef?: string | undefined;
|
|
51
|
+
results?: number | undefined;
|
|
52
|
+
security?: string | undefined;
|
|
53
|
+
unselectable?: "on" | "off" | undefined;
|
|
54
|
+
inputMode?: "text" | "search" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
55
|
+
is?: string | undefined;
|
|
56
|
+
children?: import("react").ReactNode;
|
|
57
|
+
"aria-activedescendant"?: string | undefined;
|
|
58
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
59
|
+
"aria-autocomplete"?: "list" | "none" | "inline" | "both" | undefined;
|
|
60
|
+
"aria-braillelabel"?: string | undefined;
|
|
61
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
62
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
63
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
64
|
+
"aria-colcount"?: number | undefined;
|
|
65
|
+
"aria-colindex"?: number | undefined;
|
|
66
|
+
"aria-colindextext"?: string | undefined;
|
|
67
|
+
"aria-colspan"?: number | undefined;
|
|
68
|
+
"aria-controls"?: string | undefined;
|
|
69
|
+
"aria-current"?: boolean | "step" | "time" | "true" | "false" | "page" | "location" | "date" | undefined;
|
|
70
|
+
"aria-describedby"?: string | undefined;
|
|
71
|
+
"aria-description"?: string | undefined;
|
|
72
|
+
"aria-details"?: string | undefined;
|
|
73
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
74
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
|
|
75
|
+
"aria-errormessage"?: string | undefined;
|
|
76
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
77
|
+
"aria-flowto"?: string | undefined;
|
|
78
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
79
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
80
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
81
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
82
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
83
|
+
"aria-label"?: string | undefined;
|
|
84
|
+
"aria-labelledby"?: string | undefined;
|
|
85
|
+
"aria-level"?: number | undefined;
|
|
86
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
87
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
88
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
89
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
90
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
91
|
+
"aria-owns"?: string | undefined;
|
|
92
|
+
"aria-placeholder"?: string | undefined;
|
|
93
|
+
"aria-posinset"?: number | undefined;
|
|
94
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
95
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
96
|
+
"aria-relevant"?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
97
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
98
|
+
"aria-roledescription"?: string | undefined;
|
|
99
|
+
"aria-rowcount"?: number | undefined;
|
|
100
|
+
"aria-rowindex"?: number | undefined;
|
|
101
|
+
"aria-rowindextext"?: string | undefined;
|
|
102
|
+
"aria-rowspan"?: number | undefined;
|
|
103
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
104
|
+
"aria-setsize"?: number | undefined;
|
|
105
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
106
|
+
"aria-valuemax"?: number | undefined;
|
|
107
|
+
"aria-valuemin"?: number | undefined;
|
|
108
|
+
"aria-valuenow"?: number | undefined;
|
|
109
|
+
"aria-valuetext"?: string | undefined;
|
|
110
|
+
dangerouslySetInnerHTML?: {
|
|
111
|
+
__html: string | TrustedHTML;
|
|
112
|
+
} | undefined;
|
|
113
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLOutputElement> | undefined;
|
|
114
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLOutputElement> | undefined;
|
|
115
|
+
onCut?: import("react").ClipboardEventHandler<HTMLOutputElement> | undefined;
|
|
116
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLOutputElement> | undefined;
|
|
117
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLOutputElement> | undefined;
|
|
118
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLOutputElement> | undefined;
|
|
119
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLOutputElement> | undefined;
|
|
120
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLOutputElement> | undefined;
|
|
121
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLOutputElement> | undefined;
|
|
122
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLOutputElement> | undefined;
|
|
123
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLOutputElement> | undefined;
|
|
124
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLOutputElement> | undefined;
|
|
125
|
+
onFocus?: import("react").FocusEventHandler<HTMLOutputElement> | undefined;
|
|
126
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLOutputElement> | undefined;
|
|
127
|
+
onBlur?: import("react").FocusEventHandler<HTMLOutputElement> | undefined;
|
|
128
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLOutputElement> | undefined;
|
|
129
|
+
onChange?: import("react").FormEventHandler<HTMLOutputElement> | undefined;
|
|
130
|
+
onChangeCapture?: import("react").FormEventHandler<HTMLOutputElement> | undefined;
|
|
131
|
+
onBeforeInput?: import("react").FormEventHandler<HTMLOutputElement> | undefined;
|
|
132
|
+
onBeforeInputCapture?: import("react").FormEventHandler<HTMLOutputElement> | undefined;
|
|
133
|
+
onInput?: import("react").FormEventHandler<HTMLOutputElement> | undefined;
|
|
134
|
+
onInputCapture?: import("react").FormEventHandler<HTMLOutputElement> | undefined;
|
|
135
|
+
onReset?: import("react").FormEventHandler<HTMLOutputElement> | undefined;
|
|
136
|
+
onResetCapture?: import("react").FormEventHandler<HTMLOutputElement> | undefined;
|
|
137
|
+
onSubmit?: import("react").FormEventHandler<HTMLOutputElement> | undefined;
|
|
138
|
+
onSubmitCapture?: import("react").FormEventHandler<HTMLOutputElement> | undefined;
|
|
139
|
+
onInvalid?: import("react").FormEventHandler<HTMLOutputElement> | undefined;
|
|
140
|
+
onInvalidCapture?: import("react").FormEventHandler<HTMLOutputElement> | undefined;
|
|
141
|
+
onLoad?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
142
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
143
|
+
onError?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
144
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
145
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLOutputElement> | undefined;
|
|
146
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLOutputElement> | undefined;
|
|
147
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLOutputElement> | undefined;
|
|
148
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLOutputElement> | undefined;
|
|
149
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLOutputElement> | undefined;
|
|
150
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLOutputElement> | undefined;
|
|
151
|
+
onAbort?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
152
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
153
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
154
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
155
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
156
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
157
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
158
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
159
|
+
onEmptied?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
160
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
161
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
162
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
163
|
+
onEnded?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
164
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
165
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
166
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
167
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
168
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
169
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
170
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
171
|
+
onPause?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
172
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
173
|
+
onPlay?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
174
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
175
|
+
onPlaying?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
176
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
177
|
+
onProgress?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
178
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
179
|
+
onRateChange?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
180
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
181
|
+
onResize?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
182
|
+
onResizeCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
183
|
+
onSeeked?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
184
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
185
|
+
onSeeking?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
186
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
187
|
+
onStalled?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
188
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
189
|
+
onSuspend?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
190
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
191
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
192
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
193
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
194
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
195
|
+
onWaiting?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
196
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
197
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
198
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
199
|
+
onClick?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
200
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
201
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
202
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
203
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
204
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
205
|
+
onDrag?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
206
|
+
onDragCapture?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
207
|
+
onDragEnd?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
208
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
209
|
+
onDragEnter?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
210
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
211
|
+
onDragExit?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
212
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
213
|
+
onDragLeave?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
214
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
215
|
+
onDragOver?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
216
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
217
|
+
onDragStart?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
218
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
219
|
+
onDrop?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
220
|
+
onDropCapture?: import("react").DragEventHandler<HTMLOutputElement> | undefined;
|
|
221
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
222
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
223
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
224
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
225
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
226
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
227
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
228
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
229
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
230
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
231
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
232
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLOutputElement> | undefined;
|
|
233
|
+
onSelect?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
234
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLOutputElement> | undefined;
|
|
235
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLOutputElement> | undefined;
|
|
236
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLOutputElement> | undefined;
|
|
237
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLOutputElement> | undefined;
|
|
238
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLOutputElement> | undefined;
|
|
239
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLOutputElement> | undefined;
|
|
240
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLOutputElement> | undefined;
|
|
241
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLOutputElement> | undefined;
|
|
242
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLOutputElement> | undefined;
|
|
243
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
244
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
245
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
246
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
247
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
248
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
249
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
250
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
251
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
252
|
+
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
253
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
254
|
+
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
255
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
256
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
257
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
258
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
259
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
260
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
261
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
262
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLOutputElement> | undefined;
|
|
263
|
+
onScroll?: import("react").UIEventHandler<HTMLOutputElement> | undefined;
|
|
264
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLOutputElement> | undefined;
|
|
265
|
+
onWheel?: import("react").WheelEventHandler<HTMLOutputElement> | undefined;
|
|
266
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLOutputElement> | undefined;
|
|
267
|
+
onAnimationStart?: import("react").AnimationEventHandler<HTMLOutputElement> | undefined;
|
|
268
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLOutputElement> | undefined;
|
|
269
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLOutputElement> | undefined;
|
|
270
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLOutputElement> | undefined;
|
|
271
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLOutputElement> | undefined;
|
|
272
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLOutputElement> | undefined;
|
|
273
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLOutputElement> | undefined;
|
|
274
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLOutputElement> | undefined;
|
|
275
|
+
}>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import p from "styled-components";
|
|
3
|
+
const e = p.output`
|
|
4
|
+
clip: rect(1px 1px 1px 1px); /* IE 6/7 */
|
|
5
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
6
|
+
height: 1px;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
position: absolute;
|
|
9
|
+
white-space: nowrap;
|
|
10
|
+
width: 1px;
|
|
11
|
+
`;
|
|
12
|
+
export {
|
|
13
|
+
e as HiddenOutput
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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"),m=require("../../../charts/ForeignObject/index.cjs"),i=require("../helpers.cjs"),s=require("./styles.cjs"),n=({gaussianWidth:t,className:r})=>{const{t:a,i18n:{language:l}}=u.useTranslation(),c=i.estimateMagnitude(0,t),o=i.estimateMagnitude(15,t)-c;return e.jsx(m.default,{children:e.jsxs(s.DisplayContainer,{className:r,children:[e.jsx(s.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 d=n;exports.default=d;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default DM15Display;
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param {object} props
|
|
5
|
+
* @param {number} props.gaussianWidth
|
|
6
|
+
* @param {string} [props.className]
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
declare function DM15Display({ gaussianWidth, className }: {
|
|
10
|
+
gaussianWidth: number;
|
|
11
|
+
className?: string | undefined;
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare namespace DM15Display {
|
|
14
|
+
const displayName: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as i, jsxs as e } from "react/jsx-runtime";
|
|
3
|
+
import { useTranslation as c } from "react-i18next";
|
|
4
|
+
import d from "../../../charts/ForeignObject/index.js";
|
|
5
|
+
import { estimateMagnitude as n } from "../helpers.js";
|
|
6
|
+
import { DisplayContainer as h, Line as p } from "./styles.js";
|
|
7
|
+
const r = ({ gaussianWidth: t, className: a }) => {
|
|
8
|
+
const {
|
|
9
|
+
t: l,
|
|
10
|
+
i18n: { language: m }
|
|
11
|
+
} = c(), o = n(0, t), s = n(15, t) - o;
|
|
12
|
+
return /* @__PURE__ */ i(d, { children: /* @__PURE__ */ e(h, { className: a, children: [
|
|
13
|
+
/* @__PURE__ */ i(p, {}),
|
|
14
|
+
/* @__PURE__ */ e("math", { xmlns: "http://www.w3.org/1998/Math/MathML", children: [
|
|
15
|
+
/* @__PURE__ */ i("mn", { children: "Δ" }),
|
|
16
|
+
/* @__PURE__ */ e("msub", { children: [
|
|
17
|
+
/* @__PURE__ */ i("mi", { children: "m" }),
|
|
18
|
+
/* @__PURE__ */ i("mn", { children: "15" })
|
|
19
|
+
] }),
|
|
20
|
+
/* @__PURE__ */ i("mo", { children: "=" }),
|
|
21
|
+
/* @__PURE__ */ i(
|
|
22
|
+
"mn",
|
|
23
|
+
{
|
|
24
|
+
role: "status",
|
|
25
|
+
"aria-live": "polite",
|
|
26
|
+
"aria-label": l("light_curve.deltaM15.label") || void 0,
|
|
27
|
+
children: Number(s).toLocaleString(m, {
|
|
28
|
+
minimumFractionDigits: 2,
|
|
29
|
+
maximumFractionDigits: 2
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
] })
|
|
34
|
+
] }) });
|
|
35
|
+
};
|
|
36
|
+
r.displayName = "Widgets.LightCurve.DM15Display";
|
|
37
|
+
const b = r;
|
|
38
|
+
export {
|
|
39
|
+
b as default
|
|
40
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("styled-components"),l=t=>t&&t.__esModule?t:{default:t},e=l(i),o=e.default.div`
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 0;
|
|
4
|
+
right: 0;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: 1ch;
|
|
8
|
+
`,n=e.default.div`
|
|
9
|
+
background-color: var(--black, #000);
|
|
10
|
+
height: 2px;
|
|
11
|
+
width: 3ch;
|
|
12
|
+
`;exports.DisplayContainer=o;exports.Line=n;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const DisplayContainer: import("styled-components").IStyledComponent<"web", {
|
|
2
2
|
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
3
3
|
key?: import("react").Key | null | undefined;
|
|
4
4
|
defaultChecked?: boolean | undefined;
|
|
@@ -270,7 +270,7 @@ export declare const ImageContainer: import("styled-components").IStyledComponen
|
|
|
270
270
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
271
271
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
272
272
|
}>;
|
|
273
|
-
export declare const
|
|
273
|
+
export declare const Line: import("styled-components").IStyledComponent<"web", {
|
|
274
274
|
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
275
275
|
key?: import("react").Key | null | undefined;
|
|
276
276
|
defaultChecked?: boolean | undefined;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import i from "styled-components";
|
|
3
|
+
const o = i.div`
|
|
4
|
+
position: absolute;
|
|
5
|
+
top: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 1ch;
|
|
10
|
+
`, e = i.div`
|
|
11
|
+
background-color: var(--black, #000);
|
|
12
|
+
height: 2px;
|
|
13
|
+
width: 3ch;
|
|
14
|
+
`;
|
|
15
|
+
export {
|
|
16
|
+
o as DisplayContainer,
|
|
17
|
+
e as Line
|
|
18
|
+
};
|
|
@@ -0,0 +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[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;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FunctionComponent } from "react";
|
|
2
|
+
import { Domain, ScaleFunction } from '../../../charts/types';
|
|
3
|
+
interface LightCurveProps {
|
|
4
|
+
xScale: ScaleFunction;
|
|
5
|
+
yScale: ScaleFunction;
|
|
6
|
+
yOffset: number;
|
|
7
|
+
gaussianWidth: number;
|
|
8
|
+
xDomain: Domain;
|
|
9
|
+
yDomain: Domain;
|
|
10
|
+
}
|
|
11
|
+
declare const LightCurve: FunctionComponent<LightCurveProps>;
|
|
12
|
+
export default LightCurve;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { range as g } from "d3-array";
|
|
3
|
+
import { estimateMagnitude as v } from "../helpers.js";
|
|
4
|
+
const n = ({
|
|
5
|
+
xScale: o,
|
|
6
|
+
xDomain: r,
|
|
7
|
+
yScale: e,
|
|
8
|
+
yDomain: s,
|
|
9
|
+
gaussianWidth: a,
|
|
10
|
+
yOffset: i
|
|
11
|
+
}) => {
|
|
12
|
+
const m = g(r[0], r[1], 0.5).map((t) => ({ x: t, y: v(t, a) })).map(({ x: t, y: u }, p) => `${p === 0 ? "M" : "L"}${o(t)},${e(u)}`).join("");
|
|
13
|
+
return /* @__PURE__ */ d(
|
|
14
|
+
"path",
|
|
15
|
+
{
|
|
16
|
+
transform: `translate(0,${e(s[0] - i)})`,
|
|
17
|
+
d: m,
|
|
18
|
+
fill: "none",
|
|
19
|
+
strokeWidth: 2,
|
|
20
|
+
stroke: "var(--black,#000)",
|
|
21
|
+
pointerEvents: "none"
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
n.displayName = "Widgets.LightCurve.Curve";
|
|
26
|
+
const $ = n;
|
|
27
|
+
export {
|
|
28
|
+
$ as default
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),d=require("react-i18next"),m=require("../../../charts/ForeignObject/index.cjs"),a=require("./styles.cjs"),g=(t,r,s)=>{const i=Number(Math.abs(r-t).toFixed(1)),u=i.toLocaleString(s,{minimumFractionDigits:1,maximumFractionDigits:1});let e;return i<=.05?(e="equal",{distance:i,context:e}):(t<r?e="above":e="below",{distance:u,context:e})},o=({magnitude:t,yMin:r,yMax:s,onMagnitudeChangeCallback:i,estimatedPeak:u})=>{const{t:e,i18n:{language:l}}=d.useTranslation();return n.jsx(m.default,{children:n.jsx(a.Slider,{ariaLabel:e("light_curve.magnitude_slider.label")||void 0,orientation:"vertical",value:t,min:r,max:s,step:.1,ariaValuetext:()=>e("light_curve.magnitude_slider.value",{...g(u,t,l),magnitude:t.toLocaleString(l,{minimumFractionDigits:1,maximumFractionDigits:1})}),onChange:i,renderThumb:c=>n.jsxs(a.ThumbContainer,{...c,children:[n.jsx(a.ThumbBar,{}),n.jsx(a.ThumbHandle,{})]})})})};o.displayName="Widgets.LightCurve.MagnitudeSlider";const x=o;exports.default=x;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FunctionComponent } from "react";
|
|
2
|
+
interface MagnitudeSliderProps {
|
|
3
|
+
yMin: number;
|
|
4
|
+
yMax: number;
|
|
5
|
+
magnitude: number;
|
|
6
|
+
onMagnitudeChangeCallback: (value: number) => void;
|
|
7
|
+
estimatedPeak: number;
|
|
8
|
+
}
|
|
9
|
+
declare const MagnitudeSlider: FunctionComponent<MagnitudeSliderProps>;
|
|
10
|
+
export default MagnitudeSlider;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
3
|
+
import { useTranslation as c } from "react-i18next";
|
|
4
|
+
import d from "../../../charts/ForeignObject/index.js";
|
|
5
|
+
import { Slider as g, ThumbContainer as b, ThumbBar as h, ThumbHandle as x } from "./styles.js";
|
|
6
|
+
const f = (t, n, a) => {
|
|
7
|
+
const e = Number(Math.abs(n - t).toFixed(1)), o = e.toLocaleString(a, {
|
|
8
|
+
minimumFractionDigits: 1,
|
|
9
|
+
maximumFractionDigits: 1
|
|
10
|
+
});
|
|
11
|
+
let i;
|
|
12
|
+
return e <= 0.05 ? (i = "equal", { distance: e, context: i }) : (t < n ? i = "above" : i = "below", { distance: o, context: i });
|
|
13
|
+
}, m = ({
|
|
14
|
+
magnitude: t,
|
|
15
|
+
yMin: n,
|
|
16
|
+
yMax: a,
|
|
17
|
+
onMagnitudeChangeCallback: e,
|
|
18
|
+
estimatedPeak: o
|
|
19
|
+
}) => {
|
|
20
|
+
const {
|
|
21
|
+
t: i,
|
|
22
|
+
i18n: { language: l }
|
|
23
|
+
} = c();
|
|
24
|
+
return /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r(
|
|
25
|
+
g,
|
|
26
|
+
{
|
|
27
|
+
ariaLabel: i("light_curve.magnitude_slider.label") || void 0,
|
|
28
|
+
orientation: "vertical",
|
|
29
|
+
value: t,
|
|
30
|
+
min: n,
|
|
31
|
+
max: a,
|
|
32
|
+
step: 0.1,
|
|
33
|
+
ariaValuetext: () => i("light_curve.magnitude_slider.value", {
|
|
34
|
+
...f(o, t, l),
|
|
35
|
+
magnitude: t.toLocaleString(l, {
|
|
36
|
+
minimumFractionDigits: 1,
|
|
37
|
+
maximumFractionDigits: 1
|
|
38
|
+
})
|
|
39
|
+
}),
|
|
40
|
+
onChange: e,
|
|
41
|
+
renderThumb: (u) => /* @__PURE__ */ s(b, { ...u, children: [
|
|
42
|
+
/* @__PURE__ */ r(h, {}),
|
|
43
|
+
/* @__PURE__ */ r(x, {})
|
|
44
|
+
] })
|
|
45
|
+
}
|
|
46
|
+
) });
|
|
47
|
+
};
|
|
48
|
+
m.displayName = "Widgets.LightCurve.MagnitudeSlider";
|
|
49
|
+
const D = m;
|
|
50
|
+
export {
|
|
51
|
+
D as default
|
|
52
|
+
};
|