@rubin-epo/epo-widget-lib 2.0.1 → 2.0.3

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 (28) hide show
  1. package/dist/localeStrings/en/epo-widget-lib.json +1 -0
  2. package/dist/widgets/OrbitalSim/Context/OrbitalSimContext.types.d.ts +45 -0
  3. package/dist/widgets/OrbitalSim/Context/index.cjs +1 -1
  4. package/dist/widgets/OrbitalSim/Context/index.d.ts +1 -37
  5. package/dist/widgets/OrbitalSim/Context/index.js +26 -30
  6. package/dist/widgets/OrbitalSim/Controls/PlaybackSpeed.cjs +1 -1
  7. package/dist/widgets/OrbitalSim/Controls/PlaybackSpeed.js +53 -68
  8. package/dist/widgets/OrbitalSim/Controls/styles.cjs +38 -32
  9. package/dist/widgets/OrbitalSim/Controls/styles.d.ts +1 -0
  10. package/dist/widgets/OrbitalSim/Controls/styles.js +53 -46
  11. package/dist/widgets/OrbitalSim/Observations/Observation.cjs +1 -1
  12. package/dist/widgets/OrbitalSim/Observations/Observation.js +11 -10
  13. package/dist/widgets/OrbitalSim/Observations/styles.cjs +11 -0
  14. package/dist/widgets/OrbitalSim/Observations/styles.d.ts +1 -0
  15. package/dist/widgets/OrbitalSim/Observations/styles.js +16 -0
  16. package/dist/widgets/OrbitalSim/OrbitalSim.module.css.cjs +1 -1
  17. package/dist/widgets/OrbitalSim/OrbitalSim.module.css.js +2 -4
  18. package/dist/widgets/OrbitalSim/Orbitals/OrbitalDetails.cjs +1 -1
  19. package/dist/widgets/OrbitalSim/Orbitals/OrbitalDetails.js +24 -20
  20. package/dist/widgets/OrbitalSim/Orbitals/styles.cjs +15 -8
  21. package/dist/widgets/OrbitalSim/Orbitals/styles.js +17 -10
  22. package/dist/widgets/OrbitalSim/Sun.cjs +1 -1
  23. package/dist/widgets/OrbitalSim/Sun.js +13 -14
  24. package/dist/widgets/OrbitalSim/styles.cjs +19 -12
  25. package/dist/widgets/OrbitalSim/styles.d.ts +1 -0
  26. package/dist/widgets/OrbitalSim/styles.js +20 -12
  27. package/package.json +3 -2
  28. package/dist/widgets/OrbitalSim/Context/OrbitalSimContext.d.ts +0 -0
@@ -161,6 +161,7 @@
161
161
  }
162
162
  },
163
163
  "playback": {
164
+ "sec_with_count": "1 sec = {{count}} days",
164
165
  "time_equivalence": "1 sec is 1 year",
165
166
  "normal_time": "Normal Time",
166
167
  "time_step": "Time Step"
@@ -0,0 +1,45 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface OrbitalSimProviderProps {
4
+ children: ReactNode;
5
+ orbitData: Orbits;
6
+ }
7
+ export type OrbitalSimContextValues = {
8
+ orbits: Orbits;
9
+ setOrbits: React.Dispatch<React.SetStateAction<Orbits>>;
10
+ observations: Observation[];
11
+ setObservations: React.Dispatch<React.SetStateAction<Observation[]>>;
12
+ updateActiveObservation: (activeId: string) => void;
13
+ };
14
+ export type Observation = {
15
+ id: string;
16
+ label: string;
17
+ interactable: boolean;
18
+ isActive: boolean;
19
+ position: number;
20
+ isAnswer?: boolean;
21
+ };
22
+ export type Neo = {
23
+ a: number;
24
+ e: number;
25
+ i: number;
26
+ Peri: number;
27
+ Node: number;
28
+ };
29
+ export type DetailsRow = {
30
+ rowTitle: string;
31
+ rowContent: string | TrustedHTML;
32
+ };
33
+ export type Orbits = {
34
+ neos: Neo[] | null;
35
+ activeNeo: Neo | null;
36
+ observations: Observation[];
37
+ paused: boolean;
38
+ pov: string | null;
39
+ defaultZoom: number | null;
40
+ potentialOrbits: boolean;
41
+ noDetails: boolean;
42
+ detailsRows: DetailsRow[] | null;
43
+ refObjs: string[] | null;
44
+ noControls: boolean;
45
+ };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("react/jsx-runtime"),e=require("react"),u=e.createContext(null);function d(){const n=e.useContext(u);if(!n)throw new Error("OrbitalSim components cannot be rendered outside the OrbitalSimContext.Provider component.");return n}function m({children:n,orbitData:l}){const[s,i]=e.useState({neos:null,activeNeo:null,observations:[],activeObs:null,selectionCallback:null,paused:null,pov:null,defaultZoom:null,potentialOrbits:null,noDetails:null,detailsSet:null,detailsRows:null,refObjs:null,noLabels:null,noControls:!1}),[t,o]=e.useState(()=>s.observations??[]);e.useEffect(()=>{i(l),o(l.observations)},[l]);const a=b=>{if(t&&t.length>0){let v=t.map(r=>r.id==b?{...r,isActive:!0}:{...r,isActive:!1});o(v)}},c=e.useMemo(()=>({orbits:s,setOrbits:i,observations:t,setObservations:o,updateActiveObservation:a}),[s,i,t,o,a]);return O.jsx(u.Provider,{value:c,children:n})}exports.OrbitalSimContext=u;exports.OrbitalSimProvider=m;exports.useOrbitalSimContext=d;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),e=require("react"),a=e.createContext(null);function O(){const o=e.useContext(a);if(!o)throw new Error("OrbitalSim components cannot be rendered outside the OrbitalSimContext.Provider component.");return o}function d({children:o,orbitData:s}){const[i,r]=e.useState({neos:null,activeNeo:null,observations:[],paused:!1,pov:null,defaultZoom:null,potentialOrbits:!1,noDetails:!1,detailsRows:null,refObjs:null,noControls:!1}),[t,n]=e.useState(()=>i.observations??[]);e.useEffect(()=>{r(s),n(s.observations)},[s]);const u=b=>{if(t&&t.length>0){let v=t.map(l=>l.id==b?{...l,isActive:!0}:{...l,isActive:!1});n(v)}},c=e.useMemo(()=>({orbits:i,setOrbits:r,observations:t,setObservations:n,updateActiveObservation:u}),[i,r,t,n,u]);return m.jsx(a.Provider,{value:c,children:o})}exports.OrbitalSimContext=a;exports.OrbitalSimProvider=d;exports.useOrbitalSimContext=O;
@@ -1,41 +1,5 @@
1
- import { ReactNode } from 'react';
1
+ import { OrbitalSimContextValues, OrbitalSimProviderProps } from './OrbitalSimContext.types.ts';
2
2
 
3
- interface OrbitalSimProviderProps {
4
- children: ReactNode;
5
- orbitData: Orbits;
6
- }
7
- type OrbitalSimContextValues = {
8
- orbits: Orbits;
9
- setOrbits: React.Dispatch<React.SetStateAction<Orbits>>;
10
- observations: Observation[];
11
- setObservations: React.Dispatch<React.SetStateAction<Observation[]>>;
12
- updateActiveObservation: (activeId: string) => void;
13
- };
14
- type Observation = {
15
- id: string;
16
- label: string;
17
- interactable: boolean;
18
- isActive: boolean;
19
- position: number;
20
- isAnswer?: boolean;
21
- };
22
- type Orbits = {
23
- neos: any;
24
- activeNeo: any;
25
- observations: Observation[];
26
- activeObs: any;
27
- selectionCallback: any;
28
- paused: any;
29
- pov: any;
30
- defaultZoom: any;
31
- potentialOrbits: any;
32
- noDetails: any;
33
- detailsSet: any;
34
- detailsRows: any;
35
- refObjs: any;
36
- noLabels: any;
37
- noControls: boolean;
38
- };
39
3
  export declare const OrbitalSimContext: import('react').Context<OrbitalSimContextValues | null>;
40
4
  export default OrbitalSimContext;
41
5
  /**
@@ -1,60 +1,56 @@
1
1
  "use client";
2
- import { jsx as m } from "react/jsx-runtime";
3
- import { createContext as d, useState as u, useEffect as f, useMemo as O, useContext as p } from "react";
4
- const a = d(null);
2
+ import { jsx as f } from "react/jsx-runtime";
3
+ import { createContext as m, useState as a, useEffect as d, useMemo as O, useContext as p } from "react";
4
+ const u = m(null);
5
5
  function S() {
6
- const t = p(a);
6
+ const t = p(u);
7
7
  if (!t)
8
8
  throw new Error(
9
9
  "OrbitalSim components cannot be rendered outside the OrbitalSimContext.Provider component."
10
10
  );
11
11
  return t;
12
12
  }
13
- function w({ children: t, orbitData: o }) {
14
- const [l, s] = u({
13
+ function w({ children: t, orbitData: n }) {
14
+ const [s, i] = a({
15
15
  neos: null,
16
16
  activeNeo: null,
17
17
  observations: [],
18
- activeObs: null,
19
- selectionCallback: null,
20
- paused: null,
18
+ paused: !1,
21
19
  pov: null,
22
20
  defaultZoom: null,
23
- potentialOrbits: null,
24
- noDetails: null,
25
- detailsSet: null,
21
+ potentialOrbits: !1,
22
+ noDetails: !1,
26
23
  detailsRows: null,
27
24
  refObjs: null,
28
- noLabels: null,
29
25
  noControls: !1
30
- }), [e, n] = u(
31
- () => l.observations ?? []
26
+ }), [e, o] = a(
27
+ () => s.observations ?? []
32
28
  );
33
- f(() => {
34
- s(o), n(o.observations);
35
- }, [o]);
36
- const r = (b) => {
29
+ d(() => {
30
+ i(n), o(n.observations);
31
+ }, [n]);
32
+ const l = (v) => {
37
33
  if (e && e.length > 0) {
38
- let v = e.map((i) => i.id == b ? { ...i, isActive: !0 } : { ...i, isActive: !1 });
39
- n(v);
34
+ let b = e.map((r) => r.id == v ? { ...r, isActive: !0 } : { ...r, isActive: !1 });
35
+ o(b);
40
36
  }
41
37
  }, c = O(() => ({
42
- orbits: l,
43
- setOrbits: s,
38
+ orbits: s,
39
+ setOrbits: i,
44
40
  observations: e,
45
- setObservations: n,
46
- updateActiveObservation: r
41
+ setObservations: o,
42
+ updateActiveObservation: l
47
43
  }), [
48
- l,
49
44
  s,
45
+ i,
50
46
  e,
51
- n,
52
- r
47
+ o,
48
+ l
53
49
  ]);
54
- return /* @__PURE__ */ m(a.Provider, { value: c, children: t });
50
+ return /* @__PURE__ */ f(u.Provider, { value: c, children: t });
55
51
  }
56
52
  export {
57
- a as OrbitalSimContext,
53
+ u as OrbitalSimContext,
58
54
  w as OrbitalSimProvider,
59
55
  S as useOrbitalSimContext
60
56
  };
@@ -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.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
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime");require("react");const s=require("../../../node_modules/prop-types/index.cjs"),f=require("react-i18next"),h=require("../orbitalUtilities.cjs"),_=require("@rubin-epo/epo-react-lib/HorizontalSlider"),a=require("./styles.cjs"),k=r=>r&&r.__esModule?r:{default:r},S=k(_);function x({dayPerVizSec:r,elapsedTime:d,sliderOnChangeCallback:j,speeds:n}){const{t}=f.useTranslation();function l(o,u){const b=d<0,m=Math.abs(d)/365.256,i=Math.floor(m),c=Math.floor(365.256*(m-i));let p={},y={};return p={number:h.formatValue(b?-i:i),string:t("elapsed_time.interval.year",{count:i})},y={number:h.formatValue(b?-c:c),string:t("elapsed_time.interval.day",{count:c})},o==="days"?y[u]:o==="years"?p[u]:null}return e.jsx(e.Fragment,{children:e.jsxs(a.PlaybackContainer,{children:[e.jsxs(a.PlaybackSpeedSliderHeader,{children:[e.jsx(a.PlaybackSpeedTitle,{children:t("orbital_sim.playback.time_step")}),e.jsx(a.PlaybackSpeedSliderLabel,{children:t("orbital_sim.playback.sec_with_count",{count:Math.round(r)})})]}),e.jsx(a.PlaybackSpeedSliderLabelTop,{children:t("orbital_sim.playback.time_equivalence",{firstTime:t("orbit_viewer.playback.interval.secWithCount",{count:1}),secondTime:t("orbit_viewer.playback.interval.yearWithCount",{count:1}),context:"verbose"})}),e.jsx(a.PlaybackSpeedSliderLabelBottom,{children:t("orbital_sim.playback.normal_time")}),e.jsx(a.PlaybackSpeedSliderWrapper,{children:e.jsx(S.default,{isVertical:!0,min:n.min,invert:!0,max:n.max,step:n.step,value:r,onChangeCallback:j})}),e.jsxs(a.ElapsedTimeContainer,{children:[e.jsx(a.ElapsedTimeTitle,{children:t("elapsed_time.title")}),e.jsxs(a.ElapsedTimeInner,{children:[e.jsxs(a.ElapsedTimeBlock,{children:[e.jsx(a.ElapsedVal,{children:l("years","number")}),e.jsx("div",{children:l("years","string")})]}),e.jsx(a.ElapsedTimeDivider,{}),e.jsxs(a.ElapsedTimeBlock,{children:[e.jsx(a.ElapsedVal,{children:l("days","number")}),e.jsx(a.ElapsedLabel,{children:l("days","string")})]})]})]})]})})}x.propTypes={dayPerVizSec:s.default.number,elapsedTime:s.default.number,speeds:s.default.object,sliderOnChangeCallback:s.default.func};exports.default=x;
@@ -1,94 +1,79 @@
1
1
  "use client";
2
- import { jsxs as l, Fragment as S, jsx as r } from "react/jsx-runtime";
3
- import { useMemo as g } from "react";
4
- import m from "../../../node_modules/prop-types/index.js";
5
- import { useTranslation as C } from "react-i18next";
6
- import { formatValue as d } from "../orbitalUtilities.js";
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";
2
+ import { jsx as e, Fragment as S, jsxs as a } from "react/jsx-runtime";
3
+ import "react";
4
+ import l from "../../../node_modules/prop-types/index.js";
5
+ import { useTranslation as T } from "react-i18next";
6
+ import { formatValue as h } from "../orbitalUtilities.js";
7
+ import v from "@rubin-epo/epo-react-lib/HorizontalSlider";
8
+ import { PlaybackContainer as P, PlaybackSpeedSliderHeader as g, PlaybackSpeedTitle as C, PlaybackSpeedSliderLabel as E, PlaybackSpeedSliderLabelTop as x, PlaybackSpeedSliderLabelBottom as j, PlaybackSpeedSliderWrapper as L, ElapsedTimeContainer as M, ElapsedTimeTitle as w, ElapsedTimeInner as D, ElapsedTimeBlock as f, ElapsedVal as k, ElapsedTimeDivider as V, ElapsedLabel as W } from "./styles.js";
9
9
  function B({
10
- dayPerVizSec: u,
11
- elapsedTime: b,
12
- sliderOnChangeCallback: k,
13
- speeds: p
10
+ dayPerVizSec: c,
11
+ elapsedTime: s,
12
+ sliderOnChangeCallback: _,
13
+ speeds: n
14
14
  }) {
15
- const { t: e } = C();
16
- function _(c) {
17
- const o = c / 365, a = Math.floor(o), n = 365 * (o - a);
18
- let t = {}, i = {};
19
- return t = {
20
- number: d(a),
21
- string: e("elapsed_time.interval.year", { count: a })
22
- }, i = {
23
- number: d(n),
24
- string: e("elapsed_time.interval.day", { count: n })
25
- }, a >= 1 ? `${t.number} ${t.string}` : n < 1 ? e("orbit_viewer.playback.interval.secWithCount", { count: 1 }) : `${i.number} ${i.string}`;
15
+ const { t: r } = T();
16
+ function i(d, m) {
17
+ const p = s < 0, b = Math.abs(s) / 365.256, t = Math.floor(b), o = Math.floor(365.256 * (b - t));
18
+ let u = {}, y = {};
19
+ return u = {
20
+ number: h(p ? -t : t),
21
+ string: r("elapsed_time.interval.year", { count: t })
22
+ }, y = {
23
+ number: h(p ? -o : o),
24
+ string: r("elapsed_time.interval.day", { count: o })
25
+ }, d === "days" ? y[m] : d === "years" ? u[m] : null;
26
26
  }
27
- function s(c, o) {
28
- const a = b < 0, n = Math.abs(b) / 365.256, t = Math.floor(n), i = Math.floor(365.256 * (n - t));
29
- let y = {}, f = {};
30
- return y = {
31
- number: d(a ? -t : t),
32
- string: e("elapsed_time.interval.year", { count: t })
33
- }, f = {
34
- number: d(a ? -i : i),
35
- string: e("elapsed_time.interval.day", { count: i })
36
- }, c === "days" ? f[o] : c === "years" ? y[o] : null;
37
- }
38
- const T = g(() => _(u), [u]);
39
- return /* @__PURE__ */ l(S, { children: [
40
- /* @__PURE__ */ l(j, { children: [
41
- /* @__PURE__ */ r(P, { children: e("orbital_sim.playback.time_step") }),
42
- /* @__PURE__ */ r(x, { children: e("orbital_sim.playback.time_equivalence", {
43
- firstTime: e("orbit_viewer.playback.interval.secWithCount", {
44
- count: 1
45
- }),
46
- secondTime: T
27
+ return /* @__PURE__ */ e(S, { children: /* @__PURE__ */ a(P, { children: [
28
+ /* @__PURE__ */ a(g, { children: [
29
+ /* @__PURE__ */ e(C, { children: r("orbital_sim.playback.time_step") }),
30
+ /* @__PURE__ */ e(E, { children: r("orbital_sim.playback.sec_with_count", {
31
+ count: Math.round(c)
47
32
  }) })
48
33
  ] }),
49
- /* @__PURE__ */ r(D, { children: e("orbital_sim.playback.time_equivalence", {
50
- firstTime: e("orbit_viewer.playback.interval.secWithCount", {
34
+ /* @__PURE__ */ e(x, { children: r("orbital_sim.playback.time_equivalence", {
35
+ firstTime: r("orbit_viewer.playback.interval.secWithCount", {
51
36
  count: 1
52
37
  }),
53
- secondTime: e("orbit_viewer.playback.interval.yearWithCount", {
38
+ secondTime: r("orbit_viewer.playback.interval.yearWithCount", {
54
39
  count: 1
55
40
  }),
56
41
  context: "verbose"
57
42
  }) }),
58
- /* @__PURE__ */ r(M, { children: e("orbital_sim.playback.normal_time") }),
59
- /* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(
60
- E,
43
+ /* @__PURE__ */ e(j, { children: r("orbital_sim.playback.normal_time") }),
44
+ /* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(
45
+ v,
61
46
  {
62
47
  isVertical: !0,
63
- min: p.min,
48
+ min: n.min,
64
49
  invert: !0,
65
- max: p.max,
66
- step: p.step,
67
- value: u,
68
- onChangeCallback: k
50
+ max: n.max,
51
+ step: n.step,
52
+ value: c,
53
+ onChangeCallback: _
69
54
  }
70
55
  ) }),
71
- /* @__PURE__ */ l(w, { children: [
72
- /* @__PURE__ */ r(L, { children: e("elapsed_time.title") }),
73
- /* @__PURE__ */ l(Y, { children: [
74
- /* @__PURE__ */ l(h, { children: [
75
- /* @__PURE__ */ r(v, { children: s("years", "number") }),
76
- /* @__PURE__ */ r("div", { children: s("years", "string") })
56
+ /* @__PURE__ */ a(M, { children: [
57
+ /* @__PURE__ */ e(w, { children: r("elapsed_time.title") }),
58
+ /* @__PURE__ */ a(D, { children: [
59
+ /* @__PURE__ */ a(f, { children: [
60
+ /* @__PURE__ */ e(k, { children: i("years", "number") }),
61
+ /* @__PURE__ */ e("div", { children: i("years", "string") })
77
62
  ] }),
78
- /* @__PURE__ */ r($, {}),
79
- /* @__PURE__ */ l(h, { children: [
80
- /* @__PURE__ */ r(v, { children: s("days", "number") }),
81
- /* @__PURE__ */ r(q, { children: s("days", "string") })
63
+ /* @__PURE__ */ e(V, {}),
64
+ /* @__PURE__ */ a(f, { children: [
65
+ /* @__PURE__ */ e(k, { children: i("days", "number") }),
66
+ /* @__PURE__ */ e(W, { children: i("days", "string") })
82
67
  ] })
83
68
  ] })
84
69
  ] })
85
- ] });
70
+ ] }) });
86
71
  }
87
72
  B.propTypes = {
88
- dayPerVizSec: m.number,
89
- elapsedTime: m.number,
90
- speeds: m.object,
91
- sliderOnChangeCallback: m.func
73
+ dayPerVizSec: l.number,
74
+ elapsedTime: l.number,
75
+ speeds: l.object,
76
+ sliderOnChangeCallback: l.func
92
77
  };
93
78
  export {
94
79
  B as default
@@ -1,4 +1,15 @@
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`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("styled-components"),l=a=>a&&a.__esModule?a:{default:a},e=l(t),r=e.default.div`
2
+ display: grid;
3
+ grid-template-columns: repeat(2, 1fr);
4
+ grid-template-rows: repeat(5, 1fr);
5
+ grid-column-gap: 0px;
6
+ grid-row-gap: 0px;
7
+ width: 110px;
8
+ position: absolute;
9
+ right: 20px;
10
+ top: 10px;
11
+ height: 95%;
12
+ `,i=e.default.div`
2
13
  width: auto;
3
14
  display: flex;
4
15
  position: absolute;
@@ -8,35 +19,30 @@
8
19
  z-index: 2;
9
20
  font-size: 17px;
10
21
  `,o=e.default.div`
11
- position: absolute;
12
- top: 34px;
13
- right: 10px;
14
22
  z-index: 2;
15
- width: 110px;
16
23
  padding: 5px;
17
24
  text-align: center;
18
25
  background-color: rgba(255,255,255, 0.8);
19
26
  border: 1px solid --black;
20
27
  border-radius: 10px;
21
- `,r=e.default.h4`
28
+ grid-area: 1 / 1 / 2 / 3;
29
+ height: fit-content;
30
+ `,d=e.default.h4`
22
31
  font-size: 18px;
23
32
  font-weight: var(--regular);
24
33
  line-height: 1.5;
25
34
  color: var(--black);
26
35
  margin: 0;
27
- `,d=e.default.div`
36
+ `,n=e.default.div`
28
37
  font-size: 13px;
29
38
  line-height: 1.333;
30
39
  color: var(--black);
31
40
  font-size: 12.5px;
32
- `,n=e.default.div`
33
- right: 25px;
34
- top: 100px;
41
+ `,c=e.default.div`
42
+ grid-area: 2 / 2 / 3 / 3;
35
43
  font-size: 13px;
36
44
  line-height: 1.333;
37
45
  color: var(--black);
38
- position: absolute;
39
- // right: var(--minPadding) / 2;
40
46
  z-index: 2;
41
47
  width: 70px;
42
48
  padding: 5px;
@@ -45,14 +51,12 @@
45
51
  background-color: rgb(from var(--basePrimary) r g b / 80%);
46
52
  border: 1px solid var(--black);
47
53
  border-radius: 10px;
54
+ height: fit-content;
48
55
  `,p=e.default.div`
49
- right: 25px;
50
- bottom: 200px;
56
+ grid-area: 4 / 2 / 5 / 3;
51
57
  font-size: 13px;
52
58
  line-height: 1.333;
53
59
  color: var(--black);
54
- position: absolute;
55
- // right: var(--minPadding) / 2;
56
60
  z-index: 2;
57
61
  width: 70px;
58
62
  padding: 5px;
@@ -61,54 +65,56 @@
61
65
  background-color: rgb(from var(--basePrimary) r g b / 80%);
62
66
  border: 1px solid var(--black);
63
67
  border-radius: 10px;
64
- `,c=e.default.span`
65
- position: absolute;
68
+ height: fit-content;
69
+ align-self: center;
70
+ `,s=e.default.span`
66
71
  z-index: 2;
67
- height: 50px;
68
- top: 25%;
69
- right: 5rem;
70
72
  width: fit-content;
71
- `,s=e.default.div`
73
+ grid-area: 2 / 1 / 5 / 2;
74
+
75
+ & > div:first-of-type {
76
+ height: stretch;
77
+ }
78
+ `,b=e.default.div`
79
+ grid-area: 5 / 1 / 6 / 3;
72
80
  font-size: 13px;
73
81
  line-height: 1.333;
74
82
  color: var(--black);
75
- position: absolute;
76
- right: 10px;
77
- bottom: 100px;
78
83
  z-index: 2;
79
84
  color: var(--black);
80
85
  text-align: center;
81
86
  background-color: rgb(from var(--white) r g b / 80%);
82
87
  border: 1px solid var(--black);
83
88
  border-radius: 10px;
84
- `,b=e.default.div`
89
+ height: fit-content;
90
+ `,g=e.default.div`
85
91
  font-size: 13px;
86
92
  line-height: 1.333;
87
93
  color: var(--black);
88
94
  padding-top: 5px;
89
- `,x=e.default.div`
95
+ `,f=e.default.div`
90
96
  display: flex;
91
97
  flex-flow: nowrap;
92
98
  align-items: center;
93
99
  justify-content: space-evenly;
94
100
  margin-top: 5px;
95
101
  border-top: 1px solid var(--black);
96
- `,g=e.default.div`
102
+ `,x=e.default.div`
97
103
  width: 50px;
98
- `,u=e.default.div`
104
+ `,h=e.default.div`
99
105
  font-size: 18px;
100
106
  font-weight: var(--regular);
101
107
  line-height: 1.5;
102
108
  color: var(--black);
103
109
  color: var(--black);
104
- `,f=e.default.div`
110
+ `,k=e.default.div`
105
111
  display: block;
106
112
  width: 1px;
107
113
  height: 50px;
108
114
  background-color: var(--black);
109
- `,v=e.default.div`
115
+ `,u=e.default.div`
110
116
  font-size: 13px;
111
117
  line-height: 1.333;
112
118
  color: var(--black);
113
119
  color: var(--black);
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;
120
+ `;exports.ElapsedLabel=u;exports.ElapsedTimeBlock=x;exports.ElapsedTimeContainer=b;exports.ElapsedTimeDivider=k;exports.ElapsedTimeInner=f;exports.ElapsedTimeTitle=g;exports.ElapsedVal=h;exports.PlaybackContainer=r;exports.PlaybackControlsContainer=i;exports.PlaybackSpeedSliderHeader=o;exports.PlaybackSpeedSliderLabel=n;exports.PlaybackSpeedSliderLabelBottom=p;exports.PlaybackSpeedSliderLabelTop=c;exports.PlaybackSpeedSliderWrapper=s;exports.PlaybackSpeedTitle=d;
@@ -1,3 +1,4 @@
1
+ export declare const PlaybackContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
1
2
  export declare const PlaybackControlsContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
3
  export declare const PlaybackSpeedSliderHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
4
  export declare const PlaybackSpeedTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
@@ -1,6 +1,17 @@
1
1
  "use client";
2
- import o from "styled-components";
3
- const i = o.div`
2
+ import e from "styled-components";
3
+ const i = e.div`
4
+ display: grid;
5
+ grid-template-columns: repeat(2, 1fr);
6
+ grid-template-rows: repeat(5, 1fr);
7
+ grid-column-gap: 0px;
8
+ grid-row-gap: 0px;
9
+ width: 110px;
10
+ position: absolute;
11
+ right: 20px;
12
+ top: 10px;
13
+ height: 95%;
14
+ `, a = e.div`
4
15
  width: auto;
5
16
  display: flex;
6
17
  position: absolute;
@@ -9,36 +20,31 @@ const i = o.div`
9
20
  transform: translateX(-50%);
10
21
  z-index: 2;
11
22
  font-size: 17px;
12
- `, r = o.div`
13
- position: absolute;
14
- top: 34px;
15
- right: 10px;
23
+ `, o = e.div`
16
24
  z-index: 2;
17
- width: 110px;
18
25
  padding: 5px;
19
26
  text-align: center;
20
27
  background-color: rgba(255,255,255, 0.8);
21
28
  border: 1px solid --black;
22
29
  border-radius: 10px;
23
- `, a = o.h4`
30
+ grid-area: 1 / 1 / 2 / 3;
31
+ height: fit-content;
32
+ `, t = e.h4`
24
33
  font-size: 18px;
25
34
  font-weight: var(--regular);
26
35
  line-height: 1.5;
27
36
  color: var(--black);
28
37
  margin: 0;
29
- `, t = o.div`
38
+ `, l = e.div`
30
39
  font-size: 13px;
31
40
  line-height: 1.333;
32
41
  color: var(--black);
33
42
  font-size: 12.5px;
34
- `, l = o.div`
35
- right: 25px;
36
- top: 100px;
43
+ `, n = e.div`
44
+ grid-area: 2 / 2 / 3 / 3;
37
45
  font-size: 13px;
38
46
  line-height: 1.333;
39
47
  color: var(--black);
40
- position: absolute;
41
- // right: var(--minPadding) / 2;
42
48
  z-index: 2;
43
49
  width: 70px;
44
50
  padding: 5px;
@@ -47,14 +53,12 @@ const i = o.div`
47
53
  background-color: rgb(from var(--basePrimary) r g b / 80%);
48
54
  border: 1px solid var(--black);
49
55
  border-radius: 10px;
50
- `, n = o.div`
51
- right: 25px;
52
- bottom: 200px;
56
+ height: fit-content;
57
+ `, d = e.div`
58
+ grid-area: 4 / 2 / 5 / 3;
53
59
  font-size: 13px;
54
60
  line-height: 1.333;
55
61
  color: var(--black);
56
- position: absolute;
57
- // right: var(--minPadding) / 2;
58
62
  z-index: 2;
59
63
  width: 70px;
60
64
  padding: 5px;
@@ -63,70 +67,73 @@ const i = o.div`
63
67
  background-color: rgb(from var(--basePrimary) r g b / 80%);
64
68
  border: 1px solid var(--black);
65
69
  border-radius: 10px;
66
- `, d = o.span`
67
- position: absolute;
70
+ height: fit-content;
71
+ align-self: center;
72
+ `, c = e.span`
68
73
  z-index: 2;
69
- height: 50px;
70
- top: 25%;
71
- right: 5rem;
72
74
  width: fit-content;
73
- `, p = o.div`
75
+ grid-area: 2 / 1 / 5 / 2;
76
+
77
+ & > div:first-of-type {
78
+ height: stretch;
79
+ }
80
+ `, p = e.div`
81
+ grid-area: 5 / 1 / 6 / 3;
74
82
  font-size: 13px;
75
83
  line-height: 1.333;
76
84
  color: var(--black);
77
- position: absolute;
78
- right: 10px;
79
- bottom: 100px;
80
85
  z-index: 2;
81
86
  color: var(--black);
82
87
  text-align: center;
83
88
  background-color: rgb(from var(--white) r g b / 80%);
84
89
  border: 1px solid var(--black);
85
90
  border-radius: 10px;
86
- `, c = o.div`
91
+ height: fit-content;
92
+ `, s = e.div`
87
93
  font-size: 13px;
88
94
  line-height: 1.333;
89
95
  color: var(--black);
90
96
  padding-top: 5px;
91
- `, s = o.div`
97
+ `, b = e.div`
92
98
  display: flex;
93
99
  flex-flow: nowrap;
94
100
  align-items: center;
95
101
  justify-content: space-evenly;
96
102
  margin-top: 5px;
97
103
  border-top: 1px solid var(--black);
98
- `, b = o.div`
104
+ `, g = e.div`
99
105
  width: 50px;
100
- `, x = o.div`
106
+ `, x = e.div`
101
107
  font-size: 18px;
102
108
  font-weight: var(--regular);
103
109
  line-height: 1.5;
104
110
  color: var(--black);
105
111
  color: var(--black);
106
- `, g = o.div`
112
+ `, h = e.div`
107
113
  display: block;
108
114
  width: 1px;
109
115
  height: 50px;
110
116
  background-color: var(--black);
111
- `, h = o.div`
117
+ `, v = e.div`
112
118
  font-size: 13px;
113
119
  line-height: 1.333;
114
120
  color: var(--black);
115
121
  color: var(--black);
116
122
  `;
117
123
  export {
118
- h as ElapsedLabel,
119
- b as ElapsedTimeBlock,
124
+ v as ElapsedLabel,
125
+ g as ElapsedTimeBlock,
120
126
  p as ElapsedTimeContainer,
121
- g as ElapsedTimeDivider,
122
- s as ElapsedTimeInner,
123
- c as ElapsedTimeTitle,
127
+ h as ElapsedTimeDivider,
128
+ b as ElapsedTimeInner,
129
+ s as ElapsedTimeTitle,
124
130
  x as ElapsedVal,
125
- i as PlaybackControlsContainer,
126
- r as PlaybackSpeedSliderHeader,
127
- t as PlaybackSpeedSliderLabel,
128
- n as PlaybackSpeedSliderLabelBottom,
129
- l as PlaybackSpeedSliderLabelTop,
130
- d as PlaybackSpeedSliderWrapper,
131
- a as PlaybackSpeedTitle
131
+ i as PlaybackContainer,
132
+ a as PlaybackControlsContainer,
133
+ o as PlaybackSpeedSliderHeader,
134
+ l as PlaybackSpeedSliderLabel,
135
+ d as PlaybackSpeedSliderLabelBottom,
136
+ n as PlaybackSpeedSliderLabelTop,
137
+ c as PlaybackSpeedSliderWrapper,
138
+ t as PlaybackSpeedTitle
132
139
  };
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),f=require("react"),n=require("../../../node_modules/prop-types/index.cjs"),v=require("../../../node_modules/classnames/index.cjs"),x=require("@react-three/drei"),o=require("../OrbitalSim.module.css.cjs"),h=require("../Context/index.cjs");function l({data:r,vector:a}){const{updateActiveObservation:u}=h.useOrbitalSimContext(),{label:c,interactable:t,isActive:s,isAnswer:d}=r,[b,i]=f.useState(!1);function m(){return s&&d?"green":s||b?"blue":"gray"}return e.jsxs("mesh",{className:o.default["obs-mesh"],position:a,onClick:t?()=>{u(r.id)}:null,onPointerOver:t?()=>i(!0):null,onPointerOut:t?()=>i(!1):null,children:[e.jsx(x.Html,{children:e.jsx("div",{className:v.default(o.default["obs-label"]),children:c})}),e.jsx("octahedronGeometry",{attach:"geometry",args:[20]}),e.jsx("meshBasicMaterial",{attach:"material",color:m()})]})}l.propTypes={data:n.default.object,vector:n.default.object};exports.default=l;
1
+ "use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),f=require("react"),n=require("../../../node_modules/prop-types/index.cjs"),v=require("../../../node_modules/classnames/index.cjs"),x=require("@react-three/drei"),o=require("../OrbitalSim.module.css.cjs"),h=require("../Context/index.cjs"),j=require("./styles.cjs");function l({data:r,vector:a}){const{updateActiveObservation:u}=h.useOrbitalSimContext(),{label:c,interactable:t,isActive:s,isAnswer:d}=r,[b,i]=f.useState(!1);function m(){return s&&d?"green":s||b?"blue":"gray"}return e.jsxs("mesh",{className:o.default["obs-mesh"],position:a,onClick:t?()=>{u(r.id)}:null,onPointerOver:t?()=>i(!0):null,onPointerOut:t?()=>i(!1):null,children:[e.jsx(x.Html,{children:e.jsx(j.Label,{className:v.default(o.default["obs-label"]),children:c})}),e.jsx("octahedronGeometry",{attach:"geometry",args:[20]}),e.jsx("meshBasicMaterial",{attach:"material",color:m()})]})}l.propTypes={data:n.default.object,vector:n.default.object};exports.default=l;
@@ -4,28 +4,29 @@ import { useState as b } from "react";
4
4
  import i from "../../../node_modules/prop-types/index.js";
5
5
  import h from "../../../node_modules/classnames/index.js";
6
6
  import { Html as v } from "@react-three/drei";
7
- import n from "../OrbitalSim.module.css.js";
7
+ import a from "../OrbitalSim.module.css.js";
8
8
  import { useOrbitalSimContext as d } from "../Context/index.js";
9
- function y({ data: r, vector: a }) {
10
- const { updateActiveObservation: l } = d(), { label: m, interactable: t, isActive: o, isAnswer: c } = r, [u, s] = b(!1);
9
+ import { Label as y } from "./styles.js";
10
+ function O({ data: r, vector: l }) {
11
+ const { updateActiveObservation: n } = d(), { label: m, interactable: t, isActive: o, isAnswer: c } = r, [u, s] = b(!1);
11
12
  function p() {
12
13
  return o && c ? "green" : o || u ? "blue" : "gray";
13
14
  }
14
15
  return /* @__PURE__ */ f(
15
16
  "mesh",
16
17
  {
17
- className: n["obs-mesh"],
18
- position: a,
18
+ className: a["obs-mesh"],
19
+ position: l,
19
20
  onClick: t ? () => {
20
- l(r.id);
21
+ n(r.id);
21
22
  } : null,
22
23
  onPointerOver: t ? () => s(!0) : null,
23
24
  onPointerOut: t ? () => s(!1) : null,
24
25
  children: [
25
26
  /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(
26
- "div",
27
+ y,
27
28
  {
28
- className: h(n["obs-label"]),
29
+ className: h(a["obs-label"]),
29
30
  children: m
30
31
  }
31
32
  ) }),
@@ -41,10 +42,10 @@ function y({ data: r, vector: a }) {
41
42
  }
42
43
  );
43
44
  }
44
- y.propTypes = {
45
+ O.propTypes = {
45
46
  data: i.object,
46
47
  vector: i.object
47
48
  };
48
49
  export {
49
- y as default
50
+ O as default
50
51
  };
@@ -0,0 +1,11 @@
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("styled-components"),o=e=>e&&e.__esModule?e:{default:e},r=o(t),d=r.default.div`
2
+ background-color: rgba(0, 0, 0, .75);
3
+ width: 20px;
4
+ text-align: center;
5
+ border-radius: 15px;
6
+ padding-top: -8px;
7
+ font-size: 16px;
8
+ color: var(--white);
9
+ cursor: pointer;
10
+ z-index: 0;
11
+ `;exports.Label=d;
@@ -0,0 +1 @@
1
+ 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;
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ import r from "styled-components";
3
+ const e = r.div`
4
+ background-color: rgba(0, 0, 0, .75);
5
+ width: 20px;
6
+ text-align: center;
7
+ border-radius: 15px;
8
+ padding-top: -8px;
9
+ font-size: 16px;
10
+ color: var(--white);
11
+ cursor: pointer;
12
+ z-index: 0;
13
+ `;
14
+ export {
15
+ e as Label
16
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="_label_8ubzd_227",l={label:e,"obs-mesh":"_obs-mesh_8ubzd_238","obs-label":"_obs-label_8ubzd_242"};exports.default=l;exports.label=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"obs-mesh":"_obs-mesh_8ubzd_238","obs-label":"_obs-label_8ubzd_242"};exports.default=e;
@@ -1,9 +1,7 @@
1
- const b = "_label_8ubzd_227", l = {
2
- label: b,
1
+ const s = {
3
2
  "obs-mesh": "_obs-mesh_8ubzd_238",
4
3
  "obs-label": "_obs-label_8ubzd_242"
5
4
  };
6
5
  export {
7
- l as default,
8
- b as label
6
+ s as default
9
7
  };
@@ -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=t=>t&&t.__esModule?t:{default:t},a=d(c);function h(){const{orbits:t}=u.useOrbitalSimContext(),{detailsRows:i}=t,[l,r]=n.useState(!1);return n.useEffect(()=>{i&&r(!0)},[i]),e.jsxs(e.Fragment,{children:[e.jsx(s.ButtonWrapper,{styleAs:"secondary",isInactive:i,onClick:()=>r(!l),children:"Show Details"}),e.jsx(s.SlideoutWrapper,{slideFrom:"left",isOpen:!l,children:e.jsxs(s.SlideoutPanel,{children:[e.jsx("h3",{children:"Orbital Details"}),i&&i.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:"e.rowContent"})})]})),e.jsx(a.default,{isBlock:!0,onClick:()=>r(!l),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 n.useEffect(()=>{l&&r(!0)},[l]),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,36 +1,40 @@
1
1
  "use client";
2
- import { jsxs as o, Fragment as s, jsx as e } from "react/jsx-runtime";
3
- import { useState as c, useEffect as d } from "react";
4
- import a from "@rubin-epo/epo-react-lib/Button";
5
- import { useOrbitalSimContext as u } from "../Context/index.js";
6
- import { ButtonWrapper as h, SlideoutWrapper as m, SlideoutPanel as p, SlideoutRow as f, SlideoutColLeft as S, SlideoutColRight as C } from "./styles.js";
7
- function v() {
8
- const { orbits: l } = u(), {
2
+ import { jsxs as r, Fragment as s, jsx as e } from "react/jsx-runtime";
3
+ import { useState as c, useEffect as a } from "react";
4
+ import d from "@rubin-epo/epo-react-lib/Button";
5
+ import { useOrbitalSimContext as m } from "../Context/index.js";
6
+ import { ButtonWrapper as u, SlideoutWrapper as p, SlideoutPanel as f, SlideoutRow as h, SlideoutColLeft as S, SlideoutColRight as C } from "./styles.js";
7
+ import { GlobalStyles as w } from "../styles.js";
8
+ function B() {
9
+ const { orbits: n } = m(), {
9
10
  detailsRows: t
10
- } = l, [i, r] = c(!1);
11
- return d(() => {
12
- t && r(!0);
13
- }, [t]), /* @__PURE__ */ o(s, { children: [
11
+ } = n, [i, o] = c(!1);
12
+ return a(() => {
13
+ t && o(!0);
14
+ }, [t]), /* @__PURE__ */ r(s, { children: [
15
+ /* @__PURE__ */ e(w, {}),
14
16
  /* @__PURE__ */ e(
15
- h,
17
+ u,
16
18
  {
17
19
  styleAs: "secondary",
18
20
  isInactive: t,
19
- onClick: () => r(!i),
21
+ onClick: () => {
22
+ o(!i), console.error("click!");
23
+ },
20
24
  children: "Show Details"
21
25
  }
22
26
  ),
23
- /* @__PURE__ */ e(m, { slideFrom: "left", isOpen: !i, children: /* @__PURE__ */ o(p, { children: [
27
+ /* @__PURE__ */ e(p, { slideFrom: "left", isOpen: !i, children: /* @__PURE__ */ r(f, { children: [
24
28
  /* @__PURE__ */ e("h3", { children: "Orbital Details" }),
25
- t && t.map((n) => /* @__PURE__ */ o(f, { children: [
26
- /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e("p", { children: n.rowTitle }) }),
27
- /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e("p", { children: "e.rowContent" }) })
29
+ t && t.map((l) => /* @__PURE__ */ r(h, { children: [
30
+ /* @__PURE__ */ e(S, { children: /* @__PURE__ */ e("p", { children: l.rowTitle }) }),
31
+ /* @__PURE__ */ e(C, { children: /* @__PURE__ */ e("p", { children: l.rowContent }) })
28
32
  ] })),
29
33
  /* @__PURE__ */ e(
30
- a,
34
+ d,
31
35
  {
32
36
  isBlock: !0,
33
- onClick: () => r(!i),
37
+ onClick: () => o(!i),
34
38
  children: "Close"
35
39
  }
36
40
  )
@@ -38,5 +42,5 @@ function v() {
38
42
  ] });
39
43
  }
40
44
  export {
41
- v as default
45
+ B as default
42
46
  };
@@ -1,17 +1,19 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),l=require("@rubin-epo/epo-react-lib/Button"),d=require("@rubin-epo/epo-react-lib/Slideout"),e=o=>o&&o.__esModule?o:{default:o},t=e(r),i=e(l),a=e(d),n=t.default(a.default)`
2
- display: none;
3
- opacity: 0;
4
- pointer-events: none;
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
+ }
5
5
  `,c=t.default.div`
6
6
  padding: 2px 4px;
7
7
  margin-top: 4px;
8
8
  font-weight: var(--medium);
9
9
  color: var(--black);
10
- background-color: color-mix(in srgb, var(--white) 40%, transparent);
11
- border: 1px solid color-mix(in srgb, var(--white) 40%, transparent);;
10
+ background-color: color-mix(in srgb, var(--white) 75%, transparent);
11
+ border: 1px solid color-mix(in srgb, var(--white) 75%, transparent);;
12
12
  border-radius: 5px;
13
13
  color-adjust: exact;
14
- `,u=t.default(i.default)`
14
+ z-index: 10000;
15
+ height: fit-content;
16
+ `,u=t.default(d.default)`
15
17
  position: absolute;
16
18
  top: 0;
17
19
  left: 0;
@@ -33,9 +35,14 @@
33
35
  & > * + * {
34
36
  margin-block-start: 1em;
35
37
  }
38
+ & > h3 {
39
+ margin: 0px;
40
+ text-align: center;
41
+ }
36
42
  `,s=t.default.div`
37
43
  display: flex;
38
- gap: 20px;
44
+ gap: 10px;
45
+ margin: 0px;
39
46
  `,x=t.default.div`
40
47
  flex: 1;
41
48
  padding: 0px 15px 0px 15px;
@@ -3,18 +3,20 @@ import o from "styled-components";
3
3
  import r from "@rubin-epo/epo-react-lib/Button";
4
4
  import t from "@rubin-epo/epo-react-lib/Slideout";
5
5
  const a = o(t)`
6
- display: none;
7
- opacity: 0;
8
- pointer-events: none;
6
+ & > div:first-of-type {
7
+ display: none;
8
+ }
9
9
  `, d = o.div`
10
10
  padding: 2px 4px;
11
11
  margin-top: 4px;
12
12
  font-weight: var(--medium);
13
13
  color: var(--black);
14
- background-color: color-mix(in srgb, var(--white) 40%, transparent);
15
- border: 1px solid color-mix(in srgb, var(--white) 40%, transparent);;
14
+ background-color: color-mix(in srgb, var(--white) 75%, transparent);
15
+ border: 1px solid color-mix(in srgb, var(--white) 75%, transparent);;
16
16
  border-radius: 5px;
17
17
  color-adjust: exact;
18
+ z-index: 10000;
19
+ height: fit-content;
18
20
  `, l = o(r)`
19
21
  position: absolute;
20
22
  top: 0;
@@ -37,17 +39,22 @@ const a = o(t)`
37
39
  & > * + * {
38
40
  margin-block-start: 1em;
39
41
  }
42
+ & > h3 {
43
+ margin: 0px;
44
+ text-align: center;
45
+ }
40
46
  `, c = o.div`
41
47
  display: flex;
42
- gap: 20px;
43
- `, s = o.div`
48
+ gap: 10px;
49
+ margin: 0px;
50
+ `, x = o.div`
44
51
  flex: 1;
45
52
  padding: 0px 15px 0px 15px;
46
53
  border: 1px solid #ccc;
47
54
  background-color: #ccc;
48
55
  border-radius: 15px;
49
56
  font-weight: bold;
50
- `, x = o.div`
57
+ `, s = o.div`
51
58
  flex: 1;
52
59
  padding: 0px 15px 0px 15px;
53
60
  border: 1px solid #ccc;
@@ -58,8 +65,8 @@ const a = o(t)`
58
65
  export {
59
66
  l as ButtonWrapper,
60
67
  d as Label,
61
- s as SlideoutColLeft,
62
- x as SlideoutColRight,
68
+ x as SlideoutColLeft,
69
+ s as SlideoutColRight,
63
70
  p as SlideoutPanel,
64
71
  c as SlideoutRow,
65
72
  a as SlideoutWrapper
@@ -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"),l=require("react-i18next"),a=require("./OrbitalSim.module.css.cjs"),n=({defaultZoom:r,zoomLevel:s})=>{const{t:i}=l.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("div",{className:a.default.label,style:{fontSize:t.getLabelSize(s,r)},children:i("orbital_sim.astronomy.orbital_bodies.sun")})})]})};exports.default=n;
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,12 +1,12 @@
1
1
  "use client";
2
- import { jsxs as s, jsx as t } from "react/jsx-runtime";
3
- import { Html as i } from "@react-three/drei";
4
- import { ORBITAL_COLORS as a, getLabelSize as l } from "./orbitalUtilities.js";
5
- import { useTranslation as m } from "react-i18next";
6
- import n from "./OrbitalSim.module.css.js";
7
- const b = ({ defaultZoom: e, zoomLevel: o }) => {
8
- const { t: r } = m();
9
- return /* @__PURE__ */ s("mesh", { position: [0, 0, 0], children: [
2
+ import { jsxs as i, jsx as t } from "react/jsx-runtime";
3
+ import { Html as s } from "@react-three/drei";
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";
7
+ const b = ({ defaultZoom: o, zoomLevel: r }) => {
8
+ const { t: e } = n();
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(
12
12
  "meshBasicMaterial",
@@ -15,16 +15,15 @@ const b = ({ defaultZoom: e, zoomLevel: o }) => {
15
15
  color: a.sun.objectColor
16
16
  }
17
17
  ),
18
- /* @__PURE__ */ t(i, { children: /* @__PURE__ */ t(
19
- "div",
18
+ /* @__PURE__ */ t(s, { children: /* @__PURE__ */ t(l, { children: /* @__PURE__ */ t(
19
+ "span",
20
20
  {
21
- className: n.label,
22
21
  style: {
23
- fontSize: l(o, e)
22
+ fontSize: m(r, o)
24
23
  },
25
- children: r("orbital_sim.astronomy.orbital_bodies.sun")
24
+ children: e("orbital_sim.astronomy.orbital_bodies.sun")
26
25
  }
27
- ) })
26
+ ) }) })
28
27
  ] });
29
28
  };
30
29
  export {
@@ -1,4 +1,4 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("styled-components"),i=require("@react-three/fiber"),r=e=>e&&e.__esModule?e:{default:e},t=r(a),l=a.createGlobalStyle`
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("styled-components"),r=require("@react-three/fiber"),i=e=>e&&e.__esModule?e:{default:e},a=i(t),o=t.createGlobalStyle`
2
2
  :root {
3
3
  --white: #ffffff;
4
4
  --black: #000000;
@@ -27,22 +27,29 @@
27
27
 
28
28
  --siteProgressHeight: 26px;
29
29
  --siteToolbarHeight: 64px;
30
- --siteHeaderHeight: var(--siteProgressHeight) + var(--siteToolbarHeight);
30
+ --siteHeaderHeight: calc(var(--siteProgressHeight) + var(--siteToolbarHeight));
31
31
  --pageNavHeight: 64px;
32
32
  --headingWithSpaceHeight: 90px;
33
- // --tallestSquareWidget: calc(100vh - var(--pageNavHeight) - var(--siteHeaderHeight) - var(--headingWithSpaceHeight) - var(--minPadding));
33
+ --tallestSquareWidget: calc(100vh - var(--pageNavHeight) - var(--siteHeaderHeight) - var(--headingWithSpaceHeight) - var(--minPadding));
34
34
  }
35
- `,o=t.default.div`
35
+ `,l=a.default.div`
36
36
  position: relative;
37
- // height: var(--tallestSquareWidget);
38
- height: 750px; // revisit this close to MVP
39
- // min-height: var(--break40);
37
+ height: var(--tallestSquareWidget);
40
38
  min-height: 500px;
41
- background-color: var(--black);
39
+ background-color: #000000;
42
40
  color-adjust: exact;
43
- `,s=t.default(i.Canvas)`
44
- display: inline;
41
+ `,n=a.default(r.Canvas)`
45
42
  position: relative;
46
- height: 100%;
47
43
  z-index: 1;
48
- `;exports.CanvasWrapper=s;exports.GlobalStyles=l;exports.OrbitalSimWrapper=o;
44
+ `,s=a.default.div`
45
+ padding: 2px 4px;
46
+ margin-top: 4px;
47
+ font-weight: var(--medium);
48
+ color: var(--black);
49
+ background-color: color-mix(in srgb, var(--white) 75%, transparent);
50
+ border: 1px solid color-mix(in srgb, var(--white) 75%, transparent);;
51
+ border-radius: 5px;
52
+ color-adjust: exact;
53
+ z-index: 10000;
54
+ height: fit-content;
55
+ `;exports.CanvasWrapper=n;exports.GlobalStyles=o;exports.OrbitalSimWrapper=l;exports.SunLabel=s;
@@ -3,3 +3,4 @@ import { Canvas } from '@react-three/fiber';
3
3
  export declare const GlobalStyles: import('react').NamedExoticComponent<import('styled-components').ExecutionProps & object>;
4
4
  export declare const OrbitalSimWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
5
  export declare const CanvasWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('@react-three/fiber').CanvasProps, never>> & string & Omit<typeof Canvas, keyof import('react').Component<any, {}, any>>;
6
+ export declare const SunLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import e, { createGlobalStyle as a } from "styled-components";
3
- import { Canvas as i } from "@react-three/fiber";
3
+ import { Canvas as r } from "@react-three/fiber";
4
4
  const o = a`
5
5
  :root {
6
6
  --white: #ffffff;
@@ -30,27 +30,35 @@ const o = a`
30
30
 
31
31
  --siteProgressHeight: 26px;
32
32
  --siteToolbarHeight: 64px;
33
- --siteHeaderHeight: var(--siteProgressHeight) + var(--siteToolbarHeight);
33
+ --siteHeaderHeight: calc(var(--siteProgressHeight) + var(--siteToolbarHeight));
34
34
  --pageNavHeight: 64px;
35
35
  --headingWithSpaceHeight: 90px;
36
- // --tallestSquareWidget: calc(100vh - var(--pageNavHeight) - var(--siteHeaderHeight) - var(--headingWithSpaceHeight) - var(--minPadding));
36
+ --tallestSquareWidget: calc(100vh - var(--pageNavHeight) - var(--siteHeaderHeight) - var(--headingWithSpaceHeight) - var(--minPadding));
37
37
  }
38
38
  `, l = e.div`
39
39
  position: relative;
40
- // height: var(--tallestSquareWidget);
41
- height: 750px; // revisit this close to MVP
42
- // min-height: var(--break40);
40
+ height: var(--tallestSquareWidget);
43
41
  min-height: 500px;
44
- background-color: var(--black);
42
+ background-color: #000000;
45
43
  color-adjust: exact;
46
- `, s = e(i)`
47
- display: inline;
44
+ `, n = e(r)`
48
45
  position: relative;
49
- height: 100%;
50
46
  z-index: 1;
47
+ `, s = e.div`
48
+ padding: 2px 4px;
49
+ margin-top: 4px;
50
+ font-weight: var(--medium);
51
+ color: var(--black);
52
+ background-color: color-mix(in srgb, var(--white) 75%, transparent);
53
+ border: 1px solid color-mix(in srgb, var(--white) 75%, transparent);;
54
+ border-radius: 5px;
55
+ color-adjust: exact;
56
+ z-index: 10000;
57
+ height: fit-content;
51
58
  `;
52
59
  export {
53
- s as CanvasWrapper,
60
+ n as CanvasWrapper,
54
61
  o as GlobalStyles,
55
- l as OrbitalSimWrapper
62
+ l as OrbitalSimWrapper,
63
+ s as SunLabel
56
64
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubin-epo/epo-widget-lib",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
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,8 @@
102
102
  "dependencies": {
103
103
  "@react-three/drei": "^10.7.6",
104
104
  "@react-three/fiber": "9",
105
- "@rubin-epo/epo-react-lib": "3.0.1",
105
+ "@rubin-epo/epo-react-lib": "3.0.0",
106
+ "@rubin-epo/epo-widget-lib": "2.0.2",
106
107
  "context-filter-polyfill": "^0.3.6",
107
108
  "d3-array": "^3.2.4",
108
109
  "d3-geo": "^3.1.1",