@pieai/swimmer-ui-kit 3.0.0 → 3.1.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/dist/index.d.ts CHANGED
@@ -1146,12 +1146,21 @@ export declare interface GameToggleProps extends Pick<ButtonHTMLAttributes<HTMLB
1146
1146
  hue?: GameUiHue;
1147
1147
  }
1148
1148
 
1149
- export declare function GameTooltip({ children, label }: GameTooltipProps): ReactNode;
1149
+ export declare function GameTooltip({ children, label, align, placement, }: GameTooltipProps): ReactNode;
1150
1150
 
1151
1151
  export declare interface GameTooltipProps {
1152
1152
  /** A single focusable trigger element (e.g. GameIconButton). */
1153
1153
  children: ReactNode;
1154
+ /** Plain text; an explicit line break (\n) is kept. */
1154
1155
  label: string;
1156
+ /**
1157
+ * Which edges meet the trigger. `center` (default) centres the bubble; `start`
1158
+ * aligns its left edge with the trigger and extends right; `end` aligns right
1159
+ * edges and extends left.
1160
+ */
1161
+ align?: 'center' | 'start' | 'end';
1162
+ /** Above the trigger (default) or below it. */
1163
+ placement?: 'top' | 'bottom';
1155
1164
  }
1156
1165
 
1157
1166
  export declare interface GameUiHistoryEntry {
package/dist/index.js CHANGED
@@ -1,65 +1,65 @@
1
1
  "use client";
2
- import { t as e } from "./LiquidGroup-BXw1tv9H.js";
3
- import { A as t, B as n, C as r, D as i, E as a, H as o, M as s, N as c, O as l, P as u, R as d, S as f, T as p, V as m, _ as h, a as g, b as _, c as v, d as y, f as b, g as x, h as S, i as C, j as w, k as T, l as E, m as D, n as O, o as k, p as ee, r as te, s as A, t as ne, u as re, v as ie, w as j, x as M, y as N } from "./GameStageTile-DwU_Vvi8.js";
4
- import { b as P, t as F } from "./reducedMotion-B8kv-v64.js";
5
- import { createElement as ae, forwardRef as oe, useCallback as I, useEffect as L, useId as R, useRef as z, useState as B } from "react";
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-F41PxXDG.js";
4
+ import { c as k, f as A, h as ee, i as j, m as te, n as M, o as N, p as ne, r as re, s as P, t as ie, y as ae } from "./GameAvatar-CRJ1r8l5.js";
5
+ import { createElement as oe, forwardRef as F, useCallback as I, useEffect as L, useId as R, useRef as z, useState as B } from "react";
6
6
  import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
7
7
  import { FloatingPortal as W, autoUpdate as G, flip as K, offset as q, safePolygon as se, shift as ce, useClick as le, useDismiss as ue, useFloating as de, useFocus as fe, useHover as pe, useInteractions as me, useRole as he } from "@floating-ui/react";
8
8
  //#region src/controls/GameListRow/GameListRow.tsx
9
- function ge({ title: e, description: n, thumbnail: r, current: i = !1, selected: a, disabled: o = !1, onSelect: s, selectLabel: c, actions: u, className: d, hue: f, ...p }) {
10
- let m = z(null), h = /* @__PURE__ */ U(V, { children: [
11
- r ? /* @__PURE__ */ H("span", {
9
+ function ge({ 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 = z(null), p = /* @__PURE__ */ U(V, { children: [
11
+ n ? /* @__PURE__ */ H("span", {
12
12
  className: "game-ui-list-row-thumbnail",
13
- children: r
13
+ children: n
14
14
  }) : null,
15
15
  /* @__PURE__ */ U("span", {
16
16
  className: "game-ui-list-row-copy",
17
17
  children: [/* @__PURE__ */ H("span", {
18
18
  className: "game-ui-list-row-title",
19
19
  children: e
20
- }), n ? /* @__PURE__ */ H("span", {
20
+ }), t ? /* @__PURE__ */ H("span", {
21
21
  className: "game-ui-list-row-description",
22
- children: n
22
+ children: t
23
23
  }) : null]
24
24
  }),
25
- i ? /* @__PURE__ */ H("span", {
25
+ r ? /* @__PURE__ */ H("span", {
26
26
  className: "game-ui-list-row-current",
27
27
  "aria-hidden": "true"
28
28
  }) : null
29
29
  ] });
30
30
  return /* @__PURE__ */ U("div", {
31
- ...p,
32
- className: ["game-ui-list-row", d].filter(Boolean).join(" "),
33
- "data-selected": a || void 0,
34
- "data-game-ui-disabled": o || void 0,
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
- ...l(f),
38
- ...p.style
37
+ ...N(u),
38
+ ...d.style
39
39
  },
40
40
  children: [
41
- /* @__PURE__ */ H(T, {
42
- static: !s,
43
- pressTarget: m
41
+ /* @__PURE__ */ H(P, {
42
+ static: !o,
43
+ pressTarget: f
44
44
  }),
45
- s ? /* @__PURE__ */ U("button", {
45
+ o ? /* @__PURE__ */ U("button", {
46
46
  type: "button",
47
47
  className: "game-ui-list-row-main",
48
- ref: m,
49
- onClick: s,
50
- disabled: o,
51
- "aria-label": c,
52
- "aria-current": i ? "true" : void 0,
53
- "aria-pressed": a,
54
- children: [h, /* @__PURE__ */ H(t, {})]
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__ */ H(k, {})]
55
55
  }) : /* @__PURE__ */ U("div", {
56
56
  className: "game-ui-list-row-main",
57
- "aria-current": i ? "true" : void 0,
58
- children: [h, /* @__PURE__ */ H(t, {})]
57
+ "aria-current": r ? "true" : void 0,
58
+ children: [p, /* @__PURE__ */ H(k, {})]
59
59
  }),
60
- u ? /* @__PURE__ */ H("div", {
60
+ c ? /* @__PURE__ */ H("div", {
61
61
  className: "game-ui-list-row-actions",
62
- children: u
62
+ children: c
63
63
  }) : null
64
64
  ]
65
65
  });
@@ -165,10 +165,10 @@ 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 ve = oe(function({ className: e, invalid: t, hue: n, style: r, ...i }, a) {
168
+ var ve = F(function({ className: e, invalid: t, hue: n, style: r, ...i }, a) {
169
169
  return /* @__PURE__ */ H("span", {
170
170
  className: "game-ui-select-frame",
171
- children: /* @__PURE__ */ ae("select", {
171
+ children: /* @__PURE__ */ oe("select", {
172
172
  ...i,
173
173
  ref: a,
174
174
  key: "control",
@@ -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
- ...l(n),
179
+ ...N(n),
180
180
  ...r
181
181
  },
182
182
  className: [
@@ -204,11 +204,11 @@ 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
- ...l(n === "success" ? "leaf" : n === "warning" ? "sun" : "sky"),
207
+ ...N(n === "success" ? "leaf" : n === "warning" ? "sun" : "sky"),
208
208
  ...i
209
209
  },
210
210
  children: [
211
- /* @__PURE__ */ H(T, { static: !0 }),
211
+ /* @__PURE__ */ H(P, { static: !0 }),
212
212
  e ? /* @__PURE__ */ H("div", {
213
213
  className: "game-ui-callout-title",
214
214
  children: e
@@ -262,7 +262,7 @@ 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__ */ H(T, {}), /* @__PURE__ */ U("svg", {
265
+ children: [/* @__PURE__ */ H(P, {}), /* @__PURE__ */ U("svg", {
266
266
  width: "20",
267
267
  height: "20",
268
268
  viewBox: "0 0 24 24",
@@ -307,7 +307,7 @@ function xe({ actionLabel: e, children: t, title: n }) {
307
307
  return /* @__PURE__ */ U("section", {
308
308
  "aria-label": n,
309
309
  className: "game-ui-prompt",
310
- children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("h3", { children: n }), /* @__PURE__ */ H("p", { children: t })] }), e ? /* @__PURE__ */ H(i, {
310
+ children: [/* @__PURE__ */ U("div", { children: [/* @__PURE__ */ H("h3", { children: n }), /* @__PURE__ */ H("p", { children: t })] }), e ? /* @__PURE__ */ H(j, {
311
311
  variant: "primary",
312
312
  children: e
313
313
  }) : null]
@@ -350,7 +350,7 @@ function Ce({ actions: e, children: t, className: n, defaultOpen: r = !0, labels
350
350
  type: "button",
351
351
  "data-game-ui-paint": "",
352
352
  children: [
353
- /* @__PURE__ */ H(T, {}),
353
+ /* @__PURE__ */ H(P, {}),
354
354
  /* @__PURE__ */ H("span", {
355
355
  "aria-hidden": "true",
356
356
  className: "game-ui-collapsible-chevron"
@@ -443,7 +443,7 @@ function Te({ children: e, className: t, closeLabel: n = "Close", closeOnBackdro
443
443
  onClick: o,
444
444
  type: "button",
445
445
  "data-game-ui-paint": "",
446
- children: [/* @__PURE__ */ H(T, {}), /* @__PURE__ */ H(we, { kind: "close" })]
446
+ children: [/* @__PURE__ */ H(P, {}), /* @__PURE__ */ H(we, { kind: "close" })]
447
447
  })]
448
448
  }),
449
449
  /* @__PURE__ */ H("div", {
@@ -565,42 +565,42 @@ function Ae() {
565
565
  ]
566
566
  });
567
567
  }
568
- function je({ rarity: e, title: t, caption: n, setLabel: r, rarityLabel: i, art: a, pips: o, sticker: s, back: c, label: l, faceDown: u, defaultFaceDown: d = !1, onFlip: f, spotlight: p = !1, sound: m = !1, tilt: h, className: g }) {
569
- let _ = F(), [v, y] = B(d), b = u ?? v, [x, S] = B({
568
+ function je({ 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: _ }) {
569
+ let v = t(), [y, b] = B(f), x = d ?? y, [S, C] = B({
570
570
  x: 50,
571
571
  y: 50,
572
572
  active: !1
573
- }), C = z(null);
573
+ }), w = z(null);
574
574
  L(() => {
575
- _ && S({
575
+ v && C({
576
576
  x: 50,
577
577
  y: 50,
578
578
  active: !1
579
579
  });
580
- }, [_]);
580
+ }, [v]);
581
581
  let T = (e) => {
582
- let t = C.current;
583
- if (t && Math.hypot(e.clientX - t.x, e.clientY - t.y) > De && (t.moved = !0), _) return;
582
+ let t = w.current;
583
+ if (t && Math.hypot(e.clientX - t.x, e.clientY - t.y) > De && (t.moved = !0), v) return;
584
584
  let n = e.currentTarget.getBoundingClientRect();
585
585
  if (n.width === 0 || n.height === 0) return;
586
586
  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
- S({
587
+ C({
588
588
  x: r,
589
589
  y: i,
590
590
  active: !0
591
591
  });
592
592
  }, E = () => {
593
- let t = !b;
594
- u === void 0 && y(t), f?.(t), m && w(t ? "common" : e);
595
- }, D = h && Number.isFinite(h.x) && Number.isFinite(h.y) ? {
596
- x: 50 + Math.min(1, Math.max(-1, h.x)) * 50,
597
- y: 50 + Math.min(1, Math.max(-1, h.y)) * 50,
593
+ let t = !x;
594
+ d === void 0 && b(t), p?.(t), h && A(t ? "common" : e);
595
+ }, D = g && Number.isFinite(g.x) && Number.isFinite(g.y) ? {
596
+ x: 50 + Math.min(1, Math.max(-1, g.x)) * 50,
597
+ y: 50 + Math.min(1, Math.max(-1, g.y)) * 50,
598
598
  active: !0
599
- } : null, O = _ ? {
599
+ } : null, O = v ? {
600
600
  x: 50,
601
601
  y: 50,
602
602
  active: !1
603
- } : x.active ? x : D ?? x, k = {
603
+ } : S.active ? S : D ?? S, k = {
604
604
  "--card-mx": `${O.x}%`,
605
605
  "--card-my": `${O.y}%`,
606
606
  "--card-rx": `${O.active ? (50 - O.y) / 50 * X : 0}deg`,
@@ -611,16 +611,16 @@ function je({ rarity: e, title: t, caption: n, setLabel: r, rarityLabel: i, art:
611
611
  className: [
612
612
  "game-ui-collect-card",
613
613
  `game-ui-collect-card--${e}`,
614
- b ? "game-ui-collect-card--down" : null,
615
- p ? "game-ui-collect-card--spotlight" : null,
616
- g
614
+ x ? "game-ui-collect-card--down" : null,
615
+ m ? "game-ui-collect-card--spotlight" : null,
616
+ _
617
617
  ].filter(Boolean).join(" "),
618
618
  style: k,
619
- "aria-label": l,
620
- "aria-pressed": b,
619
+ "aria-label": u,
620
+ "aria-pressed": x,
621
621
  "data-rarity": e,
622
622
  onPointerDown: (e) => {
623
- C.current = {
623
+ w.current = {
624
624
  x: e.clientX,
625
625
  y: e.clientY,
626
626
  moved: !1
@@ -628,54 +628,54 @@ function je({ rarity: e, title: t, caption: n, setLabel: r, rarityLabel: i, art:
628
628
  },
629
629
  onPointerMove: T,
630
630
  onPointerCancel: () => {
631
- C.current = null, S((e) => ({
631
+ w.current = null, C((e) => ({
632
632
  ...e,
633
633
  active: !1
634
634
  }));
635
635
  },
636
- onPointerLeave: () => S((e) => ({
636
+ onPointerLeave: () => C((e) => ({
637
637
  ...e,
638
638
  active: !1
639
639
  })),
640
640
  onClick: (e) => {
641
- let t = e.detail !== 0 && (C.current?.moved ?? !1);
642
- C.current = null, t || E();
641
+ let t = e.detail !== 0 && (w.current?.moved ?? !1);
642
+ w.current = null, t || E();
643
643
  },
644
644
  children: [/* @__PURE__ */ U("span", {
645
645
  className: "game-ui-collect-card-face",
646
646
  "aria-hidden": "true",
647
647
  children: [
648
- s ? /* @__PURE__ */ H("span", {
648
+ c ? /* @__PURE__ */ H("span", {
649
649
  className: "game-ui-collect-card-sticker",
650
- children: s
650
+ children: c
651
651
  }) : null,
652
652
  /* @__PURE__ */ H(ke, { rarity: e }),
653
653
  e === "legendary" ? /* @__PURE__ */ H("span", { className: "game-ui-collect-card-foil" }) : null,
654
654
  /* @__PURE__ */ U("span", {
655
655
  className: "game-ui-collect-card-inner",
656
656
  children: [
657
- r || i ? /* @__PURE__ */ U("span", {
657
+ i || a ? /* @__PURE__ */ U("span", {
658
658
  className: "game-ui-collect-card-band",
659
- children: [i ? /* @__PURE__ */ H("span", {
659
+ children: [a ? /* @__PURE__ */ H("span", {
660
660
  className: "game-ui-collect-card-chip",
661
- children: i
662
- }) : null, r ? /* @__PURE__ */ H("span", { children: r }) : null]
661
+ children: a
662
+ }) : null, i ? /* @__PURE__ */ H("span", { children: i }) : null]
663
663
  }) : null,
664
664
  /* @__PURE__ */ U("span", {
665
665
  className: "game-ui-collect-card-art",
666
- children: [a, e === "legendary" ? /* @__PURE__ */ H("span", { className: "game-ui-collect-card-foil" }) : null]
666
+ children: [o, e === "legendary" ? /* @__PURE__ */ H("span", { className: "game-ui-collect-card-foil" }) : null]
667
667
  }),
668
668
  /* @__PURE__ */ H("span", {
669
669
  className: "game-ui-collect-card-title",
670
- children: t
670
+ children: n
671
671
  }),
672
- n ? /* @__PURE__ */ H("span", {
672
+ r ? /* @__PURE__ */ H("span", {
673
673
  className: "game-ui-collect-card-caption",
674
- children: n
674
+ children: r
675
675
  }) : null,
676
- o ? /* @__PURE__ */ H(Oe, {
677
- filled: o.filled,
678
- total: o.total
676
+ s ? /* @__PURE__ */ H(Oe, {
677
+ filled: s.filled,
678
+ total: s.total
679
679
  }) : null
680
680
  ]
681
681
  }),
@@ -684,7 +684,7 @@ function je({ rarity: e, title: t, caption: n, setLabel: r, rarityLabel: i, art:
684
684
  }), /* @__PURE__ */ H("span", {
685
685
  className: "game-ui-collect-card-back",
686
686
  "aria-hidden": "true",
687
- children: c ?? /* @__PURE__ */ H(Ae, {})
687
+ children: l ?? /* @__PURE__ */ H(Ae, {})
688
688
  })]
689
689
  });
690
690
  }
@@ -709,72 +709,72 @@ function Me(e, t, n, r) {
709
709
  };
710
710
  }
711
711
  function Ne() {
712
- let e = F(), [t, n] = B("off"), [r, i] = B(null), a = z(!1), o = z(0), s = z(!1), c = z(e);
713
- c.current = e;
714
- let l = I(() => {
715
- o.current++, s.current = !1;
712
+ let e = t(), [n, r] = B("off"), [i, a] = B(null), o = z(!1), s = z(0), c = z(!1), l = z(e);
713
+ l.current = e;
714
+ let u = I(() => {
715
+ s.current++, c.current = !1;
716
716
  }, []);
717
717
  L(() => {
718
- a.current = !0, Z() || n("unavailable");
718
+ o.current = !0, Z() || r("unavailable");
719
719
  let e = () => {
720
- document.visibilityState !== "hidden" || !s.current || (l(), n("off"), i(null));
720
+ document.visibilityState !== "hidden" || !c.current || (u(), r("off"), a(null));
721
721
  };
722
722
  return document.addEventListener("visibilitychange", e), () => {
723
- document.removeEventListener("visibilitychange", e), a.current = !1, l();
723
+ document.removeEventListener("visibilitychange", e), o.current = !1, u();
724
724
  };
725
- }, [l]);
726
- let u = I(() => {
727
- l(), i(null), n(Z() ? "off" : "unavailable");
728
- }, [l]);
725
+ }, [u]);
726
+ let d = I(() => {
727
+ u(), a(null), r(Z() ? "off" : "unavailable");
728
+ }, [u]);
729
729
  L(() => {
730
- e && u();
731
- }, [e, u]);
732
- let d = I(async () => {
730
+ e && d();
731
+ }, [e, d]);
732
+ let f = I(async () => {
733
733
  let e = Z();
734
- if (!a.current || s.current || c.current || Q()) return !1;
735
- if (!e) return n("unavailable"), !1;
736
- let t = ++o.current;
737
- s.current = !0, n("requesting"), i(null);
734
+ if (!o.current || c.current || l.current || Q()) return !1;
735
+ if (!e) return r("unavailable"), !1;
736
+ let t = ++s.current;
737
+ c.current = !0, r("requesting"), a(null);
738
738
  try {
739
- let r = e.requestPermission ? await e.requestPermission() : "granted";
740
- if (!a.current || t !== o.current || c.current) return !1;
741
- if (Q()) return u(), !1;
742
- let i = r === "granted";
743
- return n(i ? "enabled" : "denied"), i;
739
+ let n = e.requestPermission ? await e.requestPermission() : "granted";
740
+ if (!o.current || t !== s.current || l.current) return !1;
741
+ if (Q()) return d(), !1;
742
+ let i = n === "granted";
743
+ return r(i ? "enabled" : "denied"), i;
744
744
  } catch {
745
- return a.current && t === o.current && n("denied"), !1;
745
+ return o.current && t === s.current && r("denied"), !1;
746
746
  } finally {
747
- t === o.current && (s.current = !1);
747
+ t === s.current && (c.current = !1);
748
748
  }
749
- }, [u]);
749
+ }, [d]);
750
750
  return L(() => {
751
- if (t !== "enabled" || e) return;
752
- let n = null, r = !1, a = -Infinity, o = (e) => {
751
+ if (n !== "enabled" || e) return;
752
+ let t = null, r = !1, i = -Infinity, o = (e) => {
753
753
  if (document.visibilityState === "hidden" || e.beta === null || e.gamma === null || !Number.isFinite(e.beta) || !Number.isFinite(e.gamma)) return;
754
- let t = window.screen.orientation?.angle ?? 0;
755
- if (!Number.isFinite(t)) return;
756
- (!n || n.angle !== t) && (n = {
754
+ let n = window.screen.orientation?.angle ?? 0;
755
+ if (!Number.isFinite(n)) return;
756
+ (!t || t.angle !== n) && (t = {
757
757
  beta: e.beta,
758
758
  gamma: e.gamma,
759
- angle: t
759
+ angle: n
760
760
  });
761
761
  let r = performance.now();
762
- if (r - a < 50) return;
763
- a = r;
764
- let o = Me(e.beta, e.gamma, n, t);
765
- o && i((e) => e?.x === o.x && e.y === o.y ? e : o);
762
+ if (r - i < 50) return;
763
+ i = r;
764
+ let o = Me(e.beta, e.gamma, t, n);
765
+ o && a((e) => e?.x === o.x && e.y === o.y ? e : o);
766
766
  }, s = () => {
767
767
  let e = document.visibilityState !== "hidden";
768
- n = null, a = -Infinity, i(null), e && !r && (window.addEventListener("deviceorientation", o), r = !0), !e && r && (window.removeEventListener("deviceorientation", o), r = !1);
768
+ t = null, i = -Infinity, a(null), e && !r && (window.addEventListener("deviceorientation", o), r = !0), !e && r && (window.removeEventListener("deviceorientation", o), r = !1);
769
769
  };
770
770
  return s(), document.addEventListener("visibilitychange", s), () => {
771
771
  r && window.removeEventListener("deviceorientation", o), document.removeEventListener("visibilitychange", s);
772
772
  };
773
- }, [t, e]), {
774
- status: t,
775
- tilt: e || t !== "enabled" ? null : r,
776
- enable: d,
777
- disable: u,
773
+ }, [n, e]), {
774
+ status: n,
775
+ tilt: e || n !== "enabled" ? null : i,
776
+ enable: f,
777
+ disable: d,
778
778
  reducedMotion: e
779
779
  };
780
780
  }
@@ -802,7 +802,7 @@ function Fe({ className: e, density: t = "comfortable", facts: n, label: r, vari
802
802
  children: n.map((e) => /* @__PURE__ */ U("article", {
803
803
  className: "game-ui-fact",
804
804
  children: [
805
- e.icon ? /* @__PURE__ */ H(M, {
805
+ e.icon ? /* @__PURE__ */ H(E, {
806
806
  icon: e.icon,
807
807
  size: t === "dense" ? "sm" : "md"
808
808
  }) : null,
@@ -814,7 +814,7 @@ function Fe({ className: e, density: t = "comfortable", facts: n, label: r, vari
814
814
  e.meta ? /* @__PURE__ */ H("em", { children: e.meta }) : null
815
815
  ]
816
816
  }),
817
- e.tone ? /* @__PURE__ */ H(D, {
817
+ e.tone ? /* @__PURE__ */ H(M, {
818
818
  tone: e.tone,
819
819
  children: i === "stats" ? e.label : e.value
820
820
  }) : null
@@ -882,13 +882,13 @@ function $({ actions: e = Ie, className: t, density: n = "comfortable", disabled
882
882
  tabIndex: 0,
883
883
  children: [/* @__PURE__ */ H("div", {
884
884
  className: "game-ui-movement-pad-grid",
885
- children: e.map((e) => /* @__PURE__ */ U(j, {
885
+ children: e.map((e) => /* @__PURE__ */ U(D, {
886
886
  className: "game-ui-movement-button",
887
887
  "data-direction": e.direction,
888
888
  disabled: r || e.disabled,
889
889
  label: e.label,
890
890
  onClick: () => l(e.direction),
891
- children: [e.icon ? /* @__PURE__ */ H(M, {
891
+ children: [e.icon ? /* @__PURE__ */ H(E, {
892
892
  icon: e.icon,
893
893
  size: n === "dense" ? "sm" : "md"
894
894
  }) : /* @__PURE__ */ H("span", {
@@ -912,8 +912,8 @@ function Re(e) {
912
912
  e.text.slice(t + e.highlight.length)
913
913
  ] });
914
914
  }
915
- function ze({ title: e, lines: t, progress: n, progressLabel: r, ready: a, mode: o = "opening", startLabel: s, onStart: c, autoStart: l = !1, lineSeconds: u = 2.6, className: d }) {
916
- let f = o === "transition" ? t.slice(0, 1) : t, p = F(), [m, h] = B(0);
915
+ function ze({ 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 }) {
916
+ let f = o === "transition" ? n.slice(0, 1) : n, p = t(), [m, h] = B(0);
917
917
  L(() => {
918
918
  if (f.length < 2 || p) return;
919
919
  let e = window.setInterval(() => h((e) => (e + 1) % f.length), Math.max(1, u) * 1e3);
@@ -931,7 +931,7 @@ function ze({ title: e, lines: t, progress: n, progressLabel: r, ready: a, mode:
931
931
  l,
932
932
  _
933
933
  ]);
934
- let v = f[m % Math.max(1, f.length)], b = Math.round(Math.max(0, Math.min(1, Number.isFinite(n) ? n : 0)) * 100);
934
+ let v = f[m % Math.max(1, f.length)], y = Math.round(Math.max(0, Math.min(1, Number.isFinite(r) ? r : 0)) * 100);
935
935
  return /* @__PURE__ */ H("section", {
936
936
  className: [
937
937
  "game-ui-splash",
@@ -953,15 +953,15 @@ function ze({ title: e, lines: t, progress: n, progressLabel: r, ready: a, mode:
953
953
  "aria-live": "polite",
954
954
  children: Re(v)
955
955
  }, m) : null,
956
- /* @__PURE__ */ H(y, {
956
+ /* @__PURE__ */ H(T, {
957
957
  className: "game-ui-splash-progress",
958
- label: r,
959
- value: b,
960
- valueLabel: r
958
+ label: i,
959
+ value: y,
960
+ valueLabel: i
961
961
  }),
962
962
  o === "opening" && a && !l && c ? /* @__PURE__ */ H("div", {
963
963
  className: "game-ui-splash-start",
964
- children: /* @__PURE__ */ H(i, {
964
+ children: /* @__PURE__ */ H(j, {
965
965
  variant: "primary",
966
966
  autoFocus: !0,
967
967
  onClick: () => c(),
@@ -974,51 +974,51 @@ function ze({ title: e, lines: t, progress: n, progressLabel: r, ready: a, mode:
974
974
  }
975
975
  //#endregion
976
976
  //#region src/controls/GameMaterialSwatches/GameMaterialSwatches.tsx
977
- function Be({ activeMaterialId: e, className: n, disabled: r = !1, label: i, materials: a, onMaterialChange: o, variant: s = "desktop", "data-testid": c }) {
977
+ function Be({ activeMaterialId: e, className: t, disabled: n = !1, label: r, materials: i, onMaterialChange: a, variant: o = "desktop", "data-testid": s }) {
978
978
  return /* @__PURE__ */ H("section", {
979
- "aria-label": i,
980
- className: ["game-ui-material-swatches", n].filter(Boolean).join(" "),
979
+ "aria-label": r,
980
+ className: ["game-ui-material-swatches", t].filter(Boolean).join(" "),
981
981
  "data-ui-hook": "material-swatches",
982
- "data-variant": s,
983
- "data-testid": c,
982
+ "data-variant": o,
983
+ "data-testid": s,
984
984
  children: /* @__PURE__ */ H("div", {
985
985
  className: "game-ui-material-swatch-grid",
986
986
  role: "listbox",
987
- "aria-label": i,
988
- children: a.map((n) => {
989
- let i = n.id === e, a = r || n.disabled, c = s === "small-mobile" ? n.compactLabel ?? n.label : n.label, l = {
990
- "--swatch-color": n.color,
991
- "--swatch-secondary-color": n.secondaryColor ?? n.color
987
+ "aria-label": r,
988
+ children: i.map((t) => {
989
+ let r = t.id === e, i = n || t.disabled, s = o === "small-mobile" ? t.compactLabel ?? t.label : t.label, c = {
990
+ "--swatch-color": t.color,
991
+ "--swatch-secondary-color": t.secondaryColor ?? t.color
992
992
  };
993
993
  return /* @__PURE__ */ U("button", {
994
- "aria-describedby": n.meta ? `${n.id}-material-meta` : void 0,
995
- "aria-label": n.label,
996
- "aria-selected": i,
994
+ "aria-describedby": t.meta ? `${t.id}-material-meta` : void 0,
995
+ "aria-label": t.label,
996
+ "aria-selected": r,
997
997
  className: "game-ui-material-swatch",
998
- "data-material-id": n.id,
999
- disabled: a,
1000
- onClick: o && !a ? () => o(n.id) : void 0,
998
+ "data-material-id": t.id,
999
+ disabled: i,
1000
+ onClick: a && !i ? () => a(t.id) : void 0,
1001
1001
  role: "option",
1002
1002
  type: "button",
1003
1003
  "data-game-ui-paint": "",
1004
1004
  children: [
1005
- /* @__PURE__ */ H(T, {}),
1005
+ /* @__PURE__ */ H(P, {}),
1006
1006
  /* @__PURE__ */ H("span", {
1007
1007
  "aria-hidden": "true",
1008
1008
  className: "game-ui-material-swatch-chip",
1009
- "data-swatch-pattern": n.pattern ?? "solid",
1010
- style: l
1009
+ "data-swatch-pattern": t.pattern ?? "solid",
1010
+ style: c
1011
1011
  }),
1012
1012
  /* @__PURE__ */ U("span", {
1013
1013
  className: "game-ui-material-swatch-copy",
1014
- children: [/* @__PURE__ */ H("strong", { children: c }), n.meta ? /* @__PURE__ */ H("small", {
1015
- id: `${n.id}-material-meta`,
1016
- children: n.meta
1014
+ children: [/* @__PURE__ */ H("strong", { children: s }), t.meta ? /* @__PURE__ */ H("small", {
1015
+ id: `${t.id}-material-meta`,
1016
+ children: t.meta
1017
1017
  }) : null]
1018
1018
  }),
1019
- /* @__PURE__ */ H(t, {})
1019
+ /* @__PURE__ */ H(k, {})
1020
1020
  ]
1021
- }, n.id);
1021
+ }, t.id);
1022
1022
  })
1023
1023
  })
1024
1024
  });
@@ -1034,4 +1034,4 @@ var Ve = [
1034
1034
  "ink"
1035
1035
  ], He = "pastel";
1036
1036
  //#endregion
1037
- export { C as FirstSessionOnboarding, f as GAME_ICON_NAMES, He as GAME_UI_DEFAULT_STYLE, Ve as GAME_UI_STYLES, n as GAME_UI_TARGETS, m as GAME_UI_THEME_CONTRACT, o as GAME_UI_TOKENS, te as GameAvatar, D as GameBadge, i as GameButton, ye as GameCallout, a as GameCheckbox, Ce as GameCollapsiblePanel, je as GameCollectibleCard, Pe as GameCollectibleCardSlot, v as GameDialog, ee as GameEmptyState, Fe as GameFactList, p as GameField, be as GameHelpTip, A as GameHistoryPanel, k as GameHudActions, M as GameIcon, j as GameIconButton, r as GameInput, _ as GameLanguageMenu, ge as GameListRow, b as GameLoadingState, Be as GameMaterialSwatches, Te as GameModal, $ as GameMovementPad, _e as GameOtpInput, g as GamePanel, y as GameProgress, xe as GamePrompt, O as GameRadialMenu, N as GameSegmentedControl, ve as GameSelect, Ee as GameShell, ie as GameSlider, ze as GameSplash, ne as GameStageTile, h as GameTabs, x as GameTextArea, re as GameToast, S as GameToggle, E as GameTooltip, e as LiquidGroup, u as LiquidSurface, d as liquidFormItem, w as playGameCardRevealSound, s as playGameInteractionSound, c as playGameInteractionSoundForContext, P as setLiquidGooeyBudget, Ne as useGameCardOrientation };
1037
+ export { S as FirstSessionOnboarding, O as GAME_ICON_NAMES, He as GAME_UI_DEFAULT_STYLE, Ve as GAME_UI_STYLES, s as GAME_UI_TARGETS, a as GAME_UI_THEME_CONTRACT, i as GAME_UI_TOKENS, ie as GameAvatar, M as GameBadge, j as GameButton, ye as GameCallout, r as GameCheckbox, Ce as GameCollapsiblePanel, je as GameCollectibleCard, Pe as GameCollectibleCardSlot, C as GameDialog, p as GameEmptyState, Fe as GameFactList, o as GameField, be as GameHelpTip, b as GameHistoryPanel, l as GameHudActions, E as GameIcon, D as GameIconButton, u as GameInput, c as GameLanguageMenu, ge as GameListRow, f as GameLoadingState, Be as GameMaterialSwatches, Te as GameModal, $ as GameMovementPad, _e as GameOtpInput, g as GamePanel, T as GameProgress, xe as GamePrompt, y as GameRadialMenu, m as GameSegmentedControl, ve as GameSelect, Ee as GameShell, h as GameSlider, ze as GameSplash, w as GameStageTile, re as GameTabs, v as GameTextArea, _ as GameToast, x as GameToggle, d as GameTooltip, n as LiquidGroup, ee as LiquidSurface, ae as liquidFormItem, A as playGameCardRevealSound, ne as playGameInteractionSound, te as playGameInteractionSoundForContext, e as setLiquidGooeyBudget, Ne as useGameCardOrientation };