@gaialabs/core 0.2.6 → 0.2.8

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/index.d.cts CHANGED
@@ -906,143 +906,451 @@ declare class DbGroup {
906
906
  constructor(data: Partial<DbGroup>);
907
907
  }
908
908
  //#endregion
909
- //#region src/database/modules.d.ts
910
- interface DbGameRomModule {
911
- mnemonics: Record<number, string>;
912
- overrides: Record<number, Record<string, number>>;
913
- rewrites: Record<string, number>;
914
- blocks: Record<string, Record<string, Partial<DbBlock>>>;
915
- files: Record<string, Record<string, Record<string, Partial<DbFile>>>>;
916
- config: DbConfig;
917
- labels: Record<number, string>;
918
- structs: Record<string, DbStruct>;
919
- copdef: Record<string, Partial<CopDef>>;
920
- strings: Record<string, Partial<DbStringType>>;
921
- transforms: Record<string, Partial<DbTransform>[]>;
922
- addrModes: Record<string, Partial<DbAddressingMode>>;
923
- headers: Partial<DbHeader>[];
924
- groups: Record<string, Partial<DbGroup>>;
925
- fileTypes: Record<string, Partial<DbFileType>>;
926
- }
927
- interface DbBaseRomModule extends DbGameRomModule {
928
- baseRomFiles: ChunkFile[];
909
+ //#region src/supabase/types.d.ts
910
+ /**
911
+ * TypeScript interfaces for Supabase API responses
912
+ * These types represent the structured data returned from ROM database queries
913
+ */
914
+ interface PlatformData {
915
+ id: string;
916
+ name: string;
917
+ meta: any | null;
918
+ createdAt: string;
919
+ updatedAt: string;
929
920
  }
930
- //#endregion
931
- //#region src/database/header.d.ts
932
- declare class DbHeader {
933
- bank: number;
934
- address: number;
935
- condition?: string;
936
- parts: DbHeaderPart[];
937
- constructor(data: Partial<DbHeader>);
921
+ interface BranchBaseData {
922
+ id: string;
923
+ name: string | null;
924
+ version: number | null;
925
+ isActive?: boolean | null;
926
+ notes?: string[] | null;
927
+ createdAt: string;
928
+ updatedAt: string;
938
929
  }
939
- declare class DbHeaderPart {
930
+ interface FileBaseData {
931
+ id: string;
940
932
  name: string;
941
- size: number;
942
933
  type: string;
943
- value?: any;
944
- constructor(data: Partial<DbHeaderPart>);
934
+ version: number | null;
935
+ crc: number | null;
936
+ meta: any | null;
937
+ isText: boolean;
938
+ text: string | null;
939
+ data: Uint8Array | null;
940
+ createdAt: string;
941
+ updatedAt: string;
942
+ }
943
+ interface FileBaseRaw extends Omit<FileBaseData, 'data'> {
944
+ data: string | null;
945
945
  }
946
- //#endregion
947
- //#region src/database/root.d.ts
948
946
  /**
949
- * Main database root class
950
- * Converted from GaiaLib/Database/DbRoot.cs
947
+ * Platform branch information containing instruction set and addressing modes
951
948
  */
952
- interface DbRoot {
953
- copDef: Record<number, CopDef>;
954
- copLookup: Record<string, CopDef>;
955
- mnemonics: Record<number, string>;
956
- structs: Record<string, DbStruct>;
957
- stringTypes: Record<string, DbStringType>;
958
- stringDelimiters: string[];
959
- stringDelimiterLookup: Record<string, DbStringType>;
960
- headers: DbHeader[];
961
- files: DbFile[];
962
- config: DbConfig;
963
- blocks: DbBlock[];
964
- overrides: Record<number, Record<string, any>>;
965
- labels: Record<number, string>;
966
- rewrites: Record<number, number>;
967
- entryPoints: DbEntryPoint[];
968
- opCodes: Record<number, OpCode>;
969
- opLookup: Record<string, OpCode[]>;
970
- addrLookup: Record<string, DbAddressingMode>;
971
- compression?: ICompressionProvider;
972
- baseRomFiles?: ChunkFile[];
973
- projectFiles?: ChunkFile[];
974
- groups: Record<string, DbGroup>;
975
- scenes: Record<number, DbScene>;
976
- fileTypes: Record<string, DbFileType>;
977
- fileExtLookup: Record<string, DbFileType>;
949
+ interface PlatformBranchData extends BranchBaseData {
950
+ platformId: string;
951
+ addressingModes: any | null;
952
+ headers: any | null;
953
+ vectors: any | null;
954
+ types: any | null;
955
+ platform: PlatformData;
978
956
  }
979
957
  /**
980
- * Database root utilities
958
+ * Game ROM branch information with platform reference
981
959
  */
982
- declare class DbRootUtils {
983
- /**
984
- * JSON serialization options
985
- */
986
- static fromGameModule(module: DbGameRomModule): DbRoot;
987
- static applyFolder(root: DbRoot, folderPath: string, sourceFiles?: ChunkFile[]): Promise<ChunkFile[]>;
988
- static extractAllContent(root: DbRoot, romPath: string, outPath: string): Promise<void>;
989
- static rebuildAllContent(root: DbRoot, inPath: string[], outPath: string): Promise<ChunkFile[]>;
960
+ interface GameRomBranchData extends BranchBaseData {
961
+ gameRomId: string;
962
+ platformBranchId: string;
963
+ coplib: any | null;
964
+ config: any | null;
965
+ files: any | null;
966
+ blocks: any | null;
967
+ rewrites: any | null;
968
+ transforms: any | null;
969
+ overrides: any | null;
970
+ labels: any | null;
971
+ mnemonics: any | null;
972
+ fileTypes: any | null;
973
+ groups: any | null;
974
+ strings: any | null;
975
+ structs: any | null;
976
+ gameRom: GameRomData;
977
+ platformBranch: PlatformBranchData;
978
+ }
979
+ interface GameRomArtifactData extends FileBaseData {
980
+ gameRomId: string;
981
+ }
982
+ interface GameRomArtifactRaw extends FileBaseRaw {
983
+ gameRomId: string;
984
+ }
985
+ interface GameRomBranchArtifactRaw {
986
+ id: string;
987
+ branchId: string;
988
+ artifactId: string;
989
+ artifact: GameRomArtifactRaw;
990
990
  }
991
- //#endregion
992
- //#region src/database/labels.d.ts
993
991
  /**
994
- * Database label definition
995
- * Converted from GaiaLib/Database/DbLabel.cs
992
+ * Base ROM information
996
993
  */
997
- interface DbLabel {
998
- location: number;
999
- label: string;
994
+ interface BaseRomData {
995
+ id: string;
996
+ name: string;
997
+ gameId: string;
998
+ gameRomId: string;
999
+ createdAt: string;
1000
+ updatedAt: string;
1001
+ }
1002
+ interface GameData {
1003
+ id: string;
1004
+ name: string;
1005
+ createdAt: string;
1006
+ updatedAt: string;
1007
+ }
1008
+ interface DeveloperData {
1009
+ id: string;
1010
+ name: string;
1011
+ meta: any | null;
1012
+ createdAt: string;
1013
+ updatedAt: string;
1014
+ }
1015
+ interface GameDeveloperData {
1016
+ id: string;
1017
+ gameId: string;
1018
+ developerId: string;
1019
+ createdAt: string;
1020
+ updatedAt: string;
1021
+ game: GameData;
1022
+ developer: DeveloperData;
1023
+ }
1024
+ interface RegionData {
1025
+ id: string;
1026
+ name: string;
1027
+ meta: any | null;
1028
+ createdAt: string;
1029
+ updatedAt: string;
1030
+ }
1031
+ interface GameRomData {
1032
+ id: string;
1033
+ crc: number;
1034
+ meta: any | null;
1035
+ gameId: string;
1036
+ regionId: string;
1037
+ createdAt: string;
1038
+ updatedAt: string;
1039
+ game: GameData;
1040
+ region: RegionData;
1000
1041
  }
1001
- //#endregion
1002
- //#region src/database/mnemonics.d.ts
1003
1042
  /**
1004
- * Database mnemonic definition
1005
- * Converted from GaiaLib/Database/DbMnemonic.cs
1043
+ * Base ROM branch with complete relationship chain
1006
1044
  */
1007
- interface DbMnemonic {
1008
- key: number;
1009
- value: string;
1010
- metadata?: string;
1045
+ interface BaseRomBranchData extends BranchBaseData {
1046
+ baseRomId: string;
1047
+ gameRomBranchId: string;
1048
+ gameRomBranch: GameRomBranchData;
1049
+ baseRom: BaseRomData;
1011
1050
  }
1012
- //#endregion
1013
- //#region src/database/overrides.d.ts
1014
- declare class DbOverride {
1015
- location: number;
1016
- register: string;
1017
- value: number;
1018
- constructor(values: Partial<DbOverride>);
1051
+ /**
1052
+ * Base ROM file containing binary data
1053
+ */
1054
+ interface BaseRomFileData extends FileBaseData {
1055
+ baseRomId: string;
1056
+ }
1057
+ interface BaseRomBranchFileRaw {
1058
+ id: string;
1059
+ branchId: string;
1060
+ fileId: string;
1061
+ file: BaseRomFileRaw;
1019
1062
  }
1020
- //#endregion
1021
- //#region src/database/rewrites.d.ts
1022
1063
  /**
1023
- * Database rewrite rule definition
1024
- * Converted from GaiaLib/Database/DbRewrite.cs
1064
+ * Raw BaseRomFile data as returned from Supabase (before conversion)
1025
1065
  */
1026
- interface DbRewrite {
1027
- location: number;
1028
- value: number;
1066
+ interface BaseRomFileRaw extends FileBaseRaw {
1067
+ baseRomId: string;
1029
1068
  }
1030
- //#endregion
1031
- //#region src/database/sfx.d.ts
1032
1069
  /**
1033
- * Database sound effect definition
1034
- * Converted from GaiaLib/Database/DbSfx.cs
1070
+ * Complete ROM payload containing branch data and files
1035
1071
  */
1036
- interface DbSfx {
1037
- location: number;
1038
- size: number;
1039
- names: string[];
1072
+ interface BaseRomPayload {
1073
+ baseRomBranch: BaseRomBranchData;
1074
+ files: BaseRomFileData[];
1040
1075
  }
1041
- //#endregion
1042
- //#region src/rom/extraction/references.d.ts
1043
1076
  /**
1044
- * Manages references, chunks, and markers during ROM analysis
1045
- * Converted from GaiaLib/Rom/Extraction/ReferenceManager.cs
1077
+ * Options for loading ROM data by name
1078
+ */
1079
+ interface FromSupabaseByNameOptions {
1080
+ /**
1081
+ * Name of the game to load
1082
+ * @default 'Illusion of Gaia'
1083
+ */
1084
+ gameName: string;
1085
+ /**
1086
+ * Name of the base ROM to load
1087
+ * @default 'GaiaLabs BaseROM'
1088
+ */
1089
+ baseRomName: string;
1090
+ /**
1091
+ * Name of the branch to load
1092
+ * Set to null to load the main/develop branch
1093
+ * Set to undefined to not filter by branch name
1094
+ */
1095
+ branchName?: string | null;
1096
+ /**
1097
+ * Version of the branch to load
1098
+ * Set to null to load the latest/main version
1099
+ * Set to undefined to not filter by version
1100
+ */
1101
+ branchVersion?: number | null;
1102
+ }
1103
+ /**
1104
+ * Error codes for Supabase operations
1105
+ */
1106
+ declare enum SupabaseErrorCode {
1107
+ BRANCH_NOT_FOUND = "BRANCH_NOT_FOUND",
1108
+ ROM_NOT_FOUND = "ROM_NOT_FOUND",
1109
+ FILES_NOT_FOUND = "FILES_NOT_FOUND",
1110
+ NETWORK_ERROR = "NETWORK_ERROR",
1111
+ INVALID_DATA = "INVALID_DATA",
1112
+ ENVIRONMENT_ERROR = "ENVIRONMENT_ERROR",
1113
+ PERMISSION_ERROR = "PERMISSION_ERROR"
1114
+ }
1115
+ /**
1116
+ * Custom error class for Supabase operations
1117
+ */
1118
+ declare class SupabaseFromError extends Error {
1119
+ readonly code: SupabaseErrorCode;
1120
+ readonly details?: any | undefined;
1121
+ constructor(message: string, code: SupabaseErrorCode, details?: any | undefined);
1122
+ }
1123
+ /**
1124
+ * Result type for async operations that may fail
1125
+ */
1126
+ type SupabaseResult<T> = {
1127
+ data: T;
1128
+ error: null;
1129
+ } | {
1130
+ data: null;
1131
+ error: SupabaseFromError;
1132
+ };
1133
+ /**
1134
+ * Project information
1135
+ */
1136
+ interface ProjectData {
1137
+ id: string;
1138
+ name: string;
1139
+ meta: any | null;
1140
+ gameId: string;
1141
+ baseRomId: string;
1142
+ createdAt: string;
1143
+ updatedAt: string;
1144
+ }
1145
+ /**
1146
+ * Project branch with complete relationship chain
1147
+ */
1148
+ interface ProjectBranchData extends BranchBaseData {
1149
+ projectId: string;
1150
+ baseRomBranchId: string;
1151
+ modules: any[];
1152
+ project: ProjectData;
1153
+ baseRomBranch: BaseRomBranchData;
1154
+ }
1155
+ /**
1156
+ * Project file containing binary data
1157
+ */
1158
+ interface ProjectFileData extends FileBaseData {
1159
+ module: string | null;
1160
+ projectId: string;
1161
+ }
1162
+ interface ProjectBranchFileRaw {
1163
+ id: string;
1164
+ branchId: string;
1165
+ fileId: string;
1166
+ file: ProjectFileRaw;
1167
+ }
1168
+ /**
1169
+ * Raw ProjectFile data as returned from Supabase (before conversion)
1170
+ */
1171
+ interface ProjectFileRaw extends FileBaseRaw {
1172
+ module: string | null;
1173
+ projectId: string;
1174
+ }
1175
+ /**
1176
+ * Complete Project payload containing branch data and files
1177
+ */
1178
+ interface ProjectPayload {
1179
+ projectBranch: ProjectBranchData;
1180
+ projectFiles: ProjectFileData[];
1181
+ baseRomBranch: BaseRomBranchData;
1182
+ baseRomFiles: BaseRomFileData[];
1183
+ }
1184
+ /**
1185
+ * Options for loading Project data by name
1186
+ */
1187
+ interface FromSupabaseByProjectOptions {
1188
+ projectName: string;
1189
+ /**
1190
+ * Name of the branch to load
1191
+ * Set to null to load the main/develop branch
1192
+ * Set to undefined to not filter by branch name
1193
+ */
1194
+ branchName?: string | null;
1195
+ /**
1196
+ * Version of the branch to load
1197
+ * Set to null to load the latest/main version
1198
+ * Set to undefined to not filter by version
1199
+ */
1200
+ branchVersion?: number | null;
1201
+ }
1202
+ /**
1203
+ * Query statistics for performance monitoring
1204
+ */
1205
+ interface QueryStats {
1206
+ branchQueryTime: number;
1207
+ fileQueryTime: number;
1208
+ totalTime: number;
1209
+ fileCount: number;
1210
+ }
1211
+ //#endregion
1212
+ //#region src/database/modules.d.ts
1213
+ interface DbGameRomModule {
1214
+ supaProjectFiles?: ProjectFileData[];
1215
+ supaBaseRomFiles?: BaseRomFileData[];
1216
+ mnemonics: Record<number, string>;
1217
+ overrides: Record<number, Record<string, number>>;
1218
+ rewrites: Record<string, number>;
1219
+ blocks: Record<string, Record<string, Partial<DbBlock>>>;
1220
+ files: Record<string, Record<string, Record<string, Partial<DbFile>>>>;
1221
+ config: DbConfig;
1222
+ labels: Record<number, string>;
1223
+ structs: Record<string, DbStruct>;
1224
+ copdef: Record<string, Partial<CopDef>>;
1225
+ strings: Record<string, Partial<DbStringType>>;
1226
+ transforms: Record<string, Partial<DbTransform>[]>;
1227
+ addrModes: Record<string, Partial<DbAddressingMode>>;
1228
+ headers: Partial<DbHeader>[];
1229
+ groups: Record<string, Partial<DbGroup>>;
1230
+ fileTypes: Record<string, Partial<DbFileType>>;
1231
+ }
1232
+ interface DbBaseRomModule extends DbGameRomModule {
1233
+ baseRomFiles: ChunkFile[];
1234
+ }
1235
+ interface DbProjectModule extends DbBaseRomModule {
1236
+ projectFiles: ChunkFile[];
1237
+ }
1238
+ //#endregion
1239
+ //#region src/database/header.d.ts
1240
+ declare class DbHeader {
1241
+ bank: number;
1242
+ address: number;
1243
+ condition?: string;
1244
+ parts: DbHeaderPart[];
1245
+ constructor(data: Partial<DbHeader>);
1246
+ }
1247
+ declare class DbHeaderPart {
1248
+ name: string;
1249
+ size: number;
1250
+ type: string;
1251
+ value?: any;
1252
+ constructor(data: Partial<DbHeaderPart>);
1253
+ }
1254
+ //#endregion
1255
+ //#region src/database/root.d.ts
1256
+ /**
1257
+ * Main database root class
1258
+ * Converted from GaiaLib/Database/DbRoot.cs
1259
+ */
1260
+ interface DbRoot {
1261
+ copDef: Record<number, CopDef>;
1262
+ copLookup: Record<string, CopDef>;
1263
+ mnemonics: Record<number, string>;
1264
+ structs: Record<string, DbStruct>;
1265
+ stringTypes: Record<string, DbStringType>;
1266
+ stringDelimiters: string[];
1267
+ stringDelimiterLookup: Record<string, DbStringType>;
1268
+ headers: DbHeader[];
1269
+ files: DbFile[];
1270
+ config: DbConfig;
1271
+ blocks: DbBlock[];
1272
+ overrides: Record<number, Record<string, any>>;
1273
+ labels: Record<number, string>;
1274
+ rewrites: Record<number, number>;
1275
+ entryPoints: DbEntryPoint[];
1276
+ opCodes: Record<number, OpCode>;
1277
+ opLookup: Record<string, OpCode[]>;
1278
+ addrLookup: Record<string, DbAddressingMode>;
1279
+ compression?: ICompressionProvider;
1280
+ baseRomFiles?: ChunkFile[];
1281
+ projectFiles?: ChunkFile[];
1282
+ groups: Record<string, DbGroup>;
1283
+ scenes: Record<number, DbScene>;
1284
+ fileTypes: Record<string, DbFileType>;
1285
+ fileExtLookup: Record<string, DbFileType>;
1286
+ }
1287
+ /**
1288
+ * Database root utilities
1289
+ */
1290
+ declare class DbRootUtils {
1291
+ /**
1292
+ * JSON serialization options
1293
+ */
1294
+ static fromGameModule(module: DbGameRomModule): DbRoot;
1295
+ static applyFolder(root: DbRoot, folderPath: string, sourceFiles?: ChunkFile[]): Promise<ChunkFile[]>;
1296
+ static extractAllContent(root: DbRoot, romPath: string, outPath: string): Promise<void>;
1297
+ static rebuildAllContent(root: DbRoot, inPath: string[], outPath: string): Promise<ChunkFile[]>;
1298
+ }
1299
+ //#endregion
1300
+ //#region src/database/labels.d.ts
1301
+ /**
1302
+ * Database label definition
1303
+ * Converted from GaiaLib/Database/DbLabel.cs
1304
+ */
1305
+ interface DbLabel {
1306
+ location: number;
1307
+ label: string;
1308
+ }
1309
+ //#endregion
1310
+ //#region src/database/mnemonics.d.ts
1311
+ /**
1312
+ * Database mnemonic definition
1313
+ * Converted from GaiaLib/Database/DbMnemonic.cs
1314
+ */
1315
+ interface DbMnemonic {
1316
+ key: number;
1317
+ value: string;
1318
+ metadata?: string;
1319
+ }
1320
+ //#endregion
1321
+ //#region src/database/overrides.d.ts
1322
+ declare class DbOverride {
1323
+ location: number;
1324
+ register: string;
1325
+ value: number;
1326
+ constructor(values: Partial<DbOverride>);
1327
+ }
1328
+ //#endregion
1329
+ //#region src/database/rewrites.d.ts
1330
+ /**
1331
+ * Database rewrite rule definition
1332
+ * Converted from GaiaLib/Database/DbRewrite.cs
1333
+ */
1334
+ interface DbRewrite {
1335
+ location: number;
1336
+ value: number;
1337
+ }
1338
+ //#endregion
1339
+ //#region src/database/sfx.d.ts
1340
+ /**
1341
+ * Database sound effect definition
1342
+ * Converted from GaiaLib/Database/DbSfx.cs
1343
+ */
1344
+ interface DbSfx {
1345
+ location: number;
1346
+ size: number;
1347
+ names: string[];
1348
+ }
1349
+ //#endregion
1350
+ //#region src/rom/extraction/references.d.ts
1351
+ /**
1352
+ * Manages references, chunks, and markers during ROM analysis
1353
+ * Converted from GaiaLib/Rom/Extraction/ReferenceManager.cs
1046
1354
  */
1047
1355
  declare class ReferenceManager {
1048
1356
  readonly structTable: Map<number, string>;
@@ -1457,588 +1765,285 @@ declare class RomWriter {
1457
1765
  readonly root: DbRoot;
1458
1766
  constructor(root: DbRoot);
1459
1767
  repack(files: ChunkFile[]): Promise<Uint8Array>;
1460
- allocate(pages: number): void;
1461
- writeHeaders(masterLookup: Map<string, number>): void;
1462
- prepareHeaderValues(): any;
1463
- writeHeader(header: DbHeader, values: any, masterLookup: Map<string, number>): void;
1464
- writeChecksum(values: any): void;
1465
- writeEntryPoints(asmFiles: ChunkFile[]): void;
1466
- writeFile(file: ChunkFile, fileLookup: Map<string, number>): Promise<number>;
1467
- private writeAscii;
1468
- /**
1469
- * Parse assembly blocks and write binary data to output buffer
1470
- * Converted from ext/GaiaLib/Rom/Rebuild/RomWriter.cs ParseAssembly method
1471
- */
1472
- private parseAssembly;
1473
- /**
1474
- * Helper method to find index of any character from an array in a string
1475
- */
1476
- private indexOfAny;
1477
- /**
1478
- * Helper method to check if an object is a StringMarker
1479
- */
1480
- private isStringMarker;
1481
- private isTableEntry;
1482
- }
1483
- //#endregion
1484
- //#region src/rom/rebuild/processor.d.ts
1485
- /**
1486
- * ROM rebuild processor
1487
- * Converted from ext/GaiaLib/Rom/Rebuild/RomProcessor.cs
1488
- */
1489
- declare class RomProcessor {
1490
- private readonly writer;
1491
- constructor(writer: RomWriter);
1492
- repack(allFiles: ChunkFile[]): Promise<Map<string, number>>;
1493
- static applyPatches(asmFiles: ChunkFile[], patches: ChunkFile[]): void;
1494
- }
1495
- //#endregion
1496
- //#region src/rom/rebuild/string-processor.d.ts
1497
- /**
1498
- * String processor for assembly parsing
1499
- * Converted from GaiaLib/Rom/Rebuild/StringProcessor.cs
1500
- */
1501
- declare class StringProcessor {
1502
- private memBuffer;
1503
- private totalSize;
1504
- private fixedStr;
1505
- private readonly context;
1506
- private readonly root;
1507
- private readonly stringCharLookup;
1508
- private readonly testRegex;
1509
- private inShift;
1510
- constructor(context: Assembler);
1511
- consumeString(typeChar: string): void;
1512
- private flushBuffer;
1513
- private processString;
1514
- private processStringCommand;
1515
- }
1516
- //#endregion
1517
- //#region src/rom/rebuild/sorted-map.d.ts
1518
- /**
1519
- * A map that sorts keys by length in descending order, then alphabetically
1520
- * This is used for tag replacement where longer tags should be replaced first
1521
- * to avoid conflicts (e.g., "ABCD" should be replaced before "ABC")
1522
- */
1523
- declare class SortedMap<V> {
1524
- private map;
1525
- private _keys;
1526
- get size(): number;
1527
- set(key: string, value: V): this;
1528
- get(key: string): V | undefined;
1529
- has(key: string): boolean;
1530
- delete(key: string): boolean;
1531
- clear(): void;
1532
- keys(): string[];
1533
- values(): V[];
1534
- entries(): [string, V][];
1535
- [Symbol.iterator](): Generator<[string, V], void, unknown>;
1536
- private sortKeys;
1537
- }
1538
- //#endregion
1539
- //#region src/rom/rebuild/assembler.d.ts
1540
- /**
1541
- * Main assembler class for parsing assembly files
1542
- * Converted from GaiaLib/Rom/Rebuild/Assembler.cs
1543
- */
1544
- declare class Assembler {
1545
- readonly root: DbRoot;
1546
- private readonly lines;
1547
- private currentLineIndex;
1548
- readonly stringProcessor: StringProcessor;
1549
- lineBuffer: string;
1550
- includes: Set<string>;
1551
- blocks: AsmBlock[];
1552
- tags: SortedMap<string | null>;
1553
- currentBlock: AsmBlock | null;
1554
- lineCount: number;
1555
- lastDelimiter: number | null;
1556
- reqBank: number | null;
1557
- eof: boolean;
1558
- strDelimRegex: RegExp;
1559
- conditionFiles: string[];
1560
- private inCondition;
1561
- private exitCondition;
1562
- private failCondition;
1563
- constructor(dbRoot: DbRoot, textData: string, conditionFiles: string[]);
1564
- parseAssembly(): {
1565
- blocks: AsmBlock[];
1566
- includes: Set<string>;
1567
- reqBank: number | null;
1568
- };
1569
- getLine(): boolean;
1570
- private trimComments;
1571
- private processDirectives;
1572
- private processTags;
1573
- private resolveTags;
1574
- parseOperand(opnd: string): unknown;
1575
- processRawData(): void;
1576
- private hexStringToBytes;
1577
- }
1578
- //#endregion
1579
- //#region src/rom/rebuild/assembler-state.d.ts
1580
- /**
1581
- * Assembler state machine for processing assembly text
1582
- * Converted from GaiaLib/Rom/Rebuild/AssemblerState.cs
1583
- */
1584
- declare class AssemblerState {
1585
- private readonly dbStruct;
1586
- private readonly parentStruct;
1587
- private readonly root;
1588
- private readonly discriminator;
1589
- private delimiter;
1590
- private memberOffset;
1591
- private dataOffset;
1592
- private readonly memberTypes;
1593
- private currentType;
1594
- private readonly context;
1595
- constructor(context: Assembler, structType?: string | null, saveDelimiter?: boolean);
1596
- private checkDisc;
1597
- private advancePart;
1598
- private processOrigin;
1599
- private static doMath;
1600
- private tryCreateLabel;
1601
- processText(openTag?: string): void;
1602
- private hexStringToBytes;
1603
- }
1604
- //#endregion
1605
- //#region src/rom/generator.d.ts
1606
- declare class RomGenerator {
1607
- readonly projectName?: string;
1608
- crc: number;
1609
- dbRoot: DbRoot;
1610
- private sourceData;
1611
- constructor(projectName?: string, crc?: number);
1612
- validateAndDownload(sourceData: Uint8Array): Promise<boolean>;
1613
- generateProject(modules: string[], manualFiles?: ChunkFile[], unshiftManualFiles?: boolean): Promise<Uint8Array>;
1614
- private applyProjectInit;
1615
- applyPatchFile(chunkFile: ChunkFile, chunkFiles: ChunkFile[], asmFiles: ChunkFile[], patchFiles: ChunkFile[]): void;
1616
- }
1617
- //#endregion
1618
- //#region src/compression/QuintetLZ.d.ts
1619
- /**
1620
- * QuintetLZ compression algorithm implementation
1621
- * Dictionary-based compression used in Quintet games
1622
- */
1623
- declare class QuintetLZ implements ICompressionProvider {
1624
- static readonly DICTIONARY_SIZE = 256;
1625
- static readonly DICTIONARY_INIT = 32;
1626
- static readonly DICTIONARY_OFFSET = 239;
1627
- private static readonly DEFAULT_PAGE_SIZE;
1628
- /**
1629
- * Expand (decompress) data using QuintetLZ algorithm
1630
- * @param srcData Source data buffer
1631
- * @param srcPosition Starting position in source data
1632
- * @param srcLen Length of source data to process
1633
- * @returns Expanded data
1634
- */
1635
- expand(srcData: Uint8Array, srcPosition?: number, srcLen?: number): Uint8Array;
1636
- /**
1637
- * Compact (compress) data using QuintetLZ algorithm
1638
- * @param srcData Source data to compress
1639
- * @returns Compressed data
1640
- */
1641
- compact(srcData: Uint8Array, srcPosition?: number, srcLen?: number): Uint8Array;
1642
- }
1643
- //#endregion
1644
- //#region src/compression/index.d.ts
1645
- declare const CompressionAlgorithms: Record<string, () => ICompressionProvider>;
1646
- //#endregion
1647
- //#region src/sprites/SpriteFrame.d.ts
1648
- /**
1649
- * Represents a single frame in a sprite animation sequence
1650
- */
1651
- declare class SpriteFrame {
1652
- duration: number;
1653
- groupIndex: number;
1654
- /**
1655
- * Internal offset to the group data (not serialized)
1656
- */
1657
- groupOffset: number;
1658
- constructor(duration?: number, groupIndex?: number, groupOffset?: number);
1659
- }
1660
- //#endregion
1661
- //#region src/sprites/SpritePart.d.ts
1662
- /**
1663
- * Represents a single part/piece of a sprite
1664
- */
1665
- declare class SpritePart {
1666
- isLarge: boolean;
1667
- xOffset: number;
1668
- xOffsetMirror: number;
1669
- yOffset: number;
1670
- yOffsetMirror: number;
1671
- vMirror: boolean;
1672
- hMirror: boolean;
1673
- someOffset: number;
1674
- paletteIndex: number;
1675
- tileIndex: number;
1676
- constructor();
1677
- }
1678
- //#endregion
1679
- //#region src/sprites/SpriteGroup.d.ts
1680
- /**
1681
- * Represents a group of sprite parts that form a complete sprite frame
1682
- */
1683
- declare class SpriteGroup {
1684
- xOffset: number;
1685
- xOffsetMirror: number;
1686
- yOffset: number;
1687
- yOffsetMirror: number;
1688
- xRecoilHitboxOffset: number;
1689
- yRecoilHitboxOffset: number;
1690
- xRecoilHitboxTilesize: number;
1691
- yRecoilHitboxTilesize: number;
1692
- xHostileHitboxOffset: number;
1693
- xHostileHitboxSize: number;
1694
- yHostileHitboxOffset: number;
1695
- yHostileHitboxSize: number;
1696
- parts: SpritePart[];
1697
- constructor();
1698
- }
1699
- //#endregion
1700
- //#region src/sprites/SpriteMap.d.ts
1701
- /**
1702
- * Represents a complete sprite map with frame sets and groups
1703
- */
1704
- declare class SpriteMap {
1705
- frameSets: SpriteFrame[][];
1706
- groups: SpriteGroup[];
1707
- constructor();
1768
+ allocate(pages: number): void;
1769
+ writeHeaders(masterLookup: Map<string, number>): void;
1770
+ prepareHeaderValues(): any;
1771
+ writeHeader(header: DbHeader, values: any, masterLookup: Map<string, number>): void;
1772
+ writeChecksum(values: any): void;
1773
+ writeEntryPoints(asmFiles: ChunkFile[]): void;
1774
+ writeFile(file: ChunkFile, fileLookup: Map<string, number>): Promise<number>;
1775
+ private writeAscii;
1708
1776
  /**
1709
- * Create a SpriteMap from binary data
1710
- * @param data Binary data buffer
1711
- * @returns SpriteMap instance
1777
+ * Parse assembly blocks and write binary data to output buffer
1778
+ * Converted from ext/GaiaLib/Rom/Rebuild/RomWriter.cs ParseAssembly method
1712
1779
  */
1713
- static fromBytes(data: Uint8Array): SpriteMap;
1780
+ private parseAssembly;
1714
1781
  /**
1715
- * Convert this SpriteMap to binary data
1716
- * @returns Binary data buffer
1782
+ * Helper method to find index of any character from an array in a string
1717
1783
  */
1718
- toBytes(): Uint8Array;
1784
+ private indexOfAny;
1785
+ /**
1786
+ * Helper method to check if an object is a StringMarker
1787
+ */
1788
+ private isStringMarker;
1789
+ private isTableEntry;
1719
1790
  }
1720
1791
  //#endregion
1721
- //#region src/project/config.d.ts
1792
+ //#region src/rom/rebuild/processor.d.ts
1722
1793
  /**
1723
- * Project configuration types
1724
- * TODO: Implement comprehensive project configuration
1794
+ * ROM rebuild processor
1795
+ * Converted from ext/GaiaLib/Rom/Rebuild/RomProcessor.cs
1725
1796
  */
1726
- interface ProjectConfig {
1727
- name: string;
1728
- version: string;
1729
- description?: string;
1797
+ declare class RomProcessor {
1798
+ private readonly writer;
1799
+ constructor(writer: RomWriter);
1800
+ repack(allFiles: ChunkFile[]): Promise<Map<string, number>>;
1801
+ static applyPatches(asmFiles: ChunkFile[], patches: ChunkFile[]): void;
1730
1802
  }
1731
1803
  //#endregion
1732
- //#region src/collaboration/index.d.ts
1804
+ //#region src/rom/rebuild/string-processor.d.ts
1733
1805
  /**
1734
- * Collaboration types and utilities
1735
- * TODO: Implement collaboration functionality
1806
+ * String processor for assembly parsing
1807
+ * Converted from GaiaLib/Rom/Rebuild/StringProcessor.cs
1736
1808
  */
1737
- interface CollaborationConfig {
1738
- enabled: boolean;
1809
+ declare class StringProcessor {
1810
+ private memBuffer;
1811
+ private totalSize;
1812
+ private fixedStr;
1813
+ private readonly context;
1814
+ private readonly root;
1815
+ private readonly stringCharLookup;
1816
+ private readonly testRegex;
1817
+ private inShift;
1818
+ constructor(context: Assembler);
1819
+ consumeString(typeChar: string): void;
1820
+ private flushBuffer;
1821
+ private processString;
1822
+ private processStringCommand;
1739
1823
  }
1740
1824
  //#endregion
1741
- //#region src/supabase/types.d.ts
1742
- /**
1743
- * TypeScript interfaces for Supabase API responses
1744
- * These types represent the structured data returned from ROM database queries
1745
- */
1746
- interface PlatformData {
1747
- id: string;
1748
- name: string;
1749
- meta: any | null;
1750
- createdAt: string;
1751
- updatedAt: string;
1752
- }
1753
- interface BranchBaseData {
1754
- id: string;
1755
- name: string | null;
1756
- version: number | null;
1757
- isActive?: boolean | null;
1758
- notes?: string[] | null;
1759
- createdAt: string;
1760
- updatedAt: string;
1761
- }
1762
- interface FileBaseData {
1763
- id: string;
1764
- name: string;
1765
- type: string;
1766
- version: number | null;
1767
- crc: number | null;
1768
- meta: any | null;
1769
- isText: boolean;
1770
- text: string | null;
1771
- data: Uint8Array | null;
1772
- createdAt: string;
1773
- updatedAt: string;
1774
- }
1775
- interface FileBaseRaw extends Omit<FileBaseData, 'data'> {
1776
- data: string | null;
1777
- }
1778
- /**
1779
- * Platform branch information containing instruction set and addressing modes
1780
- */
1781
- interface PlatformBranchData extends BranchBaseData {
1782
- platformId: string;
1783
- addressingModes: any | null;
1784
- headers: any | null;
1785
- vectors: any | null;
1786
- types: any | null;
1787
- platform: PlatformData;
1788
- }
1789
- /**
1790
- * Game ROM branch information with platform reference
1791
- */
1792
- interface GameRomBranchData extends BranchBaseData {
1793
- gameRomId: string;
1794
- platformBranchId: string;
1795
- coplib: any | null;
1796
- config: any | null;
1797
- files: any | null;
1798
- blocks: any | null;
1799
- rewrites: any | null;
1800
- transforms: any | null;
1801
- overrides: any | null;
1802
- labels: any | null;
1803
- mnemonics: any | null;
1804
- fileTypes: any | null;
1805
- groups: any | null;
1806
- strings: any | null;
1807
- structs: any | null;
1808
- gameRom: GameRomData;
1809
- platformBranch: PlatformBranchData;
1810
- }
1811
- interface GameRomArtifactData extends FileBaseData {
1812
- gameRomId: string;
1813
- }
1814
- interface GameRomArtifactRaw extends FileBaseRaw {
1815
- gameRomId: string;
1816
- }
1817
- interface GameRomBranchArtifactRaw {
1818
- id: string;
1819
- branchId: string;
1820
- artifactId: string;
1821
- artifact: GameRomArtifactRaw;
1822
- }
1823
- /**
1824
- * Base ROM information
1825
- */
1826
- interface BaseRomData {
1827
- id: string;
1828
- name: string;
1829
- gameId: string;
1830
- gameRomId: string;
1831
- createdAt: string;
1832
- updatedAt: string;
1833
- }
1834
- interface GameData {
1835
- id: string;
1836
- name: string;
1837
- createdAt: string;
1838
- updatedAt: string;
1839
- }
1840
- interface DeveloperData {
1841
- id: string;
1842
- name: string;
1843
- meta: any | null;
1844
- createdAt: string;
1845
- updatedAt: string;
1846
- }
1847
- interface GameDeveloperData {
1848
- id: string;
1849
- gameId: string;
1850
- developerId: string;
1851
- createdAt: string;
1852
- updatedAt: string;
1853
- game: GameData;
1854
- developer: DeveloperData;
1855
- }
1856
- interface RegionData {
1857
- id: string;
1858
- name: string;
1859
- meta: any | null;
1860
- createdAt: string;
1861
- updatedAt: string;
1862
- }
1863
- interface GameRomData {
1864
- id: string;
1865
- crc: number;
1866
- meta: any | null;
1867
- gameId: string;
1868
- regionId: string;
1869
- createdAt: string;
1870
- updatedAt: string;
1871
- game: GameData;
1872
- region: RegionData;
1873
- }
1825
+ //#region src/rom/rebuild/sorted-map.d.ts
1874
1826
  /**
1875
- * Base ROM branch with complete relationship chain
1827
+ * A map that sorts keys by length in descending order, then alphabetically
1828
+ * This is used for tag replacement where longer tags should be replaced first
1829
+ * to avoid conflicts (e.g., "ABCD" should be replaced before "ABC")
1876
1830
  */
1877
- interface BaseRomBranchData extends BranchBaseData {
1878
- baseRomId: string;
1879
- gameRomBranchId: string;
1880
- gameRomBranch: GameRomBranchData;
1881
- baseRom: BaseRomData;
1831
+ declare class SortedMap<V> {
1832
+ private map;
1833
+ private _keys;
1834
+ get size(): number;
1835
+ set(key: string, value: V): this;
1836
+ get(key: string): V | undefined;
1837
+ has(key: string): boolean;
1838
+ delete(key: string): boolean;
1839
+ clear(): void;
1840
+ keys(): string[];
1841
+ values(): V[];
1842
+ entries(): [string, V][];
1843
+ [Symbol.iterator](): Generator<[string, V], void, unknown>;
1844
+ private sortKeys;
1882
1845
  }
1846
+ //#endregion
1847
+ //#region src/rom/rebuild/assembler.d.ts
1883
1848
  /**
1884
- * Base ROM file containing binary data
1849
+ * Main assembler class for parsing assembly files
1850
+ * Converted from GaiaLib/Rom/Rebuild/Assembler.cs
1885
1851
  */
1886
- interface BaseRomFileData extends FileBaseData {
1887
- baseRomId: string;
1888
- }
1889
- interface BaseRomBranchFileRaw {
1890
- id: string;
1891
- branchId: string;
1892
- fileId: string;
1893
- file: BaseRomFileRaw;
1852
+ declare class Assembler {
1853
+ readonly root: DbRoot;
1854
+ private readonly lines;
1855
+ private currentLineIndex;
1856
+ readonly stringProcessor: StringProcessor;
1857
+ lineBuffer: string;
1858
+ includes: Set<string>;
1859
+ blocks: AsmBlock[];
1860
+ tags: SortedMap<string | null>;
1861
+ currentBlock: AsmBlock | null;
1862
+ lineCount: number;
1863
+ lastDelimiter: number | null;
1864
+ reqBank: number | null;
1865
+ eof: boolean;
1866
+ strDelimRegex: RegExp;
1867
+ conditionFiles: string[];
1868
+ private inCondition;
1869
+ private exitCondition;
1870
+ private failCondition;
1871
+ constructor(dbRoot: DbRoot, textData: string, conditionFiles: string[]);
1872
+ parseAssembly(): {
1873
+ blocks: AsmBlock[];
1874
+ includes: Set<string>;
1875
+ reqBank: number | null;
1876
+ };
1877
+ getLine(): boolean;
1878
+ private trimComments;
1879
+ private processDirectives;
1880
+ private processTags;
1881
+ private resolveTags;
1882
+ parseOperand(opnd: string): unknown;
1883
+ processRawData(): void;
1884
+ private hexStringToBytes;
1894
1885
  }
1886
+ //#endregion
1887
+ //#region src/rom/rebuild/assembler-state.d.ts
1895
1888
  /**
1896
- * Raw BaseRomFile data as returned from Supabase (before conversion)
1889
+ * Assembler state machine for processing assembly text
1890
+ * Converted from GaiaLib/Rom/Rebuild/AssemblerState.cs
1897
1891
  */
1898
- interface BaseRomFileRaw extends FileBaseRaw {
1899
- baseRomId: string;
1892
+ declare class AssemblerState {
1893
+ private readonly dbStruct;
1894
+ private readonly parentStruct;
1895
+ private readonly root;
1896
+ private readonly discriminator;
1897
+ private delimiter;
1898
+ private memberOffset;
1899
+ private dataOffset;
1900
+ private readonly memberTypes;
1901
+ private currentType;
1902
+ private readonly context;
1903
+ constructor(context: Assembler, structType?: string | null, saveDelimiter?: boolean);
1904
+ private checkDisc;
1905
+ private advancePart;
1906
+ private processOrigin;
1907
+ private static doMath;
1908
+ private tryCreateLabel;
1909
+ processText(openTag?: string): void;
1910
+ private hexStringToBytes;
1900
1911
  }
1901
- /**
1902
- * Complete ROM payload containing branch data and files
1903
- */
1904
- interface BaseRomPayload {
1905
- baseRomBranch: BaseRomBranchData;
1906
- files: BaseRomFileData[];
1912
+ //#endregion
1913
+ //#region src/rom/generator.d.ts
1914
+ declare class RomGenerator {
1915
+ readonly projectName: string;
1916
+ readonly crc: number;
1917
+ dbRoot: DbRoot;
1918
+ private sourceData;
1919
+ constructor(projectName: string, crc: number);
1920
+ validateAndDownload(sourceData: Uint8Array): Promise<boolean>;
1921
+ generateProject(modules: string[], manualFiles?: ChunkFile[], unshiftManualFiles?: boolean): Promise<Uint8Array>;
1922
+ private applyProjectInit;
1923
+ applyPatchFile(chunkFile: ChunkFile, chunkFiles: ChunkFile[], asmFiles: ChunkFile[], patchFiles: ChunkFile[]): void;
1907
1924
  }
1925
+ //#endregion
1926
+ //#region src/compression/QuintetLZ.d.ts
1908
1927
  /**
1909
- * Options for loading ROM data by name
1928
+ * QuintetLZ compression algorithm implementation
1929
+ * Dictionary-based compression used in Quintet games
1910
1930
  */
1911
- interface FromSupabaseByNameOptions {
1912
- /**
1913
- * Name of the game to load
1914
- * @default 'Illusion of Gaia'
1915
- */
1916
- gameName: string;
1917
- /**
1918
- * Name of the base ROM to load
1919
- * @default 'GaiaLabs BaseROM'
1920
- */
1921
- baseRomName: string;
1931
+ declare class QuintetLZ implements ICompressionProvider {
1932
+ static readonly DICTIONARY_SIZE = 256;
1933
+ static readonly DICTIONARY_INIT = 32;
1934
+ static readonly DICTIONARY_OFFSET = 239;
1935
+ private static readonly DEFAULT_PAGE_SIZE;
1922
1936
  /**
1923
- * Name of the branch to load
1924
- * Set to null to load the main/develop branch
1925
- * Set to undefined to not filter by branch name
1937
+ * Expand (decompress) data using QuintetLZ algorithm
1938
+ * @param srcData Source data buffer
1939
+ * @param srcPosition Starting position in source data
1940
+ * @param srcLen Length of source data to process
1941
+ * @returns Expanded data
1926
1942
  */
1927
- branchName?: string | null;
1943
+ expand(srcData: Uint8Array, srcPosition?: number, srcLen?: number): Uint8Array;
1928
1944
  /**
1929
- * Version of the branch to load
1930
- * Set to null to load the latest/main version
1931
- * Set to undefined to not filter by version
1945
+ * Compact (compress) data using QuintetLZ algorithm
1946
+ * @param srcData Source data to compress
1947
+ * @returns Compressed data
1932
1948
  */
1933
- branchVersion?: number | null;
1934
- }
1935
- /**
1936
- * Error codes for Supabase operations
1937
- */
1938
- declare enum SupabaseErrorCode {
1939
- BRANCH_NOT_FOUND = "BRANCH_NOT_FOUND",
1940
- ROM_NOT_FOUND = "ROM_NOT_FOUND",
1941
- FILES_NOT_FOUND = "FILES_NOT_FOUND",
1942
- NETWORK_ERROR = "NETWORK_ERROR",
1943
- INVALID_DATA = "INVALID_DATA",
1944
- ENVIRONMENT_ERROR = "ENVIRONMENT_ERROR",
1945
- PERMISSION_ERROR = "PERMISSION_ERROR"
1946
- }
1947
- /**
1948
- * Custom error class for Supabase operations
1949
- */
1950
- declare class SupabaseFromError extends Error {
1951
- readonly code: SupabaseErrorCode;
1952
- readonly details?: any | undefined;
1953
- constructor(message: string, code: SupabaseErrorCode, details?: any | undefined);
1954
- }
1955
- /**
1956
- * Result type for async operations that may fail
1957
- */
1958
- type SupabaseResult<T> = {
1959
- data: T;
1960
- error: null;
1961
- } | {
1962
- data: null;
1963
- error: SupabaseFromError;
1964
- };
1965
- /**
1966
- * Project information
1967
- */
1968
- interface ProjectData {
1969
- id: string;
1970
- name: string;
1971
- meta: any | null;
1972
- gameId: string;
1973
- baseRomId: string;
1974
- createdAt: string;
1975
- updatedAt: string;
1976
- }
1977
- /**
1978
- * Project branch with complete relationship chain
1979
- */
1980
- interface ProjectBranchData extends BranchBaseData {
1981
- projectId: string;
1982
- baseRomBranchId: string;
1983
- modules: any[];
1984
- project: ProjectData;
1985
- baseRomBranch: BaseRomBranchData;
1949
+ compact(srcData: Uint8Array, srcPosition?: number, srcLen?: number): Uint8Array;
1986
1950
  }
1951
+ //#endregion
1952
+ //#region src/compression/index.d.ts
1953
+ declare const CompressionAlgorithms: Record<string, () => ICompressionProvider>;
1954
+ //#endregion
1955
+ //#region src/sprites/SpriteFrame.d.ts
1987
1956
  /**
1988
- * Project file containing binary data
1957
+ * Represents a single frame in a sprite animation sequence
1989
1958
  */
1990
- interface ProjectFileData extends FileBaseData {
1991
- module: string | null;
1992
- projectId: string;
1993
- }
1994
- interface ProjectBranchFileRaw {
1995
- id: string;
1996
- branchId: string;
1997
- fileId: string;
1998
- file: ProjectFileRaw;
1959
+ declare class SpriteFrame {
1960
+ duration: number;
1961
+ groupIndex: number;
1962
+ /**
1963
+ * Internal offset to the group data (not serialized)
1964
+ */
1965
+ groupOffset: number;
1966
+ constructor(duration?: number, groupIndex?: number, groupOffset?: number);
1999
1967
  }
1968
+ //#endregion
1969
+ //#region src/sprites/SpritePart.d.ts
2000
1970
  /**
2001
- * Raw ProjectFile data as returned from Supabase (before conversion)
1971
+ * Represents a single part/piece of a sprite
2002
1972
  */
2003
- interface ProjectFileRaw extends FileBaseRaw {
2004
- module: string | null;
2005
- projectId: string;
1973
+ declare class SpritePart {
1974
+ isLarge: boolean;
1975
+ xOffset: number;
1976
+ xOffsetMirror: number;
1977
+ yOffset: number;
1978
+ yOffsetMirror: number;
1979
+ vMirror: boolean;
1980
+ hMirror: boolean;
1981
+ someOffset: number;
1982
+ paletteIndex: number;
1983
+ tileIndex: number;
1984
+ constructor();
2006
1985
  }
1986
+ //#endregion
1987
+ //#region src/sprites/SpriteGroup.d.ts
2007
1988
  /**
2008
- * Complete Project payload containing branch data and files
1989
+ * Represents a group of sprite parts that form a complete sprite frame
2009
1990
  */
2010
- interface ProjectPayload {
2011
- projectBranch: ProjectBranchData;
2012
- projectFiles: ProjectFileData[];
2013
- baseRomBranch: BaseRomBranchData;
2014
- baseRomFiles: BaseRomFileData[];
1991
+ declare class SpriteGroup {
1992
+ xOffset: number;
1993
+ xOffsetMirror: number;
1994
+ yOffset: number;
1995
+ yOffsetMirror: number;
1996
+ xRecoilHitboxOffset: number;
1997
+ yRecoilHitboxOffset: number;
1998
+ xRecoilHitboxTilesize: number;
1999
+ yRecoilHitboxTilesize: number;
2000
+ xHostileHitboxOffset: number;
2001
+ xHostileHitboxSize: number;
2002
+ yHostileHitboxOffset: number;
2003
+ yHostileHitboxSize: number;
2004
+ parts: SpritePart[];
2005
+ constructor();
2015
2006
  }
2007
+ //#endregion
2008
+ //#region src/sprites/SpriteMap.d.ts
2016
2009
  /**
2017
- * Options for loading Project data by name
2010
+ * Represents a complete sprite map with frame sets and groups
2018
2011
  */
2019
- interface FromSupabaseByProjectOptions {
2020
- projectName: string;
2012
+ declare class SpriteMap {
2013
+ frameSets: SpriteFrame[][];
2014
+ groups: SpriteGroup[];
2015
+ constructor();
2021
2016
  /**
2022
- * Name of the branch to load
2023
- * Set to null to load the main/develop branch
2024
- * Set to undefined to not filter by branch name
2017
+ * Create a SpriteMap from binary data
2018
+ * @param data Binary data buffer
2019
+ * @returns SpriteMap instance
2025
2020
  */
2026
- branchName?: string | null;
2021
+ static fromBytes(data: Uint8Array): SpriteMap;
2027
2022
  /**
2028
- * Version of the branch to load
2029
- * Set to null to load the latest/main version
2030
- * Set to undefined to not filter by version
2023
+ * Convert this SpriteMap to binary data
2024
+ * @returns Binary data buffer
2031
2025
  */
2032
- branchVersion?: number | null;
2026
+ toBytes(): Uint8Array;
2033
2027
  }
2028
+ //#endregion
2029
+ //#region src/project/config.d.ts
2034
2030
  /**
2035
- * Query statistics for performance monitoring
2031
+ * Project configuration types
2032
+ * TODO: Implement comprehensive project configuration
2036
2033
  */
2037
- interface QueryStats {
2038
- branchQueryTime: number;
2039
- fileQueryTime: number;
2040
- totalTime: number;
2041
- fileCount: number;
2034
+ interface ProjectConfig {
2035
+ name: string;
2036
+ version: string;
2037
+ description?: string;
2038
+ }
2039
+ //#endregion
2040
+ //#region src/collaboration/index.d.ts
2041
+ /**
2042
+ * Collaboration types and utilities
2043
+ * TODO: Implement collaboration functionality
2044
+ */
2045
+ interface CollaborationConfig {
2046
+ enabled: boolean;
2042
2047
  }
2043
2048
  //#endregion
2044
2049
  //#region src/supabase/client.d.ts
@@ -3162,5 +3167,5 @@ declare const snes: {
3162
3167
  };
3163
3168
  declare const isPlatformNode: string | false;
3164
3169
  //#endregion
3165
- export { Address, AddressSpace, AddressType, AddressingModeHandler, AsmBlock, AsmBlockUtils, AsmReader, Assembler, AssemblerState, BaseRomBranchData, BaseRomBranchFileRaw, BaseRomData, BaseRomFileData, BaseRomFileRaw, BaseRomPayload, BinType, BitStream, BlockReader, BlockReaderConstants, BlockWriter, BranchBaseData, Byte, ChunkFile, ChunkFileUtils, CollaborationConfig, CompressionAlgorithms, CompressionRegistry, CopCommandProcessor, CopDef, CpuMode, Database, DbAddressingMode, DbAsset, DbBaseRomModule, DbBlock, DbConfig, DbEntryPoint, DbFile, DbFileType, DbGameRomModule, DbGroup, DbHeader, DbHeaderPart, DbLabel, DbMnemonic, DbOverride, DbPart, DbPath, DbRewrite, DbRoot, DbRootUtils, DbScene, DbSfx, DbStringCommand, DbStringDictionary, DbStringLayer, DbStringType, DbStringTypeUtils, DbStruct, DbTransform, DeveloperData, DirectoryEntry, FileBaseData, FileBaseRaw, FileReadOptions, FromSupabaseByNameOptions, FromSupabaseByProjectOptions, GameData, GameDeveloperData, GameRomArtifactData, GameRomArtifactRaw, GameRomBranchArtifactRaw, GameRomBranchData, GameRomData, ICompressionProvider, LocationWrapper, Long, MapExt, MemberType, MemoryMapMode, ObjectType, Op, OpCode, OperationContext, PlatformBranchData, PlatformData, PostProcessor, ProcessorStateManager, ProjectBranchData, ProjectBranchFileRaw, ProjectConfig, ProjectData, ProjectFileData, ProjectFileRaw, ProjectPayload, QueryStats, QuintetLZ, ReferenceManager, RegionData, RegisterType, Registers, RomDataReader, RomGenerator, RomLayout, RomProcessingConstants, RomProcessor, RomState, RomStateUtils, RomWriter, SortedMap, SpriteFrame, SpriteGroup, SpriteMap, SpritePart, Stack, StackOperations, StatusFlags, StringEntry, StringMarker, StringProcessor, StringReader, StringSizeComparer, StringWrapper, StructDef, SupabaseErrorCode, SupabaseFromError, SupabaseResult, TableEntry, TransformProcessor, TypeParser, TypedNumber, Word, XformDef, XformType, base64ToUint8Array, binaryToUtf8String, bytesToHex, clamp, crc32_buffer, crc32_text_utf16, crc32_text_utf8, createChunkFileFromDbBlock, createChunkFileFromDbFile, createDbPath, createSupabaseClient, createTempDirectory, decodeBase64, decodeBase64String, decodeDataString, encodeBase64, encodeBase64String, fileExists, fromSupabaseByGameRom, fromSupabaseById, fromSupabaseByName, fromSupabaseByProject, getDirectory, getEnvVar, getNestedProperty, getSupabaseClient, hexToBytes, hexToUint8Array, indexOfAny, isPlatformNode, isValidBase64, listDirectory, readFileAsBinary, readFileAsText, readJsonFile, removeDirectory, resetSupabaseClient, saveFileAsBinary, saveFileAsText, snes, summaryFromSupabaseByProject, uint8ArrayToBase64, validateEnvironmentVariables };
3170
+ export { Address, AddressSpace, AddressType, AddressingModeHandler, AsmBlock, AsmBlockUtils, AsmReader, Assembler, AssemblerState, BaseRomBranchData, BaseRomBranchFileRaw, BaseRomData, BaseRomFileData, BaseRomFileRaw, BaseRomPayload, BinType, BitStream, BlockReader, BlockReaderConstants, BlockWriter, BranchBaseData, Byte, ChunkFile, ChunkFileUtils, CollaborationConfig, CompressionAlgorithms, CompressionRegistry, CopCommandProcessor, CopDef, CpuMode, Database, DbAddressingMode, DbAsset, DbBaseRomModule, DbBlock, DbConfig, DbEntryPoint, DbFile, DbFileType, DbGameRomModule, DbGroup, DbHeader, DbHeaderPart, DbLabel, DbMnemonic, DbOverride, DbPart, DbPath, DbProjectModule, DbRewrite, DbRoot, DbRootUtils, DbScene, DbSfx, DbStringCommand, DbStringDictionary, DbStringLayer, DbStringType, DbStringTypeUtils, DbStruct, DbTransform, DeveloperData, DirectoryEntry, FileBaseData, FileBaseRaw, FileReadOptions, FromSupabaseByNameOptions, FromSupabaseByProjectOptions, GameData, GameDeveloperData, GameRomArtifactData, GameRomArtifactRaw, GameRomBranchArtifactRaw, GameRomBranchData, GameRomData, ICompressionProvider, LocationWrapper, Long, MapExt, MemberType, MemoryMapMode, ObjectType, Op, OpCode, OperationContext, PlatformBranchData, PlatformData, PostProcessor, ProcessorStateManager, ProjectBranchData, ProjectBranchFileRaw, ProjectConfig, ProjectData, ProjectFileData, ProjectFileRaw, ProjectPayload, QueryStats, QuintetLZ, ReferenceManager, RegionData, RegisterType, Registers, RomDataReader, RomGenerator, RomLayout, RomProcessingConstants, RomProcessor, RomState, RomStateUtils, RomWriter, SortedMap, SpriteFrame, SpriteGroup, SpriteMap, SpritePart, Stack, StackOperations, StatusFlags, StringEntry, StringMarker, StringProcessor, StringReader, StringSizeComparer, StringWrapper, StructDef, SupabaseErrorCode, SupabaseFromError, SupabaseResult, TableEntry, TransformProcessor, TypeParser, TypedNumber, Word, XformDef, XformType, base64ToUint8Array, binaryToUtf8String, bytesToHex, clamp, crc32_buffer, crc32_text_utf16, crc32_text_utf8, createChunkFileFromDbBlock, createChunkFileFromDbFile, createDbPath, createSupabaseClient, createTempDirectory, decodeBase64, decodeBase64String, decodeDataString, encodeBase64, encodeBase64String, fileExists, fromSupabaseByGameRom, fromSupabaseById, fromSupabaseByName, fromSupabaseByProject, getDirectory, getEnvVar, getNestedProperty, getSupabaseClient, hexToBytes, hexToUint8Array, indexOfAny, isPlatformNode, isValidBase64, listDirectory, readFileAsBinary, readFileAsText, readJsonFile, removeDirectory, resetSupabaseClient, saveFileAsBinary, saveFileAsText, snes, summaryFromSupabaseByProject, uint8ArrayToBase64, validateEnvironmentVariables };
3166
3171
  //# sourceMappingURL=index.d.cts.map