@rubin-epo/epo-widget-lib 1.1.2 → 1.2.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.
- package/README.MD +4 -1
- package/dist/CameraFilter.cjs +1 -0
- package/dist/CameraFilter.d.ts +3 -0
- package/dist/CameraFilter.js +4 -0
- package/dist/OrbitalSim.cjs +1 -0
- package/dist/OrbitalSim.d.ts +3 -0
- package/dist/OrbitalSim.js +147 -0
- package/dist/_virtual/_commonjsHelpers.cjs +1 -0
- package/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/index.cjs +1 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/_virtual/index2.cjs +1 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/index3.cjs +1 -0
- package/dist/_virtual/index3.js +4 -0
- package/dist/_virtual/react-is.development.cjs +1 -0
- package/dist/_virtual/react-is.development.js +4 -0
- package/dist/_virtual/react-is.production.min.cjs +1 -0
- package/dist/_virtual/react-is.production.min.js +4 -0
- package/dist/atomic/ImageStack/styles.d.ts +4 -0
- package/dist/charts/Unit/Span.d.ts +10 -0
- package/dist/charts/Unit/StandardUnit.d.ts +12 -0
- package/dist/charts/Unit/StellarUnit.d.ts +12 -0
- package/dist/charts/Unit/Sub.d.ts +10 -0
- package/dist/charts/Unit/SvgSub.d.ts +10 -0
- package/dist/charts/Unit/TSpan.d.ts +10 -0
- package/dist/charts/Unit/index.d.ts +9 -0
- package/dist/charts/Unit/utilities.d.ts +25 -0
- package/dist/layout/Controls/index.d.ts +1 -1
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.js +15 -11
- package/dist/localeStrings/en/epo-widget-lib.json +23 -0
- package/dist/localeStrings/es/epo-widget-lib.json +2 -1
- package/dist/node_modules/classnames/index.cjs +5 -0
- package/dist/node_modules/classnames/index.js +42 -0
- package/dist/node_modules/object-assign/index.cjs +5 -0
- package/dist/node_modules/object-assign/index.js +54 -0
- package/dist/node_modules/prop-types/checkPropTypes.cjs +1 -0
- package/dist/node_modules/prop-types/checkPropTypes.js +54 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.cjs +1 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +52 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.cjs +2 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +329 -0
- package/dist/node_modules/prop-types/index.cjs +1 -0
- package/dist/node_modules/prop-types/index.js +15 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.cjs +1 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +10 -0
- package/dist/node_modules/prop-types/lib/has.cjs +1 -0
- package/dist/node_modules/prop-types/lib/has.js +7 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.cjs +8 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +95 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.cjs +8 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +78 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.cjs +1 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +10 -0
- package/dist/node_modules/three/examples/jsm/controls/OrbitControls.cjs +1 -0
- package/dist/node_modules/three/examples/jsm/controls/OrbitControls.js +458 -0
- package/dist/style.css +1 -0
- package/dist/widgets/CameraFilter/CameraFilter.cjs +1 -0
- package/dist/widgets/CameraFilter/CameraFilter.js +103 -0
- package/dist/widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.cjs +1 -0
- package/dist/widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.js +61 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/ColorLabels/ColorLabels.cjs +1 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/ColorLabels/ColorLabels.js +99 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.cjs +1 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.js +97 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumLabels/SpectrumLabels.cjs +1 -0
- package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumLabels/SpectrumLabels.js +58 -0
- package/dist/widgets/CameraFilter/data.cjs +1 -0
- package/dist/widgets/CameraFilter/data.js +84 -0
- package/dist/widgets/CameraFilter/styles.cjs +105 -0
- package/dist/widgets/CameraFilter/styles.js +128 -0
- package/dist/widgets/ColorTool/ImageComposite/styles.d.ts +4 -0
- package/dist/widgets/ColorTool/styles.d.ts +6 -0
- package/dist/widgets/OrbitalSim/Camera.cjs +1 -0
- package/dist/widgets/OrbitalSim/Camera.d.ts +10 -0
- package/dist/widgets/OrbitalSim/Camera.js +20 -0
- package/dist/widgets/OrbitalSim/CameraController.cjs +1 -0
- package/dist/widgets/OrbitalSim/CameraController.d.ts +12 -0
- package/dist/widgets/OrbitalSim/CameraController.js +31 -0
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.cjs +1 -0
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.d.ts +13 -0
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.js +60 -0
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.module.css.cjs +1 -0
- package/dist/widgets/OrbitalSim/Controls/PlaybackControls.module.css.js +7 -0
- package/dist/widgets/OrbitalSim/Observation.cjs +1 -0
- package/dist/widgets/OrbitalSim/Observation.d.ts +16 -0
- package/dist/widgets/OrbitalSim/Observation.js +60 -0
- package/dist/widgets/OrbitalSim/Observations.cjs +1 -0
- package/dist/widgets/OrbitalSim/Observations.d.ts +16 -0
- package/dist/widgets/OrbitalSim/Observations.js +38 -0
- package/dist/widgets/OrbitalSim/Orbital.cjs +1 -0
- package/dist/widgets/OrbitalSim/Orbital.d.ts +52 -0
- package/dist/widgets/OrbitalSim/Orbital.js +256 -0
- package/dist/widgets/OrbitalSim/OrbitalDetails.cjs +1 -0
- package/dist/widgets/OrbitalSim/OrbitalDetails.d.ts +14 -0
- package/dist/widgets/OrbitalSim/OrbitalDetails.js +56 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.module.css.cjs +1 -0
- package/dist/widgets/OrbitalSim/OrbitalSim.module.css.js +51 -0
- package/dist/widgets/OrbitalSim/Orbitals.cjs +1 -0
- package/dist/widgets/OrbitalSim/Orbitals.d.ts +48 -0
- package/dist/widgets/OrbitalSim/Orbitals.js +147 -0
- package/dist/widgets/OrbitalSim/PlaybackSpeed.cjs +1 -0
- package/dist/widgets/OrbitalSim/PlaybackSpeed.d.ts +16 -0
- package/dist/widgets/OrbitalSim/PlaybackSpeed.js +97 -0
- package/dist/widgets/OrbitalSim/PotentialOrbits.cjs +1 -0
- package/dist/widgets/OrbitalSim/PotentialOrbits.d.ts +16 -0
- package/dist/widgets/OrbitalSim/PotentialOrbits.js +59 -0
- package/dist/widgets/OrbitalSim/Sun.cjs +1 -0
- package/dist/widgets/OrbitalSim/Sun.d.ts +11 -0
- package/dist/widgets/OrbitalSim/Sun.js +35 -0
- package/dist/widgets/OrbitalSim/chartColors.module.css.cjs +1 -0
- package/dist/widgets/OrbitalSim/chartColors.module.css.js +4 -0
- package/dist/widgets/OrbitalSim/index.d.ts +23 -0
- package/dist/widgets/OrbitalSim/orbitalUtilities.cjs +1 -0
- package/dist/widgets/OrbitalSim/orbitalUtilities.d.ts +69 -0
- package/dist/widgets/OrbitalSim/orbitalUtilities.js +142 -0
- package/dist/widgets/SupernovaThreeVector/Histogram/index.d.ts +1 -1
- package/dist/widgets/SupernovaThreeVector/styles.d.ts +8 -0
- package/package.json +11 -3
package/README.MD
CHANGED
|
@@ -22,7 +22,7 @@ After installing the package library, the global styles from `epo-react-lib` wil
|
|
|
22
22
|
|
|
23
23
|
```
|
|
24
24
|
import { GlobalStyles } from "@rubin-epo/epo-react-lib/styles";
|
|
25
|
-
|
|
25
|
+
```
|
|
26
26
|
|
|
27
27
|
### Translations
|
|
28
28
|
|
|
@@ -63,6 +63,9 @@ yarn storybook
|
|
|
63
63
|
|
|
64
64
|
## Test
|
|
65
65
|
|
|
66
|
+
> [!WARNING]
|
|
67
|
+
> This package's Jest config is not setup to use strict ESM, as a result if you add `"type": "module"` to the `package.json` there will be CommonJS/ESM incompatibility errors.
|
|
68
|
+
|
|
66
69
|
Each component in EPO Widget Library contains a Jest unit test. Tests should be co-located with component code and their stories and follow the `**.test.[t|j]sx` naming format.
|
|
67
70
|
|
|
68
71
|
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./widgets/CameraFilter/CameraFilter.cjs");exports.default=e.default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),a=require("react"),e=require("./node_modules/prop-types/index.cjs"),H=require("@react-three/fiber"),J=require("react-i18next"),K=require("./widgets/OrbitalSim/OrbitalDetails.cjs"),Q=require("./widgets/OrbitalSim/CameraController.cjs"),U=require("./widgets/OrbitalSim/Camera.cjs"),W=require("./widgets/OrbitalSim/Orbitals.cjs"),X=require("./widgets/OrbitalSim/Sun.cjs"),Y=require("./widgets/OrbitalSim/PlaybackSpeed.cjs"),$=require("./widgets/OrbitalSim/Controls/PlaybackControls.cjs"),q=require("./widgets/OrbitalSim/OrbitalSim.module.css.cjs");function h({neos:g,activeNeo:C,activeObs:O,selectionCallback:D,paused:n,pov:P,defaultZoom:u,potentialOrbits:m,observations:k,noDetails:T,detailsSet:V,detailsRows:L,refObjs:N,noLabels:R,noControls:z=!1}){const c={min:1157e-8,max:365.25,initial:11.574,step:1},[o,l]=a.useState(!n),[Z,_]=a.useState(null),[w,r]=a.useState(1),[E,S]=a.useState(0),[v,y]=a.useState(n?0:c.initial),[p,d]=a.useState(0),[i,f]=a.useState(0),[j,F]=a.useState(1),{t:x}=J.useTranslation();a.useEffect(()=>{i>0?(y(c.initial),r(1),d(0),f(-1)):i<0&&(d(0),l(!0),f(0))},[i]);const M=s=>{y(+s)},A=()=>{o||r(1),l(!o)},I=()=>{l(s=>!1),f(s=>s+1)},B=s=>{l(!1),r(1),S(b=>b+1)},G=s=>{l(!1),r(-1),S(b=>b+1)};return t.jsx(t.Fragment,{children:t.jsxs("div",{className:q.default.container,children:[!m&&!T&&t.jsx(K.default,{type:V,velocity:Z,rows:L}),!n&&t.jsx(Y.default,{elapsedTime:p,dayPerVizSec:v,speeds:c,sliderOnChangeCallback:M}),!z&&t.jsx($.default,{playing:o,handleStartStop:A,handleNext:B,handlePrevious:G,isDisabled:!1,handleReset:I}),t.jsxs(H.Canvas,{className:q.default["orbital-canvas"],children:[t.jsx(Q.default,{pov:P,reset:i}),t.jsx(U.default,{left:5e3,right:15e3,top:15e3,bottom:-15e3,near:.1,far:3e4,position:[0,0,8e3],defaultZoom:u||1}),t.jsx("ambientLight",{intensity:.9}),t.jsx(W.default,{activeVelocityCallback:_,defaultZoom:u||1,refObjs:N,neos:g,activeNeo:C,activeObs:O,playing:o,stepDirection:w,dayPerVizSec:v,frameOverride:E,potentialOrbits:m,observations:k,selectionCallback:D,elapsedTime:p,setElapsedTime:d,noLabels:R,reset:i,zoomLevel:j,setZoomLevel:F,t:x}),t.jsx(X.default,{zoomLevel:j,defaultZoom:u||1,t:x})]})]})})}h.propTypes={neos:e.default.array,activeNeo:e.default.object,activeObs:e.default.object,selectionCallback:e.default.func,paused:e.default.bool,pov:e.default.string,defaultZoom:e.default.number,potentialOrbits:e.default.bool,observations:e.default.array,noDetails:e.default.bool,noLabels:e.default.bool,detailsSet:e.default.string,detailsRows:e.default.array,refObjs:e.default.array,noControls:e.default.bool};exports.default=h;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as t, Fragment as K, jsxs as g } from "react/jsx-runtime";
|
|
3
|
+
import { useState as o, useEffect as M } from "react";
|
|
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
|
+
};
|
|
145
|
+
export {
|
|
146
|
+
oe as default
|
|
147
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}exports.getDefaultExportFromCjs=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={};exports.__exports=e;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StackContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
|
+
export declare const StackedImage: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
|
|
4
|
+
export declare const StackLoader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('@rubin-epo/epo-react-lib/CircularLoader').CircularLoaderProps, never>> & string & Omit<import('react').FunctionComponent<import('@rubin-epo/epo-react-lib/CircularLoader').CircularLoaderProps>, keyof import('react').Component<any, {}, any>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
export default Span;
|
|
3
|
+
declare function Span({ children }: {
|
|
4
|
+
children: any;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare namespace Span {
|
|
7
|
+
namespace propTypes {
|
|
8
|
+
let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
export default StandardUnit;
|
|
3
|
+
declare function StandardUnit({ type, isSvg }: {
|
|
4
|
+
type: any;
|
|
5
|
+
isSvg: any;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare namespace StandardUnit {
|
|
8
|
+
namespace propTypes {
|
|
9
|
+
let type: PropTypes.Requireable<string>;
|
|
10
|
+
let isSvg: PropTypes.Requireable<boolean>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
export default StellarUnit;
|
|
3
|
+
declare function StellarUnit({ type, isSvg }: {
|
|
4
|
+
type: any;
|
|
5
|
+
isSvg: any;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare namespace StellarUnit {
|
|
8
|
+
namespace propTypes {
|
|
9
|
+
let type: PropTypes.Requireable<string>;
|
|
10
|
+
let isSvg: PropTypes.Requireable<boolean>;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
export default Sub;
|
|
3
|
+
declare function Sub({ children }: {
|
|
4
|
+
children: any;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare namespace Sub {
|
|
7
|
+
namespace propTypes {
|
|
8
|
+
let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
export default SvgSub;
|
|
3
|
+
declare function SvgSub({ children }: {
|
|
4
|
+
children: any;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare namespace SvgSub {
|
|
7
|
+
namespace propTypes {
|
|
8
|
+
let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as PropTypes } from 'prop-types';
|
|
2
|
+
export default TSpan;
|
|
3
|
+
declare function TSpan({ children }: {
|
|
4
|
+
children: any;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare namespace TSpan {
|
|
7
|
+
namespace propTypes {
|
|
8
|
+
let children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export namespace units {
|
|
2
|
+
let hubbleConstant: string;
|
|
3
|
+
let temperature: string;
|
|
4
|
+
let luminosity: string;
|
|
5
|
+
let stellarMass: string;
|
|
6
|
+
let mass: string;
|
|
7
|
+
let lifetime: string;
|
|
8
|
+
let radius: string;
|
|
9
|
+
let count: string;
|
|
10
|
+
let distance: string;
|
|
11
|
+
let velocity: string;
|
|
12
|
+
let velocity_large: string;
|
|
13
|
+
let inclination: string;
|
|
14
|
+
let semimajor_axis: string;
|
|
15
|
+
let moid: string;
|
|
16
|
+
let diameter: string;
|
|
17
|
+
let craterDiameter: string;
|
|
18
|
+
let craterDepth: string;
|
|
19
|
+
let kineticEnergy: string;
|
|
20
|
+
let volume: string;
|
|
21
|
+
let density: string;
|
|
22
|
+
let overPressure: string;
|
|
23
|
+
let observerDistance: string;
|
|
24
|
+
}
|
|
25
|
+
export function renderUnit(type: any): any;
|
package/dist/lib/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("lodash/mergeWith"),g=require("lodash/isNil"),o=t=>t&&t.__esModule?t:{default:t},m=o(d),c=o(g),h=(t,e)=>{switch(!0){case t>e:return 0;case t<0:return e;default:return t}},M=(t,e,r)=>t>=e&&t<=r,p=t=>t[Math.round((t.length-1)/2)],
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("lodash/mergeWith"),g=require("lodash/isNil"),o=t=>t&&t.__esModule?t:{default:t},m=o(d),c=o(g),h=(t,e)=>{switch(!0){case t>e:return 0;case t<0:return e;default:return t}},M=(t,e,r)=>t>=e&&t<=r,p=(t=[],e=[])=>{const r=t[0]<e[0]?t:e,n=r===t?e:t;return r[1]<n[0]?null:[n[0],r[1]<n[1]?r[1]:n[1]]},A=t=>t[Math.round((t.length-1)/2)],S=(t=[0,1],e=[0,1],r)=>{const n={clamp:!1,fractionDigits:2},{clamp:i,fractionDigits:s}={...n,...r};return l=>{const a=t[1]-t[0];if(a===0)return(e[0]+e[1])/2;let u=(l-t[0])/a;return i&&(u=Math.min(Math.max(u,0),1)),Number((u*(e[1]-e[0])+e[0]).toFixed(s))}},_=()=>{const t=navigator.userAgent.indexOf("Chrome")>-1;return navigator.userAgent.indexOf("Safari")>-1&&!t},f=(t,e)=>c.default(e)&&t?c.default(t)?e:t:e,D=(t,e)=>m.default({},e,t,f),b=(t,e=[0,0])=>t.reduce((r,{x:n,y:i},s)=>r+=`${s===0?"M":" L"}${n+e[0]},${i+e[1]}`,"");exports.between=M;exports.buildPath=b;exports.defaultsMerger=f;exports.getClampedArrayIndex=h;exports.getLinearScale=S;exports.intersection=p;exports.isSafari=_;exports.mergeWithDefaults=D;exports.middle=A;
|
package/dist/lib/utils.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import a from "lodash/mergeWith";
|
|
2
|
+
import u from "lodash/isNil";
|
|
3
|
+
const l = (t, e) => {
|
|
4
4
|
switch (!0) {
|
|
5
5
|
case t > e:
|
|
6
6
|
return 0;
|
|
@@ -9,7 +9,10 @@ const d = (t, e) => {
|
|
|
9
9
|
default:
|
|
10
10
|
return t;
|
|
11
11
|
}
|
|
12
|
-
},
|
|
12
|
+
}, d = (t, e, r) => t >= e && t <= r, p = (t = [], e = []) => {
|
|
13
|
+
const r = t[0] < e[0] ? t : e, n = r === t ? e : t;
|
|
14
|
+
return r[1] < n[0] ? null : [n[0], r[1] < n[1] ? r[1] : n[1]];
|
|
15
|
+
}, A = (t) => t[Math.round((t.length - 1) / 2)], M = (t = [0, 1], e = [0, 1], r) => {
|
|
13
16
|
const n = { clamp: !1, fractionDigits: 2 }, { clamp: i, fractionDigits: s } = { ...n, ...r };
|
|
14
17
|
return (f) => {
|
|
15
18
|
const c = t[1] - t[0];
|
|
@@ -20,17 +23,18 @@ const d = (t, e) => {
|
|
|
20
23
|
(o * (e[1] - e[0]) + e[0]).toFixed(s)
|
|
21
24
|
);
|
|
22
25
|
};
|
|
23
|
-
},
|
|
26
|
+
}, x = () => {
|
|
24
27
|
const t = navigator.userAgent.indexOf("Chrome") > -1;
|
|
25
28
|
return navigator.userAgent.indexOf("Safari") > -1 && !t;
|
|
26
|
-
}, m = (t, e) =>
|
|
29
|
+
}, m = (t, e) => u(e) && t ? u(t) ? e : t : e, D = (t, e) => a({}, e, t, m), I = (t, e = [0, 0]) => t.reduce((r, { x: n, y: i }, s) => r += `${s === 0 ? "M" : " L"}${n + e[0]},${i + e[1]}`, "");
|
|
27
30
|
export {
|
|
28
|
-
|
|
31
|
+
d as between,
|
|
29
32
|
I as buildPath,
|
|
30
33
|
m as defaultsMerger,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
l as getClampedArrayIndex,
|
|
35
|
+
M as getLinearScale,
|
|
36
|
+
p as intersection,
|
|
37
|
+
x as isSafari,
|
|
34
38
|
D as mergeWithDefaults,
|
|
35
|
-
|
|
39
|
+
A as middle
|
|
36
40
|
};
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"controls": {
|
|
4
4
|
"backward": "Rewind",
|
|
5
5
|
"forward": "Forward",
|
|
6
|
+
"reset": "Reset",
|
|
6
7
|
"play": "Play",
|
|
7
8
|
"pause": "Pause"
|
|
8
9
|
}
|
|
@@ -20,6 +21,10 @@
|
|
|
20
21
|
"second_other": "Seconds",
|
|
21
22
|
"year_one": "Year",
|
|
22
23
|
"year_other": "Years"
|
|
24
|
+
},
|
|
25
|
+
"interval": {
|
|
26
|
+
"year": "Years",
|
|
27
|
+
"day": "Days"
|
|
23
28
|
}
|
|
24
29
|
},
|
|
25
30
|
"filterTool": {
|
|
@@ -148,5 +153,23 @@
|
|
|
148
153
|
"textValue": "{{value}} magnitude offset"
|
|
149
154
|
}
|
|
150
155
|
}
|
|
156
|
+
},
|
|
157
|
+
"orbital_sim": {
|
|
158
|
+
"astronomy": {
|
|
159
|
+
"orbital_bodies": {
|
|
160
|
+
"sun": "Sun"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"playback": {
|
|
164
|
+
"time_equivalence": "1 sec is 1 year",
|
|
165
|
+
"normal_time": "Normal Time",
|
|
166
|
+
"time_step": "Time Step"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"planets": {
|
|
170
|
+
"jupiter": "Jupiter",
|
|
171
|
+
"earth": "Earth",
|
|
172
|
+
"mars": "Mars",
|
|
173
|
+
"neptune": "Neptune"
|
|
151
174
|
}
|
|
152
175
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../_virtual/_commonjsHelpers.cjs"),l=require("../../_virtual/index3.cjs");/*!
|
|
2
|
+
Copyright (c) 2018 Jed Watson.
|
|
3
|
+
Licensed under the MIT License (MIT), see
|
|
4
|
+
http://jedwatson.github.io/classnames
|
|
5
|
+
*/(function(r){(function(){var c={}.hasOwnProperty;function t(){for(var s=[],n=0;n<arguments.length;n++){var e=arguments[n];if(e){var o=typeof e;if(o==="string"||o==="number")s.push(e);else if(Array.isArray(e)){if(e.length){var u=t.apply(null,e);u&&s.push(u)}}else if(o==="object"){if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]")){s.push(e.toString());continue}for(var i in e)c.call(e,i)&&e[i]&&s.push(i)}}}return s.join(" ")}r.exports?(t.default=t,r.exports=t):window.classNames=t})()})(l.__module);var f=l.__module.exports;const p=a.getDefaultExportFromCjs(f);exports.default=p;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getDefaultExportFromCjs as u } from "../../_virtual/_commonjsHelpers.js";
|
|
2
|
+
import { __module as f } from "../../_virtual/index3.js";
|
|
3
|
+
/*!
|
|
4
|
+
Copyright (c) 2018 Jed Watson.
|
|
5
|
+
Licensed under the MIT License (MIT), see
|
|
6
|
+
http://jedwatson.github.io/classnames
|
|
7
|
+
*/
|
|
8
|
+
(function(r) {
|
|
9
|
+
(function() {
|
|
10
|
+
var l = {}.hasOwnProperty;
|
|
11
|
+
function s() {
|
|
12
|
+
for (var n = [], o = 0; o < arguments.length; o++) {
|
|
13
|
+
var t = arguments[o];
|
|
14
|
+
if (t) {
|
|
15
|
+
var e = typeof t;
|
|
16
|
+
if (e === "string" || e === "number")
|
|
17
|
+
n.push(t);
|
|
18
|
+
else if (Array.isArray(t)) {
|
|
19
|
+
if (t.length) {
|
|
20
|
+
var a = s.apply(null, t);
|
|
21
|
+
a && n.push(a);
|
|
22
|
+
}
|
|
23
|
+
} else if (e === "object") {
|
|
24
|
+
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]")) {
|
|
25
|
+
n.push(t.toString());
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
for (var i in t)
|
|
29
|
+
l.call(t, i) && t[i] && n.push(i);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return n.join(" ");
|
|
34
|
+
}
|
|
35
|
+
r.exports ? (s.default = s, r.exports = s) : window.classNames = s;
|
|
36
|
+
})();
|
|
37
|
+
})(f);
|
|
38
|
+
var c = f.exports;
|
|
39
|
+
const v = /* @__PURE__ */ u(c);
|
|
40
|
+
export {
|
|
41
|
+
v as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/var u,f;function j(){if(f)return u;f=1;var i=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function O(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function g(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var c={},r=0;r<10;r++)c["_"+String.fromCharCode(r)]=r;var a=Object.getOwnPropertyNames(c).map(function(e){return c[e]});if(a.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return u=g()?Object.assign:function(t,c){for(var r,a=O(t),n,e=1;e<arguments.length;e++){r=Object(arguments[e]);for(var s in r)b.call(r,s)&&(a[s]=r[s]);if(i){n=i(r);for(var o=0;o<n.length;o++)l.call(r,n[o])&&(a[n[o]]=r[n[o]])}}return a},u}exports.__require=j;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
var f, i;
|
|
7
|
+
function p() {
|
|
8
|
+
if (i) return f;
|
|
9
|
+
i = 1;
|
|
10
|
+
var u = Object.getOwnPropertySymbols, b = Object.prototype.hasOwnProperty, l = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
function O(n) {
|
|
12
|
+
if (n == null)
|
|
13
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
14
|
+
return Object(n);
|
|
15
|
+
}
|
|
16
|
+
function j() {
|
|
17
|
+
try {
|
|
18
|
+
if (!Object.assign)
|
|
19
|
+
return !1;
|
|
20
|
+
var n = new String("abc");
|
|
21
|
+
if (n[5] = "de", Object.getOwnPropertyNames(n)[0] === "5")
|
|
22
|
+
return !1;
|
|
23
|
+
for (var s = {}, r = 0; r < 10; r++)
|
|
24
|
+
s["_" + String.fromCharCode(r)] = r;
|
|
25
|
+
var a = Object.getOwnPropertyNames(s).map(function(e) {
|
|
26
|
+
return s[e];
|
|
27
|
+
});
|
|
28
|
+
if (a.join("") !== "0123456789")
|
|
29
|
+
return !1;
|
|
30
|
+
var t = {};
|
|
31
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(e) {
|
|
32
|
+
t[e] = e;
|
|
33
|
+
}), Object.keys(Object.assign({}, t)).join("") === "abcdefghijklmnopqrst";
|
|
34
|
+
} catch {
|
|
35
|
+
return !1;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return f = j() ? Object.assign : function(n, s) {
|
|
39
|
+
for (var r, a = O(n), t, e = 1; e < arguments.length; e++) {
|
|
40
|
+
r = Object(arguments[e]);
|
|
41
|
+
for (var c in r)
|
|
42
|
+
b.call(r, c) && (a[c] = r[c]);
|
|
43
|
+
if (u) {
|
|
44
|
+
t = u(r);
|
|
45
|
+
for (var o = 0; o < t.length; o++)
|
|
46
|
+
l.call(r, t[o]) && (a[t[o]] = r[t[o]]);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return a;
|
|
50
|
+
}, f;
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
p as __require
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("./lib/ReactPropTypesSecret.cjs"),_=require("./lib/has.cjs");var u,p;function O(){if(p)return u;p=1;var o=function(){};if(process.env.NODE_ENV!=="production"){var l=E.__require(),a={},y=_.__require();o=function(r){var t="Warning: "+r;typeof console<"u"&&console.error(t);try{throw new Error(t)}catch{}}}function f(r,t,i,s,c){if(process.env.NODE_ENV!=="production"){for(var e in r)if(y(r,e)){var n;try{if(typeof r[e]!="function"){var h=Error((s||"React class")+": "+i+" type `"+e+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[e]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}n=r[e](t,e,s,i,null,l)}catch(d){n=d}if(n&&!(n instanceof Error)&&o((s||"React class")+": type specification of "+i+" `"+e+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof n+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),n instanceof Error&&!(n.message in a)){a[n.message]=!0;var v=c?c():"";o("Failed "+i+" type: "+n.message+(v??""))}}}}return f.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(a={})},u=f,u}exports.__require=O;
|