@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/components/index.js
CHANGED
|
@@ -9215,7 +9215,7 @@ function ActionButton({
|
|
|
9215
9215
|
disabled: isDisabled,
|
|
9216
9216
|
onClick,
|
|
9217
9217
|
className: cn(
|
|
9218
|
-
"relative inline-flex items-center gap-1.5 rounded-
|
|
9218
|
+
"relative inline-flex items-center gap-1.5 rounded-interactive border font-medium overflow-hidden transition-colors duration-150",
|
|
9219
9219
|
sizes.button,
|
|
9220
9220
|
variantStyles7[variant],
|
|
9221
9221
|
isDisabled && "opacity-60 cursor-not-allowed",
|
|
@@ -9258,9 +9258,9 @@ var init_ActionButton = __esm({
|
|
|
9258
9258
|
init_cn();
|
|
9259
9259
|
init_Icon();
|
|
9260
9260
|
sizeMap = {
|
|
9261
|
-
sm: { button: "px-3
|
|
9262
|
-
md: { button: "px-4
|
|
9263
|
-
lg: { button: "
|
|
9261
|
+
sm: { button: "h-button-sm px-3 text-xs", hotkey: "text-[9px] px-1", icon: "text-xs" },
|
|
9262
|
+
md: { button: "h-button-md px-4 text-sm", hotkey: "text-xs px-1.5", icon: "text-sm" },
|
|
9263
|
+
lg: { button: "h-button-lg px-5 text-base", hotkey: "text-xs px-2", icon: "text-base" }
|
|
9264
9264
|
};
|
|
9265
9265
|
variantStyles7 = {
|
|
9266
9266
|
primary: "bg-primary text-primary-foreground hover:bg-primary-hover border-primary",
|
|
@@ -9363,8 +9363,8 @@ var init_ControlButton = __esm({
|
|
|
9363
9363
|
};
|
|
9364
9364
|
shapeMap = {
|
|
9365
9365
|
circle: "rounded-full",
|
|
9366
|
-
rounded: "rounded-
|
|
9367
|
-
square: "rounded-
|
|
9366
|
+
rounded: "rounded-interactive",
|
|
9367
|
+
square: "rounded-interactive"
|
|
9368
9368
|
};
|
|
9369
9369
|
variantMap = {
|
|
9370
9370
|
primary: "bg-primary text-primary-foreground border-primary hover:bg-primary-hover",
|
|
@@ -9525,7 +9525,7 @@ function ActionTile({
|
|
|
9525
9525
|
{
|
|
9526
9526
|
display: "flex",
|
|
9527
9527
|
className: cn(
|
|
9528
|
-
"flex-col items-center gap-1 rounded-
|
|
9528
|
+
"flex-col items-center gap-1 rounded-container border-2 transition-all select-none",
|
|
9529
9529
|
config.px,
|
|
9530
9530
|
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",
|
|
9531
9531
|
className
|
|
@@ -10736,12 +10736,12 @@ function IsometricCanvas({
|
|
|
10736
10736
|
return /* @__PURE__ */ jsx(
|
|
10737
10737
|
Box,
|
|
10738
10738
|
{
|
|
10739
|
-
className: cn("relative w-full overflow-hidden rounded-
|
|
10739
|
+
className: cn("relative w-full overflow-hidden rounded-container", className),
|
|
10740
10740
|
style: { height: viewportSize.height },
|
|
10741
10741
|
"data-testid": "game-canvas-empty",
|
|
10742
|
-
children: /* @__PURE__ */ jsx(Box, { className: "flex items-center justify-center h-full bg-[var(--color-card)] rounded-
|
|
10742
|
+
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: [
|
|
10743
10743
|
/* @__PURE__ */ jsx(Icon, { name: "map", size: "xl" }),
|
|
10744
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-
|
|
10744
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-muted-foreground", children: t("canvas.emptyMessage") || "No map data loaded" })
|
|
10745
10745
|
] }) })
|
|
10746
10746
|
}
|
|
10747
10747
|
);
|
|
@@ -11139,19 +11139,19 @@ function BattleBoard({
|
|
|
11139
11139
|
}
|
|
11140
11140
|
)
|
|
11141
11141
|
] }),
|
|
11142
|
-
gameResult && (gameOverOverlay ? gameOverOverlay(ctx) : /* @__PURE__ */ jsx(Box, { className: "absolute inset-0 z-50 flex items-center justify-center bg-
|
|
11142
|
+
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: [
|
|
11143
11143
|
/* @__PURE__ */ jsx(
|
|
11144
11144
|
Typography,
|
|
11145
11145
|
{
|
|
11146
11146
|
variant: "h2",
|
|
11147
11147
|
className: cn(
|
|
11148
11148
|
"text-4xl font-black tracking-widest uppercase",
|
|
11149
|
-
gameResult === "victory" ? "text-
|
|
11149
|
+
gameResult === "victory" ? "text-warning" : "text-error"
|
|
11150
11150
|
),
|
|
11151
11151
|
children: gameResult === "victory" ? t("battle.victory") : t("battle.defeat")
|
|
11152
11152
|
}
|
|
11153
11153
|
),
|
|
11154
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "body1", className: "text-
|
|
11154
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body1", className: "text-muted-foreground", children: [
|
|
11155
11155
|
t("battle.turnsPlayed"),
|
|
11156
11156
|
": ",
|
|
11157
11157
|
currentTurn
|
|
@@ -16028,7 +16028,7 @@ function BuilderBoard({
|
|
|
16028
16028
|
backgroundPosition: "center"
|
|
16029
16029
|
},
|
|
16030
16030
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
16031
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
16031
|
+
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,
|
|
16032
16032
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
16033
16033
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", weight: "bold", children: entity.title }),
|
|
16034
16034
|
/* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.description })
|
|
@@ -16066,7 +16066,7 @@ function BuilderBoard({
|
|
|
16066
16066
|
{
|
|
16067
16067
|
gap: "sm",
|
|
16068
16068
|
align: "center",
|
|
16069
|
-
className: `p-3 border-2 rounded ${result ? result.correct ? "border-
|
|
16069
|
+
className: `p-3 border-2 rounded ${result ? result.correct ? "border-success" : "border-error" : selectedComponent ? "border-dashed border-foreground cursor-pointer" : "border-border"}`,
|
|
16070
16070
|
onClick: () => handlePlaceComponent(slot.id),
|
|
16071
16071
|
children: [
|
|
16072
16072
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", className: "flex-1", children: [
|
|
@@ -16081,7 +16081,7 @@ function BuilderBoard({
|
|
|
16081
16081
|
] }) : null,
|
|
16082
16082
|
placedComp.label
|
|
16083
16083
|
] }),
|
|
16084
|
-
result && /* @__PURE__ */ jsx(Icon, { icon: result.correct ? CheckCircle : XCircle, size: "sm", className: result.correct ? "text-
|
|
16084
|
+
result && /* @__PURE__ */ jsx(Icon, { icon: result.correct ? CheckCircle : XCircle, size: "sm", className: result.correct ? "text-success" : "text-error" })
|
|
16085
16085
|
] }) : /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: t("builder.empty") })
|
|
16086
16086
|
]
|
|
16087
16087
|
},
|
|
@@ -16090,10 +16090,10 @@ function BuilderBoard({
|
|
|
16090
16090
|
}) })
|
|
16091
16091
|
] }) }),
|
|
16092
16092
|
submitted && /* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", children: [
|
|
16093
|
-
/* @__PURE__ */ jsx(Icon, { icon: allCorrect ? CheckCircle : XCircle, size: "lg", className: allCorrect ? "text-
|
|
16093
|
+
/* @__PURE__ */ jsx(Icon, { icon: allCorrect ? CheckCircle : XCircle, size: "lg", className: allCorrect ? "text-success" : "text-error" }),
|
|
16094
16094
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "bold", children: allCorrect ? entity.successMessage ?? t("builder.success") : entity.failMessage ?? t("builder.incorrect") })
|
|
16095
16095
|
] }) }),
|
|
16096
|
-
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
16096
|
+
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-warning", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.hint }) }),
|
|
16097
16097
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "center", children: [
|
|
16098
16098
|
!submitted ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleSubmit, disabled: !allPlaced, children: [
|
|
16099
16099
|
/* @__PURE__ */ jsx(Icon, { icon: Wrench, size: "sm" }),
|
|
@@ -17715,7 +17715,7 @@ function CanvasEffectEngine({
|
|
|
17715
17715
|
flash && /* @__PURE__ */ jsx(
|
|
17716
17716
|
Box,
|
|
17717
17717
|
{
|
|
17718
|
-
className: "absolute inset-0 z-20 pointer-events-none rounded-
|
|
17718
|
+
className: "absolute inset-0 z-20 pointer-events-none rounded-container",
|
|
17719
17719
|
style: { backgroundColor: flash.color, opacity: flash.alpha }
|
|
17720
17720
|
}
|
|
17721
17721
|
),
|
|
@@ -17783,7 +17783,7 @@ function EmojiEffect({
|
|
|
17783
17783
|
/* @__PURE__ */ jsx(
|
|
17784
17784
|
Box,
|
|
17785
17785
|
{
|
|
17786
|
-
className: "absolute rounded-
|
|
17786
|
+
className: "absolute rounded-pill animate-ping",
|
|
17787
17787
|
style: {
|
|
17788
17788
|
width: 48 * intensity,
|
|
17789
17789
|
height: 48 * intensity,
|
|
@@ -19550,7 +19550,7 @@ function ChoiceButton({
|
|
|
19550
19550
|
disabled,
|
|
19551
19551
|
onClick,
|
|
19552
19552
|
className: cn(
|
|
19553
|
-
"w-full text-left px-4 py-2.5 rounded-
|
|
19553
|
+
"w-full text-left px-4 py-2.5 rounded-interactive border transition-all duration-150",
|
|
19554
19554
|
"flex items-center gap-2",
|
|
19555
19555
|
selected ? "bg-accent/15 border-accent text-foreground" : "bg-muted/40 border-border text-foreground hover:bg-muted hover:border-border",
|
|
19556
19556
|
disabled && "opacity-40 cursor-not-allowed hover:bg-muted/40 hover:border-border",
|
|
@@ -19646,7 +19646,7 @@ function ClassifierBoard({
|
|
|
19646
19646
|
backgroundPosition: "center"
|
|
19647
19647
|
},
|
|
19648
19648
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
19649
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
19649
|
+
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,
|
|
19650
19650
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
19651
19651
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", weight: "bold", children: entity.title }),
|
|
19652
19652
|
/* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.description })
|
|
@@ -19661,7 +19661,7 @@ function ClassifierBoard({
|
|
|
19661
19661
|
/* @__PURE__ */ jsx(VStack, { gap: "md", children: categories.map((cat) => {
|
|
19662
19662
|
const catItems = items.filter((item) => assignments[item.id] === cat.id);
|
|
19663
19663
|
return /* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
19664
|
-
cat.imageUrl && /* @__PURE__ */ jsx(Box, { className: "w-full h-16 overflow-hidden rounded-
|
|
19664
|
+
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" }) }),
|
|
19665
19665
|
/* @__PURE__ */ jsxs(HStack, { justify: "between", align: "center", children: [
|
|
19666
19666
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "bold", children: cat.label }),
|
|
19667
19667
|
/* @__PURE__ */ jsx(Badge, { size: "sm", children: catItems.length })
|
|
@@ -19672,12 +19672,12 @@ function ClassifierBoard({
|
|
|
19672
19672
|
Badge,
|
|
19673
19673
|
{
|
|
19674
19674
|
size: "sm",
|
|
19675
|
-
className: `cursor-pointer ${result ? result.correct ? "border-
|
|
19675
|
+
className: `cursor-pointer ${result ? result.correct ? "border-success bg-success/10" : "border-error bg-error/10" : ""}`,
|
|
19676
19676
|
onClick: () => handleUnassign(item.id),
|
|
19677
19677
|
children: [
|
|
19678
19678
|
item.iconUrl && /* @__PURE__ */ jsx("img", { src: item.iconUrl, alt: "", className: "w-3 h-3 object-contain inline-block" }),
|
|
19679
19679
|
item.label,
|
|
19680
|
-
result && /* @__PURE__ */ jsx(Icon, { icon: result.correct ? CheckCircle : XCircle, size: "xs", className: result.correct ? "text-
|
|
19680
|
+
result && /* @__PURE__ */ jsx(Icon, { icon: result.correct ? CheckCircle : XCircle, size: "xs", className: result.correct ? "text-success" : "text-error" })
|
|
19681
19681
|
]
|
|
19682
19682
|
},
|
|
19683
19683
|
item.id
|
|
@@ -19700,11 +19700,11 @@ function ClassifierBoard({
|
|
|
19700
19700
|
] }) }, cat.id);
|
|
19701
19701
|
}) }),
|
|
19702
19702
|
submitted && /* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", children: [
|
|
19703
|
-
/* @__PURE__ */ jsx(Icon, { icon: allCorrect ? CheckCircle : XCircle, size: "lg", className: allCorrect ? "text-
|
|
19703
|
+
/* @__PURE__ */ jsx(Icon, { icon: allCorrect ? CheckCircle : XCircle, size: "lg", className: allCorrect ? "text-success" : "text-error" }),
|
|
19704
19704
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "bold", children: allCorrect ? entity.successMessage ?? t("classifier.allCorrect") : `${correctCount}/${items.length} ${t("classifier.correct")}` }),
|
|
19705
19705
|
!allCorrect && entity.failMessage && /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-muted-foreground", children: entity.failMessage })
|
|
19706
19706
|
] }) }),
|
|
19707
|
-
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
19707
|
+
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-warning", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.hint }) }),
|
|
19708
19708
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "center", children: [
|
|
19709
19709
|
!submitted ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleSubmit, disabled: !allAssigned, children: [
|
|
19710
19710
|
/* @__PURE__ */ jsx(Icon, { icon: Send, size: "sm" }),
|
|
@@ -20354,10 +20354,10 @@ var init_CombatLog = __esm({
|
|
|
20354
20354
|
}
|
|
20355
20355
|
});
|
|
20356
20356
|
function getComboIntensity(combo) {
|
|
20357
|
-
if (combo >= 10) return "text-
|
|
20358
|
-
if (combo >= 7) return "text-
|
|
20359
|
-
if (combo >= 4) return "text-
|
|
20360
|
-
return "text-
|
|
20357
|
+
if (combo >= 10) return "text-error animate-pulse";
|
|
20358
|
+
if (combo >= 7) return "text-warning";
|
|
20359
|
+
if (combo >= 4) return "text-warning";
|
|
20360
|
+
return "text-foreground";
|
|
20361
20361
|
}
|
|
20362
20362
|
function getComboScale(combo) {
|
|
20363
20363
|
if (combo >= 10) return "scale-110";
|
|
@@ -20378,19 +20378,19 @@ function ComboCounter({
|
|
|
20378
20378
|
{
|
|
20379
20379
|
className: cn(
|
|
20380
20380
|
"inline-flex flex-col items-center justify-center",
|
|
20381
|
-
"rounded-
|
|
20381
|
+
"rounded-container bg-card/80 border border-muted px-3 py-1.5",
|
|
20382
20382
|
"transition-transform duration-200",
|
|
20383
20383
|
getComboScale(combo),
|
|
20384
20384
|
className
|
|
20385
20385
|
),
|
|
20386
20386
|
children: [
|
|
20387
20387
|
/* @__PURE__ */ jsx("span", { className: cn("font-black tabular-nums leading-none", sizes.combo, getComboIntensity(combo)), children: combo }),
|
|
20388
|
-
/* @__PURE__ */ jsx("span", { className: cn("font-bold uppercase tracking-wider text-
|
|
20389
|
-
multiplier != null && multiplier > 1 && /* @__PURE__ */ jsxs("span", { className: cn("font-bold text-
|
|
20388
|
+
/* @__PURE__ */ jsx("span", { className: cn("font-bold uppercase tracking-wider text-muted-foreground", sizes.label), children: "combo" }),
|
|
20389
|
+
multiplier != null && multiplier > 1 && /* @__PURE__ */ jsxs("span", { className: cn("font-bold text-warning tabular-nums", sizes.multiplier), children: [
|
|
20390
20390
|
"x",
|
|
20391
20391
|
multiplier.toFixed(1)
|
|
20392
20392
|
] }),
|
|
20393
|
-
streak != null && streak > 0 && /* @__PURE__ */ jsxs("span", { className: cn("text-
|
|
20393
|
+
streak != null && streak > 0 && /* @__PURE__ */ jsxs("span", { className: cn("text-muted-foreground tabular-nums", sizes.label), children: [
|
|
20394
20394
|
streak,
|
|
20395
20395
|
" streak"
|
|
20396
20396
|
] })
|
|
@@ -20805,18 +20805,18 @@ function ItemSlot({
|
|
|
20805
20805
|
disabled: !isClickable,
|
|
20806
20806
|
title: label,
|
|
20807
20807
|
className: cn(
|
|
20808
|
-
"relative flex items-center justify-center rounded-
|
|
20809
|
-
"bg-
|
|
20808
|
+
"relative flex items-center justify-center rounded-interactive border-2",
|
|
20809
|
+
"bg-card/80 transition-all duration-150",
|
|
20810
20810
|
sizeMap5[size],
|
|
20811
|
-
empty ? "border-
|
|
20811
|
+
empty ? "border-border bg-card/50" : rarityBorderMap[rarity],
|
|
20812
20812
|
!empty && rarityGlowMap[rarity],
|
|
20813
|
-
selected && "ring-2 ring-
|
|
20813
|
+
selected && "ring-2 ring-foreground ring-offset-1 ring-offset-background",
|
|
20814
20814
|
isClickable && !empty && "hover:brightness-125 cursor-pointer",
|
|
20815
|
-
isClickable && empty && "hover:border-
|
|
20815
|
+
isClickable && empty && "hover:border-muted cursor-pointer",
|
|
20816
20816
|
!isClickable && "cursor-default",
|
|
20817
20817
|
className
|
|
20818
20818
|
),
|
|
20819
|
-
children: empty ? /* @__PURE__ */ jsx("span", { className: "text-
|
|
20819
|
+
children: empty ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground text-base", children: "+" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20820
20820
|
icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: icon }),
|
|
20821
20821
|
quantity != null && quantity > 1 && /* @__PURE__ */ jsx(
|
|
20822
20822
|
"span",
|
|
@@ -20824,7 +20824,7 @@ function ItemSlot({
|
|
|
20824
20824
|
className: cn(
|
|
20825
20825
|
"absolute -bottom-1 -right-1 flex items-center justify-center",
|
|
20826
20826
|
"min-w-[18px] h-[18px] rounded-full px-1",
|
|
20827
|
-
"bg-
|
|
20827
|
+
"bg-surface border border-muted text-xs font-bold text-foreground"
|
|
20828
20828
|
),
|
|
20829
20829
|
children: quantity
|
|
20830
20830
|
}
|
|
@@ -20844,18 +20844,18 @@ var init_ItemSlot = __esm({
|
|
|
20844
20844
|
lg: "w-18 h-18 text-3xl"
|
|
20845
20845
|
};
|
|
20846
20846
|
rarityBorderMap = {
|
|
20847
|
-
common: "border-
|
|
20848
|
-
uncommon: "border-
|
|
20849
|
-
rare: "border-
|
|
20850
|
-
epic: "border-
|
|
20851
|
-
legendary: "border-
|
|
20847
|
+
common: "border-muted",
|
|
20848
|
+
uncommon: "border-success",
|
|
20849
|
+
rare: "border-info",
|
|
20850
|
+
epic: "border-accent",
|
|
20851
|
+
legendary: "border-warning"
|
|
20852
20852
|
};
|
|
20853
20853
|
rarityGlowMap = {
|
|
20854
20854
|
common: "",
|
|
20855
20855
|
uncommon: "",
|
|
20856
|
-
rare: "shadow-
|
|
20857
|
-
epic: "shadow-
|
|
20858
|
-
legendary: "shadow-
|
|
20856
|
+
rare: "shadow-sm",
|
|
20857
|
+
epic: "shadow-lg",
|
|
20858
|
+
legendary: "shadow-lg"
|
|
20859
20859
|
};
|
|
20860
20860
|
ItemSlot.displayName = "ItemSlot";
|
|
20861
20861
|
}
|
|
@@ -20884,7 +20884,7 @@ function CraftingRecipe({
|
|
|
20884
20884
|
Box,
|
|
20885
20885
|
{
|
|
20886
20886
|
className: cn(
|
|
20887
|
-
"flex flex-wrap items-center gap-3 rounded-
|
|
20887
|
+
"flex flex-wrap items-center gap-3 rounded-container bg-muted/50 border border-border/50 p-3",
|
|
20888
20888
|
className
|
|
20889
20889
|
),
|
|
20890
20890
|
children: [
|
|
@@ -20901,10 +20901,10 @@ function CraftingRecipe({
|
|
|
20901
20901
|
className: cn(!hasSufficient && "opacity-50")
|
|
20902
20902
|
}
|
|
20903
20903
|
) }),
|
|
20904
|
-
index < inputs.length - 1 && /* @__PURE__ */ jsx(Icon, { name: "plus", size: "sm", className: "text-
|
|
20904
|
+
index < inputs.length - 1 && /* @__PURE__ */ jsx(Icon, { name: "plus", size: "sm", className: "text-muted-foreground" })
|
|
20905
20905
|
] }, index);
|
|
20906
20906
|
}) }),
|
|
20907
|
-
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: "md", className: "text-
|
|
20907
|
+
/* @__PURE__ */ jsx(Icon, { name: "arrow-right", size: "md", className: "text-muted-foreground" }),
|
|
20908
20908
|
/* @__PURE__ */ jsx(
|
|
20909
20909
|
ItemSlot,
|
|
20910
20910
|
{
|
|
@@ -20992,7 +20992,7 @@ function DPad({
|
|
|
20992
20992
|
createButton("up"),
|
|
20993
20993
|
/* @__PURE__ */ jsx("div", {}),
|
|
20994
20994
|
createButton("left"),
|
|
20995
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "w-6 h-6 rounded-
|
|
20995
|
+
/* @__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" }) }),
|
|
20996
20996
|
createButton("right"),
|
|
20997
20997
|
/* @__PURE__ */ jsx("div", {}),
|
|
20998
20998
|
createButton("down"),
|
|
@@ -21054,10 +21054,10 @@ var init_DamageNumber = __esm({
|
|
|
21054
21054
|
lg: "text-2xl"
|
|
21055
21055
|
};
|
|
21056
21056
|
typeStyles = {
|
|
21057
|
-
damage: "text-
|
|
21058
|
-
heal: "text-
|
|
21059
|
-
crit: "text-
|
|
21060
|
-
miss: "text-
|
|
21057
|
+
damage: "text-error font-bold",
|
|
21058
|
+
heal: "text-success font-bold",
|
|
21059
|
+
crit: "text-warning font-extrabold",
|
|
21060
|
+
miss: "text-muted-foreground italic"
|
|
21061
21061
|
};
|
|
21062
21062
|
floatKeyframes = `
|
|
21063
21063
|
@keyframes damageFloat {
|
|
@@ -25245,7 +25245,7 @@ function HealthBar({
|
|
|
25245
25245
|
"div",
|
|
25246
25246
|
{
|
|
25247
25247
|
className: cn(
|
|
25248
|
-
"relative overflow-hidden rounded-full bg-
|
|
25248
|
+
"relative overflow-hidden rounded-full bg-muted",
|
|
25249
25249
|
sizes.bar,
|
|
25250
25250
|
"w-24",
|
|
25251
25251
|
className
|
|
@@ -25255,7 +25255,7 @@ function HealthBar({
|
|
|
25255
25255
|
{
|
|
25256
25256
|
className: cn(
|
|
25257
25257
|
"absolute inset-y-0 left-0 rounded-full",
|
|
25258
|
-
percentage > 66 ? "bg-
|
|
25258
|
+
percentage > 66 ? "bg-success" : percentage > 33 ? "bg-warning" : "bg-error",
|
|
25259
25259
|
animated && "transition-all duration-300"
|
|
25260
25260
|
),
|
|
25261
25261
|
style: { width: `${percentage}%` }
|
|
@@ -25277,7 +25277,7 @@ var init_HealthBar = __esm({
|
|
|
25277
25277
|
heartIcon = (filled, size) => /* @__PURE__ */ jsx(
|
|
25278
25278
|
"svg",
|
|
25279
25279
|
{
|
|
25280
|
-
className: cn("transition-all duration-200", size, filled ? "text-
|
|
25280
|
+
className: cn("transition-all duration-200", size, filled ? "text-error" : "text-muted-foreground"),
|
|
25281
25281
|
viewBox: "0 0 24 24",
|
|
25282
25282
|
fill: filled ? "currentColor" : "none",
|
|
25283
25283
|
stroke: "currentColor",
|
|
@@ -25341,7 +25341,7 @@ function ScoreDisplay({
|
|
|
25341
25341
|
),
|
|
25342
25342
|
children: [
|
|
25343
25343
|
icon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: icon }),
|
|
25344
|
-
label && /* @__PURE__ */ jsx("span", { className: "text-
|
|
25344
|
+
label && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label }),
|
|
25345
25345
|
/* @__PURE__ */ jsx("span", { className: "tabular-nums", children: formattedValue })
|
|
25346
25346
|
]
|
|
25347
25347
|
}
|
|
@@ -25379,7 +25379,7 @@ function StatBadge({
|
|
|
25379
25379
|
"div",
|
|
25380
25380
|
{
|
|
25381
25381
|
className: cn(
|
|
25382
|
-
"inline-flex items-center gap-2 rounded-
|
|
25382
|
+
"inline-flex items-center gap-2 rounded-container border backdrop-blur-sm",
|
|
25383
25383
|
sizeMap11[size] ?? sizeMap11.md,
|
|
25384
25384
|
variantMap2[variant] ?? variantMap2.default,
|
|
25385
25385
|
className
|
|
@@ -25528,7 +25528,7 @@ function WaypointMarker({
|
|
|
25528
25528
|
"div",
|
|
25529
25529
|
{
|
|
25530
25530
|
className: cn(
|
|
25531
|
-
"absolute rounded-full border-2 border-
|
|
25531
|
+
"absolute rounded-full border-2 border-info animate-ping opacity-50",
|
|
25532
25532
|
sizes.ring
|
|
25533
25533
|
)
|
|
25534
25534
|
}
|
|
@@ -25537,7 +25537,7 @@ function WaypointMarker({
|
|
|
25537
25537
|
"div",
|
|
25538
25538
|
{
|
|
25539
25539
|
className: cn(
|
|
25540
|
-
"absolute rounded-full border-2 border-
|
|
25540
|
+
"absolute rounded-full border-2 border-info",
|
|
25541
25541
|
sizes.ring
|
|
25542
25542
|
)
|
|
25543
25543
|
}
|
|
@@ -25548,9 +25548,9 @@ function WaypointMarker({
|
|
|
25548
25548
|
className: cn(
|
|
25549
25549
|
"relative flex items-center justify-center rounded-full transition-all duration-200",
|
|
25550
25550
|
sizes.dot,
|
|
25551
|
-
completed && "bg-
|
|
25552
|
-
active && !completed && "bg-
|
|
25553
|
-
!active && !completed && "bg-
|
|
25551
|
+
completed && "bg-success text-foreground",
|
|
25552
|
+
active && !completed && "bg-info text-foreground",
|
|
25553
|
+
!active && !completed && "bg-muted"
|
|
25554
25554
|
),
|
|
25555
25555
|
children: completed ? checkIcon : icon
|
|
25556
25556
|
}
|
|
@@ -25562,7 +25562,7 @@ function WaypointMarker({
|
|
|
25562
25562
|
className: cn(
|
|
25563
25563
|
"text-center whitespace-nowrap",
|
|
25564
25564
|
sizes.label,
|
|
25565
|
-
completed ? "text-
|
|
25565
|
+
completed ? "text-success" : active ? "text-info" : "text-muted-foreground"
|
|
25566
25566
|
),
|
|
25567
25567
|
children: label
|
|
25568
25568
|
}
|
|
@@ -25594,10 +25594,10 @@ function QuestTracker({
|
|
|
25594
25594
|
Box,
|
|
25595
25595
|
{
|
|
25596
25596
|
className: cn(
|
|
25597
|
-
"flex items-start gap-3 rounded-
|
|
25598
|
-
isActive && !isCompleted && "bg-
|
|
25599
|
-
isCompleted && "bg-
|
|
25600
|
-
!isActive && !isCompleted && "bg-
|
|
25597
|
+
"flex items-start gap-3 rounded-container px-3 py-2 transition-colors",
|
|
25598
|
+
isActive && !isCompleted && "bg-info/20 border border-info/50",
|
|
25599
|
+
isCompleted && "bg-success/10 border border-success/30 opacity-70",
|
|
25600
|
+
!isActive && !isCompleted && "bg-muted/30 border border-border/30"
|
|
25601
25601
|
),
|
|
25602
25602
|
children: [
|
|
25603
25603
|
/* @__PURE__ */ jsx(Box, { className: "flex-shrink-0 pt-0.5", children: /* @__PURE__ */ jsx(
|
|
@@ -25615,9 +25615,9 @@ function QuestTracker({
|
|
|
25615
25615
|
variant: "body2",
|
|
25616
25616
|
className: cn(
|
|
25617
25617
|
"font-medium truncate",
|
|
25618
|
-
isCompleted && "line-through text-
|
|
25619
|
-
isActive && !isCompleted && "text-
|
|
25620
|
-
!isActive && !isCompleted && "text-
|
|
25618
|
+
isCompleted && "line-through text-muted-foreground",
|
|
25619
|
+
isActive && !isCompleted && "text-info",
|
|
25620
|
+
!isActive && !isCompleted && "text-muted-foreground"
|
|
25621
25621
|
),
|
|
25622
25622
|
children: quest.title
|
|
25623
25623
|
}
|
|
@@ -25635,7 +25635,7 @@ function QuestTracker({
|
|
|
25635
25635
|
Typography,
|
|
25636
25636
|
{
|
|
25637
25637
|
variant: "caption",
|
|
25638
|
-
className: "text-
|
|
25638
|
+
className: "text-muted-foreground mt-1",
|
|
25639
25639
|
children: [
|
|
25640
25640
|
quest.progress,
|
|
25641
25641
|
" / ",
|
|
@@ -25692,14 +25692,14 @@ function PowerupSlots({
|
|
|
25692
25692
|
{
|
|
25693
25693
|
className: cn(
|
|
25694
25694
|
"absolute -bottom-1 left-1/2 -translate-x-1/2",
|
|
25695
|
-
"rounded px-1 py-px",
|
|
25696
|
-
"bg-
|
|
25695
|
+
"rounded-interactive px-1 py-px",
|
|
25696
|
+
"bg-background/80 border border-border"
|
|
25697
25697
|
),
|
|
25698
25698
|
children: /* @__PURE__ */ jsx(
|
|
25699
25699
|
Typography,
|
|
25700
25700
|
{
|
|
25701
25701
|
variant: "caption",
|
|
25702
|
-
className: "text-[9px] font-mono font-bold text-
|
|
25702
|
+
className: "text-[9px] font-mono font-bold text-warning whitespace-nowrap",
|
|
25703
25703
|
children: formatTime(powerup.remainingTime)
|
|
25704
25704
|
}
|
|
25705
25705
|
)
|
|
@@ -25732,6 +25732,8 @@ function GameCanvas2D({
|
|
|
25732
25732
|
height = 600,
|
|
25733
25733
|
onDraw,
|
|
25734
25734
|
onTick,
|
|
25735
|
+
tickEvent,
|
|
25736
|
+
drawEvent,
|
|
25735
25737
|
fps = 60,
|
|
25736
25738
|
className
|
|
25737
25739
|
}) {
|
|
@@ -25739,10 +25741,17 @@ function GameCanvas2D({
|
|
|
25739
25741
|
const rafRef = React80.useRef(0);
|
|
25740
25742
|
const frameRef = React80.useRef(0);
|
|
25741
25743
|
const lastTimeRef = React80.useRef(0);
|
|
25744
|
+
const emit = useEmitEvent();
|
|
25742
25745
|
const onDrawRef = React80.useRef(onDraw);
|
|
25743
25746
|
onDrawRef.current = onDraw;
|
|
25744
25747
|
const onTickRef = React80.useRef(onTick);
|
|
25745
25748
|
onTickRef.current = onTick;
|
|
25749
|
+
const tickEventRef = React80.useRef(tickEvent);
|
|
25750
|
+
tickEventRef.current = tickEvent;
|
|
25751
|
+
const drawEventRef = React80.useRef(drawEvent);
|
|
25752
|
+
drawEventRef.current = drawEvent;
|
|
25753
|
+
const emitRef = React80.useRef(emit);
|
|
25754
|
+
emitRef.current = emit;
|
|
25746
25755
|
React80.useEffect(() => {
|
|
25747
25756
|
const canvas = canvasRef.current;
|
|
25748
25757
|
if (!canvas) return;
|
|
@@ -25759,8 +25768,15 @@ function GameCanvas2D({
|
|
|
25759
25768
|
if (elapsed >= interval) {
|
|
25760
25769
|
const dt = elapsed / 1e3;
|
|
25761
25770
|
lastTimeRef.current = timestamp - elapsed % interval;
|
|
25771
|
+
const frame = frameRef.current;
|
|
25762
25772
|
onTickRef.current?.(dt);
|
|
25763
|
-
|
|
25773
|
+
if (tickEventRef.current) {
|
|
25774
|
+
emitRef.current(tickEventRef.current, { dt, frame });
|
|
25775
|
+
}
|
|
25776
|
+
onDrawRef.current?.(ctx, frame);
|
|
25777
|
+
if (drawEventRef.current) {
|
|
25778
|
+
emitRef.current(drawEventRef.current, { frame });
|
|
25779
|
+
}
|
|
25764
25780
|
frameRef.current += 1;
|
|
25765
25781
|
}
|
|
25766
25782
|
rafRef.current = requestAnimationFrame(loop);
|
|
@@ -25786,6 +25802,7 @@ var init_GameCanvas2D = __esm({
|
|
|
25786
25802
|
"use client";
|
|
25787
25803
|
init_cn();
|
|
25788
25804
|
init_Box();
|
|
25805
|
+
init_useEventBus();
|
|
25789
25806
|
GameCanvas2D.displayName = "GameCanvas2D";
|
|
25790
25807
|
}
|
|
25791
25808
|
});
|
|
@@ -25804,7 +25821,7 @@ function HealthPanel({
|
|
|
25804
25821
|
Box,
|
|
25805
25822
|
{
|
|
25806
25823
|
className: cn(
|
|
25807
|
-
"rounded-
|
|
25824
|
+
"rounded-container bg-[var(--color-card)]/90 border border-border backdrop-blur-sm",
|
|
25808
25825
|
sizes.padding,
|
|
25809
25826
|
className
|
|
25810
25827
|
),
|
|
@@ -25815,7 +25832,7 @@ function HealthPanel({
|
|
|
25815
25832
|
{
|
|
25816
25833
|
variant: "caption",
|
|
25817
25834
|
weight: "bold",
|
|
25818
|
-
className: "text-
|
|
25835
|
+
className: "text-muted-foreground uppercase tracking-wider",
|
|
25819
25836
|
children: label
|
|
25820
25837
|
}
|
|
25821
25838
|
),
|
|
@@ -25836,7 +25853,7 @@ function HealthPanel({
|
|
|
25836
25853
|
as: "span",
|
|
25837
25854
|
variant: "caption",
|
|
25838
25855
|
weight: "bold",
|
|
25839
|
-
className: "text-
|
|
25856
|
+
className: "text-info ml-1",
|
|
25840
25857
|
children: [
|
|
25841
25858
|
"+",
|
|
25842
25859
|
shield
|
|
@@ -25861,14 +25878,14 @@ function HealthPanel({
|
|
|
25861
25878
|
Box,
|
|
25862
25879
|
{
|
|
25863
25880
|
className: cn(
|
|
25864
|
-
"relative overflow-hidden rounded-
|
|
25881
|
+
"relative overflow-hidden rounded-container bg-muted",
|
|
25865
25882
|
size === "sm" ? "h-1" : size === "md" ? "h-1.5" : "h-2",
|
|
25866
25883
|
"w-full"
|
|
25867
25884
|
),
|
|
25868
25885
|
children: /* @__PURE__ */ jsx(
|
|
25869
25886
|
Box,
|
|
25870
25887
|
{
|
|
25871
|
-
className: "absolute inset-y-0 left-0 rounded-
|
|
25888
|
+
className: "absolute inset-y-0 left-0 rounded-container bg-info transition-all duration-300",
|
|
25872
25889
|
style: { width: `${Math.min(100, shield / max * 100)}%` }
|
|
25873
25890
|
}
|
|
25874
25891
|
)
|
|
@@ -25927,7 +25944,7 @@ function ScoreBoard({
|
|
|
25927
25944
|
Card,
|
|
25928
25945
|
{
|
|
25929
25946
|
className: cn(
|
|
25930
|
-
"bg-[var(--color-card)]/90 border-
|
|
25947
|
+
"bg-[var(--color-card)]/90 border-border backdrop-blur-sm",
|
|
25931
25948
|
className
|
|
25932
25949
|
),
|
|
25933
25950
|
children: /* @__PURE__ */ jsx(CardContent, { className: "p-3", children: /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-3 flex-wrap", children: [
|
|
@@ -26036,8 +26053,8 @@ function TurnIndicator({
|
|
|
26036
26053
|
"div",
|
|
26037
26054
|
{
|
|
26038
26055
|
className: cn(
|
|
26039
|
-
"inline-flex items-center rounded-
|
|
26040
|
-
"bg-
|
|
26056
|
+
"inline-flex items-center rounded-container",
|
|
26057
|
+
"bg-card/80 border border-muted font-medium text-foreground",
|
|
26041
26058
|
sizes.wrapper,
|
|
26042
26059
|
className
|
|
26043
26060
|
),
|
|
@@ -26045,19 +26062,19 @@ function TurnIndicator({
|
|
|
26045
26062
|
/* @__PURE__ */ jsxs("span", { className: "font-bold tabular-nums", children: [
|
|
26046
26063
|
"Turn ",
|
|
26047
26064
|
currentTurn,
|
|
26048
|
-
maxTurns != null && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
26065
|
+
maxTurns != null && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
26049
26066
|
"/",
|
|
26050
26067
|
maxTurns
|
|
26051
26068
|
] })
|
|
26052
26069
|
] }),
|
|
26053
26070
|
phase && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26054
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
26055
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
26071
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "|" }),
|
|
26072
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: phase })
|
|
26056
26073
|
] }),
|
|
26057
26074
|
activeTeam && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
26058
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
26059
|
-
/* @__PURE__ */ jsx("span", { className: cn("rounded-full bg-
|
|
26060
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
26075
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "|" }),
|
|
26076
|
+
/* @__PURE__ */ jsx("span", { className: cn("rounded-full bg-success/20", sizes.dot) }),
|
|
26077
|
+
/* @__PURE__ */ jsx("span", { className: "text-success", children: activeTeam })
|
|
26061
26078
|
] })
|
|
26062
26079
|
]
|
|
26063
26080
|
}
|
|
@@ -26096,7 +26113,7 @@ function TurnPanel({
|
|
|
26096
26113
|
Box,
|
|
26097
26114
|
{
|
|
26098
26115
|
className: cn(
|
|
26099
|
-
"flex items-center gap-3 rounded-
|
|
26116
|
+
"flex items-center gap-3 rounded-container bg-[var(--color-card)]/90 border border-border backdrop-blur-sm px-3 py-2",
|
|
26100
26117
|
className
|
|
26101
26118
|
),
|
|
26102
26119
|
children: [
|
|
@@ -26148,7 +26165,7 @@ function EnemyPlate({
|
|
|
26148
26165
|
Box,
|
|
26149
26166
|
{
|
|
26150
26167
|
className: cn(
|
|
26151
|
-
"inline-flex flex-col gap-1 rounded-
|
|
26168
|
+
"inline-flex flex-col gap-1 rounded-container bg-[var(--color-card)]/90 border border-border backdrop-blur-sm px-3 py-1.5",
|
|
26152
26169
|
"min-w-[120px]",
|
|
26153
26170
|
className
|
|
26154
26171
|
),
|
|
@@ -26242,7 +26259,7 @@ function UnitCommandBar({
|
|
|
26242
26259
|
Box,
|
|
26243
26260
|
{
|
|
26244
26261
|
className: cn(
|
|
26245
|
-
"flex items-center gap-1.5 rounded-
|
|
26262
|
+
"flex items-center gap-1.5 rounded-container bg-[var(--color-card)]/90 border border-border backdrop-blur-sm px-2 py-1.5",
|
|
26246
26263
|
className
|
|
26247
26264
|
),
|
|
26248
26265
|
children: commands.map((command, i) => /* @__PURE__ */ jsxs(Box, { className: "flex flex-col items-center gap-0.5", children: [
|
|
@@ -26327,8 +26344,8 @@ function GameHud({
|
|
|
26327
26344
|
className: cn(
|
|
26328
26345
|
"relative z-10",
|
|
26329
26346
|
positionMap[position],
|
|
26330
|
-
transparent && "bg-gradient-to-b from-
|
|
26331
|
-
position === "bottom" && "bg-gradient-to-t from-
|
|
26347
|
+
transparent && "bg-gradient-to-b from-background/50 to-transparent",
|
|
26348
|
+
position === "bottom" && "bg-gradient-to-t from-background/50 to-transparent",
|
|
26332
26349
|
className
|
|
26333
26350
|
),
|
|
26334
26351
|
children: /* @__PURE__ */ jsx("div", { className: "flex gap-4", children: stats.map((stat, i) => /* @__PURE__ */ jsx(StatBadge, { ...stat, size }, i)) })
|
|
@@ -26486,8 +26503,8 @@ function DialogueBox({
|
|
|
26486
26503
|
tabIndex: 0,
|
|
26487
26504
|
role: "dialog",
|
|
26488
26505
|
"aria-label": "Dialogue",
|
|
26489
|
-
children: /* @__PURE__ */ jsx("div", { className: "mx-4 my-4 bg-[var(--color-card)] bg-opacity-95 border-2 border-
|
|
26490
|
-
dialogue.portrait && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 p-4 border-r border-
|
|
26506
|
+
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: [
|
|
26507
|
+
dialogue.portrait && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 p-4 border-r border-border", children: /* @__PURE__ */ jsx(
|
|
26491
26508
|
"img",
|
|
26492
26509
|
{
|
|
26493
26510
|
src: dialogue.portrait,
|
|
@@ -26497,7 +26514,7 @@ function DialogueBox({
|
|
|
26497
26514
|
}
|
|
26498
26515
|
) }),
|
|
26499
26516
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 p-4", children: [
|
|
26500
|
-
/* @__PURE__ */ jsx("div", { className: "text-
|
|
26517
|
+
/* @__PURE__ */ jsx("div", { className: "text-warning font-bold mb-2", children: dialogue.speaker }),
|
|
26501
26518
|
/* @__PURE__ */ jsxs("div", { className: "text-[var(--color-foreground)] text-lg leading-relaxed min-h-[60px]", children: [
|
|
26502
26519
|
displayedText,
|
|
26503
26520
|
isTyping && /* @__PURE__ */ jsx("span", { className: "animate-pulse", children: "\u258C" })
|
|
@@ -26507,9 +26524,9 @@ function DialogueBox({
|
|
|
26507
26524
|
{
|
|
26508
26525
|
type: "button",
|
|
26509
26526
|
className: cn(
|
|
26510
|
-
"block w-full text-left px-4 py-2 rounded transition-colors",
|
|
26511
|
-
"hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-
|
|
26512
|
-
selectedChoice === index ? "bg-[var(--color-surface,#374151)] text-
|
|
26527
|
+
"block w-full text-left px-4 py-2 rounded-interactive transition-colors",
|
|
26528
|
+
"hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-warning",
|
|
26529
|
+
selectedChoice === index ? "bg-[var(--color-surface,#374151)] text-warning" : "bg-[var(--color-card)] text-[var(--color-foreground)]"
|
|
26513
26530
|
),
|
|
26514
26531
|
onClick: (e) => {
|
|
26515
26532
|
e.stopPropagation();
|
|
@@ -26517,7 +26534,7 @@ function DialogueBox({
|
|
|
26517
26534
|
onChoice?.(choice);
|
|
26518
26535
|
},
|
|
26519
26536
|
children: [
|
|
26520
|
-
/* @__PURE__ */ jsxs("span", { className: "text-
|
|
26537
|
+
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground mr-2", children: [
|
|
26521
26538
|
index + 1,
|
|
26522
26539
|
"."
|
|
26523
26540
|
] }),
|
|
@@ -26526,7 +26543,7 @@ function DialogueBox({
|
|
|
26526
26543
|
},
|
|
26527
26544
|
index
|
|
26528
26545
|
)) }),
|
|
26529
|
-
!isTyping && !dialogue.choices?.length && /* @__PURE__ */ jsx("div", { className: "mt-4 text-
|
|
26546
|
+
!isTyping && !dialogue.choices?.length && /* @__PURE__ */ jsx("div", { className: "mt-4 text-muted-foreground text-sm animate-pulse", children: "Press SPACE or click to continue..." })
|
|
26530
26547
|
] })
|
|
26531
26548
|
] }) })
|
|
26532
26549
|
}
|
|
@@ -26629,7 +26646,7 @@ function InventoryPanel({
|
|
|
26629
26646
|
/* @__PURE__ */ jsx(
|
|
26630
26647
|
"div",
|
|
26631
26648
|
{
|
|
26632
|
-
className: "grid gap-1 bg-[var(--color-card)] p-2 rounded-
|
|
26649
|
+
className: "grid gap-1 bg-[var(--color-card)] p-2 rounded-container border border-border",
|
|
26633
26650
|
style: {
|
|
26634
26651
|
gridTemplateColumns: `repeat(${safeColumns}, ${slotSize}px)`,
|
|
26635
26652
|
gridTemplateRows: `repeat(${rows}, ${slotSize}px)`
|
|
@@ -26641,8 +26658,8 @@ function InventoryPanel({
|
|
|
26641
26658
|
className: cn(
|
|
26642
26659
|
"relative flex items-center justify-center",
|
|
26643
26660
|
"bg-[var(--color-card)] border rounded transition-colors",
|
|
26644
|
-
"hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-
|
|
26645
|
-
selectedSlot === index ? "border-
|
|
26661
|
+
"hover:bg-[var(--color-surface,#374151)] focus:outline-none focus:ring-2 focus:ring-info",
|
|
26662
|
+
selectedSlot === index ? "border-warning bg-[var(--color-surface,#374151)]" : "border-muted"
|
|
26646
26663
|
),
|
|
26647
26664
|
style: { width: slotSize, height: slotSize },
|
|
26648
26665
|
onClick: () => handleSlotClick(index),
|
|
@@ -26661,8 +26678,8 @@ function InventoryPanel({
|
|
|
26661
26678
|
className: "w-8 h-8 object-contain",
|
|
26662
26679
|
style: { imageRendering: "pixelated" }
|
|
26663
26680
|
}
|
|
26664
|
-
) : /* @__PURE__ */ jsx("div", { className: "w-8 h-8 bg-
|
|
26665
|
-
item.quantity > 1 && /* @__PURE__ */ jsx("span", { className: "absolute bottom-0 right-0 bg-
|
|
26681
|
+
) : /* @__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() }),
|
|
26682
|
+
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 })
|
|
26666
26683
|
] })
|
|
26667
26684
|
},
|
|
26668
26685
|
index
|
|
@@ -26672,7 +26689,7 @@ function InventoryPanel({
|
|
|
26672
26689
|
showTooltips && hoveredItem && /* @__PURE__ */ jsxs(
|
|
26673
26690
|
"div",
|
|
26674
26691
|
{
|
|
26675
|
-
className: "fixed z-50 bg-[var(--color-card)] border border-
|
|
26692
|
+
className: "fixed z-50 bg-[var(--color-card)] border border-border rounded-container p-2 shadow-elevation-card pointer-events-none",
|
|
26676
26693
|
style: {
|
|
26677
26694
|
left: tooltipPosition.x,
|
|
26678
26695
|
top: tooltipPosition.y,
|
|
@@ -26680,8 +26697,8 @@ function InventoryPanel({
|
|
|
26680
26697
|
},
|
|
26681
26698
|
children: [
|
|
26682
26699
|
/* @__PURE__ */ jsx("div", { className: "font-semibold text-[var(--color-foreground)]", children: hoveredItem.name || hoveredItem.type }),
|
|
26683
|
-
hoveredItem.description && /* @__PURE__ */ jsx("div", { className: "text-sm text-
|
|
26684
|
-
/* @__PURE__ */ jsxs("div", { className: "text-xs text-
|
|
26700
|
+
hoveredItem.description && /* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground mt-1", children: hoveredItem.description }),
|
|
26701
|
+
/* @__PURE__ */ jsxs("div", { className: "text-xs text-muted-foreground mt-1", children: [
|
|
26685
26702
|
"Quantity: ",
|
|
26686
26703
|
hoveredItem.quantity
|
|
26687
26704
|
] })
|
|
@@ -26759,7 +26776,7 @@ function GameMenu({
|
|
|
26759
26776
|
children: title
|
|
26760
26777
|
}
|
|
26761
26778
|
),
|
|
26762
|
-
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-2 text-lg text-
|
|
26779
|
+
subtitle && /* @__PURE__ */ jsx("p", { className: "mt-2 text-lg text-muted-foreground tracking-widest uppercase", children: subtitle })
|
|
26763
26780
|
] }),
|
|
26764
26781
|
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-4 w-full max-w-md", children: resolvedOptions.map((option, index) => /* @__PURE__ */ jsx(
|
|
26765
26782
|
"button",
|
|
@@ -26767,10 +26784,10 @@ function GameMenu({
|
|
|
26767
26784
|
onClick: () => handleOptionClick(option),
|
|
26768
26785
|
disabled: option.disabled,
|
|
26769
26786
|
className: cn(
|
|
26770
|
-
"w-full py-4 px-8 rounded-
|
|
26787
|
+
"w-full py-4 px-8 rounded-container border-2 font-bold text-lg",
|
|
26771
26788
|
"transition-all duration-200 transform",
|
|
26772
26789
|
"hover:scale-105 active:scale-95",
|
|
26773
|
-
"focus:outline-none focus:ring-4 focus:ring-
|
|
26790
|
+
"focus:outline-none focus:ring-4 focus:ring-foreground/25",
|
|
26774
26791
|
variantMap3[option.variant ?? "secondary"] ?? variantMap3.secondary,
|
|
26775
26792
|
option.disabled && "opacity-50 cursor-not-allowed hover:scale-100"
|
|
26776
26793
|
),
|
|
@@ -26782,8 +26799,8 @@ function GameMenu({
|
|
|
26782
26799
|
index
|
|
26783
26800
|
)) }),
|
|
26784
26801
|
/* @__PURE__ */ jsxs("div", { className: "absolute inset-0 pointer-events-none overflow-hidden", children: [
|
|
26785
|
-
/* @__PURE__ */ jsx("div", { className: "absolute top-1/4 left-1/4 w-64 h-64 bg-
|
|
26786
|
-
/* @__PURE__ */ jsx("div", { className: "absolute bottom-1/4 right-1/4 w-96 h-96 bg-
|
|
26802
|
+
/* @__PURE__ */ jsx("div", { className: "absolute top-1/4 left-1/4 w-64 h-64 bg-info/10 rounded-container blur-3xl" }),
|
|
26803
|
+
/* @__PURE__ */ jsx("div", { className: "absolute bottom-1/4 right-1/4 w-96 h-96 bg-accent/10 rounded-container blur-3xl" })
|
|
26787
26804
|
] })
|
|
26788
26805
|
]
|
|
26789
26806
|
}
|
|
@@ -26796,9 +26813,9 @@ var init_GameMenu = __esm({
|
|
|
26796
26813
|
init_cn();
|
|
26797
26814
|
init_useEventBus();
|
|
26798
26815
|
variantMap3 = {
|
|
26799
|
-
primary: "bg-[var(--color-primary)] hover:bg-
|
|
26800
|
-
secondary: "bg-[var(--color-surface,#374151)] hover:bg-
|
|
26801
|
-
ghost: "bg-transparent hover:bg-
|
|
26816
|
+
primary: "bg-[var(--color-primary)] hover:bg-info text-[var(--color-primary-foreground)] border-info shadow-lg shadow-info/25",
|
|
26817
|
+
secondary: "bg-[var(--color-surface,#374151)] hover:bg-muted text-[var(--color-foreground)] border-muted",
|
|
26818
|
+
ghost: "bg-transparent hover:bg-foreground/10 text-[var(--color-foreground)] border-foreground/20"
|
|
26802
26819
|
};
|
|
26803
26820
|
GameMenu.displayName = "GameMenu";
|
|
26804
26821
|
}
|
|
@@ -26866,13 +26883,13 @@ function GameOverScreen({
|
|
|
26866
26883
|
children: title
|
|
26867
26884
|
}
|
|
26868
26885
|
),
|
|
26869
|
-
message && /* @__PURE__ */ jsx("p", { className: "text-xl text-
|
|
26870
|
-
isNewHighScore && /* @__PURE__ */ jsx("div", { className: "mb-6 px-6 py-2 bg-
|
|
26886
|
+
message && /* @__PURE__ */ jsx("p", { className: "text-xl text-muted-foreground mb-8 text-center max-w-md", children: message }),
|
|
26887
|
+
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}" }) }),
|
|
26871
26888
|
stats.length > 0 && /* @__PURE__ */ jsx(
|
|
26872
26889
|
"div",
|
|
26873
26890
|
{
|
|
26874
26891
|
className: cn(
|
|
26875
|
-
"mb-8 p-6 rounded-
|
|
26892
|
+
"mb-8 p-6 rounded-container border-2 bg-background/30",
|
|
26876
26893
|
colors.accent
|
|
26877
26894
|
),
|
|
26878
26895
|
children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 md:grid-cols-3 gap-4", children: stats.map((stat, index) => {
|
|
@@ -26881,7 +26898,7 @@ function GameOverScreen({
|
|
|
26881
26898
|
displayValue = formatTime2(displayValue);
|
|
26882
26899
|
}
|
|
26883
26900
|
return /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
26884
|
-
/* @__PURE__ */ jsx("div", { className: "text-
|
|
26901
|
+
/* @__PURE__ */ jsx("div", { className: "text-muted-foreground text-sm mb-1", children: stat.label }),
|
|
26885
26902
|
/* @__PURE__ */ jsxs("div", { className: "text-[var(--color-foreground)] text-2xl font-bold flex items-center justify-center gap-2", children: [
|
|
26886
26903
|
stat.icon && /* @__PURE__ */ jsx("span", { children: stat.icon }),
|
|
26887
26904
|
/* @__PURE__ */ jsx("span", { className: "tabular-nums", children: displayValue })
|
|
@@ -26895,10 +26912,10 @@ function GameOverScreen({
|
|
|
26895
26912
|
{
|
|
26896
26913
|
onClick: () => handleActionClick(action),
|
|
26897
26914
|
className: cn(
|
|
26898
|
-
"px-8 py-4 rounded-
|
|
26915
|
+
"px-8 py-4 rounded-container border-2 font-bold text-lg",
|
|
26899
26916
|
"transition-all duration-200",
|
|
26900
26917
|
"hover:scale-105 active:scale-95",
|
|
26901
|
-
"focus:outline-none focus:ring-4 focus:ring-
|
|
26918
|
+
"focus:outline-none focus:ring-4 focus:ring-foreground/25",
|
|
26902
26919
|
buttonVariants[action.variant ?? "secondary"]
|
|
26903
26920
|
),
|
|
26904
26921
|
children: action.label
|
|
@@ -26917,25 +26934,25 @@ var init_GameOverScreen = __esm({
|
|
|
26917
26934
|
init_useEventBus();
|
|
26918
26935
|
variantColors = {
|
|
26919
26936
|
victory: {
|
|
26920
|
-
bg: "from-
|
|
26921
|
-
title: "text-
|
|
26922
|
-
accent: "border-
|
|
26937
|
+
bg: "from-success/90 to-success/90",
|
|
26938
|
+
title: "text-success",
|
|
26939
|
+
accent: "border-success"
|
|
26923
26940
|
},
|
|
26924
26941
|
defeat: {
|
|
26925
|
-
bg: "from-
|
|
26926
|
-
title: "text-
|
|
26927
|
-
accent: "border-
|
|
26942
|
+
bg: "from-error/90 to-background/90",
|
|
26943
|
+
title: "text-error",
|
|
26944
|
+
accent: "border-error"
|
|
26928
26945
|
},
|
|
26929
26946
|
neutral: {
|
|
26930
|
-
bg: "from-
|
|
26931
|
-
title: "text-
|
|
26932
|
-
accent: "border-
|
|
26947
|
+
bg: "from-muted/90 to-background/90",
|
|
26948
|
+
title: "text-foreground",
|
|
26949
|
+
accent: "border-muted"
|
|
26933
26950
|
}
|
|
26934
26951
|
};
|
|
26935
26952
|
buttonVariants = {
|
|
26936
|
-
primary: "bg-[var(--color-primary)] hover:bg-
|
|
26937
|
-
secondary: "bg-[var(--color-surface,#374151)] hover:bg-
|
|
26938
|
-
ghost: "bg-transparent hover:bg-
|
|
26953
|
+
primary: "bg-[var(--color-primary)] hover:bg-info text-[var(--color-primary-foreground)] border-info",
|
|
26954
|
+
secondary: "bg-[var(--color-surface,#374151)] hover:bg-muted text-[var(--color-foreground)] border-muted",
|
|
26955
|
+
ghost: "bg-transparent hover:bg-foreground/10 text-[var(--color-foreground)] border-foreground/20"
|
|
26939
26956
|
};
|
|
26940
26957
|
GameOverScreen.displayName = "GameOverScreen";
|
|
26941
26958
|
}
|
|
@@ -27169,7 +27186,7 @@ function PlatformerCanvas({
|
|
|
27169
27186
|
{
|
|
27170
27187
|
ref: canvasRef,
|
|
27171
27188
|
style: { width: canvasWidth, height: canvasHeight },
|
|
27172
|
-
className: cn("block rounded-
|
|
27189
|
+
className: cn("block rounded-container border border-border/10", className),
|
|
27173
27190
|
"data-testid": "platformer-canvas",
|
|
27174
27191
|
tabIndex: 0
|
|
27175
27192
|
}
|
|
@@ -34836,7 +34853,7 @@ function DebuggerBoard({
|
|
|
34836
34853
|
backgroundPosition: "center"
|
|
34837
34854
|
},
|
|
34838
34855
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
34839
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
34856
|
+
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,
|
|
34840
34857
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
34841
34858
|
/* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
34842
34859
|
/* @__PURE__ */ jsx(Icon, { icon: Bug, size: "sm" }),
|
|
@@ -34849,11 +34866,11 @@ function DebuggerBoard({
|
|
|
34849
34866
|
const isFlagged = flaggedLines.has(line.id);
|
|
34850
34867
|
let lineStyle = "";
|
|
34851
34868
|
if (submitted) {
|
|
34852
|
-
if (line.isBug && isFlagged) lineStyle = "bg-
|
|
34853
|
-
else if (line.isBug && !isFlagged) lineStyle = "bg-
|
|
34854
|
-
else if (!line.isBug && isFlagged) lineStyle = "bg-
|
|
34869
|
+
if (line.isBug && isFlagged) lineStyle = "bg-success/10";
|
|
34870
|
+
else if (line.isBug && !isFlagged) lineStyle = "bg-warning/10";
|
|
34871
|
+
else if (!line.isBug && isFlagged) lineStyle = "bg-error/10";
|
|
34855
34872
|
} else if (isFlagged) {
|
|
34856
|
-
lineStyle = "bg-
|
|
34873
|
+
lineStyle = "bg-error/10";
|
|
34857
34874
|
}
|
|
34858
34875
|
return /* @__PURE__ */ jsxs(
|
|
34859
34876
|
HStack,
|
|
@@ -34866,8 +34883,8 @@ function DebuggerBoard({
|
|
|
34866
34883
|
/* @__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 }) }),
|
|
34867
34884
|
/* @__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 }) }),
|
|
34868
34885
|
/* @__PURE__ */ jsxs(Box, { className: "w-8 flex-shrink-0 flex items-center justify-center", children: [
|
|
34869
|
-
isFlagged && /* @__PURE__ */ jsx(Icon, { icon: Bug, size: "xs", className: "text-
|
|
34870
|
-
submitted && line.isBug && !isFlagged && /* @__PURE__ */ jsx(Icon, { icon: Bug, size: "xs", className: "text-
|
|
34886
|
+
isFlagged && /* @__PURE__ */ jsx(Icon, { icon: Bug, size: "xs", className: "text-error" }),
|
|
34887
|
+
submitted && line.isBug && !isFlagged && /* @__PURE__ */ jsx(Icon, { icon: Bug, size: "xs", className: "text-warning" })
|
|
34871
34888
|
] })
|
|
34872
34889
|
]
|
|
34873
34890
|
},
|
|
@@ -34882,7 +34899,7 @@ function DebuggerBoard({
|
|
|
34882
34899
|
{
|
|
34883
34900
|
icon: flaggedLines.has(line.id) ? CheckCircle : XCircle,
|
|
34884
34901
|
size: "xs",
|
|
34885
|
-
className: flaggedLines.has(line.id) ? "text-
|
|
34902
|
+
className: flaggedLines.has(line.id) ? "text-success mt-0.5" : "text-warning mt-0.5"
|
|
34886
34903
|
}
|
|
34887
34904
|
),
|
|
34888
34905
|
/* @__PURE__ */ jsxs(VStack, { gap: "none", children: [
|
|
@@ -34891,7 +34908,7 @@ function DebuggerBoard({
|
|
|
34891
34908
|
] })
|
|
34892
34909
|
] }, line.id))
|
|
34893
34910
|
] }) }),
|
|
34894
|
-
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
34911
|
+
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-warning", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.hint }) }),
|
|
34895
34912
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "center", children: [
|
|
34896
34913
|
!submitted ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleSubmit, disabled: flaggedLines.size === 0, children: [
|
|
34897
34914
|
/* @__PURE__ */ jsx(Icon, { icon: Send, size: "sm" }),
|
|
@@ -35375,12 +35392,12 @@ function DialogueBubble({
|
|
|
35375
35392
|
"div",
|
|
35376
35393
|
{
|
|
35377
35394
|
className: cn(
|
|
35378
|
-
"flex items-start gap-3 rounded-
|
|
35395
|
+
"flex items-start gap-3 rounded-container bg-background/80 backdrop-blur-sm px-4 py-3 border border-border/10",
|
|
35379
35396
|
position === "top" ? "rounded-bl-none" : "rounded-tl-none",
|
|
35380
35397
|
className
|
|
35381
35398
|
),
|
|
35382
35399
|
children: [
|
|
35383
|
-
portrait && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-12 h-12 rounded-full overflow-hidden border-2 border-
|
|
35400
|
+
portrait && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-12 h-12 rounded-full overflow-hidden border-2 border-warning/60", children: /* @__PURE__ */ jsx(
|
|
35384
35401
|
"img",
|
|
35385
35402
|
{
|
|
35386
35403
|
src: portrait,
|
|
@@ -35389,8 +35406,8 @@ function DialogueBubble({
|
|
|
35389
35406
|
}
|
|
35390
35407
|
) }),
|
|
35391
35408
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 min-w-0", children: [
|
|
35392
|
-
speaker && /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-
|
|
35393
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm text-
|
|
35409
|
+
speaker && /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-warning", children: speaker }),
|
|
35410
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm text-foreground leading-relaxed", children: text })
|
|
35394
35411
|
] })
|
|
35395
35412
|
]
|
|
35396
35413
|
}
|
|
@@ -35709,7 +35726,7 @@ function LinearView({
|
|
|
35709
35726
|
className
|
|
35710
35727
|
}) {
|
|
35711
35728
|
const currentIdx = trait.states.indexOf(trait.currentState);
|
|
35712
|
-
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-
|
|
35729
|
+
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
35713
35730
|
trait.description && /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: trait.description }),
|
|
35714
35731
|
/* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
|
|
35715
35732
|
const isDone = i < currentIdx;
|
|
@@ -35731,10 +35748,10 @@ function LinearView({
|
|
|
35731
35748
|
{
|
|
35732
35749
|
display: "inline-flex",
|
|
35733
35750
|
className: cn(
|
|
35734
|
-
"items-center justify-center rounded-
|
|
35751
|
+
"items-center justify-center rounded-pill px-3 py-1 border-2 transition-all",
|
|
35735
35752
|
SIZE_CONFIG2[size || "md"].fontSize,
|
|
35736
35753
|
isDone && "bg-success/20 border-success text-success",
|
|
35737
|
-
isCurrent && "bg-primary/20 border-primary text-primary font-bold shadow-
|
|
35754
|
+
isCurrent && "bg-primary/20 border-primary text-primary font-bold shadow-elevation-card shadow-primary/20",
|
|
35738
35755
|
!isDone && !isCurrent && "bg-muted border-border text-muted-foreground"
|
|
35739
35756
|
),
|
|
35740
35757
|
children: [
|
|
@@ -35756,7 +35773,7 @@ function CompactView({
|
|
|
35756
35773
|
const { t } = useTranslate();
|
|
35757
35774
|
const config = SIZE_CONFIG2[size || "md"];
|
|
35758
35775
|
const currentTransitions = trait.transitions.filter((t2) => t2.from === trait.currentState);
|
|
35759
|
-
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-
|
|
35776
|
+
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
35760
35777
|
/* @__PURE__ */ jsxs(HStack, { className: "items-center justify-between", children: [
|
|
35761
35778
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground font-bold", children: trait.name }),
|
|
35762
35779
|
/* @__PURE__ */ jsx(StateIndicator, { state: trait.currentState, size: "sm", stateStyles })
|
|
@@ -35792,7 +35809,7 @@ function FullView({
|
|
|
35792
35809
|
const { t } = useTranslate();
|
|
35793
35810
|
const config = SIZE_CONFIG2[size || "md"];
|
|
35794
35811
|
const currentTransitions = trait.transitions.filter((t2) => t2.from === trait.currentState);
|
|
35795
|
-
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-
|
|
35812
|
+
return /* @__PURE__ */ jsxs(VStack, { className: cn("p-3 rounded-container bg-card border border-border", className), gap: "sm", children: [
|
|
35796
35813
|
/* @__PURE__ */ jsxs(HStack, { className: "items-center justify-between", children: [
|
|
35797
35814
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground font-bold", children: trait.name }),
|
|
35798
35815
|
/* @__PURE__ */ jsx(StateIndicator, { state: trait.currentState, size: "sm", stateStyles })
|
|
@@ -35806,9 +35823,9 @@ function FullView({
|
|
|
35806
35823
|
{
|
|
35807
35824
|
display: "flex",
|
|
35808
35825
|
className: cn(
|
|
35809
|
-
"items-center justify-center rounded-
|
|
35826
|
+
"items-center justify-center rounded-container border-2 transition-all px-2",
|
|
35810
35827
|
config.nodeSize,
|
|
35811
|
-
isCurrent && "bg-primary/20 border-primary shadow-
|
|
35828
|
+
isCurrent && "bg-primary/20 border-primary shadow-elevation-card shadow-primary/20",
|
|
35812
35829
|
!isCurrent && hasOutgoing && "bg-muted border-border hover:border-muted-foreground",
|
|
35813
35830
|
!isCurrent && !hasOutgoing && "bg-background border-border opacity-60",
|
|
35814
35831
|
onStateClick && "cursor-pointer"
|
|
@@ -36238,7 +36255,7 @@ function EventHandlerBoard({
|
|
|
36238
36255
|
backgroundPosition: "center"
|
|
36239
36256
|
},
|
|
36240
36257
|
children: [
|
|
36241
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
36258
|
+
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,
|
|
36242
36259
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
|
|
36243
36260
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-foreground", children: entity.title }),
|
|
36244
36261
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-muted-foreground", children: entity.description }),
|
|
@@ -36253,7 +36270,7 @@ function EventHandlerBoard({
|
|
|
36253
36270
|
Box,
|
|
36254
36271
|
{
|
|
36255
36272
|
className: cn(
|
|
36256
|
-
"p-3 rounded-
|
|
36273
|
+
"p-3 rounded-container border-2 cursor-pointer transition-all hover:scale-105",
|
|
36257
36274
|
selectedObjectId === obj.id ? "border-primary bg-primary/10" : "border-border bg-card hover:border-muted-foreground"
|
|
36258
36275
|
),
|
|
36259
36276
|
onClick: () => setSelectedObjectId(obj.id),
|
|
@@ -36275,10 +36292,10 @@ function EventHandlerBoard({
|
|
|
36275
36292
|
}
|
|
36276
36293
|
),
|
|
36277
36294
|
eventLog.length > 0 && /* @__PURE__ */ jsx(EventLog, { entries: eventLog }),
|
|
36278
|
-
playState === "success" && /* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
36295
|
+
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") }) }),
|
|
36279
36296
|
playState === "fail" && /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
36280
|
-
/* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
36281
|
-
showHint && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-
|
|
36297
|
+
/* @__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) }) }),
|
|
36298
|
+
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: [
|
|
36282
36299
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-accent font-bold shrink-0", children: "\u{1F4A1} " + t("game.hint") + ":" }),
|
|
36283
36300
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground", children: entity.hint })
|
|
36284
36301
|
] }) })
|
|
@@ -39324,7 +39341,7 @@ function MiniMap({
|
|
|
39324
39341
|
"div",
|
|
39325
39342
|
{
|
|
39326
39343
|
className: cn(
|
|
39327
|
-
"relative inline-block border border-
|
|
39344
|
+
"relative inline-block border border-border/20 rounded-container",
|
|
39328
39345
|
className
|
|
39329
39346
|
),
|
|
39330
39347
|
children: /* @__PURE__ */ jsx(
|
|
@@ -39544,7 +39561,7 @@ function NegotiatorBoard({
|
|
|
39544
39561
|
backgroundPosition: "center"
|
|
39545
39562
|
},
|
|
39546
39563
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
39547
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
39564
|
+
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,
|
|
39548
39565
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
39549
39566
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", weight: "bold", children: entity.title }),
|
|
39550
39567
|
/* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.description }),
|
|
@@ -39590,7 +39607,7 @@ function NegotiatorBoard({
|
|
|
39590
39607
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground", children: "vs" }),
|
|
39591
39608
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", children: getActionLabel(round.opponentAction) }),
|
|
39592
39609
|
/* @__PURE__ */ jsx(Icon, { icon: ArrowRight, size: "xs" }),
|
|
39593
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "caption", weight: "bold", className: "text-
|
|
39610
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", weight: "bold", className: "text-success", children: [
|
|
39594
39611
|
"+",
|
|
39595
39612
|
round.playerPayoff
|
|
39596
39613
|
] }),
|
|
@@ -39601,7 +39618,7 @@ function NegotiatorBoard({
|
|
|
39601
39618
|
] }, round.round))
|
|
39602
39619
|
] }) }),
|
|
39603
39620
|
isComplete && /* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", children: [
|
|
39604
|
-
/* @__PURE__ */ jsx(Icon, { icon: CheckCircle, size: "lg", className: won ? "text-
|
|
39621
|
+
/* @__PURE__ */ jsx(Icon, { icon: CheckCircle, size: "lg", className: won ? "text-success" : "text-error" }),
|
|
39605
39622
|
/* @__PURE__ */ jsx(Typography, { variant: "body", weight: "bold", children: won ? entity.successMessage ?? t("negotiator.success") : entity.failMessage ?? t("negotiator.failed") }),
|
|
39606
39623
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-muted-foreground", children: [
|
|
39607
39624
|
t("negotiator.finalScore"),
|
|
@@ -39611,7 +39628,7 @@ function NegotiatorBoard({
|
|
|
39611
39628
|
entity.targetScore
|
|
39612
39629
|
] })
|
|
39613
39630
|
] }) }),
|
|
39614
|
-
showHint && entity.hint && !won && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
39631
|
+
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 }) }),
|
|
39615
39632
|
isComplete && !won && /* @__PURE__ */ jsx(HStack, { justify: "center", children: /* @__PURE__ */ jsx(Button, { variant: "primary", onClick: handleReset, children: t("negotiator.playAgain") }) })
|
|
39616
39633
|
] })
|
|
39617
39634
|
}
|
|
@@ -40284,17 +40301,17 @@ function ResourceCounter({
|
|
|
40284
40301
|
"div",
|
|
40285
40302
|
{
|
|
40286
40303
|
className: cn(
|
|
40287
|
-
"inline-flex items-center rounded-
|
|
40288
|
-
"bg-
|
|
40304
|
+
"inline-flex items-center rounded-container",
|
|
40305
|
+
"bg-card/80 border border-muted font-medium text-foreground",
|
|
40289
40306
|
sizes.wrapper,
|
|
40290
40307
|
className
|
|
40291
40308
|
),
|
|
40292
40309
|
children: [
|
|
40293
40310
|
icon && /* @__PURE__ */ jsx("span", { className: cn("flex-shrink-0", sizes.icon), children: icon }),
|
|
40294
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
40311
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: label }),
|
|
40295
40312
|
/* @__PURE__ */ jsxs("span", { className: cn("font-bold tabular-nums", color), children: [
|
|
40296
40313
|
value,
|
|
40297
|
-
max != null && /* @__PURE__ */ jsxs("span", { className: "text-
|
|
40314
|
+
max != null && /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
|
|
40298
40315
|
"/",
|
|
40299
40316
|
max
|
|
40300
40317
|
] })
|
|
@@ -42241,7 +42258,7 @@ function TraitSlot({
|
|
|
42241
42258
|
display: "flex",
|
|
42242
42259
|
position: "relative",
|
|
42243
42260
|
className: cn(
|
|
42244
|
-
"items-center justify-center rounded-
|
|
42261
|
+
"items-center justify-center rounded-container transition-all duration-200 bg-card/50",
|
|
42245
42262
|
!locked && "cursor-pointer",
|
|
42246
42263
|
locked && "cursor-not-allowed opacity-50",
|
|
42247
42264
|
isEmpty && !locked && "border-2 border-dashed border-border hover:border-muted-foreground",
|
|
@@ -42257,7 +42274,7 @@ function TraitSlot({
|
|
|
42257
42274
|
style: {
|
|
42258
42275
|
width: config.box,
|
|
42259
42276
|
height: config.box,
|
|
42260
|
-
backgroundColor: catColor?.bg ||
|
|
42277
|
+
backgroundColor: catColor?.bg || void 0,
|
|
42261
42278
|
borderColor: isDragOver ? void 0 : feedback === "correct" ? "var(--color-success)" : feedback === "wrong" ? "var(--color-error)" : catColor?.border || void 0
|
|
42262
42279
|
},
|
|
42263
42280
|
onClick: handleClick,
|
|
@@ -42286,7 +42303,7 @@ function TraitSlot({
|
|
|
42286
42303
|
Box,
|
|
42287
42304
|
{
|
|
42288
42305
|
position: "absolute",
|
|
42289
|
-
className: "-top-1.5 -right-1.5 w-4 h-4 bg-error rounded-
|
|
42306
|
+
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",
|
|
42290
42307
|
onClick: handleRemove,
|
|
42291
42308
|
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-foreground text-xs leading-none", children: "\xD7" })
|
|
42292
42309
|
}
|
|
@@ -42296,14 +42313,14 @@ function TraitSlot({
|
|
|
42296
42313
|
Box,
|
|
42297
42314
|
{
|
|
42298
42315
|
position: "absolute",
|
|
42299
|
-
className: "-bottom-1 -left-1 w-4 h-4 bg-card rounded-
|
|
42316
|
+
className: "-bottom-1 -left-1 w-4 h-4 bg-card rounded-pill flex items-center justify-center border border-border",
|
|
42300
42317
|
children: /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground text-xs", children: slotNumber })
|
|
42301
42318
|
}
|
|
42302
42319
|
),
|
|
42303
42320
|
showTooltip && isHovered && itemMachine && !isEmpty && equippedItem && /* @__PURE__ */ jsxs(
|
|
42304
42321
|
Box,
|
|
42305
42322
|
{
|
|
42306
|
-
className: "p-3 bg-background border border-border rounded-
|
|
42323
|
+
className: "p-3 bg-background border border-border rounded-container shadow-xl",
|
|
42307
42324
|
style: {
|
|
42308
42325
|
...getTooltipStyle(),
|
|
42309
42326
|
minWidth: 200,
|
|
@@ -42553,12 +42570,12 @@ function SequencerBoard({
|
|
|
42553
42570
|
backgroundPosition: "center"
|
|
42554
42571
|
},
|
|
42555
42572
|
children: [
|
|
42556
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
42573
|
+
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,
|
|
42557
42574
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
|
|
42558
42575
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-foreground", children: entity.title }),
|
|
42559
42576
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-muted-foreground", children: entity.description })
|
|
42560
42577
|
] }),
|
|
42561
|
-
showHint && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-
|
|
42578
|
+
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: [
|
|
42562
42579
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-accent font-bold shrink-0", children: "\u{1F4A1} " + t("game.hint") + ":" }),
|
|
42563
42580
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground", children: entity.hint })
|
|
42564
42581
|
] }) }),
|
|
@@ -42596,8 +42613,8 @@ function SequencerBoard({
|
|
|
42596
42613
|
label: t("sequencer.dragActions")
|
|
42597
42614
|
}
|
|
42598
42615
|
),
|
|
42599
|
-
hasFeedback && playState === "idle" && attempts > 0 && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-
|
|
42600
|
-
playState === "success" && /* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
42616
|
+
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) }) }),
|
|
42617
|
+
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") }) }),
|
|
42601
42618
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", children: [
|
|
42602
42619
|
/* @__PURE__ */ jsx(
|
|
42603
42620
|
Button,
|
|
@@ -43273,7 +43290,7 @@ function SimulationCanvas({
|
|
|
43273
43290
|
ref: canvasRef,
|
|
43274
43291
|
width,
|
|
43275
43292
|
height,
|
|
43276
|
-
className: "rounded-
|
|
43293
|
+
className: "rounded-container block max-w-full h-auto"
|
|
43277
43294
|
}
|
|
43278
43295
|
) });
|
|
43279
43296
|
}
|
|
@@ -43481,7 +43498,7 @@ function SimulatorBoard({
|
|
|
43481
43498
|
backgroundPosition: "center"
|
|
43482
43499
|
},
|
|
43483
43500
|
children: /* @__PURE__ */ jsxs(VStack, { gap: "lg", className: "p-4", children: [
|
|
43484
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
43501
|
+
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,
|
|
43485
43502
|
/* @__PURE__ */ jsx(Card, { className: "p-4", children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
43486
43503
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", weight: "bold", children: entity.title }),
|
|
43487
43504
|
/* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.description })
|
|
@@ -43532,8 +43549,8 @@ function SimulatorBoard({
|
|
|
43532
43549
|
entity.outputUnit
|
|
43533
43550
|
] }),
|
|
43534
43551
|
submitted && /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", children: [
|
|
43535
|
-
/* @__PURE__ */ jsx(Icon, { icon: isCorrect ? CheckCircle : XCircle, size: "sm", className: isCorrect ? "text-
|
|
43536
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body", className: isCorrect ? "text-
|
|
43552
|
+
/* @__PURE__ */ jsx(Icon, { icon: isCorrect ? CheckCircle : XCircle, size: "sm", className: isCorrect ? "text-success" : "text-error" }),
|
|
43553
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body", className: isCorrect ? "text-success" : "text-error", children: isCorrect ? entity.successMessage ?? t("simulator.correct") : entity.failMessage ?? t("simulator.incorrect") })
|
|
43537
43554
|
] }),
|
|
43538
43555
|
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-muted-foreground", children: [
|
|
43539
43556
|
t("simulator.target"),
|
|
@@ -43546,7 +43563,7 @@ function SimulatorBoard({
|
|
|
43546
43563
|
")"
|
|
43547
43564
|
] })
|
|
43548
43565
|
] }) }),
|
|
43549
|
-
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-
|
|
43566
|
+
showHint && entity.hint && /* @__PURE__ */ jsx(Card, { className: "p-4 border-l-4 border-l-warning", children: /* @__PURE__ */ jsx(Typography, { variant: "body", children: entity.hint }) }),
|
|
43550
43567
|
/* @__PURE__ */ jsxs(HStack, { gap: "sm", justify: "center", children: [
|
|
43551
43568
|
!submitted ? /* @__PURE__ */ jsxs(Button, { variant: "primary", onClick: handleSubmit, children: [
|
|
43552
43569
|
/* @__PURE__ */ jsx(Icon, { icon: Play, size: "sm" }),
|
|
@@ -44058,7 +44075,7 @@ function StateNode2({
|
|
|
44058
44075
|
position: "absolute",
|
|
44059
44076
|
display: "flex",
|
|
44060
44077
|
className: cn(
|
|
44061
|
-
"items-center justify-center rounded-
|
|
44078
|
+
"items-center justify-center rounded-pill border-3 transition-all cursor-pointer select-none",
|
|
44062
44079
|
"min-w-[80px] h-[80px] px-3",
|
|
44063
44080
|
isCurrent && "bg-primary/20 border-primary shadow-lg shadow-primary/30 scale-110",
|
|
44064
44081
|
isSelected && !isCurrent && "bg-accent/20 border-accent ring-2 ring-accent/50",
|
|
@@ -44371,7 +44388,7 @@ function StateArchitectBoard({
|
|
|
44371
44388
|
backgroundPosition: "center"
|
|
44372
44389
|
},
|
|
44373
44390
|
children: [
|
|
44374
|
-
entity.headerImage && !headerError ? /* @__PURE__ */ jsx(Box, { className: "w-full h-32 overflow-hidden rounded-
|
|
44391
|
+
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,
|
|
44375
44392
|
/* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
|
|
44376
44393
|
/* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-foreground", children: entity.title }),
|
|
44377
44394
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-muted-foreground", children: entity.description }),
|
|
@@ -44390,7 +44407,7 @@ function StateArchitectBoard({
|
|
|
44390
44407
|
Box,
|
|
44391
44408
|
{
|
|
44392
44409
|
position: "relative",
|
|
44393
|
-
className: "rounded-
|
|
44410
|
+
className: "rounded-container border border-border bg-background overflow-hidden",
|
|
44394
44411
|
style: { width: GRAPH_W, height: GRAPH_H },
|
|
44395
44412
|
children: [
|
|
44396
44413
|
/* @__PURE__ */ jsxs(
|
|
@@ -44449,7 +44466,7 @@ function StateArchitectBoard({
|
|
|
44449
44466
|
children: selectedState ? t("stateArchitect.addTransition", { state: selectedState }) : t("stateArchitect.addTransitionPrompt")
|
|
44450
44467
|
}
|
|
44451
44468
|
) }),
|
|
44452
|
-
transitions.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "p-3 rounded-
|
|
44469
|
+
transitions.length > 0 && /* @__PURE__ */ jsxs(VStack, { gap: "xs", className: "p-3 rounded-container bg-muted/50 border border-border", children: [
|
|
44453
44470
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground font-medium", children: t("stateArchitect.transitions", { count: transitions.length }) + ":" }),
|
|
44454
44471
|
transitions.map((t2) => /* @__PURE__ */ jsxs(HStack, { className: "items-center text-xs", gap: "xs", children: [
|
|
44455
44472
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-foreground", children: t2.from }),
|
|
@@ -44483,7 +44500,7 @@ function StateArchitectBoard({
|
|
|
44483
44500
|
variables
|
|
44484
44501
|
}
|
|
44485
44502
|
),
|
|
44486
|
-
testResults.length > 0 && /* @__PURE__ */ jsxs(VStack, { className: "p-3 rounded-
|
|
44503
|
+
testResults.length > 0 && /* @__PURE__ */ jsxs(VStack, { className: "p-3 rounded-container bg-card border border-border", gap: "xs", children: [
|
|
44487
44504
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-muted-foreground font-medium", children: t("stateArchitect.testResults") + ":" }),
|
|
44488
44505
|
testResults.map((r, i) => /* @__PURE__ */ jsxs(HStack, { className: "items-center text-xs", gap: "xs", children: [
|
|
44489
44506
|
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: r.passed ? "text-success" : "text-error", children: r.passed ? "\u2714" : "\u2717" }),
|
|
@@ -44494,10 +44511,10 @@ function StateArchitectBoard({
|
|
|
44494
44511
|
entity.showCodeView !== false && /* @__PURE__ */ jsx(CodeView, { data: codeData, label: "View Code" })
|
|
44495
44512
|
] })
|
|
44496
44513
|
] }),
|
|
44497
|
-
playState === "success" && /* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
44514
|
+
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") }) }),
|
|
44498
44515
|
playState === "fail" && /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
44499
|
-
/* @__PURE__ */ jsx(Box, { className: "p-4 rounded-
|
|
44500
|
-
attempts >= 3 && entity.hint && /* @__PURE__ */ jsx(Box, { className: "p-3 rounded-
|
|
44516
|
+
/* @__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]) }) }),
|
|
44517
|
+
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: [
|
|
44501
44518
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-accent font-bold shrink-0", children: "\u{1F4A1} " + t("game.hint") + ":" }),
|
|
44502
44519
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", className: "text-foreground", children: entity.hint })
|
|
44503
44520
|
] }) })
|
|
@@ -44603,7 +44620,7 @@ function StatusEffect({
|
|
|
44603
44620
|
"div",
|
|
44604
44621
|
{
|
|
44605
44622
|
className: cn(
|
|
44606
|
-
"relative flex items-center justify-center rounded border-2",
|
|
44623
|
+
"relative flex items-center justify-center rounded-interactive border-2",
|
|
44607
44624
|
sizes.container,
|
|
44608
44625
|
variantStyles9[variant]
|
|
44609
44626
|
),
|
|
@@ -44614,7 +44631,7 @@ function StatusEffect({
|
|
|
44614
44631
|
"span",
|
|
44615
44632
|
{
|
|
44616
44633
|
className: cn(
|
|
44617
|
-
"absolute bottom-0 left-0 right-0 text-center font-mono font-bold text-
|
|
44634
|
+
"absolute bottom-0 left-0 right-0 text-center font-mono font-bold text-foreground bg-background/60 leading-tight",
|
|
44618
44635
|
sizes.timer
|
|
44619
44636
|
),
|
|
44620
44637
|
children: formatDuration(duration)
|
|
@@ -44627,7 +44644,7 @@ function StatusEffect({
|
|
|
44627
44644
|
"span",
|
|
44628
44645
|
{
|
|
44629
44646
|
className: cn(
|
|
44630
|
-
"absolute flex items-center justify-center rounded-full bg-
|
|
44647
|
+
"absolute flex items-center justify-center rounded-full bg-card text-foreground font-bold leading-none",
|
|
44631
44648
|
sizes.badge
|
|
44632
44649
|
),
|
|
44633
44650
|
children: stacks
|
|
@@ -44646,9 +44663,9 @@ var init_StatusEffect = __esm({
|
|
|
44646
44663
|
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" }
|
|
44647
44664
|
};
|
|
44648
44665
|
variantStyles9 = {
|
|
44649
|
-
buff: "border-
|
|
44650
|
-
debuff: "border-
|
|
44651
|
-
neutral: "border-
|
|
44666
|
+
buff: "border-success bg-success/20",
|
|
44667
|
+
debuff: "border-error bg-error/20",
|
|
44668
|
+
neutral: "border-muted bg-muted/20"
|
|
44652
44669
|
};
|
|
44653
44670
|
StatusEffect.displayName = "StatusEffect";
|
|
44654
44671
|
}
|
|
@@ -45261,12 +45278,12 @@ function TimerDisplay({
|
|
|
45261
45278
|
"div",
|
|
45262
45279
|
{
|
|
45263
45280
|
className: cn(
|
|
45264
|
-
"inline-flex items-center justify-center rounded-
|
|
45265
|
-
"bg-
|
|
45281
|
+
"inline-flex items-center justify-center rounded-container",
|
|
45282
|
+
"bg-card/80 border border-muted font-mono font-bold tabular-nums",
|
|
45266
45283
|
sizeMap17[size],
|
|
45267
|
-
running && "border-
|
|
45268
|
-
isLow && "text-
|
|
45269
|
-
!isLow && "text-
|
|
45284
|
+
running && "border-success/50",
|
|
45285
|
+
isLow && "text-error border-error/50 animate-pulse",
|
|
45286
|
+
!isLow && "text-foreground",
|
|
45270
45287
|
className
|
|
45271
45288
|
),
|
|
45272
45289
|
children: formatTime3(seconds, format)
|
|
@@ -45990,8 +46007,8 @@ function XPBar({
|
|
|
45990
46007
|
"span",
|
|
45991
46008
|
{
|
|
45992
46009
|
className: cn(
|
|
45993
|
-
"flex-shrink-0 rounded-
|
|
45994
|
-
"bg-
|
|
46010
|
+
"flex-shrink-0 rounded-interactive font-bold",
|
|
46011
|
+
"bg-accent text-foreground border border-accent",
|
|
45995
46012
|
sizes.badge
|
|
45996
46013
|
),
|
|
45997
46014
|
children: [
|
|
@@ -46005,7 +46022,7 @@ function XPBar({
|
|
|
46005
46022
|
"div",
|
|
46006
46023
|
{
|
|
46007
46024
|
className: cn(
|
|
46008
|
-
"relative w-full overflow-hidden rounded-full bg-
|
|
46025
|
+
"relative w-full overflow-hidden rounded-full bg-muted border border-muted",
|
|
46009
46026
|
sizes.bar
|
|
46010
46027
|
),
|
|
46011
46028
|
children: /* @__PURE__ */ jsx(
|
|
@@ -46013,7 +46030,7 @@ function XPBar({
|
|
|
46013
46030
|
{
|
|
46014
46031
|
className: cn(
|
|
46015
46032
|
"absolute inset-y-0 left-0 rounded-full",
|
|
46016
|
-
"bg-gradient-to-r from-
|
|
46033
|
+
"bg-gradient-to-r from-accent to-info",
|
|
46017
46034
|
animated && "transition-all duration-500 ease-out"
|
|
46018
46035
|
),
|
|
46019
46036
|
style: { width: `${percentage}%` }
|
|
@@ -46021,7 +46038,7 @@ function XPBar({
|
|
|
46021
46038
|
)
|
|
46022
46039
|
}
|
|
46023
46040
|
),
|
|
46024
|
-
showLabel && /* @__PURE__ */ jsxs("span", { className: cn("text-
|
|
46041
|
+
showLabel && /* @__PURE__ */ jsxs("span", { className: cn("text-muted-foreground tabular-nums", sizes.text), children: [
|
|
46025
46042
|
current,
|
|
46026
46043
|
" / ",
|
|
46027
46044
|
max,
|
|
@@ -48318,7 +48335,7 @@ function CollapsibleSection({ title, expanded, onToggle, children, className })
|
|
|
48318
48335
|
CollapsibleSection.displayName = "CollapsibleSection";
|
|
48319
48336
|
function EditorSlider({ label, value, min, max, step = 0.1, onChange, className }) {
|
|
48320
48337
|
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className, children: [
|
|
48321
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "min-w-[80px] text-
|
|
48338
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "min-w-[80px] text-muted-foreground", children: label }),
|
|
48322
48339
|
/* @__PURE__ */ jsx(Box, { className: "flex-1", children: /* @__PURE__ */ jsx(
|
|
48323
48340
|
"input",
|
|
48324
48341
|
{
|
|
@@ -48328,22 +48345,22 @@ function EditorSlider({ label, value, min, max, step = 0.1, onChange, className
|
|
|
48328
48345
|
step,
|
|
48329
48346
|
value,
|
|
48330
48347
|
onChange: (e) => onChange(parseFloat(e.target.value)),
|
|
48331
|
-
className: "w-full h-1.5 bg-
|
|
48348
|
+
className: "w-full h-1.5 bg-muted rounded-interactive appearance-none cursor-pointer accent-primary"
|
|
48332
48349
|
}
|
|
48333
48350
|
) }),
|
|
48334
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "min-w-[40px] text-right text-
|
|
48351
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "min-w-[40px] text-right text-muted-foreground", children: typeof step === "number" && step < 1 ? value.toFixed(1) : value })
|
|
48335
48352
|
] });
|
|
48336
48353
|
}
|
|
48337
48354
|
EditorSlider.displayName = "EditorSlider";
|
|
48338
48355
|
function EditorSelect({ label, value, options, onChange, className }) {
|
|
48339
48356
|
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className, children: [
|
|
48340
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "min-w-[80px] text-
|
|
48357
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "min-w-[80px] text-muted-foreground", children: label }),
|
|
48341
48358
|
/* @__PURE__ */ jsx(Box, { className: "flex-1", children: /* @__PURE__ */ jsx(
|
|
48342
48359
|
"select",
|
|
48343
48360
|
{
|
|
48344
48361
|
value,
|
|
48345
48362
|
onChange: (e) => onChange(e.target.value),
|
|
48346
|
-
className: "w-full px-2 py-1 text-xs bg-
|
|
48363
|
+
className: "w-full px-2 py-1 text-xs bg-muted text-foreground border border-muted rounded cursor-pointer",
|
|
48347
48364
|
children: options.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, children: opt.label }, opt.value))
|
|
48348
48365
|
}
|
|
48349
48366
|
) })
|
|
@@ -48352,14 +48369,14 @@ function EditorSelect({ label, value, options, onChange, className }) {
|
|
|
48352
48369
|
EditorSelect.displayName = "EditorSelect";
|
|
48353
48370
|
function EditorCheckbox({ label, checked, onChange, className }) {
|
|
48354
48371
|
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className, children: [
|
|
48355
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "min-w-[80px] text-
|
|
48372
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "min-w-[80px] text-muted-foreground", children: label }),
|
|
48356
48373
|
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
|
|
48357
48374
|
"input",
|
|
48358
48375
|
{
|
|
48359
48376
|
type: "checkbox",
|
|
48360
48377
|
checked,
|
|
48361
48378
|
onChange: (e) => onChange(e.target.checked),
|
|
48362
|
-
className: "w-4 h-4 accent-
|
|
48379
|
+
className: "w-4 h-4 accent-primary cursor-pointer"
|
|
48363
48380
|
}
|
|
48364
48381
|
) })
|
|
48365
48382
|
] });
|
|
@@ -48367,7 +48384,7 @@ function EditorCheckbox({ label, checked, onChange, className }) {
|
|
|
48367
48384
|
EditorCheckbox.displayName = "EditorCheckbox";
|
|
48368
48385
|
function EditorTextInput({ label, value, onChange, placeholder, className }) {
|
|
48369
48386
|
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className, children: [
|
|
48370
|
-
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "min-w-[80px] text-
|
|
48387
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", className: "min-w-[80px] text-muted-foreground", children: label }),
|
|
48371
48388
|
/* @__PURE__ */ jsx(Box, { className: "flex-1", children: /* @__PURE__ */ jsx(
|
|
48372
48389
|
"input",
|
|
48373
48390
|
{
|
|
@@ -48375,30 +48392,30 @@ function EditorTextInput({ label, value, onChange, placeholder, className }) {
|
|
|
48375
48392
|
value,
|
|
48376
48393
|
onChange: (e) => onChange(e.target.value),
|
|
48377
48394
|
placeholder,
|
|
48378
|
-
className: "w-full px-2 py-1 text-xs bg-
|
|
48395
|
+
className: "w-full px-2 py-1 text-xs bg-muted text-foreground border border-muted rounded"
|
|
48379
48396
|
}
|
|
48380
48397
|
) })
|
|
48381
48398
|
] });
|
|
48382
48399
|
}
|
|
48383
48400
|
EditorTextInput.displayName = "EditorTextInput";
|
|
48384
48401
|
function StatusBar({ hoveredTile, mode, gridSize, unitCount, featureCount, className }) {
|
|
48385
|
-
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: `px-3 py-1.5 bg-
|
|
48402
|
+
return /* @__PURE__ */ jsxs(HStack, { gap: "sm", align: "center", className: `px-3 py-1.5 bg-background border-t border-border ${className ?? ""}`, children: [
|
|
48386
48403
|
/* @__PURE__ */ jsx(Badge, { variant: "info", size: "sm", children: mode }),
|
|
48387
|
-
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-
|
|
48404
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-muted-foreground", children: [
|
|
48388
48405
|
"Tile: ",
|
|
48389
48406
|
hoveredTile ? `(${hoveredTile.x}, ${hoveredTile.y})` : "\u2014"
|
|
48390
48407
|
] }),
|
|
48391
|
-
gridSize && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-
|
|
48408
|
+
gridSize && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-muted-foreground", children: [
|
|
48392
48409
|
"Grid: ",
|
|
48393
48410
|
gridSize.width,
|
|
48394
48411
|
"x",
|
|
48395
48412
|
gridSize.height
|
|
48396
48413
|
] }),
|
|
48397
|
-
unitCount !== void 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-
|
|
48414
|
+
unitCount !== void 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-muted-foreground", children: [
|
|
48398
48415
|
"Units: ",
|
|
48399
48416
|
unitCount
|
|
48400
48417
|
] }),
|
|
48401
|
-
featureCount !== void 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-
|
|
48418
|
+
featureCount !== void 0 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", className: "text-muted-foreground", children: [
|
|
48402
48419
|
"Features: ",
|
|
48403
48420
|
featureCount
|
|
48404
48421
|
] })
|
|
@@ -48410,8 +48427,8 @@ function TerrainPalette({ terrains, selectedTerrain, onSelect, className }) {
|
|
|
48410
48427
|
Box,
|
|
48411
48428
|
{
|
|
48412
48429
|
onClick: () => onSelect(terrain),
|
|
48413
|
-
className: `w-8 h-8 rounded cursor-pointer border-2 transition-all ${selectedTerrain === terrain ? "border-
|
|
48414
|
-
style: { backgroundColor: TERRAIN_COLORS[terrain] || "
|
|
48430
|
+
className: `w-8 h-8 rounded cursor-pointer border-2 transition-all ${selectedTerrain === terrain ? "border-foreground scale-110 shadow-lg" : "border-muted hover:border-muted-foreground"}`,
|
|
48431
|
+
style: { backgroundColor: TERRAIN_COLORS[terrain] || "var(--color-muted)" },
|
|
48415
48432
|
title: terrain
|
|
48416
48433
|
},
|
|
48417
48434
|
terrain
|