@rubin-epo/epo-widget-lib 0.10.4 → 1.0.0-beta.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.
Files changed (28) hide show
  1. package/dist/SupernovaThreeVector.cjs +1 -1
  2. package/dist/SupernovaThreeVector.js +66 -66
  3. package/dist/atomic/Blinker/Blinker.cjs +1 -1
  4. package/dist/atomic/Blinker/Blinker.d.ts +2 -1
  5. package/dist/atomic/Blinker/Blinker.js +43 -41
  6. package/dist/charts/Base/styles.cjs +5 -3
  7. package/dist/charts/Base/styles.js +12 -10
  8. package/dist/charts/ScatterPlot/index.cjs +1 -1
  9. package/dist/charts/ScatterPlot/index.js +34 -33
  10. package/dist/charts/ScatterPlot/styles.cjs +3 -4
  11. package/dist/charts/ScatterPlot/styles.js +5 -6
  12. package/dist/localeStrings/en/epo-widget-lib.json +6 -6
  13. package/dist/widgets/LightCurvePlot/Plot/index.cjs +1 -1
  14. package/dist/widgets/LightCurvePlot/Plot/index.js +53 -68
  15. package/dist/widgets/LightCurvePlot/PlotWithCurve/MagnitudeSlider/index.cjs +1 -1
  16. package/dist/widgets/LightCurvePlot/PlotWithCurve/MagnitudeSlider/index.js +1 -1
  17. package/dist/widgets/LightCurvePlot/PlotWithCurve/index.cjs +1 -1
  18. package/dist/widgets/LightCurvePlot/PlotWithCurve/index.js +94 -80
  19. package/dist/widgets/SourceSelector/SourceSelector.cjs +1 -1
  20. package/dist/widgets/SourceSelector/SourceSelector.js +53 -55
  21. package/dist/widgets/SourceSelector/styles.cjs +2 -6
  22. package/dist/widgets/SourceSelector/styles.d.ts +0 -12
  23. package/dist/widgets/SourceSelector/styles.js +2 -8
  24. package/dist/widgets/SupernovaThreeVector/Histogram/index.cjs +1 -1
  25. package/dist/widgets/SupernovaThreeVector/Histogram/index.js +43 -43
  26. package/dist/widgets/SupernovaThreeVector/styles.cjs +6 -7
  27. package/dist/widgets/SupernovaThreeVector/styles.js +11 -12
  28. package/package.json +1 -1
@@ -1,10 +1,6 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("styled-components"),l=require("../../atomic/Blinker/Blinker.cjs"),n=t=>t&&t.__esModule?t:{default:t},e=n(o),s=e.default.svg`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("styled-components"),o=t=>t&&t.__esModule?t:{default:t},s=o(e),l=s.default.svg`
2
2
  cursor: pointer;
3
3
  position: absolute;
4
4
  bottom: 0;
5
5
  left: 0;
6
- `,u=e.default(l.default)`
7
- position: absolute;
8
- width: 100%;
9
- height: 100%;
10
- `;exports.BackgroundBlinker=u;exports.SVG=s;
6
+ `;exports.SVG=l;
@@ -482,15 +482,3 @@ export declare const SVG: import('styled-components').IStyledComponent<"web", {
482
482
  ref?: import('react').LegacyRef<SVGSVGElement> | undefined;
483
483
  key?: import('react').Key | null | undefined;
484
484
  }>;
485
- export declare const BackgroundBlinker: import('styled-components').IStyledComponent<"web", {
486
- images: import('@rubin-epo/epo-react-lib/Image').ImageShape[];
487
- activeIndex: number;
488
- autoplay?: boolean | undefined;
489
- loop?: boolean | undefined;
490
- interval?: number | undefined;
491
- blinkCallback?: ((activeIndex: number) => void) | undefined;
492
- loadedCallback?: (() => void) | undefined;
493
- className?: string | undefined;
494
- showControls?: boolean | undefined;
495
- children?: import('react').ReactNode;
496
- }> & import('react').FunctionComponent<import('react').PropsWithChildren<import('../../atomic/Blinker/Blinker').BlinkerProps>>;
@@ -1,17 +1,11 @@
1
1
  "use client";
2
2
  import o from "styled-components";
3
- import t from "../../atomic/Blinker/Blinker.js";
4
- const r = o.svg`
3
+ const e = o.svg`
5
4
  cursor: pointer;
6
5
  position: absolute;
7
6
  bottom: 0;
8
7
  left: 0;
9
- `, s = o(t)`
10
- position: absolute;
11
- width: 100%;
12
- height: 100%;
13
8
  `;
14
9
  export {
15
- s as BackgroundBlinker,
16
- r as SVG
10
+ e as SVG
17
11
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),g=require("react"),I=require("react-i18next"),w=require("../../../charts/Base/index.cjs"),H=require("../../../charts/XAxis/index.cjs"),O=require("../../../charts/Guidelines/index.cjs"),R=require("../../../charts/YAxis/index.cjs"),k=require("../../../charts/Bars/index.cjs"),z=require("../../../charts/Tooltip/index.cjs"),A=require("../../../charts/styles.cjs"),B=require("../../../lib/utils.cjs"),E=require("./styles.cjs"),T=({data:c,margin:x,activeRange:b,xDomain:r,yDomain:n,xScale:o,yScale:i,yTicks:h,xTicks:j,step:p,width:M,height:_,className:L})=>{const{t:q}=I.useTranslation(),[u,v]=g.useState(),$=i(n[0]),f="xAxisLabel",d=typeof u=="number",a=c.map(({value:s,bin:e},l)=>({x:e,value:s,width:12,fill:B.between(e,b[0],b[1])?void 0:"#30E0E3",props:{"aria-label":q("supernova_three_vector.histogram.bar_label",{count:s,binMin:e,binMax:e+p}),onMouseOver:()=>v(l),onMouseOut:()=>v(void 0)}}));return t.jsxs(w.default,{xMin:r[0],yMin:n[0],width:M,height:_,className:L,horizontalLabel:q("supernova_three_vector.histogram.x_label"),horizontalLabelId:f,children:[t.jsx(R.default,{showBaseline:!1,x:o(r[0])-10,ticks:h,tickLength:0,labelRender:(s,e,l)=>t.jsx(E.YLabel,{x:e,y:l,children:s}),yDomain:n,yScale:i}),t.jsx(O.default,{guides:h,xDomain:r,xScale:o,yDomain:n,yScale:i,margin:x}),t.jsx(k.default,{data:a,xDomain:r,yDomain:n,xScale:o,yScale:i}),t.jsx(H.default,{ticks:j,y:$,labelledById:f,labelRender:(s,e,l)=>t.jsx(A.XLabel,{x:e,y:l+5,children:s}),xDomain:r,xScale:o,margin:x}),t.jsx(z.default,{x:d?o(c[u].bin):0,y:d?i(a[u].value):0,visible:d,children:d?a[u].value:null})]})},y=T;exports.default=y;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),j=require("react"),L=require("react-i18next"),w=require("../../../charts/Base/index.cjs"),H=require("../../../charts/XAxis/index.cjs"),O=require("../../../charts/Guidelines/index.cjs"),R=require("../../../charts/YAxis/index.cjs"),k=require("../../../charts/Bars/index.cjs"),z=require("../../../charts/Tooltip/index.cjs"),B=require("../../../charts/styles.cjs"),E=require("../../../lib/utils.cjs"),T=require("./styles.cjs"),y=({data:c,margin:b,activeRange:x,xDomain:r,yDomain:n,xScale:o,yScale:i,yTicks:h,xTicks:p,step:M,width:_,height:I,className:$})=>{const{t:q}=L.useTranslation(),[l,v]=j.useState(),g=i(n[0]),f=j.useId(),d=typeof l=="number",a=c.map(({value:s,bin:e},u)=>({x:e,value:s,width:12,fill:E.between(e,x[0],x[1])?void 0:"#30E0E3",props:{"aria-label":q("supernova_three_vector.histogram.bar_label",{count:s,binMin:e,binMax:e+M}),onMouseOver:()=>v(u),onMouseOut:()=>v(void 0)}}));return t.jsxs(w.default,{xMin:r[0],yMin:n[0],width:_,height:I,className:$,horizontalLabel:q("supernova_three_vector.histogram.x_label"),horizontalLabelId:f,children:[t.jsx(R.default,{showBaseline:!1,x:o(r[0])-10,ticks:h,tickLength:0,labelRender:(s,e,u)=>t.jsx(T.YLabel,{x:e,y:u,children:s}),yDomain:n,yScale:i}),t.jsx(O.default,{guides:h,xDomain:r,xScale:o,yDomain:n,yScale:i,margin:b}),t.jsx(k.default,{data:a,xDomain:r,yDomain:n,xScale:o,yScale:i}),t.jsx(H.default,{ticks:p,y:g,labelledById:f,labelRender:(s,e,u)=>t.jsx(B.XLabel,{x:e,y:u+5,children:s}),xDomain:r,xScale:o,margin:b}),t.jsx(z.default,{x:d?o(c[l].bin):0,y:d?i(a[l].value):0,visible:d,children:d?a[l].value:null})]})},A=y;exports.default=A;
@@ -1,106 +1,106 @@
1
1
  "use client";
2
- import { jsxs as A, jsx as r } from "react/jsx-runtime";
3
- import { useState as B } from "react";
4
- import { useTranslation as w } from "react-i18next";
5
- import H from "../../../charts/Base/index.js";
6
- import j from "../../../charts/XAxis/index.js";
7
- import k from "../../../charts/Guidelines/index.js";
8
- import z from "../../../charts/YAxis/index.js";
9
- import E from "../../../charts/Bars/index.js";
10
- import O from "../../../charts/Tooltip/index.js";
11
- import { XLabel as R } from "../../../charts/styles.js";
12
- import { between as T } from "../../../lib/utils.js";
13
- import { YLabel as X } from "./styles.js";
14
- const Y = ({
15
- data: d,
16
- margin: b,
17
- activeRange: u,
2
+ import { jsxs as B, jsx as r } from "react/jsx-runtime";
3
+ import { useState as w, useId as A } from "react";
4
+ import { useTranslation as H } from "react-i18next";
5
+ import j from "../../../charts/Base/index.js";
6
+ import k from "../../../charts/XAxis/index.js";
7
+ import z from "../../../charts/Guidelines/index.js";
8
+ import E from "../../../charts/YAxis/index.js";
9
+ import O from "../../../charts/Bars/index.js";
10
+ import R from "../../../charts/Tooltip/index.js";
11
+ import { XLabel as T } from "../../../charts/styles.js";
12
+ import { between as X } from "../../../lib/utils.js";
13
+ import { YLabel as Y } from "./styles.js";
14
+ const G = ({
15
+ data: a,
16
+ margin: u,
17
+ activeRange: b,
18
18
  xDomain: t,
19
19
  yDomain: s,
20
20
  xScale: i,
21
21
  yScale: l,
22
22
  yTicks: f,
23
23
  xTicks: x,
24
- step: L,
25
- width: M,
26
- height: _,
27
- className: I
24
+ step: I,
25
+ width: L,
26
+ height: M,
27
+ className: _
28
28
  }) => {
29
- const { t: h } = w(), [m, c] = B(), g = l(s[0]), v = "xAxisLabel", p = typeof m == "number", a = d.map(({ value: e, bin: o }, n) => ({
29
+ const { t: h } = H(), [d, c] = w(), g = l(s[0]), v = A(), m = typeof d == "number", p = a.map(({ value: e, bin: o }, n) => ({
30
30
  x: o,
31
31
  value: e,
32
32
  width: 12,
33
- fill: T(o, u[0], u[1]) ? void 0 : "#30E0E3",
33
+ fill: X(o, b[0], b[1]) ? void 0 : "#30E0E3",
34
34
  props: {
35
35
  "aria-label": h("supernova_three_vector.histogram.bar_label", {
36
36
  count: e,
37
37
  binMin: o,
38
- binMax: o + L
38
+ binMax: o + I
39
39
  }),
40
40
  onMouseOver: () => c(n),
41
41
  onMouseOut: () => c(void 0)
42
42
  }
43
43
  }));
44
- return /* @__PURE__ */ A(
45
- H,
44
+ return /* @__PURE__ */ B(
45
+ j,
46
46
  {
47
47
  xMin: t[0],
48
48
  yMin: s[0],
49
- width: M,
50
- height: _,
51
- className: I,
49
+ width: L,
50
+ height: M,
51
+ className: _,
52
52
  horizontalLabel: h("supernova_three_vector.histogram.x_label"),
53
53
  horizontalLabelId: v,
54
54
  children: [
55
55
  /* @__PURE__ */ r(
56
- z,
56
+ E,
57
57
  {
58
58
  showBaseline: !1,
59
59
  x: i(t[0]) - 10,
60
60
  ticks: f,
61
61
  tickLength: 0,
62
- labelRender: (e, o, n) => /* @__PURE__ */ r(X, { x: o, y: n, children: e }),
62
+ labelRender: (e, o, n) => /* @__PURE__ */ r(Y, { x: o, y: n, children: e }),
63
63
  yDomain: s,
64
64
  yScale: l
65
65
  }
66
66
  ),
67
67
  /* @__PURE__ */ r(
68
- k,
68
+ z,
69
69
  {
70
70
  guides: f,
71
71
  xDomain: t,
72
72
  xScale: i,
73
73
  yDomain: s,
74
74
  yScale: l,
75
- margin: b
75
+ margin: u
76
76
  }
77
77
  ),
78
- /* @__PURE__ */ r(E, { data: a, xDomain: t, yDomain: s, xScale: i, yScale: l }),
78
+ /* @__PURE__ */ r(O, { data: p, xDomain: t, yDomain: s, xScale: i, yScale: l }),
79
79
  /* @__PURE__ */ r(
80
- j,
80
+ k,
81
81
  {
82
82
  ticks: x,
83
83
  y: g,
84
84
  labelledById: v,
85
- labelRender: (e, o, n) => /* @__PURE__ */ r(R, { x: o, y: n + 5, children: e }),
85
+ labelRender: (e, o, n) => /* @__PURE__ */ r(T, { x: o, y: n + 5, children: e }),
86
86
  xDomain: t,
87
87
  xScale: i,
88
- margin: b
88
+ margin: u
89
89
  }
90
90
  ),
91
91
  /* @__PURE__ */ r(
92
- O,
92
+ R,
93
93
  {
94
- x: p ? i(d[m].bin) : 0,
95
- y: p ? l(a[m].value) : 0,
96
- visible: p,
97
- children: p ? a[m].value : null
94
+ x: m ? i(a[d].bin) : 0,
95
+ y: m ? l(p[d].value) : 0,
96
+ visible: m,
97
+ children: m ? p[d].value : null
98
98
  }
99
99
  )
100
100
  ]
101
101
  }
102
102
  );
103
- }, W = Y;
103
+ }, Z = G;
104
104
  export {
105
- W as default
105
+ Z as default
106
106
  };
@@ -1,6 +1,6 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),t=require("@rubin-epo/epo-react-lib/styles"),i=require("../../layout/AspectRatio/index.cjs"),a=require("../../atomic/Button/patterns/Reset.cjs"),o=require("./Histogram/index.cjs"),s=require("./Skymap/index.cjs"),d=n=>n&&n.__esModule?n:{default:n},e=d(r),l=e.default(i.default)`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),t=require("@rubin-epo/epo-react-lib/styles"),i=require("../../layout/AspectRatio/index.cjs"),a=require("../../atomic/Button/patterns/Reset.cjs"),o=require("./Histogram/index.cjs"),s=require("./Skymap/index.cjs"),d=n=>n&&n.__esModule?n:{default:n},e=d(r),c=e.default(i.default)`
2
2
  container-type: inline-size;
3
- `,c=e.default.div`
3
+ `,l=e.default.div`
4
4
  --three-vector-gap: calc(var(--PADDING_SMALL, 20px) / 2);
5
5
 
6
6
  display: grid;
@@ -33,17 +33,16 @@
33
33
  container-type: inline-size;
34
34
  grid-area: histogram;
35
35
  `,u=e.default(o.default)`
36
- font-size: 0.75;
37
- overflow: visible;
36
+ font-size: 0.75em;
38
37
 
39
38
  @container (
40
39
  min-width: ${t.token("BREAK_PHABLET_MIN")}
41
40
  ) {
42
41
  font-size: 1em;
43
42
  }
44
- `,f=e.default.div`
43
+ `,p=e.default.div`
45
44
  grid-area: slider;
46
- `,p=e.default(a.default)`
45
+ `,f=e.default(a.default)`
47
46
  grid-area: reset;
48
47
  `,g=e.default.div`
49
48
  display: flex;
@@ -74,4 +73,4 @@
74
73
  }
75
74
  `,y=e.default.h4`
76
75
  margin: 0;
77
- `;exports.ChartTitle=y;exports.Histogram=u;exports.HistogramContainer=m;exports.ResetButton=p;exports.Skymap=h;exports.SkymapContainer=g;exports.SliderContainer=f;exports.ThreeVectorContainer=l;exports.ThreeVectorLayout=c;
76
+ `;exports.ChartTitle=y;exports.Histogram=u;exports.HistogramContainer=m;exports.ResetButton=f;exports.Skymap=h;exports.SkymapContainer=g;exports.SliderContainer=p;exports.ThreeVectorContainer=c;exports.ThreeVectorLayout=l;
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import e from "styled-components";
3
3
  import { token as t } from "@rubin-epo/epo-react-lib/styles";
4
- import i from "../../layout/AspectRatio/index.js";
5
- import r from "../../atomic/Button/patterns/Reset.js";
4
+ import r from "../../layout/AspectRatio/index.js";
5
+ import i from "../../atomic/Button/patterns/Reset.js";
6
6
  import n from "./Histogram/index.js";
7
7
  import o from "./Skymap/index.js";
8
- const l = e(i)`
8
+ const g = e(r)`
9
9
  container-type: inline-size;
10
- `, g = e.div`
10
+ `, l = e.div`
11
11
  --three-vector-gap: calc(var(--PADDING_SMALL, 20px) / 2);
12
12
 
13
13
  display: grid;
@@ -40,17 +40,16 @@ const l = e(i)`
40
40
  container-type: inline-size;
41
41
  grid-area: histogram;
42
42
  `, h = e(n)`
43
- font-size: 0.75;
44
- overflow: visible;
43
+ font-size: 0.75em;
45
44
 
46
45
  @container (
47
46
  min-width: ${t("BREAK_PHABLET_MIN")}
48
47
  ) {
49
48
  font-size: 1em;
50
49
  }
51
- `, v = e.div`
50
+ `, A = e.div`
52
51
  grid-area: slider;
53
- `, A = e(r)`
52
+ `, v = e(i)`
54
53
  grid-area: reset;
55
54
  `, B = e.div`
56
55
  display: flex;
@@ -86,10 +85,10 @@ export {
86
85
  E as ChartTitle,
87
86
  h as Histogram,
88
87
  f as HistogramContainer,
89
- A as ResetButton,
88
+ v as ResetButton,
90
89
  y as Skymap,
91
90
  B as SkymapContainer,
92
- v as SliderContainer,
93
- l as ThreeVectorContainer,
94
- g as ThreeVectorLayout
91
+ A as SliderContainer,
92
+ g as ThreeVectorContainer,
93
+ l as ThreeVectorLayout
95
94
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubin-epo/epo-widget-lib",
3
- "version": "0.10.4",
3
+ "version": "1.0.0-beta.1",
4
4
  "description": "Rubin Observatory Education & Public Outreach team React scientific and educational widgets.",
5
5
  "author": "Rubin EPO",
6
6
  "license": "MIT",