@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.
- package/dist/avl/index.cjs +297 -365
- package/dist/avl/index.js +297 -365
- package/dist/components/index.cjs +267 -335
- package/dist/components/index.js +267 -335
- package/dist/providers/index.cjs +297 -365
- package/dist/providers/index.js +297 -365
- package/dist/runtime/index.cjs +297 -365
- package/dist/runtime/index.js +297 -365
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -7926,6 +7926,38 @@ var init_Accordion = __esm({
|
|
|
7926
7926
|
Accordion.displayName = "Accordion";
|
|
7927
7927
|
}
|
|
7928
7928
|
});
|
|
7929
|
+
function GameIcon({ assetUrl, icon, size = "md", alt, className }) {
|
|
7930
|
+
const px = typeof size === "number" ? size : sizeMap[size];
|
|
7931
|
+
if (assetUrl?.url) {
|
|
7932
|
+
return /* @__PURE__ */ jsx(
|
|
7933
|
+
"img",
|
|
7934
|
+
{
|
|
7935
|
+
src: assetUrl.url,
|
|
7936
|
+
alt: alt ?? assetUrl.category ?? "",
|
|
7937
|
+
width: px,
|
|
7938
|
+
height: px,
|
|
7939
|
+
style: { imageRendering: "pixelated", objectFit: "contain", width: px, height: px },
|
|
7940
|
+
className: cn("flex-shrink-0", className)
|
|
7941
|
+
}
|
|
7942
|
+
);
|
|
7943
|
+
}
|
|
7944
|
+
const I = typeof icon === "string" ? resolveIcon(icon) : icon;
|
|
7945
|
+
return /* @__PURE__ */ jsx(I, { width: px, height: px, className: cn("flex-shrink-0", className) });
|
|
7946
|
+
}
|
|
7947
|
+
var sizeMap;
|
|
7948
|
+
var init_GameIcon = __esm({
|
|
7949
|
+
"components/game/2d/atoms/GameIcon.tsx"() {
|
|
7950
|
+
"use client";
|
|
7951
|
+
init_cn();
|
|
7952
|
+
init_Icon();
|
|
7953
|
+
sizeMap = {
|
|
7954
|
+
sm: 16,
|
|
7955
|
+
md: 24,
|
|
7956
|
+
lg: 32
|
|
7957
|
+
};
|
|
7958
|
+
GameIcon.displayName = "GameIcon";
|
|
7959
|
+
}
|
|
7960
|
+
});
|
|
7929
7961
|
function ActionButton({
|
|
7930
7962
|
assetUrl = DEFAULT_ASSET_URL,
|
|
7931
7963
|
label = "Attack",
|
|
@@ -7940,16 +7972,16 @@ function ActionButton({
|
|
|
7940
7972
|
className
|
|
7941
7973
|
}) {
|
|
7942
7974
|
const eventBus = useEventBus();
|
|
7943
|
-
const sizes =
|
|
7975
|
+
const sizes = sizeMap2[size];
|
|
7944
7976
|
const onCooldown = cooldown > 0;
|
|
7945
7977
|
const isDisabled = disabled || onCooldown;
|
|
7946
7978
|
const cooldownDeg = Math.round(cooldown * 360);
|
|
7947
7979
|
return /* @__PURE__ */ jsxs(
|
|
7948
|
-
|
|
7980
|
+
Button,
|
|
7949
7981
|
{
|
|
7950
|
-
|
|
7982
|
+
variant: variant === "danger" ? "danger" : variant === "secondary" ? "secondary" : "primary",
|
|
7951
7983
|
disabled: isDisabled,
|
|
7952
|
-
onClick: (
|
|
7984
|
+
onClick: () => {
|
|
7953
7985
|
if (action) eventBus.emit(`UI:${action}`, {});
|
|
7954
7986
|
onClick?.();
|
|
7955
7987
|
},
|
|
@@ -7962,9 +7994,10 @@ function ActionButton({
|
|
|
7962
7994
|
),
|
|
7963
7995
|
children: [
|
|
7964
7996
|
onCooldown && /* @__PURE__ */ jsx(
|
|
7965
|
-
|
|
7997
|
+
Box,
|
|
7966
7998
|
{
|
|
7967
|
-
|
|
7999
|
+
position: "absolute",
|
|
8000
|
+
className: "inset-0 bg-foreground/40 pointer-events-none",
|
|
7968
8001
|
style: {
|
|
7969
8002
|
clipPath: `conic-gradient(from 0deg, transparent ${360 - cooldownDeg}deg, black ${360 - cooldownDeg}deg)`,
|
|
7970
8003
|
WebkitClipPath: `conic-gradient(from 0deg, transparent ${360 - cooldownDeg}deg, black ${360 - cooldownDeg}deg)`,
|
|
@@ -7972,27 +8005,18 @@ function ActionButton({
|
|
|
7972
8005
|
}
|
|
7973
8006
|
}
|
|
7974
8007
|
),
|
|
7975
|
-
assetUrl ? /* @__PURE__ */ jsx(
|
|
7976
|
-
"img",
|
|
7977
|
-
{
|
|
7978
|
-
src: assetUrl.url,
|
|
7979
|
-
alt: "",
|
|
7980
|
-
width: 16,
|
|
7981
|
-
height: 16,
|
|
7982
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
7983
|
-
className: cn("flex-shrink-0", sizes.icon)
|
|
7984
|
-
}
|
|
7985
|
-
) : icon ? /* @__PURE__ */ jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: typeof icon === "string" ? (() => {
|
|
8008
|
+
assetUrl ? /* @__PURE__ */ jsx(GameIcon, { assetUrl, icon: "image", size: 16, className: cn("flex-shrink-0", sizes.icon) }) : icon ? /* @__PURE__ */ jsx(Box, { as: "span", className: cn("flex-shrink-0", sizes.icon), children: typeof icon === "string" ? (() => {
|
|
7986
8009
|
const I = resolveIcon(icon);
|
|
7987
8010
|
return I ? /* @__PURE__ */ jsx(I, { className: "w-4 h-4" }) : null;
|
|
7988
8011
|
})() : /* @__PURE__ */ (() => {
|
|
7989
8012
|
const I = icon;
|
|
7990
8013
|
return /* @__PURE__ */ jsx(I, { className: "w-4 h-4" });
|
|
7991
8014
|
})() }) : null,
|
|
7992
|
-
/* @__PURE__ */ jsx("span",
|
|
8015
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", className: "relative z-10", children: label }),
|
|
7993
8016
|
hotkey && /* @__PURE__ */ jsx(
|
|
7994
|
-
|
|
8017
|
+
Typography,
|
|
7995
8018
|
{
|
|
8019
|
+
as: "span",
|
|
7996
8020
|
className: cn(
|
|
7997
8021
|
"absolute top-0.5 right-0.5 bg-foreground/30 text-primary-foreground rounded font-mono leading-tight",
|
|
7998
8022
|
sizes.hotkey
|
|
@@ -8004,13 +8028,17 @@ function ActionButton({
|
|
|
8004
8028
|
}
|
|
8005
8029
|
);
|
|
8006
8030
|
}
|
|
8007
|
-
var
|
|
8031
|
+
var sizeMap2, variantStyles7, DEFAULT_ASSET_URL;
|
|
8008
8032
|
var init_ActionButton = __esm({
|
|
8009
8033
|
"components/game/2d/atoms/ActionButton.tsx"() {
|
|
8010
8034
|
init_cn();
|
|
8011
8035
|
init_Icon();
|
|
8012
8036
|
init_useEventBus();
|
|
8013
|
-
|
|
8037
|
+
init_Button();
|
|
8038
|
+
init_Box();
|
|
8039
|
+
init_Typography();
|
|
8040
|
+
init_GameIcon();
|
|
8041
|
+
sizeMap2 = {
|
|
8014
8042
|
sm: { button: "h-button-sm px-3 text-xs", hotkey: "text-[9px] px-1", icon: "text-xs" },
|
|
8015
8043
|
md: { button: "h-button-md px-4 text-sm", hotkey: "text-xs px-1.5", icon: "text-sm" },
|
|
8016
8044
|
lg: { button: "h-button-lg px-5 text-base", hotkey: "text-xs px-2", icon: "text-base" }
|
|
@@ -8743,10 +8771,12 @@ function MiniMap({
|
|
|
8743
8771
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8744
8772
|
/* @__PURE__ */ jsx("style", { children: `@keyframes minimap-blink{0%,49%{opacity:1}50%,100%{opacity:0}}` }),
|
|
8745
8773
|
/* @__PURE__ */ jsxs(
|
|
8746
|
-
|
|
8774
|
+
Box,
|
|
8747
8775
|
{
|
|
8776
|
+
position: "relative",
|
|
8777
|
+
display: "inline-block",
|
|
8748
8778
|
className: cn(
|
|
8749
|
-
"
|
|
8779
|
+
"border border-border/20 rounded-container",
|
|
8750
8780
|
className
|
|
8751
8781
|
),
|
|
8752
8782
|
children: [
|
|
@@ -8761,10 +8791,10 @@ function MiniMap({
|
|
|
8761
8791
|
}
|
|
8762
8792
|
),
|
|
8763
8793
|
playerLeft !== null && playerTop !== null && /* @__PURE__ */ jsx(
|
|
8764
|
-
|
|
8794
|
+
Box,
|
|
8765
8795
|
{
|
|
8796
|
+
position: "absolute",
|
|
8766
8797
|
style: {
|
|
8767
|
-
position: "absolute",
|
|
8768
8798
|
left: playerLeft,
|
|
8769
8799
|
top: playerTop,
|
|
8770
8800
|
width: 3,
|
|
@@ -8785,6 +8815,7 @@ var init_MiniMap = __esm({
|
|
|
8785
8815
|
"components/game/2d/atoms/MiniMap.tsx"() {
|
|
8786
8816
|
"use client";
|
|
8787
8817
|
init_cn();
|
|
8818
|
+
init_Box();
|
|
8788
8819
|
DEFAULT_TILES = [
|
|
8789
8820
|
{ x: 10, y: 10, color: "#4ade80" },
|
|
8790
8821
|
{ x: 20, y: 15, color: "#4ade80" },
|
|
@@ -8815,12 +8846,13 @@ function HealthBar({
|
|
|
8815
8846
|
frameAsset,
|
|
8816
8847
|
fillAsset
|
|
8817
8848
|
}) {
|
|
8818
|
-
const sizes =
|
|
8849
|
+
const sizes = sizeMap3[size];
|
|
8819
8850
|
const percentage = max > 0 ? Math.max(0, Math.min(100, current / max * 100)) : 0;
|
|
8820
8851
|
if (format === "hearts") {
|
|
8821
|
-
return /* @__PURE__ */ jsx(
|
|
8822
|
-
|
|
8852
|
+
return /* @__PURE__ */ jsx(Box, { className: cn("flex items-center gap-1", className), children: Array.from({ length: max }).map((_, i) => /* @__PURE__ */ jsx(
|
|
8853
|
+
Box,
|
|
8823
8854
|
{
|
|
8855
|
+
as: "span",
|
|
8824
8856
|
className: cn(animated && "transition-transform hover:scale-110"),
|
|
8825
8857
|
children: heartIcon(i < current, sizes.heart)
|
|
8826
8858
|
},
|
|
@@ -8829,10 +8861,12 @@ function HealthBar({
|
|
|
8829
8861
|
}
|
|
8830
8862
|
if (format === "bar") {
|
|
8831
8863
|
return /* @__PURE__ */ jsx(
|
|
8832
|
-
|
|
8864
|
+
Box,
|
|
8833
8865
|
{
|
|
8866
|
+
position: "relative",
|
|
8867
|
+
overflow: "hidden",
|
|
8834
8868
|
className: cn(
|
|
8835
|
-
"
|
|
8869
|
+
"rounded-full",
|
|
8836
8870
|
!frameAsset && "bg-muted",
|
|
8837
8871
|
sizes.bar,
|
|
8838
8872
|
"w-24",
|
|
@@ -8840,10 +8874,11 @@ function HealthBar({
|
|
|
8840
8874
|
),
|
|
8841
8875
|
style: frameAsset ? { backgroundImage: `url(${frameAsset.url})`, backgroundSize: "100% 100%" } : void 0,
|
|
8842
8876
|
children: /* @__PURE__ */ jsx(
|
|
8843
|
-
|
|
8877
|
+
Box,
|
|
8844
8878
|
{
|
|
8879
|
+
position: "absolute",
|
|
8845
8880
|
className: cn(
|
|
8846
|
-
"
|
|
8881
|
+
"inset-y-0 left-0 rounded-full",
|
|
8847
8882
|
!fillAsset && (percentage > 66 ? "bg-success" : percentage > 33 ? "bg-warning" : "bg-error"),
|
|
8848
8883
|
animated && "transition-all duration-300"
|
|
8849
8884
|
),
|
|
@@ -8857,10 +8892,11 @@ function HealthBar({
|
|
|
8857
8892
|
);
|
|
8858
8893
|
}
|
|
8859
8894
|
if (format === "progress") {
|
|
8860
|
-
return /* @__PURE__ */ jsxs(
|
|
8895
|
+
return /* @__PURE__ */ jsxs(Box, { className: cn("flex items-center gap-2", className), children: [
|
|
8861
8896
|
level != null && /* @__PURE__ */ jsxs(
|
|
8862
|
-
|
|
8897
|
+
Typography,
|
|
8863
8898
|
{
|
|
8899
|
+
as: "span",
|
|
8864
8900
|
className: cn(
|
|
8865
8901
|
"flex-shrink-0 rounded-interactive font-bold",
|
|
8866
8902
|
"bg-accent text-accent-foreground border border-accent",
|
|
@@ -8872,21 +8908,23 @@ function HealthBar({
|
|
|
8872
8908
|
]
|
|
8873
8909
|
}
|
|
8874
8910
|
),
|
|
8875
|
-
/* @__PURE__ */ jsxs(
|
|
8911
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex-1 flex flex-col gap-0.5", children: [
|
|
8876
8912
|
/* @__PURE__ */ jsx(
|
|
8877
|
-
|
|
8913
|
+
Box,
|
|
8878
8914
|
{
|
|
8915
|
+
position: "relative",
|
|
8879
8916
|
className: cn(
|
|
8880
|
-
"
|
|
8917
|
+
"w-full overflow-hidden rounded-full",
|
|
8881
8918
|
!frameAsset && "bg-muted border border-muted",
|
|
8882
8919
|
sizes.bar
|
|
8883
8920
|
),
|
|
8884
8921
|
style: frameAsset ? { backgroundImage: `url(${frameAsset.url})`, backgroundSize: "100% 100%" } : void 0,
|
|
8885
8922
|
children: /* @__PURE__ */ jsx(
|
|
8886
|
-
|
|
8923
|
+
Box,
|
|
8887
8924
|
{
|
|
8925
|
+
position: "absolute",
|
|
8888
8926
|
className: cn(
|
|
8889
|
-
"
|
|
8927
|
+
"inset-y-0 left-0 rounded-full",
|
|
8890
8928
|
!fillAsset && "bg-gradient-to-r from-accent to-info",
|
|
8891
8929
|
animated && "transition-all duration-500 ease-out"
|
|
8892
8930
|
),
|
|
@@ -8898,7 +8936,7 @@ function HealthBar({
|
|
|
8898
8936
|
)
|
|
8899
8937
|
}
|
|
8900
8938
|
),
|
|
8901
|
-
showLabel && /* @__PURE__ */ jsxs("span",
|
|
8939
|
+
showLabel && /* @__PURE__ */ jsxs(Typography, { as: "span", className: cn("text-foreground/70 tabular-nums", sizes.label), children: [
|
|
8902
8940
|
current,
|
|
8903
8941
|
" / ",
|
|
8904
8942
|
max,
|
|
@@ -8907,16 +8945,18 @@ function HealthBar({
|
|
|
8907
8945
|
] })
|
|
8908
8946
|
] });
|
|
8909
8947
|
}
|
|
8910
|
-
return /* @__PURE__ */ jsxs("span",
|
|
8948
|
+
return /* @__PURE__ */ jsxs(Typography, { as: "span", className: cn("font-mono font-bold", sizes.text, className), children: [
|
|
8911
8949
|
current,
|
|
8912
8950
|
"/",
|
|
8913
8951
|
max
|
|
8914
8952
|
] });
|
|
8915
8953
|
}
|
|
8916
|
-
var heartIcon,
|
|
8954
|
+
var heartIcon, sizeMap3;
|
|
8917
8955
|
var init_HealthBar = __esm({
|
|
8918
8956
|
"components/game/2d/atoms/HealthBar.tsx"() {
|
|
8919
8957
|
init_cn();
|
|
8958
|
+
init_Box();
|
|
8959
|
+
init_Typography();
|
|
8920
8960
|
heartIcon = (filled, size) => /* @__PURE__ */ jsx(
|
|
8921
8961
|
"svg",
|
|
8922
8962
|
{
|
|
@@ -8928,7 +8968,7 @@ var init_HealthBar = __esm({
|
|
|
8928
8968
|
children: /* @__PURE__ */ 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" })
|
|
8929
8969
|
}
|
|
8930
8970
|
);
|
|
8931
|
-
|
|
8971
|
+
sizeMap3 = {
|
|
8932
8972
|
sm: { heart: "w-4 h-4", bar: "h-2", text: "text-sm", label: "text-xs", badge: "text-xs px-1.5 py-0.5" },
|
|
8933
8973
|
md: { heart: "w-6 h-6", bar: "h-3", text: "text-base", label: "text-xs", badge: "text-xs px-2 py-0.5" },
|
|
8934
8974
|
lg: { heart: "w-8 h-8", bar: "h-4", text: "text-lg", label: "text-sm", badge: "text-sm px-2.5 py-1" }
|
|
@@ -10716,10 +10756,11 @@ function Canvas2D({
|
|
|
10716
10756
|
}
|
|
10717
10757
|
}
|
|
10718
10758
|
),
|
|
10719
|
-
process.env.NODE_ENV !== "production" && /* @__PURE__ */ jsxs(
|
|
10759
|
+
process.env.NODE_ENV !== "production" && /* @__PURE__ */ jsxs(Box, { "data-game-actions": "", className: "sr-only", "aria-hidden": "true", children: [
|
|
10720
10760
|
tileClickEvent && /* @__PURE__ */ jsx(
|
|
10721
|
-
|
|
10761
|
+
Button,
|
|
10722
10762
|
{
|
|
10763
|
+
variant: "ghost",
|
|
10723
10764
|
"data-event": tileClickEvent,
|
|
10724
10765
|
"data-x": "0",
|
|
10725
10766
|
"data-y": "0",
|
|
@@ -10728,8 +10769,9 @@ function Canvas2D({
|
|
|
10728
10769
|
}
|
|
10729
10770
|
),
|
|
10730
10771
|
unitClickEvent && units && units.length > 0 && /* @__PURE__ */ jsx(
|
|
10731
|
-
|
|
10772
|
+
Button,
|
|
10732
10773
|
{
|
|
10774
|
+
variant: "ghost",
|
|
10733
10775
|
"data-event": unitClickEvent,
|
|
10734
10776
|
"data-unit-id": units[0].id,
|
|
10735
10777
|
onClick: () => eventBus.emit(`UI:${unitClickEvent}`, { unitId: units[0].id }),
|
|
@@ -10738,15 +10780,17 @@ function Canvas2D({
|
|
|
10738
10780
|
)
|
|
10739
10781
|
] }),
|
|
10740
10782
|
unitOverlays.map(({ unit, screenX, screenY }) => /* @__PURE__ */ jsxs(
|
|
10741
|
-
|
|
10783
|
+
Box,
|
|
10742
10784
|
{
|
|
10743
|
-
|
|
10785
|
+
position: "absolute",
|
|
10786
|
+
className: "pointer-events-none",
|
|
10744
10787
|
style: { left: Math.round(screenX), top: Math.round(screenY), transform: "translate(-50%, 0)", zIndex: 5 },
|
|
10745
10788
|
children: [
|
|
10746
10789
|
unit.name && /* @__PURE__ */ jsx(
|
|
10747
|
-
|
|
10790
|
+
Typography,
|
|
10748
10791
|
{
|
|
10749
|
-
|
|
10792
|
+
as: "span",
|
|
10793
|
+
className: "text-white text-xs font-bold px-1.5 py-0.5 rounded mb-0.5 whitespace-nowrap block",
|
|
10750
10794
|
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)" },
|
|
10751
10795
|
children: unit.name
|
|
10752
10796
|
}
|
|
@@ -10756,7 +10800,7 @@ function Canvas2D({
|
|
|
10756
10800
|
},
|
|
10757
10801
|
unit.id
|
|
10758
10802
|
)),
|
|
10759
|
-
showMinimap && /* @__PURE__ */ jsx(
|
|
10803
|
+
showMinimap && /* @__PURE__ */ jsx(Box, { position: "absolute", className: "bottom-2 right-2 pointer-events-none", style: { zIndex: 10 }, children: /* @__PURE__ */ jsx(
|
|
10760
10804
|
MiniMap,
|
|
10761
10805
|
{
|
|
10762
10806
|
tiles: miniMapTiles,
|
|
@@ -10778,6 +10822,7 @@ var init_Canvas2D = __esm({
|
|
|
10778
10822
|
init_cn();
|
|
10779
10823
|
init_useEventBus();
|
|
10780
10824
|
init_Box();
|
|
10825
|
+
init_Button();
|
|
10781
10826
|
init_Stack();
|
|
10782
10827
|
init_Icon();
|
|
10783
10828
|
init_Typography();
|
|
@@ -17155,38 +17200,6 @@ var init_Breadcrumb = __esm({
|
|
|
17155
17200
|
Breadcrumb.displayName = "Breadcrumb";
|
|
17156
17201
|
}
|
|
17157
17202
|
});
|
|
17158
|
-
function GameIcon({ assetUrl, icon, size = "md", alt, className }) {
|
|
17159
|
-
const px = typeof size === "number" ? size : sizeMap3[size];
|
|
17160
|
-
if (assetUrl?.url) {
|
|
17161
|
-
return /* @__PURE__ */ jsx(
|
|
17162
|
-
"img",
|
|
17163
|
-
{
|
|
17164
|
-
src: assetUrl.url,
|
|
17165
|
-
alt: alt ?? assetUrl.category ?? "",
|
|
17166
|
-
width: px,
|
|
17167
|
-
height: px,
|
|
17168
|
-
style: { imageRendering: "pixelated", objectFit: "contain", width: px, height: px },
|
|
17169
|
-
className: cn("flex-shrink-0", className)
|
|
17170
|
-
}
|
|
17171
|
-
);
|
|
17172
|
-
}
|
|
17173
|
-
const I = typeof icon === "string" ? resolveIcon(icon) : icon;
|
|
17174
|
-
return /* @__PURE__ */ jsx(I, { width: px, height: px, className: cn("flex-shrink-0", className) });
|
|
17175
|
-
}
|
|
17176
|
-
var sizeMap3;
|
|
17177
|
-
var init_GameIcon = __esm({
|
|
17178
|
-
"components/game/2d/atoms/GameIcon.tsx"() {
|
|
17179
|
-
"use client";
|
|
17180
|
-
init_cn();
|
|
17181
|
-
init_Icon();
|
|
17182
|
-
sizeMap3 = {
|
|
17183
|
-
sm: 16,
|
|
17184
|
-
md: 24,
|
|
17185
|
-
lg: 32
|
|
17186
|
-
};
|
|
17187
|
-
GameIcon.displayName = "GameIcon";
|
|
17188
|
-
}
|
|
17189
|
-
});
|
|
17190
17203
|
function BuilderBoard({
|
|
17191
17204
|
entity,
|
|
17192
17205
|
completeEvent = "PUZZLE_COMPLETE",
|
|
@@ -19018,9 +19031,9 @@ function GameCard({
|
|
|
19018
19031
|
}, [disabled, id, onClick, clickEvent, eventBus]);
|
|
19019
19032
|
const artPx = artPxMap[size];
|
|
19020
19033
|
return /* @__PURE__ */ jsxs(
|
|
19021
|
-
|
|
19034
|
+
Button,
|
|
19022
19035
|
{
|
|
19023
|
-
|
|
19036
|
+
variant: "ghost",
|
|
19024
19037
|
onClick: handleClick,
|
|
19025
19038
|
disabled,
|
|
19026
19039
|
title: name,
|
|
@@ -19034,8 +19047,9 @@ function GameCard({
|
|
|
19034
19047
|
),
|
|
19035
19048
|
children: [
|
|
19036
19049
|
cost != null && /* @__PURE__ */ jsx(
|
|
19037
|
-
|
|
19050
|
+
Typography,
|
|
19038
19051
|
{
|
|
19052
|
+
as: "span",
|
|
19039
19053
|
className: cn(
|
|
19040
19054
|
"absolute -top-2 -left-2 flex items-center justify-center",
|
|
19041
19055
|
"min-w-[22px] h-[22px] rounded-full px-1",
|
|
@@ -19044,17 +19058,7 @@ function GameCard({
|
|
|
19044
19058
|
children: cost
|
|
19045
19059
|
}
|
|
19046
19060
|
),
|
|
19047
|
-
/* @__PURE__ */ jsx(Box, { className: "flex-1 flex items-center justify-center w-full", children: art ? /* @__PURE__ */ jsx(
|
|
19048
|
-
"img",
|
|
19049
|
-
{
|
|
19050
|
-
src: art.url,
|
|
19051
|
-
alt: name ?? id,
|
|
19052
|
-
width: artPx,
|
|
19053
|
-
height: artPx,
|
|
19054
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
19055
|
-
className: "flex-shrink-0"
|
|
19056
|
-
}
|
|
19057
|
-
) : /* @__PURE__ */ jsx(Box, { className: "rounded bg-muted/40", style: { width: artPx, height: artPx } }) }),
|
|
19061
|
+
/* @__PURE__ */ jsx(Box, { className: "flex-1 flex items-center justify-center w-full", children: art ? /* @__PURE__ */ jsx(GameIcon, { assetUrl: art, icon: "image", size: artPx, alt: name ?? id, className: "flex-shrink-0" }) : /* @__PURE__ */ jsx(Box, { className: "rounded bg-muted/40", style: { width: artPx, height: artPx } }) }),
|
|
19058
19062
|
name != null && /* @__PURE__ */ jsx(
|
|
19059
19063
|
Typography,
|
|
19060
19064
|
{
|
|
@@ -19064,8 +19068,8 @@ function GameCard({
|
|
|
19064
19068
|
}
|
|
19065
19069
|
),
|
|
19066
19070
|
(attack != null || defense != null) && /* @__PURE__ */ jsxs(Box, { className: "flex w-full items-center justify-between px-0.5 text-[10px] font-bold leading-none", children: [
|
|
19067
|
-
/* @__PURE__ */ jsx("span",
|
|
19068
|
-
/* @__PURE__ */ jsx("span",
|
|
19071
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", className: "text-error", children: attack != null ? `\u2694${attack}` : "" }),
|
|
19072
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", className: "text-info", children: defense != null ? `\u{1F6E1}${defense}` : "" })
|
|
19069
19073
|
] })
|
|
19070
19074
|
]
|
|
19071
19075
|
}
|
|
@@ -19078,7 +19082,9 @@ var init_GameCard = __esm({
|
|
|
19078
19082
|
init_cn();
|
|
19079
19083
|
init_useEventBus();
|
|
19080
19084
|
init_Box();
|
|
19085
|
+
init_Button();
|
|
19081
19086
|
init_Typography();
|
|
19087
|
+
init_GameIcon();
|
|
19082
19088
|
cardSizeMap = {
|
|
19083
19089
|
sm: "w-16 h-24",
|
|
19084
19090
|
md: "w-20 h-28",
|
|
@@ -21489,11 +21495,11 @@ function ChoiceButton({
|
|
|
21489
21495
|
}) {
|
|
21490
21496
|
const eventBus = useEventBus();
|
|
21491
21497
|
return /* @__PURE__ */ jsxs(
|
|
21492
|
-
|
|
21498
|
+
Button,
|
|
21493
21499
|
{
|
|
21494
|
-
|
|
21500
|
+
variant: "ghost",
|
|
21495
21501
|
disabled,
|
|
21496
|
-
onClick: (
|
|
21502
|
+
onClick: () => {
|
|
21497
21503
|
if (action) eventBus.emit(`UI:${action}`, {});
|
|
21498
21504
|
onClick?.();
|
|
21499
21505
|
},
|
|
@@ -21506,8 +21512,9 @@ function ChoiceButton({
|
|
|
21506
21512
|
),
|
|
21507
21513
|
children: [
|
|
21508
21514
|
index !== void 0 && /* @__PURE__ */ jsxs(
|
|
21509
|
-
|
|
21515
|
+
Typography,
|
|
21510
21516
|
{
|
|
21517
|
+
as: "span",
|
|
21511
21518
|
className: cn(
|
|
21512
21519
|
"flex-shrink-0 font-mono font-bold text-sm",
|
|
21513
21520
|
selected ? "text-accent" : "text-muted-foreground"
|
|
@@ -21518,24 +21525,14 @@ function ChoiceButton({
|
|
|
21518
21525
|
]
|
|
21519
21526
|
}
|
|
21520
21527
|
),
|
|
21521
|
-
assetUrl ? /* @__PURE__ */ jsx(
|
|
21522
|
-
"img",
|
|
21523
|
-
{
|
|
21524
|
-
src: assetUrl.url,
|
|
21525
|
-
alt: "",
|
|
21526
|
-
width: 16,
|
|
21527
|
-
height: 16,
|
|
21528
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
21529
|
-
className: "flex-shrink-0"
|
|
21530
|
-
}
|
|
21531
|
-
) : icon ? /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-sm", children: typeof icon === "string" ? (() => {
|
|
21528
|
+
assetUrl ? /* @__PURE__ */ jsx(GameIcon, { assetUrl, icon: "image", size: 16, className: "flex-shrink-0" }) : icon ? /* @__PURE__ */ jsx(Box, { as: "span", className: "flex-shrink-0 text-sm", children: typeof icon === "string" ? (() => {
|
|
21532
21529
|
const I = resolveIcon(icon);
|
|
21533
21530
|
return I ? /* @__PURE__ */ jsx(I, { className: "w-4 h-4" }) : null;
|
|
21534
21531
|
})() : /* @__PURE__ */ (() => {
|
|
21535
21532
|
const I = icon;
|
|
21536
21533
|
return /* @__PURE__ */ jsx(I, { className: "w-4 h-4" });
|
|
21537
21534
|
})() }) : null,
|
|
21538
|
-
/* @__PURE__ */ jsx("span",
|
|
21535
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", className: "text-sm leading-snug", children: text })
|
|
21539
21536
|
]
|
|
21540
21537
|
}
|
|
21541
21538
|
);
|
|
@@ -21545,6 +21542,10 @@ var init_ChoiceButton = __esm({
|
|
|
21545
21542
|
init_cn();
|
|
21546
21543
|
init_Icon();
|
|
21547
21544
|
init_useEventBus();
|
|
21545
|
+
init_Button();
|
|
21546
|
+
init_Box();
|
|
21547
|
+
init_Typography();
|
|
21548
|
+
init_GameIcon();
|
|
21548
21549
|
ChoiceButton.displayName = "ChoiceButton";
|
|
21549
21550
|
}
|
|
21550
21551
|
});
|
|
@@ -22222,7 +22223,7 @@ function ComboCounter({
|
|
|
22222
22223
|
const sizes = sizeMap4[size];
|
|
22223
22224
|
if (combo <= 0) return null;
|
|
22224
22225
|
return /* @__PURE__ */ jsxs(
|
|
22225
|
-
|
|
22226
|
+
Box,
|
|
22226
22227
|
{
|
|
22227
22228
|
className: cn(
|
|
22228
22229
|
"inline-flex flex-col items-center justify-center",
|
|
@@ -22232,24 +22233,14 @@ function ComboCounter({
|
|
|
22232
22233
|
className
|
|
22233
22234
|
),
|
|
22234
22235
|
children: [
|
|
22235
|
-
assetUrl && /* @__PURE__ */ jsx(
|
|
22236
|
-
|
|
22237
|
-
|
|
22238
|
-
|
|
22239
|
-
alt: "combo",
|
|
22240
|
-
width: 24,
|
|
22241
|
-
height: 24,
|
|
22242
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
22243
|
-
className: "flex-shrink-0 mb-0.5"
|
|
22244
|
-
}
|
|
22245
|
-
),
|
|
22246
|
-
/* @__PURE__ */ jsx("span", { className: cn("font-black tabular-nums leading-none", sizes.combo, getComboIntensity(combo)), children: combo }),
|
|
22247
|
-
/* @__PURE__ */ jsx("span", { className: cn("font-bold uppercase tracking-wider text-muted-foreground", sizes.label), children: "combo" }),
|
|
22248
|
-
multiplier != null && multiplier > 1 && /* @__PURE__ */ jsxs("span", { className: cn("font-bold text-warning tabular-nums", sizes.multiplier), children: [
|
|
22236
|
+
assetUrl && /* @__PURE__ */ jsx(GameIcon, { assetUrl, icon: "image", size: 24, className: "flex-shrink-0 mb-0.5" }),
|
|
22237
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", className: cn("font-black tabular-nums leading-none", sizes.combo, getComboIntensity(combo)), children: combo }),
|
|
22238
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", className: cn("font-bold uppercase tracking-wider text-muted-foreground", sizes.label), children: "combo" }),
|
|
22239
|
+
multiplier != null && multiplier > 1 && /* @__PURE__ */ jsxs(Typography, { as: "span", className: cn("font-bold text-warning tabular-nums", sizes.multiplier), children: [
|
|
22249
22240
|
"x",
|
|
22250
22241
|
multiplier.toFixed(1)
|
|
22251
22242
|
] }),
|
|
22252
|
-
streak != null && streak > 0 && /* @__PURE__ */ jsxs("span",
|
|
22243
|
+
streak != null && streak > 0 && /* @__PURE__ */ jsxs(Typography, { as: "span", className: cn("text-muted-foreground tabular-nums", sizes.label), children: [
|
|
22253
22244
|
streak,
|
|
22254
22245
|
" streak"
|
|
22255
22246
|
] })
|
|
@@ -22261,6 +22252,9 @@ var DEFAULT_ASSET_URL2, sizeMap4;
|
|
|
22261
22252
|
var init_ComboCounter = __esm({
|
|
22262
22253
|
"components/game/2d/atoms/ComboCounter.tsx"() {
|
|
22263
22254
|
init_cn();
|
|
22255
|
+
init_Box();
|
|
22256
|
+
init_Typography();
|
|
22257
|
+
init_GameIcon();
|
|
22264
22258
|
DEFAULT_ASSET_URL2 = {
|
|
22265
22259
|
url: "https://almadar-kflow-assets.web.app/shared/effects/flash/flash00.png",
|
|
22266
22260
|
role: "effect",
|
|
@@ -22510,9 +22504,9 @@ function ControlButton({
|
|
|
22510
22504
|
[isPressed, releaseEvent, eventBus, onRelease]
|
|
22511
22505
|
);
|
|
22512
22506
|
return /* @__PURE__ */ jsx(
|
|
22513
|
-
|
|
22507
|
+
Button,
|
|
22514
22508
|
{
|
|
22515
|
-
|
|
22509
|
+
variant,
|
|
22516
22510
|
disabled,
|
|
22517
22511
|
onPointerDown: handlePointerDown,
|
|
22518
22512
|
onPointerUp: handlePointerUp,
|
|
@@ -22530,23 +22524,13 @@ function ControlButton({
|
|
|
22530
22524
|
disabled && "opacity-50 cursor-not-allowed",
|
|
22531
22525
|
className
|
|
22532
22526
|
),
|
|
22533
|
-
children: assetUrl ? /* @__PURE__ */ jsx(
|
|
22534
|
-
"img",
|
|
22535
|
-
{
|
|
22536
|
-
src: assetUrl.url,
|
|
22537
|
-
alt: "",
|
|
22538
|
-
width: 24,
|
|
22539
|
-
height: 24,
|
|
22540
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
22541
|
-
className: "flex-shrink-0"
|
|
22542
|
-
}
|
|
22543
|
-
) : icon ? /* @__PURE__ */ jsx("span", { className: "text-2xl", children: typeof icon === "string" ? /^[a-zA-Z0-9-]+$/.test(icon) ? (() => {
|
|
22527
|
+
children: assetUrl ? /* @__PURE__ */ jsx(GameIcon, { assetUrl, icon: "image", size: 24, className: "flex-shrink-0" }) : icon ? /* @__PURE__ */ jsx(Box, { as: "span", className: "text-2xl", children: typeof icon === "string" ? /^[a-zA-Z0-9-]+$/.test(icon) ? (() => {
|
|
22544
22528
|
const I = resolveIcon(icon);
|
|
22545
22529
|
return I ? /* @__PURE__ */ jsx(I, { className: "w-6 h-6" }) : null;
|
|
22546
22530
|
})() : icon : /* @__PURE__ */ (() => {
|
|
22547
22531
|
const I = icon;
|
|
22548
22532
|
return /* @__PURE__ */ jsx(I, { className: "w-6 h-6" });
|
|
22549
|
-
})() }) : label ? /* @__PURE__ */ jsx("span",
|
|
22533
|
+
})() }) : label ? /* @__PURE__ */ jsx(Typography, { as: "span", children: label }) : null
|
|
22550
22534
|
}
|
|
22551
22535
|
);
|
|
22552
22536
|
}
|
|
@@ -22557,6 +22541,10 @@ var init_ControlButton = __esm({
|
|
|
22557
22541
|
init_cn();
|
|
22558
22542
|
init_useEventBus();
|
|
22559
22543
|
init_Icon();
|
|
22544
|
+
init_Button();
|
|
22545
|
+
init_Box();
|
|
22546
|
+
init_Typography();
|
|
22547
|
+
init_GameIcon();
|
|
22560
22548
|
sizeMap5 = {
|
|
22561
22549
|
sm: "w-10 h-10 text-sm",
|
|
22562
22550
|
md: "w-14 h-14 text-base",
|
|
@@ -22641,22 +22629,22 @@ function ControlGrid({
|
|
|
22641
22629
|
},
|
|
22642
22630
|
d
|
|
22643
22631
|
);
|
|
22644
|
-
return /* @__PURE__ */ jsxs(
|
|
22645
|
-
/* @__PURE__ */ jsx(
|
|
22632
|
+
return /* @__PURE__ */ jsxs(Box, { className: cn("inline-grid grid-cols-3", ds.gap, ds.container, className), children: [
|
|
22633
|
+
/* @__PURE__ */ jsx(Box, {}),
|
|
22646
22634
|
dir("up"),
|
|
22647
|
-
/* @__PURE__ */ jsx(
|
|
22635
|
+
/* @__PURE__ */ jsx(Box, {}),
|
|
22648
22636
|
dir("left"),
|
|
22649
|
-
/* @__PURE__ */ jsx(
|
|
22637
|
+
/* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(Box, { className: "w-6 h-6 rounded-interactive bg-muted border-2 border-muted-foreground" }) }),
|
|
22650
22638
|
dir("right"),
|
|
22651
|
-
/* @__PURE__ */ jsx(
|
|
22639
|
+
/* @__PURE__ */ jsx(Box, {}),
|
|
22652
22640
|
dir("down"),
|
|
22653
|
-
/* @__PURE__ */ jsx(
|
|
22641
|
+
/* @__PURE__ */ jsx(Box, {})
|
|
22654
22642
|
] });
|
|
22655
22643
|
}
|
|
22656
22644
|
if (layout === "diamond" && buttons.length === 4) {
|
|
22657
22645
|
const [top, right, bottom, left] = buttons;
|
|
22658
|
-
return /* @__PURE__ */ jsxs(
|
|
22659
|
-
/* @__PURE__ */ jsx(
|
|
22646
|
+
return /* @__PURE__ */ jsxs(Box, { className: cn(layoutClass.diamond, className), children: [
|
|
22647
|
+
/* @__PURE__ */ jsx(Box, {}),
|
|
22660
22648
|
/* @__PURE__ */ jsx(
|
|
22661
22649
|
ControlButton,
|
|
22662
22650
|
{
|
|
@@ -22671,7 +22659,7 @@ function ControlGrid({
|
|
|
22671
22659
|
disabled
|
|
22672
22660
|
}
|
|
22673
22661
|
),
|
|
22674
|
-
/* @__PURE__ */ jsx(
|
|
22662
|
+
/* @__PURE__ */ jsx(Box, {}),
|
|
22675
22663
|
/* @__PURE__ */ jsx(
|
|
22676
22664
|
ControlButton,
|
|
22677
22665
|
{
|
|
@@ -22686,7 +22674,7 @@ function ControlGrid({
|
|
|
22686
22674
|
disabled
|
|
22687
22675
|
}
|
|
22688
22676
|
),
|
|
22689
|
-
/* @__PURE__ */ jsx(
|
|
22677
|
+
/* @__PURE__ */ jsx(Box, {}),
|
|
22690
22678
|
/* @__PURE__ */ jsx(
|
|
22691
22679
|
ControlButton,
|
|
22692
22680
|
{
|
|
@@ -22701,7 +22689,7 @@ function ControlGrid({
|
|
|
22701
22689
|
disabled
|
|
22702
22690
|
}
|
|
22703
22691
|
),
|
|
22704
|
-
/* @__PURE__ */ jsx(
|
|
22692
|
+
/* @__PURE__ */ jsx(Box, {}),
|
|
22705
22693
|
/* @__PURE__ */ jsx(
|
|
22706
22694
|
ControlButton,
|
|
22707
22695
|
{
|
|
@@ -22716,10 +22704,10 @@ function ControlGrid({
|
|
|
22716
22704
|
disabled
|
|
22717
22705
|
}
|
|
22718
22706
|
),
|
|
22719
|
-
/* @__PURE__ */ jsx(
|
|
22707
|
+
/* @__PURE__ */ jsx(Box, {})
|
|
22720
22708
|
] });
|
|
22721
22709
|
}
|
|
22722
|
-
return /* @__PURE__ */ jsx(
|
|
22710
|
+
return /* @__PURE__ */ jsx(Box, { className: cn(layoutClass[layout], className), children: buttons.map((button) => /* @__PURE__ */ jsx(
|
|
22723
22711
|
ControlButton,
|
|
22724
22712
|
{
|
|
22725
22713
|
icon: button.icon,
|
|
@@ -22741,6 +22729,7 @@ var init_ControlGrid = __esm({
|
|
|
22741
22729
|
"use client";
|
|
22742
22730
|
init_cn();
|
|
22743
22731
|
init_useEventBus();
|
|
22732
|
+
init_Box();
|
|
22744
22733
|
init_ControlButton();
|
|
22745
22734
|
sizeKey = { sm: "sm", md: "md", lg: "lg" };
|
|
22746
22735
|
layoutClass = {
|
|
@@ -23005,8 +22994,9 @@ function DamageNumber({
|
|
|
23005
22994
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23006
22995
|
/* @__PURE__ */ jsx("style", { children: floatKeyframes }),
|
|
23007
22996
|
/* @__PURE__ */ jsxs(
|
|
23008
|
-
|
|
22997
|
+
Typography,
|
|
23009
22998
|
{
|
|
22999
|
+
as: "span",
|
|
23010
23000
|
className: cn(
|
|
23011
23001
|
"inline-flex items-center gap-0.5 font-mono select-none pointer-events-none",
|
|
23012
23002
|
sizeMap6[size],
|
|
@@ -23015,17 +23005,7 @@ function DamageNumber({
|
|
|
23015
23005
|
),
|
|
23016
23006
|
style: { animation: "damageFloat 1s ease-out forwards" },
|
|
23017
23007
|
children: [
|
|
23018
|
-
assetUrl && /* @__PURE__ */ jsx(
|
|
23019
|
-
"img",
|
|
23020
|
-
{
|
|
23021
|
-
src: assetUrl.url,
|
|
23022
|
-
alt: "",
|
|
23023
|
-
width: 14,
|
|
23024
|
-
height: 14,
|
|
23025
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
23026
|
-
className: "flex-shrink-0"
|
|
23027
|
-
}
|
|
23028
|
-
),
|
|
23008
|
+
assetUrl && /* @__PURE__ */ jsx(GameIcon, { assetUrl, icon: "image", size: 14, className: "flex-shrink-0" }),
|
|
23029
23009
|
displayText
|
|
23030
23010
|
]
|
|
23031
23011
|
}
|
|
@@ -23036,6 +23016,8 @@ var sizeMap6, typeStyles, floatKeyframes, DEFAULT_ASSET_URL4;
|
|
|
23036
23016
|
var init_DamageNumber = __esm({
|
|
23037
23017
|
"components/game/2d/atoms/DamageNumber.tsx"() {
|
|
23038
23018
|
init_cn();
|
|
23019
|
+
init_Typography();
|
|
23020
|
+
init_GameIcon();
|
|
23039
23021
|
sizeMap6 = {
|
|
23040
23022
|
sm: "text-sm",
|
|
23041
23023
|
md: "text-lg",
|
|
@@ -29397,7 +29379,7 @@ function ScoreDisplay({
|
|
|
29397
29379
|
const resolvedValue = typeof value === "number" && !Number.isNaN(value) ? value : typeof score === "number" && !Number.isNaN(score) ? score : 0;
|
|
29398
29380
|
const formattedValue = new Intl.NumberFormat(locale).format(resolvedValue);
|
|
29399
29381
|
return /* @__PURE__ */ jsxs(
|
|
29400
|
-
|
|
29382
|
+
Box,
|
|
29401
29383
|
{
|
|
29402
29384
|
className: cn(
|
|
29403
29385
|
"flex items-center gap-2 font-bold",
|
|
@@ -29405,19 +29387,9 @@ function ScoreDisplay({
|
|
|
29405
29387
|
className
|
|
29406
29388
|
),
|
|
29407
29389
|
children: [
|
|
29408
|
-
assetUrl ? /* @__PURE__ */ jsx(
|
|
29409
|
-
|
|
29410
|
-
|
|
29411
|
-
src: assetUrl.url,
|
|
29412
|
-
alt: "",
|
|
29413
|
-
width: 20,
|
|
29414
|
-
height: 20,
|
|
29415
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
29416
|
-
className: "flex-shrink-0"
|
|
29417
|
-
}
|
|
29418
|
-
) : icon ? /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon }) : /* @__PURE__ */ jsx(Icon, { icon }) }) : null,
|
|
29419
|
-
label && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label }),
|
|
29420
|
-
/* @__PURE__ */ jsx("span", { className: "tabular-nums", children: formattedValue })
|
|
29390
|
+
assetUrl ? /* @__PURE__ */ jsx(GameIcon, { assetUrl, icon: "image", size: 20, className: "flex-shrink-0" }) : icon ? /* @__PURE__ */ jsx(Box, { as: "span", className: "flex-shrink-0", children: typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon }) : /* @__PURE__ */ jsx(Icon, { icon }) }) : null,
|
|
29391
|
+
label && /* @__PURE__ */ jsx(Typography, { as: "span", className: "text-muted-foreground", children: label }),
|
|
29392
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", className: "tabular-nums", children: formattedValue })
|
|
29421
29393
|
]
|
|
29422
29394
|
}
|
|
29423
29395
|
);
|
|
@@ -29427,6 +29399,9 @@ var init_ScoreDisplay = __esm({
|
|
|
29427
29399
|
"components/game/2d/atoms/ScoreDisplay.tsx"() {
|
|
29428
29400
|
init_cn();
|
|
29429
29401
|
init_Icon();
|
|
29402
|
+
init_Box();
|
|
29403
|
+
init_Typography();
|
|
29404
|
+
init_GameIcon();
|
|
29430
29405
|
sizeMap8 = {
|
|
29431
29406
|
sm: "text-sm",
|
|
29432
29407
|
md: "text-lg",
|
|
@@ -29487,12 +29462,12 @@ function Sprite({
|
|
|
29487
29462
|
onClick?.();
|
|
29488
29463
|
};
|
|
29489
29464
|
return /* @__PURE__ */ jsx(
|
|
29490
|
-
|
|
29465
|
+
Box,
|
|
29491
29466
|
{
|
|
29467
|
+
position: "absolute",
|
|
29492
29468
|
className,
|
|
29493
29469
|
onClick: action || onClick ? handleClick : void 0,
|
|
29494
29470
|
style: {
|
|
29495
|
-
position: "absolute",
|
|
29496
29471
|
width: frameWidth,
|
|
29497
29472
|
height: frameHeight,
|
|
29498
29473
|
backgroundImage: `url(${spritesheet.url})`,
|
|
@@ -29548,6 +29523,7 @@ var init_Sprite = __esm({
|
|
|
29548
29523
|
"components/game/2d/atoms/Sprite.tsx"() {
|
|
29549
29524
|
"use client";
|
|
29550
29525
|
init_useEventBus();
|
|
29526
|
+
init_Box();
|
|
29551
29527
|
init_spriteAnimation();
|
|
29552
29528
|
DEFAULT_SPRITESHEET = {
|
|
29553
29529
|
url: "https://almadar-kflow-assets.web.app/shared/isometric-blocks/Spritesheet/allTiles_sheet.png",
|
|
@@ -29584,17 +29560,7 @@ function StateIndicator({
|
|
|
29584
29560
|
className
|
|
29585
29561
|
),
|
|
29586
29562
|
children: [
|
|
29587
|
-
/* @__PURE__ */ jsx(Box, { as: "span", children: assetUrl ? /* @__PURE__ */ jsx(
|
|
29588
|
-
"img",
|
|
29589
|
-
{
|
|
29590
|
-
src: assetUrl.url,
|
|
29591
|
-
alt: displayLabel,
|
|
29592
|
-
width: 16,
|
|
29593
|
-
height: 16,
|
|
29594
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
29595
|
-
className: "flex-shrink-0"
|
|
29596
|
-
}
|
|
29597
|
-
) : typeof config.icon === "string" ? /^[a-zA-Z0-9-]+$/.test(config.icon) ? /* @__PURE__ */ jsx(Icon, { name: config.icon }) : config.icon : /* @__PURE__ */ jsx(Icon, { icon: config.icon }) }),
|
|
29563
|
+
/* @__PURE__ */ jsx(Box, { as: "span", children: assetUrl ? /* @__PURE__ */ 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__ */ jsx(Icon, { name: config.icon }) : config.icon : /* @__PURE__ */ jsx(Icon, { icon: config.icon }) }),
|
|
29598
29564
|
/* @__PURE__ */ jsx(Box, { as: "span", children: displayLabel })
|
|
29599
29565
|
]
|
|
29600
29566
|
}
|
|
@@ -29606,6 +29572,7 @@ var init_StateIndicator = __esm({
|
|
|
29606
29572
|
init_Box();
|
|
29607
29573
|
init_Icon();
|
|
29608
29574
|
init_cn();
|
|
29575
|
+
init_GameIcon();
|
|
29609
29576
|
DEFAULT_ASSET_URL6 = {
|
|
29610
29577
|
url: "https://almadar-kflow-assets.web.app/shared/isometric-dungeon/Isometric/chestClosed_E.png",
|
|
29611
29578
|
role: "ui",
|
|
@@ -29659,7 +29626,7 @@ function TimerDisplay({
|
|
|
29659
29626
|
}) {
|
|
29660
29627
|
const isLow = lowThreshold != null && seconds <= lowThreshold && seconds > 0;
|
|
29661
29628
|
return /* @__PURE__ */ jsxs(
|
|
29662
|
-
|
|
29629
|
+
Box,
|
|
29663
29630
|
{
|
|
29664
29631
|
className: cn(
|
|
29665
29632
|
"inline-flex items-center gap-1 justify-center rounded-container",
|
|
@@ -29671,7 +29638,7 @@ function TimerDisplay({
|
|
|
29671
29638
|
className
|
|
29672
29639
|
),
|
|
29673
29640
|
children: [
|
|
29674
|
-
iconAsset && /* @__PURE__ */ jsx(
|
|
29641
|
+
iconAsset && /* @__PURE__ */ jsx(GameIcon, { assetUrl: iconAsset, icon: "image", size: 16, className: "w-4 h-4 object-contain flex-shrink-0" }),
|
|
29675
29642
|
formatTime(seconds, format)
|
|
29676
29643
|
]
|
|
29677
29644
|
}
|
|
@@ -29681,6 +29648,8 @@ var sizeMap9;
|
|
|
29681
29648
|
var init_TimerDisplay = __esm({
|
|
29682
29649
|
"components/game/2d/atoms/TimerDisplay.tsx"() {
|
|
29683
29650
|
init_cn();
|
|
29651
|
+
init_Box();
|
|
29652
|
+
init_GameIcon();
|
|
29684
29653
|
sizeMap9 = {
|
|
29685
29654
|
sm: "text-sm px-2 py-0.5",
|
|
29686
29655
|
md: "text-lg px-3 py-1",
|
|
@@ -29701,7 +29670,7 @@ function ResourceCounter({
|
|
|
29701
29670
|
}) {
|
|
29702
29671
|
const sizes = sizeMap10[size];
|
|
29703
29672
|
return /* @__PURE__ */ jsxs(
|
|
29704
|
-
|
|
29673
|
+
Box,
|
|
29705
29674
|
{
|
|
29706
29675
|
className: cn(
|
|
29707
29676
|
"inline-flex items-center rounded-container",
|
|
@@ -29710,21 +29679,11 @@ function ResourceCounter({
|
|
|
29710
29679
|
className
|
|
29711
29680
|
),
|
|
29712
29681
|
children: [
|
|
29713
|
-
assetUrl ? /* @__PURE__ */ jsx(
|
|
29714
|
-
|
|
29715
|
-
|
|
29716
|
-
src: assetUrl.url,
|
|
29717
|
-
alt: label,
|
|
29718
|
-
width: sizes.img,
|
|
29719
|
-
height: sizes.img,
|
|
29720
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
29721
|
-
className: "flex-shrink-0"
|
|
29722
|
-
}
|
|
29723
|
-
) : icon ? /* @__PURE__ */ jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon }) : /* @__PURE__ */ jsx(Icon, { icon }) }) : null,
|
|
29724
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label }),
|
|
29725
|
-
/* @__PURE__ */ jsxs("span", { className: cn("font-bold tabular-nums", color && (color in colorTokenClasses2 ? colorTokenClasses2[color] : color)), children: [
|
|
29682
|
+
assetUrl ? /* @__PURE__ */ jsx(GameIcon, { assetUrl, icon: "image", size: sizes.img, alt: label, className: "flex-shrink-0" }) : icon ? /* @__PURE__ */ jsx(Box, { as: "span", className: cn("flex-shrink-0", sizes.icon), children: typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon }) : /* @__PURE__ */ jsx(Icon, { icon }) }) : null,
|
|
29683
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", className: "text-muted-foreground", children: label }),
|
|
29684
|
+
/* @__PURE__ */ jsxs(Typography, { as: "span", className: cn("font-bold tabular-nums", color && (color in colorTokenClasses2 ? colorTokenClasses2[color] : color)), children: [
|
|
29726
29685
|
value,
|
|
29727
|
-
max != null && /* @__PURE__ */ jsxs("span",
|
|
29686
|
+
max != null && /* @__PURE__ */ jsxs(Typography, { as: "span", className: "text-muted-foreground", children: [
|
|
29728
29687
|
"/",
|
|
29729
29688
|
max
|
|
29730
29689
|
] })
|
|
@@ -29738,6 +29697,9 @@ var init_ResourceCounter = __esm({
|
|
|
29738
29697
|
"components/game/2d/atoms/ResourceCounter.tsx"() {
|
|
29739
29698
|
init_cn();
|
|
29740
29699
|
init_Icon();
|
|
29700
|
+
init_Box();
|
|
29701
|
+
init_Typography();
|
|
29702
|
+
init_GameIcon();
|
|
29741
29703
|
colorTokenClasses2 = {
|
|
29742
29704
|
primary: "text-primary",
|
|
29743
29705
|
secondary: "text-secondary",
|
|
@@ -29776,9 +29738,9 @@ function ItemSlot({
|
|
|
29776
29738
|
const isClickable = onClick != null || action != null;
|
|
29777
29739
|
const px = assetSizeMap[size];
|
|
29778
29740
|
return /* @__PURE__ */ jsx(
|
|
29779
|
-
|
|
29741
|
+
Button,
|
|
29780
29742
|
{
|
|
29781
|
-
|
|
29743
|
+
variant: "ghost",
|
|
29782
29744
|
onClick: () => {
|
|
29783
29745
|
if (action) eventBus.emit(`UI:${action}`, {});
|
|
29784
29746
|
onClick?.();
|
|
@@ -29797,21 +29759,12 @@ function ItemSlot({
|
|
|
29797
29759
|
!isClickable && "cursor-default",
|
|
29798
29760
|
className
|
|
29799
29761
|
),
|
|
29800
|
-
children: empty ? /* @__PURE__ */ jsx("span",
|
|
29801
|
-
assetUrl ? /* @__PURE__ */ jsx(
|
|
29802
|
-
"img",
|
|
29803
|
-
{
|
|
29804
|
-
src: assetUrl?.url,
|
|
29805
|
-
alt: label,
|
|
29806
|
-
width: px,
|
|
29807
|
-
height: px,
|
|
29808
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
29809
|
-
className: "flex-shrink-0"
|
|
29810
|
-
}
|
|
29811
|
-
) : icon ? /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon }) : /* @__PURE__ */ jsx(Icon, { icon }) }) : null,
|
|
29762
|
+
children: empty ? /* @__PURE__ */ jsx(Typography, { as: "span", className: "text-muted-foreground text-base", children: "+" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29763
|
+
assetUrl ? /* @__PURE__ */ jsx(GameIcon, { assetUrl, icon: "image", size: px, alt: label, className: "flex-shrink-0" }) : icon ? /* @__PURE__ */ jsx(Box, { as: "span", className: "flex-shrink-0", children: typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon }) : /* @__PURE__ */ jsx(Icon, { icon }) }) : null,
|
|
29812
29764
|
quantity != null && quantity > 1 && /* @__PURE__ */ jsx(
|
|
29813
|
-
|
|
29765
|
+
Typography,
|
|
29814
29766
|
{
|
|
29767
|
+
as: "span",
|
|
29815
29768
|
className: cn(
|
|
29816
29769
|
"absolute -bottom-1 -right-1 flex items-center justify-center",
|
|
29817
29770
|
"min-w-[18px] h-[18px] rounded-full px-1",
|
|
@@ -29831,6 +29784,10 @@ var init_ItemSlot = __esm({
|
|
|
29831
29784
|
init_cn();
|
|
29832
29785
|
init_Icon();
|
|
29833
29786
|
init_useEventBus();
|
|
29787
|
+
init_Button();
|
|
29788
|
+
init_Box();
|
|
29789
|
+
init_Typography();
|
|
29790
|
+
init_GameIcon();
|
|
29834
29791
|
sizeMap11 = {
|
|
29835
29792
|
sm: "w-10 h-10 text-lg",
|
|
29836
29793
|
md: "w-14 h-14 text-2xl",
|
|
@@ -29874,7 +29831,7 @@ function TurnIndicator({
|
|
|
29874
29831
|
}) {
|
|
29875
29832
|
const sizes = sizeMap12[size];
|
|
29876
29833
|
return /* @__PURE__ */ jsxs(
|
|
29877
|
-
|
|
29834
|
+
Box,
|
|
29878
29835
|
{
|
|
29879
29836
|
className: cn(
|
|
29880
29837
|
"inline-flex items-center rounded-container",
|
|
@@ -29883,32 +29840,22 @@ function TurnIndicator({
|
|
|
29883
29840
|
className
|
|
29884
29841
|
),
|
|
29885
29842
|
children: [
|
|
29886
|
-
/* @__PURE__ */ jsxs("span",
|
|
29843
|
+
/* @__PURE__ */ jsxs(Typography, { as: "span", className: "font-bold tabular-nums", children: [
|
|
29887
29844
|
"Turn ",
|
|
29888
29845
|
currentTurn,
|
|
29889
|
-
maxTurns != null && /* @__PURE__ */ jsxs("span",
|
|
29846
|
+
maxTurns != null && /* @__PURE__ */ jsxs(Typography, { as: "span", className: "text-muted-foreground", children: [
|
|
29890
29847
|
"/",
|
|
29891
29848
|
maxTurns
|
|
29892
29849
|
] })
|
|
29893
29850
|
] }),
|
|
29894
29851
|
phase && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29895
|
-
/* @__PURE__ */ jsx("span",
|
|
29896
|
-
/* @__PURE__ */ jsx("span",
|
|
29852
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", className: "text-muted-foreground", children: "|" }),
|
|
29853
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", className: "text-muted-foreground", children: phase })
|
|
29897
29854
|
] }),
|
|
29898
29855
|
activeTeam && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29899
|
-
/* @__PURE__ */ jsx("span",
|
|
29900
|
-
assetUrl ? /* @__PURE__ */ jsx(
|
|
29901
|
-
|
|
29902
|
-
{
|
|
29903
|
-
src: assetUrl.url,
|
|
29904
|
-
alt: "",
|
|
29905
|
-
width: 12,
|
|
29906
|
-
height: 12,
|
|
29907
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
29908
|
-
className: "flex-shrink-0"
|
|
29909
|
-
}
|
|
29910
|
-
) : /* @__PURE__ */ jsx("span", { className: cn("rounded-full bg-success/20", sizes.dot) }),
|
|
29911
|
-
/* @__PURE__ */ jsx("span", { className: "text-success", children: activeTeam })
|
|
29856
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", className: "text-muted-foreground", children: "|" }),
|
|
29857
|
+
assetUrl ? /* @__PURE__ */ jsx(GameIcon, { assetUrl, icon: "image", size: 12, className: "flex-shrink-0" }) : /* @__PURE__ */ jsx(Box, { as: "span", className: cn("rounded-full bg-success/20", sizes.dot) }),
|
|
29858
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", className: "text-success", children: activeTeam })
|
|
29912
29859
|
] })
|
|
29913
29860
|
]
|
|
29914
29861
|
}
|
|
@@ -29918,6 +29865,9 @@ var sizeMap12, DEFAULT_ASSET_URL9;
|
|
|
29918
29865
|
var init_TurnIndicator = __esm({
|
|
29919
29866
|
"components/game/2d/atoms/TurnIndicator.tsx"() {
|
|
29920
29867
|
init_cn();
|
|
29868
|
+
init_Box();
|
|
29869
|
+
init_Typography();
|
|
29870
|
+
init_GameIcon();
|
|
29921
29871
|
sizeMap12 = {
|
|
29922
29872
|
sm: { wrapper: "text-xs gap-1.5 px-2 py-0.5", dot: "w-1.5 h-1.5" },
|
|
29923
29873
|
md: { wrapper: "text-sm gap-2 px-3 py-1", dot: "w-2 h-2" },
|
|
@@ -29941,53 +29891,47 @@ function WaypointMarker({
|
|
|
29941
29891
|
className
|
|
29942
29892
|
}) {
|
|
29943
29893
|
const sizes = sizeMap13[size];
|
|
29944
|
-
return /* @__PURE__ */ jsxs(
|
|
29945
|
-
/* @__PURE__ */ jsxs(
|
|
29894
|
+
return /* @__PURE__ */ jsxs(Box, { className: cn("flex flex-col items-center", className), children: [
|
|
29895
|
+
/* @__PURE__ */ jsxs(Box, { className: "relative flex items-center justify-center", children: [
|
|
29946
29896
|
active && /* @__PURE__ */ jsx(
|
|
29947
|
-
|
|
29897
|
+
Box,
|
|
29948
29898
|
{
|
|
29899
|
+
position: "absolute",
|
|
29949
29900
|
className: cn(
|
|
29950
|
-
"
|
|
29901
|
+
"rounded-full border-2 border-info animate-ping opacity-50",
|
|
29951
29902
|
sizes.ring
|
|
29952
29903
|
)
|
|
29953
29904
|
}
|
|
29954
29905
|
),
|
|
29955
29906
|
active && /* @__PURE__ */ jsx(
|
|
29956
|
-
|
|
29907
|
+
Box,
|
|
29957
29908
|
{
|
|
29909
|
+
position: "absolute",
|
|
29958
29910
|
className: cn(
|
|
29959
|
-
"
|
|
29911
|
+
"rounded-full border-2 border-info",
|
|
29960
29912
|
sizes.ring
|
|
29961
29913
|
)
|
|
29962
29914
|
}
|
|
29963
29915
|
),
|
|
29964
29916
|
/* @__PURE__ */ jsx(
|
|
29965
|
-
|
|
29917
|
+
Box,
|
|
29966
29918
|
{
|
|
29919
|
+
position: "relative",
|
|
29967
29920
|
className: cn(
|
|
29968
|
-
"
|
|
29921
|
+
"flex items-center justify-center rounded-full transition-all duration-200",
|
|
29969
29922
|
sizes.dot,
|
|
29970
29923
|
completed && "bg-success text-foreground",
|
|
29971
29924
|
active && !completed && "bg-info text-foreground",
|
|
29972
29925
|
!active && !completed && "bg-muted"
|
|
29973
29926
|
),
|
|
29974
|
-
children: completed ? checkIcon : assetUrl ? /* @__PURE__ */ jsx(
|
|
29975
|
-
"img",
|
|
29976
|
-
{
|
|
29977
|
-
src: assetUrl.url,
|
|
29978
|
-
alt: label,
|
|
29979
|
-
width: sizes.img,
|
|
29980
|
-
height: sizes.img,
|
|
29981
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
29982
|
-
className: "flex-shrink-0"
|
|
29983
|
-
}
|
|
29984
|
-
) : icon ? typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon }) : /* @__PURE__ */ jsx(Icon, { icon }) : null
|
|
29927
|
+
children: completed ? checkIcon : assetUrl ? /* @__PURE__ */ jsx(GameIcon, { assetUrl, icon: "image", size: sizes.img, alt: label, className: "flex-shrink-0" }) : icon ? typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon }) : /* @__PURE__ */ jsx(Icon, { icon }) : null
|
|
29985
29928
|
}
|
|
29986
29929
|
)
|
|
29987
29930
|
] }),
|
|
29988
29931
|
label && /* @__PURE__ */ jsx(
|
|
29989
|
-
|
|
29932
|
+
Typography,
|
|
29990
29933
|
{
|
|
29934
|
+
as: "span",
|
|
29991
29935
|
className: cn(
|
|
29992
29936
|
"text-center whitespace-nowrap",
|
|
29993
29937
|
sizes.label,
|
|
@@ -30003,6 +29947,9 @@ var init_WaypointMarker = __esm({
|
|
|
30003
29947
|
"components/game/2d/atoms/WaypointMarker.tsx"() {
|
|
30004
29948
|
init_cn();
|
|
30005
29949
|
init_Icon();
|
|
29950
|
+
init_Box();
|
|
29951
|
+
init_Typography();
|
|
29952
|
+
init_GameIcon();
|
|
30006
29953
|
DEFAULT_ASSET_URL10 = {
|
|
30007
29954
|
url: "https://almadar-kflow-assets.web.app/shared/world-map/battle_marker.png",
|
|
30008
29955
|
role: "ui",
|
|
@@ -30034,31 +29981,23 @@ function StatusEffect({
|
|
|
30034
29981
|
className
|
|
30035
29982
|
}) {
|
|
30036
29983
|
const sizes = sizeMap14[size];
|
|
30037
|
-
return /* @__PURE__ */ jsxs("
|
|
29984
|
+
return /* @__PURE__ */ jsxs(Box, { position: "relative", className: cn("inline-flex flex-col items-center", className), children: [
|
|
30038
29985
|
/* @__PURE__ */ jsxs(
|
|
30039
|
-
|
|
29986
|
+
Box,
|
|
30040
29987
|
{
|
|
29988
|
+
position: "relative",
|
|
30041
29989
|
className: cn(
|
|
30042
|
-
"
|
|
29990
|
+
"flex items-center justify-center rounded-interactive border-2",
|
|
30043
29991
|
sizes.container,
|
|
30044
29992
|
variantStyles8[variant]
|
|
30045
29993
|
),
|
|
30046
29994
|
title: label,
|
|
30047
29995
|
children: [
|
|
30048
|
-
/* @__PURE__ */ jsx("span",
|
|
30049
|
-
"img",
|
|
30050
|
-
{
|
|
30051
|
-
src: assetUrl.url,
|
|
30052
|
-
alt: label,
|
|
30053
|
-
width: sizes.img,
|
|
30054
|
-
height: sizes.img,
|
|
30055
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
30056
|
-
className: "flex-shrink-0"
|
|
30057
|
-
}
|
|
30058
|
-
) : icon != null && typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, size: "sm" }) : icon != null ? /* @__PURE__ */ jsx(Icon, { icon, size: "sm" }) : null }),
|
|
29996
|
+
/* @__PURE__ */ jsx(Box, { as: "span", className: cn("flex items-center justify-center", sizes.icon), children: assetUrl ? /* @__PURE__ */ jsx(GameIcon, { assetUrl, icon: "image", size: sizes.img, alt: label, className: "flex-shrink-0" }) : icon != null && typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, size: "sm" }) : icon != null ? /* @__PURE__ */ jsx(Icon, { icon, size: "sm" }) : null }),
|
|
30059
29997
|
duration !== void 0 && /* @__PURE__ */ jsx(
|
|
30060
|
-
|
|
29998
|
+
Typography,
|
|
30061
29999
|
{
|
|
30000
|
+
as: "span",
|
|
30062
30001
|
className: cn(
|
|
30063
30002
|
"absolute bottom-0 left-0 right-0 text-center font-mono font-bold text-foreground bg-background/60 leading-tight",
|
|
30064
30003
|
sizes.timer
|
|
@@ -30070,8 +30009,9 @@ function StatusEffect({
|
|
|
30070
30009
|
}
|
|
30071
30010
|
),
|
|
30072
30011
|
stacks !== void 0 && stacks > 1 && /* @__PURE__ */ jsx(
|
|
30073
|
-
|
|
30012
|
+
Typography,
|
|
30074
30013
|
{
|
|
30014
|
+
as: "span",
|
|
30075
30015
|
className: cn(
|
|
30076
30016
|
"absolute flex items-center justify-center rounded-full bg-card text-foreground font-bold leading-none",
|
|
30077
30017
|
sizes.badge
|
|
@@ -30079,7 +30019,7 @@ function StatusEffect({
|
|
|
30079
30019
|
children: stacks
|
|
30080
30020
|
}
|
|
30081
30021
|
),
|
|
30082
|
-
label && /* @__PURE__ */ jsx("span",
|
|
30022
|
+
label && /* @__PURE__ */ jsx(Typography, { as: "span", className: "text-xs text-muted-foreground mt-0.5 text-center whitespace-nowrap", children: label })
|
|
30083
30023
|
] });
|
|
30084
30024
|
}
|
|
30085
30025
|
var DEFAULT_ASSET_URL11, sizeMap14, variantStyles8;
|
|
@@ -30087,6 +30027,9 @@ var init_StatusEffect = __esm({
|
|
|
30087
30027
|
"components/game/2d/atoms/StatusEffect.tsx"() {
|
|
30088
30028
|
init_cn();
|
|
30089
30029
|
init_Icon();
|
|
30030
|
+
init_Box();
|
|
30031
|
+
init_Typography();
|
|
30032
|
+
init_GameIcon();
|
|
30090
30033
|
DEFAULT_ASSET_URL11 = {
|
|
30091
30034
|
url: "https://almadar-kflow-assets.web.app/shared/effects/particles/flame_01.png",
|
|
30092
30035
|
role: "ui",
|
|
@@ -30113,7 +30056,7 @@ function DialogueBubble({
|
|
|
30113
30056
|
className
|
|
30114
30057
|
}) {
|
|
30115
30058
|
return /* @__PURE__ */ jsxs(
|
|
30116
|
-
|
|
30059
|
+
Box,
|
|
30117
30060
|
{
|
|
30118
30061
|
className: cn(
|
|
30119
30062
|
"flex items-start gap-3 rounded-container bg-background/80 backdrop-blur-sm px-4 py-3 border border-border/10",
|
|
@@ -30121,17 +30064,10 @@ function DialogueBubble({
|
|
|
30121
30064
|
className
|
|
30122
30065
|
),
|
|
30123
30066
|
children: [
|
|
30124
|
-
portrait && /* @__PURE__ */ jsx(
|
|
30125
|
-
|
|
30126
|
-
{
|
|
30127
|
-
|
|
30128
|
-
alt: speaker ?? "speaker",
|
|
30129
|
-
className: "w-full h-full object-cover"
|
|
30130
|
-
}
|
|
30131
|
-
) }),
|
|
30132
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 min-w-0", children: [
|
|
30133
|
-
speaker && /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-warning", children: speaker }),
|
|
30134
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm text-foreground leading-relaxed", children: text })
|
|
30067
|
+
portrait && /* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 w-12 h-12 rounded-full overflow-hidden border-2 border-warning/60", children: /* @__PURE__ */ jsx(GameIcon, { assetUrl: portrait, icon: "image", size: 48, alt: speaker ?? "speaker", className: "w-full h-full object-cover" }) }),
|
|
30068
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex flex-col gap-1 min-w-0", children: [
|
|
30069
|
+
speaker && /* @__PURE__ */ jsx(Typography, { as: "span", className: "text-sm font-bold text-warning", children: speaker }),
|
|
30070
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", className: "text-sm text-foreground leading-relaxed", children: text })
|
|
30135
30071
|
] })
|
|
30136
30072
|
]
|
|
30137
30073
|
}
|
|
@@ -30141,6 +30077,9 @@ var DEFAULT_PORTRAIT;
|
|
|
30141
30077
|
var init_DialogueBubble = __esm({
|
|
30142
30078
|
"components/game/2d/atoms/DialogueBubble.tsx"() {
|
|
30143
30079
|
init_cn();
|
|
30080
|
+
init_Box();
|
|
30081
|
+
init_Typography();
|
|
30082
|
+
init_GameIcon();
|
|
30144
30083
|
DEFAULT_PORTRAIT = {
|
|
30145
30084
|
url: "https://almadar-kflow-assets.web.app/shared/characters/archetypes/04_hero.png",
|
|
30146
30085
|
role: "effect",
|
|
@@ -30167,7 +30106,7 @@ function StatBadge({
|
|
|
30167
30106
|
const numValue = typeof value === "number" ? value : parseInt(String(value), 10) || 0;
|
|
30168
30107
|
const resolvedAsset = iconUrl ?? assetUrl;
|
|
30169
30108
|
return /* @__PURE__ */ jsxs(
|
|
30170
|
-
|
|
30109
|
+
Box,
|
|
30171
30110
|
{
|
|
30172
30111
|
className: cn(
|
|
30173
30112
|
"inline-flex items-center gap-2 rounded-container border backdrop-blur-sm",
|
|
@@ -30176,18 +30115,8 @@ function StatBadge({
|
|
|
30176
30115
|
className
|
|
30177
30116
|
),
|
|
30178
30117
|
children: [
|
|
30179
|
-
resolvedAsset ? /* @__PURE__ */ jsx(
|
|
30180
|
-
|
|
30181
|
-
{
|
|
30182
|
-
src: resolvedAsset.url,
|
|
30183
|
-
alt: "",
|
|
30184
|
-
width: 16,
|
|
30185
|
-
height: 16,
|
|
30186
|
-
style: { imageRendering: "pixelated", objectFit: "contain" },
|
|
30187
|
-
className: "flex-shrink-0"
|
|
30188
|
-
}
|
|
30189
|
-
) : icon ? /* @__PURE__ */ jsx("span", { className: "flex-shrink-0 text-lg", children: typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, className: "w-4 h-4" }) : /* @__PURE__ */ jsx(Icon, { icon, className: "w-4 h-4" }) }) : null,
|
|
30190
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground font-medium", children: label }),
|
|
30118
|
+
resolvedAsset ? /* @__PURE__ */ jsx(GameIcon, { assetUrl: resolvedAsset, icon: "image", size: 16, className: "flex-shrink-0" }) : icon ? /* @__PURE__ */ jsx(Box, { as: "span", className: "flex-shrink-0 text-lg", children: typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, className: "w-4 h-4" }) : /* @__PURE__ */ jsx(Icon, { icon, className: "w-4 h-4" }) }) : null,
|
|
30119
|
+
/* @__PURE__ */ jsx(Typography, { as: "span", className: "text-muted-foreground font-medium", children: label }),
|
|
30191
30120
|
format === "hearts" && max && /* @__PURE__ */ jsx(
|
|
30192
30121
|
HealthBar,
|
|
30193
30122
|
{
|
|
@@ -30213,7 +30142,7 @@ function StatBadge({
|
|
|
30213
30142
|
size: size === "lg" ? "md" : "sm"
|
|
30214
30143
|
}
|
|
30215
30144
|
),
|
|
30216
|
-
format === "text" && /* @__PURE__ */ jsx("span",
|
|
30145
|
+
format === "text" && /* @__PURE__ */ jsx(Typography, { as: "span", className: "font-bold text-foreground", children: value })
|
|
30217
30146
|
]
|
|
30218
30147
|
}
|
|
30219
30148
|
);
|
|
@@ -30223,6 +30152,9 @@ var init_StatBadge = __esm({
|
|
|
30223
30152
|
"components/game/2d/molecules/StatBadge.tsx"() {
|
|
30224
30153
|
init_cn();
|
|
30225
30154
|
init_Icon();
|
|
30155
|
+
init_Box();
|
|
30156
|
+
init_Typography();
|
|
30157
|
+
init_GameIcon();
|
|
30226
30158
|
init_HealthBar();
|
|
30227
30159
|
init_ScoreDisplay();
|
|
30228
30160
|
sizeMap15 = {
|
|
@@ -30400,9 +30332,9 @@ function GameHud({
|
|
|
30400
30332
|
if (position === "corners") {
|
|
30401
30333
|
const leftStats = stats.slice(0, Math.ceil(stats.length / 2));
|
|
30402
30334
|
const rightStats = stats.slice(Math.ceil(stats.length / 2));
|
|
30403
|
-
return /* @__PURE__ */ jsxs(
|
|
30404
|
-
/* @__PURE__ */ jsx(
|
|
30405
|
-
/* @__PURE__ */ jsx(
|
|
30335
|
+
return /* @__PURE__ */ jsxs(Box, { position: "relative", className: cn(positionMap[position], className), children: [
|
|
30336
|
+
/* @__PURE__ */ jsx(Box, { position: "absolute", className: "top-4 left-4 flex flex-col gap-2 pointer-events-auto", children: leftStats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) }),
|
|
30337
|
+
/* @__PURE__ */ jsx(Box, { position: "absolute", className: "top-4 right-4 flex flex-col gap-2 items-end pointer-events-auto", children: rightStats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) })
|
|
30406
30338
|
] });
|
|
30407
30339
|
}
|
|
30408
30340
|
if (position === "top" || position === "bottom") {
|
|
@@ -30411,7 +30343,7 @@ function GameHud({
|
|
|
30411
30343
|
const rightStats = stats.slice(mid);
|
|
30412
30344
|
const isTop = position === "top";
|
|
30413
30345
|
return /* @__PURE__ */ jsxs(
|
|
30414
|
-
|
|
30346
|
+
Box,
|
|
30415
30347
|
{
|
|
30416
30348
|
className: cn(
|
|
30417
30349
|
"flex items-center justify-between w-full",
|
|
@@ -30421,17 +30353,18 @@ function GameHud({
|
|
|
30421
30353
|
className
|
|
30422
30354
|
),
|
|
30423
30355
|
children: [
|
|
30424
|
-
/* @__PURE__ */ jsx(
|
|
30425
|
-
rightStats.length > 0 && /* @__PURE__ */ jsx(
|
|
30356
|
+
/* @__PURE__ */ jsx(Box, { className: "flex items-center gap-3 flex-shrink-0", children: leftStats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) }),
|
|
30357
|
+
rightStats.length > 0 && /* @__PURE__ */ jsx(Box, { className: "flex items-center gap-3 flex-shrink-0", children: rightStats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) })
|
|
30426
30358
|
]
|
|
30427
30359
|
}
|
|
30428
30360
|
);
|
|
30429
30361
|
}
|
|
30430
30362
|
return /* @__PURE__ */ jsx(
|
|
30431
|
-
|
|
30363
|
+
Box,
|
|
30432
30364
|
{
|
|
30365
|
+
position: "relative",
|
|
30433
30366
|
className: cn(
|
|
30434
|
-
"
|
|
30367
|
+
"z-10 flex items-center gap-4 px-4 py-2",
|
|
30435
30368
|
transparent ? "bg-black/30 backdrop-blur-sm" : "bg-surface/90 backdrop-blur-sm",
|
|
30436
30369
|
className
|
|
30437
30370
|
),
|
|
@@ -30443,6 +30376,7 @@ var positionMap, DEFAULT_HUD_STATS;
|
|
|
30443
30376
|
var init_GameHud = __esm({
|
|
30444
30377
|
"components/game/2d/molecules/GameHud.tsx"() {
|
|
30445
30378
|
init_cn();
|
|
30379
|
+
init_Box();
|
|
30446
30380
|
init_StatBadge();
|
|
30447
30381
|
positionMap = {
|
|
30448
30382
|
corners: "inset-0 pointer-events-none"
|
|
@@ -30483,7 +30417,7 @@ function GameMenu({
|
|
|
30483
30417
|
[eventBus, onSelect]
|
|
30484
30418
|
);
|
|
30485
30419
|
return /* @__PURE__ */ jsxs(
|
|
30486
|
-
|
|
30420
|
+
Box,
|
|
30487
30421
|
{
|
|
30488
30422
|
className: cn(
|
|
30489
30423
|
"min-h-screen w-full flex flex-col items-center justify-center p-8",
|
|
@@ -30493,18 +30427,12 @@ function GameMenu({
|
|
|
30493
30427
|
background: background ?? "linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0e17 100%)"
|
|
30494
30428
|
},
|
|
30495
30429
|
children: [
|
|
30496
|
-
/* @__PURE__ */ jsxs(
|
|
30497
|
-
logo && /* @__PURE__ */ jsx(
|
|
30498
|
-
"img",
|
|
30499
|
-
{
|
|
30500
|
-
src: logo.url,
|
|
30501
|
-
alt: title,
|
|
30502
|
-
className: "h-24 w-auto mx-auto mb-6 drop-shadow-2xl"
|
|
30503
|
-
}
|
|
30504
|
-
),
|
|
30430
|
+
/* @__PURE__ */ jsxs(Box, { className: "text-center mb-12 animate-fade-in", children: [
|
|
30431
|
+
logo && /* @__PURE__ */ jsx(GameIcon, { assetUrl: logo, icon: "image", size: 96, alt: title, className: "h-24 w-auto mx-auto mb-6 drop-shadow-2xl" }),
|
|
30505
30432
|
/* @__PURE__ */ jsx(
|
|
30506
|
-
|
|
30433
|
+
Typography,
|
|
30507
30434
|
{
|
|
30435
|
+
variant: "h1",
|
|
30508
30436
|
className: "text-5xl md:text-7xl font-bold text-[var(--color-foreground)] tracking-tight",
|
|
30509
30437
|
style: {
|
|
30510
30438
|
textShadow: "0 4px 12px rgba(0,0,0,0.5)"
|
|
@@ -30512,9 +30440,9 @@ function GameMenu({
|
|
|
30512
30440
|
children: title
|
|
30513
30441
|
}
|
|
30514
30442
|
),
|
|
30515
|
-
subtitle && /* @__PURE__ */ jsx("
|
|
30443
|
+
subtitle && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "mt-2 text-lg text-muted-foreground tracking-widest uppercase", children: subtitle })
|
|
30516
30444
|
] }),
|
|
30517
|
-
/* @__PURE__ */ jsx(
|
|
30445
|
+
/* @__PURE__ */ jsx(Box, { className: "flex flex-col gap-4 w-full max-w-md", children: resolvedOptions.map((option, index) => /* @__PURE__ */ jsx(
|
|
30518
30446
|
ChoiceButton,
|
|
30519
30447
|
{
|
|
30520
30448
|
text: option.label,
|
|
@@ -30525,9 +30453,9 @@ function GameMenu({
|
|
|
30525
30453
|
},
|
|
30526
30454
|
index
|
|
30527
30455
|
)) }),
|
|
30528
|
-
/* @__PURE__ */ jsxs(
|
|
30529
|
-
/* @__PURE__ */ jsx(
|
|
30530
|
-
/* @__PURE__ */ jsx(
|
|
30456
|
+
/* @__PURE__ */ jsxs(Box, { position: "absolute", className: "inset-0 pointer-events-none overflow-hidden", children: [
|
|
30457
|
+
/* @__PURE__ */ jsx(Box, { position: "absolute", className: "top-1/4 left-1/4 w-64 h-64 bg-info/10 rounded-container blur-3xl" }),
|
|
30458
|
+
/* @__PURE__ */ jsx(Box, { position: "absolute", className: "bottom-1/4 right-1/4 w-96 h-96 bg-accent/10 rounded-container blur-3xl" })
|
|
30531
30459
|
] })
|
|
30532
30460
|
]
|
|
30533
30461
|
}
|
|
@@ -30539,6 +30467,9 @@ var init_GameMenu = __esm({
|
|
|
30539
30467
|
"use client";
|
|
30540
30468
|
init_cn();
|
|
30541
30469
|
init_useEventBus();
|
|
30470
|
+
init_Box();
|
|
30471
|
+
init_Typography();
|
|
30472
|
+
init_GameIcon();
|
|
30542
30473
|
init_ChoiceButton();
|
|
30543
30474
|
DEFAULT_MENU_OPTIONS = [
|
|
30544
30475
|
{ label: "New Game", event: "NEW_GAME", variant: "primary" },
|
|
@@ -30977,7 +30908,7 @@ function GameAudioToggle({
|
|
|
30977
30908
|
onClick: handleToggle,
|
|
30978
30909
|
className: cn("text-lg leading-none px-2", className),
|
|
30979
30910
|
"aria-pressed": muted,
|
|
30980
|
-
children: activeAsset ? /* @__PURE__ */ jsx(
|
|
30911
|
+
children: activeAsset ? /* @__PURE__ */ 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}"
|
|
30981
30912
|
}
|
|
30982
30913
|
);
|
|
30983
30914
|
}
|
|
@@ -30987,6 +30918,7 @@ var init_GameAudioToggle = __esm({
|
|
|
30987
30918
|
init_atoms();
|
|
30988
30919
|
init_cn();
|
|
30989
30920
|
init_GameAudioProvider();
|
|
30921
|
+
init_GameIcon();
|
|
30990
30922
|
GameAudioToggle.displayName = "GameAudioToggle";
|
|
30991
30923
|
}
|
|
30992
30924
|
});
|