@almadar/ui 5.63.2 → 5.65.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 +89 -24
- package/dist/avl/index.js +89 -24
- package/dist/components/game/molecules/IsometricCanvas.d.ts +4 -1
- package/dist/components/game/molecules/index.d.ts +1 -0
- package/dist/components/game/molecules/three/index.cjs +5 -2
- package/dist/components/game/molecules/three/index.js +5 -2
- package/dist/components/game/organisms/HexStrategyBoard.d.ts +37 -0
- package/dist/components/game/organisms/index.d.ts +2 -0
- package/dist/components/game/organisms/utils/isometric.d.ts +20 -7
- package/dist/components/index.cjs +91 -24
- package/dist/components/index.js +91 -25
- package/dist/components/marketing/organisms/HeroOrganism.d.ts +2 -2
- package/dist/components/marketing/organisms/ShowcaseOrganism.d.ts +2 -2
- package/dist/components/marketing/organisms/TeamOrganism.d.ts +2 -2
- package/dist/providers/index.cjs +89 -24
- package/dist/providers/index.js +89 -24
- package/dist/runtime/index.cjs +89 -24
- package/dist/runtime/index.js +89 -24
- package/package.json +1 -1
package/dist/components/index.js
CHANGED
|
@@ -46,6 +46,7 @@ import * as THREE3 from 'three';
|
|
|
46
46
|
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
|
|
47
47
|
import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js';
|
|
48
48
|
import { GLTFLoader as GLTFLoader$1 } from 'three/examples/jsm/loaders/GLTFLoader';
|
|
49
|
+
import { clone } from 'three/examples/jsm/utils/SkeletonUtils';
|
|
49
50
|
import { Canvas, useLoader, useFrame, useThree } from '@react-three/fiber';
|
|
50
51
|
import { Billboard, Grid as Grid$1, OrbitControls } from '@react-three/drei';
|
|
51
52
|
import { getPatternDefinition as getPatternDefinition$1, getComponentForPattern as getComponentForPattern$1 } from '@almadar/patterns';
|
|
@@ -9876,16 +9877,26 @@ var init_useUnitSpriteAtlas = __esm({
|
|
|
9876
9877
|
});
|
|
9877
9878
|
|
|
9878
9879
|
// components/game/organisms/utils/isometric.ts
|
|
9879
|
-
function isoToScreen(tileX, tileY, scale, baseOffsetX) {
|
|
9880
|
+
function isoToScreen(tileX, tileY, scale, baseOffsetX, layout = "isometric") {
|
|
9880
9881
|
const scaledTileWidth = TILE_WIDTH * scale;
|
|
9881
9882
|
const scaledFloorHeight = FLOOR_HEIGHT * scale;
|
|
9883
|
+
if (layout === "hex") {
|
|
9884
|
+
const screenX2 = tileX * scaledTileWidth + (tileY & 1) * (scaledTileWidth / 2) + baseOffsetX;
|
|
9885
|
+
const screenY2 = tileY * (scaledFloorHeight * 0.75);
|
|
9886
|
+
return { x: screenX2, y: screenY2 };
|
|
9887
|
+
}
|
|
9882
9888
|
const screenX = (tileX - tileY) * (scaledTileWidth / 2) + baseOffsetX;
|
|
9883
9889
|
const screenY = (tileX + tileY) * (scaledFloorHeight / 2);
|
|
9884
9890
|
return { x: screenX, y: screenY };
|
|
9885
9891
|
}
|
|
9886
|
-
function screenToIso(screenX, screenY, scale, baseOffsetX) {
|
|
9892
|
+
function screenToIso(screenX, screenY, scale, baseOffsetX, layout = "isometric") {
|
|
9887
9893
|
const scaledTileWidth = TILE_WIDTH * scale;
|
|
9888
9894
|
const scaledFloorHeight = FLOOR_HEIGHT * scale;
|
|
9895
|
+
if (layout === "hex") {
|
|
9896
|
+
const row = Math.round(screenY / (scaledFloorHeight * 0.75));
|
|
9897
|
+
const col = Math.round((screenX - (row & 1) * (scaledTileWidth / 2) - baseOffsetX) / scaledTileWidth);
|
|
9898
|
+
return { x: col, y: row };
|
|
9899
|
+
}
|
|
9889
9900
|
const adjustedX = screenX - baseOffsetX;
|
|
9890
9901
|
const tileX = (adjustedX / (scaledTileWidth / 2) + screenY / (scaledFloorHeight / 2)) / 2;
|
|
9891
9902
|
const tileY = (screenY / (scaledFloorHeight / 2) - adjustedX / (scaledTileWidth / 2)) / 2;
|
|
@@ -9935,6 +9946,7 @@ function IsometricCanvas({
|
|
|
9935
9946
|
tileHoverEvent,
|
|
9936
9947
|
tileLeaveEvent,
|
|
9937
9948
|
// Rendering options
|
|
9949
|
+
tileLayout = "isometric",
|
|
9938
9950
|
scale = 0.4,
|
|
9939
9951
|
debug: debug2 = false,
|
|
9940
9952
|
backgroundImage = "",
|
|
@@ -10004,13 +10016,17 @@ function IsometricCanvas({
|
|
|
10004
10016
|
);
|
|
10005
10017
|
const sortedTiles = useMemo(() => {
|
|
10006
10018
|
const tiles = [...tilesProp];
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
|
|
10011
|
-
|
|
10019
|
+
if (tileLayout === "hex") {
|
|
10020
|
+
tiles.sort((a, b) => a.y !== b.y ? a.y - b.y : a.x - b.x);
|
|
10021
|
+
} else {
|
|
10022
|
+
tiles.sort((a, b) => {
|
|
10023
|
+
const depthA = a.x + a.y;
|
|
10024
|
+
const depthB = b.x + b.y;
|
|
10025
|
+
return depthA !== depthB ? depthA - depthB : a.y - b.y;
|
|
10026
|
+
});
|
|
10027
|
+
}
|
|
10012
10028
|
return tiles;
|
|
10013
|
-
}, [tilesProp]);
|
|
10029
|
+
}, [tilesProp, tileLayout]);
|
|
10014
10030
|
const gridWidth = useMemo(() => {
|
|
10015
10031
|
if (sortedTiles.length === 0) return 0;
|
|
10016
10032
|
return Math.max(...sortedTiles.map((t2) => t2.x)) + 1;
|
|
@@ -10124,7 +10140,7 @@ function IsometricCanvas({
|
|
|
10124
10140
|
miniCanvas.width = mW;
|
|
10125
10141
|
miniCanvas.height = mH;
|
|
10126
10142
|
mCtx.clearRect(0, 0, mW, mH);
|
|
10127
|
-
const allScreenPos = sortedTiles.map((t2) => isoToScreen(t2.x, t2.y, scale, baseOffsetX));
|
|
10143
|
+
const allScreenPos = sortedTiles.map((t2) => isoToScreen(t2.x, t2.y, scale, baseOffsetX, tileLayout));
|
|
10128
10144
|
const minX = Math.min(...allScreenPos.map((p2) => p2.x));
|
|
10129
10145
|
const maxX = Math.max(...allScreenPos.map((p2) => p2.x + scaledTileWidth));
|
|
10130
10146
|
const minY = Math.min(...allScreenPos.map((p2) => p2.y));
|
|
@@ -10135,7 +10151,7 @@ function IsometricCanvas({
|
|
|
10135
10151
|
const offsetMx = (mW - worldW * scaleM) / 2;
|
|
10136
10152
|
const offsetMy = (mH - worldH * scaleM) / 2;
|
|
10137
10153
|
for (const tile of sortedTiles) {
|
|
10138
|
-
const pos = isoToScreen(tile.x, tile.y, scale, baseOffsetX);
|
|
10154
|
+
const pos = isoToScreen(tile.x, tile.y, scale, baseOffsetX, tileLayout);
|
|
10139
10155
|
const mx = (pos.x - minX) * scaleM + offsetMx;
|
|
10140
10156
|
const my = (pos.y - minY) * scaleM + offsetMy;
|
|
10141
10157
|
const mTileW = scaledTileWidth * scaleM;
|
|
@@ -10151,7 +10167,7 @@ function IsometricCanvas({
|
|
|
10151
10167
|
}
|
|
10152
10168
|
for (const unit of units) {
|
|
10153
10169
|
if (!unit.position) continue;
|
|
10154
|
-
const pos = isoToScreen(unit.position.x, unit.position.y, scale, baseOffsetX);
|
|
10170
|
+
const pos = isoToScreen(unit.position.x, unit.position.y, scale, baseOffsetX, tileLayout);
|
|
10155
10171
|
const mx = (pos.x + scaledTileWidth / 2 - minX) * scaleM + offsetMx;
|
|
10156
10172
|
const my = (pos.y + scaledTileHeight / 2 - minY) * scaleM + offsetMy;
|
|
10157
10173
|
mCtx.fillStyle = unit.team === "player" ? "#60a5fa" : unit.team === "enemy" ? "#f87171" : "#9ca3af";
|
|
@@ -10167,7 +10183,7 @@ function IsometricCanvas({
|
|
|
10167
10183
|
mCtx.strokeStyle = "rgba(255, 255, 255, 0.8)";
|
|
10168
10184
|
mCtx.lineWidth = 1;
|
|
10169
10185
|
mCtx.strokeRect(vLeft, vTop, vW, vH);
|
|
10170
|
-
}, [showMinimap, sortedTiles, units, scale, baseOffsetX, scaledTileWidth, scaledTileHeight, scaledFloorHeight, viewportSize, cameraRef]);
|
|
10186
|
+
}, [showMinimap, sortedTiles, units, tileLayout, scale, baseOffsetX, scaledTileWidth, scaledTileHeight, scaledFloorHeight, viewportSize, cameraRef]);
|
|
10171
10187
|
const draw = useCallback((animTime) => {
|
|
10172
10188
|
const canvas = canvasRef.current;
|
|
10173
10189
|
if (!canvas) return;
|
|
@@ -10207,7 +10223,7 @@ function IsometricCanvas({
|
|
|
10207
10223
|
const visTop = cam.y - viewportSize.height / cam.zoom;
|
|
10208
10224
|
const visBottom = cam.y + viewportSize.height * 2 / cam.zoom;
|
|
10209
10225
|
for (const tile of sortedTiles) {
|
|
10210
|
-
const pos = isoToScreen(tile.x, tile.y, scale, baseOffsetX);
|
|
10226
|
+
const pos = isoToScreen(tile.x, tile.y, scale, baseOffsetX, tileLayout);
|
|
10211
10227
|
if (pos.x + scaledTileWidth < visLeft || pos.x > visRight || pos.y + scaledTileHeight < visTop || pos.y > visBottom) {
|
|
10212
10228
|
continue;
|
|
10213
10229
|
}
|
|
@@ -10287,12 +10303,13 @@ function IsometricCanvas({
|
|
|
10287
10303
|
}
|
|
10288
10304
|
}
|
|
10289
10305
|
const sortedFeatures = [...features].sort((a, b) => {
|
|
10306
|
+
if (tileLayout === "hex") return a.y !== b.y ? a.y - b.y : a.x - b.x;
|
|
10290
10307
|
const depthA = a.x + a.y;
|
|
10291
10308
|
const depthB = b.x + b.y;
|
|
10292
10309
|
return depthA !== depthB ? depthA - depthB : a.y - b.y;
|
|
10293
10310
|
});
|
|
10294
10311
|
for (const feature of sortedFeatures) {
|
|
10295
|
-
const pos = isoToScreen(feature.x, feature.y, scale, baseOffsetX);
|
|
10312
|
+
const pos = isoToScreen(feature.x, feature.y, scale, baseOffsetX, tileLayout);
|
|
10296
10313
|
if (pos.x + scaledTileWidth < visLeft || pos.x > visRight || pos.y + scaledTileHeight < visTop || pos.y > visBottom) {
|
|
10297
10314
|
continue;
|
|
10298
10315
|
}
|
|
@@ -10327,12 +10344,13 @@ function IsometricCanvas({
|
|
|
10327
10344
|
}
|
|
10328
10345
|
const unitsWithPosition = units.filter((u) => !!u.position);
|
|
10329
10346
|
const sortedUnits = [...unitsWithPosition].sort((a, b) => {
|
|
10347
|
+
if (tileLayout === "hex") return a.position.y !== b.position.y ? a.position.y - b.position.y : a.position.x - b.position.x;
|
|
10330
10348
|
const depthA = a.position.x + a.position.y;
|
|
10331
10349
|
const depthB = b.position.x + b.position.y;
|
|
10332
10350
|
return depthA !== depthB ? depthA - depthB : a.position.y - b.position.y;
|
|
10333
10351
|
});
|
|
10334
10352
|
for (const unit of sortedUnits) {
|
|
10335
|
-
const pos = isoToScreen(unit.position.x, unit.position.y, scale, baseOffsetX);
|
|
10353
|
+
const pos = isoToScreen(unit.position.x, unit.position.y, scale, baseOffsetX, tileLayout);
|
|
10336
10354
|
if (pos.x + scaledTileWidth < visLeft || pos.x > visRight || pos.y + scaledTileHeight < visTop || pos.y > visBottom) {
|
|
10337
10355
|
continue;
|
|
10338
10356
|
}
|
|
@@ -10352,7 +10370,7 @@ function IsometricCanvas({
|
|
|
10352
10370
|
drawH = maxUnitW / ar;
|
|
10353
10371
|
}
|
|
10354
10372
|
if (unit.previousPosition && (unit.previousPosition.x !== unit.position.x || unit.previousPosition.y !== unit.position.y)) {
|
|
10355
|
-
const ghostPos = isoToScreen(unit.previousPosition.x, unit.previousPosition.y, scale, baseOffsetX);
|
|
10373
|
+
const ghostPos = isoToScreen(unit.previousPosition.x, unit.previousPosition.y, scale, baseOffsetX, tileLayout);
|
|
10356
10374
|
const ghostCenterX = ghostPos.x + scaledTileWidth / 2;
|
|
10357
10375
|
const ghostGroundY = ghostPos.y + scaledDiamondTopY + scaledFloorHeight * 0.5;
|
|
10358
10376
|
ctx.save();
|
|
@@ -10481,6 +10499,7 @@ function IsometricCanvas({
|
|
|
10481
10499
|
units,
|
|
10482
10500
|
features,
|
|
10483
10501
|
selectedUnitId,
|
|
10502
|
+
tileLayout,
|
|
10484
10503
|
scale,
|
|
10485
10504
|
debug2,
|
|
10486
10505
|
resolveTerrainSpriteUrl,
|
|
@@ -10509,14 +10528,14 @@ function IsometricCanvas({
|
|
|
10509
10528
|
if (!selectedUnitId) return;
|
|
10510
10529
|
const unit = units.find((u) => u.id === selectedUnitId);
|
|
10511
10530
|
if (!unit?.position) return;
|
|
10512
|
-
const pos = isoToScreen(unit.position.x, unit.position.y, scale, baseOffsetX);
|
|
10531
|
+
const pos = isoToScreen(unit.position.x, unit.position.y, scale, baseOffsetX, tileLayout);
|
|
10513
10532
|
const centerX = pos.x + scaledTileWidth / 2;
|
|
10514
10533
|
const centerY = pos.y + scaledDiamondTopY + scaledFloorHeight / 2;
|
|
10515
10534
|
targetCameraRef.current = {
|
|
10516
10535
|
x: centerX - viewportSize.width / 2,
|
|
10517
10536
|
y: centerY - viewportSize.height / 2
|
|
10518
10537
|
};
|
|
10519
|
-
}, [selectedUnitId, units, scale, baseOffsetX, scaledTileWidth, scaledDiamondTopY, scaledFloorHeight, viewportSize, targetCameraRef]);
|
|
10538
|
+
}, [selectedUnitId, units, tileLayout, scale, baseOffsetX, scaledTileWidth, scaledDiamondTopY, scaledFloorHeight, viewportSize, targetCameraRef]);
|
|
10520
10539
|
useEffect(() => {
|
|
10521
10540
|
const hasAnimations = units.length > 0 || validMoves.length > 0 || attackTargets.length > 0 || selectedUnitId != null || targetCameraRef.current != null || hasActiveEffects2 || pendingCount > 0 || atlasPending > 0;
|
|
10522
10541
|
draw(animTimeRef.current);
|
|
@@ -10549,13 +10568,13 @@ function IsometricCanvas({
|
|
|
10549
10568
|
const world = screenToWorld(e.clientX, e.clientY, canvasRef.current, viewportSize);
|
|
10550
10569
|
const adjustedX = world.x - scaledTileWidth / 2;
|
|
10551
10570
|
const adjustedY = world.y - scaledDiamondTopY - scaledFloorHeight / 2;
|
|
10552
|
-
const isoPos = screenToIso(adjustedX, adjustedY, scale, baseOffsetX);
|
|
10571
|
+
const isoPos = screenToIso(adjustedX, adjustedY, scale, baseOffsetX, tileLayout);
|
|
10553
10572
|
const tileExists = tilesProp.some((t2) => t2.x === isoPos.x && t2.y === isoPos.y);
|
|
10554
10573
|
if (tileExists) {
|
|
10555
10574
|
if (tileHoverEvent) eventBus.emit(`UI:${tileHoverEvent}`, { x: isoPos.x, y: isoPos.y });
|
|
10556
10575
|
onTileHover?.(isoPos.x, isoPos.y);
|
|
10557
10576
|
}
|
|
10558
|
-
}, [onTileHover, screenToWorld, viewportSize, scaledTileWidth, scaledDiamondTopY, scaledFloorHeight, scale, baseOffsetX, tilesProp, tileHoverEvent, eventBus]);
|
|
10577
|
+
}, [onTileHover, screenToWorld, viewportSize, scaledTileWidth, scaledDiamondTopY, scaledFloorHeight, tileLayout, scale, baseOffsetX, tilesProp, tileHoverEvent, eventBus]);
|
|
10559
10578
|
const handleCanvasPointerUp = useCallback((e) => {
|
|
10560
10579
|
singlePointerActiveRef.current = false;
|
|
10561
10580
|
if (enableCamera) handlePointerUp();
|
|
@@ -10564,7 +10583,7 @@ function IsometricCanvas({
|
|
|
10564
10583
|
const world = screenToWorld(e.clientX, e.clientY, canvasRef.current, viewportSize);
|
|
10565
10584
|
const adjustedX = world.x - scaledTileWidth / 2;
|
|
10566
10585
|
const adjustedY = world.y - scaledDiamondTopY - scaledFloorHeight / 2;
|
|
10567
|
-
const isoPos = screenToIso(adjustedX, adjustedY, scale, baseOffsetX);
|
|
10586
|
+
const isoPos = screenToIso(adjustedX, adjustedY, scale, baseOffsetX, tileLayout);
|
|
10568
10587
|
const clickedUnit = units.find((u) => u.position?.x === isoPos.x && u.position?.y === isoPos.y);
|
|
10569
10588
|
if (clickedUnit && (onUnitClick || unitClickEvent)) {
|
|
10570
10589
|
if (unitClickEvent) eventBus.emit(`UI:${unitClickEvent}`, { unitId: clickedUnit.id });
|
|
@@ -10576,7 +10595,7 @@ function IsometricCanvas({
|
|
|
10576
10595
|
onTileClick?.(isoPos.x, isoPos.y);
|
|
10577
10596
|
}
|
|
10578
10597
|
}
|
|
10579
|
-
}, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, scaledDiamondTopY, scaledFloorHeight, scale, baseOffsetX, units, tilesProp, onUnitClick, onTileClick, unitClickEvent, tileClickEvent, eventBus]);
|
|
10598
|
+
}, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, scaledDiamondTopY, scaledFloorHeight, tileLayout, scale, baseOffsetX, units, tilesProp, onUnitClick, onTileClick, unitClickEvent, tileClickEvent, eventBus]);
|
|
10580
10599
|
const handleCanvasPointerLeave = useCallback(() => {
|
|
10581
10600
|
handleMouseLeave();
|
|
10582
10601
|
if (tileLeaveEvent) eventBus.emit(`UI:${tileLeaveEvent}`, {});
|
|
@@ -43968,7 +43987,8 @@ function ModelLoader({
|
|
|
43968
43987
|
const { model: loadedModel, isLoading, error } = useGLTFModel(url, resourceBasePath);
|
|
43969
43988
|
const model = useMemo(() => {
|
|
43970
43989
|
if (!loadedModel) return null;
|
|
43971
|
-
const cloned =
|
|
43990
|
+
const cloned = clone(loadedModel);
|
|
43991
|
+
cloned.updateMatrixWorld(true);
|
|
43972
43992
|
cloned.traverse((child) => {
|
|
43973
43993
|
if (child instanceof THREE3.Mesh) {
|
|
43974
43994
|
child.castShadow = castShadow;
|
|
@@ -43983,7 +44003,8 @@ function ModelLoader({
|
|
|
43983
44003
|
const size = new THREE3.Vector3();
|
|
43984
44004
|
box.getSize(size);
|
|
43985
44005
|
const maxDim = Math.max(size.x, size.y, size.z);
|
|
43986
|
-
|
|
44006
|
+
if (!Number.isFinite(maxDim) || maxDim < 0.05) return 1;
|
|
44007
|
+
return 1 / maxDim;
|
|
43987
44008
|
}, [model]);
|
|
43988
44009
|
const scaleArray = useMemo(() => {
|
|
43989
44010
|
const base = typeof scale === "number" ? [scale, scale, scale] : scale;
|
|
@@ -45265,6 +45286,48 @@ var init_HeroOrganism = __esm({
|
|
|
45265
45286
|
_HeroClickInterceptor.displayName = "_HeroClickInterceptor";
|
|
45266
45287
|
}
|
|
45267
45288
|
});
|
|
45289
|
+
function HexStrategyBoard({
|
|
45290
|
+
tiles,
|
|
45291
|
+
units,
|
|
45292
|
+
features,
|
|
45293
|
+
assetManifest,
|
|
45294
|
+
assetBaseUrl,
|
|
45295
|
+
scale = 0.45,
|
|
45296
|
+
showMinimap = true,
|
|
45297
|
+
enableCamera = true,
|
|
45298
|
+
tileClickEvent,
|
|
45299
|
+
unitClickEvent,
|
|
45300
|
+
isLoading,
|
|
45301
|
+
error,
|
|
45302
|
+
className
|
|
45303
|
+
}) {
|
|
45304
|
+
return /* @__PURE__ */ jsx("div", { className: cn("hex-strategy-board relative w-full h-full", className), children: /* @__PURE__ */ jsx(
|
|
45305
|
+
IsometricCanvas_default,
|
|
45306
|
+
{
|
|
45307
|
+
tileLayout: "hex",
|
|
45308
|
+
tiles,
|
|
45309
|
+
units,
|
|
45310
|
+
features,
|
|
45311
|
+
assetManifest,
|
|
45312
|
+
assetBaseUrl,
|
|
45313
|
+
scale,
|
|
45314
|
+
showMinimap,
|
|
45315
|
+
enableCamera,
|
|
45316
|
+
tileClickEvent,
|
|
45317
|
+
unitClickEvent,
|
|
45318
|
+
isLoading,
|
|
45319
|
+
error
|
|
45320
|
+
}
|
|
45321
|
+
) });
|
|
45322
|
+
}
|
|
45323
|
+
var init_HexStrategyBoard = __esm({
|
|
45324
|
+
"components/game/organisms/HexStrategyBoard.tsx"() {
|
|
45325
|
+
"use client";
|
|
45326
|
+
init_cn();
|
|
45327
|
+
init_IsometricCanvas();
|
|
45328
|
+
HexStrategyBoard.displayName = "HexStrategyBoard";
|
|
45329
|
+
}
|
|
45330
|
+
});
|
|
45268
45331
|
var LandingPageTemplate;
|
|
45269
45332
|
var init_LandingPageTemplate = __esm({
|
|
45270
45333
|
"components/marketing/templates/LandingPageTemplate.tsx"() {
|
|
@@ -53573,6 +53636,7 @@ var init_component_registry_generated = __esm({
|
|
|
53573
53636
|
init_HealthPanel();
|
|
53574
53637
|
init_HeroOrganism();
|
|
53575
53638
|
init_HeroSection();
|
|
53639
|
+
init_HexStrategyBoard();
|
|
53576
53640
|
init_Icon();
|
|
53577
53641
|
init_InfiniteScrollSentinel();
|
|
53578
53642
|
init_Input();
|
|
@@ -53909,6 +53973,7 @@ var init_component_registry_generated = __esm({
|
|
|
53909
53973
|
"HealthPanel": HealthPanel,
|
|
53910
53974
|
"HeroOrganism": HeroOrganism,
|
|
53911
53975
|
"HeroSection": HeroSection,
|
|
53976
|
+
"HexStrategyBoard": HexStrategyBoard,
|
|
53912
53977
|
"Icon": Icon,
|
|
53913
53978
|
"InfiniteScrollSentinel": InfiniteScrollSentinel,
|
|
53914
53979
|
"Input": Input,
|
|
@@ -55554,6 +55619,7 @@ init_CityBuilderBoard();
|
|
|
55554
55619
|
init_GameBoard3D();
|
|
55555
55620
|
init_VisualNovelBoard();
|
|
55556
55621
|
init_CardBattlerBoard();
|
|
55622
|
+
init_HexStrategyBoard();
|
|
55557
55623
|
init_TraitStateViewer();
|
|
55558
55624
|
init_TraitSlot();
|
|
55559
55625
|
|
|
@@ -56141,4 +56207,4 @@ init_AboutPageTemplate();
|
|
|
56141
56207
|
// components/index.ts
|
|
56142
56208
|
init_cn();
|
|
56143
56209
|
|
|
56144
|
-
export { ALL_PRESETS, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, ActionPalette, ActionTile, ActivationBlock, Alert, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AuthLayout, Avatar, Badge, BattleBoard, BattleTemplate, BehaviorView, BloomQuizBlock, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, BuilderBoard, Button, ButtonGroup, CTABanner, CalendarGrid, CanvasEffect, Card, CardBattlerBoard, CardBattlerTemplate, CardBody, CardContent, CardFooter, CardGrid, CardHand, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, CastleBoard, CastleTemplate, Center, Chart, ChartLegend, Checkbox, ChoiceButton, CityBuilderBoard, CityBuilderTemplate, ClassifierBoard, Coachmark, CodeBlock, CodeRunnerPanel, CollapsibleSection, CombatLog, ComboCounter, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, ConnectionBlock, Container, ContentRenderer, ContentSection, ControlButton, CounterTemplate, CraftingRecipe, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DIAMOND_TOP_Y, DPad, DamageNumber, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DebuggerBoard, DetailPanel, Dialog, DialogueBox, DialogueBubble, Divider, DocBreadcrumb, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EnemyPlate, EntityDisplayEvents, ErrorBoundary, ErrorState, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioContext, GameAudioProvider, GameAudioToggle, GameBoard3D, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GameShell, GameTemplate, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, HealthBar, HealthPanel, HeroOrganism, HeroSection, IDENTITY_BOOK_FIELDS, Icon, IconPicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, JazariStateMachine, JsonTreeEditor, Label, LandingPageTemplate, LawReferenceTooltip, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MatrixQuestion, MediaGallery, Menu, Meter, MiniMap, Modal, ModalSlot, ModuleCard, Navigation, NegotiatorBoard, NodeSlotEditor, NotifyListener, NumberStepper, ObjectRulePanel, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PhysicsManager, PlatformerBoard, PlatformerCanvas, PlatformerTemplate, Popover, PositionedCanvas, PowerupSlots, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuestTracker, QuizBlock, Radio, RangeSlider, ReflectionBlock, RelationSelect, RepeatableFormSection, ReplyTree, ResourceBar, ResourceCounter, RichBlockEditor, RoguelikeBoard, RoguelikeTemplate, RuleEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Section, SectionHeader, SegmentRenderer, Select, SequenceBar, SequencerBoard, ServiceCatalog, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateArchitectBoard, StateIndicator, StateJsonView, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StatusEffect, StepFlow, StepFlowOrganism, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TeamCard, TeamOrganism, TerrainPalette, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TopDownShooterBoard, TopDownShooterTemplate, TowerDefenseBoard, TowerDefenseTemplate, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UncontrolledBattleBoard, UnitCommandBar, UploadDropZone, VStack, VariablePanel, VersionDiff, ViolationAlert, VisualNovelBoard, VisualNovelTemplate, VoteStack, WaypointMarker, WizardContainer, WizardNavigation, WizardProgress, WorldMapBoard, WorldMapTemplate, XPBar, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, cn, combatAnimations, combatClasses, combatEffects, createInitialGameState, createUnitAnimationState, drawSprite, generateCombatMessage, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, mapBookData, parseLessonSegments, parseMarkdownWithCodeBlocks, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, springOscillator, tickAnimationState, toCodeLanguage, transitionAnimation, useAnchorRect, useBattleState, useCamera, useGameAudio, useGameAudioContext, useImageCache, usePhysics2D, useSpriteAnimations };
|
|
56210
|
+
export { ALL_PRESETS, AR_BOOK_FIELDS, AboutPageTemplate, Accordion, ActionButton, ActionButtons, Card2 as ActionCard, ActionPalette, ActionTile, ActivationBlock, Alert, AnimatedCounter, AnimatedGraphic, AnimatedReveal, ArticleSection, Aside, AssetPicker, AuthLayout, Avatar, Badge, BattleBoard, BattleTemplate, BehaviorView, BloomQuizBlock, BookChapterView, BookCoverPage, BookNavBar, BookTableOfContents, BookViewer, Box, BranchingLogicBuilder, Breadcrumb, BuilderBoard, Button, ButtonGroup, CTABanner, CalendarGrid, CanvasEffect, Card, CardBattlerBoard, CardBattlerTemplate, CardBody, CardContent, CardFooter, CardGrid, CardHand, CardHeader, CardTitle, Carousel, CaseStudyCard, CaseStudyOrganism, CastleBoard, CastleTemplate, Center, Chart, ChartLegend, Checkbox, ChoiceButton, CityBuilderBoard, CityBuilderTemplate, ClassifierBoard, Coachmark, CodeBlock, CodeRunnerPanel, CollapsibleSection, CombatLog, ComboCounter, CommunityLinks, ConditionalWrapper, ConfettiEffect, ConfirmDialog, ConnectionBlock, Container, ContentRenderer, ContentSection, ControlButton, CounterTemplate, CraftingRecipe, DEFAULT_LIKERT_OPTIONS, DEFAULT_MATRIX_COLUMNS, DIAMOND_TOP_Y, DPad, DamageNumber, DashboardGrid, DashboardLayout, DataGrid, DataList, DataTable, DateRangePicker, DateRangeSelector, DayCell, DebuggerBoard, DetailPanel, Dialog, DialogueBox, DialogueBubble, Divider, DocBreadcrumb, DocPagination, DocSearch, DocSidebar, DocTOC, DocumentViewer, StateMachineView as DomStateMachineVisualizer, Drawer, DrawerSlot, EdgeDecoration, EditorCheckbox, EditorSelect, EditorSlider, EditorTextInput, EditorToolbar, EmptyState, EnemyPlate, EntityDisplayEvents, ErrorBoundary, ErrorState, EventHandlerBoard, EventLog, FEATURE_COLORS, FEATURE_TYPES, FLOOR_HEIGHT, FeatureCard, FeatureDetailPageTemplate, FeatureGrid, FeatureGridOrganism, FileTree, FilterGroup, FilterPill, Flex, FlipCard, FlipContainer, FloatingActionButton, Form, FormActions, FormField, FormLayout, FormSection, FormSectionHeader, GameAudioContext, GameAudioProvider, GameAudioToggle, GameBoard3D, GameCanvas2D, GameHud, GameMenu, GameOverScreen, GameShell, GameTemplate, GenericAppTemplate, GeometricPattern, GradientDivider, GraphCanvas, GraphView, Grid, GridPicker, HStack, Header, HealthBar, HealthPanel, HeroOrganism, HeroSection, HexStrategyBoard, IDENTITY_BOOK_FIELDS, Icon, IconPicker, InfiniteScrollSentinel, Input, InputGroup, InstallBox, InventoryGrid, InventoryPanel, IsometricCanvas, ItemSlot, JazariStateMachine, JsonTreeEditor, Label, LandingPageTemplate, LawReferenceTooltip, Lightbox, LikertScale, LineChart2 as LineChart, List3 as List, LoadingState, MapView, MarkdownContent, MarketingFooter, MarketingStatCard, MasterDetail, MasterDetailLayout, MatrixQuestion, MediaGallery, Menu, Meter, MiniMap, Modal, ModalSlot, ModuleCard, Navigation, NegotiatorBoard, NodeSlotEditor, NotifyListener, NumberStepper, ObjectRulePanel, OnboardingSpotlight, OptionConstraintGroup, StateMachineView as OrbitalStateMachineView, OrbitalVisualization, Overlay, PageHeader, Pagination, PatternTile, PhysicsManager, PlatformerBoard, PlatformerCanvas, PlatformerTemplate, Popover, PositionedCanvas, PowerupSlots, PricingCard, PricingGrid, PricingOrganism, PricingPageTemplate, ProgressBar, ProgressDots, PropertyInspector, PullQuote, PullToRefresh, QrScanner, QuestTracker, QuizBlock, Radio, RangeSlider, ReflectionBlock, RelationSelect, RepeatableFormSection, ReplyTree, ResourceBar, ResourceCounter, RichBlockEditor, RoguelikeBoard, RoguelikeTemplate, RuleEditor, RuntimeDebugger, SHEET_COLUMNS, SPRITE_SHEET_LAYOUT, ScaledDiagram, ScoreBoard, ScoreDisplay, SearchInput, Section, SectionHeader, SegmentRenderer, Select, SequenceBar, SequencerBoard, ServiceCatalog, ShowcaseCard, ShowcaseOrganism, SidePanel, Sidebar, SignaturePad, SimpleGrid, SimulationCanvas, SimulationControls, SimulationGraph, SimulatorBoard, Skeleton, SlotContentRenderer, SocialProof, SortableList, Spacer, Sparkline, Spinner, Split, SplitPane, SplitSection, Sprite, Stack, StarRating, StatBadge, StatCard, StatDisplay, StateArchitectBoard, StateIndicator, StateJsonView, StateMachineView, StateNode2 as StateNode, StatsGrid, StatsOrganism, StatusBar, StatusDot, StatusEffect, StepFlow, StepFlowOrganism, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, SwipeableRow, Switch, TERRAIN_COLORS, TILE_HEIGHT, TILE_WIDTH, TabbedContainer, TableView, Tabs, TagCloud, TagInput, TeamCard, TeamOrganism, TerrainPalette, TextHighlight, Textarea, ThemeSelector, ThemeToggle, TimeSlotCell, Timeline, TimerDisplay, Toast, ToastSlot, Tooltip, TopDownShooterBoard, TopDownShooterTemplate, TowerDefenseBoard, TowerDefenseTemplate, TraitFrame, TraitSlot, TraitStateViewer, TransitionArrow, TrendIndicator, TurnIndicator, TurnPanel, TypewriterText, Typography, UISlotComponent, UISlotRenderer, UncontrolledBattleBoard, UnitCommandBar, UploadDropZone, VStack, VariablePanel, VersionDiff, ViolationAlert, VisualNovelBoard, VisualNovelTemplate, VoteStack, WaypointMarker, WizardContainer, WizardNavigation, WizardProgress, WorldMapBoard, WorldMapTemplate, XPBar, applyTemporaryEffect, calculateAttackTargets, calculateDamage, calculateValidMoves, cn, combatAnimations, combatClasses, combatEffects, createInitialGameState, createUnitAnimationState, drawSprite, generateCombatMessage, getCurrentFrame, getTileDimensions, inferDirection, isoToScreen, mapBookData, parseLessonSegments, parseMarkdownWithCodeBlocks, pendulum, projectileMotion, resolveFieldMap, resolveFrame, resolveSheetDirection, screenToIso, springOscillator, tickAnimationState, toCodeLanguage, transitionAnimation, useAnchorRect, useBattleState, useCamera, useGameAudio, useGameAudioContext, useImageCache, usePhysics2D, useSpriteAnimations };
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* - Never listens to events
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import type { EntityWith } from '@almadar/core';
|
|
13
|
+
import type { EntityWith, AssetUrl } from '@almadar/core';
|
|
14
14
|
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
15
15
|
/** A hero CTA: a plain `{ label, href }` object (FieldValue-compatible — a `type`,
|
|
16
16
|
* not `interface`, so it's assignable to the entity-row `FieldValue` index sig). */
|
|
@@ -29,7 +29,7 @@ export interface HeroRow {
|
|
|
29
29
|
secondaryAction?: HeroAction;
|
|
30
30
|
installCommand?: string;
|
|
31
31
|
image?: {
|
|
32
|
-
src?:
|
|
32
|
+
src?: AssetUrl;
|
|
33
33
|
alt?: string;
|
|
34
34
|
};
|
|
35
35
|
imagePosition?: 'below' | 'right' | 'background';
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* - Never listens to events
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import type { EntityWith } from '@almadar/core';
|
|
13
|
+
import type { EntityWith, AssetUrl } from '@almadar/core';
|
|
14
14
|
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
15
15
|
/** The per-showcase entity fields this organism reads (FieldValue-compatible; `image`
|
|
16
16
|
* is a plain `{ src, alt }` object, `accentColor` a string). */
|
|
@@ -18,7 +18,7 @@ export interface ShowcaseRow {
|
|
|
18
18
|
title: string;
|
|
19
19
|
description?: string;
|
|
20
20
|
image?: {
|
|
21
|
-
src?:
|
|
21
|
+
src?: AssetUrl;
|
|
22
22
|
alt?: string;
|
|
23
23
|
};
|
|
24
24
|
href?: string;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* - No events (display-only)
|
|
10
10
|
*/
|
|
11
11
|
import React from 'react';
|
|
12
|
-
import type { EntityWith } from '@almadar/core';
|
|
12
|
+
import type { EntityWith, AssetUrl } from '@almadar/core';
|
|
13
13
|
import type { DisplayStateProps } from '../../core/organisms/types';
|
|
14
14
|
/** The per-member entity fields this organism reads (FieldValue-compatible;
|
|
15
15
|
* `avatar` is a string url/initials). */
|
|
@@ -18,7 +18,7 @@ export interface TeamMemberRow {
|
|
|
18
18
|
nameAr?: string;
|
|
19
19
|
role?: string;
|
|
20
20
|
bio?: string;
|
|
21
|
-
avatar?:
|
|
21
|
+
avatar?: AssetUrl;
|
|
22
22
|
}
|
|
23
23
|
export interface TeamOrganismProps extends DisplayStateProps {
|
|
24
24
|
entity?: EntityWith<TeamMemberRow> | readonly EntityWith<TeamMemberRow>[];
|