@pieai/swimmer-ui-kit 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -2
- package/README.md +3 -3
- package/dist/GameAvatar-Cs5KVYFf.js +923 -0
- package/dist/GameStageTile-BtBb8NEw.js +687 -0
- package/dist/{LiquidGroup-BXw1tv9H.js → LiquidGroup-RTK_Uvgw.js} +845 -376
- package/dist/index.d.ts +66 -1
- package/dist/index.js +520 -313
- package/dist/liquid-effects.js +36 -37
- package/dist/liquid-presence.d.ts +48 -0
- package/dist/liquid-presence.js +584 -413
- package/dist/preview.js +132 -132
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/GameStageTile-DwU_Vvi8.js +0 -1597
- package/dist/reducedMotion-B8kv-v64.js +0 -473
package/dist/index.js
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { createElement as ae, forwardRef as oe, useCallback as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { FloatingPortal as
|
|
2
|
+
import { S as e, a as t, t as n } from "./LiquidGroup-RTK_Uvgw.js";
|
|
3
|
+
import { C as r, D as i, E as a, S as o, T as s, _ as c, a as l, b as u, c as d, d as f, f as p, g as m, h, i as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, x as D, y as O } from "./GameStageTile-BtBb8NEw.js";
|
|
4
|
+
import { c as k, f as A, h as j, i as M, m as ee, n as N, o as P, p as te, r as F, s as I, t as ne, y as re } from "./GameAvatar-Cs5KVYFf.js";
|
|
5
|
+
import { cloneElement as ie, createElement as ae, forwardRef as oe, useCallback as L, useEffect as R, useId as z, useLayoutEffect as se, useRef as B, useState as V } from "react";
|
|
6
|
+
import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
7
|
+
import { FloatingFocusManager as ce, FloatingPortal as G, autoUpdate as K, flip as q, offset as J, safePolygon as Y, shift as X, useClick as le, useDismiss as Z, useFloating as Q, useFocus as ue, useHover as de, useInteractions as fe, useRole as pe } from "@floating-ui/react";
|
|
8
8
|
//#region src/controls/GameListRow/GameListRow.tsx
|
|
9
|
-
function
|
|
10
|
-
let
|
|
11
|
-
|
|
9
|
+
function me({ title: e, description: t, thumbnail: n, current: r = !1, selected: i, disabled: a = !1, onSelect: o, selectLabel: s, actions: c, className: l, hue: u, ...d }) {
|
|
10
|
+
let f = B(null), p = /* @__PURE__ */ W(H, { children: [
|
|
11
|
+
n ? /* @__PURE__ */ U("span", {
|
|
12
12
|
className: "game-ui-list-row-thumbnail",
|
|
13
|
-
children:
|
|
13
|
+
children: n
|
|
14
14
|
}) : null,
|
|
15
|
-
/* @__PURE__ */
|
|
15
|
+
/* @__PURE__ */ W("span", {
|
|
16
16
|
className: "game-ui-list-row-copy",
|
|
17
|
-
children: [/* @__PURE__ */
|
|
17
|
+
children: [/* @__PURE__ */ U("span", {
|
|
18
18
|
className: "game-ui-list-row-title",
|
|
19
19
|
children: e
|
|
20
|
-
}),
|
|
20
|
+
}), t ? /* @__PURE__ */ U("span", {
|
|
21
21
|
className: "game-ui-list-row-description",
|
|
22
|
-
children:
|
|
22
|
+
children: t
|
|
23
23
|
}) : null]
|
|
24
24
|
}),
|
|
25
|
-
|
|
25
|
+
r ? /* @__PURE__ */ U("span", {
|
|
26
26
|
className: "game-ui-list-row-current",
|
|
27
27
|
"aria-hidden": "true"
|
|
28
28
|
}) : null
|
|
29
29
|
] });
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
...
|
|
32
|
-
className: ["game-ui-list-row",
|
|
33
|
-
"data-selected":
|
|
34
|
-
"data-game-ui-disabled":
|
|
30
|
+
return /* @__PURE__ */ W("div", {
|
|
31
|
+
...d,
|
|
32
|
+
className: ["game-ui-list-row", l].filter(Boolean).join(" "),
|
|
33
|
+
"data-selected": i || void 0,
|
|
34
|
+
"data-game-ui-disabled": a || void 0,
|
|
35
35
|
"data-game-ui-paint": "",
|
|
36
36
|
style: {
|
|
37
|
-
...
|
|
38
|
-
...
|
|
37
|
+
...P(u),
|
|
38
|
+
...d.style
|
|
39
39
|
},
|
|
40
40
|
children: [
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
static: !
|
|
43
|
-
pressTarget:
|
|
41
|
+
/* @__PURE__ */ U(I, {
|
|
42
|
+
static: !o,
|
|
43
|
+
pressTarget: f
|
|
44
44
|
}),
|
|
45
|
-
|
|
45
|
+
o ? /* @__PURE__ */ W("button", {
|
|
46
46
|
type: "button",
|
|
47
47
|
className: "game-ui-list-row-main",
|
|
48
|
-
ref:
|
|
49
|
-
onClick:
|
|
50
|
-
disabled:
|
|
51
|
-
"aria-label":
|
|
52
|
-
"aria-current":
|
|
53
|
-
"aria-pressed":
|
|
54
|
-
children: [
|
|
55
|
-
}) : /* @__PURE__ */
|
|
48
|
+
ref: f,
|
|
49
|
+
onClick: o,
|
|
50
|
+
disabled: a,
|
|
51
|
+
"aria-label": s,
|
|
52
|
+
"aria-current": r ? "true" : void 0,
|
|
53
|
+
"aria-pressed": i,
|
|
54
|
+
children: [p, /* @__PURE__ */ U(k, {})]
|
|
55
|
+
}) : /* @__PURE__ */ W("div", {
|
|
56
56
|
className: "game-ui-list-row-main",
|
|
57
|
-
"aria-current":
|
|
58
|
-
children: [
|
|
57
|
+
"aria-current": r ? "true" : void 0,
|
|
58
|
+
children: [p, /* @__PURE__ */ U(k, {})]
|
|
59
59
|
}),
|
|
60
|
-
|
|
60
|
+
c ? /* @__PURE__ */ U("div", {
|
|
61
61
|
className: "game-ui-list-row-actions",
|
|
62
|
-
children:
|
|
62
|
+
children: c
|
|
63
63
|
}) : null
|
|
64
64
|
]
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/controls/GameOtpInput/GameOtpInput.tsx
|
|
69
|
-
function
|
|
69
|
+
function he(e) {
|
|
70
70
|
return e.normalize("NFKC").replace(/[^0-9]/g, "");
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function ge({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i = !1, disabled: a = !1, readOnly: o = !1, getSlotLabel: s = (e, t) => `${e + 1} / ${t}`, getSlotDescription: c, className: l, "aria-describedby": u, ...d }) {
|
|
73
73
|
if (!Number.isSafeInteger(e) || e < 1 || e > 32) throw RangeError("GameOtpInput length must be an integer from 1 to 32.");
|
|
74
|
-
let f =
|
|
74
|
+
let f = z(), p = B([]), m = B(!1), [h, g] = V(null), _ = he(t).slice(0, e), v = (t) => {
|
|
75
75
|
let n = p.current[Math.max(0, Math.min(t, e - 1))];
|
|
76
76
|
n?.focus(), n?.select();
|
|
77
77
|
}, y = (t) => {
|
|
78
78
|
t !== _ && (n(t), t.length === e && r?.(t));
|
|
79
79
|
}, b = (t, n) => {
|
|
80
80
|
if (a || o) return;
|
|
81
|
-
let r =
|
|
81
|
+
let r = he(n);
|
|
82
82
|
if (!r) {
|
|
83
83
|
let e = p.current[t];
|
|
84
84
|
e && (e.value = _[t] ?? "");
|
|
@@ -104,7 +104,7 @@ function _e({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i =
|
|
|
104
104
|
}[t.key];
|
|
105
105
|
r === void 0 ? (t.key === "Backspace" || t.key === "Delete") && (t.preventDefault(), x(n, t.key === "Backspace")) : (t.preventDefault(), v(r));
|
|
106
106
|
};
|
|
107
|
-
return /* @__PURE__ */
|
|
107
|
+
return /* @__PURE__ */ U("div", {
|
|
108
108
|
...d,
|
|
109
109
|
role: "group",
|
|
110
110
|
"aria-describedby": u,
|
|
@@ -113,9 +113,9 @@ function _e({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i =
|
|
|
113
113
|
dir: "ltr",
|
|
114
114
|
children: Array.from({ length: e }, (t, n) => {
|
|
115
115
|
let r = c?.(n, e), l = r ? `${f}-${n}-description` : void 0;
|
|
116
|
-
return /* @__PURE__ */
|
|
116
|
+
return /* @__PURE__ */ W("span", {
|
|
117
117
|
className: "game-ui-otp-slot",
|
|
118
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ U("input", {
|
|
119
119
|
ref: (e) => {
|
|
120
120
|
p.current[n] = e;
|
|
121
121
|
},
|
|
@@ -154,7 +154,7 @@ function _e({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i =
|
|
|
154
154
|
m.current = !1, g(null), b(n, t);
|
|
155
155
|
},
|
|
156
156
|
"data-game-ui-paint": ""
|
|
157
|
-
}), r ? /* @__PURE__ */
|
|
157
|
+
}), r ? /* @__PURE__ */ U("span", {
|
|
158
158
|
id: l,
|
|
159
159
|
className: "game-ui-sr-only",
|
|
160
160
|
children: r
|
|
@@ -165,8 +165,8 @@ function _e({ length: e = 6, value: t, onChange: n, onComplete: r, invalid: i =
|
|
|
165
165
|
}
|
|
166
166
|
//#endregion
|
|
167
167
|
//#region src/controls/GameSelect/GameSelect.tsx
|
|
168
|
-
var
|
|
169
|
-
return /* @__PURE__ */
|
|
168
|
+
var _e = oe(function({ className: e, invalid: t, hue: n, style: r, ...i }, a) {
|
|
169
|
+
return /* @__PURE__ */ U("span", {
|
|
170
170
|
className: "game-ui-select-frame",
|
|
171
171
|
children: /* @__PURE__ */ ae("select", {
|
|
172
172
|
...i,
|
|
@@ -176,7 +176,7 @@ var ve = oe(function({ className: e, invalid: t, hue: n, style: r, ...i }, a) {
|
|
|
176
176
|
"data-invalid": t ? "true" : void 0,
|
|
177
177
|
"data-game-ui-paint": "",
|
|
178
178
|
style: {
|
|
179
|
-
...
|
|
179
|
+
...P(n),
|
|
180
180
|
...r
|
|
181
181
|
},
|
|
182
182
|
className: [
|
|
@@ -189,13 +189,13 @@ var ve = oe(function({ className: e, invalid: t, hue: n, style: r, ...i }, a) {
|
|
|
189
189
|
});
|
|
190
190
|
//#endregion
|
|
191
191
|
//#region src/feedback/GameCallout/GameCallout.tsx
|
|
192
|
-
function
|
|
192
|
+
function ve({ heading: e, children: t, tone: n = "info", className: r, style: i, ...a }) {
|
|
193
193
|
let o = [
|
|
194
194
|
"game-ui-callout",
|
|
195
195
|
`game-ui-callout--${n}`,
|
|
196
196
|
r
|
|
197
197
|
].filter(Boolean).join(" ");
|
|
198
|
-
return /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ W("div", {
|
|
199
199
|
...a,
|
|
200
200
|
className: o,
|
|
201
201
|
role: a.role ?? "note",
|
|
@@ -204,16 +204,16 @@ function ye({ heading: e, children: t, tone: n = "info", className: r, style: i,
|
|
|
204
204
|
"data-game-ui-meaning": n !== "neutral" && n !== "danger" ? "true" : void 0,
|
|
205
205
|
"data-game-ui-danger": n === "danger" ? "true" : void 0,
|
|
206
206
|
style: {
|
|
207
|
-
...
|
|
207
|
+
...P(n === "success" ? "leaf" : n === "warning" ? "sun" : "sky"),
|
|
208
208
|
...i
|
|
209
209
|
},
|
|
210
210
|
children: [
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
e ? /* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ U(I, { static: !0 }),
|
|
212
|
+
e ? /* @__PURE__ */ U("div", {
|
|
213
213
|
className: "game-ui-callout-title",
|
|
214
214
|
children: e
|
|
215
215
|
}) : null,
|
|
216
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ U("div", {
|
|
217
217
|
className: "game-ui-callout-body",
|
|
218
218
|
children: t
|
|
219
219
|
})
|
|
@@ -222,8 +222,8 @@ function ye({ heading: e, children: t, tone: n = "info", className: r, style: i,
|
|
|
222
222
|
}
|
|
223
223
|
//#endregion
|
|
224
224
|
//#region src/feedback/GameHelpTip/GameHelpTip.tsx
|
|
225
|
-
function
|
|
226
|
-
let [n, r] =
|
|
225
|
+
function ye({ label: e, children: t }) {
|
|
226
|
+
let [n, r] = V(!1), [i, a] = V(void 0), { refs: o, floatingStyles: s, context: c } = Q({
|
|
227
227
|
open: n,
|
|
228
228
|
onOpenChange(e, t, n) {
|
|
229
229
|
!e && n === "escape-key" && (t?.preventDefault(), t?.stopPropagation()), r(e);
|
|
@@ -231,29 +231,29 @@ function be({ label: e, children: t }) {
|
|
|
231
231
|
placement: "bottom-start",
|
|
232
232
|
strategy: "fixed",
|
|
233
233
|
middleware: [
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
J(8),
|
|
235
|
+
q(),
|
|
236
|
+
X({ padding: 12 })
|
|
237
237
|
],
|
|
238
|
-
whileElementsMounted:
|
|
239
|
-
}), l =
|
|
238
|
+
whileElementsMounted: K
|
|
239
|
+
}), l = L((e) => {
|
|
240
240
|
o.setReference(e), a(e?.closest("dialog") ?? void 0);
|
|
241
|
-
}, [o]), { getReferenceProps: u, getFloatingProps: d } =
|
|
242
|
-
|
|
241
|
+
}, [o]), { getReferenceProps: u, getFloatingProps: d } = fe([
|
|
242
|
+
de(c, {
|
|
243
243
|
mouseOnly: !0,
|
|
244
244
|
move: !1,
|
|
245
245
|
delay: {
|
|
246
246
|
open: 300,
|
|
247
247
|
close: 120
|
|
248
248
|
},
|
|
249
|
-
handleClose:
|
|
249
|
+
handleClose: Y()
|
|
250
250
|
}),
|
|
251
|
-
fe(c),
|
|
252
|
-
le(c),
|
|
253
251
|
ue(c),
|
|
254
|
-
|
|
252
|
+
le(c),
|
|
253
|
+
Z(c),
|
|
254
|
+
pe(c, { role: "tooltip" })
|
|
255
255
|
]);
|
|
256
|
-
return /* @__PURE__ */
|
|
256
|
+
return /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ W("button", {
|
|
257
257
|
ref: l,
|
|
258
258
|
type: "button",
|
|
259
259
|
className: "game-ui-help-trigger",
|
|
@@ -262,27 +262,27 @@ function be({ label: e, children: t }) {
|
|
|
262
262
|
n && e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), r(!1));
|
|
263
263
|
} }),
|
|
264
264
|
"data-game-ui-paint": "",
|
|
265
|
-
children: [/* @__PURE__ */
|
|
265
|
+
children: [/* @__PURE__ */ U(I, {}), /* @__PURE__ */ W("svg", {
|
|
266
266
|
width: "20",
|
|
267
267
|
height: "20",
|
|
268
268
|
viewBox: "0 0 24 24",
|
|
269
269
|
fill: "none",
|
|
270
270
|
"aria-hidden": "true",
|
|
271
271
|
children: [
|
|
272
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ U("circle", {
|
|
273
273
|
cx: "12",
|
|
274
274
|
cy: "12",
|
|
275
275
|
r: "9",
|
|
276
276
|
stroke: "currentColor",
|
|
277
277
|
strokeWidth: "1.6"
|
|
278
278
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ U("path", {
|
|
280
280
|
d: "M9.8 8.5a2.5 2.5 0 0 1 4.7 1.2c0 1.8-2.5 1.9-2.5 3.6",
|
|
281
281
|
stroke: "currentColor",
|
|
282
282
|
strokeWidth: "1.6",
|
|
283
283
|
strokeLinecap: "round"
|
|
284
284
|
}),
|
|
285
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ U("circle", {
|
|
286
286
|
cx: "12",
|
|
287
287
|
cy: "16.7",
|
|
288
288
|
r: "1",
|
|
@@ -290,9 +290,9 @@ function be({ label: e, children: t }) {
|
|
|
290
290
|
})
|
|
291
291
|
]
|
|
292
292
|
})]
|
|
293
|
-
}), n && /* @__PURE__ */
|
|
293
|
+
}), n && /* @__PURE__ */ U(G, {
|
|
294
294
|
root: i,
|
|
295
|
-
children: /* @__PURE__ */
|
|
295
|
+
children: /* @__PURE__ */ U("div", {
|
|
296
296
|
ref: o.setFloating,
|
|
297
297
|
className: "game-ui-help-tip",
|
|
298
298
|
style: s,
|
|
@@ -302,12 +302,219 @@ function be({ label: e, children: t }) {
|
|
|
302
302
|
})] });
|
|
303
303
|
}
|
|
304
304
|
//#endregion
|
|
305
|
+
//#region src/feedback/GameHelpCard/GameHelpCard.tsx
|
|
306
|
+
var be = 150;
|
|
307
|
+
function xe({ children: e, label: t, topics: n, link: r, placement: i = "bottom", align: a = "center", openDelay: o = 200 }) {
|
|
308
|
+
let s = z(), [c, l] = V(!1), [u, d] = V(""), [f, p] = V(void 0), m = B(null), h = B(void 0), g = B(!1), _ = B(!1), v = (e) => {
|
|
309
|
+
e && d(""), l(e);
|
|
310
|
+
}, { refs: y, floatingStyles: b, context: x } = Q({
|
|
311
|
+
open: c,
|
|
312
|
+
onOpenChange(e, t, n) {
|
|
313
|
+
if (!e && n === "escape-key") {
|
|
314
|
+
t?.preventDefault(), t?.stopPropagation();
|
|
315
|
+
let e = m.current;
|
|
316
|
+
e && y.floating.current?.contains(document.activeElement) && (_.current = !0, e.focus(), _.current = !1);
|
|
317
|
+
}
|
|
318
|
+
v(e);
|
|
319
|
+
},
|
|
320
|
+
placement: a === "center" ? i : `${i}-${a}`,
|
|
321
|
+
strategy: "fixed",
|
|
322
|
+
middleware: [
|
|
323
|
+
J(8),
|
|
324
|
+
q(),
|
|
325
|
+
X({ padding: 12 })
|
|
326
|
+
],
|
|
327
|
+
whileElementsMounted: K
|
|
328
|
+
}), { getReferenceProps: S, getFloatingProps: C } = fe([de(x, {
|
|
329
|
+
mouseOnly: !0,
|
|
330
|
+
move: !1,
|
|
331
|
+
delay: {
|
|
332
|
+
open: o,
|
|
333
|
+
close: be
|
|
334
|
+
},
|
|
335
|
+
handleClose: Y()
|
|
336
|
+
}), Z(x)]), w = e.props.ref, T = L((e) => {
|
|
337
|
+
m.current = e, y.setReference(e), p(e?.closest("dialog") ?? void 0), typeof w == "function" ? w(e) : w && (w.current = e);
|
|
338
|
+
}, [w, y]), E = n.find((e) => e.id === u) ?? n[0];
|
|
339
|
+
if (!E) return e;
|
|
340
|
+
let D = e.props, O = `${s}-card`, k = `${s}-tabs`, A = (e) => `${k}-${e}`, j = (e) => `${s}-panel-${e}`;
|
|
341
|
+
return /* @__PURE__ */ W(H, { children: [ie(e, {
|
|
342
|
+
...S({
|
|
343
|
+
onPointerDown(e) {
|
|
344
|
+
h.current = e.pointerType, g.current = !0, D.onPointerDown?.(e);
|
|
345
|
+
},
|
|
346
|
+
onFocus(e) {
|
|
347
|
+
let t = g.current;
|
|
348
|
+
g.current = !1, !t && !c && !_.current && v(!0), D.onFocus?.(e);
|
|
349
|
+
},
|
|
350
|
+
onBlur(e) {
|
|
351
|
+
g.current = !1, D.onBlur?.(e);
|
|
352
|
+
},
|
|
353
|
+
onClick(e) {
|
|
354
|
+
let t = h.current === "touch";
|
|
355
|
+
if (h.current = void 0, t && !c) {
|
|
356
|
+
e.preventDefault(), e.stopPropagation(), v(!0);
|
|
357
|
+
return;
|
|
358
|
+
}
|
|
359
|
+
D.onClick?.(e);
|
|
360
|
+
},
|
|
361
|
+
onKeyDown(e) {
|
|
362
|
+
if (c && e.key === "Escape") {
|
|
363
|
+
e.preventDefault(), e.stopPropagation(), v(!1);
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
D.onKeyDown?.(e);
|
|
367
|
+
}
|
|
368
|
+
}),
|
|
369
|
+
ref: T,
|
|
370
|
+
"aria-expanded": c,
|
|
371
|
+
"aria-controls": c ? O : void 0
|
|
372
|
+
}), c && /* @__PURE__ */ U(G, {
|
|
373
|
+
root: f,
|
|
374
|
+
children: /* @__PURE__ */ U(ce, {
|
|
375
|
+
context: x,
|
|
376
|
+
modal: !1,
|
|
377
|
+
initialFocus: -1,
|
|
378
|
+
returnFocus: !1,
|
|
379
|
+
order: ["reference", "content"],
|
|
380
|
+
children: /* @__PURE__ */ W("div", {
|
|
381
|
+
ref: y.setFloating,
|
|
382
|
+
id: O,
|
|
383
|
+
role: "dialog",
|
|
384
|
+
"aria-label": t,
|
|
385
|
+
className: "game-ui-help-card",
|
|
386
|
+
style: b,
|
|
387
|
+
...C(),
|
|
388
|
+
children: [/* @__PURE__ */ U(we, { source: m.current }), /* @__PURE__ */ W("div", {
|
|
389
|
+
className: "game-ui-help-card-paint",
|
|
390
|
+
"data-game-ui-paint": "",
|
|
391
|
+
children: [/* @__PURE__ */ U(I, { static: !0 }), /* @__PURE__ */ W("div", {
|
|
392
|
+
className: "game-ui-help-card-content",
|
|
393
|
+
children: [
|
|
394
|
+
n.length > 1 ? /* @__PURE__ */ U(F, {
|
|
395
|
+
id: k,
|
|
396
|
+
activeId: E.id,
|
|
397
|
+
"aria-label": t,
|
|
398
|
+
tabs: n.map((e) => ({
|
|
399
|
+
id: e.id,
|
|
400
|
+
label: e.label,
|
|
401
|
+
panelId: j(e.id)
|
|
402
|
+
})),
|
|
403
|
+
onSelect: d
|
|
404
|
+
}) : null,
|
|
405
|
+
n.length > 1 ? n.map((e) => /* @__PURE__ */ U("div", {
|
|
406
|
+
id: j(e.id),
|
|
407
|
+
role: "tabpanel",
|
|
408
|
+
"aria-labelledby": A(e.id),
|
|
409
|
+
hidden: e.id !== E.id,
|
|
410
|
+
children: /* @__PURE__ */ U(Te, {
|
|
411
|
+
topic: e,
|
|
412
|
+
showMedia: e.id === E.id
|
|
413
|
+
})
|
|
414
|
+
}, e.id)) : /* @__PURE__ */ U(Te, {
|
|
415
|
+
topic: E,
|
|
416
|
+
showMedia: !0
|
|
417
|
+
}),
|
|
418
|
+
r ? /* @__PURE__ */ U("a", {
|
|
419
|
+
className: "game-ui-help-card-link",
|
|
420
|
+
href: r.href,
|
|
421
|
+
children: r.label
|
|
422
|
+
}) : null
|
|
423
|
+
]
|
|
424
|
+
})]
|
|
425
|
+
})]
|
|
426
|
+
})
|
|
427
|
+
})
|
|
428
|
+
})] });
|
|
429
|
+
}
|
|
430
|
+
var Se = ["data-game-ui-theme", "data-game-ui-style"], Ce = [
|
|
431
|
+
"class",
|
|
432
|
+
"style",
|
|
433
|
+
...Se
|
|
434
|
+
];
|
|
435
|
+
function we({ source: e }) {
|
|
436
|
+
let t = B(null);
|
|
437
|
+
return se(() => {
|
|
438
|
+
let n = t.current?.parentElement;
|
|
439
|
+
if (!n || !e) return;
|
|
440
|
+
let r = (e) => e.closest("[data-game-ui-theme], [data-game-ui-style]") ?? document.documentElement, i = () => {
|
|
441
|
+
let t = r(e);
|
|
442
|
+
for (let e of Se) {
|
|
443
|
+
let r = t.closest(`[${e}]`)?.getAttribute(e);
|
|
444
|
+
r ? n.setAttribute(e, r) : n.removeAttribute(e);
|
|
445
|
+
}
|
|
446
|
+
let i = getComputedStyle(t);
|
|
447
|
+
for (let e of i) {
|
|
448
|
+
if (!e.startsWith("--game-ui-") || e === "--game-ui-droplet-radius") continue;
|
|
449
|
+
let t = i.getPropertyValue(e).trim();
|
|
450
|
+
n.style.getPropertyValue(e) !== t && n.style.setProperty(e, t);
|
|
451
|
+
}
|
|
452
|
+
}, a = new MutationObserver(i);
|
|
453
|
+
for (let t = r(e); t; t = t.parentElement) a.observe(t, {
|
|
454
|
+
attributes: !0,
|
|
455
|
+
attributeFilter: Ce
|
|
456
|
+
});
|
|
457
|
+
return i(), () => a.disconnect();
|
|
458
|
+
}, [e]), /* @__PURE__ */ U("span", {
|
|
459
|
+
ref: t,
|
|
460
|
+
hidden: !0
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
function Te({ topic: e, showMedia: t }) {
|
|
464
|
+
return /* @__PURE__ */ W(H, { children: [
|
|
465
|
+
/* @__PURE__ */ U("h3", {
|
|
466
|
+
className: "game-ui-help-card-title",
|
|
467
|
+
children: e.title
|
|
468
|
+
}),
|
|
469
|
+
/* @__PURE__ */ U("p", {
|
|
470
|
+
className: "game-ui-help-card-body",
|
|
471
|
+
children: e.body
|
|
472
|
+
}),
|
|
473
|
+
t && e.media ? /* @__PURE__ */ U(Ee, { media: e.media }) : null
|
|
474
|
+
] });
|
|
475
|
+
}
|
|
476
|
+
function Ee({ media: e }) {
|
|
477
|
+
return e.kind === "image" ? /* @__PURE__ */ U("img", {
|
|
478
|
+
className: "game-ui-help-card-media",
|
|
479
|
+
src: e.src,
|
|
480
|
+
alt: e.alt,
|
|
481
|
+
width: e.width,
|
|
482
|
+
height: e.height,
|
|
483
|
+
decoding: "async",
|
|
484
|
+
style: { aspectRatio: `${e.width} / ${e.height}` }
|
|
485
|
+
}) : /* @__PURE__ */ U(De, { media: e });
|
|
486
|
+
}
|
|
487
|
+
function De({ media: e }) {
|
|
488
|
+
let n = t(), r = B(null);
|
|
489
|
+
return R(() => {
|
|
490
|
+
let e = r.current;
|
|
491
|
+
if (!(!e || n)) return e.play().catch(() => void 0), () => e.pause();
|
|
492
|
+
}, [n]), /* @__PURE__ */ U("video", {
|
|
493
|
+
ref: r,
|
|
494
|
+
className: "game-ui-help-card-media",
|
|
495
|
+
width: e.width,
|
|
496
|
+
height: e.height,
|
|
497
|
+
style: { aspectRatio: `${e.width} / ${e.height}` },
|
|
498
|
+
poster: e.poster,
|
|
499
|
+
muted: !0,
|
|
500
|
+
loop: !0,
|
|
501
|
+
playsInline: !0,
|
|
502
|
+
preload: "metadata",
|
|
503
|
+
role: "img",
|
|
504
|
+
"aria-label": e.alt,
|
|
505
|
+
children: e.sources.map((e) => /* @__PURE__ */ U("source", {
|
|
506
|
+
src: e.src,
|
|
507
|
+
type: e.type
|
|
508
|
+
}, e.src))
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
//#endregion
|
|
305
512
|
//#region src/feedback/GamePrompt/GamePrompt.tsx
|
|
306
|
-
function
|
|
307
|
-
return /* @__PURE__ */
|
|
513
|
+
function Oe({ actionLabel: e, children: t, title: n }) {
|
|
514
|
+
return /* @__PURE__ */ W("section", {
|
|
308
515
|
"aria-label": n,
|
|
309
516
|
className: "game-ui-prompt",
|
|
310
|
-
children: [/* @__PURE__ */
|
|
517
|
+
children: [/* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("h3", { children: n }), /* @__PURE__ */ U("p", { children: t })] }), e ? /* @__PURE__ */ U(M, {
|
|
311
518
|
variant: "primary",
|
|
312
519
|
children: e
|
|
313
520
|
}) : null]
|
|
@@ -315,33 +522,33 @@ function xe({ actionLabel: e, children: t, title: n }) {
|
|
|
315
522
|
}
|
|
316
523
|
//#endregion
|
|
317
524
|
//#region src/containers/shared/classes.ts
|
|
318
|
-
function
|
|
525
|
+
function ke(...e) {
|
|
319
526
|
return e.filter(Boolean).join(" ");
|
|
320
527
|
}
|
|
321
528
|
//#endregion
|
|
322
529
|
//#region src/containers/GameCollapsiblePanel/GameCollapsiblePanel.tsx
|
|
323
|
-
var
|
|
530
|
+
var Ae = {
|
|
324
531
|
collapse: "Collapse",
|
|
325
532
|
expand: "Expand"
|
|
326
533
|
};
|
|
327
|
-
function
|
|
328
|
-
let u =
|
|
329
|
-
...
|
|
534
|
+
function je({ actions: e, children: t, className: n, defaultOpen: r = !0, labels: i, onOpenChange: a, open: o, title: s, tone: c = "default", ...l }) {
|
|
535
|
+
let u = z(), [d, f] = V(r), p = o ?? d, m = {
|
|
536
|
+
...Ae,
|
|
330
537
|
...i
|
|
331
538
|
}, h = () => {
|
|
332
539
|
let e = !p;
|
|
333
540
|
o === void 0 && f(e), a?.(e);
|
|
334
541
|
};
|
|
335
|
-
return /* @__PURE__ */
|
|
542
|
+
return /* @__PURE__ */ W("section", {
|
|
336
543
|
...l,
|
|
337
|
-
className:
|
|
544
|
+
className: ke("game-ui-collapsible", n),
|
|
338
545
|
"data-open": p,
|
|
339
546
|
"data-panel-tone": c,
|
|
340
|
-
children: [/* @__PURE__ */
|
|
547
|
+
children: [/* @__PURE__ */ W("header", {
|
|
341
548
|
className: "game-ui-collapsible-header",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
549
|
+
children: [/* @__PURE__ */ U("h3", {
|
|
343
550
|
className: "game-ui-collapsible-heading",
|
|
344
|
-
children: /* @__PURE__ */
|
|
551
|
+
children: /* @__PURE__ */ W("button", {
|
|
345
552
|
"aria-controls": u,
|
|
346
553
|
"aria-expanded": p,
|
|
347
554
|
className: "game-ui-collapsible-toggle",
|
|
@@ -350,27 +557,27 @@ function Ce({ actions: e, children: t, className: n, defaultOpen: r = !0, labels
|
|
|
350
557
|
type: "button",
|
|
351
558
|
"data-game-ui-paint": "",
|
|
352
559
|
children: [
|
|
353
|
-
/* @__PURE__ */
|
|
354
|
-
/* @__PURE__ */
|
|
560
|
+
/* @__PURE__ */ U(I, {}),
|
|
561
|
+
/* @__PURE__ */ U("span", {
|
|
355
562
|
"aria-hidden": "true",
|
|
356
563
|
className: "game-ui-collapsible-chevron"
|
|
357
564
|
}),
|
|
358
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ U("span", {
|
|
359
566
|
className: "game-ui-collapsible-title",
|
|
360
567
|
children: s
|
|
361
568
|
})
|
|
362
569
|
]
|
|
363
570
|
})
|
|
364
|
-
}), e ? /* @__PURE__ */
|
|
571
|
+
}), e ? /* @__PURE__ */ U("span", {
|
|
365
572
|
className: "game-ui-collapsible-actions",
|
|
366
573
|
children: e
|
|
367
574
|
}) : null]
|
|
368
|
-
}), /* @__PURE__ */
|
|
575
|
+
}), /* @__PURE__ */ U("div", {
|
|
369
576
|
className: "game-ui-collapsible-region",
|
|
370
577
|
id: u,
|
|
371
|
-
children: /* @__PURE__ */
|
|
578
|
+
children: /* @__PURE__ */ U("div", {
|
|
372
579
|
className: "game-ui-collapsible-clip",
|
|
373
|
-
children: /* @__PURE__ */
|
|
580
|
+
children: /* @__PURE__ */ U("div", {
|
|
374
581
|
className: "game-ui-collapsible-content",
|
|
375
582
|
children: t
|
|
376
583
|
})
|
|
@@ -380,14 +587,14 @@ function Ce({ actions: e, children: t, className: n, defaultOpen: r = !0, labels
|
|
|
380
587
|
}
|
|
381
588
|
//#endregion
|
|
382
589
|
//#region src/containers/GameWindowPanel/GameWindowPanel.tsx
|
|
383
|
-
function
|
|
384
|
-
return /* @__PURE__ */
|
|
590
|
+
function Me({ kind: e }) {
|
|
591
|
+
return /* @__PURE__ */ U("svg", {
|
|
385
592
|
"aria-hidden": "true",
|
|
386
593
|
fill: "none",
|
|
387
594
|
height: "14",
|
|
388
595
|
viewBox: "0 0 14 14",
|
|
389
596
|
width: "14",
|
|
390
|
-
children: /* @__PURE__ */
|
|
597
|
+
children: /* @__PURE__ */ U("path", {
|
|
391
598
|
d: {
|
|
392
599
|
close: "M3 3l8 8M11 3l-8 8",
|
|
393
600
|
maximize: "M3 5V3h2M9 3h2v2M11 9v2H9M5 11H3V9",
|
|
@@ -402,9 +609,9 @@ function we({ kind: e }) {
|
|
|
402
609
|
}
|
|
403
610
|
//#endregion
|
|
404
611
|
//#region src/containers/GameModal/GameModal.tsx
|
|
405
|
-
function
|
|
406
|
-
let d =
|
|
407
|
-
return
|
|
612
|
+
function Ne({ children: e, className: t, closeLabel: n = "Close", closeOnBackdrop: r = !0, footer: i, keepMounted: a = !1, onClose: o, open: s, position: c = "center", size: l = "md", title: u }) {
|
|
613
|
+
let d = B(null), f = B(null), p = z(), [m, h] = V(!s);
|
|
614
|
+
return R(() => {
|
|
408
615
|
let e = d.current, t = f.current;
|
|
409
616
|
if (!(!e || !t)) {
|
|
410
617
|
if (s) {
|
|
@@ -413,9 +620,9 @@ function Te({ children: e, className: t, closeLabel: n = "Close", closeOnBackdro
|
|
|
413
620
|
}
|
|
414
621
|
e.open && e.close(), t.setAttribute("aria-hidden", "true"), t.setAttribute("inert", ""), h(!0);
|
|
415
622
|
}
|
|
416
|
-
}, [m, s]), /* @__PURE__ */
|
|
623
|
+
}, [m, s]), /* @__PURE__ */ U("dialog", {
|
|
417
624
|
"aria-labelledby": p,
|
|
418
|
-
className:
|
|
625
|
+
className: ke("game-ui-modal", t),
|
|
419
626
|
"data-position": c,
|
|
420
627
|
"data-size": l,
|
|
421
628
|
onCancel: (e) => {
|
|
@@ -425,32 +632,32 @@ function Te({ children: e, className: t, closeLabel: n = "Close", closeOnBackdro
|
|
|
425
632
|
r && e.target === d.current && o();
|
|
426
633
|
},
|
|
427
634
|
ref: d,
|
|
428
|
-
children: /* @__PURE__ */
|
|
635
|
+
children: /* @__PURE__ */ W("div", {
|
|
429
636
|
"aria-hidden": m ? !0 : void 0,
|
|
430
637
|
className: "game-ui-modal-frame",
|
|
431
638
|
inert: m || void 0,
|
|
432
639
|
ref: f,
|
|
433
640
|
children: [
|
|
434
|
-
/* @__PURE__ */
|
|
641
|
+
/* @__PURE__ */ W("header", {
|
|
435
642
|
className: "game-ui-modal-header",
|
|
436
|
-
children: [/* @__PURE__ */
|
|
643
|
+
children: [/* @__PURE__ */ U("h2", {
|
|
437
644
|
className: "game-ui-modal-title",
|
|
438
645
|
id: p,
|
|
439
646
|
children: u
|
|
440
|
-
}), /* @__PURE__ */
|
|
647
|
+
}), /* @__PURE__ */ W("button", {
|
|
441
648
|
"aria-label": n,
|
|
442
649
|
className: "game-ui-icon-button game-ui-window-button",
|
|
443
650
|
onClick: o,
|
|
444
651
|
type: "button",
|
|
445
652
|
"data-game-ui-paint": "",
|
|
446
|
-
children: [/* @__PURE__ */
|
|
653
|
+
children: [/* @__PURE__ */ U(I, {}), /* @__PURE__ */ U(Me, { kind: "close" })]
|
|
447
654
|
})]
|
|
448
655
|
}),
|
|
449
|
-
/* @__PURE__ */
|
|
656
|
+
/* @__PURE__ */ U("div", {
|
|
450
657
|
className: "game-ui-modal-body",
|
|
451
658
|
children: s || a ? e : null
|
|
452
659
|
}),
|
|
453
|
-
i ? /* @__PURE__ */
|
|
660
|
+
i ? /* @__PURE__ */ U("footer", {
|
|
454
661
|
className: "game-ui-modal-footer",
|
|
455
662
|
children: i
|
|
456
663
|
}) : null
|
|
@@ -460,38 +667,38 @@ function Te({ children: e, className: t, closeLabel: n = "Close", closeOnBackdro
|
|
|
460
667
|
}
|
|
461
668
|
//#endregion
|
|
462
669
|
//#region src/containers/GameShell/GameShell.tsx
|
|
463
|
-
function
|
|
464
|
-
return /* @__PURE__ */
|
|
670
|
+
function Pe({ assetLibrary: e, bottomBar: t, children: n, className: r, density: i = "comfortable", hud: a, layout: o = "auto", movementPad: s, overlay: c, sidePanel: l, title: u }) {
|
|
671
|
+
return /* @__PURE__ */ W("section", {
|
|
465
672
|
"aria-label": u,
|
|
466
673
|
className: ["game-ui-shell", r].filter(Boolean).join(" "),
|
|
467
674
|
"data-density": i,
|
|
468
675
|
"data-layout": o,
|
|
469
676
|
children: [
|
|
470
|
-
/* @__PURE__ */
|
|
677
|
+
/* @__PURE__ */ U("div", {
|
|
471
678
|
className: "game-ui-shell-scene",
|
|
472
679
|
children: n
|
|
473
680
|
}),
|
|
474
|
-
a ? /* @__PURE__ */
|
|
681
|
+
a ? /* @__PURE__ */ U("div", {
|
|
475
682
|
className: "game-ui-shell-hud",
|
|
476
683
|
children: a
|
|
477
684
|
}) : null,
|
|
478
|
-
e ? /* @__PURE__ */
|
|
685
|
+
e ? /* @__PURE__ */ U("aside", {
|
|
479
686
|
className: "game-ui-shell-library",
|
|
480
687
|
children: e
|
|
481
688
|
}) : null,
|
|
482
|
-
l ? /* @__PURE__ */
|
|
689
|
+
l ? /* @__PURE__ */ U("aside", {
|
|
483
690
|
className: "game-ui-shell-side-panel",
|
|
484
691
|
children: l
|
|
485
692
|
}) : null,
|
|
486
|
-
s ? /* @__PURE__ */
|
|
693
|
+
s ? /* @__PURE__ */ U("div", {
|
|
487
694
|
className: "game-ui-shell-movement",
|
|
488
695
|
children: s
|
|
489
696
|
}) : null,
|
|
490
|
-
t ? /* @__PURE__ */
|
|
697
|
+
t ? /* @__PURE__ */ U("div", {
|
|
491
698
|
className: "game-ui-shell-bottom-bar",
|
|
492
699
|
children: t
|
|
493
700
|
}) : null,
|
|
494
|
-
c ? /* @__PURE__ */
|
|
701
|
+
c ? /* @__PURE__ */ U("div", {
|
|
495
702
|
className: "game-ui-shell-overlay",
|
|
496
703
|
children: c
|
|
497
704
|
}) : null
|
|
@@ -500,63 +707,63 @@ function Ee({ assetLibrary: e, bottomBar: t, children: n, className: r, density:
|
|
|
500
707
|
}
|
|
501
708
|
//#endregion
|
|
502
709
|
//#region src/game/GameCollectibleCard/GameCollectibleCard.tsx
|
|
503
|
-
var
|
|
504
|
-
function
|
|
505
|
-
return /* @__PURE__ */
|
|
710
|
+
var Fe = 10, Ie = 6;
|
|
711
|
+
function Le({ filled: e, total: t }) {
|
|
712
|
+
return /* @__PURE__ */ U("span", {
|
|
506
713
|
className: "game-ui-collect-card-pips",
|
|
507
714
|
"aria-hidden": "true",
|
|
508
|
-
children: Array.from({ length: Math.max(0, t) }, (t, n) => /* @__PURE__ */
|
|
715
|
+
children: Array.from({ length: Math.max(0, t) }, (t, n) => /* @__PURE__ */ U("i", { "data-on": n < e ? "true" : void 0 }, n))
|
|
509
716
|
});
|
|
510
717
|
}
|
|
511
|
-
function
|
|
512
|
-
return e === "legendary" ? /* @__PURE__ */
|
|
718
|
+
function Re({ rarity: e }) {
|
|
719
|
+
return e === "legendary" ? /* @__PURE__ */ W("svg", {
|
|
513
720
|
className: "game-ui-collect-card-inlay",
|
|
514
721
|
viewBox: "0 0 34 22",
|
|
515
722
|
"aria-hidden": "true",
|
|
516
|
-
children: [/* @__PURE__ */
|
|
723
|
+
children: [/* @__PURE__ */ U("path", {
|
|
517
724
|
className: "game-ui-collect-card-crown",
|
|
518
725
|
d: "M3 19 L5 5 L12 11 L17 2 L22 11 L29 5 L31 19 Z"
|
|
519
|
-
}), /* @__PURE__ */
|
|
726
|
+
}), /* @__PURE__ */ U("circle", {
|
|
520
727
|
className: "game-ui-collect-card-jewel",
|
|
521
728
|
cx: "17",
|
|
522
729
|
cy: "14",
|
|
523
730
|
r: "2.6"
|
|
524
731
|
})]
|
|
525
|
-
}) : e === "rare" ? /* @__PURE__ */
|
|
732
|
+
}) : e === "rare" ? /* @__PURE__ */ W("svg", {
|
|
526
733
|
className: "game-ui-collect-card-inlay",
|
|
527
734
|
viewBox: "0 0 22 22",
|
|
528
735
|
"aria-hidden": "true",
|
|
529
|
-
children: [/* @__PURE__ */
|
|
736
|
+
children: [/* @__PURE__ */ U("path", {
|
|
530
737
|
className: "game-ui-collect-card-gem",
|
|
531
738
|
d: "M11 2 L19 10 L11 20 L3 10 Z"
|
|
532
|
-
}), /* @__PURE__ */
|
|
739
|
+
}), /* @__PURE__ */ U("path", {
|
|
533
740
|
className: "game-ui-collect-card-gem-light",
|
|
534
741
|
d: "M11 2 L14 10 L11 20"
|
|
535
742
|
})]
|
|
536
743
|
}) : null;
|
|
537
744
|
}
|
|
538
|
-
function
|
|
539
|
-
return /* @__PURE__ */
|
|
745
|
+
function ze() {
|
|
746
|
+
return /* @__PURE__ */ W("svg", {
|
|
540
747
|
viewBox: "0 0 100 100",
|
|
541
748
|
"aria-hidden": "true",
|
|
542
749
|
children: [
|
|
543
|
-
/* @__PURE__ */
|
|
750
|
+
/* @__PURE__ */ U("circle", {
|
|
544
751
|
className: "game-ui-collect-card-back-ring",
|
|
545
752
|
cx: "50",
|
|
546
753
|
cy: "50",
|
|
547
754
|
r: "38"
|
|
548
755
|
}),
|
|
549
|
-
/* @__PURE__ */
|
|
756
|
+
/* @__PURE__ */ U("circle", {
|
|
550
757
|
className: "game-ui-collect-card-back-dash",
|
|
551
758
|
cx: "50",
|
|
552
759
|
cy: "50",
|
|
553
760
|
r: "28"
|
|
554
761
|
}),
|
|
555
|
-
/* @__PURE__ */
|
|
762
|
+
/* @__PURE__ */ U("path", {
|
|
556
763
|
className: "game-ui-collect-card-back-star",
|
|
557
764
|
d: "M50 14 L57 43 L86 50 L57 57 L50 86 L43 57 L14 50 L43 43 Z"
|
|
558
765
|
}),
|
|
559
|
-
/* @__PURE__ */
|
|
766
|
+
/* @__PURE__ */ U("circle", {
|
|
560
767
|
className: "game-ui-collect-card-back-core",
|
|
561
768
|
cx: "50",
|
|
562
769
|
cy: "50",
|
|
@@ -565,62 +772,62 @@ function Ae() {
|
|
|
565
772
|
]
|
|
566
773
|
});
|
|
567
774
|
}
|
|
568
|
-
function
|
|
569
|
-
let
|
|
775
|
+
function Be({ rarity: e, title: n, caption: r, setLabel: i, rarityLabel: a, art: o, pips: s, sticker: c, back: l, label: u, faceDown: d, defaultFaceDown: f = !1, onFlip: p, spotlight: m = !1, sound: h = !1, tilt: g, className: _ }) {
|
|
776
|
+
let v = t(), [y, b] = V(f), x = d ?? y, [S, C] = V({
|
|
570
777
|
x: 50,
|
|
571
778
|
y: 50,
|
|
572
779
|
active: !1
|
|
573
|
-
}),
|
|
574
|
-
|
|
575
|
-
|
|
780
|
+
}), w = B(null);
|
|
781
|
+
R(() => {
|
|
782
|
+
v && C({
|
|
576
783
|
x: 50,
|
|
577
784
|
y: 50,
|
|
578
785
|
active: !1
|
|
579
786
|
});
|
|
580
|
-
}, [
|
|
787
|
+
}, [v]);
|
|
581
788
|
let T = (e) => {
|
|
582
|
-
let t =
|
|
583
|
-
if (t && Math.hypot(e.clientX - t.x, e.clientY - t.y) >
|
|
789
|
+
let t = w.current;
|
|
790
|
+
if (t && Math.hypot(e.clientX - t.x, e.clientY - t.y) > Ie && (t.moved = !0), v) return;
|
|
584
791
|
let n = e.currentTarget.getBoundingClientRect();
|
|
585
792
|
if (n.width === 0 || n.height === 0) return;
|
|
586
793
|
let r = Math.min(100, Math.max(0, (e.clientX - n.left) / n.width * 100)), i = Math.min(100, Math.max(0, (e.clientY - n.top) / n.height * 100));
|
|
587
|
-
|
|
794
|
+
C({
|
|
588
795
|
x: r,
|
|
589
796
|
y: i,
|
|
590
797
|
active: !0
|
|
591
798
|
});
|
|
592
799
|
}, E = () => {
|
|
593
|
-
let t = !
|
|
594
|
-
|
|
595
|
-
}, D =
|
|
596
|
-
x: 50 + Math.min(1, Math.max(-1,
|
|
597
|
-
y: 50 + Math.min(1, Math.max(-1,
|
|
800
|
+
let t = !x;
|
|
801
|
+
d === void 0 && b(t), p?.(t), h && A(t ? "common" : e);
|
|
802
|
+
}, D = g && Number.isFinite(g.x) && Number.isFinite(g.y) ? {
|
|
803
|
+
x: 50 + Math.min(1, Math.max(-1, g.x)) * 50,
|
|
804
|
+
y: 50 + Math.min(1, Math.max(-1, g.y)) * 50,
|
|
598
805
|
active: !0
|
|
599
|
-
} : null, O =
|
|
806
|
+
} : null, O = v ? {
|
|
600
807
|
x: 50,
|
|
601
808
|
y: 50,
|
|
602
809
|
active: !1
|
|
603
|
-
} :
|
|
810
|
+
} : S.active ? S : D ?? S, k = {
|
|
604
811
|
"--card-mx": `${O.x}%`,
|
|
605
812
|
"--card-my": `${O.y}%`,
|
|
606
|
-
"--card-rx": `${O.active ? (50 - O.y) / 50 *
|
|
607
|
-
"--card-ry": `${O.active ? (O.x - 50) / 50 *
|
|
813
|
+
"--card-rx": `${O.active ? (50 - O.y) / 50 * Fe : 0}deg`,
|
|
814
|
+
"--card-ry": `${O.active ? (O.x - 50) / 50 * Fe : 0}deg`
|
|
608
815
|
};
|
|
609
|
-
return /* @__PURE__ */
|
|
816
|
+
return /* @__PURE__ */ W("button", {
|
|
610
817
|
type: "button",
|
|
611
818
|
className: [
|
|
612
819
|
"game-ui-collect-card",
|
|
613
820
|
`game-ui-collect-card--${e}`,
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
821
|
+
x ? "game-ui-collect-card--down" : null,
|
|
822
|
+
m ? "game-ui-collect-card--spotlight" : null,
|
|
823
|
+
_
|
|
617
824
|
].filter(Boolean).join(" "),
|
|
618
825
|
style: k,
|
|
619
|
-
"aria-label":
|
|
620
|
-
"aria-pressed":
|
|
826
|
+
"aria-label": u,
|
|
827
|
+
"aria-pressed": x,
|
|
621
828
|
"data-rarity": e,
|
|
622
829
|
onPointerDown: (e) => {
|
|
623
|
-
|
|
830
|
+
w.current = {
|
|
624
831
|
x: e.clientX,
|
|
625
832
|
y: e.clientY,
|
|
626
833
|
moved: !1
|
|
@@ -628,73 +835,73 @@ function je({ rarity: e, title: t, caption: n, setLabel: r, rarityLabel: i, art:
|
|
|
628
835
|
},
|
|
629
836
|
onPointerMove: T,
|
|
630
837
|
onPointerCancel: () => {
|
|
631
|
-
|
|
838
|
+
w.current = null, C((e) => ({
|
|
632
839
|
...e,
|
|
633
840
|
active: !1
|
|
634
841
|
}));
|
|
635
842
|
},
|
|
636
|
-
onPointerLeave: () =>
|
|
843
|
+
onPointerLeave: () => C((e) => ({
|
|
637
844
|
...e,
|
|
638
845
|
active: !1
|
|
639
846
|
})),
|
|
640
847
|
onClick: (e) => {
|
|
641
|
-
let t = e.detail !== 0 && (
|
|
642
|
-
|
|
848
|
+
let t = e.detail !== 0 && (w.current?.moved ?? !1);
|
|
849
|
+
w.current = null, t || E();
|
|
643
850
|
},
|
|
644
|
-
children: [/* @__PURE__ */
|
|
851
|
+
children: [/* @__PURE__ */ W("span", {
|
|
645
852
|
className: "game-ui-collect-card-face",
|
|
646
853
|
"aria-hidden": "true",
|
|
647
854
|
children: [
|
|
648
|
-
|
|
855
|
+
c ? /* @__PURE__ */ U("span", {
|
|
649
856
|
className: "game-ui-collect-card-sticker",
|
|
650
|
-
children:
|
|
857
|
+
children: c
|
|
651
858
|
}) : null,
|
|
652
|
-
/* @__PURE__ */
|
|
653
|
-
e === "legendary" ? /* @__PURE__ */
|
|
654
|
-
/* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ U(Re, { rarity: e }),
|
|
860
|
+
e === "legendary" ? /* @__PURE__ */ U("span", { className: "game-ui-collect-card-foil" }) : null,
|
|
861
|
+
/* @__PURE__ */ W("span", {
|
|
655
862
|
className: "game-ui-collect-card-inner",
|
|
656
863
|
children: [
|
|
657
|
-
|
|
864
|
+
i || a ? /* @__PURE__ */ W("span", {
|
|
658
865
|
className: "game-ui-collect-card-band",
|
|
659
|
-
children: [
|
|
866
|
+
children: [a ? /* @__PURE__ */ U("span", {
|
|
660
867
|
className: "game-ui-collect-card-chip",
|
|
661
|
-
children:
|
|
662
|
-
}) : null,
|
|
868
|
+
children: a
|
|
869
|
+
}) : null, i ? /* @__PURE__ */ U("span", { children: i }) : null]
|
|
663
870
|
}) : null,
|
|
664
|
-
/* @__PURE__ */
|
|
871
|
+
/* @__PURE__ */ W("span", {
|
|
665
872
|
className: "game-ui-collect-card-art",
|
|
666
|
-
children: [
|
|
873
|
+
children: [o, e === "legendary" ? /* @__PURE__ */ U("span", { className: "game-ui-collect-card-foil" }) : null]
|
|
667
874
|
}),
|
|
668
|
-
/* @__PURE__ */
|
|
875
|
+
/* @__PURE__ */ U("span", {
|
|
669
876
|
className: "game-ui-collect-card-title",
|
|
670
|
-
children:
|
|
877
|
+
children: n
|
|
671
878
|
}),
|
|
672
|
-
|
|
879
|
+
r ? /* @__PURE__ */ U("span", {
|
|
673
880
|
className: "game-ui-collect-card-caption",
|
|
674
|
-
children:
|
|
881
|
+
children: r
|
|
675
882
|
}) : null,
|
|
676
|
-
|
|
677
|
-
filled:
|
|
678
|
-
total:
|
|
883
|
+
s ? /* @__PURE__ */ U(Le, {
|
|
884
|
+
filled: s.filled,
|
|
885
|
+
total: s.total
|
|
679
886
|
}) : null
|
|
680
887
|
]
|
|
681
888
|
}),
|
|
682
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ U("span", { className: "game-ui-collect-card-glare" })
|
|
683
890
|
]
|
|
684
|
-
}), /* @__PURE__ */
|
|
891
|
+
}), /* @__PURE__ */ U("span", {
|
|
685
892
|
className: "game-ui-collect-card-back",
|
|
686
893
|
"aria-hidden": "true",
|
|
687
|
-
children:
|
|
894
|
+
children: l ?? /* @__PURE__ */ U(ze, {})
|
|
688
895
|
})]
|
|
689
896
|
});
|
|
690
897
|
}
|
|
691
898
|
//#endregion
|
|
692
899
|
//#region src/game/GameCollectibleCard/orientation.ts
|
|
693
|
-
function
|
|
900
|
+
function $() {
|
|
694
901
|
return typeof window > "u" || !window.isSecureContext || !window.DeviceOrientationEvent ? null : window.DeviceOrientationEvent;
|
|
695
902
|
}
|
|
696
|
-
var
|
|
697
|
-
function
|
|
903
|
+
var Ve = () => document.visibilityState === "hidden";
|
|
904
|
+
function He(e, t, n, r) {
|
|
698
905
|
if (e === null || t === null || ![
|
|
699
906
|
e,
|
|
700
907
|
t,
|
|
@@ -708,113 +915,113 @@ function Me(e, t, n, r) {
|
|
|
708
915
|
y: s(o * Math.cos(i) - a * Math.sin(i))
|
|
709
916
|
};
|
|
710
917
|
}
|
|
711
|
-
function
|
|
712
|
-
let e =
|
|
713
|
-
|
|
714
|
-
let
|
|
715
|
-
|
|
918
|
+
function Ue() {
|
|
919
|
+
let e = t(), [n, r] = V("off"), [i, a] = V(null), o = B(!1), s = B(0), c = B(!1), l = B(e);
|
|
920
|
+
l.current = e;
|
|
921
|
+
let u = L(() => {
|
|
922
|
+
s.current++, c.current = !1;
|
|
716
923
|
}, []);
|
|
717
|
-
|
|
718
|
-
|
|
924
|
+
R(() => {
|
|
925
|
+
o.current = !0, $() || r("unavailable");
|
|
719
926
|
let e = () => {
|
|
720
|
-
document.visibilityState !== "hidden" || !
|
|
927
|
+
document.visibilityState !== "hidden" || !c.current || (u(), r("off"), a(null));
|
|
721
928
|
};
|
|
722
929
|
return document.addEventListener("visibilitychange", e), () => {
|
|
723
|
-
document.removeEventListener("visibilitychange", e),
|
|
930
|
+
document.removeEventListener("visibilitychange", e), o.current = !1, u();
|
|
724
931
|
};
|
|
725
|
-
}, [
|
|
726
|
-
let
|
|
727
|
-
|
|
728
|
-
}, [
|
|
729
|
-
|
|
730
|
-
e &&
|
|
731
|
-
}, [e,
|
|
732
|
-
let
|
|
733
|
-
let e =
|
|
734
|
-
if (!
|
|
735
|
-
if (!e) return
|
|
736
|
-
let t = ++
|
|
737
|
-
|
|
932
|
+
}, [u]);
|
|
933
|
+
let d = L(() => {
|
|
934
|
+
u(), a(null), r($() ? "off" : "unavailable");
|
|
935
|
+
}, [u]);
|
|
936
|
+
R(() => {
|
|
937
|
+
e && d();
|
|
938
|
+
}, [e, d]);
|
|
939
|
+
let f = L(async () => {
|
|
940
|
+
let e = $();
|
|
941
|
+
if (!o.current || c.current || l.current || Ve()) return !1;
|
|
942
|
+
if (!e) return r("unavailable"), !1;
|
|
943
|
+
let t = ++s.current;
|
|
944
|
+
c.current = !0, r("requesting"), a(null);
|
|
738
945
|
try {
|
|
739
|
-
let
|
|
740
|
-
if (!
|
|
741
|
-
if (
|
|
742
|
-
let i =
|
|
743
|
-
return
|
|
946
|
+
let n = e.requestPermission ? await e.requestPermission() : "granted";
|
|
947
|
+
if (!o.current || t !== s.current || l.current) return !1;
|
|
948
|
+
if (Ve()) return d(), !1;
|
|
949
|
+
let i = n === "granted";
|
|
950
|
+
return r(i ? "enabled" : "denied"), i;
|
|
744
951
|
} catch {
|
|
745
|
-
return
|
|
952
|
+
return o.current && t === s.current && r("denied"), !1;
|
|
746
953
|
} finally {
|
|
747
|
-
t ===
|
|
954
|
+
t === s.current && (c.current = !1);
|
|
748
955
|
}
|
|
749
|
-
}, [
|
|
750
|
-
return
|
|
751
|
-
if (
|
|
752
|
-
let
|
|
956
|
+
}, [d]);
|
|
957
|
+
return R(() => {
|
|
958
|
+
if (n !== "enabled" || e) return;
|
|
959
|
+
let t = null, r = !1, i = -Infinity, o = (e) => {
|
|
753
960
|
if (document.visibilityState === "hidden" || e.beta === null || e.gamma === null || !Number.isFinite(e.beta) || !Number.isFinite(e.gamma)) return;
|
|
754
|
-
let
|
|
755
|
-
if (!Number.isFinite(
|
|
756
|
-
(!
|
|
961
|
+
let n = window.screen.orientation?.angle ?? 0;
|
|
962
|
+
if (!Number.isFinite(n)) return;
|
|
963
|
+
(!t || t.angle !== n) && (t = {
|
|
757
964
|
beta: e.beta,
|
|
758
965
|
gamma: e.gamma,
|
|
759
|
-
angle:
|
|
966
|
+
angle: n
|
|
760
967
|
});
|
|
761
968
|
let r = performance.now();
|
|
762
|
-
if (r -
|
|
763
|
-
|
|
764
|
-
let o =
|
|
765
|
-
o &&
|
|
969
|
+
if (r - i < 50) return;
|
|
970
|
+
i = r;
|
|
971
|
+
let o = He(e.beta, e.gamma, t, n);
|
|
972
|
+
o && a((e) => e?.x === o.x && e.y === o.y ? e : o);
|
|
766
973
|
}, s = () => {
|
|
767
974
|
let e = document.visibilityState !== "hidden";
|
|
768
|
-
|
|
975
|
+
t = null, i = -Infinity, a(null), e && !r && (window.addEventListener("deviceorientation", o), r = !0), !e && r && (window.removeEventListener("deviceorientation", o), r = !1);
|
|
769
976
|
};
|
|
770
977
|
return s(), document.addEventListener("visibilitychange", s), () => {
|
|
771
978
|
r && window.removeEventListener("deviceorientation", o), document.removeEventListener("visibilitychange", s);
|
|
772
979
|
};
|
|
773
|
-
}, [
|
|
774
|
-
status:
|
|
775
|
-
tilt: e ||
|
|
776
|
-
enable:
|
|
777
|
-
disable:
|
|
980
|
+
}, [n, e]), {
|
|
981
|
+
status: n,
|
|
982
|
+
tilt: e || n !== "enabled" ? null : i,
|
|
983
|
+
enable: f,
|
|
984
|
+
disable: d,
|
|
778
985
|
reducedMotion: e
|
|
779
986
|
};
|
|
780
987
|
}
|
|
781
988
|
//#endregion
|
|
782
989
|
//#region src/game/GameCollectibleCardSlot/GameCollectibleCardSlot.tsx
|
|
783
|
-
function
|
|
784
|
-
return /* @__PURE__ */
|
|
990
|
+
function We({ label: e, className: t }) {
|
|
991
|
+
return /* @__PURE__ */ W("div", {
|
|
785
992
|
className: ["game-ui-collect-card-slot", t].filter(Boolean).join(" "),
|
|
786
993
|
role: "img",
|
|
787
994
|
"aria-label": e,
|
|
788
|
-
children: [/* @__PURE__ */
|
|
995
|
+
children: [/* @__PURE__ */ U("span", {
|
|
789
996
|
"aria-hidden": "true",
|
|
790
997
|
children: "?"
|
|
791
|
-
}), /* @__PURE__ */
|
|
998
|
+
}), /* @__PURE__ */ U("span", { children: e })]
|
|
792
999
|
});
|
|
793
1000
|
}
|
|
794
1001
|
//#endregion
|
|
795
1002
|
//#region src/game/GameFactList/GameFactList.tsx
|
|
796
|
-
function
|
|
797
|
-
return /* @__PURE__ */
|
|
1003
|
+
function Ge({ className: e, density: t = "comfortable", facts: n, label: r, variant: i = "facts" }) {
|
|
1004
|
+
return /* @__PURE__ */ U("section", {
|
|
798
1005
|
"aria-label": r,
|
|
799
1006
|
className: ["game-ui-fact-list", e].filter(Boolean).join(" "),
|
|
800
1007
|
"data-density": t,
|
|
801
1008
|
"data-variant": i,
|
|
802
|
-
children: n.map((e) => /* @__PURE__ */
|
|
1009
|
+
children: n.map((e) => /* @__PURE__ */ W("article", {
|
|
803
1010
|
className: "game-ui-fact",
|
|
804
1011
|
children: [
|
|
805
|
-
e.icon ? /* @__PURE__ */
|
|
1012
|
+
e.icon ? /* @__PURE__ */ U(E, {
|
|
806
1013
|
icon: e.icon,
|
|
807
1014
|
size: t === "dense" ? "sm" : "md"
|
|
808
1015
|
}) : null,
|
|
809
|
-
/* @__PURE__ */
|
|
1016
|
+
/* @__PURE__ */ W("span", {
|
|
810
1017
|
className: "game-ui-fact-copy",
|
|
811
1018
|
children: [
|
|
812
|
-
/* @__PURE__ */
|
|
813
|
-
/* @__PURE__ */
|
|
814
|
-
e.meta ? /* @__PURE__ */
|
|
1019
|
+
/* @__PURE__ */ U("small", { children: e.label }),
|
|
1020
|
+
/* @__PURE__ */ U("strong", { children: e.value }),
|
|
1021
|
+
e.meta ? /* @__PURE__ */ U("em", { children: e.meta }) : null
|
|
815
1022
|
]
|
|
816
1023
|
}),
|
|
817
|
-
e.tone ? /* @__PURE__ */
|
|
1024
|
+
e.tone ? /* @__PURE__ */ U(N, {
|
|
818
1025
|
tone: e.tone,
|
|
819
1026
|
children: i === "stats" ? e.label : e.value
|
|
820
1027
|
}) : null
|
|
@@ -824,7 +1031,7 @@ function Fe({ className: e, density: t = "comfortable", facts: n, label: r, vari
|
|
|
824
1031
|
}
|
|
825
1032
|
//#endregion
|
|
826
1033
|
//#region src/game/GameMovementPad/GameMovementPad.tsx
|
|
827
|
-
var
|
|
1034
|
+
var Ke = [
|
|
828
1035
|
{
|
|
829
1036
|
direction: "forward",
|
|
830
1037
|
label: "Move forward",
|
|
@@ -849,7 +1056,7 @@ var Ie = [
|
|
|
849
1056
|
shortcut: "S / ↓",
|
|
850
1057
|
symbol: "↓"
|
|
851
1058
|
}
|
|
852
|
-
],
|
|
1059
|
+
], qe = {
|
|
853
1060
|
ArrowUp: "forward",
|
|
854
1061
|
w: "forward",
|
|
855
1062
|
W: "forward",
|
|
@@ -864,57 +1071,57 @@ var Ie = [
|
|
|
864
1071
|
S: "backward",
|
|
865
1072
|
" ": "reset"
|
|
866
1073
|
};
|
|
867
|
-
function
|
|
1074
|
+
function Je({ actions: e = Ke, className: t, density: n = "comfortable", disabled: r = !1, helpText: i, label: a, layout: o = "dpad", onMove: s }) {
|
|
868
1075
|
let c = ["game-ui-movement-pad", t].filter(Boolean).join(" "), l = (e) => {
|
|
869
1076
|
r || s?.(e);
|
|
870
1077
|
};
|
|
871
|
-
return /* @__PURE__ */
|
|
1078
|
+
return /* @__PURE__ */ W("section", {
|
|
872
1079
|
"aria-label": a,
|
|
873
1080
|
className: c,
|
|
874
1081
|
"data-density": n,
|
|
875
1082
|
"data-layout": o,
|
|
876
1083
|
onKeyDown: (t) => {
|
|
877
|
-
let n =
|
|
1084
|
+
let n = qe[t.key];
|
|
878
1085
|
if (!n) return;
|
|
879
1086
|
let i = e.find((e) => e.direction === n);
|
|
880
1087
|
!i || i.disabled || r || (t.preventDefault(), l(n));
|
|
881
1088
|
},
|
|
882
1089
|
tabIndex: 0,
|
|
883
|
-
children: [/* @__PURE__ */
|
|
1090
|
+
children: [/* @__PURE__ */ U("div", {
|
|
884
1091
|
className: "game-ui-movement-pad-grid",
|
|
885
|
-
children: e.map((e) => /* @__PURE__ */
|
|
1092
|
+
children: e.map((e) => /* @__PURE__ */ W(D, {
|
|
886
1093
|
className: "game-ui-movement-button",
|
|
887
1094
|
"data-direction": e.direction,
|
|
888
1095
|
disabled: r || e.disabled,
|
|
889
1096
|
label: e.label,
|
|
890
1097
|
onClick: () => l(e.direction),
|
|
891
|
-
children: [e.icon ? /* @__PURE__ */
|
|
1098
|
+
children: [e.icon ? /* @__PURE__ */ U(E, {
|
|
892
1099
|
icon: e.icon,
|
|
893
1100
|
size: n === "dense" ? "sm" : "md"
|
|
894
|
-
}) : /* @__PURE__ */
|
|
1101
|
+
}) : /* @__PURE__ */ U("span", {
|
|
895
1102
|
"aria-hidden": "true",
|
|
896
1103
|
children: e.symbol ?? e.label
|
|
897
|
-
}), e.shortcut ? /* @__PURE__ */
|
|
1104
|
+
}), e.shortcut ? /* @__PURE__ */ U("kbd", { children: e.shortcut }) : null]
|
|
898
1105
|
}, e.direction))
|
|
899
|
-
}), i ? /* @__PURE__ */
|
|
1106
|
+
}), i ? /* @__PURE__ */ U("p", { children: i }) : null]
|
|
900
1107
|
});
|
|
901
1108
|
}
|
|
902
1109
|
//#endregion
|
|
903
1110
|
//#region src/game/GameSplash/GameSplash.tsx
|
|
904
|
-
function
|
|
1111
|
+
function Ye(e) {
|
|
905
1112
|
let t = e.highlight ? e.text.indexOf(e.highlight) : -1;
|
|
906
|
-
return !e.highlight || t < 0 ? e.text : /* @__PURE__ */
|
|
1113
|
+
return !e.highlight || t < 0 ? e.text : /* @__PURE__ */ W(H, { children: [
|
|
907
1114
|
e.text.slice(0, t),
|
|
908
|
-
/* @__PURE__ */
|
|
1115
|
+
/* @__PURE__ */ U("mark", {
|
|
909
1116
|
className: "game-ui-splash-mark",
|
|
910
1117
|
children: e.highlight
|
|
911
1118
|
}),
|
|
912
1119
|
e.text.slice(t + e.highlight.length)
|
|
913
1120
|
] });
|
|
914
1121
|
}
|
|
915
|
-
function
|
|
916
|
-
let f = o === "transition" ?
|
|
917
|
-
|
|
1122
|
+
function Xe({ title: e, lines: n, progress: r, progressLabel: i, ready: a, mode: o = "opening", startLabel: s, onStart: c, autoStart: l = !1, lineSeconds: u = 2.6, className: d }) {
|
|
1123
|
+
let f = o === "transition" ? n.slice(0, 1) : n, p = t(), [m, h] = V(0);
|
|
1124
|
+
R(() => {
|
|
918
1125
|
if (f.length < 2 || p) return;
|
|
919
1126
|
let e = window.setInterval(() => h((e) => (e + 1) % f.length), Math.max(1, u) * 1e3);
|
|
920
1127
|
return () => window.clearInterval(e);
|
|
@@ -923,16 +1130,16 @@ function ze({ title: e, lines: t, progress: n, progressLabel: r, ready: a, mode:
|
|
|
923
1130
|
u,
|
|
924
1131
|
p
|
|
925
1132
|
]);
|
|
926
|
-
let g =
|
|
927
|
-
|
|
1133
|
+
let g = B(!1), _ = c;
|
|
1134
|
+
R(() => {
|
|
928
1135
|
!a || !l || g.current || !_ || (g.current = !0, _());
|
|
929
1136
|
}, [
|
|
930
1137
|
a,
|
|
931
1138
|
l,
|
|
932
1139
|
_
|
|
933
1140
|
]);
|
|
934
|
-
let v = f[m % Math.max(1, f.length)],
|
|
935
|
-
return /* @__PURE__ */
|
|
1141
|
+
let v = f[m % Math.max(1, f.length)], y = Math.round(Math.max(0, Math.min(1, Number.isFinite(r) ? r : 0)) * 100);
|
|
1142
|
+
return /* @__PURE__ */ U("section", {
|
|
936
1143
|
className: [
|
|
937
1144
|
"game-ui-splash",
|
|
938
1145
|
`game-ui-splash--${o}`,
|
|
@@ -941,27 +1148,27 @@ function ze({ title: e, lines: t, progress: n, progressLabel: r, ready: a, mode:
|
|
|
941
1148
|
"aria-busy": !a,
|
|
942
1149
|
"aria-label": e,
|
|
943
1150
|
"data-splash-ready": a,
|
|
944
|
-
children: /* @__PURE__ */
|
|
1151
|
+
children: /* @__PURE__ */ W("div", {
|
|
945
1152
|
className: "game-ui-splash-body",
|
|
946
1153
|
children: [
|
|
947
|
-
o === "opening" ? /* @__PURE__ */
|
|
1154
|
+
o === "opening" ? /* @__PURE__ */ U("h1", {
|
|
948
1155
|
className: "game-ui-splash-title",
|
|
949
1156
|
children: e
|
|
950
1157
|
}) : null,
|
|
951
|
-
v ? /* @__PURE__ */
|
|
1158
|
+
v ? /* @__PURE__ */ U("p", {
|
|
952
1159
|
className: "game-ui-splash-line",
|
|
953
1160
|
"aria-live": "polite",
|
|
954
|
-
children:
|
|
1161
|
+
children: Ye(v)
|
|
955
1162
|
}, m) : null,
|
|
956
|
-
/* @__PURE__ */
|
|
1163
|
+
/* @__PURE__ */ U(T, {
|
|
957
1164
|
className: "game-ui-splash-progress",
|
|
958
|
-
label:
|
|
959
|
-
value:
|
|
960
|
-
valueLabel:
|
|
1165
|
+
label: i,
|
|
1166
|
+
value: y,
|
|
1167
|
+
valueLabel: i
|
|
961
1168
|
}),
|
|
962
|
-
o === "opening" && a && !l && c ? /* @__PURE__ */
|
|
1169
|
+
o === "opening" && a && !l && c ? /* @__PURE__ */ U("div", {
|
|
963
1170
|
className: "game-ui-splash-start",
|
|
964
|
-
children: /* @__PURE__ */
|
|
1171
|
+
children: /* @__PURE__ */ U(M, {
|
|
965
1172
|
variant: "primary",
|
|
966
1173
|
autoFocus: !0,
|
|
967
1174
|
onClick: () => c(),
|
|
@@ -974,64 +1181,64 @@ function ze({ title: e, lines: t, progress: n, progressLabel: r, ready: a, mode:
|
|
|
974
1181
|
}
|
|
975
1182
|
//#endregion
|
|
976
1183
|
//#region src/controls/GameMaterialSwatches/GameMaterialSwatches.tsx
|
|
977
|
-
function
|
|
978
|
-
return /* @__PURE__ */
|
|
979
|
-
"aria-label":
|
|
980
|
-
className: ["game-ui-material-swatches",
|
|
1184
|
+
function Ze({ activeMaterialId: e, className: t, disabled: n = !1, label: r, materials: i, onMaterialChange: a, variant: o = "desktop", "data-testid": s }) {
|
|
1185
|
+
return /* @__PURE__ */ U("section", {
|
|
1186
|
+
"aria-label": r,
|
|
1187
|
+
className: ["game-ui-material-swatches", t].filter(Boolean).join(" "),
|
|
981
1188
|
"data-ui-hook": "material-swatches",
|
|
982
|
-
"data-variant":
|
|
983
|
-
"data-testid":
|
|
984
|
-
children: /* @__PURE__ */
|
|
1189
|
+
"data-variant": o,
|
|
1190
|
+
"data-testid": s,
|
|
1191
|
+
children: /* @__PURE__ */ U("div", {
|
|
985
1192
|
className: "game-ui-material-swatch-grid",
|
|
986
1193
|
role: "listbox",
|
|
987
|
-
"aria-label":
|
|
988
|
-
children:
|
|
989
|
-
let
|
|
990
|
-
"--swatch-color":
|
|
991
|
-
"--swatch-secondary-color":
|
|
1194
|
+
"aria-label": r,
|
|
1195
|
+
children: i.map((t) => {
|
|
1196
|
+
let r = t.id === e, i = n || t.disabled, s = o === "small-mobile" ? t.compactLabel ?? t.label : t.label, c = {
|
|
1197
|
+
"--swatch-color": t.color,
|
|
1198
|
+
"--swatch-secondary-color": t.secondaryColor ?? t.color
|
|
992
1199
|
};
|
|
993
|
-
return /* @__PURE__ */
|
|
994
|
-
"aria-describedby":
|
|
995
|
-
"aria-label":
|
|
996
|
-
"aria-selected":
|
|
1200
|
+
return /* @__PURE__ */ W("button", {
|
|
1201
|
+
"aria-describedby": t.meta ? `${t.id}-material-meta` : void 0,
|
|
1202
|
+
"aria-label": t.label,
|
|
1203
|
+
"aria-selected": r,
|
|
997
1204
|
className: "game-ui-material-swatch",
|
|
998
|
-
"data-material-id":
|
|
999
|
-
disabled:
|
|
1000
|
-
onClick:
|
|
1205
|
+
"data-material-id": t.id,
|
|
1206
|
+
disabled: i,
|
|
1207
|
+
onClick: a && !i ? () => a(t.id) : void 0,
|
|
1001
1208
|
role: "option",
|
|
1002
1209
|
type: "button",
|
|
1003
1210
|
"data-game-ui-paint": "",
|
|
1004
1211
|
children: [
|
|
1005
|
-
/* @__PURE__ */
|
|
1006
|
-
/* @__PURE__ */
|
|
1212
|
+
/* @__PURE__ */ U(I, {}),
|
|
1213
|
+
/* @__PURE__ */ U("span", {
|
|
1007
1214
|
"aria-hidden": "true",
|
|
1008
1215
|
className: "game-ui-material-swatch-chip",
|
|
1009
|
-
"data-swatch-pattern":
|
|
1010
|
-
style:
|
|
1216
|
+
"data-swatch-pattern": t.pattern ?? "solid",
|
|
1217
|
+
style: c
|
|
1011
1218
|
}),
|
|
1012
|
-
/* @__PURE__ */
|
|
1219
|
+
/* @__PURE__ */ W("span", {
|
|
1013
1220
|
className: "game-ui-material-swatch-copy",
|
|
1014
|
-
children: [/* @__PURE__ */
|
|
1015
|
-
id: `${
|
|
1016
|
-
children:
|
|
1221
|
+
children: [/* @__PURE__ */ U("strong", { children: s }), t.meta ? /* @__PURE__ */ U("small", {
|
|
1222
|
+
id: `${t.id}-material-meta`,
|
|
1223
|
+
children: t.meta
|
|
1017
1224
|
}) : null]
|
|
1018
1225
|
}),
|
|
1019
|
-
/* @__PURE__ */
|
|
1226
|
+
/* @__PURE__ */ U(k, {})
|
|
1020
1227
|
]
|
|
1021
|
-
},
|
|
1228
|
+
}, t.id);
|
|
1022
1229
|
})
|
|
1023
1230
|
})
|
|
1024
1231
|
});
|
|
1025
1232
|
}
|
|
1026
1233
|
//#endregion
|
|
1027
1234
|
//#region src/tokens/styles.ts
|
|
1028
|
-
var
|
|
1235
|
+
var Qe = [
|
|
1029
1236
|
"candy",
|
|
1030
1237
|
"pastel",
|
|
1031
1238
|
"mist",
|
|
1032
1239
|
"grey",
|
|
1033
1240
|
"outline",
|
|
1034
1241
|
"ink"
|
|
1035
|
-
],
|
|
1242
|
+
], $e = "pastel";
|
|
1036
1243
|
//#endregion
|
|
1037
|
-
export {
|
|
1244
|
+
export { S as FirstSessionOnboarding, O as GAME_ICON_NAMES, $e as GAME_UI_DEFAULT_STYLE, Qe as GAME_UI_STYLES, s as GAME_UI_TARGETS, a as GAME_UI_THEME_CONTRACT, i as GAME_UI_TOKENS, ne as GameAvatar, N as GameBadge, M as GameButton, ve as GameCallout, r as GameCheckbox, je as GameCollapsiblePanel, Be as GameCollectibleCard, We as GameCollectibleCardSlot, C as GameDialog, p as GameEmptyState, Ge as GameFactList, o as GameField, xe as GameHelpCard, ye as GameHelpTip, b as GameHistoryPanel, l as GameHudActions, E as GameIcon, D as GameIconButton, u as GameInput, c as GameLanguageMenu, me as GameListRow, f as GameLoadingState, Ze as GameMaterialSwatches, Ne as GameModal, Je as GameMovementPad, ge as GameOtpInput, g as GamePanel, T as GameProgress, Oe as GamePrompt, y as GameRadialMenu, m as GameSegmentedControl, _e as GameSelect, Pe as GameShell, h as GameSlider, Xe as GameSplash, w as GameStageTile, F as GameTabs, v as GameTextArea, _ as GameToast, x as GameToggle, d as GameTooltip, n as LiquidGroup, j as LiquidSurface, re as liquidFormItem, A as playGameCardRevealSound, te as playGameInteractionSound, ee as playGameInteractionSoundForContext, e as setLiquidGooeyBudget, Ue as useGameCardOrientation };
|