@rubin-epo/epo-widget-lib 2.0.9 → 2.0.11

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 (29) hide show
  1. package/dist/charts/Readout/index.cjs +1 -1
  2. package/dist/charts/Readout/index.js +18 -25
  3. package/dist/charts/ScatterPlot/index.cjs +1 -1
  4. package/dist/charts/ScatterPlot/index.js +50 -53
  5. package/dist/localeStrings/en/epo-widget-lib.json +3 -2
  6. package/dist/localeStrings/es/epo-widget-lib.json +3 -2
  7. package/dist/localeStrings/fr/epo-widget-lib.json +1 -1
  8. package/dist/widgets/OrbitalSim/Controls/PlaybackSpeed.cjs +1 -1
  9. package/dist/widgets/OrbitalSim/Controls/PlaybackSpeed.js +5 -5
  10. package/dist/widgets/OrbitalSim/Controls/styles.cjs +7 -3
  11. package/dist/widgets/OrbitalSim/Controls/styles.d.ts +1 -1
  12. package/dist/widgets/OrbitalSim/Controls/styles.js +9 -5
  13. package/dist/widgets/OrbitalSim/Orbitals/OrbitalDetails.cjs +1 -1
  14. package/dist/widgets/OrbitalSim/Orbitals/OrbitalDetails.js +16 -16
  15. package/dist/widgets/OrbitalSim/Orbitals/styles.cjs +1 -1
  16. package/dist/widgets/OrbitalSim/Orbitals/styles.js +1 -1
  17. package/dist/widgets/OrbitalSim/styles.cjs +5 -2
  18. package/dist/widgets/OrbitalSim/styles.js +9 -6
  19. package/dist/widgets/SortableTable/SortableTable.cjs +1 -1
  20. package/dist/widgets/SortableTable/SortableTable.d.ts +1 -1
  21. package/dist/widgets/SortableTable/SortableTable.js +32 -24
  22. package/dist/widgets/SortableTable/styles.cjs +11 -2
  23. package/dist/widgets/SortableTable/styles.d.ts +1 -0
  24. package/dist/widgets/SortableTable/styles.js +13 -3
  25. package/dist/widgets/SourceSelector/MovingSourceSelector.cjs +1 -1
  26. package/dist/widgets/SourceSelector/MovingSourceSelector.js +44 -34
  27. package/dist/widgets/SupernovaThreeVector/Skymap/index.cjs +1 -1
  28. package/dist/widgets/SupernovaThreeVector/Skymap/index.js +39 -45
  29. package/package.json +2 -2
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),c=require("@rubin-epo/epo-react-lib/styles");require("../Base/index.cjs");require("../XAxis/index.cjs");require("../YAxis/index.cjs");require("../Guidelines/index.cjs");require("../Tooltip/index.cjs");require("../Bars/index.cjs");const d=require("../Viewport/index.cjs"),y=require("../ForeignObject/index.cjs");require("../ScatterPlot/index.cjs");const o=require("./styles.cjs"),j=(r="")=>{const i=["top","right"],a=["center","center"],n=r?[...r.split(" "),...a].slice(0,2):i,e={justifyContent:null,alignItems:null};return n.forEach(s=>{switch(s){case"center":e.alignItems=e.alignItems??"center",e.justifyContent=e.justifyContent??"center";break;case"top":e.alignItems="start";break;case"right":e.justifyContent="end";break;case"bottom":e.alignItems="end";break;case"left":e.justifyContent="start";break}}),e},u=({className:r,children:i,position:a,viewport:n,forIds:e,forScreenreaders:s})=>{const l=t.jsx(y.default,{children:t.jsx(o.DisplayContainer,{style:j(a),children:t.jsxs(o.Display,{form:Array.isArray(e)?e.join(" "):e,className:r,children:[t.jsx("span",{"aria-hidden":!!s,children:i}),t.jsx(c.ScreenreaderText,{children:s})]})})});return n?t.jsx(d.default,{...n,children:l}):l};u.displayName="Charts.Readout";exports.default=u;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),u=require("@rubin-epo/epo-react-lib/styles"),o=require("./styles.cjs"),d=require("../ForeignObject/index.cjs"),y=require("../Viewport/index.cjs"),j=(n="")=>{const r=["top","right"],a=["center","center"],s=n?[...n.split(" "),...a].slice(0,2):r,e={justifyContent:null,alignItems:null};return s.forEach(i=>{switch(i){case"center":e.alignItems=e.alignItems??"center",e.justifyContent=e.justifyContent??"center";break;case"top":e.alignItems="start";break;case"right":e.justifyContent="end";break;case"bottom":e.alignItems="end";break;case"left":e.justifyContent="start";break}}),e},c=({className:n,children:r,position:a,viewport:s,forIds:e,forScreenreaders:i})=>{const l=t.jsx(d.default,{children:t.jsx(o.DisplayContainer,{style:j(a),children:t.jsxs(o.Display,{form:Array.isArray(e)?e.join(" "):e,className:n,children:[t.jsx("span",{"aria-hidden":!!i,children:r}),t.jsx(u.ScreenreaderText,{children:i})]})})});return s?t.jsx(y.default,{...s,children:l}):l};c.displayName="Charts.Readout";exports.default=c;
@@ -1,22 +1,15 @@
1
1
  import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
2
  import { ScreenreaderText as c } from "@rubin-epo/epo-react-lib/styles";
3
- import "../Base/index.js";
4
- import "../XAxis/index.js";
5
- import "../YAxis/index.js";
6
- import "../Guidelines/index.js";
7
- import "../Tooltip/index.js";
8
- import "../Bars/index.js";
9
- import m from "../Viewport/index.js";
10
- import p from "../ForeignObject/index.js";
11
- import "../ScatterPlot/index.js";
12
- import { DisplayContainer as f, Display as u } from "./styles.js";
13
- const d = (i = "") => {
14
- const o = ["top", "right"], s = ["center", "center"], r = i ? [...i.split(" "), ...s].slice(0, 2) : o, t = {
3
+ import { DisplayContainer as m, Display as f } from "./styles.js";
4
+ import u from "../ForeignObject/index.js";
5
+ import d from "../Viewport/index.js";
6
+ const p = (n = "") => {
7
+ const s = ["top", "right"], o = ["center", "center"], i = n ? [...n.split(" "), ...o].slice(0, 2) : s, t = {
15
8
  justifyContent: null,
16
9
  alignItems: null
17
10
  };
18
- return r.forEach((n) => {
19
- switch (n) {
11
+ return i.forEach((r) => {
12
+ switch (r) {
20
13
  case "center":
21
14
  t.alignItems = t.alignItems ?? "center", t.justifyContent = t.justifyContent ?? "center";
22
15
  break;
@@ -35,25 +28,25 @@ const d = (i = "") => {
35
28
  }
36
29
  }), t;
37
30
  }, y = ({
38
- className: i,
39
- children: o,
40
- position: s,
41
- viewport: r,
31
+ className: n,
32
+ children: s,
33
+ position: o,
34
+ viewport: i,
42
35
  forIds: t,
43
- forScreenreaders: n
36
+ forScreenreaders: r
44
37
  }) => {
45
- const a = /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(f, { style: d(s), children: /* @__PURE__ */ l(
46
- u,
38
+ const a = /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(m, { style: p(o), children: /* @__PURE__ */ l(
39
+ f,
47
40
  {
48
41
  form: Array.isArray(t) ? t.join(" ") : t,
49
- className: i,
42
+ className: n,
50
43
  children: [
51
- /* @__PURE__ */ e("span", { "aria-hidden": !!n, children: o }),
52
- /* @__PURE__ */ e(c, { children: n })
44
+ /* @__PURE__ */ e("span", { "aria-hidden": !!r, children: s }),
45
+ /* @__PURE__ */ e(c, { children: r })
53
46
  ]
54
47
  }
55
48
  ) }) });
56
- return r ? /* @__PURE__ */ e(m, { ...r, children: a }) : a;
49
+ return i ? /* @__PURE__ */ e(d, { ...i, children: a }) : a;
57
50
  };
58
51
  y.displayName = "Charts.Readout";
59
52
  export {
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),J=require("react");require("../Base/index.cjs");const K=require("../XAxis/index.cjs"),Q=require("../YAxis/index.cjs"),$=require("../Guidelines/index.cjs"),U=require("../Points/index.cjs"),V=require("../Tooltip/index.cjs"),X=require("../ClippingContainer/index.cjs");require("../Bars/index.cjs");require("../Viewport/index.cjs");const R=require("../hooks/useAxis.cjs"),Y=require("./styles.cjs"),H=require("../defaults.cjs"),Z=require("../canvas/Points/index.cjs"),w={svg:U.default,canvas:Z.default},M=({data:C,className:D,xAxis:l,yAxis:c,width:d,height:u,title:T,activePointId:p,margins:z,tooltip:a,onLoadedCallback:B,renderer:E="svg",plotChildren:y})=>{const[q,h]=J.useState(),{label:O,points:x}=C,o={...H.default.margins,...z},e=typeof q<"u"?x[q]:x.find(({id:v})=>v===p),f=[0+o.left,d-o.right],b=[u-o.bottom,0+o.top],[r,j,t]=R.default({...l,range:f}),[i,m,s]=R.default({...c,range:b}),S=s(i[0]),g=t(r[0]),I=s(i[1]),_=t(r[1]),k="x-axis-label",L="y-axis-label",N=Math.abs(f[1]-f[0]),W=Math.abs(b[1]-b[0]),F=w[E],P=n.jsx(F,{data:x,onHoverCallback:a?v=>h(v):void 0,onHoverOutCallback:a?()=>h(void 0):void 0,width:d,height:u,xScale:t,yScale:s,label:O,onLoadedCallback:B}),G={Data:P,xScale:t,yScale:s,yStart:S,yEnd:I,xStart:g,xEnd:_,yDomain:i,xDomain:r};return n.jsxs(Y.Chart,{verticalLabel:c.label,verticalLabelId:L,horizontalLabel:l.label,horizontalLabelId:k,className:D,width:d,height:u,title:T,children:[n.jsx(Q.default,{ticks:m,x:g,labelledById:L,yDomain:i,yScale:s}),n.jsxs(X.default,{x:g,y:I,width:N,height:W,children:[l.guidelines&&n.jsx($.default,{guides:j.length,direction:"vertical",xDomain:r,yDomain:i,xScale:t,yScale:s}),c.guidelines&&n.jsx($.default,{guides:m.length,xDomain:r,yDomain:i,xScale:t,yScale:s}),y?y(G):P]}),n.jsx(K.default,{ticks:j,y:S,labelledById:k,xDomain:r,xScale:t}),a&&n.jsxs(V.default,{x:e?t(e.x):void 0,y:e?s(e.y):void 0,visible:!!e,offset:H.default.pointRadius,children:[e&&typeof a=="function"&&a(e),e&&typeof a=="string"&&a]})]})};M.displayName="Charts.ScatterPlot";exports.default=M;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),J=require("react"),$=require("../hooks/useAxis.cjs"),K=require("./styles.cjs"),R=require("../defaults.cjs"),Q=require("../canvas/Points/index.cjs"),U=require("../YAxis/index.cjs"),V=require("../ClippingContainer/index.cjs"),H=require("../Guidelines/index.cjs"),X=require("../XAxis/index.cjs"),Y=require("../Tooltip/index.cjs"),Z=require("../Points/index.cjs"),w={svg:Z.default,canvas:Q.default},M=({data:C,className:D,xAxis:l,yAxis:c,width:d,height:u,title:T,activePointId:p,margins:z,tooltip:a,onLoadedCallback:B,renderer:E="svg",plotChildren:y})=>{const[q,h]=J.useState(),{label:O,points:x}=C,o={...R.default.margins,...z},e=typeof q<"u"?x[q]:x.find(({id:v})=>v===p),f=[0+o.left,d-o.right],b=[u-o.bottom,0+o.top],[r,j,t]=$.default({...l,range:f}),[i,m,s]=$.default({...c,range:b}),S=s(i[0]),g=t(r[0]),I=s(i[1]),_=t(r[1]),k="x-axis-label",L="y-axis-label",N=Math.abs(f[1]-f[0]),W=Math.abs(b[1]-b[0]),F=w[E],P=n.jsx(F,{data:x,onHoverCallback:a?v=>h(v):void 0,onHoverOutCallback:a?()=>h(void 0):void 0,width:d,height:u,xScale:t,yScale:s,label:O,onLoadedCallback:B}),G={Data:P,xScale:t,yScale:s,yStart:S,yEnd:I,xStart:g,xEnd:_,yDomain:i,xDomain:r};return n.jsxs(K.Chart,{verticalLabel:c.label,verticalLabelId:L,horizontalLabel:l.label,horizontalLabelId:k,className:D,width:d,height:u,title:T,children:[n.jsx(U.default,{ticks:m,x:g,labelledById:L,yDomain:i,yScale:s}),n.jsxs(V.default,{x:g,y:I,width:N,height:W,children:[l.guidelines&&n.jsx(H.default,{guides:j.length,direction:"vertical",xDomain:r,yDomain:i,xScale:t,yScale:s}),c.guidelines&&n.jsx(H.default,{guides:m.length,xDomain:r,yDomain:i,xScale:t,yScale:s}),y?y(G):P]}),n.jsx(X.default,{ticks:j,y:S,labelledById:k,xDomain:r,xScale:t}),a&&n.jsxs(Y.default,{x:e?t(e.x):void 0,y:e?s(e.y):void 0,visible:!!e,offset:R.default.pointRadius,children:[e&&typeof a=="function"&&a(e),e&&typeof a=="string"&&a]})]})};M.displayName="Charts.ScatterPlot";exports.default=M;
@@ -1,22 +1,19 @@
1
1
  "use client";
2
- import { jsxs as u, jsx as s } from "react/jsx-runtime";
2
+ import { jsxs as u, jsx as i } from "react/jsx-runtime";
3
3
  import { useState as F } from "react";
4
- import "../Base/index.js";
5
- import J from "../XAxis/index.js";
6
- import K from "../YAxis/index.js";
7
- import R from "../Guidelines/index.js";
8
- import Q from "../Points/index.js";
9
- import U from "../Tooltip/index.js";
10
- import V from "../ClippingContainer/index.js";
11
- import "../Bars/index.js";
12
- import "../Viewport/index.js";
13
- import D from "../hooks/useAxis.js";
14
- import { Chart as Z } from "./styles.js";
15
- import T from "../defaults.js";
16
- import _ from "../canvas/Points/index.js";
4
+ import R from "../hooks/useAxis.js";
5
+ import { Chart as J } from "./styles.js";
6
+ import D from "../defaults.js";
7
+ import K from "../canvas/Points/index.js";
8
+ import Q from "../YAxis/index.js";
9
+ import U from "../ClippingContainer/index.js";
10
+ import T from "../Guidelines/index.js";
11
+ import V from "../XAxis/index.js";
12
+ import Z from "../Tooltip/index.js";
13
+ import _ from "../Points/index.js";
17
14
  const $ = {
18
- svg: Q,
19
- canvas: _
15
+ svg: _,
16
+ canvas: K
20
17
  }, w = ({
21
18
  data: j,
22
19
  className: z,
@@ -32,32 +29,32 @@ const $ = {
32
29
  renderer: G = "svg",
33
30
  plotChildren: x
34
31
  }) => {
35
- const [y, h] = F(), { label: N, points: f } = j, a = { ...T.margins, ...M }, t = typeof y < "u" ? f[y] : f.find(({ id: v }) => v === E), p = [0 + a.left, d - a.right], b = [m - a.bottom, 0 + a.top], [i, I, o] = D({ ...l, range: p }), [r, P, e] = D({ ...c, range: b }), S = e(r[0]), g = o(i[0]), k = e(r[1]), O = o(i[1]), C = "x-axis-label", L = "y-axis-label", W = Math.abs(p[1] - p[0]), X = Math.abs(b[1] - b[0]), Y = $[G], H = /* @__PURE__ */ s(
32
+ const [y, h] = F(), { label: N, points: f } = j, r = { ...D.margins, ...M }, t = typeof y < "u" ? f[y] : f.find(({ id: p }) => p === E), b = [0 + r.left, d - r.right], g = [m - r.bottom, 0 + r.top], [s, I, e] = R({ ...l, range: b }), [a, P, o] = R({ ...c, range: g }), S = o(a[0]), v = e(s[0]), k = o(a[1]), O = e(s[1]), C = "x-axis-label", L = "y-axis-label", W = Math.abs(b[1] - b[0]), X = Math.abs(g[1] - g[0]), Y = $[G], H = /* @__PURE__ */ i(
36
33
  Y,
37
34
  {
38
35
  data: f,
39
- onHoverCallback: n ? (v) => h(v) : void 0,
36
+ onHoverCallback: n ? (p) => h(p) : void 0,
40
37
  onHoverOutCallback: n ? () => h(void 0) : void 0,
41
38
  width: d,
42
39
  height: m,
43
- xScale: o,
44
- yScale: e,
40
+ xScale: e,
41
+ yScale: o,
45
42
  label: N,
46
43
  onLoadedCallback: A
47
44
  }
48
45
  ), q = {
49
46
  Data: H,
50
- xScale: o,
51
- yScale: e,
47
+ xScale: e,
48
+ yScale: o,
52
49
  yStart: S,
53
50
  yEnd: k,
54
- xStart: g,
51
+ xStart: v,
55
52
  xEnd: O,
56
- yDomain: r,
57
- xDomain: i
53
+ yDomain: a,
54
+ xDomain: s
58
55
  };
59
56
  return /* @__PURE__ */ u(
60
- Z,
57
+ J,
61
58
  {
62
59
  verticalLabel: c.label,
63
60
  verticalLabelId: L,
@@ -68,66 +65,66 @@ const $ = {
68
65
  height: m,
69
66
  title: B,
70
67
  children: [
71
- /* @__PURE__ */ s(
72
- K,
68
+ /* @__PURE__ */ i(
69
+ Q,
73
70
  {
74
71
  ticks: P,
75
- x: g,
72
+ x: v,
76
73
  labelledById: L,
77
- yDomain: r,
78
- yScale: e
74
+ yDomain: a,
75
+ yScale: o
79
76
  }
80
77
  ),
81
78
  /* @__PURE__ */ u(
82
- V,
79
+ U,
83
80
  {
84
- x: g,
81
+ x: v,
85
82
  y: k,
86
83
  width: W,
87
84
  height: X,
88
85
  children: [
89
- l.guidelines && /* @__PURE__ */ s(
90
- R,
86
+ l.guidelines && /* @__PURE__ */ i(
87
+ T,
91
88
  {
92
89
  guides: I.length,
93
90
  direction: "vertical",
94
- xDomain: i,
95
- yDomain: r,
96
- xScale: o,
97
- yScale: e
91
+ xDomain: s,
92
+ yDomain: a,
93
+ xScale: e,
94
+ yScale: o
98
95
  }
99
96
  ),
100
- c.guidelines && /* @__PURE__ */ s(
101
- R,
97
+ c.guidelines && /* @__PURE__ */ i(
98
+ T,
102
99
  {
103
100
  guides: P.length,
104
- xDomain: i,
105
- yDomain: r,
106
- xScale: o,
107
- yScale: e
101
+ xDomain: s,
102
+ yDomain: a,
103
+ xScale: e,
104
+ yScale: o
108
105
  }
109
106
  ),
110
107
  x ? x(q) : H
111
108
  ]
112
109
  }
113
110
  ),
114
- /* @__PURE__ */ s(
115
- J,
111
+ /* @__PURE__ */ i(
112
+ V,
116
113
  {
117
114
  ticks: I,
118
115
  y: S,
119
116
  labelledById: C,
120
- xDomain: i,
121
- xScale: o
117
+ xDomain: s,
118
+ xScale: e
122
119
  }
123
120
  ),
124
121
  n && /* @__PURE__ */ u(
125
- U,
122
+ Z,
126
123
  {
127
- x: t ? o(t.x) : void 0,
128
- y: t ? e(t.y) : void 0,
124
+ x: t ? e(t.x) : void 0,
125
+ y: t ? o(t.y) : void 0,
129
126
  visible: !!t,
130
- offset: T.pointRadius,
127
+ offset: D.pointRadius,
131
128
  children: [
132
129
  t && typeof n == "function" && n(t),
133
130
  t && typeof n == "string" && n
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "blinker": {
3
3
  "controls": {
4
- "backward": "Rewind",
4
+ "backward": "Backward",
5
5
  "forward": "Forward",
6
6
  "reset": "Reset",
7
7
  "play": "Play",
@@ -66,7 +66,8 @@
66
66
  "sources": {
67
67
  "galaxy": "Galaxy",
68
68
  "supernova": "Supernova",
69
- "observation": "Observation"
69
+ "observation": "Observation",
70
+ "asteroid": "Asteroid"
70
71
  }
71
72
  },
72
73
  "source_selector": {
@@ -53,7 +53,8 @@
53
53
  "sources": {
54
54
  "galaxy": "Galaxia",
55
55
  "supernova": "Supernova",
56
- "observation": "Observación"
56
+ "observation": "Observación",
57
+ "asteroid": "Asteroide"
57
58
  }
58
59
  },
59
60
  "source_selector": {
@@ -77,7 +78,7 @@
77
78
  },
78
79
  "blinker": {
79
80
  "controls": {
80
- "backward": "Regresar",
81
+ "backward": "Hacia atrás",
81
82
  "forward": "Adelantar",
82
83
  "pause": "Pausar",
83
84
  "play": "Reproducir",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "blinker": {
3
3
  "controls": {
4
- "backward": "Revenir en arrière",
4
+ "backward": "Reculer",
5
5
  "forward": "Avancer",
6
6
  "play": "Lecture",
7
7
  "pause": "Pause"
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime");require("react");const s=require("../../../node_modules/prop-types/index.cjs"),f=require("react-i18next"),h=require("../orbitalUtilities.cjs"),_=require("@rubin-epo/epo-react-lib/HorizontalSlider"),a=require("./styles.cjs"),k=r=>r&&r.__esModule?r:{default:r},S=k(_);function x({dayPerVizSec:r,elapsedTime:d,sliderOnChangeCallback:j,speeds:n}){const{t}=f.useTranslation();function l(o,u){const b=d<0,m=Math.abs(d)/365.256,i=Math.floor(m),c=Math.floor(365.256*(m-i));let p={},y={};return p={number:h.formatValue(b?-i:i),string:t("elapsed_time.interval.year",{count:i})},y={number:h.formatValue(b?-c:c),string:t("elapsed_time.interval.day",{count:c})},o==="days"?y[u]:o==="years"?p[u]:null}return e.jsx(e.Fragment,{children:e.jsxs(a.PlaybackContainer,{children:[e.jsxs(a.PlaybackSpeedSliderHeader,{children:[e.jsx(a.PlaybackSpeedTitle,{children:t("orbital_sim.playback.time_step")}),e.jsx(a.PlaybackSpeedSliderLabel,{children:t("orbital_sim.playback.sec_with_count",{count:Math.round(r)})})]}),e.jsx(a.PlaybackSpeedSliderLabelTop,{children:t("orbital_sim.playback.time_equivalence",{firstTime:t("orbit_viewer.playback.interval.secWithCount",{count:1}),secondTime:t("orbit_viewer.playback.interval.yearWithCount",{count:1}),context:"verbose"})}),e.jsx(a.PlaybackSpeedSliderLabelBottom,{children:t("orbital_sim.playback.normal_time")}),e.jsx(a.PlaybackSpeedSliderWrapper,{children:e.jsx(S.default,{isVertical:!0,min:n.min,invert:!0,max:n.max,step:n.step,value:r,onChangeCallback:j})}),e.jsxs(a.ElapsedTimeContainer,{children:[e.jsx(a.ElapsedTimeTitle,{children:t("elapsed_time.title")}),e.jsxs(a.ElapsedTimeInner,{children:[e.jsxs(a.ElapsedTimeBlock,{children:[e.jsx(a.ElapsedVal,{children:l("years","number")}),e.jsx("div",{children:l("years","string")})]}),e.jsx(a.ElapsedTimeDivider,{}),e.jsxs(a.ElapsedTimeBlock,{children:[e.jsx(a.ElapsedVal,{children:l("days","number")}),e.jsx(a.ElapsedLabel,{children:l("days","string")})]})]})]})]})})}x.propTypes={dayPerVizSec:s.default.number,elapsedTime:s.default.number,speeds:s.default.object,sliderOnChangeCallback:s.default.func};exports.default=x;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime");require("react");const s=require("../../../node_modules/prop-types/index.cjs"),f=require("react-i18next"),h=require("../orbitalUtilities.cjs"),_=require("@rubin-epo/epo-react-lib/HorizontalSlider"),a=require("./styles.cjs"),k=r=>r&&r.__esModule?r:{default:r},S=k(_);function x({dayPerVizSec:r,elapsedTime:c,sliderOnChangeCallback:j,speeds:n}){const{t}=f.useTranslation();function l(o,u){const b=c<0,m=Math.abs(c)/365.256,i=Math.floor(m),d=Math.floor(365.256*(m-i));let p={},y={};return p={number:h.formatValue(b?-i:i),string:t("elapsed_time.interval.year",{count:i})},y={number:h.formatValue(b?-d:d),string:t("elapsed_time.interval.day",{count:d})},o==="days"?y[u]:o==="years"?p[u]:null}return e.jsx(e.Fragment,{children:e.jsxs(a.PlaybackSpeedContainer,{children:[e.jsxs(a.PlaybackSpeedSliderHeader,{children:[e.jsx(a.PlaybackSpeedTitle,{children:t("orbital_sim.playback.time_step")}),e.jsx(a.PlaybackSpeedSliderLabel,{children:t("orbital_sim.playback.sec_with_count",{count:Math.round(r)})})]}),e.jsx(a.PlaybackSpeedSliderLabelTop,{children:t("orbital_sim.playback.time_equivalence",{firstTime:t("orbit_viewer.playback.interval.secWithCount",{count:1}),secondTime:t("orbit_viewer.playback.interval.yearWithCount",{count:1}),context:"verbose"})}),e.jsx(a.PlaybackSpeedSliderLabelBottom,{children:t("orbital_sim.playback.normal_time")}),e.jsx(a.PlaybackSpeedSliderWrapper,{children:e.jsx(S.default,{isVertical:!0,min:n.min,invert:!0,max:n.max,step:n.step,value:r,onChangeCallback:j})}),e.jsxs(a.ElapsedTimeContainer,{children:[e.jsx(a.ElapsedTimeTitle,{children:t("elapsed_time.title")}),e.jsxs(a.ElapsedTimeInner,{children:[e.jsxs(a.ElapsedTimeBlock,{children:[e.jsx(a.ElapsedVal,{children:l("years","number")}),e.jsx("div",{children:l("years","string")})]}),e.jsx(a.ElapsedTimeDivider,{}),e.jsxs(a.ElapsedTimeBlock,{children:[e.jsx(a.ElapsedVal,{children:l("days","number")}),e.jsx(a.ElapsedLabel,{children:l("days","string")})]})]})]})]})})}x.propTypes={dayPerVizSec:s.default.number,elapsedTime:s.default.number,speeds:s.default.object,sliderOnChangeCallback:s.default.func};exports.default=x;
@@ -1,15 +1,15 @@
1
1
  "use client";
2
- import { jsx as e, Fragment as S, jsxs as a } from "react/jsx-runtime";
2
+ import { jsx as e, Fragment as _, jsxs as a } from "react/jsx-runtime";
3
3
  import "react";
4
4
  import l from "../../../node_modules/prop-types/index.js";
5
5
  import { useTranslation as T } from "react-i18next";
6
6
  import { formatValue as h } from "../orbitalUtilities.js";
7
7
  import v from "@rubin-epo/epo-react-lib/HorizontalSlider";
8
- import { PlaybackContainer as P, PlaybackSpeedSliderHeader as g, PlaybackSpeedTitle as C, PlaybackSpeedSliderLabel as E, PlaybackSpeedSliderLabelTop as x, PlaybackSpeedSliderLabelBottom as j, PlaybackSpeedSliderWrapper as L, ElapsedTimeContainer as M, ElapsedTimeTitle as w, ElapsedTimeInner as D, ElapsedTimeBlock as f, ElapsedVal as k, ElapsedTimeDivider as V, ElapsedLabel as W } from "./styles.js";
8
+ import { PlaybackSpeedContainer as P, PlaybackSpeedSliderHeader as g, PlaybackSpeedTitle as C, PlaybackSpeedSliderLabel as E, PlaybackSpeedSliderLabelTop as x, PlaybackSpeedSliderLabelBottom as j, PlaybackSpeedSliderWrapper as L, ElapsedTimeContainer as M, ElapsedTimeTitle as w, ElapsedTimeInner as D, ElapsedTimeBlock as f, ElapsedVal as k, ElapsedTimeDivider as V, ElapsedLabel as W } from "./styles.js";
9
9
  function B({
10
10
  dayPerVizSec: c,
11
11
  elapsedTime: s,
12
- sliderOnChangeCallback: _,
12
+ sliderOnChangeCallback: S,
13
13
  speeds: n
14
14
  }) {
15
15
  const { t: r } = T();
@@ -24,7 +24,7 @@ function B({
24
24
  string: r("elapsed_time.interval.day", { count: o })
25
25
  }, d === "days" ? y[m] : d === "years" ? u[m] : null;
26
26
  }
27
- return /* @__PURE__ */ e(S, { children: /* @__PURE__ */ a(P, { children: [
27
+ return /* @__PURE__ */ e(_, { children: /* @__PURE__ */ a(P, { children: [
28
28
  /* @__PURE__ */ a(g, { children: [
29
29
  /* @__PURE__ */ e(C, { children: r("orbital_sim.playback.time_step") }),
30
30
  /* @__PURE__ */ e(E, { children: r("orbital_sim.playback.sec_with_count", {
@@ -50,7 +50,7 @@ function B({
50
50
  max: n.max,
51
51
  step: n.step,
52
52
  value: c,
53
- onChangeCallback: _
53
+ onChangeCallback: S
54
54
  }
55
55
  ) }),
56
56
  /* @__PURE__ */ a(M, { children: [
@@ -1,4 +1,4 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("styled-components"),l=a=>a&&a.__esModule?a:{default:a},e=l(t),r=e.default.div`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("styled-components"),i=a=>a&&a.__esModule?a:{default:a},e=i(t),l=e.default.div`
2
2
  display: grid;
3
3
  grid-template-columns: repeat(2, 1fr);
4
4
  grid-template-rows: repeat(5, 1fr);
@@ -9,7 +9,11 @@
9
9
  right: 20px;
10
10
  top: 10px;
11
11
  height: 95%;
12
- `,i=e.default.div`
12
+
13
+ @container orbital-sim-context (width < 650px) {
14
+ height: 85%;
15
+ }
16
+ `,r=e.default.div`
13
17
  width: auto;
14
18
  display: flex;
15
19
  position: absolute;
@@ -117,4 +121,4 @@
117
121
  line-height: 1.333;
118
122
  color: var(--black);
119
123
  color: var(--black);
120
- `;exports.ElapsedLabel=u;exports.ElapsedTimeBlock=x;exports.ElapsedTimeContainer=b;exports.ElapsedTimeDivider=k;exports.ElapsedTimeInner=f;exports.ElapsedTimeTitle=g;exports.ElapsedVal=h;exports.PlaybackContainer=r;exports.PlaybackControlsContainer=i;exports.PlaybackSpeedSliderHeader=o;exports.PlaybackSpeedSliderLabel=n;exports.PlaybackSpeedSliderLabelBottom=p;exports.PlaybackSpeedSliderLabelTop=c;exports.PlaybackSpeedSliderWrapper=s;exports.PlaybackSpeedTitle=d;
124
+ `;exports.ElapsedLabel=u;exports.ElapsedTimeBlock=x;exports.ElapsedTimeContainer=b;exports.ElapsedTimeDivider=k;exports.ElapsedTimeInner=f;exports.ElapsedTimeTitle=g;exports.ElapsedVal=h;exports.PlaybackControlsContainer=r;exports.PlaybackSpeedContainer=l;exports.PlaybackSpeedSliderHeader=o;exports.PlaybackSpeedSliderLabel=n;exports.PlaybackSpeedSliderLabelBottom=p;exports.PlaybackSpeedSliderLabelTop=c;exports.PlaybackSpeedSliderWrapper=s;exports.PlaybackSpeedTitle=d;
@@ -1,4 +1,4 @@
1
- export declare const PlaybackContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
1
+ export declare const PlaybackSpeedContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
2
  export declare const PlaybackControlsContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
3
  export declare const PlaybackSpeedSliderHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
4
  export declare const PlaybackSpeedTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
@@ -11,6 +11,10 @@ const i = e.div`
11
11
  right: 20px;
12
12
  top: 10px;
13
13
  height: 95%;
14
+
15
+ @container orbital-sim-context (width < 650px) {
16
+ height: 85%;
17
+ }
14
18
  `, a = e.div`
15
19
  width: auto;
16
20
  display: flex;
@@ -20,7 +24,7 @@ const i = e.div`
20
24
  transform: translateX(-50%);
21
25
  z-index: 2;
22
26
  font-size: 17px;
23
- `, o = e.div`
27
+ `, t = e.div`
24
28
  z-index: 2;
25
29
  padding: 5px;
26
30
  text-align: center;
@@ -29,7 +33,7 @@ const i = e.div`
29
33
  border-radius: 10px;
30
34
  grid-area: 1 / 1 / 2 / 3;
31
35
  height: fit-content;
32
- `, t = e.h4`
36
+ `, o = e.h4`
33
37
  font-size: 18px;
34
38
  font-weight: var(--regular);
35
39
  line-height: 1.5;
@@ -128,12 +132,12 @@ export {
128
132
  b as ElapsedTimeInner,
129
133
  s as ElapsedTimeTitle,
130
134
  x as ElapsedVal,
131
- i as PlaybackContainer,
132
135
  a as PlaybackControlsContainer,
133
- o as PlaybackSpeedSliderHeader,
136
+ i as PlaybackSpeedContainer,
137
+ t as PlaybackSpeedSliderHeader,
134
138
  l as PlaybackSpeedSliderLabel,
135
139
  d as PlaybackSpeedSliderLabelBottom,
136
140
  n as PlaybackSpeedSliderLabelTop,
137
141
  c as PlaybackSpeedSliderWrapper,
138
- t as PlaybackSpeedTitle
142
+ o as PlaybackSpeedTitle
139
143
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),n=require("react"),c=require("@rubin-epo/epo-react-lib/Button"),u=require("../Context/index.cjs"),s=require("./styles.cjs"),d=require("../styles.cjs"),a=t=>t&&t.__esModule?t:{default:t},x=a(c);function h(){const{orbits:t}=u.useOrbitalSimContext(),{detailsRows:l}=t,[i,r]=n.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(d.GlobalStyles,{}),e.jsx(s.ButtonWrapper,{styleAs:"secondary",isInactive:!l,onClick:()=>{r(!i)},children:i?"Hide Details":"Show Details"}),e.jsx(s.SlideoutWrapper,{slideFrom:"left",isOpen:i,children:e.jsxs(s.SlideoutPanel,{children:[e.jsx("h3",{children:"Orbital Details"}),l&&l.map(o=>e.jsxs(s.SlideoutRow,{children:[e.jsx(s.SlideoutColLeft,{children:e.jsx("p",{children:o.rowTitle})}),e.jsx(s.SlideoutColRight,{children:e.jsx("p",{children:o.rowContent})})]})),e.jsx(x.default,{isBlock:!0,onClick:()=>r(!i),children:"Close"})]})})]})}exports.default=h;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),n=require("react"),c=require("@rubin-epo/epo-react-lib/Button"),u=require("../Context/index.cjs"),s=require("./styles.cjs"),d=require("../styles.cjs"),a=t=>t&&t.__esModule?t:{default:t},x=a(c);function h(){const{orbits:t}=u.useOrbitalSimContext(),{detailsRows:l}=t,[i,o]=n.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(d.GlobalStyles,{}),e.jsx(s.ButtonWrapper,{styleAs:"secondary",isInactive:!l,onClick:()=>{o(!i)},children:i?"Hide Details":"Show Details"}),e.jsx(s.SlideoutWrapper,{slideFrom:"left",isOpen:i,children:e.jsxs(s.SlideoutPanel,{children:[e.jsx("h3",{children:"Orbital Details"}),l&&l.map(r=>e.jsxs(s.SlideoutRow,{children:[e.jsx(s.SlideoutColLeft,{children:e.jsx("p",{children:r.rowTitle})}),e.jsx(s.SlideoutColRight,{children:e.jsx("p",{children:r.rowContent})})]},r.rowTitle)),e.jsx(x.default,{isBlock:!0,onClick:()=>o(!i),children:"Close"})]})})]})}exports.default=h;
@@ -1,38 +1,38 @@
1
1
  "use client";
2
- import { jsxs as o, Fragment as s, jsx as e } from "react/jsx-runtime";
2
+ import { jsxs as l, Fragment as s, jsx as t } from "react/jsx-runtime";
3
3
  import { useState as c } from "react";
4
4
  import a from "@rubin-epo/epo-react-lib/Button";
5
5
  import { useOrbitalSimContext as d } from "../Context/index.js";
6
6
  import { ButtonWrapper as m, SlideoutWrapper as p, SlideoutPanel as h, SlideoutRow as u, SlideoutColLeft as f, SlideoutColRight as S } from "./styles.js";
7
- import { GlobalStyles as C } from "../styles.js";
7
+ import { GlobalStyles as w } from "../styles.js";
8
8
  function v() {
9
9
  const { orbits: n } = d(), {
10
10
  detailsRows: i
11
- } = n, [t, l] = c(!1);
12
- return /* @__PURE__ */ o(s, { children: [
13
- /* @__PURE__ */ e(C, {}),
14
- /* @__PURE__ */ e(
11
+ } = n, [e, r] = c(!1);
12
+ return /* @__PURE__ */ l(s, { children: [
13
+ /* @__PURE__ */ t(w, {}),
14
+ /* @__PURE__ */ t(
15
15
  m,
16
16
  {
17
17
  styleAs: "secondary",
18
18
  isInactive: !i,
19
19
  onClick: () => {
20
- l(!t);
20
+ r(!e);
21
21
  },
22
- children: t ? "Hide Details" : "Show Details"
22
+ children: e ? "Hide Details" : "Show Details"
23
23
  }
24
24
  ),
25
- /* @__PURE__ */ e(p, { slideFrom: "left", isOpen: t, children: /* @__PURE__ */ o(h, { children: [
26
- /* @__PURE__ */ e("h3", { children: "Orbital Details" }),
27
- i && i.map((r) => /* @__PURE__ */ o(u, { children: [
28
- /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e("p", { children: r.rowTitle }) }),
29
- /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e("p", { children: r.rowContent }) })
30
- ] })),
31
- /* @__PURE__ */ e(
25
+ /* @__PURE__ */ t(p, { slideFrom: "left", isOpen: e, children: /* @__PURE__ */ l(h, { children: [
26
+ /* @__PURE__ */ t("h3", { children: "Orbital Details" }),
27
+ i && i.map((o) => /* @__PURE__ */ l(u, { children: [
28
+ /* @__PURE__ */ t(f, { children: /* @__PURE__ */ t("p", { children: o.rowTitle }) }),
29
+ /* @__PURE__ */ t(S, { children: /* @__PURE__ */ t("p", { children: o.rowContent }) })
30
+ ] }, o.rowTitle)),
31
+ /* @__PURE__ */ t(
32
32
  a,
33
33
  {
34
34
  isBlock: !0,
35
- onClick: () => l(!t),
35
+ onClick: () => r(!e),
36
36
  children: "Close"
37
37
  }
38
38
  )
@@ -32,7 +32,7 @@
32
32
  gap: 1em;
33
33
  padding: 1em;
34
34
  font-size: 0.75rem;
35
- width: '50ch';
35
+ width: 50ch;
36
36
 
37
37
  & > * + * {
38
38
  margin-block-start: 1em;
@@ -36,7 +36,7 @@ const a = o(t)`
36
36
  gap: 1em;
37
37
  padding: 1em;
38
38
  font-size: 0.75rem;
39
- width: '50ch';
39
+ width: 50ch;
40
40
 
41
41
  & > * + * {
42
42
  margin-block-start: 1em;
@@ -39,6 +39,8 @@
39
39
  min-height: 500px;
40
40
  background-color: #000000;
41
41
  color-adjust: exact;
42
+ container-type: size;
43
+ container-name: orbital-sim-context;
42
44
  `,n=e.default(r.Canvas)`
43
45
  position: relative;
44
46
  z-index: 1;
@@ -61,10 +63,11 @@
61
63
  z-index: 10;
62
64
  background-color: #fff;
63
65
  width: 10%;
66
+ min-width: fit-content;
64
67
  height: 100%;
65
68
  display: flex;
66
69
  flex-direction: column;
67
- `,p=e.default.button`
70
+ `,c=e.default.button`
68
71
  width: 100%;
69
72
  padding: 12px 16px;
70
73
  text-align: left;
@@ -81,4 +84,4 @@
81
84
  background-color: #017F80;
82
85
  color: #fff;
83
86
  }
84
- `;exports.CanvasWrapper=n;exports.GlobalStyles=o;exports.OrbitalSimWrapper=l;exports.SunLabel=d;exports.SwappableOrbitButton=p;exports.SwappableOrbitsContainer=s;
87
+ `;exports.CanvasWrapper=n;exports.GlobalStyles=o;exports.OrbitalSimWrapper=l;exports.SunLabel=d;exports.SwappableOrbitButton=c;exports.SwappableOrbitsContainer=s;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import e, { createGlobalStyle as t } from "styled-components";
3
3
  import { Canvas as a } from "@react-three/fiber";
4
- const i = t`
4
+ const o = t`
5
5
  :root {
6
6
  --white: #ffffff;
7
7
  --black: #000000;
@@ -35,14 +35,16 @@ const i = t`
35
35
  --headingWithSpaceHeight: 90px;
36
36
  --tallestSquareWidget: calc(100vh - var(--pageNavHeight) - var(--siteHeaderHeight) - var(--headingWithSpaceHeight) - var(--minPadding));
37
37
  }
38
- `, l = e.div`
38
+ `, n = e.div`
39
39
  position: relative;
40
40
  overflow: hidden;
41
41
  height: var(--tallestSquareWidget);
42
42
  min-height: 500px;
43
43
  background-color: #000000;
44
44
  color-adjust: exact;
45
- `, n = e(a)`
45
+ container-type: size;
46
+ container-name: orbital-sim-context;
47
+ `, l = e(a)`
46
48
  position: relative;
47
49
  z-index: 1;
48
50
  `, d = e.div`
@@ -64,6 +66,7 @@ const i = t`
64
66
  z-index: 10;
65
67
  background-color: #fff;
66
68
  width: 10%;
69
+ min-width: fit-content;
67
70
  height: 100%;
68
71
  display: flex;
69
72
  flex-direction: column;
@@ -86,9 +89,9 @@ const i = t`
86
89
  }
87
90
  `;
88
91
  export {
89
- n as CanvasWrapper,
90
- i as GlobalStyles,
91
- l as OrbitalSimWrapper,
92
+ l as CanvasWrapper,
93
+ o as GlobalStyles,
94
+ n as OrbitalSimWrapper,
92
95
  d as SunLabel,
93
96
  p as SwappableOrbitButton,
94
97
  c as SwappableOrbitsContainer
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),d=require("react"),C=require("./styles.cjs"),r="asc",w="desc",j=({tableData:a})=>{const[i]=d.useState(a),o=a?Object.keys(i[0]):null,[s,f]=d.useState(o?o[0]:""),[c,S]=d.useState(r);function p(e){if(s===e){S(n=>n===r?w:r);return}f(e),S(r)}const m=d.useMemo(()=>{if(i)return[...i].sort((n,g)=>{const u=n[s],l=g[s];if(typeof u=="number"&&typeof l=="number")return c===r?u-l:l-u;const b=String(u).toLowerCase(),h=String(l).toLowerCase();return c===r?b.localeCompare(h):h.localeCompare(b)})},[i,s,c]);function x(e){return s!==e?"":c===r?"↑":"↓"}return t.jsx(t.Fragment,{children:a&&t.jsxs(C.Table,{children:[t.jsx("thead",{children:t.jsx("tr",{children:o&&o.map(e=>t.jsx("th",{scope:"col","aria-sort":s===e?c===r?"ascending":"descending":"none",children:t.jsxs("button",{type:"button",onClick:()=>p(e),children:[e," ",x(e)]})},e))})}),t.jsx("tbody",{children:m&&m.map(e=>t.jsx("tr",{children:o&&o.map(n=>t.jsx("td",{children:e[n]},n))}))})]})})};j.displayName="Widgets.SortableTable";exports.default=j;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),a=require("react"),N=require("@rubin-epo/epo-react-lib/SortButton"),h=require("./styles.cjs"),q=r=>r&&r.__esModule?r:{default:r},p=q(N),o="asc",x="desc",y="none",b=({tableData:r})=>{const[u]=a.useState(r),s=r?Object.keys(u[0]):null,[n,g]=a.useState(s?s[0]:""),[i,S]=a.useState(o);function C(t){if(n===t){S(c=>c===o?x:o);return}g(t),S(o)}const f=a.useMemo(()=>{if(u)return[...u].sort((c,w)=>{const l=c[n],d=w[n];if(typeof l=="number"&&typeof d=="number")return i===o?l-d:d-l;const m=String(l).toLowerCase(),j=String(d).toLowerCase();return i===o?m.localeCompare(j):j.localeCompare(m)})},[u,n,i]);function _(t){return n!==t?e.jsx(p.default,{sortDirection:y}):e.jsx(p.default,{sortDirection:i===o?o:x})}return e.jsx(e.Fragment,{children:r&&e.jsxs(h.Table,{children:[e.jsx("thead",{children:e.jsx("tr",{children:s&&s.map(t=>e.jsx("th",{scope:"col","aria-sort":n===t?i===o?"ascending":"descending":"none",children:e.jsxs(h.HeaderButton,{type:"button",onClick:()=>C(t),children:[t,_(t)]})},t))})}),e.jsx("tbody",{children:f&&f.map(t=>e.jsx("tr",{children:s&&s.map(c=>e.jsx("td",{children:t[c]},c))}))})]})})};b.displayName="Widgets.SortableTable";exports.default=b;
@@ -13,7 +13,7 @@ type TableDataProps<T extends Record<string, string | number | null>> = {
13
13
  * @returns the sortable table
14
14
  */
15
15
  declare const SortableTable: {
16
- <T extends Record<string, string | number | null>>({ tableData }: TableDataProps<T>): import("react/jsx-runtime").JSX.Element;
16
+ <T extends Record<string, string | number | null>>({ tableData, }: TableDataProps<T>): import("react/jsx-runtime").JSX.Element;
17
17
  displayName: string;
18
18
  };
19
19
  export default SortableTable;
@@ -1,41 +1,49 @@
1
1
  "use client";
2
- import { jsx as o, Fragment as j, jsxs as h } from "react/jsx-runtime";
3
- import { useState as u, useMemo as x } from "react";
4
- import { Table as N } from "./styles.js";
5
- const r = "asc", T = "desc", y = ({
2
+ import { jsx as o, Fragment as x, jsxs as h } from "react/jsx-runtime";
3
+ import { useState as u, useMemo as D } from "react";
4
+ import b from "@rubin-epo/epo-react-lib/SortButton";
5
+ import { Table as T, HeaderButton as y } from "./styles.js";
6
+ const r = "asc", g = "desc", A = "none", B = ({
6
7
  tableData: a
7
8
  }) => {
8
- const [i] = u(a), e = a ? Object.keys(i[0]) : null, [n, b] = u(e ? e[0] : ""), [c, m] = u(r);
9
- function g(t) {
9
+ const [i] = u(a), e = a ? Object.keys(i[0]) : null, [n, C] = u(e ? e[0] : ""), [c, m] = u(r);
10
+ function w(t) {
10
11
  if (n === t) {
11
- m((s) => s === r ? T : r);
12
+ m((s) => s === r ? g : r);
12
13
  return;
13
14
  }
14
- b(t), m(r);
15
+ C(t), m(r);
15
16
  }
16
- const p = x(() => {
17
+ const p = D(() => {
17
18
  if (i)
18
- return [...i].sort((s, w) => {
19
- const l = s[n], d = w[n];
20
- if (typeof l == "number" && typeof d == "number")
21
- return c === r ? l - d : d - l;
22
- const f = String(l).toLowerCase(), S = String(d).toLowerCase();
19
+ return [...i].sort((s, j) => {
20
+ const d = s[n], l = j[n];
21
+ if (typeof d == "number" && typeof l == "number")
22
+ return c === r ? d - l : l - d;
23
+ const f = String(d).toLowerCase(), S = String(l).toLowerCase();
23
24
  return c === r ? f.localeCompare(S) : S.localeCompare(f);
24
25
  });
25
26
  }, [i, n, c]);
26
- function C(t) {
27
- return n !== t ? "" : c === r ? "↑" : "↓";
27
+ function N(t) {
28
+ return n !== t ? /* @__PURE__ */ o(b, { sortDirection: A }) : /* @__PURE__ */ o(b, { sortDirection: c === r ? r : g });
28
29
  }
29
- return /* @__PURE__ */ o(j, { children: a && /* @__PURE__ */ h(N, { children: [
30
- /* @__PURE__ */ o("thead", { children: /* @__PURE__ */ o("tr", { children: e && e.map((t) => /* @__PURE__ */ o("th", { scope: "col", "aria-sort": n === t ? c === r ? "ascending" : "descending" : "none", children: /* @__PURE__ */ h("button", { type: "button", onClick: () => g(t), children: [
31
- t,
32
- " ",
33
- C(t)
34
- ] }) }, t)) }) }),
30
+ return /* @__PURE__ */ o(x, { children: a && /* @__PURE__ */ h(T, { children: [
31
+ /* @__PURE__ */ o("thead", { children: /* @__PURE__ */ o("tr", { children: e && e.map((t) => /* @__PURE__ */ o(
32
+ "th",
33
+ {
34
+ scope: "col",
35
+ "aria-sort": n === t ? c === r ? "ascending" : "descending" : "none",
36
+ children: /* @__PURE__ */ h(y, { type: "button", onClick: () => w(t), children: [
37
+ t,
38
+ N(t)
39
+ ] })
40
+ },
41
+ t
42
+ )) }) }),
35
43
  /* @__PURE__ */ o("tbody", { children: p && p.map((t) => /* @__PURE__ */ o("tr", { children: e && e.map((s) => /* @__PURE__ */ o("td", { children: t[s] }, s)) })) })
36
44
  ] }) });
37
45
  };
38
- y.displayName = "Widgets.SortableTable";
46
+ B.displayName = "Widgets.SortableTable";
39
47
  export {
40
- y as default
48
+ B as default
41
49
  };
@@ -1,8 +1,17 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("styled-components"),l=e=>e&&e.__esModule?e:{default:e},d=l(t),o=d.default.table`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("styled-components"),d=e=>e&&e.__esModule?e:{default:e},t=d(o),l=t.default.table`
2
2
  border: 1px solid #000000;
3
+ font-size: medium;
3
4
  text-align: center;
4
5
  border-spacing: 0px;
5
6
  & > th, td, thead, thead > tr > th{
6
7
  border: 1px solid #000000;
7
8
  }
8
- `;exports.Table=o;
9
+
10
+ & > thead {
11
+ background-color: #009FA1;
12
+ font-size: large;
13
+ }
14
+ `,a=t.default.button`
15
+ display: flex;
16
+ align-items: center;
17
+ `;exports.HeaderButton=a;exports.Table=l;
@@ -1 +1,2 @@
1
1
  export declare const Table: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, never>> & string;
2
+ export declare const HeaderButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
@@ -1,13 +1,23 @@
1
1
  "use client";
2
- import t from "styled-components";
3
- const r = t.table`
2
+ import e from "styled-components";
3
+ const o = e.table`
4
4
  border: 1px solid #000000;
5
+ font-size: medium;
5
6
  text-align: center;
6
7
  border-spacing: 0px;
7
8
  & > th, td, thead, thead > tr > th{
8
9
  border: 1px solid #000000;
9
10
  }
11
+
12
+ & > thead {
13
+ background-color: #009FA1;
14
+ font-size: large;
15
+ }
16
+ `, r = e.button`
17
+ display: flex;
18
+ align-items: center;
10
19
  `;
11
20
  export {
12
- r as Table
21
+ r as HeaderButton,
22
+ o as Table
13
23
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),u=require("react"),G=require("react-i18next"),J=require("../../layout/AspectRatio/index.cjs"),K=require("../../atomic/Loader/index.cjs"),Q=require("@rubin-epo/epo-react-lib/IconComposer"),U=require("./MovingSourceMap/index.cjs"),k=require("./utils.cjs"),Z=require("./styles.cjs"),O=require("../../hooks/useInterval.cjs"),ee=require("./Message/Message.cjs"),te=require("../../atomic/ElapsedTime/ElapsedTime.cjs"),se=e=>e&&e.__esModule?e:{default:e},ne=se(Q),oe=(e,n)=>{var l;const t={day:0,hour:0},s=e[n];if(!s)return t;const c=(s==null?void 0:s.date)-((l=e[0])==null?void 0:l.date);return c?{day:Math.round(c)||0,hour:Math.round(24/c%24)||0}:t},re=(e,n,t)=>Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)<=Math.pow(t,2),ce=(e,n,t)=>t?e[n]?[e[n].image]:[]:e.map(({image:s})=>s),j=({width:e=600,height:n=600,selectedSource:t=[],alerts:s=[],activeAlertIndex:c=0,alertChangeCallback:l,selectionCallback:p,blinkConfig:_,isDisplayOnly:d=!1,isLoading:P,className:w,movingSources:i=[]})=>{const[f,q]=u.useState(0),[B,F]=u.useState(!0),[b,L]=u.useState(!0),[R,y]=u.useState(),[T,m]=u.useState(!1),{t:I}=G.useTranslation(),S=!B&&!P,V=(r,g,h)=>{if(i)for(let a of i){const x=a.sources[f];if(re(r,{x:k.toDecimalPercent(x.x)*g,y:k.toDecimalPercent(x.y)*h},k.getRadius(a.type,a.radius)*g))return a.id}},v=()=>{y(I("source_selector.messages.failure")),m(!0)},D=()=>{L(r=>!r)},N=()=>{y(o.jsxs(o.Fragment,{children:[o.jsx(ne.default,{icon:"checkmark"}),I("source_selector.messages.success")]})),m(!0)},W=({clientX:r,clientY:g,target:h})=>{if(!S||d)return;const{tagName:a,clientWidth:x,clientHeight:C}=h;if(a.toLowerCase()!=="img")return;const{left:Y,top:A}=h.getBoundingClientRect(),M=V({x:r-Y,y:C-g+A},x,C);if(M){if(t.includes(M))return;p&&p(t.concat(M)),N()}else v()},$=()=>{m(!1)},{day:z,hour:E}=oe(s,c),H=ce(s,c,d),X=()=>{b&&(f>i[0].sources.length-2?q(0):q(r=>r+1))};return O.default(X,500),o.jsxs(J.default,{ratio:1,className:w,children:[!d&&o.jsx(ee.default,{onMessageChangeCallback:$,isVisible:T,children:R}),i&&o.jsx(Z.BackgroundBlinker,{images:H,activeIndex:f,blinkCallback:l,loadedCallback:()=>F(!1),onClickCallback:W,extraControls:s.length>0&&!d&&o.jsx(te.default,{day:z,hour:E}),interval:400,pauseCallback:D,..._,children:o.jsx(U.default,{width:e,height:n,isPlaying:b,currentIndex:f,movingSources:i,selectedSource:t})}),!S&&o.jsx(K.default,{})]})};j.displayName="Widgets.MovingSourceSelector";exports.default=j;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),l=require("react"),G=require("react-i18next"),J=require("../../layout/AspectRatio/index.cjs"),K=require("../../atomic/Loader/index.cjs"),Q=require("@rubin-epo/epo-react-lib/IconComposer"),U=require("./MovingSourceMap/index.cjs"),k=require("./utils.cjs"),Z=require("./styles.cjs"),O=require("../../hooks/useInterval.cjs"),ee=require("./Message/Message.cjs"),te=require("../../atomic/ElapsedTime/ElapsedTime.cjs"),se=e=>e&&e.__esModule?e:{default:e},ne=se(Q),oe=(e,n)=>{var d;const t={day:0,hour:0},s=e[n];if(!s)return t;const c=(s==null?void 0:s.date)-((d=e[0])==null?void 0:d.date);return c?{day:Math.round(c)||0,hour:Math.round(24/c%24)||0}:t},re=(e,n,t)=>Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)<=Math.pow(t,2),ce=(e,n,t)=>t?e[n]?[e[n].image]:[]:e.map(({image:s})=>s),y=({width:e=600,height:n=600,selectedSource:t=[],alerts:s=[],activeAlertIndex:c=0,alertChangeCallback:d,selectionCallback:q,blinkConfig:_,isDisplayOnly:i=!1,isLoading:P,className:w,movingSources:u=[]})=>{const[f,b]=l.useState(0),[B,F]=l.useState(!0),[p,L]=l.useState(!i),[R,I]=l.useState(),[T,m]=l.useState(!1),{t:S}=G.useTranslation(),j=!B&&!P,V=(r,g,h)=>{if(u)for(let a of u){const x=a.sources[f];if(re(r,{x:k.toDecimalPercent(x.x)*g,y:k.toDecimalPercent(x.y)*h},k.getRadius(a.type,a.radius)*g))return a.id}},v=()=>{I(S("source_selector.messages.failure")),m(!0)},N=()=>{L(r=>!r)},W=()=>{I(o.jsxs(o.Fragment,{children:[o.jsx(ne.default,{icon:"checkmark"}),S("source_selector.messages.success")]})),m(!0)},$=({clientX:r,clientY:g,target:h})=>{if(!j||i)return;const{tagName:a,clientWidth:x,clientHeight:C}=h;if(a.toLowerCase()!=="img")return;const{left:Y,top:A}=h.getBoundingClientRect(),M=V({x:r-Y,y:C-g+A},x,C);if(M){if(t.includes(M))return;q&&q(t.concat(M)),W()}else v()},z=()=>{m(!1)},{day:D,hour:E}=oe(s,c),H=ce(s,c,i),X=()=>{p&&(f>u[0].sources.length-2?b(0):b(r=>r+1))};return O.default(X,500),o.jsxs(J.default,{ratio:1,className:w,children:[!i&&o.jsx(ee.default,{onMessageChangeCallback:z,isVisible:T,children:R}),u&&o.jsx(Z.BackgroundBlinker,{images:H,activeIndex:f,blinkCallback:d,loadedCallback:()=>F(!1),onClickCallback:$,extraControls:s.length>0&&!i&&o.jsx(te.default,{day:D,hour:E}),interval:400,pauseCallback:N,..._,children:o.jsx(U.default,{width:e,height:n,isPlaying:p,currentIndex:f,movingSources:u,selectedSource:t})}),!j&&o.jsx(K.default,{})]})};y.displayName="Widgets.MovingSourceSelector";exports.default=y;
@@ -1,21 +1,21 @@
1
1
  "use client";
2
- import { jsxs as B, jsx as a, Fragment as G } from "react/jsx-runtime";
3
- import { useState as l } from "react";
4
- import { useTranslation as J } from "react-i18next";
5
- import K from "../../layout/AspectRatio/index.js";
6
- import Q from "../../atomic/Loader/index.js";
7
- import U from "@rubin-epo/epo-react-lib/IconComposer";
8
- import Z from "./MovingSourceMap/index.js";
9
- import { getRadius as $, toDecimalPercent as L } from "./utils.js";
2
+ import { jsxs as B, jsx as a, Fragment as J } from "react/jsx-runtime";
3
+ import { useState as u } from "react";
4
+ import { useTranslation as K } from "react-i18next";
5
+ import Q from "../../layout/AspectRatio/index.js";
6
+ import U from "../../atomic/Loader/index.js";
7
+ import Z from "@rubin-epo/epo-react-lib/IconComposer";
8
+ import $ from "./MovingSourceMap/index.js";
9
+ import { getRadius as D, toDecimalPercent as L } from "./utils.js";
10
10
  import { BackgroundBlinker as O } from "./styles.js";
11
11
  import ee from "../../hooks/useInterval.js";
12
12
  import te from "./Message/Message.js";
13
13
  import oe from "../../atomic/ElapsedTime/ElapsedTime.js";
14
14
  const ne = (e, n) => {
15
- var u;
15
+ var d;
16
16
  const t = { day: 0, hour: 0 }, o = e[n];
17
17
  if (!o) return t;
18
- const r = (o == null ? void 0 : o.date) - ((u = e[0]) == null ? void 0 : u.date);
18
+ const r = (o == null ? void 0 : o.date) - ((d = e[0]) == null ? void 0 : d.date);
19
19
  return r ? {
20
20
  day: Math.round(r) || 0,
21
21
  hour: Math.round(24 / r % 24) || 0
@@ -26,17 +26,17 @@ const ne = (e, n) => {
26
26
  selectedSource: t = [],
27
27
  alerts: o = [],
28
28
  activeAlertIndex: r = 0,
29
- alertChangeCallback: u,
29
+ alertChangeCallback: d,
30
30
  selectionCallback: M,
31
31
  blinkConfig: P,
32
- isDisplayOnly: d = !1,
32
+ isDisplayOnly: c = !1,
33
33
  isLoading: w,
34
34
  className: F,
35
- movingSources: c = []
35
+ movingSources: l = []
36
36
  }) => {
37
- const [f, x] = l(0), [R, V] = l(!0), [b, j] = l(!0), [N, y] = l(), [T, p] = l(!1), { t: I } = J(), S = !R && !w, W = (s, m, g) => {
38
- if (c)
39
- for (let i of c) {
37
+ const [f, x] = u(0), [R, V] = u(!0), [b, j] = u(!c), [N, I] = u(), [T, p] = u(!1), { t: y } = K(), S = !R && !w, W = (s, m, g) => {
38
+ if (l)
39
+ for (let i of l) {
40
40
  const h = i.sources[f];
41
41
  if (se(
42
42
  s,
@@ -44,19 +44,19 @@ const ne = (e, n) => {
44
44
  x: L(h.x) * m,
45
45
  y: L(h.y) * g
46
46
  },
47
- $(i.type, i.radius) * m
47
+ D(i.type, i.radius) * m
48
48
  ))
49
49
  return i.id;
50
50
  }
51
51
  }, _ = () => {
52
- y(I("source_selector.messages.failure")), p(!0);
52
+ I(y("source_selector.messages.failure")), p(!0);
53
53
  }, v = () => {
54
54
  j((s) => !s);
55
55
  }, z = () => {
56
- y(
57
- /* @__PURE__ */ B(G, { children: [
58
- /* @__PURE__ */ a(U, { icon: "checkmark" }),
59
- I("source_selector.messages.success")
56
+ I(
57
+ /* @__PURE__ */ B(J, { children: [
58
+ /* @__PURE__ */ a(Z, { icon: "checkmark" }),
59
+ y("source_selector.messages.success")
60
60
  ] })
61
61
  ), p(!0);
62
62
  }, A = ({
@@ -64,15 +64,15 @@ const ne = (e, n) => {
64
64
  clientY: m,
65
65
  target: g
66
66
  }) => {
67
- if (!S || d) return;
67
+ if (!S || c) return;
68
68
  const {
69
69
  tagName: i,
70
70
  clientWidth: h,
71
71
  clientHeight: k
72
72
  } = g;
73
73
  if (i.toLowerCase() !== "img") return;
74
- const { left: q, top: D } = g.getBoundingClientRect(), C = W(
75
- { x: s - q, y: k - m + D },
74
+ const { left: q, top: G } = g.getBoundingClientRect(), C = W(
75
+ { x: s - q, y: k - m + G },
76
76
  h,
77
77
  k
78
78
  );
@@ -83,11 +83,11 @@ const ne = (e, n) => {
83
83
  _();
84
84
  }, E = () => {
85
85
  p(!1);
86
- }, { day: H, hour: X } = ne(o, r), Y = re(o, r, d);
86
+ }, { day: H, hour: X } = ne(o, r), Y = re(o, r, c);
87
87
  return ee(() => {
88
- b && (f > c[0].sources.length - 2 ? x(0) : x((s) => s + 1));
89
- }, 500), /* @__PURE__ */ B(K, { ratio: 1, className: F, children: [
90
- !d && /* @__PURE__ */ a(
88
+ b && (f > l[0].sources.length - 2 ? x(0) : x((s) => s + 1));
89
+ }, 500), /* @__PURE__ */ B(Q, { ratio: 1, className: F, children: [
90
+ !c && /* @__PURE__ */ a(
91
91
  te,
92
92
  {
93
93
  onMessageChangeCallback: E,
@@ -95,22 +95,32 @@ const ne = (e, n) => {
95
95
  children: N
96
96
  }
97
97
  ),
98
- c && /* @__PURE__ */ a(
98
+ l && /* @__PURE__ */ a(
99
99
  O,
100
100
  {
101
101
  images: Y,
102
102
  activeIndex: f,
103
- blinkCallback: u,
103
+ blinkCallback: d,
104
104
  loadedCallback: () => V(!1),
105
105
  onClickCallback: A,
106
- extraControls: o.length > 0 && !d && /* @__PURE__ */ a(oe, { day: H, hour: X }),
106
+ extraControls: o.length > 0 && !c && /* @__PURE__ */ a(oe, { day: H, hour: X }),
107
107
  interval: 400,
108
108
  pauseCallback: v,
109
109
  ...P,
110
- children: /* @__PURE__ */ a(Z, { width: e, height: n, isPlaying: b, currentIndex: f, movingSources: c, selectedSource: t })
110
+ children: /* @__PURE__ */ a(
111
+ $,
112
+ {
113
+ width: e,
114
+ height: n,
115
+ isPlaying: b,
116
+ currentIndex: f,
117
+ movingSources: l,
118
+ selectedSource: t
119
+ }
120
+ )
111
121
  }
112
122
  ),
113
- !S && /* @__PURE__ */ a(Q, {})
123
+ !S && /* @__PURE__ */ a(U, {})
114
124
  ] });
115
125
  };
116
126
  ie.displayName = "Widgets.MovingSourceSelector";
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),b=require("react"),_=require("d3-geo-projection"),S=require("d3-geo"),M=require("d3-array"),E=require("../../../charts/Base/index.cjs");require("../../../charts/XAxis/index.cjs");require("../../../charts/YAxis/index.cjs");require("../../../charts/Guidelines/index.cjs");const N=require("../../../charts/Tooltip/index.cjs");require("../../../charts/Bars/index.cjs");require("../../../charts/Viewport/index.cjs");require("../../../charts/ScatterPlot/index.cjs");const U=require("../../../atomic/ImageStack/index.cjs"),r=require("./styles.cjs"),y=({className:L,objects:p=[],images:v=[],visibleImages:w=[],describedById:G})=>{const[O,P]=b.useState(!1),[x,f]=b.useState(),l=600,c=300,n={top:20,right:0,bottom:20,left:20},W=l+n.right+n.left,$=c+n.top+n.bottom,d=15,u=30,j=-90,m=90,g=-180,q=180,h=2,i=_.geoAitoff(),s=S.geoGraticule();s.step([u,d]),s.extent([[g,j],[q,m]]),i.fitExtent([[n.left,n.top],[n.left+l-h,n.top+c]],s.outline());const B=M.range(j+d,m,d),A=M.range(g+u,q,u),C=S.geoPath(i).pointRadius(6),a=t=>C(t)||void 0,o=typeof x<"u"?p[x]:void 0,k=(o?i([o==null?void 0:o.long,o==null?void 0:o.lat]):[0,0])||[0,0];return e.jsxs(E.default,{width:W,height:$,className:L,children:[e.jsx("mask",{id:"imageMask",children:e.jsx("path",{d:a(s.outline()),fill:"white"})}),e.jsx(r.Background,{d:a(s.outline())}),e.jsx(r.Graticule,{d:a(s())}),e.jsx(r.ImageStackerWrapper,{style:{"--image-stack-opacity":O&&1},x:n.left,y:n.top,width:l-h,height:c,mask:"url(#imageMask)",children:e.jsx(U.default,{images:v,describedById:G,visible:w,loadCallback:()=>P(!0),showBackdrop:!1,showLoader:!1})}),e.jsx("g",{children:p.map(({id:t,lat:H,long:R},T)=>e.jsx(r.UserObject,{d:a({type:"Point",coordinates:[R,H]}),onMouseOver:()=>f(T),onMouseOut:()=>f(void 0)},t))}),e.jsx("g",{"aria-hidden":"true",children:B.map(t=>t===0?null:e.jsxs(r.LatLabel,{style:{dominantBaseline:t>0?"text-after-edge":"text-before-edge"},transform:`translate(${i([g,t])})`,children:[t,"°"]},t))}),e.jsx("g",{"aria-hidden":"true",children:A.map(t=>e.jsxs(r.LongLabel,{transform:`translate(${i([t,0])})`,children:[t,"°"]},t))}),e.jsx(r.Outline,{strokeWidth:h,d:a(s.outline())}),e.jsx(N.default,{visible:!!o,x:k[0],y:k[1],children:o==null?void 0:o.id})]})};y.displayName="Widgets.SupernovaThreeVector.Skymap";exports.default=y;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),S=require("react"),_=require("d3-geo-projection"),M=require("d3-geo"),q=require("d3-array"),E=require("../../../atomic/ImageStack/index.cjs"),a=require("./styles.cjs"),N=require("../../../charts/Base/index.cjs"),U=require("../../../charts/Tooltip/index.cjs"),y=({className:L,objects:p=[],images:v=[],visibleImages:w=[],describedById:G})=>{const[O,P]=S.useState(!1),[x,f]=S.useState(),l=600,c=300,n={top:20,right:0,bottom:20,left:20},W=l+n.right+n.left,$=c+n.top+n.bottom,d=15,u=30,j=-90,m=90,g=-180,k=180,h=2,i=_.geoAitoff(),s=M.geoGraticule();s.step([u,d]),s.extent([[g,j],[k,m]]),i.fitExtent([[n.left,n.top],[n.left+l-h,n.top+c]],s.outline());const B=q.range(j+d,m,d),A=q.range(g+u,k,u),C=M.geoPath(i).pointRadius(6),r=t=>C(t)||void 0,o=typeof x<"u"?p[x]:void 0,b=(o?i([o==null?void 0:o.long,o==null?void 0:o.lat]):[0,0])||[0,0];return e.jsxs(N.default,{width:W,height:$,className:L,children:[e.jsx("mask",{id:"imageMask",children:e.jsx("path",{d:r(s.outline()),fill:"white"})}),e.jsx(a.Background,{d:r(s.outline())}),e.jsx(a.Graticule,{d:r(s())}),e.jsx(a.ImageStackerWrapper,{style:{"--image-stack-opacity":O&&1},x:n.left,y:n.top,width:l-h,height:c,mask:"url(#imageMask)",children:e.jsx(E.default,{images:v,describedById:G,visible:w,loadCallback:()=>P(!0),showBackdrop:!1,showLoader:!1})}),e.jsx("g",{children:p.map(({id:t,lat:H,long:R},T)=>e.jsx(a.UserObject,{d:r({type:"Point",coordinates:[R,H]}),onMouseOver:()=>f(T),onMouseOut:()=>f(void 0)},t))}),e.jsx("g",{"aria-hidden":"true",children:B.map(t=>t===0?null:e.jsxs(a.LatLabel,{style:{dominantBaseline:t>0?"text-after-edge":"text-before-edge"},transform:`translate(${i([g,t])})`,children:[t,"°"]},t))}),e.jsx("g",{"aria-hidden":"true",children:A.map(t=>e.jsxs(a.LongLabel,{transform:`translate(${i([t,0])})`,children:[t,"°"]},t))}),e.jsx(a.Outline,{strokeWidth:h,d:r(s.outline())}),e.jsx(U.default,{visible:!!o,x:b[0],y:b[1],children:o==null?void 0:o.id})]})};y.displayName="Widgets.SupernovaThreeVector.Skymap";exports.default=y;
@@ -1,19 +1,13 @@
1
1
  "use client";
2
- import { jsxs as h, jsx as o } from "react/jsx-runtime";
2
+ import { jsxs as h, jsx as e } from "react/jsx-runtime";
3
3
  import { useState as L } from "react";
4
4
  import { geoAitoff as E } from "d3-geo-projection";
5
5
  import { geoGraticule as N, geoPath as R } from "d3-geo";
6
6
  import { range as M } from "d3-array";
7
- import U from "../../../charts/Base/index.js";
8
- import "../../../charts/XAxis/index.js";
9
- import "../../../charts/YAxis/index.js";
10
- import "../../../charts/Guidelines/index.js";
11
- import V from "../../../charts/Tooltip/index.js";
12
- import "../../../charts/Bars/index.js";
13
- import "../../../charts/Viewport/index.js";
14
- import "../../../charts/ScatterPlot/index.js";
15
- import q from "../../../atomic/ImageStack/index.js";
16
- import { Background as z, Graticule as D, ImageStackerWrapper as F, UserObject as J, LatLabel as K, LongLabel as Q, Outline as X } from "./styles.js";
7
+ import U from "../../../atomic/ImageStack/index.js";
8
+ import { Background as V, Graticule as q, ImageStackerWrapper as z, UserObject as D, LatLabel as F, LongLabel as J, Outline as K } from "./styles.js";
9
+ import Q from "../../../charts/Base/index.js";
10
+ import X from "../../../charts/Tooltip/index.js";
17
11
  const Y = ({
18
12
  className: y,
19
13
  objects: g = [],
@@ -21,38 +15,38 @@ const Y = ({
21
15
  visibleImages: w = [],
22
16
  describedById: B
23
17
  }) => {
24
- const [O, W] = L(!1), [f, u] = L(), s = 600, l = 300, i = {
18
+ const [O, W] = L(!1), [f, u] = L(), s = 600, l = 300, a = {
25
19
  top: 20,
26
20
  right: 0,
27
21
  bottom: 20,
28
22
  left: 20
29
- }, j = s + i.right + i.left, C = l + i.top + i.bottom, c = 15, d = 30, k = -90, x = 90, p = -180, b = 180, m = 2, a = E(), r = N();
30
- r.step([d, c]), r.extent([
23
+ }, j = s + a.right + a.left, C = l + a.top + a.bottom, c = 15, d = 30, k = -90, x = 90, p = -180, b = 180, m = 2, i = E(), n = N();
24
+ n.step([d, c]), n.extent([
31
25
  [p, k],
32
26
  [b, x]
33
- ]), a.fitExtent(
27
+ ]), i.fitExtent(
34
28
  [
35
- [i.left, i.top],
36
- [i.left + s - m, i.top + l]
29
+ [a.left, a.top],
30
+ [a.left + s - m, a.top + l]
37
31
  ],
38
- r.outline()
32
+ n.outline()
39
33
  );
40
- const G = M(k + c, x, c), H = M(p + d, b, d), P = R(a).pointRadius(6), n = (t) => P(t) || void 0, e = typeof f < "u" ? g[f] : void 0, S = (e ? a([e == null ? void 0 : e.long, e == null ? void 0 : e.lat]) : [0, 0]) || [0, 0];
41
- return /* @__PURE__ */ h(U, { width: j, height: C, className: y, children: [
42
- /* @__PURE__ */ o("mask", { id: "imageMask", children: /* @__PURE__ */ o("path", { d: n(r.outline()), fill: "white" }) }),
43
- /* @__PURE__ */ o(z, { d: n(r.outline()) }),
44
- /* @__PURE__ */ o(D, { d: n(r()) }),
45
- /* @__PURE__ */ o(
46
- F,
34
+ const G = M(k + c, x, c), H = M(p + d, b, d), P = R(i).pointRadius(6), r = (t) => P(t) || void 0, o = typeof f < "u" ? g[f] : void 0, S = (o ? i([o == null ? void 0 : o.long, o == null ? void 0 : o.lat]) : [0, 0]) || [0, 0];
35
+ return /* @__PURE__ */ h(Q, { width: j, height: C, className: y, children: [
36
+ /* @__PURE__ */ e("mask", { id: "imageMask", children: /* @__PURE__ */ e("path", { d: r(n.outline()), fill: "white" }) }),
37
+ /* @__PURE__ */ e(V, { d: r(n.outline()) }),
38
+ /* @__PURE__ */ e(q, { d: r(n()) }),
39
+ /* @__PURE__ */ e(
40
+ z,
47
41
  {
48
42
  style: { "--image-stack-opacity": O && 1 },
49
- x: i.left,
50
- y: i.top,
43
+ x: a.left,
44
+ y: a.top,
51
45
  width: s - m,
52
46
  height: l,
53
47
  mask: "url(#imageMask)",
54
- children: /* @__PURE__ */ o(
55
- q,
48
+ children: /* @__PURE__ */ e(
49
+ U,
56
50
  {
57
51
  images: v,
58
52
  describedById: B,
@@ -64,10 +58,10 @@ const Y = ({
64
58
  )
65
59
  }
66
60
  ),
67
- /* @__PURE__ */ o("g", { children: g.map(({ id: t, lat: T, long: $ }, A) => /* @__PURE__ */ o(
68
- J,
61
+ /* @__PURE__ */ e("g", { children: g.map(({ id: t, lat: T, long: $ }, A) => /* @__PURE__ */ e(
62
+ D,
69
63
  {
70
- d: n({
64
+ d: r({
71
65
  type: "Point",
72
66
  coordinates: [$, T]
73
67
  }),
@@ -76,14 +70,14 @@ const Y = ({
76
70
  },
77
71
  t
78
72
  )) }),
79
- /* @__PURE__ */ o("g", { "aria-hidden": "true", children: G.map(
73
+ /* @__PURE__ */ e("g", { "aria-hidden": "true", children: G.map(
80
74
  (t) => t === 0 ? null : /* @__PURE__ */ h(
81
- K,
75
+ F,
82
76
  {
83
77
  style: {
84
78
  dominantBaseline: t > 0 ? "text-after-edge" : "text-before-edge"
85
79
  },
86
- transform: `translate(${a([p, t])})`,
80
+ transform: `translate(${i([p, t])})`,
87
81
  children: [
88
82
  t,
89
83
  "°"
@@ -92,10 +86,10 @@ const Y = ({
92
86
  t
93
87
  )
94
88
  ) }),
95
- /* @__PURE__ */ o("g", { "aria-hidden": "true", children: H.map((t) => /* @__PURE__ */ h(
96
- Q,
89
+ /* @__PURE__ */ e("g", { "aria-hidden": "true", children: H.map((t) => /* @__PURE__ */ h(
90
+ J,
97
91
  {
98
- transform: `translate(${a([t, 0])})`,
92
+ transform: `translate(${i([t, 0])})`,
99
93
  children: [
100
94
  t,
101
95
  "°"
@@ -103,20 +97,20 @@ const Y = ({
103
97
  },
104
98
  t
105
99
  )) }),
106
- /* @__PURE__ */ o(
107
- X,
100
+ /* @__PURE__ */ e(
101
+ K,
108
102
  {
109
103
  strokeWidth: m,
110
- d: n(r.outline())
104
+ d: r(n.outline())
111
105
  }
112
106
  ),
113
- /* @__PURE__ */ o(
114
- V,
107
+ /* @__PURE__ */ e(
108
+ X,
115
109
  {
116
- visible: !!e,
110
+ visible: !!o,
117
111
  x: S[0],
118
112
  y: S[1],
119
- children: e == null ? void 0 : e.id
113
+ children: o == null ? void 0 : o.id
120
114
  }
121
115
  )
122
116
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubin-epo/epo-widget-lib",
3
- "version": "2.0.9",
3
+ "version": "2.0.11",
4
4
  "description": "Rubin Observatory Education & Public Outreach team React scientific and educational widgets.",
5
5
  "author": "Rubin EPO",
6
6
  "license": "MIT",
@@ -102,7 +102,7 @@
102
102
  "dependencies": {
103
103
  "@react-three/drei": "^10.7.6",
104
104
  "@react-three/fiber": "9",
105
- "@rubin-epo/epo-react-lib": "^3.0.1",
105
+ "@rubin-epo/epo-react-lib": "3.0.2",
106
106
  "@rubin-epo/epo-widget-lib": "2.0.2",
107
107
  "context-filter-polyfill": "^0.3.6",
108
108
  "d3-array": "^3.2.4",