@rubin-epo/epo-widget-lib 0.9.10 → 0.9.12

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 (39) hide show
  1. package/dist/CameraFilter.cjs +1 -1
  2. package/dist/CameraFilter.js +14 -15
  3. package/dist/FilterTool.cjs +1 -1
  4. package/dist/FilterTool.js +1 -1
  5. package/dist/atomic/Blinker/Blinker.cjs +1 -1
  6. package/dist/atomic/Blinker/Blinker.js +43 -41
  7. package/dist/atomic/Blinker/styles.cjs +19 -4
  8. package/dist/atomic/Blinker/styles.d.ts +272 -0
  9. package/dist/atomic/Blinker/styles.js +23 -6
  10. package/dist/atomic/Loader/index.cjs +1 -0
  11. package/dist/atomic/Loader/index.d.ts +6 -0
  12. package/dist/atomic/Loader/index.js +8 -0
  13. package/dist/atomic/Loader/styles.cjs +10 -0
  14. package/dist/atomic/Loader/styles.d.ts +272 -0
  15. package/dist/atomic/Loader/styles.js +15 -0
  16. package/dist/charts/Base/styles.d.ts +1 -1
  17. package/dist/charts/styles.d.ts +6 -6
  18. package/dist/layout/Controls/styles.cjs +14 -19
  19. package/dist/layout/Controls/styles.js +20 -25
  20. package/dist/widgets/CameraFilter/styles.cjs +21 -20
  21. package/dist/widgets/CameraFilter/styles.d.ts +13 -4
  22. package/dist/widgets/CameraFilter/styles.js +50 -47
  23. package/dist/widgets/FilterTool/styles.d.ts +6 -6
  24. package/dist/widgets/SourceSelector/Point/Point.cjs +1 -1
  25. package/dist/widgets/SourceSelector/Point/Point.d.ts +2 -7
  26. package/dist/widgets/SourceSelector/Point/Point.js +36 -32
  27. package/dist/widgets/SourceSelector/Point/styles.cjs +4 -6
  28. package/dist/widgets/SourceSelector/Point/styles.d.ts +482 -4
  29. package/dist/widgets/SourceSelector/Point/styles.js +5 -7
  30. package/dist/widgets/SourceSelector/PointSelector/index.cjs +1 -1
  31. package/dist/widgets/SourceSelector/PointSelector/index.js +35 -34
  32. package/dist/widgets/SourceSelector/SourceSelector.cjs +1 -1
  33. package/dist/widgets/SourceSelector/SourceSelector.d.ts +1 -0
  34. package/dist/widgets/SourceSelector/SourceSelector.js +78 -56
  35. package/dist/widgets/SourceSelector/styles.cjs +5 -9
  36. package/dist/widgets/SourceSelector/styles.js +6 -12
  37. package/dist/widgets/SupernovaThreeVector/Histogram/styles.d.ts +1 -1
  38. package/dist/widgets/SupernovaThreeVector/Skymap/styles.d.ts +7 -7
  39. package/package.json +2 -2
@@ -1,73 +1,95 @@
1
1
  "use client";
2
- import { jsxs as n, jsx as t, Fragment as _ } from "react/jsx-runtime";
3
- import { useState as i } from "react";
4
- import { useTranslation as q } from "react-i18next";
5
- import E from "@rubin-epo/epo-react-lib/IconComposer";
6
- import F from "../../layout/AspectRatio/index.js";
7
- import { BackgroundBlinker as N, ElapsedDisplay as P } from "./styles.js";
8
- import R from "./PointSelector/index.js";
9
- import T from "./Message/Message.js";
10
- const g = ({
11
- width: h = 600,
12
- height: p = 600,
13
- selectedSource: r = [],
14
- sources: S,
2
+ import { jsxs as f, jsx as a, Fragment as R } from "react/jsx-runtime";
3
+ import { useState as u } from "react";
4
+ import { useTranslation as U } from "react-i18next";
5
+ import $ from "@rubin-epo/epo-react-lib/IconComposer";
6
+ import v from "../../layout/AspectRatio/index.js";
7
+ import w from "./PointSelector/index.js";
8
+ import G from "../../atomic/Loader/index.js";
9
+ import { BackgroundBlinker as H } from "./styles.js";
10
+ import J from "./Message/Message.js";
11
+ import K from "../../atomic/ElapsedTime/ElapsedTime.js";
12
+ const Q = (n, c) => {
13
+ var r;
14
+ const s = { day: 0, hour: 0 }, o = n[c];
15
+ if (!o)
16
+ return s;
17
+ const e = (o == null ? void 0 : o.date) - ((r = n[0]) == null ? void 0 : r.date);
18
+ return e ? {
19
+ day: Math.round(e) || 0,
20
+ hour: Math.round(24 / e % 24) || 0
21
+ } : s;
22
+ }, b = ({
23
+ width: n = 600,
24
+ height: c = 600,
25
+ selectedSource: s = [],
26
+ sources: o,
15
27
  alerts: e = [],
16
- activeAlertIndex: c = 0,
17
- alertChangeCallback: k,
18
- selectionCallback: l,
19
- blinkConfig: M,
20
- isDisplayOnly: o = !1,
21
- className: b
28
+ activeAlertIndex: r = 0,
29
+ alertChangeCallback: C,
30
+ selectionCallback: d,
31
+ blinkConfig: k,
32
+ isDisplayOnly: i = !1,
33
+ isLoading: L,
34
+ className: V
22
35
  }) => {
23
- const [C, A] = i(!1), [V, d] = i(), [j, a] = i(!1), { t: m } = q(), u = "sourceSelectorWidget", x = (s) => {
24
- C && !o && (s ? r.includes(s) || (l && l(r.concat(s)), d(
25
- /* @__PURE__ */ n(_, { children: [
26
- /* @__PURE__ */ t(E, { icon: "checkmark" }),
27
- m("source_selector.messages.success")
28
- ] })
29
- ), a(!0)) : (d(m("source_selector.messages.failure")), a(!0)));
30
- }, B = () => {
31
- a(!1);
32
- }, f = e[c].date - e[0].date, I = Math.round(f), L = Math.round(24 / f % 24) || 0, W = o ? [e[c].image] : e.map(({ image: s }) => s);
33
- return /* @__PURE__ */ n(F, { ratio: "square", className: b, children: [
34
- !o && /* @__PURE__ */ t(
35
- T,
36
+ var M;
37
+ const [j, x] = u(!0), [B, l] = u(), [F, m] = u(!1), { t: g } = U(), h = "sourceSelectorWidget", p = !j && !L, S = () => {
38
+ l(g("source_selector.messages.failure")), m(!0);
39
+ }, P = (t) => {
40
+ if (!(!p || i))
41
+ if (t) {
42
+ const z = !!o.find(({ id: N }) => N === t), E = !s.includes(t);
43
+ z && E ? (d && d(s.concat(t)), l(
44
+ /* @__PURE__ */ f(R, { children: [
45
+ /* @__PURE__ */ a($, { icon: "checkmark" }),
46
+ g("source_selector.messages.success")
47
+ ] })
48
+ ), m(!0)) : S();
49
+ } else
50
+ S();
51
+ }, T = () => {
52
+ m(!1);
53
+ }, { day: W, hour: _ } = Q(e, r), q = i ? [(M = e[r]) == null ? void 0 : M.image] : e.map(({ image: t }) => t);
54
+ return /* @__PURE__ */ f(v, { ratio: "square", className: V, children: [
55
+ !i && /* @__PURE__ */ a(
56
+ J,
36
57
  {
37
- onMessageChangeCallback: B,
38
- isVisible: j,
39
- forIds: [u],
40
- children: V
58
+ onMessageChangeCallback: T,
59
+ isVisible: F,
60
+ forIds: [h],
61
+ children: B
41
62
  }
42
63
  ),
43
- /* @__PURE__ */ n(
44
- N,
64
+ /* @__PURE__ */ f(
65
+ H,
45
66
  {
46
- images: W,
47
- activeIndex: c,
48
- blinkCallback: k,
49
- loadedCallback: () => A(!0),
50
- ...M,
67
+ images: q,
68
+ activeIndex: r,
69
+ blinkCallback: C,
70
+ loadedCallback: () => x(!1),
71
+ ...k,
51
72
  children: [
52
- e.length > 0 && !o && /* @__PURE__ */ t(P, { day: I, hour: L }),
53
- /* @__PURE__ */ t(
54
- R,
73
+ e.length > 0 && !i && /* @__PURE__ */ a(K, { day: W, hour: _ }),
74
+ /* @__PURE__ */ a(
75
+ w,
55
76
  {
56
- id: u,
57
- onSelectCallback: x,
58
- width: h,
59
- height: p,
60
- sources: S,
61
- selectedSource: r
77
+ id: h,
78
+ onSelectCallback: P,
79
+ width: n,
80
+ height: c,
81
+ sources: o,
82
+ selectedSource: s
62
83
  }
63
84
  )
64
85
  ]
65
86
  }
66
- )
87
+ ),
88
+ !p && /* @__PURE__ */ a(G, {})
67
89
  ] });
68
90
  };
69
- g.displayName = "Widgets.SourceSelector";
70
- const X = g;
91
+ b.displayName = "Widgets.SourceSelector";
92
+ const se = b;
71
93
  export {
72
- X as default
94
+ se as default
73
95
  };
@@ -1,14 +1,10 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("styled-components"),l=require("../../atomic/Blinker/Blinker.cjs"),s=require("../../atomic/ElapsedTime/ElapsedTime.cjs"),i=t=>t&&t.__esModule?t:{default:t},e=i(o),a=e.default.svg`
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`
2
+ cursor: pointer;
2
3
  position: absolute;
3
- top: 0;
4
+ bottom: 0;
4
5
  left: 0;
5
- cursor: pointer;
6
- `,r=e.default(l.default)`
6
+ `,u=e.default(l.default)`
7
7
  position: absolute;
8
8
  width: 100%;
9
9
  height: 100%;
10
- `,u=e.default(s.default)`
11
- position: absolute;
12
- right: var(--PADDING_SMALL, 20px);
13
- bottom: var(--PADDING_SMALL, 20px);
14
- `;exports.BackgroundBlinker=r;exports.ElapsedDisplay=u;exports.SVG=a;
10
+ `;exports.BackgroundBlinker=u;exports.SVG=s;
@@ -1,23 +1,17 @@
1
1
  "use client";
2
2
  import o from "styled-components";
3
3
  import t from "../../atomic/Blinker/Blinker.js";
4
- import i from "../../atomic/ElapsedTime/ElapsedTime.js";
5
- const p = o.svg`
4
+ const r = o.svg`
5
+ cursor: pointer;
6
6
  position: absolute;
7
- top: 0;
7
+ bottom: 0;
8
8
  left: 0;
9
- cursor: pointer;
10
- `, l = o(t)`
9
+ `, s = o(t)`
11
10
  position: absolute;
12
11
  width: 100%;
13
12
  height: 100%;
14
- `, n = o(i)`
15
- position: absolute;
16
- right: var(--PADDING_SMALL, 20px);
17
- bottom: var(--PADDING_SMALL, 20px);
18
13
  `;
19
14
  export {
20
- l as BackgroundBlinker,
21
- n as ElapsedDisplay,
22
- p as SVG
15
+ s as BackgroundBlinker,
16
+ r as SVG
23
17
  };
@@ -195,7 +195,7 @@ export declare const YLabel: import("styled-components").IStyledComponent<"web",
195
195
  stroke?: string | undefined;
196
196
  strokeDasharray?: string | number | undefined;
197
197
  strokeDashoffset?: string | number | undefined;
198
- strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
198
+ strokeLinecap?: "inherit" | "square" | "butt" | "round" | undefined;
199
199
  strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
200
200
  strokeMiterlimit?: string | number | undefined;
201
201
  strokeOpacity?: string | number | undefined;
@@ -195,7 +195,7 @@ export declare const Background: import("styled-components").IStyledComponent<"w
195
195
  stroke?: string | undefined;
196
196
  strokeDasharray?: string | number | undefined;
197
197
  strokeDashoffset?: string | number | undefined;
198
- strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
198
+ strokeLinecap?: "inherit" | "square" | "butt" | "round" | undefined;
199
199
  strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
200
200
  strokeMiterlimit?: string | number | undefined;
201
201
  strokeOpacity?: string | number | undefined;
@@ -677,7 +677,7 @@ export declare const Graticule: import("styled-components").IStyledComponent<"we
677
677
  stroke?: string | undefined;
678
678
  strokeDasharray?: string | number | undefined;
679
679
  strokeDashoffset?: string | number | undefined;
680
- strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
680
+ strokeLinecap?: "inherit" | "square" | "butt" | "round" | undefined;
681
681
  strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
682
682
  strokeMiterlimit?: string | number | undefined;
683
683
  strokeOpacity?: string | number | undefined;
@@ -1159,7 +1159,7 @@ export declare const Outline: import("styled-components").IStyledComponent<"web"
1159
1159
  stroke?: string | undefined;
1160
1160
  strokeDasharray?: string | number | undefined;
1161
1161
  strokeDashoffset?: string | number | undefined;
1162
- strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
1162
+ strokeLinecap?: "inherit" | "square" | "butt" | "round" | undefined;
1163
1163
  strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
1164
1164
  strokeMiterlimit?: string | number | undefined;
1165
1165
  strokeOpacity?: string | number | undefined;
@@ -1641,7 +1641,7 @@ export declare const LatLabel: import("styled-components").IStyledComponent<"web
1641
1641
  stroke?: string | undefined;
1642
1642
  strokeDasharray?: string | number | undefined;
1643
1643
  strokeDashoffset?: string | number | undefined;
1644
- strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
1644
+ strokeLinecap?: "inherit" | "square" | "butt" | "round" | undefined;
1645
1645
  strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
1646
1646
  strokeMiterlimit?: string | number | undefined;
1647
1647
  strokeOpacity?: string | number | undefined;
@@ -2123,7 +2123,7 @@ export declare const LongLabel: import("styled-components").IStyledComponent<"we
2123
2123
  stroke?: string | undefined;
2124
2124
  strokeDasharray?: string | number | undefined;
2125
2125
  strokeDashoffset?: string | number | undefined;
2126
- strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
2126
+ strokeLinecap?: "inherit" | "square" | "butt" | "round" | undefined;
2127
2127
  strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
2128
2128
  strokeMiterlimit?: string | number | undefined;
2129
2129
  strokeOpacity?: string | number | undefined;
@@ -2605,7 +2605,7 @@ export declare const ImageStackerWrapper: import("styled-components").IStyledCom
2605
2605
  stroke?: string | undefined;
2606
2606
  strokeDasharray?: string | number | undefined;
2607
2607
  strokeDashoffset?: string | number | undefined;
2608
- strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
2608
+ strokeLinecap?: "inherit" | "square" | "butt" | "round" | undefined;
2609
2609
  strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
2610
2610
  strokeMiterlimit?: string | number | undefined;
2611
2611
  strokeOpacity?: string | number | undefined;
@@ -3087,7 +3087,7 @@ export declare const UserObject: import("styled-components").IStyledComponent<"w
3087
3087
  stroke?: string | undefined;
3088
3088
  strokeDasharray?: string | number | undefined;
3089
3089
  strokeDashoffset?: string | number | undefined;
3090
- strokeLinecap?: "inherit" | "butt" | "round" | "square" | undefined;
3090
+ strokeLinecap?: "inherit" | "square" | "butt" | "round" | undefined;
3091
3091
  strokeLinejoin?: "inherit" | "round" | "miter" | "bevel" | undefined;
3092
3092
  strokeMiterlimit?: string | number | undefined;
3093
3093
  strokeOpacity?: string | number | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubin-epo/epo-widget-lib",
3
- "version": "0.9.10",
3
+ "version": "0.9.12",
4
4
  "description": "Rubin Observatory Education & Public Outreach team React scientific and educational widgets.",
5
5
  "author": "Rubin EPO",
6
6
  "license": "MIT",
@@ -38,7 +38,7 @@
38
38
  "react-i18next": "^12.2.0"
39
39
  },
40
40
  "dependencies": {
41
- "@rubin-epo/epo-react-lib": "^2.0.20",
41
+ "@rubin-epo/epo-react-lib": "2.0.24",
42
42
  "context-filter-polyfill": "^0.3.6",
43
43
  "d3-array": "^3.2.4",
44
44
  "d3-geo": "^3.1.0",