@almadar/ui 5.80.0 → 5.81.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.
@@ -7972,6 +7972,38 @@ var init_Accordion = __esm({
7972
7972
  exports.Accordion.displayName = "Accordion";
7973
7973
  }
7974
7974
  });
7975
+ function GameIcon({ assetUrl, icon, size = "md", alt, className }) {
7976
+ const px = typeof size === "number" ? size : sizeMap[size];
7977
+ if (assetUrl?.url) {
7978
+ return /* @__PURE__ */ jsxRuntime.jsx(
7979
+ "img",
7980
+ {
7981
+ src: assetUrl.url,
7982
+ alt: alt ?? assetUrl.category ?? "",
7983
+ width: px,
7984
+ height: px,
7985
+ style: { imageRendering: "pixelated", objectFit: "contain", width: px, height: px },
7986
+ className: cn("flex-shrink-0", className)
7987
+ }
7988
+ );
7989
+ }
7990
+ const I = typeof icon === "string" ? resolveIcon(icon) : icon;
7991
+ return /* @__PURE__ */ jsxRuntime.jsx(I, { width: px, height: px, className: cn("flex-shrink-0", className) });
7992
+ }
7993
+ var sizeMap;
7994
+ var init_GameIcon = __esm({
7995
+ "components/game/2d/atoms/GameIcon.tsx"() {
7996
+ "use client";
7997
+ init_cn();
7998
+ init_Icon();
7999
+ sizeMap = {
8000
+ sm: 16,
8001
+ md: 24,
8002
+ lg: 32
8003
+ };
8004
+ GameIcon.displayName = "GameIcon";
8005
+ }
8006
+ });
7975
8007
  function ActionButton({
7976
8008
  assetUrl = DEFAULT_ASSET_URL,
7977
8009
  label = "Attack",
@@ -7986,16 +8018,16 @@ function ActionButton({
7986
8018
  className
7987
8019
  }) {
7988
8020
  const eventBus = useEventBus();
7989
- const sizes = sizeMap[size];
8021
+ const sizes = sizeMap2[size];
7990
8022
  const onCooldown = cooldown > 0;
7991
8023
  const isDisabled = disabled || onCooldown;
7992
8024
  const cooldownDeg = Math.round(cooldown * 360);
7993
8025
  return /* @__PURE__ */ jsxRuntime.jsxs(
7994
- "button",
8026
+ exports.Button,
7995
8027
  {
7996
- type: "button",
8028
+ variant: variant === "danger" ? "danger" : variant === "secondary" ? "secondary" : "primary",
7997
8029
  disabled: isDisabled,
7998
- onClick: (e) => {
8030
+ onClick: () => {
7999
8031
  if (action) eventBus.emit(`UI:${action}`, {});
8000
8032
  onClick?.();
8001
8033
  },
@@ -8008,9 +8040,10 @@ function ActionButton({
8008
8040
  ),
8009
8041
  children: [
8010
8042
  onCooldown && /* @__PURE__ */ jsxRuntime.jsx(
8011
- "div",
8043
+ exports.Box,
8012
8044
  {
8013
- className: "absolute inset-0 bg-foreground/40 pointer-events-none",
8045
+ position: "absolute",
8046
+ className: "inset-0 bg-foreground/40 pointer-events-none",
8014
8047
  style: {
8015
8048
  clipPath: `conic-gradient(from 0deg, transparent ${360 - cooldownDeg}deg, black ${360 - cooldownDeg}deg)`,
8016
8049
  WebkitClipPath: `conic-gradient(from 0deg, transparent ${360 - cooldownDeg}deg, black ${360 - cooldownDeg}deg)`,
@@ -8018,27 +8051,18 @@ function ActionButton({
8018
8051
  }
8019
8052
  }
8020
8053
  ),
8021
- assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(
8022
- "img",
8023
- {
8024
- src: assetUrl.url,
8025
- alt: "",
8026
- width: 16,
8027
- height: 16,
8028
- style: { imageRendering: "pixelated", objectFit: "contain" },
8029
- className: cn("flex-shrink-0", sizes.icon)
8030
- }
8031
- ) : icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: typeof icon === "string" ? (() => {
8054
+ assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl, icon: "image", size: 16, className: cn("flex-shrink-0", sizes.icon) }) : icon ? /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { as: "span", className: cn("flex-shrink-0", sizes.icon), children: typeof icon === "string" ? (() => {
8032
8055
  const I = resolveIcon(icon);
8033
8056
  return I ? /* @__PURE__ */ jsxRuntime.jsx(I, { className: "w-4 h-4" }) : null;
8034
8057
  })() : /* @__PURE__ */ (() => {
8035
8058
  const I = icon;
8036
8059
  return /* @__PURE__ */ jsxRuntime.jsx(I, { className: "w-4 h-4" });
8037
8060
  })() }) : null,
8038
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative z-10", children: label }),
8061
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "relative z-10", children: label }),
8039
8062
  hotkey && /* @__PURE__ */ jsxRuntime.jsx(
8040
- "span",
8063
+ exports.Typography,
8041
8064
  {
8065
+ as: "span",
8042
8066
  className: cn(
8043
8067
  "absolute top-0.5 right-0.5 bg-foreground/30 text-primary-foreground rounded font-mono leading-tight",
8044
8068
  sizes.hotkey
@@ -8050,13 +8074,17 @@ function ActionButton({
8050
8074
  }
8051
8075
  );
8052
8076
  }
8053
- var sizeMap, variantStyles7, DEFAULT_ASSET_URL;
8077
+ var sizeMap2, variantStyles7, DEFAULT_ASSET_URL;
8054
8078
  var init_ActionButton = __esm({
8055
8079
  "components/game/2d/atoms/ActionButton.tsx"() {
8056
8080
  init_cn();
8057
8081
  init_Icon();
8058
8082
  init_useEventBus();
8059
- sizeMap = {
8083
+ init_Button();
8084
+ init_Box();
8085
+ init_Typography();
8086
+ init_GameIcon();
8087
+ sizeMap2 = {
8060
8088
  sm: { button: "h-button-sm px-3 text-xs", hotkey: "text-[9px] px-1", icon: "text-xs" },
8061
8089
  md: { button: "h-button-md px-4 text-sm", hotkey: "text-xs px-1.5", icon: "text-sm" },
8062
8090
  lg: { button: "h-button-lg px-5 text-base", hotkey: "text-xs px-2", icon: "text-base" }
@@ -8789,10 +8817,12 @@ function MiniMap({
8789
8817
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8790
8818
  /* @__PURE__ */ jsxRuntime.jsx("style", { children: `@keyframes minimap-blink{0%,49%{opacity:1}50%,100%{opacity:0}}` }),
8791
8819
  /* @__PURE__ */ jsxRuntime.jsxs(
8792
- "div",
8820
+ exports.Box,
8793
8821
  {
8822
+ position: "relative",
8823
+ display: "inline-block",
8794
8824
  className: cn(
8795
- "relative inline-block border border-border/20 rounded-container",
8825
+ "border border-border/20 rounded-container",
8796
8826
  className
8797
8827
  ),
8798
8828
  children: [
@@ -8807,10 +8837,10 @@ function MiniMap({
8807
8837
  }
8808
8838
  ),
8809
8839
  playerLeft !== null && playerTop !== null && /* @__PURE__ */ jsxRuntime.jsx(
8810
- "div",
8840
+ exports.Box,
8811
8841
  {
8842
+ position: "absolute",
8812
8843
  style: {
8813
- position: "absolute",
8814
8844
  left: playerLeft,
8815
8845
  top: playerTop,
8816
8846
  width: 3,
@@ -8831,6 +8861,7 @@ var init_MiniMap = __esm({
8831
8861
  "components/game/2d/atoms/MiniMap.tsx"() {
8832
8862
  "use client";
8833
8863
  init_cn();
8864
+ init_Box();
8834
8865
  DEFAULT_TILES = [
8835
8866
  { x: 10, y: 10, color: "#4ade80" },
8836
8867
  { x: 20, y: 15, color: "#4ade80" },
@@ -8861,12 +8892,13 @@ function HealthBar({
8861
8892
  frameAsset,
8862
8893
  fillAsset
8863
8894
  }) {
8864
- const sizes = sizeMap2[size];
8895
+ const sizes = sizeMap3[size];
8865
8896
  const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
8866
8897
  if (format === "hearts") {
8867
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex items-center gap-1", className), children: Array.from({ length: max }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
8868
- "span",
8898
+ return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn("flex items-center gap-1", className), children: Array.from({ length: max }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
8899
+ exports.Box,
8869
8900
  {
8901
+ as: "span",
8870
8902
  className: cn(animated && "transition-transform hover:scale-110"),
8871
8903
  children: heartIcon(i < current, sizes.heart)
8872
8904
  },
@@ -8875,10 +8907,12 @@ function HealthBar({
8875
8907
  }
8876
8908
  if (format === "bar") {
8877
8909
  return /* @__PURE__ */ jsxRuntime.jsx(
8878
- "div",
8910
+ exports.Box,
8879
8911
  {
8912
+ position: "relative",
8913
+ overflow: "hidden",
8880
8914
  className: cn(
8881
- "relative overflow-hidden rounded-full",
8915
+ "rounded-full",
8882
8916
  !frameAsset && "bg-muted",
8883
8917
  sizes.bar,
8884
8918
  "w-24",
@@ -8886,10 +8920,11 @@ function HealthBar({
8886
8920
  ),
8887
8921
  style: frameAsset ? { backgroundImage: `url(${frameAsset.url})`, backgroundSize: "100% 100%" } : void 0,
8888
8922
  children: /* @__PURE__ */ jsxRuntime.jsx(
8889
- "div",
8923
+ exports.Box,
8890
8924
  {
8925
+ position: "absolute",
8891
8926
  className: cn(
8892
- "absolute inset-y-0 left-0 rounded-full",
8927
+ "inset-y-0 left-0 rounded-full",
8893
8928
  !fillAsset && (percentage > 66 ? "bg-success" : percentage > 33 ? "bg-warning" : "bg-error"),
8894
8929
  animated && "transition-all duration-300"
8895
8930
  ),
@@ -8903,10 +8938,11 @@ function HealthBar({
8903
8938
  );
8904
8939
  }
8905
8940
  if (format === "progress") {
8906
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-2", className), children: [
8941
+ return /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: cn("flex items-center gap-2", className), children: [
8907
8942
  level != null && /* @__PURE__ */ jsxRuntime.jsxs(
8908
- "span",
8943
+ exports.Typography,
8909
8944
  {
8945
+ as: "span",
8910
8946
  className: cn(
8911
8947
  "flex-shrink-0 rounded-interactive font-bold",
8912
8948
  "bg-accent text-accent-foreground border border-accent",
@@ -8918,21 +8954,23 @@ function HealthBar({
8918
8954
  ]
8919
8955
  }
8920
8956
  ),
8921
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 flex flex-col gap-0.5", children: [
8957
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex-1 flex flex-col gap-0.5", children: [
8922
8958
  /* @__PURE__ */ jsxRuntime.jsx(
8923
- "div",
8959
+ exports.Box,
8924
8960
  {
8961
+ position: "relative",
8925
8962
  className: cn(
8926
- "relative w-full overflow-hidden rounded-full",
8963
+ "w-full overflow-hidden rounded-full",
8927
8964
  !frameAsset && "bg-muted border border-muted",
8928
8965
  sizes.bar
8929
8966
  ),
8930
8967
  style: frameAsset ? { backgroundImage: `url(${frameAsset.url})`, backgroundSize: "100% 100%" } : void 0,
8931
8968
  children: /* @__PURE__ */ jsxRuntime.jsx(
8932
- "div",
8969
+ exports.Box,
8933
8970
  {
8971
+ position: "absolute",
8934
8972
  className: cn(
8935
- "absolute inset-y-0 left-0 rounded-full",
8973
+ "inset-y-0 left-0 rounded-full",
8936
8974
  !fillAsset && "bg-gradient-to-r from-accent to-info",
8937
8975
  animated && "transition-all duration-500 ease-out"
8938
8976
  ),
@@ -8944,7 +8982,7 @@ function HealthBar({
8944
8982
  )
8945
8983
  }
8946
8984
  ),
8947
- showLabel && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("text-foreground/70 tabular-nums", sizes.label), children: [
8985
+ showLabel && /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { as: "span", className: cn("text-foreground/70 tabular-nums", sizes.label), children: [
8948
8986
  current,
8949
8987
  " / ",
8950
8988
  max,
@@ -8953,16 +8991,18 @@ function HealthBar({
8953
8991
  ] })
8954
8992
  ] });
8955
8993
  }
8956
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("font-mono font-bold", sizes.text, className), children: [
8994
+ return /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { as: "span", className: cn("font-mono font-bold", sizes.text, className), children: [
8957
8995
  current,
8958
8996
  "/",
8959
8997
  max
8960
8998
  ] });
8961
8999
  }
8962
- var heartIcon, sizeMap2;
9000
+ var heartIcon, sizeMap3;
8963
9001
  var init_HealthBar = __esm({
8964
9002
  "components/game/2d/atoms/HealthBar.tsx"() {
8965
9003
  init_cn();
9004
+ init_Box();
9005
+ init_Typography();
8966
9006
  heartIcon = (filled, size) => /* @__PURE__ */ jsxRuntime.jsx(
8967
9007
  "svg",
8968
9008
  {
@@ -8974,7 +9014,7 @@ var init_HealthBar = __esm({
8974
9014
  children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" })
8975
9015
  }
8976
9016
  );
8977
- sizeMap2 = {
9017
+ sizeMap3 = {
8978
9018
  sm: { heart: "w-4 h-4", bar: "h-2", text: "text-sm", label: "text-xs", badge: "text-xs px-1.5 py-0.5" },
8979
9019
  md: { heart: "w-6 h-6", bar: "h-3", text: "text-base", label: "text-xs", badge: "text-xs px-2 py-0.5" },
8980
9020
  lg: { heart: "w-8 h-8", bar: "h-4", text: "text-lg", label: "text-sm", badge: "text-sm px-2.5 py-1" }
@@ -10762,10 +10802,11 @@ function Canvas2D({
10762
10802
  }
10763
10803
  }
10764
10804
  ),
10765
- process.env.NODE_ENV !== "production" && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-game-actions": "", className: "sr-only", "aria-hidden": "true", children: [
10805
+ process.env.NODE_ENV !== "production" && /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { "data-game-actions": "", className: "sr-only", "aria-hidden": "true", children: [
10766
10806
  tileClickEvent && /* @__PURE__ */ jsxRuntime.jsx(
10767
- "button",
10807
+ exports.Button,
10768
10808
  {
10809
+ variant: "ghost",
10769
10810
  "data-event": tileClickEvent,
10770
10811
  "data-x": "0",
10771
10812
  "data-y": "0",
@@ -10774,8 +10815,9 @@ function Canvas2D({
10774
10815
  }
10775
10816
  ),
10776
10817
  unitClickEvent && units && units.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
10777
- "button",
10818
+ exports.Button,
10778
10819
  {
10820
+ variant: "ghost",
10779
10821
  "data-event": unitClickEvent,
10780
10822
  "data-unit-id": units[0].id,
10781
10823
  onClick: () => eventBus.emit(`UI:${unitClickEvent}`, { unitId: units[0].id }),
@@ -10784,15 +10826,17 @@ function Canvas2D({
10784
10826
  )
10785
10827
  ] }),
10786
10828
  unitOverlays.map(({ unit, screenX, screenY }) => /* @__PURE__ */ jsxRuntime.jsxs(
10787
- "div",
10829
+ exports.Box,
10788
10830
  {
10789
- className: "absolute pointer-events-none",
10831
+ position: "absolute",
10832
+ className: "pointer-events-none",
10790
10833
  style: { left: Math.round(screenX), top: Math.round(screenY), transform: "translate(-50%, 0)", zIndex: 5 },
10791
10834
  children: [
10792
10835
  unit.name && /* @__PURE__ */ jsxRuntime.jsx(
10793
- "div",
10836
+ exports.Typography,
10794
10837
  {
10795
- className: "text-white text-xs font-bold px-1.5 py-0.5 rounded mb-0.5 whitespace-nowrap",
10838
+ as: "span",
10839
+ className: "text-white text-xs font-bold px-1.5 py-0.5 rounded mb-0.5 whitespace-nowrap block",
10796
10840
  style: { background: unit.team === "player" ? "rgba(59,130,246,0.9)" : unit.team === "enemy" ? "rgba(239,68,68,0.9)" : "rgba(107,114,128,0.9)" },
10797
10841
  children: unit.name
10798
10842
  }
@@ -10802,7 +10846,7 @@ function Canvas2D({
10802
10846
  },
10803
10847
  unit.id
10804
10848
  )),
10805
- showMinimap && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-2 right-2 pointer-events-none", style: { zIndex: 10 }, children: /* @__PURE__ */ jsxRuntime.jsx(
10849
+ showMinimap && /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { position: "absolute", className: "bottom-2 right-2 pointer-events-none", style: { zIndex: 10 }, children: /* @__PURE__ */ jsxRuntime.jsx(
10806
10850
  MiniMap,
10807
10851
  {
10808
10852
  tiles: miniMapTiles,
@@ -10824,6 +10868,7 @@ var init_Canvas2D = __esm({
10824
10868
  init_cn();
10825
10869
  init_useEventBus();
10826
10870
  init_Box();
10871
+ init_Button();
10827
10872
  init_Stack();
10828
10873
  init_Icon();
10829
10874
  init_Typography();
@@ -17201,38 +17246,6 @@ var init_Breadcrumb = __esm({
17201
17246
  exports.Breadcrumb.displayName = "Breadcrumb";
17202
17247
  }
17203
17248
  });
17204
- function GameIcon({ assetUrl, icon, size = "md", alt, className }) {
17205
- const px = typeof size === "number" ? size : sizeMap3[size];
17206
- if (assetUrl?.url) {
17207
- return /* @__PURE__ */ jsxRuntime.jsx(
17208
- "img",
17209
- {
17210
- src: assetUrl.url,
17211
- alt: alt ?? assetUrl.category ?? "",
17212
- width: px,
17213
- height: px,
17214
- style: { imageRendering: "pixelated", objectFit: "contain", width: px, height: px },
17215
- className: cn("flex-shrink-0", className)
17216
- }
17217
- );
17218
- }
17219
- const I = typeof icon === "string" ? resolveIcon(icon) : icon;
17220
- return /* @__PURE__ */ jsxRuntime.jsx(I, { width: px, height: px, className: cn("flex-shrink-0", className) });
17221
- }
17222
- var sizeMap3;
17223
- var init_GameIcon = __esm({
17224
- "components/game/2d/atoms/GameIcon.tsx"() {
17225
- "use client";
17226
- init_cn();
17227
- init_Icon();
17228
- sizeMap3 = {
17229
- sm: 16,
17230
- md: 24,
17231
- lg: 32
17232
- };
17233
- GameIcon.displayName = "GameIcon";
17234
- }
17235
- });
17236
17249
  function BuilderBoard({
17237
17250
  entity,
17238
17251
  completeEvent = "PUZZLE_COMPLETE",
@@ -19064,9 +19077,9 @@ function GameCard({
19064
19077
  }, [disabled, id, onClick, clickEvent, eventBus]);
19065
19078
  const artPx = artPxMap[size];
19066
19079
  return /* @__PURE__ */ jsxRuntime.jsxs(
19067
- "button",
19080
+ exports.Button,
19068
19081
  {
19069
- type: "button",
19082
+ variant: "ghost",
19070
19083
  onClick: handleClick,
19071
19084
  disabled,
19072
19085
  title: name,
@@ -19080,8 +19093,9 @@ function GameCard({
19080
19093
  ),
19081
19094
  children: [
19082
19095
  cost != null && /* @__PURE__ */ jsxRuntime.jsx(
19083
- "span",
19096
+ exports.Typography,
19084
19097
  {
19098
+ as: "span",
19085
19099
  className: cn(
19086
19100
  "absolute -top-2 -left-2 flex items-center justify-center",
19087
19101
  "min-w-[22px] h-[22px] rounded-full px-1",
@@ -19090,17 +19104,7 @@ function GameCard({
19090
19104
  children: cost
19091
19105
  }
19092
19106
  ),
19093
- /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "flex-1 flex items-center justify-center w-full", children: art ? /* @__PURE__ */ jsxRuntime.jsx(
19094
- "img",
19095
- {
19096
- src: art.url,
19097
- alt: name ?? id,
19098
- width: artPx,
19099
- height: artPx,
19100
- style: { imageRendering: "pixelated", objectFit: "contain" },
19101
- className: "flex-shrink-0"
19102
- }
19103
- ) : /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "rounded bg-muted/40", style: { width: artPx, height: artPx } }) }),
19107
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "flex-1 flex items-center justify-center w-full", children: art ? /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl: art, icon: "image", size: artPx, alt: name ?? id, className: "flex-shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "rounded bg-muted/40", style: { width: artPx, height: artPx } }) }),
19104
19108
  name != null && /* @__PURE__ */ jsxRuntime.jsx(
19105
19109
  exports.Typography,
19106
19110
  {
@@ -19110,8 +19114,8 @@ function GameCard({
19110
19114
  }
19111
19115
  ),
19112
19116
  (attack != null || defense != null) && /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex w-full items-center justify-between px-0.5 text-[10px] font-bold leading-none", children: [
19113
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-error", children: attack != null ? `\u2694${attack}` : "" }),
19114
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-info", children: defense != null ? `\u{1F6E1}${defense}` : "" })
19117
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "text-error", children: attack != null ? `\u2694${attack}` : "" }),
19118
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "text-info", children: defense != null ? `\u{1F6E1}${defense}` : "" })
19115
19119
  ] })
19116
19120
  ]
19117
19121
  }
@@ -19124,7 +19128,9 @@ var init_GameCard = __esm({
19124
19128
  init_cn();
19125
19129
  init_useEventBus();
19126
19130
  init_Box();
19131
+ init_Button();
19127
19132
  init_Typography();
19133
+ init_GameIcon();
19128
19134
  cardSizeMap = {
19129
19135
  sm: "w-16 h-24",
19130
19136
  md: "w-20 h-28",
@@ -21535,11 +21541,11 @@ function ChoiceButton({
21535
21541
  }) {
21536
21542
  const eventBus = useEventBus();
21537
21543
  return /* @__PURE__ */ jsxRuntime.jsxs(
21538
- "button",
21544
+ exports.Button,
21539
21545
  {
21540
- type: "button",
21546
+ variant: "ghost",
21541
21547
  disabled,
21542
- onClick: (e) => {
21548
+ onClick: () => {
21543
21549
  if (action) eventBus.emit(`UI:${action}`, {});
21544
21550
  onClick?.();
21545
21551
  },
@@ -21552,8 +21558,9 @@ function ChoiceButton({
21552
21558
  ),
21553
21559
  children: [
21554
21560
  index !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(
21555
- "span",
21561
+ exports.Typography,
21556
21562
  {
21563
+ as: "span",
21557
21564
  className: cn(
21558
21565
  "flex-shrink-0 font-mono font-bold text-sm",
21559
21566
  selected ? "text-accent" : "text-muted-foreground"
@@ -21564,24 +21571,14 @@ function ChoiceButton({
21564
21571
  ]
21565
21572
  }
21566
21573
  ),
21567
- assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(
21568
- "img",
21569
- {
21570
- src: assetUrl.url,
21571
- alt: "",
21572
- width: 16,
21573
- height: 16,
21574
- style: { imageRendering: "pixelated", objectFit: "contain" },
21575
- className: "flex-shrink-0"
21576
- }
21577
- ) : icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-sm", children: typeof icon === "string" ? (() => {
21574
+ assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl, icon: "image", size: 16, className: "flex-shrink-0" }) : icon ? /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { as: "span", className: "flex-shrink-0 text-sm", children: typeof icon === "string" ? (() => {
21578
21575
  const I = resolveIcon(icon);
21579
21576
  return I ? /* @__PURE__ */ jsxRuntime.jsx(I, { className: "w-4 h-4" }) : null;
21580
21577
  })() : /* @__PURE__ */ (() => {
21581
21578
  const I = icon;
21582
21579
  return /* @__PURE__ */ jsxRuntime.jsx(I, { className: "w-4 h-4" });
21583
21580
  })() }) : null,
21584
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm leading-snug", children: text })
21581
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "text-sm leading-snug", children: text })
21585
21582
  ]
21586
21583
  }
21587
21584
  );
@@ -21591,6 +21588,10 @@ var init_ChoiceButton = __esm({
21591
21588
  init_cn();
21592
21589
  init_Icon();
21593
21590
  init_useEventBus();
21591
+ init_Button();
21592
+ init_Box();
21593
+ init_Typography();
21594
+ init_GameIcon();
21594
21595
  ChoiceButton.displayName = "ChoiceButton";
21595
21596
  }
21596
21597
  });
@@ -22268,7 +22269,7 @@ function ComboCounter({
22268
22269
  const sizes = sizeMap4[size];
22269
22270
  if (combo <= 0) return null;
22270
22271
  return /* @__PURE__ */ jsxRuntime.jsxs(
22271
- "div",
22272
+ exports.Box,
22272
22273
  {
22273
22274
  className: cn(
22274
22275
  "inline-flex flex-col items-center justify-center",
@@ -22278,24 +22279,14 @@ function ComboCounter({
22278
22279
  className
22279
22280
  ),
22280
22281
  children: [
22281
- assetUrl && /* @__PURE__ */ jsxRuntime.jsx(
22282
- "img",
22283
- {
22284
- src: assetUrl.url,
22285
- alt: "combo",
22286
- width: 24,
22287
- height: 24,
22288
- style: { imageRendering: "pixelated", objectFit: "contain" },
22289
- className: "flex-shrink-0 mb-0.5"
22290
- }
22291
- ),
22292
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-black tabular-nums leading-none", sizes.combo, getComboIntensity(combo)), children: combo }),
22293
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("font-bold uppercase tracking-wider text-muted-foreground", sizes.label), children: "combo" }),
22294
- multiplier != null && multiplier > 1 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("font-bold text-warning tabular-nums", sizes.multiplier), children: [
22282
+ assetUrl && /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl, icon: "image", size: 24, className: "flex-shrink-0 mb-0.5" }),
22283
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: cn("font-black tabular-nums leading-none", sizes.combo, getComboIntensity(combo)), children: combo }),
22284
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: cn("font-bold uppercase tracking-wider text-muted-foreground", sizes.label), children: "combo" }),
22285
+ multiplier != null && multiplier > 1 && /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { as: "span", className: cn("font-bold text-warning tabular-nums", sizes.multiplier), children: [
22295
22286
  "x",
22296
22287
  multiplier.toFixed(1)
22297
22288
  ] }),
22298
- streak != null && streak > 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("text-muted-foreground tabular-nums", sizes.label), children: [
22289
+ streak != null && streak > 0 && /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { as: "span", className: cn("text-muted-foreground tabular-nums", sizes.label), children: [
22299
22290
  streak,
22300
22291
  " streak"
22301
22292
  ] })
@@ -22307,6 +22298,9 @@ var DEFAULT_ASSET_URL2, sizeMap4;
22307
22298
  var init_ComboCounter = __esm({
22308
22299
  "components/game/2d/atoms/ComboCounter.tsx"() {
22309
22300
  init_cn();
22301
+ init_Box();
22302
+ init_Typography();
22303
+ init_GameIcon();
22310
22304
  DEFAULT_ASSET_URL2 = {
22311
22305
  url: "https://almadar-kflow-assets.web.app/shared/effects/flash/flash00.png",
22312
22306
  role: "effect",
@@ -22556,9 +22550,9 @@ function ControlButton({
22556
22550
  [isPressed, releaseEvent, eventBus, onRelease]
22557
22551
  );
22558
22552
  return /* @__PURE__ */ jsxRuntime.jsx(
22559
- "button",
22553
+ exports.Button,
22560
22554
  {
22561
- type: "button",
22555
+ variant,
22562
22556
  disabled,
22563
22557
  onPointerDown: handlePointerDown,
22564
22558
  onPointerUp: handlePointerUp,
@@ -22576,23 +22570,13 @@ function ControlButton({
22576
22570
  disabled && "opacity-50 cursor-not-allowed",
22577
22571
  className
22578
22572
  ),
22579
- children: assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(
22580
- "img",
22581
- {
22582
- src: assetUrl.url,
22583
- alt: "",
22584
- width: 24,
22585
- height: 24,
22586
- style: { imageRendering: "pixelated", objectFit: "contain" },
22587
- className: "flex-shrink-0"
22588
- }
22589
- ) : icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl", children: typeof icon === "string" ? /^[a-zA-Z0-9-]+$/.test(icon) ? (() => {
22573
+ children: assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl, icon: "image", size: 24, className: "flex-shrink-0" }) : icon ? /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { as: "span", className: "text-2xl", children: typeof icon === "string" ? /^[a-zA-Z0-9-]+$/.test(icon) ? (() => {
22590
22574
  const I = resolveIcon(icon);
22591
22575
  return I ? /* @__PURE__ */ jsxRuntime.jsx(I, { className: "w-6 h-6" }) : null;
22592
22576
  })() : icon : /* @__PURE__ */ (() => {
22593
22577
  const I = icon;
22594
22578
  return /* @__PURE__ */ jsxRuntime.jsx(I, { className: "w-6 h-6" });
22595
- })() }) : label ? /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }) : null
22579
+ })() }) : label ? /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", children: label }) : null
22596
22580
  }
22597
22581
  );
22598
22582
  }
@@ -22603,6 +22587,10 @@ var init_ControlButton = __esm({
22603
22587
  init_cn();
22604
22588
  init_useEventBus();
22605
22589
  init_Icon();
22590
+ init_Button();
22591
+ init_Box();
22592
+ init_Typography();
22593
+ init_GameIcon();
22606
22594
  sizeMap5 = {
22607
22595
  sm: "w-10 h-10 text-sm",
22608
22596
  md: "w-14 h-14 text-base",
@@ -22687,22 +22675,22 @@ function ControlGrid({
22687
22675
  },
22688
22676
  d
22689
22677
  );
22690
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("inline-grid grid-cols-3", ds.gap, ds.container, className), children: [
22691
- /* @__PURE__ */ jsxRuntime.jsx("div", {}),
22678
+ return /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: cn("inline-grid grid-cols-3", ds.gap, ds.container, className), children: [
22679
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, {}),
22692
22680
  dir("up"),
22693
- /* @__PURE__ */ jsxRuntime.jsx("div", {}),
22681
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, {}),
22694
22682
  dir("left"),
22695
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-6 h-6 rounded-interactive bg-muted border-2 border-muted-foreground" }) }),
22683
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "w-6 h-6 rounded-interactive bg-muted border-2 border-muted-foreground" }) }),
22696
22684
  dir("right"),
22697
- /* @__PURE__ */ jsxRuntime.jsx("div", {}),
22685
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, {}),
22698
22686
  dir("down"),
22699
- /* @__PURE__ */ jsxRuntime.jsx("div", {})
22687
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, {})
22700
22688
  ] });
22701
22689
  }
22702
22690
  if (layout === "diamond" && buttons.length === 4) {
22703
22691
  const [top, right, bottom, left] = buttons;
22704
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(layoutClass.diamond, className), children: [
22705
- /* @__PURE__ */ jsxRuntime.jsx("div", {}),
22692
+ return /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: cn(layoutClass.diamond, className), children: [
22693
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, {}),
22706
22694
  /* @__PURE__ */ jsxRuntime.jsx(
22707
22695
  ControlButton,
22708
22696
  {
@@ -22717,7 +22705,7 @@ function ControlGrid({
22717
22705
  disabled
22718
22706
  }
22719
22707
  ),
22720
- /* @__PURE__ */ jsxRuntime.jsx("div", {}),
22708
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, {}),
22721
22709
  /* @__PURE__ */ jsxRuntime.jsx(
22722
22710
  ControlButton,
22723
22711
  {
@@ -22732,7 +22720,7 @@ function ControlGrid({
22732
22720
  disabled
22733
22721
  }
22734
22722
  ),
22735
- /* @__PURE__ */ jsxRuntime.jsx("div", {}),
22723
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, {}),
22736
22724
  /* @__PURE__ */ jsxRuntime.jsx(
22737
22725
  ControlButton,
22738
22726
  {
@@ -22747,7 +22735,7 @@ function ControlGrid({
22747
22735
  disabled
22748
22736
  }
22749
22737
  ),
22750
- /* @__PURE__ */ jsxRuntime.jsx("div", {}),
22738
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, {}),
22751
22739
  /* @__PURE__ */ jsxRuntime.jsx(
22752
22740
  ControlButton,
22753
22741
  {
@@ -22762,10 +22750,10 @@ function ControlGrid({
22762
22750
  disabled
22763
22751
  }
22764
22752
  ),
22765
- /* @__PURE__ */ jsxRuntime.jsx("div", {})
22753
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, {})
22766
22754
  ] });
22767
22755
  }
22768
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(layoutClass[layout], className), children: buttons.map((button) => /* @__PURE__ */ jsxRuntime.jsx(
22756
+ return /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn(layoutClass[layout], className), children: buttons.map((button) => /* @__PURE__ */ jsxRuntime.jsx(
22769
22757
  ControlButton,
22770
22758
  {
22771
22759
  icon: button.icon,
@@ -22787,6 +22775,7 @@ var init_ControlGrid = __esm({
22787
22775
  "use client";
22788
22776
  init_cn();
22789
22777
  init_useEventBus();
22778
+ init_Box();
22790
22779
  init_ControlButton();
22791
22780
  sizeKey = { sm: "sm", md: "md", lg: "lg" };
22792
22781
  layoutClass = {
@@ -23051,8 +23040,9 @@ function DamageNumber({
23051
23040
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
23052
23041
  /* @__PURE__ */ jsxRuntime.jsx("style", { children: floatKeyframes }),
23053
23042
  /* @__PURE__ */ jsxRuntime.jsxs(
23054
- "span",
23043
+ exports.Typography,
23055
23044
  {
23045
+ as: "span",
23056
23046
  className: cn(
23057
23047
  "inline-flex items-center gap-0.5 font-mono select-none pointer-events-none",
23058
23048
  sizeMap6[size],
@@ -23061,17 +23051,7 @@ function DamageNumber({
23061
23051
  ),
23062
23052
  style: { animation: "damageFloat 1s ease-out forwards" },
23063
23053
  children: [
23064
- assetUrl && /* @__PURE__ */ jsxRuntime.jsx(
23065
- "img",
23066
- {
23067
- src: assetUrl.url,
23068
- alt: "",
23069
- width: 14,
23070
- height: 14,
23071
- style: { imageRendering: "pixelated", objectFit: "contain" },
23072
- className: "flex-shrink-0"
23073
- }
23074
- ),
23054
+ assetUrl && /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl, icon: "image", size: 14, className: "flex-shrink-0" }),
23075
23055
  displayText
23076
23056
  ]
23077
23057
  }
@@ -23082,6 +23062,8 @@ var sizeMap6, typeStyles, floatKeyframes, DEFAULT_ASSET_URL4;
23082
23062
  var init_DamageNumber = __esm({
23083
23063
  "components/game/2d/atoms/DamageNumber.tsx"() {
23084
23064
  init_cn();
23065
+ init_Typography();
23066
+ init_GameIcon();
23085
23067
  sizeMap6 = {
23086
23068
  sm: "text-sm",
23087
23069
  md: "text-lg",
@@ -29443,7 +29425,7 @@ function ScoreDisplay({
29443
29425
  const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof score === "number" && !Number.isNaN(score) ? score : 0;
29444
29426
  const formattedValue = new Intl.NumberFormat(locale).format(resolvedValue);
29445
29427
  return /* @__PURE__ */ jsxRuntime.jsxs(
29446
- "div",
29428
+ exports.Box,
29447
29429
  {
29448
29430
  className: cn(
29449
29431
  "flex items-center gap-2 font-bold",
@@ -29451,19 +29433,9 @@ function ScoreDisplay({
29451
29433
  className
29452
29434
  ),
29453
29435
  children: [
29454
- assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(
29455
- "img",
29456
- {
29457
- src: assetUrl.url,
29458
- alt: "",
29459
- width: 20,
29460
- height: 20,
29461
- style: { imageRendering: "pixelated", objectFit: "contain" },
29462
- className: "flex-shrink-0"
29463
- }
29464
- ) : icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: icon }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon }) }) : null,
29465
- label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: label }),
29466
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "tabular-nums", children: formattedValue })
29436
+ assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl, icon: "image", size: 20, className: "flex-shrink-0" }) : icon ? /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { as: "span", className: "flex-shrink-0", children: typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: icon }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon }) }) : null,
29437
+ label && /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "text-muted-foreground", children: label }),
29438
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "tabular-nums", children: formattedValue })
29467
29439
  ]
29468
29440
  }
29469
29441
  );
@@ -29473,6 +29445,9 @@ var init_ScoreDisplay = __esm({
29473
29445
  "components/game/2d/atoms/ScoreDisplay.tsx"() {
29474
29446
  init_cn();
29475
29447
  init_Icon();
29448
+ init_Box();
29449
+ init_Typography();
29450
+ init_GameIcon();
29476
29451
  sizeMap8 = {
29477
29452
  sm: "text-sm",
29478
29453
  md: "text-lg",
@@ -29533,12 +29508,12 @@ function Sprite({
29533
29508
  onClick?.();
29534
29509
  };
29535
29510
  return /* @__PURE__ */ jsxRuntime.jsx(
29536
- "div",
29511
+ exports.Box,
29537
29512
  {
29513
+ position: "absolute",
29538
29514
  className,
29539
29515
  onClick: action || onClick ? handleClick : void 0,
29540
29516
  style: {
29541
- position: "absolute",
29542
29517
  width: frameWidth,
29543
29518
  height: frameHeight,
29544
29519
  backgroundImage: `url(${spritesheet.url})`,
@@ -29594,6 +29569,7 @@ var init_Sprite = __esm({
29594
29569
  "components/game/2d/atoms/Sprite.tsx"() {
29595
29570
  "use client";
29596
29571
  init_useEventBus();
29572
+ init_Box();
29597
29573
  init_spriteAnimation();
29598
29574
  DEFAULT_SPRITESHEET = {
29599
29575
  url: "https://almadar-kflow-assets.web.app/shared/isometric-blocks/Spritesheet/allTiles_sheet.png",
@@ -29630,17 +29606,7 @@ function StateIndicator({
29630
29606
  className
29631
29607
  ),
29632
29608
  children: [
29633
- /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { as: "span", children: assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(
29634
- "img",
29635
- {
29636
- src: assetUrl.url,
29637
- alt: displayLabel,
29638
- width: 16,
29639
- height: 16,
29640
- style: { imageRendering: "pixelated", objectFit: "contain" },
29641
- className: "flex-shrink-0"
29642
- }
29643
- ) : typeof config.icon === "string" ? /^[a-zA-Z0-9-]+$/.test(config.icon) ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: config.icon }) : config.icon : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon: config.icon }) }),
29609
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { as: "span", children: assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl, icon: "image", size: 16, alt: displayLabel, className: "flex-shrink-0" }) : typeof config.icon === "string" ? /^[a-zA-Z0-9-]+$/.test(config.icon) ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: config.icon }) : config.icon : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon: config.icon }) }),
29644
29610
  /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { as: "span", children: displayLabel })
29645
29611
  ]
29646
29612
  }
@@ -29652,6 +29618,7 @@ var init_StateIndicator = __esm({
29652
29618
  init_Box();
29653
29619
  init_Icon();
29654
29620
  init_cn();
29621
+ init_GameIcon();
29655
29622
  DEFAULT_ASSET_URL6 = {
29656
29623
  url: "https://almadar-kflow-assets.web.app/shared/isometric-dungeon/Isometric/chestClosed_E.png",
29657
29624
  role: "ui",
@@ -29705,7 +29672,7 @@ function TimerDisplay({
29705
29672
  }) {
29706
29673
  const isLow = lowThreshold != null && seconds <= lowThreshold && seconds > 0;
29707
29674
  return /* @__PURE__ */ jsxRuntime.jsxs(
29708
- "div",
29675
+ exports.Box,
29709
29676
  {
29710
29677
  className: cn(
29711
29678
  "inline-flex items-center gap-1 justify-center rounded-container",
@@ -29717,7 +29684,7 @@ function TimerDisplay({
29717
29684
  className
29718
29685
  ),
29719
29686
  children: [
29720
- iconAsset && /* @__PURE__ */ jsxRuntime.jsx("img", { src: iconAsset.url, alt: "", className: "w-4 h-4 object-contain flex-shrink-0" }),
29687
+ iconAsset && /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl: iconAsset, icon: "image", size: 16, className: "w-4 h-4 object-contain flex-shrink-0" }),
29721
29688
  formatTime(seconds, format)
29722
29689
  ]
29723
29690
  }
@@ -29727,6 +29694,8 @@ var sizeMap9;
29727
29694
  var init_TimerDisplay = __esm({
29728
29695
  "components/game/2d/atoms/TimerDisplay.tsx"() {
29729
29696
  init_cn();
29697
+ init_Box();
29698
+ init_GameIcon();
29730
29699
  sizeMap9 = {
29731
29700
  sm: "text-sm px-2 py-0.5",
29732
29701
  md: "text-lg px-3 py-1",
@@ -29747,7 +29716,7 @@ function ResourceCounter({
29747
29716
  }) {
29748
29717
  const sizes = sizeMap10[size];
29749
29718
  return /* @__PURE__ */ jsxRuntime.jsxs(
29750
- "div",
29719
+ exports.Box,
29751
29720
  {
29752
29721
  className: cn(
29753
29722
  "inline-flex items-center rounded-container",
@@ -29756,21 +29725,11 @@ function ResourceCounter({
29756
29725
  className
29757
29726
  ),
29758
29727
  children: [
29759
- assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(
29760
- "img",
29761
- {
29762
- src: assetUrl.url,
29763
- alt: label,
29764
- width: sizes.img,
29765
- height: sizes.img,
29766
- style: { imageRendering: "pixelated", objectFit: "contain" },
29767
- className: "flex-shrink-0"
29768
- }
29769
- ) : icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: icon }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon }) }) : null,
29770
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: label }),
29771
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("font-bold tabular-nums", color && (color in colorTokenClasses2 ? colorTokenClasses2[color] : color)), children: [
29728
+ assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl, icon: "image", size: sizes.img, alt: label, className: "flex-shrink-0" }) : icon ? /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { as: "span", className: cn("flex-shrink-0", sizes.icon), children: typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: icon }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon }) }) : null,
29729
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "text-muted-foreground", children: label }),
29730
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { as: "span", className: cn("font-bold tabular-nums", color && (color in colorTokenClasses2 ? colorTokenClasses2[color] : color)), children: [
29772
29731
  value,
29773
- max != null && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
29732
+ max != null && /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { as: "span", className: "text-muted-foreground", children: [
29774
29733
  "/",
29775
29734
  max
29776
29735
  ] })
@@ -29784,6 +29743,9 @@ var init_ResourceCounter = __esm({
29784
29743
  "components/game/2d/atoms/ResourceCounter.tsx"() {
29785
29744
  init_cn();
29786
29745
  init_Icon();
29746
+ init_Box();
29747
+ init_Typography();
29748
+ init_GameIcon();
29787
29749
  colorTokenClasses2 = {
29788
29750
  primary: "text-primary",
29789
29751
  secondary: "text-secondary",
@@ -29822,9 +29784,9 @@ function ItemSlot({
29822
29784
  const isClickable = onClick != null || action != null;
29823
29785
  const px = assetSizeMap[size];
29824
29786
  return /* @__PURE__ */ jsxRuntime.jsx(
29825
- "button",
29787
+ exports.Button,
29826
29788
  {
29827
- type: "button",
29789
+ variant: "ghost",
29828
29790
  onClick: () => {
29829
29791
  if (action) eventBus.emit(`UI:${action}`, {});
29830
29792
  onClick?.();
@@ -29843,21 +29805,12 @@ function ItemSlot({
29843
29805
  !isClickable && "cursor-default",
29844
29806
  className
29845
29807
  ),
29846
- children: empty ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground text-base", children: "+" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
29847
- assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(
29848
- "img",
29849
- {
29850
- src: assetUrl?.url,
29851
- alt: label,
29852
- width: px,
29853
- height: px,
29854
- style: { imageRendering: "pixelated", objectFit: "contain" },
29855
- className: "flex-shrink-0"
29856
- }
29857
- ) : icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0", children: typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: icon }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon }) }) : null,
29808
+ children: empty ? /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "text-muted-foreground text-base", children: "+" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
29809
+ assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl, icon: "image", size: px, alt: label, className: "flex-shrink-0" }) : icon ? /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { as: "span", className: "flex-shrink-0", children: typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: icon }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon }) }) : null,
29858
29810
  quantity != null && quantity > 1 && /* @__PURE__ */ jsxRuntime.jsx(
29859
- "span",
29811
+ exports.Typography,
29860
29812
  {
29813
+ as: "span",
29861
29814
  className: cn(
29862
29815
  "absolute -bottom-1 -right-1 flex items-center justify-center",
29863
29816
  "min-w-[18px] h-[18px] rounded-full px-1",
@@ -29877,6 +29830,10 @@ var init_ItemSlot = __esm({
29877
29830
  init_cn();
29878
29831
  init_Icon();
29879
29832
  init_useEventBus();
29833
+ init_Button();
29834
+ init_Box();
29835
+ init_Typography();
29836
+ init_GameIcon();
29880
29837
  sizeMap11 = {
29881
29838
  sm: "w-10 h-10 text-lg",
29882
29839
  md: "w-14 h-14 text-2xl",
@@ -29920,7 +29877,7 @@ function TurnIndicator({
29920
29877
  }) {
29921
29878
  const sizes = sizeMap12[size];
29922
29879
  return /* @__PURE__ */ jsxRuntime.jsxs(
29923
- "div",
29880
+ exports.Box,
29924
29881
  {
29925
29882
  className: cn(
29926
29883
  "inline-flex items-center rounded-container",
@@ -29929,32 +29886,22 @@ function TurnIndicator({
29929
29886
  className
29930
29887
  ),
29931
29888
  children: [
29932
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-bold tabular-nums", children: [
29889
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { as: "span", className: "font-bold tabular-nums", children: [
29933
29890
  "Turn ",
29934
29891
  currentTurn,
29935
- maxTurns != null && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
29892
+ maxTurns != null && /* @__PURE__ */ jsxRuntime.jsxs(exports.Typography, { as: "span", className: "text-muted-foreground", children: [
29936
29893
  "/",
29937
29894
  maxTurns
29938
29895
  ] })
29939
29896
  ] }),
29940
29897
  phase && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
29941
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "|" }),
29942
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: phase })
29898
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "text-muted-foreground", children: "|" }),
29899
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "text-muted-foreground", children: phase })
29943
29900
  ] }),
29944
29901
  activeTeam && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
29945
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "|" }),
29946
- assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(
29947
- "img",
29948
- {
29949
- src: assetUrl.url,
29950
- alt: "",
29951
- width: 12,
29952
- height: 12,
29953
- style: { imageRendering: "pixelated", objectFit: "contain" },
29954
- className: "flex-shrink-0"
29955
- }
29956
- ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("rounded-full bg-success/20", sizes.dot) }),
29957
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-success", children: activeTeam })
29902
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "text-muted-foreground", children: "|" }),
29903
+ assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl, icon: "image", size: 12, className: "flex-shrink-0" }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { as: "span", className: cn("rounded-full bg-success/20", sizes.dot) }),
29904
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "text-success", children: activeTeam })
29958
29905
  ] })
29959
29906
  ]
29960
29907
  }
@@ -29964,6 +29911,9 @@ var sizeMap12, DEFAULT_ASSET_URL9;
29964
29911
  var init_TurnIndicator = __esm({
29965
29912
  "components/game/2d/atoms/TurnIndicator.tsx"() {
29966
29913
  init_cn();
29914
+ init_Box();
29915
+ init_Typography();
29916
+ init_GameIcon();
29967
29917
  sizeMap12 = {
29968
29918
  sm: { wrapper: "text-xs gap-1.5 px-2 py-0.5", dot: "w-1.5 h-1.5" },
29969
29919
  md: { wrapper: "text-sm gap-2 px-3 py-1", dot: "w-2 h-2" },
@@ -29987,53 +29937,47 @@ function WaypointMarker({
29987
29937
  className
29988
29938
  }) {
29989
29939
  const sizes = sizeMap13[size];
29990
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col items-center", className), children: [
29991
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center justify-center", children: [
29940
+ return /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: cn("flex flex-col items-center", className), children: [
29941
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "relative flex items-center justify-center", children: [
29992
29942
  active && /* @__PURE__ */ jsxRuntime.jsx(
29993
- "div",
29943
+ exports.Box,
29994
29944
  {
29945
+ position: "absolute",
29995
29946
  className: cn(
29996
- "absolute rounded-full border-2 border-info animate-ping opacity-50",
29947
+ "rounded-full border-2 border-info animate-ping opacity-50",
29997
29948
  sizes.ring
29998
29949
  )
29999
29950
  }
30000
29951
  ),
30001
29952
  active && /* @__PURE__ */ jsxRuntime.jsx(
30002
- "div",
29953
+ exports.Box,
30003
29954
  {
29955
+ position: "absolute",
30004
29956
  className: cn(
30005
- "absolute rounded-full border-2 border-info",
29957
+ "rounded-full border-2 border-info",
30006
29958
  sizes.ring
30007
29959
  )
30008
29960
  }
30009
29961
  ),
30010
29962
  /* @__PURE__ */ jsxRuntime.jsx(
30011
- "div",
29963
+ exports.Box,
30012
29964
  {
29965
+ position: "relative",
30013
29966
  className: cn(
30014
- "relative flex items-center justify-center rounded-full transition-all duration-200",
29967
+ "flex items-center justify-center rounded-full transition-all duration-200",
30015
29968
  sizes.dot,
30016
29969
  completed && "bg-success text-foreground",
30017
29970
  active && !completed && "bg-info text-foreground",
30018
29971
  !active && !completed && "bg-muted"
30019
29972
  ),
30020
- children: completed ? checkIcon : assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(
30021
- "img",
30022
- {
30023
- src: assetUrl.url,
30024
- alt: label,
30025
- width: sizes.img,
30026
- height: sizes.img,
30027
- style: { imageRendering: "pixelated", objectFit: "contain" },
30028
- className: "flex-shrink-0"
30029
- }
30030
- ) : icon ? typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: icon }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon }) : null
29973
+ children: completed ? checkIcon : assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl, icon: "image", size: sizes.img, alt: label, className: "flex-shrink-0" }) : icon ? typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: icon }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon }) : null
30031
29974
  }
30032
29975
  )
30033
29976
  ] }),
30034
29977
  label && /* @__PURE__ */ jsxRuntime.jsx(
30035
- "span",
29978
+ exports.Typography,
30036
29979
  {
29980
+ as: "span",
30037
29981
  className: cn(
30038
29982
  "text-center whitespace-nowrap",
30039
29983
  sizes.label,
@@ -30049,6 +29993,9 @@ var init_WaypointMarker = __esm({
30049
29993
  "components/game/2d/atoms/WaypointMarker.tsx"() {
30050
29994
  init_cn();
30051
29995
  init_Icon();
29996
+ init_Box();
29997
+ init_Typography();
29998
+ init_GameIcon();
30052
29999
  DEFAULT_ASSET_URL10 = {
30053
30000
  url: "https://almadar-kflow-assets.web.app/shared/world-map/battle_marker.png",
30054
30001
  role: "ui",
@@ -30080,31 +30027,23 @@ function StatusEffect({
30080
30027
  className
30081
30028
  }) {
30082
30029
  const sizes = sizeMap14[size];
30083
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative inline-flex flex-col items-center", className), children: [
30030
+ return /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { position: "relative", className: cn("inline-flex flex-col items-center", className), children: [
30084
30031
  /* @__PURE__ */ jsxRuntime.jsxs(
30085
- "div",
30032
+ exports.Box,
30086
30033
  {
30034
+ position: "relative",
30087
30035
  className: cn(
30088
- "relative flex items-center justify-center rounded-interactive border-2",
30036
+ "flex items-center justify-center rounded-interactive border-2",
30089
30037
  sizes.container,
30090
30038
  variantStyles8[variant]
30091
30039
  ),
30092
30040
  title: label,
30093
30041
  children: [
30094
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("flex items-center justify-center", sizes.icon), children: assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(
30095
- "img",
30096
- {
30097
- src: assetUrl.url,
30098
- alt: label,
30099
- width: sizes.img,
30100
- height: sizes.img,
30101
- style: { imageRendering: "pixelated", objectFit: "contain" },
30102
- className: "flex-shrink-0"
30103
- }
30104
- ) : icon != null && typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: icon, size: "sm" }) : icon != null ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon, size: "sm" }) : null }),
30042
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { as: "span", className: cn("flex items-center justify-center", sizes.icon), children: assetUrl ? /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl, icon: "image", size: sizes.img, alt: label, className: "flex-shrink-0" }) : icon != null && typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: icon, size: "sm" }) : icon != null ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon, size: "sm" }) : null }),
30105
30043
  duration !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(
30106
- "span",
30044
+ exports.Typography,
30107
30045
  {
30046
+ as: "span",
30108
30047
  className: cn(
30109
30048
  "absolute bottom-0 left-0 right-0 text-center font-mono font-bold text-foreground bg-background/60 leading-tight",
30110
30049
  sizes.timer
@@ -30116,8 +30055,9 @@ function StatusEffect({
30116
30055
  }
30117
30056
  ),
30118
30057
  stacks !== void 0 && stacks > 1 && /* @__PURE__ */ jsxRuntime.jsx(
30119
- "span",
30058
+ exports.Typography,
30120
30059
  {
30060
+ as: "span",
30121
30061
  className: cn(
30122
30062
  "absolute flex items-center justify-center rounded-full bg-card text-foreground font-bold leading-none",
30123
30063
  sizes.badge
@@ -30125,7 +30065,7 @@ function StatusEffect({
30125
30065
  children: stacks
30126
30066
  }
30127
30067
  ),
30128
- label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground mt-0.5 text-center whitespace-nowrap", children: label })
30068
+ label && /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "text-xs text-muted-foreground mt-0.5 text-center whitespace-nowrap", children: label })
30129
30069
  ] });
30130
30070
  }
30131
30071
  var DEFAULT_ASSET_URL11, sizeMap14, variantStyles8;
@@ -30133,6 +30073,9 @@ var init_StatusEffect = __esm({
30133
30073
  "components/game/2d/atoms/StatusEffect.tsx"() {
30134
30074
  init_cn();
30135
30075
  init_Icon();
30076
+ init_Box();
30077
+ init_Typography();
30078
+ init_GameIcon();
30136
30079
  DEFAULT_ASSET_URL11 = {
30137
30080
  url: "https://almadar-kflow-assets.web.app/shared/effects/particles/flame_01.png",
30138
30081
  role: "ui",
@@ -30159,7 +30102,7 @@ function DialogueBubble({
30159
30102
  className
30160
30103
  }) {
30161
30104
  return /* @__PURE__ */ jsxRuntime.jsxs(
30162
- "div",
30105
+ exports.Box,
30163
30106
  {
30164
30107
  className: cn(
30165
30108
  "flex items-start gap-3 rounded-container bg-background/80 backdrop-blur-sm px-4 py-3 border border-border/10",
@@ -30167,17 +30110,10 @@ function DialogueBubble({
30167
30110
  className
30168
30111
  ),
30169
30112
  children: [
30170
- portrait && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 w-12 h-12 rounded-full overflow-hidden border-2 border-warning/60", children: /* @__PURE__ */ jsxRuntime.jsx(
30171
- "img",
30172
- {
30173
- src: portrait?.url,
30174
- alt: speaker ?? "speaker",
30175
- className: "w-full h-full object-cover"
30176
- }
30177
- ) }),
30178
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 min-w-0", children: [
30179
- speaker && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold text-warning", children: speaker }),
30180
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-foreground leading-relaxed", children: text })
30113
+ portrait && /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "flex-shrink-0 w-12 h-12 rounded-full overflow-hidden border-2 border-warning/60", children: /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl: portrait, icon: "image", size: 48, alt: speaker ?? "speaker", className: "w-full h-full object-cover" }) }),
30114
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex flex-col gap-1 min-w-0", children: [
30115
+ speaker && /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "text-sm font-bold text-warning", children: speaker }),
30116
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "text-sm text-foreground leading-relaxed", children: text })
30181
30117
  ] })
30182
30118
  ]
30183
30119
  }
@@ -30187,6 +30123,9 @@ var DEFAULT_PORTRAIT;
30187
30123
  var init_DialogueBubble = __esm({
30188
30124
  "components/game/2d/atoms/DialogueBubble.tsx"() {
30189
30125
  init_cn();
30126
+ init_Box();
30127
+ init_Typography();
30128
+ init_GameIcon();
30190
30129
  DEFAULT_PORTRAIT = {
30191
30130
  url: "https://almadar-kflow-assets.web.app/shared/characters/archetypes/04_hero.png",
30192
30131
  role: "effect",
@@ -30213,7 +30152,7 @@ function StatBadge({
30213
30152
  const numValue = typeof value === "number" ? value : parseInt(String(value), 10) || 0;
30214
30153
  const resolvedAsset = iconUrl ?? assetUrl;
30215
30154
  return /* @__PURE__ */ jsxRuntime.jsxs(
30216
- "div",
30155
+ exports.Box,
30217
30156
  {
30218
30157
  className: cn(
30219
30158
  "inline-flex items-center gap-2 rounded-container border backdrop-blur-sm",
@@ -30222,18 +30161,8 @@ function StatBadge({
30222
30161
  className
30223
30162
  ),
30224
30163
  children: [
30225
- resolvedAsset ? /* @__PURE__ */ jsxRuntime.jsx(
30226
- "img",
30227
- {
30228
- src: resolvedAsset.url,
30229
- alt: "",
30230
- width: 16,
30231
- height: 16,
30232
- style: { imageRendering: "pixelated", objectFit: "contain" },
30233
- className: "flex-shrink-0"
30234
- }
30235
- ) : icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-shrink-0 text-lg", children: typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: icon, className: "w-4 h-4" }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon, className: "w-4 h-4" }) }) : null,
30236
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground font-medium", children: label }),
30164
+ resolvedAsset ? /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl: resolvedAsset, icon: "image", size: 16, className: "flex-shrink-0" }) : icon ? /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { as: "span", className: "flex-shrink-0 text-lg", children: typeof icon === "string" ? /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { name: icon, className: "w-4 h-4" }) : /* @__PURE__ */ jsxRuntime.jsx(exports.Icon, { icon, className: "w-4 h-4" }) }) : null,
30165
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "text-muted-foreground font-medium", children: label }),
30237
30166
  format === "hearts" && max && /* @__PURE__ */ jsxRuntime.jsx(
30238
30167
  HealthBar,
30239
30168
  {
@@ -30259,7 +30188,7 @@ function StatBadge({
30259
30188
  size: size === "lg" ? "md" : "sm"
30260
30189
  }
30261
30190
  ),
30262
- format === "text" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-foreground", children: value })
30191
+ format === "text" && /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { as: "span", className: "font-bold text-foreground", children: value })
30263
30192
  ]
30264
30193
  }
30265
30194
  );
@@ -30269,6 +30198,9 @@ var init_StatBadge = __esm({
30269
30198
  "components/game/2d/molecules/StatBadge.tsx"() {
30270
30199
  init_cn();
30271
30200
  init_Icon();
30201
+ init_Box();
30202
+ init_Typography();
30203
+ init_GameIcon();
30272
30204
  init_HealthBar();
30273
30205
  init_ScoreDisplay();
30274
30206
  sizeMap15 = {
@@ -30446,9 +30378,9 @@ function GameHud({
30446
30378
  if (position === "corners") {
30447
30379
  const leftStats = stats.slice(0, Math.ceil(stats.length / 2));
30448
30380
  const rightStats = stats.slice(Math.ceil(stats.length / 2));
30449
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", positionMap[position], className), children: [
30450
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-4 left-4 flex flex-col gap-2 pointer-events-auto", children: leftStats.map((stat, i) => /* @__PURE__ */ jsxRuntime.jsx(StatBadge, { ...stat, size }, i)) }),
30451
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-4 right-4 flex flex-col gap-2 items-end pointer-events-auto", children: rightStats.map((stat, i) => /* @__PURE__ */ jsxRuntime.jsx(StatBadge, { ...stat, size }, i)) })
30381
+ return /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { position: "relative", className: cn(positionMap[position], className), children: [
30382
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { position: "absolute", className: "top-4 left-4 flex flex-col gap-2 pointer-events-auto", children: leftStats.map((stat, i) => /* @__PURE__ */ jsxRuntime.jsx(StatBadge, { ...stat, size }, i)) }),
30383
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { position: "absolute", className: "top-4 right-4 flex flex-col gap-2 items-end pointer-events-auto", children: rightStats.map((stat, i) => /* @__PURE__ */ jsxRuntime.jsx(StatBadge, { ...stat, size }, i)) })
30452
30384
  ] });
30453
30385
  }
30454
30386
  if (position === "top" || position === "bottom") {
@@ -30457,7 +30389,7 @@ function GameHud({
30457
30389
  const rightStats = stats.slice(mid);
30458
30390
  const isTop = position === "top";
30459
30391
  return /* @__PURE__ */ jsxRuntime.jsxs(
30460
- "div",
30392
+ exports.Box,
30461
30393
  {
30462
30394
  className: cn(
30463
30395
  "flex items-center justify-between w-full",
@@ -30467,17 +30399,18 @@ function GameHud({
30467
30399
  className
30468
30400
  ),
30469
30401
  children: [
30470
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3 flex-shrink-0", children: leftStats.map((stat, i) => /* @__PURE__ */ jsxRuntime.jsx(StatBadge, { ...stat, size }, i)) }),
30471
- rightStats.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3 flex-shrink-0", children: rightStats.map((stat, i) => /* @__PURE__ */ jsxRuntime.jsx(StatBadge, { ...stat, size }, i)) })
30402
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "flex items-center gap-3 flex-shrink-0", children: leftStats.map((stat, i) => /* @__PURE__ */ jsxRuntime.jsx(StatBadge, { ...stat, size }, i)) }),
30403
+ rightStats.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "flex items-center gap-3 flex-shrink-0", children: rightStats.map((stat, i) => /* @__PURE__ */ jsxRuntime.jsx(StatBadge, { ...stat, size }, i)) })
30472
30404
  ]
30473
30405
  }
30474
30406
  );
30475
30407
  }
30476
30408
  return /* @__PURE__ */ jsxRuntime.jsx(
30477
- "div",
30409
+ exports.Box,
30478
30410
  {
30411
+ position: "relative",
30479
30412
  className: cn(
30480
- "relative z-10 flex items-center gap-4 px-4 py-2",
30413
+ "z-10 flex items-center gap-4 px-4 py-2",
30481
30414
  transparent ? "bg-black/30 backdrop-blur-sm" : "bg-surface/90 backdrop-blur-sm",
30482
30415
  className
30483
30416
  ),
@@ -30489,6 +30422,7 @@ var positionMap, DEFAULT_HUD_STATS;
30489
30422
  var init_GameHud = __esm({
30490
30423
  "components/game/2d/molecules/GameHud.tsx"() {
30491
30424
  init_cn();
30425
+ init_Box();
30492
30426
  init_StatBadge();
30493
30427
  positionMap = {
30494
30428
  corners: "inset-0 pointer-events-none"
@@ -30529,7 +30463,7 @@ function GameMenu({
30529
30463
  [eventBus, onSelect]
30530
30464
  );
30531
30465
  return /* @__PURE__ */ jsxRuntime.jsxs(
30532
- "div",
30466
+ exports.Box,
30533
30467
  {
30534
30468
  className: cn(
30535
30469
  "min-h-screen w-full flex flex-col items-center justify-center p-8",
@@ -30539,18 +30473,12 @@ function GameMenu({
30539
30473
  background: background ?? "linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0e17 100%)"
30540
30474
  },
30541
30475
  children: [
30542
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center mb-12 animate-fade-in", children: [
30543
- logo && /* @__PURE__ */ jsxRuntime.jsx(
30544
- "img",
30545
- {
30546
- src: logo.url,
30547
- alt: title,
30548
- className: "h-24 w-auto mx-auto mb-6 drop-shadow-2xl"
30549
- }
30550
- ),
30476
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "text-center mb-12 animate-fade-in", children: [
30477
+ logo && /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl: logo, icon: "image", size: 96, alt: title, className: "h-24 w-auto mx-auto mb-6 drop-shadow-2xl" }),
30551
30478
  /* @__PURE__ */ jsxRuntime.jsx(
30552
- "h1",
30479
+ exports.Typography,
30553
30480
  {
30481
+ variant: "h1",
30554
30482
  className: "text-5xl md:text-7xl font-bold text-[var(--color-foreground)] tracking-tight",
30555
30483
  style: {
30556
30484
  textShadow: "0 4px 12px rgba(0,0,0,0.5)"
@@ -30558,9 +30486,9 @@ function GameMenu({
30558
30486
  children: title
30559
30487
  }
30560
30488
  ),
30561
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-lg text-muted-foreground tracking-widest uppercase", children: subtitle })
30489
+ subtitle && /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body", className: "mt-2 text-lg text-muted-foreground tracking-widest uppercase", children: subtitle })
30562
30490
  ] }),
30563
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-4 w-full max-w-md", children: resolvedOptions.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
30491
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "flex flex-col gap-4 w-full max-w-md", children: resolvedOptions.map((option, index) => /* @__PURE__ */ jsxRuntime.jsx(
30564
30492
  ChoiceButton,
30565
30493
  {
30566
30494
  text: option.label,
@@ -30571,9 +30499,9 @@ function GameMenu({
30571
30499
  },
30572
30500
  index
30573
30501
  )) }),
30574
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none overflow-hidden", children: [
30575
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1/4 left-1/4 w-64 h-64 bg-info/10 rounded-container blur-3xl" }),
30576
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-1/4 right-1/4 w-96 h-96 bg-accent/10 rounded-container blur-3xl" })
30502
+ /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { position: "absolute", className: "inset-0 pointer-events-none overflow-hidden", children: [
30503
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { position: "absolute", className: "top-1/4 left-1/4 w-64 h-64 bg-info/10 rounded-container blur-3xl" }),
30504
+ /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { position: "absolute", className: "bottom-1/4 right-1/4 w-96 h-96 bg-accent/10 rounded-container blur-3xl" })
30577
30505
  ] })
30578
30506
  ]
30579
30507
  }
@@ -30585,6 +30513,9 @@ var init_GameMenu = __esm({
30585
30513
  "use client";
30586
30514
  init_cn();
30587
30515
  init_useEventBus();
30516
+ init_Box();
30517
+ init_Typography();
30518
+ init_GameIcon();
30588
30519
  init_ChoiceButton();
30589
30520
  DEFAULT_MENU_OPTIONS = [
30590
30521
  { label: "New Game", event: "NEW_GAME", variant: "primary" },
@@ -31023,7 +30954,7 @@ function GameAudioToggle({
31023
30954
  onClick: handleToggle,
31024
30955
  className: cn("text-lg leading-none px-2", className),
31025
30956
  "aria-pressed": muted,
31026
- children: activeAsset ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: activeAsset.url, alt: muted ? "Muted" : "Sound on", className: "w-5 h-5 object-contain" }) : muted ? "\u{1F507}" : "\u{1F50A}"
30957
+ children: activeAsset ? /* @__PURE__ */ jsxRuntime.jsx(GameIcon, { assetUrl: activeAsset, icon: "image", size: 20, alt: muted ? "Muted" : "Sound on", className: "w-5 h-5 object-contain" }) : muted ? "\u{1F507}" : "\u{1F50A}"
31027
30958
  }
31028
30959
  );
31029
30960
  }
@@ -31033,6 +30964,7 @@ var init_GameAudioToggle = __esm({
31033
30964
  init_atoms();
31034
30965
  init_cn();
31035
30966
  init_GameAudioProvider();
30967
+ init_GameIcon();
31036
30968
  GameAudioToggle.displayName = "GameAudioToggle";
31037
30969
  }
31038
30970
  });