@almadar/ui 5.9.5 → 5.9.7
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 +232 -215
- package/dist/avl/index.js +232 -215
- package/dist/components/index.cjs +248 -231
- package/dist/components/index.js +248 -231
- package/dist/components/molecules/game/GameCanvas2D.d.ts +5 -1
- package/dist/providers/index.cjs +232 -215
- package/dist/providers/index.js +232 -215
- package/dist/runtime/index.cjs +232 -215
- package/dist/runtime/index.js +232 -215
- package/package.json +1 -1
package/dist/runtime/index.js
CHANGED
|
@@ -7096,7 +7096,7 @@ function HealthBar({
|
|
|
7096
7096
|
"div",
|
|
7097
7097
|
{
|
|
7098
7098
|
className: cn(
|
|
7099
|
-
"relative overflow-hidden rounded-full bg-
|
|
7099
|
+
"relative overflow-hidden rounded-full bg-muted",
|
|
7100
7100
|
sizes.bar,
|
|
7101
7101
|
"w-24",
|
|
7102
7102
|
className
|
|
@@ -7106,7 +7106,7 @@ function HealthBar({
|
|
|
7106
7106
|
{
|
|
7107
7107
|
className: cn(
|
|
7108
7108
|
"absolute inset-y-0 left-0 rounded-full",
|
|
7109
|
-
percentage > 66 ? "bg-
|
|
7109
|
+
percentage > 66 ? "bg-success" : percentage > 33 ? "bg-warning" : "bg-error",
|
|
7110
7110
|
animated && "transition-all duration-300"
|
|
7111
7111
|
),
|
|
7112
7112
|
style: { width: `${percentage}%` }
|
|
@@ -7128,7 +7128,7 @@ var init_HealthBar = __esm({
|
|
|
7128
7128
|
heartIcon = (filled, size) => /* @__PURE__ */ jsx(
|
|
7129
7129
|
"svg",
|
|
7130
7130
|
{
|
|
7131
|
-
className: cn("transition-all duration-200", size, filled ? "text-
|
|
7131
|
+
className: cn("transition-all duration-200", size, filled ? "text-error" : "text-muted-foreground"),
|
|
7132
7132
|
viewBox: "0 0 24 24",
|
|
7133
7133
|
fill: filled ? "currentColor" : "none",
|
|
7134
7134
|
stroke: "currentColor",
|
|
@@ -7192,7 +7192,7 @@ function ScoreDisplay({
|
|
|
7192
7192
|
),
|
|
7193
7193
|
children: [
|
|
7194
7194
|
icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: icon }),
|
|
7195
|
-
label && /* @__PURE__ */ jsx("span", { className: "text-
|
|
7195
|
+
label && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label }),
|
|
7196
7196
|
/* @__PURE__ */ jsx("span", { className: "tabular-nums", children: formattedValue })
|
|
7197
7197
|
]
|
|
7198
7198
|
}
|
|
@@ -7305,8 +7305,8 @@ var init_ControlButton = __esm({
|
|
|
7305
7305
|
};
|
|
7306
7306
|
shapeMap = {
|
|
7307
7307
|
circle: "rounded-full",
|
|
7308
|
-
rounded: "rounded-
|
|
7309
|
-
square: "rounded-
|
|
7308
|
+
rounded: "rounded-interactive",
|
|
7309
|
+
square: "rounded-interactive"
|
|
7310
7310
|
};
|
|
7311
7311
|
variantMap = {
|
|
7312
7312
|
primary: "bg-primary text-primary-foreground border-primary hover:bg-primary-hover",
|
|
@@ -7474,12 +7474,12 @@ function TimerDisplay({
|
|
|
7474
7474
|
"div",
|
|
7475
7475
|
{
|
|
7476
7476
|
className: cn(
|
|
7477
|
-
"inline-flex items-center justify-center rounded-
|
|
7478
|
-
"bg-
|
|
7477
|
+
"inline-flex items-center justify-center rounded-container",
|
|
7478
|
+
"bg-card/80 border border-muted font-mono font-bold tabular-nums",
|
|
7479
7479
|
sizeMap4[size],
|
|
7480
|
-
running && "border-
|
|
7481
|
-
isLow && "text-
|
|
7482
|
-
!isLow && "text-
|
|
7480
|
+
running && "border-success/50",
|
|
7481
|
+
isLow && "text-error border-error/50 animate-pulse",
|
|
7482
|
+
!isLow && "text-foreground",
|
|
7483
7483
|
className
|
|
7484
7484
|
),
|
|
7485
7485
|
children: formatTime(seconds, format)
|
|
@@ -7512,17 +7512,17 @@ function ResourceCounter({
|
|
|
7512
7512
|
"div",
|
|
7513
7513
|
{
|
|
7514
7514
|
className: cn(
|
|
7515
|
-
"inline-flex items-center rounded-
|
|
7516
|
-
"bg-
|
|
7515
|
+
"inline-flex items-center rounded-container",
|
|
7516
|
+
"bg-card/80 border border-muted font-medium text-foreground",
|
|
7517
7517
|
sizes.wrapper,
|
|
7518
7518
|
className
|
|
7519
7519
|
),
|
|
7520
7520
|
children: [
|
|
7521
7521
|
icon && /* @__PURE__ */ jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: icon }),
|
|
7522
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
7522
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label }),
|
|
7523
7523
|
/* @__PURE__ */ jsxs("span", { className: cn("font-bold tabular-nums", color), children: [
|
|
7524
7524
|
value,
|
|
7525
|
-
max != null && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
7525
|
+
max != null && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
7526
7526
|
"/",
|
|
7527
7527
|
max
|
|
7528
7528
|
] })
|
|
@@ -7563,18 +7563,18 @@ function ItemSlot({
|
|
|
7563
7563
|
disabled: !isClickable,
|
|
7564
7564
|
title: label,
|
|
7565
7565
|
className: cn(
|
|
7566
|
-
"relative flex items-center justify-center rounded-
|
|
7567
|
-
"bg-
|
|
7566
|
+
"relative flex items-center justify-center rounded-interactive border-2",
|
|
7567
|
+
"bg-card/80 transition-all duration-150",
|
|
7568
7568
|
sizeMap6[size],
|
|
7569
|
-
empty ? "border-
|
|
7569
|
+
empty ? "border-border bg-card/50" : rarityBorderMap[rarity],
|
|
7570
7570
|
!empty && rarityGlowMap[rarity],
|
|
7571
|
-
selected && "ring-2 ring-
|
|
7571
|
+
selected && "ring-2 ring-foreground ring-offset-1 ring-offset-background",
|
|
7572
7572
|
isClickable && !empty && "hover:brightness-125 cursor-pointer",
|
|
7573
|
-
isClickable && empty && "hover:border-
|
|
7573
|
+
isClickable && empty && "hover:border-muted cursor-pointer",
|
|
7574
7574
|
!isClickable && "cursor-default",
|
|
7575
7575
|
className
|
|
7576
7576
|
),
|
|
7577
|
-
children: empty ? /* @__PURE__ */ jsx("span", { className: "text-
|
|
7577
|
+
children: empty ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-base", children: "+" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7578
7578
|
icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: icon }),
|
|
7579
7579
|
quantity != null && quantity > 1 && /* @__PURE__ */ jsx(
|
|
7580
7580
|
"span",
|
|
@@ -7582,7 +7582,7 @@ function ItemSlot({
|
|
|
7582
7582
|
className: cn(
|
|
7583
7583
|
"absolute -bottom-1 -right-1 flex items-center justify-center",
|
|
7584
7584
|
"min-w-[18px] h-[18px] rounded-full px-1",
|
|
7585
|
-
"bg-
|
|
7585
|
+
"bg-surface border border-muted text-xs font-bold text-foreground"
|
|
7586
7586
|
),
|
|
7587
7587
|
children: quantity
|
|
7588
7588
|
}
|
|
@@ -7602,18 +7602,18 @@ var init_ItemSlot = __esm({
|
|
|
7602
7602
|
lg: "w-18 h-18 text-3xl"
|
|
7603
7603
|
};
|
|
7604
7604
|
rarityBorderMap = {
|
|
7605
|
-
common: "border-
|
|
7606
|
-
uncommon: "border-
|
|
7607
|
-
rare: "border-
|
|
7608
|
-
epic: "border-
|
|
7609
|
-
legendary: "border-
|
|
7605
|
+
common: "border-muted",
|
|
7606
|
+
uncommon: "border-success",
|
|
7607
|
+
rare: "border-info",
|
|
7608
|
+
epic: "border-accent",
|
|
7609
|
+
legendary: "border-warning"
|
|
7610
7610
|
};
|
|
7611
7611
|
rarityGlowMap = {
|
|
7612
7612
|
common: "",
|
|
7613
7613
|
uncommon: "",
|
|
7614
|
-
rare: "shadow-
|
|
7615
|
-
epic: "shadow-
|
|
7616
|
-
legendary: "shadow-
|
|
7614
|
+
rare: "shadow-sm",
|
|
7615
|
+
epic: "shadow-lg",
|
|
7616
|
+
legendary: "shadow-lg"
|
|
7617
7617
|
};
|
|
7618
7618
|
ItemSlot.displayName = "ItemSlot";
|
|
7619
7619
|
}
|
|
@@ -7631,8 +7631,8 @@ function TurnIndicator({
|
|
|
7631
7631
|
"div",
|
|
7632
7632
|
{
|
|
7633
7633
|
className: cn(
|
|
7634
|
-
"inline-flex items-center rounded-
|
|
7635
|
-
"bg-
|
|
7634
|
+
"inline-flex items-center rounded-container",
|
|
7635
|
+
"bg-card/80 border border-muted font-medium text-foreground",
|
|
7636
7636
|
sizes.wrapper,
|
|
7637
7637
|
className
|
|
7638
7638
|
),
|
|
@@ -7640,19 +7640,19 @@ function TurnIndicator({
|
|
|
7640
7640
|
/* @__PURE__ */ jsxs("span", { className: "font-bold tabular-nums", children: [
|
|
7641
7641
|
"Turn ",
|
|
7642
7642
|
currentTurn,
|
|
7643
|
-
maxTurns != null && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
7643
|
+
maxTurns != null && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
7644
7644
|
"/",
|
|
7645
7645
|
maxTurns
|
|
7646
7646
|
] })
|
|
7647
7647
|
] }),
|
|
7648
7648
|
phase && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7649
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
7650
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
7649
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "|" }),
|
|
7650
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: phase })
|
|
7651
7651
|
] }),
|
|
7652
7652
|
activeTeam && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7653
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
7654
|
-
/* @__PURE__ */ jsx("span", { className: cn("rounded-full bg-
|
|
7655
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
7653
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "|" }),
|
|
7654
|
+
/* @__PURE__ */ jsx("span", { className: cn("rounded-full bg-success/20", sizes.dot) }),
|
|
7655
|
+
/* @__PURE__ */ jsx("span", { className: "text-success", children: activeTeam })
|
|
7656
7656
|
] })
|
|
7657
7657
|
]
|
|
7658
7658
|
}
|
|
@@ -7671,10 +7671,10 @@ var init_TurnIndicator = __esm({
|
|
|
7671
7671
|
}
|
|
7672
7672
|
});
|
|
7673
7673
|
function getComboIntensity(combo) {
|
|
7674
|
-
if (combo >= 10) return "text-
|
|
7675
|
-
if (combo >= 7) return "text-
|
|
7676
|
-
if (combo >= 4) return "text-
|
|
7677
|
-
return "text-
|
|
7674
|
+
if (combo >= 10) return "text-error animate-pulse";
|
|
7675
|
+
if (combo >= 7) return "text-warning";
|
|
7676
|
+
if (combo >= 4) return "text-warning";
|
|
7677
|
+
return "text-foreground";
|
|
7678
7678
|
}
|
|
7679
7679
|
function getComboScale(combo) {
|
|
7680
7680
|
if (combo >= 10) return "scale-110";
|
|
@@ -7695,19 +7695,19 @@ function ComboCounter({
|
|
|
7695
7695
|
{
|
|
7696
7696
|
className: cn(
|
|
7697
7697
|
"inline-flex flex-col items-center justify-center",
|
|
7698
|
-
"rounded-
|
|
7698
|
+
"rounded-container bg-card/80 border border-muted px-3 py-1.5",
|
|
7699
7699
|
"transition-transform duration-200",
|
|
7700
7700
|
getComboScale(combo),
|
|
7701
7701
|
className
|
|
7702
7702
|
),
|
|
7703
7703
|
children: [
|
|
7704
7704
|
/* @__PURE__ */ jsx("span", { className: cn("font-black tabular-nums leading-none", sizes.combo, getComboIntensity(combo)), children: combo }),
|
|
7705
|
-
/* @__PURE__ */ jsx("span", { className: cn("font-bold uppercase tracking-wider text-
|
|
7706
|
-
multiplier != null && multiplier > 1 && /* @__PURE__ */ jsxs("span", { className: cn("font-bold text-
|
|
7705
|
+
/* @__PURE__ */ jsx("span", { className: cn("font-bold uppercase tracking-wider text-muted-foreground", sizes.label), children: "combo" }),
|
|
7706
|
+
multiplier != null && multiplier > 1 && /* @__PURE__ */ jsxs("span", { className: cn("font-bold text-warning tabular-nums", sizes.multiplier), children: [
|
|
7707
7707
|
"x",
|
|
7708
7708
|
multiplier.toFixed(1)
|
|
7709
7709
|
] }),
|
|
7710
|
-
streak != null && streak > 0 && /* @__PURE__ */ jsxs("span", { className: cn("text-
|
|
7710
|
+
streak != null && streak > 0 && /* @__PURE__ */ jsxs("span", { className: cn("text-muted-foreground tabular-nums", sizes.label), children: [
|
|
7711
7711
|
streak,
|
|
7712
7712
|
" streak"
|
|
7713
7713
|
] })
|
|
@@ -7743,8 +7743,8 @@ function XPBar({
|
|
|
7743
7743
|
"span",
|
|
7744
7744
|
{
|
|
7745
7745
|
className: cn(
|
|
7746
|
-
"flex-shrink-0 rounded-
|
|
7747
|
-
"bg-
|
|
7746
|
+
"flex-shrink-0 rounded-interactive font-bold",
|
|
7747
|
+
"bg-accent text-foreground border border-accent",
|
|
7748
7748
|
sizes.badge
|
|
7749
7749
|
),
|
|
7750
7750
|
children: [
|
|
@@ -7758,7 +7758,7 @@ function XPBar({
|
|
|
7758
7758
|
"div",
|
|
7759
7759
|
{
|
|
7760
7760
|
className: cn(
|
|
7761
|
-
"relative w-full overflow-hidden rounded-full bg-
|
|
7761
|
+
"relative w-full overflow-hidden rounded-full bg-muted border border-muted",
|
|
7762
7762
|
sizes.bar
|
|
7763
7763
|
),
|
|
7764
7764
|
children: /* @__PURE__ */ jsx(
|
|
@@ -7766,7 +7766,7 @@ function XPBar({
|
|
|
7766
7766
|
{
|
|
7767
7767
|
className: cn(
|
|
7768
7768
|
"absolute inset-y-0 left-0 rounded-full",
|
|
7769
|
-
"bg-gradient-to-r from-
|
|
7769
|
+
"bg-gradient-to-r from-accent to-info",
|
|
7770
7770
|
animated && "transition-all duration-500 ease-out"
|
|
7771
7771
|
),
|
|
7772
7772
|
style: { width: `${percentage}%` }
|
|
@@ -7774,7 +7774,7 @@ function XPBar({
|
|
|
7774
7774
|
)
|
|
7775
7775
|
}
|
|
7776
7776
|
),
|
|
7777
|
-
showLabel && /* @__PURE__ */ jsxs("span", { className: cn("text-
|
|
7777
|
+
showLabel && /* @__PURE__ */ jsxs("span", { className: cn("text-muted-foreground tabular-nums", sizes.text), children: [
|
|
7778
7778
|
current,
|
|
7779
7779
|
" / ",
|
|
7780
7780
|
max,
|
|
@@ -7810,7 +7810,7 @@ function WaypointMarker({
|
|
|
7810
7810
|
"div",
|
|
7811
7811
|
{
|
|
7812
7812
|
className: cn(
|
|
7813
|
-
"absolute rounded-full border-2 border-
|
|
7813
|
+
"absolute rounded-full border-2 border-info animate-ping opacity-50",
|
|
7814
7814
|
sizes.ring
|
|
7815
7815
|
)
|
|
7816
7816
|
}
|
|
@@ -7819,7 +7819,7 @@ function WaypointMarker({
|
|
|
7819
7819
|
"div",
|
|
7820
7820
|
{
|
|
7821
7821
|
className: cn(
|
|
7822
|
-
"absolute rounded-full border-2 border-
|
|
7822
|
+
"absolute rounded-full border-2 border-info",
|
|
7823
7823
|
sizes.ring
|
|
7824
7824
|
)
|
|
7825
7825
|
}
|
|
@@ -7830,9 +7830,9 @@ function WaypointMarker({
|
|
|
7830
7830
|
className: cn(
|
|
7831
7831
|
"relative flex items-center justify-center rounded-full transition-all duration-200",
|
|
7832
7832
|
sizes.dot,
|
|
7833
|
-
completed && "bg-
|
|
7834
|
-
active && !completed && "bg-
|
|
7835
|
-
!active && !completed && "bg-
|
|
7833
|
+
completed && "bg-success text-foreground",
|
|
7834
|
+
active && !completed && "bg-info text-foreground",
|
|
7835
|
+
!active && !completed && "bg-muted"
|
|
7836
7836
|
),
|
|
7837
7837
|
children: completed ? checkIcon : icon
|
|
7838
7838
|
}
|
|
@@ -7844,7 +7844,7 @@ function WaypointMarker({
|
|
|
7844
7844
|
className: cn(
|
|
7845
7845
|
"text-center whitespace-nowrap",
|
|
7846
7846
|
sizes.label,
|
|
7847
|
-
completed ? "text-
|
|
7847
|
+
completed ? "text-success" : active ? "text-info" : "text-muted-foreground"
|
|
7848
7848
|
),
|
|
7849
7849
|
children: label
|
|
7850
7850
|
}
|
|
@@ -7885,7 +7885,7 @@ function StatusEffect({
|
|
|
7885
7885
|
"div",
|
|
7886
7886
|
{
|
|
7887
7887
|
className: cn(
|
|
7888
|
-
"relative flex items-center justify-center rounded border-2",
|
|
7888
|
+
"relative flex items-center justify-center rounded-interactive border-2",
|
|
7889
7889
|
sizes.container,
|
|
7890
7890
|
variantStyles7[variant]
|
|
7891
7891
|
),
|
|
@@ -7896,7 +7896,7 @@ function StatusEffect({
|
|
|
7896
7896
|
"span",
|
|
7897
7897
|
{
|
|
7898
7898
|
className: cn(
|
|
7899
|
-
"absolute bottom-0 left-0 right-0 text-center font-mono font-bold text-
|
|
7899
|
+
"absolute bottom-0 left-0 right-0 text-center font-mono font-bold text-foreground bg-background/60 leading-tight",
|
|
7900
7900
|
sizes.timer
|
|
7901
7901
|
),
|
|
7902
7902
|
children: formatDuration(duration)
|
|
@@ -7909,7 +7909,7 @@ function StatusEffect({
|
|
|
7909
7909
|
"span",
|
|
7910
7910
|
{
|
|
7911
7911
|
className: cn(
|
|
7912
|
-
"absolute flex items-center justify-center rounded-full bg-
|
|
7912
|
+
"absolute flex items-center justify-center rounded-full bg-card text-foreground font-bold leading-none",
|
|
7913
7913
|
sizes.badge
|
|
7914
7914
|
),
|
|
7915
7915
|
children: stacks
|
|
@@ -7928,9 +7928,9 @@ var init_StatusEffect = __esm({
|
|
|
7928
7928
|
lg: { container: "w-12 h-12", icon: "text-lg", badge: "text-sm -top-1.5 -right-1.5 w-6 h-6", timer: "text-xs" }
|
|
7929
7929
|
};
|
|
7930
7930
|
variantStyles7 = {
|
|
7931
|
-
buff: "border-
|
|
7932
|
-
debuff: "border-
|
|
7933
|
-
neutral: "border-
|
|
7931
|
+
buff: "border-success bg-success/20",
|
|
7932
|
+
debuff: "border-error bg-error/20",
|
|
7933
|
+
neutral: "border-muted bg-muted/20"
|
|
7934
7934
|
};
|
|
7935
7935
|
StatusEffect.displayName = "StatusEffect";
|
|
7936
7936
|
}
|
|
@@ -7969,10 +7969,10 @@ var init_DamageNumber = __esm({
|
|
|
7969
7969
|
lg: "text-2xl"
|
|
7970
7970
|
};
|
|
7971
7971
|
typeStyles = {
|
|
7972
|
-
damage: "text-
|
|
7973
|
-
heal: "text-
|
|
7974
|
-
crit: "text-
|
|
7975
|
-
miss: "text-
|
|
7972
|
+
damage: "text-error font-bold",
|
|
7973
|
+
heal: "text-success font-bold",
|
|
7974
|
+
crit: "text-warning font-extrabold",
|
|
7975
|
+
miss: "text-muted-foreground italic"
|
|
7976
7976
|
};
|
|
7977
7977
|
floatKeyframes = `
|
|
7978
7978
|
@keyframes damageFloat {
|
|
@@ -7995,12 +7995,12 @@ function DialogueBubble({
|
|
|
7995
7995
|
"div",
|
|
7996
7996
|
{
|
|
7997
7997
|
className: cn(
|
|
7998
|
-
"flex items-start gap-3 rounded-
|
|
7998
|
+
"flex items-start gap-3 rounded-container bg-background/80 backdrop-blur-sm px-4 py-3 border border-border/10",
|
|
7999
7999
|
position === "top" ? "rounded-bl-none" : "rounded-tl-none",
|
|
8000
8000
|
className
|
|
8001
8001
|
),
|
|
8002
8002
|
children: [
|
|
8003
|
-
portrait && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-12 h-12 rounded-full overflow-hidden border-2 border-
|
|
8003
|
+
portrait && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-12 h-12 rounded-full overflow-hidden border-2 border-warning/60", children: /* @__PURE__ */ jsx(
|
|
8004
8004
|
"img",
|
|
8005
8005
|
{
|
|
8006
8006
|
src: portrait,
|
|
@@ -8009,8 +8009,8 @@ function DialogueBubble({
|
|
|
8009
8009
|
}
|
|
8010
8010
|
) }),
|
|
8011
8011
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 min-w-0", children: [
|
|
8012
|
-
speaker && /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-
|
|
8013
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm text-
|
|
8012
|
+
speaker && /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-warning", children: speaker }),
|
|
8013
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-foreground leading-relaxed", children: text })
|
|
8014
8014
|
] })
|
|
8015
8015
|
]
|
|
8016
8016
|
}
|
|
@@ -8037,7 +8037,7 @@ function ChoiceButton({
|
|
|
8037
8037
|
disabled,
|
|
8038
8038
|
onClick,
|
|
8039
8039
|
className: cn(
|
|
8040
|
-
"w-full text-left px-4 py-2.5 rounded-
|
|
8040
|
+
"w-full text-left px-4 py-2.5 rounded-interactive border transition-all duration-150",
|
|
8041
8041
|
"flex items-center gap-2",
|
|
8042
8042
|
selected ? "bg-accent/15 border-accent text-foreground" : "bg-muted/40 border-border text-foreground hover:bg-muted hover:border-border",
|
|
8043
8043
|
disabled && "opacity-40 cursor-not-allowed hover:bg-muted/40 hover:border-border",
|
|
@@ -8090,7 +8090,7 @@ function ActionButton({
|
|
|
8090
8090
|
disabled: isDisabled,
|
|
8091
8091
|
onClick,
|
|
8092
8092
|
className: cn(
|
|
8093
|
-
"relative inline-flex items-center gap-1.5 rounded-
|
|
8093
|
+
"relative inline-flex items-center gap-1.5 rounded-interactive border font-medium overflow-hidden transition-colors duration-150",
|
|
8094
8094
|
sizes.button,
|
|
8095
8095
|
variantStyles8[variant],
|
|
8096
8096
|
isDisabled && "opacity-60 cursor-not-allowed",
|
|
@@ -8133,9 +8133,9 @@ var init_ActionButton = __esm({
|
|
|
8133
8133
|
init_cn();
|
|
8134
8134
|
init_Icon();
|
|
8135
8135
|
sizeMap13 = {
|
|
8136
|
-
sm: { button: "px-3
|
|
8137
|
-
md: { button: "px-4
|
|
8138
|
-
lg: { button: "
|
|
8136
|
+
sm: { button: "h-button-sm px-3 text-xs", hotkey: "text-[9px] px-1", icon: "text-xs" },
|
|
8137
|
+
md: { button: "h-button-md px-4 text-sm", hotkey: "text-xs px-1.5", icon: "text-sm" },
|
|
8138
|
+
lg: { button: "h-button-lg px-5 text-base", hotkey: "text-xs px-2", icon: "text-base" }
|
|
8139
8139
|
};
|
|
8140
8140
|
variantStyles8 = {
|
|
8141
8141
|
primary: "bg-primary text-primary-foreground hover:bg-primary-hover border-primary",
|
|
@@ -8215,7 +8215,7 @@ function MiniMap({
|
|
|
8215
8215
|
"div",
|
|
8216
8216
|
{
|
|
8217
8217
|
className: cn(
|
|
8218
|
-
"relative inline-block border border-
|
|
8218
|
+
"relative inline-block border border-border/20 rounded-container",
|
|
8219
8219
|
className
|
|
8220
8220
|
),
|
|
8221
8221
|
children: /* @__PURE__ */ jsx(
|
|
@@ -10800,7 +10800,7 @@ function ActionTile({
|
|
|
10800
10800
|
{
|
|
10801
10801
|
display: "flex",
|
|
10802
10802
|
className: cn(
|
|
10803
|
-
"flex-col items-center gap-1 rounded-
|
|
10803
|
+
"flex-col items-center gap-1 rounded-container border-2 transition-all select-none",
|
|
10804
10804
|
config.px,
|
|
10805
10805
|
disabled ? "opacity-40 cursor-not-allowed border-border bg-muted" : "cursor-grab active:cursor-grabbing hover:scale-105 hover:shadow-md border-border bg-card",
|
|
10806
10806
|
className
|
|
@@ -12112,12 +12112,12 @@ function IsometricCanvas({
|
|
|
12112
12112
|
return /* @__PURE__ */ jsx(
|
|
12113
12113
|
Box,
|
|
12114
12114
|
{
|
|
12115
|
-
className: cn("relative w-full overflow-hidden rounded-
|
|
12115
|
+
className: cn("relative w-full overflow-hidden rounded-container", className),
|
|
12116
12116
|
style: { height: viewportSize.height },
|
|
12117
12117
|
"data-testid": "game-canvas-empty",
|
|
12118
|
-
children: /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center h-full bg-[var(--color-card)] rounded-
|
|
12118
|
+
children: /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center h-full bg-[var(--color-card)] rounded-container", children: /* @__PURE__ */ jsxs(Stack, { direction: "vertical", gap: "md", align: "center", children: [
|
|
12119
12119
|
/* @__PURE__ */ jsx(Icon, { name: "map", size: "xl" }),
|
|
12120
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-
|
|
12120
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-muted-foreground", children: t("canvas.emptyMessage") || "No map data loaded" })
|
|
12121
12121
|
] }) })
|
|
12122
12122
|
}
|
|
12123
12123
|
);
|
|
@@ -12515,19 +12515,19 @@ function BattleBoard({
|
|
|
12515
12515
|
}
|
|
12516
12516
|
)
|
|
12517
12517
|
] }),
|
|
12518
|
-
gameResult && (gameOverOverlay ? gameOverOverlay(ctx) : /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 z-50 flex items-center justify-center bg-
|
|
12518
|
+
gameResult && (gameOverOverlay ? gameOverOverlay(ctx) : /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 z-50 flex items-center justify-center bg-background/70 backdrop-blur-sm rounded-container", children: /* @__PURE__ */ jsxs(VStack, { className: "text-center p-8", gap: "lg", children: [
|
|
12519
12519
|
/* @__PURE__ */ jsx(
|
|
12520
12520
|
Typography,
|
|
12521
12521
|
{
|
|
12522
12522
|
variant: "h2",
|
|
12523
12523
|
className: cn(
|
|
12524
12524
|
"text-4xl font-black tracking-widest uppercase",
|
|
12525
|
-
gameResult === "victory" ? "text-
|
|
12525
|
+
gameResult === "victory" ? "text-warning" : "text-error"
|
|
12526
12526
|
),
|
|
12527
12527
|
children: gameResult === "victory" ? t("battle.victory") : t("battle.defeat")
|
|
12528
12528
|
}
|
|
12529
12529
|
),
|
|
12530
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "body1", className: "text-
|
|
12530
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body1", className: "text-muted-foreground", children: [
|
|
12531
12531
|
t("battle.turnsPlayed"),
|
|
12532
12532
|
": ",
|
|
12533
12533
|
currentTurn
|
|
@@ -17354,7 +17354,7 @@ function BuilderBoard({
|
|
|
17354
17354
|
backgroundPosition: "center"
|
|
17355
17355
|
},
|
|
17356
17356
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
17357
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
17357
|
+
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-container", children: /* @__PURE__ */ jsx("img", { src: entity.headerImage, alt: "", onError: () => setHeaderError(true), className: "w-full h-full object-cover" }) }) : entity.headerImage && headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 rounded-container bg-gradient-to-br from-muted to-accent opacity-60" }) : null,
|
|
17358
17358
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
17359
17359
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", weight: "bold", children: entity.title }),
|
|
17360
17360
|
/* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.description })
|
|
@@ -17392,7 +17392,7 @@ function BuilderBoard({
|
|
|
17392
17392
|
{
|
|
17393
17393
|
gap: "sm",
|
|
17394
17394
|
align: "center",
|
|
17395
|
-
className: `p-3 border-2 rounded ${result ? result.correct ? "border-
|
|
17395
|
+
className: `p-3 border-2 rounded ${result ? result.correct ? "border-success" : "border-error" : selectedComponent ? "border-dashed border-foreground cursor-pointer" : "border-border"}`,
|
|
17396
17396
|
onClick: () => handlePlaceComponent(slot.id),
|
|
17397
17397
|
children: [
|
|
17398
17398
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1", children: [
|
|
@@ -17407,7 +17407,7 @@ function BuilderBoard({
|
|
|
17407
17407
|
] }) : null,
|
|
17408
17408
|
placedComp.label
|
|
17409
17409
|
] }),
|
|
17410
|
-
result && /* @__PURE__ */ jsx(Icon, { icon: result.correct ? CheckCircle : XCircle, size: "sm", className: result.correct ? "text-
|
|
17410
|
+
result && /* @__PURE__ */ jsx(Icon, { icon: result.correct ? CheckCircle : XCircle, size: "sm", className: result.correct ? "text-success" : "text-error" })
|
|
17411
17411
|
] }) : /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: t("builder.empty") })
|
|
17412
17412
|
]
|
|
17413
17413
|
},
|
|
@@ -17416,10 +17416,10 @@ function BuilderBoard({
|
|
|
17416
17416
|
}) })
|
|
17417
17417
|
] }) }),
|
|
17418
17418
|
submitted && /* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", children: [
|
|
17419
|
-
/* @__PURE__ */ jsx(Icon, { icon: allCorrect ? CheckCircle : XCircle, size: "lg", className: allCorrect ? "text-
|
|
17419
|
+
/* @__PURE__ */ jsx(Icon, { icon: allCorrect ? CheckCircle : XCircle, size: "lg", className: allCorrect ? "text-success" : "text-error" }),
|
|
17420
17420
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "bold", children: allCorrect ? entity.successMessage ?? t("builder.success") : entity.failMessage ?? t("builder.incorrect") })
|
|
17421
17421
|
] }) }),
|
|
17422
|
-
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
17422
|
+
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-warning", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.hint }) }),
|
|
17423
17423
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "center", children: [
|
|
17424
17424
|
!submitted ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleSubmit, disabled: !allPlaced, children: [
|
|
17425
17425
|
/* @__PURE__ */ jsx(Icon, { icon: Wrench, size: "sm" }),
|
|
@@ -18974,7 +18974,7 @@ function CanvasEffectEngine({
|
|
|
18974
18974
|
flash && /* @__PURE__ */ jsx(
|
|
18975
18975
|
Box,
|
|
18976
18976
|
{
|
|
18977
|
-
className: "absolute inset-0 z-20 pointer-events-none rounded-
|
|
18977
|
+
className: "absolute inset-0 z-20 pointer-events-none rounded-container",
|
|
18978
18978
|
style: { backgroundColor: flash.color, opacity: flash.alpha }
|
|
18979
18979
|
}
|
|
18980
18980
|
),
|
|
@@ -19042,7 +19042,7 @@ function EmojiEffect({
|
|
|
19042
19042
|
/* @__PURE__ */ jsx(
|
|
19043
19043
|
Box,
|
|
19044
19044
|
{
|
|
19045
|
-
className: "absolute rounded-
|
|
19045
|
+
className: "absolute rounded-pill animate-ping",
|
|
19046
19046
|
style: {
|
|
19047
19047
|
width: 48 * intensity,
|
|
19048
19048
|
height: 48 * intensity,
|
|
@@ -20859,7 +20859,7 @@ function ClassifierBoard({
|
|
|
20859
20859
|
backgroundPosition: "center"
|
|
20860
20860
|
},
|
|
20861
20861
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
20862
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
20862
|
+
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-container", children: /* @__PURE__ */ jsx("img", { src: entity.headerImage, alt: "", onError: () => setHeaderError(true), className: "w-full h-full object-cover" }) }) : entity.headerImage && headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 rounded-container bg-gradient-to-br from-muted to-accent opacity-60" }) : null,
|
|
20863
20863
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
20864
20864
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", weight: "bold", children: entity.title }),
|
|
20865
20865
|
/* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.description })
|
|
@@ -20874,7 +20874,7 @@ function ClassifierBoard({
|
|
|
20874
20874
|
/* @__PURE__ */ jsx(VStack, { gap: "md", children: categories.map((cat) => {
|
|
20875
20875
|
const catItems = items.filter((item) => assignments[item.id] === cat.id);
|
|
20876
20876
|
return /* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
20877
|
-
cat.imageUrl && /* @__PURE__ */ jsx(Box, { className: "w-full h-16 overflow-hidden rounded-
|
|
20877
|
+
cat.imageUrl && /* @__PURE__ */ jsx(Box, { className: "w-full h-16 overflow-hidden rounded-container", children: /* @__PURE__ */ jsx("img", { src: cat.imageUrl, alt: "", className: "w-full h-full object-cover" }) }),
|
|
20878
20878
|
/* @__PURE__ */ jsxs(HStack, { justify: "between", align: "center", children: [
|
|
20879
20879
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "bold", children: cat.label }),
|
|
20880
20880
|
/* @__PURE__ */ jsx(Badge, { size: "sm", children: catItems.length })
|
|
@@ -20885,12 +20885,12 @@ function ClassifierBoard({
|
|
|
20885
20885
|
Badge,
|
|
20886
20886
|
{
|
|
20887
20887
|
size: "sm",
|
|
20888
|
-
className: `cursor-pointer ${result ? result.correct ? "border-
|
|
20888
|
+
className: `cursor-pointer ${result ? result.correct ? "border-success bg-success/10" : "border-error bg-error/10" : ""}`,
|
|
20889
20889
|
onClick: () => handleUnassign(item.id),
|
|
20890
20890
|
children: [
|
|
20891
20891
|
item.iconUrl && /* @__PURE__ */ jsx("img", { src: item.iconUrl, alt: "", className: "w-3 h-3 object-contain inline-block" }),
|
|
20892
20892
|
item.label,
|
|
20893
|
-
result && /* @__PURE__ */ jsx(Icon, { icon: result.correct ? CheckCircle : XCircle, size: "xs", className: result.correct ? "text-
|
|
20893
|
+
result && /* @__PURE__ */ jsx(Icon, { icon: result.correct ? CheckCircle : XCircle, size: "xs", className: result.correct ? "text-success" : "text-error" })
|
|
20894
20894
|
]
|
|
20895
20895
|
},
|
|
20896
20896
|
item.id
|
|
@@ -20913,11 +20913,11 @@ function ClassifierBoard({
|
|
|
20913
20913
|
] }) }, cat.id);
|
|
20914
20914
|
}) }),
|
|
20915
20915
|
submitted && /* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", children: [
|
|
20916
|
-
/* @__PURE__ */ jsx(Icon, { icon: allCorrect ? CheckCircle : XCircle, size: "lg", className: allCorrect ? "text-
|
|
20916
|
+
/* @__PURE__ */ jsx(Icon, { icon: allCorrect ? CheckCircle : XCircle, size: "lg", className: allCorrect ? "text-success" : "text-error" }),
|
|
20917
20917
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "bold", children: allCorrect ? entity.successMessage ?? t("classifier.allCorrect") : `${correctCount}/${items.length} ${t("classifier.correct")}` }),
|
|
20918
20918
|
!allCorrect && entity.failMessage && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-muted-foreground", children: entity.failMessage })
|
|
20919
20919
|
] }) }),
|
|
20920
|
-
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
20920
|
+
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-warning", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.hint }) }),
|
|
20921
20921
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "center", children: [
|
|
20922
20922
|
!submitted ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleSubmit, disabled: !allAssigned, children: [
|
|
20923
20923
|
/* @__PURE__ */ jsx(Icon, { icon: Send, size: "sm" }),
|
|
@@ -21965,7 +21965,7 @@ function CraftingRecipe({
|
|
|
21965
21965
|
Box,
|
|
21966
21966
|
{
|
|
21967
21967
|
className: cn(
|
|
21968
|
-
"flex flex-wrap items-center gap-3 rounded-
|
|
21968
|
+
"flex flex-wrap items-center gap-3 rounded-container bg-muted/50 border border-border/50 p-3",
|
|
21969
21969
|
className
|
|
21970
21970
|
),
|
|
21971
21971
|
children: [
|
|
@@ -21982,10 +21982,10 @@ function CraftingRecipe({
|
|
|
21982
21982
|
className: cn(!hasSufficient && "opacity-50")
|
|
21983
21983
|
}
|
|
21984
21984
|
) }),
|
|
21985
|
-
index < inputs.length - 1 && /* @__PURE__ */ jsx(Icon, { name: "plus", size: "sm", className: "text-
|
|
21985
|
+
index < inputs.length - 1 && /* @__PURE__ */ jsx(Icon, { name: "plus", size: "sm", className: "text-muted-foreground" })
|
|
21986
21986
|
] }, index);
|
|
21987
21987
|
}) }),
|
|
21988
|
-
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: "md", className: "text-
|
|
21988
|
+
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: "md", className: "text-muted-foreground" }),
|
|
21989
21989
|
/* @__PURE__ */ jsx(
|
|
21990
21990
|
ItemSlot,
|
|
21991
21991
|
{
|
|
@@ -22073,7 +22073,7 @@ function DPad({
|
|
|
22073
22073
|
createButton("up"),
|
|
22074
22074
|
/* @__PURE__ */ jsx("div", {}),
|
|
22075
22075
|
createButton("left"),
|
|
22076
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-
|
|
22076
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-interactive bg-muted border-2 border-muted-foreground" }) }),
|
|
22077
22077
|
createButton("right"),
|
|
22078
22078
|
/* @__PURE__ */ jsx("div", {}),
|
|
22079
22079
|
createButton("down"),
|
|
@@ -26180,7 +26180,7 @@ function StatBadge({
|
|
|
26180
26180
|
"div",
|
|
26181
26181
|
{
|
|
26182
26182
|
className: cn(
|
|
26183
|
-
"inline-flex items-center gap-2 rounded-
|
|
26183
|
+
"inline-flex items-center gap-2 rounded-container border backdrop-blur-sm",
|
|
26184
26184
|
sizeMap17[size] ?? sizeMap17.md,
|
|
26185
26185
|
variantMap2[variant] ?? variantMap2.default,
|
|
26186
26186
|
className
|
|
@@ -26326,10 +26326,10 @@ function QuestTracker({
|
|
|
26326
26326
|
Box,
|
|
26327
26327
|
{
|
|
26328
26328
|
className: cn(
|
|
26329
|
-
"flex items-start gap-3 rounded-
|
|
26330
|
-
isActive && !isCompleted && "bg-
|
|
26331
|
-
isCompleted && "bg-
|
|
26332
|
-
!isActive && !isCompleted && "bg-
|
|
26329
|
+
"flex items-start gap-3 rounded-container px-3 py-2 transition-colors",
|
|
26330
|
+
isActive && !isCompleted && "bg-info/20 border border-info/50",
|
|
26331
|
+
isCompleted && "bg-success/10 border border-success/30 opacity-70",
|
|
26332
|
+
!isActive && !isCompleted && "bg-muted/30 border border-border/30"
|
|
26333
26333
|
),
|
|
26334
26334
|
children: [
|
|
26335
26335
|
/* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 pt-0.5", children: /* @__PURE__ */ jsx(
|
|
@@ -26347,9 +26347,9 @@ function QuestTracker({
|
|
|
26347
26347
|
variant: "body2",
|
|
26348
26348
|
className: cn(
|
|
26349
26349
|
"font-medium truncate",
|
|
26350
|
-
isCompleted && "line-through text-
|
|
26351
|
-
isActive && !isCompleted && "text-
|
|
26352
|
-
!isActive && !isCompleted && "text-
|
|
26350
|
+
isCompleted && "line-through text-muted-foreground",
|
|
26351
|
+
isActive && !isCompleted && "text-info",
|
|
26352
|
+
!isActive && !isCompleted && "text-muted-foreground"
|
|
26353
26353
|
),
|
|
26354
26354
|
children: quest.title
|
|
26355
26355
|
}
|
|
@@ -26367,7 +26367,7 @@ function QuestTracker({
|
|
|
26367
26367
|
Typography,
|
|
26368
26368
|
{
|
|
26369
26369
|
variant: "caption",
|
|
26370
|
-
className: "text-
|
|
26370
|
+
className: "text-muted-foreground mt-1",
|
|
26371
26371
|
children: [
|
|
26372
26372
|
quest.progress,
|
|
26373
26373
|
" / ",
|
|
@@ -26424,14 +26424,14 @@ function PowerupSlots({
|
|
|
26424
26424
|
{
|
|
26425
26425
|
className: cn(
|
|
26426
26426
|
"absolute -bottom-1 left-1/2 -translate-x-1/2",
|
|
26427
|
-
"rounded px-1 py-px",
|
|
26428
|
-
"bg-
|
|
26427
|
+
"rounded-interactive px-1 py-px",
|
|
26428
|
+
"bg-background/80 border border-border"
|
|
26429
26429
|
),
|
|
26430
26430
|
children: /* @__PURE__ */ jsx(
|
|
26431
26431
|
Typography,
|
|
26432
26432
|
{
|
|
26433
26433
|
variant: "caption",
|
|
26434
|
-
className: "text-[9px] font-mono font-bold text-
|
|
26434
|
+
className: "text-[9px] font-mono font-bold text-warning whitespace-nowrap",
|
|
26435
26435
|
children: formatTime2(powerup.remainingTime)
|
|
26436
26436
|
}
|
|
26437
26437
|
)
|
|
@@ -26464,6 +26464,8 @@ function GameCanvas2D({
|
|
|
26464
26464
|
height = 600,
|
|
26465
26465
|
onDraw,
|
|
26466
26466
|
onTick,
|
|
26467
|
+
tickEvent,
|
|
26468
|
+
drawEvent,
|
|
26467
26469
|
fps = 60,
|
|
26468
26470
|
className
|
|
26469
26471
|
}) {
|
|
@@ -26471,10 +26473,17 @@ function GameCanvas2D({
|
|
|
26471
26473
|
const rafRef = React85.useRef(0);
|
|
26472
26474
|
const frameRef = React85.useRef(0);
|
|
26473
26475
|
const lastTimeRef = React85.useRef(0);
|
|
26476
|
+
const emit = useEmitEvent();
|
|
26474
26477
|
const onDrawRef = React85.useRef(onDraw);
|
|
26475
26478
|
onDrawRef.current = onDraw;
|
|
26476
26479
|
const onTickRef = React85.useRef(onTick);
|
|
26477
26480
|
onTickRef.current = onTick;
|
|
26481
|
+
const tickEventRef = React85.useRef(tickEvent);
|
|
26482
|
+
tickEventRef.current = tickEvent;
|
|
26483
|
+
const drawEventRef = React85.useRef(drawEvent);
|
|
26484
|
+
drawEventRef.current = drawEvent;
|
|
26485
|
+
const emitRef = React85.useRef(emit);
|
|
26486
|
+
emitRef.current = emit;
|
|
26478
26487
|
React85.useEffect(() => {
|
|
26479
26488
|
const canvas = canvasRef.current;
|
|
26480
26489
|
if (!canvas) return;
|
|
@@ -26491,8 +26500,15 @@ function GameCanvas2D({
|
|
|
26491
26500
|
if (elapsed >= interval) {
|
|
26492
26501
|
const dt = elapsed / 1e3;
|
|
26493
26502
|
lastTimeRef.current = timestamp - elapsed % interval;
|
|
26503
|
+
const frame = frameRef.current;
|
|
26494
26504
|
onTickRef.current?.(dt);
|
|
26495
|
-
|
|
26505
|
+
if (tickEventRef.current) {
|
|
26506
|
+
emitRef.current(tickEventRef.current, { dt, frame });
|
|
26507
|
+
}
|
|
26508
|
+
onDrawRef.current?.(ctx, frame);
|
|
26509
|
+
if (drawEventRef.current) {
|
|
26510
|
+
emitRef.current(drawEventRef.current, { frame });
|
|
26511
|
+
}
|
|
26496
26512
|
frameRef.current += 1;
|
|
26497
26513
|
}
|
|
26498
26514
|
rafRef.current = requestAnimationFrame(loop);
|
|
@@ -26518,6 +26534,7 @@ var init_GameCanvas2D = __esm({
|
|
|
26518
26534
|
"use client";
|
|
26519
26535
|
init_cn();
|
|
26520
26536
|
init_Box();
|
|
26537
|
+
init_useEventBus();
|
|
26521
26538
|
GameCanvas2D.displayName = "GameCanvas2D";
|
|
26522
26539
|
}
|
|
26523
26540
|
});
|
|
@@ -26536,7 +26553,7 @@ function HealthPanel({
|
|
|
26536
26553
|
Box,
|
|
26537
26554
|
{
|
|
26538
26555
|
className: cn(
|
|
26539
|
-
"rounded-
|
|
26556
|
+
"rounded-container bg-[var(--color-card)]/90 border border-border backdrop-blur-sm",
|
|
26540
26557
|
sizes.padding,
|
|
26541
26558
|
className
|
|
26542
26559
|
),
|
|
@@ -26547,7 +26564,7 @@ function HealthPanel({
|
|
|
26547
26564
|
{
|
|
26548
26565
|
variant: "caption",
|
|
26549
26566
|
weight: "bold",
|
|
26550
|
-
className: "text-
|
|
26567
|
+
className: "text-muted-foreground uppercase tracking-wider",
|
|
26551
26568
|
children: label
|
|
26552
26569
|
}
|
|
26553
26570
|
),
|
|
@@ -26568,7 +26585,7 @@ function HealthPanel({
|
|
|
26568
26585
|
as: "span",
|
|
26569
26586
|
variant: "caption",
|
|
26570
26587
|
weight: "bold",
|
|
26571
|
-
className: "text-
|
|
26588
|
+
className: "text-info ml-1",
|
|
26572
26589
|
children: [
|
|
26573
26590
|
"+",
|
|
26574
26591
|
shield
|
|
@@ -26593,14 +26610,14 @@ function HealthPanel({
|
|
|
26593
26610
|
Box,
|
|
26594
26611
|
{
|
|
26595
26612
|
className: cn(
|
|
26596
|
-
"relative overflow-hidden rounded-
|
|
26613
|
+
"relative overflow-hidden rounded-container bg-muted",
|
|
26597
26614
|
size === "sm" ? "h-1" : size === "md" ? "h-1.5" : "h-2",
|
|
26598
26615
|
"w-full"
|
|
26599
26616
|
),
|
|
26600
26617
|
children: /* @__PURE__ */ jsx(
|
|
26601
26618
|
Box,
|
|
26602
26619
|
{
|
|
26603
|
-
className: "absolute inset-y-0 left-0 rounded-
|
|
26620
|
+
className: "absolute inset-y-0 left-0 rounded-container bg-info transition-all duration-300",
|
|
26604
26621
|
style: { width: `${Math.min(100, shield / max * 100)}%` }
|
|
26605
26622
|
}
|
|
26606
26623
|
)
|
|
@@ -26659,7 +26676,7 @@ function ScoreBoard({
|
|
|
26659
26676
|
Card,
|
|
26660
26677
|
{
|
|
26661
26678
|
className: cn(
|
|
26662
|
-
"bg-[var(--color-card)]/90 border-
|
|
26679
|
+
"bg-[var(--color-card)]/90 border-border backdrop-blur-sm",
|
|
26663
26680
|
className
|
|
26664
26681
|
),
|
|
26665
26682
|
children: /* @__PURE__ */ jsx(CardContent, { className: "p-3", children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3 flex-wrap", children: [
|
|
@@ -26776,7 +26793,7 @@ function TurnPanel({
|
|
|
26776
26793
|
Box,
|
|
26777
26794
|
{
|
|
26778
26795
|
className: cn(
|
|
26779
|
-
"flex items-center gap-3 rounded-
|
|
26796
|
+
"flex items-center gap-3 rounded-container bg-[var(--color-card)]/90 border border-border backdrop-blur-sm px-3 py-2",
|
|
26780
26797
|
className
|
|
26781
26798
|
),
|
|
26782
26799
|
children: [
|
|
@@ -26828,7 +26845,7 @@ function EnemyPlate({
|
|
|
26828
26845
|
Box,
|
|
26829
26846
|
{
|
|
26830
26847
|
className: cn(
|
|
26831
|
-
"inline-flex flex-col gap-1 rounded-
|
|
26848
|
+
"inline-flex flex-col gap-1 rounded-container bg-[var(--color-card)]/90 border border-border backdrop-blur-sm px-3 py-1.5",
|
|
26832
26849
|
"min-w-[120px]",
|
|
26833
26850
|
className
|
|
26834
26851
|
),
|
|
@@ -26922,7 +26939,7 @@ function UnitCommandBar({
|
|
|
26922
26939
|
Box,
|
|
26923
26940
|
{
|
|
26924
26941
|
className: cn(
|
|
26925
|
-
"flex items-center gap-1.5 rounded-
|
|
26942
|
+
"flex items-center gap-1.5 rounded-container bg-[var(--color-card)]/90 border border-border backdrop-blur-sm px-2 py-1.5",
|
|
26926
26943
|
className
|
|
26927
26944
|
),
|
|
26928
26945
|
children: commands.map((command, i) => /* @__PURE__ */ jsxs(Box, { className: "flex flex-col items-center gap-0.5", children: [
|
|
@@ -27007,8 +27024,8 @@ function GameHud({
|
|
|
27007
27024
|
className: cn(
|
|
27008
27025
|
"relative z-10",
|
|
27009
27026
|
positionMap[position],
|
|
27010
|
-
transparent && "bg-gradient-to-b from-
|
|
27011
|
-
position === "bottom" && "bg-gradient-to-t from-
|
|
27027
|
+
transparent && "bg-gradient-to-b from-background/50 to-transparent",
|
|
27028
|
+
position === "bottom" && "bg-gradient-to-t from-background/50 to-transparent",
|
|
27012
27029
|
className
|
|
27013
27030
|
),
|
|
27014
27031
|
children: /* @__PURE__ */ jsx("div", { className: "flex gap-4", children: stats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) })
|
|
@@ -27166,8 +27183,8 @@ function DialogueBox({
|
|
|
27166
27183
|
tabIndex: 0,
|
|
27167
27184
|
role: "dialog",
|
|
27168
27185
|
"aria-label": "Dialogue",
|
|
27169
|
-
children: /* @__PURE__ */ jsx("div", { className: "mx-4 my-4 bg-[var(--color-card)] bg-opacity-95 border-2 border-
|
|
27170
|
-
dialogue.portrait && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 p-4 border-r border-
|
|
27186
|
+
children: /* @__PURE__ */ jsx("div", { className: "mx-4 my-4 bg-[var(--color-card)] bg-opacity-95 border-2 border-border rounded-container overflow-hidden", children: /* @__PURE__ */ jsxs("div", { className: "flex", children: [
|
|
27187
|
+
dialogue.portrait && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 p-4 border-r border-border", children: /* @__PURE__ */ jsx(
|
|
27171
27188
|
"img",
|
|
27172
27189
|
{
|
|
27173
27190
|
src: dialogue.portrait,
|
|
@@ -27177,7 +27194,7 @@ function DialogueBox({
|
|
|
27177
27194
|
}
|
|
27178
27195
|
) }),
|
|
27179
27196
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 p-4", children: [
|
|
27180
|
-
/* @__PURE__ */ jsx("div", { className: "text-
|
|
27197
|
+
/* @__PURE__ */ jsx("div", { className: "text-warning font-bold mb-2", children: dialogue.speaker }),
|
|
27181
27198
|
/* @__PURE__ */ jsxs("div", { className: "text-[var(--color-foreground)] text-lg leading-relaxed min-h-[60px]", children: [
|
|
27182
27199
|
displayedText,
|
|
27183
27200
|
isTyping && /* @__PURE__ */ jsx("span", { className: "animate-pulse", children: "\u258C" })
|
|
@@ -27187,9 +27204,9 @@ function DialogueBox({
|
|
|
27187
27204
|
{
|
|
27188
27205
|
type: "button",
|
|
27189
27206
|
className: cn(
|
|
27190
|
-
"block w-full text-left px-4 py-2 rounded transition-colors",
|
|
27191
|
-
"hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-
|
|
27192
|
-
selectedChoice === index ? "bg-[var(--color-surface,#374151)] text-
|
|
27207
|
+
"block w-full text-left px-4 py-2 rounded-interactive transition-colors",
|
|
27208
|
+
"hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-warning",
|
|
27209
|
+
selectedChoice === index ? "bg-[var(--color-surface,#374151)] text-warning" : "bg-[var(--color-card)] text-[var(--color-foreground)]"
|
|
27193
27210
|
),
|
|
27194
27211
|
onClick: (e) => {
|
|
27195
27212
|
e.stopPropagation();
|
|
@@ -27197,7 +27214,7 @@ function DialogueBox({
|
|
|
27197
27214
|
onChoice?.(choice);
|
|
27198
27215
|
},
|
|
27199
27216
|
children: [
|
|
27200
|
-
/* @__PURE__ */ jsxs("span", { className: "text-
|
|
27217
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground mr-2", children: [
|
|
27201
27218
|
index + 1,
|
|
27202
27219
|
"."
|
|
27203
27220
|
] }),
|
|
@@ -27206,7 +27223,7 @@ function DialogueBox({
|
|
|
27206
27223
|
},
|
|
27207
27224
|
index
|
|
27208
27225
|
)) }),
|
|
27209
|
-
!isTyping && !dialogue.choices?.length && /* @__PURE__ */ jsx("div", { className: "mt-4 text-
|
|
27226
|
+
!isTyping && !dialogue.choices?.length && /* @__PURE__ */ jsx("div", { className: "mt-4 text-muted-foreground text-sm animate-pulse", children: "Press SPACE or click to continue..." })
|
|
27210
27227
|
] })
|
|
27211
27228
|
] }) })
|
|
27212
27229
|
}
|
|
@@ -27309,7 +27326,7 @@ function InventoryPanel({
|
|
|
27309
27326
|
/* @__PURE__ */ jsx(
|
|
27310
27327
|
"div",
|
|
27311
27328
|
{
|
|
27312
|
-
className: "grid gap-1 bg-[var(--color-card)] p-2 rounded-
|
|
27329
|
+
className: "grid gap-1 bg-[var(--color-card)] p-2 rounded-container border border-border",
|
|
27313
27330
|
style: {
|
|
27314
27331
|
gridTemplateColumns: `repeat(${safeColumns}, ${slotSize}px)`,
|
|
27315
27332
|
gridTemplateRows: `repeat(${rows}, ${slotSize}px)`
|
|
@@ -27321,8 +27338,8 @@ function InventoryPanel({
|
|
|
27321
27338
|
className: cn(
|
|
27322
27339
|
"relative flex items-center justify-center",
|
|
27323
27340
|
"bg-[var(--color-card)] border rounded transition-colors",
|
|
27324
|
-
"hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-
|
|
27325
|
-
selectedSlot === index ? "border-
|
|
27341
|
+
"hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-info",
|
|
27342
|
+
selectedSlot === index ? "border-warning bg-[var(--color-surface,#374151)]" : "border-muted"
|
|
27326
27343
|
),
|
|
27327
27344
|
style: { width: slotSize, height: slotSize },
|
|
27328
27345
|
onClick: () => handleSlotClick(index),
|
|
@@ -27341,8 +27358,8 @@ function InventoryPanel({
|
|
|
27341
27358
|
className: "w-8 h-8 object-contain",
|
|
27342
27359
|
style: { imageRendering: "pixelated" }
|
|
27343
27360
|
}
|
|
27344
|
-
) : /* @__PURE__ */ jsx("div", { className: "w-8 h-8 bg-
|
|
27345
|
-
item.quantity > 1 && /* @__PURE__ */ jsx("span", { className: "absolute bottom-0 right-0 bg-
|
|
27361
|
+
) : /* @__PURE__ */ jsx("div", { className: "w-8 h-8 bg-muted rounded-interactive flex items-center justify-center text-xs text-muted-foreground", children: (item.type ?? item.name ?? "I").charAt(0).toUpperCase() }),
|
|
27362
|
+
item.quantity > 1 && /* @__PURE__ */ jsx("span", { className: "absolute bottom-0 right-0 bg-background/70 text-foreground text-xs px-1 rounded-tl", children: item.quantity })
|
|
27346
27363
|
] })
|
|
27347
27364
|
},
|
|
27348
27365
|
index
|
|
@@ -27352,7 +27369,7 @@ function InventoryPanel({
|
|
|
27352
27369
|
showTooltips && hoveredItem && /* @__PURE__ */ jsxs(
|
|
27353
27370
|
"div",
|
|
27354
27371
|
{
|
|
27355
|
-
className: "fixed z-50 bg-[var(--color-card)] border border-
|
|
27372
|
+
className: "fixed z-50 bg-[var(--color-card)] border border-border rounded-container p-2 shadow-elevation-card pointer-events-none",
|
|
27356
27373
|
style: {
|
|
27357
27374
|
left: tooltipPosition.x,
|
|
27358
27375
|
top: tooltipPosition.y,
|
|
@@ -27360,8 +27377,8 @@ function InventoryPanel({
|
|
|
27360
27377
|
},
|
|
27361
27378
|
children: [
|
|
27362
27379
|
/* @__PURE__ */ jsx("div", { className: "font-semibold text-[var(--color-foreground)]", children: hoveredItem.name || hoveredItem.type }),
|
|
27363
|
-
hoveredItem.description && /* @__PURE__ */ jsx("div", { className: "text-sm text-
|
|
27364
|
-
/* @__PURE__ */ jsxs("div", { className: "text-xs text-
|
|
27380
|
+
hoveredItem.description && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground mt-1", children: hoveredItem.description }),
|
|
27381
|
+
/* @__PURE__ */ jsxs("div", { className: "text-xs text-muted-foreground mt-1", children: [
|
|
27365
27382
|
"Quantity: ",
|
|
27366
27383
|
hoveredItem.quantity
|
|
27367
27384
|
] })
|
|
@@ -27439,7 +27456,7 @@ function GameMenu({
|
|
|
27439
27456
|
children: title
|
|
27440
27457
|
}
|
|
27441
27458
|
),
|
|
27442
|
-
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-2 text-lg text-
|
|
27459
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-2 text-lg text-muted-foreground tracking-widest uppercase", children: subtitle })
|
|
27443
27460
|
] }),
|
|
27444
27461
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4 w-full max-w-md", children: resolvedOptions.map((option, index) => /* @__PURE__ */ jsx(
|
|
27445
27462
|
"button",
|
|
@@ -27447,10 +27464,10 @@ function GameMenu({
|
|
|
27447
27464
|
onClick: () => handleOptionClick(option),
|
|
27448
27465
|
disabled: option.disabled,
|
|
27449
27466
|
className: cn(
|
|
27450
|
-
"w-full py-4 px-8 rounded-
|
|
27467
|
+
"w-full py-4 px-8 rounded-container border-2 font-bold text-lg",
|
|
27451
27468
|
"transition-all duration-200 transform",
|
|
27452
27469
|
"hover:scale-105 active:scale-95",
|
|
27453
|
-
"focus:outline-none focus:ring-4 focus:ring-
|
|
27470
|
+
"focus:outline-none focus:ring-4 focus:ring-foreground/25",
|
|
27454
27471
|
variantMap3[option.variant ?? "secondary"] ?? variantMap3.secondary,
|
|
27455
27472
|
option.disabled && "opacity-50 cursor-not-allowed hover:scale-100"
|
|
27456
27473
|
),
|
|
@@ -27462,8 +27479,8 @@ function GameMenu({
|
|
|
27462
27479
|
index
|
|
27463
27480
|
)) }),
|
|
27464
27481
|
/* @__PURE__ */ jsxs("div", { className: "absolute inset-0 pointer-events-none overflow-hidden", children: [
|
|
27465
|
-
/* @__PURE__ */ jsx("div", { className: "absolute top-1/4 left-1/4 w-64 h-64 bg-
|
|
27466
|
-
/* @__PURE__ */ jsx("div", { className: "absolute bottom-1/4 right-1/4 w-96 h-96 bg-
|
|
27482
|
+
/* @__PURE__ */ jsx("div", { className: "absolute top-1/4 left-1/4 w-64 h-64 bg-info/10 rounded-container blur-3xl" }),
|
|
27483
|
+
/* @__PURE__ */ jsx("div", { className: "absolute bottom-1/4 right-1/4 w-96 h-96 bg-accent/10 rounded-container blur-3xl" })
|
|
27467
27484
|
] })
|
|
27468
27485
|
]
|
|
27469
27486
|
}
|
|
@@ -27476,9 +27493,9 @@ var init_GameMenu = __esm({
|
|
|
27476
27493
|
init_cn();
|
|
27477
27494
|
init_useEventBus();
|
|
27478
27495
|
variantMap3 = {
|
|
27479
|
-
primary: "bg-[var(--color-primary)] hover:bg-
|
|
27480
|
-
secondary: "bg-[var(--color-surface,#374151)] hover:bg-
|
|
27481
|
-
ghost: "bg-transparent hover:bg-
|
|
27496
|
+
primary: "bg-[var(--color-primary)] hover:bg-info text-[var(--color-primary-foreground)] border-info shadow-lg shadow-info/25",
|
|
27497
|
+
secondary: "bg-[var(--color-surface,#374151)] hover:bg-muted text-[var(--color-foreground)] border-muted",
|
|
27498
|
+
ghost: "bg-transparent hover:bg-foreground/10 text-[var(--color-foreground)] border-foreground/20"
|
|
27482
27499
|
};
|
|
27483
27500
|
GameMenu.displayName = "GameMenu";
|
|
27484
27501
|
}
|
|
@@ -27546,13 +27563,13 @@ function GameOverScreen({
|
|
|
27546
27563
|
children: title
|
|
27547
27564
|
}
|
|
27548
27565
|
),
|
|
27549
|
-
message && /* @__PURE__ */ jsx("p", { className: "text-xl text-
|
|
27550
|
-
isNewHighScore && /* @__PURE__ */ jsx("div", { className: "mb-6 px-6 py-2 bg-
|
|
27566
|
+
message && /* @__PURE__ */ jsx("p", { className: "text-xl text-muted-foreground mb-8 text-center max-w-md", children: message }),
|
|
27567
|
+
isNewHighScore && /* @__PURE__ */ jsx("div", { className: "mb-6 px-6 py-2 bg-warning/20 border-2 border-warning rounded-container animate-pulse", children: /* @__PURE__ */ jsx("span", { className: "text-warning font-bold text-lg tracking-wide", children: "\u{1F3C6} NEW HIGH SCORE! \u{1F3C6}" }) }),
|
|
27551
27568
|
stats.length > 0 && /* @__PURE__ */ jsx(
|
|
27552
27569
|
"div",
|
|
27553
27570
|
{
|
|
27554
27571
|
className: cn(
|
|
27555
|
-
"mb-8 p-6 rounded-
|
|
27572
|
+
"mb-8 p-6 rounded-container border-2 bg-background/30",
|
|
27556
27573
|
colors.accent
|
|
27557
27574
|
),
|
|
27558
27575
|
children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 md:grid-cols-3 gap-4", children: stats.map((stat, index) => {
|
|
@@ -27561,7 +27578,7 @@ function GameOverScreen({
|
|
|
27561
27578
|
displayValue = formatTime3(displayValue);
|
|
27562
27579
|
}
|
|
27563
27580
|
return /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
27564
|
-
/* @__PURE__ */ jsx("div", { className: "text-
|
|
27581
|
+
/* @__PURE__ */ jsx("div", { className: "text-muted-foreground text-sm mb-1", children: stat.label }),
|
|
27565
27582
|
/* @__PURE__ */ jsxs("div", { className: "text-[var(--color-foreground)] text-2xl font-bold flex items-center justify-center gap-2", children: [
|
|
27566
27583
|
stat.icon && /* @__PURE__ */ jsx("span", { children: stat.icon }),
|
|
27567
27584
|
/* @__PURE__ */ jsx("span", { className: "tabular-nums", children: displayValue })
|
|
@@ -27575,10 +27592,10 @@ function GameOverScreen({
|
|
|
27575
27592
|
{
|
|
27576
27593
|
onClick: () => handleActionClick(action),
|
|
27577
27594
|
className: cn(
|
|
27578
|
-
"px-8 py-4 rounded-
|
|
27595
|
+
"px-8 py-4 rounded-container border-2 font-bold text-lg",
|
|
27579
27596
|
"transition-all duration-200",
|
|
27580
27597
|
"hover:scale-105 active:scale-95",
|
|
27581
|
-
"focus:outline-none focus:ring-4 focus:ring-
|
|
27598
|
+
"focus:outline-none focus:ring-4 focus:ring-foreground/25",
|
|
27582
27599
|
buttonVariants[action.variant ?? "secondary"]
|
|
27583
27600
|
),
|
|
27584
27601
|
children: action.label
|
|
@@ -27597,25 +27614,25 @@ var init_GameOverScreen = __esm({
|
|
|
27597
27614
|
init_useEventBus();
|
|
27598
27615
|
variantColors = {
|
|
27599
27616
|
victory: {
|
|
27600
|
-
bg: "from-
|
|
27601
|
-
title: "text-
|
|
27602
|
-
accent: "border-
|
|
27617
|
+
bg: "from-success/90 to-success/90",
|
|
27618
|
+
title: "text-success",
|
|
27619
|
+
accent: "border-success"
|
|
27603
27620
|
},
|
|
27604
27621
|
defeat: {
|
|
27605
|
-
bg: "from-
|
|
27606
|
-
title: "text-
|
|
27607
|
-
accent: "border-
|
|
27622
|
+
bg: "from-error/90 to-background/90",
|
|
27623
|
+
title: "text-error",
|
|
27624
|
+
accent: "border-error"
|
|
27608
27625
|
},
|
|
27609
27626
|
neutral: {
|
|
27610
|
-
bg: "from-
|
|
27611
|
-
title: "text-
|
|
27612
|
-
accent: "border-
|
|
27627
|
+
bg: "from-muted/90 to-background/90",
|
|
27628
|
+
title: "text-foreground",
|
|
27629
|
+
accent: "border-muted"
|
|
27613
27630
|
}
|
|
27614
27631
|
};
|
|
27615
27632
|
buttonVariants = {
|
|
27616
|
-
primary: "bg-[var(--color-primary)] hover:bg-
|
|
27617
|
-
secondary: "bg-[var(--color-surface,#374151)] hover:bg-
|
|
27618
|
-
ghost: "bg-transparent hover:bg-
|
|
27633
|
+
primary: "bg-[var(--color-primary)] hover:bg-info text-[var(--color-primary-foreground)] border-info",
|
|
27634
|
+
secondary: "bg-[var(--color-surface,#374151)] hover:bg-muted text-[var(--color-foreground)] border-muted",
|
|
27635
|
+
ghost: "bg-transparent hover:bg-foreground/10 text-[var(--color-foreground)] border-foreground/20"
|
|
27619
27636
|
};
|
|
27620
27637
|
GameOverScreen.displayName = "GameOverScreen";
|
|
27621
27638
|
}
|
|
@@ -27849,7 +27866,7 @@ function PlatformerCanvas({
|
|
|
27849
27866
|
{
|
|
27850
27867
|
ref: canvasRef,
|
|
27851
27868
|
style: { width: canvasWidth, height: canvasHeight },
|
|
27852
|
-
className: cn("block rounded-
|
|
27869
|
+
className: cn("block rounded-container border border-border/10", className),
|
|
27853
27870
|
"data-testid": "platformer-canvas",
|
|
27854
27871
|
tabIndex: 0
|
|
27855
27872
|
}
|
|
@@ -35254,7 +35271,7 @@ function DebuggerBoard({
|
|
|
35254
35271
|
backgroundPosition: "center"
|
|
35255
35272
|
},
|
|
35256
35273
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
35257
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
35274
|
+
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-container", children: /* @__PURE__ */ jsx("img", { src: entity.headerImage, alt: "", onError: () => setHeaderError(true), className: "w-full h-full object-cover" }) }) : entity.headerImage && headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 rounded-container bg-gradient-to-br from-muted to-accent opacity-60" }) : null,
|
|
35258
35275
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
35259
35276
|
/* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
35260
35277
|
/* @__PURE__ */ jsx(Icon, { icon: Bug, size: "sm" }),
|
|
@@ -35267,11 +35284,11 @@ function DebuggerBoard({
|
|
|
35267
35284
|
const isFlagged = flaggedLines.has(line.id);
|
|
35268
35285
|
let lineStyle = "";
|
|
35269
35286
|
if (submitted) {
|
|
35270
|
-
if (line.isBug && isFlagged) lineStyle = "bg-
|
|
35271
|
-
else if (line.isBug && !isFlagged) lineStyle = "bg-
|
|
35272
|
-
else if (!line.isBug && isFlagged) lineStyle = "bg-
|
|
35287
|
+
if (line.isBug && isFlagged) lineStyle = "bg-success/10";
|
|
35288
|
+
else if (line.isBug && !isFlagged) lineStyle = "bg-warning/10";
|
|
35289
|
+
else if (!line.isBug && isFlagged) lineStyle = "bg-error/10";
|
|
35273
35290
|
} else if (isFlagged) {
|
|
35274
|
-
lineStyle = "bg-
|
|
35291
|
+
lineStyle = "bg-error/10";
|
|
35275
35292
|
}
|
|
35276
35293
|
return /* @__PURE__ */ jsxs(
|
|
35277
35294
|
HStack,
|
|
@@ -35284,8 +35301,8 @@ function DebuggerBoard({
|
|
|
35284
35301
|
/* @__PURE__ */ jsx(Box, { className: "w-10 flex-shrink-0 flex items-center justify-center border-r border-border text-muted-foreground", children: /* @__PURE__ */ jsx(Typography, { variant: "caption", children: i + 1 }) }),
|
|
35285
35302
|
/* @__PURE__ */ jsx(Box, { className: "flex-1 px-3 py-1.5 font-mono text-sm whitespace-pre", children: /* @__PURE__ */ jsx(Typography, { variant: "body", className: "font-mono text-sm", children: line.content }) }),
|
|
35286
35303
|
/* @__PURE__ */ jsxs(Box, { className: "w-8 flex-shrink-0 flex items-center justify-center", children: [
|
|
35287
|
-
isFlagged && /* @__PURE__ */ jsx(Icon, { icon: Bug, size: "xs", className: "text-
|
|
35288
|
-
submitted && line.isBug && !isFlagged && /* @__PURE__ */ jsx(Icon, { icon: Bug, size: "xs", className: "text-
|
|
35304
|
+
isFlagged && /* @__PURE__ */ jsx(Icon, { icon: Bug, size: "xs", className: "text-error" }),
|
|
35305
|
+
submitted && line.isBug && !isFlagged && /* @__PURE__ */ jsx(Icon, { icon: Bug, size: "xs", className: "text-warning" })
|
|
35289
35306
|
] })
|
|
35290
35307
|
]
|
|
35291
35308
|
},
|
|
@@ -35300,7 +35317,7 @@ function DebuggerBoard({
|
|
|
35300
35317
|
{
|
|
35301
35318
|
icon: flaggedLines.has(line.id) ? CheckCircle : XCircle,
|
|
35302
35319
|
size: "xs",
|
|
35303
|
-
className: flaggedLines.has(line.id) ? "text-
|
|
35320
|
+
className: flaggedLines.has(line.id) ? "text-success mt-0.5" : "text-warning mt-0.5"
|
|
35304
35321
|
}
|
|
35305
35322
|
),
|
|
35306
35323
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", children: [
|
|
@@ -35309,7 +35326,7 @@ function DebuggerBoard({
|
|
|
35309
35326
|
] })
|
|
35310
35327
|
] }, line.id))
|
|
35311
35328
|
] }) }),
|
|
35312
|
-
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
35329
|
+
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-warning", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.hint }) }),
|
|
35313
35330
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "center", children: [
|
|
35314
35331
|
!submitted ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleSubmit, disabled: flaggedLines.size === 0, children: [
|
|
35315
35332
|
/* @__PURE__ */ jsx(Icon, { icon: Send, size: "sm" }),
|
|
@@ -36032,7 +36049,7 @@ function LinearView({
|
|
|
36032
36049
|
className
|
|
36033
36050
|
}) {
|
|
36034
36051
|
const currentIdx = trait.states.indexOf(trait.currentState);
|
|
36035
|
-
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-
|
|
36052
|
+
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
36036
36053
|
trait.description && /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: trait.description }),
|
|
36037
36054
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
36038
36055
|
const isDone = i < currentIdx;
|
|
@@ -36054,10 +36071,10 @@ function LinearView({
|
|
|
36054
36071
|
{
|
|
36055
36072
|
display: "inline-flex",
|
|
36056
36073
|
className: cn(
|
|
36057
|
-
"items-center justify-center rounded-
|
|
36074
|
+
"items-center justify-center rounded-pill px-3 py-1 border-2 transition-all",
|
|
36058
36075
|
SIZE_CONFIG2[size || "md"].fontSize,
|
|
36059
36076
|
isDone && "bg-success/20 border-success text-success",
|
|
36060
|
-
isCurrent && "bg-primary/20 border-primary text-primary font-bold shadow-
|
|
36077
|
+
isCurrent && "bg-primary/20 border-primary text-primary font-bold shadow-elevation-card shadow-primary/20",
|
|
36061
36078
|
!isDone && !isCurrent && "bg-muted border-border text-muted-foreground"
|
|
36062
36079
|
),
|
|
36063
36080
|
children: [
|
|
@@ -36079,7 +36096,7 @@ function CompactView({
|
|
|
36079
36096
|
const { t } = useTranslate();
|
|
36080
36097
|
const config = SIZE_CONFIG2[size || "md"];
|
|
36081
36098
|
const currentTransitions = trait.transitions.filter((t2) => t2.from === trait.currentState);
|
|
36082
|
-
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-
|
|
36099
|
+
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
36083
36100
|
/* @__PURE__ */ jsxs(HStack, { className: "items-center justify-between", children: [
|
|
36084
36101
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground font-bold", children: trait.name }),
|
|
36085
36102
|
/* @__PURE__ */ jsx(StateIndicator, { state: trait.currentState, size: "sm", stateStyles })
|
|
@@ -36115,7 +36132,7 @@ function FullView({
|
|
|
36115
36132
|
const { t } = useTranslate();
|
|
36116
36133
|
const config = SIZE_CONFIG2[size || "md"];
|
|
36117
36134
|
const currentTransitions = trait.transitions.filter((t2) => t2.from === trait.currentState);
|
|
36118
|
-
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-
|
|
36135
|
+
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
36119
36136
|
/* @__PURE__ */ jsxs(HStack, { className: "items-center justify-between", children: [
|
|
36120
36137
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground font-bold", children: trait.name }),
|
|
36121
36138
|
/* @__PURE__ */ jsx(StateIndicator, { state: trait.currentState, size: "sm", stateStyles })
|
|
@@ -36129,9 +36146,9 @@ function FullView({
|
|
|
36129
36146
|
{
|
|
36130
36147
|
display: "flex",
|
|
36131
36148
|
className: cn(
|
|
36132
|
-
"items-center justify-center rounded-
|
|
36149
|
+
"items-center justify-center rounded-container border-2 transition-all px-2",
|
|
36133
36150
|
config.nodeSize,
|
|
36134
|
-
isCurrent && "bg-primary/20 border-primary shadow-
|
|
36151
|
+
isCurrent && "bg-primary/20 border-primary shadow-elevation-card shadow-primary/20",
|
|
36135
36152
|
!isCurrent && hasOutgoing && "bg-muted border-border hover:border-muted-foreground",
|
|
36136
36153
|
!isCurrent && !hasOutgoing && "bg-background border-border opacity-60",
|
|
36137
36154
|
onStateClick && "cursor-pointer"
|
|
@@ -36561,7 +36578,7 @@ function EventHandlerBoard({
|
|
|
36561
36578
|
backgroundPosition: "center"
|
|
36562
36579
|
},
|
|
36563
36580
|
children: [
|
|
36564
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
36581
|
+
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-container", children: /* @__PURE__ */ jsx("img", { src: entity.headerImage, alt: "", onError: () => setHeaderError(true), className: "w-full h-full object-cover" }) }) : entity.headerImage && headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 rounded-container bg-gradient-to-br from-muted to-accent opacity-60" }) : null,
|
|
36565
36582
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
|
|
36566
36583
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-foreground", children: entity.title }),
|
|
36567
36584
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-muted-foreground", children: entity.description }),
|
|
@@ -36576,7 +36593,7 @@ function EventHandlerBoard({
|
|
|
36576
36593
|
Box,
|
|
36577
36594
|
{
|
|
36578
36595
|
className: cn(
|
|
36579
|
-
"p-3 rounded-
|
|
36596
|
+
"p-3 rounded-container border-2 cursor-pointer transition-all hover:scale-105",
|
|
36580
36597
|
selectedObjectId === obj.id ? "border-primary bg-primary/10" : "border-border bg-card hover:border-muted-foreground"
|
|
36581
36598
|
),
|
|
36582
36599
|
onClick: () => setSelectedObjectId(obj.id),
|
|
@@ -36598,10 +36615,10 @@ function EventHandlerBoard({
|
|
|
36598
36615
|
}
|
|
36599
36616
|
),
|
|
36600
36617
|
eventLog.length > 0 && /* @__PURE__ */ jsx(EventLog, { entries: eventLog }),
|
|
36601
|
-
playState === "success" && /* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
36618
|
+
playState === "success" && /* @__PURE__ */ jsx(Box, { className: "p-4 rounded-container bg-success/20 border border-success text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "h5", className: "text-success", children: entity.successMessage || t("eventHandler.chainComplete") }) }),
|
|
36602
36619
|
playState === "fail" && /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
36603
|
-
/* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
36604
|
-
showHint && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-
|
|
36620
|
+
/* @__PURE__ */ jsx(Box, { className: "p-4 rounded-container bg-warning/10 border border-warning/30 text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-foreground font-medium", children: t(encourageKey) }) }),
|
|
36621
|
+
showHint && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-container bg-accent/10 border border-accent/30", children: /* @__PURE__ */ jsxs(HStack, { className: "items-start", gap: "xs", children: [
|
|
36605
36622
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-accent font-bold shrink-0", children: "\u{1F4A1} " + t("game.hint") + ":" }),
|
|
36606
36623
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground", children: entity.hint })
|
|
36607
36624
|
] }) })
|
|
@@ -39774,7 +39791,7 @@ function NegotiatorBoard({
|
|
|
39774
39791
|
backgroundPosition: "center"
|
|
39775
39792
|
},
|
|
39776
39793
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
39777
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
39794
|
+
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-container", children: /* @__PURE__ */ jsx("img", { src: entity.headerImage, alt: "", onError: () => setHeaderError(true), className: "w-full h-full object-cover" }) }) : entity.headerImage && headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 rounded-container bg-gradient-to-br from-muted to-accent opacity-60" }) : null,
|
|
39778
39795
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
39779
39796
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", weight: "bold", children: entity.title }),
|
|
39780
39797
|
/* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.description }),
|
|
@@ -39820,7 +39837,7 @@ function NegotiatorBoard({
|
|
|
39820
39837
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: "vs" }),
|
|
39821
39838
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: getActionLabel(round.opponentAction) }),
|
|
39822
39839
|
/* @__PURE__ */ jsx(Icon, { icon: ArrowRight, size: "xs" }),
|
|
39823
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "caption", weight: "bold", className: "text-
|
|
39840
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", weight: "bold", className: "text-success", children: [
|
|
39824
39841
|
"+",
|
|
39825
39842
|
round.playerPayoff
|
|
39826
39843
|
] }),
|
|
@@ -39831,7 +39848,7 @@ function NegotiatorBoard({
|
|
|
39831
39848
|
] }, round.round))
|
|
39832
39849
|
] }) }),
|
|
39833
39850
|
isComplete && /* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", children: [
|
|
39834
|
-
/* @__PURE__ */ jsx(Icon, { icon: CheckCircle, size: "lg", className: won ? "text-
|
|
39851
|
+
/* @__PURE__ */ jsx(Icon, { icon: CheckCircle, size: "lg", className: won ? "text-success" : "text-error" }),
|
|
39835
39852
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "bold", children: won ? entity.successMessage ?? t("negotiator.success") : entity.failMessage ?? t("negotiator.failed") }),
|
|
39836
39853
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-muted-foreground", children: [
|
|
39837
39854
|
t("negotiator.finalScore"),
|
|
@@ -39841,7 +39858,7 @@ function NegotiatorBoard({
|
|
|
39841
39858
|
entity.targetScore
|
|
39842
39859
|
] })
|
|
39843
39860
|
] }) }),
|
|
39844
|
-
showHint && entity.hint && !won && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
39861
|
+
showHint && entity.hint && !won && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-warning", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.hint }) }),
|
|
39845
39862
|
isComplete && !won && /* @__PURE__ */ jsx(HStack, { justify: "center", children: /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: handleReset, children: t("negotiator.playAgain") }) })
|
|
39846
39863
|
] })
|
|
39847
39864
|
}
|
|
@@ -42445,7 +42462,7 @@ function TraitSlot({
|
|
|
42445
42462
|
display: "flex",
|
|
42446
42463
|
position: "relative",
|
|
42447
42464
|
className: cn(
|
|
42448
|
-
"items-center justify-center rounded-
|
|
42465
|
+
"items-center justify-center rounded-container transition-all duration-200 bg-card/50",
|
|
42449
42466
|
!locked && "cursor-pointer",
|
|
42450
42467
|
locked && "cursor-not-allowed opacity-50",
|
|
42451
42468
|
isEmpty && !locked && "border-2 border-dashed border-border hover:border-muted-foreground",
|
|
@@ -42461,7 +42478,7 @@ function TraitSlot({
|
|
|
42461
42478
|
style: {
|
|
42462
42479
|
width: config.box,
|
|
42463
42480
|
height: config.box,
|
|
42464
|
-
backgroundColor: catColor?.bg ||
|
|
42481
|
+
backgroundColor: catColor?.bg || void 0,
|
|
42465
42482
|
borderColor: isDragOver ? void 0 : feedback === "correct" ? "var(--color-success)" : feedback === "wrong" ? "var(--color-error)" : catColor?.border || void 0
|
|
42466
42483
|
},
|
|
42467
42484
|
onClick: handleClick,
|
|
@@ -42490,7 +42507,7 @@ function TraitSlot({
|
|
|
42490
42507
|
Box,
|
|
42491
42508
|
{
|
|
42492
42509
|
position: "absolute",
|
|
42493
|
-
className: "-top-1.5 -right-1.5 w-4 h-4 bg-error rounded-
|
|
42510
|
+
className: "-top-1.5 -right-1.5 w-4 h-4 bg-error rounded-pill flex items-center justify-center cursor-pointer hover:bg-error/80 transition-colors",
|
|
42494
42511
|
onClick: handleRemove,
|
|
42495
42512
|
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-foreground text-xs leading-none", children: "\xD7" })
|
|
42496
42513
|
}
|
|
@@ -42500,14 +42517,14 @@ function TraitSlot({
|
|
|
42500
42517
|
Box,
|
|
42501
42518
|
{
|
|
42502
42519
|
position: "absolute",
|
|
42503
|
-
className: "-bottom-1 -left-1 w-4 h-4 bg-card rounded-
|
|
42520
|
+
className: "-bottom-1 -left-1 w-4 h-4 bg-card rounded-pill flex items-center justify-center border border-border",
|
|
42504
42521
|
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground text-xs", children: slotNumber })
|
|
42505
42522
|
}
|
|
42506
42523
|
),
|
|
42507
42524
|
showTooltip && isHovered && itemMachine && !isEmpty && equippedItem && /* @__PURE__ */ jsxs(
|
|
42508
42525
|
Box,
|
|
42509
42526
|
{
|
|
42510
|
-
className: "p-3 bg-background border border-border rounded-
|
|
42527
|
+
className: "p-3 bg-background border border-border rounded-container shadow-xl",
|
|
42511
42528
|
style: {
|
|
42512
42529
|
...getTooltipStyle(),
|
|
42513
42530
|
minWidth: 200,
|
|
@@ -42757,12 +42774,12 @@ function SequencerBoard({
|
|
|
42757
42774
|
backgroundPosition: "center"
|
|
42758
42775
|
},
|
|
42759
42776
|
children: [
|
|
42760
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
42777
|
+
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-container", children: /* @__PURE__ */ jsx("img", { src: entity.headerImage, alt: "", onError: () => setHeaderError(true), className: "w-full h-full object-cover" }) }) : entity.headerImage && headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 rounded-container bg-gradient-to-br from-muted to-accent opacity-60" }) : null,
|
|
42761
42778
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
|
|
42762
42779
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-foreground", children: entity.title }),
|
|
42763
42780
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-muted-foreground", children: entity.description })
|
|
42764
42781
|
] }),
|
|
42765
|
-
showHint && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-
|
|
42782
|
+
showHint && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-container bg-accent/10 border border-accent/30", children: /* @__PURE__ */ jsxs(HStack, { className: "items-start", gap: "xs", children: [
|
|
42766
42783
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-accent font-bold shrink-0", children: "\u{1F4A1} " + t("game.hint") + ":" }),
|
|
42767
42784
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground", children: entity.hint })
|
|
42768
42785
|
] }) }),
|
|
@@ -42800,8 +42817,8 @@ function SequencerBoard({
|
|
|
42800
42817
|
label: t("sequencer.dragActions")
|
|
42801
42818
|
}
|
|
42802
42819
|
),
|
|
42803
|
-
hasFeedback && playState === "idle" && attempts > 0 && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-
|
|
42804
|
-
playState === "success" && /* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
42820
|
+
hasFeedback && playState === "idle" && attempts > 0 && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-container bg-warning/10 border border-warning/30 text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground", children: t(encourageKey) }) }),
|
|
42821
|
+
playState === "success" && /* @__PURE__ */ jsx(Box, { className: "p-4 rounded-container bg-success/20 border border-success text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "h5", className: "text-success", children: entity.successMessage || t("sequencer.levelComplete") }) }),
|
|
42805
42822
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", children: [
|
|
42806
42823
|
/* @__PURE__ */ jsx(
|
|
42807
42824
|
Button,
|
|
@@ -43477,7 +43494,7 @@ function SimulationCanvas({
|
|
|
43477
43494
|
ref: canvasRef,
|
|
43478
43495
|
width,
|
|
43479
43496
|
height,
|
|
43480
|
-
className: "rounded-
|
|
43497
|
+
className: "rounded-container block max-w-full h-auto"
|
|
43481
43498
|
}
|
|
43482
43499
|
) });
|
|
43483
43500
|
}
|
|
@@ -43685,7 +43702,7 @@ function SimulatorBoard({
|
|
|
43685
43702
|
backgroundPosition: "center"
|
|
43686
43703
|
},
|
|
43687
43704
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
43688
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
43705
|
+
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-container", children: /* @__PURE__ */ jsx("img", { src: entity.headerImage, alt: "", onError: () => setHeaderError(true), className: "w-full h-full object-cover" }) }) : entity.headerImage && headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 rounded-container bg-gradient-to-br from-muted to-accent opacity-60" }) : null,
|
|
43689
43706
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
43690
43707
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", weight: "bold", children: entity.title }),
|
|
43691
43708
|
/* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.description })
|
|
@@ -43736,8 +43753,8 @@ function SimulatorBoard({
|
|
|
43736
43753
|
entity.outputUnit
|
|
43737
43754
|
] }),
|
|
43738
43755
|
submitted && /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
43739
|
-
/* @__PURE__ */ jsx(Icon, { icon: isCorrect ? CheckCircle : XCircle, size: "sm", className: isCorrect ? "text-
|
|
43740
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", className: isCorrect ? "text-
|
|
43756
|
+
/* @__PURE__ */ jsx(Icon, { icon: isCorrect ? CheckCircle : XCircle, size: "sm", className: isCorrect ? "text-success" : "text-error" }),
|
|
43757
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", className: isCorrect ? "text-success" : "text-error", children: isCorrect ? entity.successMessage ?? t("simulator.correct") : entity.failMessage ?? t("simulator.incorrect") })
|
|
43741
43758
|
] }),
|
|
43742
43759
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-muted-foreground", children: [
|
|
43743
43760
|
t("simulator.target"),
|
|
@@ -43750,7 +43767,7 @@ function SimulatorBoard({
|
|
|
43750
43767
|
")"
|
|
43751
43768
|
] })
|
|
43752
43769
|
] }) }),
|
|
43753
|
-
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
43770
|
+
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-warning", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.hint }) }),
|
|
43754
43771
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "center", children: [
|
|
43755
43772
|
!submitted ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleSubmit, children: [
|
|
43756
43773
|
/* @__PURE__ */ jsx(Icon, { icon: Play, size: "sm" }),
|
|
@@ -44151,7 +44168,7 @@ function StateNode2({
|
|
|
44151
44168
|
position: "absolute",
|
|
44152
44169
|
display: "flex",
|
|
44153
44170
|
className: cn(
|
|
44154
|
-
"items-center justify-center rounded-
|
|
44171
|
+
"items-center justify-center rounded-pill border-3 transition-all cursor-pointer select-none",
|
|
44155
44172
|
"min-w-[80px] h-[80px] px-3",
|
|
44156
44173
|
isCurrent && "bg-primary/20 border-primary shadow-lg shadow-primary/30 scale-110",
|
|
44157
44174
|
isSelected && !isCurrent && "bg-accent/20 border-accent ring-2 ring-accent/50",
|
|
@@ -44464,7 +44481,7 @@ function StateArchitectBoard({
|
|
|
44464
44481
|
backgroundPosition: "center"
|
|
44465
44482
|
},
|
|
44466
44483
|
children: [
|
|
44467
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
44484
|
+
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-container", children: /* @__PURE__ */ jsx("img", { src: entity.headerImage, alt: "", onError: () => setHeaderError(true), className: "w-full h-full object-cover" }) }) : entity.headerImage && headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 rounded-container bg-gradient-to-br from-muted to-accent opacity-60" }) : null,
|
|
44468
44485
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
|
|
44469
44486
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-foreground", children: entity.title }),
|
|
44470
44487
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-muted-foreground", children: entity.description }),
|
|
@@ -44483,7 +44500,7 @@ function StateArchitectBoard({
|
|
|
44483
44500
|
Box,
|
|
44484
44501
|
{
|
|
44485
44502
|
position: "relative",
|
|
44486
|
-
className: "rounded-
|
|
44503
|
+
className: "rounded-container border border-border bg-background overflow-hidden",
|
|
44487
44504
|
style: { width: GRAPH_W, height: GRAPH_H },
|
|
44488
44505
|
children: [
|
|
44489
44506
|
/* @__PURE__ */ jsxs(
|
|
@@ -44542,7 +44559,7 @@ function StateArchitectBoard({
|
|
|
44542
44559
|
children: selectedState ? t("stateArchitect.addTransition", { state: selectedState }) : t("stateArchitect.addTransitionPrompt")
|
|
44543
44560
|
}
|
|
44544
44561
|
) }),
|
|
44545
|
-
transitions.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "p-3 rounded-
|
|
44562
|
+
transitions.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "p-3 rounded-container bg-muted/50 border border-border", children: [
|
|
44546
44563
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground font-medium", children: t("stateArchitect.transitions", { count: transitions.length }) + ":" }),
|
|
44547
44564
|
transitions.map((t2) => /* @__PURE__ */ jsxs(HStack, { className: "items-center text-xs", gap: "xs", children: [
|
|
44548
44565
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-foreground", children: t2.from }),
|
|
@@ -44576,7 +44593,7 @@ function StateArchitectBoard({
|
|
|
44576
44593
|
variables
|
|
44577
44594
|
}
|
|
44578
44595
|
),
|
|
44579
|
-
testResults.length > 0 && /* @__PURE__ */ jsxs(VStack, { className: "p-3 rounded-
|
|
44596
|
+
testResults.length > 0 && /* @__PURE__ */ jsxs(VStack, { className: "p-3 rounded-container bg-card border border-border", gap: "xs", children: [
|
|
44580
44597
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-muted-foreground font-medium", children: t("stateArchitect.testResults") + ":" }),
|
|
44581
44598
|
testResults.map((r, i) => /* @__PURE__ */ jsxs(HStack, { className: "items-center text-xs", gap: "xs", children: [
|
|
44582
44599
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: r.passed ? "text-success" : "text-error", children: r.passed ? "\u2714" : "\u2717" }),
|
|
@@ -44587,10 +44604,10 @@ function StateArchitectBoard({
|
|
|
44587
44604
|
entity.showCodeView !== false && /* @__PURE__ */ jsx(CodeView, { data: codeData, label: "View Code" })
|
|
44588
44605
|
] })
|
|
44589
44606
|
] }),
|
|
44590
|
-
playState === "success" && /* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
44607
|
+
playState === "success" && /* @__PURE__ */ jsx(Box, { className: "p-4 rounded-container bg-success/20 border border-success text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "h5", className: "text-success", children: entity.successMessage || t("stateArchitect.allPassed") }) }),
|
|
44591
44608
|
playState === "fail" && /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
44592
|
-
/* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
44593
|
-
attempts >= 3 && entity.hint && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-
|
|
44609
|
+
/* @__PURE__ */ jsx(Box, { className: "p-4 rounded-container bg-warning/10 border border-warning/30 text-center", children: /* @__PURE__ */ jsx(Typography, { variant: "body1", className: "text-foreground font-medium", children: t(ENCOURAGEMENT_KEYS3[Math.min(attempts - 1, ENCOURAGEMENT_KEYS3.length - 1)] ?? ENCOURAGEMENT_KEYS3[0]) }) }),
|
|
44610
|
+
attempts >= 3 && entity.hint && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-container bg-accent/10 border border-accent/30", children: /* @__PURE__ */ jsxs(HStack, { className: "items-start", gap: "xs", children: [
|
|
44594
44611
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-accent font-bold shrink-0", children: "\u{1F4A1} " + t("game.hint") + ":" }),
|
|
44595
44612
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground", children: entity.hint })
|
|
44596
44613
|
] }) })
|