@verticopolis/components 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (791) hide show
  1. package/ASSETS-LICENSE.md +49 -0
  2. package/LICENSE +21 -0
  3. package/README.md +121 -2
  4. package/lib/audio/Audio.d.ts +110 -0
  5. package/lib/audio/Audio.js +199 -0
  6. package/lib/audio/Audio.js.map +1 -0
  7. package/lib/audio/ToneAudioEngine.d.ts +125 -0
  8. package/lib/audio/ToneAudioEngine.js +452 -0
  9. package/lib/audio/ToneAudioEngine.js.map +1 -0
  10. package/lib/audio/audioAssets.d.ts +25 -0
  11. package/lib/audio/audioAssets.js +28 -0
  12. package/lib/audio/audioAssets.js.map +1 -0
  13. package/lib/audio/awayWatch.d.ts +17 -0
  14. package/lib/audio/awayWatch.js +33 -0
  15. package/lib/audio/awayWatch.js.map +1 -0
  16. package/lib/audio/firstCueLatch.d.ts +18 -0
  17. package/lib/audio/firstCueLatch.js +34 -0
  18. package/lib/audio/firstCueLatch.js.map +1 -0
  19. package/lib/audio/lightEnvelope.d.ts +64 -0
  20. package/lib/audio/lightEnvelope.js +124 -0
  21. package/lib/audio/lightEnvelope.js.map +1 -0
  22. package/lib/audio/lightSynth.d.ts +125 -0
  23. package/lib/audio/lightSynth.js +203 -0
  24. package/lib/audio/lightSynth.js.map +1 -0
  25. package/lib/audio/toneContext.d.ts +30 -0
  26. package/lib/audio/toneContext.js +79 -0
  27. package/lib/audio/toneContext.js.map +1 -0
  28. package/lib/audio/toneCrowd.d.ts +62 -0
  29. package/lib/audio/toneCrowd.js +429 -0
  30. package/lib/audio/toneCrowd.js.map +1 -0
  31. package/lib/audio/toneCrowdData.d.ts +144 -0
  32. package/lib/audio/toneCrowdData.js +317 -0
  33. package/lib/audio/toneCrowdData.js.map +1 -0
  34. package/lib/audio/toneCrowdPrograms.d.ts +71 -0
  35. package/lib/audio/toneCrowdPrograms.js +273 -0
  36. package/lib/audio/toneCrowdPrograms.js.map +1 -0
  37. package/lib/audio/toneCrowdVoices.d.ts +49 -0
  38. package/lib/audio/toneCrowdVoices.js +212 -0
  39. package/lib/audio/toneCrowdVoices.js.map +1 -0
  40. package/lib/audio/toneMusicVoices.d.ts +11 -0
  41. package/lib/audio/toneMusicVoices.js +31 -0
  42. package/lib/audio/toneMusicVoices.js.map +1 -0
  43. package/lib/audio/tonePercussion.d.ts +45 -0
  44. package/lib/audio/tonePercussion.js +97 -0
  45. package/lib/audio/tonePercussion.js.map +1 -0
  46. package/lib/audio/toneRain.d.ts +23 -0
  47. package/lib/audio/toneRain.js +39 -0
  48. package/lib/audio/toneRain.js.map +1 -0
  49. package/lib/audio/toneRecordingMock.d.ts +89 -0
  50. package/lib/audio/toneRecordingMock.js +145 -0
  51. package/lib/audio/toneRecordingMock.js.map +1 -0
  52. package/lib/audio/toneRoomTone.d.ts +11 -0
  53. package/lib/audio/toneRoomTone.js +27 -0
  54. package/lib/audio/toneRoomTone.js.map +1 -0
  55. package/lib/audio/toneScenes.d.ts +57 -0
  56. package/lib/audio/toneScenes.js +208 -0
  57. package/lib/audio/toneScenes.js.map +1 -0
  58. package/lib/audio/toneTracks.d.ts +50 -0
  59. package/lib/audio/toneTracks.js +356 -0
  60. package/lib/audio/toneTracks.js.map +1 -0
  61. package/lib/audio/toneVoices.d.ts +57 -0
  62. package/lib/audio/toneVoices.js +208 -0
  63. package/lib/audio/toneVoices.js.map +1 -0
  64. package/lib/catalog/catalogTypes.d.ts +428 -0
  65. package/lib/catalog/catalogTypes.js +102 -0
  66. package/lib/catalog/catalogTypes.js.map +1 -0
  67. package/lib/catalog/skyBridgeTypes.d.ts +25 -0
  68. package/lib/catalog/skyBridgeTypes.js +7 -0
  69. package/lib/catalog/skyBridgeTypes.js.map +1 -0
  70. package/lib/catalog/starDutyTypes.d.ts +22 -0
  71. package/lib/catalog/starDutyTypes.js +7 -0
  72. package/lib/catalog/starDutyTypes.js.map +1 -0
  73. package/lib/catalog/towerCatalog.d.ts +32 -0
  74. package/lib/catalog/towerCatalog.js +44 -0
  75. package/lib/catalog/towerCatalog.js.map +1 -0
  76. package/lib/engineBinding/binding.d.ts +36 -0
  77. package/lib/engineBinding/binding.js +90 -0
  78. package/lib/engineBinding/binding.js.map +1 -0
  79. package/lib/engineBinding/catalog.d.ts +24 -0
  80. package/lib/engineBinding/catalog.js +267 -0
  81. package/lib/engineBinding/catalog.js.map +1 -0
  82. package/lib/engineBinding/engine.d.ts +866 -0
  83. package/lib/engineBinding/exportTiers.d.ts +289 -0
  84. package/lib/engineBinding/exportTiers.js +283 -0
  85. package/lib/engineBinding/exportTiers.js.map +1 -0
  86. package/lib/engineBinding/toolingMethods.d.ts +12 -0
  87. package/lib/engineBinding/toolingMethods.js +20 -0
  88. package/lib/engineBinding/toolingMethods.js.map +1 -0
  89. package/lib/events/gameplayCatalog.d.ts +57 -0
  90. package/lib/events/gameplayCatalog.js +214 -0
  91. package/lib/events/gameplayCatalog.js.map +1 -0
  92. package/lib/events/gameplayEventRules.d.ts +4 -0
  93. package/lib/events/gameplayEventRules.js +32 -0
  94. package/lib/events/gameplayEventRules.js.map +1 -0
  95. package/lib/events/gameplayEvents.d.ts +284 -0
  96. package/lib/presentation/clockText.d.ts +28 -0
  97. package/lib/presentation/clockText.js +38 -0
  98. package/lib/presentation/clockText.js.map +1 -0
  99. package/lib/presentation/facilityPresentation.d.ts +20 -0
  100. package/lib/presentation/facilityPresentation.js +164 -0
  101. package/lib/presentation/facilityPresentation.js.map +1 -0
  102. package/lib/presentation/statsCopy.d.ts +20 -0
  103. package/lib/presentation/statsCopy.js +37 -0
  104. package/lib/presentation/statsCopy.js.map +1 -0
  105. package/lib/presentation/traffic.d.ts +75 -0
  106. package/lib/presentation/traffic.js +79 -0
  107. package/lib/presentation/traffic.js.map +1 -0
  108. package/lib/presentation/viewKinds.d.ts +33 -0
  109. package/lib/presentation/viewKinds.js +88 -0
  110. package/lib/presentation/viewKinds.js.map +1 -0
  111. package/lib/presentation/viewWorld.d.ts +29 -0
  112. package/lib/presentation/viewWorld.js +31 -0
  113. package/lib/presentation/viewWorld.js.map +1 -0
  114. package/lib/render/atlas/archive.d.ts +78 -0
  115. package/lib/render/atlas/archive.js +427 -0
  116. package/lib/render/atlas/archive.js.map +1 -0
  117. package/lib/render/atlas/bake.d.ts +132 -0
  118. package/lib/render/atlas/bake.js +331 -0
  119. package/lib/render/atlas/bake.js.map +1 -0
  120. package/lib/render/atlas/bakeAdditions.d.ts +24 -0
  121. package/lib/render/atlas/bakeAdditions.js +46 -0
  122. package/lib/render/atlas/bakeAdditions.js.map +1 -0
  123. package/lib/render/atlas/browserEntry.d.ts +12 -0
  124. package/lib/render/atlas/browserEntry.js +222 -0
  125. package/lib/render/atlas/browserEntry.js.map +1 -0
  126. package/lib/render/atlas/catalog.d.ts +118 -0
  127. package/lib/render/atlas/catalog.js +253 -0
  128. package/lib/render/atlas/catalog.js.map +1 -0
  129. package/lib/render/atlas/catalogExtras.d.ts +45 -0
  130. package/lib/render/atlas/catalogExtras.js +217 -0
  131. package/lib/render/atlas/catalogExtras.js.map +1 -0
  132. package/lib/render/atlas/compose.d.ts +30 -0
  133. package/lib/render/atlas/compose.js +125 -0
  134. package/lib/render/atlas/compose.js.map +1 -0
  135. package/lib/render/atlas/cycles.d.ts +25 -0
  136. package/lib/render/atlas/cycles.js +41 -0
  137. package/lib/render/atlas/cycles.js.map +1 -0
  138. package/lib/render/atlas/lookup.d.ts +65 -0
  139. package/lib/render/atlas/lookup.js +83 -0
  140. package/lib/render/atlas/lookup.js.map +1 -0
  141. package/lib/render/atlas/pack.d.ts +23 -0
  142. package/lib/render/atlas/pack.js +50 -0
  143. package/lib/render/atlas/pack.js.map +1 -0
  144. package/lib/render/atlas/paint.d.ts +120 -0
  145. package/lib/render/atlas/paint.js +154 -0
  146. package/lib/render/atlas/paint.js.map +1 -0
  147. package/lib/render/atlas/pixels.d.ts +46 -0
  148. package/lib/render/atlas/pixels.js +158 -0
  149. package/lib/render/atlas/pixels.js.map +1 -0
  150. package/lib/render/atlas/png.d.ts +3 -0
  151. package/lib/render/atlas/png.js +102 -0
  152. package/lib/render/atlas/png.js.map +1 -0
  153. package/lib/render/atlas/raster.d.ts +34 -0
  154. package/lib/render/atlas/raster.js +114 -0
  155. package/lib/render/atlas/raster.js.map +1 -0
  156. package/lib/render/atlas/recyclingFill.d.ts +5 -0
  157. package/lib/render/atlas/recyclingFill.js +65 -0
  158. package/lib/render/atlas/recyclingFill.js.map +1 -0
  159. package/lib/render/atlas/samples.d.ts +24 -0
  160. package/lib/render/atlas/samples.js +75 -0
  161. package/lib/render/atlas/samples.js.map +1 -0
  162. package/lib/render/atlas/scenery.d.ts +230 -0
  163. package/lib/render/atlas/scenery.js +242 -0
  164. package/lib/render/atlas/scenery.js.map +1 -0
  165. package/lib/render/atlas/schema.d.ts +189 -0
  166. package/lib/render/atlas/schema.js +31 -0
  167. package/lib/render/atlas/schema.js.map +1 -0
  168. package/lib/render/atlas/shellMarks.d.ts +16 -0
  169. package/lib/render/atlas/shellMarks.js +72 -0
  170. package/lib/render/atlas/shellMarks.js.map +1 -0
  171. package/lib/render/atlas/store.d.ts +75 -0
  172. package/lib/render/atlas/store.js +127 -0
  173. package/lib/render/atlas/store.js.map +1 -0
  174. package/lib/render/atlas/verify.d.ts +43 -0
  175. package/lib/render/atlas/verify.js +87 -0
  176. package/lib/render/atlas/verify.js.map +1 -0
  177. package/lib/render/atlas/verifyExtras.d.ts +19 -0
  178. package/lib/render/atlas/verifyExtras.js +310 -0
  179. package/lib/render/atlas/verifyExtras.js.map +1 -0
  180. package/lib/render/cameraBounds.d.ts +71 -0
  181. package/lib/render/cameraBounds.js +107 -0
  182. package/lib/render/cameraBounds.js.map +1 -0
  183. package/lib/render/carIndicator.d.ts +41 -0
  184. package/lib/render/carIndicator.js +45 -0
  185. package/lib/render/carIndicator.js.map +1 -0
  186. package/lib/render/carMotion.d.ts +33 -0
  187. package/lib/render/carMotion.js +42 -0
  188. package/lib/render/carMotion.js.map +1 -0
  189. package/lib/render/catalogScale.d.ts +40 -0
  190. package/lib/render/catalogScale.js +33 -0
  191. package/lib/render/catalogScale.js.map +1 -0
  192. package/lib/render/climbPath.d.ts +59 -0
  193. package/lib/render/climbPath.js +115 -0
  194. package/lib/render/climbPath.js.map +1 -0
  195. package/lib/render/depthPlanes.d.ts +55 -0
  196. package/lib/render/depthPlanes.js +58 -0
  197. package/lib/render/depthPlanes.js.map +1 -0
  198. package/lib/render/excalibur/TowerEngine.d.ts +348 -0
  199. package/lib/render/excalibur/TowerEngine.js +415 -0
  200. package/lib/render/excalibur/TowerEngine.js.map +1 -0
  201. package/lib/render/excalibur/cabGraphics.d.ts +75 -0
  202. package/lib/render/excalibur/cabGraphics.js +108 -0
  203. package/lib/render/excalibur/cabGraphics.js.map +1 -0
  204. package/lib/render/excalibur/cabParts.d.ts +32 -0
  205. package/lib/render/excalibur/cabParts.js +79 -0
  206. package/lib/render/excalibur/cabParts.js.map +1 -0
  207. package/lib/render/excalibur/cabRiders.d.ts +72 -0
  208. package/lib/render/excalibur/cabRiders.js +176 -0
  209. package/lib/render/excalibur/cabRiders.js.map +1 -0
  210. package/lib/render/excalibur/crowdCull.d.ts +34 -0
  211. package/lib/render/excalibur/crowdCull.js +72 -0
  212. package/lib/render/excalibur/crowdCull.js.map +1 -0
  213. package/lib/render/excalibur/crowdFigure.d.ts +42 -0
  214. package/lib/render/excalibur/crowdFigure.js +99 -0
  215. package/lib/render/excalibur/crowdFigure.js.map +1 -0
  216. package/lib/render/excalibur/crowdLook.d.ts +137 -0
  217. package/lib/render/excalibur/crowdLook.js +186 -0
  218. package/lib/render/excalibur/crowdLook.js.map +1 -0
  219. package/lib/render/excalibur/frameHold.d.ts +23 -0
  220. package/lib/render/excalibur/frameHold.js +30 -0
  221. package/lib/render/excalibur/frameHold.js.map +1 -0
  222. package/lib/render/excalibur/guardPosition.d.ts +17 -0
  223. package/lib/render/excalibur/guardPosition.js +37 -0
  224. package/lib/render/excalibur/guardPosition.js.map +1 -0
  225. package/lib/render/excalibur/keyboardHost.d.ts +15 -0
  226. package/lib/render/excalibur/keyboardHost.js +22 -0
  227. package/lib/render/excalibur/keyboardHost.js.map +1 -0
  228. package/lib/render/excalibur/longPress.d.ts +16 -0
  229. package/lib/render/excalibur/longPress.js +71 -0
  230. package/lib/render/excalibur/longPress.js.map +1 -0
  231. package/lib/render/excalibur/peopleGfx.d.ts +16 -0
  232. package/lib/render/excalibur/peopleGfx.js +46 -0
  233. package/lib/render/excalibur/peopleGfx.js.map +1 -0
  234. package/lib/render/excalibur/peopleWindow.d.ts +35 -0
  235. package/lib/render/excalibur/peopleWindow.js +38 -0
  236. package/lib/render/excalibur/peopleWindow.js.map +1 -0
  237. package/lib/render/excalibur/personFocus.d.ts +36 -0
  238. package/lib/render/excalibur/personFocus.js +169 -0
  239. package/lib/render/excalibur/personFocus.js.map +1 -0
  240. package/lib/render/excalibur/pointerButtonGuard.d.ts +35 -0
  241. package/lib/render/excalibur/pointerButtonGuard.js +86 -0
  242. package/lib/render/excalibur/pointerButtonGuard.js.map +1 -0
  243. package/lib/render/excalibur/pressLifecycle.d.ts +26 -0
  244. package/lib/render/excalibur/pressLifecycle.js +66 -0
  245. package/lib/render/excalibur/pressLifecycle.js.map +1 -0
  246. package/lib/render/excalibur/rainShelter.d.ts +16 -0
  247. package/lib/render/excalibur/rainShelter.js +94 -0
  248. package/lib/render/excalibur/rainShelter.js.map +1 -0
  249. package/lib/render/excalibur/roomSignature.d.ts +30 -0
  250. package/lib/render/excalibur/roomSignature.js +49 -0
  251. package/lib/render/excalibur/roomSignature.js.map +1 -0
  252. package/lib/render/excalibur/sceneBake.d.ts +9 -0
  253. package/lib/render/excalibur/sceneBake.js +12 -0
  254. package/lib/render/excalibur/sceneBake.js.map +1 -0
  255. package/lib/render/excalibur/thiefSpan.d.ts +18 -0
  256. package/lib/render/excalibur/thiefSpan.js +51 -0
  257. package/lib/render/excalibur/thiefSpan.js.map +1 -0
  258. package/lib/render/excalibur/towerBridgeTiles.d.ts +30 -0
  259. package/lib/render/excalibur/towerBridgeTiles.js +43 -0
  260. package/lib/render/excalibur/towerBridgeTiles.js.map +1 -0
  261. package/lib/render/excalibur/towerCrowd.d.ts +73 -0
  262. package/lib/render/excalibur/towerCrowd.js +464 -0
  263. package/lib/render/excalibur/towerCrowd.js.map +1 -0
  264. package/lib/render/excalibur/towerCrowdLayout.d.ts +40 -0
  265. package/lib/render/excalibur/towerCrowdLayout.js +77 -0
  266. package/lib/render/excalibur/towerCrowdLayout.js.map +1 -0
  267. package/lib/render/excalibur/towerFireResponse.d.ts +25 -0
  268. package/lib/render/excalibur/towerFireResponse.js +89 -0
  269. package/lib/render/excalibur/towerFireResponse.js.map +1 -0
  270. package/lib/render/excalibur/towerFrame.d.ts +8 -0
  271. package/lib/render/excalibur/towerFrame.js +57 -0
  272. package/lib/render/excalibur/towerFrame.js.map +1 -0
  273. package/lib/render/excalibur/towerGhostLabel.d.ts +9 -0
  274. package/lib/render/excalibur/towerGhostLabel.js +37 -0
  275. package/lib/render/excalibur/towerGhostLabel.js.map +1 -0
  276. package/lib/render/excalibur/towerHallDoors.d.ts +42 -0
  277. package/lib/render/excalibur/towerHallDoors.js +129 -0
  278. package/lib/render/excalibur/towerHallDoors.js.map +1 -0
  279. package/lib/render/excalibur/towerHaloRings.d.ts +34 -0
  280. package/lib/render/excalibur/towerHaloRings.js +45 -0
  281. package/lib/render/excalibur/towerHaloRings.js.map +1 -0
  282. package/lib/render/excalibur/towerInputCamera.d.ts +90 -0
  283. package/lib/render/excalibur/towerInputCamera.js +480 -0
  284. package/lib/render/excalibur/towerInputCamera.js.map +1 -0
  285. package/lib/render/excalibur/towerMetro.d.ts +31 -0
  286. package/lib/render/excalibur/towerMetro.js +115 -0
  287. package/lib/render/excalibur/towerMetro.js.map +1 -0
  288. package/lib/render/excalibur/towerNoiseReach.d.ts +32 -0
  289. package/lib/render/excalibur/towerNoiseReach.js +75 -0
  290. package/lib/render/excalibur/towerNoiseReach.js.map +1 -0
  291. package/lib/render/excalibur/towerOverlay.d.ts +59 -0
  292. package/lib/render/excalibur/towerOverlay.js +453 -0
  293. package/lib/render/excalibur/towerOverlay.js.map +1 -0
  294. package/lib/render/excalibur/towerReconcile.d.ts +17 -0
  295. package/lib/render/excalibur/towerReconcile.js +404 -0
  296. package/lib/render/excalibur/towerReconcile.js.map +1 -0
  297. package/lib/render/excalibur/towerRegions.d.ts +61 -0
  298. package/lib/render/excalibur/towerRegions.js +193 -0
  299. package/lib/render/excalibur/towerRegions.js.map +1 -0
  300. package/lib/render/excalibur/towerScene.d.ts +66 -0
  301. package/lib/render/excalibur/towerScene.js +443 -0
  302. package/lib/render/excalibur/towerScene.js.map +1 -0
  303. package/lib/render/excalibur/towerScenery.d.ts +12 -0
  304. package/lib/render/excalibur/towerScenery.js +299 -0
  305. package/lib/render/excalibur/towerScenery.js.map +1 -0
  306. package/lib/render/excalibur/towerSceneryDraw.d.ts +86 -0
  307. package/lib/render/excalibur/towerSceneryDraw.js +288 -0
  308. package/lib/render/excalibur/towerSceneryDraw.js.map +1 -0
  309. package/lib/render/excalibur/towerShaftNumbers.d.ts +23 -0
  310. package/lib/render/excalibur/towerShaftNumbers.js +90 -0
  311. package/lib/render/excalibur/towerShaftNumbers.js.map +1 -0
  312. package/lib/render/excalibur/towerStructTiles.d.ts +56 -0
  313. package/lib/render/excalibur/towerStructTiles.js +238 -0
  314. package/lib/render/excalibur/towerStructTiles.js.map +1 -0
  315. package/lib/render/excalibur/towerSyncSchedule.d.ts +84 -0
  316. package/lib/render/excalibur/towerSyncSchedule.js +137 -0
  317. package/lib/render/excalibur/towerSyncSchedule.js.map +1 -0
  318. package/lib/render/excalibur/towerWalkerBuild.d.ts +30 -0
  319. package/lib/render/excalibur/towerWalkerBuild.js +126 -0
  320. package/lib/render/excalibur/towerWalkerBuild.js.map +1 -0
  321. package/lib/render/excalibur/trafficSpotlight.d.ts +29 -0
  322. package/lib/render/excalibur/trafficSpotlight.js +64 -0
  323. package/lib/render/excalibur/trafficSpotlight.js.map +1 -0
  324. package/lib/render/facadeGeometry.d.ts +50 -0
  325. package/lib/render/facadeGeometry.js +79 -0
  326. package/lib/render/facadeGeometry.js.map +1 -0
  327. package/lib/render/groundEntrances.d.ts +44 -0
  328. package/lib/render/groundEntrances.js +118 -0
  329. package/lib/render/groundEntrances.js.map +1 -0
  330. package/lib/render/lateNight.d.ts +14 -0
  331. package/lib/render/lateNight.js +18 -0
  332. package/lib/render/lateNight.js.map +1 -0
  333. package/lib/render/lobbyHalls.d.ts +44 -0
  334. package/lib/render/lobbyHalls.js +63 -0
  335. package/lib/render/lobbyHalls.js.map +1 -0
  336. package/lib/render/metroTrainSchedule.d.ts +20 -0
  337. package/lib/render/metroTrainSchedule.js +65 -0
  338. package/lib/render/metroTrainSchedule.js.map +1 -0
  339. package/lib/render/overviewMap/drawList.d.ts +67 -0
  340. package/lib/render/overviewMap/drawList.js +103 -0
  341. package/lib/render/overviewMap/drawList.js.map +1 -0
  342. package/lib/render/overviewMap/extent.d.ts +70 -0
  343. package/lib/render/overviewMap/extent.js +155 -0
  344. package/lib/render/overviewMap/extent.js.map +1 -0
  345. package/lib/render/overviewMap/floorSpans.d.ts +27 -0
  346. package/lib/render/overviewMap/floorSpans.js +32 -0
  347. package/lib/render/overviewMap/floorSpans.js.map +1 -0
  348. package/lib/render/overviewMap/gaps.d.ts +48 -0
  349. package/lib/render/overviewMap/gaps.js +148 -0
  350. package/lib/render/overviewMap/gaps.js.map +1 -0
  351. package/lib/render/overviewMap/geometry.d.ts +139 -0
  352. package/lib/render/overviewMap/geometry.js +245 -0
  353. package/lib/render/overviewMap/geometry.js.map +1 -0
  354. package/lib/render/overviewMap/heatView.d.ts +91 -0
  355. package/lib/render/overviewMap/heatView.js +143 -0
  356. package/lib/render/overviewMap/heatView.js.map +1 -0
  357. package/lib/render/overviewMap/hotelView.d.ts +82 -0
  358. package/lib/render/overviewMap/hotelView.js +136 -0
  359. package/lib/render/overviewMap/hotelView.js.map +1 -0
  360. package/lib/render/overviewMap/model.d.ts +97 -0
  361. package/lib/render/overviewMap/model.js +116 -0
  362. package/lib/render/overviewMap/model.js.map +1 -0
  363. package/lib/render/overviewMap/paint.d.ts +63 -0
  364. package/lib/render/overviewMap/paint.js +168 -0
  365. package/lib/render/overviewMap/paint.js.map +1 -0
  366. package/lib/render/overviewMap/style.d.ts +46 -0
  367. package/lib/render/overviewMap/style.js +117 -0
  368. package/lib/render/overviewMap/style.js.map +1 -0
  369. package/lib/render/overviewMap/tierView.d.ts +103 -0
  370. package/lib/render/overviewMap/tierView.js +209 -0
  371. package/lib/render/overviewMap/tierView.js.map +1 -0
  372. package/lib/render/overviewMap/viewMark.d.ts +69 -0
  373. package/lib/render/overviewMap/viewMark.js +103 -0
  374. package/lib/render/overviewMap/viewMark.js.map +1 -0
  375. package/lib/render/overviewMap/views.d.ts +24 -0
  376. package/lib/render/overviewMap/views.js +29 -0
  377. package/lib/render/overviewMap/views.js.map +1 -0
  378. package/lib/render/pinchTracker.d.ts +91 -0
  379. package/lib/render/pinchTracker.js +145 -0
  380. package/lib/render/pinchTracker.js.map +1 -0
  381. package/lib/render/pixelSprites/amusements.d.ts +32 -0
  382. package/lib/render/pixelSprites/amusements.js +243 -0
  383. package/lib/render/pixelSprites/amusements.js.map +1 -0
  384. package/lib/render/pixelSprites/artScale.d.ts +97 -0
  385. package/lib/render/pixelSprites/artScale.js +151 -0
  386. package/lib/render/pixelSprites/artScale.js.map +1 -0
  387. package/lib/render/pixelSprites/boutique.d.ts +30 -0
  388. package/lib/render/pixelSprites/boutique.js +244 -0
  389. package/lib/render/pixelSprites/boutique.js.map +1 -0
  390. package/lib/render/pixelSprites/clinic.d.ts +30 -0
  391. package/lib/render/pixelSprites/clinic.js +184 -0
  392. package/lib/render/pixelSprites/clinic.js.map +1 -0
  393. package/lib/render/pixelSprites/common.d.ts +185 -0
  394. package/lib/render/pixelSprites/common.js +449 -0
  395. package/lib/render/pixelSprites/common.js.map +1 -0
  396. package/lib/render/pixelSprites/daycare.d.ts +3 -0
  397. package/lib/render/pixelSprites/daycare.js +99 -0
  398. package/lib/render/pixelSprites/daycare.js.map +1 -0
  399. package/lib/render/pixelSprites/dollhouse.d.ts +45 -0
  400. package/lib/render/pixelSprites/dollhouse.js +110 -0
  401. package/lib/render/pixelSprites/dollhouse.js.map +1 -0
  402. package/lib/render/pixelSprites/fitness.d.ts +30 -0
  403. package/lib/render/pixelSprites/fitness.js +176 -0
  404. package/lib/render/pixelSprites/fitness.js.map +1 -0
  405. package/lib/render/pixelSprites/food.d.ts +27 -0
  406. package/lib/render/pixelSprites/food.interiors.d.ts +38 -0
  407. package/lib/render/pixelSprites/food.interiors.js +516 -0
  408. package/lib/render/pixelSprites/food.interiors.js.map +1 -0
  409. package/lib/render/pixelSprites/food.js +36 -0
  410. package/lib/render/pixelSprites/food.js.map +1 -0
  411. package/lib/render/pixelSprites/food.kit.d.ts +50 -0
  412. package/lib/render/pixelSprites/food.kit.js +140 -0
  413. package/lib/render/pixelSprites/food.kit.js.map +1 -0
  414. package/lib/render/pixelSprites/food.looks.d.ts +45 -0
  415. package/lib/render/pixelSprites/food.looks.js +56 -0
  416. package/lib/render/pixelSprites/food.looks.js.map +1 -0
  417. package/lib/render/pixelSprites/layers.d.ts +49 -0
  418. package/lib/render/pixelSprites/layers.js +61 -0
  419. package/lib/render/pixelSprites/layers.js.map +1 -0
  420. package/lib/render/pixelSprites/nightclub.d.ts +3 -0
  421. package/lib/render/pixelSprites/nightclub.js +108 -0
  422. package/lib/render/pixelSprites/nightclub.js.map +1 -0
  423. package/lib/render/pixelSprites/people.d.ts +168 -0
  424. package/lib/render/pixelSprites/people.js +431 -0
  425. package/lib/render/pixelSprites/people.js.map +1 -0
  426. package/lib/render/pixelSprites/residential.d.ts +5 -0
  427. package/lib/render/pixelSprites/residential.js +506 -0
  428. package/lib/render/pixelSprites/residential.js.map +1 -0
  429. package/lib/render/pixelSprites/residential.looks.d.ts +40 -0
  430. package/lib/render/pixelSprites/residential.looks.js +43 -0
  431. package/lib/render/pixelSprites/residential.looks.js.map +1 -0
  432. package/lib/render/pixelSprites/residential.roaches.d.ts +38 -0
  433. package/lib/render/pixelSprites/residential.roaches.js +88 -0
  434. package/lib/render/pixelSprites/residential.roaches.js.map +1 -0
  435. package/lib/render/pixelSprites/residentialRentalSprites.d.ts +11 -0
  436. package/lib/render/pixelSprites/residentialRentalSprites.js +19 -0
  437. package/lib/render/pixelSprites/residentialRentalSprites.js.map +1 -0
  438. package/lib/render/pixelSprites/shop.d.ts +14 -0
  439. package/lib/render/pixelSprites/shop.interiors.d.ts +50 -0
  440. package/lib/render/pixelSprites/shop.interiors.js +382 -0
  441. package/lib/render/pixelSprites/shop.interiors.js.map +1 -0
  442. package/lib/render/pixelSprites/shop.js +72 -0
  443. package/lib/render/pixelSprites/shop.js.map +1 -0
  444. package/lib/render/pixelSprites/shop.looks.d.ts +17 -0
  445. package/lib/render/pixelSprites/shop.looks.js +24 -0
  446. package/lib/render/pixelSprites/shop.looks.js.map +1 -0
  447. package/lib/render/pixelSprites/skyBar.d.ts +11 -0
  448. package/lib/render/pixelSprites/skyBar.js +125 -0
  449. package/lib/render/pixelSprites/skyBar.js.map +1 -0
  450. package/lib/render/pixelSprites/spa.d.ts +3 -0
  451. package/lib/render/pixelSprites/spa.js +88 -0
  452. package/lib/render/pixelSprites/spa.js.map +1 -0
  453. package/lib/render/pixelSprites.d.ts +33 -0
  454. package/lib/render/pixelSprites.js +167 -0
  455. package/lib/render/pixelSprites.js.map +1 -0
  456. package/lib/render/regionGrid.d.ts +49 -0
  457. package/lib/render/regionGrid.js +82 -0
  458. package/lib/render/regionGrid.js.map +1 -0
  459. package/lib/render/regionPaint.d.ts +15 -0
  460. package/lib/render/regionPaint.js +33 -0
  461. package/lib/render/regionPaint.js.map +1 -0
  462. package/lib/render/renderSim.d.ts +104 -0
  463. package/lib/render/renderSim.js +2 -0
  464. package/lib/render/renderSim.js.map +1 -0
  465. package/lib/render/roomPortrait.d.ts +35 -0
  466. package/lib/render/roomPortrait.js +142 -0
  467. package/lib/render/roomPortrait.js.map +1 -0
  468. package/lib/render/roomShading.d.ts +29 -0
  469. package/lib/render/roomShading.js +43 -0
  470. package/lib/render/roomShading.js.map +1 -0
  471. package/lib/render/scale.d.ts +31 -0
  472. package/lib/render/scale.js +34 -0
  473. package/lib/render/scale.js.map +1 -0
  474. package/lib/render/sceneryLayout.d.ts +234 -0
  475. package/lib/render/sceneryLayout.js +199 -0
  476. package/lib/render/sceneryLayout.js.map +1 -0
  477. package/lib/render/sprites/common.d.ts +41 -0
  478. package/lib/render/sprites/common.js +46 -0
  479. package/lib/render/sprites/common.js.map +1 -0
  480. package/lib/render/sprites/escalator.d.ts +27 -0
  481. package/lib/render/sprites/escalator.js +156 -0
  482. package/lib/render/sprites/escalator.js.map +1 -0
  483. package/lib/render/sprites/events.d.ts +56 -0
  484. package/lib/render/sprites/events.js +280 -0
  485. package/lib/render/sprites/events.js.map +1 -0
  486. package/lib/render/sprites/facilities/garage.d.ts +23 -0
  487. package/lib/render/sprites/facilities/garage.js +230 -0
  488. package/lib/render/sprites/facilities/garage.js.map +1 -0
  489. package/lib/render/sprites/facilities/recycling.d.ts +3 -0
  490. package/lib/render/sprites/facilities/recycling.js +210 -0
  491. package/lib/render/sprites/facilities/recycling.js.map +1 -0
  492. package/lib/render/sprites/facilities/recyclingLook.d.ts +49 -0
  493. package/lib/render/sprites/facilities/recyclingLook.js +52 -0
  494. package/lib/render/sprites/facilities/recyclingLook.js.map +1 -0
  495. package/lib/render/sprites/facilities/service.d.ts +14 -0
  496. package/lib/render/sprites/facilities/service.js +437 -0
  497. package/lib/render/sprites/facilities/service.js.map +1 -0
  498. package/lib/render/sprites/facilities/serviceKit.d.ts +61 -0
  499. package/lib/render/sprites/facilities/serviceKit.js +113 -0
  500. package/lib/render/sprites/facilities/serviceKit.js.map +1 -0
  501. package/lib/render/sprites/facilities/vehicles.d.ts +38 -0
  502. package/lib/render/sprites/facilities/vehicles.js +276 -0
  503. package/lib/render/sprites/facilities/vehicles.js.map +1 -0
  504. package/lib/render/sprites/facilities/venue.d.ts +28 -0
  505. package/lib/render/sprites/facilities/venue.js +211 -0
  506. package/lib/render/sprites/facilities/venue.js.map +1 -0
  507. package/lib/render/sprites/facilities/weddingHall.d.ts +9 -0
  508. package/lib/render/sprites/facilities/weddingHall.js +410 -0
  509. package/lib/render/sprites/facilities/weddingHall.js.map +1 -0
  510. package/lib/render/sprites/facilities.d.ts +22 -0
  511. package/lib/render/sprites/facilities.js +24 -0
  512. package/lib/render/sprites/facilities.js.map +1 -0
  513. package/lib/render/sprites/helicopter.d.ts +11 -0
  514. package/lib/render/sprites/helicopter.js +60 -0
  515. package/lib/render/sprites/helicopter.js.map +1 -0
  516. package/lib/render/sprites/sky.d.ts +67 -0
  517. package/lib/render/sprites/sky.js +85 -0
  518. package/lib/render/sprites/sky.js.map +1 -0
  519. package/lib/render/sprites/spiralStair.d.ts +19 -0
  520. package/lib/render/sprites/spiralStair.js +111 -0
  521. package/lib/render/sprites/spiralStair.js.map +1 -0
  522. package/lib/render/sprites/structure/entrance.d.ts +35 -0
  523. package/lib/render/sprites/structure/entrance.js +347 -0
  524. package/lib/render/sprites/structure/entrance.js.map +1 -0
  525. package/lib/render/sprites/structure/lobby.d.ts +88 -0
  526. package/lib/render/sprites/structure/lobby.js +350 -0
  527. package/lib/render/sprites/structure/lobby.js.map +1 -0
  528. package/lib/render/sprites/structure/revolvingDoor.d.ts +53 -0
  529. package/lib/render/sprites/structure/revolvingDoor.js +184 -0
  530. package/lib/render/sprites/structure/revolvingDoor.js.map +1 -0
  531. package/lib/render/sprites/structure/rooftop.d.ts +93 -0
  532. package/lib/render/sprites/structure/rooftop.js +302 -0
  533. package/lib/render/sprites/structure/rooftop.js.map +1 -0
  534. package/lib/render/sprites/structure/shell.d.ts +19 -0
  535. package/lib/render/sprites/structure/shell.js +142 -0
  536. package/lib/render/sprites/structure/shell.js.map +1 -0
  537. package/lib/render/sprites/structure/skyBridge.d.ts +28 -0
  538. package/lib/render/sprites/structure/skyBridge.js +259 -0
  539. package/lib/render/sprites/structure/skyBridge.js.map +1 -0
  540. package/lib/render/sprites/structure/tallLobby.d.ts +8 -0
  541. package/lib/render/sprites/structure/tallLobby.js +166 -0
  542. package/lib/render/sprites/structure/tallLobby.js.map +1 -0
  543. package/lib/render/sprites/structure/tallLobbyPieces.d.ts +18 -0
  544. package/lib/render/sprites/structure/tallLobbyPieces.js +82 -0
  545. package/lib/render/sprites/structure/tallLobbyPieces.js.map +1 -0
  546. package/lib/render/sprites/structure.d.ts +15 -0
  547. package/lib/render/sprites/structure.js +16 -0
  548. package/lib/render/sprites/structure.js.map +1 -0
  549. package/lib/render/sprites/transport.d.ts +30 -0
  550. package/lib/render/sprites/transport.js +376 -0
  551. package/lib/render/sprites/transport.js.map +1 -0
  552. package/lib/render/sprites.d.ts +16 -0
  553. package/lib/render/sprites.js +108 -0
  554. package/lib/render/sprites.js.map +1 -0
  555. package/lib/render/venueFlights.d.ts +61 -0
  556. package/lib/render/venueFlights.js +50 -0
  557. package/lib/render/venueFlights.js.map +1 -0
  558. package/lib/shared/engineTypes.d.ts +256 -0
  559. package/lib/shared/engineTypes.js +8 -0
  560. package/lib/shared/engineTypes.js.map +1 -0
  561. package/lib/shared/floorRuns.d.ts +22 -0
  562. package/lib/shared/floorRuns.js +39 -0
  563. package/lib/shared/floorRuns.js.map +1 -0
  564. package/lib/shared/inputEvents.d.ts +18 -0
  565. package/lib/shared/inputEvents.js +23 -0
  566. package/lib/shared/inputEvents.js.map +1 -0
  567. package/lib/shared/serializedGame.d.ts +142 -0
  568. package/lib/shared/serializedGame.js +2 -0
  569. package/lib/shared/serializedGame.js.map +1 -0
  570. package/lib/shared/types.d.ts +298 -0
  571. package/lib/shared/types.js +47 -0
  572. package/lib/shared/types.js.map +1 -0
  573. package/lib/shared/unitState.d.ts +36 -0
  574. package/lib/shared/unitState.js +42 -0
  575. package/lib/shared/unitState.js.map +1 -0
  576. package/lib/shared/vacateReasonText.d.ts +20 -0
  577. package/lib/shared/vacateReasonText.js +23 -0
  578. package/lib/shared/vacateReasonText.js.map +1 -0
  579. package/lib/shared/viewZoom.d.ts +14 -0
  580. package/lib/shared/viewZoom.js +17 -0
  581. package/lib/shared/viewZoom.js.map +1 -0
  582. package/lib/shared/wellFormed.d.ts +14 -0
  583. package/lib/shared/wellFormed.js +19 -0
  584. package/lib/shared/wellFormed.js.map +1 -0
  585. package/lib/simport/cards.d.ts +26 -0
  586. package/lib/simport/cards.js +138 -0
  587. package/lib/simport/cards.js.map +1 -0
  588. package/lib/simport/clockView.d.ts +24 -0
  589. package/lib/simport/clockView.js +43 -0
  590. package/lib/simport/clockView.js.map +1 -0
  591. package/lib/simport/commands.d.ts +215 -0
  592. package/lib/simport/commands.js +2 -0
  593. package/lib/simport/commands.js.map +1 -0
  594. package/lib/simport/emergencyReads.d.ts +19 -0
  595. package/lib/simport/emergencyReads.js +47 -0
  596. package/lib/simport/emergencyReads.js.map +1 -0
  597. package/lib/simport/enginePort.d.ts +433 -0
  598. package/lib/simport/enginePort.js +11 -0
  599. package/lib/simport/enginePort.js.map +1 -0
  600. package/lib/simport/fixtures/catalog.classic.json +2137 -0
  601. package/lib/simport/fixtures/catalog.modern.json +2515 -0
  602. package/lib/simport/fixtures/viewLayout.json +927 -0
  603. package/lib/simport/headerClock.d.ts +31 -0
  604. package/lib/simport/headerClock.js +29 -0
  605. package/lib/simport/headerClock.js.map +1 -0
  606. package/lib/simport/panels.d.ts +243 -0
  607. package/lib/simport/panels.js +2 -0
  608. package/lib/simport/panels.js.map +1 -0
  609. package/lib/simport/personCards.d.ts +63 -0
  610. package/lib/simport/personCards.js +55 -0
  611. package/lib/simport/personCards.js.map +1 -0
  612. package/lib/simport/portCodes.d.ts +41 -0
  613. package/lib/simport/portCodes.js +49 -0
  614. package/lib/simport/portCodes.js.map +1 -0
  615. package/lib/simport/portEvents.d.ts +39 -0
  616. package/lib/simport/portEvents.js +43 -0
  617. package/lib/simport/portEvents.js.map +1 -0
  618. package/lib/simport/portRenderSim.d.ts +70 -0
  619. package/lib/simport/portRenderSim.js +129 -0
  620. package/lib/simport/portRenderSim.js.map +1 -0
  621. package/lib/simport/queries.d.ts +64 -0
  622. package/lib/simport/queries.js +30 -0
  623. package/lib/simport/queries.js.map +1 -0
  624. package/lib/simport/recyclingPort.d.ts +13 -0
  625. package/lib/simport/recyclingPort.js +2 -0
  626. package/lib/simport/recyclingPort.js.map +1 -0
  627. package/lib/simport/request.d.ts +44 -0
  628. package/lib/simport/request.js +214 -0
  629. package/lib/simport/request.js.map +1 -0
  630. package/lib/simport/roomTiers.d.ts +102 -0
  631. package/lib/simport/roomTiers.js +122 -0
  632. package/lib/simport/roomTiers.js.map +1 -0
  633. package/lib/simport/scheduleSlots.d.ts +19 -0
  634. package/lib/simport/scheduleSlots.js +87 -0
  635. package/lib/simport/scheduleSlots.js.map +1 -0
  636. package/lib/simport/skyBridgePort.d.ts +20 -0
  637. package/lib/simport/skyBridgePort.js +2 -0
  638. package/lib/simport/skyBridgePort.js.map +1 -0
  639. package/lib/simport/skyBridgeView.d.ts +15 -0
  640. package/lib/simport/skyBridgeView.js +42 -0
  641. package/lib/simport/skyBridgeView.js.map +1 -0
  642. package/lib/simport/statsSheet.d.ts +15 -0
  643. package/lib/simport/statsSheet.js +101 -0
  644. package/lib/simport/statsSheet.js.map +1 -0
  645. package/lib/simport/tdtRecords.d.ts +9 -0
  646. package/lib/simport/tdtRecords.js +112 -0
  647. package/lib/simport/tdtRecords.js.map +1 -0
  648. package/lib/simport/tdtReportFacts.d.ts +110 -0
  649. package/lib/simport/tdtReportFacts.js +8 -0
  650. package/lib/simport/tdtReportFacts.js.map +1 -0
  651. package/lib/simport/trafficPort.d.ts +22 -0
  652. package/lib/simport/trafficPort.js +2 -0
  653. package/lib/simport/trafficPort.js.map +1 -0
  654. package/lib/simport/view.d.ts +275 -0
  655. package/lib/simport/view.js +2 -0
  656. package/lib/simport/view.js.map +1 -0
  657. package/lib/simport/viewReader.d.ts +89 -0
  658. package/lib/simport/viewReader.js +426 -0
  659. package/lib/simport/viewReader.js.map +1 -0
  660. package/lib/styles/game/appearance.css +108 -0
  661. package/lib/styles/game/base.css +68 -0
  662. package/lib/styles/game/components.css +69 -0
  663. package/lib/styles/game/desk-title.css +183 -0
  664. package/lib/styles/game/desk.css +487 -0
  665. package/lib/styles/game/dialogs.css +360 -0
  666. package/lib/styles/game/editor-sidebar.css +116 -0
  667. package/lib/styles/game/elevator-schedule.css +217 -0
  668. package/lib/styles/game/file-dialog.css +470 -0
  669. package/lib/styles/game/help.css +141 -0
  670. package/lib/styles/game/launch-fireworks.css +17 -0
  671. package/lib/styles/game/media-landscape.css +333 -0
  672. package/lib/styles/game/media-phone.css +303 -0
  673. package/lib/styles/game/media-tablet-touch.css +177 -0
  674. package/lib/styles/game/menubar.css +158 -0
  675. package/lib/styles/game/new-tower.css +219 -0
  676. package/lib/styles/game/onboarding.css +32 -0
  677. package/lib/styles/game/screen-saver.css +85 -0
  678. package/lib/styles/game/splash.css +413 -0
  679. package/lib/styles/game/stats-saves.css +106 -0
  680. package/lib/styles/game/tools-stage.css +340 -0
  681. package/lib/styles/game/topbar.css +191 -0
  682. package/lib/styles/menu-bar.css +108 -0
  683. package/lib/styles/not-found.css +335 -0
  684. package/lib/styles/overview-map-views.css +88 -0
  685. package/lib/styles/overview-map.css +195 -0
  686. package/lib/styles/retro-components.css +179 -0
  687. package/lib/styles/retro-page.css +254 -0
  688. package/lib/styles/retro-tokens.css +122 -0
  689. package/lib/styles/schemes/high-contrast.css +173 -0
  690. package/lib/styles/schemes/skyline.css +134 -0
  691. package/lib/styles.css +66 -0
  692. package/lib/ui/desk/deskGeometry.d.ts +59 -0
  693. package/lib/ui/desk/deskGeometry.js +106 -0
  694. package/lib/ui/desk/deskGeometry.js.map +1 -0
  695. package/lib/ui/desk/deskWindow.d.ts +90 -0
  696. package/lib/ui/desk/deskWindow.js +253 -0
  697. package/lib/ui/desk/deskWindow.js.map +1 -0
  698. package/lib/ui/desk/deskWindowMenu.d.ts +55 -0
  699. package/lib/ui/desk/deskWindowMenu.js +143 -0
  700. package/lib/ui/desk/deskWindowMenu.js.map +1 -0
  701. package/lib/ui/escape.d.ts +1 -0
  702. package/lib/ui/escape.js +14 -0
  703. package/lib/ui/escape.js.map +1 -0
  704. package/lib/ui/format.d.ts +14 -0
  705. package/lib/ui/format.js +36 -0
  706. package/lib/ui/format.js.map +1 -0
  707. package/lib/ui/iconPaths.generated.d.ts +4 -0
  708. package/lib/ui/iconPaths.generated.js +68 -0
  709. package/lib/ui/iconPaths.generated.js.map +1 -0
  710. package/lib/ui/icons.d.ts +83 -0
  711. package/lib/ui/icons.js +156 -0
  712. package/lib/ui/icons.js.map +1 -0
  713. package/lib/ui/menuBar.d.ts +94 -0
  714. package/lib/ui/menuBar.js +361 -0
  715. package/lib/ui/menuBar.js.map +1 -0
  716. package/lib/ui/modalPrecedence.d.ts +108 -0
  717. package/lib/ui/modalPrecedence.js +165 -0
  718. package/lib/ui/modalPrecedence.js.map +1 -0
  719. package/lib/ui/movableWindow.d.ts +124 -0
  720. package/lib/ui/movableWindow.js +247 -0
  721. package/lib/ui/movableWindow.js.map +1 -0
  722. package/lib/ui/overviewMapInput.d.ts +109 -0
  723. package/lib/ui/overviewMapInput.js +135 -0
  724. package/lib/ui/overviewMapInput.js.map +1 -0
  725. package/lib/ui/uiModal.d.ts +38 -0
  726. package/lib/ui/uiModal.js +70 -0
  727. package/lib/ui/uiModal.js.map +1 -0
  728. package/lib/wasmhost/buildSection.d.ts +54 -0
  729. package/lib/wasmhost/buildSection.js +143 -0
  730. package/lib/wasmhost/buildSection.js.map +1 -0
  731. package/lib/wasmhost/catalogCheck.d.ts +11 -0
  732. package/lib/wasmhost/catalogCheck.js +43 -0
  733. package/lib/wasmhost/catalogCheck.js.map +1 -0
  734. package/lib/wasmhost/engineAssets.d.ts +57 -0
  735. package/lib/wasmhost/engineAssets.js +63 -0
  736. package/lib/wasmhost/engineAssets.js.map +1 -0
  737. package/lib/wasmhost/engineBoot.d.ts +165 -0
  738. package/lib/wasmhost/engineBoot.js +254 -0
  739. package/lib/wasmhost/engineBoot.js.map +1 -0
  740. package/lib/wasmhost/engineChoice.d.ts +6 -0
  741. package/lib/wasmhost/engineChoice.js +2 -0
  742. package/lib/wasmhost/engineChoice.js.map +1 -0
  743. package/lib/wasmhost/engineDiagnostics.d.ts +66 -0
  744. package/lib/wasmhost/engineDiagnostics.js +189 -0
  745. package/lib/wasmhost/engineDiagnostics.js.map +1 -0
  746. package/lib/wasmhost/engineDiagnosticsLive.d.ts +15 -0
  747. package/lib/wasmhost/engineDiagnosticsLive.js +31 -0
  748. package/lib/wasmhost/engineDiagnosticsLive.js.map +1 -0
  749. package/lib/wasmhost/engineIdentity.d.ts +30 -0
  750. package/lib/wasmhost/engineIdentity.js +59 -0
  751. package/lib/wasmhost/engineIdentity.js.map +1 -0
  752. package/lib/wasmhost/engineLabel.d.ts +40 -0
  753. package/lib/wasmhost/engineLabel.js +50 -0
  754. package/lib/wasmhost/engineLabel.js.map +1 -0
  755. package/lib/wasmhost/engineLoad.d.ts +48 -0
  756. package/lib/wasmhost/engineLoad.js +53 -0
  757. package/lib/wasmhost/engineLoad.js.map +1 -0
  758. package/lib/wasmhost/enginePackageCheck.d.ts +77 -0
  759. package/lib/wasmhost/enginePackageCheck.js +274 -0
  760. package/lib/wasmhost/enginePackageCheck.js.map +1 -0
  761. package/lib/wasmhost/enginePackageNames.d.ts +25 -0
  762. package/lib/wasmhost/enginePackageNames.js +28 -0
  763. package/lib/wasmhost/enginePackageNames.js.map +1 -0
  764. package/lib/wasmhost/enginePackageRecord.d.ts +78 -0
  765. package/lib/wasmhost/enginePackageRecord.js +108 -0
  766. package/lib/wasmhost/enginePackageRecord.js.map +1 -0
  767. package/lib/wasmhost/engineRepair.d.ts +55 -0
  768. package/lib/wasmhost/engineRepair.js +183 -0
  769. package/lib/wasmhost/engineRepair.js.map +1 -0
  770. package/lib/wasmhost/frameView.d.ts +87 -0
  771. package/lib/wasmhost/frameView.js +133 -0
  772. package/lib/wasmhost/frameView.js.map +1 -0
  773. package/lib/wasmhost/hostFault.d.ts +40 -0
  774. package/lib/wasmhost/hostFault.js +94 -0
  775. package/lib/wasmhost/hostFault.js.map +1 -0
  776. package/lib/wasmhost/loadEngineModule.d.ts +79 -0
  777. package/lib/wasmhost/loadEngineModule.js +66 -0
  778. package/lib/wasmhost/loadEngineModule.js.map +1 -0
  779. package/lib/wasmhost/packageHash.d.ts +48 -0
  780. package/lib/wasmhost/packageHash.js +436 -0
  781. package/lib/wasmhost/packageHash.js.map +1 -0
  782. package/lib/wasmhost/rustEngine.d.ts +49 -0
  783. package/lib/wasmhost/rustEngine.js +63 -0
  784. package/lib/wasmhost/rustEngine.js.map +1 -0
  785. package/lib/wasmhost/slotPopulation.d.ts +19 -0
  786. package/lib/wasmhost/slotPopulation.js +69 -0
  787. package/lib/wasmhost/slotPopulation.js.map +1 -0
  788. package/lib/wasmhost/telemetry.d.ts +31 -0
  789. package/lib/wasmhost/telemetry.js +13 -0
  790. package/lib/wasmhost/telemetry.js.map +1 -0
  791. package/package.json +80 -4
@@ -0,0 +1,133 @@
1
+ /**
2
+ * The engine's per-frame read model, decoded from the flat number array
3
+ * `Engine.frameView()` returns. The layout is fixed by `frame_view` in
4
+ * `engine-rs/src/frame.rs`; the header slots and the record widths here
5
+ * mirror it one for one.
6
+ */
7
+ const FRAME_HEADER = 26;
8
+ const PERSON_STATES = ["toShaft", "waiting", "riding", "climbing", "toDest", "dwelling", "done"];
9
+ const UNIT_STATES = ["construction", "empty", "occupied", "moving_in", "vacating", "asleep", "dirty", "infested", "fire", "gutted"];
10
+ const WEATHERS = ["clear", "cloudy", "rain"];
11
+ /** The fixed slots of a person record, before its route (`floors`, then
12
+ * `shafts`); mirrors `PERSON_FIXED` in `engine-rs/src/frame.rs`. */
13
+ const PERSON_FIXED = 18;
14
+ /** The routines the engine tags a person with, by the code it sends (0 is
15
+ * none; the engine sends 255 for a routine it has no code for, which the
16
+ * decoder rejects with every other unknown code). */
17
+ const ROUTINES = ["schoolRun", "salesCall"];
18
+ /** A count the decoder reads before the records it counts: a negative or
19
+ * non-integer one would misalign every record after it. */
20
+ function count(n, what) {
21
+ if (!Number.isInteger(n) || n < 0)
22
+ throw new Error(`frame view: bad ${what} count ${n}`);
23
+ return n;
24
+ }
25
+ function enumAt(table, code, what) {
26
+ const t = table[code];
27
+ if (t === undefined)
28
+ throw new Error(`frame view: unknown ${what} code ${code}`);
29
+ return t;
30
+ }
31
+ /** Decode the header alone. Throws when the array is shorter than the
32
+ * header, or a count or an enum code in it is bad. */
33
+ function decodeHeader(v) {
34
+ if (v.length < FRAME_HEADER)
35
+ throw new Error(`frame view: ${v.length} numbers, header needs ${FRAME_HEADER}`);
36
+ return {
37
+ minutes: v[0],
38
+ revision: v[1],
39
+ mealOverlayRevision: v[2],
40
+ logSeq: v[3],
41
+ money: v[4],
42
+ star: v[5],
43
+ weather: enumAt(WEATHERS, v[6], "weather"),
44
+ santaFxSeq: v[7],
45
+ explosionFx: { seq: v[8], floor: v[9], x: v[10] },
46
+ thiefFx: { seq: v[11], caught: v[12] === 1, floor: v[13] },
47
+ treasureFx: { seq: v[14], floor: v[15], x: v[16] },
48
+ vipFxSeq: v[17],
49
+ counts: { fires: v[18], firesGutRooms: v[19], bombs: v[20] },
50
+ pending: v[21] === 1,
51
+ onHourRuns: v[22],
52
+ people: count(v[23], "people"),
53
+ units: count(v[24], "unit"),
54
+ transports: count(v[25], "transport"),
55
+ };
56
+ }
57
+ /** Decode one frame view. Throws when the array is shorter than its
58
+ * header says, so a binding that changed its layout fails by name. */
59
+ function decodeFrame(v) {
60
+ const header = decodeHeader(v);
61
+ let i = FRAME_HEADER;
62
+ const need = (n) => {
63
+ if (i + n > v.length)
64
+ throw new Error(`frame view: ${v.length} numbers, record at ${i} needs ${n}`);
65
+ };
66
+ // -1 is no count; anything but a whole count, which no engine sends, reads
67
+ // as none as well.
68
+ const counter = (n) => (Number.isSafeInteger(n) && n >= 0 ? n : undefined);
69
+ // A route length the record reads before it reads the route: a negative
70
+ // or non-integer one would misalign every record after it.
71
+ const routeCount = (n, what) => {
72
+ if (!Number.isInteger(n) || n < 0)
73
+ throw new Error(`frame view: person record at ${i} has a bad ${what} count ${n}`);
74
+ return n;
75
+ };
76
+ const people = [];
77
+ for (let k = 0; k < header.people; k++) {
78
+ need(PERSON_FIXED);
79
+ const floorCount = routeCount(v[i + 16], "floors");
80
+ const shaftCount = routeCount(v[i + 17], "shafts");
81
+ const routineCode = v[i + 13];
82
+ if (routineCode !== 0 && ROUTINES[routineCode - 1] === undefined)
83
+ throw new Error(`frame view: unknown routine code ${routineCode}`);
84
+ const record = {
85
+ id: v[i], seed: v[i + 1], staff: v[i + 2] === 1, state: enumAt(PERSON_STATES, v[i + 3], "person state"), floor: v[i + 4], x: v[i + 5], fy: v[i + 6], wait: v[i + 7],
86
+ originFloor: v[i + 8], originUnitId: counter(v[i + 9]), venueUnitId: counter(v[i + 10]), mealVenueId: counter(v[i + 11]),
87
+ countedHotelGuest: v[i + 12] === 1, routine: routineCode === 0 ? undefined : ROUTINES[routineCode - 1], returning: v[i + 14] === 1, dwellSecondsLeft: Number.isNaN(v[i + 15]) ? undefined : v[i + 15],
88
+ floors: [], shafts: [],
89
+ };
90
+ i += PERSON_FIXED;
91
+ need(floorCount + shaftCount);
92
+ for (let f = 0; f < floorCount; f++)
93
+ record.floors.push(v[i + f]);
94
+ i += floorCount;
95
+ for (let f = 0; f < shaftCount; f++)
96
+ record.shafts.push(v[i + f]);
97
+ i += shaftCount;
98
+ people.push(record);
99
+ }
100
+ const units = [];
101
+ for (let k = 0; k < header.units; k++) {
102
+ need(6);
103
+ units.push({ id: v[i], state: enumAt(UNIT_STATES, v[i + 1], "unit state"), occupants: v[i + 2], customersIn: counter(v[i + 3]), hotelCustomersIn: counter(v[i + 4]), outForMeal: counter(v[i + 5]) });
104
+ i += 6;
105
+ }
106
+ const transports = [];
107
+ for (let k = 0; k < header.transports; k++) {
108
+ need(2);
109
+ const id = v[i];
110
+ const cars = count(v[i + 1], `transport ${id} cars`);
111
+ i += 2;
112
+ need(3 * cars);
113
+ const carPositions = [];
114
+ const carLoad = [];
115
+ const carDir = [];
116
+ let anyLoad = false;
117
+ for (let c = 0; c < cars; c++) {
118
+ carPositions.push(v[i]);
119
+ if (v[i + 1] >= 0)
120
+ anyLoad = true;
121
+ carLoad.push(v[i + 1]);
122
+ carDir.push(v[i + 2]);
123
+ i += 3;
124
+ }
125
+ transports.push({ id, cars, carPositions, carLoad: anyLoad ? carLoad : undefined, carDir });
126
+ }
127
+ if (i !== v.length)
128
+ throw new Error(`frame view: ${v.length - i} numbers left after the last record`);
129
+ return { header, people, units, transports };
130
+ }
131
+
132
+ export { FRAME_HEADER, PERSON_FIXED, PERSON_STATES, ROUTINES, UNIT_STATES, WEATHERS, decodeFrame, decodeHeader, enumAt };
133
+ //# sourceMappingURL=frameView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"frameView.js","sources":["../../src/wasmhost/frameView.ts"],"sourcesContent":["import type { Person, PersonState } from \"../shared/engineTypes\";\nimport type { Transport, Unit, UnitState, WeatherKind } from \"../shared/types\";\n\n/**\n * The engine's per-frame read model, decoded from the flat number array\n * `Engine.frameView()` returns. The layout is fixed by `frame_view` in\n * `engine-rs/src/frame.rs`; the header slots and the record widths here\n * mirror it one for one.\n */\nexport const FRAME_HEADER = 26;\n\nexport const PERSON_STATES: readonly PersonState[] = [\"toShaft\", \"waiting\", \"riding\", \"climbing\", \"toDest\", \"dwelling\", \"done\"];\nexport const UNIT_STATES: readonly UnitState[] = [\"construction\", \"empty\", \"occupied\", \"moving_in\", \"vacating\", \"asleep\", \"dirty\", \"infested\", \"fire\", \"gutted\"];\nexport const WEATHERS: readonly WeatherKind[] = [\"clear\", \"cloudy\", \"rain\"];\n\n/** The header: the tower fields the engine sends every frame, named as the\n * read model names them so a merge is a plain assignment, plus the tower\n * revisions, the log cursor, and the record counts that follow. */\nexport interface FrameHeader {\n money: number;\n /** 1 to 5 stars, 6 for TOWER. */\n star: number;\n weather: WeatherKind;\n santaFxSeq: number;\n explosionFx: { floor: number; x: number; seq: number };\n thiefFx: { caught: boolean; floor: number; seq: number };\n treasureFx: { floor: number; x: number; seq: number };\n vipFxSeq: number;\n onHourRuns: number;\n logSeq: number;\n revision: number;\n mealOverlayRevision: number;\n minutes: number;\n counts: { fires: number; firesGutRooms: number; bombs: number };\n pending: boolean;\n people: number;\n units: number;\n transports: number;\n}\n\n/** The fixed slots of a person record, before its route (`floors`, then\n * `shafts`); mirrors `PERSON_FIXED` in `engine-rs/src/frame.rs`. */\nexport const PERSON_FIXED = 18;\n\n/** The routines the engine tags a person with, by the code it sends (0 is\n * none; the engine sends 255 for a routine it has no code for, which the\n * decoder rejects with every other unknown code). */\nexport const ROUTINES: readonly NonNullable<Person[\"routine\"]>[] = [\"schoolRun\", \"salesCall\"];\n\n/** The per-frame slice of a {@link Person}: its position and state, and the\n * routing the suites and the panels read (the origin and venue units, the\n * meal intent, the routine tag, the return leg, the dwell timer, the route).\n * `staff` is always present in a frame (the engine sends 0 or 1) where the\n * instance keeps it optional; the optional unit ids and the timer are\n * undefined when the engine sends -1, as on the instance. */\nexport type PersonRecord = Pick<\n Person,\n \"id\" | \"seed\" | \"state\" | \"floor\" | \"x\" | \"fy\" | \"wait\" | \"originFloor\" | \"originUnitId\" | \"venueUnitId\" | \"mealVenueId\" | \"countedHotelGuest\" | \"routine\" | \"returning\" | \"dwellSecondsLeft\" | \"floors\" | \"shafts\"\n> & { staff: boolean };\n// (An absent dwell timer crosses as NaN, since no sentinel number is free: the\n// timer stays negative on a person through the return leg, so -1 is taken.)\n\n/** The per-frame slice of a {@link Unit}: the counters the engine keeps for\n * the unit's kind; an absent one reads undefined, as on the instance. */\nexport type UnitRecord = Pick<Unit, \"id\" | \"state\" | \"occupants\" | \"customersIn\" | \"hotelCustomersIn\" | \"outForMeal\">;\n\n/** The per-frame slice of a {@link Transport}: the car positions, loads, and\n * directions the renderer animates. */\nexport type TransportRecord = Pick<Transport, \"id\" | \"cars\" | \"carPositions\" | \"carLoad\" | \"carDir\">;\n\nexport interface FrameView {\n header: FrameHeader;\n people: PersonRecord[];\n units: UnitRecord[];\n transports: TransportRecord[];\n}\n\n/** A count the decoder reads before the records it counts: a negative or\n * non-integer one would misalign every record after it. */\nfunction count(n: number, what: string): number {\n if (!Number.isInteger(n) || n < 0) throw new Error(`frame view: bad ${what} count ${n}`);\n return n;\n}\n\nexport function enumAt<T>(table: readonly T[], code: number, what: string): T {\n const t = table[code];\n if (t === undefined) throw new Error(`frame view: unknown ${what} code ${code}`);\n return t;\n}\n\n/** Decode the header alone. Throws when the array is shorter than the\n * header, or a count or an enum code in it is bad. */\nexport function decodeHeader(v: ArrayLike<number>): FrameHeader {\n if (v.length < FRAME_HEADER) throw new Error(`frame view: ${v.length} numbers, header needs ${FRAME_HEADER}`);\n return {\n minutes: v[0],\n revision: v[1],\n mealOverlayRevision: v[2],\n logSeq: v[3],\n money: v[4],\n star: v[5],\n weather: enumAt(WEATHERS, v[6], \"weather\"),\n santaFxSeq: v[7],\n explosionFx: { seq: v[8], floor: v[9], x: v[10] },\n thiefFx: { seq: v[11], caught: v[12] === 1, floor: v[13] },\n treasureFx: { seq: v[14], floor: v[15], x: v[16] },\n vipFxSeq: v[17],\n counts: { fires: v[18], firesGutRooms: v[19], bombs: v[20] },\n pending: v[21] === 1,\n onHourRuns: v[22],\n people: count(v[23], \"people\"),\n units: count(v[24], \"unit\"),\n transports: count(v[25], \"transport\"),\n };\n}\n\n/** Decode one frame view. Throws when the array is shorter than its\n * header says, so a binding that changed its layout fails by name. */\nexport function decodeFrame(v: ArrayLike<number>): FrameView {\n const header = decodeHeader(v);\n let i = FRAME_HEADER;\n const need = (n: number) => {\n if (i + n > v.length) throw new Error(`frame view: ${v.length} numbers, record at ${i} needs ${n}`);\n };\n // -1 is no count; anything but a whole count, which no engine sends, reads\n // as none as well.\n const counter = (n: number) => (Number.isSafeInteger(n) && n >= 0 ? n : undefined);\n // A route length the record reads before it reads the route: a negative\n // or non-integer one would misalign every record after it.\n const routeCount = (n: number, what: string) => {\n if (!Number.isInteger(n) || n < 0) throw new Error(`frame view: person record at ${i} has a bad ${what} count ${n}`);\n return n;\n };\n const people: PersonRecord[] = [];\n for (let k = 0; k < header.people; k++) {\n need(PERSON_FIXED);\n const floorCount = routeCount(v[i + 16], \"floors\");\n const shaftCount = routeCount(v[i + 17], \"shafts\");\n const routineCode = v[i + 13];\n if (routineCode !== 0 && ROUTINES[routineCode - 1] === undefined) throw new Error(`frame view: unknown routine code ${routineCode}`);\n const record: PersonRecord = {\n id: v[i], seed: v[i + 1], staff: v[i + 2] === 1, state: enumAt(PERSON_STATES, v[i + 3], \"person state\"), floor: v[i + 4], x: v[i + 5], fy: v[i + 6], wait: v[i + 7],\n originFloor: v[i + 8], originUnitId: counter(v[i + 9]), venueUnitId: counter(v[i + 10]), mealVenueId: counter(v[i + 11]),\n countedHotelGuest: v[i + 12] === 1, routine: routineCode === 0 ? undefined : ROUTINES[routineCode - 1], returning: v[i + 14] === 1, dwellSecondsLeft: Number.isNaN(v[i + 15]) ? undefined : v[i + 15],\n floors: [], shafts: [],\n };\n i += PERSON_FIXED;\n need(floorCount + shaftCount);\n for (let f = 0; f < floorCount; f++) record.floors.push(v[i + f]);\n i += floorCount;\n for (let f = 0; f < shaftCount; f++) record.shafts.push(v[i + f]);\n i += shaftCount;\n people.push(record);\n }\n const units: UnitRecord[] = [];\n for (let k = 0; k < header.units; k++) {\n need(6);\n units.push({ id: v[i], state: enumAt(UNIT_STATES, v[i + 1], \"unit state\"), occupants: v[i + 2], customersIn: counter(v[i + 3]), hotelCustomersIn: counter(v[i + 4]), outForMeal: counter(v[i + 5]) });\n i += 6;\n }\n const transports: TransportRecord[] = [];\n for (let k = 0; k < header.transports; k++) {\n need(2);\n const id = v[i];\n const cars = count(v[i + 1], `transport ${id} cars`);\n i += 2;\n need(3 * cars);\n const carPositions: number[] = [];\n const carLoad: number[] = [];\n const carDir: number[] = [];\n let anyLoad = false;\n for (let c = 0; c < cars; c++) {\n carPositions.push(v[i]);\n if (v[i + 1] >= 0) anyLoad = true;\n carLoad.push(v[i + 1]);\n carDir.push(v[i + 2]);\n i += 3;\n }\n transports.push({ id, cars, carPositions, carLoad: anyLoad ? carLoad : undefined, carDir });\n }\n if (i !== v.length) throw new Error(`frame view: ${v.length - i} numbers left after the last record`);\n return { header, people, units, transports };\n}\n"],"names":[],"mappings":"AAGA;;;;;AAKG;AACI,MAAM,YAAY,GAAG;AAErB,MAAM,aAAa,GAA2B,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM;AACvH,MAAM,WAAW,GAAyB,CAAC,cAAc,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ;AACxJ,MAAM,QAAQ,GAA2B,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM;AA2B1E;AACqE;AAC9D,MAAM,YAAY,GAAG;AAE5B;;AAEsD;MACzC,QAAQ,GAA8C,CAAC,WAAW,EAAE,WAAW;AA8B5F;AAC4D;AAC5D,SAAS,KAAK,CAAC,CAAS,EAAE,IAAY,EAAA;IACpC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,CAAA,gBAAA,EAAmB,IAAI,CAAA,OAAA,EAAU,CAAC,CAAA,CAAE,CAAC;AACxF,IAAA,OAAO,CAAC;AACV;SAEgB,MAAM,CAAI,KAAmB,EAAE,IAAY,EAAE,IAAY,EAAA;AACvE,IAAA,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;IACrB,IAAI,CA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,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC7B,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACvB,YAAA,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;gBAAE,OAAO,GAAG,IAAI;YACjC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACtB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACrB,CAAC,IAAI,CAAC;QACR;QACA,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,EAAE,MAAM,EAAE,CAAC;IAC7F;AACA,IAAA,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,CAAA,YAAA,EAAe,CAAC,CAAC,MAAM,GAAG,CAAC,CAAA,mCAAA,CAAqC,CAAC;IACrG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE;AAC9C;;"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Telling an engine trap apart from a clean refusal (#1113), and running a
3
+ * teardown's steps through one: what the shipped host keeps of the runtime
4
+ * fallback's state (#874). The restore points, the fault latch and the live
5
+ * state carried to a re-adopted tower served the TypeScript engine's fallback
6
+ * and left with it (#921).
7
+ */
8
+ /**
9
+ * Whether a throw from the engine is a trap, after which the module may be
10
+ * corrupt and must not be called again (#1113): a `WebAssembly.RuntimeError`
11
+ * (a Rust panic or abort), wasm-bindgen's borrow error that every later call
12
+ * on a trapped object throws, or a stack overflow, which unwinds through the
13
+ * module and leaves its stack pointer where it stopped. A stack overflow in
14
+ * the host's own TypeScript looks the same and latches too: it cannot be told
15
+ * apart, and latching is the safe side. A wrapper that keeps the throw as its
16
+ * `cause` (the catalog read) is classed by it, and another realm's errors by
17
+ * their name. Anything else is a clean answer: the engine's own `Result::Err`
18
+ * (a plain `Error`) or a check in the host's TypeScript. Narrow on purpose:
19
+ * one the test misses is only left a refusal, as before.
20
+ */
21
+ export declare function isEngineTrap(error: unknown): boolean;
22
+ /**
23
+ * What kind of trap it was, as a code from a closed list, so a reliability row
24
+ * can say it without carrying the message (an engine message can quote a tower
25
+ * name). `unreachable` is a Rust panic or abort, which is also how a failed
26
+ * allocation ends: in a browser the two look the same. `out-of-bounds` is a
27
+ * memory access outside the module's memory, `stack-overflow` a stack that ran
28
+ * out, `poisoned` a call on an object an earlier trap left borrowed, and
29
+ * `other` any other trap. `none` is not a trap.
30
+ */
31
+ export declare const TRAP_KINDS: readonly ["none", "unreachable", "out-of-bounds", "stack-overflow", "poisoned", "other"];
32
+ export type TrapKind = (typeof TRAP_KINDS)[number];
33
+ /** The kind of the trap in `error` (see {@link TRAP_KINDS}). */
34
+ export declare function trapKind(error: unknown): TrapKind;
35
+ /** Run every step, even after one throws, then throw: a teardown that must
36
+ * let the instance go and free the engine whatever an earlier step did.
37
+ * A lone error is thrown as it is. Several are thrown as one new error that
38
+ * names them all, the first trap's first (or else the first error's), with
39
+ * the trap itself as its cause, so the caller latches on it (#1113). */
40
+ export declare function runEach(...steps: (() => void)[]): void;
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Telling an engine trap apart from a clean refusal (#1113), and running a
3
+ * teardown's steps through one: what the shipped host keeps of the runtime
4
+ * fallback's state (#874). The restore points, the fault latch and the live
5
+ * state carried to a re-adopted tower served the TypeScript engine's fallback
6
+ * and left with it (#921).
7
+ */
8
+ /** wasm-bindgen's error for a call on an object a trap left borrowed. */
9
+ const POISONED = "recursive use of an object detected";
10
+ /**
11
+ * Whether a throw from the engine is a trap, after which the module may be
12
+ * corrupt and must not be called again (#1113): a `WebAssembly.RuntimeError`
13
+ * (a Rust panic or abort), wasm-bindgen's borrow error that every later call
14
+ * on a trapped object throws, or a stack overflow, which unwinds through the
15
+ * module and leaves its stack pointer where it stopped. A stack overflow in
16
+ * the host's own TypeScript looks the same and latches too: it cannot be told
17
+ * apart, and latching is the safe side. A wrapper that keeps the throw as its
18
+ * `cause` (the catalog read) is classed by it, and another realm's errors by
19
+ * their name. Anything else is a clean answer: the engine's own `Result::Err`
20
+ * (a plain `Error`) or a check in the host's TypeScript. Narrow on purpose:
21
+ * one the test misses is only left a refusal, as before.
22
+ */
23
+ function isEngineTrap(error) {
24
+ return trapIn(error) !== null;
25
+ }
26
+ /**
27
+ * What kind of trap it was, as a code from a closed list, so a reliability row
28
+ * can say it without carrying the message (an engine message can quote a tower
29
+ * name). `unreachable` is a Rust panic or abort, which is also how a failed
30
+ * allocation ends: in a browser the two look the same. `out-of-bounds` is a
31
+ * memory access outside the module's memory, `stack-overflow` a stack that ran
32
+ * out, `poisoned` a call on an object an earlier trap left borrowed, and
33
+ * `other` any other trap. `none` is not a trap.
34
+ */
35
+ const TRAP_KINDS = ["none", "unreachable", "out-of-bounds", "stack-overflow", "poisoned", "other"];
36
+ /** The kind of the trap in `error` (see {@link TRAP_KINDS}). */
37
+ function trapKind(error) {
38
+ const trap = trapIn(error);
39
+ if (trap === null)
40
+ return "none";
41
+ const message = String(trap.message ?? "");
42
+ if (message.includes(POISONED))
43
+ return "poisoned";
44
+ if (/call stack size|too much recursion|stack overflow/i.test(message))
45
+ return "stack-overflow";
46
+ if (/out of bounds/i.test(message))
47
+ return "out-of-bounds";
48
+ if (/unreachable/i.test(message))
49
+ return "unreachable";
50
+ return "other";
51
+ }
52
+ /** The trap itself, `error` or one of its causes, or null for none. */
53
+ function trapIn(error) {
54
+ for (let e = error, depth = 0; typeof e === "object" && e !== null && depth < 4; e = e.cause, depth++) {
55
+ if (typeof WebAssembly !== "undefined" && e instanceof WebAssembly.RuntimeError)
56
+ return e;
57
+ const { name, message } = e;
58
+ if (name === "RuntimeError")
59
+ return e;
60
+ if (typeof message !== "string")
61
+ continue;
62
+ if (message.includes(POISONED))
63
+ return e;
64
+ if ((name === "RangeError" && /maximum call stack size exceeded/i.test(message)) || (name === "InternalError" && /too much recursion/i.test(message)))
65
+ return e;
66
+ }
67
+ return null;
68
+ }
69
+ /** Run every step, even after one throws, then throw: a teardown that must
70
+ * let the instance go and free the engine whatever an earlier step did.
71
+ * A lone error is thrown as it is. Several are thrown as one new error that
72
+ * names them all, the first trap's first (or else the first error's), with
73
+ * the trap itself as its cause, so the caller latches on it (#1113). */
74
+ function runEach(...steps) {
75
+ const errors = [];
76
+ for (const step of steps) {
77
+ try {
78
+ step();
79
+ }
80
+ catch (error) {
81
+ errors.push(error);
82
+ }
83
+ }
84
+ if (errors.length === 0)
85
+ return;
86
+ if (errors.length === 1)
87
+ throw errors[0];
88
+ const first = errors.find((e) => trapIn(e) !== null) ?? errors[0];
89
+ const text = (x) => (x instanceof Error ? x.message : String(x));
90
+ throw Object.assign(new Error([first, ...errors.filter((e) => e !== first)].map(text).join(", and ")), { cause: trapIn(first) ?? first });
91
+ }
92
+
93
+ export { TRAP_KINDS, isEngineTrap, runEach, trapKind };
94
+ //# sourceMappingURL=hostFault.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hostFault.js","sources":["../../src/wasmhost/hostFault.ts"],"sourcesContent":["/**\n * Telling an engine trap apart from a clean refusal (#1113), and running a\n * teardown's steps through one: what the shipped host keeps of the runtime\n * fallback's state (#874). The restore points, the fault latch and the live\n * state carried to a re-adopted tower served the TypeScript engine's fallback\n * and left with it (#921).\n */\n\n/** wasm-bindgen's error for a call on an object a trap left borrowed. */\nconst POISONED = \"recursive use of an object detected\";\n\n/**\n * Whether a throw from the engine is a trap, after which the module may be\n * corrupt and must not be called again (#1113): a `WebAssembly.RuntimeError`\n * (a Rust panic or abort), wasm-bindgen's borrow error that every later call\n * on a trapped object throws, or a stack overflow, which unwinds through the\n * module and leaves its stack pointer where it stopped. A stack overflow in\n * the host's own TypeScript looks the same and latches too: it cannot be told\n * apart, and latching is the safe side. A wrapper that keeps the throw as its\n * `cause` (the catalog read) is classed by it, and another realm's errors by\n * their name. Anything else is a clean answer: the engine's own `Result::Err`\n * (a plain `Error`) or a check in the host's TypeScript. Narrow on purpose:\n * one the test misses is only left a refusal, as before.\n */\nexport function isEngineTrap(error: unknown): boolean {\n return trapIn(error) !== null;\n}\n\n/**\n * What kind of trap it was, as a code from a closed list, so a reliability row\n * can say it without carrying the message (an engine message can quote a tower\n * name). `unreachable` is a Rust panic or abort, which is also how a failed\n * allocation ends: in a browser the two look the same. `out-of-bounds` is a\n * memory access outside the module's memory, `stack-overflow` a stack that ran\n * out, `poisoned` a call on an object an earlier trap left borrowed, and\n * `other` any other trap. `none` is not a trap.\n */\nexport const TRAP_KINDS = [\"none\", \"unreachable\", \"out-of-bounds\", \"stack-overflow\", \"poisoned\", \"other\"] as const;\nexport type TrapKind = (typeof TRAP_KINDS)[number];\n\n/** The kind of the trap in `error` (see {@link TRAP_KINDS}). */\nexport function trapKind(error: unknown): TrapKind {\n const trap = trapIn(error);\n if (trap === null) return \"none\";\n const message = String((trap as { message?: unknown }).message ?? \"\");\n if (message.includes(POISONED)) return \"poisoned\";\n if (/call stack size|too much recursion|stack overflow/i.test(message)) return \"stack-overflow\";\n if (/out of bounds/i.test(message)) return \"out-of-bounds\";\n if (/unreachable/i.test(message)) return \"unreachable\";\n return \"other\";\n}\n\n/** The trap itself, `error` or one of its causes, or null for none. */\nfunction trapIn(error: unknown): unknown {\n for (let e = error, depth = 0; typeof e === \"object\" && e !== null && depth < 4; e = (e as { cause?: unknown }).cause, depth++) {\n if (typeof WebAssembly !== \"undefined\" && e instanceof WebAssembly.RuntimeError) return e;\n const { name, message } = e as { name?: unknown; message?: unknown };\n if (name === \"RuntimeError\") return e;\n if (typeof message !== \"string\") continue;\n if (message.includes(POISONED)) return e;\n if ((name === \"RangeError\" && /maximum call stack size exceeded/i.test(message)) || (name === \"InternalError\" && /too much recursion/i.test(message))) return e;\n }\n return null;\n}\n\n/** Run every step, even after one throws, then throw: a teardown that must\n * let the instance go and free the engine whatever an earlier step did.\n * A lone error is thrown as it is. Several are thrown as one new error that\n * names them all, the first trap's first (or else the first error's), with\n * the trap itself as its cause, so the caller latches on it (#1113). */\nexport function runEach(...steps: (() => void)[]): void {\n const errors: unknown[] = [];\n for (const step of steps) {\n try {\n step();\n } catch (error) {\n errors.push(error);\n }\n }\n if (errors.length === 0) return;\n if (errors.length === 1) throw errors[0];\n const first = errors.find((e) => trapIn(e) !== null) ?? errors[0];\n const text = (x: unknown) => (x instanceof Error ? x.message : String(x));\n throw Object.assign(new Error([first, ...errors.filter((e) => e !== first)].map(text).join(\", and \")), { cause: trapIn(first) ?? first });\n}\n"],"names":[],"mappings":"AAAA;;;;;;AAMG;AAEH;AACA,MAAM,QAAQ,GAAG,qCAAqC;AAEtD;;;;;;;;;;;;AAYG;AACG,SAAU,YAAY,CAAC,KAAc,EAAA;AACzC,IAAA,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,IAAI;AAC/B;AAEA;;;;;;;;AAQG;AACI,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,EAAE,OAAO;AAGxG;AACM,SAAU,QAAQ,CAAC,KAAc,EAAA;AACrC,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC;IAC1B,IAAI,IAAI,KAAK,IAAI;AAAE,QAAA,OAAO,MAAM;IAChC,MAAM,OAAO,GAAG,MAAM,CAAE,IAA8B,CAAC,OAAO,IAAI,EAAE,CAAC;AACrE,IAAA,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAAE,QAAA,OAAO,UAAU;AACjD,IAAA,IAAI,oDAAoD,CAAC,IAAI,CAAC,OAAO,CAAC;AAAE,QAAA,OAAO,gBAAgB;AAC/F,IAAA,IAAI,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC;AAAE,QAAA,OAAO,eAAe;AAC1D,IAAA,IAAI,cAAc,CA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MAAM,KAAK,CAAC;AAAE,QAAA,MAAM,MAAM,CAAC,CAAC,CAAC;IACxC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC;IACjE,MAAM,IAAI,GAAG,CAAC,CAAU,MAAM,CAAC,YAAY,KAAK,GAAG,CAAC,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACzE,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,KAAK,EAAE,CAAC;AAC3I;;"}
@@ -0,0 +1,79 @@
1
+ import type { BuildMetadataResult } from "./buildSection";
2
+ import { initEngineGlue } from "./engineLoad";
3
+ import { type PackageUrls, type VerifyOptions } from "./enginePackageCheck";
4
+ import type { ExpectedEnginePackage } from "./enginePackageRecord";
5
+ /**
6
+ * The one place that turns the served engine package into a running module
7
+ * (#985 criterion 5). The main-thread boot, the engine worker and the dual
8
+ * run's worker all load through it, so no route runs bytes the shell was not
9
+ * built for (a development serve excepted, below). Design:
10
+ * _bmad-output/planning-artifacts/design/
11
+ * design-engine-package-set-consistency-2026-10-15.md, section 5.3.
12
+ *
13
+ * It fetches `BUILD.json`, the glue and the binary once each, refuses unless
14
+ * they are the package this shell was built with (`verifyEnginePackage`),
15
+ * compiles the hashed binary (reading the build section the build stamped into
16
+ * it, #963), imports the glue from a Blob made of the very bytes that were
17
+ * hashed, and hands the compiled module to the glue's `init`. Nothing is fetched a second
18
+ * time, so a cache that changes between the check and the run cannot matter.
19
+ *
20
+ * Permanent host infrastructure: it is the load path of the Rust engine in
21
+ * every build, and nothing in it depends on the TypeScript engine.
22
+ */
23
+ /** What the wasm-bindgen glue exports: `default` is its `init`. */
24
+ export interface EngineGlue {
25
+ default(input?: {
26
+ module_or_path: WebAssembly.Module;
27
+ }): Promise<{
28
+ memory?: WebAssembly.Memory;
29
+ } | undefined>;
30
+ }
31
+ export interface LoadedEngine {
32
+ /** The glue's module namespace, ready for `checkBinding`. */
33
+ mod: EngineGlue;
34
+ /** What `init` returned: the instance's exports, for the linear memory. */
35
+ exports: {
36
+ memory?: WebAssembly.Memory;
37
+ } | undefined;
38
+ /** False only for a development serve, which skips the byte check. */
39
+ verified: boolean;
40
+ }
41
+ export interface LoadEngineOptions {
42
+ /** Aborted when the caller's deadline passes. Checked after every await. */
43
+ signal?: AbortSignal;
44
+ /** The package the shell was built with (default: the compiled-in one). */
45
+ expected?: ExpectedEnginePackage | null;
46
+ /** Called with what the binary's build section said, as soon as the verified
47
+ * binary has compiled, so a glue that then fails to import or link still
48
+ * leaves it (#963). */
49
+ onBuild?: (build: BuildMetadataResult) => void;
50
+ /** The binary's URL on a development serve, which skips the byte check and
51
+ * loads through engineLoad.ts; by default the one beside the glue. */
52
+ wasmUrl?: string | URL;
53
+ /** Run the byte check on a development serve too (the tests do). */
54
+ checkInDev?: boolean;
55
+ fetch?: VerifyOptions["fetch"];
56
+ digest?: VerifyOptions["digest"];
57
+ controlled?: boolean;
58
+ origin?: string;
59
+ importModule?: (url: string) => Promise<EngineGlue>;
60
+ /** The development route's loader (engineLoad.ts). */
61
+ initGlue?: typeof initEngineGlue;
62
+ compile?: (bytes: Uint8Array) => Promise<{
63
+ module: WebAssembly.Module;
64
+ build: BuildMetadataResult;
65
+ }>;
66
+ objectUrls?: Pick<typeof URL, "createObjectURL" | "revokeObjectURL">;
67
+ }
68
+ /** The URLs of the three files, from the URL the glue is served at. */
69
+ export declare function enginePackageUrls(glue: string): PackageUrls;
70
+ /**
71
+ * Load and initialize the engine package served at `glueUrl`. Rejects with an
72
+ * `EnginePackageError` for a refusal (see {@link verifyEnginePackage}), or
73
+ * `EnginePackageAborted` once `signal` fires and a step then settles OK (its
74
+ * result is dropped). A step that fails after the signal fired keeps its own
75
+ * error; the caller that set the deadline has already given up on the load.
76
+ * A step already running (the compile inside `init`) cannot be cancelled, so
77
+ * a late engine can finish and stay in memory with the glue's module record.
78
+ */
79
+ export declare function loadEngineModule(glueUrl: string, opts?: LoadEngineOptions): Promise<LoadedEngine>;
@@ -0,0 +1,66 @@
1
+ import { initEngineGlue, compileEngineBytes } from './engineLoad.js';
2
+ import { ENGINE_BUILD_RECORD, ENGINE_WASM, DEV_SKIP_MARKER } from './enginePackageNames.js';
3
+ import { EnginePackageAborted, verifyEnginePackage, isControlled, browserDigest } from './enginePackageCheck.js';
4
+
5
+ /** The URLs of the three files, from the URL the glue is served at. */
6
+ function enginePackageUrls(glue) {
7
+ return { glue, wasm: new URL(ENGINE_WASM, glue).href, record: new URL(ENGINE_BUILD_RECORD, glue).href };
8
+ }
9
+ const importByUrl = (url) => import(/* @vite-ignore */ url);
10
+ /**
11
+ * Load and initialize the engine package served at `glueUrl`. Rejects with an
12
+ * `EnginePackageError` for a refusal (see {@link verifyEnginePackage}), or
13
+ * `EnginePackageAborted` once `signal` fires and a step then settles OK (its
14
+ * result is dropped). A step that fails after the signal fired keeps its own
15
+ * error; the caller that set the deadline has already given up on the load.
16
+ * A step already running (the compile inside `init`) cannot be cancelled, so
17
+ * a late engine can finish and stay in memory with the glue's module record.
18
+ */
19
+ async function loadEngineModule(glueUrl, opts = {}) {
20
+ const importModule = opts.importModule ?? importByUrl;
21
+ // A development serve rebuilds the package under a running page (`npm run
22
+ // wasm:build`), so it loads without the check. The production build
23
+ // replaces `import.meta.env.DEV` with `false` and drops this branch with
24
+ // its marker line; scripts/verify-precache.ts fails the build if it stays.
25
+ if (import.meta.env.DEV && !opts.checkInDev) {
26
+ console.info(`[wasm] ${DEV_SKIP_MARKER}`);
27
+ const { mod, exports } = await (opts.initGlue ?? initEngineGlue)(glueUrl, { onBuild: opts.onBuild, wasmUrl: opts.wasmUrl });
28
+ return { mod: mod, exports: exports, verified: false };
29
+ }
30
+ const signal = opts.signal ?? new AbortController().signal;
31
+ const gone = () => {
32
+ if (signal.aborted)
33
+ throw new EnginePackageAborted();
34
+ };
35
+ const { glue, wasm } = await verifyEnginePackage({
36
+ expected: opts.expected === undefined ? __ENGINE_PACKAGE__ : opts.expected,
37
+ urls: enginePackageUrls(glueUrl),
38
+ fetch: opts.fetch ?? ((url, init) => fetch(url, init)),
39
+ digest: "digest" in opts ? opts.digest : browserDigest(),
40
+ signal,
41
+ controlled: opts.controlled ?? isControlled(globalThis.navigator),
42
+ origin: opts.origin ?? globalThis.location.origin,
43
+ });
44
+ gone();
45
+ // Compiled before the glue is imported, as engineLoad.ts does, so the build
46
+ // is known even when the glue then fails to import or to link.
47
+ const binary = await (opts.compile ?? compileEngineBytes)(wasm);
48
+ opts.onBuild?.(binary.build);
49
+ gone();
50
+ const urls = opts.objectUrls ?? URL;
51
+ const blobUrl = urls.createObjectURL(new Blob([glue], { type: "text/javascript" }));
52
+ let mod;
53
+ try {
54
+ mod = await importModule(blobUrl);
55
+ }
56
+ finally {
57
+ urls.revokeObjectURL(blobUrl);
58
+ }
59
+ gone();
60
+ const exports = await mod.default({ module_or_path: binary.module });
61
+ gone();
62
+ return { mod, exports, verified: true };
63
+ }
64
+
65
+ export { enginePackageUrls, loadEngineModule };
66
+ //# sourceMappingURL=loadEngineModule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadEngineModule.js","sources":["../../src/wasmhost/loadEngineModule.ts"],"sourcesContent":["import type { BuildMetadataResult } from \"./buildSection\";\nimport { compileEngineBytes, initEngineGlue } from \"./engineLoad\";\nimport { DEV_SKIP_MARKER, ENGINE_BUILD_RECORD, ENGINE_WASM } from \"./enginePackageNames\";\nimport { browserDigest, EnginePackageAborted, isControlled, verifyEnginePackage, type PackageUrls, type VerifyOptions } from \"./enginePackageCheck\";\nimport type { ExpectedEnginePackage } from \"./enginePackageRecord\";\n\n/**\n * The one place that turns the served engine package into a running module\n * (#985 criterion 5). The main-thread boot, the engine worker and the dual\n * run's worker all load through it, so no route runs bytes the shell was not\n * built for (a development serve excepted, below). Design:\n * _bmad-output/planning-artifacts/design/\n * design-engine-package-set-consistency-2026-10-15.md, section 5.3.\n *\n * It fetches `BUILD.json`, the glue and the binary once each, refuses unless\n * they are the package this shell was built with (`verifyEnginePackage`),\n * compiles the hashed binary (reading the build section the build stamped into\n * it, #963), imports the glue from a Blob made of the very bytes that were\n * hashed, and hands the compiled module to the glue's `init`. Nothing is fetched a second\n * time, so a cache that changes between the check and the run cannot matter.\n *\n * Permanent host infrastructure: it is the load path of the Rust engine in\n * every build, and nothing in it depends on the TypeScript engine.\n */\n\n/** What the wasm-bindgen glue exports: `default` is its `init`. */\nexport interface EngineGlue {\n default(input?: { module_or_path: WebAssembly.Module }): Promise<{ memory?: WebAssembly.Memory } | undefined>;\n}\n\nexport interface LoadedEngine {\n /** The glue's module namespace, ready for `checkBinding`. */\n mod: EngineGlue;\n /** What `init` returned: the instance's exports, for the linear memory. */\n exports: { memory?: WebAssembly.Memory } | undefined;\n /** False only for a development serve, which skips the byte check. */\n verified: boolean;\n}\n\nexport interface LoadEngineOptions {\n /** Aborted when the caller's deadline passes. Checked after every await. */\n signal?: AbortSignal;\n /** The package the shell was built with (default: the compiled-in one). */\n expected?: ExpectedEnginePackage | null;\n /** Called with what the binary's build section said, as soon as the verified\n * binary has compiled, so a glue that then fails to import or link still\n * leaves it (#963). */\n onBuild?: (build: BuildMetadataResult) => void;\n /** The binary's URL on a development serve, which skips the byte check and\n * loads through engineLoad.ts; by default the one beside the glue. */\n wasmUrl?: string | URL;\n /** Run the byte check on a development serve too (the tests do). */\n checkInDev?: boolean;\n // The rest are test seams; the browser supplies each by default.\n fetch?: VerifyOptions[\"fetch\"];\n digest?: VerifyOptions[\"digest\"];\n controlled?: boolean;\n origin?: string;\n importModule?: (url: string) => Promise<EngineGlue>;\n /** The development route's loader (engineLoad.ts). */\n initGlue?: typeof initEngineGlue;\n compile?: (bytes: Uint8Array) => Promise<{ module: WebAssembly.Module; build: BuildMetadataResult }>;\n objectUrls?: Pick<typeof URL, \"createObjectURL\" | \"revokeObjectURL\">;\n}\n\n/** The URLs of the three files, from the URL the glue is served at. */\nexport function enginePackageUrls(glue: string): PackageUrls {\n return { glue, wasm: new URL(ENGINE_WASM, glue).href, record: new URL(ENGINE_BUILD_RECORD, glue).href };\n}\n\nconst importByUrl = (url: string) => import(/* @vite-ignore */ url) as Promise<EngineGlue>;\n\n/**\n * Load and initialize the engine package served at `glueUrl`. Rejects with an\n * `EnginePackageError` for a refusal (see {@link verifyEnginePackage}), or\n * `EnginePackageAborted` once `signal` fires and a step then settles OK (its\n * result is dropped). A step that fails after the signal fired keeps its own\n * error; the caller that set the deadline has already given up on the load.\n * A step already running (the compile inside `init`) cannot be cancelled, so\n * a late engine can finish and stay in memory with the glue's module record.\n */\nexport async function loadEngineModule(glueUrl: string, opts: LoadEngineOptions = {}): Promise<LoadedEngine> {\n const importModule = opts.importModule ?? importByUrl;\n // A development serve rebuilds the package under a running page (`npm run\n // wasm:build`), so it loads without the check. The production build\n // replaces `import.meta.env.DEV` with `false` and drops this branch with\n // its marker line; scripts/verify-precache.ts fails the build if it stays.\n if (import.meta.env.DEV && !opts.checkInDev) {\n console.info(`[wasm] ${DEV_SKIP_MARKER}`);\n const { mod, exports } = await (opts.initGlue ?? initEngineGlue)(glueUrl, { onBuild: opts.onBuild, wasmUrl: opts.wasmUrl });\n return { mod: mod as EngineGlue, exports: exports as LoadedEngine[\"exports\"], verified: false };\n }\n const signal = opts.signal ?? new AbortController().signal;\n const gone = () => {\n if (signal.aborted) throw new EnginePackageAborted();\n };\n const { glue, wasm } = await verifyEnginePackage({\n expected: opts.expected === undefined ? __ENGINE_PACKAGE__ : opts.expected,\n urls: enginePackageUrls(glueUrl),\n fetch: opts.fetch ?? ((url, init) => fetch(url, init)),\n digest: \"digest\" in opts ? opts.digest : browserDigest(),\n signal,\n controlled: opts.controlled ?? isControlled(globalThis.navigator),\n origin: opts.origin ?? globalThis.location.origin,\n });\n gone();\n // Compiled before the glue is imported, as engineLoad.ts does, so the build\n // is known even when the glue then fails to import or to link.\n const binary = await (opts.compile ?? compileEngineBytes)(wasm);\n opts.onBuild?.(binary.build);\n gone();\n const urls = opts.objectUrls ?? URL;\n const blobUrl = urls.createObjectURL(new Blob([glue as BlobPart], { type: \"text/javascript\" }));\n let mod: EngineGlue;\n try {\n mod = await importModule(blobUrl);\n } finally {\n urls.revokeObjectURL(blobUrl);\n }\n gone();\n const exports = await mod.default({ module_or_path: binary.module });\n gone();\n return { mod, exports, verified: true };\n}\n"],"names":[],"mappings":";;;;AAiEA;AACM,SAAU,iBAAiB,CAAC,IAAY,EAAA;IAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC,IAAI,EAAE;AACzG;AAEA,MAAM,WAAW,GAAG,CAAC,GAAW,KAAK,0BAA0B,GAAG,CAAwB;AAE1F;;;;;;;;AAQG;AACI,eAAe,gBAAgB,CAAC,OAAe,EAAE,OAA0B,EAAE,EAAA;AAClF,IAAA,MAAM,YAAY,GAAG,IAAI,CAAC,YAAY,IAAI,WAAW;;;;;AAKrD,IAAA,IAAI,eAAe,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;AAC3C,QAAA,OAAO,CAAC,IAAI,CAAC,UAAU,eAAe,CAAA,CAAE,CAAC;AACzC,QAAA,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,IAAI,cAAc,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,EAA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AAC,IAAI,IAAI,CAAC,CAAC,IAAgB,CAAC,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC,CAAC;AAC/F,IAAA,IAAI,GAAe;AACnB,IAAA,IAAI;AACF,QAAA,GAAG,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC;IACnC;YAAU;AACR,QAAA,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC;IAC/B;AACA,IAAA,IAAI,EAAE;AACN,IAAA,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,OAAO,CAAC,EAAE,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;AACpE,IAAA,IAAI,EAAE;IACN,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;AACzC;;"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * What a caller hashes of each file instead of its bytes: `label` is the path
3
+ * relative to the crate, `data` the LF-normalized contents, and null leaves the
4
+ * file out. The fuzz window key uses it to ignore a release's version edits.
5
+ */
6
+ export type SourceView = (label: string, data: Buffer) => Buffer | null;
7
+ /**
8
+ * A hash over everything the served package is built from, by path and
9
+ * content, so `src/public/engine/BUILD.json` can say which engine it holds,
10
+ * CI can key its package cache on it, and a test can tell when the sources
11
+ * moved on without a rebuild. It covers:
12
+ *
13
+ * - every file in the crate (`engine-rs/`) except build output (`target/`,
14
+ * `pkg/`, at any depth), the separate `consumer/` crate at its top (#1945),
15
+ * Markdown and local clutter (dotfiles, `~` backups, symlinks), so build
16
+ * scripts, manifest targets and modules in any layout inside the crate are
17
+ * in whatever Cargo.toml or the module attributes say;
18
+ * - every file a `.rs` source names in a literal `include_str!` or
19
+ * `include_bytes!`, wherever it lives;
20
+ * - every module a `#[path = "…"]` attribute (or a `cfg_attr` path) names,
21
+ * wherever it lives, read relative to the naming file's folder (#978),
22
+ * and, for one the walk did not take, the modules its own
23
+ * `mod name;` items load, in turn (see `childModules`);
24
+ * - every folder or file a Cargo manifest's `path = "…"` names (a path
25
+ * dependency, walked like the crate, its own manifests and sources followed
26
+ * in turn), wherever it lives (#978).
27
+ *
28
+ * Whatever this cannot read throws, so a file never drops out of the hash
29
+ * unnoticed: an include macro it cannot follow (`include!`, a raw string, a
30
+ * computed path, other delimiters), a path attribute or manifest path that is
31
+ * not a plain string, and a named file that is missing. A `#[path]` inside an
32
+ * inline module, which Rust reads from a deeper folder, is found there only
33
+ * when the same name also exists beside the file; otherwise it is missing and
34
+ * throws.
35
+ *
36
+ * Not modeled: files a build script reads from outside the crate (the engine
37
+ * has no build script). A change that adds one should widen this hash. The
38
+ * caches keyed on it serve CI's test runs and Vercel previews
39
+ * (src/build/engineCache.ts); a production deploy builds the package from
40
+ * source, so a miss here could stale a test run or a preview, never a
41
+ * release.
42
+ *
43
+ * With a `view`, each file hashes as the view returns it (see `SourceView`);
44
+ * without one, as it is.
45
+ *
46
+ * Node only (the build script, CI and the test); never imported by the app.
47
+ */
48
+ export declare function engineSourceHash(crate: string, view?: SourceView): string;