@almadar/core 10.12.0 → 10.14.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.
@@ -1001,29 +1001,387 @@ declare const GAME_TYPES: readonly ["platformer", "roguelike", "top-down", "puzz
1001
1001
  type GameType = (typeof GAME_TYPES)[number];
1002
1002
  declare const GameTypeSchema: z.ZodEnum<["platformer", "roguelike", "top-down", "puzzle", "racing", "card", "board", "shooter", "rpg"]>;
1003
1003
  /**
1004
- * Animation definition for sprites
1004
+ * Animation names matching a sprite sheet's row layout. Canonical home for
1005
+ * this vocabulary — `@almadar/ui`'s `spriteAnimationTypes.ts` re-exports it
1006
+ * rather than redeclaring, so board `.lolo` config and the render library
1007
+ * agree on one enum.
1008
+ */
1009
+ declare const ANIMATION_NAMES: readonly ["idle", "walk", "attack", "hit", "death"];
1010
+ type AnimationName = (typeof ANIMATION_NAMES)[number];
1011
+ declare const AnimationNameSchema: z.ZodEnum<["idle", "walk", "attack", "hit", "death"]>;
1012
+ /** Sheet file directions (physical PNG files a sprite sheet ships as). */
1013
+ declare const SPRITE_DIRECTIONS: readonly ["se", "sw"];
1014
+ type SpriteDirection = (typeof SPRITE_DIRECTIONS)[number];
1015
+ declare const SpriteDirectionSchema: z.ZodEnum<["se", "sw"]>;
1016
+ /**
1017
+ * Definition for a single named animation within a sprite sheet: which row
1018
+ * it occupies, how many frames it has, and its playback rate. This is the
1019
+ * shape actually consumed by `@almadar/ui`'s sprite-sheet renderer
1020
+ * (`spriteAnimation.ts`'s `frameRect`/`getCurrentFrameFromDef`) — moved here
1021
+ * verbatim rather than reconciled with a differently-shaped guess, since
1022
+ * `@almadar/ui`'s version is the one with real production consumers.
1005
1023
  */
1006
1024
  interface AnimationDef {
1007
- /** Frame indices or file names */
1008
- frames: number[] | string[];
1009
- /** Frames per second */
1010
- fps: number;
1011
- /** Whether animation loops */
1025
+ /** Row index in the sprite sheet (0-based; each animation occupies one row). */
1026
+ row: number;
1027
+ /** Number of frames in this animation. */
1028
+ frames: number;
1029
+ /** Frames per second. */
1030
+ frameRate: number;
1031
+ /** Whether the animation loops. */
1012
1032
  loop: boolean;
1013
1033
  }
1014
1034
  declare const AnimationDefSchema: z.ZodObject<{
1015
- frames: z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodString, "many">]>;
1016
- fps: z.ZodNumber;
1035
+ row: z.ZodNumber;
1036
+ frames: z.ZodNumber;
1037
+ frameRate: z.ZodNumber;
1017
1038
  loop: z.ZodBoolean;
1018
1039
  }, "strip", z.ZodTypeAny, {
1019
- frames: string[] | number[];
1020
- fps: number;
1040
+ row: number;
1041
+ frames: number;
1042
+ frameRate: number;
1021
1043
  loop: boolean;
1022
1044
  }, {
1023
- frames: string[] | number[];
1024
- fps: number;
1045
+ row: number;
1046
+ frames: number;
1047
+ frameRate: number;
1025
1048
  loop: boolean;
1026
1049
  }>;
1050
+ /**
1051
+ * Parsed sprite-sheet atlas JSON — the contract a `spriteSheet`-role `Asset.url`
1052
+ * resolves to when fetched (see `Asset.url` usage in `@almadar/ui`'s
1053
+ * `useUnitSpriteAtlas`). A unit's `sprite?: Asset` stays the static single-pose
1054
+ * image; `spriteSheet?: Asset` is a SEPARATE reference whose URL points at a
1055
+ * `SpriteSheetAtlas`-shaped JSON manifest (e.g. `.../guardian-sprite-sheet.json`),
1056
+ * not a PNG. Frame-cutting geometry lives here, not inlined onto `Asset` — an
1057
+ * `Asset` traveling through `render-ui` every tick stays small.
1058
+ */
1059
+ interface SpriteSheetAtlas {
1060
+ /** Unit archetype key. */
1061
+ unit?: string;
1062
+ /** Visual type key. */
1063
+ type?: string;
1064
+ /** Width of a single frame in pixels. */
1065
+ frameWidth: number;
1066
+ /** Height of a single frame in pixels. */
1067
+ frameHeight: number;
1068
+ /** Number of columns (frames per row). */
1069
+ columns: number;
1070
+ /** Number of rows (animations). */
1071
+ rows: number;
1072
+ /** Directions present as physical PNG files. */
1073
+ directions: SpriteDirection[];
1074
+ /** Relative PNG sheet paths per direction. */
1075
+ sheets: Partial<Record<SpriteDirection, string>>;
1076
+ /** Animation row layout keyed by animation name. */
1077
+ animations: Partial<Record<AnimationName, AnimationDef>>;
1078
+ }
1079
+ declare const SpriteSheetAtlasSchema: z.ZodObject<{
1080
+ unit: z.ZodOptional<z.ZodString>;
1081
+ type: z.ZodOptional<z.ZodString>;
1082
+ frameWidth: z.ZodNumber;
1083
+ frameHeight: z.ZodNumber;
1084
+ columns: z.ZodNumber;
1085
+ rows: z.ZodNumber;
1086
+ directions: z.ZodArray<z.ZodEnum<["se", "sw"]>, "many">;
1087
+ sheets: z.ZodRecord<z.ZodEnum<["se", "sw"]>, z.ZodString>;
1088
+ animations: z.ZodRecord<z.ZodEnum<["idle", "walk", "attack", "hit", "death"]>, z.ZodObject<{
1089
+ row: z.ZodNumber;
1090
+ frames: z.ZodNumber;
1091
+ frameRate: z.ZodNumber;
1092
+ loop: z.ZodBoolean;
1093
+ }, "strip", z.ZodTypeAny, {
1094
+ row: number;
1095
+ frames: number;
1096
+ frameRate: number;
1097
+ loop: boolean;
1098
+ }, {
1099
+ row: number;
1100
+ frames: number;
1101
+ frameRate: number;
1102
+ loop: boolean;
1103
+ }>>;
1104
+ }, "strip", z.ZodTypeAny, {
1105
+ frameWidth: number;
1106
+ frameHeight: number;
1107
+ columns: number;
1108
+ rows: number;
1109
+ directions: ("se" | "sw")[];
1110
+ sheets: Partial<Record<"se" | "sw", string>>;
1111
+ animations: Partial<Record<"idle" | "walk" | "attack" | "hit" | "death", {
1112
+ row: number;
1113
+ frames: number;
1114
+ frameRate: number;
1115
+ loop: boolean;
1116
+ }>>;
1117
+ type?: string | undefined;
1118
+ unit?: string | undefined;
1119
+ }, {
1120
+ frameWidth: number;
1121
+ frameHeight: number;
1122
+ columns: number;
1123
+ rows: number;
1124
+ directions: ("se" | "sw")[];
1125
+ sheets: Partial<Record<"se" | "sw", string>>;
1126
+ animations: Partial<Record<"idle" | "walk" | "attack" | "hit" | "death", {
1127
+ row: number;
1128
+ frames: number;
1129
+ frameRate: number;
1130
+ loop: boolean;
1131
+ }>>;
1132
+ type?: string | undefined;
1133
+ unit?: string | undefined;
1134
+ }>;
1135
+ /**
1136
+ * One named sub-rectangle inside a packed sheet. Mirrors the ShoeBox /
1137
+ * TexturePacker `<SubTexture>` element every Kenney `Spritesheet/*.xml` ships
1138
+ * (`x`/`y`/`width`/`height` = the rect in the sheet PNG; `frameX`/`frameY`/
1139
+ * `frameWidth`/`frameHeight` = the trim/pad offsets for sprites packed with
1140
+ * transparent edges removed — optional, present only on trimmed atlases).
1141
+ */
1142
+ interface SubTexture {
1143
+ x: number;
1144
+ y: number;
1145
+ width: number;
1146
+ height: number;
1147
+ frameX?: number;
1148
+ frameY?: number;
1149
+ frameWidth?: number;
1150
+ frameHeight?: number;
1151
+ }
1152
+ declare const SubTextureSchema: z.ZodObject<{
1153
+ x: z.ZodNumber;
1154
+ y: z.ZodNumber;
1155
+ width: z.ZodNumber;
1156
+ height: z.ZodNumber;
1157
+ frameX: z.ZodOptional<z.ZodNumber>;
1158
+ frameY: z.ZodOptional<z.ZodNumber>;
1159
+ frameWidth: z.ZodOptional<z.ZodNumber>;
1160
+ frameHeight: z.ZodOptional<z.ZodNumber>;
1161
+ }, "strip", z.ZodTypeAny, {
1162
+ x: number;
1163
+ y: number;
1164
+ width: number;
1165
+ height: number;
1166
+ frameWidth?: number | undefined;
1167
+ frameHeight?: number | undefined;
1168
+ frameX?: number | undefined;
1169
+ frameY?: number | undefined;
1170
+ }, {
1171
+ x: number;
1172
+ y: number;
1173
+ width: number;
1174
+ height: number;
1175
+ frameWidth?: number | undefined;
1176
+ frameHeight?: number | undefined;
1177
+ frameX?: number | undefined;
1178
+ frameY?: number | undefined;
1179
+ }>;
1180
+ /**
1181
+ * A packed sheet + its named sub-rectangles — the canonical parse target for a
1182
+ * Kenney `Spritesheet/*.xml` atlas. A STATIC tile/prop/UI Asset references one
1183
+ * of these: `{ url: <sheet.png>, atlas: <this.json>, sprite: "grass.png" }` →
1184
+ * the renderer fetches the sheet + atlas ONCE and blits the named sub-rect,
1185
+ * instead of loading N individual PNGs. (Animated actors use `SpriteSheetAtlas`
1186
+ * instead; a uniform-grid tile page uses `Tilesheet`.)
1187
+ */
1188
+ interface TextureAtlas {
1189
+ /** Relative path to the sheet PNG the sub-rects index into (the atlas's own `imagePath`). */
1190
+ imagePath: string;
1191
+ /** Sub-rectangles keyed by their atlas name (e.g. `"grass.png"`). */
1192
+ subTextures: Record<string, SubTexture>;
1193
+ }
1194
+ declare const TextureAtlasSchema: z.ZodObject<{
1195
+ imagePath: z.ZodString;
1196
+ subTextures: z.ZodRecord<z.ZodString, z.ZodObject<{
1197
+ x: z.ZodNumber;
1198
+ y: z.ZodNumber;
1199
+ width: z.ZodNumber;
1200
+ height: z.ZodNumber;
1201
+ frameX: z.ZodOptional<z.ZodNumber>;
1202
+ frameY: z.ZodOptional<z.ZodNumber>;
1203
+ frameWidth: z.ZodOptional<z.ZodNumber>;
1204
+ frameHeight: z.ZodOptional<z.ZodNumber>;
1205
+ }, "strip", z.ZodTypeAny, {
1206
+ x: number;
1207
+ y: number;
1208
+ width: number;
1209
+ height: number;
1210
+ frameWidth?: number | undefined;
1211
+ frameHeight?: number | undefined;
1212
+ frameX?: number | undefined;
1213
+ frameY?: number | undefined;
1214
+ }, {
1215
+ x: number;
1216
+ y: number;
1217
+ width: number;
1218
+ height: number;
1219
+ frameWidth?: number | undefined;
1220
+ frameHeight?: number | undefined;
1221
+ frameX?: number | undefined;
1222
+ frameY?: number | undefined;
1223
+ }>>;
1224
+ }, "strip", z.ZodTypeAny, {
1225
+ imagePath: string;
1226
+ subTextures: Record<string, {
1227
+ x: number;
1228
+ y: number;
1229
+ width: number;
1230
+ height: number;
1231
+ frameWidth?: number | undefined;
1232
+ frameHeight?: number | undefined;
1233
+ frameX?: number | undefined;
1234
+ frameY?: number | undefined;
1235
+ }>;
1236
+ }, {
1237
+ imagePath: string;
1238
+ subTextures: Record<string, {
1239
+ x: number;
1240
+ y: number;
1241
+ width: number;
1242
+ height: number;
1243
+ frameWidth?: number | undefined;
1244
+ frameHeight?: number | undefined;
1245
+ frameX?: number | undefined;
1246
+ frameY?: number | undefined;
1247
+ }>;
1248
+ }>;
1249
+ /**
1250
+ * A uniform-grid tile page — the shape a Kenney `Tilesheet/` sheet takes (e.g.
1251
+ * Pirate Pack: "each tile is 64×64, no margin"). Tiles are cut by `(col,row)`
1252
+ * index rather than by named rect. `names` is present only when a sibling
1253
+ * `.xml`/`.txt` supplies an index→name list; otherwise a tile is addressed by
1254
+ * its `"col,row"` (or flat index) via `Asset.sprite`.
1255
+ */
1256
+ interface Tilesheet {
1257
+ /** Relative path to the tile sheet PNG. */
1258
+ imagePath: string;
1259
+ /** Width of one tile cell in pixels. */
1260
+ tileWidth: number;
1261
+ /** Height of one tile cell in pixels. */
1262
+ tileHeight: number;
1263
+ /** Number of columns in the grid. */
1264
+ columns: number;
1265
+ /** Number of rows in the grid. */
1266
+ rows: number;
1267
+ /** Outer margin before the first tile, in pixels (default 0). */
1268
+ margin?: number;
1269
+ /** Gap between adjacent tiles, in pixels (default 0). */
1270
+ spacing?: number;
1271
+ /** Optional index→name labels when a descriptor supplies them. */
1272
+ names?: string[];
1273
+ }
1274
+ declare const TilesheetSchema: z.ZodObject<{
1275
+ imagePath: z.ZodString;
1276
+ tileWidth: z.ZodNumber;
1277
+ tileHeight: z.ZodNumber;
1278
+ columns: z.ZodNumber;
1279
+ rows: z.ZodNumber;
1280
+ margin: z.ZodOptional<z.ZodNumber>;
1281
+ spacing: z.ZodOptional<z.ZodNumber>;
1282
+ names: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1283
+ }, "strip", z.ZodTypeAny, {
1284
+ columns: number;
1285
+ rows: number;
1286
+ imagePath: string;
1287
+ tileWidth: number;
1288
+ tileHeight: number;
1289
+ margin?: number | undefined;
1290
+ spacing?: number | undefined;
1291
+ names?: string[] | undefined;
1292
+ }, {
1293
+ columns: number;
1294
+ rows: number;
1295
+ imagePath: string;
1296
+ tileWidth: number;
1297
+ tileHeight: number;
1298
+ margin?: number | undefined;
1299
+ spacing?: number | undefined;
1300
+ names?: string[] | undefined;
1301
+ }>;
1302
+ /**
1303
+ * The three roles a source pack plays, decided by the systematic per-folder
1304
+ * scan (see `docs/Almadar_Std_Assets.md`):
1305
+ * - `board-tileset` — a genre/canvas-matched terrain/level set, often ~1:1 with a board.
1306
+ * - `character-kit` — modular layered character parts assembled into one figure.
1307
+ * - `shared-primitive` — backgrounds / effects / UI / particles fanned out to many boards.
1308
+ */
1309
+ declare const PACK_CLASSES: readonly ["board-tileset", "character-kit", "shared-primitive"];
1310
+ type PackClass = (typeof PACK_CLASSES)[number];
1311
+ declare const PackClassSchema: z.ZodEnum<["board-tileset", "character-kit", "shared-primitive"]>;
1312
+ /**
1313
+ * A modular character-kit layer: one selectable part (`head`/`hair`/`shirt`/…)
1314
+ * resolved to a sub-texture ref. Recorded now so the analysis can RECOGNIZE
1315
+ * modular packs; the layered compositor that stacks these is a later follow-up.
1316
+ */
1317
+ interface CharacterKitLayer {
1318
+ /** Which body slot this layer fills. */
1319
+ slot: 'body' | 'head' | 'face' | 'hair' | 'facialHair' | 'shirt' | 'pants' | 'shoes' | 'accessory';
1320
+ /** Sheet PNG the part lives on. */
1321
+ url: AssetUrl;
1322
+ /** Atlas JSON next to the sheet. */
1323
+ atlas?: AssetUrl;
1324
+ /** Sub-texture name within the atlas. */
1325
+ sprite?: string;
1326
+ }
1327
+ declare const CharacterKitLayerSchema: z.ZodObject<{
1328
+ slot: z.ZodEnum<["body", "head", "face", "hair", "facialHair", "shirt", "pants", "shoes", "accessory"]>;
1329
+ url: z.ZodString;
1330
+ atlas: z.ZodOptional<z.ZodString>;
1331
+ sprite: z.ZodOptional<z.ZodString>;
1332
+ }, "strip", z.ZodTypeAny, {
1333
+ slot: "body" | "head" | "face" | "hair" | "facialHair" | "shirt" | "pants" | "shoes" | "accessory";
1334
+ url: string;
1335
+ atlas?: string | undefined;
1336
+ sprite?: string | undefined;
1337
+ }, {
1338
+ slot: "body" | "head" | "face" | "hair" | "facialHair" | "shirt" | "pants" | "shoes" | "accessory";
1339
+ url: string;
1340
+ atlas?: string | undefined;
1341
+ sprite?: string | undefined;
1342
+ }>;
1343
+ /** A recognized modular-character pack: an ordered, back-to-front layer stack. */
1344
+ interface CharacterKit {
1345
+ /** Source pack slug the kit came from. */
1346
+ pack: string;
1347
+ /** Layers in back-to-front draw order. */
1348
+ layers: CharacterKitLayer[];
1349
+ }
1350
+ declare const CharacterKitSchema: z.ZodObject<{
1351
+ pack: z.ZodString;
1352
+ layers: z.ZodArray<z.ZodObject<{
1353
+ slot: z.ZodEnum<["body", "head", "face", "hair", "facialHair", "shirt", "pants", "shoes", "accessory"]>;
1354
+ url: z.ZodString;
1355
+ atlas: z.ZodOptional<z.ZodString>;
1356
+ sprite: z.ZodOptional<z.ZodString>;
1357
+ }, "strip", z.ZodTypeAny, {
1358
+ slot: "body" | "head" | "face" | "hair" | "facialHair" | "shirt" | "pants" | "shoes" | "accessory";
1359
+ url: string;
1360
+ atlas?: string | undefined;
1361
+ sprite?: string | undefined;
1362
+ }, {
1363
+ slot: "body" | "head" | "face" | "hair" | "facialHair" | "shirt" | "pants" | "shoes" | "accessory";
1364
+ url: string;
1365
+ atlas?: string | undefined;
1366
+ sprite?: string | undefined;
1367
+ }>, "many">;
1368
+ }, "strip", z.ZodTypeAny, {
1369
+ pack: string;
1370
+ layers: {
1371
+ slot: "body" | "head" | "face" | "hair" | "facialHair" | "shirt" | "pants" | "shoes" | "accessory";
1372
+ url: string;
1373
+ atlas?: string | undefined;
1374
+ sprite?: string | undefined;
1375
+ }[];
1376
+ }, {
1377
+ pack: string;
1378
+ layers: {
1379
+ slot: "body" | "head" | "face" | "hair" | "facialHair" | "shirt" | "pants" | "shoes" | "accessory";
1380
+ url: string;
1381
+ atlas?: string | undefined;
1382
+ sprite?: string | undefined;
1383
+ }[];
1384
+ }>;
1027
1385
  /**
1028
1386
  * Semantic reference to an asset (not a hardcoded path).
1029
1387
  * Resolved to actual paths at compile time via asset maps.
@@ -1078,8 +1436,21 @@ declare const SemanticAssetRefSchema: z.ZodObject<{
1078
1436
  * pixel-dimension or filename heuristics needed to know sheet-vs-frame / 2d-vs-3d).
1079
1437
  */
1080
1438
  interface Asset extends SemanticAssetRef {
1081
- /** The resolved asset URL. */
1439
+ /** The resolved asset URL. When `atlas`/`sprite` are set this is the SHEET png; otherwise a standalone image. */
1082
1440
  url: AssetUrl;
1441
+ /**
1442
+ * Optional atlas JSON (a `TextureAtlas` or `Tilesheet`) that slices `url`.
1443
+ * When present with `sprite`, the renderer fetches sheet + atlas once and
1444
+ * blits one sub-rect instead of loading a standalone PNG. Absent → `url` is
1445
+ * a plain whole-image asset (the existing, non-atlas path).
1446
+ */
1447
+ atlas?: AssetUrl;
1448
+ /**
1449
+ * The sub-texture selector within `atlas`: a `SubTexture` name for a
1450
+ * `TextureAtlas` (e.g. `"grass.png"`), or a `"col,row"`/flat index for a
1451
+ * `Tilesheet`. Only meaningful alongside `atlas`.
1452
+ */
1453
+ sprite?: string;
1083
1454
  /** Optional display name (inspector picker). */
1084
1455
  name?: string;
1085
1456
  /** Optional thumbnail URL (inspector picker grid). */
@@ -1095,6 +1466,8 @@ declare const AssetSchema: z.ZodObject<{
1095
1466
  aspect: z.ZodOptional<z.ZodEnum<["1:1", "16:9", "5:7", "8:1"]>>;
1096
1467
  } & {
1097
1468
  url: z.ZodString;
1469
+ atlas: z.ZodOptional<z.ZodString>;
1470
+ sprite: z.ZodOptional<z.ZodString>;
1098
1471
  name: z.ZodOptional<z.ZodString>;
1099
1472
  thumbnailUrl: z.ZodOptional<z.ZodString>;
1100
1473
  }, "strip", z.ZodTypeAny, {
@@ -1103,6 +1476,8 @@ declare const AssetSchema: z.ZodObject<{
1103
1476
  category: string;
1104
1477
  name?: string | undefined;
1105
1478
  animations?: string[] | undefined;
1479
+ atlas?: string | undefined;
1480
+ sprite?: string | undefined;
1106
1481
  style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
1107
1482
  variant?: string | undefined;
1108
1483
  dimension?: "2d" | "3d" | undefined;
@@ -1114,6 +1489,8 @@ declare const AssetSchema: z.ZodObject<{
1114
1489
  category: string;
1115
1490
  name?: string | undefined;
1116
1491
  animations?: string[] | undefined;
1492
+ atlas?: string | undefined;
1493
+ sprite?: string | undefined;
1117
1494
  style?: "pixel" | "vector" | "hd" | "1-bit" | "isometric" | undefined;
1118
1495
  variant?: string | undefined;
1119
1496
  dimension?: "2d" | "3d" | undefined;
@@ -1144,24 +1521,28 @@ declare const ResolvedAssetSchema: z.ZodObject<{
1144
1521
  tileSize: z.ZodOptional<z.ZodNumber>;
1145
1522
  files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1146
1523
  animations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1147
- frames: z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodString, "many">]>;
1148
- fps: z.ZodNumber;
1524
+ row: z.ZodNumber;
1525
+ frames: z.ZodNumber;
1526
+ frameRate: z.ZodNumber;
1149
1527
  loop: z.ZodBoolean;
1150
1528
  }, "strip", z.ZodTypeAny, {
1151
- frames: string[] | number[];
1152
- fps: number;
1529
+ row: number;
1530
+ frames: number;
1531
+ frameRate: number;
1153
1532
  loop: boolean;
1154
1533
  }, {
1155
- frames: string[] | number[];
1156
- fps: number;
1534
+ row: number;
1535
+ frames: number;
1536
+ frameRate: number;
1157
1537
  loop: boolean;
1158
1538
  }>>>;
1159
1539
  }, "strip", z.ZodTypeAny, {
1160
1540
  path: string;
1161
1541
  basePath: string;
1162
1542
  animations?: Record<string, {
1163
- frames: string[] | number[];
1164
- fps: number;
1543
+ row: number;
1544
+ frames: number;
1545
+ frameRate: number;
1165
1546
  loop: boolean;
1166
1547
  }> | undefined;
1167
1548
  tiles?: number[] | undefined;
@@ -1171,8 +1552,9 @@ declare const ResolvedAssetSchema: z.ZodObject<{
1171
1552
  path: string;
1172
1553
  basePath: string;
1173
1554
  animations?: Record<string, {
1174
- frames: string[] | number[];
1175
- fps: number;
1555
+ row: number;
1556
+ frames: number;
1557
+ frameRate: number;
1176
1558
  loop: boolean;
1177
1559
  }> | undefined;
1178
1560
  tiles?: number[] | undefined;
@@ -1200,23 +1582,27 @@ declare const AssetMappingSchema: z.ZodObject<{
1200
1582
  tileSize: z.ZodOptional<z.ZodNumber>;
1201
1583
  files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1202
1584
  animations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1203
- frames: z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodString, "many">]>;
1204
- fps: z.ZodNumber;
1585
+ row: z.ZodNumber;
1586
+ frames: z.ZodNumber;
1587
+ frameRate: z.ZodNumber;
1205
1588
  loop: z.ZodBoolean;
1206
1589
  }, "strip", z.ZodTypeAny, {
1207
- frames: string[] | number[];
1208
- fps: number;
1590
+ row: number;
1591
+ frames: number;
1592
+ frameRate: number;
1209
1593
  loop: boolean;
1210
1594
  }, {
1211
- frames: string[] | number[];
1212
- fps: number;
1595
+ row: number;
1596
+ frames: number;
1597
+ frameRate: number;
1213
1598
  loop: boolean;
1214
1599
  }>>>;
1215
1600
  }, "strip", z.ZodTypeAny, {
1216
1601
  path: string;
1217
1602
  animations?: Record<string, {
1218
- frames: string[] | number[];
1219
- fps: number;
1603
+ row: number;
1604
+ frames: number;
1605
+ frameRate: number;
1220
1606
  loop: boolean;
1221
1607
  }> | undefined;
1222
1608
  tiles?: number[] | undefined;
@@ -1225,8 +1611,9 @@ declare const AssetMappingSchema: z.ZodObject<{
1225
1611
  }, {
1226
1612
  path: string;
1227
1613
  animations?: Record<string, {
1228
- frames: string[] | number[];
1229
- fps: number;
1614
+ row: number;
1615
+ frames: number;
1616
+ frameRate: number;
1230
1617
  loop: boolean;
1231
1618
  }> | undefined;
1232
1619
  tiles?: number[] | undefined;
@@ -1257,23 +1644,27 @@ declare const AssetMapSchema: z.ZodObject<{
1257
1644
  tileSize: z.ZodOptional<z.ZodNumber>;
1258
1645
  files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1259
1646
  animations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1260
- frames: z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodArray<z.ZodString, "many">]>;
1261
- fps: z.ZodNumber;
1647
+ row: z.ZodNumber;
1648
+ frames: z.ZodNumber;
1649
+ frameRate: z.ZodNumber;
1262
1650
  loop: z.ZodBoolean;
1263
1651
  }, "strip", z.ZodTypeAny, {
1264
- frames: string[] | number[];
1265
- fps: number;
1652
+ row: number;
1653
+ frames: number;
1654
+ frameRate: number;
1266
1655
  loop: boolean;
1267
1656
  }, {
1268
- frames: string[] | number[];
1269
- fps: number;
1657
+ row: number;
1658
+ frames: number;
1659
+ frameRate: number;
1270
1660
  loop: boolean;
1271
1661
  }>>>;
1272
1662
  }, "strip", z.ZodTypeAny, {
1273
1663
  path: string;
1274
1664
  animations?: Record<string, {
1275
- frames: string[] | number[];
1276
- fps: number;
1665
+ row: number;
1666
+ frames: number;
1667
+ frameRate: number;
1277
1668
  loop: boolean;
1278
1669
  }> | undefined;
1279
1670
  tiles?: number[] | undefined;
@@ -1282,8 +1673,9 @@ declare const AssetMapSchema: z.ZodObject<{
1282
1673
  }, {
1283
1674
  path: string;
1284
1675
  animations?: Record<string, {
1285
- frames: string[] | number[];
1286
- fps: number;
1676
+ row: number;
1677
+ frames: number;
1678
+ frameRate: number;
1287
1679
  loop: boolean;
1288
1680
  }> | undefined;
1289
1681
  tiles?: number[] | undefined;
@@ -1297,8 +1689,9 @@ declare const AssetMapSchema: z.ZodObject<{
1297
1689
  mappings: Record<string, {
1298
1690
  path: string;
1299
1691
  animations?: Record<string, {
1300
- frames: string[] | number[];
1301
- fps: number;
1692
+ row: number;
1693
+ frames: number;
1694
+ frameRate: number;
1302
1695
  loop: boolean;
1303
1696
  }> | undefined;
1304
1697
  tiles?: number[] | undefined;
@@ -1312,8 +1705,9 @@ declare const AssetMapSchema: z.ZodObject<{
1312
1705
  mappings: Record<string, {
1313
1706
  path: string;
1314
1707
  animations?: Record<string, {
1315
- frames: string[] | number[];
1316
- fps: number;
1708
+ row: number;
1709
+ frames: number;
1710
+ frameRate: number;
1317
1711
  loop: boolean;
1318
1712
  }> | undefined;
1319
1713
  tiles?: number[] | undefined;
@@ -1414,6 +1808,7 @@ type AssetMappingInput = z.input<typeof AssetMappingSchema>;
1414
1808
  type AssetMapInput = z.input<typeof AssetMapSchema>;
1415
1809
  type AnimationDefInput = z.input<typeof AnimationDefSchema>;
1416
1810
  type AssetCatalogEntryInput = z.input<typeof AssetCatalogEntrySchema>;
1811
+ type SpriteSheetAtlasInput = z.input<typeof SpriteSheetAtlasSchema>;
1417
1812
  /**
1418
1813
  * Creates a semantic asset key from role and category.
1419
1814
  *
@@ -6435,4 +6830,4 @@ declare const OrbitalTraitRefSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
6435
6830
  } | undefined;
6436
6831
  }>]>;
6437
6832
 
6438
- export { ConfigFieldDeclarationSchema as $, ASSET_ASPECTS as A, type AssetCatalogEntry as B, type CallSiteConfig as C, type AssetCatalogEntryInput as D, type Effect as E, AssetCatalogEntrySchema as F, AssetCatalogSchema as G, type AssetDimension as H, AssetDimensionSchema as I, type AssetMap as J, type AssetMapInput as K, AssetMapSchema as L, type AssetMapping as M, type AssetMappingInput as N, AssetMappingSchema as O, AssetSchema as P, type AssetUrl as Q, type RenderBinding as R, type ServiceRef as S, type TraitConfig as T, type UISlot as U, type AtomicEffect as V, type CallServiceConfig as W, type CallServiceEffect as X, type CallSiteConfigEntry as Y, type CheckpointLoadEffect as Z, type CheckpointSaveEffect as _, type Trait as a, PayloadFieldSchema as a$, type DeclaredTraitConfig as a0, DeclaredTraitConfigSchema as a1, type DerefEffect as a2, type DespawnEffect as a3, type DoEffect as a4, ENTITY_ROLES as a5, type EffectInput as a6, EffectSchema as a7, type EmitConfig as a8, type EmitEffect as a9, type FieldType as aA, FieldTypeSchema as aB, type FieldValue as aC, type ForwardConfig as aD, type ForwardEffect as aE, GAME_TYPES as aF, type GameType as aG, GameTypeSchema as aH, type Guard as aI, type GuardInput as aJ, GuardSchema as aK, type ListenSource as aL, ListenSourceSchema as aM, type LogEffect as aN, type McpServiceDef as aO, McpServiceDefSchema as aP, type NavigateEffect as aQ, type NnConfig as aR, type NnLayer as aS, type NotifyEffect as aT, type OrbitalEntity as aU, type OrbitalEntityInput as aV, OrbitalEntitySchema as aW, type OrbitalTraitRef as aX, OrbitalTraitRefSchema as aY, type OsEffect as aZ, type PayloadField as a_, type EntityData as aa, type EntityFieldContract as ab, EntityFieldContractSchema as ac, type EntityFieldInput as ad, EntityFieldSchema as ae, EntityPersistenceSchema as af, type EntityRole as ag, EntityRoleSchema as ah, EntitySchema as ai, type EntityWith as aj, type EnumEntityField as ak, type EvaluateConfig as al, type EvaluateEffect as am, type Event as an, type EventInput as ao, EventPayloadFieldSchema as ap, EventSchema as aq, type EventScope as ar, EventScopeSchema as as, type FetchEffect as at, type FetchOptions as au, type FetchResult as av, type Field as aw, type FieldFormat as ax, FieldFormatSchema as ay, FieldSchema as az, type RenderUIEffect as b, TraitSchema as b$, type PersistData as b0, type PersistEffect as b1, type PersistEmitConfig as b2, type PresentationType as b3, type RefEffect as b4, RelationConfigSchema as b5, type RelationEntityField as b6, type RenderItemLambda as b7, type RenderUIConfig as b8, type RenderUINode as b9, SocketEventsSchema as bA, type SocketServiceDef as bB, SocketServiceDefSchema as bC, type SpawnEffect as bD, type StateInput as bE, type StateMachine as bF, type StateMachineInput as bG, StateMachineSchema as bH, StateSchema as bI, type SwapEffect as bJ, type TrainConfig as bK, type TrainEffect as bL, type TraitCategory as bM, TraitCategorySchema as bN, TraitConfigSchema as bO, type TraitConfigValue as bP, TraitConfigValueSchema as bQ, type TraitDataEntity as bR, TraitDataEntitySchema as bS, type TraitEntityField as bT, TraitEntityFieldSchema as bU, TraitEventContractSchema as bV, TraitEventListenerSchema as bW, type TraitInput as bX, TraitRefSchema as bY, type TraitReferenceInput as bZ, TraitReferenceSchema as b_, type RequiredField as ba, RequiredFieldSchema as bb, type ResolvedAsset as bc, type ResolvedAssetInput as bd, ResolvedAssetSchema as be, type ResolvedPatternProps as bf, type RestAuthConfig as bg, RestAuthConfigSchema as bh, type RestServiceDef as bi, RestServiceDefSchema as bj, SERVICE_TYPES as bk, type ScalarEntityField as bl, type SemanticAssetRef as bm, type SemanticAssetRefInput as bn, SemanticAssetRefSchema as bo, ServiceDefinitionSchema as bp, type ServiceParams as bq, type ServiceParamsValue as br, type ServiceRefObject as bs, ServiceRefObjectSchema as bt, ServiceRefSchema as bu, ServiceRefStringSchema as bv, type ServiceType as bw, ServiceTypeSchema as bx, type SetEffect as by, type SocketEvents as bz, type TraitEventContract as c, type TraitTick as c0, TraitTickSchema as c1, type TraitUIBinding as c2, type Transition as c3, type TransitionInput as c4, TransitionSchema as c5, type TypedEffect as c6, UISlotSchema as c7, UI_SLOTS as c8, VISUAL_STYLES as c9, isServiceReference as cA, isServiceReferenceObject as cB, isSingletonEntity as cC, isSocketService as cD, navigate as cE, normalizeTraitRef as cF, notify as cG, parseAssetKey as cH, parseServiceRef as cI, persist as cJ, persistenceModeAllowsOverrides as cK, ref as cL, renderUI as cM, set as cN, spawn as cO, swap as cP, validateAssetAnimations as cQ, watch as cR, type TraitScope as cS, type VisualStyle as ca, VisualStyleSchema as cb, type WatchEffect as cc, type WatchOptions as cd, atomic as ce, callService as cf, createAssetKey as cg, deref as ch, deriveCollection as ci, despawn as cj, doEffects as ck, emit as cl, findService as cm, getDefaultAnimationsForRole as cn, getServiceNames as co, getTraitConfig as cp, getTraitName as cq, hasService as cr, isCallSiteConfigDeclaration as cs, isCircuitEvent as ct, isEffect as cu, isInlineTrait as cv, isMcpService as cw, isRestService as cx, isRuntimeEntity as cy, isSExprEffect as cz, type Entity as d, type TraitEventListener as e, type EntityField as f, type EntityPersistence as g, type EntityRow as h, type TraitRef as i, type TraitReference as j, type RelationConfig as k, type TraitConfigObject as l, type EventPayloadField as m, type ConfigFieldDeclaration as n, type ServiceDefinition as o, type State as p, ASSET_DIMENSIONS as q, type AgentEffect as r, type AnimationDef as s, type AnimationDefInput as t, AnimationDefSchema as u, type ArrayEntityField as v, type Asset as w, type AssetAspect as x, AssetAspectSchema as y, type AssetCatalog as z };
6833
+ export { type CallSiteConfigEntry as $, ANIMATION_NAMES as A, type AssetAspect as B, type CallSiteConfig as C, AssetAspectSchema as D, type Effect as E, type AssetCatalog as F, type AssetCatalogEntry as G, type AssetCatalogEntryInput as H, AssetCatalogEntrySchema as I, AssetCatalogSchema as J, type AssetDimension as K, AssetDimensionSchema as L, type AssetMap as M, type AssetMapInput as N, AssetMapSchema as O, type AssetMapping as P, type AssetMappingInput as Q, type RenderBinding as R, type ServiceRef as S, type TraitConfig as T, type UISlot as U, AssetMappingSchema as V, AssetSchema as W, type AssetUrl as X, type AtomicEffect as Y, type CallServiceConfig as Z, type CallServiceEffect as _, type Trait as a, type OrbitalEntity as a$, type CharacterKit as a0, type CharacterKitLayer as a1, CharacterKitLayerSchema as a2, CharacterKitSchema as a3, type CheckpointLoadEffect as a4, type CheckpointSaveEffect as a5, ConfigFieldDeclarationSchema as a6, type DeclaredTraitConfig as a7, DeclaredTraitConfigSchema as a8, type DerefEffect as a9, type FetchEffect as aA, type FetchOptions as aB, type FetchResult as aC, type Field as aD, type FieldFormat as aE, FieldFormatSchema as aF, FieldSchema as aG, type FieldType as aH, FieldTypeSchema as aI, type FieldValue as aJ, type ForwardConfig as aK, type ForwardEffect as aL, GAME_TYPES as aM, type GameType as aN, GameTypeSchema as aO, type Guard as aP, type GuardInput as aQ, GuardSchema as aR, type ListenSource as aS, ListenSourceSchema as aT, type LogEffect as aU, type McpServiceDef as aV, McpServiceDefSchema as aW, type NavigateEffect as aX, type NnConfig as aY, type NnLayer as aZ, type NotifyEffect as a_, type DespawnEffect as aa, type DoEffect as ab, ENTITY_ROLES as ac, type EffectInput as ad, EffectSchema as ae, type EmitConfig as af, type EmitEffect as ag, type EntityData as ah, type EntityFieldContract as ai, EntityFieldContractSchema as aj, type EntityFieldInput as ak, EntityFieldSchema as al, EntityPersistenceSchema as am, type EntityRole as an, EntityRoleSchema as ao, EntitySchema as ap, type EntityWith as aq, type EnumEntityField as ar, type EvaluateConfig as as, type EvaluateEffect as at, type Event as au, type EventInput as av, EventPayloadFieldSchema as aw, EventSchema as ax, type EventScope as ay, EventScopeSchema as az, type RenderUIEffect as b, type SwapEffect as b$, type OrbitalEntityInput as b0, OrbitalEntitySchema as b1, type OrbitalTraitRef as b2, OrbitalTraitRefSchema as b3, type OsEffect as b4, PACK_CLASSES as b5, type PackClass as b6, PackClassSchema as b7, type PayloadField as b8, PayloadFieldSchema as b9, ServiceDefinitionSchema as bA, type ServiceParams as bB, type ServiceParamsValue as bC, type ServiceRefObject as bD, ServiceRefObjectSchema as bE, ServiceRefSchema as bF, ServiceRefStringSchema as bG, type ServiceType as bH, ServiceTypeSchema as bI, type SetEffect as bJ, type SocketEvents as bK, SocketEventsSchema as bL, type SocketServiceDef as bM, SocketServiceDefSchema as bN, type SpawnEffect as bO, type SpriteDirection as bP, SpriteDirectionSchema as bQ, type SpriteSheetAtlas as bR, type SpriteSheetAtlasInput as bS, SpriteSheetAtlasSchema as bT, type StateInput as bU, type StateMachine as bV, type StateMachineInput as bW, StateMachineSchema as bX, StateSchema as bY, type SubTexture as bZ, SubTextureSchema as b_, type PersistData as ba, type PersistEffect as bb, type PersistEmitConfig as bc, type PresentationType as bd, type RefEffect as be, RelationConfigSchema as bf, type RelationEntityField as bg, type RenderItemLambda as bh, type RenderUIConfig as bi, type RenderUINode as bj, type RequiredField as bk, RequiredFieldSchema as bl, type ResolvedAsset as bm, type ResolvedAssetInput as bn, ResolvedAssetSchema as bo, type ResolvedPatternProps as bp, type RestAuthConfig as bq, RestAuthConfigSchema as br, type RestServiceDef as bs, RestServiceDefSchema as bt, SERVICE_TYPES as bu, SPRITE_DIRECTIONS as bv, type ScalarEntityField as bw, type SemanticAssetRef as bx, type SemanticAssetRefInput as by, SemanticAssetRefSchema as bz, type TraitEventContract as c, normalizeTraitRef as c$, type TextureAtlas as c0, TextureAtlasSchema as c1, type Tilesheet as c2, TilesheetSchema as c3, type TrainConfig as c4, type TrainEffect as c5, type TraitCategory as c6, TraitCategorySchema as c7, TraitConfigSchema as c8, type TraitConfigValue as c9, atomic as cA, callService as cB, createAssetKey as cC, deref as cD, deriveCollection as cE, despawn as cF, doEffects as cG, emit as cH, findService as cI, getDefaultAnimationsForRole as cJ, getServiceNames as cK, getTraitConfig as cL, getTraitName as cM, hasService as cN, isCallSiteConfigDeclaration as cO, isCircuitEvent as cP, isEffect as cQ, isInlineTrait as cR, isMcpService as cS, isRestService as cT, isRuntimeEntity as cU, isSExprEffect as cV, isServiceReference as cW, isServiceReferenceObject as cX, isSingletonEntity as cY, isSocketService as cZ, navigate as c_, TraitConfigValueSchema as ca, type TraitDataEntity as cb, TraitDataEntitySchema as cc, type TraitEntityField as cd, TraitEntityFieldSchema as ce, TraitEventContractSchema as cf, TraitEventListenerSchema as cg, type TraitInput as ch, TraitRefSchema as ci, type TraitReferenceInput as cj, TraitReferenceSchema as ck, TraitSchema as cl, type TraitTick as cm, TraitTickSchema as cn, type TraitUIBinding as co, type Transition as cp, type TransitionInput as cq, TransitionSchema as cr, type TypedEffect as cs, UISlotSchema as ct, UI_SLOTS as cu, VISUAL_STYLES as cv, type VisualStyle as cw, VisualStyleSchema as cx, type WatchEffect as cy, type WatchOptions as cz, type Entity as d, notify as d0, parseAssetKey as d1, parseServiceRef as d2, persist as d3, persistenceModeAllowsOverrides as d4, ref as d5, renderUI as d6, set as d7, spawn as d8, swap as d9, validateAssetAnimations as da, watch as db, type TraitScope as dc, type TraitEventListener as e, type EntityField as f, type EntityPersistence as g, type EntityRow as h, type TraitRef as i, type TraitReference as j, type RelationConfig as k, type TraitConfigObject as l, type EventPayloadField as m, type ConfigFieldDeclaration as n, type ServiceDefinition as o, type State as p, ASSET_ASPECTS as q, ASSET_DIMENSIONS as r, type AgentEffect as s, type AnimationDef as t, type AnimationDefInput as u, AnimationDefSchema as v, type AnimationName as w, AnimationNameSchema as x, type ArrayEntityField as y, type Asset as z };