@rubin-epo/epo-widget-lib 2.0.0 → 2.0.2
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 +25 -18
- package/dist/charts/ScatterPlot/index.cjs +1 -1
- package/dist/charts/ScatterPlot/index.js +53 -50
- package/dist/widgets/OrbitalSim/Controls/PlaybackSpeed.cjs +1 -1
- package/dist/widgets/OrbitalSim/Controls/PlaybackSpeed.js +26 -26
- package/dist/widgets/OrbitalSim/Controls/styles.cjs +30 -13
- package/dist/widgets/OrbitalSim/Controls/styles.d.ts +2 -1
- package/dist/widgets/OrbitalSim/Controls/styles.js +37 -19
- package/dist/widgets/SupernovaThreeVector/Skymap/index.cjs +1 -1
- package/dist/widgets/SupernovaThreeVector/Skymap/index.js +45 -39
- package/package.json +2 -2
|
@@ -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"),c=require("@rubin-epo/epo-react-lib/styles");require("../Base/index.cjs");require("../XAxis/index.cjs");require("../YAxis/index.cjs");require("../Guidelines/index.cjs");require("../Tooltip/index.cjs");require("../Bars/index.cjs");const d=require("../Viewport/index.cjs"),y=require("../ForeignObject/index.cjs");require("../ScatterPlot/index.cjs");const o=require("./styles.cjs"),j=(r="")=>{const i=["top","right"],a=["center","center"],n=r?[...r.split(" "),...a].slice(0,2):i,e={justifyContent:null,alignItems:null};return n.forEach(s=>{switch(s){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},u=({className:r,children:i,position:a,viewport:n,forIds:e,forScreenreaders:s})=>{const l=t.jsx(y.default,{children:t.jsx(o.DisplayContainer,{style:j(a),children:t.jsxs(o.Display,{form:Array.isArray(e)?e.join(" "):e,className:r,children:[t.jsx("span",{"aria-hidden":!!s,children:i}),t.jsx(c.ScreenreaderText,{children:s})]})})});return n?t.jsx(d.default,{...n,children:l}):l};u.displayName="Charts.Readout";exports.default=u;
|
|
@@ -1,15 +1,22 @@
|
|
|
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
|
-
|
|
3
|
+
import "../Base/index.js";
|
|
4
|
+
import "../XAxis/index.js";
|
|
5
|
+
import "../YAxis/index.js";
|
|
6
|
+
import "../Guidelines/index.js";
|
|
7
|
+
import "../Tooltip/index.js";
|
|
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 = {
|
|
8
15
|
justifyContent: null,
|
|
9
16
|
alignItems: null
|
|
10
17
|
};
|
|
11
|
-
return
|
|
12
|
-
switch (
|
|
18
|
+
return r.forEach((n) => {
|
|
19
|
+
switch (n) {
|
|
13
20
|
case "center":
|
|
14
21
|
t.alignItems = t.alignItems ?? "center", t.justifyContent = t.justifyContent ?? "center";
|
|
15
22
|
break;
|
|
@@ -28,25 +35,25 @@ const p = (n = "") => {
|
|
|
28
35
|
}
|
|
29
36
|
}), t;
|
|
30
37
|
}, y = ({
|
|
31
|
-
className:
|
|
32
|
-
children:
|
|
33
|
-
position:
|
|
34
|
-
viewport:
|
|
38
|
+
className: i,
|
|
39
|
+
children: o,
|
|
40
|
+
position: s,
|
|
41
|
+
viewport: r,
|
|
35
42
|
forIds: t,
|
|
36
|
-
forScreenreaders:
|
|
43
|
+
forScreenreaders: n
|
|
37
44
|
}) => {
|
|
38
|
-
const a = /* @__PURE__ */ e(
|
|
39
|
-
|
|
45
|
+
const a = /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(f, { style: d(s), children: /* @__PURE__ */ l(
|
|
46
|
+
u,
|
|
40
47
|
{
|
|
41
48
|
form: Array.isArray(t) ? t.join(" ") : t,
|
|
42
|
-
className:
|
|
49
|
+
className: i,
|
|
43
50
|
children: [
|
|
44
|
-
/* @__PURE__ */ e("span", { "aria-hidden": !!
|
|
45
|
-
/* @__PURE__ */ e(c, { children:
|
|
51
|
+
/* @__PURE__ */ e("span", { "aria-hidden": !!n, children: o }),
|
|
52
|
+
/* @__PURE__ */ e(c, { children: n })
|
|
46
53
|
]
|
|
47
54
|
}
|
|
48
55
|
) }) });
|
|
49
|
-
return
|
|
56
|
+
return r ? /* @__PURE__ */ e(m, { ...r, children: a }) : a;
|
|
50
57
|
};
|
|
51
58
|
y.displayName = "Charts.Readout";
|
|
52
59
|
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("../Base/index.cjs");const K=require("../XAxis/index.cjs"),Q=require("../YAxis/index.cjs"),$=require("../Guidelines/index.cjs"),U=require("../Points/index.cjs"),V=require("../Tooltip/index.cjs"),X=require("../ClippingContainer/index.cjs");require("../Bars/index.cjs");require("../Viewport/index.cjs");const R=require("../hooks/useAxis.cjs"),Y=require("./styles.cjs"),H=require("../defaults.cjs"),Z=require("../canvas/Points/index.cjs"),w={svg:U.default,canvas:Z.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={...H.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]=R.default({...l,range:f}),[i,m,s]=R.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(Y.Chart,{verticalLabel:c.label,verticalLabelId:L,horizontalLabel:l.label,horizontalLabelId:k,className:D,width:d,height:u,title:T,children:[n.jsx(Q.default,{ticks:m,x:g,labelledById:L,yDomain:i,yScale:s}),n.jsxs(X.default,{x:g,y:I,width:N,height:W,children:[l.guidelines&&n.jsx($.default,{guides:j.length,direction:"vertical",xDomain:r,yDomain:i,xScale:t,yScale:s}),c.guidelines&&n.jsx($.default,{guides:m.length,xDomain:r,yDomain:i,xScale:t,yScale:s}),y?y(G):P]}),n.jsx(K.default,{ticks:j,y:S,labelledById:k,xDomain:r,xScale:t}),a&&n.jsxs(V.default,{x:e?t(e.x):void 0,y:e?s(e.y):void 0,visible:!!e,offset:H.default.pointRadius,children:[e&&typeof a=="function"&&a(e),e&&typeof a=="string"&&a]})]})};M.displayName="Charts.ScatterPlot";exports.default=M;
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as u, jsx as
|
|
2
|
+
import { jsxs as u, jsx as s } from "react/jsx-runtime";
|
|
3
3
|
import { useState as F } from "react";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import Q from "../
|
|
9
|
-
import U from "../
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
4
|
+
import "../Base/index.js";
|
|
5
|
+
import J from "../XAxis/index.js";
|
|
6
|
+
import K from "../YAxis/index.js";
|
|
7
|
+
import R from "../Guidelines/index.js";
|
|
8
|
+
import Q from "../Points/index.js";
|
|
9
|
+
import U from "../Tooltip/index.js";
|
|
10
|
+
import V from "../ClippingContainer/index.js";
|
|
11
|
+
import "../Bars/index.js";
|
|
12
|
+
import "../Viewport/index.js";
|
|
13
|
+
import D from "../hooks/useAxis.js";
|
|
14
|
+
import { Chart as Z } from "./styles.js";
|
|
15
|
+
import T from "../defaults.js";
|
|
16
|
+
import _ from "../canvas/Points/index.js";
|
|
14
17
|
const $ = {
|
|
15
|
-
svg:
|
|
16
|
-
canvas:
|
|
18
|
+
svg: Q,
|
|
19
|
+
canvas: _
|
|
17
20
|
}, w = ({
|
|
18
21
|
data: j,
|
|
19
22
|
className: z,
|
|
@@ -29,32 +32,32 @@ const $ = {
|
|
|
29
32
|
renderer: G = "svg",
|
|
30
33
|
plotChildren: x
|
|
31
34
|
}) => {
|
|
32
|
-
const [y, h] = F(), { label: N, points: f } = j,
|
|
35
|
+
const [y, h] = F(), { label: N, points: f } = j, a = { ...T.margins, ...M }, t = typeof y < "u" ? f[y] : f.find(({ id: v }) => v === E), p = [0 + a.left, d - a.right], b = [m - a.bottom, 0 + a.top], [i, I, o] = D({ ...l, range: p }), [r, P, e] = D({ ...c, range: b }), S = e(r[0]), g = o(i[0]), k = e(r[1]), O = o(i[1]), C = "x-axis-label", L = "y-axis-label", W = Math.abs(p[1] - p[0]), X = Math.abs(b[1] - b[0]), Y = $[G], H = /* @__PURE__ */ s(
|
|
33
36
|
Y,
|
|
34
37
|
{
|
|
35
38
|
data: f,
|
|
36
|
-
onHoverCallback: n ? (
|
|
39
|
+
onHoverCallback: n ? (v) => h(v) : void 0,
|
|
37
40
|
onHoverOutCallback: n ? () => h(void 0) : void 0,
|
|
38
41
|
width: d,
|
|
39
42
|
height: m,
|
|
40
|
-
xScale:
|
|
41
|
-
yScale:
|
|
43
|
+
xScale: o,
|
|
44
|
+
yScale: e,
|
|
42
45
|
label: N,
|
|
43
46
|
onLoadedCallback: A
|
|
44
47
|
}
|
|
45
48
|
), q = {
|
|
46
49
|
Data: H,
|
|
47
|
-
xScale:
|
|
48
|
-
yScale:
|
|
50
|
+
xScale: o,
|
|
51
|
+
yScale: e,
|
|
49
52
|
yStart: S,
|
|
50
53
|
yEnd: k,
|
|
51
|
-
xStart:
|
|
54
|
+
xStart: g,
|
|
52
55
|
xEnd: O,
|
|
53
|
-
yDomain:
|
|
54
|
-
xDomain:
|
|
56
|
+
yDomain: r,
|
|
57
|
+
xDomain: i
|
|
55
58
|
};
|
|
56
59
|
return /* @__PURE__ */ u(
|
|
57
|
-
|
|
60
|
+
Z,
|
|
58
61
|
{
|
|
59
62
|
verticalLabel: c.label,
|
|
60
63
|
verticalLabelId: L,
|
|
@@ -65,66 +68,66 @@ const $ = {
|
|
|
65
68
|
height: m,
|
|
66
69
|
title: B,
|
|
67
70
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
|
|
71
|
+
/* @__PURE__ */ s(
|
|
72
|
+
K,
|
|
70
73
|
{
|
|
71
74
|
ticks: P,
|
|
72
|
-
x:
|
|
75
|
+
x: g,
|
|
73
76
|
labelledById: L,
|
|
74
|
-
yDomain:
|
|
75
|
-
yScale:
|
|
77
|
+
yDomain: r,
|
|
78
|
+
yScale: e
|
|
76
79
|
}
|
|
77
80
|
),
|
|
78
81
|
/* @__PURE__ */ u(
|
|
79
|
-
|
|
82
|
+
V,
|
|
80
83
|
{
|
|
81
|
-
x:
|
|
84
|
+
x: g,
|
|
82
85
|
y: k,
|
|
83
86
|
width: W,
|
|
84
87
|
height: X,
|
|
85
88
|
children: [
|
|
86
|
-
l.guidelines && /* @__PURE__ */
|
|
87
|
-
|
|
89
|
+
l.guidelines && /* @__PURE__ */ s(
|
|
90
|
+
R,
|
|
88
91
|
{
|
|
89
92
|
guides: I.length,
|
|
90
93
|
direction: "vertical",
|
|
91
|
-
xDomain:
|
|
92
|
-
yDomain:
|
|
93
|
-
xScale:
|
|
94
|
-
yScale:
|
|
94
|
+
xDomain: i,
|
|
95
|
+
yDomain: r,
|
|
96
|
+
xScale: o,
|
|
97
|
+
yScale: e
|
|
95
98
|
}
|
|
96
99
|
),
|
|
97
|
-
c.guidelines && /* @__PURE__ */
|
|
98
|
-
|
|
100
|
+
c.guidelines && /* @__PURE__ */ s(
|
|
101
|
+
R,
|
|
99
102
|
{
|
|
100
103
|
guides: P.length,
|
|
101
|
-
xDomain:
|
|
102
|
-
yDomain:
|
|
103
|
-
xScale:
|
|
104
|
-
yScale:
|
|
104
|
+
xDomain: i,
|
|
105
|
+
yDomain: r,
|
|
106
|
+
xScale: o,
|
|
107
|
+
yScale: e
|
|
105
108
|
}
|
|
106
109
|
),
|
|
107
110
|
x ? x(q) : H
|
|
108
111
|
]
|
|
109
112
|
}
|
|
110
113
|
),
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
-
|
|
114
|
+
/* @__PURE__ */ s(
|
|
115
|
+
J,
|
|
113
116
|
{
|
|
114
117
|
ticks: I,
|
|
115
118
|
y: S,
|
|
116
119
|
labelledById: C,
|
|
117
|
-
xDomain:
|
|
118
|
-
xScale:
|
|
120
|
+
xDomain: i,
|
|
121
|
+
xScale: o
|
|
119
122
|
}
|
|
120
123
|
),
|
|
121
124
|
n && /* @__PURE__ */ u(
|
|
122
|
-
|
|
125
|
+
U,
|
|
123
126
|
{
|
|
124
|
-
x: t ?
|
|
125
|
-
y: t ?
|
|
127
|
+
x: t ? o(t.x) : void 0,
|
|
128
|
+
y: t ? e(t.y) : void 0,
|
|
126
129
|
visible: !!t,
|
|
127
|
-
offset:
|
|
130
|
+
offset: T.pointRadius,
|
|
128
131
|
children: [
|
|
129
132
|
t && typeof n == "function" && n(t),
|
|
130
133
|
t && typeof n == "string" && n
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),v=require("react"),u=require("../../../node_modules/prop-types/index.cjs"),k=require("react-i18next"),m=require("../orbitalUtilities.cjs"),S=require("@rubin-epo/epo-react-lib/HorizontalSlider"),t=require("./styles.cjs"),T=a=>a&&a.__esModule?a:{default:a},g=T(S);function h({dayPerVizSec:a,elapsedTime:p,sliderOnChangeCallback:j,speeds:b}){const{t:r}=k.useTranslation();function x(d){const o=d/365,l=Math.floor(o),s=365*(o-l);let i={},n={};return i={number:m.formatValue(l),string:r("elapsed_time.interval.year",{count:l})},n={number:m.formatValue(s),string:r("elapsed_time.interval.day",{count:s})},l>=1?`${i.number} ${i.string}`:s<1?r("orbit_viewer.playback.interval.secWithCount",{count:1}):`${n.number} ${n.string}`}function c(d,o){const l=p<0,s=Math.abs(p)/365.256,i=Math.floor(s),n=Math.floor(365.256*(s-i));let f={},y={};return f={number:m.formatValue(l?-i:i),string:r("elapsed_time.interval.year",{count:i})},y={number:m.formatValue(l?-n:n),string:r("elapsed_time.interval.day",{count:n})},d==="days"?y[o]:d==="years"?f[o]:null}const _=v.useMemo(()=>x(a),[a]);return e.jsxs(e.Fragment,{children:[e.jsxs(t.PlaybackSpeedSliderHeader,{children:[e.jsx(t.PlaybackSpeedTitle,{children:r("orbital_sim.playback.time_step")}),e.jsx(t.PlaybackSpeedSliderLabel,{children:r("orbital_sim.playback.time_equivalence",{firstTime:r("orbit_viewer.playback.interval.secWithCount",{count:1}),secondTime:_})})]}),e.jsx(t.
|
|
1
|
+
"use client";"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),v=require("react"),u=require("../../../node_modules/prop-types/index.cjs"),k=require("react-i18next"),m=require("../orbitalUtilities.cjs"),S=require("@rubin-epo/epo-react-lib/HorizontalSlider"),t=require("./styles.cjs"),T=a=>a&&a.__esModule?a:{default:a},g=T(S);function h({dayPerVizSec:a,elapsedTime:p,sliderOnChangeCallback:j,speeds:b}){const{t:r}=k.useTranslation();function x(d){const o=d/365,l=Math.floor(o),s=365*(o-l);let i={},n={};return i={number:m.formatValue(l),string:r("elapsed_time.interval.year",{count:l})},n={number:m.formatValue(s),string:r("elapsed_time.interval.day",{count:s})},l>=1?`${i.number} ${i.string}`:s<1?r("orbit_viewer.playback.interval.secWithCount",{count:1}):`${n.number} ${n.string}`}function c(d,o){const l=p<0,s=Math.abs(p)/365.256,i=Math.floor(s),n=Math.floor(365.256*(s-i));let f={},y={};return f={number:m.formatValue(l?-i:i),string:r("elapsed_time.interval.year",{count:i})},y={number:m.formatValue(l?-n:n),string:r("elapsed_time.interval.day",{count:n})},d==="days"?y[o]:d==="years"?f[o]:null}const _=v.useMemo(()=>x(a),[a]);return e.jsxs(e.Fragment,{children:[e.jsxs(t.PlaybackSpeedSliderHeader,{children:[e.jsx(t.PlaybackSpeedTitle,{children:r("orbital_sim.playback.time_step")}),e.jsx(t.PlaybackSpeedSliderLabel,{children:r("orbital_sim.playback.time_equivalence",{firstTime:r("orbit_viewer.playback.interval.secWithCount",{count:1}),secondTime:_})})]}),e.jsx(t.PlaybackSpeedSliderLabelTop,{children:r("orbital_sim.playback.time_equivalence",{firstTime:r("orbit_viewer.playback.interval.secWithCount",{count:1}),secondTime:r("orbit_viewer.playback.interval.yearWithCount",{count:1}),context:"verbose"})}),e.jsx(t.PlaybackSpeedSliderLabelBottom,{children:r("orbital_sim.playback.normal_time")}),e.jsx(t.PlaybackSpeedSliderWrapper,{children:e.jsx(g.default,{isVertical:!0,min:b.min,invert:!0,max:b.max,step:b.step,value:a,onChangeCallback:j})}),e.jsxs(t.ElapsedTimeContainer,{children:[e.jsx(t.ElapsedTimeTitle,{children:r("elapsed_time.title")}),e.jsxs(t.ElapsedTimeInner,{children:[e.jsxs(t.ElapsedTimeBlock,{children:[e.jsx(t.ElapsedVal,{children:c("years","number")}),e.jsx("div",{children:c("years","string")})]}),e.jsx(t.ElapsedTimeDivider,{}),e.jsxs(t.ElapsedTimeBlock,{children:[e.jsx(t.ElapsedVal,{children:c("days","number")}),e.jsx(t.ElapsedLabel,{children:c("days","string")})]})]})]})]})}h.propTypes={dayPerVizSec:u.default.number,elapsedTime:u.default.number,speeds:u.default.object,sliderOnChangeCallback:u.default.func};exports.default=h;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as l, Fragment as S, jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import { useMemo as
|
|
3
|
+
import { useMemo as g } from "react";
|
|
4
4
|
import m from "../../../node_modules/prop-types/index.js";
|
|
5
|
-
import { useTranslation as
|
|
5
|
+
import { useTranslation as C } from "react-i18next";
|
|
6
6
|
import { formatValue as d } from "../orbitalUtilities.js";
|
|
7
|
-
import
|
|
8
|
-
import { PlaybackSpeedSliderHeader as
|
|
9
|
-
function
|
|
7
|
+
import E from "@rubin-epo/epo-react-lib/HorizontalSlider";
|
|
8
|
+
import { PlaybackSpeedSliderHeader as j, PlaybackSpeedTitle as P, PlaybackSpeedSliderLabel as x, PlaybackSpeedSliderLabelTop as D, PlaybackSpeedSliderLabelBottom as M, PlaybackSpeedSliderWrapper as W, ElapsedTimeContainer as w, ElapsedTimeTitle as L, ElapsedTimeInner as Y, ElapsedTimeBlock as h, ElapsedVal as v, ElapsedTimeDivider as $, ElapsedLabel as q } from "./styles.js";
|
|
9
|
+
function B({
|
|
10
10
|
dayPerVizSec: u,
|
|
11
11
|
elapsedTime: b,
|
|
12
|
-
sliderOnChangeCallback:
|
|
12
|
+
sliderOnChangeCallback: k,
|
|
13
13
|
speeds: p
|
|
14
14
|
}) {
|
|
15
|
-
const { t: e } =
|
|
16
|
-
function
|
|
15
|
+
const { t: e } = C();
|
|
16
|
+
function _(c) {
|
|
17
17
|
const o = c / 365, a = Math.floor(o), n = 365 * (o - a);
|
|
18
18
|
let t = {}, i = {};
|
|
19
19
|
return t = {
|
|
@@ -35,18 +35,18 @@ function q({
|
|
|
35
35
|
string: e("elapsed_time.interval.day", { count: i })
|
|
36
36
|
}, c === "days" ? f[o] : c === "years" ? y[o] : null;
|
|
37
37
|
}
|
|
38
|
-
const
|
|
38
|
+
const T = g(() => _(u), [u]);
|
|
39
39
|
return /* @__PURE__ */ l(S, { children: [
|
|
40
|
-
/* @__PURE__ */ l(
|
|
40
|
+
/* @__PURE__ */ l(j, { children: [
|
|
41
41
|
/* @__PURE__ */ r(P, { children: e("orbital_sim.playback.time_step") }),
|
|
42
|
-
/* @__PURE__ */ r(
|
|
42
|
+
/* @__PURE__ */ r(x, { children: e("orbital_sim.playback.time_equivalence", {
|
|
43
43
|
firstTime: e("orbit_viewer.playback.interval.secWithCount", {
|
|
44
44
|
count: 1
|
|
45
45
|
}),
|
|
46
|
-
secondTime:
|
|
46
|
+
secondTime: T
|
|
47
47
|
}) })
|
|
48
48
|
] }),
|
|
49
|
-
/* @__PURE__ */ r(
|
|
49
|
+
/* @__PURE__ */ r(D, { children: e("orbital_sim.playback.time_equivalence", {
|
|
50
50
|
firstTime: e("orbit_viewer.playback.interval.secWithCount", {
|
|
51
51
|
count: 1
|
|
52
52
|
}),
|
|
@@ -55,9 +55,9 @@ function q({
|
|
|
55
55
|
}),
|
|
56
56
|
context: "verbose"
|
|
57
57
|
}) }),
|
|
58
|
-
/* @__PURE__ */ r(
|
|
59
|
-
/* @__PURE__ */ r(
|
|
60
|
-
|
|
58
|
+
/* @__PURE__ */ r(M, { children: e("orbital_sim.playback.normal_time") }),
|
|
59
|
+
/* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(
|
|
60
|
+
E,
|
|
61
61
|
{
|
|
62
62
|
isVertical: !0,
|
|
63
63
|
min: p.min,
|
|
@@ -65,31 +65,31 @@ function q({
|
|
|
65
65
|
max: p.max,
|
|
66
66
|
step: p.step,
|
|
67
67
|
value: u,
|
|
68
|
-
onChangeCallback:
|
|
68
|
+
onChangeCallback: k
|
|
69
69
|
}
|
|
70
70
|
) }),
|
|
71
|
-
/* @__PURE__ */ l(
|
|
72
|
-
/* @__PURE__ */ r(
|
|
71
|
+
/* @__PURE__ */ l(w, { children: [
|
|
72
|
+
/* @__PURE__ */ r(L, { children: e("elapsed_time.title") }),
|
|
73
73
|
/* @__PURE__ */ l(Y, { children: [
|
|
74
|
-
/* @__PURE__ */ l(
|
|
75
|
-
/* @__PURE__ */ r(
|
|
74
|
+
/* @__PURE__ */ l(h, { children: [
|
|
75
|
+
/* @__PURE__ */ r(v, { children: s("years", "number") }),
|
|
76
76
|
/* @__PURE__ */ r("div", { children: s("years", "string") })
|
|
77
77
|
] }),
|
|
78
78
|
/* @__PURE__ */ r($, {}),
|
|
79
|
-
/* @__PURE__ */ l(
|
|
80
|
-
/* @__PURE__ */ r(
|
|
81
|
-
/* @__PURE__ */ r(
|
|
79
|
+
/* @__PURE__ */ l(h, { children: [
|
|
80
|
+
/* @__PURE__ */ r(v, { children: s("days", "number") }),
|
|
81
|
+
/* @__PURE__ */ r(q, { children: s("days", "string") })
|
|
82
82
|
] })
|
|
83
83
|
] })
|
|
84
84
|
] })
|
|
85
85
|
] });
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
B.propTypes = {
|
|
88
88
|
dayPerVizSec: m.number,
|
|
89
89
|
elapsedTime: m.number,
|
|
90
90
|
speeds: m.object,
|
|
91
91
|
sliderOnChangeCallback: m.func
|
|
92
92
|
};
|
|
93
93
|
export {
|
|
94
|
-
|
|
94
|
+
B as default
|
|
95
95
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("styled-components"),t=a=>a&&a.__esModule?a:{default:a},e=t(l),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("styled-components"),t=a=>a&&a.__esModule?a:{default:a},e=t(l),i=e.default.div`
|
|
2
2
|
width: auto;
|
|
3
3
|
display: flex;
|
|
4
4
|
position: absolute;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
transform: translateX(-50%);
|
|
8
8
|
z-index: 2;
|
|
9
9
|
font-size: 17px;
|
|
10
|
-
`,
|
|
10
|
+
`,o=e.default.div`
|
|
11
11
|
position: absolute;
|
|
12
12
|
top: 34px;
|
|
13
13
|
right: 10px;
|
|
@@ -29,13 +29,14 @@
|
|
|
29
29
|
line-height: 1.333;
|
|
30
30
|
color: var(--black);
|
|
31
31
|
font-size: 12.5px;
|
|
32
|
-
background-color: white;
|
|
33
32
|
`,n=e.default.div`
|
|
33
|
+
right: 25px;
|
|
34
|
+
top: 100px;
|
|
34
35
|
font-size: 13px;
|
|
35
36
|
line-height: 1.333;
|
|
36
37
|
color: var(--black);
|
|
37
38
|
position: absolute;
|
|
38
|
-
right: var(--minPadding) / 2;
|
|
39
|
+
// right: var(--minPadding) / 2;
|
|
39
40
|
z-index: 2;
|
|
40
41
|
width: 70px;
|
|
41
42
|
padding: 5px;
|
|
@@ -44,14 +45,30 @@
|
|
|
44
45
|
background-color: rgb(from var(--basePrimary) r g b / 80%);
|
|
45
46
|
border: 1px solid var(--black);
|
|
46
47
|
border-radius: 10px;
|
|
47
|
-
`,p=e.default.
|
|
48
|
+
`,p=e.default.div`
|
|
49
|
+
right: 25px;
|
|
50
|
+
bottom: 200px;
|
|
51
|
+
font-size: 13px;
|
|
52
|
+
line-height: 1.333;
|
|
53
|
+
color: var(--black);
|
|
54
|
+
position: absolute;
|
|
55
|
+
// right: var(--minPadding) / 2;
|
|
56
|
+
z-index: 2;
|
|
57
|
+
width: 70px;
|
|
58
|
+
padding: 5px;
|
|
59
|
+
color: var(--white);
|
|
60
|
+
text-align: center;
|
|
61
|
+
background-color: rgb(from var(--basePrimary) r g b / 80%);
|
|
62
|
+
border: 1px solid var(--black);
|
|
63
|
+
border-radius: 10px;
|
|
64
|
+
`,c=e.default.span`
|
|
48
65
|
position: absolute;
|
|
49
66
|
z-index: 2;
|
|
50
67
|
height: 50px;
|
|
51
68
|
top: 25%;
|
|
52
69
|
right: 5rem;
|
|
53
70
|
width: fit-content;
|
|
54
|
-
`,
|
|
71
|
+
`,s=e.default.div`
|
|
55
72
|
font-size: 13px;
|
|
56
73
|
line-height: 1.333;
|
|
57
74
|
color: var(--black);
|
|
@@ -64,34 +81,34 @@
|
|
|
64
81
|
background-color: rgb(from var(--white) r g b / 80%);
|
|
65
82
|
border: 1px solid var(--black);
|
|
66
83
|
border-radius: 10px;
|
|
67
|
-
`,
|
|
84
|
+
`,b=e.default.div`
|
|
68
85
|
font-size: 13px;
|
|
69
86
|
line-height: 1.333;
|
|
70
87
|
color: var(--black);
|
|
71
88
|
padding-top: 5px;
|
|
72
|
-
`,
|
|
89
|
+
`,x=e.default.div`
|
|
73
90
|
display: flex;
|
|
74
91
|
flex-flow: nowrap;
|
|
75
92
|
align-items: center;
|
|
76
93
|
justify-content: space-evenly;
|
|
77
94
|
margin-top: 5px;
|
|
78
95
|
border-top: 1px solid var(--black);
|
|
79
|
-
`,x=e.default.div`
|
|
80
|
-
width: 50px;
|
|
81
96
|
`,g=e.default.div`
|
|
97
|
+
width: 50px;
|
|
98
|
+
`,u=e.default.div`
|
|
82
99
|
font-size: 18px;
|
|
83
100
|
font-weight: var(--regular);
|
|
84
101
|
line-height: 1.5;
|
|
85
102
|
color: var(--black);
|
|
86
103
|
color: var(--black);
|
|
87
|
-
`,
|
|
104
|
+
`,f=e.default.div`
|
|
88
105
|
display: block;
|
|
89
106
|
width: 1px;
|
|
90
107
|
height: 50px;
|
|
91
108
|
background-color: var(--black);
|
|
92
|
-
`,
|
|
109
|
+
`,v=e.default.div`
|
|
93
110
|
font-size: 13px;
|
|
94
111
|
line-height: 1.333;
|
|
95
112
|
color: var(--black);
|
|
96
113
|
color: var(--black);
|
|
97
|
-
`;exports.ElapsedLabel=
|
|
114
|
+
`;exports.ElapsedLabel=v;exports.ElapsedTimeBlock=g;exports.ElapsedTimeContainer=s;exports.ElapsedTimeDivider=f;exports.ElapsedTimeInner=x;exports.ElapsedTimeTitle=b;exports.ElapsedVal=u;exports.PlaybackControlsContainer=i;exports.PlaybackSpeedSliderHeader=o;exports.PlaybackSpeedSliderLabel=d;exports.PlaybackSpeedSliderLabelBottom=p;exports.PlaybackSpeedSliderLabelTop=n;exports.PlaybackSpeedSliderWrapper=c;exports.PlaybackSpeedTitle=r;
|
|
@@ -2,7 +2,8 @@ export declare const PlaybackControlsContainer: import('styled-components/dist/t
|
|
|
2
2
|
export declare const PlaybackSpeedSliderHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
3
3
|
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;
|
|
4
4
|
export declare const PlaybackSpeedSliderLabel: 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
|
|
5
|
+
export declare const PlaybackSpeedSliderLabelTop: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
|
+
export declare const PlaybackSpeedSliderLabelBottom: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
7
|
export declare const PlaybackSpeedSliderWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
7
8
|
export declare const ElapsedTimeContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
8
9
|
export declare const ElapsedTimeTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -31,13 +31,14 @@ const i = o.div`
|
|
|
31
31
|
line-height: 1.333;
|
|
32
32
|
color: var(--black);
|
|
33
33
|
font-size: 12.5px;
|
|
34
|
-
background-color: white;
|
|
35
34
|
`, l = o.div`
|
|
35
|
+
right: 25px;
|
|
36
|
+
top: 100px;
|
|
36
37
|
font-size: 13px;
|
|
37
38
|
line-height: 1.333;
|
|
38
39
|
color: var(--black);
|
|
39
40
|
position: absolute;
|
|
40
|
-
right: var(--minPadding) / 2;
|
|
41
|
+
// right: var(--minPadding) / 2;
|
|
41
42
|
z-index: 2;
|
|
42
43
|
width: 70px;
|
|
43
44
|
padding: 5px;
|
|
@@ -46,14 +47,30 @@ const i = o.div`
|
|
|
46
47
|
background-color: rgb(from var(--basePrimary) r g b / 80%);
|
|
47
48
|
border: 1px solid var(--black);
|
|
48
49
|
border-radius: 10px;
|
|
49
|
-
`, n = o.
|
|
50
|
+
`, n = o.div`
|
|
51
|
+
right: 25px;
|
|
52
|
+
bottom: 200px;
|
|
53
|
+
font-size: 13px;
|
|
54
|
+
line-height: 1.333;
|
|
55
|
+
color: var(--black);
|
|
56
|
+
position: absolute;
|
|
57
|
+
// right: var(--minPadding) / 2;
|
|
58
|
+
z-index: 2;
|
|
59
|
+
width: 70px;
|
|
60
|
+
padding: 5px;
|
|
61
|
+
color: var(--white);
|
|
62
|
+
text-align: center;
|
|
63
|
+
background-color: rgb(from var(--basePrimary) r g b / 80%);
|
|
64
|
+
border: 1px solid var(--black);
|
|
65
|
+
border-radius: 10px;
|
|
66
|
+
`, d = o.span`
|
|
50
67
|
position: absolute;
|
|
51
68
|
z-index: 2;
|
|
52
69
|
height: 50px;
|
|
53
70
|
top: 25%;
|
|
54
71
|
right: 5rem;
|
|
55
72
|
width: fit-content;
|
|
56
|
-
`,
|
|
73
|
+
`, p = o.div`
|
|
57
74
|
font-size: 13px;
|
|
58
75
|
line-height: 1.333;
|
|
59
76
|
color: var(--black);
|
|
@@ -66,49 +83,50 @@ const i = o.div`
|
|
|
66
83
|
background-color: rgb(from var(--white) r g b / 80%);
|
|
67
84
|
border: 1px solid var(--black);
|
|
68
85
|
border-radius: 10px;
|
|
69
|
-
`,
|
|
86
|
+
`, c = o.div`
|
|
70
87
|
font-size: 13px;
|
|
71
88
|
line-height: 1.333;
|
|
72
89
|
color: var(--black);
|
|
73
90
|
padding-top: 5px;
|
|
74
|
-
`,
|
|
91
|
+
`, s = o.div`
|
|
75
92
|
display: flex;
|
|
76
93
|
flex-flow: nowrap;
|
|
77
94
|
align-items: center;
|
|
78
95
|
justify-content: space-evenly;
|
|
79
96
|
margin-top: 5px;
|
|
80
97
|
border-top: 1px solid var(--black);
|
|
81
|
-
`, s = o.div`
|
|
82
|
-
width: 50px;
|
|
83
98
|
`, b = o.div`
|
|
99
|
+
width: 50px;
|
|
100
|
+
`, x = o.div`
|
|
84
101
|
font-size: 18px;
|
|
85
102
|
font-weight: var(--regular);
|
|
86
103
|
line-height: 1.5;
|
|
87
104
|
color: var(--black);
|
|
88
105
|
color: var(--black);
|
|
89
|
-
`,
|
|
106
|
+
`, g = o.div`
|
|
90
107
|
display: block;
|
|
91
108
|
width: 1px;
|
|
92
109
|
height: 50px;
|
|
93
110
|
background-color: var(--black);
|
|
94
|
-
`,
|
|
111
|
+
`, h = o.div`
|
|
95
112
|
font-size: 13px;
|
|
96
113
|
line-height: 1.333;
|
|
97
114
|
color: var(--black);
|
|
98
115
|
color: var(--black);
|
|
99
116
|
`;
|
|
100
117
|
export {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
118
|
+
h as ElapsedLabel,
|
|
119
|
+
b as ElapsedTimeBlock,
|
|
120
|
+
p as ElapsedTimeContainer,
|
|
121
|
+
g as ElapsedTimeDivider,
|
|
122
|
+
s as ElapsedTimeInner,
|
|
123
|
+
c as ElapsedTimeTitle,
|
|
124
|
+
x as ElapsedVal,
|
|
108
125
|
i as PlaybackControlsContainer,
|
|
109
126
|
r as PlaybackSpeedSliderHeader,
|
|
110
127
|
t as PlaybackSpeedSliderLabel,
|
|
111
|
-
|
|
112
|
-
|
|
128
|
+
n as PlaybackSpeedSliderLabelBottom,
|
|
129
|
+
l as PlaybackSpeedSliderLabelTop,
|
|
130
|
+
d as PlaybackSpeedSliderWrapper,
|
|
113
131
|
a as PlaybackSpeedTitle
|
|
114
132
|
};
|
|
@@ -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"),b=require("react"),_=require("d3-geo-projection"),S=require("d3-geo"),M=require("d3-array"),E=require("../../../charts/Base/index.cjs");require("../../../charts/XAxis/index.cjs");require("../../../charts/YAxis/index.cjs");require("../../../charts/Guidelines/index.cjs");const N=require("../../../charts/Tooltip/index.cjs");require("../../../charts/Bars/index.cjs");require("../../../charts/Viewport/index.cjs");require("../../../charts/ScatterPlot/index.cjs");const U=require("../../../atomic/ImageStack/index.cjs"),r=require("./styles.cjs"),y=({className:L,objects:p=[],images:v=[],visibleImages:w=[],describedById:G})=>{const[O,P]=b.useState(!1),[x,f]=b.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,q=180,h=2,i=_.geoAitoff(),s=S.geoGraticule();s.step([u,d]),s.extent([[g,j],[q,m]]),i.fitExtent([[n.left,n.top],[n.left+l-h,n.top+c]],s.outline());const B=M.range(j+d,m,d),A=M.range(g+u,q,u),C=S.geoPath(i).pointRadius(6),a=t=>C(t)||void 0,o=typeof x<"u"?p[x]:void 0,k=(o?i([o==null?void 0:o.long,o==null?void 0:o.lat]):[0,0])||[0,0];return e.jsxs(E.default,{width:W,height:$,className:L,children:[e.jsx("mask",{id:"imageMask",children:e.jsx("path",{d:a(s.outline()),fill:"white"})}),e.jsx(r.Background,{d:a(s.outline())}),e.jsx(r.Graticule,{d:a(s())}),e.jsx(r.ImageStackerWrapper,{style:{"--image-stack-opacity":O&&1},x:n.left,y:n.top,width:l-h,height:c,mask:"url(#imageMask)",children:e.jsx(U.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(r.UserObject,{d:a({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(r.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(r.LongLabel,{transform:`translate(${i([t,0])})`,children:[t,"°"]},t))}),e.jsx(r.Outline,{strokeWidth:h,d:a(s.outline())}),e.jsx(N.default,{visible:!!o,x:k[0],y:k[1],children:o==null?void 0:o.id})]})};y.displayName="Widgets.SupernovaThreeVector.Skymap";exports.default=y;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as h, jsx as
|
|
2
|
+
import { jsxs as h, jsx as o } 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
|
|
10
|
-
import
|
|
7
|
+
import U from "../../../charts/Base/index.js";
|
|
8
|
+
import "../../../charts/XAxis/index.js";
|
|
9
|
+
import "../../../charts/YAxis/index.js";
|
|
10
|
+
import "../../../charts/Guidelines/index.js";
|
|
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";
|
|
11
17
|
const Y = ({
|
|
12
18
|
className: y,
|
|
13
19
|
objects: g = [],
|
|
@@ -15,38 +21,38 @@ const Y = ({
|
|
|
15
21
|
visibleImages: w = [],
|
|
16
22
|
describedById: B
|
|
17
23
|
}) => {
|
|
18
|
-
const [O, W] = L(!1), [f, u] = L(), s = 600, l = 300,
|
|
24
|
+
const [O, W] = L(!1), [f, u] = L(), s = 600, l = 300, i = {
|
|
19
25
|
top: 20,
|
|
20
26
|
right: 0,
|
|
21
27
|
bottom: 20,
|
|
22
28
|
left: 20
|
|
23
|
-
}, j = s +
|
|
24
|
-
|
|
29
|
+
}, j = s + i.right + i.left, C = l + i.top + i.bottom, c = 15, d = 30, k = -90, x = 90, p = -180, b = 180, m = 2, a = E(), r = N();
|
|
30
|
+
r.step([d, c]), r.extent([
|
|
25
31
|
[p, k],
|
|
26
32
|
[b, x]
|
|
27
|
-
]),
|
|
33
|
+
]), a.fitExtent(
|
|
28
34
|
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
35
|
+
[i.left, i.top],
|
|
36
|
+
[i.left + s - m, i.top + l]
|
|
31
37
|
],
|
|
32
|
-
|
|
38
|
+
r.outline()
|
|
33
39
|
);
|
|
34
|
-
const G = M(k + c, x, c), H = M(p + d, b, d), P = R(
|
|
35
|
-
return /* @__PURE__ */ h(
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
40
|
+
const G = M(k + c, x, c), H = M(p + d, b, d), P = R(a).pointRadius(6), n = (t) => P(t) || void 0, e = typeof f < "u" ? g[f] : void 0, S = (e ? a([e == null ? void 0 : e.long, e == null ? void 0 : e.lat]) : [0, 0]) || [0, 0];
|
|
41
|
+
return /* @__PURE__ */ h(U, { width: j, height: C, className: y, children: [
|
|
42
|
+
/* @__PURE__ */ o("mask", { id: "imageMask", children: /* @__PURE__ */ o("path", { d: n(r.outline()), fill: "white" }) }),
|
|
43
|
+
/* @__PURE__ */ o(z, { d: n(r.outline()) }),
|
|
44
|
+
/* @__PURE__ */ o(D, { d: n(r()) }),
|
|
45
|
+
/* @__PURE__ */ o(
|
|
46
|
+
F,
|
|
41
47
|
{
|
|
42
48
|
style: { "--image-stack-opacity": O && 1 },
|
|
43
|
-
x:
|
|
44
|
-
y:
|
|
49
|
+
x: i.left,
|
|
50
|
+
y: i.top,
|
|
45
51
|
width: s - m,
|
|
46
52
|
height: l,
|
|
47
53
|
mask: "url(#imageMask)",
|
|
48
|
-
children: /* @__PURE__ */
|
|
49
|
-
|
|
54
|
+
children: /* @__PURE__ */ o(
|
|
55
|
+
q,
|
|
50
56
|
{
|
|
51
57
|
images: v,
|
|
52
58
|
describedById: B,
|
|
@@ -58,10 +64,10 @@ const Y = ({
|
|
|
58
64
|
)
|
|
59
65
|
}
|
|
60
66
|
),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
|
|
67
|
+
/* @__PURE__ */ o("g", { children: g.map(({ id: t, lat: T, long: $ }, A) => /* @__PURE__ */ o(
|
|
68
|
+
J,
|
|
63
69
|
{
|
|
64
|
-
d:
|
|
70
|
+
d: n({
|
|
65
71
|
type: "Point",
|
|
66
72
|
coordinates: [$, T]
|
|
67
73
|
}),
|
|
@@ -70,14 +76,14 @@ const Y = ({
|
|
|
70
76
|
},
|
|
71
77
|
t
|
|
72
78
|
)) }),
|
|
73
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ o("g", { "aria-hidden": "true", children: G.map(
|
|
74
80
|
(t) => t === 0 ? null : /* @__PURE__ */ h(
|
|
75
|
-
|
|
81
|
+
K,
|
|
76
82
|
{
|
|
77
83
|
style: {
|
|
78
84
|
dominantBaseline: t > 0 ? "text-after-edge" : "text-before-edge"
|
|
79
85
|
},
|
|
80
|
-
transform: `translate(${
|
|
86
|
+
transform: `translate(${a([p, t])})`,
|
|
81
87
|
children: [
|
|
82
88
|
t,
|
|
83
89
|
"°"
|
|
@@ -86,10 +92,10 @@ const Y = ({
|
|
|
86
92
|
t
|
|
87
93
|
)
|
|
88
94
|
) }),
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
|
|
95
|
+
/* @__PURE__ */ o("g", { "aria-hidden": "true", children: H.map((t) => /* @__PURE__ */ h(
|
|
96
|
+
Q,
|
|
91
97
|
{
|
|
92
|
-
transform: `translate(${
|
|
98
|
+
transform: `translate(${a([t, 0])})`,
|
|
93
99
|
children: [
|
|
94
100
|
t,
|
|
95
101
|
"°"
|
|
@@ -97,20 +103,20 @@ const Y = ({
|
|
|
97
103
|
},
|
|
98
104
|
t
|
|
99
105
|
)) }),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
|
|
106
|
+
/* @__PURE__ */ o(
|
|
107
|
+
X,
|
|
102
108
|
{
|
|
103
109
|
strokeWidth: m,
|
|
104
|
-
d: r
|
|
110
|
+
d: n(r.outline())
|
|
105
111
|
}
|
|
106
112
|
),
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
|
|
113
|
+
/* @__PURE__ */ o(
|
|
114
|
+
V,
|
|
109
115
|
{
|
|
110
|
-
visible: !!
|
|
116
|
+
visible: !!e,
|
|
111
117
|
x: S[0],
|
|
112
118
|
y: S[1],
|
|
113
|
-
children:
|
|
119
|
+
children: e == null ? void 0 : e.id
|
|
114
120
|
}
|
|
115
121
|
)
|
|
116
122
|
] });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rubin-epo/epo-widget-lib",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "Rubin Observatory Education & Public Outreach team React scientific and educational widgets.",
|
|
5
5
|
"author": "Rubin EPO",
|
|
6
6
|
"license": "MIT",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"dependencies": {
|
|
103
103
|
"@react-three/drei": "^10.7.6",
|
|
104
104
|
"@react-three/fiber": "9",
|
|
105
|
-
"@rubin-epo/epo-react-lib": "
|
|
105
|
+
"@rubin-epo/epo-react-lib": "3.0.0",
|
|
106
106
|
"context-filter-polyfill": "^0.3.6",
|
|
107
107
|
"d3-array": "^3.2.4",
|
|
108
108
|
"d3-geo": "^3.1.1",
|