@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/avl/index.js
CHANGED
|
@@ -11452,7 +11452,7 @@ function HealthBar({
|
|
|
11452
11452
|
"div",
|
|
11453
11453
|
{
|
|
11454
11454
|
className: cn(
|
|
11455
|
-
"relative overflow-hidden rounded-full bg-
|
|
11455
|
+
"relative overflow-hidden rounded-full bg-muted",
|
|
11456
11456
|
sizes.bar,
|
|
11457
11457
|
"w-24",
|
|
11458
11458
|
className
|
|
@@ -11462,7 +11462,7 @@ function HealthBar({
|
|
|
11462
11462
|
{
|
|
11463
11463
|
className: cn(
|
|
11464
11464
|
"absolute inset-y-0 left-0 rounded-full",
|
|
11465
|
-
percentage > 66 ? "bg-
|
|
11465
|
+
percentage > 66 ? "bg-success" : percentage > 33 ? "bg-warning" : "bg-error",
|
|
11466
11466
|
animated && "transition-all duration-300"
|
|
11467
11467
|
),
|
|
11468
11468
|
style: { width: `${percentage}%` }
|
|
@@ -11484,7 +11484,7 @@ var init_HealthBar = __esm({
|
|
|
11484
11484
|
heartIcon = (filled, size) => /* @__PURE__ */ jsx(
|
|
11485
11485
|
"svg",
|
|
11486
11486
|
{
|
|
11487
|
-
className: cn("transition-all duration-200", size, filled ? "text-
|
|
11487
|
+
className: cn("transition-all duration-200", size, filled ? "text-error" : "text-muted-foreground"),
|
|
11488
11488
|
viewBox: "0 0 24 24",
|
|
11489
11489
|
fill: filled ? "currentColor" : "none",
|
|
11490
11490
|
stroke: "currentColor",
|
|
@@ -11548,7 +11548,7 @@ function ScoreDisplay({
|
|
|
11548
11548
|
),
|
|
11549
11549
|
children: [
|
|
11550
11550
|
icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: icon }),
|
|
11551
|
-
label && /* @__PURE__ */ jsx("span", { className: "text-
|
|
11551
|
+
label && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label }),
|
|
11552
11552
|
/* @__PURE__ */ jsx("span", { className: "tabular-nums", children: formattedValue })
|
|
11553
11553
|
]
|
|
11554
11554
|
}
|
|
@@ -11661,8 +11661,8 @@ var init_ControlButton = __esm({
|
|
|
11661
11661
|
};
|
|
11662
11662
|
shapeMap = {
|
|
11663
11663
|
circle: "rounded-full",
|
|
11664
|
-
rounded: "rounded-
|
|
11665
|
-
square: "rounded-
|
|
11664
|
+
rounded: "rounded-interactive",
|
|
11665
|
+
square: "rounded-interactive"
|
|
11666
11666
|
};
|
|
11667
11667
|
variantMap = {
|
|
11668
11668
|
primary: "bg-primary text-primary-foreground border-primary hover:bg-primary-hover",
|
|
@@ -11830,12 +11830,12 @@ function TimerDisplay({
|
|
|
11830
11830
|
"div",
|
|
11831
11831
|
{
|
|
11832
11832
|
className: cn(
|
|
11833
|
-
"inline-flex items-center justify-center rounded-
|
|
11834
|
-
"bg-
|
|
11833
|
+
"inline-flex items-center justify-center rounded-container",
|
|
11834
|
+
"bg-card/80 border border-muted font-mono font-bold tabular-nums",
|
|
11835
11835
|
sizeMap4[size],
|
|
11836
|
-
running && "border-
|
|
11837
|
-
isLow && "text-
|
|
11838
|
-
!isLow && "text-
|
|
11836
|
+
running && "border-success/50",
|
|
11837
|
+
isLow && "text-error border-error/50 animate-pulse",
|
|
11838
|
+
!isLow && "text-foreground",
|
|
11839
11839
|
className
|
|
11840
11840
|
),
|
|
11841
11841
|
children: formatTime(seconds, format)
|
|
@@ -11868,17 +11868,17 @@ function ResourceCounter({
|
|
|
11868
11868
|
"div",
|
|
11869
11869
|
{
|
|
11870
11870
|
className: cn(
|
|
11871
|
-
"inline-flex items-center rounded-
|
|
11872
|
-
"bg-
|
|
11871
|
+
"inline-flex items-center rounded-container",
|
|
11872
|
+
"bg-card/80 border border-muted font-medium text-foreground",
|
|
11873
11873
|
sizes.wrapper,
|
|
11874
11874
|
className
|
|
11875
11875
|
),
|
|
11876
11876
|
children: [
|
|
11877
11877
|
icon && /* @__PURE__ */ jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: icon }),
|
|
11878
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
11878
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label }),
|
|
11879
11879
|
/* @__PURE__ */ jsxs("span", { className: cn("font-bold tabular-nums", color), children: [
|
|
11880
11880
|
value,
|
|
11881
|
-
max != null && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
11881
|
+
max != null && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
11882
11882
|
"/",
|
|
11883
11883
|
max
|
|
11884
11884
|
] })
|
|
@@ -11919,18 +11919,18 @@ function ItemSlot({
|
|
|
11919
11919
|
disabled: !isClickable,
|
|
11920
11920
|
title: label,
|
|
11921
11921
|
className: cn(
|
|
11922
|
-
"relative flex items-center justify-center rounded-
|
|
11923
|
-
"bg-
|
|
11922
|
+
"relative flex items-center justify-center rounded-interactive border-2",
|
|
11923
|
+
"bg-card/80 transition-all duration-150",
|
|
11924
11924
|
sizeMap6[size],
|
|
11925
|
-
empty ? "border-
|
|
11925
|
+
empty ? "border-border bg-card/50" : rarityBorderMap[rarity],
|
|
11926
11926
|
!empty && rarityGlowMap[rarity],
|
|
11927
|
-
selected && "ring-2 ring-
|
|
11927
|
+
selected && "ring-2 ring-foreground ring-offset-1 ring-offset-background",
|
|
11928
11928
|
isClickable && !empty && "hover:brightness-125 cursor-pointer",
|
|
11929
|
-
isClickable && empty && "hover:border-
|
|
11929
|
+
isClickable && empty && "hover:border-muted cursor-pointer",
|
|
11930
11930
|
!isClickable && "cursor-default",
|
|
11931
11931
|
className
|
|
11932
11932
|
),
|
|
11933
|
-
children: empty ? /* @__PURE__ */ jsx("span", { className: "text-
|
|
11933
|
+
children: empty ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-base", children: "+" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11934
11934
|
icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: icon }),
|
|
11935
11935
|
quantity != null && quantity > 1 && /* @__PURE__ */ jsx(
|
|
11936
11936
|
"span",
|
|
@@ -11938,7 +11938,7 @@ function ItemSlot({
|
|
|
11938
11938
|
className: cn(
|
|
11939
11939
|
"absolute -bottom-1 -right-1 flex items-center justify-center",
|
|
11940
11940
|
"min-w-[18px] h-[18px] rounded-full px-1",
|
|
11941
|
-
"bg-
|
|
11941
|
+
"bg-surface border border-muted text-xs font-bold text-foreground"
|
|
11942
11942
|
),
|
|
11943
11943
|
children: quantity
|
|
11944
11944
|
}
|
|
@@ -11958,18 +11958,18 @@ var init_ItemSlot = __esm({
|
|
|
11958
11958
|
lg: "w-18 h-18 text-3xl"
|
|
11959
11959
|
};
|
|
11960
11960
|
rarityBorderMap = {
|
|
11961
|
-
common: "border-
|
|
11962
|
-
uncommon: "border-
|
|
11963
|
-
rare: "border-
|
|
11964
|
-
epic: "border-
|
|
11965
|
-
legendary: "border-
|
|
11961
|
+
common: "border-muted",
|
|
11962
|
+
uncommon: "border-success",
|
|
11963
|
+
rare: "border-info",
|
|
11964
|
+
epic: "border-accent",
|
|
11965
|
+
legendary: "border-warning"
|
|
11966
11966
|
};
|
|
11967
11967
|
rarityGlowMap = {
|
|
11968
11968
|
common: "",
|
|
11969
11969
|
uncommon: "",
|
|
11970
|
-
rare: "shadow-
|
|
11971
|
-
epic: "shadow-
|
|
11972
|
-
legendary: "shadow-
|
|
11970
|
+
rare: "shadow-sm",
|
|
11971
|
+
epic: "shadow-lg",
|
|
11972
|
+
legendary: "shadow-lg"
|
|
11973
11973
|
};
|
|
11974
11974
|
ItemSlot.displayName = "ItemSlot";
|
|
11975
11975
|
}
|
|
@@ -11987,8 +11987,8 @@ function TurnIndicator({
|
|
|
11987
11987
|
"div",
|
|
11988
11988
|
{
|
|
11989
11989
|
className: cn(
|
|
11990
|
-
"inline-flex items-center rounded-
|
|
11991
|
-
"bg-
|
|
11990
|
+
"inline-flex items-center rounded-container",
|
|
11991
|
+
"bg-card/80 border border-muted font-medium text-foreground",
|
|
11992
11992
|
sizes.wrapper,
|
|
11993
11993
|
className
|
|
11994
11994
|
),
|
|
@@ -11996,19 +11996,19 @@ function TurnIndicator({
|
|
|
11996
11996
|
/* @__PURE__ */ jsxs("span", { className: "font-bold tabular-nums", children: [
|
|
11997
11997
|
"Turn ",
|
|
11998
11998
|
currentTurn,
|
|
11999
|
-
maxTurns != null && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
11999
|
+
maxTurns != null && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
12000
12000
|
"/",
|
|
12001
12001
|
maxTurns
|
|
12002
12002
|
] })
|
|
12003
12003
|
] }),
|
|
12004
12004
|
phase && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12005
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
12006
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
12005
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "|" }),
|
|
12006
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: phase })
|
|
12007
12007
|
] }),
|
|
12008
12008
|
activeTeam && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12009
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
12010
|
-
/* @__PURE__ */ jsx("span", { className: cn("rounded-full bg-
|
|
12011
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
12009
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "|" }),
|
|
12010
|
+
/* @__PURE__ */ jsx("span", { className: cn("rounded-full bg-success/20", sizes.dot) }),
|
|
12011
|
+
/* @__PURE__ */ jsx("span", { className: "text-success", children: activeTeam })
|
|
12012
12012
|
] })
|
|
12013
12013
|
]
|
|
12014
12014
|
}
|
|
@@ -12027,10 +12027,10 @@ var init_TurnIndicator = __esm({
|
|
|
12027
12027
|
}
|
|
12028
12028
|
});
|
|
12029
12029
|
function getComboIntensity(combo) {
|
|
12030
|
-
if (combo >= 10) return "text-
|
|
12031
|
-
if (combo >= 7) return "text-
|
|
12032
|
-
if (combo >= 4) return "text-
|
|
12033
|
-
return "text-
|
|
12030
|
+
if (combo >= 10) return "text-error animate-pulse";
|
|
12031
|
+
if (combo >= 7) return "text-warning";
|
|
12032
|
+
if (combo >= 4) return "text-warning";
|
|
12033
|
+
return "text-foreground";
|
|
12034
12034
|
}
|
|
12035
12035
|
function getComboScale(combo) {
|
|
12036
12036
|
if (combo >= 10) return "scale-110";
|
|
@@ -12051,19 +12051,19 @@ function ComboCounter({
|
|
|
12051
12051
|
{
|
|
12052
12052
|
className: cn(
|
|
12053
12053
|
"inline-flex flex-col items-center justify-center",
|
|
12054
|
-
"rounded-
|
|
12054
|
+
"rounded-container bg-card/80 border border-muted px-3 py-1.5",
|
|
12055
12055
|
"transition-transform duration-200",
|
|
12056
12056
|
getComboScale(combo),
|
|
12057
12057
|
className
|
|
12058
12058
|
),
|
|
12059
12059
|
children: [
|
|
12060
12060
|
/* @__PURE__ */ jsx("span", { className: cn("font-black tabular-nums leading-none", sizes.combo, getComboIntensity(combo)), children: combo }),
|
|
12061
|
-
/* @__PURE__ */ jsx("span", { className: cn("font-bold uppercase tracking-wider text-
|
|
12062
|
-
multiplier != null && multiplier > 1 && /* @__PURE__ */ jsxs("span", { className: cn("font-bold text-
|
|
12061
|
+
/* @__PURE__ */ jsx("span", { className: cn("font-bold uppercase tracking-wider text-muted-foreground", sizes.label), children: "combo" }),
|
|
12062
|
+
multiplier != null && multiplier > 1 && /* @__PURE__ */ jsxs("span", { className: cn("font-bold text-warning tabular-nums", sizes.multiplier), children: [
|
|
12063
12063
|
"x",
|
|
12064
12064
|
multiplier.toFixed(1)
|
|
12065
12065
|
] }),
|
|
12066
|
-
streak != null && streak > 0 && /* @__PURE__ */ jsxs("span", { className: cn("text-
|
|
12066
|
+
streak != null && streak > 0 && /* @__PURE__ */ jsxs("span", { className: cn("text-muted-foreground tabular-nums", sizes.label), children: [
|
|
12067
12067
|
streak,
|
|
12068
12068
|
" streak"
|
|
12069
12069
|
] })
|
|
@@ -12099,8 +12099,8 @@ function XPBar({
|
|
|
12099
12099
|
"span",
|
|
12100
12100
|
{
|
|
12101
12101
|
className: cn(
|
|
12102
|
-
"flex-shrink-0 rounded-
|
|
12103
|
-
"bg-
|
|
12102
|
+
"flex-shrink-0 rounded-interactive font-bold",
|
|
12103
|
+
"bg-accent text-foreground border border-accent",
|
|
12104
12104
|
sizes.badge
|
|
12105
12105
|
),
|
|
12106
12106
|
children: [
|
|
@@ -12114,7 +12114,7 @@ function XPBar({
|
|
|
12114
12114
|
"div",
|
|
12115
12115
|
{
|
|
12116
12116
|
className: cn(
|
|
12117
|
-
"relative w-full overflow-hidden rounded-full bg-
|
|
12117
|
+
"relative w-full overflow-hidden rounded-full bg-muted border border-muted",
|
|
12118
12118
|
sizes.bar
|
|
12119
12119
|
),
|
|
12120
12120
|
children: /* @__PURE__ */ jsx(
|
|
@@ -12122,7 +12122,7 @@ function XPBar({
|
|
|
12122
12122
|
{
|
|
12123
12123
|
className: cn(
|
|
12124
12124
|
"absolute inset-y-0 left-0 rounded-full",
|
|
12125
|
-
"bg-gradient-to-r from-
|
|
12125
|
+
"bg-gradient-to-r from-accent to-info",
|
|
12126
12126
|
animated && "transition-all duration-500 ease-out"
|
|
12127
12127
|
),
|
|
12128
12128
|
style: { width: `${percentage}%` }
|
|
@@ -12130,7 +12130,7 @@ function XPBar({
|
|
|
12130
12130
|
)
|
|
12131
12131
|
}
|
|
12132
12132
|
),
|
|
12133
|
-
showLabel && /* @__PURE__ */ jsxs("span", { className: cn("text-
|
|
12133
|
+
showLabel && /* @__PURE__ */ jsxs("span", { className: cn("text-muted-foreground tabular-nums", sizes.text), children: [
|
|
12134
12134
|
current,
|
|
12135
12135
|
" / ",
|
|
12136
12136
|
max,
|
|
@@ -12166,7 +12166,7 @@ function WaypointMarker({
|
|
|
12166
12166
|
"div",
|
|
12167
12167
|
{
|
|
12168
12168
|
className: cn(
|
|
12169
|
-
"absolute rounded-full border-2 border-
|
|
12169
|
+
"absolute rounded-full border-2 border-info animate-ping opacity-50",
|
|
12170
12170
|
sizes.ring
|
|
12171
12171
|
)
|
|
12172
12172
|
}
|
|
@@ -12175,7 +12175,7 @@ function WaypointMarker({
|
|
|
12175
12175
|
"div",
|
|
12176
12176
|
{
|
|
12177
12177
|
className: cn(
|
|
12178
|
-
"absolute rounded-full border-2 border-
|
|
12178
|
+
"absolute rounded-full border-2 border-info",
|
|
12179
12179
|
sizes.ring
|
|
12180
12180
|
)
|
|
12181
12181
|
}
|
|
@@ -12186,9 +12186,9 @@ function WaypointMarker({
|
|
|
12186
12186
|
className: cn(
|
|
12187
12187
|
"relative flex items-center justify-center rounded-full transition-all duration-200",
|
|
12188
12188
|
sizes.dot,
|
|
12189
|
-
completed && "bg-
|
|
12190
|
-
active && !completed && "bg-
|
|
12191
|
-
!active && !completed && "bg-
|
|
12189
|
+
completed && "bg-success text-foreground",
|
|
12190
|
+
active && !completed && "bg-info text-foreground",
|
|
12191
|
+
!active && !completed && "bg-muted"
|
|
12192
12192
|
),
|
|
12193
12193
|
children: completed ? checkIcon : icon
|
|
12194
12194
|
}
|
|
@@ -12200,7 +12200,7 @@ function WaypointMarker({
|
|
|
12200
12200
|
className: cn(
|
|
12201
12201
|
"text-center whitespace-nowrap",
|
|
12202
12202
|
sizes.label,
|
|
12203
|
-
completed ? "text-
|
|
12203
|
+
completed ? "text-success" : active ? "text-info" : "text-muted-foreground"
|
|
12204
12204
|
),
|
|
12205
12205
|
children: label
|
|
12206
12206
|
}
|
|
@@ -12241,7 +12241,7 @@ function StatusEffect({
|
|
|
12241
12241
|
"div",
|
|
12242
12242
|
{
|
|
12243
12243
|
className: cn(
|
|
12244
|
-
"relative flex items-center justify-center rounded border-2",
|
|
12244
|
+
"relative flex items-center justify-center rounded-interactive border-2",
|
|
12245
12245
|
sizes.container,
|
|
12246
12246
|
variantStyles7[variant]
|
|
12247
12247
|
),
|
|
@@ -12252,7 +12252,7 @@ function StatusEffect({
|
|
|
12252
12252
|
"span",
|
|
12253
12253
|
{
|
|
12254
12254
|
className: cn(
|
|
12255
|
-
"absolute bottom-0 left-0 right-0 text-center font-mono font-bold text-
|
|
12255
|
+
"absolute bottom-0 left-0 right-0 text-center font-mono font-bold text-foreground bg-background/60 leading-tight",
|
|
12256
12256
|
sizes.timer
|
|
12257
12257
|
),
|
|
12258
12258
|
children: formatDuration(duration)
|
|
@@ -12265,7 +12265,7 @@ function StatusEffect({
|
|
|
12265
12265
|
"span",
|
|
12266
12266
|
{
|
|
12267
12267
|
className: cn(
|
|
12268
|
-
"absolute flex items-center justify-center rounded-full bg-
|
|
12268
|
+
"absolute flex items-center justify-center rounded-full bg-card text-foreground font-bold leading-none",
|
|
12269
12269
|
sizes.badge
|
|
12270
12270
|
),
|
|
12271
12271
|
children: stacks
|
|
@@ -12284,9 +12284,9 @@ var init_StatusEffect = __esm({
|
|
|
12284
12284
|
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" }
|
|
12285
12285
|
};
|
|
12286
12286
|
variantStyles7 = {
|
|
12287
|
-
buff: "border-
|
|
12288
|
-
debuff: "border-
|
|
12289
|
-
neutral: "border-
|
|
12287
|
+
buff: "border-success bg-success/20",
|
|
12288
|
+
debuff: "border-error bg-error/20",
|
|
12289
|
+
neutral: "border-muted bg-muted/20"
|
|
12290
12290
|
};
|
|
12291
12291
|
StatusEffect.displayName = "StatusEffect";
|
|
12292
12292
|
}
|
|
@@ -12325,10 +12325,10 @@ var init_DamageNumber = __esm({
|
|
|
12325
12325
|
lg: "text-2xl"
|
|
12326
12326
|
};
|
|
12327
12327
|
typeStyles = {
|
|
12328
|
-
damage: "text-
|
|
12329
|
-
heal: "text-
|
|
12330
|
-
crit: "text-
|
|
12331
|
-
miss: "text-
|
|
12328
|
+
damage: "text-error font-bold",
|
|
12329
|
+
heal: "text-success font-bold",
|
|
12330
|
+
crit: "text-warning font-extrabold",
|
|
12331
|
+
miss: "text-muted-foreground italic"
|
|
12332
12332
|
};
|
|
12333
12333
|
floatKeyframes = `
|
|
12334
12334
|
@keyframes damageFloat {
|
|
@@ -12351,12 +12351,12 @@ function DialogueBubble({
|
|
|
12351
12351
|
"div",
|
|
12352
12352
|
{
|
|
12353
12353
|
className: cn(
|
|
12354
|
-
"flex items-start gap-3 rounded-
|
|
12354
|
+
"flex items-start gap-3 rounded-container bg-background/80 backdrop-blur-sm px-4 py-3 border border-border/10",
|
|
12355
12355
|
position === "top" ? "rounded-bl-none" : "rounded-tl-none",
|
|
12356
12356
|
className
|
|
12357
12357
|
),
|
|
12358
12358
|
children: [
|
|
12359
|
-
portrait && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-12 h-12 rounded-full overflow-hidden border-2 border-
|
|
12359
|
+
portrait && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-12 h-12 rounded-full overflow-hidden border-2 border-warning/60", children: /* @__PURE__ */ jsx(
|
|
12360
12360
|
"img",
|
|
12361
12361
|
{
|
|
12362
12362
|
src: portrait,
|
|
@@ -12365,8 +12365,8 @@ function DialogueBubble({
|
|
|
12365
12365
|
}
|
|
12366
12366
|
) }),
|
|
12367
12367
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 min-w-0", children: [
|
|
12368
|
-
speaker && /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-
|
|
12369
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm text-
|
|
12368
|
+
speaker && /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-warning", children: speaker }),
|
|
12369
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-foreground leading-relaxed", children: text })
|
|
12370
12370
|
] })
|
|
12371
12371
|
]
|
|
12372
12372
|
}
|
|
@@ -12393,7 +12393,7 @@ function ChoiceButton({
|
|
|
12393
12393
|
disabled,
|
|
12394
12394
|
onClick,
|
|
12395
12395
|
className: cn(
|
|
12396
|
-
"w-full text-left px-4 py-2.5 rounded-
|
|
12396
|
+
"w-full text-left px-4 py-2.5 rounded-interactive border transition-all duration-150",
|
|
12397
12397
|
"flex items-center gap-2",
|
|
12398
12398
|
selected ? "bg-accent/15 border-accent text-foreground" : "bg-muted/40 border-border text-foreground hover:bg-muted hover:border-border",
|
|
12399
12399
|
disabled && "opacity-40 cursor-not-allowed hover:bg-muted/40 hover:border-border",
|
|
@@ -12446,7 +12446,7 @@ function ActionButton({
|
|
|
12446
12446
|
disabled: isDisabled,
|
|
12447
12447
|
onClick,
|
|
12448
12448
|
className: cn(
|
|
12449
|
-
"relative inline-flex items-center gap-1.5 rounded-
|
|
12449
|
+
"relative inline-flex items-center gap-1.5 rounded-interactive border font-medium overflow-hidden transition-colors duration-150",
|
|
12450
12450
|
sizes.button,
|
|
12451
12451
|
variantStyles8[variant],
|
|
12452
12452
|
isDisabled && "opacity-60 cursor-not-allowed",
|
|
@@ -12489,9 +12489,9 @@ var init_ActionButton = __esm({
|
|
|
12489
12489
|
init_cn();
|
|
12490
12490
|
init_Icon();
|
|
12491
12491
|
sizeMap13 = {
|
|
12492
|
-
sm: { button: "px-3
|
|
12493
|
-
md: { button: "px-4
|
|
12494
|
-
lg: { button: "
|
|
12492
|
+
sm: { button: "h-button-sm px-3 text-xs", hotkey: "text-[9px] px-1", icon: "text-xs" },
|
|
12493
|
+
md: { button: "h-button-md px-4 text-sm", hotkey: "text-xs px-1.5", icon: "text-sm" },
|
|
12494
|
+
lg: { button: "h-button-lg px-5 text-base", hotkey: "text-xs px-2", icon: "text-base" }
|
|
12495
12495
|
};
|
|
12496
12496
|
variantStyles8 = {
|
|
12497
12497
|
primary: "bg-primary text-primary-foreground hover:bg-primary-hover border-primary",
|
|
@@ -12571,7 +12571,7 @@ function MiniMap({
|
|
|
12571
12571
|
"div",
|
|
12572
12572
|
{
|
|
12573
12573
|
className: cn(
|
|
12574
|
-
"relative inline-block border border-
|
|
12574
|
+
"relative inline-block border border-border/20 rounded-container",
|
|
12575
12575
|
className
|
|
12576
12576
|
),
|
|
12577
12577
|
children: /* @__PURE__ */ jsx(
|
|
@@ -15287,7 +15287,7 @@ function ActionTile({
|
|
|
15287
15287
|
{
|
|
15288
15288
|
display: "flex",
|
|
15289
15289
|
className: cn(
|
|
15290
|
-
"flex-col items-center gap-1 rounded-
|
|
15290
|
+
"flex-col items-center gap-1 rounded-container border-2 transition-all select-none",
|
|
15291
15291
|
config.px,
|
|
15292
15292
|
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",
|
|
15293
15293
|
className
|
|
@@ -16631,12 +16631,12 @@ function IsometricCanvas({
|
|
|
16631
16631
|
return /* @__PURE__ */ jsx(
|
|
16632
16632
|
Box,
|
|
16633
16633
|
{
|
|
16634
|
-
className: cn("relative w-full overflow-hidden rounded-
|
|
16634
|
+
className: cn("relative w-full overflow-hidden rounded-container", className),
|
|
16635
16635
|
style: { height: viewportSize.height },
|
|
16636
16636
|
"data-testid": "game-canvas-empty",
|
|
16637
|
-
children: /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center h-full bg-[var(--color-card)] rounded-
|
|
16637
|
+
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: [
|
|
16638
16638
|
/* @__PURE__ */ jsx(Icon, { name: "map", size: "xl" }),
|
|
16639
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-
|
|
16639
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-muted-foreground", children: t("canvas.emptyMessage") || "No map data loaded" })
|
|
16640
16640
|
] }) })
|
|
16641
16641
|
}
|
|
16642
16642
|
);
|
|
@@ -17034,19 +17034,19 @@ function BattleBoard({
|
|
|
17034
17034
|
}
|
|
17035
17035
|
)
|
|
17036
17036
|
] }),
|
|
17037
|
-
gameResult && (gameOverOverlay ? gameOverOverlay(ctx) : /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 z-50 flex items-center justify-center bg-
|
|
17037
|
+
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: [
|
|
17038
17038
|
/* @__PURE__ */ jsx(
|
|
17039
17039
|
Typography,
|
|
17040
17040
|
{
|
|
17041
17041
|
variant: "h2",
|
|
17042
17042
|
className: cn(
|
|
17043
17043
|
"text-4xl font-black tracking-widest uppercase",
|
|
17044
|
-
gameResult === "victory" ? "text-
|
|
17044
|
+
gameResult === "victory" ? "text-warning" : "text-error"
|
|
17045
17045
|
),
|
|
17046
17046
|
children: gameResult === "victory" ? t("battle.victory") : t("battle.defeat")
|
|
17047
17047
|
}
|
|
17048
17048
|
),
|
|
17049
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "body1", className: "text-
|
|
17049
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body1", className: "text-muted-foreground", children: [
|
|
17050
17050
|
t("battle.turnsPlayed"),
|
|
17051
17051
|
": ",
|
|
17052
17052
|
currentTurn
|
|
@@ -21092,7 +21092,7 @@ function BuilderBoard({
|
|
|
21092
21092
|
backgroundPosition: "center"
|
|
21093
21093
|
},
|
|
21094
21094
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
21095
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
21095
|
+
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,
|
|
21096
21096
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
21097
21097
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", weight: "bold", children: entity.title }),
|
|
21098
21098
|
/* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.description })
|
|
@@ -21130,7 +21130,7 @@ function BuilderBoard({
|
|
|
21130
21130
|
{
|
|
21131
21131
|
gap: "sm",
|
|
21132
21132
|
align: "center",
|
|
21133
|
-
className: `p-3 border-2 rounded ${result ? result.correct ? "border-
|
|
21133
|
+
className: `p-3 border-2 rounded ${result ? result.correct ? "border-success" : "border-error" : selectedComponent ? "border-dashed border-foreground cursor-pointer" : "border-border"}`,
|
|
21134
21134
|
onClick: () => handlePlaceComponent(slot.id),
|
|
21135
21135
|
children: [
|
|
21136
21136
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1", children: [
|
|
@@ -21145,7 +21145,7 @@ function BuilderBoard({
|
|
|
21145
21145
|
] }) : null,
|
|
21146
21146
|
placedComp.label
|
|
21147
21147
|
] }),
|
|
21148
|
-
result && /* @__PURE__ */ jsx(Icon, { icon: result.correct ? CheckCircle : XCircle, size: "sm", className: result.correct ? "text-
|
|
21148
|
+
result && /* @__PURE__ */ jsx(Icon, { icon: result.correct ? CheckCircle : XCircle, size: "sm", className: result.correct ? "text-success" : "text-error" })
|
|
21149
21149
|
] }) : /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: t("builder.empty") })
|
|
21150
21150
|
]
|
|
21151
21151
|
},
|
|
@@ -21154,10 +21154,10 @@ function BuilderBoard({
|
|
|
21154
21154
|
}) })
|
|
21155
21155
|
] }) }),
|
|
21156
21156
|
submitted && /* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", children: [
|
|
21157
|
-
/* @__PURE__ */ jsx(Icon, { icon: allCorrect ? CheckCircle : XCircle, size: "lg", className: allCorrect ? "text-
|
|
21157
|
+
/* @__PURE__ */ jsx(Icon, { icon: allCorrect ? CheckCircle : XCircle, size: "lg", className: allCorrect ? "text-success" : "text-error" }),
|
|
21158
21158
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "bold", children: allCorrect ? entity.successMessage ?? t("builder.success") : entity.failMessage ?? t("builder.incorrect") })
|
|
21159
21159
|
] }) }),
|
|
21160
|
-
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
21160
|
+
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-warning", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.hint }) }),
|
|
21161
21161
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "center", children: [
|
|
21162
21162
|
!submitted ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleSubmit, disabled: !allPlaced, children: [
|
|
21163
21163
|
/* @__PURE__ */ jsx(Icon, { icon: Wrench, size: "sm" }),
|
|
@@ -22779,7 +22779,7 @@ function CanvasEffectEngine({
|
|
|
22779
22779
|
flash && /* @__PURE__ */ jsx(
|
|
22780
22780
|
Box,
|
|
22781
22781
|
{
|
|
22782
|
-
className: "absolute inset-0 z-20 pointer-events-none rounded-
|
|
22782
|
+
className: "absolute inset-0 z-20 pointer-events-none rounded-container",
|
|
22783
22783
|
style: { backgroundColor: flash.color, opacity: flash.alpha }
|
|
22784
22784
|
}
|
|
22785
22785
|
),
|
|
@@ -22847,7 +22847,7 @@ function EmojiEffect({
|
|
|
22847
22847
|
/* @__PURE__ */ jsx(
|
|
22848
22848
|
Box,
|
|
22849
22849
|
{
|
|
22850
|
-
className: "absolute rounded-
|
|
22850
|
+
className: "absolute rounded-pill animate-ping",
|
|
22851
22851
|
style: {
|
|
22852
22852
|
width: 48 * intensity,
|
|
22853
22853
|
height: 48 * intensity,
|
|
@@ -24664,7 +24664,7 @@ function ClassifierBoard({
|
|
|
24664
24664
|
backgroundPosition: "center"
|
|
24665
24665
|
},
|
|
24666
24666
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
24667
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
24667
|
+
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,
|
|
24668
24668
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
24669
24669
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", weight: "bold", children: entity.title }),
|
|
24670
24670
|
/* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.description })
|
|
@@ -24679,7 +24679,7 @@ function ClassifierBoard({
|
|
|
24679
24679
|
/* @__PURE__ */ jsx(VStack, { gap: "md", children: categories.map((cat) => {
|
|
24680
24680
|
const catItems = items.filter((item) => assignments[item.id] === cat.id);
|
|
24681
24681
|
return /* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
24682
|
-
cat.imageUrl && /* @__PURE__ */ jsx(Box, { className: "w-full h-16 overflow-hidden rounded-
|
|
24682
|
+
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" }) }),
|
|
24683
24683
|
/* @__PURE__ */ jsxs(HStack, { justify: "between", align: "center", children: [
|
|
24684
24684
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "bold", children: cat.label }),
|
|
24685
24685
|
/* @__PURE__ */ jsx(Badge, { size: "sm", children: catItems.length })
|
|
@@ -24690,12 +24690,12 @@ function ClassifierBoard({
|
|
|
24690
24690
|
Badge,
|
|
24691
24691
|
{
|
|
24692
24692
|
size: "sm",
|
|
24693
|
-
className: `cursor-pointer ${result ? result.correct ? "border-
|
|
24693
|
+
className: `cursor-pointer ${result ? result.correct ? "border-success bg-success/10" : "border-error bg-error/10" : ""}`,
|
|
24694
24694
|
onClick: () => handleUnassign(item.id),
|
|
24695
24695
|
children: [
|
|
24696
24696
|
item.iconUrl && /* @__PURE__ */ jsx("img", { src: item.iconUrl, alt: "", className: "w-3 h-3 object-contain inline-block" }),
|
|
24697
24697
|
item.label,
|
|
24698
|
-
result && /* @__PURE__ */ jsx(Icon, { icon: result.correct ? CheckCircle : XCircle, size: "xs", className: result.correct ? "text-
|
|
24698
|
+
result && /* @__PURE__ */ jsx(Icon, { icon: result.correct ? CheckCircle : XCircle, size: "xs", className: result.correct ? "text-success" : "text-error" })
|
|
24699
24699
|
]
|
|
24700
24700
|
},
|
|
24701
24701
|
item.id
|
|
@@ -24718,11 +24718,11 @@ function ClassifierBoard({
|
|
|
24718
24718
|
] }) }, cat.id);
|
|
24719
24719
|
}) }),
|
|
24720
24720
|
submitted && /* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", children: [
|
|
24721
|
-
/* @__PURE__ */ jsx(Icon, { icon: allCorrect ? CheckCircle : XCircle, size: "lg", className: allCorrect ? "text-
|
|
24721
|
+
/* @__PURE__ */ jsx(Icon, { icon: allCorrect ? CheckCircle : XCircle, size: "lg", className: allCorrect ? "text-success" : "text-error" }),
|
|
24722
24722
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "bold", children: allCorrect ? entity.successMessage ?? t("classifier.allCorrect") : `${correctCount}/${items.length} ${t("classifier.correct")}` }),
|
|
24723
24723
|
!allCorrect && entity.failMessage && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-muted-foreground", children: entity.failMessage })
|
|
24724
24724
|
] }) }),
|
|
24725
|
-
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
24725
|
+
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-warning", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.hint }) }),
|
|
24726
24726
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "center", children: [
|
|
24727
24727
|
!submitted ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleSubmit, disabled: !allAssigned, children: [
|
|
24728
24728
|
/* @__PURE__ */ jsx(Icon, { icon: Send, size: "sm" }),
|
|
@@ -25770,7 +25770,7 @@ function CraftingRecipe({
|
|
|
25770
25770
|
Box,
|
|
25771
25771
|
{
|
|
25772
25772
|
className: cn(
|
|
25773
|
-
"flex flex-wrap items-center gap-3 rounded-
|
|
25773
|
+
"flex flex-wrap items-center gap-3 rounded-container bg-muted/50 border border-border/50 p-3",
|
|
25774
25774
|
className
|
|
25775
25775
|
),
|
|
25776
25776
|
children: [
|
|
@@ -25787,10 +25787,10 @@ function CraftingRecipe({
|
|
|
25787
25787
|
className: cn(!hasSufficient && "opacity-50")
|
|
25788
25788
|
}
|
|
25789
25789
|
) }),
|
|
25790
|
-
index < inputs.length - 1 && /* @__PURE__ */ jsx(Icon, { name: "plus", size: "sm", className: "text-
|
|
25790
|
+
index < inputs.length - 1 && /* @__PURE__ */ jsx(Icon, { name: "plus", size: "sm", className: "text-muted-foreground" })
|
|
25791
25791
|
] }, index);
|
|
25792
25792
|
}) }),
|
|
25793
|
-
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: "md", className: "text-
|
|
25793
|
+
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: "md", className: "text-muted-foreground" }),
|
|
25794
25794
|
/* @__PURE__ */ jsx(
|
|
25795
25795
|
ItemSlot,
|
|
25796
25796
|
{
|
|
@@ -25878,7 +25878,7 @@ function DPad({
|
|
|
25878
25878
|
createButton("up"),
|
|
25879
25879
|
/* @__PURE__ */ jsx("div", {}),
|
|
25880
25880
|
createButton("left"),
|
|
25881
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-
|
|
25881
|
+
/* @__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" }) }),
|
|
25882
25882
|
createButton("right"),
|
|
25883
25883
|
/* @__PURE__ */ jsx("div", {}),
|
|
25884
25884
|
createButton("down"),
|
|
@@ -30063,7 +30063,7 @@ function StatBadge({
|
|
|
30063
30063
|
"div",
|
|
30064
30064
|
{
|
|
30065
30065
|
className: cn(
|
|
30066
|
-
"inline-flex items-center gap-2 rounded-
|
|
30066
|
+
"inline-flex items-center gap-2 rounded-container border backdrop-blur-sm",
|
|
30067
30067
|
sizeMap17[size] ?? sizeMap17.md,
|
|
30068
30068
|
variantMap2[variant] ?? variantMap2.default,
|
|
30069
30069
|
className
|
|
@@ -30209,10 +30209,10 @@ function QuestTracker({
|
|
|
30209
30209
|
Box,
|
|
30210
30210
|
{
|
|
30211
30211
|
className: cn(
|
|
30212
|
-
"flex items-start gap-3 rounded-
|
|
30213
|
-
isActive && !isCompleted && "bg-
|
|
30214
|
-
isCompleted && "bg-
|
|
30215
|
-
!isActive && !isCompleted && "bg-
|
|
30212
|
+
"flex items-start gap-3 rounded-container px-3 py-2 transition-colors",
|
|
30213
|
+
isActive && !isCompleted && "bg-info/20 border border-info/50",
|
|
30214
|
+
isCompleted && "bg-success/10 border border-success/30 opacity-70",
|
|
30215
|
+
!isActive && !isCompleted && "bg-muted/30 border border-border/30"
|
|
30216
30216
|
),
|
|
30217
30217
|
children: [
|
|
30218
30218
|
/* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 pt-0.5", children: /* @__PURE__ */ jsx(
|
|
@@ -30230,9 +30230,9 @@ function QuestTracker({
|
|
|
30230
30230
|
variant: "body2",
|
|
30231
30231
|
className: cn(
|
|
30232
30232
|
"font-medium truncate",
|
|
30233
|
-
isCompleted && "line-through text-
|
|
30234
|
-
isActive && !isCompleted && "text-
|
|
30235
|
-
!isActive && !isCompleted && "text-
|
|
30233
|
+
isCompleted && "line-through text-muted-foreground",
|
|
30234
|
+
isActive && !isCompleted && "text-info",
|
|
30235
|
+
!isActive && !isCompleted && "text-muted-foreground"
|
|
30236
30236
|
),
|
|
30237
30237
|
children: quest.title
|
|
30238
30238
|
}
|
|
@@ -30250,7 +30250,7 @@ function QuestTracker({
|
|
|
30250
30250
|
Typography,
|
|
30251
30251
|
{
|
|
30252
30252
|
variant: "caption",
|
|
30253
|
-
className: "text-
|
|
30253
|
+
className: "text-muted-foreground mt-1",
|
|
30254
30254
|
children: [
|
|
30255
30255
|
quest.progress,
|
|
30256
30256
|
" / ",
|
|
@@ -30307,14 +30307,14 @@ function PowerupSlots({
|
|
|
30307
30307
|
{
|
|
30308
30308
|
className: cn(
|
|
30309
30309
|
"absolute -bottom-1 left-1/2 -translate-x-1/2",
|
|
30310
|
-
"rounded px-1 py-px",
|
|
30311
|
-
"bg-
|
|
30310
|
+
"rounded-interactive px-1 py-px",
|
|
30311
|
+
"bg-background/80 border border-border"
|
|
30312
30312
|
),
|
|
30313
30313
|
children: /* @__PURE__ */ jsx(
|
|
30314
30314
|
Typography,
|
|
30315
30315
|
{
|
|
30316
30316
|
variant: "caption",
|
|
30317
|
-
className: "text-[9px] font-mono font-bold text-
|
|
30317
|
+
className: "text-[9px] font-mono font-bold text-warning whitespace-nowrap",
|
|
30318
30318
|
children: formatTime2(powerup.remainingTime)
|
|
30319
30319
|
}
|
|
30320
30320
|
)
|
|
@@ -30347,6 +30347,8 @@ function GameCanvas2D({
|
|
|
30347
30347
|
height = 600,
|
|
30348
30348
|
onDraw,
|
|
30349
30349
|
onTick,
|
|
30350
|
+
tickEvent,
|
|
30351
|
+
drawEvent,
|
|
30350
30352
|
fps = 60,
|
|
30351
30353
|
className
|
|
30352
30354
|
}) {
|
|
@@ -30354,10 +30356,17 @@ function GameCanvas2D({
|
|
|
30354
30356
|
const rafRef = React98.useRef(0);
|
|
30355
30357
|
const frameRef = React98.useRef(0);
|
|
30356
30358
|
const lastTimeRef = React98.useRef(0);
|
|
30359
|
+
const emit = useEmitEvent();
|
|
30357
30360
|
const onDrawRef = React98.useRef(onDraw);
|
|
30358
30361
|
onDrawRef.current = onDraw;
|
|
30359
30362
|
const onTickRef = React98.useRef(onTick);
|
|
30360
30363
|
onTickRef.current = onTick;
|
|
30364
|
+
const tickEventRef = React98.useRef(tickEvent);
|
|
30365
|
+
tickEventRef.current = tickEvent;
|
|
30366
|
+
const drawEventRef = React98.useRef(drawEvent);
|
|
30367
|
+
drawEventRef.current = drawEvent;
|
|
30368
|
+
const emitRef = React98.useRef(emit);
|
|
30369
|
+
emitRef.current = emit;
|
|
30361
30370
|
React98.useEffect(() => {
|
|
30362
30371
|
const canvas = canvasRef.current;
|
|
30363
30372
|
if (!canvas) return;
|
|
@@ -30374,8 +30383,15 @@ function GameCanvas2D({
|
|
|
30374
30383
|
if (elapsed >= interval) {
|
|
30375
30384
|
const dt = elapsed / 1e3;
|
|
30376
30385
|
lastTimeRef.current = timestamp - elapsed % interval;
|
|
30386
|
+
const frame = frameRef.current;
|
|
30377
30387
|
onTickRef.current?.(dt);
|
|
30378
|
-
|
|
30388
|
+
if (tickEventRef.current) {
|
|
30389
|
+
emitRef.current(tickEventRef.current, { dt, frame });
|
|
30390
|
+
}
|
|
30391
|
+
onDrawRef.current?.(ctx, frame);
|
|
30392
|
+
if (drawEventRef.current) {
|
|
30393
|
+
emitRef.current(drawEventRef.current, { frame });
|
|
30394
|
+
}
|
|
30379
30395
|
frameRef.current += 1;
|
|
30380
30396
|
}
|
|
30381
30397
|
rafRef.current = requestAnimationFrame(loop);
|
|
@@ -30401,6 +30417,7 @@ var init_GameCanvas2D = __esm({
|
|
|
30401
30417
|
"use client";
|
|
30402
30418
|
init_cn();
|
|
30403
30419
|
init_Box();
|
|
30420
|
+
init_useEventBus();
|
|
30404
30421
|
GameCanvas2D.displayName = "GameCanvas2D";
|
|
30405
30422
|
}
|
|
30406
30423
|
});
|
|
@@ -30419,7 +30436,7 @@ function HealthPanel({
|
|
|
30419
30436
|
Box,
|
|
30420
30437
|
{
|
|
30421
30438
|
className: cn(
|
|
30422
|
-
"rounded-
|
|
30439
|
+
"rounded-container bg-[var(--color-card)]/90 border border-border backdrop-blur-sm",
|
|
30423
30440
|
sizes.padding,
|
|
30424
30441
|
className
|
|
30425
30442
|
),
|
|
@@ -30430,7 +30447,7 @@ function HealthPanel({
|
|
|
30430
30447
|
{
|
|
30431
30448
|
variant: "caption",
|
|
30432
30449
|
weight: "bold",
|
|
30433
|
-
className: "text-
|
|
30450
|
+
className: "text-muted-foreground uppercase tracking-wider",
|
|
30434
30451
|
children: label
|
|
30435
30452
|
}
|
|
30436
30453
|
),
|
|
@@ -30451,7 +30468,7 @@ function HealthPanel({
|
|
|
30451
30468
|
as: "span",
|
|
30452
30469
|
variant: "caption",
|
|
30453
30470
|
weight: "bold",
|
|
30454
|
-
className: "text-
|
|
30471
|
+
className: "text-info ml-1",
|
|
30455
30472
|
children: [
|
|
30456
30473
|
"+",
|
|
30457
30474
|
shield
|
|
@@ -30476,14 +30493,14 @@ function HealthPanel({
|
|
|
30476
30493
|
Box,
|
|
30477
30494
|
{
|
|
30478
30495
|
className: cn(
|
|
30479
|
-
"relative overflow-hidden rounded-
|
|
30496
|
+
"relative overflow-hidden rounded-container bg-muted",
|
|
30480
30497
|
size === "sm" ? "h-1" : size === "md" ? "h-1.5" : "h-2",
|
|
30481
30498
|
"w-full"
|
|
30482
30499
|
),
|
|
30483
30500
|
children: /* @__PURE__ */ jsx(
|
|
30484
30501
|
Box,
|
|
30485
30502
|
{
|
|
30486
|
-
className: "absolute inset-y-0 left-0 rounded-
|
|
30503
|
+
className: "absolute inset-y-0 left-0 rounded-container bg-info transition-all duration-300",
|
|
30487
30504
|
style: { width: `${Math.min(100, shield / max * 100)}%` }
|
|
30488
30505
|
}
|
|
30489
30506
|
)
|
|
@@ -30542,7 +30559,7 @@ function ScoreBoard({
|
|
|
30542
30559
|
Card,
|
|
30543
30560
|
{
|
|
30544
30561
|
className: cn(
|
|
30545
|
-
"bg-[var(--color-card)]/90 border-
|
|
30562
|
+
"bg-[var(--color-card)]/90 border-border backdrop-blur-sm",
|
|
30546
30563
|
className
|
|
30547
30564
|
),
|
|
30548
30565
|
children: /* @__PURE__ */ jsx(CardContent, { className: "p-3", children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3 flex-wrap", children: [
|
|
@@ -30659,7 +30676,7 @@ function TurnPanel({
|
|
|
30659
30676
|
Box,
|
|
30660
30677
|
{
|
|
30661
30678
|
className: cn(
|
|
30662
|
-
"flex items-center gap-3 rounded-
|
|
30679
|
+
"flex items-center gap-3 rounded-container bg-[var(--color-card)]/90 border border-border backdrop-blur-sm px-3 py-2",
|
|
30663
30680
|
className
|
|
30664
30681
|
),
|
|
30665
30682
|
children: [
|
|
@@ -30711,7 +30728,7 @@ function EnemyPlate({
|
|
|
30711
30728
|
Box,
|
|
30712
30729
|
{
|
|
30713
30730
|
className: cn(
|
|
30714
|
-
"inline-flex flex-col gap-1 rounded-
|
|
30731
|
+
"inline-flex flex-col gap-1 rounded-container bg-[var(--color-card)]/90 border border-border backdrop-blur-sm px-3 py-1.5",
|
|
30715
30732
|
"min-w-[120px]",
|
|
30716
30733
|
className
|
|
30717
30734
|
),
|
|
@@ -30805,7 +30822,7 @@ function UnitCommandBar({
|
|
|
30805
30822
|
Box,
|
|
30806
30823
|
{
|
|
30807
30824
|
className: cn(
|
|
30808
|
-
"flex items-center gap-1.5 rounded-
|
|
30825
|
+
"flex items-center gap-1.5 rounded-container bg-[var(--color-card)]/90 border border-border backdrop-blur-sm px-2 py-1.5",
|
|
30809
30826
|
className
|
|
30810
30827
|
),
|
|
30811
30828
|
children: commands.map((command, i) => /* @__PURE__ */ jsxs(Box, { className: "flex flex-col items-center gap-0.5", children: [
|
|
@@ -30890,8 +30907,8 @@ function GameHud({
|
|
|
30890
30907
|
className: cn(
|
|
30891
30908
|
"relative z-10",
|
|
30892
30909
|
positionMap[position],
|
|
30893
|
-
transparent && "bg-gradient-to-b from-
|
|
30894
|
-
position === "bottom" && "bg-gradient-to-t from-
|
|
30910
|
+
transparent && "bg-gradient-to-b from-background/50 to-transparent",
|
|
30911
|
+
position === "bottom" && "bg-gradient-to-t from-background/50 to-transparent",
|
|
30895
30912
|
className
|
|
30896
30913
|
),
|
|
30897
30914
|
children: /* @__PURE__ */ jsx("div", { className: "flex gap-4", children: stats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) })
|
|
@@ -31049,8 +31066,8 @@ function DialogueBox({
|
|
|
31049
31066
|
tabIndex: 0,
|
|
31050
31067
|
role: "dialog",
|
|
31051
31068
|
"aria-label": "Dialogue",
|
|
31052
|
-
children: /* @__PURE__ */ jsx("div", { className: "mx-4 my-4 bg-[var(--color-card)] bg-opacity-95 border-2 border-
|
|
31053
|
-
dialogue.portrait && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 p-4 border-r border-
|
|
31069
|
+
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: [
|
|
31070
|
+
dialogue.portrait && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 p-4 border-r border-border", children: /* @__PURE__ */ jsx(
|
|
31054
31071
|
"img",
|
|
31055
31072
|
{
|
|
31056
31073
|
src: dialogue.portrait,
|
|
@@ -31060,7 +31077,7 @@ function DialogueBox({
|
|
|
31060
31077
|
}
|
|
31061
31078
|
) }),
|
|
31062
31079
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 p-4", children: [
|
|
31063
|
-
/* @__PURE__ */ jsx("div", { className: "text-
|
|
31080
|
+
/* @__PURE__ */ jsx("div", { className: "text-warning font-bold mb-2", children: dialogue.speaker }),
|
|
31064
31081
|
/* @__PURE__ */ jsxs("div", { className: "text-[var(--color-foreground)] text-lg leading-relaxed min-h-[60px]", children: [
|
|
31065
31082
|
displayedText,
|
|
31066
31083
|
isTyping && /* @__PURE__ */ jsx("span", { className: "animate-pulse", children: "\u258C" })
|
|
@@ -31070,9 +31087,9 @@ function DialogueBox({
|
|
|
31070
31087
|
{
|
|
31071
31088
|
type: "button",
|
|
31072
31089
|
className: cn(
|
|
31073
|
-
"block w-full text-left px-4 py-2 rounded transition-colors",
|
|
31074
|
-
"hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-
|
|
31075
|
-
selectedChoice === index ? "bg-[var(--color-surface,#374151)] text-
|
|
31090
|
+
"block w-full text-left px-4 py-2 rounded-interactive transition-colors",
|
|
31091
|
+
"hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-warning",
|
|
31092
|
+
selectedChoice === index ? "bg-[var(--color-surface,#374151)] text-warning" : "bg-[var(--color-card)] text-[var(--color-foreground)]"
|
|
31076
31093
|
),
|
|
31077
31094
|
onClick: (e) => {
|
|
31078
31095
|
e.stopPropagation();
|
|
@@ -31080,7 +31097,7 @@ function DialogueBox({
|
|
|
31080
31097
|
onChoice?.(choice);
|
|
31081
31098
|
},
|
|
31082
31099
|
children: [
|
|
31083
|
-
/* @__PURE__ */ jsxs("span", { className: "text-
|
|
31100
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground mr-2", children: [
|
|
31084
31101
|
index + 1,
|
|
31085
31102
|
"."
|
|
31086
31103
|
] }),
|
|
@@ -31089,7 +31106,7 @@ function DialogueBox({
|
|
|
31089
31106
|
},
|
|
31090
31107
|
index
|
|
31091
31108
|
)) }),
|
|
31092
|
-
!isTyping && !dialogue.choices?.length && /* @__PURE__ */ jsx("div", { className: "mt-4 text-
|
|
31109
|
+
!isTyping && !dialogue.choices?.length && /* @__PURE__ */ jsx("div", { className: "mt-4 text-muted-foreground text-sm animate-pulse", children: "Press SPACE or click to continue..." })
|
|
31093
31110
|
] })
|
|
31094
31111
|
] }) })
|
|
31095
31112
|
}
|
|
@@ -31192,7 +31209,7 @@ function InventoryPanel({
|
|
|
31192
31209
|
/* @__PURE__ */ jsx(
|
|
31193
31210
|
"div",
|
|
31194
31211
|
{
|
|
31195
|
-
className: "grid gap-1 bg-[var(--color-card)] p-2 rounded-
|
|
31212
|
+
className: "grid gap-1 bg-[var(--color-card)] p-2 rounded-container border border-border",
|
|
31196
31213
|
style: {
|
|
31197
31214
|
gridTemplateColumns: `repeat(${safeColumns}, ${slotSize}px)`,
|
|
31198
31215
|
gridTemplateRows: `repeat(${rows}, ${slotSize}px)`
|
|
@@ -31204,8 +31221,8 @@ function InventoryPanel({
|
|
|
31204
31221
|
className: cn(
|
|
31205
31222
|
"relative flex items-center justify-center",
|
|
31206
31223
|
"bg-[var(--color-card)] border rounded transition-colors",
|
|
31207
|
-
"hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-
|
|
31208
|
-
selectedSlot === index ? "border-
|
|
31224
|
+
"hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-info",
|
|
31225
|
+
selectedSlot === index ? "border-warning bg-[var(--color-surface,#374151)]" : "border-muted"
|
|
31209
31226
|
),
|
|
31210
31227
|
style: { width: slotSize, height: slotSize },
|
|
31211
31228
|
onClick: () => handleSlotClick(index),
|
|
@@ -31224,8 +31241,8 @@ function InventoryPanel({
|
|
|
31224
31241
|
className: "w-8 h-8 object-contain",
|
|
31225
31242
|
style: { imageRendering: "pixelated" }
|
|
31226
31243
|
}
|
|
31227
|
-
) : /* @__PURE__ */ jsx("div", { className: "w-8 h-8 bg-
|
|
31228
|
-
item.quantity > 1 && /* @__PURE__ */ jsx("span", { className: "absolute bottom-0 right-0 bg-
|
|
31244
|
+
) : /* @__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() }),
|
|
31245
|
+
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 })
|
|
31229
31246
|
] })
|
|
31230
31247
|
},
|
|
31231
31248
|
index
|
|
@@ -31235,7 +31252,7 @@ function InventoryPanel({
|
|
|
31235
31252
|
showTooltips && hoveredItem && /* @__PURE__ */ jsxs(
|
|
31236
31253
|
"div",
|
|
31237
31254
|
{
|
|
31238
|
-
className: "fixed z-50 bg-[var(--color-card)] border border-
|
|
31255
|
+
className: "fixed z-50 bg-[var(--color-card)] border border-border rounded-container p-2 shadow-elevation-card pointer-events-none",
|
|
31239
31256
|
style: {
|
|
31240
31257
|
left: tooltipPosition.x,
|
|
31241
31258
|
top: tooltipPosition.y,
|
|
@@ -31243,8 +31260,8 @@ function InventoryPanel({
|
|
|
31243
31260
|
},
|
|
31244
31261
|
children: [
|
|
31245
31262
|
/* @__PURE__ */ jsx("div", { className: "font-semibold text-[var(--color-foreground)]", children: hoveredItem.name || hoveredItem.type }),
|
|
31246
|
-
hoveredItem.description && /* @__PURE__ */ jsx("div", { className: "text-sm text-
|
|
31247
|
-
/* @__PURE__ */ jsxs("div", { className: "text-xs text-
|
|
31263
|
+
hoveredItem.description && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground mt-1", children: hoveredItem.description }),
|
|
31264
|
+
/* @__PURE__ */ jsxs("div", { className: "text-xs text-muted-foreground mt-1", children: [
|
|
31248
31265
|
"Quantity: ",
|
|
31249
31266
|
hoveredItem.quantity
|
|
31250
31267
|
] })
|
|
@@ -31322,7 +31339,7 @@ function GameMenu({
|
|
|
31322
31339
|
children: title
|
|
31323
31340
|
}
|
|
31324
31341
|
),
|
|
31325
|
-
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-2 text-lg text-
|
|
31342
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-2 text-lg text-muted-foreground tracking-widest uppercase", children: subtitle })
|
|
31326
31343
|
] }),
|
|
31327
31344
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4 w-full max-w-md", children: resolvedOptions.map((option, index) => /* @__PURE__ */ jsx(
|
|
31328
31345
|
"button",
|
|
@@ -31330,10 +31347,10 @@ function GameMenu({
|
|
|
31330
31347
|
onClick: () => handleOptionClick(option),
|
|
31331
31348
|
disabled: option.disabled,
|
|
31332
31349
|
className: cn(
|
|
31333
|
-
"w-full py-4 px-8 rounded-
|
|
31350
|
+
"w-full py-4 px-8 rounded-container border-2 font-bold text-lg",
|
|
31334
31351
|
"transition-all duration-200 transform",
|
|
31335
31352
|
"hover:scale-105 active:scale-95",
|
|
31336
|
-
"focus:outline-none focus:ring-4 focus:ring-
|
|
31353
|
+
"focus:outline-none focus:ring-4 focus:ring-foreground/25",
|
|
31337
31354
|
variantMap3[option.variant ?? "secondary"] ?? variantMap3.secondary,
|
|
31338
31355
|
option.disabled && "opacity-50 cursor-not-allowed hover:scale-100"
|
|
31339
31356
|
),
|
|
@@ -31345,8 +31362,8 @@ function GameMenu({
|
|
|
31345
31362
|
index
|
|
31346
31363
|
)) }),
|
|
31347
31364
|
/* @__PURE__ */ jsxs("div", { className: "absolute inset-0 pointer-events-none overflow-hidden", children: [
|
|
31348
|
-
/* @__PURE__ */ jsx("div", { className: "absolute top-1/4 left-1/4 w-64 h-64 bg-
|
|
31349
|
-
/* @__PURE__ */ jsx("div", { className: "absolute bottom-1/4 right-1/4 w-96 h-96 bg-
|
|
31365
|
+
/* @__PURE__ */ jsx("div", { className: "absolute top-1/4 left-1/4 w-64 h-64 bg-info/10 rounded-container blur-3xl" }),
|
|
31366
|
+
/* @__PURE__ */ jsx("div", { className: "absolute bottom-1/4 right-1/4 w-96 h-96 bg-accent/10 rounded-container blur-3xl" })
|
|
31350
31367
|
] })
|
|
31351
31368
|
]
|
|
31352
31369
|
}
|
|
@@ -31359,9 +31376,9 @@ var init_GameMenu = __esm({
|
|
|
31359
31376
|
init_cn();
|
|
31360
31377
|
init_useEventBus();
|
|
31361
31378
|
variantMap3 = {
|
|
31362
|
-
primary: "bg-[var(--color-primary)] hover:bg-
|
|
31363
|
-
secondary: "bg-[var(--color-surface,#374151)] hover:bg-
|
|
31364
|
-
ghost: "bg-transparent hover:bg-
|
|
31379
|
+
primary: "bg-[var(--color-primary)] hover:bg-info text-[var(--color-primary-foreground)] border-info shadow-lg shadow-info/25",
|
|
31380
|
+
secondary: "bg-[var(--color-surface,#374151)] hover:bg-muted text-[var(--color-foreground)] border-muted",
|
|
31381
|
+
ghost: "bg-transparent hover:bg-foreground/10 text-[var(--color-foreground)] border-foreground/20"
|
|
31365
31382
|
};
|
|
31366
31383
|
GameMenu.displayName = "GameMenu";
|
|
31367
31384
|
}
|
|
@@ -31429,13 +31446,13 @@ function GameOverScreen({
|
|
|
31429
31446
|
children: title
|
|
31430
31447
|
}
|
|
31431
31448
|
),
|
|
31432
|
-
message && /* @__PURE__ */ jsx("p", { className: "text-xl text-
|
|
31433
|
-
isNewHighScore && /* @__PURE__ */ jsx("div", { className: "mb-6 px-6 py-2 bg-
|
|
31449
|
+
message && /* @__PURE__ */ jsx("p", { className: "text-xl text-muted-foreground mb-8 text-center max-w-md", children: message }),
|
|
31450
|
+
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}" }) }),
|
|
31434
31451
|
stats.length > 0 && /* @__PURE__ */ jsx(
|
|
31435
31452
|
"div",
|
|
31436
31453
|
{
|
|
31437
31454
|
className: cn(
|
|
31438
|
-
"mb-8 p-6 rounded-
|
|
31455
|
+
"mb-8 p-6 rounded-container border-2 bg-background/30",
|
|
31439
31456
|
colors.accent
|
|
31440
31457
|
),
|
|
31441
31458
|
children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 md:grid-cols-3 gap-4", children: stats.map((stat, index) => {
|
|
@@ -31444,7 +31461,7 @@ function GameOverScreen({
|
|
|
31444
31461
|
displayValue = formatTime3(displayValue);
|
|
31445
31462
|
}
|
|
31446
31463
|
return /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
31447
|
-
/* @__PURE__ */ jsx("div", { className: "text-
|
|
31464
|
+
/* @__PURE__ */ jsx("div", { className: "text-muted-foreground text-sm mb-1", children: stat.label }),
|
|
31448
31465
|
/* @__PURE__ */ jsxs("div", { className: "text-[var(--color-foreground)] text-2xl font-bold flex items-center justify-center gap-2", children: [
|
|
31449
31466
|
stat.icon && /* @__PURE__ */ jsx("span", { children: stat.icon }),
|
|
31450
31467
|
/* @__PURE__ */ jsx("span", { className: "tabular-nums", children: displayValue })
|
|
@@ -31458,10 +31475,10 @@ function GameOverScreen({
|
|
|
31458
31475
|
{
|
|
31459
31476
|
onClick: () => handleActionClick(action),
|
|
31460
31477
|
className: cn(
|
|
31461
|
-
"px-8 py-4 rounded-
|
|
31478
|
+
"px-8 py-4 rounded-container border-2 font-bold text-lg",
|
|
31462
31479
|
"transition-all duration-200",
|
|
31463
31480
|
"hover:scale-105 active:scale-95",
|
|
31464
|
-
"focus:outline-none focus:ring-4 focus:ring-
|
|
31481
|
+
"focus:outline-none focus:ring-4 focus:ring-foreground/25",
|
|
31465
31482
|
buttonVariants[action.variant ?? "secondary"]
|
|
31466
31483
|
),
|
|
31467
31484
|
children: action.label
|
|
@@ -31480,25 +31497,25 @@ var init_GameOverScreen = __esm({
|
|
|
31480
31497
|
init_useEventBus();
|
|
31481
31498
|
variantColors = {
|
|
31482
31499
|
victory: {
|
|
31483
|
-
bg: "from-
|
|
31484
|
-
title: "text-
|
|
31485
|
-
accent: "border-
|
|
31500
|
+
bg: "from-success/90 to-success/90",
|
|
31501
|
+
title: "text-success",
|
|
31502
|
+
accent: "border-success"
|
|
31486
31503
|
},
|
|
31487
31504
|
defeat: {
|
|
31488
|
-
bg: "from-
|
|
31489
|
-
title: "text-
|
|
31490
|
-
accent: "border-
|
|
31505
|
+
bg: "from-error/90 to-background/90",
|
|
31506
|
+
title: "text-error",
|
|
31507
|
+
accent: "border-error"
|
|
31491
31508
|
},
|
|
31492
31509
|
neutral: {
|
|
31493
|
-
bg: "from-
|
|
31494
|
-
title: "text-
|
|
31495
|
-
accent: "border-
|
|
31510
|
+
bg: "from-muted/90 to-background/90",
|
|
31511
|
+
title: "text-foreground",
|
|
31512
|
+
accent: "border-muted"
|
|
31496
31513
|
}
|
|
31497
31514
|
};
|
|
31498
31515
|
buttonVariants = {
|
|
31499
|
-
primary: "bg-[var(--color-primary)] hover:bg-
|
|
31500
|
-
secondary: "bg-[var(--color-surface,#374151)] hover:bg-
|
|
31501
|
-
ghost: "bg-transparent hover:bg-
|
|
31516
|
+
primary: "bg-[var(--color-primary)] hover:bg-info text-[var(--color-primary-foreground)] border-info",
|
|
31517
|
+
secondary: "bg-[var(--color-surface,#374151)] hover:bg-muted text-[var(--color-foreground)] border-muted",
|
|
31518
|
+
ghost: "bg-transparent hover:bg-foreground/10 text-[var(--color-foreground)] border-foreground/20"
|
|
31502
31519
|
};
|
|
31503
31520
|
GameOverScreen.displayName = "GameOverScreen";
|
|
31504
31521
|
}
|
|
@@ -31732,7 +31749,7 @@ function PlatformerCanvas({
|
|
|
31732
31749
|
{
|
|
31733
31750
|
ref: canvasRef,
|
|
31734
31751
|
style: { width: canvasWidth, height: canvasHeight },
|
|
31735
|
-
className: cn("block rounded-
|
|
31752
|
+
className: cn("block rounded-container border border-border/10", className),
|
|
31736
31753
|
"data-testid": "platformer-canvas",
|
|
31737
31754
|
tabIndex: 0
|
|
31738
31755
|
}
|
|
@@ -38872,7 +38889,7 @@ function DebuggerBoard({
|
|
|
38872
38889
|
backgroundPosition: "center"
|
|
38873
38890
|
},
|
|
38874
38891
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
38875
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
38892
|
+
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,
|
|
38876
38893
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
38877
38894
|
/* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
38878
38895
|
/* @__PURE__ */ jsx(Icon, { icon: Bug, size: "sm" }),
|
|
@@ -38885,11 +38902,11 @@ function DebuggerBoard({
|
|
|
38885
38902
|
const isFlagged = flaggedLines.has(line.id);
|
|
38886
38903
|
let lineStyle = "";
|
|
38887
38904
|
if (submitted) {
|
|
38888
|
-
if (line.isBug && isFlagged) lineStyle = "bg-
|
|
38889
|
-
else if (line.isBug && !isFlagged) lineStyle = "bg-
|
|
38890
|
-
else if (!line.isBug && isFlagged) lineStyle = "bg-
|
|
38905
|
+
if (line.isBug && isFlagged) lineStyle = "bg-success/10";
|
|
38906
|
+
else if (line.isBug && !isFlagged) lineStyle = "bg-warning/10";
|
|
38907
|
+
else if (!line.isBug && isFlagged) lineStyle = "bg-error/10";
|
|
38891
38908
|
} else if (isFlagged) {
|
|
38892
|
-
lineStyle = "bg-
|
|
38909
|
+
lineStyle = "bg-error/10";
|
|
38893
38910
|
}
|
|
38894
38911
|
return /* @__PURE__ */ jsxs(
|
|
38895
38912
|
HStack,
|
|
@@ -38902,8 +38919,8 @@ function DebuggerBoard({
|
|
|
38902
38919
|
/* @__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 }) }),
|
|
38903
38920
|
/* @__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 }) }),
|
|
38904
38921
|
/* @__PURE__ */ jsxs(Box, { className: "w-8 flex-shrink-0 flex items-center justify-center", children: [
|
|
38905
|
-
isFlagged && /* @__PURE__ */ jsx(Icon, { icon: Bug, size: "xs", className: "text-
|
|
38906
|
-
submitted && line.isBug && !isFlagged && /* @__PURE__ */ jsx(Icon, { icon: Bug, size: "xs", className: "text-
|
|
38922
|
+
isFlagged && /* @__PURE__ */ jsx(Icon, { icon: Bug, size: "xs", className: "text-error" }),
|
|
38923
|
+
submitted && line.isBug && !isFlagged && /* @__PURE__ */ jsx(Icon, { icon: Bug, size: "xs", className: "text-warning" })
|
|
38907
38924
|
] })
|
|
38908
38925
|
]
|
|
38909
38926
|
},
|
|
@@ -38918,7 +38935,7 @@ function DebuggerBoard({
|
|
|
38918
38935
|
{
|
|
38919
38936
|
icon: flaggedLines.has(line.id) ? CheckCircle : XCircle,
|
|
38920
38937
|
size: "xs",
|
|
38921
|
-
className: flaggedLines.has(line.id) ? "text-
|
|
38938
|
+
className: flaggedLines.has(line.id) ? "text-success mt-0.5" : "text-warning mt-0.5"
|
|
38922
38939
|
}
|
|
38923
38940
|
),
|
|
38924
38941
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", children: [
|
|
@@ -38927,7 +38944,7 @@ function DebuggerBoard({
|
|
|
38927
38944
|
] })
|
|
38928
38945
|
] }, line.id))
|
|
38929
38946
|
] }) }),
|
|
38930
|
-
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
38947
|
+
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-warning", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.hint }) }),
|
|
38931
38948
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "center", children: [
|
|
38932
38949
|
!submitted ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleSubmit, disabled: flaggedLines.size === 0, children: [
|
|
38933
38950
|
/* @__PURE__ */ jsx(Icon, { icon: Send, size: "sm" }),
|
|
@@ -39650,7 +39667,7 @@ function LinearView({
|
|
|
39650
39667
|
className
|
|
39651
39668
|
}) {
|
|
39652
39669
|
const currentIdx = trait.states.indexOf(trait.currentState);
|
|
39653
|
-
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-
|
|
39670
|
+
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
39654
39671
|
trait.description && /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: trait.description }),
|
|
39655
39672
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
39656
39673
|
const isDone = i < currentIdx;
|
|
@@ -39672,10 +39689,10 @@ function LinearView({
|
|
|
39672
39689
|
{
|
|
39673
39690
|
display: "inline-flex",
|
|
39674
39691
|
className: cn(
|
|
39675
|
-
"items-center justify-center rounded-
|
|
39692
|
+
"items-center justify-center rounded-pill px-3 py-1 border-2 transition-all",
|
|
39676
39693
|
SIZE_CONFIG2[size || "md"].fontSize,
|
|
39677
39694
|
isDone && "bg-success/20 border-success text-success",
|
|
39678
|
-
isCurrent && "bg-primary/20 border-primary text-primary font-bold shadow-
|
|
39695
|
+
isCurrent && "bg-primary/20 border-primary text-primary font-bold shadow-elevation-card shadow-primary/20",
|
|
39679
39696
|
!isDone && !isCurrent && "bg-muted border-border text-muted-foreground"
|
|
39680
39697
|
),
|
|
39681
39698
|
children: [
|
|
@@ -39697,7 +39714,7 @@ function CompactView({
|
|
|
39697
39714
|
const { t } = useTranslate();
|
|
39698
39715
|
const config = SIZE_CONFIG2[size || "md"];
|
|
39699
39716
|
const currentTransitions = trait.transitions.filter((t2) => t2.from === trait.currentState);
|
|
39700
|
-
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-
|
|
39717
|
+
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
39701
39718
|
/* @__PURE__ */ jsxs(HStack, { className: "items-center justify-between", children: [
|
|
39702
39719
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground font-bold", children: trait.name }),
|
|
39703
39720
|
/* @__PURE__ */ jsx(StateIndicator, { state: trait.currentState, size: "sm", stateStyles })
|
|
@@ -39733,7 +39750,7 @@ function FullView({
|
|
|
39733
39750
|
const { t } = useTranslate();
|
|
39734
39751
|
const config = SIZE_CONFIG2[size || "md"];
|
|
39735
39752
|
const currentTransitions = trait.transitions.filter((t2) => t2.from === trait.currentState);
|
|
39736
|
-
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-
|
|
39753
|
+
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
39737
39754
|
/* @__PURE__ */ jsxs(HStack, { className: "items-center justify-between", children: [
|
|
39738
39755
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground font-bold", children: trait.name }),
|
|
39739
39756
|
/* @__PURE__ */ jsx(StateIndicator, { state: trait.currentState, size: "sm", stateStyles })
|
|
@@ -39747,9 +39764,9 @@ function FullView({
|
|
|
39747
39764
|
{
|
|
39748
39765
|
display: "flex",
|
|
39749
39766
|
className: cn(
|
|
39750
|
-
"items-center justify-center rounded-
|
|
39767
|
+
"items-center justify-center rounded-container border-2 transition-all px-2",
|
|
39751
39768
|
config.nodeSize,
|
|
39752
|
-
isCurrent && "bg-primary/20 border-primary shadow-
|
|
39769
|
+
isCurrent && "bg-primary/20 border-primary shadow-elevation-card shadow-primary/20",
|
|
39753
39770
|
!isCurrent && hasOutgoing && "bg-muted border-border hover:border-muted-foreground",
|
|
39754
39771
|
!isCurrent && !hasOutgoing && "bg-background border-border opacity-60",
|
|
39755
39772
|
onStateClick && "cursor-pointer"
|
|
@@ -40179,7 +40196,7 @@ function EventHandlerBoard({
|
|
|
40179
40196
|
backgroundPosition: "center"
|
|
40180
40197
|
},
|
|
40181
40198
|
children: [
|
|
40182
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
40199
|
+
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,
|
|
40183
40200
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
|
|
40184
40201
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-foreground", children: entity.title }),
|
|
40185
40202
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-muted-foreground", children: entity.description }),
|
|
@@ -40194,7 +40211,7 @@ function EventHandlerBoard({
|
|
|
40194
40211
|
Box,
|
|
40195
40212
|
{
|
|
40196
40213
|
className: cn(
|
|
40197
|
-
"p-3 rounded-
|
|
40214
|
+
"p-3 rounded-container border-2 cursor-pointer transition-all hover:scale-105",
|
|
40198
40215
|
selectedObjectId === obj.id ? "border-primary bg-primary/10" : "border-border bg-card hover:border-muted-foreground"
|
|
40199
40216
|
),
|
|
40200
40217
|
onClick: () => setSelectedObjectId(obj.id),
|
|
@@ -40216,10 +40233,10 @@ function EventHandlerBoard({
|
|
|
40216
40233
|
}
|
|
40217
40234
|
),
|
|
40218
40235
|
eventLog.length > 0 && /* @__PURE__ */ jsx(EventLog, { entries: eventLog }),
|
|
40219
|
-
playState === "success" && /* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
40236
|
+
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") }) }),
|
|
40220
40237
|
playState === "fail" && /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
40221
|
-
/* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
40222
|
-
showHint && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-
|
|
40238
|
+
/* @__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) }) }),
|
|
40239
|
+
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: [
|
|
40223
40240
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-accent font-bold shrink-0", children: "\u{1F4A1} " + t("game.hint") + ":" }),
|
|
40224
40241
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground", children: entity.hint })
|
|
40225
40242
|
] }) })
|
|
@@ -43392,7 +43409,7 @@ function NegotiatorBoard({
|
|
|
43392
43409
|
backgroundPosition: "center"
|
|
43393
43410
|
},
|
|
43394
43411
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
43395
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
43412
|
+
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,
|
|
43396
43413
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
43397
43414
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", weight: "bold", children: entity.title }),
|
|
43398
43415
|
/* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.description }),
|
|
@@ -43438,7 +43455,7 @@ function NegotiatorBoard({
|
|
|
43438
43455
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: "vs" }),
|
|
43439
43456
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: getActionLabel(round.opponentAction) }),
|
|
43440
43457
|
/* @__PURE__ */ jsx(Icon, { icon: ArrowRight, size: "xs" }),
|
|
43441
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "caption", weight: "bold", className: "text-
|
|
43458
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", weight: "bold", className: "text-success", children: [
|
|
43442
43459
|
"+",
|
|
43443
43460
|
round.playerPayoff
|
|
43444
43461
|
] }),
|
|
@@ -43449,7 +43466,7 @@ function NegotiatorBoard({
|
|
|
43449
43466
|
] }, round.round))
|
|
43450
43467
|
] }) }),
|
|
43451
43468
|
isComplete && /* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", children: [
|
|
43452
|
-
/* @__PURE__ */ jsx(Icon, { icon: CheckCircle, size: "lg", className: won ? "text-
|
|
43469
|
+
/* @__PURE__ */ jsx(Icon, { icon: CheckCircle, size: "lg", className: won ? "text-success" : "text-error" }),
|
|
43453
43470
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "bold", children: won ? entity.successMessage ?? t("negotiator.success") : entity.failMessage ?? t("negotiator.failed") }),
|
|
43454
43471
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-muted-foreground", children: [
|
|
43455
43472
|
t("negotiator.finalScore"),
|
|
@@ -43459,7 +43476,7 @@ function NegotiatorBoard({
|
|
|
43459
43476
|
entity.targetScore
|
|
43460
43477
|
] })
|
|
43461
43478
|
] }) }),
|
|
43462
|
-
showHint && entity.hint && !won && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
43479
|
+
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 }) }),
|
|
43463
43480
|
isComplete && !won && /* @__PURE__ */ jsx(HStack, { justify: "center", children: /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: handleReset, children: t("negotiator.playAgain") }) })
|
|
43464
43481
|
] })
|
|
43465
43482
|
}
|
|
@@ -46063,7 +46080,7 @@ function TraitSlot({
|
|
|
46063
46080
|
display: "flex",
|
|
46064
46081
|
position: "relative",
|
|
46065
46082
|
className: cn(
|
|
46066
|
-
"items-center justify-center rounded-
|
|
46083
|
+
"items-center justify-center rounded-container transition-all duration-200 bg-card/50",
|
|
46067
46084
|
!locked && "cursor-pointer",
|
|
46068
46085
|
locked && "cursor-not-allowed opacity-50",
|
|
46069
46086
|
isEmpty && !locked && "border-2 border-dashed border-border hover:border-muted-foreground",
|
|
@@ -46079,7 +46096,7 @@ function TraitSlot({
|
|
|
46079
46096
|
style: {
|
|
46080
46097
|
width: config.box,
|
|
46081
46098
|
height: config.box,
|
|
46082
|
-
backgroundColor: catColor?.bg ||
|
|
46099
|
+
backgroundColor: catColor?.bg || void 0,
|
|
46083
46100
|
borderColor: isDragOver ? void 0 : feedback === "correct" ? "var(--color-success)" : feedback === "wrong" ? "var(--color-error)" : catColor?.border || void 0
|
|
46084
46101
|
},
|
|
46085
46102
|
onClick: handleClick,
|
|
@@ -46108,7 +46125,7 @@ function TraitSlot({
|
|
|
46108
46125
|
Box,
|
|
46109
46126
|
{
|
|
46110
46127
|
position: "absolute",
|
|
46111
|
-
className: "-top-1.5 -right-1.5 w-4 h-4 bg-error rounded-
|
|
46128
|
+
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",
|
|
46112
46129
|
onClick: handleRemove,
|
|
46113
46130
|
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-foreground text-xs leading-none", children: "\xD7" })
|
|
46114
46131
|
}
|
|
@@ -46118,14 +46135,14 @@ function TraitSlot({
|
|
|
46118
46135
|
Box,
|
|
46119
46136
|
{
|
|
46120
46137
|
position: "absolute",
|
|
46121
|
-
className: "-bottom-1 -left-1 w-4 h-4 bg-card rounded-
|
|
46138
|
+
className: "-bottom-1 -left-1 w-4 h-4 bg-card rounded-pill flex items-center justify-center border border-border",
|
|
46122
46139
|
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground text-xs", children: slotNumber })
|
|
46123
46140
|
}
|
|
46124
46141
|
),
|
|
46125
46142
|
showTooltip && isHovered && itemMachine && !isEmpty && equippedItem && /* @__PURE__ */ jsxs(
|
|
46126
46143
|
Box,
|
|
46127
46144
|
{
|
|
46128
|
-
className: "p-3 bg-background border border-border rounded-
|
|
46145
|
+
className: "p-3 bg-background border border-border rounded-container shadow-xl",
|
|
46129
46146
|
style: {
|
|
46130
46147
|
...getTooltipStyle(),
|
|
46131
46148
|
minWidth: 200,
|
|
@@ -46375,12 +46392,12 @@ function SequencerBoard({
|
|
|
46375
46392
|
backgroundPosition: "center"
|
|
46376
46393
|
},
|
|
46377
46394
|
children: [
|
|
46378
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
46395
|
+
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,
|
|
46379
46396
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
|
|
46380
46397
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-foreground", children: entity.title }),
|
|
46381
46398
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-muted-foreground", children: entity.description })
|
|
46382
46399
|
] }),
|
|
46383
|
-
showHint && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-
|
|
46400
|
+
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: [
|
|
46384
46401
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-accent font-bold shrink-0", children: "\u{1F4A1} " + t("game.hint") + ":" }),
|
|
46385
46402
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground", children: entity.hint })
|
|
46386
46403
|
] }) }),
|
|
@@ -46418,8 +46435,8 @@ function SequencerBoard({
|
|
|
46418
46435
|
label: t("sequencer.dragActions")
|
|
46419
46436
|
}
|
|
46420
46437
|
),
|
|
46421
|
-
hasFeedback && playState === "idle" && attempts > 0 && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-
|
|
46422
|
-
playState === "success" && /* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
46438
|
+
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) }) }),
|
|
46439
|
+
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") }) }),
|
|
46423
46440
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", children: [
|
|
46424
46441
|
/* @__PURE__ */ jsx(
|
|
46425
46442
|
Button,
|
|
@@ -47095,7 +47112,7 @@ function SimulationCanvas({
|
|
|
47095
47112
|
ref: canvasRef,
|
|
47096
47113
|
width,
|
|
47097
47114
|
height,
|
|
47098
|
-
className: "rounded-
|
|
47115
|
+
className: "rounded-container block max-w-full h-auto"
|
|
47099
47116
|
}
|
|
47100
47117
|
) });
|
|
47101
47118
|
}
|
|
@@ -47303,7 +47320,7 @@ function SimulatorBoard({
|
|
|
47303
47320
|
backgroundPosition: "center"
|
|
47304
47321
|
},
|
|
47305
47322
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
47306
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
47323
|
+
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,
|
|
47307
47324
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
47308
47325
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", weight: "bold", children: entity.title }),
|
|
47309
47326
|
/* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.description })
|
|
@@ -47354,8 +47371,8 @@ function SimulatorBoard({
|
|
|
47354
47371
|
entity.outputUnit
|
|
47355
47372
|
] }),
|
|
47356
47373
|
submitted && /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
47357
|
-
/* @__PURE__ */ jsx(Icon, { icon: isCorrect ? CheckCircle : XCircle, size: "sm", className: isCorrect ? "text-
|
|
47358
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", className: isCorrect ? "text-
|
|
47374
|
+
/* @__PURE__ */ jsx(Icon, { icon: isCorrect ? CheckCircle : XCircle, size: "sm", className: isCorrect ? "text-success" : "text-error" }),
|
|
47375
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", className: isCorrect ? "text-success" : "text-error", children: isCorrect ? entity.successMessage ?? t("simulator.correct") : entity.failMessage ?? t("simulator.incorrect") })
|
|
47359
47376
|
] }),
|
|
47360
47377
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-muted-foreground", children: [
|
|
47361
47378
|
t("simulator.target"),
|
|
@@ -47368,7 +47385,7 @@ function SimulatorBoard({
|
|
|
47368
47385
|
")"
|
|
47369
47386
|
] })
|
|
47370
47387
|
] }) }),
|
|
47371
|
-
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
47388
|
+
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-warning", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.hint }) }),
|
|
47372
47389
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "center", children: [
|
|
47373
47390
|
!submitted ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleSubmit, children: [
|
|
47374
47391
|
/* @__PURE__ */ jsx(Icon, { icon: Play, size: "sm" }),
|
|
@@ -47769,7 +47786,7 @@ function StateNode2({
|
|
|
47769
47786
|
position: "absolute",
|
|
47770
47787
|
display: "flex",
|
|
47771
47788
|
className: cn(
|
|
47772
|
-
"items-center justify-center rounded-
|
|
47789
|
+
"items-center justify-center rounded-pill border-3 transition-all cursor-pointer select-none",
|
|
47773
47790
|
"min-w-[80px] h-[80px] px-3",
|
|
47774
47791
|
isCurrent && "bg-primary/20 border-primary shadow-lg shadow-primary/30 scale-110",
|
|
47775
47792
|
isSelected && !isCurrent && "bg-accent/20 border-accent ring-2 ring-accent/50",
|
|
@@ -48082,7 +48099,7 @@ function StateArchitectBoard({
|
|
|
48082
48099
|
backgroundPosition: "center"
|
|
48083
48100
|
},
|
|
48084
48101
|
children: [
|
|
48085
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
48102
|
+
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,
|
|
48086
48103
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
|
|
48087
48104
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-foreground", children: entity.title }),
|
|
48088
48105
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-muted-foreground", children: entity.description }),
|
|
@@ -48101,7 +48118,7 @@ function StateArchitectBoard({
|
|
|
48101
48118
|
Box,
|
|
48102
48119
|
{
|
|
48103
48120
|
position: "relative",
|
|
48104
|
-
className: "rounded-
|
|
48121
|
+
className: "rounded-container border border-border bg-background overflow-hidden",
|
|
48105
48122
|
style: { width: GRAPH_W, height: GRAPH_H },
|
|
48106
48123
|
children: [
|
|
48107
48124
|
/* @__PURE__ */ jsxs(
|
|
@@ -48160,7 +48177,7 @@ function StateArchitectBoard({
|
|
|
48160
48177
|
children: selectedState ? t("stateArchitect.addTransition", { state: selectedState }) : t("stateArchitect.addTransitionPrompt")
|
|
48161
48178
|
}
|
|
48162
48179
|
) }),
|
|
48163
|
-
transitions.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "p-3 rounded-
|
|
48180
|
+
transitions.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "p-3 rounded-container bg-muted/50 border border-border", children: [
|
|
48164
48181
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground font-medium", children: t("stateArchitect.transitions", { count: transitions.length }) + ":" }),
|
|
48165
48182
|
transitions.map((t2) => /* @__PURE__ */ jsxs(HStack, { className: "items-center text-xs", gap: "xs", children: [
|
|
48166
48183
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-foreground", children: t2.from }),
|
|
@@ -48194,7 +48211,7 @@ function StateArchitectBoard({
|
|
|
48194
48211
|
variables
|
|
48195
48212
|
}
|
|
48196
48213
|
),
|
|
48197
|
-
testResults.length > 0 && /* @__PURE__ */ jsxs(VStack, { className: "p-3 rounded-
|
|
48214
|
+
testResults.length > 0 && /* @__PURE__ */ jsxs(VStack, { className: "p-3 rounded-container bg-card border border-border", gap: "xs", children: [
|
|
48198
48215
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-muted-foreground font-medium", children: t("stateArchitect.testResults") + ":" }),
|
|
48199
48216
|
testResults.map((r2, i) => /* @__PURE__ */ jsxs(HStack, { className: "items-center text-xs", gap: "xs", children: [
|
|
48200
48217
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: r2.passed ? "text-success" : "text-error", children: r2.passed ? "\u2714" : "\u2717" }),
|
|
@@ -48205,10 +48222,10 @@ function StateArchitectBoard({
|
|
|
48205
48222
|
entity.showCodeView !== false && /* @__PURE__ */ jsx(CodeView, { data: codeData, label: "View Code" })
|
|
48206
48223
|
] })
|
|
48207
48224
|
] }),
|
|
48208
|
-
playState === "success" && /* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
48225
|
+
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") }) }),
|
|
48209
48226
|
playState === "fail" && /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
48210
|
-
/* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
48211
|
-
attempts >= 3 && entity.hint && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-
|
|
48227
|
+
/* @__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]) }) }),
|
|
48228
|
+
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: [
|
|
48212
48229
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-accent font-bold shrink-0", children: "\u{1F4A1} " + t("game.hint") + ":" }),
|
|
48213
48230
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground", children: entity.hint })
|
|
48214
48231
|
] }) })
|