@rubin-epo/epo-widget-lib 2.0.0 → 2.0.2

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.
@@ -1 +1 @@
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
+ "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,15 +1,22 @@
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 { 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 = {
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 = {
8
15
  justifyContent: null,
9
16
  alignItems: null
10
17
  };
11
- return i.forEach((r) => {
12
- switch (r) {
18
+ return r.forEach((n) => {
19
+ switch (n) {
13
20
  case "center":
14
21
  t.alignItems = t.alignItems ?? "center", t.justifyContent = t.justifyContent ?? "center";
15
22
  break;
@@ -28,25 +35,25 @@ const p = (n = "") => {
28
35
  }
29
36
  }), t;
30
37
  }, y = ({
31
- className: n,
32
- children: s,
33
- position: o,
34
- viewport: i,
38
+ className: i,
39
+ children: o,
40
+ position: s,
41
+ viewport: r,
35
42
  forIds: t,
36
- forScreenreaders: r
43
+ forScreenreaders: n
37
44
  }) => {
38
- const a = /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(m, { style: p(o), children: /* @__PURE__ */ l(
39
- f,
45
+ const a = /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(f, { style: d(s), children: /* @__PURE__ */ l(
46
+ u,
40
47
  {
41
48
  form: Array.isArray(t) ? t.join(" ") : t,
42
- className: n,
49
+ className: i,
43
50
  children: [
44
- /* @__PURE__ */ e("span", { "aria-hidden": !!r, children: s }),
45
- /* @__PURE__ */ e(c, { children: r })
51
+ /* @__PURE__ */ e("span", { "aria-hidden": !!n, children: o }),
52
+ /* @__PURE__ */ e(c, { children: n })
46
53
  ]
47
54
  }
48
55
  ) }) });
49
- return i ? /* @__PURE__ */ e(d, { ...i, children: a }) : a;
56
+ return r ? /* @__PURE__ */ e(m, { ...r, children: a }) : a;
50
57
  };
51
58
  y.displayName = "Charts.Readout";
52
59
  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("../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
+ "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,19 +1,22 @@
1
1
  "use client";
2
- import { jsxs as u, jsx as i } from "react/jsx-runtime";
2
+ import { jsxs as u, jsx as s } from "react/jsx-runtime";
3
3
  import { useState as F } from "react";
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";
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";
14
17
  const $ = {
15
- svg: _,
16
- canvas: K
18
+ svg: Q,
19
+ canvas: _
17
20
  }, w = ({
18
21
  data: j,
19
22
  className: z,
@@ -29,32 +32,32 @@ const $ = {
29
32
  renderer: G = "svg",
30
33
  plotChildren: x
31
34
  }) => {
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(
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(
33
36
  Y,
34
37
  {
35
38
  data: f,
36
- onHoverCallback: n ? (p) => h(p) : void 0,
39
+ onHoverCallback: n ? (v) => h(v) : void 0,
37
40
  onHoverOutCallback: n ? () => h(void 0) : void 0,
38
41
  width: d,
39
42
  height: m,
40
- xScale: e,
41
- yScale: o,
43
+ xScale: o,
44
+ yScale: e,
42
45
  label: N,
43
46
  onLoadedCallback: A
44
47
  }
45
48
  ), q = {
46
49
  Data: H,
47
- xScale: e,
48
- yScale: o,
50
+ xScale: o,
51
+ yScale: e,
49
52
  yStart: S,
50
53
  yEnd: k,
51
- xStart: v,
54
+ xStart: g,
52
55
  xEnd: O,
53
- yDomain: a,
54
- xDomain: s
56
+ yDomain: r,
57
+ xDomain: i
55
58
  };
56
59
  return /* @__PURE__ */ u(
57
- J,
60
+ Z,
58
61
  {
59
62
  verticalLabel: c.label,
60
63
  verticalLabelId: L,
@@ -65,66 +68,66 @@ const $ = {
65
68
  height: m,
66
69
  title: B,
67
70
  children: [
68
- /* @__PURE__ */ i(
69
- Q,
71
+ /* @__PURE__ */ s(
72
+ K,
70
73
  {
71
74
  ticks: P,
72
- x: v,
75
+ x: g,
73
76
  labelledById: L,
74
- yDomain: a,
75
- yScale: o
77
+ yDomain: r,
78
+ yScale: e
76
79
  }
77
80
  ),
78
81
  /* @__PURE__ */ u(
79
- U,
82
+ V,
80
83
  {
81
- x: v,
84
+ x: g,
82
85
  y: k,
83
86
  width: W,
84
87
  height: X,
85
88
  children: [
86
- l.guidelines && /* @__PURE__ */ i(
87
- T,
89
+ l.guidelines && /* @__PURE__ */ s(
90
+ R,
88
91
  {
89
92
  guides: I.length,
90
93
  direction: "vertical",
91
- xDomain: s,
92
- yDomain: a,
93
- xScale: e,
94
- yScale: o
94
+ xDomain: i,
95
+ yDomain: r,
96
+ xScale: o,
97
+ yScale: e
95
98
  }
96
99
  ),
97
- c.guidelines && /* @__PURE__ */ i(
98
- T,
100
+ c.guidelines && /* @__PURE__ */ s(
101
+ R,
99
102
  {
100
103
  guides: P.length,
101
- xDomain: s,
102
- yDomain: a,
103
- xScale: e,
104
- yScale: o
104
+ xDomain: i,
105
+ yDomain: r,
106
+ xScale: o,
107
+ yScale: e
105
108
  }
106
109
  ),
107
110
  x ? x(q) : H
108
111
  ]
109
112
  }
110
113
  ),
111
- /* @__PURE__ */ i(
112
- V,
114
+ /* @__PURE__ */ s(
115
+ J,
113
116
  {
114
117
  ticks: I,
115
118
  y: S,
116
119
  labelledById: C,
117
- xDomain: s,
118
- xScale: e
120
+ xDomain: i,
121
+ xScale: o
119
122
  }
120
123
  ),
121
124
  n && /* @__PURE__ */ u(
122
- Z,
125
+ U,
123
126
  {
124
- x: t ? e(t.x) : void 0,
125
- y: t ? o(t.y) : void 0,
127
+ x: t ? o(t.x) : void 0,
128
+ y: t ? e(t.y) : void 0,
126
129
  visible: !!t,
127
- offset: D.pointRadius,
130
+ offset: T.pointRadius,
128
131
  children: [
129
132
  t && typeof n == "function" && n(t),
130
133
  t && typeof n == "string" && n
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),v=require("react"),u=require("../../../node_modules/prop-types/index.cjs"),k=require("react-i18next"),m=require("../orbitalUtilities.cjs"),S=require("@rubin-epo/epo-react-lib/HorizontalSlider"),t=require("./styles.cjs"),T=a=>a&&a.__esModule?a:{default:a},g=T(S);function h({dayPerVizSec:a,elapsedTime:p,sliderOnChangeCallback:j,speeds:b}){const{t:r}=k.useTranslation();function x(d){const o=d/365,l=Math.floor(o),s=365*(o-l);let i={},n={};return i={number:m.formatValue(l),string:r("elapsed_time.interval.year",{count:l})},n={number:m.formatValue(s),string:r("elapsed_time.interval.day",{count:s})},l>=1?`${i.number} ${i.string}`:s<1?r("orbit_viewer.playback.interval.secWithCount",{count:1}):`${n.number} ${n.string}`}function c(d,o){const l=p<0,s=Math.abs(p)/365.256,i=Math.floor(s),n=Math.floor(365.256*(s-i));let f={},y={};return f={number:m.formatValue(l?-i:i),string:r("elapsed_time.interval.year",{count:i})},y={number:m.formatValue(l?-n:n),string:r("elapsed_time.interval.day",{count:n})},d==="days"?y[o]:d==="years"?f[o]:null}const _=v.useMemo(()=>x(a),[a]);return e.jsxs(e.Fragment,{children:[e.jsxs(t.PlaybackSpeedSliderHeader,{children:[e.jsx(t.PlaybackSpeedTitle,{children:r("orbital_sim.playback.time_step")}),e.jsx(t.PlaybackSpeedSliderLabel,{children:r("orbital_sim.playback.time_equivalence",{firstTime:r("orbit_viewer.playback.interval.secWithCount",{count:1}),secondTime:_})})]}),e.jsx(t.PlaybackSpeedSliderLabelTopBottom,{children:r("orbital_sim.playback.time_equivalence",{firstTime:r("orbit_viewer.playback.interval.secWithCount",{count:1}),secondTime:r("orbit_viewer.playback.interval.yearWithCount",{count:1}),context:"verbose"})}),e.jsx(t.PlaybackSpeedSliderLabelTopBottom,{children:r("orbital_sim.playback.normal_time")}),e.jsx(t.PlaybackSpeedSliderWrapper,{children:e.jsx(g.default,{isVertical:!0,min:b.min,invert:!0,max:b.max,step:b.step,value:a,onChangeCallback:j})}),e.jsxs(t.ElapsedTimeContainer,{children:[e.jsx(t.ElapsedTimeTitle,{children:r("elapsed_time.title")}),e.jsxs(t.ElapsedTimeInner,{children:[e.jsxs(t.ElapsedTimeBlock,{children:[e.jsx(t.ElapsedVal,{children:c("years","number")}),e.jsx("div",{children:c("years","string")})]}),e.jsx(t.ElapsedTimeDivider,{}),e.jsxs(t.ElapsedTimeBlock,{children:[e.jsx(t.ElapsedVal,{children:c("days","number")}),e.jsx(t.ElapsedLabel,{children:c("days","string")})]})]})]})]})}h.propTypes={dayPerVizSec:u.default.number,elapsedTime:u.default.number,speeds:u.default.object,sliderOnChangeCallback:u.default.func};exports.default=h;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),v=require("react"),u=require("../../../node_modules/prop-types/index.cjs"),k=require("react-i18next"),m=require("../orbitalUtilities.cjs"),S=require("@rubin-epo/epo-react-lib/HorizontalSlider"),t=require("./styles.cjs"),T=a=>a&&a.__esModule?a:{default:a},g=T(S);function h({dayPerVizSec:a,elapsedTime:p,sliderOnChangeCallback:j,speeds:b}){const{t:r}=k.useTranslation();function x(d){const o=d/365,l=Math.floor(o),s=365*(o-l);let i={},n={};return i={number:m.formatValue(l),string:r("elapsed_time.interval.year",{count:l})},n={number:m.formatValue(s),string:r("elapsed_time.interval.day",{count:s})},l>=1?`${i.number} ${i.string}`:s<1?r("orbit_viewer.playback.interval.secWithCount",{count:1}):`${n.number} ${n.string}`}function c(d,o){const l=p<0,s=Math.abs(p)/365.256,i=Math.floor(s),n=Math.floor(365.256*(s-i));let f={},y={};return f={number:m.formatValue(l?-i:i),string:r("elapsed_time.interval.year",{count:i})},y={number:m.formatValue(l?-n:n),string:r("elapsed_time.interval.day",{count:n})},d==="days"?y[o]:d==="years"?f[o]:null}const _=v.useMemo(()=>x(a),[a]);return e.jsxs(e.Fragment,{children:[e.jsxs(t.PlaybackSpeedSliderHeader,{children:[e.jsx(t.PlaybackSpeedTitle,{children:r("orbital_sim.playback.time_step")}),e.jsx(t.PlaybackSpeedSliderLabel,{children:r("orbital_sim.playback.time_equivalence",{firstTime:r("orbit_viewer.playback.interval.secWithCount",{count:1}),secondTime:_})})]}),e.jsx(t.PlaybackSpeedSliderLabelTop,{children:r("orbital_sim.playback.time_equivalence",{firstTime:r("orbit_viewer.playback.interval.secWithCount",{count:1}),secondTime:r("orbit_viewer.playback.interval.yearWithCount",{count:1}),context:"verbose"})}),e.jsx(t.PlaybackSpeedSliderLabelBottom,{children:r("orbital_sim.playback.normal_time")}),e.jsx(t.PlaybackSpeedSliderWrapper,{children:e.jsx(g.default,{isVertical:!0,min:b.min,invert:!0,max:b.max,step:b.step,value:a,onChangeCallback:j})}),e.jsxs(t.ElapsedTimeContainer,{children:[e.jsx(t.ElapsedTimeTitle,{children:r("elapsed_time.title")}),e.jsxs(t.ElapsedTimeInner,{children:[e.jsxs(t.ElapsedTimeBlock,{children:[e.jsx(t.ElapsedVal,{children:c("years","number")}),e.jsx("div",{children:c("years","string")})]}),e.jsx(t.ElapsedTimeDivider,{}),e.jsxs(t.ElapsedTimeBlock,{children:[e.jsx(t.ElapsedVal,{children:c("days","number")}),e.jsx(t.ElapsedLabel,{children:c("days","string")})]})]})]})]})}h.propTypes={dayPerVizSec:u.default.number,elapsedTime:u.default.number,speeds:u.default.object,sliderOnChangeCallback:u.default.func};exports.default=h;
@@ -1,19 +1,19 @@
1
1
  "use client";
2
2
  import { jsxs as l, Fragment as S, jsx as r } from "react/jsx-runtime";
3
- import { useMemo as C } from "react";
3
+ import { useMemo as g } from "react";
4
4
  import m from "../../../node_modules/prop-types/index.js";
5
- import { useTranslation as E } from "react-i18next";
5
+ import { useTranslation as C } from "react-i18next";
6
6
  import { formatValue as d } from "../orbitalUtilities.js";
7
- import j from "@rubin-epo/epo-react-lib/HorizontalSlider";
8
- import { PlaybackSpeedSliderHeader as x, PlaybackSpeedTitle as P, PlaybackSpeedSliderLabel as D, PlaybackSpeedSliderLabelTopBottom as h, PlaybackSpeedSliderWrapper as M, ElapsedTimeContainer as W, ElapsedTimeTitle as w, ElapsedTimeInner as Y, ElapsedTimeBlock as v, ElapsedVal as k, ElapsedTimeDivider as $, ElapsedLabel as L } from "./styles.js";
9
- function q({
7
+ import E from "@rubin-epo/epo-react-lib/HorizontalSlider";
8
+ import { PlaybackSpeedSliderHeader as j, PlaybackSpeedTitle as P, PlaybackSpeedSliderLabel as x, PlaybackSpeedSliderLabelTop as D, PlaybackSpeedSliderLabelBottom as M, PlaybackSpeedSliderWrapper as W, ElapsedTimeContainer as w, ElapsedTimeTitle as L, ElapsedTimeInner as Y, ElapsedTimeBlock as h, ElapsedVal as v, ElapsedTimeDivider as $, ElapsedLabel as q } from "./styles.js";
9
+ function B({
10
10
  dayPerVizSec: u,
11
11
  elapsedTime: b,
12
- sliderOnChangeCallback: _,
12
+ sliderOnChangeCallback: k,
13
13
  speeds: p
14
14
  }) {
15
- const { t: e } = E();
16
- function T(c) {
15
+ const { t: e } = C();
16
+ function _(c) {
17
17
  const o = c / 365, a = Math.floor(o), n = 365 * (o - a);
18
18
  let t = {}, i = {};
19
19
  return t = {
@@ -35,18 +35,18 @@ function q({
35
35
  string: e("elapsed_time.interval.day", { count: i })
36
36
  }, c === "days" ? f[o] : c === "years" ? y[o] : null;
37
37
  }
38
- const g = C(() => T(u), [u]);
38
+ const T = g(() => _(u), [u]);
39
39
  return /* @__PURE__ */ l(S, { children: [
40
- /* @__PURE__ */ l(x, { children: [
40
+ /* @__PURE__ */ l(j, { children: [
41
41
  /* @__PURE__ */ r(P, { children: e("orbital_sim.playback.time_step") }),
42
- /* @__PURE__ */ r(D, { children: e("orbital_sim.playback.time_equivalence", {
42
+ /* @__PURE__ */ r(x, { children: e("orbital_sim.playback.time_equivalence", {
43
43
  firstTime: e("orbit_viewer.playback.interval.secWithCount", {
44
44
  count: 1
45
45
  }),
46
- secondTime: g
46
+ secondTime: T
47
47
  }) })
48
48
  ] }),
49
- /* @__PURE__ */ r(h, { children: e("orbital_sim.playback.time_equivalence", {
49
+ /* @__PURE__ */ r(D, { children: e("orbital_sim.playback.time_equivalence", {
50
50
  firstTime: e("orbit_viewer.playback.interval.secWithCount", {
51
51
  count: 1
52
52
  }),
@@ -55,9 +55,9 @@ function q({
55
55
  }),
56
56
  context: "verbose"
57
57
  }) }),
58
- /* @__PURE__ */ r(h, { children: e("orbital_sim.playback.normal_time") }),
59
- /* @__PURE__ */ r(M, { children: /* @__PURE__ */ r(
60
- j,
58
+ /* @__PURE__ */ r(M, { children: e("orbital_sim.playback.normal_time") }),
59
+ /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(
60
+ E,
61
61
  {
62
62
  isVertical: !0,
63
63
  min: p.min,
@@ -65,31 +65,31 @@ function q({
65
65
  max: p.max,
66
66
  step: p.step,
67
67
  value: u,
68
- onChangeCallback: _
68
+ onChangeCallback: k
69
69
  }
70
70
  ) }),
71
- /* @__PURE__ */ l(W, { children: [
72
- /* @__PURE__ */ r(w, { children: e("elapsed_time.title") }),
71
+ /* @__PURE__ */ l(w, { children: [
72
+ /* @__PURE__ */ r(L, { children: e("elapsed_time.title") }),
73
73
  /* @__PURE__ */ l(Y, { children: [
74
- /* @__PURE__ */ l(v, { children: [
75
- /* @__PURE__ */ r(k, { children: s("years", "number") }),
74
+ /* @__PURE__ */ l(h, { children: [
75
+ /* @__PURE__ */ r(v, { children: s("years", "number") }),
76
76
  /* @__PURE__ */ r("div", { children: s("years", "string") })
77
77
  ] }),
78
78
  /* @__PURE__ */ r($, {}),
79
- /* @__PURE__ */ l(v, { children: [
80
- /* @__PURE__ */ r(k, { children: s("days", "number") }),
81
- /* @__PURE__ */ r(L, { children: s("days", "string") })
79
+ /* @__PURE__ */ l(h, { children: [
80
+ /* @__PURE__ */ r(v, { children: s("days", "number") }),
81
+ /* @__PURE__ */ r(q, { children: s("days", "string") })
82
82
  ] })
83
83
  ] })
84
84
  ] })
85
85
  ] });
86
86
  }
87
- q.propTypes = {
87
+ B.propTypes = {
88
88
  dayPerVizSec: m.number,
89
89
  elapsedTime: m.number,
90
90
  speeds: m.object,
91
91
  sliderOnChangeCallback: m.func
92
92
  };
93
93
  export {
94
- q as default
94
+ B as default
95
95
  };
@@ -1,4 +1,4 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("styled-components"),t=a=>a&&a.__esModule?a:{default:a},e=t(l),o=e.default.div`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("styled-components"),t=a=>a&&a.__esModule?a:{default:a},e=t(l),i=e.default.div`
2
2
  width: auto;
3
3
  display: flex;
4
4
  position: absolute;
@@ -7,7 +7,7 @@
7
7
  transform: translateX(-50%);
8
8
  z-index: 2;
9
9
  font-size: 17px;
10
- `,i=e.default.div`
10
+ `,o=e.default.div`
11
11
  position: absolute;
12
12
  top: 34px;
13
13
  right: 10px;
@@ -29,13 +29,14 @@
29
29
  line-height: 1.333;
30
30
  color: var(--black);
31
31
  font-size: 12.5px;
32
- background-color: white;
33
32
  `,n=e.default.div`
33
+ right: 25px;
34
+ top: 100px;
34
35
  font-size: 13px;
35
36
  line-height: 1.333;
36
37
  color: var(--black);
37
38
  position: absolute;
38
- right: var(--minPadding) / 2;
39
+ // right: var(--minPadding) / 2;
39
40
  z-index: 2;
40
41
  width: 70px;
41
42
  padding: 5px;
@@ -44,14 +45,30 @@
44
45
  background-color: rgb(from var(--basePrimary) r g b / 80%);
45
46
  border: 1px solid var(--black);
46
47
  border-radius: 10px;
47
- `,p=e.default.span`
48
+ `,p=e.default.div`
49
+ right: 25px;
50
+ bottom: 200px;
51
+ font-size: 13px;
52
+ line-height: 1.333;
53
+ color: var(--black);
54
+ position: absolute;
55
+ // right: var(--minPadding) / 2;
56
+ z-index: 2;
57
+ width: 70px;
58
+ padding: 5px;
59
+ color: var(--white);
60
+ text-align: center;
61
+ background-color: rgb(from var(--basePrimary) r g b / 80%);
62
+ border: 1px solid var(--black);
63
+ border-radius: 10px;
64
+ `,c=e.default.span`
48
65
  position: absolute;
49
66
  z-index: 2;
50
67
  height: 50px;
51
68
  top: 25%;
52
69
  right: 5rem;
53
70
  width: fit-content;
54
- `,c=e.default.div`
71
+ `,s=e.default.div`
55
72
  font-size: 13px;
56
73
  line-height: 1.333;
57
74
  color: var(--black);
@@ -64,34 +81,34 @@
64
81
  background-color: rgb(from var(--white) r g b / 80%);
65
82
  border: 1px solid var(--black);
66
83
  border-radius: 10px;
67
- `,s=e.default.div`
84
+ `,b=e.default.div`
68
85
  font-size: 13px;
69
86
  line-height: 1.333;
70
87
  color: var(--black);
71
88
  padding-top: 5px;
72
- `,b=e.default.div`
89
+ `,x=e.default.div`
73
90
  display: flex;
74
91
  flex-flow: nowrap;
75
92
  align-items: center;
76
93
  justify-content: space-evenly;
77
94
  margin-top: 5px;
78
95
  border-top: 1px solid var(--black);
79
- `,x=e.default.div`
80
- width: 50px;
81
96
  `,g=e.default.div`
97
+ width: 50px;
98
+ `,u=e.default.div`
82
99
  font-size: 18px;
83
100
  font-weight: var(--regular);
84
101
  line-height: 1.5;
85
102
  color: var(--black);
86
103
  color: var(--black);
87
- `,u=e.default.div`
104
+ `,f=e.default.div`
88
105
  display: block;
89
106
  width: 1px;
90
107
  height: 50px;
91
108
  background-color: var(--black);
92
- `,f=e.default.div`
109
+ `,v=e.default.div`
93
110
  font-size: 13px;
94
111
  line-height: 1.333;
95
112
  color: var(--black);
96
113
  color: var(--black);
97
- `;exports.ElapsedLabel=f;exports.ElapsedTimeBlock=x;exports.ElapsedTimeContainer=c;exports.ElapsedTimeDivider=u;exports.ElapsedTimeInner=b;exports.ElapsedTimeTitle=s;exports.ElapsedVal=g;exports.PlaybackControlsContainer=o;exports.PlaybackSpeedSliderHeader=i;exports.PlaybackSpeedSliderLabel=d;exports.PlaybackSpeedSliderLabelTopBottom=n;exports.PlaybackSpeedSliderWrapper=p;exports.PlaybackSpeedTitle=r;
114
+ `;exports.ElapsedLabel=v;exports.ElapsedTimeBlock=g;exports.ElapsedTimeContainer=s;exports.ElapsedTimeDivider=f;exports.ElapsedTimeInner=x;exports.ElapsedTimeTitle=b;exports.ElapsedVal=u;exports.PlaybackControlsContainer=i;exports.PlaybackSpeedSliderHeader=o;exports.PlaybackSpeedSliderLabel=d;exports.PlaybackSpeedSliderLabelBottom=p;exports.PlaybackSpeedSliderLabelTop=n;exports.PlaybackSpeedSliderWrapper=c;exports.PlaybackSpeedTitle=r;
@@ -2,7 +2,8 @@ export declare const PlaybackControlsContainer: import('styled-components/dist/t
2
2
  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;
3
3
  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;
4
4
  export declare const PlaybackSpeedSliderLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
- export declare const PlaybackSpeedSliderLabelTopBottom: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
+ export declare const PlaybackSpeedSliderLabelTop: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
+ export declare const PlaybackSpeedSliderLabelBottom: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
7
  export declare const PlaybackSpeedSliderWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
7
8
  export declare const ElapsedTimeContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
8
9
  export declare const ElapsedTimeTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -31,13 +31,14 @@ const i = o.div`
31
31
  line-height: 1.333;
32
32
  color: var(--black);
33
33
  font-size: 12.5px;
34
- background-color: white;
35
34
  `, l = o.div`
35
+ right: 25px;
36
+ top: 100px;
36
37
  font-size: 13px;
37
38
  line-height: 1.333;
38
39
  color: var(--black);
39
40
  position: absolute;
40
- right: var(--minPadding) / 2;
41
+ // right: var(--minPadding) / 2;
41
42
  z-index: 2;
42
43
  width: 70px;
43
44
  padding: 5px;
@@ -46,14 +47,30 @@ const i = o.div`
46
47
  background-color: rgb(from var(--basePrimary) r g b / 80%);
47
48
  border: 1px solid var(--black);
48
49
  border-radius: 10px;
49
- `, n = o.span`
50
+ `, n = o.div`
51
+ right: 25px;
52
+ bottom: 200px;
53
+ font-size: 13px;
54
+ line-height: 1.333;
55
+ color: var(--black);
56
+ position: absolute;
57
+ // right: var(--minPadding) / 2;
58
+ z-index: 2;
59
+ width: 70px;
60
+ padding: 5px;
61
+ color: var(--white);
62
+ text-align: center;
63
+ background-color: rgb(from var(--basePrimary) r g b / 80%);
64
+ border: 1px solid var(--black);
65
+ border-radius: 10px;
66
+ `, d = o.span`
50
67
  position: absolute;
51
68
  z-index: 2;
52
69
  height: 50px;
53
70
  top: 25%;
54
71
  right: 5rem;
55
72
  width: fit-content;
56
- `, d = o.div`
73
+ `, p = o.div`
57
74
  font-size: 13px;
58
75
  line-height: 1.333;
59
76
  color: var(--black);
@@ -66,49 +83,50 @@ const i = o.div`
66
83
  background-color: rgb(from var(--white) r g b / 80%);
67
84
  border: 1px solid var(--black);
68
85
  border-radius: 10px;
69
- `, p = o.div`
86
+ `, c = o.div`
70
87
  font-size: 13px;
71
88
  line-height: 1.333;
72
89
  color: var(--black);
73
90
  padding-top: 5px;
74
- `, c = o.div`
91
+ `, s = o.div`
75
92
  display: flex;
76
93
  flex-flow: nowrap;
77
94
  align-items: center;
78
95
  justify-content: space-evenly;
79
96
  margin-top: 5px;
80
97
  border-top: 1px solid var(--black);
81
- `, s = o.div`
82
- width: 50px;
83
98
  `, b = o.div`
99
+ width: 50px;
100
+ `, x = o.div`
84
101
  font-size: 18px;
85
102
  font-weight: var(--regular);
86
103
  line-height: 1.5;
87
104
  color: var(--black);
88
105
  color: var(--black);
89
- `, x = o.div`
106
+ `, g = o.div`
90
107
  display: block;
91
108
  width: 1px;
92
109
  height: 50px;
93
110
  background-color: var(--black);
94
- `, g = o.div`
111
+ `, h = o.div`
95
112
  font-size: 13px;
96
113
  line-height: 1.333;
97
114
  color: var(--black);
98
115
  color: var(--black);
99
116
  `;
100
117
  export {
101
- g as ElapsedLabel,
102
- s as ElapsedTimeBlock,
103
- d as ElapsedTimeContainer,
104
- x as ElapsedTimeDivider,
105
- c as ElapsedTimeInner,
106
- p as ElapsedTimeTitle,
107
- b as ElapsedVal,
118
+ h as ElapsedLabel,
119
+ b as ElapsedTimeBlock,
120
+ p as ElapsedTimeContainer,
121
+ g as ElapsedTimeDivider,
122
+ s as ElapsedTimeInner,
123
+ c as ElapsedTimeTitle,
124
+ x as ElapsedVal,
108
125
  i as PlaybackControlsContainer,
109
126
  r as PlaybackSpeedSliderHeader,
110
127
  t as PlaybackSpeedSliderLabel,
111
- l as PlaybackSpeedSliderLabelTopBottom,
112
- n as PlaybackSpeedSliderWrapper,
128
+ n as PlaybackSpeedSliderLabelBottom,
129
+ l as PlaybackSpeedSliderLabelTop,
130
+ d as PlaybackSpeedSliderWrapper,
113
131
  a as PlaybackSpeedTitle
114
132
  };
@@ -1 +1 @@
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
+ "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,13 +1,19 @@
1
1
  "use client";
2
- import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
+ import { jsxs as h, jsx as o } 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 "../../../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";
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";
11
17
  const Y = ({
12
18
  className: y,
13
19
  objects: g = [],
@@ -15,38 +21,38 @@ const Y = ({
15
21
  visibleImages: w = [],
16
22
  describedById: B
17
23
  }) => {
18
- const [O, W] = L(!1), [f, u] = L(), s = 600, l = 300, a = {
24
+ const [O, W] = L(!1), [f, u] = L(), s = 600, l = 300, i = {
19
25
  top: 20,
20
26
  right: 0,
21
27
  bottom: 20,
22
28
  left: 20
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([
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([
25
31
  [p, k],
26
32
  [b, x]
27
- ]), i.fitExtent(
33
+ ]), a.fitExtent(
28
34
  [
29
- [a.left, a.top],
30
- [a.left + s - m, a.top + l]
35
+ [i.left, i.top],
36
+ [i.left + s - m, i.top + l]
31
37
  ],
32
- n.outline()
38
+ r.outline()
33
39
  );
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,
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,
41
47
  {
42
48
  style: { "--image-stack-opacity": O && 1 },
43
- x: a.left,
44
- y: a.top,
49
+ x: i.left,
50
+ y: i.top,
45
51
  width: s - m,
46
52
  height: l,
47
53
  mask: "url(#imageMask)",
48
- children: /* @__PURE__ */ e(
49
- U,
54
+ children: /* @__PURE__ */ o(
55
+ q,
50
56
  {
51
57
  images: v,
52
58
  describedById: B,
@@ -58,10 +64,10 @@ const Y = ({
58
64
  )
59
65
  }
60
66
  ),
61
- /* @__PURE__ */ e("g", { children: g.map(({ id: t, lat: T, long: $ }, A) => /* @__PURE__ */ e(
62
- D,
67
+ /* @__PURE__ */ o("g", { children: g.map(({ id: t, lat: T, long: $ }, A) => /* @__PURE__ */ o(
68
+ J,
63
69
  {
64
- d: r({
70
+ d: n({
65
71
  type: "Point",
66
72
  coordinates: [$, T]
67
73
  }),
@@ -70,14 +76,14 @@ const Y = ({
70
76
  },
71
77
  t
72
78
  )) }),
73
- /* @__PURE__ */ e("g", { "aria-hidden": "true", children: G.map(
79
+ /* @__PURE__ */ o("g", { "aria-hidden": "true", children: G.map(
74
80
  (t) => t === 0 ? null : /* @__PURE__ */ h(
75
- F,
81
+ K,
76
82
  {
77
83
  style: {
78
84
  dominantBaseline: t > 0 ? "text-after-edge" : "text-before-edge"
79
85
  },
80
- transform: `translate(${i([p, t])})`,
86
+ transform: `translate(${a([p, t])})`,
81
87
  children: [
82
88
  t,
83
89
  "°"
@@ -86,10 +92,10 @@ const Y = ({
86
92
  t
87
93
  )
88
94
  ) }),
89
- /* @__PURE__ */ e("g", { "aria-hidden": "true", children: H.map((t) => /* @__PURE__ */ h(
90
- J,
95
+ /* @__PURE__ */ o("g", { "aria-hidden": "true", children: H.map((t) => /* @__PURE__ */ h(
96
+ Q,
91
97
  {
92
- transform: `translate(${i([t, 0])})`,
98
+ transform: `translate(${a([t, 0])})`,
93
99
  children: [
94
100
  t,
95
101
  "°"
@@ -97,20 +103,20 @@ const Y = ({
97
103
  },
98
104
  t
99
105
  )) }),
100
- /* @__PURE__ */ e(
101
- K,
106
+ /* @__PURE__ */ o(
107
+ X,
102
108
  {
103
109
  strokeWidth: m,
104
- d: r(n.outline())
110
+ d: n(r.outline())
105
111
  }
106
112
  ),
107
- /* @__PURE__ */ e(
108
- X,
113
+ /* @__PURE__ */ o(
114
+ V,
109
115
  {
110
- visible: !!o,
116
+ visible: !!e,
111
117
  x: S[0],
112
118
  y: S[1],
113
- children: o == null ? void 0 : o.id
119
+ children: e == null ? void 0 : e.id
114
120
  }
115
121
  )
116
122
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubin-epo/epo-widget-lib",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
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": "^2.10.1",
105
+ "@rubin-epo/epo-react-lib": "3.0.0",
106
106
  "context-filter-polyfill": "^0.3.6",
107
107
  "d3-array": "^3.2.4",
108
108
  "d3-geo": "^3.1.1",