@rubin-epo/epo-widget-lib 1.2.3 → 1.3.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.
- package/dist/OrbitalSim.cjs +1 -1
- package/dist/OrbitalSim.d.ts +0 -2
- package/dist/OrbitalSim.js +6 -144
- package/dist/atomic/PlaybackControl/PlaybackControl.cjs +1 -1
- package/dist/atomic/PlaybackControl/PlaybackControl.js +5 -5
- package/dist/atomic/PlaybackControl/styles.cjs +8 -5
- package/dist/atomic/PlaybackControl/styles.d.ts +4 -0
- package/dist/atomic/PlaybackControl/styles.js +12 -8
- package/dist/localeStrings/es/epo-widget-lib.json +1 -1
- package/dist/style.css +1 -1
- package/dist/widgets/OrbitalSim/Context/OrbitalSimContext.d.ts +0 -0
- package/dist/widgets/OrbitalSim/Context/index.cjs +1 -0
- package/dist/widgets/OrbitalSim/Context/index.d.ts +66 -0
- package/dist/widgets/OrbitalSim/Context/index.js +61 -0
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.module.css.cjs +1 -1
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.module.css.js +1 -1
- package/dist/widgets/OrbitalSim/Observation.cjs +1 -1
- package/dist/widgets/OrbitalSim/Observation.d.ts +1 -5
- package/dist/widgets/OrbitalSim/Observation.js +29 -39
- package/dist/widgets/OrbitalSim/Observations.cjs +1 -1
- package/dist/widgets/OrbitalSim/Observations.d.ts +1 -5
- package/dist/widgets/OrbitalSim/Observations.js +19 -23
- package/dist/widgets/OrbitalSim/Orbital.cjs +1 -1
- package/dist/widgets/OrbitalSim/Orbital.d.ts +1 -4
- package/dist/widgets/OrbitalSim/Orbital.js +69 -70
- package/dist/widgets/OrbitalSim/OrbitalDetails.cjs +1 -1
- package/dist/widgets/OrbitalSim/OrbitalDetails.d.ts +1 -13
- package/dist/widgets/OrbitalSim/OrbitalDetails.js +12 -15
- package/dist/widgets/OrbitalSim/OrbitalSim.cjs +1 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.d.ts +2 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.js +108 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.module.css.cjs +1 -1
- package/dist/widgets/OrbitalSim/OrbitalSim.module.css.js +42 -42
- package/dist/widgets/OrbitalSim/Orbitals.cjs +1 -1
- package/dist/widgets/OrbitalSim/Orbitals.d.ts +1 -16
- package/dist/widgets/OrbitalSim/Orbitals.js +85 -104
- package/dist/widgets/OrbitalSim/PlaybackSpeed.cjs +1 -1
- package/dist/widgets/OrbitalSim/PlaybackSpeed.js +35 -36
- package/dist/widgets/OrbitalSim/PotentialOrbits.cjs +1 -1
- package/dist/widgets/OrbitalSim/PotentialOrbits.d.ts +1 -9
- package/dist/widgets/OrbitalSim/PotentialOrbits.js +27 -35
- package/dist/widgets/OrbitalSim/index.d.ts +2 -23
- package/dist/widgets/OrbitalSim/orbitalUtilities.cjs +1 -1
- package/dist/widgets/OrbitalSim/orbitalUtilities.d.ts +2 -0
- package/dist/widgets/OrbitalSim/orbitalUtilities.js +37 -34
- package/package.json +1 -1
package/dist/OrbitalSim.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./widgets/OrbitalSim/OrbitalSim.cjs"),t=require("./widgets/OrbitalSim/Context/index.cjs");exports.OrbitalSim=i.default;exports.OrbitalSimContext=t.OrbitalSimContext;exports.OrbitalSimProvider=t.OrbitalSimProvider;exports.useOrbitalSimContext=t.useOrbitalSimContext;
|
package/dist/OrbitalSim.d.ts
CHANGED
package/dist/OrbitalSim.js
CHANGED
|
@@ -1,147 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import e from "./node_modules/prop-types/index.js";
|
|
5
|
-
import { Canvas as Q } from "@react-three/fiber";
|
|
6
|
-
import { useTranslation as U } from "react-i18next";
|
|
7
|
-
import W from "./widgets/OrbitalSim/OrbitalDetails.js";
|
|
8
|
-
import X from "./widgets/OrbitalSim/CameraController.js";
|
|
9
|
-
import Y from "./widgets/OrbitalSim/Camera.js";
|
|
10
|
-
import _ from "./widgets/OrbitalSim/Orbitals.js";
|
|
11
|
-
import $ from "./widgets/OrbitalSim/Sun.js";
|
|
12
|
-
import ee from "./widgets/OrbitalSim/PlaybackSpeed.js";
|
|
13
|
-
import te from "./widgets/OrbitalSim/Controls/PlaybackControls.js";
|
|
14
|
-
import O from "./widgets/OrbitalSim/OrbitalSim.module.css.js";
|
|
15
|
-
function oe({
|
|
16
|
-
neos: D,
|
|
17
|
-
activeNeo: P,
|
|
18
|
-
activeObs: j,
|
|
19
|
-
selectionCallback: k,
|
|
20
|
-
paused: n,
|
|
21
|
-
pov: x,
|
|
22
|
-
defaultZoom: c,
|
|
23
|
-
potentialOrbits: d,
|
|
24
|
-
observations: T,
|
|
25
|
-
noDetails: V,
|
|
26
|
-
detailsSet: L,
|
|
27
|
-
detailsRows: N,
|
|
28
|
-
refObjs: z,
|
|
29
|
-
noLabels: R,
|
|
30
|
-
noControls: Z = !1
|
|
31
|
-
}) {
|
|
32
|
-
const m = { min: 1157e-8, max: 365.25, initial: 11.574, step: 1 }, [r, a] = o(!n), [w, E] = o(null), [F, l] = o(1), [A, y] = o(0), [v, u] = o(n ? 0 : m.initial), [S, f] = o(0), [i, p] = o(0), [h, q] = o(1), { t: C } = U();
|
|
33
|
-
M(() => {
|
|
34
|
-
i > 0 ? (u(m.initial), l(1), f(0), p(-1)) : i < 0 && (f(0), a(!0), p(0));
|
|
35
|
-
}, [i]);
|
|
36
|
-
const B = (s) => {
|
|
37
|
-
u(+s);
|
|
38
|
-
}, G = () => {
|
|
39
|
-
r || l(1), a(!r);
|
|
40
|
-
}, H = () => {
|
|
41
|
-
a((s) => !1), p((s) => s + 1);
|
|
42
|
-
}, I = (s) => {
|
|
43
|
-
a(!1), l(1), y((b) => b + 1);
|
|
44
|
-
}, J = (s) => {
|
|
45
|
-
a(!1), l(-1), y((b) => b + 1);
|
|
46
|
-
};
|
|
47
|
-
return /* @__PURE__ */ t(K, { children: /* @__PURE__ */ g("div", { className: O.container, children: [
|
|
48
|
-
!d && !V && /* @__PURE__ */ t(
|
|
49
|
-
W,
|
|
50
|
-
{
|
|
51
|
-
type: L,
|
|
52
|
-
velocity: w,
|
|
53
|
-
rows: N
|
|
54
|
-
}
|
|
55
|
-
),
|
|
56
|
-
!n && /* @__PURE__ */ t(
|
|
57
|
-
ee,
|
|
58
|
-
{
|
|
59
|
-
elapsedTime: S,
|
|
60
|
-
dayPerVizSec: v,
|
|
61
|
-
speeds: m,
|
|
62
|
-
sliderOnChangeCallback: B
|
|
63
|
-
}
|
|
64
|
-
),
|
|
65
|
-
!Z && /* @__PURE__ */ t(
|
|
66
|
-
te,
|
|
67
|
-
{
|
|
68
|
-
playing: r,
|
|
69
|
-
handleStartStop: G,
|
|
70
|
-
handleNext: I,
|
|
71
|
-
handlePrevious: J,
|
|
72
|
-
isDisabled: !1,
|
|
73
|
-
handleReset: H
|
|
74
|
-
}
|
|
75
|
-
),
|
|
76
|
-
/* @__PURE__ */ g(Q, { className: O["orbital-canvas"], children: [
|
|
77
|
-
/* @__PURE__ */ t(X, { pov: x, reset: i }),
|
|
78
|
-
/* @__PURE__ */ t(
|
|
79
|
-
Y,
|
|
80
|
-
{
|
|
81
|
-
left: 5e3,
|
|
82
|
-
right: 15e3,
|
|
83
|
-
top: 15e3,
|
|
84
|
-
bottom: -15e3,
|
|
85
|
-
near: 0.1,
|
|
86
|
-
far: 3e4,
|
|
87
|
-
position: [0, 0, 8e3],
|
|
88
|
-
defaultZoom: c || 1
|
|
89
|
-
}
|
|
90
|
-
),
|
|
91
|
-
/* @__PURE__ */ t("ambientLight", { intensity: 0.9 }),
|
|
92
|
-
/* @__PURE__ */ t(
|
|
93
|
-
_,
|
|
94
|
-
{
|
|
95
|
-
activeVelocityCallback: E,
|
|
96
|
-
defaultZoom: c || 1,
|
|
97
|
-
refObjs: z,
|
|
98
|
-
neos: D,
|
|
99
|
-
activeNeo: P,
|
|
100
|
-
activeObs: j,
|
|
101
|
-
playing: r,
|
|
102
|
-
stepDirection: F,
|
|
103
|
-
dayPerVizSec: v,
|
|
104
|
-
frameOverride: A,
|
|
105
|
-
potentialOrbits: d,
|
|
106
|
-
observations: T,
|
|
107
|
-
selectionCallback: k,
|
|
108
|
-
elapsedTime: S,
|
|
109
|
-
setElapsedTime: f,
|
|
110
|
-
noLabels: R,
|
|
111
|
-
reset: i,
|
|
112
|
-
zoomLevel: h,
|
|
113
|
-
setZoomLevel: q,
|
|
114
|
-
t: C
|
|
115
|
-
}
|
|
116
|
-
),
|
|
117
|
-
/* @__PURE__ */ t(
|
|
118
|
-
$,
|
|
119
|
-
{
|
|
120
|
-
zoomLevel: h,
|
|
121
|
-
defaultZoom: c || 1,
|
|
122
|
-
t: C
|
|
123
|
-
}
|
|
124
|
-
)
|
|
125
|
-
] })
|
|
126
|
-
] }) });
|
|
127
|
-
}
|
|
128
|
-
oe.propTypes = {
|
|
129
|
-
neos: e.array,
|
|
130
|
-
activeNeo: e.object,
|
|
131
|
-
activeObs: e.object,
|
|
132
|
-
selectionCallback: e.func,
|
|
133
|
-
paused: e.bool,
|
|
134
|
-
pov: e.string,
|
|
135
|
-
defaultZoom: e.number,
|
|
136
|
-
potentialOrbits: e.bool,
|
|
137
|
-
observations: e.array,
|
|
138
|
-
noDetails: e.bool,
|
|
139
|
-
noLabels: e.bool,
|
|
140
|
-
detailsSet: e.string,
|
|
141
|
-
detailsRows: e.array,
|
|
142
|
-
refObjs: e.array,
|
|
143
|
-
noControls: e.bool
|
|
144
|
-
};
|
|
2
|
+
import { default as r } from "./widgets/OrbitalSim/OrbitalSim.js";
|
|
3
|
+
import { OrbitalSimContext as o, OrbitalSimProvider as a, useOrbitalSimContext as l } from "./widgets/OrbitalSim/Context/index.js";
|
|
145
4
|
export {
|
|
146
|
-
|
|
5
|
+
r as OrbitalSim,
|
|
6
|
+
o as OrbitalSimContext,
|
|
7
|
+
a as OrbitalSimProvider,
|
|
8
|
+
l as useOrbitalSimContext
|
|
147
9
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),r=require("@rubin-epo/epo-react-lib/IconComposer"),t=require("./styles.cjs"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),r=require("@rubin-epo/epo-react-lib/IconComposer"),t=require("./styles.cjs"),a=e=>e&&e.__esModule?e:{default:e},i=a(r),n=({icon:e,label:l,handleClick:s,...c})=>o.jsxs(t.PlaybackButton,{...c,onClick:s,children:[o.jsx(t.IconContainer,{children:o.jsx(i.default,{icon:e,size:15})}),o.jsx(t.SpanLabel,{children:l})]});n.displayName="Atomic.PlaybackControl";const u=n;exports.default=u;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import l from "@rubin-epo/epo-react-lib/IconComposer";
|
|
3
|
-
import { PlaybackButton as e, IconContainer as s } from "./styles.js";
|
|
3
|
+
import { PlaybackButton as e, IconContainer as s, SpanLabel as m } from "./styles.js";
|
|
4
4
|
const n = ({
|
|
5
5
|
icon: r,
|
|
6
6
|
label: c,
|
|
7
7
|
handleClick: t,
|
|
8
|
-
...
|
|
9
|
-
}) => /* @__PURE__ */
|
|
8
|
+
...a
|
|
9
|
+
}) => /* @__PURE__ */ i(e, { ...a, onClick: t, children: [
|
|
10
10
|
/* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(l, { icon: r, size: 15 }) }),
|
|
11
|
-
/* @__PURE__ */ o(
|
|
11
|
+
/* @__PURE__ */ o(m, { children: c })
|
|
12
12
|
] });
|
|
13
13
|
n.displayName = "Atomic.PlaybackControl";
|
|
14
14
|
const k = n;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("styled-components"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("styled-components"),a=e=>e&&e.__esModule?e:{default:e},t=a(n),o=t.default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
justify-content: center;
|
|
4
4
|
align-items: center;
|
|
@@ -7,11 +7,10 @@
|
|
|
7
7
|
border-radius: 22px;
|
|
8
8
|
background-color: var(--button-background-color);
|
|
9
9
|
color: var(--neutral95, #1f2121);
|
|
10
|
-
`,
|
|
10
|
+
`,r=t.default.button`
|
|
11
11
|
--button-color: var(--white, #fff);
|
|
12
12
|
--button-background-color: var(--neutral15, #e6e6e6);
|
|
13
13
|
|
|
14
|
-
background: transparent;
|
|
15
14
|
border: none;
|
|
16
15
|
color: var(--button-color);
|
|
17
16
|
cursor: pointer;
|
|
@@ -21,7 +20,7 @@
|
|
|
21
20
|
gap: 0.75em;
|
|
22
21
|
text-align: center;
|
|
23
22
|
padding: 0;
|
|
24
|
-
margin:
|
|
23
|
+
margin: 0px 10px 0px 10px;
|
|
25
24
|
|
|
26
25
|
&:not(:disabled):not([aria-disabled="true"]):hover,
|
|
27
26
|
&:not(:disabled):not([aria-disabled="true"]):focus-visible,
|
|
@@ -36,4 +35,8 @@
|
|
|
36
35
|
&:not(:disabled):not([aria-disabled="true"]):focus {
|
|
37
36
|
outline: none;
|
|
38
37
|
}
|
|
39
|
-
|
|
38
|
+
`,i=t.default.span`
|
|
39
|
+
background: rgba(0, 0, 0, .7);
|
|
40
|
+
padding: 3px 10px 3px 10px;
|
|
41
|
+
border-radius: 10px;
|
|
42
|
+
`;exports.IconContainer=o;exports.PlaybackButton=r;exports.SpanLabel=i;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* todo: convert this to a CSS module
|
|
3
|
+
*/
|
|
1
4
|
/// <reference types="react" />
|
|
2
5
|
export declare const IconContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
6
|
export declare const PlaybackButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
7
|
+
export declare const SpanLabel: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
const
|
|
2
|
+
import o from "styled-components";
|
|
3
|
+
const e = o.div`
|
|
4
4
|
display: flex;
|
|
5
5
|
justify-content: center;
|
|
6
6
|
align-items: center;
|
|
@@ -9,11 +9,10 @@ const o = e.div`
|
|
|
9
9
|
border-radius: 22px;
|
|
10
10
|
background-color: var(--button-background-color);
|
|
11
11
|
color: var(--neutral95, #1f2121);
|
|
12
|
-
`, n =
|
|
12
|
+
`, n = o.button`
|
|
13
13
|
--button-color: var(--white, #fff);
|
|
14
14
|
--button-background-color: var(--neutral15, #e6e6e6);
|
|
15
15
|
|
|
16
|
-
background: transparent;
|
|
17
16
|
border: none;
|
|
18
17
|
color: var(--button-color);
|
|
19
18
|
cursor: pointer;
|
|
@@ -23,14 +22,14 @@ const o = e.div`
|
|
|
23
22
|
gap: 0.75em;
|
|
24
23
|
text-align: center;
|
|
25
24
|
padding: 0;
|
|
26
|
-
margin:
|
|
25
|
+
margin: 0px 10px 0px 10px;
|
|
27
26
|
|
|
28
27
|
&:not(:disabled):not([aria-disabled="true"]):hover,
|
|
29
28
|
&:not(:disabled):not([aria-disabled="true"]):focus-visible,
|
|
30
29
|
&:not(:disabled):not([aria-disabled="true"]).focus-visible {
|
|
31
30
|
text-decoration: underline;
|
|
32
31
|
|
|
33
|
-
${
|
|
32
|
+
${e} {
|
|
34
33
|
outline: 1px solid var(--white, #fff);
|
|
35
34
|
outline-offset: 1px;
|
|
36
35
|
}
|
|
@@ -38,8 +37,13 @@ const o = e.div`
|
|
|
38
37
|
&:not(:disabled):not([aria-disabled="true"]):focus {
|
|
39
38
|
outline: none;
|
|
40
39
|
}
|
|
40
|
+
`, r = o.span`
|
|
41
|
+
background: rgba(0, 0, 0, .7);
|
|
42
|
+
padding: 3px 10px 3px 10px;
|
|
43
|
+
border-radius: 10px;
|
|
41
44
|
`;
|
|
42
45
|
export {
|
|
43
|
-
|
|
44
|
-
n as PlaybackButton
|
|
46
|
+
e as IconContainer,
|
|
47
|
+
n as PlaybackButton,
|
|
48
|
+
r as SpanLabel
|
|
45
49
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{--white: #ffffff;--black: #000000;--lightBlue: #bee7f5;--boldRed: #df0039;--ral5018HR: #087f80;--neutral10: #f3f3f3;--neutral20: #737373;--basePrimary: var(--ral5018HR);--error: var(--boldRed);--break40: 420px;--break100: 1284px;--minPadding: 20px;--containerMaxWidth: var(--break100);--offset: 300px;--regular: 400;--medium: 500;--duration: .2s;--durationSlow: .4s;--timing: ease;--siteProgressHeight: 26px;--siteToolbarHeight: 64px;--siteHeaderHeight: var(--siteProgressHeight) + var(--siteToolbarHeight);--pageNavHeight: 64px;--headingWithSpaceHeight: 90px;--tallestSquareWidget: calc(100vh - var(--pageNavHeight) - var(--siteHeaderHeight) - var(--headingWithSpaceHeight) - var(--minPadding))}.
|
|
1
|
+
:root{--white: #ffffff;--black: #000000;--lightBlue: #bee7f5;--boldRed: #df0039;--ral5018HR: #087f80;--neutral10: #f3f3f3;--neutral20: #737373;--basePrimary: var(--ral5018HR);--error: var(--boldRed);--break40: 420px;--break100: 1284px;--minPadding: 20px;--containerMaxWidth: var(--break100);--offset: 300px;--regular: 400;--medium: 500;--duration: .2s;--durationSlow: .4s;--timing: ease;--siteProgressHeight: 26px;--siteToolbarHeight: 64px;--siteHeaderHeight: var(--siteProgressHeight) + var(--siteToolbarHeight);--pageNavHeight: 64px;--headingWithSpaceHeight: 90px;--tallestSquareWidget: calc(100vh - var(--pageNavHeight) - var(--siteHeaderHeight) - var(--headingWithSpaceHeight) - var(--minPadding))}._container_8ubzd_35{position:relative;height:var(--tallestSquareWidget);min-height:var(--break40);background-color:var(--black);color-adjust:exact}._orbital-canvas_8ubzd_43{position:relative;z-index:1}._playback-speed-slider-header_8ubzd_48{position:absolute;top:34px;right:10px;z-index:2;width:110px;padding:5px;text-align:center;background-color:#fffc;border:1px solid --black;border-radius:10px}._playback-speed-title_8ubzd_61{font-size:18px;font-weight:var(--regular);line-height:1.5;color:var(--black);margin:0}._playback-speed-slider-label_8ubzd_70{font-size:13px;line-height:1.333;color:var(--black);font-size:12.5px}._playback-speed-slider-label-bottom_8ubzd_78,._playback-speed-slider-label-top_8ubzd_79{font-size:13px;line-height:1.333;color:var(--black);position:absolute;right:var(--minPadding) / 2;z-index:2;width:70px;padding:5px;color:var(--white);text-align:center;background-color:rgb(from var(--basePrimary) r g b / 80%);border:1px solid var(--black);border-radius:10px}._playback-speed-slider-label-bottom_8ubzd_78{top:calc(40px + (var(--minPadding) + var(--tallestSquareWidget) - var(--offset)));right:10px}._playback-speed-slider-label-top_8ubzd_79{right:10px;top:calc(80px + var(--minPadding))}._playback-speed-slider_8ubzd_48{position:absolute;z-index:2;height:50px;top:25%;right:5rem;width:fit-content}._elapsed-time-container_8ubzd_115{font-size:13px;line-height:1.333;position:absolute;right:10px;bottom:100px;z-index:2;color:var(--black);text-align:center;background-color:rgb(from var(--white) r g b / 80%);border:1px solid var(--black);border-radius:10px}._elapsed-time-container_8ubzd_115 ._elapsed-time-title_8ubzd_131{font-size:13px;line-height:1.333;color:var(--black);padding-top:5px}._elapsed-time-container_8ubzd_115 ._elapsed-time-inner_8ubzd_139{display:flex;flex-flow:nowrap;align-items:center;justify-content:space-evenly;margin-top:5px;border-top:1px solid var(--black)}._elapsed-time-container_8ubzd_115 ._elapsed-time-inner_8ubzd_139 ._elapsed-time-divider_8ubzd_148{display:block;width:1px;height:50px;background-color:var(--black)}._elapsed-time-container_8ubzd_115 ._elapsed-time-inner_8ubzd_139 ._elapsed-time-block_8ubzd_155{width:50px}._elapsed-time-container_8ubzd_115 ._elapsed-time-inner_8ubzd_139 ._elapsed-time-block_8ubzd_155 ._elapsed-val_8ubzd_159{font-size:18px;font-weight:var(--regular);line-height:1.5;color:var(--black)}._elapsed-time-container_8ubzd_115 ._elapsed-time-inner_8ubzd_139 ._elapsed-time-block_8ubzd_155 ._elapsed-label_8ubzd_168{font-size:13px;line-height:1.333;color:var(--black)}._padded-drawer-inner_8ubzd_176{width:(var(--containerMaxWidth) - var(--minPadding) / 2);padding:0 0 0 72px;outline:none}@media all and (max-width: 1284px){._padded-drawer-inner_8ubzd_176{width:calc((100vw - 40px)/2)}}._nav-item_8ubzd_187 ._md-list-tile_8ubzd_187{background-color:var(--neutral10);transition:background-color var(--timing) var(--duration)}._nav-item_8ubzd_187 ._md-list-tile_8ubzd_187 ._md-tile-addon_8ubzd_192{color:var(--basePrimary);transition:color var(--timing) var(--duration)}._nav-item_8ubzd_187 ._md-list-tile_8ubzd_187:hover{background-color:var(--basePrimary)}._nav-item_8ubzd_187 ._md-list-tile_8ubzd_187:hover ._md-tile-addon_8ubzd_192,._nav-item_8ubzd_187 ._md-list-tile_8ubzd_187:hover ._md-tile-text--primary_8ubzd_205,._nav-item_8ubzd_187 ._md-list-tile_8ubzd_187:hover ._md-tile-text--primary_8ubzd_205._md-text--theme-primary_8ubzd_206,._nav-item_8ubzd_187 ._md-list-tile_8ubzd_187:hover ._md-text_8ubzd_206{color:var(--white)}._nav-item_8ubzd_187._active-item_8ubzd_211 ._md-list-tile_8ubzd_187{background-color:var(--basePrimary)}._nav-item_8ubzd_187._active-item_8ubzd_211 ._md-list-tile_8ubzd_187 ._md-tile-addon_8ubzd_192{color:var(--white)}._nav-item_8ubzd_187._active-item_8ubzd_211 ._md-list-tile_8ubzd_187 ._md-tile-text--primary_8ubzd_205,._nav-item_8ubzd_187._active-item_8ubzd_211 ._md-list-tile_8ubzd_187 ._md-tile-text--primary_8ubzd_205._md-text--theme-primary_8ubzd_206,._nav-item_8ubzd_187._active-item_8ubzd_211 ._md-list-tile_8ubzd_187 ._md-text_8ubzd_206{color:var(--white)!important}._label_8ubzd_227{padding:2px 4px;margin-top:4px;font-weight:var(--medium);color:var(--black);background-color:color-mix(in srgb,var(--white) 40%,transparent);border:1px solid color-mix(in srgb,var(--white) 40%,transparent);border-radius:5px;color-adjust:exact}._obs-mesh_8ubzd_238{cursor:pointer}._obs-label_8ubzd_242{padding-top:-8px;font-size:16px;color:var(--white);cursor:pointer}._obs-label_8ubzd_242._obs-answer_8ubzd_249,._obs-label_8ubzd_242._obs-hover_8ubzd_250{font-size:18px;color:"yellow"}._obs-label_8ubzd_242._obs-active_8ubzd_255{font-size:18px;color:"red"}._details_8ubzd_266{position:absolute;top:0;right:0;left:0;z-index:2;max-width:0;overflow:hidden;transition:max-width var(--timing) var(--durationSlow)}._details_8ubzd_266 ._details-table_8ubzd_277{margin-top:calc(var(--minPadding) * 2 + 36px);background-color:var(--white)}._details_8ubzd_266 ._details-table_8ubzd_277 ._md-text_8ubzd_206{overflow:hidden;white-space:nowrap}._details_8ubzd_266._active-details_8ubzd_287{width:100%;max-width:350px}._details_8ubzd_266._active-details_8ubzd_287 ._details-table_8ubzd_277 ._md-text_8ubzd_206{overflow:auto;white-space:normal}._details-toggle_8ubzd_297{position:absolute;top:0;left:0;z-index:3;margin:var(--minPadding);color:var(--white)!important;background-color:var(--error)}._details-toggle_8ubzd_297._disabled_8ubzd_308{background-color:var(--neutral20)}._slideoutPanel_8ubzd_312{background-color:var(--neutral10);display:flex;flex-direction:column;gap:1em;padding:1em;font-size:.75rem}._slideoutPanel_8ubzd_312>*+*{margin-block-start:1em}._slideoutRow_8ubzd_325{display:flex;gap:20px}._slideoutCol_8ubzd_330{flex:1;padding:0 15px;border:1px solid #ccc;background-color:#ccc;border-radius:15px}._slideoutCol_8ubzd_330[data-align=right]{text-align:right}._slideoutCol_8ubzd_330[data-align=left]{font-weight:700}._slideout_8ubzd_312 [data-testid=slideoutBackdrop]{display:none;opacity:0;pointer-events:none}._slideoutPanel_8ubzd_312>h3{margin:0;text-align:center}:root{--black: #000000;--turquoise70: #058b8c;--brightGreen: #01bbbc;--mediumGreen: var(--turquoise70);--awRed: #ed4c4c;--awOrange: #fab364;--awYellow: #ffe266;--acPurple: #583671;--acGreen: #3cae3f;--acBlue: #1c81a4}:root :export{--chart0: var(--black);--chart1: var(--acBlue);--chart2: var(--awYellow);--chart3: var(--awRed);--chart4: var(--acGreen);--chart5: var(--awOrange);--chart6: var(--acPurple);--chart7: var(--mediumGreen);--chart8: var(--brightGreen)}._playbackControlsContainer_1m020_1{width:auto;display:flex;position:absolute;bottom:0;left:50%;transform:translate(-50%);z-index:2;font-size:17px}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("react/jsx-runtime"),e=require("react"),o=e.createContext(null);function O(){const n=e.useContext(o);if(!n)throw new Error("OrbitalSim components cannot be rendered outside the OrbitalSimContext.Provider component.");return n}function m({children:n,orbitData:s}){const[i,r]=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,l]=e.useState(()=>i.observations??[]);e.useEffect(()=>{r(s),l(s.observations)},[s]);const a=b=>{if(t&&t.length>0){let v=t.map(u=>u.id==b?{...u,isActive:!0}:{...u,isActive:!1});l(v)}},c=e.useMemo(()=>({orbits:i,setOrbits:r,observations:t,setObservations:l,updateActiveObservation:a}),[i,r,t,l,a]);return d.jsx(o.Provider,{value:c,children:n})}exports.OrbitalSimContext=o;exports.OrbitalSimProvider=m;exports.default=o;exports.useOrbitalSimContext=O;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
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
|
+
export declare const OrbitalSimContext: import('react').Context<OrbitalSimContextValues | null>;
|
|
40
|
+
export default OrbitalSimContext;
|
|
41
|
+
/**
|
|
42
|
+
* This custom hooks returns a reference to the `OrbitalSimContext` which will
|
|
43
|
+
* expose orbital and observation data, and a callback that can be passed to
|
|
44
|
+
* update the selected observation - if applicable - in the web client. The
|
|
45
|
+
* data for this context provider must be passed to `<OrbitalSimProvider>` as
|
|
46
|
+
* the `orbitData` prop.
|
|
47
|
+
*
|
|
48
|
+
* @returns a reference to the context provider
|
|
49
|
+
*/
|
|
50
|
+
export declare function useOrbitalSimContext(): OrbitalSimContextValues;
|
|
51
|
+
/**
|
|
52
|
+
* The context provider that must wrap the implementation of the `<OrbitalSim>`,
|
|
53
|
+
* and this is all that is necessary to populate the `OrbitalSim` with data. The
|
|
54
|
+
* context provider expects a prop called `orbitData` consisting of the object
|
|
55
|
+
* that represents the monolithic orbits of visualized in the `OrbitalSim`. The
|
|
56
|
+
* context provider will parse out the `observations` and expose a callback function
|
|
57
|
+
* named `updateActiveObservation()` which can be passed to the `observation`
|
|
58
|
+
* components.
|
|
59
|
+
*
|
|
60
|
+
* @param children - a React.Node if necessary, but it shouldn't be
|
|
61
|
+
* @param orbitData - the monolithic object containing orbit, observation and detailed
|
|
62
|
+
* information data
|
|
63
|
+
*
|
|
64
|
+
* @returns
|
|
65
|
+
*/
|
|
66
|
+
export declare function OrbitalSimProvider({ children, orbitData }: OrbitalSimProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as d, useContext as f, useState as u, useEffect as O, useMemo as p } from "react";
|
|
4
|
+
const a = d(null);
|
|
5
|
+
function S() {
|
|
6
|
+
const t = f(a);
|
|
7
|
+
if (!t)
|
|
8
|
+
throw new Error(
|
|
9
|
+
"OrbitalSim components cannot be rendered outside the OrbitalSimContext.Provider component."
|
|
10
|
+
);
|
|
11
|
+
return t;
|
|
12
|
+
}
|
|
13
|
+
function w({ children: t, orbitData: o }) {
|
|
14
|
+
const [l, s] = u({
|
|
15
|
+
neos: null,
|
|
16
|
+
activeNeo: null,
|
|
17
|
+
observations: [],
|
|
18
|
+
activeObs: null,
|
|
19
|
+
selectionCallback: null,
|
|
20
|
+
paused: null,
|
|
21
|
+
pov: null,
|
|
22
|
+
defaultZoom: null,
|
|
23
|
+
potentialOrbits: null,
|
|
24
|
+
noDetails: null,
|
|
25
|
+
detailsSet: null,
|
|
26
|
+
detailsRows: null,
|
|
27
|
+
refObjs: null,
|
|
28
|
+
noLabels: null,
|
|
29
|
+
noControls: !1
|
|
30
|
+
}), [e, n] = u(
|
|
31
|
+
() => l.observations ?? []
|
|
32
|
+
);
|
|
33
|
+
O(() => {
|
|
34
|
+
s(o), n(o.observations);
|
|
35
|
+
}, [o]);
|
|
36
|
+
const r = (b) => {
|
|
37
|
+
if (e && e.length > 0) {
|
|
38
|
+
let v = e.map((i) => i.id == b ? { ...i, isActive: !0 } : { ...i, isActive: !1 });
|
|
39
|
+
n(v);
|
|
40
|
+
}
|
|
41
|
+
}, c = p(() => ({
|
|
42
|
+
orbits: l,
|
|
43
|
+
setOrbits: s,
|
|
44
|
+
observations: e,
|
|
45
|
+
setObservations: n,
|
|
46
|
+
updateActiveObservation: r
|
|
47
|
+
}), [
|
|
48
|
+
l,
|
|
49
|
+
s,
|
|
50
|
+
e,
|
|
51
|
+
n,
|
|
52
|
+
r
|
|
53
|
+
]);
|
|
54
|
+
return /* @__PURE__ */ m(a.Provider, { value: c, children: t });
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
a as OrbitalSimContext,
|
|
58
|
+
w as OrbitalSimProvider,
|
|
59
|
+
a as default,
|
|
60
|
+
S as useOrbitalSimContext
|
|
61
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="_playbackControlsContainer_1m020_1",t={playbackControlsContainer:o};exports.default=t;exports.playbackControlsContainer=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),
|
|
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,16 +1,12 @@
|
|
|
1
1
|
import { default as PropTypes } from 'prop-types';
|
|
2
2
|
export default Observation;
|
|
3
|
-
declare function Observation({ data,
|
|
3
|
+
declare function Observation({ data, vector }: {
|
|
4
4
|
data: any;
|
|
5
|
-
activeObs: any;
|
|
6
5
|
vector: any;
|
|
7
|
-
selectionCallback: any;
|
|
8
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
9
7
|
declare namespace Observation {
|
|
10
8
|
namespace propTypes {
|
|
11
9
|
let data: PropTypes.Requireable<object>;
|
|
12
|
-
let selectionCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
13
|
-
let activeObs: PropTypes.Requireable<object>;
|
|
14
10
|
let vector: PropTypes.Requireable<object>;
|
|
15
11
|
}
|
|
16
12
|
}
|
|
@@ -1,60 +1,50 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useState as b
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { Html as
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
g(() => {
|
|
14
|
-
const { id: n } = s || {};
|
|
15
|
-
d(n === a);
|
|
16
|
-
}, [s]);
|
|
17
|
-
function h() {
|
|
18
|
-
return l && t ? "green" : t || m ? "blue" : "gray";
|
|
2
|
+
import { jsxs as f, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { useState as b } from "react";
|
|
4
|
+
import i from "../../node_modules/prop-types/index.js";
|
|
5
|
+
import h from "../../node_modules/classnames/index.js";
|
|
6
|
+
import { Html as v } from "@react-three/drei";
|
|
7
|
+
import n from "./OrbitalSim.module.css.js";
|
|
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);
|
|
11
|
+
function p() {
|
|
12
|
+
return o && c ? "green" : o || u ? "blue" : "gray";
|
|
19
13
|
}
|
|
20
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ f(
|
|
21
15
|
"mesh",
|
|
22
16
|
{
|
|
23
|
-
className:
|
|
24
|
-
position:
|
|
25
|
-
onClick:
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
className: n["obs-mesh"],
|
|
18
|
+
position: a,
|
|
19
|
+
onClick: t ? () => {
|
|
20
|
+
l(r.id);
|
|
21
|
+
} : null,
|
|
22
|
+
onPointerOver: t ? () => s(!0) : null,
|
|
23
|
+
onPointerOut: t ? () => s(!1) : null,
|
|
28
24
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(
|
|
30
26
|
"div",
|
|
31
27
|
{
|
|
32
|
-
className:
|
|
33
|
-
|
|
34
|
-
[e["obs-hover"]]: m,
|
|
35
|
-
[e["obs-active"]]: t
|
|
36
|
-
}),
|
|
37
|
-
children: v
|
|
28
|
+
className: h(n["obs-label"]),
|
|
29
|
+
children: m
|
|
38
30
|
}
|
|
39
31
|
) }),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ e("octahedronGeometry", { attach: "geometry", args: [20] }),
|
|
33
|
+
/* @__PURE__ */ e(
|
|
42
34
|
"meshBasicMaterial",
|
|
43
35
|
{
|
|
44
36
|
attach: "material",
|
|
45
|
-
color:
|
|
37
|
+
color: p()
|
|
46
38
|
}
|
|
47
39
|
)
|
|
48
40
|
]
|
|
49
41
|
}
|
|
50
42
|
);
|
|
51
43
|
}
|
|
52
|
-
|
|
53
|
-
data:
|
|
54
|
-
|
|
55
|
-
activeObs: r.object,
|
|
56
|
-
vector: r.object
|
|
44
|
+
y.propTypes = {
|
|
45
|
+
data: i.object,
|
|
46
|
+
vector: i.object
|
|
57
47
|
};
|
|
58
48
|
export {
|
|
59
|
-
|
|
49
|
+
y as default
|
|
60
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),m=require("react"),l=require("../../node_modules/prop-types/index.cjs"),j=require("three"),v=require("./Observation.cjs"),c=require("./orbitalUtilities.cjs");function x(e){if(e&&e.__esModule)return e;const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const O=x(j),d=({data:e,observations:n})=>{const[t]=m.useState(()=>{const{a:r,e:u}=e,o=c.auToUnit(r),i=c.getMinorAxis(r,u),f=c.getFocus(o,i),a=new O.Vector3(f,0,0),b=c.getCurve(o,i,a.x,a.y);return(n||[]).map(g=>{const{position:p}=g;return c.convert2dTo3d(b.getPoint(p),e)})});return s.jsx(s.Fragment,{children:t&&s.jsx(s.Fragment,{children:t.map((r,u)=>{const o=n[u],{id:i}=o;return s.jsx(v.default,{data:o,vector:r},i)})})})};d.propTypes={data:l.default.object,observations:l.default.array};exports.default=d;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { default as PropTypes } from 'prop-types';
|
|
2
2
|
export default Observations;
|
|
3
|
-
declare function Observations({ data, observations
|
|
3
|
+
declare function Observations({ data, observations }: {
|
|
4
4
|
data: any;
|
|
5
5
|
observations: any;
|
|
6
|
-
activeObs: any;
|
|
7
|
-
selectionCallback: any;
|
|
8
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
9
7
|
declare namespace Observations {
|
|
10
8
|
namespace propTypes {
|
|
11
9
|
let data: PropTypes.Requireable<object>;
|
|
12
10
|
let observations: PropTypes.Requireable<any[]>;
|
|
13
|
-
let selectionCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
|
-
let activeObs: PropTypes.Requireable<object>;
|
|
15
11
|
}
|
|
16
12
|
}
|