@almadar/ui 5.38.0 → 5.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +385 -111
- package/dist/avl/index.js +385 -111
- package/dist/components/game/molecules/DialogueBox.d.ts +0 -21
- package/dist/components/game/molecules/InventoryPanel.d.ts +0 -16
- package/dist/components/index.cjs +385 -111
- package/dist/components/index.js +385 -111
- package/dist/providers/index.cjs +385 -111
- package/dist/providers/index.js +385 -111
- package/dist/runtime/index.cjs +385 -111
- package/dist/runtime/index.js +385 -111
- package/package.json +1 -1
|
@@ -8224,7 +8224,7 @@ var init_Accordion = __esm({
|
|
|
8224
8224
|
}
|
|
8225
8225
|
});
|
|
8226
8226
|
function ActionButton({
|
|
8227
|
-
label,
|
|
8227
|
+
label = "Attack",
|
|
8228
8228
|
icon,
|
|
8229
8229
|
cooldown = 0,
|
|
8230
8230
|
disabled = false,
|
|
@@ -8411,7 +8411,7 @@ var init_ControlButton = __esm({
|
|
|
8411
8411
|
}
|
|
8412
8412
|
});
|
|
8413
8413
|
function ActionButtons({
|
|
8414
|
-
buttons,
|
|
8414
|
+
buttons = DEFAULT_BUTTONS,
|
|
8415
8415
|
onAction,
|
|
8416
8416
|
actionEvent,
|
|
8417
8417
|
layout = "horizontal",
|
|
@@ -8518,7 +8518,7 @@ function ActionButtons({
|
|
|
8518
8518
|
button.id
|
|
8519
8519
|
)) });
|
|
8520
8520
|
}
|
|
8521
|
-
var sizeMap3, layoutMap;
|
|
8521
|
+
var sizeMap3, layoutMap, DEFAULT_BUTTONS;
|
|
8522
8522
|
var init_ActionButtons = __esm({
|
|
8523
8523
|
"components/game/molecules/ActionButtons.tsx"() {
|
|
8524
8524
|
"use client";
|
|
@@ -8535,6 +8535,11 @@ var init_ActionButtons = __esm({
|
|
|
8535
8535
|
vertical: "flex flex-col gap-2",
|
|
8536
8536
|
diamond: "grid grid-cols-3 gap-1"
|
|
8537
8537
|
};
|
|
8538
|
+
DEFAULT_BUTTONS = [
|
|
8539
|
+
{ id: "jump", label: "Jump", icon: "chevron-up", variant: "primary" },
|
|
8540
|
+
{ id: "attack", label: "Attack", icon: "sword", variant: "secondary" },
|
|
8541
|
+
{ id: "dodge", label: "Dodge", icon: "wind", variant: "ghost" }
|
|
8542
|
+
];
|
|
8538
8543
|
ActionButtons.displayName = "ActionButtons";
|
|
8539
8544
|
}
|
|
8540
8545
|
});
|
|
@@ -9625,7 +9630,7 @@ function IsometricCanvas({
|
|
|
9625
9630
|
// Rendering options
|
|
9626
9631
|
scale = 0.4,
|
|
9627
9632
|
debug: debug2 = false,
|
|
9628
|
-
backgroundImage = "
|
|
9633
|
+
backgroundImage = "",
|
|
9629
9634
|
showMinimap = true,
|
|
9630
9635
|
enableCamera = true,
|
|
9631
9636
|
unitScale = 1,
|
|
@@ -10764,10 +10769,10 @@ function BattleTemplate({
|
|
|
10764
10769
|
entity,
|
|
10765
10770
|
scale = 0.45,
|
|
10766
10771
|
unitScale = 1,
|
|
10767
|
-
tiles,
|
|
10768
|
-
units,
|
|
10769
|
-
features,
|
|
10770
|
-
assetManifest,
|
|
10772
|
+
tiles = DEFAULT_BATTLE_TILES,
|
|
10773
|
+
units = DEFAULT_BATTLE_UNITS,
|
|
10774
|
+
features = DEFAULT_BATTLE_FEATURES,
|
|
10775
|
+
assetManifest = DEFAULT_BATTLE_MANIFEST,
|
|
10771
10776
|
className
|
|
10772
10777
|
}) {
|
|
10773
10778
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
@@ -10793,9 +10798,62 @@ function BattleTemplate({
|
|
|
10793
10798
|
}
|
|
10794
10799
|
);
|
|
10795
10800
|
}
|
|
10801
|
+
var CDN, DEFAULT_BATTLE_TILES, DEFAULT_BATTLE_UNITS, DEFAULT_BATTLE_FEATURES, DEFAULT_BATTLE_MANIFEST;
|
|
10796
10802
|
var init_BattleTemplate = __esm({
|
|
10797
10803
|
"components/game/templates/BattleTemplate.tsx"() {
|
|
10798
10804
|
init_BattleBoard();
|
|
10805
|
+
CDN = "https://almadar-kflow-assets.web.app/shared";
|
|
10806
|
+
DEFAULT_BATTLE_TILES = [
|
|
10807
|
+
{ x: 0, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10808
|
+
{ x: 1, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10809
|
+
{ x: 2, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10810
|
+
{ x: 3, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10811
|
+
{ x: 4, y: 0, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10812
|
+
{ x: 0, y: 1, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10813
|
+
{ x: 1, y: 1, terrain: "dirt", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_01.png` },
|
|
10814
|
+
{ x: 2, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
10815
|
+
{ x: 3, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
10816
|
+
{ x: 4, y: 1, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10817
|
+
{ x: 0, y: 2, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10818
|
+
{ x: 1, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
10819
|
+
{ x: 2, y: 2, terrain: "dirt", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_01.png` },
|
|
10820
|
+
{ x: 3, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
10821
|
+
{ x: 4, y: 2, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10822
|
+
{ x: 0, y: 3, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10823
|
+
{ x: 1, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
10824
|
+
{ x: 2, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png` },
|
|
10825
|
+
{ x: 3, y: 3, terrain: "dirt", passable: true, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_01.png` },
|
|
10826
|
+
{ x: 4, y: 3, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10827
|
+
{ x: 0, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10828
|
+
{ x: 1, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10829
|
+
{ x: 2, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10830
|
+
{ x: 3, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` },
|
|
10831
|
+
{ x: 4, y: 4, terrain: "stone", passable: false, terrainSprite: `${CDN}/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png` }
|
|
10832
|
+
];
|
|
10833
|
+
DEFAULT_BATTLE_UNITS = [
|
|
10834
|
+
{ id: "u1", position: { x: 1, y: 1 }, unitType: "worker", name: "Worker", team: "player", health: 10, maxHealth: 10, sprite: `${CDN}/sprite-sheets/amir-sprite-sheet-se.png` },
|
|
10835
|
+
{ id: "u2", position: { x: 3, y: 3 }, unitType: "guardian", name: "Guardian", team: "enemy", health: 8, maxHealth: 10, sprite: `${CDN}/sprite-sheets/destroyer-sprite-sheet-sw.png` }
|
|
10836
|
+
];
|
|
10837
|
+
DEFAULT_BATTLE_FEATURES = [
|
|
10838
|
+
{ id: "f1", x: 2, y: 2, type: "gold_mine", sprite: `${CDN}/world-map/gold_mine.png` },
|
|
10839
|
+
{ id: "f2", x: 3, y: 1, type: "portal", sprite: `${CDN}/world-map/portal_open.png` }
|
|
10840
|
+
];
|
|
10841
|
+
DEFAULT_BATTLE_MANIFEST = {
|
|
10842
|
+
baseUrl: CDN,
|
|
10843
|
+
terrains: {
|
|
10844
|
+
stone: "/isometric-blocks/PNG/Abstract tiles/abstractTile_07.png",
|
|
10845
|
+
dirt: "/isometric-blocks/PNG/Abstract tiles/abstractTile_01.png",
|
|
10846
|
+
grass: "/isometric-blocks/PNG/Abstract tiles/abstractTile_13.png"
|
|
10847
|
+
},
|
|
10848
|
+
units: {
|
|
10849
|
+
worker: "/sprite-sheets/amir-sprite-sheet-se.png",
|
|
10850
|
+
guardian: "/sprite-sheets/destroyer-sprite-sheet-sw.png"
|
|
10851
|
+
},
|
|
10852
|
+
features: {
|
|
10853
|
+
gold_mine: "/world-map/gold_mine.png",
|
|
10854
|
+
portal: "/world-map/portal_open.png"
|
|
10855
|
+
}
|
|
10856
|
+
};
|
|
10799
10857
|
BattleTemplate.displayName = "BattleTemplate";
|
|
10800
10858
|
}
|
|
10801
10859
|
});
|
|
@@ -18795,10 +18853,10 @@ var init_CastleBoard = __esm({
|
|
|
18795
18853
|
function CastleTemplate({
|
|
18796
18854
|
entity,
|
|
18797
18855
|
scale = 0.45,
|
|
18798
|
-
tiles,
|
|
18799
|
-
units,
|
|
18800
|
-
features,
|
|
18801
|
-
assetManifest,
|
|
18856
|
+
tiles = DEFAULT_CASTLE_TILES,
|
|
18857
|
+
units = DEFAULT_CASTLE_UNITS,
|
|
18858
|
+
features = DEFAULT_CASTLE_FEATURES,
|
|
18859
|
+
assetManifest = DEFAULT_CASTLE_MANIFEST,
|
|
18802
18860
|
className
|
|
18803
18861
|
}) {
|
|
18804
18862
|
const resolved = entity && typeof entity === "object" && !Array.isArray(entity) ? entity : void 0;
|
|
@@ -18819,9 +18877,61 @@ function CastleTemplate({
|
|
|
18819
18877
|
}
|
|
18820
18878
|
);
|
|
18821
18879
|
}
|
|
18880
|
+
var CDN2, DEFAULT_CASTLE_TILES, DEFAULT_CASTLE_UNITS, DEFAULT_CASTLE_FEATURES, DEFAULT_CASTLE_MANIFEST;
|
|
18822
18881
|
var init_CastleTemplate = __esm({
|
|
18823
18882
|
"components/game/templates/CastleTemplate.tsx"() {
|
|
18824
18883
|
init_CastleBoard();
|
|
18884
|
+
CDN2 = "https://almadar-kflow-assets.web.app/shared";
|
|
18885
|
+
DEFAULT_CASTLE_TILES = [
|
|
18886
|
+
{ x: 0, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18887
|
+
{ x: 1, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18888
|
+
{ x: 2, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18889
|
+
{ x: 3, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18890
|
+
{ x: 4, y: 0, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18891
|
+
{ x: 0, y: 1, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18892
|
+
{ x: 1, y: 1, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
18893
|
+
{ x: 2, y: 1, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
18894
|
+
{ x: 3, y: 1, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
18895
|
+
{ x: 4, y: 1, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18896
|
+
{ x: 0, y: 2, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18897
|
+
{ x: 1, y: 2, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
18898
|
+
{ x: 2, y: 2, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_09.png` },
|
|
18899
|
+
{ x: 3, y: 2, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
18900
|
+
{ x: 4, y: 2, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18901
|
+
{ x: 0, y: 3, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18902
|
+
{ x: 1, y: 3, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
18903
|
+
{ x: 2, y: 3, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
18904
|
+
{ x: 3, y: 3, terrain: "floor", passable: true, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
18905
|
+
{ x: 4, y: 3, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18906
|
+
{ x: 0, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18907
|
+
{ x: 1, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18908
|
+
{ x: 2, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18909
|
+
{ x: 3, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` },
|
|
18910
|
+
{ x: 4, y: 4, terrain: "wall", passable: false, terrainSprite: `${CDN2}/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png` }
|
|
18911
|
+
];
|
|
18912
|
+
DEFAULT_CASTLE_UNITS = [
|
|
18913
|
+
{ id: "u1", position: { x: 1, y: 1 }, unitType: "worker", name: "Worker", team: "player", health: 10, maxHealth: 10, sprite: `${CDN2}/sprite-sheets/coordinator-sprite-sheet-se.png` },
|
|
18914
|
+
{ id: "u2", position: { x: 3, y: 3 }, unitType: "guardian", name: "Guardian", team: "player", health: 10, maxHealth: 10, sprite: `${CDN2}/sprite-sheets/forger-sprite-sheet-se.png` }
|
|
18915
|
+
];
|
|
18916
|
+
DEFAULT_CASTLE_FEATURES = [
|
|
18917
|
+
{ id: "f1", x: 2, y: 2, type: "chest", sprite: `${CDN2}/world-map/treasure_chest_closed.png` },
|
|
18918
|
+
{ id: "f2", x: 3, y: 1, type: "crystal", sprite: `${CDN2}/world-map/resonance_crystal.png` }
|
|
18919
|
+
];
|
|
18920
|
+
DEFAULT_CASTLE_MANIFEST = {
|
|
18921
|
+
baseUrl: CDN2,
|
|
18922
|
+
terrains: {
|
|
18923
|
+
wall: "/isometric-blocks/PNG/Platformer tiles/platformerTile_05.png",
|
|
18924
|
+
floor: "/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png"
|
|
18925
|
+
},
|
|
18926
|
+
units: {
|
|
18927
|
+
worker: "/sprite-sheets/coordinator-sprite-sheet-se.png",
|
|
18928
|
+
guardian: "/sprite-sheets/forger-sprite-sheet-se.png"
|
|
18929
|
+
},
|
|
18930
|
+
features: {
|
|
18931
|
+
chest: "/world-map/treasure_chest_closed.png",
|
|
18932
|
+
crystal: "/world-map/resonance_crystal.png"
|
|
18933
|
+
}
|
|
18934
|
+
};
|
|
18825
18935
|
CastleTemplate.displayName = "CastleTemplate";
|
|
18826
18936
|
}
|
|
18827
18937
|
});
|
|
@@ -19600,7 +19710,7 @@ var init_ChartLegend = __esm({
|
|
|
19600
19710
|
}
|
|
19601
19711
|
});
|
|
19602
19712
|
function ChoiceButton({
|
|
19603
|
-
text,
|
|
19713
|
+
text = "Charge forward into the fray",
|
|
19604
19714
|
index,
|
|
19605
19715
|
disabled = false,
|
|
19606
19716
|
selected = false,
|
|
@@ -19989,7 +20099,7 @@ var init_CodeRunnerPanel = __esm({
|
|
|
19989
20099
|
}
|
|
19990
20100
|
});
|
|
19991
20101
|
function CombatLog({
|
|
19992
|
-
events: events2,
|
|
20102
|
+
events: events2 = DEFAULT_COMBAT_EVENTS,
|
|
19993
20103
|
maxVisible = 50,
|
|
19994
20104
|
autoScroll = true,
|
|
19995
20105
|
showTimestamps = false,
|
|
@@ -20040,7 +20150,7 @@ function CombatLog({
|
|
|
20040
20150
|
}) }) })
|
|
20041
20151
|
] });
|
|
20042
20152
|
}
|
|
20043
|
-
var eventIcons, eventColors, eventBadgeVariants;
|
|
20153
|
+
var eventIcons, eventColors, eventBadgeVariants, DEFAULT_COMBAT_EVENTS;
|
|
20044
20154
|
var init_CombatLog = __esm({
|
|
20045
20155
|
"components/game/molecules/CombatLog.tsx"() {
|
|
20046
20156
|
init_atoms2();
|
|
@@ -20072,6 +20182,13 @@ var init_CombatLog = __esm({
|
|
|
20072
20182
|
death: "secondary",
|
|
20073
20183
|
spawn: "secondary"
|
|
20074
20184
|
};
|
|
20185
|
+
DEFAULT_COMBAT_EVENTS = [
|
|
20186
|
+
{ id: "e1", type: "spawn", message: "Shadow Guard entered the field.", timestamp: 0, turn: 1 },
|
|
20187
|
+
{ id: "e2", type: "move", message: "Hero moved to (3, 4).", timestamp: 1, actorName: "Hero", turn: 1 },
|
|
20188
|
+
{ id: "e3", type: "attack", message: "Hero attacked Shadow Guard.", timestamp: 2, actorName: "Hero", targetName: "Shadow Guard", value: 18, turn: 2 },
|
|
20189
|
+
{ id: "e4", type: "defend", message: "Shadow Guard blocked 5 damage.", timestamp: 3, actorName: "Shadow Guard", value: 5, turn: 2 },
|
|
20190
|
+
{ id: "e5", type: "heal", message: "Hero used Health Potion.", timestamp: 4, actorName: "Hero", value: 25, turn: 3 }
|
|
20191
|
+
];
|
|
20075
20192
|
CombatLog.displayName = "CombatLog";
|
|
20076
20193
|
}
|
|
20077
20194
|
});
|
|
@@ -20087,7 +20204,7 @@ function getComboScale(combo) {
|
|
|
20087
20204
|
return "";
|
|
20088
20205
|
}
|
|
20089
20206
|
function ComboCounter({
|
|
20090
|
-
combo,
|
|
20207
|
+
combo = 5,
|
|
20091
20208
|
multiplier,
|
|
20092
20209
|
streak,
|
|
20093
20210
|
size = "md",
|
|
@@ -20532,10 +20649,10 @@ var init_CounterTemplate = __esm({
|
|
|
20532
20649
|
}
|
|
20533
20650
|
});
|
|
20534
20651
|
function ItemSlot({
|
|
20535
|
-
icon,
|
|
20536
|
-
label,
|
|
20652
|
+
icon = "sword",
|
|
20653
|
+
label = "Iron Sword",
|
|
20537
20654
|
quantity,
|
|
20538
|
-
rarity = "
|
|
20655
|
+
rarity = "uncommon",
|
|
20539
20656
|
empty,
|
|
20540
20657
|
size = "md",
|
|
20541
20658
|
selected,
|
|
@@ -20612,9 +20729,9 @@ function isValidRarity(value) {
|
|
|
20612
20729
|
return rarityValues.includes(value);
|
|
20613
20730
|
}
|
|
20614
20731
|
function CraftingRecipe({
|
|
20615
|
-
inputs,
|
|
20616
|
-
output,
|
|
20617
|
-
canCraft =
|
|
20732
|
+
inputs = DEFAULT_INPUTS,
|
|
20733
|
+
output = DEFAULT_OUTPUT,
|
|
20734
|
+
canCraft = true,
|
|
20618
20735
|
onCraft,
|
|
20619
20736
|
craftEvent,
|
|
20620
20737
|
className
|
|
@@ -20675,7 +20792,7 @@ function CraftingRecipe({
|
|
|
20675
20792
|
}
|
|
20676
20793
|
);
|
|
20677
20794
|
}
|
|
20678
|
-
var rarityValues;
|
|
20795
|
+
var rarityValues, DEFAULT_INPUTS, DEFAULT_OUTPUT;
|
|
20679
20796
|
var init_CraftingRecipe = __esm({
|
|
20680
20797
|
"components/game/molecules/CraftingRecipe.tsx"() {
|
|
20681
20798
|
"use client";
|
|
@@ -20687,6 +20804,15 @@ var init_CraftingRecipe = __esm({
|
|
|
20687
20804
|
init_Stack();
|
|
20688
20805
|
init_Icon();
|
|
20689
20806
|
rarityValues = ["common", "uncommon", "rare", "epic", "legendary"];
|
|
20807
|
+
DEFAULT_INPUTS = [
|
|
20808
|
+
{ icon: "gem", label: "Iron Ore", required: 2, available: 3 },
|
|
20809
|
+
{ icon: "flame", label: "Coal", required: 1, available: 1 }
|
|
20810
|
+
];
|
|
20811
|
+
DEFAULT_OUTPUT = {
|
|
20812
|
+
icon: "sword",
|
|
20813
|
+
label: "Iron Sword",
|
|
20814
|
+
rarity: "uncommon"
|
|
20815
|
+
};
|
|
20690
20816
|
CraftingRecipe.displayName = "CraftingRecipe";
|
|
20691
20817
|
}
|
|
20692
20818
|
});
|
|
@@ -20768,7 +20894,7 @@ var init_DPad = __esm({
|
|
|
20768
20894
|
}
|
|
20769
20895
|
});
|
|
20770
20896
|
function DamageNumber({
|
|
20771
|
-
value,
|
|
20897
|
+
value = 42,
|
|
20772
20898
|
type = "damage",
|
|
20773
20899
|
size = "md",
|
|
20774
20900
|
className
|
|
@@ -26845,8 +26971,8 @@ var init_ProgressDots = __esm({
|
|
|
26845
26971
|
}
|
|
26846
26972
|
});
|
|
26847
26973
|
function HealthBar({
|
|
26848
|
-
current,
|
|
26849
|
-
max,
|
|
26974
|
+
current = 3,
|
|
26975
|
+
max = 5,
|
|
26850
26976
|
format = "hearts",
|
|
26851
26977
|
size = "md",
|
|
26852
26978
|
className,
|
|
@@ -27066,10 +27192,10 @@ var init_StatBadge = __esm({
|
|
|
27066
27192
|
}
|
|
27067
27193
|
});
|
|
27068
27194
|
function InventoryGrid({
|
|
27069
|
-
items,
|
|
27195
|
+
items = DEFAULT_GRID_ITEMS,
|
|
27070
27196
|
columns = 4,
|
|
27071
|
-
totalSlots,
|
|
27072
|
-
selectedId,
|
|
27197
|
+
totalSlots = 12,
|
|
27198
|
+
selectedId = "",
|
|
27073
27199
|
onSelect,
|
|
27074
27200
|
selectEvent,
|
|
27075
27201
|
size = "md",
|
|
@@ -27118,7 +27244,7 @@ function InventoryGrid({
|
|
|
27118
27244
|
}
|
|
27119
27245
|
);
|
|
27120
27246
|
}
|
|
27121
|
-
var columnMap;
|
|
27247
|
+
var columnMap, DEFAULT_GRID_ITEMS;
|
|
27122
27248
|
var init_InventoryGrid = __esm({
|
|
27123
27249
|
"components/game/molecules/InventoryGrid.tsx"() {
|
|
27124
27250
|
"use client";
|
|
@@ -27135,13 +27261,19 @@ var init_InventoryGrid = __esm({
|
|
|
27135
27261
|
7: "grid-cols-7",
|
|
27136
27262
|
8: "grid-cols-8"
|
|
27137
27263
|
};
|
|
27264
|
+
DEFAULT_GRID_ITEMS = [
|
|
27265
|
+
{ id: "grid-1", icon: "sword", label: "Iron Sword", quantity: 1, rarity: "common" },
|
|
27266
|
+
{ id: "grid-2", icon: "flask-conical", label: "Health Potion", quantity: 3, rarity: "uncommon" },
|
|
27267
|
+
{ id: "grid-3", icon: "shield", label: "Wooden Shield", quantity: 1, rarity: "common" },
|
|
27268
|
+
{ id: "grid-4", icon: "gem", label: "Ruby Gem", quantity: 2, rarity: "rare" }
|
|
27269
|
+
];
|
|
27138
27270
|
InventoryGrid.displayName = "InventoryGrid";
|
|
27139
27271
|
}
|
|
27140
27272
|
});
|
|
27141
27273
|
function WaypointMarker({
|
|
27142
27274
|
label,
|
|
27143
27275
|
icon,
|
|
27144
|
-
active =
|
|
27276
|
+
active = true,
|
|
27145
27277
|
completed = false,
|
|
27146
27278
|
size = "md",
|
|
27147
27279
|
className
|
|
@@ -27209,8 +27341,8 @@ var init_WaypointMarker = __esm({
|
|
|
27209
27341
|
}
|
|
27210
27342
|
});
|
|
27211
27343
|
function QuestTracker({
|
|
27212
|
-
quests,
|
|
27213
|
-
activeQuestId,
|
|
27344
|
+
quests = DEFAULT_QUESTS,
|
|
27345
|
+
activeQuestId = "q2",
|
|
27214
27346
|
className
|
|
27215
27347
|
}) {
|
|
27216
27348
|
return /* @__PURE__ */ jsxRuntime.jsx(exports.VStack, { gap: "sm", className, children: quests.map((quest) => {
|
|
@@ -27276,6 +27408,7 @@ function QuestTracker({
|
|
|
27276
27408
|
);
|
|
27277
27409
|
}) });
|
|
27278
27410
|
}
|
|
27411
|
+
var DEFAULT_QUESTS;
|
|
27279
27412
|
var init_QuestTracker = __esm({
|
|
27280
27413
|
"components/game/molecules/QuestTracker.tsx"() {
|
|
27281
27414
|
"use client";
|
|
@@ -27285,6 +27418,11 @@ var init_QuestTracker = __esm({
|
|
|
27285
27418
|
init_Typography();
|
|
27286
27419
|
init_Box();
|
|
27287
27420
|
init_Stack();
|
|
27421
|
+
DEFAULT_QUESTS = [
|
|
27422
|
+
{ id: "q1", title: "Reach the Ancient Ruins", progress: 1, maxProgress: 1, completed: true },
|
|
27423
|
+
{ id: "q2", title: "Defeat the Shadow Guard", progress: 2, maxProgress: 5, active: true },
|
|
27424
|
+
{ id: "q3", title: "Collect 3 Crystal Shards", progress: 0, maxProgress: 3, active: false }
|
|
27425
|
+
];
|
|
27288
27426
|
QuestTracker.displayName = "QuestTracker";
|
|
27289
27427
|
}
|
|
27290
27428
|
});
|
|
@@ -27297,7 +27435,7 @@ function formatTime(seconds) {
|
|
|
27297
27435
|
return `${seconds}s`;
|
|
27298
27436
|
}
|
|
27299
27437
|
function PowerupSlots({
|
|
27300
|
-
active,
|
|
27438
|
+
active = DEFAULT_ACTIVE_POWERUPS,
|
|
27301
27439
|
maxSlots = 4,
|
|
27302
27440
|
className
|
|
27303
27441
|
}) {
|
|
@@ -27342,6 +27480,7 @@ function PowerupSlots({
|
|
|
27342
27480
|
))
|
|
27343
27481
|
] });
|
|
27344
27482
|
}
|
|
27483
|
+
var DEFAULT_ACTIVE_POWERUPS;
|
|
27345
27484
|
var init_PowerupSlots = __esm({
|
|
27346
27485
|
"components/game/molecules/PowerupSlots.tsx"() {
|
|
27347
27486
|
"use client";
|
|
@@ -27350,6 +27489,10 @@ var init_PowerupSlots = __esm({
|
|
|
27350
27489
|
init_Box();
|
|
27351
27490
|
init_Stack();
|
|
27352
27491
|
init_Typography();
|
|
27492
|
+
DEFAULT_ACTIVE_POWERUPS = [
|
|
27493
|
+
{ id: "pw1", icon: "zap", label: "Speed Boost", remainingTime: 12 },
|
|
27494
|
+
{ id: "pw2", icon: "shield", label: "Iron Shield", remainingTime: 30 }
|
|
27495
|
+
];
|
|
27353
27496
|
PowerupSlots.displayName = "PowerupSlots";
|
|
27354
27497
|
}
|
|
27355
27498
|
});
|
|
@@ -27361,7 +27504,7 @@ function GameCanvas2D({
|
|
|
27361
27504
|
tickEvent,
|
|
27362
27505
|
drawEvent,
|
|
27363
27506
|
fps = 60,
|
|
27364
|
-
backgroundImage = "
|
|
27507
|
+
backgroundImage = "",
|
|
27365
27508
|
assetBaseUrl = "https://almadar-kflow-assets.web.app/shared/",
|
|
27366
27509
|
className
|
|
27367
27510
|
}) {
|
|
@@ -27465,10 +27608,10 @@ var init_GameCanvas2D = __esm({
|
|
|
27465
27608
|
}
|
|
27466
27609
|
});
|
|
27467
27610
|
function HealthPanel({
|
|
27468
|
-
current,
|
|
27469
|
-
max,
|
|
27470
|
-
shield,
|
|
27471
|
-
label,
|
|
27611
|
+
current = 75,
|
|
27612
|
+
max = 100,
|
|
27613
|
+
shield = 20,
|
|
27614
|
+
label = "Player HP",
|
|
27472
27615
|
effects,
|
|
27473
27616
|
showNumbers = true,
|
|
27474
27617
|
size = "md",
|
|
@@ -27586,11 +27729,11 @@ var init_HealthPanel = __esm({
|
|
|
27586
27729
|
}
|
|
27587
27730
|
});
|
|
27588
27731
|
function ScoreBoard({
|
|
27589
|
-
score: rawScore,
|
|
27590
|
-
highScore: rawHighScore,
|
|
27591
|
-
combo: rawCombo,
|
|
27592
|
-
multiplier: rawMultiplier,
|
|
27593
|
-
level: rawLevel,
|
|
27732
|
+
score: rawScore = 4200,
|
|
27733
|
+
highScore: rawHighScore = 8750,
|
|
27734
|
+
combo: rawCombo = 3,
|
|
27735
|
+
multiplier: rawMultiplier = 2,
|
|
27736
|
+
level: rawLevel = 4,
|
|
27594
27737
|
className
|
|
27595
27738
|
}) {
|
|
27596
27739
|
const score = rawScore ?? 0;
|
|
@@ -27663,7 +27806,7 @@ var init_ScoreBoard = __esm({
|
|
|
27663
27806
|
}
|
|
27664
27807
|
});
|
|
27665
27808
|
function ResourceBar({
|
|
27666
|
-
resources,
|
|
27809
|
+
resources = DEFAULT_RESOURCES,
|
|
27667
27810
|
size = "md",
|
|
27668
27811
|
className
|
|
27669
27812
|
}) {
|
|
@@ -27689,17 +27832,23 @@ function ResourceBar({
|
|
|
27689
27832
|
}
|
|
27690
27833
|
);
|
|
27691
27834
|
}
|
|
27835
|
+
var DEFAULT_RESOURCES;
|
|
27692
27836
|
var init_ResourceBar = __esm({
|
|
27693
27837
|
"components/game/molecules/ResourceBar.tsx"() {
|
|
27694
27838
|
"use client";
|
|
27695
27839
|
init_cn();
|
|
27696
27840
|
init_StatBadge();
|
|
27697
27841
|
init_Box();
|
|
27842
|
+
DEFAULT_RESOURCES = [
|
|
27843
|
+
{ icon: "coins", label: "Gold", value: 320 },
|
|
27844
|
+
{ icon: "zap", label: "Energy", value: 7, max: 10 },
|
|
27845
|
+
{ icon: "gem", label: "Crystals", value: 15 }
|
|
27846
|
+
];
|
|
27698
27847
|
ResourceBar.displayName = "ResourceBar";
|
|
27699
27848
|
}
|
|
27700
27849
|
});
|
|
27701
27850
|
function TurnIndicator({
|
|
27702
|
-
currentTurn,
|
|
27851
|
+
currentTurn = 1,
|
|
27703
27852
|
maxTurns,
|
|
27704
27853
|
activeTeam,
|
|
27705
27854
|
phase,
|
|
@@ -27751,11 +27900,11 @@ var init_TurnIndicator = __esm({
|
|
|
27751
27900
|
}
|
|
27752
27901
|
});
|
|
27753
27902
|
function TurnPanel({
|
|
27754
|
-
currentTurn,
|
|
27755
|
-
maxTurns,
|
|
27756
|
-
phase,
|
|
27757
|
-
activeTeam,
|
|
27758
|
-
actions,
|
|
27903
|
+
currentTurn = 3,
|
|
27904
|
+
maxTurns = 10,
|
|
27905
|
+
phase = "Attack",
|
|
27906
|
+
activeTeam = "Heroes",
|
|
27907
|
+
actions = DEFAULT_TURN_ACTIONS,
|
|
27759
27908
|
className
|
|
27760
27909
|
}) {
|
|
27761
27910
|
const eventBus = useEventBus();
|
|
@@ -27800,6 +27949,7 @@ function TurnPanel({
|
|
|
27800
27949
|
}
|
|
27801
27950
|
);
|
|
27802
27951
|
}
|
|
27952
|
+
var DEFAULT_TURN_ACTIONS;
|
|
27803
27953
|
var init_TurnPanel = __esm({
|
|
27804
27954
|
"components/game/molecules/TurnPanel.tsx"() {
|
|
27805
27955
|
"use client";
|
|
@@ -27808,15 +27958,19 @@ var init_TurnPanel = __esm({
|
|
|
27808
27958
|
init_Button();
|
|
27809
27959
|
init_Box();
|
|
27810
27960
|
init_useEventBus();
|
|
27961
|
+
DEFAULT_TURN_ACTIONS = [
|
|
27962
|
+
{ label: "End Turn", icon: "skip-forward", event: "END_TURN" },
|
|
27963
|
+
{ label: "Forfeit", icon: "flag", event: "FORFEIT", disabled: false }
|
|
27964
|
+
];
|
|
27811
27965
|
TurnPanel.displayName = "TurnPanel";
|
|
27812
27966
|
}
|
|
27813
27967
|
});
|
|
27814
27968
|
function EnemyPlate({
|
|
27815
|
-
name,
|
|
27816
|
-
health,
|
|
27817
|
-
maxHealth,
|
|
27818
|
-
level,
|
|
27819
|
-
effects,
|
|
27969
|
+
name = "Shadow Guard",
|
|
27970
|
+
health = 80,
|
|
27971
|
+
maxHealth = 100,
|
|
27972
|
+
level = 5,
|
|
27973
|
+
effects = DEFAULT_ENEMY_EFFECTS,
|
|
27820
27974
|
className
|
|
27821
27975
|
}) {
|
|
27822
27976
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -27882,7 +28036,7 @@ function EnemyPlate({
|
|
|
27882
28036
|
}
|
|
27883
28037
|
);
|
|
27884
28038
|
}
|
|
27885
|
-
var effectVariantMap2;
|
|
28039
|
+
var effectVariantMap2, DEFAULT_ENEMY_EFFECTS;
|
|
27886
28040
|
var init_EnemyPlate = __esm({
|
|
27887
28041
|
"components/game/molecules/EnemyPlate.tsx"() {
|
|
27888
28042
|
"use client";
|
|
@@ -27896,12 +28050,15 @@ var init_EnemyPlate = __esm({
|
|
|
27896
28050
|
debuff: "danger",
|
|
27897
28051
|
neutral: "neutral"
|
|
27898
28052
|
};
|
|
28053
|
+
DEFAULT_ENEMY_EFFECTS = [
|
|
28054
|
+
{ icon: "flame", label: "Burn", variant: "debuff" }
|
|
28055
|
+
];
|
|
27899
28056
|
EnemyPlate.displayName = "EnemyPlate";
|
|
27900
28057
|
}
|
|
27901
28058
|
});
|
|
27902
28059
|
function UnitCommandBar({
|
|
27903
|
-
commands,
|
|
27904
|
-
selectedUnitId,
|
|
28060
|
+
commands = DEFAULT_COMMANDS,
|
|
28061
|
+
selectedUnitId = "unit-1",
|
|
27905
28062
|
className
|
|
27906
28063
|
}) {
|
|
27907
28064
|
const eventBus = useEventBus();
|
|
@@ -27944,6 +28101,7 @@ function UnitCommandBar({
|
|
|
27944
28101
|
}
|
|
27945
28102
|
);
|
|
27946
28103
|
}
|
|
28104
|
+
var DEFAULT_COMMANDS;
|
|
27947
28105
|
var init_UnitCommandBar = __esm({
|
|
27948
28106
|
"components/game/molecules/UnitCommandBar.tsx"() {
|
|
27949
28107
|
"use client";
|
|
@@ -27952,6 +28110,12 @@ var init_UnitCommandBar = __esm({
|
|
|
27952
28110
|
init_Box();
|
|
27953
28111
|
init_Typography();
|
|
27954
28112
|
init_useEventBus();
|
|
28113
|
+
DEFAULT_COMMANDS = [
|
|
28114
|
+
{ label: "Move", icon: "move", event: "MOVE", hotkey: "M" },
|
|
28115
|
+
{ label: "Attack", icon: "sword", event: "ATTACK", hotkey: "A" },
|
|
28116
|
+
{ label: "Defend", icon: "shield", event: "DEFEND", hotkey: "D" },
|
|
28117
|
+
{ label: "Wait", icon: "clock", event: "WAIT", hotkey: "W" }
|
|
28118
|
+
];
|
|
27955
28119
|
UnitCommandBar.displayName = "UnitCommandBar";
|
|
27956
28120
|
}
|
|
27957
28121
|
});
|
|
@@ -27985,7 +28149,7 @@ function GameHud({
|
|
|
27985
28149
|
className,
|
|
27986
28150
|
transparent = true
|
|
27987
28151
|
}) {
|
|
27988
|
-
const rawStats = propStats ?? items ?? (elements && Array.isArray(elements) ? convertElementsToStats(elements) :
|
|
28152
|
+
const rawStats = propStats ?? items ?? (elements && Array.isArray(elements) ? convertElementsToStats(elements) : DEFAULT_HUD_STATS);
|
|
27989
28153
|
const stats = Array.isArray(rawStats) ? rawStats : [];
|
|
27990
28154
|
const position = propPosition ?? "corners";
|
|
27991
28155
|
if (position === "corners") {
|
|
@@ -28010,7 +28174,7 @@ function GameHud({
|
|
|
28010
28174
|
}
|
|
28011
28175
|
);
|
|
28012
28176
|
}
|
|
28013
|
-
var positionMap;
|
|
28177
|
+
var positionMap, DEFAULT_HUD_STATS;
|
|
28014
28178
|
var init_GameHud = __esm({
|
|
28015
28179
|
"components/game/molecules/GameHud.tsx"() {
|
|
28016
28180
|
init_cn();
|
|
@@ -28020,11 +28184,17 @@ var init_GameHud = __esm({
|
|
|
28020
28184
|
bottom: "bottom-0 left-0 right-0 flex justify-between items-end p-4",
|
|
28021
28185
|
corners: "inset-0 pointer-events-none"
|
|
28022
28186
|
};
|
|
28187
|
+
DEFAULT_HUD_STATS = [
|
|
28188
|
+
{ label: "HP", value: 75, max: 100, format: "bar", variant: "danger" },
|
|
28189
|
+
{ label: "MP", value: 40, max: 60, format: "bar", variant: "primary" },
|
|
28190
|
+
{ label: "Score", value: 4200, format: "number", variant: "warning" },
|
|
28191
|
+
{ label: "Level", value: 4, format: "number", variant: "default" }
|
|
28192
|
+
];
|
|
28023
28193
|
GameHud.displayName = "GameHud";
|
|
28024
28194
|
}
|
|
28025
28195
|
});
|
|
28026
28196
|
function DialogueBox({
|
|
28027
|
-
dialogue,
|
|
28197
|
+
dialogue = DEFAULT_DIALOGUE,
|
|
28028
28198
|
typewriterSpeed = 30,
|
|
28029
28199
|
position = "bottom",
|
|
28030
28200
|
onComplete,
|
|
@@ -28207,17 +28377,27 @@ function DialogueBox({
|
|
|
28207
28377
|
}
|
|
28208
28378
|
);
|
|
28209
28379
|
}
|
|
28380
|
+
var DEFAULT_DIALOGUE;
|
|
28210
28381
|
var init_DialogueBox = __esm({
|
|
28211
28382
|
"components/game/molecules/DialogueBox.tsx"() {
|
|
28212
28383
|
"use client";
|
|
28213
28384
|
init_cn();
|
|
28214
28385
|
init_useEventBus();
|
|
28386
|
+
DEFAULT_DIALOGUE = {
|
|
28387
|
+
speaker: "Village Elder",
|
|
28388
|
+
text: "The ancient ruins hold great power \u2014 and great danger. Choose your path wisely, traveler.",
|
|
28389
|
+
choices: [
|
|
28390
|
+
{ text: "I am ready. Lead the way.", action: "ACCEPT_QUEST" },
|
|
28391
|
+
{ text: "Tell me more about the ruins.", action: "ASK_LORE" },
|
|
28392
|
+
{ text: "Perhaps another time.", action: "DECLINE" }
|
|
28393
|
+
]
|
|
28394
|
+
};
|
|
28215
28395
|
}
|
|
28216
28396
|
});
|
|
28217
28397
|
function InventoryPanel({
|
|
28218
|
-
items,
|
|
28219
|
-
slots,
|
|
28220
|
-
columns,
|
|
28398
|
+
items = DEFAULT_INVENTORY_ITEMS,
|
|
28399
|
+
slots = 12,
|
|
28400
|
+
columns = 4,
|
|
28221
28401
|
selectedSlot,
|
|
28222
28402
|
onSelectSlot,
|
|
28223
28403
|
onUseItem,
|
|
@@ -28365,25 +28545,31 @@ function InventoryPanel({
|
|
|
28365
28545
|
)
|
|
28366
28546
|
] });
|
|
28367
28547
|
}
|
|
28548
|
+
var DEFAULT_INVENTORY_ITEMS;
|
|
28368
28549
|
var init_InventoryPanel = __esm({
|
|
28369
28550
|
"components/game/molecules/InventoryPanel.tsx"() {
|
|
28370
28551
|
"use client";
|
|
28371
28552
|
init_cn();
|
|
28372
28553
|
init_useEventBus();
|
|
28554
|
+
DEFAULT_INVENTORY_ITEMS = [
|
|
28555
|
+
{ id: "item-1", type: "weapon", name: "Iron Sword", quantity: 1, description: "A sturdy iron blade." },
|
|
28556
|
+
{ id: "item-2", type: "potion", name: "Health Potion", quantity: 3, description: "Restores 50 HP." },
|
|
28557
|
+
{ id: "item-3", type: "armor", name: "Leather Helm", quantity: 1, description: "Light head protection." }
|
|
28558
|
+
];
|
|
28373
28559
|
}
|
|
28374
28560
|
});
|
|
28375
28561
|
function GameMenu({
|
|
28376
|
-
title,
|
|
28562
|
+
title = "Epic Quest",
|
|
28377
28563
|
subtitle,
|
|
28378
28564
|
options,
|
|
28379
28565
|
menuItems,
|
|
28380
28566
|
onSelect,
|
|
28381
28567
|
eventBus: eventBusProp,
|
|
28382
28568
|
background,
|
|
28383
|
-
logo,
|
|
28569
|
+
logo = "",
|
|
28384
28570
|
className
|
|
28385
28571
|
}) {
|
|
28386
|
-
const resolvedOptions = options ?? menuItems ??
|
|
28572
|
+
const resolvedOptions = options ?? menuItems ?? DEFAULT_MENU_OPTIONS;
|
|
28387
28573
|
let eventBusFromHook = null;
|
|
28388
28574
|
try {
|
|
28389
28575
|
eventBusFromHook = useEventBus();
|
|
@@ -28464,7 +28650,7 @@ function GameMenu({
|
|
|
28464
28650
|
}
|
|
28465
28651
|
);
|
|
28466
28652
|
}
|
|
28467
|
-
var variantMap3;
|
|
28653
|
+
var variantMap3, DEFAULT_MENU_OPTIONS;
|
|
28468
28654
|
var init_GameMenu = __esm({
|
|
28469
28655
|
"components/game/molecules/GameMenu.tsx"() {
|
|
28470
28656
|
"use client";
|
|
@@ -28475,6 +28661,11 @@ var init_GameMenu = __esm({
|
|
|
28475
28661
|
secondary: "bg-[var(--color-surface,#374151)] hover:bg-muted text-[var(--color-foreground)] border-muted",
|
|
28476
28662
|
ghost: "bg-transparent hover:bg-foreground/10 text-[var(--color-foreground)] border-foreground/20"
|
|
28477
28663
|
};
|
|
28664
|
+
DEFAULT_MENU_OPTIONS = [
|
|
28665
|
+
{ label: "New Game", event: "NEW_GAME", variant: "primary" },
|
|
28666
|
+
{ label: "Continue", event: "CONTINUE", variant: "secondary" },
|
|
28667
|
+
{ label: "Settings", event: "SETTINGS", variant: "ghost" }
|
|
28668
|
+
];
|
|
28478
28669
|
GameMenu.displayName = "GameMenu";
|
|
28479
28670
|
}
|
|
28480
28671
|
});
|
|
@@ -28485,19 +28676,19 @@ function formatTime2(ms) {
|
|
|
28485
28676
|
return `${minutes}:${remainingSeconds.toString().padStart(2, "0")}`;
|
|
28486
28677
|
}
|
|
28487
28678
|
function GameOverScreen({
|
|
28488
|
-
title,
|
|
28679
|
+
title = "Game Over",
|
|
28489
28680
|
message,
|
|
28490
|
-
stats =
|
|
28681
|
+
stats = DEFAULT_GAME_OVER_STATS,
|
|
28491
28682
|
actions,
|
|
28492
28683
|
menuItems,
|
|
28493
28684
|
onAction,
|
|
28494
28685
|
eventBus: eventBusProp,
|
|
28495
|
-
variant = "
|
|
28496
|
-
highScore,
|
|
28497
|
-
currentScore,
|
|
28686
|
+
variant = "defeat",
|
|
28687
|
+
highScore = 2e3,
|
|
28688
|
+
currentScore = 1240,
|
|
28498
28689
|
className
|
|
28499
28690
|
}) {
|
|
28500
|
-
const resolvedActions = actions ?? menuItems ??
|
|
28691
|
+
const resolvedActions = actions ?? menuItems ?? DEFAULT_GAME_OVER_ACTIONS;
|
|
28501
28692
|
let eventBusFromHook = null;
|
|
28502
28693
|
try {
|
|
28503
28694
|
eventBusFromHook = useEventBus();
|
|
@@ -28584,7 +28775,7 @@ function GameOverScreen({
|
|
|
28584
28775
|
}
|
|
28585
28776
|
);
|
|
28586
28777
|
}
|
|
28587
|
-
var variantColors, buttonVariants;
|
|
28778
|
+
var variantColors, buttonVariants, DEFAULT_GAME_OVER_ACTIONS, DEFAULT_GAME_OVER_STATS;
|
|
28588
28779
|
var init_GameOverScreen = __esm({
|
|
28589
28780
|
"components/game/molecules/GameOverScreen.tsx"() {
|
|
28590
28781
|
"use client";
|
|
@@ -28613,21 +28804,35 @@ var init_GameOverScreen = __esm({
|
|
|
28613
28804
|
secondary: "bg-[var(--color-surface,#374151)] hover:bg-muted text-[var(--color-foreground)] border-muted",
|
|
28614
28805
|
ghost: "bg-transparent hover:bg-foreground/10 text-[var(--color-foreground)] border-foreground/20"
|
|
28615
28806
|
};
|
|
28807
|
+
DEFAULT_GAME_OVER_ACTIONS = [
|
|
28808
|
+
{ label: "Play Again", event: "RESTART", variant: "primary" },
|
|
28809
|
+
{ label: "Main Menu", event: "MAIN_MENU", variant: "secondary" }
|
|
28810
|
+
];
|
|
28811
|
+
DEFAULT_GAME_OVER_STATS = [
|
|
28812
|
+
{ label: "Score", value: 1240 },
|
|
28813
|
+
{ label: "Enemies Defeated", value: 8 },
|
|
28814
|
+
{ label: "Time", value: 93e3, format: "time" }
|
|
28815
|
+
];
|
|
28616
28816
|
GameOverScreen.displayName = "GameOverScreen";
|
|
28617
28817
|
}
|
|
28618
28818
|
});
|
|
28619
28819
|
function PlatformerCanvas({
|
|
28620
28820
|
player,
|
|
28621
|
-
platforms = [
|
|
28821
|
+
platforms = [
|
|
28822
|
+
{ x: 0, y: 368, width: 800, height: 32, type: "ground" },
|
|
28823
|
+
{ x: 150, y: 280, width: 160, height: 16, type: "platform" },
|
|
28824
|
+
{ x: 420, y: 220, width: 160, height: 16, type: "platform" },
|
|
28825
|
+
{ x: 620, y: 300, width: 140, height: 16, type: "platform" }
|
|
28826
|
+
],
|
|
28622
28827
|
worldWidth = 800,
|
|
28623
28828
|
worldHeight = 400,
|
|
28624
28829
|
canvasWidth = 800,
|
|
28625
28830
|
canvasHeight = 400,
|
|
28626
28831
|
followCamera = true,
|
|
28627
|
-
bgColor,
|
|
28832
|
+
bgColor = "#5c94fc",
|
|
28628
28833
|
playerSprite = "https://almadar-kflow-assets.web.app/shared/platformer/characters/platformChar_idle.png",
|
|
28629
28834
|
tileSprites,
|
|
28630
|
-
backgroundImage = "
|
|
28835
|
+
backgroundImage = "",
|
|
28631
28836
|
assetBaseUrl = "https://almadar-kflow-assets.web.app/shared/platformer/",
|
|
28632
28837
|
leftEvent = "MOVE_LEFT",
|
|
28633
28838
|
rightEvent = "MOVE_RIGHT",
|
|
@@ -28675,10 +28880,10 @@ function PlatformerCanvas({
|
|
|
28675
28880
|
};
|
|
28676
28881
|
}, []);
|
|
28677
28882
|
const resolvedPlayer = player ?? {
|
|
28678
|
-
x:
|
|
28679
|
-
y:
|
|
28680
|
-
width:
|
|
28681
|
-
height:
|
|
28883
|
+
x: 80,
|
|
28884
|
+
y: 336,
|
|
28885
|
+
width: 32,
|
|
28886
|
+
height: 48,
|
|
28682
28887
|
facingRight: true
|
|
28683
28888
|
};
|
|
28684
28889
|
const handleKeyDown = React77.useCallback((e) => {
|
|
@@ -39388,8 +39593,8 @@ var init_DetailPanel = __esm({
|
|
|
39388
39593
|
}
|
|
39389
39594
|
});
|
|
39390
39595
|
function DialogueBubble({
|
|
39391
|
-
speaker,
|
|
39392
|
-
text,
|
|
39596
|
+
speaker = "Hero",
|
|
39597
|
+
text = "The dungeon awaits. Choose your path wisely.",
|
|
39393
39598
|
portrait = "https://almadar-kflow-assets.web.app/shared/characters/archetypes/04_hero.png",
|
|
39394
39599
|
position = "bottom",
|
|
39395
39600
|
className
|
|
@@ -39471,7 +39676,7 @@ var init_DrawerSlot = __esm({
|
|
|
39471
39676
|
}
|
|
39472
39677
|
});
|
|
39473
39678
|
function StateIndicator({
|
|
39474
|
-
state,
|
|
39679
|
+
state = "idle",
|
|
39475
39680
|
label,
|
|
39476
39681
|
size = "md",
|
|
39477
39682
|
animated = true,
|
|
@@ -42684,13 +42889,13 @@ var init_MediaGallery = __esm({
|
|
|
42684
42889
|
}
|
|
42685
42890
|
});
|
|
42686
42891
|
function MiniMap({
|
|
42687
|
-
tiles =
|
|
42688
|
-
units =
|
|
42892
|
+
tiles = DEFAULT_TILES,
|
|
42893
|
+
units = DEFAULT_UNITS,
|
|
42689
42894
|
width = 150,
|
|
42690
42895
|
height = 150,
|
|
42691
42896
|
mapWidth = 100,
|
|
42692
42897
|
mapHeight = 100,
|
|
42693
|
-
viewportRect,
|
|
42898
|
+
viewportRect = DEFAULT_VIEWPORT,
|
|
42694
42899
|
className
|
|
42695
42900
|
}) {
|
|
42696
42901
|
const canvasRef = React77__namespace.useRef(null);
|
|
@@ -42769,10 +42974,25 @@ function MiniMap({
|
|
|
42769
42974
|
}
|
|
42770
42975
|
);
|
|
42771
42976
|
}
|
|
42977
|
+
var DEFAULT_TILES, DEFAULT_UNITS, DEFAULT_VIEWPORT;
|
|
42772
42978
|
var init_MiniMap = __esm({
|
|
42773
42979
|
"components/game/atoms/MiniMap.tsx"() {
|
|
42774
42980
|
"use client";
|
|
42775
42981
|
init_cn();
|
|
42982
|
+
DEFAULT_TILES = [
|
|
42983
|
+
{ x: 10, y: 10, color: "#4ade80" },
|
|
42984
|
+
{ x: 20, y: 15, color: "#4ade80" },
|
|
42985
|
+
{ x: 30, y: 25, color: "#22c55e" },
|
|
42986
|
+
{ x: 50, y: 40, color: "#4ade80" },
|
|
42987
|
+
{ x: 60, y: 55, color: "#16a34a" },
|
|
42988
|
+
{ x: 40, y: 60, color: "#4ade80" },
|
|
42989
|
+
{ x: 70, y: 30, color: "#22c55e" },
|
|
42990
|
+
{ x: 80, y: 70, color: "#4ade80" }
|
|
42991
|
+
];
|
|
42992
|
+
DEFAULT_UNITS = [
|
|
42993
|
+
{ x: 30, y: 30, color: "#60a5fa", isPlayer: true }
|
|
42994
|
+
];
|
|
42995
|
+
DEFAULT_VIEWPORT = { x: 20, y: 20, w: 40, h: 40 };
|
|
42776
42996
|
MiniMap.displayName = "MiniMap";
|
|
42777
42997
|
}
|
|
42778
42998
|
});
|
|
@@ -43124,8 +43344,8 @@ var init_PricingPageTemplate = __esm({
|
|
|
43124
43344
|
});
|
|
43125
43345
|
function ResourceCounter({
|
|
43126
43346
|
icon,
|
|
43127
|
-
label,
|
|
43128
|
-
value,
|
|
43347
|
+
label = "Gold",
|
|
43348
|
+
value = 250,
|
|
43129
43349
|
max,
|
|
43130
43350
|
color,
|
|
43131
43351
|
size = "md",
|
|
@@ -46138,11 +46358,11 @@ var init_SplitPane = __esm({
|
|
|
46138
46358
|
});
|
|
46139
46359
|
function Sprite({
|
|
46140
46360
|
spritesheet = "https://almadar-kflow-assets.web.app/shared/isometric-blocks/Spritesheet/allTiles_sheet.png",
|
|
46141
|
-
frameWidth,
|
|
46142
|
-
frameHeight,
|
|
46143
|
-
frame,
|
|
46144
|
-
x,
|
|
46145
|
-
y,
|
|
46361
|
+
frameWidth = 64,
|
|
46362
|
+
frameHeight = 64,
|
|
46363
|
+
frame = 0,
|
|
46364
|
+
x = 0,
|
|
46365
|
+
y = 0,
|
|
46146
46366
|
scale = 1,
|
|
46147
46367
|
flipX = false,
|
|
46148
46368
|
flipY = false,
|
|
@@ -47043,11 +47263,11 @@ function formatDuration(seconds) {
|
|
|
47043
47263
|
return `${Math.round(seconds)}s`;
|
|
47044
47264
|
}
|
|
47045
47265
|
function StatusEffect({
|
|
47046
|
-
icon,
|
|
47047
|
-
label,
|
|
47048
|
-
duration,
|
|
47266
|
+
icon = "shield",
|
|
47267
|
+
label = "Shield",
|
|
47268
|
+
duration = 30,
|
|
47049
47269
|
stacks,
|
|
47050
|
-
variant = "
|
|
47270
|
+
variant = "buff",
|
|
47051
47271
|
size = "md",
|
|
47052
47272
|
className
|
|
47053
47273
|
}) {
|
|
@@ -47500,8 +47720,8 @@ function formatTime3(seconds, format) {
|
|
|
47500
47720
|
return `${mins.toString().padStart(2, "0")}:${padded}`;
|
|
47501
47721
|
}
|
|
47502
47722
|
function TimerDisplay({
|
|
47503
|
-
seconds,
|
|
47504
|
-
running,
|
|
47723
|
+
seconds = 90,
|
|
47724
|
+
running = true,
|
|
47505
47725
|
format = "mm:ss",
|
|
47506
47726
|
size = "md",
|
|
47507
47727
|
className,
|
|
@@ -48074,12 +48294,12 @@ function WorldMapTemplate({
|
|
|
48074
48294
|
entity,
|
|
48075
48295
|
scale = 0.4,
|
|
48076
48296
|
unitScale = 2.5,
|
|
48077
|
-
diamondTopY,
|
|
48297
|
+
diamondTopY = 374,
|
|
48078
48298
|
allowMoveAllHeroes = false,
|
|
48079
|
-
tiles,
|
|
48080
|
-
units,
|
|
48081
|
-
features,
|
|
48082
|
-
assetManifest,
|
|
48299
|
+
tiles = DEFAULT_WORLDMAP_TILES,
|
|
48300
|
+
units = DEFAULT_WORLDMAP_UNITS,
|
|
48301
|
+
features = DEFAULT_WORLDMAP_FEATURES,
|
|
48302
|
+
assetManifest = DEFAULT_WORLDMAP_MANIFEST,
|
|
48083
48303
|
className
|
|
48084
48304
|
}) {
|
|
48085
48305
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -48102,17 +48322,71 @@ function WorldMapTemplate({
|
|
|
48102
48322
|
}
|
|
48103
48323
|
);
|
|
48104
48324
|
}
|
|
48325
|
+
var CDN3, DEFAULT_WORLDMAP_TILES, DEFAULT_WORLDMAP_UNITS, DEFAULT_WORLDMAP_FEATURES, DEFAULT_WORLDMAP_MANIFEST;
|
|
48105
48326
|
var init_WorldMapTemplate = __esm({
|
|
48106
48327
|
"components/game/templates/WorldMapTemplate.tsx"() {
|
|
48107
48328
|
init_WorldMapBoard();
|
|
48329
|
+
CDN3 = "https://almadar-kflow-assets.web.app/shared";
|
|
48330
|
+
DEFAULT_WORLDMAP_TILES = [
|
|
48331
|
+
{ x: 0, y: 0, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
48332
|
+
{ x: 1, y: 0, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
48333
|
+
{ x: 2, y: 0, terrain: "water", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png` },
|
|
48334
|
+
{ x: 3, y: 0, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
48335
|
+
{ x: 4, y: 0, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
48336
|
+
{ x: 0, y: 1, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
48337
|
+
{ x: 1, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
48338
|
+
{ x: 2, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
48339
|
+
{ x: 3, y: 1, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
48340
|
+
{ x: 4, y: 1, terrain: "water", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png` },
|
|
48341
|
+
{ x: 0, y: 2, terrain: "water", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png` },
|
|
48342
|
+
{ x: 1, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
48343
|
+
{ x: 2, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_03.png` },
|
|
48344
|
+
{ x: 3, y: 2, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
48345
|
+
{ x: 4, y: 2, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
48346
|
+
{ x: 0, y: 3, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
48347
|
+
{ x: 1, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
48348
|
+
{ x: 2, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
48349
|
+
{ x: 3, y: 3, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_03.png` },
|
|
48350
|
+
{ x: 4, y: 3, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
48351
|
+
{ x: 0, y: 4, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
48352
|
+
{ x: 1, y: 4, terrain: "water", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png` },
|
|
48353
|
+
{ x: 2, y: 4, terrain: "grass", passable: true, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png` },
|
|
48354
|
+
{ x: 3, y: 4, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` },
|
|
48355
|
+
{ x: 4, y: 4, terrain: "mountain", passable: false, terrainSprite: `${CDN3}/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png` }
|
|
48356
|
+
];
|
|
48357
|
+
DEFAULT_WORLDMAP_UNITS = [
|
|
48358
|
+
{ id: "h1", position: { x: 1, y: 1 }, unitType: "hero", name: "Amir", team: "player", health: 10, maxHealth: 10, sprite: `${CDN3}/sprite-sheets/amir-sprite-sheet-se.png` },
|
|
48359
|
+
{ id: "h2", position: { x: 3, y: 3 }, unitType: "scout", name: "Archivist", team: "player", health: 10, maxHealth: 10, sprite: `${CDN3}/sprite-sheets/archivist-sprite-sheet-se.png` }
|
|
48360
|
+
];
|
|
48361
|
+
DEFAULT_WORLDMAP_FEATURES = [
|
|
48362
|
+
{ id: "f1", x: 2, y: 2, type: "capital", sprite: `${CDN3}/scenes/world/capital.png` },
|
|
48363
|
+
{ id: "f2", x: 4, y: 2, type: "power_node", sprite: `${CDN3}/world-map/power_node.png` }
|
|
48364
|
+
];
|
|
48365
|
+
DEFAULT_WORLDMAP_MANIFEST = {
|
|
48366
|
+
baseUrl: CDN3,
|
|
48367
|
+
terrains: {
|
|
48368
|
+
grass: "/isometric-blocks/PNG/Platformer tiles/platformerTile_01.png",
|
|
48369
|
+
water: "/isometric-blocks/PNG/Platformer tiles/platformerTile_11.png",
|
|
48370
|
+
mountain: "/isometric-blocks/PNG/Platformer tiles/platformerTile_13.png",
|
|
48371
|
+
road: "/isometric-blocks/PNG/Platformer tiles/platformerTile_03.png"
|
|
48372
|
+
},
|
|
48373
|
+
units: {
|
|
48374
|
+
hero: "/sprite-sheets/amir-sprite-sheet-se.png",
|
|
48375
|
+
scout: "/sprite-sheets/archivist-sprite-sheet-se.png"
|
|
48376
|
+
},
|
|
48377
|
+
features: {
|
|
48378
|
+
capital: "/scenes/world/capital.png",
|
|
48379
|
+
power_node: "/world-map/power_node.png"
|
|
48380
|
+
}
|
|
48381
|
+
};
|
|
48108
48382
|
WorldMapTemplate.displayName = "WorldMapTemplate";
|
|
48109
48383
|
}
|
|
48110
48384
|
});
|
|
48111
48385
|
function XPBar({
|
|
48112
|
-
current,
|
|
48113
|
-
max,
|
|
48114
|
-
level,
|
|
48115
|
-
showLabel =
|
|
48386
|
+
current = 350,
|
|
48387
|
+
max = 1e3,
|
|
48388
|
+
level = 5,
|
|
48389
|
+
showLabel = true,
|
|
48116
48390
|
size = "md",
|
|
48117
48391
|
animated = true,
|
|
48118
48392
|
className
|