@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.
Files changed (131) hide show
  1. package/dist/CameraFilter.cjs +1 -1
  2. package/dist/CameraFilter.js +25 -24
  3. package/dist/Charts.cjs +1 -1
  4. package/dist/Charts.js +14 -12
  5. package/dist/ColorTool.cjs +1 -1
  6. package/dist/ColorTool.js +98 -103
  7. package/dist/FilterTool.cjs +1 -1
  8. package/dist/FilterTool.js +1 -1
  9. package/dist/SupernovaThreeVector.cjs +1 -1
  10. package/dist/SupernovaThreeVector.js +12 -12
  11. package/dist/atomic/PlaybackControl/PlaybackControl.d.ts +1 -2
  12. package/dist/charts/Bars/index.d.ts +1 -1
  13. package/dist/charts/Base/index.d.ts +1 -1
  14. package/dist/charts/Guidelines/index.cjs +1 -1
  15. package/dist/charts/Guidelines/index.d.ts +1 -1
  16. package/dist/charts/Guidelines/index.js +9 -9
  17. package/dist/charts/Points/ErrorBar.cjs +1 -0
  18. package/dist/charts/Points/ErrorBar.d.ts +9 -0
  19. package/dist/charts/Points/ErrorBar.js +119 -0
  20. package/dist/charts/Points/index.cjs +1 -1
  21. package/dist/charts/Points/index.d.ts +5 -11
  22. package/dist/charts/Points/index.js +44 -22
  23. package/dist/charts/ScatterPlot/index.cjs +1 -0
  24. package/dist/charts/ScatterPlot/index.d.ts +24 -0
  25. package/dist/charts/ScatterPlot/index.js +133 -0
  26. package/dist/charts/ScatterPlot/styles.cjs +22 -0
  27. package/dist/charts/ScatterPlot/styles.d.ts +16 -0
  28. package/dist/charts/ScatterPlot/styles.js +29 -0
  29. package/dist/charts/XAxis/index.d.ts +1 -1
  30. package/dist/charts/YAxis/index.d.ts +1 -1
  31. package/dist/charts/defaults.cjs +1 -0
  32. package/dist/charts/defaults.d.ts +22 -0
  33. package/dist/charts/defaults.js +23 -0
  34. package/dist/charts/hooks/useAxis.d.ts +1 -1
  35. package/dist/charts/index.d.ts +1 -0
  36. package/dist/hooks/useInterval.cjs +1 -1
  37. package/dist/hooks/useInterval.js +10 -10
  38. package/dist/hooks/useWindowSize.d.ts +4 -0
  39. package/dist/layout/AspectRatio/index.cjs +1 -0
  40. package/dist/layout/AspectRatio/index.d.ts +18 -0
  41. package/dist/layout/AspectRatio/index.js +24 -0
  42. package/dist/layout/AspectRatio/styles.cjs +16 -0
  43. package/dist/{widgets/ColorTool/Actions → layout/AspectRatio}/styles.d.ts +1 -1
  44. package/dist/layout/AspectRatio/styles.js +22 -0
  45. package/dist/layout/Controls/index.cjs +1 -0
  46. package/dist/layout/Controls/index.d.ts +10 -0
  47. package/dist/layout/Controls/index.js +31 -0
  48. package/dist/layout/Controls/styles.cjs +63 -0
  49. package/dist/{widgets/ColorTool → layout/Controls}/styles.d.ts +604 -332
  50. package/dist/layout/Controls/styles.js +75 -0
  51. package/dist/lib/reimg.cjs +1 -1
  52. package/dist/lib/reimg.d.ts +2 -2
  53. package/dist/lib/reimg.js +30 -31
  54. package/dist/localeStrings/en/epo-widget-lib.json +2 -2
  55. package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.cjs +1 -1
  56. package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.js +1 -1
  57. package/dist/widgets/CameraFilter/styles.cjs +24 -20
  58. package/dist/widgets/CameraFilter/styles.js +36 -32
  59. package/dist/widgets/ColorTool/Actions/index.cjs +1 -1
  60. package/dist/widgets/ColorTool/Actions/index.js +24 -25
  61. package/dist/widgets/ColorTool/FilterControls/styles.cjs +4 -4
  62. package/dist/widgets/ColorTool/FilterControls/styles.d.ts +1252 -0
  63. package/dist/widgets/ColorTool/FilterControls/styles.js +1 -1
  64. package/dist/widgets/ColorTool/ImageComposite/ImageComposite.cjs +1 -1
  65. package/dist/widgets/ColorTool/ImageComposite/ImageComposite.js +26 -29
  66. package/dist/widgets/ColorTool/ImageComposite/styles.cjs +5 -3
  67. package/dist/widgets/ColorTool/ImageComposite/styles.js +4 -2
  68. package/dist/widgets/ColorTool/styles.cjs +10 -24
  69. package/dist/widgets/ColorTool/styles.js +15 -29
  70. package/dist/widgets/FilterTool/FilterTool.d.ts +1 -1
  71. package/dist/widgets/FilterTool/styles.cjs +9 -9
  72. package/dist/widgets/FilterTool/styles.d.ts +6 -269
  73. package/dist/widgets/FilterTool/styles.js +17 -16
  74. package/dist/widgets/LightCurvePlot/Plot/index.cjs +1 -0
  75. package/dist/widgets/LightCurvePlot/Plot/index.d.ts +12 -0
  76. package/dist/widgets/LightCurvePlot/Plot/index.js +99 -0
  77. package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.cjs +4 -4
  78. package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.js +7 -6
  79. package/dist/widgets/LightCurvePlot/PlotWithCurve/A11Y/LightCurveLabel/index.cjs +1 -0
  80. package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/index.d.ts +2 -2
  81. package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/index.js +2 -2
  82. package/dist/widgets/LightCurvePlot/PlotWithCurve/DM15Display/index.cjs +1 -0
  83. package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/index.js +2 -2
  84. package/dist/widgets/LightCurvePlot/PlotWithCurve/LightCurve/index.cjs +1 -0
  85. package/dist/widgets/LightCurvePlot/{LightCurve → PlotWithCurve/LightCurve}/index.d.ts +1 -1
  86. package/dist/widgets/LightCurvePlot/{LightCurve → PlotWithCurve/LightCurve}/index.js +2 -2
  87. package/dist/widgets/LightCurvePlot/PlotWithCurve/MagnitudeSlider/index.cjs +1 -0
  88. package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/index.d.ts +0 -2
  89. package/dist/widgets/LightCurvePlot/PlotWithCurve/MagnitudeSlider/index.js +53 -0
  90. package/dist/widgets/LightCurvePlot/PlotWithCurve/index.cjs +1 -1
  91. package/dist/widgets/LightCurvePlot/PlotWithCurve/index.js +132 -119
  92. package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.cjs +9 -11
  93. package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.js +13 -16
  94. package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.cjs +1 -1
  95. package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.d.ts +2 -2
  96. package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.js +17 -15
  97. package/dist/widgets/LightCurvePlot/helpers.cjs +1 -1
  98. package/dist/widgets/LightCurvePlot/helpers.d.ts +3 -12
  99. package/dist/widgets/LightCurvePlot/helpers.js +33 -18
  100. package/dist/widgets/SourceSelector/SourceSelector.cjs +1 -1
  101. package/dist/widgets/SourceSelector/SourceSelector.js +53 -60
  102. package/dist/widgets/SupernovaThreeVector/Histogram/index.d.ts +1 -1
  103. package/dist/widgets/SupernovaThreeVector/index.d.ts +1 -1
  104. package/dist/widgets/SupernovaThreeVector/styles.cjs +10 -10
  105. package/dist/widgets/SupernovaThreeVector/styles.js +23 -22
  106. package/package.json +1 -1
  107. package/dist/styles/svg.cjs +0 -8
  108. package/dist/styles/svg.js +0 -13
  109. package/dist/widgets/ColorTool/Actions/styles.cjs +0 -5
  110. package/dist/widgets/ColorTool/Actions/styles.js +0 -10
  111. package/dist/widgets/LightCurvePlot/A11Y/LightCurveLabel/index.cjs +0 -1
  112. package/dist/widgets/LightCurvePlot/DM15Display/index.cjs +0 -1
  113. package/dist/widgets/LightCurvePlot/LightCurve/index.cjs +0 -1
  114. package/dist/widgets/LightCurvePlot/MagnitudeSlider/index.cjs +0 -1
  115. package/dist/widgets/LightCurvePlot/MagnitudeSlider/index.js +0 -55
  116. package/dist/widgets/LightCurvePlot/Point/index.cjs +0 -1
  117. package/dist/widgets/LightCurvePlot/Point/index.d.ts +0 -11
  118. package/dist/widgets/LightCurvePlot/Point/index.js +0 -68
  119. package/dist/widgets/LightCurvePlot/ScatterPlot/index.cjs +0 -1
  120. package/dist/widgets/LightCurvePlot/ScatterPlot/index.d.ts +0 -12
  121. package/dist/widgets/LightCurvePlot/ScatterPlot/index.js +0 -176
  122. /package/dist/widgets/LightCurvePlot/{ScatterPlot → Plot}/styles.d.ts +0 -0
  123. /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.cjs +0 -0
  124. /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.d.ts +0 -0
  125. /package/dist/widgets/LightCurvePlot/{A11Y → PlotWithCurve/A11Y}/LightCurveLabel/styles.js +0 -0
  126. /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/index.d.ts +0 -0
  127. /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.cjs +0 -0
  128. /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.d.ts +0 -0
  129. /package/dist/widgets/LightCurvePlot/{DM15Display → PlotWithCurve/DM15Display}/styles.js +0 -0
  130. /package/dist/widgets/LightCurvePlot/{MagnitudeSlider → PlotWithCurve/MagnitudeSlider}/styles.cjs +0 -0
  131. /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 Actions: import("styled-components").IStyledComponent<"web", {
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;