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

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 (31) hide show
  1. package/dist/charts/Readout/index.cjs +1 -1
  2. package/dist/charts/Readout/index.js +25 -18
  3. package/dist/charts/ScatterPlot/index.cjs +1 -1
  4. package/dist/charts/ScatterPlot/index.js +53 -50
  5. package/dist/mock-data/OrbitalSim/index.d.ts +19 -10
  6. package/dist/widgets/OrbitalSim/Context/OrbitalSimContext.types.d.ts +5 -2
  7. package/dist/widgets/OrbitalSim/Context/index.cjs +1 -1
  8. package/dist/widgets/OrbitalSim/Context/index.d.ts +1 -1
  9. package/dist/widgets/OrbitalSim/Context/index.js +36 -34
  10. package/dist/widgets/OrbitalSim/OrbitalSim.cjs +1 -1
  11. package/dist/widgets/OrbitalSim/OrbitalSim.js +29 -29
  12. package/dist/widgets/OrbitalSim/Orbitals/Orbital.cjs +1 -1
  13. package/dist/widgets/OrbitalSim/Orbitals/Orbital.js +79 -79
  14. package/dist/widgets/OrbitalSim/Orbitals/OrbitalDetails.cjs +1 -1
  15. package/dist/widgets/OrbitalSim/Orbitals/OrbitalDetails.js +25 -24
  16. package/dist/widgets/OrbitalSim/Orbitals/Orbitals.cjs +1 -1
  17. package/dist/widgets/OrbitalSim/Orbitals/Orbitals.d.ts +2 -1
  18. package/dist/widgets/OrbitalSim/Orbitals/Orbitals.js +60 -59
  19. package/dist/widgets/OrbitalSim/Orbitals/styles.cjs +1 -1
  20. package/dist/widgets/OrbitalSim/Orbitals/styles.js +1 -1
  21. package/dist/widgets/OrbitalSim/Sun.cjs +1 -1
  22. package/dist/widgets/OrbitalSim/Sun.js +6 -6
  23. package/dist/widgets/OrbitalSim/orbitalUtilities.cjs +1 -1
  24. package/dist/widgets/OrbitalSim/orbitalUtilities.js +20 -21
  25. package/dist/widgets/OrbitalSim/styles.cjs +1 -1
  26. package/dist/widgets/OrbitalSim/styles.js +1 -1
  27. package/dist/widgets/SourceSelector/MovingSourceSelector.cjs +1 -1
  28. package/dist/widgets/SourceSelector/MovingSourceSelector.js +82 -85
  29. package/dist/widgets/SupernovaThreeVector/Skymap/index.cjs +1 -1
  30. package/dist/widgets/SupernovaThreeVector/Skymap/index.js +45 -39
  31. package/package.json +2 -3
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),r=require("react"),o=require("../../../node_modules/prop-types/index.cjs"),ge=require("three"),fe=require("@react-three/fiber"),m=require("@react-three/drei"),t=require("../orbitalUtilities.cjs"),xe=require("../chartColors.module.css.cjs"),pe=require("../Context/index.cjs"),je=require("react-i18next"),g=require("./styles.cjs");function ye(i){if(i&&i.__esModule)return i;const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const a in i)if(a!=="default"){const j=Object.getOwnPropertyDescriptor(i,a);Object.defineProperty(f,a,j.get?j:{enumerable:!0,get:()=>i[a]})}}return f.default=i,Object.freeze(f)}const O=ye(ge),_=({data:i,selectionCallback:f,active:a,playing:j,dayPerVizSec:G,stepDirection:k,frameOverride:R,orbitColor:w,objectColor:C,objectRadius:D,initialized:N,initCallback:v,devMode:Z,zoomMod:U,defaultZoom:K,type:A,reset:z})=>{const{t:Y}=je.useTranslation(),{orbits:$}=pe.useOrbitalSimContext(),{activeVelocityCallback:J}=$,Q=r.useRef(),{a:B,e:W,i:X,M:ee,Node:V,Peri:q,Principal_desig:te,Translated_desig_key:H,name:oe}=i||{},[se]=r.useState(()=>[0,t.degsToRads(X),V?t.degsToRads(V):0]),[n]=r.useState(()=>t.auToUnit(B)),[y]=r.useState(()=>t.getMinorAxis(B,W)),[re]=r.useState(()=>t.getFocus(n,y)),[s]=r.useState(new O.Vector3(re,0,0)),[d]=r.useState(new O.Vector3(0,0,0)),[ie,ae]=r.useState(!1),[u]=r.useState(()=>t.getCurve(n,y,s.x,s.y)),[ne]=r.useState(()=>t.getLineGeometry(u.getPoints(360))),b=t.getPosFromArcLength(0,u),[x,T]=r.useState({position:b,rotation:[0,0,0],progress:0,velocity:t.getVelocity(b.distanceTo(d),n),period:0});r.useEffect(()=>{z>0&&T({position:b,rotation:[0,0,0],progress:0,velocity:t.getVelocity(b.distanceTo(d),n),period:0})},[z]);function le(h){let l=0,c=t.getPosFromArcLength(l,u);if(h){const P=h>180,M=P?h-180:h;let p=t.getAngleFromPos(c,d);for(;p<M;)l+=.01,c=t.getPosFromArcLength(l,u),p=t.getAngleFromPos(c,d);P&&(l+=.5,c=t.getPosFromArcLength(l,u))}return v?v():ae(!0),{position:c,rotation:[0,0,0],progress:l,velocity:t.getVelocity(c.distanceTo(d),n),period:0}}function E(h,L){const{progress:l,position:c,velocity:P,period:M}=x,p=h?0:L*(G||t.DAY_PER_VIZ_SEC),ce=P*p*k,S=l+ce/u.getLength(),F=S>1?1-S:S,{x:de,y:ue}=u.getPoint(F),he=new O.Vector3(de,ue,0),me=t.getVelocity(c.distanceTo(d),n);let I=p+M;S>1&&(I=0),T({...x,position:he,progress:F,velocity:me,period:I})}return r.useEffect(()=>{T(le(ee||Math.floor(Math.random()*Math.floor(180))))},[]),r.useEffect(()=>{R&&E(!1,1/60)},[R]),r.useEffect(()=>{a&&J(t.auToMeters(t.unitToAu(x.velocity/1e5)))},[x]),fe.useFrame((h,L)=>{(N||ie)&&E(!j,L)}),e.jsx("group",{rotation:se,children:e.jsxs("group",{rotation:[0,0,q?t.degsToRads(q+90):0],children:[e.jsx("line",{ref:Q,geometry:ne,children:e.jsx("lineBasicMaterial",{attach:"material",color:a?t.ORBITAL_COLORS.asteroid.orbitHighlight:w||t.ORBITAL_COLORS.asteroid.orbitColor})}),e.jsxs("mesh",{position:x.position,onClick:()=>f(i,"neo"),children:[(A==="planet"||A==="neo"||a)&&e.jsx(m.Html,{children:e.jsx(g.Label,{children:e.jsx("button",{type:"button",style:{fontSize:t.getLabelSize(U,K)},onClick:()=>f(i,"neo"),children:H?Y(H):oe||te})})}),e.jsx("sphereGeometry",{attach:"geometry",args:[D||4,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:a?t.ORBITAL_COLORS.asteroid.objectHighlight:C||t.ORBITAL_COLORS.asteroid.objectColor})]}),Z&&e.jsxs(e.Fragment,{children:[e.jsxs("mesh",{position:s,children:[e.jsx("sphereGeometry",{attach:"geometry",args:[2,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:xe.default.chart1}),e.jsx(m.Html,{children:e.jsx(g.Label,{children:"center"})})]}),e.jsxs("mesh",{position:d,children:[e.jsx("sphereGeometry",{attach:"geometry",args:[2,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:C||"blue"}),e.jsx(m.Html,{children:e.jsx(g.Label,{children:"sun"})})]}),e.jsxs("mesh",{position:[s.x,-y+s.y,s.z],children:[e.jsx("sphereGeometry",{attach:"geometry",args:[2,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:"green"}),e.jsx(m.Html,{children:e.jsx(g.Label,{children:"minor axis vertex"})})]}),e.jsxs("mesh",{position:[s.x,y+s.y,s.z],children:[e.jsx("sphereGeometry",{attach:"geometry",args:[2,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:"green"}),e.jsx(m.Html,{children:e.jsx(g.Label,{children:"minor axis vertex"})})]}),e.jsxs("mesh",{position:[n+s.x,s.y,s.z],children:[e.jsx("sphereGeometry",{attach:"geometry",args:[2,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:"green"}),e.jsx(m.Html,{children:e.jsx(g.Label,{children:"major axis vertex"})})]}),e.jsxs("mesh",{position:[-n+s.x,s.y,s.z],children:[e.jsx("sphereGeometry",{attach:"geometry",args:[2,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:"green"}),e.jsx(m.Html,{children:e.jsx(g.Label,{children:"major axis vertex"})})]})]})]})})};_.defaultProps={type:"object"};_.propTypes={data:o.default.object,selectionCallback:o.default.func,active:o.default.bool,playing:o.default.bool,dayPerVizSec:o.default.number,stepDirection:o.default.number,frameOverride:o.default.number,orbitColor:o.default.string,objectColor:o.default.string,objectRadius:o.default.number,initCallback:o.default.func,initialized:o.default.bool,devMode:o.default.bool,activeVelocityCallback:o.default.func,zoomMod:o.default.number,defaultZoom:o.default.number,type:o.default.string,reset:o.default.number};exports.default=_;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),r=require("react"),o=require("../../../node_modules/prop-types/index.cjs"),ge=require("three"),fe=require("@react-three/fiber"),d=require("@react-three/drei"),t=require("../orbitalUtilities.cjs"),xe=require("../chartColors.module.css.cjs"),pe=require("../Context/index.cjs"),je=require("react-i18next"),g=require("./styles.cjs");function ye(i){if(i&&i.__esModule)return i;const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const a in i)if(a!=="default"){const j=Object.getOwnPropertyDescriptor(i,a);Object.defineProperty(f,a,j.get?j:{enumerable:!0,get:()=>i[a]})}}return f.default=i,Object.freeze(f)}const M=ye(ge),_=({data:i,selectionCallback:f,active:a,playing:j,dayPerVizSec:w,stepDirection:G,frameOverride:R,orbitColor:k,objectColor:C,objectRadius:D,initialized:N,initCallback:v,devMode:Z,zoomMod:U,defaultZoom:K,type:A,reset:z})=>{const{t:Y}=je.useTranslation(),{orbits:$}=pe.useOrbitalSimContext(),{activeVelocityCallback:J}=$,Q=r.useRef(),{a:V,e:W,i:X,M:ee,Node:q,Peri:B,Principal_desig:te,Translated_desig_key:H,name:oe}=i||{},[se]=r.useState(()=>[0,t.degsToRads(X),q?t.degsToRads(q):0]),[n]=r.useState(()=>t.auToUnit(V)),[y]=r.useState(()=>t.getMinorAxis(V,W)),[re]=r.useState(()=>t.getFocus(n,y)),[s]=r.useState(new M.Vector3(re,0,0)),[u]=r.useState(new M.Vector3(0,0,0)),[ie,ae]=r.useState(!1),[h]=r.useState(()=>t.getCurve(n,y,s.x,s.y)),[ne]=r.useState(h.getPoints(360)),b=t.getPosFromArcLength(0,h),[x,T]=r.useState({position:b,rotation:[0,0,0],progress:0,velocity:t.getVelocity(b.distanceTo(u),n),period:0});r.useEffect(()=>{z>0&&T({position:b,rotation:[0,0,0],progress:0,velocity:t.getVelocity(b.distanceTo(u),n),period:0})},[z]);function le(m){let l=0,c=t.getPosFromArcLength(l,h);if(m){const P=m>180,O=P?m-180:m;let p=t.getAngleFromPos(c,u);for(;p<O;)l+=.01,c=t.getPosFromArcLength(l,h),p=t.getAngleFromPos(c,u);P&&(l+=.5,c=t.getPosFromArcLength(l,h))}return v?v():ae(!0),{position:c,rotation:[0,0,0],progress:l,velocity:t.getVelocity(c.distanceTo(u),n),period:0}}function E(m,L){const{progress:l,position:c,velocity:P,period:O}=x,p=m?0:L*(w||t.DAY_PER_VIZ_SEC),ce=P*p*G,S=l+ce/h.getLength(),F=S>1?1-S:S,{x:de,y:ue}=h.getPoint(F),he=new M.Vector3(de,ue,0),me=t.getVelocity(c.distanceTo(u),n);let I=p+O;S>1&&(I=0),T({...x,position:he,progress:F,velocity:me,period:I})}return r.useEffect(()=>{T(le(ee||Math.floor(Math.random()*Math.floor(180))))},[]),r.useEffect(()=>{R&&E(!1,1/60)},[R]),r.useEffect(()=>{a&&J(t.auToMeters(t.unitToAu(x.velocity/1e5)))},[x]),fe.useFrame((m,L)=>{(N||ie)&&E(!j,L)}),e.jsx("group",{rotation:se,children:e.jsxs("group",{rotation:[0,0,B?t.degsToRads(B+90):0],children:[e.jsx(d.Line,{ref:Q,points:ne,linewidth:2,color:a?t.ORBITAL_COLORS.asteroid.orbitHighlight:k||t.ORBITAL_COLORS.asteroid.orbitColor}),e.jsxs("mesh",{position:x.position,onClick:()=>f(i,"neo"),children:[(A==="planet"||A==="neo"||a)&&e.jsx(d.Html,{children:e.jsx(g.Label,{style:{fontSize:t.getLabelSize(U,K)},children:H?Y(H):oe||te})}),e.jsx("sphereGeometry",{attach:"geometry",args:[D||4,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:a?t.ORBITAL_COLORS.asteroid.objectHighlight:C||t.ORBITAL_COLORS.asteroid.objectColor})]}),Z&&e.jsxs(e.Fragment,{children:[e.jsxs("mesh",{position:s,children:[e.jsx("sphereGeometry",{attach:"geometry",args:[2,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:xe.default.chart1}),e.jsx(d.Html,{children:e.jsx(g.Label,{children:"center"})})]}),e.jsxs("mesh",{position:u,children:[e.jsx("sphereGeometry",{attach:"geometry",args:[2,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:C||"blue"}),e.jsx(d.Html,{children:e.jsx(g.Label,{children:"sun"})})]}),e.jsxs("mesh",{position:[s.x,-y+s.y,s.z],children:[e.jsx("sphereGeometry",{attach:"geometry",args:[2,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:"green"}),e.jsx(d.Html,{children:e.jsx(g.Label,{children:"minor axis vertex"})})]}),e.jsxs("mesh",{position:[s.x,y+s.y,s.z],children:[e.jsx("sphereGeometry",{attach:"geometry",args:[2,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:"green"}),e.jsx(d.Html,{children:e.jsx(g.Label,{children:"minor axis vertex"})})]}),e.jsxs("mesh",{position:[n+s.x,s.y,s.z],children:[e.jsx("sphereGeometry",{attach:"geometry",args:[2,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:"green"}),e.jsx(d.Html,{children:e.jsx(g.Label,{children:"major axis vertex"})})]}),e.jsxs("mesh",{position:[-n+s.x,s.y,s.z],children:[e.jsx("sphereGeometry",{attach:"geometry",args:[2,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:"green"}),e.jsx(d.Html,{children:e.jsx(g.Label,{children:"major axis vertex"})})]})]})]})})};_.defaultProps={type:"object"};_.propTypes={data:o.default.object,selectionCallback:o.default.func,active:o.default.bool,playing:o.default.bool,dayPerVizSec:o.default.number,stepDirection:o.default.number,frameOverride:o.default.number,orbitColor:o.default.string,objectColor:o.default.string,objectRadius:o.default.number,initCallback:o.default.func,initialized:o.default.bool,devMode:o.default.bool,activeVelocityCallback:o.default.func,zoomMod:o.default.number,defaultZoom:o.default.number,type:o.default.string,reset:o.default.number};exports.default=_;
@@ -1,133 +1,133 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as i, Fragment as Pe } from "react/jsx-runtime";
3
- import { useRef as Me, useState as r, useEffect as M } from "react";
3
+ import { useRef as Te, useState as r, useEffect as T } from "react";
4
4
  import t from "../../../node_modules/prop-types/index.js";
5
5
  import * as L from "three";
6
- import { useFrame as Te } from "@react-three/fiber";
7
- import { Html as h } from "@react-three/drei";
8
- import { degsToRads as V, auToUnit as Ce, getMinorAxis as ve, getFocus as ze, getCurve as je, getLineGeometry as Be, getPosFromArcLength as T, getVelocity as C, auToMeters as Le, unitToAu as Ve, ORBITAL_COLORS as v, getLabelSize as Ge, getAngleFromPos as Z, DAY_PER_VIZ_SEC as Re } from "../orbitalUtilities.js";
6
+ import { useFrame as Me } from "@react-three/fiber";
7
+ import { Line as Ce, Html as h } from "@react-three/drei";
8
+ import { degsToRads as V, auToUnit as ve, getMinorAxis as ze, getFocus as je, getCurve as Le, getPosFromArcLength as M, getVelocity as C, auToMeters as Ve, unitToAu as Be, ORBITAL_COLORS as v, getLabelSize as Ge, getAngleFromPos as H, DAY_PER_VIZ_SEC as Re } from "../orbitalUtilities.js";
9
9
  import Se from "../chartColors.module.css.js";
10
10
  import { useOrbitalSimContext as _e } from "../Context/index.js";
11
- import { useTranslation as Ae } from "react-i18next";
11
+ import { useTranslation as we } from "react-i18next";
12
12
  import { Label as d } from "./styles.js";
13
- const N = ({
14
- data: z,
15
- selectionCallback: G,
16
- active: y,
13
+ const Z = ({
14
+ data: B,
15
+ selectionCallback: N,
16
+ active: f,
17
17
  playing: K,
18
18
  dayPerVizSec: U,
19
19
  stepDirection: Y,
20
- frameOverride: R,
20
+ frameOverride: G,
21
21
  orbitColor: q,
22
- objectColor: S,
22
+ objectColor: R,
23
23
  objectRadius: J,
24
24
  initialized: Q,
25
- initCallback: _,
25
+ initCallback: S,
26
26
  devMode: W,
27
27
  zoomMod: X,
28
28
  defaultZoom: $,
29
- type: A,
29
+ type: _,
30
30
  // noLabels,
31
- reset: k
31
+ reset: w
32
32
  }) => {
33
- const { t: ee } = Ae(), { orbits: te } = _e(), { activeVelocityCallback: oe } = te, re = Me(), {
34
- a: w,
33
+ const { t: ee } = we(), { orbits: te } = _e(), { activeVelocityCallback: oe } = te, re = Te(), {
34
+ a: A,
35
35
  e: ie,
36
- i: ne,
37
- M: se,
38
- Node: E,
39
- Peri: F,
36
+ i: se,
37
+ M: ne,
38
+ Node: k,
39
+ Peri: E,
40
40
  Principal_desig: ae,
41
- Translated_desig_key: I,
41
+ Translated_desig_key: F,
42
42
  name: ce
43
- } = z || {}, [le] = r(() => [
43
+ } = B || {}, [le] = r(() => [
44
44
  0,
45
- V(ne),
46
- E ? V(E) : 0
47
- ]), [n] = r(() => Ce(w)), [u] = r(() => ve(w, ie)), [me] = r(() => ze(n, u)), [o] = r(new L.Vector3(me, 0, 0)), [c] = r(new L.Vector3(0, 0, 0)), [he, de] = r(!1), [l] = r(
48
- () => je(n, u, o.x, o.y)
49
- ), [pe] = r(() => Be(l.getPoints(360))), f = T(0, l), [p, j] = r({
50
- position: f,
45
+ V(se),
46
+ k ? V(k) : 0
47
+ ]), [s] = r(() => ve(A)), [u] = r(() => ze(A, ie)), [me] = r(() => je(s, u)), [o] = r(new L.Vector3(me, 0, 0)), [c] = r(new L.Vector3(0, 0, 0)), [he, de] = r(!1), [l] = r(
48
+ () => Le(s, u, o.x, o.y)
49
+ ), [pe] = r(l.getPoints(360)), y = M(0, l), [p, z] = r({
50
+ position: y,
51
51
  rotation: [0, 0, 0],
52
52
  progress: 0,
53
- velocity: C(f.distanceTo(c), n),
53
+ velocity: C(y.distanceTo(c), s),
54
54
  period: 0
55
55
  });
56
- M(() => {
57
- k > 0 && j({
58
- position: f,
56
+ T(() => {
57
+ w > 0 && z({
58
+ position: y,
59
59
  rotation: [0, 0, 0],
60
60
  progress: 0,
61
- velocity: C(f.distanceTo(c), n),
61
+ velocity: C(y.distanceTo(c), s),
62
62
  period: 0
63
63
  });
64
- }, [k]);
64
+ }, [w]);
65
65
  function ge(m) {
66
- let s = 0, a = T(s, l);
66
+ let n = 0, a = M(n, l);
67
67
  if (m) {
68
- const x = m > 180, B = x ? m - 180 : m;
69
- let g = Z(a, c);
70
- for (; g < B; )
71
- s += 0.01, a = T(s, l), g = Z(a, c);
72
- x && (s += 0.5, a = T(s, l));
68
+ const x = m > 180, j = x ? m - 180 : m;
69
+ let g = H(a, c);
70
+ for (; g < j; )
71
+ n += 0.01, a = M(n, l), g = H(a, c);
72
+ x && (n += 0.5, a = M(n, l));
73
73
  }
74
- return _ ? _() : de(!0), {
74
+ return S ? S() : de(!0), {
75
75
  position: a,
76
76
  rotation: [0, 0, 0],
77
- progress: s,
78
- velocity: C(a.distanceTo(c), n),
77
+ progress: n,
78
+ velocity: C(a.distanceTo(c), s),
79
79
  period: 0
80
80
  };
81
81
  }
82
- function O(m, b) {
82
+ function I(m, b) {
83
83
  const {
84
- progress: s,
84
+ progress: n,
85
85
  position: a,
86
86
  velocity: x,
87
- period: B
88
- } = p, g = m ? 0 : b * (U || Re), ye = x * g * Y, P = s + ye / l.getLength(), D = P > 1 ? 1 - P : P, { x: ue, y: fe } = l.getPoint(D), be = new L.Vector3(ue, fe, 0), xe = C(a.distanceTo(c), n);
89
- let H = g + B;
90
- P > 1 && (H = 0), j({
87
+ period: j
88
+ } = p, g = m ? 0 : b * (U || Re), fe = x * g * Y, P = n + fe / l.getLength(), O = P > 1 ? 1 - P : P, { x: ue, y: ye } = l.getPoint(O), be = new L.Vector3(ue, ye, 0), xe = C(a.distanceTo(c), s);
89
+ let D = g + j;
90
+ P > 1 && (D = 0), z({
91
91
  ...p,
92
92
  position: be,
93
- progress: D,
93
+ progress: O,
94
94
  velocity: xe,
95
- period: H
95
+ period: D
96
96
  });
97
97
  }
98
- return M(() => {
99
- j(ge(se || Math.floor(Math.random() * Math.floor(180))));
100
- }, []), M(() => {
101
- R && O(!1, 1 / 60);
102
- }, [R]), M(() => {
103
- y && oe(Le(Ve(p.velocity / 1e5)));
104
- }, [p]), Te((m, b) => {
105
- (Q || he) && O(!K, b);
106
- }), /* @__PURE__ */ e("group", { rotation: le, children: /* @__PURE__ */ i("group", { rotation: [0, 0, F ? V(F + 90) : 0], children: [
107
- /* @__PURE__ */ e("line", { ref: re, geometry: pe, children: /* @__PURE__ */ e(
108
- "lineBasicMaterial",
98
+ return T(() => {
99
+ z(ge(ne || Math.floor(Math.random() * Math.floor(180))));
100
+ }, []), T(() => {
101
+ G && I(!1, 1 / 60);
102
+ }, [G]), T(() => {
103
+ f && oe(Ve(Be(p.velocity / 1e5)));
104
+ }, [p]), Me((m, b) => {
105
+ (Q || he) && I(!K, b);
106
+ }), /* @__PURE__ */ e("group", { rotation: le, children: /* @__PURE__ */ i("group", { rotation: [0, 0, E ? V(E + 90) : 0], children: [
107
+ /* @__PURE__ */ e(
108
+ Ce,
109
109
  {
110
- attach: "material",
111
- color: y ? v.asteroid.orbitHighlight : q || v.asteroid.orbitColor
110
+ ref: re,
111
+ points: pe,
112
+ linewidth: 2,
113
+ color: f ? v.asteroid.orbitHighlight : q || v.asteroid.orbitColor
112
114
  }
113
- ) }),
115
+ ),
114
116
  /* @__PURE__ */ i(
115
117
  "mesh",
116
118
  {
117
119
  position: p.position,
118
- onClick: () => G(z, "neo"),
120
+ onClick: () => N(B, "neo"),
119
121
  children: [
120
- (A === "planet" || A === "neo" || y) && /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(
121
- "button",
122
+ (_ === "planet" || _ === "neo" || f) && /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(
123
+ d,
122
124
  {
123
- type: "button",
124
125
  style: {
125
126
  fontSize: Ge(X, $)
126
127
  },
127
- onClick: () => G(z, "neo"),
128
- children: I ? ee(I) : ce || ae
128
+ children: F ? ee(F) : ce || ae
129
129
  }
130
- ) }) }),
130
+ ) }),
131
131
  /* @__PURE__ */ e(
132
132
  "sphereGeometry",
133
133
  {
@@ -139,7 +139,7 @@ const N = ({
139
139
  "meshBasicMaterial",
140
140
  {
141
141
  attach: "material",
142
- color: y ? v.asteroid.objectHighlight : S || v.asteroid.objectColor
142
+ color: f ? v.asteroid.objectHighlight : R || v.asteroid.objectColor
143
143
  }
144
144
  )
145
145
  ]
@@ -157,7 +157,7 @@ const N = ({
157
157
  "meshBasicMaterial",
158
158
  {
159
159
  attach: "material",
160
- color: S || "blue"
160
+ color: R || "blue"
161
161
  }
162
162
  ),
163
163
  /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(d, { children: "sun" }) })
@@ -196,7 +196,7 @@ const N = ({
196
196
  "mesh",
197
197
  {
198
198
  position: [
199
- n + o.x,
199
+ s + o.x,
200
200
  o.y,
201
201
  o.z
202
202
  ],
@@ -211,7 +211,7 @@ const N = ({
211
211
  "mesh",
212
212
  {
213
213
  position: [
214
- -n + o.x,
214
+ -s + o.x,
215
215
  o.y,
216
216
  o.z
217
217
  ],
@@ -225,10 +225,10 @@ const N = ({
225
225
  ] })
226
226
  ] }) });
227
227
  };
228
- N.defaultProps = {
228
+ Z.defaultProps = {
229
229
  type: "object"
230
230
  };
231
- N.propTypes = {
231
+ Z.propTypes = {
232
232
  data: t.object,
233
233
  selectionCallback: t.func,
234
234
  active: t.bool,
@@ -250,5 +250,5 @@ N.propTypes = {
250
250
  reset: t.number
251
251
  };
252
252
  export {
253
- N as default
253
+ Z as default
254
254
  };
@@ -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,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
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),u=require("react"),d=require("@rubin-epo/epo-react-lib/Button"),a=require("../Context/index.cjs"),s=require("./styles.cjs"),x=require("../styles.cjs"),j=t=>t&&t.__esModule?t:{default:t},h=j(d);function S(){var r;const[t,o]=u.useState(!1),{orbits:n,selectedNeoIndex:c}=a.useOrbitalSimContext(),{object_details:l}=((r=n.neos)==null?void 0:r[c])||{};return e.jsxs(e.Fragment,{children:[e.jsx(x.GlobalStyles,{}),e.jsx(s.ButtonWrapper,{styleAs:"secondary",isInactive:!l,onClick:()=>{o(!t)},children:t?"Hide Details":"Show Details"}),e.jsx(s.SlideoutWrapper,{slideFrom:"left",isOpen:t,children:e.jsxs(s.SlideoutPanel,{children:[e.jsx("h3",{children:"Orbital Details"}),l&&l.map(i=>e.jsxs(s.SlideoutRow,{children:[e.jsx(s.SlideoutColLeft,{children:e.jsx("p",{children:i.rowTitle})}),e.jsx(s.SlideoutColRight,{children:e.jsx("p",{children:i.rowContent})})]},i.rowTitle)),e.jsx(h.default,{isBlock:!0,onClick:()=>o(!t),children:"Close"})]})})]})}exports.default=S;
@@ -1,38 +1,39 @@
1
1
  "use client";
2
- import { jsxs as l, Fragment as s, jsx as t } from "react/jsx-runtime";
3
- import { useState as c } from "react";
4
- import a from "@rubin-epo/epo-react-lib/Button";
5
- import { useOrbitalSimContext as d } from "../Context/index.js";
6
- import { ButtonWrapper as m, SlideoutWrapper as p, SlideoutPanel as h, SlideoutRow as u, SlideoutColLeft as f, SlideoutColRight as S } from "./styles.js";
2
+ import { jsxs as l, Fragment as d, jsx as e } from "react/jsx-runtime";
3
+ import { useState as a } from "react";
4
+ import m from "@rubin-epo/epo-react-lib/Button";
5
+ import { useOrbitalSimContext as p } from "../Context/index.js";
6
+ import { ButtonWrapper as h, SlideoutWrapper as u, SlideoutPanel as f, SlideoutRow as S, SlideoutColLeft as C, SlideoutColRight as b } from "./styles.js";
7
7
  import { GlobalStyles as w } from "../styles.js";
8
- function v() {
9
- const { orbits: n } = d(), {
10
- detailsRows: i
11
- } = n, [e, r] = c(!1);
12
- return /* @__PURE__ */ l(s, { children: [
13
- /* @__PURE__ */ t(w, {}),
14
- /* @__PURE__ */ t(
15
- m,
8
+ function y() {
9
+ var n;
10
+ const [t, r] = a(!1), { orbits: s, selectedNeoIndex: c } = p(), {
11
+ object_details: i
12
+ } = ((n = s.neos) == null ? void 0 : n[c]) || {};
13
+ return /* @__PURE__ */ l(d, { children: [
14
+ /* @__PURE__ */ e(w, {}),
15
+ /* @__PURE__ */ e(
16
+ h,
16
17
  {
17
18
  styleAs: "secondary",
18
19
  isInactive: !i,
19
20
  onClick: () => {
20
- r(!e);
21
+ r(!t);
21
22
  },
22
- children: e ? "Hide Details" : "Show Details"
23
+ children: t ? "Hide Details" : "Show Details"
23
24
  }
24
25
  ),
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 }) })
26
+ /* @__PURE__ */ e(u, { slideFrom: "left", isOpen: t, children: /* @__PURE__ */ l(f, { children: [
27
+ /* @__PURE__ */ e("h3", { children: "Orbital Details" }),
28
+ i && i.map((o) => /* @__PURE__ */ l(S, { children: [
29
+ /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e("p", { children: o.rowTitle }) }),
30
+ /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e("p", { children: o.rowContent }) })
30
31
  ] }, o.rowTitle)),
31
- /* @__PURE__ */ t(
32
- a,
32
+ /* @__PURE__ */ e(
33
+ m,
33
34
  {
34
35
  isBlock: !0,
35
- onClick: () => r(!e),
36
+ onClick: () => r(!t),
36
37
  children: "Close"
37
38
  }
38
39
  )
@@ -40,5 +41,5 @@ function v() {
40
41
  ] });
41
42
  }
42
43
  export {
43
- v as default
44
+ y as default
44
45
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),O=require("react"),e=require("../../../node_modules/prop-types/index.cjs"),R=require("@react-three/fiber"),x=require("./Orbital.cjs"),F=require("./PotentialOrbits.cjs"),v=require("../orbitalUtilities.cjs");function h({playing:s,dayPerVizSec:i,stepDirection:u,frameOverride:a,defaultZoom:b,potentialOrbits:C,elapsedTime:m,setElapsedTime:p,reset:j,zoomLevel:l,setZoomLevel:M,orbits:$}){const{neos:n,refObjs:I,activeNeo:P}=$;function _(r){const{remainingInits:t}=r;return{remainingInits:t-1}}const{camera:g}=R.useThree(),[k,q]=O.useReducer(_,{remainingInits:n&&Array.isArray(n)?n.length:0});function T(){return(I||["earth","jupiter","mars","neptune"]).map(v.getRefObjProps).map(t=>{const{orbitColor:c,objectColor:f,objectRadius:d,Ref:y,Principal_desig:z,name:A}=t;return o.jsx(x.default,{type:"planet",data:t,position:[0,0,0],zoomMod:l,defaultZoom:b,playing:s,stepDirection:u,dayPerVizSec:i,frameOverride:a,orbitColor:c,objectColor:f,objectRadius:d,reset:j},`${y}-${z||A}`)})}return R.useFrame((r,t)=>{g.zoom!==l&&M(g.zoom),s&&p(m+u*t*i)}),O.useEffect(()=>{a&&p(m+u*(1/60)*i)},[a]),o.jsxs(o.Fragment,{children:[T(),C?o.jsx(F.default,{data:n,position:[0,0,0],initialized:!0,zoomMod:l,defaultZoom:b,playing:s,stepDirection:u,dayPerVizSec:i,frameOverride:a,initCallback:q}):n?n.map((r,t)=>{const{Ref:c,Principal_desig:f,name:d}=r;return o.jsx(x.default,{type:"neo",data:r,position:[0,0,0],active:r===P,initialized:k.remainingInits<=0,zoomMod:l,defaultZoom:b,playing:s,stepDirection:u,dayPerVizSec:i,frameOverride:a,reset:j,initCallback:q},c&&(f||d)?`${c}-${f||d}`:`orbit-${t}`)}):null]})}h.propTypes={playing:e.default.bool,dayPerVizSec:e.default.number,stepDirection:e.default.number,frameOverride:e.default.number,activeVelocityCallback:e.default.func,defaultZoom:e.default.number,zoomLevel:e.default.number,setZoomLevel:e.default.func,potentialOrbits:e.default.bool,elapsedTime:e.default.number,setElapsedTime:e.default.func,reset:e.default.number};exports.default=h;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),h=require("react"),e=require("../../../node_modules/prop-types/index.cjs"),x=require("@react-three/fiber"),C=require("./Orbital.cjs"),v=require("./PotentialOrbits.cjs"),E=require("../orbitalUtilities.cjs");function M({playing:s,dayPerVizSec:i,stepDirection:n,frameOverride:u,defaultZoom:d,potentialOrbits:$,elapsedTime:p,setElapsedTime:j,reset:g,zoomLevel:l,setZoomLevel:I,selectedNeoIndex:q,orbits:P}){const{neos:m,refObjs:_,activeNeo:k}=P,a=Number.isInteger(q)?[m[q]]:m;function T(r){const{remainingInits:t}=r;return{remainingInits:t-1}}const{camera:O}=x.useThree(),[y,R]=h.useReducer(T,{remainingInits:a&&Array.isArray(a)?a.length:0});function z(){return(_||["earth","jupiter","mars","neptune"]).map(E.getRefObjProps).map(t=>{const{orbitColor:f,objectColor:c,objectRadius:b,Ref:A,Principal_desig:F,name:N}=t;return o.jsx(C.default,{type:"planet",data:t,position:[0,0,0],zoomMod:l,defaultZoom:d,playing:s,stepDirection:n,dayPerVizSec:i,frameOverride:u,orbitColor:f,objectColor:c,objectRadius:b,reset:g},`${A}-${F||N}`)})}return x.useFrame((r,t)=>{O.zoom!==l&&I(O.zoom),s&&j(p+n*t*i)}),h.useEffect(()=>{u&&j(p+n*(1/60)*i)},[u]),o.jsxs(o.Fragment,{children:[z(),$?o.jsx(v.default,{data:m,position:[0,0,0],initialized:!0,zoomMod:l,defaultZoom:d,playing:s,stepDirection:n,dayPerVizSec:i,frameOverride:u,initCallback:R}):a?a.map((r,t)=>{const{Ref:f,Principal_desig:c,name:b}=r;return o.jsx(C.default,{type:"neo",data:r,position:[0,0,0],active:r===k,initialized:y.remainingInits<=0,zoomMod:l,defaultZoom:d,playing:s,stepDirection:n,dayPerVizSec:i,frameOverride:u,reset:g,initCallback:R},f&&(c||b)?`${f}-${c||b}`:`orbit-${t}`)}):null]})}M.propTypes={playing:e.default.bool,dayPerVizSec:e.default.number,stepDirection:e.default.number,frameOverride:e.default.number,activeVelocityCallback:e.default.func,defaultZoom:e.default.number,zoomLevel:e.default.number,setZoomLevel:e.default.func,potentialOrbits:e.default.bool,elapsedTime:e.default.number,setElapsedTime:e.default.func,reset:e.default.number};exports.default=M;
@@ -1,5 +1,5 @@
1
1
  export default Orbitals;
2
- declare function Orbitals({ playing, dayPerVizSec, stepDirection, frameOverride, defaultZoom, potentialOrbits, elapsedTime, setElapsedTime, reset, zoomLevel, setZoomLevel, orbits }: {
2
+ declare function Orbitals({ playing, dayPerVizSec, stepDirection, frameOverride, defaultZoom, potentialOrbits, elapsedTime, setElapsedTime, reset, zoomLevel, setZoomLevel, selectedNeoIndex, orbits }: {
3
3
  playing: any;
4
4
  dayPerVizSec: any;
5
5
  stepDirection: any;
@@ -11,6 +11,7 @@ declare function Orbitals({ playing, dayPerVizSec, stepDirection, frameOverride,
11
11
  reset: any;
12
12
  zoomLevel: any;
13
13
  setZoomLevel: any;
14
+ selectedNeoIndex: any;
14
15
  orbits: any;
15
16
  }): import("react/jsx-runtime").JSX.Element;
16
17
  declare namespace Orbitals {
@@ -1,113 +1,114 @@
1
1
  "use client";
2
- import { jsxs as A, Fragment as F, jsx as f } from "react/jsx-runtime";
3
- import { useReducer as _, useEffect as E } from "react";
2
+ import { jsxs as N, Fragment as _, jsx as l } from "react/jsx-runtime";
3
+ import { useReducer as E, useEffect as q } from "react";
4
4
  import t from "../../../node_modules/prop-types/index.js";
5
- import { useThree as N, useFrame as q } from "@react-three/fiber";
6
- import R from "./Orbital.js";
7
- import w from "./PotentialOrbits.js";
8
- import { getRefObjProps as B } from "../orbitalUtilities.js";
9
- function G({
5
+ import { useThree as w, useFrame as B } from "@react-three/fiber";
6
+ import C from "./Orbital.js";
7
+ import G from "./PotentialOrbits.js";
8
+ import { getRefObjProps as H } from "../orbitalUtilities.js";
9
+ function J({
10
10
  playing: a,
11
- dayPerVizSec: n,
11
+ dayPerVizSec: e,
12
12
  stepDirection: i,
13
- frameOverride: s,
14
- defaultZoom: c,
15
- potentialOrbits: h,
16
- elapsedTime: l,
17
- setElapsedTime: d,
18
- reset: j,
13
+ frameOverride: n,
14
+ defaultZoom: f,
15
+ potentialOrbits: $,
16
+ elapsedTime: d,
17
+ setElapsedTime: j,
18
+ reset: g,
19
19
  zoomLevel: m,
20
- setZoomLevel: C,
21
- orbits: $
20
+ setZoomLevel: I,
21
+ selectedNeoIndex: O,
22
+ orbits: P
22
23
  }) {
23
24
  const {
24
- neos: e,
25
- refObjs: I,
26
- activeNeo: P
27
- } = $;
28
- function k(o) {
25
+ neos: c,
26
+ refObjs: k,
27
+ activeNeo: M
28
+ } = P, s = Number.isInteger(O) ? [c[O]] : c;
29
+ function T(o) {
29
30
  const { remainingInits: r } = o;
30
31
  return { remainingInits: r - 1 };
31
32
  }
32
- const { camera: g } = N(), [x, O] = _(k, {
33
- remainingInits: e && Array.isArray(e) ? e.length : 0
33
+ const { camera: R } = w(), [x, h] = E(T, {
34
+ remainingInits: s && Array.isArray(s) ? s.length : 0
34
35
  });
35
- function M() {
36
- return (I || ["earth", "jupiter", "mars", "neptune"]).map(B).map((r) => {
36
+ function y() {
37
+ return (k || ["earth", "jupiter", "mars", "neptune"]).map(H).map((r) => {
37
38
  const {
38
39
  orbitColor: u,
39
40
  objectColor: p,
40
41
  objectRadius: b,
41
- Ref: T,
42
- Principal_desig: y,
43
- name: z
42
+ Ref: z,
43
+ Principal_desig: A,
44
+ name: F
44
45
  } = r;
45
- return /* @__PURE__ */ f(
46
- R,
46
+ return /* @__PURE__ */ l(
47
+ C,
47
48
  {
48
49
  type: "planet",
49
50
  data: r,
50
51
  position: [0, 0, 0],
51
52
  zoomMod: m,
52
- defaultZoom: c,
53
+ defaultZoom: f,
53
54
  playing: a,
54
55
  stepDirection: i,
55
- dayPerVizSec: n,
56
- frameOverride: s,
56
+ dayPerVizSec: e,
57
+ frameOverride: n,
57
58
  orbitColor: u,
58
59
  objectColor: p,
59
60
  objectRadius: b,
60
- reset: j
61
+ reset: g
61
62
  },
62
- `${T}-${y || z}`
63
+ `${z}-${A || F}`
63
64
  );
64
65
  });
65
66
  }
66
- return q((o, r) => {
67
- g.zoom !== m && C(g.zoom), a && d(l + i * r * n);
68
- }), E(() => {
69
- s && d(l + i * (1 / 60) * n);
70
- }, [s]), /* @__PURE__ */ A(F, { children: [
71
- M(),
72
- h ? /* @__PURE__ */ f(
73
- w,
67
+ return B((o, r) => {
68
+ R.zoom !== m && I(R.zoom), a && j(d + i * r * e);
69
+ }), q(() => {
70
+ n && j(d + i * (1 / 60) * e);
71
+ }, [n]), /* @__PURE__ */ N(_, { children: [
72
+ y(),
73
+ $ ? /* @__PURE__ */ l(
74
+ G,
74
75
  {
75
- data: e,
76
+ data: c,
76
77
  position: [0, 0, 0],
77
78
  initialized: !0,
78
79
  zoomMod: m,
79
- defaultZoom: c,
80
+ defaultZoom: f,
80
81
  playing: a,
81
82
  stepDirection: i,
82
- dayPerVizSec: n,
83
- frameOverride: s,
84
- initCallback: O
83
+ dayPerVizSec: e,
84
+ frameOverride: n,
85
+ initCallback: h
85
86
  }
86
- ) : e ? e.map((o, r) => {
87
+ ) : s ? s.map((o, r) => {
87
88
  const { Ref: u, Principal_desig: p, name: b } = o;
88
- return /* @__PURE__ */ f(
89
- R,
89
+ return /* @__PURE__ */ l(
90
+ C,
90
91
  {
91
92
  type: "neo",
92
93
  data: o,
93
94
  position: [0, 0, 0],
94
- active: o === P,
95
+ active: o === M,
95
96
  initialized: x.remainingInits <= 0,
96
97
  zoomMod: m,
97
- defaultZoom: c,
98
+ defaultZoom: f,
98
99
  playing: a,
99
100
  stepDirection: i,
100
- dayPerVizSec: n,
101
- frameOverride: s,
102
- reset: j,
103
- initCallback: O
101
+ dayPerVizSec: e,
102
+ frameOverride: n,
103
+ reset: g,
104
+ initCallback: h
104
105
  },
105
106
  u && (p || b) ? `${u}-${p || b}` : `orbit-${r}`
106
107
  );
107
108
  }) : null
108
109
  ] });
109
110
  }
110
- G.propTypes = {
111
+ J.propTypes = {
111
112
  playing: t.bool,
112
113
  dayPerVizSec: t.number,
113
114
  stepDirection: t.number,
@@ -122,5 +123,5 @@ G.propTypes = {
122
123
  reset: t.number
123
124
  };
124
125
  export {
125
- G as default
126
+ J as default
126
127
  };
@@ -5,7 +5,7 @@
5
5
  display: none;
6
6
  }
7
7
  `,c=t.default.div`
8
- padding: 2px 4px;
8
+ padding: 0px 4px;
9
9
  margin-top: 4px;
10
10
  font-weight: var(--medium);
11
11
  color: var(--black);
@@ -9,7 +9,7 @@ const a = o(t)`
9
9
  display: none;
10
10
  }
11
11
  `, d = o.div`
12
- padding: 2px 4px;
12
+ padding: 0px 4px;
13
13
  margin-top: 4px;
14
14
  font-weight: var(--medium);
15
15
  color: var(--black);
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),o=require("@react-three/drei"),t=require("./orbitalUtilities.cjs"),n=require("react-i18next"),l=require("./styles.cjs"),a=({defaultZoom:s,zoomLevel:r})=>{const{t:i}=n.useTranslation();return e.jsxs("mesh",{position:[0,0,0],children:[e.jsx("sphereGeometry",{attach:"geometry",args:[9,16,8]}),e.jsx("meshBasicMaterial",{attach:"material",color:t.ORBITAL_COLORS.sun.objectColor}),e.jsx(o.Html,{children:e.jsx(l.SunLabel,{children:e.jsx("span",{style:{fontSize:t.getLabelSize(r,s)},children:i("orbital_sim.astronomy.orbital_bodies.sun")})})})]})};exports.default=a;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),o=require("@react-three/drei"),t=require("./orbitalUtilities.cjs"),n=require("react-i18next"),l=require("./styles.cjs"),a=({defaultZoom:s,zoomLevel:r})=>{const{t:i}=n.useTranslation();return e.jsxs("mesh",{position:[0,0,0],children:[e.jsx("sphereGeometry",{attach:"geometry",args:[9,16,8]}),e.jsx("meshBasicMaterial",{attach:"material",color:t.ORBITAL_COLORS.sun.objectColor}),e.jsx(o.Html,{children:e.jsx(l.SunLabel,{style:{fontSize:t.getLabelSize(r,s)},children:i("orbital_sim.astronomy.orbital_bodies.sun")})})]})};exports.default=a;
@@ -2,10 +2,10 @@
2
2
  import { jsxs as i, jsx as t } from "react/jsx-runtime";
3
3
  import { Html as s } from "@react-three/drei";
4
4
  import { ORBITAL_COLORS as a, getLabelSize as m } from "./orbitalUtilities.js";
5
- import { useTranslation as n } from "react-i18next";
6
- import { SunLabel as l } from "./styles.js";
5
+ import { useTranslation as l } from "react-i18next";
6
+ import { SunLabel as n } from "./styles.js";
7
7
  const b = ({ defaultZoom: o, zoomLevel: r }) => {
8
- const { t: e } = n();
8
+ const { t: e } = l();
9
9
  return /* @__PURE__ */ i("mesh", { position: [0, 0, 0], children: [
10
10
  /* @__PURE__ */ t("sphereGeometry", { attach: "geometry", args: [9, 16, 8] }),
11
11
  /* @__PURE__ */ t(
@@ -15,15 +15,15 @@ const b = ({ defaultZoom: o, zoomLevel: r }) => {
15
15
  color: a.sun.objectColor
16
16
  }
17
17
  ),
18
- /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(l, { children: /* @__PURE__ */ t(
19
- "span",
18
+ /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(
19
+ n,
20
20
  {
21
21
  style: {
22
22
  fontSize: m(r, o)
23
23
  },
24
24
  children: e("orbital_sim.astronomy.orbital_bodies.sun")
25
25
  }
26
- ) }) })
26
+ ) })
27
27
  ] });
28
28
  };
29
29
  export {