@rubin-epo/epo-widget-lib 0.9.7 → 0.9.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CameraFilter.cjs +1 -1
- package/dist/CameraFilter.js +25 -24
- package/dist/Charts.cjs +1 -1
- package/dist/Charts.js +14 -12
- package/dist/ColorTool.cjs +1 -1
- package/dist/ColorTool.js +98 -103
- package/dist/FilterTool.cjs +1 -1
- package/dist/FilterTool.js +1 -1
- package/dist/SupernovaThreeVector.cjs +1 -1
- package/dist/SupernovaThreeVector.js +12 -12
- package/dist/atomic/PlaybackControl/PlaybackControl.d.ts +1 -2
- package/dist/charts/Bars/index.d.ts +1 -1
- package/dist/charts/Base/index.d.ts +1 -1
- package/dist/charts/Guidelines/index.cjs +1 -1
- package/dist/charts/Guidelines/index.d.ts +1 -1
- package/dist/charts/Guidelines/index.js +9 -9
- package/dist/charts/Points/ErrorBar.cjs +1 -0
- package/dist/charts/Points/ErrorBar.d.ts +9 -0
- package/dist/charts/Points/ErrorBar.js +119 -0
- package/dist/charts/Points/index.cjs +1 -1
- package/dist/charts/Points/index.d.ts +5 -11
- package/dist/charts/Points/index.js +44 -22
- package/dist/charts/ScatterPlot/index.cjs +1 -0
- package/dist/charts/ScatterPlot/index.d.ts +24 -0
- package/dist/charts/ScatterPlot/index.js +133 -0
- package/dist/charts/ScatterPlot/styles.cjs +22 -0
- package/dist/charts/ScatterPlot/styles.d.ts +16 -0
- package/dist/charts/ScatterPlot/styles.js +29 -0
- package/dist/charts/XAxis/index.d.ts +1 -1
- package/dist/charts/YAxis/index.d.ts +1 -1
- package/dist/charts/defaults.cjs +1 -0
- package/dist/charts/defaults.d.ts +22 -0
- package/dist/charts/defaults.js +23 -0
- package/dist/charts/hooks/useAxis.d.ts +1 -1
- package/dist/charts/index.d.ts +1 -0
- package/dist/hooks/useInterval.cjs +1 -1
- package/dist/hooks/useInterval.js +10 -10
- package/dist/hooks/useWindowSize.d.ts +4 -0
- package/dist/layout/AspectRatio/index.cjs +1 -0
- package/dist/layout/AspectRatio/index.d.ts +18 -0
- package/dist/layout/AspectRatio/index.js +24 -0
- package/dist/layout/AspectRatio/styles.cjs +16 -0
- package/dist/{widgets/ColorTool/Actions → layout/AspectRatio}/styles.d.ts +1 -1
- package/dist/layout/AspectRatio/styles.js +22 -0
- package/dist/layout/Controls/index.cjs +1 -0
- package/dist/layout/Controls/index.d.ts +10 -0
- package/dist/layout/Controls/index.js +31 -0
- package/dist/layout/Controls/styles.cjs +63 -0
- package/dist/{widgets/ColorTool → layout/Controls}/styles.d.ts +604 -332
- package/dist/layout/Controls/styles.js +75 -0
- package/dist/lib/reimg.cjs +1 -1
- package/dist/lib/reimg.d.ts +2 -2
- package/dist/lib/reimg.js +30 -31
- package/dist/localeStrings/en/epo-widget-lib.json +2 -2
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.cjs +1 -1
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.js +1 -1
- package/dist/widgets/CameraFilter/styles.cjs +24 -20
- package/dist/widgets/CameraFilter/styles.js +36 -32
- package/dist/widgets/ColorTool/Actions/index.cjs +1 -1
- package/dist/widgets/ColorTool/Actions/index.js +24 -25
- package/dist/widgets/ColorTool/FilterControls/styles.cjs +4 -4
- package/dist/widgets/ColorTool/FilterControls/styles.d.ts +1252 -0
- package/dist/widgets/ColorTool/FilterControls/styles.js +1 -1
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.cjs +1 -1
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.js +26 -29
- package/dist/widgets/ColorTool/ImageComposite/styles.cjs +5 -3
- package/dist/widgets/ColorTool/ImageComposite/styles.js +4 -2
- package/dist/widgets/ColorTool/styles.cjs +10 -24
- package/dist/widgets/ColorTool/styles.js +15 -29
- package/dist/widgets/FilterTool/FilterTool.d.ts +1 -1
- package/dist/widgets/FilterTool/styles.cjs +9 -9
- package/dist/widgets/FilterTool/styles.d.ts +6 -269
- package/dist/widgets/FilterTool/styles.js +17 -16
- package/dist/widgets/LightCurvePlot/Plot/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/Plot/index.d.ts +12 -0
- package/dist/widgets/LightCurvePlot/Plot/index.js +99 -0
- package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.cjs +4 -4
- package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.js +7 -6
- package/dist/widgets/LightCurvePlot/PlotWithCurve/A11Y/LightCurveLabel/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/index.d.ts +2 -2
- package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/index.js +2 -2
- package/dist/widgets/LightCurvePlot/PlotWithCurve/DM15Display/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/index.js +2 -2
- package/dist/widgets/LightCurvePlot/PlotWithCurve/LightCurve/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/{LightCurve → PlotWithCurve/LightCurve}/index.d.ts +1 -1
- package/dist/widgets/LightCurvePlot/{LightCurve → PlotWithCurve/LightCurve}/index.js +2 -2
- package/dist/widgets/LightCurvePlot/PlotWithCurve/MagnitudeSlider/index.cjs +1 -0
- package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/index.d.ts +0 -2
- package/dist/widgets/LightCurvePlot/PlotWithCurve/MagnitudeSlider/index.js +53 -0
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.js +132 -119
- package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.cjs +9 -11
- package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.js +13 -16
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.d.ts +2 -2
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.js +17 -15
- package/dist/widgets/LightCurvePlot/helpers.cjs +1 -1
- package/dist/widgets/LightCurvePlot/helpers.d.ts +3 -12
- package/dist/widgets/LightCurvePlot/helpers.js +33 -18
- package/dist/widgets/SourceSelector/SourceSelector.cjs +1 -1
- package/dist/widgets/SourceSelector/SourceSelector.js +53 -60
- package/dist/widgets/SupernovaThreeVector/Histogram/index.d.ts +1 -1
- package/dist/widgets/SupernovaThreeVector/index.d.ts +1 -1
- package/dist/widgets/SupernovaThreeVector/styles.cjs +10 -10
- package/dist/widgets/SupernovaThreeVector/styles.js +23 -22
- package/package.json +1 -1
- package/dist/styles/svg.cjs +0 -8
- package/dist/styles/svg.js +0 -13
- package/dist/widgets/ColorTool/Actions/styles.cjs +0 -5
- package/dist/widgets/ColorTool/Actions/styles.js +0 -10
- package/dist/widgets/LightCurvePlot/A11Y/LightCurveLabel/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/DM15Display/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/LightCurve/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/MagnitudeSlider/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/MagnitudeSlider/index.js +0 -55
- package/dist/widgets/LightCurvePlot/Point/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/Point/index.d.ts +0 -11
- package/dist/widgets/LightCurvePlot/Point/index.js +0 -68
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.cjs +0 -1
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.d.ts +0 -12
- package/dist/widgets/LightCurvePlot/ScatterPlot/index.js +0 -176
- /package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.d.ts +0 -0
- /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.cjs +0 -0
- /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.d.ts +0 -0
- /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.js +0 -0
- /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/index.d.ts +0 -0
- /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.cjs +0 -0
- /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.d.ts +0 -0
- /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.js +0 -0
- /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/styles.cjs +0 -0
- /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/styles.js +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { AspectRatio as c } from "./styles.js";
|
|
3
|
+
const a = {
|
|
4
|
+
square: 1,
|
|
5
|
+
portrait: parseFloat((9 / 16).toFixed(3)),
|
|
6
|
+
landscape: parseFloat((16 / 9).toFixed(3))
|
|
7
|
+
}, l = ({
|
|
8
|
+
ratio: t,
|
|
9
|
+
medScreenRatio: s = t,
|
|
10
|
+
smallScreenRatio: e = t,
|
|
11
|
+
children: o,
|
|
12
|
+
className: r
|
|
13
|
+
}) => {
|
|
14
|
+
const p = {
|
|
15
|
+
"--aspect-large-ratio": a[t],
|
|
16
|
+
"--aspect-med-ratio": a[s],
|
|
17
|
+
"--aspect-small-ratio": a[e]
|
|
18
|
+
};
|
|
19
|
+
return /* @__PURE__ */ i(c, { style: p, className: r, children: o });
|
|
20
|
+
};
|
|
21
|
+
l.displayName = "Layout.AspectRatio";
|
|
22
|
+
export {
|
|
23
|
+
l as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("styled-components"),e=require("@rubin-epo/epo-react-lib/styles"),i=t=>t&&t.__esModule?t:{default:t},r=i(a),o=r.default.div`
|
|
2
|
+
--aspect-ratio: var(--aspect-small-ratio, 1);
|
|
3
|
+
|
|
4
|
+
aspect-ratio: var(--aspect-ratio);
|
|
5
|
+
position: relative;
|
|
6
|
+
width: calc(var(--widget-max-height, 100vh) * var(--aspect-ratio));
|
|
7
|
+
max-height: var(--widget-max-height, 100vh);
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
|
|
10
|
+
@container (min-width: ${e.token("BREAK_LARGE_TABLET")}) {
|
|
11
|
+
--aspect-ratio: var(--aspect-med-ratio, 1);
|
|
12
|
+
}
|
|
13
|
+
@container (min-width: ${e.token("BREAK_DESKTOP_SMALL")}) {
|
|
14
|
+
--aspect-ratio: var(--aspect-large-ratio, 1);
|
|
15
|
+
}
|
|
16
|
+
`;exports.AspectRatio=o;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const AspectRatio: 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;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import a from "styled-components";
|
|
3
|
+
import { token as t } from "@rubin-epo/epo-react-lib/styles";
|
|
4
|
+
const r = a.div`
|
|
5
|
+
--aspect-ratio: var(--aspect-small-ratio, 1);
|
|
6
|
+
|
|
7
|
+
aspect-ratio: var(--aspect-ratio);
|
|
8
|
+
position: relative;
|
|
9
|
+
width: calc(var(--widget-max-height, 100vh) * var(--aspect-ratio));
|
|
10
|
+
max-height: var(--widget-max-height, 100vh);
|
|
11
|
+
max-width: 100%;
|
|
12
|
+
|
|
13
|
+
@container (min-width: ${t("BREAK_LARGE_TABLET")}) {
|
|
14
|
+
--aspect-ratio: var(--aspect-med-ratio, 1);
|
|
15
|
+
}
|
|
16
|
+
@container (min-width: ${t("BREAK_DESKTOP_SMALL")}) {
|
|
17
|
+
--aspect-ratio: var(--aspect-large-ratio, 1);
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
export {
|
|
21
|
+
r as AspectRatio
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),o=require("../AspectRatio/index.cjs"),t=require("./styles.cjs"),n=({widget:d,controls:s,actions:i,caption:r,className:l})=>e.jsx(o.default,{ratio:"landscape",medScreenRatio:"landscape",smallScreenRatio:"portrait",className:l,children:e.jsxs(t.WidgetLayout,{children:[e.jsxs(t.InteractionRow,{children:[e.jsx(t.Widget,{children:d}),r&&e.jsx(t.PortraitCaption,{children:r}),s&&e.jsx(t.Controls,{children:s})]}),i&&e.jsx(t.Actions,{children:i}),r&&e.jsx(t.LandscapeCaption,{children:r})]})});n.displayName="Layouts.WidgetControls";exports.default=n;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FunctionComponent, ReactNode } from "react";
|
|
2
|
+
interface WidgetControlsProps {
|
|
3
|
+
widget: ReactNode;
|
|
4
|
+
controls: ReactNode;
|
|
5
|
+
actions?: ReactNode;
|
|
6
|
+
caption?: ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const WidgetControls: FunctionComponent<WidgetControlsProps>;
|
|
10
|
+
export default WidgetControls;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import n from "../AspectRatio/index.js";
|
|
3
|
+
import { WidgetLayout as l, InteractionRow as s, Widget as c, PortraitCaption as m, Controls as p, Actions as h, LandscapeCaption as C } from "./styles.js";
|
|
4
|
+
const f = ({
|
|
5
|
+
widget: a,
|
|
6
|
+
controls: t,
|
|
7
|
+
actions: i,
|
|
8
|
+
caption: e,
|
|
9
|
+
className: d
|
|
10
|
+
}) => /* @__PURE__ */ r(
|
|
11
|
+
n,
|
|
12
|
+
{
|
|
13
|
+
ratio: "landscape",
|
|
14
|
+
medScreenRatio: "landscape",
|
|
15
|
+
smallScreenRatio: "portrait",
|
|
16
|
+
className: d,
|
|
17
|
+
children: /* @__PURE__ */ o(l, { children: [
|
|
18
|
+
/* @__PURE__ */ o(s, { children: [
|
|
19
|
+
/* @__PURE__ */ r(c, { children: a }),
|
|
20
|
+
e && /* @__PURE__ */ r(m, { children: e }),
|
|
21
|
+
t && /* @__PURE__ */ r(p, { children: t })
|
|
22
|
+
] }),
|
|
23
|
+
i && /* @__PURE__ */ r(h, { children: i }),
|
|
24
|
+
e && /* @__PURE__ */ r(C, { children: e })
|
|
25
|
+
] })
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
f.displayName = "Layouts.WidgetControls";
|
|
29
|
+
export {
|
|
30
|
+
f as default
|
|
31
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("styled-components"),t=require("@rubin-epo/epo-react-lib/styles"),o=i=>i&&i.__esModule?i:{default:i},e=o(n),a=e.default.div`
|
|
2
|
+
--default-widget-padding: calc(var(--PADDING_SMALL, 20px) / 2);
|
|
3
|
+
--widget-gap: var(--widget-padding, var(--default-widget-padding));
|
|
4
|
+
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
width: 100%;
|
|
9
|
+
max-height: 100%;
|
|
10
|
+
gap: var(--widget-gap);
|
|
11
|
+
overflow-y: auto;
|
|
12
|
+
|
|
13
|
+
@container (min-width: ${t.token("BREAK_PHABLET_MIN")}) {
|
|
14
|
+
--default-widget-padding: var(--PADDING_SMALL, 20px);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@container (min-width: ${t.token("BREAK_LARGE_TABLET")}) {
|
|
18
|
+
height: 100%;
|
|
19
|
+
overflow-y: initial;
|
|
20
|
+
}
|
|
21
|
+
`,d=e.default.div`
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
flex-grow: 1;
|
|
25
|
+
gap: var(--widget-gap);
|
|
26
|
+
|
|
27
|
+
@container (min-width: ${t.token("BREAK_LARGE_TABLET")}) {
|
|
28
|
+
flex-direction: row-reverse;
|
|
29
|
+
}
|
|
30
|
+
`,l=e.default.div`
|
|
31
|
+
aspect-ratio: 1;
|
|
32
|
+
flex: 1 1 auto;
|
|
33
|
+
max-height: 100%;
|
|
34
|
+
max-width: 100%;
|
|
35
|
+
justify-self: center;
|
|
36
|
+
|
|
37
|
+
@container (min-width: ${t.token("BREAK_LARGE_TABLET")}) {
|
|
38
|
+
max-height: unset;
|
|
39
|
+
height: 100%;
|
|
40
|
+
}
|
|
41
|
+
`,r=e.default.div`
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: var(--widget-gap);
|
|
45
|
+
flex: 0 1 100%;
|
|
46
|
+
`,c=e.default.div`
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
gap: var(--widget-gap);
|
|
50
|
+
|
|
51
|
+
@container (min-width: ${t.token("BREAK_LARGE_TABLET")}) {
|
|
52
|
+
flex-direction: row;
|
|
53
|
+
}
|
|
54
|
+
`,s=e.default.div`
|
|
55
|
+
@container (min-width: ${t.token("BREAK_LARGE_TABLET")}) {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
`,g=e.default.div`
|
|
59
|
+
display: none;
|
|
60
|
+
@container (min-width: ${t.token("BREAK_LARGE_TABLET")}) {
|
|
61
|
+
display: block;
|
|
62
|
+
}
|
|
63
|
+
`;exports.Actions=c;exports.Controls=r;exports.InteractionRow=d;exports.LandscapeCaption=g;exports.PortraitCaption=s;exports.Widget=l;exports.WidgetLayout=a;
|