@rubin-epo/epo-widget-lib 2.0.6 → 2.0.8

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.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),t=require("react"),b=t.createContext(null);function P(){const o=t.useContext(b);if(!o)throw new Error("OrbitalSim components cannot be rendered outside the OrbitalSimContext.Provider component.");return o}function g({children:o,orbitData:u,showDetailsTable:v=!1,allowOrbitRotation:m=!1,showTimeControls:O=!1,selectedAnswer:i,updateSelectedAnswer:x,swappableOrbits:d=!1}){const[a,c]=t.useState({neos:null,activeNeo:null,observations:[],paused:!1,pov:null,defaultZoom:null,potentialOrbits:!1,noDetails:!1,detailsRows:null,refObjs:null,noControls:!1}),[e,n]=t.useState(()=>a.observations??[]);t.useEffect(()=>{c(u),n(u.observations)},[u]),t.useEffect(()=>{if(e&&e.length>0){let l=e.map(r=>({...r,isActive:r.label===i}));n(l)}},[i]);const S=l=>{if(e&&e.length>0){let r=e.map(s=>s.id==l?{...s,isActive:!0}:{...s,isActive:!1});n(r);const f=e.find(s=>s.id===l);x((f==null?void 0:f.label)||null)}},p=t.useMemo(()=>({orbits:a,showDetailsTable:v,allowOrbitRotation:m,showTimeControls:O,setOrbits:c,observations:e,setObservations:n,updateActiveObservation:S,selectedAnswer:i,swappableOrbits:d}),[a,v,m,O,c,e,n,S,i,d]);return C.jsx(b.Provider,{value:p,children:o})}exports.OrbitalSimContext=b;exports.OrbitalSimProvider=g;exports.useOrbitalSimContext=P;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("react/jsx-runtime"),t=require("react"),b=t.createContext(null);function P(){const o=t.useContext(b);if(!o)throw new Error("OrbitalSim components cannot be rendered outside the OrbitalSimContext.Provider component.");return o}function g({children:o,orbitData:u,showDetailsTable:v=!1,allowOrbitRotation:m=!1,showTimeControls:O=!1,selectedAnswer:i,updateSelectedAnswer:x,swappableOrbits:d=!1}){const[a,c]=t.useState({neos:null,activeNeo:null,observations:[],paused:!1,pov:null,defaultZoom:null,potentialOrbits:!1,noDetails:!1,detailsRows:null,refObjs:null,noControls:!1}),[e,n]=t.useState(()=>a.observations??[]);t.useEffect(()=>{c(u),n(u.observations)},[u]),t.useEffect(()=>{if(e&&e.length>0){let l=e.map(r=>({...r,isActive:r.label===i}));n(l)}},[i,e]);const S=l=>{if(e&&e.length>0){let r=e.map(s=>s.id==l?{...s,isActive:!0}:{...s,isActive:!1});n(r);const f=e.find(s=>s.id===l);x((f==null?void 0:f.label)||null)}},p=t.useMemo(()=>({orbits:a,showDetailsTable:v,allowOrbitRotation:m,showTimeControls:O,setOrbits:c,observations:e,setObservations:n,updateActiveObservation:S,selectedAnswer:i,swappableOrbits:d}),[a,v,m,O,c,e,n,S,i,d]);return C.jsx(b.Provider,{value:p,children:o})}exports.OrbitalSimContext=b;exports.OrbitalSimProvider=g;exports.useOrbitalSimContext=P;
@@ -42,7 +42,7 @@ function N({
42
42
  let l = t.map((i) => ({ ...i, isActive: i.label === s }));
43
43
  e(l);
44
44
  }
45
- }, [s]);
45
+ }, [s, t]);
46
46
  const d = (l) => {
47
47
  if (t && t.length > 0) {
48
48
  let i = t.map((n) => n.id == l ? { ...n, isActive: !0 } : { ...n, isActive: !1 });
@@ -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"),M=require("./Orbitals/OrbitalDetails.cjs"),V=require("./Camera/CameraController.cjs"),W=require("./Camera/Camera.cjs"),B=require("./Orbitals/Orbitals.cjs"),G=require("./Sun.cjs"),N=require("./Controls/PlaybackSpeed.cjs"),A=require("./Controls/PlaybackControls.cjs"),l=require("./styles.cjs"),H=require("./Context/index.cjs");function I(){const{orbits:i,showDetailsTable:q,allowOrbitRotation:v,showTimeControls:m,swappableOrbits:x}=H.useOrbitalSimContext(),{paused:h,pov:y,defaultZoom:c,potentialOrbits:w,detailsRows:P}=i,u={min:1157e-8,max:365.25,initial:11.574,step:1},[n,a]=s.useState(!h),[D,o]=s.useState(1),[R,j]=s.useState(0),[O,d]=s.useState(h?0:u.initial),[g,p]=s.useState(0),[r,b]=s.useState(0),[C,k]=s.useState(1),[f,T]=s.useState({neos:[{Principal_desig:""}]});s.useEffect(()=>{m||(a(!1),d(0)),r>0?(d(u.initial),o(1),p(0),b(-1)):r<0&&(p(0),a(!0),b(0))},[r]);const Z=t=>{d(+t)},_=()=>{n||o(1),a(!n)},F=()=>{a(t=>!1),b(t=>t+1)},z=t=>{a(!1),o(1),j(S=>S+1)},L=t=>{a(!1),o(-1),j(S=>S+1)},E=t=>{T({neos:[t]})};return e.jsxs(e.Fragment,{children:[e.jsx(l.GlobalStyles,{}),e.jsxs(l.OrbitalSimWrapper,{children:[x?e.jsx(l.SwappableOrbitsContainer,{children:i&&i.neos&&i.neos.map(t=>e.jsx(l.SwappableOrbitButton,{onClick:()=>E(t),"data-active":Object.keys(f).length?t.Principal_desig===f.neos[0].Principal_desig:!1,children:t.Ref}))}):e.jsxs(e.Fragment,{children:[P&&q&&e.jsx(M.default,{}),m&&e.jsxs(e.Fragment,{children:[e.jsx(N.default,{elapsedTime:g,dayPerVizSec:O,speeds:u,sliderOnChangeCallback:Z}),e.jsx(A.default,{playing:n,handleStartStop:_,handleNext:z,handlePrevious:L,isDisabled:!1,handleReset:F})]})]}),e.jsxs(l.CanvasWrapper,{orthographic:!0,children:[e.jsx(V.default,{pov:v?null:y??"top",reset:r}),e.jsx(W.default,{left:-2e3,right:2e3,top:1e3,bottom:-1e3,near:-1e3,far:1e3,position:[0,0,10],defaultZoom:c||3}),e.jsx("ambientLight",{intensity:.9}),e.jsx(B.default,{defaultZoom:c||1,playing:n,stepDirection:D,dayPerVizSec:O,frameOverride:R,potentialOrbits:w,elapsedTime:g,setElapsedTime:p,reset:r,zoomLevel:C,setZoomLevel:k,orbits:x?f:i}),e.jsx(G.default,{zoomLevel:C,defaultZoom:c||1})]})]})]})}exports.default=I;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("react"),M=require("./Orbitals/OrbitalDetails.cjs"),V=require("./Camera/CameraController.cjs"),W=require("./Camera/Camera.cjs"),B=require("./Orbitals/Orbitals.cjs"),G=require("./Sun.cjs"),N=require("./Controls/PlaybackSpeed.cjs"),A=require("./Controls/PlaybackControls.cjs"),l=require("./styles.cjs"),H=require("./Context/index.cjs");function I(){const{orbits:i,showDetailsTable:q,allowOrbitRotation:v,showTimeControls:m,swappableOrbits:x}=H.useOrbitalSimContext(),{paused:h,pov:y,defaultZoom:c,potentialOrbits:w,detailsRows:P}=i,u={min:1157e-8,max:365.25,initial:11.574,step:1},[n,a]=s.useState(!h),[D,o]=s.useState(1),[R,j]=s.useState(0),[O,d]=s.useState(h?0:u.initial),[g,p]=s.useState(0),[r,b]=s.useState(0),[C,k]=s.useState(1),[f,T]=s.useState({neos:[{Principal_desig:""}]});s.useEffect(()=>{m||(a(!1),d(0)),r>0?(d(u.initial),o(1),p(0),b(-1)):r<0&&(p(0),a(!0),b(0))},[r]);const Z=t=>{d(+t)},_=()=>{n||o(1),a(!n)},F=()=>{a(t=>!1),b(t=>t+1)},z=t=>{a(!1),o(1),j(S=>S+1)},L=t=>{a(!1),o(-1),j(S=>S+1)},E=t=>{T({neos:[t]})};return e.jsxs(e.Fragment,{children:[e.jsx(l.GlobalStyles,{}),e.jsxs(l.OrbitalSimWrapper,{children:[x?e.jsx(l.SwappableOrbitsContainer,{children:i&&i.neos&&i.neos.map(t=>e.jsx(l.SwappableOrbitButton,{onClick:()=>E(t),"data-active":Object.keys(f).length?t.Principal_desig===f.neos[0].Principal_desig:!1,children:t.Ref}))}):e.jsxs(e.Fragment,{children:[P&&q&&e.jsx(M.default,{}),m&&e.jsxs(e.Fragment,{children:[e.jsx(N.default,{elapsedTime:g,dayPerVizSec:O,speeds:u,sliderOnChangeCallback:Z}),e.jsx(A.default,{playing:n,handleStartStop:_,handleNext:z,handlePrevious:L,isDisabled:!1,handleReset:F})]})]}),e.jsxs(l.CanvasWrapper,{orthographic:!0,children:[e.jsx(V.default,{pov:v?null:y??"top",reset:r}),e.jsx(W.default,{near:-1e3,far:1e3,position:[0,0,10],defaultZoom:c||3}),e.jsx("ambientLight",{intensity:.9}),e.jsx(B.default,{defaultZoom:c||1,playing:n,stepDirection:D,dayPerVizSec:O,frameOverride:R,potentialOrbits:w,elapsedTime:g,setElapsedTime:p,reset:r,zoomLevel:C,setZoomLevel:k,orbits:x?f:i}),e.jsx(G.default,{zoomLevel:C,defaultZoom:c||1})]})]})]})}exports.default=I;
@@ -10,27 +10,27 @@ import I from "./Controls/PlaybackSpeed.js";
10
10
  import J from "./Controls/PlaybackControls.js";
11
11
  import { GlobalStyles as K, OrbitalSimWrapper as M, SwappableOrbitsContainer as Q, SwappableOrbitButton as U, CanvasWrapper as X } from "./styles.js";
12
12
  import { useOrbitalSimContext as Y } from "./Context/index.js";
13
- function ce() {
14
- const { orbits: a, showDetailsTable: P, allowOrbitRotation: D, showTimeControls: S, swappableOrbits: O } = Y(), {
13
+ function me() {
14
+ const { orbits: o, showDetailsTable: P, allowOrbitRotation: D, showTimeControls: S, swappableOrbits: O } = Y(), {
15
15
  paused: C,
16
16
  pov: x,
17
17
  defaultZoom: p,
18
18
  potentialOrbits: k,
19
19
  detailsRows: R
20
- } = a, m = { min: 1157e-8, max: 365.25, initial: 11.574, step: 1 }, [l, o] = i(!C), [Z, n] = i(1), [T, g] = i(0), [w, c] = i(C ? 0 : m.initial), [v, d] = i(0), [r, f] = i(0), [y, j] = i(1), [b, z] = i({ neos: [{ Principal_desig: "" }] });
20
+ } = o, c = { min: 1157e-8, max: 365.25, initial: 11.574, step: 1 }, [l, a] = i(!C), [Z, n] = i(1), [T, g] = i(0), [w, m] = i(C ? 0 : c.initial), [v, d] = i(0), [r, f] = i(0), [y, j] = i(1), [b, z] = i({ neos: [{ Principal_desig: "" }] });
21
21
  B(() => {
22
- S || (o(!1), c(0)), r > 0 ? (c(m.initial), n(1), d(0), f(-1)) : r < 0 && (d(0), o(!0), f(0));
22
+ S || (a(!1), m(0)), r > 0 ? (m(c.initial), n(1), d(0), f(-1)) : r < 0 && (d(0), a(!0), f(0));
23
23
  }, [r]);
24
24
  const L = (e) => {
25
- c(+e);
25
+ m(+e);
26
26
  }, _ = () => {
27
- l || n(1), o(!l);
27
+ l || n(1), a(!l);
28
28
  }, E = () => {
29
- o((e) => !1), f((e) => e + 1);
29
+ a((e) => !1), f((e) => e + 1);
30
30
  }, F = (e) => {
31
- o(!1), n(1), g((u) => u + 1);
31
+ a(!1), n(1), g((u) => u + 1);
32
32
  }, V = (e) => {
33
- o(!1), n(-1), g((u) => u + 1);
33
+ a(!1), n(-1), g((u) => u + 1);
34
34
  }, W = (e) => {
35
35
  z({
36
36
  neos: [e]
@@ -39,7 +39,7 @@ function ce() {
39
39
  return /* @__PURE__ */ s(h, { children: [
40
40
  /* @__PURE__ */ t(K, {}),
41
41
  /* @__PURE__ */ s(M, { children: [
42
- O ? /* @__PURE__ */ t(Q, { children: a && a.neos && a.neos.map((e) => /* @__PURE__ */ t(
42
+ O ? /* @__PURE__ */ t(Q, { children: o && o.neos && o.neos.map((e) => /* @__PURE__ */ t(
43
43
  U,
44
44
  {
45
45
  onClick: () => W(e),
@@ -54,7 +54,7 @@ function ce() {
54
54
  {
55
55
  elapsedTime: v,
56
56
  dayPerVizSec: w,
57
- speeds: m,
57
+ speeds: c,
58
58
  sliderOnChangeCallback: L
59
59
  }
60
60
  ),
@@ -76,10 +76,6 @@ function ce() {
76
76
  /* @__PURE__ */ t(
77
77
  q,
78
78
  {
79
- left: -2e3,
80
- right: 2e3,
81
- top: 1e3,
82
- bottom: -1e3,
83
79
  near: -1e3,
84
80
  far: 1e3,
85
81
  position: [0, 0, 10],
@@ -101,7 +97,7 @@ function ce() {
101
97
  reset: r,
102
98
  zoomLevel: y,
103
99
  setZoomLevel: j,
104
- orbits: O ? b : a
100
+ orbits: O ? b : o
105
101
  }
106
102
  ),
107
103
  /* @__PURE__ */ t(
@@ -116,5 +112,5 @@ function ce() {
116
112
  ] });
117
113
  }
118
114
  export {
119
- ce as default
115
+ me as default
120
116
  };
@@ -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),console.error("click!")},children:"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,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;
@@ -5,34 +5,34 @@ 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
7
  import { GlobalStyles as C } from "../styles.js";
8
- function y() {
8
+ function v() {
9
9
  const { orbits: n } = d(), {
10
- detailsRows: t
11
- } = n, [i, r] = c(!1);
10
+ detailsRows: i
11
+ } = n, [t, l] = c(!1);
12
12
  return /* @__PURE__ */ o(s, { children: [
13
13
  /* @__PURE__ */ e(C, {}),
14
14
  /* @__PURE__ */ e(
15
15
  m,
16
16
  {
17
17
  styleAs: "secondary",
18
- isInactive: !t,
18
+ isInactive: !i,
19
19
  onClick: () => {
20
- r(!i), console.error("click!");
20
+ l(!t);
21
21
  },
22
- children: "Show Details"
22
+ children: t ? "Hide Details" : "Show Details"
23
23
  }
24
24
  ),
25
- /* @__PURE__ */ e(p, { slideFrom: "left", isOpen: i, children: /* @__PURE__ */ o(h, { children: [
25
+ /* @__PURE__ */ e(p, { slideFrom: "left", isOpen: t, children: /* @__PURE__ */ o(h, { children: [
26
26
  /* @__PURE__ */ e("h3", { children: "Orbital Details" }),
27
- t && t.map((l) => /* @__PURE__ */ o(u, { children: [
28
- /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e("p", { children: l.rowTitle }) }),
29
- /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e("p", { children: l.rowContent }) })
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
30
  ] })),
31
31
  /* @__PURE__ */ e(
32
32
  a,
33
33
  {
34
34
  isBlock: !0,
35
- onClick: () => r(!i),
35
+ onClick: () => l(!t),
36
36
  children: "Close"
37
37
  }
38
38
  )
@@ -40,5 +40,5 @@ function y() {
40
40
  ] });
41
41
  }
42
42
  export {
43
- y as default
43
+ v as default
44
44
  };
@@ -1,7 +1,9 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),i=require("@rubin-epo/epo-react-lib/Button"),l=require("@rubin-epo/epo-react-lib/Slideout"),o=e=>e&&e.__esModule?e:{default:e},t=o(r),d=o(i),a=o(l),n=t.default(a.default)`
2
- & > div:first-of-type {
3
- display: none;
4
- }
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),i=require("@rubin-epo/epo-react-lib/Button"),l=require("@rubin-epo/epo-react-lib/SlideoutInfoCard"),e=o=>o&&o.__esModule?o:{default:o},t=e(r),a=e(i),d=e(l),n=t.default(d.default)`
2
+ position: absolute;
3
+
4
+ & > div:first-of-type {
5
+ display: none;
6
+ }
5
7
  `,c=t.default.div`
6
8
  padding: 2px 4px;
7
9
  margin-top: 4px;
@@ -13,7 +15,7 @@
13
15
  color-adjust: exact;
14
16
  z-index: 10000;
15
17
  height: fit-content;
16
- `,u=t.default(d.default)`
18
+ `,u=t.default(a.default)`
17
19
  position: absolute;
18
20
  top: 0;
19
21
  left: 0;
@@ -43,6 +45,7 @@
43
45
  display: flex;
44
46
  gap: 10px;
45
47
  margin: 0px;
48
+ color: var(--black);
46
49
  `,x=t.default.div`
47
50
  flex: 1;
48
51
  padding: 0px 15px 0px 15px;
@@ -1,11 +1,13 @@
1
1
  "use client";
2
2
  import o from "styled-components";
3
3
  import r from "@rubin-epo/epo-react-lib/Button";
4
- import t from "@rubin-epo/epo-react-lib/Slideout";
4
+ import t from "@rubin-epo/epo-react-lib/SlideoutInfoCard";
5
5
  const a = o(t)`
6
- & > div:first-of-type {
7
- display: none;
8
- }
6
+ position: absolute;
7
+
8
+ & > div:first-of-type {
9
+ display: none;
10
+ }
9
11
  `, d = o.div`
10
12
  padding: 2px 4px;
11
13
  margin-top: 4px;
@@ -27,7 +29,7 @@ const a = o(t)`
27
29
  color: var(--white) !important;
28
30
  background-color: var(--error);
29
31
  }
30
- `, p = o.div`
32
+ `, c = o.div`
31
33
  background-color: var(--neutral10);
32
34
  display: flex;
33
35
  flex-direction: column;
@@ -43,10 +45,11 @@ const a = o(t)`
43
45
  margin: 0px;
44
46
  text-align: center;
45
47
  }
46
- `, c = o.div`
48
+ `, p = o.div`
47
49
  display: flex;
48
50
  gap: 10px;
49
51
  margin: 0px;
52
+ color: var(--black);
50
53
  `, x = o.div`
51
54
  flex: 1;
52
55
  padding: 0px 15px 0px 15px;
@@ -67,7 +70,7 @@ export {
67
70
  d as Label,
68
71
  x as SlideoutColLeft,
69
72
  s as SlideoutColRight,
70
- p as SlideoutPanel,
71
- c as SlideoutRow,
73
+ c as SlideoutPanel,
74
+ p as SlideoutRow,
72
75
  a as SlideoutWrapper
73
76
  };
@@ -34,6 +34,7 @@
34
34
  }
35
35
  `,l=e.default.div`
36
36
  position: relative;
37
+ overflow: hidden;
37
38
  height: var(--tallestSquareWidget);
38
39
  min-height: 500px;
39
40
  background-color: #000000;
@@ -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 o = t`
4
+ const i = t`
5
5
  :root {
6
6
  --white: #ffffff;
7
7
  --black: #000000;
@@ -37,6 +37,7 @@ const o = t`
37
37
  }
38
38
  `, l = e.div`
39
39
  position: relative;
40
+ overflow: hidden;
40
41
  height: var(--tallestSquareWidget);
41
42
  min-height: 500px;
42
43
  background-color: #000000;
@@ -86,7 +87,7 @@ const o = t`
86
87
  `;
87
88
  export {
88
89
  n as CanvasWrapper,
89
- o as GlobalStyles,
90
+ i as GlobalStyles,
90
91
  l as OrbitalSimWrapper,
91
92
  d as SunLabel,
92
93
  p as SwappableOrbitButton,
@@ -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.6",
3
+ "version": "2.0.8",
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.0",
105
+ "@rubin-epo/epo-react-lib": "3.0.1",
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",
@@ -1,9 +0,0 @@
1
- export declare const SlideoutWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('@rubin-epo/epo-react-lib/Slideout').SlideoutProps & {
2
- children?: import('react').ReactNode | undefined;
3
- }, never>> & string & Omit<import('react').FunctionComponent<import('react').PropsWithChildren<import('@rubin-epo/epo-react-lib/Slideout').SlideoutProps>>, keyof import('react').Component<any, {}, any>>;
4
- export declare const Label: 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 ButtonWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<Omit<import('react').PropsWithChildren<import('@rubin-epo/epo-react-lib/Button').ButtonProps>, "ref"> & import('react').RefAttributes<HTMLButtonElement>, never>> & string & Omit<import('react').ForwardRefExoticComponent<Omit<import('react').PropsWithChildren<import('@rubin-epo/epo-react-lib/Button').ButtonProps>, "ref"> & import('react').RefAttributes<HTMLButtonElement>>, keyof import('react').Component<any, {}, any>>;
6
- export declare const SlideoutPanel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
7
- export declare const SlideoutRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
8
- export declare const SlideoutColLeft: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
9
- export declare const SlideoutColRight: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;