@rubin-epo/epo-widget-lib 2.0.10 → 2.0.11
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/charts/Readout/index.cjs +1 -1
- package/dist/charts/Readout/index.js +18 -25
- package/dist/charts/ScatterPlot/index.cjs +1 -1
- package/dist/charts/ScatterPlot/index.js +50 -53
- package/dist/localeStrings/en/epo-widget-lib.json +3 -2
- package/dist/localeStrings/es/epo-widget-lib.json +3 -2
- package/dist/localeStrings/fr/epo-widget-lib.json +1 -1
- package/dist/widgets/OrbitalSim/Controls/PlaybackSpeed.cjs +1 -1
- package/dist/widgets/OrbitalSim/Controls/PlaybackSpeed.js +5 -5
- package/dist/widgets/OrbitalSim/Controls/styles.cjs +7 -3
- package/dist/widgets/OrbitalSim/Controls/styles.d.ts +1 -1
- package/dist/widgets/OrbitalSim/Controls/styles.js +9 -5
- package/dist/widgets/OrbitalSim/Orbitals/styles.cjs +1 -1
- package/dist/widgets/OrbitalSim/Orbitals/styles.js +1 -1
- package/dist/widgets/OrbitalSim/styles.cjs +5 -2
- package/dist/widgets/OrbitalSim/styles.js +9 -6
- package/dist/widgets/SupernovaThreeVector/Skymap/index.cjs +1 -1
- package/dist/widgets/SupernovaThreeVector/Skymap/index.js +39 -45
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),u=require("@rubin-epo/epo-react-lib/styles"),o=require("./styles.cjs"),d=require("../ForeignObject/index.cjs"),y=require("../Viewport/index.cjs"),j=(n="")=>{const r=["top","right"],a=["center","center"],s=n?[...n.split(" "),...a].slice(0,2):r,e={justifyContent:null,alignItems:null};return s.forEach(i=>{switch(i){case"center":e.alignItems=e.alignItems??"center",e.justifyContent=e.justifyContent??"center";break;case"top":e.alignItems="start";break;case"right":e.justifyContent="end";break;case"bottom":e.alignItems="end";break;case"left":e.justifyContent="start";break}}),e},c=({className:n,children:r,position:a,viewport:s,forIds:e,forScreenreaders:i})=>{const l=t.jsx(d.default,{children:t.jsx(o.DisplayContainer,{style:j(a),children:t.jsxs(o.Display,{form:Array.isArray(e)?e.join(" "):e,className:n,children:[t.jsx("span",{"aria-hidden":!!i,children:r}),t.jsx(u.ScreenreaderText,{children:i})]})})});return s?t.jsx(y.default,{...s,children:l}):l};c.displayName="Charts.Readout";exports.default=c;
|
|
@@ -1,22 +1,15 @@
|
|
|
1
1
|
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { ScreenreaderText as c } from "@rubin-epo/epo-react-lib/styles";
|
|
3
|
-
import "
|
|
4
|
-
import "../
|
|
5
|
-
import "../
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import "../Bars/index.js";
|
|
9
|
-
import m from "../Viewport/index.js";
|
|
10
|
-
import p from "../ForeignObject/index.js";
|
|
11
|
-
import "../ScatterPlot/index.js";
|
|
12
|
-
import { DisplayContainer as f, Display as u } from "./styles.js";
|
|
13
|
-
const d = (i = "") => {
|
|
14
|
-
const o = ["top", "right"], s = ["center", "center"], r = i ? [...i.split(" "), ...s].slice(0, 2) : o, t = {
|
|
3
|
+
import { DisplayContainer as m, Display as f } from "./styles.js";
|
|
4
|
+
import u from "../ForeignObject/index.js";
|
|
5
|
+
import d from "../Viewport/index.js";
|
|
6
|
+
const p = (n = "") => {
|
|
7
|
+
const s = ["top", "right"], o = ["center", "center"], i = n ? [...n.split(" "), ...o].slice(0, 2) : s, t = {
|
|
15
8
|
justifyContent: null,
|
|
16
9
|
alignItems: null
|
|
17
10
|
};
|
|
18
|
-
return
|
|
19
|
-
switch (
|
|
11
|
+
return i.forEach((r) => {
|
|
12
|
+
switch (r) {
|
|
20
13
|
case "center":
|
|
21
14
|
t.alignItems = t.alignItems ?? "center", t.justifyContent = t.justifyContent ?? "center";
|
|
22
15
|
break;
|
|
@@ -35,25 +28,25 @@ const d = (i = "") => {
|
|
|
35
28
|
}
|
|
36
29
|
}), t;
|
|
37
30
|
}, y = ({
|
|
38
|
-
className:
|
|
39
|
-
children:
|
|
40
|
-
position:
|
|
41
|
-
viewport:
|
|
31
|
+
className: n,
|
|
32
|
+
children: s,
|
|
33
|
+
position: o,
|
|
34
|
+
viewport: i,
|
|
42
35
|
forIds: t,
|
|
43
|
-
forScreenreaders:
|
|
36
|
+
forScreenreaders: r
|
|
44
37
|
}) => {
|
|
45
|
-
const a = /* @__PURE__ */ e(
|
|
46
|
-
|
|
38
|
+
const a = /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(m, { style: p(o), children: /* @__PURE__ */ l(
|
|
39
|
+
f,
|
|
47
40
|
{
|
|
48
41
|
form: Array.isArray(t) ? t.join(" ") : t,
|
|
49
|
-
className:
|
|
42
|
+
className: n,
|
|
50
43
|
children: [
|
|
51
|
-
/* @__PURE__ */ e("span", { "aria-hidden": !!
|
|
52
|
-
/* @__PURE__ */ e(c, { children:
|
|
44
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !!r, children: s }),
|
|
45
|
+
/* @__PURE__ */ e(c, { children: r })
|
|
53
46
|
]
|
|
54
47
|
}
|
|
55
48
|
) }) });
|
|
56
|
-
return
|
|
49
|
+
return i ? /* @__PURE__ */ e(d, { ...i, children: a }) : a;
|
|
57
50
|
};
|
|
58
51
|
y.displayName = "Charts.Readout";
|
|
59
52
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),J=require("react")
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),J=require("react"),$=require("../hooks/useAxis.cjs"),K=require("./styles.cjs"),R=require("../defaults.cjs"),Q=require("../canvas/Points/index.cjs"),U=require("../YAxis/index.cjs"),V=require("../ClippingContainer/index.cjs"),H=require("../Guidelines/index.cjs"),X=require("../XAxis/index.cjs"),Y=require("../Tooltip/index.cjs"),Z=require("../Points/index.cjs"),w={svg:Z.default,canvas:Q.default},M=({data:C,className:D,xAxis:l,yAxis:c,width:d,height:u,title:T,activePointId:p,margins:z,tooltip:a,onLoadedCallback:B,renderer:E="svg",plotChildren:y})=>{const[q,h]=J.useState(),{label:O,points:x}=C,o={...R.default.margins,...z},e=typeof q<"u"?x[q]:x.find(({id:v})=>v===p),f=[0+o.left,d-o.right],b=[u-o.bottom,0+o.top],[r,j,t]=$.default({...l,range:f}),[i,m,s]=$.default({...c,range:b}),S=s(i[0]),g=t(r[0]),I=s(i[1]),_=t(r[1]),k="x-axis-label",L="y-axis-label",N=Math.abs(f[1]-f[0]),W=Math.abs(b[1]-b[0]),F=w[E],P=n.jsx(F,{data:x,onHoverCallback:a?v=>h(v):void 0,onHoverOutCallback:a?()=>h(void 0):void 0,width:d,height:u,xScale:t,yScale:s,label:O,onLoadedCallback:B}),G={Data:P,xScale:t,yScale:s,yStart:S,yEnd:I,xStart:g,xEnd:_,yDomain:i,xDomain:r};return n.jsxs(K.Chart,{verticalLabel:c.label,verticalLabelId:L,horizontalLabel:l.label,horizontalLabelId:k,className:D,width:d,height:u,title:T,children:[n.jsx(U.default,{ticks:m,x:g,labelledById:L,yDomain:i,yScale:s}),n.jsxs(V.default,{x:g,y:I,width:N,height:W,children:[l.guidelines&&n.jsx(H.default,{guides:j.length,direction:"vertical",xDomain:r,yDomain:i,xScale:t,yScale:s}),c.guidelines&&n.jsx(H.default,{guides:m.length,xDomain:r,yDomain:i,xScale:t,yScale:s}),y?y(G):P]}),n.jsx(X.default,{ticks:j,y:S,labelledById:k,xDomain:r,xScale:t}),a&&n.jsxs(Y.default,{x:e?t(e.x):void 0,y:e?s(e.y):void 0,visible:!!e,offset:R.default.pointRadius,children:[e&&typeof a=="function"&&a(e),e&&typeof a=="string"&&a]})]})};M.displayName="Charts.ScatterPlot";exports.default=M;
|
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as u, jsx as
|
|
2
|
+
import { jsxs as u, jsx as i } from "react/jsx-runtime";
|
|
3
3
|
import { useState as F } from "react";
|
|
4
|
-
import "../
|
|
5
|
-
import J from "
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import Q from "../
|
|
9
|
-
import U from "../
|
|
10
|
-
import
|
|
11
|
-
import "../
|
|
12
|
-
import "../
|
|
13
|
-
import
|
|
14
|
-
import { Chart as Z } from "./styles.js";
|
|
15
|
-
import T from "../defaults.js";
|
|
16
|
-
import _ from "../canvas/Points/index.js";
|
|
4
|
+
import R from "../hooks/useAxis.js";
|
|
5
|
+
import { Chart as J } from "./styles.js";
|
|
6
|
+
import D from "../defaults.js";
|
|
7
|
+
import K from "../canvas/Points/index.js";
|
|
8
|
+
import Q from "../YAxis/index.js";
|
|
9
|
+
import U from "../ClippingContainer/index.js";
|
|
10
|
+
import T from "../Guidelines/index.js";
|
|
11
|
+
import V from "../XAxis/index.js";
|
|
12
|
+
import Z from "../Tooltip/index.js";
|
|
13
|
+
import _ from "../Points/index.js";
|
|
17
14
|
const $ = {
|
|
18
|
-
svg:
|
|
19
|
-
canvas:
|
|
15
|
+
svg: _,
|
|
16
|
+
canvas: K
|
|
20
17
|
}, w = ({
|
|
21
18
|
data: j,
|
|
22
19
|
className: z,
|
|
@@ -32,32 +29,32 @@ const $ = {
|
|
|
32
29
|
renderer: G = "svg",
|
|
33
30
|
plotChildren: x
|
|
34
31
|
}) => {
|
|
35
|
-
const [y, h] = F(), { label: N, points: f } = j,
|
|
32
|
+
const [y, h] = F(), { label: N, points: f } = j, r = { ...D.margins, ...M }, t = typeof y < "u" ? f[y] : f.find(({ id: p }) => p === E), b = [0 + r.left, d - r.right], g = [m - r.bottom, 0 + r.top], [s, I, e] = R({ ...l, range: b }), [a, P, o] = R({ ...c, range: g }), S = o(a[0]), v = e(s[0]), k = o(a[1]), O = e(s[1]), C = "x-axis-label", L = "y-axis-label", W = Math.abs(b[1] - b[0]), X = Math.abs(g[1] - g[0]), Y = $[G], H = /* @__PURE__ */ i(
|
|
36
33
|
Y,
|
|
37
34
|
{
|
|
38
35
|
data: f,
|
|
39
|
-
onHoverCallback: n ? (
|
|
36
|
+
onHoverCallback: n ? (p) => h(p) : void 0,
|
|
40
37
|
onHoverOutCallback: n ? () => h(void 0) : void 0,
|
|
41
38
|
width: d,
|
|
42
39
|
height: m,
|
|
43
|
-
xScale:
|
|
44
|
-
yScale:
|
|
40
|
+
xScale: e,
|
|
41
|
+
yScale: o,
|
|
45
42
|
label: N,
|
|
46
43
|
onLoadedCallback: A
|
|
47
44
|
}
|
|
48
45
|
), q = {
|
|
49
46
|
Data: H,
|
|
50
|
-
xScale:
|
|
51
|
-
yScale:
|
|
47
|
+
xScale: e,
|
|
48
|
+
yScale: o,
|
|
52
49
|
yStart: S,
|
|
53
50
|
yEnd: k,
|
|
54
|
-
xStart:
|
|
51
|
+
xStart: v,
|
|
55
52
|
xEnd: O,
|
|
56
|
-
yDomain:
|
|
57
|
-
xDomain:
|
|
53
|
+
yDomain: a,
|
|
54
|
+
xDomain: s
|
|
58
55
|
};
|
|
59
56
|
return /* @__PURE__ */ u(
|
|
60
|
-
|
|
57
|
+
J,
|
|
61
58
|
{
|
|
62
59
|
verticalLabel: c.label,
|
|
63
60
|
verticalLabelId: L,
|
|
@@ -68,66 +65,66 @@ const $ = {
|
|
|
68
65
|
height: m,
|
|
69
66
|
title: B,
|
|
70
67
|
children: [
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
|
|
68
|
+
/* @__PURE__ */ i(
|
|
69
|
+
Q,
|
|
73
70
|
{
|
|
74
71
|
ticks: P,
|
|
75
|
-
x:
|
|
72
|
+
x: v,
|
|
76
73
|
labelledById: L,
|
|
77
|
-
yDomain:
|
|
78
|
-
yScale:
|
|
74
|
+
yDomain: a,
|
|
75
|
+
yScale: o
|
|
79
76
|
}
|
|
80
77
|
),
|
|
81
78
|
/* @__PURE__ */ u(
|
|
82
|
-
|
|
79
|
+
U,
|
|
83
80
|
{
|
|
84
|
-
x:
|
|
81
|
+
x: v,
|
|
85
82
|
y: k,
|
|
86
83
|
width: W,
|
|
87
84
|
height: X,
|
|
88
85
|
children: [
|
|
89
|
-
l.guidelines && /* @__PURE__ */
|
|
90
|
-
|
|
86
|
+
l.guidelines && /* @__PURE__ */ i(
|
|
87
|
+
T,
|
|
91
88
|
{
|
|
92
89
|
guides: I.length,
|
|
93
90
|
direction: "vertical",
|
|
94
|
-
xDomain:
|
|
95
|
-
yDomain:
|
|
96
|
-
xScale:
|
|
97
|
-
yScale:
|
|
91
|
+
xDomain: s,
|
|
92
|
+
yDomain: a,
|
|
93
|
+
xScale: e,
|
|
94
|
+
yScale: o
|
|
98
95
|
}
|
|
99
96
|
),
|
|
100
|
-
c.guidelines && /* @__PURE__ */
|
|
101
|
-
|
|
97
|
+
c.guidelines && /* @__PURE__ */ i(
|
|
98
|
+
T,
|
|
102
99
|
{
|
|
103
100
|
guides: P.length,
|
|
104
|
-
xDomain:
|
|
105
|
-
yDomain:
|
|
106
|
-
xScale:
|
|
107
|
-
yScale:
|
|
101
|
+
xDomain: s,
|
|
102
|
+
yDomain: a,
|
|
103
|
+
xScale: e,
|
|
104
|
+
yScale: o
|
|
108
105
|
}
|
|
109
106
|
),
|
|
110
107
|
x ? x(q) : H
|
|
111
108
|
]
|
|
112
109
|
}
|
|
113
110
|
),
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
|
|
111
|
+
/* @__PURE__ */ i(
|
|
112
|
+
V,
|
|
116
113
|
{
|
|
117
114
|
ticks: I,
|
|
118
115
|
y: S,
|
|
119
116
|
labelledById: C,
|
|
120
|
-
xDomain:
|
|
121
|
-
xScale:
|
|
117
|
+
xDomain: s,
|
|
118
|
+
xScale: e
|
|
122
119
|
}
|
|
123
120
|
),
|
|
124
121
|
n && /* @__PURE__ */ u(
|
|
125
|
-
|
|
122
|
+
Z,
|
|
126
123
|
{
|
|
127
|
-
x: t ?
|
|
128
|
-
y: t ?
|
|
124
|
+
x: t ? e(t.x) : void 0,
|
|
125
|
+
y: t ? o(t.y) : void 0,
|
|
129
126
|
visible: !!t,
|
|
130
|
-
offset:
|
|
127
|
+
offset: D.pointRadius,
|
|
131
128
|
children: [
|
|
132
129
|
t && typeof n == "function" && n(t),
|
|
133
130
|
t && typeof n == "string" && n
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"blinker": {
|
|
3
3
|
"controls": {
|
|
4
|
-
"backward": "
|
|
4
|
+
"backward": "Backward",
|
|
5
5
|
"forward": "Forward",
|
|
6
6
|
"reset": "Reset",
|
|
7
7
|
"play": "Play",
|
|
@@ -66,7 +66,8 @@
|
|
|
66
66
|
"sources": {
|
|
67
67
|
"galaxy": "Galaxy",
|
|
68
68
|
"supernova": "Supernova",
|
|
69
|
-
"observation": "Observation"
|
|
69
|
+
"observation": "Observation",
|
|
70
|
+
"asteroid": "Asteroid"
|
|
70
71
|
}
|
|
71
72
|
},
|
|
72
73
|
"source_selector": {
|
|
@@ -53,7 +53,8 @@
|
|
|
53
53
|
"sources": {
|
|
54
54
|
"galaxy": "Galaxia",
|
|
55
55
|
"supernova": "Supernova",
|
|
56
|
-
"observation": "Observación"
|
|
56
|
+
"observation": "Observación",
|
|
57
|
+
"asteroid": "Asteroide"
|
|
57
58
|
}
|
|
58
59
|
},
|
|
59
60
|
"source_selector": {
|
|
@@ -77,7 +78,7 @@
|
|
|
77
78
|
},
|
|
78
79
|
"blinker": {
|
|
79
80
|
"controls": {
|
|
80
|
-
"backward": "
|
|
81
|
+
"backward": "Hacia atrás",
|
|
81
82
|
"forward": "Adelantar",
|
|
82
83
|
"pause": "Pausar",
|
|
83
84
|
"play": "Reproducir",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime");require("react");const s=require("../../../node_modules/prop-types/index.cjs"),f=require("react-i18next"),h=require("../orbitalUtilities.cjs"),_=require("@rubin-epo/epo-react-lib/HorizontalSlider"),a=require("./styles.cjs"),k=r=>r&&r.__esModule?r:{default:r},S=k(_);function x({dayPerVizSec:r,elapsedTime:
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime");require("react");const s=require("../../../node_modules/prop-types/index.cjs"),f=require("react-i18next"),h=require("../orbitalUtilities.cjs"),_=require("@rubin-epo/epo-react-lib/HorizontalSlider"),a=require("./styles.cjs"),k=r=>r&&r.__esModule?r:{default:r},S=k(_);function x({dayPerVizSec:r,elapsedTime:c,sliderOnChangeCallback:j,speeds:n}){const{t}=f.useTranslation();function l(o,u){const b=c<0,m=Math.abs(c)/365.256,i=Math.floor(m),d=Math.floor(365.256*(m-i));let p={},y={};return p={number:h.formatValue(b?-i:i),string:t("elapsed_time.interval.year",{count:i})},y={number:h.formatValue(b?-d:d),string:t("elapsed_time.interval.day",{count:d})},o==="days"?y[u]:o==="years"?p[u]:null}return e.jsx(e.Fragment,{children:e.jsxs(a.PlaybackSpeedContainer,{children:[e.jsxs(a.PlaybackSpeedSliderHeader,{children:[e.jsx(a.PlaybackSpeedTitle,{children:t("orbital_sim.playback.time_step")}),e.jsx(a.PlaybackSpeedSliderLabel,{children:t("orbital_sim.playback.sec_with_count",{count:Math.round(r)})})]}),e.jsx(a.PlaybackSpeedSliderLabelTop,{children:t("orbital_sim.playback.time_equivalence",{firstTime:t("orbit_viewer.playback.interval.secWithCount",{count:1}),secondTime:t("orbit_viewer.playback.interval.yearWithCount",{count:1}),context:"verbose"})}),e.jsx(a.PlaybackSpeedSliderLabelBottom,{children:t("orbital_sim.playback.normal_time")}),e.jsx(a.PlaybackSpeedSliderWrapper,{children:e.jsx(S.default,{isVertical:!0,min:n.min,invert:!0,max:n.max,step:n.step,value:r,onChangeCallback:j})}),e.jsxs(a.ElapsedTimeContainer,{children:[e.jsx(a.ElapsedTimeTitle,{children:t("elapsed_time.title")}),e.jsxs(a.ElapsedTimeInner,{children:[e.jsxs(a.ElapsedTimeBlock,{children:[e.jsx(a.ElapsedVal,{children:l("years","number")}),e.jsx("div",{children:l("years","string")})]}),e.jsx(a.ElapsedTimeDivider,{}),e.jsxs(a.ElapsedTimeBlock,{children:[e.jsx(a.ElapsedVal,{children:l("days","number")}),e.jsx(a.ElapsedLabel,{children:l("days","string")})]})]})]})]})})}x.propTypes={dayPerVizSec:s.default.number,elapsedTime:s.default.number,speeds:s.default.object,sliderOnChangeCallback:s.default.func};exports.default=x;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as e, Fragment as
|
|
2
|
+
import { jsx as e, Fragment as _, jsxs as a } from "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
4
|
import l from "../../../node_modules/prop-types/index.js";
|
|
5
5
|
import { useTranslation as T } from "react-i18next";
|
|
6
6
|
import { formatValue as h } from "../orbitalUtilities.js";
|
|
7
7
|
import v from "@rubin-epo/epo-react-lib/HorizontalSlider";
|
|
8
|
-
import {
|
|
8
|
+
import { PlaybackSpeedContainer as P, PlaybackSpeedSliderHeader as g, PlaybackSpeedTitle as C, PlaybackSpeedSliderLabel as E, PlaybackSpeedSliderLabelTop as x, PlaybackSpeedSliderLabelBottom as j, PlaybackSpeedSliderWrapper as L, ElapsedTimeContainer as M, ElapsedTimeTitle as w, ElapsedTimeInner as D, ElapsedTimeBlock as f, ElapsedVal as k, ElapsedTimeDivider as V, ElapsedLabel as W } from "./styles.js";
|
|
9
9
|
function B({
|
|
10
10
|
dayPerVizSec: c,
|
|
11
11
|
elapsedTime: s,
|
|
12
|
-
sliderOnChangeCallback:
|
|
12
|
+
sliderOnChangeCallback: S,
|
|
13
13
|
speeds: n
|
|
14
14
|
}) {
|
|
15
15
|
const { t: r } = T();
|
|
@@ -24,7 +24,7 @@ function B({
|
|
|
24
24
|
string: r("elapsed_time.interval.day", { count: o })
|
|
25
25
|
}, d === "days" ? y[m] : d === "years" ? u[m] : null;
|
|
26
26
|
}
|
|
27
|
-
return /* @__PURE__ */ e(
|
|
27
|
+
return /* @__PURE__ */ e(_, { children: /* @__PURE__ */ a(P, { children: [
|
|
28
28
|
/* @__PURE__ */ a(g, { children: [
|
|
29
29
|
/* @__PURE__ */ e(C, { children: r("orbital_sim.playback.time_step") }),
|
|
30
30
|
/* @__PURE__ */ e(E, { children: r("orbital_sim.playback.sec_with_count", {
|
|
@@ -50,7 +50,7 @@ function B({
|
|
|
50
50
|
max: n.max,
|
|
51
51
|
step: n.step,
|
|
52
52
|
value: c,
|
|
53
|
-
onChangeCallback:
|
|
53
|
+
onChangeCallback: S
|
|
54
54
|
}
|
|
55
55
|
) }),
|
|
56
56
|
/* @__PURE__ */ a(M, { children: [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("styled-components"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("styled-components"),i=a=>a&&a.__esModule?a:{default:a},e=i(t),l=e.default.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: repeat(2, 1fr);
|
|
4
4
|
grid-template-rows: repeat(5, 1fr);
|
|
@@ -9,7 +9,11 @@
|
|
|
9
9
|
right: 20px;
|
|
10
10
|
top: 10px;
|
|
11
11
|
height: 95%;
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
@container orbital-sim-context (width < 650px) {
|
|
14
|
+
height: 85%;
|
|
15
|
+
}
|
|
16
|
+
`,r=e.default.div`
|
|
13
17
|
width: auto;
|
|
14
18
|
display: flex;
|
|
15
19
|
position: absolute;
|
|
@@ -117,4 +121,4 @@
|
|
|
117
121
|
line-height: 1.333;
|
|
118
122
|
color: var(--black);
|
|
119
123
|
color: var(--black);
|
|
120
|
-
`;exports.ElapsedLabel=u;exports.ElapsedTimeBlock=x;exports.ElapsedTimeContainer=b;exports.ElapsedTimeDivider=k;exports.ElapsedTimeInner=f;exports.ElapsedTimeTitle=g;exports.ElapsedVal=h;exports.
|
|
124
|
+
`;exports.ElapsedLabel=u;exports.ElapsedTimeBlock=x;exports.ElapsedTimeContainer=b;exports.ElapsedTimeDivider=k;exports.ElapsedTimeInner=f;exports.ElapsedTimeTitle=g;exports.ElapsedVal=h;exports.PlaybackControlsContainer=r;exports.PlaybackSpeedContainer=l;exports.PlaybackSpeedSliderHeader=o;exports.PlaybackSpeedSliderLabel=n;exports.PlaybackSpeedSliderLabelBottom=p;exports.PlaybackSpeedSliderLabelTop=c;exports.PlaybackSpeedSliderWrapper=s;exports.PlaybackSpeedTitle=d;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const PlaybackSpeedContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
2
|
export declare const PlaybackControlsContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
3
|
export declare const PlaybackSpeedSliderHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
4
4
|
export declare const PlaybackSpeedTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, never>> & string;
|
|
@@ -11,6 +11,10 @@ const i = e.div`
|
|
|
11
11
|
right: 20px;
|
|
12
12
|
top: 10px;
|
|
13
13
|
height: 95%;
|
|
14
|
+
|
|
15
|
+
@container orbital-sim-context (width < 650px) {
|
|
16
|
+
height: 85%;
|
|
17
|
+
}
|
|
14
18
|
`, a = e.div`
|
|
15
19
|
width: auto;
|
|
16
20
|
display: flex;
|
|
@@ -20,7 +24,7 @@ const i = e.div`
|
|
|
20
24
|
transform: translateX(-50%);
|
|
21
25
|
z-index: 2;
|
|
22
26
|
font-size: 17px;
|
|
23
|
-
`,
|
|
27
|
+
`, t = e.div`
|
|
24
28
|
z-index: 2;
|
|
25
29
|
padding: 5px;
|
|
26
30
|
text-align: center;
|
|
@@ -29,7 +33,7 @@ const i = e.div`
|
|
|
29
33
|
border-radius: 10px;
|
|
30
34
|
grid-area: 1 / 1 / 2 / 3;
|
|
31
35
|
height: fit-content;
|
|
32
|
-
`,
|
|
36
|
+
`, o = e.h4`
|
|
33
37
|
font-size: 18px;
|
|
34
38
|
font-weight: var(--regular);
|
|
35
39
|
line-height: 1.5;
|
|
@@ -128,12 +132,12 @@ export {
|
|
|
128
132
|
b as ElapsedTimeInner,
|
|
129
133
|
s as ElapsedTimeTitle,
|
|
130
134
|
x as ElapsedVal,
|
|
131
|
-
i as PlaybackContainer,
|
|
132
135
|
a as PlaybackControlsContainer,
|
|
133
|
-
|
|
136
|
+
i as PlaybackSpeedContainer,
|
|
137
|
+
t as PlaybackSpeedSliderHeader,
|
|
134
138
|
l as PlaybackSpeedSliderLabel,
|
|
135
139
|
d as PlaybackSpeedSliderLabelBottom,
|
|
136
140
|
n as PlaybackSpeedSliderLabelTop,
|
|
137
141
|
c as PlaybackSpeedSliderWrapper,
|
|
138
|
-
|
|
142
|
+
o as PlaybackSpeedTitle
|
|
139
143
|
};
|
|
@@ -39,6 +39,8 @@
|
|
|
39
39
|
min-height: 500px;
|
|
40
40
|
background-color: #000000;
|
|
41
41
|
color-adjust: exact;
|
|
42
|
+
container-type: size;
|
|
43
|
+
container-name: orbital-sim-context;
|
|
42
44
|
`,n=e.default(r.Canvas)`
|
|
43
45
|
position: relative;
|
|
44
46
|
z-index: 1;
|
|
@@ -61,10 +63,11 @@
|
|
|
61
63
|
z-index: 10;
|
|
62
64
|
background-color: #fff;
|
|
63
65
|
width: 10%;
|
|
66
|
+
min-width: fit-content;
|
|
64
67
|
height: 100%;
|
|
65
68
|
display: flex;
|
|
66
69
|
flex-direction: column;
|
|
67
|
-
`,
|
|
70
|
+
`,c=e.default.button`
|
|
68
71
|
width: 100%;
|
|
69
72
|
padding: 12px 16px;
|
|
70
73
|
text-align: left;
|
|
@@ -81,4 +84,4 @@
|
|
|
81
84
|
background-color: #017F80;
|
|
82
85
|
color: #fff;
|
|
83
86
|
}
|
|
84
|
-
`;exports.CanvasWrapper=n;exports.GlobalStyles=o;exports.OrbitalSimWrapper=l;exports.SunLabel=d;exports.SwappableOrbitButton=
|
|
87
|
+
`;exports.CanvasWrapper=n;exports.GlobalStyles=o;exports.OrbitalSimWrapper=l;exports.SunLabel=d;exports.SwappableOrbitButton=c;exports.SwappableOrbitsContainer=s;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import e, { createGlobalStyle as t } from "styled-components";
|
|
3
3
|
import { Canvas as a } from "@react-three/fiber";
|
|
4
|
-
const
|
|
4
|
+
const o = t`
|
|
5
5
|
:root {
|
|
6
6
|
--white: #ffffff;
|
|
7
7
|
--black: #000000;
|
|
@@ -35,14 +35,16 @@ const i = t`
|
|
|
35
35
|
--headingWithSpaceHeight: 90px;
|
|
36
36
|
--tallestSquareWidget: calc(100vh - var(--pageNavHeight) - var(--siteHeaderHeight) - var(--headingWithSpaceHeight) - var(--minPadding));
|
|
37
37
|
}
|
|
38
|
-
`,
|
|
38
|
+
`, n = e.div`
|
|
39
39
|
position: relative;
|
|
40
40
|
overflow: hidden;
|
|
41
41
|
height: var(--tallestSquareWidget);
|
|
42
42
|
min-height: 500px;
|
|
43
43
|
background-color: #000000;
|
|
44
44
|
color-adjust: exact;
|
|
45
|
-
|
|
45
|
+
container-type: size;
|
|
46
|
+
container-name: orbital-sim-context;
|
|
47
|
+
`, l = e(a)`
|
|
46
48
|
position: relative;
|
|
47
49
|
z-index: 1;
|
|
48
50
|
`, d = e.div`
|
|
@@ -64,6 +66,7 @@ const i = t`
|
|
|
64
66
|
z-index: 10;
|
|
65
67
|
background-color: #fff;
|
|
66
68
|
width: 10%;
|
|
69
|
+
min-width: fit-content;
|
|
67
70
|
height: 100%;
|
|
68
71
|
display: flex;
|
|
69
72
|
flex-direction: column;
|
|
@@ -86,9 +89,9 @@ const i = t`
|
|
|
86
89
|
}
|
|
87
90
|
`;
|
|
88
91
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
l as CanvasWrapper,
|
|
93
|
+
o as GlobalStyles,
|
|
94
|
+
n as OrbitalSimWrapper,
|
|
92
95
|
d as SunLabel,
|
|
93
96
|
p as SwappableOrbitButton,
|
|
94
97
|
c as SwappableOrbitsContainer
|
|
@@ -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"),S=require("react"),_=require("d3-geo-projection"),M=require("d3-geo"),q=require("d3-array"),E=require("../../../atomic/ImageStack/index.cjs"),a=require("./styles.cjs"),N=require("../../../charts/Base/index.cjs"),U=require("../../../charts/Tooltip/index.cjs"),y=({className:L,objects:p=[],images:v=[],visibleImages:w=[],describedById:G})=>{const[O,P]=S.useState(!1),[x,f]=S.useState(),l=600,c=300,n={top:20,right:0,bottom:20,left:20},W=l+n.right+n.left,$=c+n.top+n.bottom,d=15,u=30,j=-90,m=90,g=-180,k=180,h=2,i=_.geoAitoff(),s=M.geoGraticule();s.step([u,d]),s.extent([[g,j],[k,m]]),i.fitExtent([[n.left,n.top],[n.left+l-h,n.top+c]],s.outline());const B=q.range(j+d,m,d),A=q.range(g+u,k,u),C=M.geoPath(i).pointRadius(6),r=t=>C(t)||void 0,o=typeof x<"u"?p[x]:void 0,b=(o?i([o==null?void 0:o.long,o==null?void 0:o.lat]):[0,0])||[0,0];return e.jsxs(N.default,{width:W,height:$,className:L,children:[e.jsx("mask",{id:"imageMask",children:e.jsx("path",{d:r(s.outline()),fill:"white"})}),e.jsx(a.Background,{d:r(s.outline())}),e.jsx(a.Graticule,{d:r(s())}),e.jsx(a.ImageStackerWrapper,{style:{"--image-stack-opacity":O&&1},x:n.left,y:n.top,width:l-h,height:c,mask:"url(#imageMask)",children:e.jsx(E.default,{images:v,describedById:G,visible:w,loadCallback:()=>P(!0),showBackdrop:!1,showLoader:!1})}),e.jsx("g",{children:p.map(({id:t,lat:H,long:R},T)=>e.jsx(a.UserObject,{d:r({type:"Point",coordinates:[R,H]}),onMouseOver:()=>f(T),onMouseOut:()=>f(void 0)},t))}),e.jsx("g",{"aria-hidden":"true",children:B.map(t=>t===0?null:e.jsxs(a.LatLabel,{style:{dominantBaseline:t>0?"text-after-edge":"text-before-edge"},transform:`translate(${i([g,t])})`,children:[t,"°"]},t))}),e.jsx("g",{"aria-hidden":"true",children:A.map(t=>e.jsxs(a.LongLabel,{transform:`translate(${i([t,0])})`,children:[t,"°"]},t))}),e.jsx(a.Outline,{strokeWidth:h,d:r(s.outline())}),e.jsx(U.default,{visible:!!o,x:b[0],y:b[1],children:o==null?void 0:o.id})]})};y.displayName="Widgets.SupernovaThreeVector.Skymap";exports.default=y;
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as h, jsx as
|
|
2
|
+
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import { useState as L } from "react";
|
|
4
4
|
import { geoAitoff as E } from "d3-geo-projection";
|
|
5
5
|
import { geoGraticule as N, geoPath as R } from "d3-geo";
|
|
6
6
|
import { range as M } from "d3-array";
|
|
7
|
-
import U from "../../../
|
|
8
|
-
import "
|
|
9
|
-
import "../../../charts/
|
|
10
|
-
import "../../../charts/
|
|
11
|
-
import V from "../../../charts/Tooltip/index.js";
|
|
12
|
-
import "../../../charts/Bars/index.js";
|
|
13
|
-
import "../../../charts/Viewport/index.js";
|
|
14
|
-
import "../../../charts/ScatterPlot/index.js";
|
|
15
|
-
import q from "../../../atomic/ImageStack/index.js";
|
|
16
|
-
import { Background as z, Graticule as D, ImageStackerWrapper as F, UserObject as J, LatLabel as K, LongLabel as Q, Outline as X } from "./styles.js";
|
|
7
|
+
import U from "../../../atomic/ImageStack/index.js";
|
|
8
|
+
import { Background as V, Graticule as q, ImageStackerWrapper as z, UserObject as D, LatLabel as F, LongLabel as J, Outline as K } from "./styles.js";
|
|
9
|
+
import Q from "../../../charts/Base/index.js";
|
|
10
|
+
import X from "../../../charts/Tooltip/index.js";
|
|
17
11
|
const Y = ({
|
|
18
12
|
className: y,
|
|
19
13
|
objects: g = [],
|
|
@@ -21,38 +15,38 @@ const Y = ({
|
|
|
21
15
|
visibleImages: w = [],
|
|
22
16
|
describedById: B
|
|
23
17
|
}) => {
|
|
24
|
-
const [O, W] = L(!1), [f, u] = L(), s = 600, l = 300,
|
|
18
|
+
const [O, W] = L(!1), [f, u] = L(), s = 600, l = 300, a = {
|
|
25
19
|
top: 20,
|
|
26
20
|
right: 0,
|
|
27
21
|
bottom: 20,
|
|
28
22
|
left: 20
|
|
29
|
-
}, j = s +
|
|
30
|
-
|
|
23
|
+
}, j = s + a.right + a.left, C = l + a.top + a.bottom, c = 15, d = 30, k = -90, x = 90, p = -180, b = 180, m = 2, i = E(), n = N();
|
|
24
|
+
n.step([d, c]), n.extent([
|
|
31
25
|
[p, k],
|
|
32
26
|
[b, x]
|
|
33
|
-
]),
|
|
27
|
+
]), i.fitExtent(
|
|
34
28
|
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
29
|
+
[a.left, a.top],
|
|
30
|
+
[a.left + s - m, a.top + l]
|
|
37
31
|
],
|
|
38
|
-
|
|
32
|
+
n.outline()
|
|
39
33
|
);
|
|
40
|
-
const G = M(k + c, x, c), H = M(p + d, b, d), P = R(
|
|
41
|
-
return /* @__PURE__ */ h(
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
34
|
+
const G = M(k + c, x, c), H = M(p + d, b, d), P = R(i).pointRadius(6), r = (t) => P(t) || void 0, o = typeof f < "u" ? g[f] : void 0, S = (o ? i([o == null ? void 0 : o.long, o == null ? void 0 : o.lat]) : [0, 0]) || [0, 0];
|
|
35
|
+
return /* @__PURE__ */ h(Q, { width: j, height: C, className: y, children: [
|
|
36
|
+
/* @__PURE__ */ e("mask", { id: "imageMask", children: /* @__PURE__ */ e("path", { d: r(n.outline()), fill: "white" }) }),
|
|
37
|
+
/* @__PURE__ */ e(V, { d: r(n.outline()) }),
|
|
38
|
+
/* @__PURE__ */ e(q, { d: r(n()) }),
|
|
39
|
+
/* @__PURE__ */ e(
|
|
40
|
+
z,
|
|
47
41
|
{
|
|
48
42
|
style: { "--image-stack-opacity": O && 1 },
|
|
49
|
-
x:
|
|
50
|
-
y:
|
|
43
|
+
x: a.left,
|
|
44
|
+
y: a.top,
|
|
51
45
|
width: s - m,
|
|
52
46
|
height: l,
|
|
53
47
|
mask: "url(#imageMask)",
|
|
54
|
-
children: /* @__PURE__ */
|
|
55
|
-
|
|
48
|
+
children: /* @__PURE__ */ e(
|
|
49
|
+
U,
|
|
56
50
|
{
|
|
57
51
|
images: v,
|
|
58
52
|
describedById: B,
|
|
@@ -64,10 +58,10 @@ const Y = ({
|
|
|
64
58
|
)
|
|
65
59
|
}
|
|
66
60
|
),
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
|
|
61
|
+
/* @__PURE__ */ e("g", { children: g.map(({ id: t, lat: T, long: $ }, A) => /* @__PURE__ */ e(
|
|
62
|
+
D,
|
|
69
63
|
{
|
|
70
|
-
d:
|
|
64
|
+
d: r({
|
|
71
65
|
type: "Point",
|
|
72
66
|
coordinates: [$, T]
|
|
73
67
|
}),
|
|
@@ -76,14 +70,14 @@ const Y = ({
|
|
|
76
70
|
},
|
|
77
71
|
t
|
|
78
72
|
)) }),
|
|
79
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ e("g", { "aria-hidden": "true", children: G.map(
|
|
80
74
|
(t) => t === 0 ? null : /* @__PURE__ */ h(
|
|
81
|
-
|
|
75
|
+
F,
|
|
82
76
|
{
|
|
83
77
|
style: {
|
|
84
78
|
dominantBaseline: t > 0 ? "text-after-edge" : "text-before-edge"
|
|
85
79
|
},
|
|
86
|
-
transform: `translate(${
|
|
80
|
+
transform: `translate(${i([p, t])})`,
|
|
87
81
|
children: [
|
|
88
82
|
t,
|
|
89
83
|
"°"
|
|
@@ -92,10 +86,10 @@ const Y = ({
|
|
|
92
86
|
t
|
|
93
87
|
)
|
|
94
88
|
) }),
|
|
95
|
-
/* @__PURE__ */
|
|
96
|
-
|
|
89
|
+
/* @__PURE__ */ e("g", { "aria-hidden": "true", children: H.map((t) => /* @__PURE__ */ h(
|
|
90
|
+
J,
|
|
97
91
|
{
|
|
98
|
-
transform: `translate(${
|
|
92
|
+
transform: `translate(${i([t, 0])})`,
|
|
99
93
|
children: [
|
|
100
94
|
t,
|
|
101
95
|
"°"
|
|
@@ -103,20 +97,20 @@ const Y = ({
|
|
|
103
97
|
},
|
|
104
98
|
t
|
|
105
99
|
)) }),
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
|
|
100
|
+
/* @__PURE__ */ e(
|
|
101
|
+
K,
|
|
108
102
|
{
|
|
109
103
|
strokeWidth: m,
|
|
110
|
-
d: n
|
|
104
|
+
d: r(n.outline())
|
|
111
105
|
}
|
|
112
106
|
),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
|
|
107
|
+
/* @__PURE__ */ e(
|
|
108
|
+
X,
|
|
115
109
|
{
|
|
116
|
-
visible: !!
|
|
110
|
+
visible: !!o,
|
|
117
111
|
x: S[0],
|
|
118
112
|
y: S[1],
|
|
119
|
-
children:
|
|
113
|
+
children: o == null ? void 0 : o.id
|
|
120
114
|
}
|
|
121
115
|
)
|
|
122
116
|
] });
|
package/package.json
CHANGED