@servantcdh/ez-planet-cosmos 0.2.5 → 0.2.7
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/LICENSE +87 -0
- package/LICENSE.ko +87 -0
- package/README.md +3 -1
- package/dist/index.js +333 -306
- package/dist/style.css +1 -1
- package/package.json +5 -3
package/dist/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as tt, useRef as et, useMemo as W, useState as
|
|
3
|
-
import { Handle as
|
|
4
|
-
import { motion as
|
|
1
|
+
import { jsxs as m, jsx as t, Fragment as kt } from "react/jsx-runtime";
|
|
2
|
+
import { memo as tt, useRef as et, useMemo as W, useState as Z, useCallback as v, useEffect as it } from "react";
|
|
3
|
+
import { Handle as X, Position as Q, getBezierPath as It, BaseEdge as Y, ReactFlowProvider as Lt, useReactFlow as zt, useNodesState as $t, useEdgesState as Dt, ReactFlow as Mt, Background as Ft, BackgroundVariant as Rt, Controls as Tt, MiniMap as Wt } from "@xyflow/react";
|
|
4
|
+
import { motion as I, AnimatePresence as A } from "framer-motion";
|
|
5
5
|
import { Canvas as At, useFrame as ot } from "@react-three/fiber";
|
|
6
6
|
import { Points as at, PointMaterial as nt } from "@react-three/drei";
|
|
7
|
-
const Ot = "cc-root-eSR-1", Et = "cc-layerStarField-jOb4M",
|
|
7
|
+
const Ot = "cc-root-eSR-1", Et = "cc-layerStarField-jOb4M", Zt = "cc-layerReactFlow-CeHI9", Ht = "cc-sidePanel-PzU72", Vt = "cc-sidePanelHeader-cWPCq", _t = "cc-sidePanelTitle-Yfh5N", Gt = "cc-sidePanelPlanetIcon-aRuLt", Jt = "cc-sidePanelName-TFFeE", Ut = "cc-sidePanelSubtitle-8fp2Y", Kt = "cc-sidePanelClose-Sdg-J", jt = "cc-sidePanelContent-QIEEQ", qt = "cc-sidePanelFooter-DVOHi", Xt = "cc-satelliteList--vkXn", Qt = "cc-satelliteItem-JGdmG", Yt = "cc-satelliteIcon-arUe3", te = "cc-satelliteInfo-NaKLd", ee = "cc-satelliteName-zfOPN", ie = "cc-satelliteSummary-XARVm", oe = "cc-enterButton-5Vnri", ae = "cc-zoomTransition-Wcju8", ne = "cc-zoomPlanetLabel-3SJT2", le = "cc-planetInterior-GlnW1", re = "cc-interiorBackButton-qJAiZ", ce = "cc-interiorCenter-xdKsX", se = "cc-interiorPlanet--XIzf", de = "cc-interiorPlanetLabel-e7yxq", ue = "cc-interiorPlanetSubtitle-e2vON", me = "cc-orbitRing-hbvmD", pe = "cc-satelliteNode-01STS", he = "cc-satelliteNodeIcon-Xq45f", fe = "cc-satelliteNodeLabel-LLOJ5", ye = "cc-satelliteNodeBadge-HsUFp", ge = "cc-tutorialOverlay-3GHo7", ve = "cc-tutorialWelcome-21KDP", be = "cc-tutorialWelcomeTitle-7GwS9", Ne = "cc-tutorialWelcomeDesc--pznv", Pe = "cc-tutorialActions-szJ0-", we = "cc-tutorialButton-wL9-p", Ce = "cc-tutorialCard-LGIkK", Be = "cc-tutorialChip-bUoEb", xe = "cc-tutorialCardTitle-r2Y1I", Se = "cc-tutorialCardDesc-nOS-M", ke = "cc-tutorialProgress-wIAT9", Ie = "cc-tutorialProgressBar-PFBdE", Le = "cc-tutorialCardFooter-bSdyM", ze = "cc-tutorialDots-8M0QU", $e = "cc-tutorialDot-518t4", De = "cc-planetBody-kF0Jj", Me = "cc-planetBodyRunning-cmLi4", Fe = "cc-planetOrbitRing-v7fZR", Re = "cc-planetStatusDot--M-6s", Te = "cc-planetHint-QUWAw", We = "cc-topBarSlot-EJGvM", Ae = "cc-topBarLogo-1PRdl", Oe = "cc-topBarContent-8WDi6", i = {
|
|
8
8
|
root: Ot,
|
|
9
9
|
layerStarField: Et,
|
|
10
|
-
layerReactFlow:
|
|
11
|
-
sidePanel:
|
|
12
|
-
sidePanelHeader:
|
|
13
|
-
sidePanelTitle:
|
|
14
|
-
sidePanelPlanetIcon:
|
|
15
|
-
sidePanelName:
|
|
16
|
-
sidePanelSubtitle:
|
|
17
|
-
sidePanelClose:
|
|
18
|
-
sidePanelContent:
|
|
19
|
-
sidePanelFooter:
|
|
20
|
-
satelliteList:
|
|
10
|
+
layerReactFlow: Zt,
|
|
11
|
+
sidePanel: Ht,
|
|
12
|
+
sidePanelHeader: Vt,
|
|
13
|
+
sidePanelTitle: _t,
|
|
14
|
+
sidePanelPlanetIcon: Gt,
|
|
15
|
+
sidePanelName: Jt,
|
|
16
|
+
sidePanelSubtitle: Ut,
|
|
17
|
+
sidePanelClose: Kt,
|
|
18
|
+
sidePanelContent: jt,
|
|
19
|
+
sidePanelFooter: qt,
|
|
20
|
+
satelliteList: Xt,
|
|
21
21
|
satelliteItem: Qt,
|
|
22
22
|
satelliteIcon: Yt,
|
|
23
23
|
satelliteInfo: te,
|
|
@@ -26,48 +26,50 @@ const Ot = "cc-root-eSR-1", Et = "cc-layerStarField-jOb4M", Ht = "cc-layerReactF
|
|
|
26
26
|
enterButton: oe,
|
|
27
27
|
zoomTransition: ae,
|
|
28
28
|
zoomPlanetLabel: ne,
|
|
29
|
-
planetInterior:
|
|
30
|
-
interiorBackButton:
|
|
31
|
-
interiorCenter:
|
|
32
|
-
interiorPlanet:
|
|
29
|
+
planetInterior: le,
|
|
30
|
+
interiorBackButton: re,
|
|
31
|
+
interiorCenter: ce,
|
|
32
|
+
interiorPlanet: se,
|
|
33
33
|
interiorPlanetLabel: de,
|
|
34
34
|
interiorPlanetSubtitle: ue,
|
|
35
35
|
orbitRing: me,
|
|
36
36
|
satelliteNode: pe,
|
|
37
37
|
satelliteNodeIcon: he,
|
|
38
|
-
satelliteNodeLabel:
|
|
39
|
-
satelliteNodeBadge:
|
|
40
|
-
tutorialOverlay:
|
|
41
|
-
tutorialWelcome:
|
|
42
|
-
tutorialWelcomeTitle:
|
|
38
|
+
satelliteNodeLabel: fe,
|
|
39
|
+
satelliteNodeBadge: ye,
|
|
40
|
+
tutorialOverlay: ge,
|
|
41
|
+
tutorialWelcome: ve,
|
|
42
|
+
tutorialWelcomeTitle: be,
|
|
43
43
|
tutorialWelcomeDesc: Ne,
|
|
44
44
|
tutorialActions: Pe,
|
|
45
45
|
tutorialButton: we,
|
|
46
46
|
tutorialCard: Ce,
|
|
47
|
-
tutorialChip:
|
|
48
|
-
tutorialCardTitle:
|
|
49
|
-
tutorialCardDesc:
|
|
50
|
-
tutorialProgress:
|
|
51
|
-
tutorialProgressBar:
|
|
52
|
-
tutorialCardFooter:
|
|
53
|
-
tutorialDots:
|
|
47
|
+
tutorialChip: Be,
|
|
48
|
+
tutorialCardTitle: xe,
|
|
49
|
+
tutorialCardDesc: Se,
|
|
50
|
+
tutorialProgress: ke,
|
|
51
|
+
tutorialProgressBar: Ie,
|
|
52
|
+
tutorialCardFooter: Le,
|
|
53
|
+
tutorialDots: ze,
|
|
54
54
|
tutorialDot: $e,
|
|
55
|
-
planetBody:
|
|
56
|
-
planetBodyRunning:
|
|
55
|
+
planetBody: De,
|
|
56
|
+
planetBodyRunning: Me,
|
|
57
57
|
planetOrbitRing: Fe,
|
|
58
58
|
planetStatusDot: Re,
|
|
59
59
|
planetHint: Te,
|
|
60
|
-
topBarSlot: We
|
|
60
|
+
topBarSlot: We,
|
|
61
|
+
topBarLogo: Ae,
|
|
62
|
+
topBarContent: Oe
|
|
61
63
|
};
|
|
62
|
-
function
|
|
63
|
-
const { label: h, subtitle: u, color:
|
|
64
|
-
return /* @__PURE__ */
|
|
64
|
+
function Ee({ data: e }) {
|
|
65
|
+
const { label: h, subtitle: u, color: c, status: o, isSelected: n } = e, d = n ? 35 : o === "running" ? 30 : o === "error" ? 20 : 15, r = n ? 110 : 100;
|
|
66
|
+
return /* @__PURE__ */ m("div", { style: { position: "relative", cursor: "pointer" }, children: [
|
|
65
67
|
/* @__PURE__ */ t(
|
|
66
|
-
|
|
68
|
+
X,
|
|
67
69
|
{
|
|
68
70
|
type: "target",
|
|
69
71
|
position: Q.Left,
|
|
70
|
-
style: { background:
|
|
72
|
+
style: { background: c, border: "none", width: 8, height: 8, opacity: 0.6 }
|
|
71
73
|
}
|
|
72
74
|
),
|
|
73
75
|
n && /* @__PURE__ */ t(
|
|
@@ -77,22 +79,22 @@ function Ae({ data: e }) {
|
|
|
77
79
|
style: {
|
|
78
80
|
top: -12,
|
|
79
81
|
left: -12,
|
|
80
|
-
width:
|
|
81
|
-
height:
|
|
82
|
-
border: `1.5px dashed ${
|
|
82
|
+
width: r + 24,
|
|
83
|
+
height: r + 24,
|
|
84
|
+
border: `1.5px dashed ${c}88`
|
|
83
85
|
}
|
|
84
86
|
}
|
|
85
87
|
),
|
|
86
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ m(
|
|
87
89
|
"div",
|
|
88
90
|
{
|
|
89
91
|
className: o === "running" ? i.planetBodyRunning : i.planetBody,
|
|
90
92
|
style: {
|
|
91
|
-
width:
|
|
92
|
-
height:
|
|
93
|
-
background: `radial-gradient(circle at 35% 35%, ${
|
|
94
|
-
boxShadow: `0 0 ${d}px ${
|
|
95
|
-
border: `2px solid ${n ? `${
|
|
93
|
+
width: r,
|
|
94
|
+
height: r,
|
|
95
|
+
background: `radial-gradient(circle at 35% 35%, ${c}cc, ${c}44)`,
|
|
96
|
+
boxShadow: `0 0 ${d}px ${c}88, inset 0 0 20px rgba(255,255,255,0.1)`,
|
|
97
|
+
border: `2px solid ${n ? `${c}aa` : `${c}66`}`
|
|
96
98
|
},
|
|
97
99
|
children: [
|
|
98
100
|
/* @__PURE__ */ t(
|
|
@@ -123,47 +125,47 @@ function Ae({ data: e }) {
|
|
|
123
125
|
),
|
|
124
126
|
n && /* @__PURE__ */ t("div", { className: i.planetHint, children: "double-click to enter" }),
|
|
125
127
|
/* @__PURE__ */ t(
|
|
126
|
-
|
|
128
|
+
X,
|
|
127
129
|
{
|
|
128
130
|
type: "source",
|
|
129
131
|
position: Q.Right,
|
|
130
|
-
style: { background:
|
|
132
|
+
style: { background: c, border: "none", width: 8, height: 8, opacity: 0.6 }
|
|
131
133
|
}
|
|
132
134
|
)
|
|
133
135
|
] });
|
|
134
136
|
}
|
|
135
|
-
const
|
|
136
|
-
function
|
|
137
|
+
const Ze = tt(Ee);
|
|
138
|
+
function He({
|
|
137
139
|
id: e,
|
|
138
140
|
sourceX: h,
|
|
139
141
|
sourceY: u,
|
|
140
|
-
targetX:
|
|
142
|
+
targetX: c,
|
|
141
143
|
targetY: o,
|
|
142
144
|
sourcePosition: n,
|
|
143
145
|
targetPosition: d,
|
|
144
|
-
data:
|
|
145
|
-
style:
|
|
146
|
+
data: r,
|
|
147
|
+
style: g = {}
|
|
146
148
|
}) {
|
|
147
|
-
const [
|
|
149
|
+
const [p] = It({
|
|
148
150
|
sourceX: h,
|
|
149
151
|
sourceY: u,
|
|
150
152
|
sourcePosition: n,
|
|
151
|
-
targetX:
|
|
153
|
+
targetX: c,
|
|
152
154
|
targetY: o,
|
|
153
155
|
targetPosition: d
|
|
154
|
-
}),
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
+
}), f = (r == null ? void 0 : r.isActive) ?? !1, w = (r == null ? void 0 : r.isDimmed) ?? !1, $ = f ? "rgba(46, 204, 113, 0.25)" : "rgba(100, 149, 237, 0.15)", L = f ? "rgba(46, 204, 113, 0.7)" : w ? "rgba(100, 149, 237, 0.12)" : "rgba(100, 149, 237, 0.4)", l = f ? 3 : 2, C = f ? "12 4" : "8 4";
|
|
157
|
+
return /* @__PURE__ */ m(kt, { children: [
|
|
156
158
|
/* @__PURE__ */ t(
|
|
157
159
|
Y,
|
|
158
160
|
{
|
|
159
161
|
id: `${e}-glow`,
|
|
160
|
-
path:
|
|
162
|
+
path: p,
|
|
161
163
|
style: {
|
|
162
164
|
stroke: $,
|
|
163
|
-
strokeWidth:
|
|
164
|
-
filter: `blur(${
|
|
165
|
+
strokeWidth: f ? 10 : 6,
|
|
166
|
+
filter: `blur(${f ? 5 : 3}px)`,
|
|
165
167
|
transition: "stroke 0.6s, stroke-width 0.6s",
|
|
166
|
-
...
|
|
168
|
+
...g
|
|
167
169
|
}
|
|
168
170
|
}
|
|
169
171
|
),
|
|
@@ -171,17 +173,17 @@ function Ee({
|
|
|
171
173
|
Y,
|
|
172
174
|
{
|
|
173
175
|
id: e,
|
|
174
|
-
path:
|
|
176
|
+
path: p,
|
|
175
177
|
style: {
|
|
176
|
-
stroke:
|
|
177
|
-
strokeWidth:
|
|
178
|
+
stroke: L,
|
|
179
|
+
strokeWidth: l,
|
|
178
180
|
strokeDasharray: C,
|
|
179
181
|
transition: "stroke 0.6s, stroke-width 0.6s",
|
|
180
|
-
...
|
|
182
|
+
...g
|
|
181
183
|
}
|
|
182
184
|
}
|
|
183
185
|
),
|
|
184
|
-
(
|
|
186
|
+
(r == null ? void 0 : r.label) && /* @__PURE__ */ t("text", { children: /* @__PURE__ */ t(
|
|
185
187
|
"textPath",
|
|
186
188
|
{
|
|
187
189
|
href: `#${e}`,
|
|
@@ -192,21 +194,21 @@ function Ee({
|
|
|
192
194
|
fill: "rgba(255, 255, 255, 0.4)",
|
|
193
195
|
fontFamily: "monospace"
|
|
194
196
|
},
|
|
195
|
-
children:
|
|
197
|
+
children: r.label
|
|
196
198
|
}
|
|
197
199
|
) })
|
|
198
200
|
] });
|
|
199
201
|
}
|
|
200
|
-
const
|
|
202
|
+
const Ve = tt(He);
|
|
201
203
|
function _e({ config: e }) {
|
|
202
|
-
const h = et(null), u = e.starCount ?? 2e3,
|
|
204
|
+
const h = et(null), u = e.starCount ?? 2e3, c = e.rotationSpeed ?? 0.02, o = W(() => {
|
|
203
205
|
const n = new Float32Array(u * 3);
|
|
204
206
|
for (let d = 0; d < u; d++)
|
|
205
207
|
n[d * 3] = (Math.random() - 0.5) * 50, n[d * 3 + 1] = (Math.random() - 0.5) * 50, n[d * 3 + 2] = (Math.random() - 0.5) * 50;
|
|
206
208
|
return n;
|
|
207
209
|
}, [u]);
|
|
208
210
|
return ot((n, d) => {
|
|
209
|
-
h.current && (h.current.rotation.x -= d *
|
|
211
|
+
h.current && (h.current.rotation.x -= d * c, h.current.rotation.y -= d * (c * 0.5));
|
|
210
212
|
}), /* @__PURE__ */ t(at, { ref: h, positions: o, stride: 3, frustumCulled: !1, children: /* @__PURE__ */ t(
|
|
211
213
|
nt,
|
|
212
214
|
{
|
|
@@ -220,17 +222,17 @@ function _e({ config: e }) {
|
|
|
220
222
|
) });
|
|
221
223
|
}
|
|
222
224
|
function Ge({ config: e }) {
|
|
223
|
-
const h = et(null), u = e.nebulaCount ?? 500,
|
|
225
|
+
const h = et(null), u = e.nebulaCount ?? 500, c = W(() => {
|
|
224
226
|
const o = new Float32Array(u * 3);
|
|
225
227
|
for (let n = 0; n < u; n++) {
|
|
226
|
-
const d = Math.random() * Math.PI * 2,
|
|
227
|
-
o[n * 3] = Math.cos(d) *
|
|
228
|
+
const d = Math.random() * Math.PI * 2, r = Math.random() * 8 + 5;
|
|
229
|
+
o[n * 3] = Math.cos(d) * r + (Math.random() - 0.5) * 3, o[n * 3 + 1] = (Math.random() - 0.5) * 4, o[n * 3 + 2] = Math.sin(d) * r + (Math.random() - 0.5) * 3 - 15;
|
|
228
230
|
}
|
|
229
231
|
return o;
|
|
230
232
|
}, [u]);
|
|
231
233
|
return ot((o, n) => {
|
|
232
234
|
h.current && (h.current.rotation.y += n * 5e-3);
|
|
233
|
-
}), /* @__PURE__ */ t(at, { ref: h, positions:
|
|
235
|
+
}), /* @__PURE__ */ t(at, { ref: h, positions: c, stride: 3, frustumCulled: !1, children: /* @__PURE__ */ t(
|
|
234
236
|
nt,
|
|
235
237
|
{
|
|
236
238
|
transparent: !0,
|
|
@@ -243,7 +245,7 @@ function Ge({ config: e }) {
|
|
|
243
245
|
) });
|
|
244
246
|
}
|
|
245
247
|
function Je({ config: e = {}, background: h }) {
|
|
246
|
-
return /* @__PURE__ */
|
|
248
|
+
return /* @__PURE__ */ m(
|
|
247
249
|
At,
|
|
248
250
|
{
|
|
249
251
|
camera: { position: [0, 0, 15], fov: 60 },
|
|
@@ -264,10 +266,10 @@ function Ue({
|
|
|
264
266
|
planet: e,
|
|
265
267
|
onClose: h,
|
|
266
268
|
onEnterPlanet: u,
|
|
267
|
-
onSatelliteClick:
|
|
269
|
+
onSatelliteClick: c
|
|
268
270
|
}) {
|
|
269
|
-
return /* @__PURE__ */
|
|
270
|
-
|
|
271
|
+
return /* @__PURE__ */ m(
|
|
272
|
+
I.div,
|
|
271
273
|
{
|
|
272
274
|
className: i.sidePanel,
|
|
273
275
|
initial: { x: 340 },
|
|
@@ -278,8 +280,8 @@ function Ue({
|
|
|
278
280
|
borderLeftColor: `${e.color}22`
|
|
279
281
|
},
|
|
280
282
|
children: [
|
|
281
|
-
/* @__PURE__ */
|
|
282
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ m("div", { className: i.sidePanelHeader, children: [
|
|
284
|
+
/* @__PURE__ */ m("div", { className: i.sidePanelTitle, children: [
|
|
283
285
|
/* @__PURE__ */ t(
|
|
284
286
|
"div",
|
|
285
287
|
{
|
|
@@ -291,27 +293,27 @@ function Ue({
|
|
|
291
293
|
children: e.icon ?? e.label[0]
|
|
292
294
|
}
|
|
293
295
|
),
|
|
294
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ m("div", { children: [
|
|
295
297
|
/* @__PURE__ */ t("div", { className: i.sidePanelName, children: e.label }),
|
|
296
298
|
/* @__PURE__ */ t("div", { className: i.sidePanelSubtitle, children: e.subtitle })
|
|
297
299
|
] })
|
|
298
300
|
] }),
|
|
299
301
|
/* @__PURE__ */ t("button", { className: i.sidePanelClose, onClick: h, children: "✕" })
|
|
300
302
|
] }),
|
|
301
|
-
/* @__PURE__ */ t("div", { className: i.sidePanelContent, children: /* @__PURE__ */ t("div", { className: i.satelliteList, children: e.satellites.map((o) => /* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ t("div", { className: i.sidePanelContent, children: /* @__PURE__ */ t("div", { className: i.satelliteList, children: e.satellites.map((o) => /* @__PURE__ */ m(
|
|
302
304
|
"div",
|
|
303
305
|
{
|
|
304
306
|
className: i.satelliteItem,
|
|
305
|
-
onClick: () =>
|
|
307
|
+
onClick: () => c == null ? void 0 : c({
|
|
306
308
|
planetId: e.id,
|
|
307
309
|
satelliteId: o.id,
|
|
308
310
|
satellite: o
|
|
309
311
|
}),
|
|
310
312
|
children: [
|
|
311
313
|
/* @__PURE__ */ t("div", { className: i.satelliteIcon, children: o.icon ?? "●" }),
|
|
312
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ m("div", { className: i.satelliteInfo, children: [
|
|
313
315
|
/* @__PURE__ */ t("div", { className: i.satelliteName, children: o.label }),
|
|
314
|
-
o.summary && /* @__PURE__ */
|
|
316
|
+
o.summary && /* @__PURE__ */ m("div", { className: i.satelliteSummary, children: [
|
|
315
317
|
o.summary.total != null && `${o.summary.total} total`,
|
|
316
318
|
o.summary.running != null && ` · ${o.summary.running} running`,
|
|
317
319
|
o.summary.failed != null && o.summary.failed > 0 && ` · ${o.summary.failed} failed`
|
|
@@ -321,7 +323,7 @@ function Ue({
|
|
|
321
323
|
},
|
|
322
324
|
o.id
|
|
323
325
|
)) }) }),
|
|
324
|
-
/* @__PURE__ */ t("div", { className: i.sidePanelFooter, children: /* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ t("div", { className: i.sidePanelFooter, children: /* @__PURE__ */ m(
|
|
325
327
|
"button",
|
|
326
328
|
{
|
|
327
329
|
className: i.enterButton,
|
|
@@ -341,35 +343,35 @@ function Ke({
|
|
|
341
343
|
planet: e,
|
|
342
344
|
onExit: h,
|
|
343
345
|
onSatelliteClick: u,
|
|
344
|
-
renderCustom:
|
|
346
|
+
renderCustom: c
|
|
345
347
|
}) {
|
|
346
|
-
const [o, n] =
|
|
347
|
-
if (
|
|
348
|
+
const [o, n] = Z(null);
|
|
349
|
+
if (c)
|
|
348
350
|
return /* @__PURE__ */ t(
|
|
349
|
-
|
|
351
|
+
I.div,
|
|
350
352
|
{
|
|
351
353
|
className: i.planetInterior,
|
|
352
354
|
initial: { opacity: 0 },
|
|
353
355
|
animate: { opacity: 1 },
|
|
354
356
|
exit: { opacity: 0 },
|
|
355
357
|
transition: { duration: 0.4 },
|
|
356
|
-
children:
|
|
358
|
+
children: c(e, h)
|
|
357
359
|
}
|
|
358
360
|
);
|
|
359
|
-
const d = e.satellites,
|
|
360
|
-
(
|
|
361
|
-
n(
|
|
362
|
-
const
|
|
361
|
+
const d = e.satellites, r = Math.max(180, d.length * 35), g = v(
|
|
362
|
+
(p) => {
|
|
363
|
+
n(p);
|
|
364
|
+
const f = d.find((w) => w.id === p);
|
|
363
365
|
u == null || u({
|
|
364
366
|
planetId: e.id,
|
|
365
|
-
satelliteId:
|
|
366
|
-
satellite:
|
|
367
|
+
satelliteId: p,
|
|
368
|
+
satellite: f
|
|
367
369
|
});
|
|
368
370
|
},
|
|
369
371
|
[e.id, d, u]
|
|
370
372
|
);
|
|
371
|
-
return /* @__PURE__ */
|
|
372
|
-
|
|
373
|
+
return /* @__PURE__ */ m(
|
|
374
|
+
I.div,
|
|
373
375
|
{
|
|
374
376
|
className: i.planetInterior,
|
|
375
377
|
initial: { opacity: 0 },
|
|
@@ -378,21 +380,21 @@ function Ke({
|
|
|
378
380
|
transition: { duration: 0.4 },
|
|
379
381
|
children: [
|
|
380
382
|
/* @__PURE__ */ t("button", { className: i.interiorBackButton, onClick: h, children: "← Back to Universe" }),
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
[1, 2, 3].map((
|
|
383
|
+
/* @__PURE__ */ m("div", { className: i.interiorCenter, children: [
|
|
384
|
+
[1, 2, 3].map((p) => /* @__PURE__ */ t(
|
|
383
385
|
"div",
|
|
384
386
|
{
|
|
385
387
|
className: i.orbitRing,
|
|
386
388
|
style: {
|
|
387
|
-
width:
|
|
388
|
-
height:
|
|
389
|
-
top: `calc(50% - ${
|
|
390
|
-
left: `calc(50% - ${
|
|
389
|
+
width: r * p * 0.7,
|
|
390
|
+
height: r * p * 0.7,
|
|
391
|
+
top: `calc(50% - ${r * p * 0.7 / 2}px)`,
|
|
392
|
+
left: `calc(50% - ${r * p * 0.7 / 2}px)`
|
|
391
393
|
}
|
|
392
394
|
},
|
|
393
|
-
|
|
395
|
+
p
|
|
394
396
|
)),
|
|
395
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ m(
|
|
396
398
|
"div",
|
|
397
399
|
{
|
|
398
400
|
className: i.interiorPlanet,
|
|
@@ -406,11 +408,11 @@ function Ke({
|
|
|
406
408
|
]
|
|
407
409
|
}
|
|
408
410
|
),
|
|
409
|
-
/* @__PURE__ */ t(A, { children: d.map((
|
|
410
|
-
var
|
|
411
|
-
const w =
|
|
412
|
-
return /* @__PURE__ */
|
|
413
|
-
|
|
411
|
+
/* @__PURE__ */ t(A, { children: d.map((p, f) => {
|
|
412
|
+
var l;
|
|
413
|
+
const w = f / d.length * Math.PI * 2 - Math.PI / 2, $ = Math.cos(w) * r, L = Math.sin(w) * r;
|
|
414
|
+
return /* @__PURE__ */ m(
|
|
415
|
+
I.div,
|
|
414
416
|
{
|
|
415
417
|
className: i.satelliteNode,
|
|
416
418
|
initial: { scale: 0, opacity: 0 },
|
|
@@ -419,32 +421,32 @@ function Ke({
|
|
|
419
421
|
type: "spring",
|
|
420
422
|
damping: 15,
|
|
421
423
|
stiffness: 200,
|
|
422
|
-
delay:
|
|
424
|
+
delay: f * 0.08
|
|
423
425
|
},
|
|
424
426
|
style: {
|
|
425
427
|
left: `calc(50% + ${$}px - 32px)`,
|
|
426
|
-
top: `calc(50% + ${
|
|
428
|
+
top: `calc(50% + ${L}px - 40px)`
|
|
427
429
|
},
|
|
428
|
-
onClick: () =>
|
|
430
|
+
onClick: () => g(p.id),
|
|
429
431
|
children: [
|
|
430
|
-
/* @__PURE__ */
|
|
432
|
+
/* @__PURE__ */ m(
|
|
431
433
|
"div",
|
|
432
434
|
{
|
|
433
435
|
className: i.satelliteNodeIcon,
|
|
434
436
|
style: {
|
|
435
|
-
borderColor: o ===
|
|
436
|
-
boxShadow: o ===
|
|
437
|
+
borderColor: o === p.id ? `${e.color}88` : "rgba(255,255,255,0.15)",
|
|
438
|
+
boxShadow: o === p.id ? `0 0 20px ${e.color}44` : "none"
|
|
437
439
|
},
|
|
438
440
|
children: [
|
|
439
|
-
|
|
440
|
-
((
|
|
441
|
+
p.icon ?? "●",
|
|
442
|
+
((l = p.summary) == null ? void 0 : l.running) != null && p.summary.running > 0 && /* @__PURE__ */ t("span", { className: i.satelliteNodeBadge, children: p.summary.running })
|
|
441
443
|
]
|
|
442
444
|
}
|
|
443
445
|
),
|
|
444
|
-
/* @__PURE__ */ t("span", { className: i.satelliteNodeLabel, children:
|
|
446
|
+
/* @__PURE__ */ t("span", { className: i.satelliteNodeLabel, children: p.label })
|
|
445
447
|
]
|
|
446
448
|
},
|
|
447
|
-
|
|
449
|
+
p.id
|
|
448
450
|
);
|
|
449
451
|
}) })
|
|
450
452
|
] })
|
|
@@ -452,9 +454,9 @@ function Ke({
|
|
|
452
454
|
}
|
|
453
455
|
);
|
|
454
456
|
}
|
|
455
|
-
function
|
|
457
|
+
function je({ planet: e }) {
|
|
456
458
|
return /* @__PURE__ */ t(
|
|
457
|
-
|
|
459
|
+
I.div,
|
|
458
460
|
{
|
|
459
461
|
className: i.zoomTransition,
|
|
460
462
|
initial: { opacity: 0 },
|
|
@@ -462,7 +464,7 @@ function Ve({ planet: e }) {
|
|
|
462
464
|
exit: { opacity: 0 },
|
|
463
465
|
transition: { duration: 0.9, ease: "easeInOut" },
|
|
464
466
|
children: /* @__PURE__ */ t(
|
|
465
|
-
|
|
467
|
+
I.span,
|
|
466
468
|
{
|
|
467
469
|
className: i.zoomPlanetLabel,
|
|
468
470
|
initial: { scale: 0.5, opacity: 0 },
|
|
@@ -479,19 +481,19 @@ function Ve({ planet: e }) {
|
|
|
479
481
|
}
|
|
480
482
|
);
|
|
481
483
|
}
|
|
482
|
-
function
|
|
484
|
+
function qe({
|
|
483
485
|
steps: e,
|
|
484
486
|
planets: h,
|
|
485
487
|
onHighlightPlanet: u,
|
|
486
|
-
onStepChange:
|
|
488
|
+
onStepChange: c,
|
|
487
489
|
onFinish: o,
|
|
488
490
|
flyTo: n
|
|
489
491
|
}) {
|
|
490
|
-
const [d,
|
|
491
|
-
(
|
|
492
|
-
if (
|
|
493
|
-
|
|
494
|
-
const N = e[
|
|
492
|
+
const [d, r] = Z("welcome"), [g, p] = Z(0), f = v(
|
|
493
|
+
(x) => {
|
|
494
|
+
if (x < 0 || x >= e.length) return;
|
|
495
|
+
p(x), c(x);
|
|
496
|
+
const N = e[x];
|
|
495
497
|
if (N.planetId) {
|
|
496
498
|
u(N.planetId);
|
|
497
499
|
const O = h.find((P) => P.id === N.planetId);
|
|
@@ -500,35 +502,35 @@ function je({
|
|
|
500
502
|
});
|
|
501
503
|
}
|
|
502
504
|
},
|
|
503
|
-
[e, h,
|
|
504
|
-
), w =
|
|
505
|
-
|
|
506
|
-
}, [
|
|
507
|
-
|
|
508
|
-
}, [
|
|
509
|
-
|
|
510
|
-
}, [
|
|
511
|
-
|
|
512
|
-
}, [
|
|
505
|
+
[e, h, c, u, n]
|
|
506
|
+
), w = v(() => {
|
|
507
|
+
r("stepping"), f(0);
|
|
508
|
+
}, [f]), $ = v(() => {
|
|
509
|
+
g < e.length - 1 ? f(g + 1) : (r("complete"), c(-1), u(null), n == null || n(800, 400, 0.8, 600), setTimeout(() => o(), 1500));
|
|
510
|
+
}, [g, e.length, f, c, u, o, n]), L = v(() => {
|
|
511
|
+
g > 0 && f(g - 1);
|
|
512
|
+
}, [g, f]), l = v(() => {
|
|
513
|
+
c(-1), u(null), n == null || n(800, 400, 0.8, 600), o();
|
|
514
|
+
}, [c, u, o, n]);
|
|
513
515
|
it(() => {
|
|
514
516
|
if (d !== "stepping") return;
|
|
515
|
-
const
|
|
516
|
-
N.key === "ArrowRight" || N.key === "Enter" ? $() : N.key === "ArrowLeft" ?
|
|
517
|
+
const x = (N) => {
|
|
518
|
+
N.key === "ArrowRight" || N.key === "Enter" ? $() : N.key === "ArrowLeft" ? L() : N.key === "Escape" && l();
|
|
517
519
|
};
|
|
518
|
-
return window.addEventListener("keydown",
|
|
519
|
-
}, [d, $,
|
|
520
|
-
const C = e[
|
|
521
|
-
return /* @__PURE__ */
|
|
520
|
+
return window.addEventListener("keydown", x), () => window.removeEventListener("keydown", x);
|
|
521
|
+
}, [d, $, L, l]);
|
|
522
|
+
const C = e[g], H = e.length > 0 ? (g + 1) / e.length * 100 : 0;
|
|
523
|
+
return /* @__PURE__ */ m(A, { mode: "wait", children: [
|
|
522
524
|
d === "welcome" && /* @__PURE__ */ t(
|
|
523
|
-
|
|
525
|
+
I.div,
|
|
524
526
|
{
|
|
525
527
|
className: i.tutorialOverlay,
|
|
526
528
|
initial: { opacity: 0 },
|
|
527
529
|
animate: { opacity: 1 },
|
|
528
530
|
exit: { opacity: 0 },
|
|
529
|
-
children: /* @__PURE__ */
|
|
531
|
+
children: /* @__PURE__ */ m("div", { className: i.tutorialWelcome, children: [
|
|
530
532
|
/* @__PURE__ */ t(
|
|
531
|
-
|
|
533
|
+
I.div,
|
|
532
534
|
{
|
|
533
535
|
initial: { scale: 0.8 },
|
|
534
536
|
animate: { scale: 1 },
|
|
@@ -539,13 +541,13 @@ function je({
|
|
|
539
541
|
),
|
|
540
542
|
/* @__PURE__ */ t("h1", { className: i.tutorialWelcomeTitle, children: "Welcome to the Cosmos" }),
|
|
541
543
|
/* @__PURE__ */ t("p", { className: i.tutorialWelcomeDesc, children: "Explore the universe of your platform. Each planet represents a domain, and satellites are the features within." }),
|
|
542
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ m("div", { className: i.tutorialActions, children: [
|
|
543
545
|
/* @__PURE__ */ t(
|
|
544
546
|
"button",
|
|
545
547
|
{
|
|
546
548
|
className: i.tutorialButton,
|
|
547
549
|
"data-variant": "ghost",
|
|
548
|
-
onClick:
|
|
550
|
+
onClick: l,
|
|
549
551
|
children: "SKIP"
|
|
550
552
|
}
|
|
551
553
|
),
|
|
@@ -563,8 +565,8 @@ function je({
|
|
|
563
565
|
},
|
|
564
566
|
"welcome"
|
|
565
567
|
),
|
|
566
|
-
d === "stepping" && C && /* @__PURE__ */
|
|
567
|
-
|
|
568
|
+
d === "stepping" && C && /* @__PURE__ */ m(
|
|
569
|
+
I.div,
|
|
568
570
|
{
|
|
569
571
|
className: i.tutorialCard,
|
|
570
572
|
initial: { opacity: 0, y: 20 },
|
|
@@ -589,38 +591,38 @@ function je({
|
|
|
589
591
|
"div",
|
|
590
592
|
{
|
|
591
593
|
className: i.tutorialProgressBar,
|
|
592
|
-
style: { width: `${
|
|
594
|
+
style: { width: `${H}%` }
|
|
593
595
|
}
|
|
594
596
|
) }),
|
|
595
|
-
/* @__PURE__ */
|
|
597
|
+
/* @__PURE__ */ m("div", { className: i.tutorialCardFooter, children: [
|
|
596
598
|
/* @__PURE__ */ t(
|
|
597
599
|
"button",
|
|
598
600
|
{
|
|
599
601
|
className: i.tutorialButton,
|
|
600
602
|
"data-variant": "ghost",
|
|
601
603
|
style: { padding: "0.375rem 0.75rem", fontSize: "0.6875rem" },
|
|
602
|
-
onClick:
|
|
604
|
+
onClick: l,
|
|
603
605
|
children: "SKIP"
|
|
604
606
|
}
|
|
605
607
|
),
|
|
606
|
-
/* @__PURE__ */ t("div", { className: i.tutorialDots, children: e.map((
|
|
608
|
+
/* @__PURE__ */ t("div", { className: i.tutorialDots, children: e.map((x, N) => /* @__PURE__ */ t(
|
|
607
609
|
"div",
|
|
608
610
|
{
|
|
609
611
|
className: i.tutorialDot,
|
|
610
|
-
"data-active": N ===
|
|
611
|
-
"data-done": N <
|
|
612
|
-
onClick: () =>
|
|
612
|
+
"data-active": N === g || void 0,
|
|
613
|
+
"data-done": N < g || void 0,
|
|
614
|
+
onClick: () => f(N)
|
|
613
615
|
},
|
|
614
616
|
N
|
|
615
617
|
)) }),
|
|
616
|
-
/* @__PURE__ */
|
|
617
|
-
|
|
618
|
+
/* @__PURE__ */ m("div", { style: { display: "flex", gap: "0.5rem" }, children: [
|
|
619
|
+
g > 0 && /* @__PURE__ */ t(
|
|
618
620
|
"button",
|
|
619
621
|
{
|
|
620
622
|
className: i.tutorialButton,
|
|
621
623
|
"data-variant": "ghost",
|
|
622
624
|
style: { padding: "0.375rem 0.75rem", fontSize: "0.75rem" },
|
|
623
|
-
onClick:
|
|
625
|
+
onClick: L,
|
|
624
626
|
children: "←"
|
|
625
627
|
}
|
|
626
628
|
),
|
|
@@ -631,17 +633,17 @@ function je({
|
|
|
631
633
|
"data-variant": "primary",
|
|
632
634
|
style: { padding: "0.375rem 0.75rem", fontSize: "0.75rem" },
|
|
633
635
|
onClick: $,
|
|
634
|
-
children:
|
|
636
|
+
children: g === e.length - 1 ? "Finish" : "→"
|
|
635
637
|
}
|
|
636
638
|
)
|
|
637
639
|
] })
|
|
638
640
|
] })
|
|
639
641
|
]
|
|
640
642
|
},
|
|
641
|
-
`step-${
|
|
643
|
+
`step-${g}`
|
|
642
644
|
),
|
|
643
645
|
d === "complete" && /* @__PURE__ */ t(
|
|
644
|
-
|
|
646
|
+
I.div,
|
|
645
647
|
{
|
|
646
648
|
className: i.tutorialOverlay,
|
|
647
649
|
initial: { opacity: 0 },
|
|
@@ -649,7 +651,7 @@ function je({
|
|
|
649
651
|
exit: { opacity: 0 },
|
|
650
652
|
transition: { duration: 1 },
|
|
651
653
|
children: /* @__PURE__ */ t(
|
|
652
|
-
|
|
654
|
+
I.h1,
|
|
653
655
|
{
|
|
654
656
|
className: i.tutorialWelcomeTitle,
|
|
655
657
|
initial: { scale: 0.8 },
|
|
@@ -663,38 +665,38 @@ function je({
|
|
|
663
665
|
)
|
|
664
666
|
] });
|
|
665
667
|
}
|
|
666
|
-
const
|
|
667
|
-
function
|
|
668
|
+
const Xe = { planet: Ze }, Qe = { orbit: Ve };
|
|
669
|
+
function Ye({
|
|
668
670
|
planets: e,
|
|
669
671
|
orbits: h,
|
|
670
672
|
onPlanetClick: u,
|
|
671
|
-
onPlanetEnter:
|
|
673
|
+
onPlanetEnter: c,
|
|
672
674
|
onPlanetExit: o,
|
|
673
675
|
onSatelliteClick: n,
|
|
674
676
|
onPlanetDrag: d,
|
|
675
|
-
tutorialSteps:
|
|
676
|
-
showTutorial:
|
|
677
|
-
onTutorialComplete:
|
|
678
|
-
initialView:
|
|
677
|
+
tutorialSteps: r,
|
|
678
|
+
showTutorial: g,
|
|
679
|
+
onTutorialComplete: p,
|
|
680
|
+
initialView: f,
|
|
679
681
|
onViewChange: w,
|
|
680
682
|
renderPlanetInterior: $,
|
|
681
|
-
topBar:
|
|
682
|
-
theme:
|
|
683
|
+
topBar: L,
|
|
684
|
+
theme: l,
|
|
683
685
|
starField: C = !0,
|
|
684
|
-
nodeTypes:
|
|
685
|
-
edgeTypes:
|
|
686
|
+
nodeTypes: H,
|
|
687
|
+
edgeTypes: x,
|
|
686
688
|
className: N,
|
|
687
689
|
style: O
|
|
688
690
|
}) {
|
|
689
|
-
const [P,
|
|
691
|
+
const [P, lt] = Z(f ?? { mode: "universe" }), [V, rt] = Z(g ?? !1), { setCenter: B, fitView: _ } = zt(), S = v(
|
|
690
692
|
(a) => {
|
|
691
|
-
|
|
693
|
+
lt(a), w == null || w(a);
|
|
692
694
|
},
|
|
693
695
|
[w]
|
|
694
|
-
), E =
|
|
695
|
-
(a) => e.find((
|
|
696
|
+
), E = v(
|
|
697
|
+
(a) => e.find((s) => s.id === a),
|
|
696
698
|
[e]
|
|
697
|
-
),
|
|
699
|
+
), ct = W(
|
|
698
700
|
() => e.map((a) => ({
|
|
699
701
|
id: a.id,
|
|
700
702
|
type: "planet",
|
|
@@ -708,9 +710,9 @@ function Ze({
|
|
|
708
710
|
}
|
|
709
711
|
})),
|
|
710
712
|
[e]
|
|
711
|
-
),
|
|
712
|
-
() => h.map((a,
|
|
713
|
-
id: `orbit-${
|
|
713
|
+
), st = W(
|
|
714
|
+
() => h.map((a, s) => ({
|
|
715
|
+
id: `orbit-${s}`,
|
|
714
716
|
source: a.source,
|
|
715
717
|
target: a.target,
|
|
716
718
|
type: "orbit",
|
|
@@ -718,142 +720,142 @@ function Ze({
|
|
|
718
720
|
animated: !0
|
|
719
721
|
})),
|
|
720
722
|
[h]
|
|
721
|
-
), [
|
|
723
|
+
), [J, D, dt] = $t(ct), [ut, U, mt] = Dt(st), z = v(
|
|
722
724
|
(a) => {
|
|
723
|
-
|
|
724
|
-
(
|
|
725
|
-
...
|
|
726
|
-
data: { ...
|
|
725
|
+
D(
|
|
726
|
+
(s) => s.map((y) => ({
|
|
727
|
+
...y,
|
|
728
|
+
data: { ...y.data, isSelected: y.id === a }
|
|
727
729
|
}))
|
|
728
730
|
);
|
|
729
731
|
},
|
|
730
|
-
[
|
|
731
|
-
), pt =
|
|
732
|
-
|
|
733
|
-
(a) => a.map((
|
|
734
|
-
const
|
|
735
|
-
return
|
|
732
|
+
[D]
|
|
733
|
+
), pt = v(() => {
|
|
734
|
+
D(
|
|
735
|
+
(a) => a.map((s) => {
|
|
736
|
+
const y = e.find((M) => M.id === s.id);
|
|
737
|
+
return y ? { ...s, position: { x: y.x, y: y.y } } : s;
|
|
736
738
|
})
|
|
737
|
-
), setTimeout(() =>
|
|
738
|
-
}, [e,
|
|
739
|
-
const a =
|
|
739
|
+
), setTimeout(() => _({ duration: 600, padding: 0.2 }), 50);
|
|
740
|
+
}, [e, D, _]), ht = v(() => {
|
|
741
|
+
const a = J.length;
|
|
740
742
|
if (a === 0) return;
|
|
741
|
-
const
|
|
742
|
-
|
|
743
|
-
(
|
|
744
|
-
const F = 2 * Math.PI *
|
|
743
|
+
const s = 800, y = 400, M = Math.max(200, a * 40);
|
|
744
|
+
D(
|
|
745
|
+
(G) => G.map((k, b) => {
|
|
746
|
+
const F = 2 * Math.PI * b / a - Math.PI / 2;
|
|
745
747
|
return {
|
|
746
|
-
...
|
|
748
|
+
...k,
|
|
747
749
|
position: {
|
|
748
|
-
x:
|
|
749
|
-
y:
|
|
750
|
+
x: s + M * Math.cos(F),
|
|
751
|
+
y: y + M * Math.sin(F)
|
|
750
752
|
}
|
|
751
753
|
};
|
|
752
754
|
})
|
|
753
|
-
), setTimeout(() =>
|
|
754
|
-
}, [
|
|
755
|
+
), setTimeout(() => _({ duration: 600, padding: 0.2 }), 50);
|
|
756
|
+
}, [J.length, D, _]), ft = v(
|
|
755
757
|
(a) => {
|
|
756
|
-
var
|
|
757
|
-
if (!
|
|
758
|
+
var G;
|
|
759
|
+
if (!r) return;
|
|
758
760
|
if (a < 0) {
|
|
759
|
-
|
|
760
|
-
(
|
|
761
|
-
...
|
|
762
|
-
data: { ...
|
|
761
|
+
D(
|
|
762
|
+
(k) => k.map((b) => ({
|
|
763
|
+
...b,
|
|
764
|
+
data: { ...b.data, status: "idle", isSelected: !1 }
|
|
763
765
|
}))
|
|
764
|
-
),
|
|
765
|
-
(
|
|
766
|
-
...
|
|
766
|
+
), U(
|
|
767
|
+
(k) => k.map((b) => ({
|
|
768
|
+
...b,
|
|
767
769
|
animated: !0,
|
|
768
|
-
data: { ...
|
|
770
|
+
data: { ...b.data, isActive: !1, isDimmed: !1 }
|
|
769
771
|
}))
|
|
770
772
|
);
|
|
771
773
|
return;
|
|
772
774
|
}
|
|
773
|
-
const
|
|
774
|
-
|
|
775
|
-
(
|
|
775
|
+
const s = new Set(r.slice(0, a).map((k) => k.planetId)), y = (G = r[a]) == null ? void 0 : G.planetId;
|
|
776
|
+
D(
|
|
777
|
+
(k) => k.map((b) => {
|
|
776
778
|
let F = "idle";
|
|
777
|
-
return
|
|
778
|
-
...
|
|
779
|
-
data: { ...
|
|
779
|
+
return b.id === y ? F = "running" : s.has(b.id) && (F = "success"), {
|
|
780
|
+
...b,
|
|
781
|
+
data: { ...b.data, status: F, isSelected: b.id === y }
|
|
780
782
|
};
|
|
781
783
|
})
|
|
782
784
|
);
|
|
783
|
-
const
|
|
784
|
-
|
|
785
|
-
(
|
|
786
|
-
const F =
|
|
785
|
+
const M = /* @__PURE__ */ new Set([...s, y]);
|
|
786
|
+
U(
|
|
787
|
+
(k) => k.map((b) => {
|
|
788
|
+
const F = s.has(b.source), St = M.has(b.target), q = F && St;
|
|
787
789
|
return {
|
|
788
|
-
...
|
|
789
|
-
animated:
|
|
790
|
-
data: { ...
|
|
790
|
+
...b,
|
|
791
|
+
animated: q,
|
|
792
|
+
data: { ...b.data, isActive: q, isDimmed: !q }
|
|
791
793
|
};
|
|
792
794
|
})
|
|
793
795
|
);
|
|
794
796
|
},
|
|
795
|
-
[
|
|
796
|
-
),
|
|
797
|
+
[r, D, U]
|
|
798
|
+
), K = v(
|
|
797
799
|
(a) => {
|
|
798
|
-
|
|
799
|
-
|
|
800
|
+
S({ mode: "entering", planetId: a.id }), z(null), c == null || c(a), B(a.x + 50, a.y + 50, { zoom: 6, duration: 800 }), setTimeout(() => {
|
|
801
|
+
S({ mode: "planet", planetId: a.id });
|
|
800
802
|
}, 900);
|
|
801
803
|
},
|
|
802
|
-
[
|
|
803
|
-
),
|
|
804
|
-
(a,
|
|
805
|
-
|
|
806
|
-
const
|
|
807
|
-
|
|
804
|
+
[B, z, S, c]
|
|
805
|
+
), yt = v(
|
|
806
|
+
(a, s) => {
|
|
807
|
+
S({ mode: "inspecting", planetId: s.id }), z(s.id), B(s.position.x + 50, s.position.y + 50, { zoom: 1.5, duration: 600 });
|
|
808
|
+
const y = E(s.id);
|
|
809
|
+
y && (u == null || u(y));
|
|
808
810
|
},
|
|
809
|
-
[
|
|
810
|
-
),
|
|
811
|
-
(a,
|
|
812
|
-
const
|
|
813
|
-
|
|
811
|
+
[z, E, S, u, B]
|
|
812
|
+
), gt = v(
|
|
813
|
+
(a, s) => {
|
|
814
|
+
const y = E(s.id);
|
|
815
|
+
y && K(y);
|
|
814
816
|
},
|
|
815
|
-
[E,
|
|
816
|
-
),
|
|
817
|
-
|
|
818
|
-
|
|
817
|
+
[E, K]
|
|
818
|
+
), j = v(() => {
|
|
819
|
+
S({ mode: "universe" }), o == null || o(), setTimeout(() => {
|
|
820
|
+
B(800, 400, { zoom: 0.8, duration: 600 });
|
|
819
821
|
}, 100);
|
|
820
|
-
}, [
|
|
821
|
-
(a,
|
|
822
|
-
d == null || d(
|
|
822
|
+
}, [B, S, o]), vt = v(
|
|
823
|
+
(a, s) => {
|
|
824
|
+
d == null || d(s.id, { x: s.position.x, y: s.position.y });
|
|
823
825
|
},
|
|
824
826
|
[d]
|
|
825
|
-
),
|
|
826
|
-
P.mode === "inspecting" && (
|
|
827
|
-
}, [P,
|
|
828
|
-
(a,
|
|
829
|
-
|
|
827
|
+
), bt = v(() => {
|
|
828
|
+
P.mode === "inspecting" && (S({ mode: "universe" }), z(null), B(800, 400, { zoom: 0.8, duration: 600 }));
|
|
829
|
+
}, [P, z, S, B]), Nt = v(
|
|
830
|
+
(a, s, y, M) => {
|
|
831
|
+
B(a, s, { zoom: y, duration: M });
|
|
830
832
|
},
|
|
831
|
-
[
|
|
833
|
+
[B]
|
|
832
834
|
);
|
|
833
835
|
it(() => {
|
|
834
|
-
const a = (
|
|
835
|
-
|
|
836
|
+
const a = (s) => {
|
|
837
|
+
s.key === "Escape" && (V || (P.mode === "inspecting" ? (S({ mode: "universe" }), z(null), B(800, 400, { zoom: 0.8, duration: 600 })) : P.mode === "planet" && j()));
|
|
836
838
|
};
|
|
837
839
|
return window.addEventListener("keydown", a), () => window.removeEventListener("keydown", a);
|
|
838
|
-
}, [P,
|
|
840
|
+
}, [P, V, S, z, B, j]);
|
|
839
841
|
const R = P.mode !== "universe" ? E(P.planetId) : void 0, Pt = P.mode !== "planet", wt = W(
|
|
840
|
-
() => ({ ...
|
|
841
|
-
[
|
|
842
|
+
() => ({ ...Xe, ...H }),
|
|
843
|
+
[H]
|
|
842
844
|
), Ct = W(
|
|
843
|
-
() => ({ ...
|
|
844
|
-
[
|
|
845
|
-
),
|
|
846
|
-
return
|
|
845
|
+
() => ({ ...Qe, ...x }),
|
|
846
|
+
[x]
|
|
847
|
+
), Bt = C !== !1, xt = typeof C == "object" ? C : {}, T = {};
|
|
848
|
+
return l != null && l.background && (T["--cc-bg"] = l.background), l != null && l.textColor && (T["--cc-text"] = l.textColor), l != null && l.panelBackground && (T["--cc-panel-bg"] = l.panelBackground), l != null && l.panelBorder && (T["--cc-panel-border"] = l.panelBorder), l != null && l.controlsBackground && (T["--cc-controls-bg"] = l.controlsBackground), l != null && l.fontFamily && (T["--cc-font-family"] = l.fontFamily), /* @__PURE__ */ m(
|
|
847
849
|
"div",
|
|
848
850
|
{
|
|
849
851
|
className: `${i.root} ${N ?? ""}`,
|
|
850
852
|
style: { ...T, ...O },
|
|
851
853
|
children: [
|
|
852
|
-
|
|
854
|
+
Bt && /* @__PURE__ */ t("div", { className: i.layerStarField, children: /* @__PURE__ */ t(
|
|
853
855
|
Je,
|
|
854
856
|
{
|
|
855
|
-
config:
|
|
856
|
-
background:
|
|
857
|
+
config: xt,
|
|
858
|
+
background: l == null ? void 0 : l.background
|
|
857
859
|
}
|
|
858
860
|
) }),
|
|
859
861
|
/* @__PURE__ */ t(
|
|
@@ -861,17 +863,17 @@ function Ze({
|
|
|
861
863
|
{
|
|
862
864
|
className: i.layerReactFlow,
|
|
863
865
|
"data-hidden": !Pt || void 0,
|
|
864
|
-
children: /* @__PURE__ */
|
|
865
|
-
|
|
866
|
+
children: /* @__PURE__ */ m(
|
|
867
|
+
Mt,
|
|
866
868
|
{
|
|
867
|
-
nodes:
|
|
869
|
+
nodes: J,
|
|
868
870
|
edges: ut,
|
|
869
871
|
onNodesChange: dt,
|
|
870
872
|
onEdgesChange: mt,
|
|
871
|
-
onNodeClick:
|
|
872
|
-
onNodeDoubleClick:
|
|
873
|
-
onNodeDragStop:
|
|
874
|
-
onPaneClick:
|
|
873
|
+
onNodeClick: yt,
|
|
874
|
+
onNodeDoubleClick: gt,
|
|
875
|
+
onNodeDragStop: vt,
|
|
876
|
+
onPaneClick: bt,
|
|
875
877
|
nodeTypes: wt,
|
|
876
878
|
edgeTypes: Ct,
|
|
877
879
|
nodesDraggable: !0,
|
|
@@ -892,7 +894,7 @@ function Ze({
|
|
|
892
894
|
color: "rgba(255, 255, 255, 0.05)"
|
|
893
895
|
}
|
|
894
896
|
),
|
|
895
|
-
/* @__PURE__ */
|
|
897
|
+
/* @__PURE__ */ m(
|
|
896
898
|
Tt,
|
|
897
899
|
{
|
|
898
900
|
style: { top: 60 },
|
|
@@ -913,7 +915,7 @@ function Ze({
|
|
|
913
915
|
className: "react-flow__controls-button",
|
|
914
916
|
onClick: ht,
|
|
915
917
|
title: "Auto layout",
|
|
916
|
-
children: /* @__PURE__ */
|
|
918
|
+
children: /* @__PURE__ */ m("svg", { viewBox: "0 0 24 24", width: "16", height: "16", fill: "currentColor", children: [
|
|
917
919
|
/* @__PURE__ */ t("circle", { cx: "12", cy: "3", r: "2" }),
|
|
918
920
|
/* @__PURE__ */ t("circle", { cx: "19.8", cy: "8", r: "2" }),
|
|
919
921
|
/* @__PURE__ */ t("circle", { cx: "17.6", cy: "17", r: "2" }),
|
|
@@ -930,8 +932,8 @@ function Ze({
|
|
|
930
932
|
Wt,
|
|
931
933
|
{
|
|
932
934
|
nodeColor: (a) => {
|
|
933
|
-
var
|
|
934
|
-
return ((
|
|
935
|
+
var s;
|
|
936
|
+
return ((s = a.data) == null ? void 0 : s.color) || "#666";
|
|
935
937
|
},
|
|
936
938
|
maskColor: "rgba(10, 10, 26, 0.7)",
|
|
937
939
|
style: {
|
|
@@ -944,12 +946,12 @@ function Ze({
|
|
|
944
946
|
)
|
|
945
947
|
}
|
|
946
948
|
),
|
|
947
|
-
/* @__PURE__ */ t(A, { children: P.mode === "entering" && R && /* @__PURE__ */ t(
|
|
949
|
+
/* @__PURE__ */ t(A, { children: P.mode === "entering" && R && /* @__PURE__ */ t(je, { planet: R }) }),
|
|
948
950
|
/* @__PURE__ */ t(A, { children: P.mode === "planet" && R && /* @__PURE__ */ t(
|
|
949
951
|
Ke,
|
|
950
952
|
{
|
|
951
953
|
planet: R,
|
|
952
|
-
onExit:
|
|
954
|
+
onExit: j,
|
|
953
955
|
onSatelliteClick: n,
|
|
954
956
|
renderCustom: $
|
|
955
957
|
}
|
|
@@ -959,22 +961,47 @@ function Ze({
|
|
|
959
961
|
{
|
|
960
962
|
planet: R,
|
|
961
963
|
onClose: () => {
|
|
962
|
-
|
|
964
|
+
S({ mode: "universe" }), z(null), B(800, 400, { zoom: 0.8, duration: 600 });
|
|
963
965
|
},
|
|
964
|
-
onEnterPlanet: () =>
|
|
966
|
+
onEnterPlanet: () => K(R),
|
|
965
967
|
onSatelliteClick: n
|
|
966
968
|
}
|
|
967
969
|
) }),
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
970
|
+
!V && P.mode !== "planet" && P.mode !== "entering" && /* @__PURE__ */ m("div", { className: i.topBarSlot, children: [
|
|
971
|
+
/* @__PURE__ */ m(
|
|
972
|
+
"svg",
|
|
973
|
+
{
|
|
974
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
975
|
+
viewBox: "0 0 4663.4 712.56",
|
|
976
|
+
className: i.topBarLogo,
|
|
977
|
+
"aria-label": "EZ PLANET",
|
|
978
|
+
children: [
|
|
979
|
+
/* @__PURE__ */ t("path", { fill: "#f4ca1c", d: "m321.4,57.26v132.63c-65.92,13.79-117.88,65.75-131.51,131.51H57.09c-21.33,0-38.65-17.32-38.65-38.65V57.26c0-21.49,17.32-38.81,38.65-38.81h225.49c21.49,0,38.81,17.32,38.81,38.81Z" }),
|
|
980
|
+
/* @__PURE__ */ t("path", { fill: "#6c9cf5", d: "m693.95,429.81v225.49c0,21.33-17.32,38.81-38.81,38.81h-225.33c-21.49,0-38.81-17.48-38.81-38.81v-132.79c65.92-13.63,117.88-65.59,131.35-131.51h132.79c21.49,0,38.81,17.48,38.81,38.81Z" }),
|
|
981
|
+
/* @__PURE__ */ t("path", { fill: "#ef3a65", d: "m712.4,170c0,93.82-76.02,169.84-169.84,169.84-5.93,0-11.71-.32-17.48-.8-.8-8.66-2.25-17.16-4.33-25.5,4.17-5.61,8.18-11.23,12.03-16.84,56.45-80.03,80.19-147.39,55.33-172.25-25.02-24.86-92.54-.96-172.57,55.17,9.46,3.21,18.6,7.22,27.26,11.71,25.66-8.98,46.03-8.82,56.93,2.08,9.94,9.94,10.91,27.42,4.33,49.56-1.6,5.93-3.85,12.19-6.74,18.76-18.28-27.26-44.1-48.92-74.74-61.91-7.54-3.21-15.4-5.93-23.58-8.02-8.34-2.08-16.84-3.69-25.66-4.49-.48-5.61-.8-11.55-.8-17.32C372.56,76.02,448.58,0,542.56,0s169.84,76.02,169.84,170Z" }),
|
|
982
|
+
/* @__PURE__ */ t("path", { fill: "#13c0a4", d: "m339.84,542.56c0,93.82-76.18,170-170,170S0,636.38,0,542.56s76.02-169.84,169.84-169.84c5.77,0,11.71.32,17.32.8.8,8.82,2.41,17.32,4.49,25.66,2.08,8.02,4.81,15.72,8.02,23.25v.16c12.99,30.47,34.64,56.45,61.91,74.9-6.42,2.89-12.67,4.97-18.6,6.74-22.29,6.58-39.77,5.61-49.72-4.33-10.91-10.91-11.07-31.27-2.08-56.93-4.49-8.66-8.34-17.64-11.55-27.1-56.45,80.03-80.19,147.39-55.33,172.25,24.86,25.02,92.38,1.12,172.41-55.17,5.45-3.85,11.07-7.86,16.68-12.19,8.34,2.08,16.84,3.69,25.66,4.49.48,5.61.8,11.39.8,17.32Z" }),
|
|
983
|
+
/* @__PURE__ */ t("path", { fill: "#fff", d: "m2302.63,147.09h-214.46v73.14h217.55c39.67,0,57.64,25.41,57.64,55.78s-16.73,57.64-58.26,57.64h-150.61c-45.87,0-65.7,19.21-65.7,66.32v165.49h73.14v-151.24c0-7.44,3.72-10.54,10.54-10.54h130.16c97.93,0,134.5-68.18,134.5-131.4,0-66.94-40.29-125.2-134.5-125.2Z" }),
|
|
984
|
+
/* @__PURE__ */ t("path", { fill: "#fff", d: "m2579.65,420.43V147.09h-73.14v273.96c0,83.67,43.39,144.42,154.33,144.42h166.73v-73.14h-162.39c-65.7,0-85.53-31.61-85.53-71.9Z" }),
|
|
985
|
+
/* @__PURE__ */ t("path", { fill: "#fff", d: "m3111.79,139.65c-44.01,0-72.52,14.88-88.01,53.92l-146.9,371.89h80.58l132.64-336.56c4.34-9.92,11.16-14.25,21.07-14.25s16.74,4.34,20.45,14.25l127.06,336.56h81.2l-141.32-371.89c-14.88-39.05-43.39-53.92-86.77-53.92Z" }),
|
|
986
|
+
/* @__PURE__ */ t("path", { fill: "#fff", d: "m3772.95,478.07c0,14.26-9.3,23.55-24.79,23.55-13.64,0-21.69-7.44-26.65-17.35l-122.1-267.14c-17.35-47.73-43.39-77.48-101.65-77.48-65.08,0-96.07,36.57-96.07,91.11v334.7h73.14V234.49c0-14.88,8.68-24.17,25.41-24.17,13.02,0,20.45,5.58,26.03,17.97l122.1,267.14c17.35,47.73,44.01,77.48,102.27,77.48,64.46,0,96.07-36.57,96.07-91.73V147.09h-73.76v330.98Z" }),
|
|
987
|
+
/* @__PURE__ */ t("polygon", { fill: "#fff", points: "4345.44 147.09 4345.44 220.23 4467.54 220.23 4467.54 565.47 4541.3 565.47 4541.3 220.23 4663.4 220.23 4663.4 147.09 4345.44 147.09" }),
|
|
988
|
+
/* @__PURE__ */ t("path", { fill: "#fff", d: "m1164.31,221.17h211.98v-73.14h-216.32c-110.95,0-154.33,60.74-154.33,144.42v128.61c0,83.67,43.39,144.41,154.33,144.41h216.32v-73.14h-211.98c-65.7,0-85.53-31.61-85.53-71.9v-32.98h247.92v-69.79h-247.92v-24.6c0-40.29,19.83-71.9,85.53-71.9Z" }),
|
|
989
|
+
/* @__PURE__ */ t("path", { fill: "#fff", d: "m4087.26,221.17h192.86v-73.14h-197.2c-110.95,0-154.33,60.74-154.33,144.42v128.61c0,83.67,43.39,144.41,154.33,144.41h197.2v-73.14h-192.86c-65.7,0-85.53-31.61-85.53-71.9v-32.98h247.92v-69.79h-247.92v-24.6c0-40.29,19.83-71.9,85.53-71.9Z" }),
|
|
990
|
+
/* @__PURE__ */ t("path", { fill: "#fff", d: "m1737.69,149.2c66.6,0,101.14,33.3,101.14,91.27,0,47.48-22.2,78.32-66.6,97.44l-226.94,96.82c-12.95,5.55-20.97,16.65-20.97,30.83,0,16.03,10.48,27.13,30.83,27.13h274.43v72.77h-279.36c-66.6,0-100.52-33.3-100.52-91.27,0-47.48,22.2-78.32,67.22-97.44l225.71-96.82c13.57-5.55,21.58-16.65,21.58-30.83,0-16.03-10.48-27.13-31.45-27.13h-268.26v-72.77h273.19Z" })
|
|
991
|
+
]
|
|
992
|
+
}
|
|
993
|
+
),
|
|
994
|
+
L && /* @__PURE__ */ t("div", { className: i.topBarContent, children: L })
|
|
995
|
+
] }),
|
|
996
|
+
/* @__PURE__ */ t(A, { children: V && r && r.length > 0 && /* @__PURE__ */ t(
|
|
997
|
+
qe,
|
|
971
998
|
{
|
|
972
|
-
steps:
|
|
999
|
+
steps: r,
|
|
973
1000
|
planets: e,
|
|
974
|
-
onHighlightPlanet:
|
|
975
|
-
onStepChange:
|
|
1001
|
+
onHighlightPlanet: z,
|
|
1002
|
+
onStepChange: ft,
|
|
976
1003
|
onFinish: () => {
|
|
977
|
-
|
|
1004
|
+
rt(!1), p == null || p();
|
|
978
1005
|
},
|
|
979
1006
|
flyTo: Nt
|
|
980
1007
|
}
|
|
@@ -983,16 +1010,16 @@ function Ze({
|
|
|
983
1010
|
}
|
|
984
1011
|
);
|
|
985
1012
|
}
|
|
986
|
-
function
|
|
987
|
-
return /* @__PURE__ */ t(
|
|
1013
|
+
function li(e) {
|
|
1014
|
+
return /* @__PURE__ */ t(Lt, { children: /* @__PURE__ */ t(Ye, { ...e }) });
|
|
988
1015
|
}
|
|
989
1016
|
export {
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1017
|
+
li as CosmosCanvas,
|
|
1018
|
+
qe as CosmosTutorial,
|
|
1019
|
+
Ve as OrbitEdge,
|
|
993
1020
|
Ke as PlanetInterior,
|
|
994
|
-
|
|
1021
|
+
Ze as PlanetNode,
|
|
995
1022
|
Ue as SidePanel,
|
|
996
1023
|
Je as StarField,
|
|
997
|
-
|
|
1024
|
+
je as ZoomTransition
|
|
998
1025
|
};
|