@elite-dangerous-almanac/core 0.1.0-beta.1

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.
Files changed (357) hide show
  1. package/LICENSE +48 -0
  2. package/PROVENANCE/SNAPSHOTS.md +36 -0
  3. package/PROVENANCE/astro/SOURCES.md +94 -0
  4. package/PROVENANCE/commodities/SOURCES.md +41 -0
  5. package/PROVENANCE/materials/SOURCES.md +69 -0
  6. package/PROVENANCE/ships/SOURCES.md +1580 -0
  7. package/README.md +148 -0
  8. package/THIRD_PARTY_NOTICES.md +202 -0
  9. package/dist/astro/codex-region-lookup.d.ts +169 -0
  10. package/dist/astro/codex-region-lookup.js +1 -0
  11. package/dist/astro/codex-region-lookup.js.map +1 -0
  12. package/dist/astro/codex-region.d.ts +149 -0
  13. package/dist/astro/codex-region.js +1 -0
  14. package/dist/astro/codex-region.js.map +1 -0
  15. package/dist/astro/galaxy-grid.d.ts +83 -0
  16. package/dist/astro/galaxy-grid.js +1 -0
  17. package/dist/astro/galaxy-grid.js.map +1 -0
  18. package/dist/astro/hand-authored-regions.d.ts +121 -0
  19. package/dist/astro/hand-authored-regions.js +1 -0
  20. package/dist/astro/hand-authored-regions.js.map +1 -0
  21. package/dist/astro/index.d.ts +140 -0
  22. package/dist/astro/index.js +1 -0
  23. package/dist/astro/index.js.map +1 -0
  24. package/dist/astro/mass-code.d.ts +55 -0
  25. package/dist/astro/mass-code.js +1 -0
  26. package/dist/astro/mass-code.js.map +1 -0
  27. package/dist/astro/naming-region-origins.d.ts +4 -0
  28. package/dist/astro/naming-region-origins.js +1 -0
  29. package/dist/astro/naming-region-origins.js.map +1 -0
  30. package/dist/astro/nebulae-all.d.ts +40 -0
  31. package/dist/astro/nebulae-all.js +1 -0
  32. package/dist/astro/nebulae-all.js.map +1 -0
  33. package/dist/astro/nebulae-planetary.d.ts +37 -0
  34. package/dist/astro/nebulae-planetary.js +1 -0
  35. package/dist/astro/nebulae-planetary.js.map +1 -0
  36. package/dist/astro/nebulae-procgen.d.ts +36 -0
  37. package/dist/astro/nebulae-procgen.js +1 -0
  38. package/dist/astro/nebulae-procgen.js.map +1 -0
  39. package/dist/astro/nebulae-real.d.ts +37 -0
  40. package/dist/astro/nebulae-real.js +1 -0
  41. package/dist/astro/nebulae-real.js.map +1 -0
  42. package/dist/astro/nebulae.d.ts +169 -0
  43. package/dist/astro/nebulae.js +1 -0
  44. package/dist/astro/nebulae.js.map +1 -0
  45. package/dist/astro/permit-locked-regions.d.ts +54 -0
  46. package/dist/astro/permit-locked-regions.js +1 -0
  47. package/dist/astro/permit-locked-regions.js.map +1 -0
  48. package/dist/astro/permit-locked-systems.d.ts +74 -0
  49. package/dist/astro/permit-locked-systems.js +1 -0
  50. package/dist/astro/permit-locked-systems.js.map +1 -0
  51. package/dist/astro/permit-locks.d.ts +130 -0
  52. package/dist/astro/permit-locks.js +1 -0
  53. package/dist/astro/permit-locks.js.map +1 -0
  54. package/dist/astro/procedural-system.d.ts +228 -0
  55. package/dist/astro/procedural-system.js +1 -0
  56. package/dist/astro/procedural-system.js.map +1 -0
  57. package/dist/astro/sector-name.d.ts +87 -0
  58. package/dist/astro/sector-name.js +1 -0
  59. package/dist/astro/sector-name.js.map +1 -0
  60. package/dist/astro/system-address-input.d.ts +76 -0
  61. package/dist/astro/system-address-input.js +1 -0
  62. package/dist/astro/system-address-input.js.map +1 -0
  63. package/dist/astro/system-address.d.ts +4 -0
  64. package/dist/astro/system-address.js +1 -0
  65. package/dist/astro/system-address.js.map +1 -0
  66. package/dist/astro/system-name.d.ts +187 -0
  67. package/dist/astro/system-name.js +1 -0
  68. package/dist/astro/system-name.js.map +1 -0
  69. package/dist/chunk-2FHHMYDC.js +1 -0
  70. package/dist/chunk-2FHHMYDC.js.map +1 -0
  71. package/dist/chunk-462OKHXR.js +1 -0
  72. package/dist/chunk-462OKHXR.js.map +1 -0
  73. package/dist/chunk-5H74FKY7.js +1 -0
  74. package/dist/chunk-5H74FKY7.js.map +1 -0
  75. package/dist/chunk-6LUEKHO5.js +1 -0
  76. package/dist/chunk-6LUEKHO5.js.map +1 -0
  77. package/dist/chunk-76XKY2Y2.js +1 -0
  78. package/dist/chunk-76XKY2Y2.js.map +1 -0
  79. package/dist/chunk-7EE5VIHR.js +1 -0
  80. package/dist/chunk-7EE5VIHR.js.map +1 -0
  81. package/dist/chunk-A3NM7SAJ.js +1 -0
  82. package/dist/chunk-A3NM7SAJ.js.map +1 -0
  83. package/dist/chunk-A6XPYSVR.js +1 -0
  84. package/dist/chunk-A6XPYSVR.js.map +1 -0
  85. package/dist/chunk-AA3K5XUE.js +1 -0
  86. package/dist/chunk-AA3K5XUE.js.map +1 -0
  87. package/dist/chunk-AVZI6VKA.js +1 -0
  88. package/dist/chunk-AVZI6VKA.js.map +1 -0
  89. package/dist/chunk-B5TT26XE.js +1 -0
  90. package/dist/chunk-B5TT26XE.js.map +1 -0
  91. package/dist/chunk-BNILZXJD.js +1 -0
  92. package/dist/chunk-BNILZXJD.js.map +1 -0
  93. package/dist/chunk-BRDQUJXV.js +1 -0
  94. package/dist/chunk-BRDQUJXV.js.map +1 -0
  95. package/dist/chunk-BTPV5CIF.js +1 -0
  96. package/dist/chunk-BTPV5CIF.js.map +1 -0
  97. package/dist/chunk-CI3ACMRA.js +1 -0
  98. package/dist/chunk-CI3ACMRA.js.map +1 -0
  99. package/dist/chunk-COE5ADYJ.js +1 -0
  100. package/dist/chunk-COE5ADYJ.js.map +1 -0
  101. package/dist/chunk-CWAX3BSH.js +1 -0
  102. package/dist/chunk-CWAX3BSH.js.map +1 -0
  103. package/dist/chunk-DACZE3HX.js +1 -0
  104. package/dist/chunk-DACZE3HX.js.map +1 -0
  105. package/dist/chunk-DURKO7JU.js +1 -0
  106. package/dist/chunk-DURKO7JU.js.map +1 -0
  107. package/dist/chunk-E45EDCYH.js +1 -0
  108. package/dist/chunk-E45EDCYH.js.map +1 -0
  109. package/dist/chunk-ELIZXUMI.js +1 -0
  110. package/dist/chunk-ELIZXUMI.js.map +1 -0
  111. package/dist/chunk-EYGVDJ2I.js +1 -0
  112. package/dist/chunk-EYGVDJ2I.js.map +1 -0
  113. package/dist/chunk-FGXWVFN6.js +1 -0
  114. package/dist/chunk-FGXWVFN6.js.map +1 -0
  115. package/dist/chunk-GJCB2Z72.js +1 -0
  116. package/dist/chunk-GJCB2Z72.js.map +1 -0
  117. package/dist/chunk-HI7FCS3G.js +1 -0
  118. package/dist/chunk-HI7FCS3G.js.map +1 -0
  119. package/dist/chunk-HKXXFIRI.js +1 -0
  120. package/dist/chunk-HKXXFIRI.js.map +1 -0
  121. package/dist/chunk-HTB52N6S.js +1 -0
  122. package/dist/chunk-HTB52N6S.js.map +1 -0
  123. package/dist/chunk-I7PIDRMU.js +1 -0
  124. package/dist/chunk-I7PIDRMU.js.map +1 -0
  125. package/dist/chunk-IH4NXKVW.js +1 -0
  126. package/dist/chunk-IH4NXKVW.js.map +1 -0
  127. package/dist/chunk-INNFH37U.js +1 -0
  128. package/dist/chunk-INNFH37U.js.map +1 -0
  129. package/dist/chunk-J2PNZQY4.js +1 -0
  130. package/dist/chunk-J2PNZQY4.js.map +1 -0
  131. package/dist/chunk-JQG4C67D.js +1 -0
  132. package/dist/chunk-JQG4C67D.js.map +1 -0
  133. package/dist/chunk-JTQVWIGL.js +1 -0
  134. package/dist/chunk-JTQVWIGL.js.map +1 -0
  135. package/dist/chunk-JWJ7RSZC.js +1 -0
  136. package/dist/chunk-JWJ7RSZC.js.map +1 -0
  137. package/dist/chunk-K3AMV27L.js +1 -0
  138. package/dist/chunk-K3AMV27L.js.map +1 -0
  139. package/dist/chunk-K7F6WC4T.js +1 -0
  140. package/dist/chunk-K7F6WC4T.js.map +1 -0
  141. package/dist/chunk-K7L7SMIR.js +1 -0
  142. package/dist/chunk-K7L7SMIR.js.map +1 -0
  143. package/dist/chunk-KG4EWDZZ.js +1 -0
  144. package/dist/chunk-KG4EWDZZ.js.map +1 -0
  145. package/dist/chunk-KMFUCORC.js +1 -0
  146. package/dist/chunk-KMFUCORC.js.map +1 -0
  147. package/dist/chunk-L2ZZXEZM.js +1 -0
  148. package/dist/chunk-L2ZZXEZM.js.map +1 -0
  149. package/dist/chunk-L747RVPO.js +1 -0
  150. package/dist/chunk-L747RVPO.js.map +1 -0
  151. package/dist/chunk-MFV4VZFP.js +1 -0
  152. package/dist/chunk-MFV4VZFP.js.map +1 -0
  153. package/dist/chunk-NWPK6Q3S.js +1 -0
  154. package/dist/chunk-NWPK6Q3S.js.map +1 -0
  155. package/dist/chunk-PMJG7PHU.js +1 -0
  156. package/dist/chunk-PMJG7PHU.js.map +1 -0
  157. package/dist/chunk-PP2VSA6M.js +1 -0
  158. package/dist/chunk-PP2VSA6M.js.map +1 -0
  159. package/dist/chunk-Q22LXT53.js +1 -0
  160. package/dist/chunk-Q22LXT53.js.map +1 -0
  161. package/dist/chunk-Q5MR36RW.js +1 -0
  162. package/dist/chunk-Q5MR36RW.js.map +1 -0
  163. package/dist/chunk-Q5XOGATC.js +1 -0
  164. package/dist/chunk-Q5XOGATC.js.map +1 -0
  165. package/dist/chunk-QTDBO7R2.js +1 -0
  166. package/dist/chunk-QTDBO7R2.js.map +1 -0
  167. package/dist/chunk-R4OD62HV.js +1 -0
  168. package/dist/chunk-R4OD62HV.js.map +1 -0
  169. package/dist/chunk-RD73TFGS.js +1 -0
  170. package/dist/chunk-RD73TFGS.js.map +1 -0
  171. package/dist/chunk-RIT6MOO5.js +1 -0
  172. package/dist/chunk-RIT6MOO5.js.map +1 -0
  173. package/dist/chunk-RVSXKQHE.js +1 -0
  174. package/dist/chunk-RVSXKQHE.js.map +1 -0
  175. package/dist/chunk-S4DBNX2B.js +1 -0
  176. package/dist/chunk-S4DBNX2B.js.map +1 -0
  177. package/dist/chunk-S4UWCHL6.js +1 -0
  178. package/dist/chunk-S4UWCHL6.js.map +1 -0
  179. package/dist/chunk-SQS7672E.js +1 -0
  180. package/dist/chunk-SQS7672E.js.map +1 -0
  181. package/dist/chunk-TLNHETGC.js +1 -0
  182. package/dist/chunk-TLNHETGC.js.map +1 -0
  183. package/dist/chunk-U6TMCYA6.js +1 -0
  184. package/dist/chunk-U6TMCYA6.js.map +1 -0
  185. package/dist/chunk-V4C6FIE2.js +1 -0
  186. package/dist/chunk-V4C6FIE2.js.map +1 -0
  187. package/dist/chunk-VXVUEF5U.js +1 -0
  188. package/dist/chunk-VXVUEF5U.js.map +1 -0
  189. package/dist/chunk-VZXL5KBR.js +1 -0
  190. package/dist/chunk-VZXL5KBR.js.map +1 -0
  191. package/dist/chunk-VZZ2XIRE.js +1 -0
  192. package/dist/chunk-VZZ2XIRE.js.map +1 -0
  193. package/dist/chunk-WV5YM7H5.js +1 -0
  194. package/dist/chunk-WV5YM7H5.js.map +1 -0
  195. package/dist/chunk-Y2MUIE5W.js +1 -0
  196. package/dist/chunk-Y2MUIE5W.js.map +1 -0
  197. package/dist/chunk-Z43DN4PY.js +1 -0
  198. package/dist/chunk-Z43DN4PY.js.map +1 -0
  199. package/dist/chunk-Z4GTTB7I.js +1 -0
  200. package/dist/chunk-Z4GTTB7I.js.map +1 -0
  201. package/dist/chunk-Z4OUB4SJ.js +1 -0
  202. package/dist/chunk-Z4OUB4SJ.js.map +1 -0
  203. package/dist/chunk-ZFT56QFR.js +1 -0
  204. package/dist/chunk-ZFT56QFR.js.map +1 -0
  205. package/dist/chunk-ZNCXENNB.js +1 -0
  206. package/dist/chunk-ZNCXENNB.js.map +1 -0
  207. package/dist/commodities/commodities-all.d.ts +25 -0
  208. package/dist/commodities/commodities-all.js +1 -0
  209. package/dist/commodities/commodities-all.js.map +1 -0
  210. package/dist/commodities/commodities-rare.d.ts +34 -0
  211. package/dist/commodities/commodities-rare.js +1 -0
  212. package/dist/commodities/commodities-rare.js.map +1 -0
  213. package/dist/commodities/commodities-standard.d.ts +34 -0
  214. package/dist/commodities/commodities-standard.js +1 -0
  215. package/dist/commodities/commodities-standard.js.map +1 -0
  216. package/dist/commodities/commodities.d.ts +142 -0
  217. package/dist/commodities/commodities.js +1 -0
  218. package/dist/commodities/commodities.js.map +1 -0
  219. package/dist/commodities/index.d.ts +30 -0
  220. package/dist/commodities/index.js +1 -0
  221. package/dist/commodities/index.js.map +1 -0
  222. package/dist/galactic-position-shLkm4Qg.d.ts +30 -0
  223. package/dist/materials/index.d.ts +47 -0
  224. package/dist/materials/index.js +1 -0
  225. package/dist/materials/index.js.map +1 -0
  226. package/dist/materials/materials-all.d.ts +26 -0
  227. package/dist/materials/materials-all.js +1 -0
  228. package/dist/materials/materials-all.js.map +1 -0
  229. package/dist/materials/materials-encoded.d.ts +31 -0
  230. package/dist/materials/materials-encoded.js +1 -0
  231. package/dist/materials/materials-encoded.js.map +1 -0
  232. package/dist/materials/materials-manufactured.d.ts +32 -0
  233. package/dist/materials/materials-manufactured.js +1 -0
  234. package/dist/materials/materials-manufactured.js.map +1 -0
  235. package/dist/materials/materials-raw.d.ts +31 -0
  236. package/dist/materials/materials-raw.js +1 -0
  237. package/dist/materials/materials-raw.js.map +1 -0
  238. package/dist/materials/materials.d.ts +277 -0
  239. package/dist/materials/materials.js +1 -0
  240. package/dist/materials/materials.js.map +1 -0
  241. package/dist/materials/micro-resources-all.d.ts +28 -0
  242. package/dist/materials/micro-resources-all.js +1 -0
  243. package/dist/materials/micro-resources-all.js.map +1 -0
  244. package/dist/materials/micro-resources-component.d.ts +29 -0
  245. package/dist/materials/micro-resources-component.js +1 -0
  246. package/dist/materials/micro-resources-component.js.map +1 -0
  247. package/dist/materials/micro-resources-consumable.d.ts +29 -0
  248. package/dist/materials/micro-resources-consumable.js +1 -0
  249. package/dist/materials/micro-resources-consumable.js.map +1 -0
  250. package/dist/materials/micro-resources-data.d.ts +29 -0
  251. package/dist/materials/micro-resources-data.js +1 -0
  252. package/dist/materials/micro-resources-data.js.map +1 -0
  253. package/dist/materials/micro-resources-item.d.ts +29 -0
  254. package/dist/materials/micro-resources-item.js +1 -0
  255. package/dist/materials/micro-resources-item.js.map +1 -0
  256. package/dist/materials/micro-resources.d.ts +136 -0
  257. package/dist/materials/micro-resources.js +1 -0
  258. package/dist/materials/micro-resources.js.map +1 -0
  259. package/dist/ship-loadout-Ba63RDf-.d.ts +1059 -0
  260. package/dist/ships/ammunition.d.ts +107 -0
  261. package/dist/ships/ammunition.js +1 -0
  262. package/dist/ships/ammunition.js.map +1 -0
  263. package/dist/ships/armour.d.ts +134 -0
  264. package/dist/ships/armour.js +1 -0
  265. package/dist/ships/armour.js.map +1 -0
  266. package/dist/ships/blueprint-costs.d.ts +128 -0
  267. package/dist/ships/blueprint-costs.js +1 -0
  268. package/dist/ships/blueprint-costs.js.map +1 -0
  269. package/dist/ships/blueprint-journal.d.ts +116 -0
  270. package/dist/ships/blueprint-journal.js +1 -0
  271. package/dist/ships/blueprint-journal.js.map +1 -0
  272. package/dist/ships/blueprints.d.ts +103 -0
  273. package/dist/ships/blueprints.js +1 -0
  274. package/dist/ships/blueprints.js.map +1 -0
  275. package/dist/ships/decorative-modifications.d.ts +176 -0
  276. package/dist/ships/decorative-modifications.js +1 -0
  277. package/dist/ships/decorative-modifications.js.map +1 -0
  278. package/dist/ships/engineering-options.d.ts +246 -0
  279. package/dist/ships/engineering-options.js +1 -0
  280. package/dist/ships/engineering-options.js.map +1 -0
  281. package/dist/ships/engineering.d.ts +229 -0
  282. package/dist/ships/engineering.js +1 -0
  283. package/dist/ships/engineering.js.map +1 -0
  284. package/dist/ships/experimental-effect-costs.d.ts +56 -0
  285. package/dist/ships/experimental-effect-costs.js +1 -0
  286. package/dist/ships/experimental-effect-costs.js.map +1 -0
  287. package/dist/ships/experimental-effects.d.ts +62 -0
  288. package/dist/ships/experimental-effects.js +1 -0
  289. package/dist/ships/experimental-effects.js.map +1 -0
  290. package/dist/ships/index.d.ts +205 -0
  291. package/dist/ships/index.js +1 -0
  292. package/dist/ships/index.js.map +1 -0
  293. package/dist/ships/jump-range.d.ts +115 -0
  294. package/dist/ships/jump-range.js +1 -0
  295. package/dist/ships/jump-range.js.map +1 -0
  296. package/dist/ships/loadout-calculations.d.ts +109 -0
  297. package/dist/ships/loadout-calculations.js +1 -0
  298. package/dist/ships/loadout-calculations.js.map +1 -0
  299. package/dist/ships/loadout-validation.d.ts +80 -0
  300. package/dist/ships/loadout-validation.js +1 -0
  301. package/dist/ships/loadout-validation.js.map +1 -0
  302. package/dist/ships/module-capabilities.d.ts +205 -0
  303. package/dist/ships/module-capabilities.js +1 -0
  304. package/dist/ships/module-capabilities.js.map +1 -0
  305. package/dist/ships/modules-all.d.ts +43 -0
  306. package/dist/ships/modules-all.js +1 -0
  307. package/dist/ships/modules-all.js.map +1 -0
  308. package/dist/ships/modules-core.d.ts +40 -0
  309. package/dist/ships/modules-core.js +1 -0
  310. package/dist/ships/modules-core.js.map +1 -0
  311. package/dist/ships/modules-hardpoint.d.ts +42 -0
  312. package/dist/ships/modules-hardpoint.js +1 -0
  313. package/dist/ships/modules-hardpoint.js.map +1 -0
  314. package/dist/ships/modules-internal.d.ts +40 -0
  315. package/dist/ships/modules-internal.js +1 -0
  316. package/dist/ships/modules-internal.js.map +1 -0
  317. package/dist/ships/modules-utility.d.ts +40 -0
  318. package/dist/ships/modules-utility.js +1 -0
  319. package/dist/ships/modules-utility.js.map +1 -0
  320. package/dist/ships/modules.d.ts +755 -0
  321. package/dist/ships/modules.js +1 -0
  322. package/dist/ships/modules.js.map +1 -0
  323. package/dist/ships/power.d.ts +168 -0
  324. package/dist/ships/power.js +1 -0
  325. package/dist/ships/power.js.map +1 -0
  326. package/dist/ships/pre-engineered-stats.d.ts +147 -0
  327. package/dist/ships/pre-engineered-stats.js +1 -0
  328. package/dist/ships/pre-engineered-stats.js.map +1 -0
  329. package/dist/ships/pre-engineered.d.ts +215 -0
  330. package/dist/ships/pre-engineered.js +1 -0
  331. package/dist/ships/pre-engineered.js.map +1 -0
  332. package/dist/ships/resistances.d.ts +208 -0
  333. package/dist/ships/resistances.js +1 -0
  334. package/dist/ships/resistances.js.map +1 -0
  335. package/dist/ships/shields.d.ts +221 -0
  336. package/dist/ships/shields.js +1 -0
  337. package/dist/ships/shields.js.map +1 -0
  338. package/dist/ships/ship-loadout.d.ts +16 -0
  339. package/dist/ships/ship-loadout.js +1 -0
  340. package/dist/ships/ship-loadout.js.map +1 -0
  341. package/dist/ships/ships.d.ts +191 -0
  342. package/dist/ships/ships.js +1 -0
  343. package/dist/ships/ships.js.map +1 -0
  344. package/dist/ships/slef.d.ts +318 -0
  345. package/dist/ships/slef.js +1 -0
  346. package/dist/ships/slef.js.map +1 -0
  347. package/dist/ships/slots.d.ts +418 -0
  348. package/dist/ships/slots.js +1 -0
  349. package/dist/ships/slots.js.map +1 -0
  350. package/dist/ships/source-purchase.d.ts +132 -0
  351. package/dist/ships/source-purchase.js +1 -0
  352. package/dist/ships/source-purchase.js.map +1 -0
  353. package/dist/ships/weapons.d.ts +380 -0
  354. package/dist/ships/weapons.js +1 -0
  355. package/dist/ships/weapons.js.map +1 -0
  356. package/dist/system-address-DYsN1qOT.d.ts +313 -0
  357. package/package.json +375 -0
package/README.md ADDED
@@ -0,0 +1,148 @@
1
+ # @elite-dangerous-almanac/core
2
+
3
+ Tree-shakeable Elite Dangerous static data and calculations for TypeScript and
4
+ JavaScript applications.
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ npm install @elite-dangerous-almanac/core
10
+ ```
11
+
12
+ The package is ESM-only, supports Node.js 22+ and targets modern browser bundlers.
13
+ It is marked side-effect free.
14
+
15
+ The package includes game and community data under source-specific terms. Review
16
+ [LICENSE](./LICENSE) and [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md) before
17
+ redistribution or commercial use.
18
+
19
+ ## Imports
20
+
21
+ Use a feature barrel when a bundler will tree-shake it:
22
+
23
+ ```ts
24
+ import { ProceduralSystem } from '@elite-dangerous-almanac/core/astro';
25
+ ```
26
+
27
+ There is no package-wide root entry; choose one of the four feature areas or a leaf.
28
+
29
+ Use leaf subpaths to avoid evaluating unrelated data modules in native ESM:
30
+
31
+ ```ts
32
+ import { ProceduralSystem } from '@elite-dangerous-almanac/core/astro/procedural-system';
33
+ import { ShipLoadout } from '@elite-dangerous-almanac/core/ships/ship-loadout';
34
+ ```
35
+
36
+ The heavyweight module registries, planetary/combined nebula catalogues and codex-region
37
+ coordinate lookup are only exported from their leaf subpaths, not the feature barrels.
38
+
39
+ The package has four feature areas:
40
+
41
+ - `astro`: procedural names, id64 addresses, regions, nebulae and permit locks;
42
+ - `ships`: ships, modules, SLEF loadouts, engineering and build metrics;
43
+ - `materials`: ship engineering materials and Odyssey micro resources;
44
+ - `commodities`: standard and rare market goods.
45
+
46
+ ## Examples
47
+
48
+ ```ts
49
+ import { ProceduralSystem } from '@elite-dangerous-almanac/core/astro/procedural-system';
50
+
51
+ const system = ProceduralSystem.fromName('Synuefe EN-H d11-96');
52
+ system?.systemAddress; // -> 3309179996515n
53
+ ProceduralSystem.fromSystemAddress(3309179996515n).name;
54
+ // -> "Synuefe EN-H d11-96"
55
+ ```
56
+
57
+ Address inputs accept `bigint`, safe integer `number` values and decimal strings.
58
+ Addresses are returned as `bigint`.
59
+
60
+ ```ts
61
+ import { ShipLoadout } from '@elite-dangerous-almanac/core/ships/ship-loadout';
62
+
63
+ declare const slefJsonString: string;
64
+
65
+ const build = ShipLoadout.fromSlef(slefJsonString);
66
+ build.maxJumpRange();
67
+ build.powerBudget();
68
+ build.shieldMetrics();
69
+ build.armourMetrics();
70
+ build.weaponMetrics();
71
+
72
+ build.toSlefString({
73
+ header: { appName: 'MyApp', appVersion: '1.0.0' },
74
+ });
75
+ ```
76
+
77
+ `ShipLoadout` imports every ship and module catalogue so it can resolve any build.
78
+ When only one calculation is required, use the data-free leaf modules under
79
+ `ships/jump-range`, `ships/power`, `ships/shields`, `ships/armour`, `ships/weapons`,
80
+ `ships/ammunition` or `ships/resistances`.
81
+
82
+ `build.validation` reports validity and operational completeness. Potentially incomplete
83
+ aggregates are nullable and have a diagnostic counterpart (`cargoCapacityResult`,
84
+ `fuelCapacityResult`, `unladenMassResult`). `parseSlef` is strict; `inspectSlef` is the
85
+ tolerant importer for mixed files and returns indexed diagnostics instead of silently
86
+ dropping entries.
87
+
88
+ ```ts
89
+ import { getShipBySymbol } from '@elite-dangerous-almanac/core/ships/ships';
90
+ import { getMaterialByName } from '@elite-dangerous-almanac/core/materials/materials';
91
+ import { getCommodityByName } from '@elite-dangerous-almanac/core/commodities/commodities';
92
+
93
+ getShipBySymbol('empire_trader')?.name; // -> "Imperial Clipper"
94
+ getMaterialByName('iron')?.grade;
95
+ getCommodityByName('lavian brandy')?.rare; // -> true
96
+ ```
97
+
98
+ Registry lookups ignore case and surrounding whitespace. Material, commodity and
99
+ module lookups search their complete registry by default and accept an optional
100
+ catalogue to narrow the results. Nebula queries require an explicit catalogue so the
101
+ large combined dataset is never an implicit dependency.
102
+
103
+ `symbol` is Frontier's item id for a hull, module, material, micro-resource or
104
+ commodity. Engineering uses a separate identity space: `fdname` identifies a
105
+ blueprint recipe, experimental effect or decorative modification. The journal
106
+ normally writes that id in its `Engineering` block, but a few blueprint aliases
107
+ collide across module families; `resolveBlueprintForModule` resolves those journal
108
+ spellings. Functions that ask what engineering a module accepts therefore take the
109
+ module's `symbol`; functions that look up a recipe, effect or modification take its
110
+ `fdname`.
111
+
112
+ ## Important behavior
113
+
114
+ - Exported catalogues are deeply frozen.
115
+ - Slot keys come from the game and are not reliably derivable from position. Enumerate
116
+ them with `ShipLoadout.slots()` or `enumerateSlots`.
117
+ - Resistances are fractions, not percentages.
118
+ - Build credits are quoted at catalogue retail. What a capture says it paid is kept
119
+ apart, unedited, as `ShipLoadout.sourcePurchase`, and is exported only when asked for
120
+ by name with `{ credits: 'source' }`.
121
+ - Absent catalogue fields are omitted rather than represented by zero. Catalogue
122
+ provenance records unresolved data gaps.
123
+ - Lookups return `null`; malformed inputs throw `TypeError`; unsupported ranges throw
124
+ `RangeError`.
125
+ - `parseSlef`, `inspectSlef` and `ShipLoadout.fromSlef` throw `SyntaxError` when handed a
126
+ string that is not valid JSON. Past that, a payload number outside its documented
127
+ journal range counts as malformed rather than out of range: `parseSlef` and
128
+ `ShipLoadout.fromSlef` throw `TypeError`, not `RangeError`, and `inspectSlef` reports it
129
+ as a diagnostic.
130
+
131
+ The [repository README](https://github.com/DarkSession/Elite-Dangerous-Almanac#readme)
132
+ contains the project guide. The generated
133
+ [GitHub Wiki](https://github.com/DarkSession/Elite-Dangerous-Almanac/wiki) contains the
134
+ complete API reference.
135
+
136
+ ## Data and credits
137
+
138
+ The package's [provenance record](./PROVENANCE/SNAPSHOTS.md) includes every domain's
139
+ canonical `SOURCES.md` verbatim, recording each catalogue's source, acquisition date,
140
+ immutable revision or checksum, derivation and manual corrections. It travels with the
141
+ installed version, so its pinned data currency can be checked offline. Unknown values
142
+ are omitted rather than guessed.
143
+
144
+ Third-party credits and licence terms ship with the package in
145
+ [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md).
146
+
147
+ The project's code and documentation are MIT-licensed. Bundled game and third-party
148
+ data remains under its source-specific terms and is not relicensed under MIT.
@@ -0,0 +1,202 @@
1
+ # Attributions and third-party notices
2
+
3
+ Elite Dangerous Almanac incorporates community-researched algorithms and factual
4
+ galaxy data. The project's own implementation is MIT-licensed; upstream material
5
+ remains subject to its own terms, several of which are **non-commercial**. Read
6
+ this file and `LICENSE` before redistributing the data or using it commercially.
7
+
8
+ **This is the one place a source is described.** Each source is described in one of the
9
+ sections below — its author, its link and its licence position — and where an entry names
10
+ a source another section covers, it does so as a cross-reference rather than a second
11
+ description. Nothing else in the repository repeats that: a data file's comment header
12
+ names the source and points here, and each
13
+ `data/<domain>/SOURCES.md` records what was taken from it — the acquisition date, the
14
+ pinned revision, the derivation and every manual correction — referring to it by name
15
+ alone. Test fixtures carry their own provenance in their file header.
16
+
17
+ This file is shipped to npm consumers inside the package as `THIRD_PARTY_NOTICES.md`,
18
+ a verbatim copy produced at build time — edit this file, never the copy.
19
+
20
+ ## Algorithms
21
+
22
+ - **Procedural sector and system naming** — reverse-engineered by the Elite Dangerous
23
+ community and ported from the EDTS reference implementation (`edtslib/pgdata.py`,
24
+ `edtslib/pgnames.py`) by **Andy Martin** (Esvandiary),
25
+ <https://bitbucket.org/Esvandiary/edts>, **BSD 3-Clause, © 2016 Andy Martin** —
26
+ reproduced in full at the end of this file, as its terms require. The TypeScript port
27
+ passed through canonn-signals (credited under Data below) before being restructured
28
+ here. (EDTS lives on Bitbucket, not GitHub.)
29
+ - **[EDCD/Coriolis](https://github.com/EDCD/coriolis)** — the Coriolis _application_, by
30
+ the **Coriolis contributors**, whose code is **MIT**-licensed. (Its data repository is a
31
+ separate credit, under Data below.) The **build-metric algorithms** are ported as fact
32
+ (our own implementation) from it: the power budget and its priority groups, shield
33
+ strength and its mass curve, armour hit points, resistance stacking with its diminishing
34
+ returns, and weapon DPS / capacitor draw / heat. It credits the original Frontier-forum
35
+ research the formulas come from.
36
+ - **The jump-range and fuel algorithm**, the **engineered ammunition rounding** rule and
37
+ the **build metrics above** are cross-checked against, or ported as fact from, EDSY
38
+ (credited under Data below). The jump-range model derives from Frontier's "mass effect on
39
+ hyperspace range" description; Coriolis carries the same maths for the metrics, and a clip
40
+ round-up that omits EDSY's burst step, where EDSY is followed.
41
+ - **Galactic codex region lookup** — resolving a region from galactic coordinates or from a
42
+ boxel, ported as fact (our own implementation) from `RegionMap.js` in
43
+ EliteDangerousRegionMap, whose region tables are credited under Data below.
44
+ - **SLEF parsing and writing** — both follow the
45
+ [Inara Ship Loadout Export Format specification](https://inara.cz/elite/inara-impexp-slef/)
46
+ published by **Inara** (Artie).
47
+
48
+ ## Data
49
+
50
+ - **[EDCD FDevIDs](https://github.com/EDCD/FDevIDs)** — the community-maintained registry
51
+ of Frontier's internal ids and names. Supplies the identities of materials and micro
52
+ resources, ships and outfitting modules, and standard and rare market commodities.
53
+ FDevIDs states no explicit licence; consult the repository terms before redistributing
54
+ the raw identifiers.
55
+ - **[EDCD/coriolis-data](https://github.com/EDCD/coriolis-data)** — ship and module
56
+ stats, per-hull slot layouts, engineering blueprint modifiers and their material
57
+ recipes. coriolis-data releases only its _code_ under **MIT**; the JSON stat values are
58
+ **Elite Dangerous game data, property of Frontier Developments plc** — see the Frontier
59
+ notice below.
60
+ - **[EDSY](https://github.com/taleden/EDSY)** by **taleden**, **CC BY-NC 4.0** —
61
+ `eddb.js` and `edsy.js`. Supplies the values coriolis-data leaves blank or carries
62
+ wrongly (module mass, integrity, power draw, boot time, the base stats engineering
63
+ recipes scale), the experimental-effect modifiers and their recipes, the module-group
64
+ engineering menus, the journal slot names, and the attribute-to-journal-Label mapping.
65
+ The values are Elite Dangerous game data — see the Frontier notice below.
66
+ - **[Inara](https://inara.cz/)** — the blueprint and outfitting registries behind the
67
+ Operations pre-engineered blueprints and shop rows, the ship pages used to corroborate
68
+ hull layouts, and the component pages that grade the Thargoid caustic / Titan materials
69
+ absent from FDevIDs.
70
+ - **[EliteDangerousRegionMap](https://github.com/klightspeed/EliteDangerousRegionMap)** by
71
+ **Ben Peddell** ([klightspeed](https://github.com/klightspeed)), **MIT** — the 42
72
+ galactic codex regions, their ids and their lookup geometry. Original region-boundary
73
+ research on the
74
+ [Frontier forums](https://forums.frontier.co.uk/threads/determining-the-region-of-a-system.537845/).
75
+ - **[canonn-science/canonn-signals](https://github.com/canonn-science/canonn-signals)** by
76
+ the **Canonn Research Group**, **MIT**, © 2023 — the route by which two of the sources
77
+ below were obtained, and the TypeScript port the procedural-naming algorithm passed
78
+ through.
79
+ - **EDAstro nebulae coordinates** published by **CMDR Orvidius**
80
+ ([EDAstro](https://edastro.com/mapcharts/)) — nebula names, catalogued systems,
81
+ coordinates, classes and region ids, obtained via canonn-signals. EDAstro states no
82
+ explicit licence for the dataset; consult the site's terms before redistributing it.
83
+ - **"Elite Dangerous Permit Database"** — the community-maintained spreadsheet behind the
84
+ permit-locked systems and regions, obtained via canonn-signals. Permit status is
85
+ published in no game file or API, so the list is hand-maintained and best-effort.
86
+ - **[EDSM](https://www.edsm.net)** and **[Spansh](https://spansh.co.uk)**, maintained by
87
+ their respective community contributors — factual system names, coordinates and
88
+ addresses, used for the hand-authored region spheres, the named-region origins and the
89
+ permit-locked systems' `id64` values. Consult each service's published terms for use of
90
+ its API or data.
91
+ - **[Odyssey Materials Helper](https://github.com/jixxed/ed-odyssey-materials-helper)** by
92
+ **Jixxed**, **MIT** — a CAPI response in its test resources corroborates the six
93
+ bundle-granted Vessel Hangar variants. The response itself is factual Elite Dangerous
94
+ game output; only the module identities, bundle flags and grant tokens are used.
95
+ - **[msarilar/EDEngineer](https://github.com/msarilar/EDEngineer)**, **MIT** for its code
96
+ — its `blueprints.json` corroborates which weapons the Overcharged recipe gives a clip
97
+ penalty to. The values are game data.
98
+ - **[Elite Dangerous Wiki](https://elite-dangerous.fandom.com/)** (Fandom,
99
+ **CC BY-SA 3.0**) — how the Corrosion Resistant Cargo Racks are obtained, which is why
100
+ two of them carry no list price.
101
+ - **Frontier Developments plc** — the game itself, the ship models represented by the
102
+ shared vector illustrations, and its published statements:
103
+ the [media-usage rules](https://forums.frontier.co.uk/threads/elite-dangerous-media-usage-rules.510879/)
104
+ quoted below, the Operations and Lynx
105
+ [update notes](https://forums.frontier.co.uk/threads/648012/), and the
106
+ [Rhea Disaster Community Goal](https://forums.frontier.co.uk/threads/deliver-critical-aid-for-the-rhea-disaster.626528/)
107
+ with its [announcement](https://x.com/EliteDangerous/status/1812792503776489745).
108
+ Values read directly from the running game are Frontier's too — see the notice below.
109
+ - **A [community description](https://www.reddit.com/r/EliteDangerous/comments/1uk2zhp/plasma_laser_theorycrafting_following_new/)
110
+ by u/Techno3020** — linked only as corroboration that the Operations Plasma conversion's
111
+ Plasma share is absolute damage. The post states no redistribution licence; none of its
112
+ text or media is redistributed.
113
+
114
+ ## Test fixtures
115
+
116
+ The fixtures in `fixtures/` are not bundled into any published package. Each one carries
117
+ its own provenance in its file header; the projects that published the captures they came
118
+ from are credited here:
119
+
120
+ - **[adam-drewery/EliteAssist](https://github.com/adam-drewery/EliteAssist)**, **WTFPL** —
121
+ a Frontier journal `Loadout` event in its example data.
122
+ - **[UFO-Studios/EDDP](https://github.com/UFO-Studios/EDDP)** — a captured journal log the
123
+ project ships as example data. That repository's own code is under the **UFO Licence
124
+ 1.0**, which permits use with credit but not redistribution of the project; the licence
125
+ covers UFO Studios' project, not the Frontier journal line quoted from its example data,
126
+ which travels under Frontier's media-usage terms like every other capture. Credit to UFO
127
+ Studios & AW2C Systems Ltd for capturing and publishing the log. No code from that
128
+ project is used.
129
+ - **[Coriolis](https://coriolis.io/)** (`s.orbis.zone`) and **[EDSY](https://edsy.org/)**
130
+ — the two share-link formats the 181-build community corpus was decoded from, using each
131
+ tool's own published serialisation and id tables (credited above). No code from either
132
+ is vendored here.
133
+ - **[Inara](https://inara.cz/)** — SLEF exports produced by its loadout tool.
134
+
135
+ Every capture is Elite Dangerous game output and remains the property of Frontier
136
+ Developments plc — see the notice below.
137
+
138
+ ## Elite Dangerous game data and imagery (Frontier media-usage notice)
139
+
140
+ The ship and module stat values and the ship illustrations are the property of
141
+ **Frontier Developments plc** and are used under Frontier's
142
+ [media-usage rules](https://forums.frontier.co.uk/threads/elite-dangerous-media-usage-rules.510879/):
143
+
144
+ > Elite Dangerous Almanac was created using assets and imagery from Elite
145
+ > Dangerous, with the permission of Frontier Developments plc, for non-commercial
146
+ > purposes. It is not endorsed by nor reflects the views or opinions of Frontier
147
+ > Developments and no employee of Frontier Developments was involved in the making
148
+ > of it.
149
+
150
+ Projects that redistribute this data should include the same notice.
151
+
152
+ ## Where the provenance lives
153
+
154
+ This file credits. What was taken from each source, when, from which revision, how it was
155
+ derived and every manual correction are recorded with the data itself, in
156
+ [`data/astro/SOURCES.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/astro/SOURCES.md),
157
+ [`data/materials/SOURCES.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/materials/SOURCES.md),
158
+ [`data/ships/SOURCES.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/ships/SOURCES.md)
159
+ and
160
+ [`data/commodities/SOURCES.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/commodities/SOURCES.md),
161
+ with the rules those files follow in
162
+ [`data/SNAPSHOTS.md`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/SNAPSHOTS.md).
163
+ Those files live in the repository only — this file is also published inside the npm
164
+ package, where they are not present, so the links are absolute.
165
+
166
+ If you add or change data, port an algorithm, or add a dependency that warrants credit,
167
+ add it here and record the provenance where the data lives.
168
+
169
+ ---
170
+
171
+ ## EDTS license (procedural naming)
172
+
173
+ The procedural sector- and system-naming algorithm and its region tables derive
174
+ from EDTS by Andy Martin (<https://bitbucket.org/Esvandiary/edts>), whose full
175
+ license is reproduced here as required by its terms:
176
+
177
+ ```
178
+ Copyright (c) 2016, Andy Martin
179
+ All rights reserved.
180
+
181
+ Redistribution and use in source and binary forms, with or without
182
+ modification, are permitted provided that the following conditions are met:
183
+ * Redistributions of source code must retain the above copyright
184
+ notice, this list of conditions and the following disclaimer.
185
+ * Redistributions in binary form must reproduce the above copyright
186
+ notice, this list of conditions and the following disclaimer in the
187
+ documentation and/or other materials provided with the distribution.
188
+ * Neither the name of the EDTS Project nor the
189
+ names of its contributors may be used to endorse or promote products
190
+ derived from this software without specific prior written permission.
191
+
192
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
193
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
194
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
195
+ DISCLAIMED. IN NO EVENT SHALL THE EDTS PROJECT OR ANDY MARTIN BE LIABLE FOR ANY
196
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
197
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
198
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
199
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
200
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
201
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
202
+ ```
@@ -0,0 +1,169 @@
1
+ import { CodexRegion, GalacticPlanePosition } from './codex-region.js';
2
+ import { SystemAddressInput } from './system-address-input.js';
3
+
4
+ /**
5
+ * Resolve a coordinate or system address to its Elite Dangerous **galactic codex
6
+ * region**.
7
+ *
8
+ * The region a system belongs to is fixed by its position on a flat ≈49.35 ly
9
+ * (`4096 / 83` ly) grid over the galactic plane. Each region's cells are stored as
10
+ * run-length geometry in [`data/astro/galactic-region-cells.jsonc`](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/data/astro/galactic-region-cells.jsonc) (kept separate
11
+ * from the lightweight metadata so metadata-only consumers never bundle it); this
12
+ * module rebuilds a per-row lookup index from them. The per-region metadata objects
13
+ * live in `./codex-region`.
14
+ *
15
+ * Two lookups are provided, matching the two things the game calls "the region":
16
+ * - {@link findCodexRegionAt} — the region at a set of coordinates (what the codex
17
+ * records a discovery against, and what is shown when jumping *into* a system).
18
+ * - {@link findCodexRegionForBoxel} — the region of a system's boxel `0/0/0` corner
19
+ * (what the journal and the codex main page display for the system).
20
+ *
21
+ * These can differ near a region border; see the upstream discussion linked in the
22
+ * data file's attribution.
23
+ *
24
+ * Algorithm ported from klightspeed's EliteDangerousRegionMap (`RegionMap.js`),
25
+ * See [ATTRIBUTIONS.md](https://github.com/DarkSession/Elite-Dangerous-Almanac/blob/main/ATTRIBUTIONS.md) for credit and licence terms.
26
+ *
27
+ * @packageDocumentation
28
+ */
29
+
30
+ /**
31
+ * Galactic X of the galaxy's origin corner, in light-years.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * import { CODEX_REGION_MAP_X0 } from '@elite-dangerous-almanac/core/astro/codex-region-lookup';
36
+ *
37
+ * CODEX_REGION_MAP_X0; // -> -49985
38
+ * ```
39
+ */
40
+ declare const CODEX_REGION_MAP_X0: number;
41
+ /**
42
+ * Galactic Y of the galaxy's origin corner, in light-years.
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * import { CODEX_REGION_MAP_Y0 } from '@elite-dangerous-almanac/core/astro/codex-region-lookup';
47
+ *
48
+ * CODEX_REGION_MAP_Y0; // -> -40985
49
+ * ```
50
+ */
51
+ declare const CODEX_REGION_MAP_Y0: number;
52
+ /**
53
+ * Galactic Z of the galaxy's origin corner, in light-years.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * import { CODEX_REGION_MAP_Z0 } from '@elite-dangerous-almanac/core/astro/codex-region-lookup';
58
+ *
59
+ * CODEX_REGION_MAP_Z0; // -> -24105
60
+ * ```
61
+ */
62
+ declare const CODEX_REGION_MAP_Z0: number;
63
+ /**
64
+ * Edge length of one region-grid cell, in light-years (`4096 / 83` ≈ 49.3494).
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * import { CODEX_REGION_MAP_LY_PER_CELL } from '@elite-dangerous-almanac/core/astro/codex-region-lookup';
69
+ *
70
+ * CODEX_REGION_MAP_LY_PER_CELL; // -> approximately 49.3494
71
+ * ```
72
+ */
73
+ declare const CODEX_REGION_MAP_LY_PER_CELL: number;
74
+ /**
75
+ * A point to resolve a region at: a {@link GalacticPlanePosition}, or a full
76
+ * {@link astro!GalacticPosition | GalacticPosition} — from the journal, EDSM, Spansh or
77
+ * `ProceduralSystem.position`
78
+ * — passed straight through, whether it comes from a variable or is written out inline.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * import { findCodexRegionAt } from '@elite-dangerous-almanac/core/astro/codex-region-lookup';
83
+ *
84
+ * findCodexRegionAt({ x: 0, z: 0 }); // the plane position the map is indexed by
85
+ * findCodexRegionAt({ x: 0, y: 0, z: 0 }); // a full position, `y` and all
86
+ * ```
87
+ */
88
+ interface CodexRegionPoint extends GalacticPlanePosition {
89
+ /**
90
+ * Galactic Y, in light-years. Accepted and ignored: the region map is a flat X/Z
91
+ * projection, so a region has no vertical extent to test against.
92
+ */
93
+ readonly y?: number;
94
+ }
95
+ /**
96
+ * A system's boxel `0/0/0` corner (galactic coordinates, in light-years) and the
97
+ * region it falls in.
98
+ *
99
+ * @example
100
+ * ```ts
101
+ * import { findCodexRegionForBoxel } from '@elite-dangerous-almanac/core/astro/codex-region-lookup';
102
+ * import type { BoxelCodexRegionLookup } from '@elite-dangerous-almanac/core/astro/codex-region-lookup';
103
+ *
104
+ * const result: BoxelCodexRegionLookup = findCodexRegionForBoxel(3309179996515n);
105
+ * ```
106
+ */
107
+ interface BoxelCodexRegionLookup {
108
+ /** Galactic X of the boxel corner, in light-years. */
109
+ readonly x: number;
110
+ /** Galactic Y of the boxel corner, in light-years. */
111
+ readonly y: number;
112
+ /** Galactic Z of the boxel corner, in light-years. */
113
+ readonly z: number;
114
+ /** The region at the boxel corner, or `null` if it lies outside the mapped grid. */
115
+ readonly region: CodexRegion | null;
116
+ }
117
+ /**
118
+ * Find the galactic region at a point on the galactic plane.
119
+ *
120
+ * This is the region the game records a codex discovery against, and the region
121
+ * name shown when jumping *into* a system.
122
+ *
123
+ * @param point - Galactic position, in light-years. Only `x` and `z` are read — the
124
+ * vertical `y` is accepted but ignored, because the region map is a flat X/Z projection.
125
+ * @returns The {@link CodexRegion} containing the point, or `null` if the point
126
+ * lies outside the mapped region grid.
127
+ * @example
128
+ * ```ts
129
+ * import { findCodexRegionAt } from '@elite-dangerous-almanac/core/astro/codex-region-lookup';
130
+ *
131
+ * findCodexRegionAt({ x: 0, z: 0 })?.name; // -> 'Inner Orion Spur' (near Sol)
132
+ * findCodexRegionAt({ x: 0, z: 25900 })?.name; // -> 'Galactic Centre'
133
+ *
134
+ * // A full position works as it comes — no need to strip the `y` first:
135
+ * findCodexRegionAt({ x: 0, y: 0, z: 0 })?.name; // -> 'Inner Orion Spur'
136
+ * ```
137
+ */
138
+ declare function findCodexRegionAt(point: CodexRegionPoint): CodexRegion | null;
139
+ /**
140
+ * Find the galactic region of a system's boxel, from its system address (`id64`).
141
+ *
142
+ * This is the region written to the player journal and shown on the codex main
143
+ * page for the system. It is resolved from the `0/0/0` corner of the system's
144
+ * boxel, which can differ from {@link findCodexRegionAt} of the system's exact
145
+ * coordinates near a region border.
146
+ *
147
+ * @param id64 - The 64-bit system address, as a `bigint`, a normally parsed journal
148
+ * `number`, or a decimal `string` (see {@link SystemAddressInput}).
149
+ * @returns The boxel corner coordinates — **galactic light-years, Sol at origin** —
150
+ * and the region there. Those coordinates are also the closest this library gets to
151
+ * a position for an `id64` alone: the corner of the system's boxel, so they are
152
+ * accurate to one boxel edge ({@link boxelEdgeLy} of the size class: 10 ly for mass
153
+ * code `a`, 1280 ly for `h`).
154
+ * @throws {TypeError} If `id64` is not a usable address representation.
155
+ * @throws {RangeError} If the address is outside 64 bits.
156
+ * @example
157
+ * ```ts
158
+ * import { findCodexRegionForBoxel } from '@elite-dangerous-almanac/core/astro/codex-region-lookup';
159
+ *
160
+ * findCodexRegionForBoxel(5306097239922n).region?.name; // -> the codex region
161
+ *
162
+ * // Approximate position from an id64 alone (boxel corner, in light-years):
163
+ * const { x, y, z } = findCodexRegionForBoxel(3309179996515n);
164
+ * ({ x, y, z }); // -> { x: 735, y: -185, z: -105 }
165
+ * ```
166
+ */
167
+ declare function findCodexRegionForBoxel(id64: SystemAddressInput): BoxelCodexRegionLookup;
168
+
169
+ export { type BoxelCodexRegionLookup, CODEX_REGION_MAP_LY_PER_CELL, CODEX_REGION_MAP_X0, CODEX_REGION_MAP_Y0, CODEX_REGION_MAP_Z0, type CodexRegionPoint, SystemAddressInput, findCodexRegionAt, findCodexRegionForBoxel };