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