@rubin-epo/epo-widget-lib 1.2.3 → 2.0.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/ColorTool.js +3 -3
- package/dist/IsochronePlot.js +3 -3
- package/dist/OrbitalSim.cjs +1 -1
- package/dist/OrbitalSim.d.ts +0 -2
- package/dist/OrbitalSim.js +6 -144
- package/dist/atomic/Blinker/Blinker.cjs +1 -1
- package/dist/atomic/Blinker/Blinker.js +35 -36
- package/dist/atomic/Blinker/Controls/styles.d.ts +0 -1
- package/dist/atomic/Blinker/styles.d.ts +0 -1
- package/dist/atomic/ElapsedTime/ElapsedTime.cjs +1 -1
- package/dist/atomic/ElapsedTime/ElapsedTime.js +18 -19
- package/dist/atomic/ElapsedTime/styles.d.ts +0 -1
- package/dist/atomic/ImageStack/index.cjs +1 -1
- package/dist/atomic/ImageStack/index.js +25 -26
- package/dist/atomic/ImageStack/styles.d.ts +0 -1
- package/dist/atomic/LiveRegion/styles.d.ts +0 -1
- package/dist/atomic/Loader/styles.d.ts +0 -1
- package/dist/atomic/PlaybackControl/PlaybackControl.cjs +1 -1
- package/dist/atomic/PlaybackControl/PlaybackControl.js +13 -14
- package/dist/atomic/PlaybackControl/styles.cjs +8 -5
- package/dist/atomic/PlaybackControl/styles.d.ts +4 -1
- package/dist/atomic/PlaybackControl/styles.js +12 -8
- package/dist/atomic/PlotWrapper/styles.d.ts +0 -1
- package/dist/charts/Base/styles.d.ts +0 -1
- package/dist/charts/Points/ErrorBar.cjs +1 -1
- package/dist/charts/Points/ErrorBar.js +33 -33
- package/dist/charts/Readout/styles.d.ts +0 -1
- package/dist/charts/ScatterPlot/styles.d.ts +1 -2
- package/dist/charts/Tooltip/styles.d.ts +7 -8
- package/dist/charts/Unit/Span.d.ts +1 -2
- package/dist/charts/Unit/StandardUnit.d.ts +2 -3
- package/dist/charts/Unit/StellarUnit.d.ts +2 -3
- package/dist/charts/Unit/Sub.d.ts +1 -2
- package/dist/charts/Unit/SvgSub.d.ts +1 -2
- package/dist/charts/Unit/TSpan.d.ts +1 -2
- package/dist/charts/Unit/index.d.ts +2 -3
- package/dist/charts/styles.d.ts +0 -1
- package/dist/hooks/useInterval.cjs +1 -1
- package/dist/hooks/useInterval.js +3 -3
- package/dist/hooks/usePrevious.cjs +1 -1
- package/dist/hooks/usePrevious.d.ts +1 -1
- package/dist/hooks/usePrevious.js +3 -3
- package/dist/layout/AspectRatio/styles.d.ts +0 -1
- package/dist/layout/Controls/styles.d.ts +2 -3
- package/dist/localeStrings/es/epo-widget-lib.json +1 -1
- package/dist/node_modules/classnames/index.cjs +2 -2
- package/dist/node_modules/classnames/index.js +30 -30
- package/dist/node_modules/three/examples/jsm/controls/OrbitControls.js +3 -3
- package/dist/style.css +1 -1
- package/dist/styles/svg.d.ts +0 -1
- package/dist/widgets/CameraFilter/CameraFilter.cjs +1 -1
- package/dist/widgets/CameraFilter/CameraFilter.js +30 -31
- package/dist/widgets/CameraFilter/styles.d.ts +1 -2
- package/dist/widgets/ColorTool/FilterControls/styles.d.ts +1 -4
- package/dist/widgets/ColorTool/ImageComposite/ImageComposite.d.ts +1 -1
- package/dist/widgets/ColorTool/ImageComposite/styles.d.ts +0 -1
- package/dist/widgets/ColorTool/lib/canvas.d.ts +1 -1
- package/dist/widgets/ColorTool/lib/utils.d.ts +2 -2
- package/dist/widgets/ColorTool/styles.d.ts +0 -1
- package/dist/widgets/FilterTool/styles.d.ts +1 -2
- package/dist/widgets/LightCurvePlot/Plot/index.js +3 -3
- package/dist/widgets/LightCurvePlot/Plot/styles.d.ts +0 -1
- package/dist/widgets/LightCurvePlot/PlotWithCurve/A11Y/LightCurveLabel/styles.d.ts +0 -1
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/PlotWithCurve/index.js +45 -46
- package/dist/widgets/LightCurvePlot/PlotWithCurve/styles.d.ts +0 -1
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.cjs +1 -1
- package/dist/widgets/LightCurvePlot/PlotWithoutCurve/index.js +5 -5
- package/dist/widgets/LightCurvePlot/helpers.cjs +1 -1
- package/dist/widgets/LightCurvePlot/helpers.js +4 -4
- package/dist/widgets/OrbitalSim/Camera/Camera.cjs +1 -0
- package/dist/widgets/OrbitalSim/{Camera.d.ts → Camera/Camera.d.ts} +1 -2
- package/dist/widgets/OrbitalSim/{Camera.js → Camera/Camera.js} +1 -1
- package/dist/widgets/OrbitalSim/Camera/CameraController.cjs +1 -0
- package/dist/widgets/OrbitalSim/{CameraController.d.ts → Camera/CameraController.d.ts} +2 -3
- package/dist/widgets/OrbitalSim/{CameraController.js → Camera/CameraController.js} +2 -2
- 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 +60 -0
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.cjs +1 -1
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.js +20 -20
- package/dist/widgets/OrbitalSim/Controls/PlaybackSpeed.cjs +1 -0
- package/dist/widgets/OrbitalSim/{PlaybackSpeed.d.ts → Controls/PlaybackSpeed.d.ts} +4 -5
- package/dist/widgets/OrbitalSim/Controls/PlaybackSpeed.js +95 -0
- package/dist/widgets/OrbitalSim/Controls/styles.cjs +97 -0
- package/dist/widgets/OrbitalSim/Controls/styles.d.ts +13 -0
- package/dist/widgets/OrbitalSim/Controls/styles.js +114 -0
- package/dist/widgets/OrbitalSim/Observations/Observation.cjs +1 -0
- package/dist/widgets/OrbitalSim/Observations/Observation.d.ts +11 -0
- package/dist/widgets/OrbitalSim/Observations/Observation.js +50 -0
- package/dist/widgets/OrbitalSim/Observations/Observations.cjs +1 -0
- package/dist/widgets/OrbitalSim/Observations/Observations.d.ts +11 -0
- package/dist/widgets/OrbitalSim/Observations/Observations.js +34 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.cjs +1 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.d.ts +2 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.js +103 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.module.css.cjs +1 -1
- package/dist/widgets/OrbitalSim/OrbitalSim.module.css.js +6 -48
- package/dist/widgets/OrbitalSim/Orbitals/Orbital.cjs +1 -0
- package/dist/widgets/OrbitalSim/Orbitals/Orbital.d.ts +46 -0
- package/dist/widgets/OrbitalSim/Orbitals/Orbital.js +254 -0
- package/dist/widgets/OrbitalSim/Orbitals/OrbitalDetails.cjs +1 -0
- package/dist/widgets/OrbitalSim/Orbitals/OrbitalDetails.d.ts +2 -0
- package/dist/widgets/OrbitalSim/Orbitals/OrbitalDetails.js +42 -0
- package/dist/widgets/OrbitalSim/Orbitals/Orbitals.cjs +1 -0
- package/dist/widgets/OrbitalSim/Orbitals/Orbitals.d.ts +30 -0
- package/dist/widgets/OrbitalSim/Orbitals/Orbitals.js +125 -0
- package/dist/widgets/OrbitalSim/Orbitals/PotentialOrbits.cjs +1 -0
- package/dist/widgets/OrbitalSim/Orbitals/PotentialOrbits.d.ts +7 -0
- package/dist/widgets/OrbitalSim/Orbitals/PotentialOrbits.js +51 -0
- package/dist/widgets/OrbitalSim/Orbitals/styles.cjs +53 -0
- package/dist/widgets/OrbitalSim/Orbitals/styles.d.ts +9 -0
- package/dist/widgets/OrbitalSim/Orbitals/styles.js +66 -0
- package/dist/widgets/OrbitalSim/Sun.cjs +1 -1
- package/dist/widgets/OrbitalSim/Sun.d.ts +6 -9
- package/dist/widgets/OrbitalSim/Sun.js +11 -14
- 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 +51 -56
- package/dist/widgets/OrbitalSim/styles.cjs +48 -0
- package/dist/widgets/OrbitalSim/styles.d.ts +5 -0
- package/dist/widgets/OrbitalSim/styles.js +56 -0
- package/dist/widgets/SourceSelector/Message/Message.cjs +1 -1
- package/dist/widgets/SourceSelector/Message/Message.js +10 -11
- package/dist/widgets/SourceSelector/Message/styles.d.ts +1 -2
- package/dist/widgets/SourceSelector/SelectionList/index.cjs +1 -1
- package/dist/widgets/SourceSelector/SelectionList/index.js +12 -13
- package/dist/widgets/SourceSelector/SelectionList/styles.d.ts +0 -1
- package/dist/widgets/SourceSelector/SourceMap/styles.d.ts +0 -1
- package/dist/widgets/SourceSelector/styles.d.ts +1 -2
- package/dist/widgets/SupernovaThreeVector/Histogram/styles.d.ts +0 -1
- package/dist/widgets/SupernovaThreeVector/Skymap/styles.d.ts +0 -1
- package/dist/widgets/SupernovaThreeVector/styles.d.ts +0 -1
- package/dist/widgets/ViewIndicator/styles.d.ts +0 -1
- package/package.json +15 -13
- package/dist/widgets/OrbitalSim/Camera.cjs +0 -1
- package/dist/widgets/OrbitalSim/CameraController.cjs +0 -1
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.module.css.cjs +0 -1
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.module.css.js +0 -7
- package/dist/widgets/OrbitalSim/Observation.cjs +0 -1
- package/dist/widgets/OrbitalSim/Observation.d.ts +0 -16
- package/dist/widgets/OrbitalSim/Observation.js +0 -60
- package/dist/widgets/OrbitalSim/Observations.cjs +0 -1
- package/dist/widgets/OrbitalSim/Observations.d.ts +0 -16
- package/dist/widgets/OrbitalSim/Observations.js +0 -38
- package/dist/widgets/OrbitalSim/Orbital.cjs +0 -1
- package/dist/widgets/OrbitalSim/Orbital.d.ts +0 -52
- package/dist/widgets/OrbitalSim/Orbital.js +0 -256
- package/dist/widgets/OrbitalSim/OrbitalDetails.cjs +0 -1
- package/dist/widgets/OrbitalSim/OrbitalDetails.d.ts +0 -14
- package/dist/widgets/OrbitalSim/OrbitalDetails.js +0 -56
- package/dist/widgets/OrbitalSim/Orbitals.cjs +0 -1
- package/dist/widgets/OrbitalSim/Orbitals.d.ts +0 -48
- package/dist/widgets/OrbitalSim/Orbitals.js +0 -147
- package/dist/widgets/OrbitalSim/PlaybackSpeed.cjs +0 -1
- package/dist/widgets/OrbitalSim/PlaybackSpeed.js +0 -97
- package/dist/widgets/OrbitalSim/PotentialOrbits.cjs +0 -1
- package/dist/widgets/OrbitalSim/PotentialOrbits.d.ts +0 -16
- package/dist/widgets/OrbitalSim/PotentialOrbits.js +0 -59
|
@@ -0,0 +1,48 @@
|
|
|
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`
|
|
2
|
+
:root {
|
|
3
|
+
--white: #ffffff;
|
|
4
|
+
--black: #000000;
|
|
5
|
+
--lightBlue: #bee7f5;
|
|
6
|
+
--boldRed: #df0039;
|
|
7
|
+
|
|
8
|
+
--ral5018HR: #087f80;
|
|
9
|
+
--neutral10: #f3f3f3;
|
|
10
|
+
--neutral20: #737373;
|
|
11
|
+
--basePrimary: var(--ral5018HR);
|
|
12
|
+
--error: var(--boldRed);
|
|
13
|
+
|
|
14
|
+
--break40: 420px;
|
|
15
|
+
--break100: 1284px;
|
|
16
|
+
|
|
17
|
+
--minPadding: 20px;
|
|
18
|
+
--containerMaxWidth: var(--break100);
|
|
19
|
+
--offset: 300px;
|
|
20
|
+
|
|
21
|
+
--regular: 400;
|
|
22
|
+
--medium: 500;
|
|
23
|
+
|
|
24
|
+
--duration: 0.2s;
|
|
25
|
+
--durationSlow: 0.4s;
|
|
26
|
+
--timing: ease;
|
|
27
|
+
|
|
28
|
+
--siteProgressHeight: 26px;
|
|
29
|
+
--siteToolbarHeight: 64px;
|
|
30
|
+
--siteHeaderHeight: var(--siteProgressHeight) + var(--siteToolbarHeight);
|
|
31
|
+
--pageNavHeight: 64px;
|
|
32
|
+
--headingWithSpaceHeight: 90px;
|
|
33
|
+
// --tallestSquareWidget: calc(100vh - var(--pageNavHeight) - var(--siteHeaderHeight) - var(--headingWithSpaceHeight) - var(--minPadding));
|
|
34
|
+
}
|
|
35
|
+
`,o=t.default.div`
|
|
36
|
+
position: relative;
|
|
37
|
+
// height: var(--tallestSquareWidget);
|
|
38
|
+
height: 750px; // revisit this close to MVP
|
|
39
|
+
// min-height: var(--break40);
|
|
40
|
+
min-height: 500px;
|
|
41
|
+
background-color: var(--black);
|
|
42
|
+
color-adjust: exact;
|
|
43
|
+
`,s=t.default(i.Canvas)`
|
|
44
|
+
display: inline;
|
|
45
|
+
position: relative;
|
|
46
|
+
height: 100%;
|
|
47
|
+
z-index: 1;
|
|
48
|
+
`;exports.CanvasWrapper=s;exports.GlobalStyles=l;exports.OrbitalSimWrapper=o;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Canvas } from '@react-three/fiber';
|
|
2
|
+
|
|
3
|
+
export declare const GlobalStyles: import('react').NamedExoticComponent<import('styled-components').ExecutionProps & object>;
|
|
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
|
+
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>>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import e, { createGlobalStyle as a } from "styled-components";
|
|
3
|
+
import { Canvas as i } from "@react-three/fiber";
|
|
4
|
+
const o = a`
|
|
5
|
+
:root {
|
|
6
|
+
--white: #ffffff;
|
|
7
|
+
--black: #000000;
|
|
8
|
+
--lightBlue: #bee7f5;
|
|
9
|
+
--boldRed: #df0039;
|
|
10
|
+
|
|
11
|
+
--ral5018HR: #087f80;
|
|
12
|
+
--neutral10: #f3f3f3;
|
|
13
|
+
--neutral20: #737373;
|
|
14
|
+
--basePrimary: var(--ral5018HR);
|
|
15
|
+
--error: var(--boldRed);
|
|
16
|
+
|
|
17
|
+
--break40: 420px;
|
|
18
|
+
--break100: 1284px;
|
|
19
|
+
|
|
20
|
+
--minPadding: 20px;
|
|
21
|
+
--containerMaxWidth: var(--break100);
|
|
22
|
+
--offset: 300px;
|
|
23
|
+
|
|
24
|
+
--regular: 400;
|
|
25
|
+
--medium: 500;
|
|
26
|
+
|
|
27
|
+
--duration: 0.2s;
|
|
28
|
+
--durationSlow: 0.4s;
|
|
29
|
+
--timing: ease;
|
|
30
|
+
|
|
31
|
+
--siteProgressHeight: 26px;
|
|
32
|
+
--siteToolbarHeight: 64px;
|
|
33
|
+
--siteHeaderHeight: var(--siteProgressHeight) + var(--siteToolbarHeight);
|
|
34
|
+
--pageNavHeight: 64px;
|
|
35
|
+
--headingWithSpaceHeight: 90px;
|
|
36
|
+
// --tallestSquareWidget: calc(100vh - var(--pageNavHeight) - var(--siteHeaderHeight) - var(--headingWithSpaceHeight) - var(--minPadding));
|
|
37
|
+
}
|
|
38
|
+
`, l = e.div`
|
|
39
|
+
position: relative;
|
|
40
|
+
// height: var(--tallestSquareWidget);
|
|
41
|
+
height: 750px; // revisit this close to MVP
|
|
42
|
+
// min-height: var(--break40);
|
|
43
|
+
min-height: 500px;
|
|
44
|
+
background-color: var(--black);
|
|
45
|
+
color-adjust: exact;
|
|
46
|
+
`, s = e(i)`
|
|
47
|
+
display: inline;
|
|
48
|
+
position: relative;
|
|
49
|
+
height: 100%;
|
|
50
|
+
z-index: 1;
|
|
51
|
+
`;
|
|
52
|
+
export {
|
|
53
|
+
s as CanvasWrapper,
|
|
54
|
+
o as GlobalStyles,
|
|
55
|
+
l as OrbitalSimWrapper
|
|
56
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const c=require("react/jsx-runtime"),i=require("react"),n=require("./styles.cjs"),r=({children:t,isVisible:e=!1,onMessageChangeCallback:s,forIds:u})=>(i.useEffect(()=>{if(e){const o=setTimeout(()=>{s&&s()},1800);return()=>clearTimeout(o)}},[t,e]),c.jsx(n.Message,{forIds:u,$isOpen:e,children:t}));r.displayName="Widgets.SourceSelector.Message";exports.default=r;
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect as f } from "react";
|
|
4
4
|
import { Message as u } from "./styles.js";
|
|
5
|
-
const
|
|
5
|
+
const a = ({
|
|
6
6
|
children: t,
|
|
7
7
|
isVisible: e = !1,
|
|
8
|
-
onMessageChangeCallback:
|
|
9
|
-
forIds:
|
|
8
|
+
onMessageChangeCallback: r,
|
|
9
|
+
forIds: s
|
|
10
10
|
}) => (f(() => {
|
|
11
11
|
if (e) {
|
|
12
|
-
const
|
|
13
|
-
|
|
12
|
+
const o = setTimeout(() => {
|
|
13
|
+
r && r();
|
|
14
14
|
}, 1800);
|
|
15
|
-
return () => clearTimeout(
|
|
15
|
+
return () => clearTimeout(o);
|
|
16
16
|
}
|
|
17
|
-
}, [t, e]), /* @__PURE__ */
|
|
18
|
-
|
|
19
|
-
const i = r;
|
|
17
|
+
}, [t, e]), /* @__PURE__ */ m(u, { forIds: s, $isOpen: e, children: t }));
|
|
18
|
+
a.displayName = "Widgets.SourceSelector.Message";
|
|
20
19
|
export {
|
|
21
|
-
|
|
20
|
+
a as default
|
|
22
21
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const Message: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('@rubin-epo/epo-react-lib/Toast').ToastProps & {
|
|
3
|
-
children?: import('react').ReactNode;
|
|
2
|
+
children?: import('react').ReactNode | undefined;
|
|
4
3
|
}, {
|
|
5
4
|
$isOpen: boolean;
|
|
6
5
|
}>> & string & Omit<import('react').FunctionComponent<import('react').PropsWithChildren<import('@rubin-epo/epo-react-lib/Toast').ToastProps>>, keyof import('react').Component<any, {}, any>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),u=require("react-i18next"),s=require("./styles.cjs"),a=require("../../../atomic/Button/patterns/Reset.cjs"),
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),u=require("react-i18next"),s=require("./styles.cjs"),a=require("../../../atomic/Button/patterns/Reset.cjs"),l=({className:n,onRemoveCallback:c,sources:t=[]})=>{const{t:r}=u.useTranslation();return e.jsxs(s.SelectionWrapper,{children:[t.length>0&&e.jsx(s.SelectionList,{className:n,children:t.map(({type:o,id:i})=>e.jsxs(s.DescriptionWrapper,{children:[e.jsx("dt",{children:r("source_selector.selected_source",{type:r(`source_selector.sources.${o}`)})}),e.jsx("dd",{children:i})]},i))}),e.jsx(a.default,{isDisabled:t.length<1,onResetCallback:c})]})};l.displayName="Widgets.SelectionList";exports.default=l;
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { SelectionWrapper as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
className:
|
|
3
|
+
import { useTranslation as c } from "react-i18next";
|
|
4
|
+
import { SelectionWrapper as a, SelectionList as p, DescriptionWrapper as d } from "./styles.js";
|
|
5
|
+
import m from "../../../atomic/Button/patterns/Reset.js";
|
|
6
|
+
const u = ({
|
|
7
|
+
className: o,
|
|
8
8
|
onRemoveCallback: l,
|
|
9
9
|
sources: t = []
|
|
10
10
|
}) => {
|
|
11
|
-
const { t: r } =
|
|
12
|
-
return /* @__PURE__ */ s(
|
|
13
|
-
t.length > 0 && /* @__PURE__ */ e(
|
|
11
|
+
const { t: r } = c();
|
|
12
|
+
return /* @__PURE__ */ s(a, { children: [
|
|
13
|
+
t.length > 0 && /* @__PURE__ */ e(p, { className: o, children: t.map(({ type: n, id: i }) => /* @__PURE__ */ s(d, { children: [
|
|
14
14
|
/* @__PURE__ */ e("dt", { children: r("source_selector.selected_source", {
|
|
15
|
-
type: r(`source_selector.sources.${
|
|
15
|
+
type: r(`source_selector.sources.${n}`)
|
|
16
16
|
}) }),
|
|
17
17
|
/* @__PURE__ */ e("dd", { children: i })
|
|
18
18
|
] }, i)) }),
|
|
19
19
|
/* @__PURE__ */ e(
|
|
20
|
-
|
|
20
|
+
m,
|
|
21
21
|
{
|
|
22
22
|
isDisabled: t.length < 1,
|
|
23
23
|
onResetCallback: l
|
|
@@ -25,8 +25,7 @@ const o = ({
|
|
|
25
25
|
)
|
|
26
26
|
] });
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
const g = o;
|
|
28
|
+
u.displayName = "Widgets.SelectionList";
|
|
30
29
|
export {
|
|
31
|
-
|
|
30
|
+
u as default
|
|
32
31
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const SelectionWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
2
|
export declare const SelectionList: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDListElement>, HTMLDListElement>, never>> & string;
|
|
4
3
|
export declare const DescriptionWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const SVG: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').SVGProps<SVGSVGElement>, never>> & string;
|
|
3
2
|
export declare const Point: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').SVGProps<SVGCircleElement>, never>> & string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const BackgroundBlinker: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('../../atomic/Blinker/Blinker').BlinkerProps & {
|
|
3
|
-
children?: import('react').ReactNode;
|
|
2
|
+
children?: import('react').ReactNode | undefined;
|
|
4
3
|
}, never>> & string & Omit<import('react').FunctionComponent<import('react').PropsWithChildren<import('../../atomic/Blinker/Blinker').BlinkerProps>>, keyof import('react').Component<any, {}, any>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const Background: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').SVGProps<SVGPathElement>, never>> & string;
|
|
3
2
|
export declare const Graticule: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').SVGProps<SVGPathElement>, never>> & string;
|
|
4
3
|
export declare const Outline: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').SVGProps<SVGPathElement>, never>> & string;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const ThreeVectorLayout: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
2
|
export declare const HistogramContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
3
|
export declare const Histogram: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('./Histogram').DistanceHistogramProps, never>> & string & Omit<import('react').FunctionComponent<import('./Histogram').DistanceHistogramProps>, keyof import('react').Component<any, {}, any>>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
2
|
export declare const SVG: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').SVGProps<SVGSVGElement>, never>> & string;
|
|
4
3
|
export declare const NorthDirection: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rubin-epo/epo-widget-lib",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Rubin Observatory Education & Public Outreach team React scientific and educational widgets.",
|
|
5
5
|
"author": "Rubin EPO",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,13 +28,15 @@
|
|
|
28
28
|
"test": "jest --max-workers=2",
|
|
29
29
|
"test:generate-output": "yarn test --json --outputFile=.jest-test-results.json || true",
|
|
30
30
|
"prepublishOnly": "yarn build",
|
|
31
|
-
"release": "semantic-release -e semantic-release-monorepo --debug"
|
|
31
|
+
"release-old": "semantic-release -e semantic-release-monorepo --debug"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"README.md",
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
|
-
"sideEffects":
|
|
37
|
+
"sideEffects": [
|
|
38
|
+
"**/*.css"
|
|
39
|
+
],
|
|
38
40
|
"exports": {
|
|
39
41
|
"./*": {
|
|
40
42
|
"import": "./dist/*.js",
|
|
@@ -66,8 +68,8 @@
|
|
|
66
68
|
"@testing-library/user-event": "^14.4.3",
|
|
67
69
|
"@types/d3-array": "^3.2.1",
|
|
68
70
|
"@types/d3-geo": "^3.1.0",
|
|
69
|
-
"@types/react": "
|
|
70
|
-
"@types/react-dom": "
|
|
71
|
+
"@types/react": "19.2.3",
|
|
72
|
+
"@types/react-dom": "19.2.3`",
|
|
71
73
|
"@vitejs/plugin-react": "^4",
|
|
72
74
|
"babel-loader": "^8.3.0",
|
|
73
75
|
"eslint-plugin-storybook": "^0.11.4",
|
|
@@ -78,8 +80,8 @@
|
|
|
78
80
|
"jest": "^29.4.2",
|
|
79
81
|
"jest-canvas-mock": "^2.4.0",
|
|
80
82
|
"jest-environment-jsdom": "^29.4.2",
|
|
81
|
-
"react": "
|
|
82
|
-
"react-dom": "
|
|
83
|
+
"react": "19.2.3",
|
|
84
|
+
"react-dom": "19.2.3",
|
|
83
85
|
"react-i18next": "13",
|
|
84
86
|
"rollup-plugin-banner2": "^1.2.2",
|
|
85
87
|
"semantic-release": "^24.1.0",
|
|
@@ -93,13 +95,13 @@
|
|
|
93
95
|
"peerDependencies": {
|
|
94
96
|
"i18next": "^22.0.0 || ^23.0.0",
|
|
95
97
|
"next": "^13.0.0 || ^14.0.0",
|
|
96
|
-
"react": "^
|
|
97
|
-
"react-dom": "^
|
|
98
|
+
"react": "^19.2.3",
|
|
99
|
+
"react-dom": "^19.2.3",
|
|
98
100
|
"react-i18next": "^12.0.0 || ^13.0.0"
|
|
99
101
|
},
|
|
100
102
|
"dependencies": {
|
|
101
103
|
"@react-three/drei": "^10.7.6",
|
|
102
|
-
"@react-three/fiber": "
|
|
104
|
+
"@react-three/fiber": "9",
|
|
103
105
|
"@rubin-epo/epo-react-lib": "^2.10.1",
|
|
104
106
|
"context-filter-polyfill": "^0.3.6",
|
|
105
107
|
"d3-array": "^3.2.4",
|
|
@@ -113,8 +115,8 @@
|
|
|
113
115
|
"use-resize-observer": "^9.1.0"
|
|
114
116
|
},
|
|
115
117
|
"resolutions": {
|
|
116
|
-
"semver": "7.3
|
|
117
|
-
"@types/react": "
|
|
118
|
-
"@types/react-dom": "
|
|
118
|
+
"semver": "7.6.3",
|
|
119
|
+
"@types/react": "19.2.3",
|
|
120
|
+
"@types/react-dom": "19.2.3"
|
|
119
121
|
}
|
|
120
122
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),u=require("react"),n=require("../../node_modules/prop-types/index.cjs"),i=require("@react-three/fiber");function o({...r}){const e=u.useRef();return u.useEffect(()=>{const t=e.current;t.zoom=r.defaultZoom,t.updateProjectionMatrix()},[]),i.useFrame(()=>{e.current.updateMatrixWorld()}),a.jsx("orthographicCamera",{ref:e,...r,makeDefault:!0,zoom:100})}o.propTypes={defaultZoom:n.default.number};exports.default=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("react"),i=require("../../node_modules/prop-types/index.cjs");require("three");const l=require("../../node_modules/three/examples/jsm/controls/OrbitControls.cjs"),f=require("@react-three/fiber");function s({pov:t,reset:n}){const{camera:u,gl:c}=f.useThree(),e=r.useRef();function a(){if(t){const o={side:Math.PI/1.0075,top:Math.PI/2}[t];e.current.minAzimuthAngle=0,e.current.maxAzimuthAngle=0,e.current.minPolarAngle=o,e.current.maxPolarAngle=o}e.current.update()}return r.useEffect(()=>{e.current&&n>0&&e.current.reset()},[n]),r.useEffect(()=>(e.current=new l.OrbitControls(u,c.domElement),e.current.minDistance=70,e.current.maxDistance=1e4,e.current.screenSpacePanning=!0,a(),()=>{e.current.dispose()}),[u,c]),null}s.propTypes={pov:i.default.string,reset:i.default.number};exports.default=s;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o="_playbackControlsContainer_1f1sq_1",t={playbackControlsContainer:o};exports.default=t;exports.playbackControlsContainer=o;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),n=require("react"),r=require("../../node_modules/prop-types/index.cjs"),g=require("../../node_modules/classnames/index.cjs"),O=require("@react-three/drei"),t=require("./OrbitalSim.module.css.cjs");function b({data:a,activeObs:o,vector:v,selectionCallback:m}){const{id:u,label:h,interactable:i,isActive:c}=a,[d,f]=n.useState(!1),[s,j]=n.useState(()=>{const{id:l}=o||{};return l===u});n.useEffect(()=>{const{id:l}=o||{};j(l===u)},[o]);function x(){return c&&s?"green":s||d?"blue":"gray"}return e.jsxs("mesh",{className:t.default["obs-mesh"],position:v,onClick:i?()=>m(a,"obs"):null,onPointerOver:i?()=>f(!0):null,onPointerOut:i?()=>f(!1):null,children:[e.jsx(O.Html,{children:e.jsx("div",{className:g.default(t.default["obs-label"],{[t.default["obs-answer"]]:c&&s,[t.default["obs-hover"]]:d,[t.default["obs-active"]]:s}),children:h})}),e.jsx("octahedronGeometry",{attach:"geometry",args:[20]}),e.jsx("meshBasicMaterial",{attach:"material",color:x()})]})}b.propTypes={data:r.default.object,selectionCallback:r.default.func,activeObs:r.default.object,vector:r.default.object};exports.default=b;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { default as PropTypes } from 'prop-types';
|
|
2
|
-
export default Observation;
|
|
3
|
-
declare function Observation({ data, activeObs, vector, selectionCallback }: {
|
|
4
|
-
data: any;
|
|
5
|
-
activeObs: any;
|
|
6
|
-
vector: any;
|
|
7
|
-
selectionCallback: any;
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
declare namespace Observation {
|
|
10
|
-
namespace propTypes {
|
|
11
|
-
let data: PropTypes.Requireable<object>;
|
|
12
|
-
let selectionCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
13
|
-
let activeObs: PropTypes.Requireable<object>;
|
|
14
|
-
let vector: PropTypes.Requireable<object>;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsxs as y, jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import { useState as b, useEffect as g } from "react";
|
|
4
|
-
import r from "../../node_modules/prop-types/index.js";
|
|
5
|
-
import j from "../../node_modules/classnames/index.js";
|
|
6
|
-
import { Html as A } from "@react-three/drei";
|
|
7
|
-
import e from "./OrbitalSim.module.css.js";
|
|
8
|
-
function O({ data: c, activeObs: s, vector: f, selectionCallback: p }) {
|
|
9
|
-
const { id: a, label: v, interactable: i, isActive: l } = c, [m, u] = b(!1), [t, d] = b(() => {
|
|
10
|
-
const { id: n } = s || {};
|
|
11
|
-
return n === a;
|
|
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";
|
|
19
|
-
}
|
|
20
|
-
return /* @__PURE__ */ y(
|
|
21
|
-
"mesh",
|
|
22
|
-
{
|
|
23
|
-
className: e["obs-mesh"],
|
|
24
|
-
position: f,
|
|
25
|
-
onClick: i ? () => p(c, "obs") : null,
|
|
26
|
-
onPointerOver: i ? () => u(!0) : null,
|
|
27
|
-
onPointerOut: i ? () => u(!1) : null,
|
|
28
|
-
children: [
|
|
29
|
-
/* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
|
|
30
|
-
"div",
|
|
31
|
-
{
|
|
32
|
-
className: j(e["obs-label"], {
|
|
33
|
-
[e["obs-answer"]]: l && t,
|
|
34
|
-
[e["obs-hover"]]: m,
|
|
35
|
-
[e["obs-active"]]: t
|
|
36
|
-
}),
|
|
37
|
-
children: v
|
|
38
|
-
}
|
|
39
|
-
) }),
|
|
40
|
-
/* @__PURE__ */ o("octahedronGeometry", { attach: "geometry", args: [20] }),
|
|
41
|
-
/* @__PURE__ */ o(
|
|
42
|
-
"meshBasicMaterial",
|
|
43
|
-
{
|
|
44
|
-
attach: "material",
|
|
45
|
-
color: h()
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
O.propTypes = {
|
|
53
|
-
data: r.object,
|
|
54
|
-
selectionCallback: r.func,
|
|
55
|
-
activeObs: r.object,
|
|
56
|
-
vector: r.object
|
|
57
|
-
};
|
|
58
|
-
export {
|
|
59
|
-
O as default
|
|
60
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),v=require("react"),a=require("../../node_modules/prop-types/index.cjs"),x=require("three"),O=require("./Observation.cjs"),s=require("./orbitalUtilities.cjs");function y(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const c=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,c.get?c:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const T=y(x),b=({data:e,observations:t,activeObs:r,selectionCallback:c})=>{const[d]=v.useState(()=>{const{a:i,e:l}=e,n=s.auToUnit(i),u=s.getMinorAxis(i,l),g=s.getFocus(n,u),f=new T.Vector3(g,0,0),p=s.getCurve(n,u,f.x,f.y);return(t||[]).map(j=>{const{position:m}=j;return s.convert2dTo3d(p.getPoint(m),e)})});return o.jsx(o.Fragment,{children:d&&o.jsx(o.Fragment,{children:d.map((i,l)=>{const n=t[l],{id:u}=n;return o.jsx(O.default,{data:n,vector:i,selectionCallback:c,activeObs:r},u)})})})};b.propTypes={data:a.default.object,observations:a.default.array,selectionCallback:a.default.func,activeObs:a.default.object};exports.default=b;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { default as PropTypes } from 'prop-types';
|
|
2
|
-
export default Observations;
|
|
3
|
-
declare function Observations({ data, observations, activeObs, selectionCallback }: {
|
|
4
|
-
data: any;
|
|
5
|
-
observations: any;
|
|
6
|
-
activeObs: any;
|
|
7
|
-
selectionCallback: any;
|
|
8
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
declare namespace Observations {
|
|
10
|
-
namespace propTypes {
|
|
11
|
-
let data: PropTypes.Requireable<object>;
|
|
12
|
-
let observations: PropTypes.Requireable<any[]>;
|
|
13
|
-
let selectionCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
14
|
-
let activeObs: PropTypes.Requireable<object>;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as n, Fragment as p } from "react/jsx-runtime";
|
|
3
|
-
import { useState as x } from "react";
|
|
4
|
-
import e from "../../node_modules/prop-types/index.js";
|
|
5
|
-
import * as g from "three";
|
|
6
|
-
import T from "./Observation.js";
|
|
7
|
-
import { getCurve as j, convert2dTo3d as y, auToUnit as A, getMinorAxis as C, getFocus as O } from "./orbitalUtilities.js";
|
|
8
|
-
const h = ({ data: c, observations: i, activeObs: u, selectionCallback: f }) => {
|
|
9
|
-
const [a] = x(() => {
|
|
10
|
-
const { a: o, e: s } = c, t = A(o), r = C(o, s), v = O(t, r), m = new g.Vector3(v, 0, 0), b = j(t, r, m.x, m.y);
|
|
11
|
-
return (i || []).map((d) => {
|
|
12
|
-
const { position: l } = d;
|
|
13
|
-
return y(b.getPoint(l), c);
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
return /* @__PURE__ */ n(p, { children: a && /* @__PURE__ */ n(p, { children: a.map((o, s) => {
|
|
17
|
-
const t = i[s], { id: r } = t;
|
|
18
|
-
return /* @__PURE__ */ n(
|
|
19
|
-
T,
|
|
20
|
-
{
|
|
21
|
-
data: t,
|
|
22
|
-
vector: o,
|
|
23
|
-
selectionCallback: f,
|
|
24
|
-
activeObs: u
|
|
25
|
-
},
|
|
26
|
-
r
|
|
27
|
-
);
|
|
28
|
-
}) }) });
|
|
29
|
-
};
|
|
30
|
-
h.propTypes = {
|
|
31
|
-
data: e.object,
|
|
32
|
-
observations: e.array,
|
|
33
|
-
selectionCallback: e.func,
|
|
34
|
-
activeObs: e.object
|
|
35
|
-
};
|
|
36
|
-
export {
|
|
37
|
-
h as default
|
|
38
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
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"),h=require("@react-three/drei"),t=require("./orbitalUtilities.cjs"),g=require("./OrbitalSim.module.css.cjs"),xe=require("./chartColors.module.css.cjs");function pe(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=pe(ge),_=({data:i,selectionCallback:f,active:a,playing:j,dayPerVizSec:F,stepDirection:G,frameOverride:L,orbitColor:I,objectColor:R,objectRadius:w,initialized:k,initCallback:C,devMode:D,activeVelocityCallback:Z,zoomMod:U,defaultZoom:K,type:Y,noLabels:J,reset:A,t:Q})=>{const W=r.useRef(),{a:z,e:X,i:$,M:ee,Node:B,Peri:H,Principal_desig:te,Translated_desig_key:V,name:oe}=i||{},[se]=r.useState(()=>[0,t.degsToRads($),B?t.degsToRads(B):0]),[l]=r.useState(()=>t.auToUnit(z)),[y]=r.useState(()=>t.getMinorAxis(z,X)),[re]=r.useState(()=>t.getFocus(l,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(l,y,s.x,s.y)),[le]=r.useState(()=>t.getLineGeometry(u.getPoints(360))),b=t.getPosFromArcLength(0,u),[x,v]=r.useState({position:b,rotation:[0,0,0],progress:0,velocity:t.getVelocity(b.distanceTo(d),l),period:0});r.useEffect(()=>{A>0&&v({position:b,rotation:[0,0,0],progress:0,velocity:t.getVelocity(b.distanceTo(d),l),period:0})},[A]);function ne(m){let n=0,c=t.getPosFromArcLength(n,u);if(m){const S=m>180,M=S?m-180:m;let p=t.getAngleFromPos(c,d);for(;p<M;)n+=.01,c=t.getPosFromArcLength(n,u),p=t.getAngleFromPos(c,d);S&&(n+=.5,c=t.getPosFromArcLength(n,u))}return C?C():ae(!0),{position:c,rotation:[0,0,0],progress:n,velocity:t.getVelocity(c.distanceTo(d),l),period:0}}function E(m,P){const{progress:n,position:c,velocity:S,period:M}=x,p=m?0:P*(F||t.DAY_PER_VIZ_SEC),ce=S*p*G,T=n+ce/u.getLength(),N=T>1?1-T:T,{x:de,y:ue}=u.getPoint(N),me=new O.Vector3(de,ue,0),he=t.getVelocity(c.distanceTo(d),l);let q=p+M;T>1&&(q=0),v({...x,position:me,progress:N,velocity:he,period:q})}return r.useEffect(()=>{v(ne(ee||Math.floor(Math.random()*Math.floor(180))))},[]),r.useEffect(()=>{L&&E(!1,1/60)},[L]),r.useEffect(()=>{a&&Z(t.auToMeters(t.unitToAu(x.velocity/1e5)))},[x]),fe.useFrame((m,P)=>{(k||ie)&&E(!j,P)}),e.jsx("group",{rotation:se,children:e.jsxs("group",{rotation:[0,0,H?t.degsToRads(H+90):0],children:[e.jsx("line",{ref:W,geometry:le,children:e.jsx("lineBasicMaterial",{attach:"material",color:a?t.ORBITAL_COLORS.asteroid.orbitHighlight:I||t.ORBITAL_COLORS.asteroid.orbitColor})}),e.jsxs("mesh",{position:x.position,onClick:()=>f(i,"neo"),children:[(Y==="planet"||!J||a)&&e.jsx(h.Html,{children:e.jsx("button",{type:"button",className:g.default.label,style:{fontSize:t.getLabelSize(U,K)},onClick:()=>f(i,"neo"),children:V?Q(V):oe||te})}),e.jsx("sphereGeometry",{attach:"geometry",args:[w||4,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:a?t.ORBITAL_COLORS.asteroid.objectHighlight:R||t.ORBITAL_COLORS.asteroid.objectColor})]}),D&&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(h.Html,{children:e.jsx("div",{className:g.default.label,children:"center"})})]}),e.jsxs("mesh",{position:d,children:[e.jsx("sphereGeometry",{attach:"geometry",args:[2,10,10]}),e.jsx("meshBasicMaterial",{attach:"material",color:R||"blue"}),e.jsx(h.Html,{children:e.jsx("div",{className:g.default.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(h.Html,{children:e.jsx("div",{className:g.default.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(h.Html,{children:e.jsx("div",{className:g.default.label,children:"minor axis vertex"})})]}),e.jsxs("mesh",{position:[l+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(h.Html,{children:e.jsx("div",{className:g.default.label,children:"major axis vertex"})})]}),e.jsxs("mesh",{position:[-l+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(h.Html,{children:e.jsx("div",{className:g.default.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,noLabels:o.default.bool,reset:o.default.number,t:o.default.func};exports.default=_;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { default as PropTypes } from 'prop-types';
|
|
2
|
-
export default Orbital;
|
|
3
|
-
declare function Orbital({ data, selectionCallback, active, playing, dayPerVizSec, stepDirection, frameOverride, orbitColor, objectColor, objectRadius, initialized, initCallback, devMode, activeVelocityCallback, zoomMod, defaultZoom, type, noLabels, reset, t, }: {
|
|
4
|
-
data: any;
|
|
5
|
-
selectionCallback: any;
|
|
6
|
-
active: any;
|
|
7
|
-
playing: any;
|
|
8
|
-
dayPerVizSec: any;
|
|
9
|
-
stepDirection: any;
|
|
10
|
-
frameOverride: any;
|
|
11
|
-
orbitColor: any;
|
|
12
|
-
objectColor: any;
|
|
13
|
-
objectRadius: any;
|
|
14
|
-
initialized: any;
|
|
15
|
-
initCallback: any;
|
|
16
|
-
devMode: any;
|
|
17
|
-
activeVelocityCallback: any;
|
|
18
|
-
zoomMod: any;
|
|
19
|
-
defaultZoom: any;
|
|
20
|
-
type: any;
|
|
21
|
-
noLabels: any;
|
|
22
|
-
reset: any;
|
|
23
|
-
t: any;
|
|
24
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
declare namespace Orbital {
|
|
26
|
-
namespace defaultProps {
|
|
27
|
-
let type: string;
|
|
28
|
-
}
|
|
29
|
-
namespace propTypes {
|
|
30
|
-
export let data: PropTypes.Requireable<object>;
|
|
31
|
-
export let selectionCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
32
|
-
export let active: PropTypes.Requireable<boolean>;
|
|
33
|
-
export let playing: PropTypes.Requireable<boolean>;
|
|
34
|
-
export let dayPerVizSec: PropTypes.Requireable<number>;
|
|
35
|
-
export let stepDirection: PropTypes.Requireable<number>;
|
|
36
|
-
export let frameOverride: PropTypes.Requireable<number>;
|
|
37
|
-
export let orbitColor: PropTypes.Requireable<string>;
|
|
38
|
-
export let objectColor: PropTypes.Requireable<string>;
|
|
39
|
-
export let objectRadius: PropTypes.Requireable<number>;
|
|
40
|
-
export let initCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
41
|
-
export let initialized: PropTypes.Requireable<boolean>;
|
|
42
|
-
export let devMode: PropTypes.Requireable<boolean>;
|
|
43
|
-
export let activeVelocityCallback: PropTypes.Requireable<(...args: any[]) => any>;
|
|
44
|
-
export let zoomMod: PropTypes.Requireable<number>;
|
|
45
|
-
export let defaultZoom: PropTypes.Requireable<number>;
|
|
46
|
-
let type_1: PropTypes.Requireable<string>;
|
|
47
|
-
export { type_1 as type };
|
|
48
|
-
export let noLabels: PropTypes.Requireable<boolean>;
|
|
49
|
-
export let reset: PropTypes.Requireable<number>;
|
|
50
|
-
export let t: PropTypes.Requireable<(...args: any[]) => any>;
|
|
51
|
-
}
|
|
52
|
-
}
|