@bldrs-ai/conway 1.389.1221 → 1.394.1504

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 (382) hide show
  1. package/README.md +36 -22
  2. package/compiled/Dist/ConwayGeomWasmNode.js +0 -0
  3. package/compiled/Dist/ConwayGeomWasmNodeMT.js +0 -0
  4. package/compiled/Dist/ConwayGeomWasmWeb.js +0 -0
  5. package/compiled/Dist/ConwayGeomWasmWebMT.js +1 -1
  6. package/compiled/Dist/ConwayGeomWasmWebMT.wasm +0 -0
  7. package/compiled/dependencies/conway-geom/Dist/ConwayGeomWasmNode.js +0 -0
  8. package/compiled/dependencies/conway-geom/Dist/ConwayGeomWasmNodeMT.js +0 -0
  9. package/compiled/dependencies/conway-geom/Dist/ConwayGeomWasmWeb.js +0 -0
  10. package/compiled/dependencies/conway-geom/Dist/ConwayGeomWasmWebMT.js +1 -1
  11. package/compiled/dependencies/conway-geom/Dist/ConwayGeomWasmWebMT.wasm +0 -0
  12. package/compiled/dependencies/conway-geom/interface/conway_geometry.d.ts +19 -0
  13. package/compiled/dependencies/conway-geom/interface/conway_geometry.d.ts.map +1 -1
  14. package/compiled/dependencies/conway-geom/interface/conway_geometry.js +17 -0
  15. package/compiled/dependencies/conway-geom/interface/parameters/surface_object.d.ts +6 -0
  16. package/compiled/dependencies/conway-geom/interface/parameters/surface_object.d.ts.map +1 -1
  17. package/compiled/examples/browser-bundled.cjs +1569 -51
  18. package/compiled/examples/cli-bundled.cjs +2790 -436
  19. package/compiled/examples/cli-step-bundled.cjs +1904 -229
  20. package/compiled/examples/validator-bundled.cjs +1569 -51
  21. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/b_spline_curve.gen.d.ts +2 -2
  22. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/b_spline_curve.gen.d.ts.map +1 -1
  23. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/b_spline_curve.gen.js +2 -2
  24. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/b_spline_surface.gen.d.ts +3 -3
  25. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/b_spline_surface.gen.d.ts.map +1 -1
  26. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/b_spline_surface.gen.js +3 -3
  27. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/composite_curve.gen.d.ts +1 -1
  28. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/composite_curve.gen.d.ts.map +1 -1
  29. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/composite_curve.gen.js +1 -1
  30. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_curve_2d.gen.d.ts +1 -1
  31. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_curve_2d.gen.d.ts.map +1 -1
  32. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_curve_2d.gen.js +1 -1
  33. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_curve_3d.gen.d.ts +1 -1
  34. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_curve_3d.gen.d.ts.map +1 -1
  35. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_curve_3d.gen.js +1 -1
  36. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_surface.gen.d.ts +1 -1
  37. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_surface.gen.d.ts.map +1 -1
  38. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/offset_surface.gen.js +1 -1
  39. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/presentation_style_assignment.gen.d.ts.map +1 -1
  40. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/presentation_style_assignment.gen.js +2 -2
  41. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/schema_ap214.gen.js +11 -11
  42. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/shape_aspect.gen.d.ts +1 -1
  43. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/shape_aspect.gen.d.ts.map +1 -1
  44. package/compiled/src/AP214E3_2010/AP214E3_2010_gen/shape_aspect.gen.js +1 -1
  45. package/compiled/src/AP214E3_2010/ap214_command_line_main.js +7 -3
  46. package/compiled/src/AP214E3_2010/ap214_geometry_extraction.d.ts +181 -7
  47. package/compiled/src/AP214E3_2010/ap214_geometry_extraction.d.ts.map +1 -1
  48. package/compiled/src/AP214E3_2010/ap214_geometry_extraction.js +906 -137
  49. package/compiled/src/AP214E3_2010/ap214_geometry_extraction.test.js +10 -2
  50. package/compiled/src/AP214E3_2010/ap214_logical_attribute.test.d.ts +2 -0
  51. package/compiled/src/AP214E3_2010/ap214_logical_attribute.test.d.ts.map +1 -0
  52. package/compiled/src/AP214E3_2010/ap214_logical_attribute.test.js +114 -0
  53. package/compiled/src/AP214E3_2010/ap214_model_geometry.d.ts +6 -0
  54. package/compiled/src/AP214E3_2010/ap214_model_geometry.d.ts.map +1 -1
  55. package/compiled/src/AP214E3_2010/ap214_model_geometry.js +9 -0
  56. package/compiled/src/AP214E3_2010/ap214_pcurve_basis_surfaces.test.d.ts +2 -0
  57. package/compiled/src/AP214E3_2010/ap214_pcurve_basis_surfaces.test.d.ts.map +1 -0
  58. package/compiled/src/AP214E3_2010/ap214_pcurve_basis_surfaces.test.js +233 -0
  59. package/compiled/src/AP214E3_2010/ap214_sphere_vertex_loop.test.d.ts +2 -0
  60. package/compiled/src/AP214E3_2010/ap214_sphere_vertex_loop.test.d.ts.map +1 -0
  61. package/compiled/src/AP214E3_2010/ap214_sphere_vertex_loop.test.js +147 -0
  62. package/compiled/src/AP214E3_2010/ap214_step_model.d.ts +2 -1
  63. package/compiled/src/AP214E3_2010/ap214_step_model.d.ts.map +1 -1
  64. package/compiled/src/AP214E3_2010/ap214_step_model.js +1 -1
  65. package/compiled/src/AP214E3_2010/ap214_typed_select_enum.test.d.ts +2 -0
  66. package/compiled/src/AP214E3_2010/ap214_typed_select_enum.test.d.ts.map +1 -0
  67. package/compiled/src/AP214E3_2010/ap214_typed_select_enum.test.js +65 -0
  68. package/compiled/src/AP214E3_2010/ap214_unit_scale.test.d.ts +2 -0
  69. package/compiled/src/AP214E3_2010/ap214_unit_scale.test.d.ts.map +1 -0
  70. package/compiled/src/AP214E3_2010/ap214_unit_scale.test.js +111 -0
  71. package/compiled/src/compat/web-ifc/ap214_streamed_open.test.d.ts +2 -0
  72. package/compiled/src/compat/web-ifc/ap214_streamed_open.test.d.ts.map +1 -0
  73. package/compiled/src/compat/web-ifc/ap214_streamed_open.test.js +190 -0
  74. package/compiled/src/compat/web-ifc/coordination_export_order.test.d.ts +2 -0
  75. package/compiled/src/compat/web-ifc/coordination_export_order.test.d.ts.map +1 -0
  76. package/compiled/src/compat/web-ifc/coordination_export_order.test.js +110 -0
  77. package/compiled/src/compat/web-ifc/coordination_f64.d.ts +165 -0
  78. package/compiled/src/compat/web-ifc/coordination_f64.d.ts.map +1 -0
  79. package/compiled/src/compat/web-ifc/coordination_f64.js +286 -0
  80. package/compiled/src/compat/web-ifc/coordination_f64.test.d.ts +2 -0
  81. package/compiled/src/compat/web-ifc/coordination_f64.test.d.ts.map +1 -0
  82. package/compiled/src/compat/web-ifc/coordination_f64.test.js +225 -0
  83. package/compiled/src/compat/web-ifc/ifc_api.d.ts +154 -0
  84. package/compiled/src/compat/web-ifc/ifc_api.d.ts.map +1 -1
  85. package/compiled/src/compat/web-ifc/ifc_api.js +211 -3
  86. package/compiled/src/compat/web-ifc/ifc_api_deferred_open.test.d.ts +2 -0
  87. package/compiled/src/compat/web-ifc/ifc_api_deferred_open.test.d.ts.map +1 -0
  88. package/compiled/src/compat/web-ifc/ifc_api_deferred_open.test.js +288 -0
  89. package/compiled/src/compat/web-ifc/ifc_api_model_passthrough.d.ts +39 -0
  90. package/compiled/src/compat/web-ifc/ifc_api_model_passthrough.d.ts.map +1 -1
  91. package/compiled/src/compat/web-ifc/ifc_api_model_passthrough_factory.d.ts +30 -0
  92. package/compiled/src/compat/web-ifc/ifc_api_model_passthrough_factory.d.ts.map +1 -1
  93. package/compiled/src/compat/web-ifc/ifc_api_model_passthrough_factory.js +83 -0
  94. package/compiled/src/compat/web-ifc/ifc_api_preview_channel.test.d.ts +2 -0
  95. package/compiled/src/compat/web-ifc/ifc_api_preview_channel.test.d.ts.map +1 -0
  96. package/compiled/src/compat/web-ifc/ifc_api_preview_channel.test.js +383 -0
  97. package/compiled/src/compat/web-ifc/ifc_api_preview_coordination.test.d.ts +2 -0
  98. package/compiled/src/compat/web-ifc/ifc_api_preview_coordination.test.d.ts.map +1 -0
  99. package/compiled/src/compat/web-ifc/ifc_api_preview_coordination.test.js +124 -0
  100. package/compiled/src/compat/web-ifc/ifc_api_proxy_ap214.d.ts +132 -0
  101. package/compiled/src/compat/web-ifc/ifc_api_proxy_ap214.d.ts.map +1 -1
  102. package/compiled/src/compat/web-ifc/ifc_api_proxy_ap214.js +488 -92
  103. package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.d.ts +268 -0
  104. package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.d.ts.map +1 -1
  105. package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.js +996 -149
  106. package/compiled/src/compat/web-ifc/ifc_api_streamed_open.test.d.ts +2 -0
  107. package/compiled/src/compat/web-ifc/ifc_api_streamed_open.test.d.ts.map +1 -0
  108. package/compiled/src/compat/web-ifc/ifc_api_streamed_open.test.js +129 -0
  109. package/compiled/src/compat/web-ifc/spatial_imposter.d.ts +134 -0
  110. package/compiled/src/compat/web-ifc/spatial_imposter.d.ts.map +1 -0
  111. package/compiled/src/compat/web-ifc/spatial_imposter.js +933 -0
  112. package/compiled/src/compat/web-ifc/spatial_imposter.test.d.ts +2 -0
  113. package/compiled/src/compat/web-ifc/spatial_imposter.test.d.ts.map +1 -0
  114. package/compiled/src/compat/web-ifc/spatial_imposter.test.js +467 -0
  115. package/compiled/src/compat/web-ifc/store_preview_channel.d.ts +187 -0
  116. package/compiled/src/compat/web-ifc/store_preview_channel.d.ts.map +1 -0
  117. package/compiled/src/compat/web-ifc/store_preview_channel.js +524 -0
  118. package/compiled/src/compat/web-ifc/store_preview_channel.test.d.ts +2 -0
  119. package/compiled/src/compat/web-ifc/store_preview_channel.test.d.ts.map +1 -0
  120. package/compiled/src/compat/web-ifc/store_preview_channel.test.js +234 -0
  121. package/compiled/src/compat/web-ifc/streamed_preview_channel.d.ts +306 -0
  122. package/compiled/src/compat/web-ifc/streamed_preview_channel.d.ts.map +1 -0
  123. package/compiled/src/compat/web-ifc/streamed_preview_channel.js +580 -0
  124. package/compiled/src/compat/web-ifc/web_wasm_directory.test.d.ts +2 -0
  125. package/compiled/src/compat/web-ifc/web_wasm_directory.test.d.ts.map +1 -0
  126. package/compiled/src/compat/web-ifc/web_wasm_directory.test.js +22 -0
  127. package/compiled/src/core/composed_model_skeleton.d.ts +63 -0
  128. package/compiled/src/core/composed_model_skeleton.d.ts.map +1 -0
  129. package/compiled/src/core/composed_model_skeleton.js +66 -0
  130. package/compiled/src/core/composed_model_skeleton.test.d.ts +2 -0
  131. package/compiled/src/core/composed_model_skeleton.test.d.ts.map +1 -0
  132. package/compiled/src/core/composed_model_skeleton.test.js +69 -0
  133. package/compiled/src/core/demand_geometry_queue.d.ts +147 -0
  134. package/compiled/src/core/demand_geometry_queue.d.ts.map +1 -0
  135. package/compiled/src/core/demand_geometry_queue.js +223 -0
  136. package/compiled/src/core/demand_geometry_queue.test.d.ts +2 -0
  137. package/compiled/src/core/demand_geometry_queue.test.d.ts.map +1 -0
  138. package/compiled/src/core/demand_geometry_queue.test.js +133 -0
  139. package/compiled/src/core/demand_residency_pump.d.ts +93 -0
  140. package/compiled/src/core/demand_residency_pump.d.ts.map +1 -0
  141. package/compiled/src/core/demand_residency_pump.js +120 -0
  142. package/compiled/src/core/demand_residency_pump.test.d.ts +2 -0
  143. package/compiled/src/core/demand_residency_pump.test.d.ts.map +1 -0
  144. package/compiled/src/core/demand_residency_pump.test.js +148 -0
  145. package/compiled/src/core/geometry_tile_bindings.d.ts +110 -0
  146. package/compiled/src/core/geometry_tile_bindings.d.ts.map +1 -0
  147. package/compiled/src/core/geometry_tile_bindings.js +76 -0
  148. package/compiled/src/core/geometry_tile_bindings.test.d.ts +2 -0
  149. package/compiled/src/core/geometry_tile_bindings.test.d.ts.map +1 -0
  150. package/compiled/src/core/geometry_tile_bindings.test.js +211 -0
  151. package/compiled/src/core/geometry_tile_pool.d.ts +99 -0
  152. package/compiled/src/core/geometry_tile_pool.d.ts.map +1 -0
  153. package/compiled/src/core/geometry_tile_pool.js +104 -0
  154. package/compiled/src/core/geometry_tile_pool.test.d.ts +2 -0
  155. package/compiled/src/core/geometry_tile_pool.test.d.ts.map +1 -0
  156. package/compiled/src/core/geometry_tile_pool.test.js +180 -0
  157. package/compiled/src/core/mem/chunked_pool.d.ts +116 -0
  158. package/compiled/src/core/mem/chunked_pool.d.ts.map +1 -0
  159. package/compiled/src/core/mem/chunked_pool.js +149 -0
  160. package/compiled/src/core/mem/chunked_pool.test.d.ts +2 -0
  161. package/compiled/src/core/mem/chunked_pool.test.d.ts.map +1 -0
  162. package/compiled/src/core/mem/chunked_pool.test.js +63 -0
  163. package/compiled/src/core/mem/shared_asset_pool.d.ts +82 -0
  164. package/compiled/src/core/mem/shared_asset_pool.d.ts.map +1 -0
  165. package/compiled/src/core/mem/shared_asset_pool.js +113 -0
  166. package/compiled/src/core/mem/shared_asset_pool.test.d.ts +2 -0
  167. package/compiled/src/core/mem/shared_asset_pool.test.d.ts.map +1 -0
  168. package/compiled/src/core/mem/shared_asset_pool.test.js +49 -0
  169. package/compiled/src/core/model_registry.d.ts +87 -0
  170. package/compiled/src/core/model_registry.d.ts.map +1 -0
  171. package/compiled/src/core/model_registry.js +101 -0
  172. package/compiled/src/core/model_registry.test.d.ts +2 -0
  173. package/compiled/src/core/model_registry.test.d.ts.map +1 -0
  174. package/compiled/src/core/model_registry.test.js +60 -0
  175. package/compiled/src/core/model_uri.d.ts +57 -0
  176. package/compiled/src/core/model_uri.d.ts.map +1 -0
  177. package/compiled/src/core/model_uri.js +101 -0
  178. package/compiled/src/core/model_uri.test.d.ts +2 -0
  179. package/compiled/src/core/model_uri.test.d.ts.map +1 -0
  180. package/compiled/src/core/model_uri.test.js +49 -0
  181. package/compiled/src/core/progress.d.ts +16 -2
  182. package/compiled/src/core/progress.d.ts.map +1 -1
  183. package/compiled/src/core/progress.js +31 -5
  184. package/compiled/src/core/progress.test.js +11 -2
  185. package/compiled/src/core/progress_log.d.ts +1 -0
  186. package/compiled/src/core/progress_log.d.ts.map +1 -1
  187. package/compiled/src/core/progress_log.js +7 -2
  188. package/compiled/src/core/progress_log.test.js +21 -0
  189. package/compiled/src/core/shared_byte_budget.d.ts +60 -0
  190. package/compiled/src/core/shared_byte_budget.d.ts.map +1 -0
  191. package/compiled/src/core/shared_byte_budget.js +85 -0
  192. package/compiled/src/core/shared_byte_budget.test.d.ts +2 -0
  193. package/compiled/src/core/shared_byte_budget.test.d.ts.map +1 -0
  194. package/compiled/src/core/shared_byte_budget.test.js +55 -0
  195. package/compiled/src/core/wasm_heap.d.ts +208 -0
  196. package/compiled/src/core/wasm_heap.d.ts.map +1 -0
  197. package/compiled/src/core/wasm_heap.js +417 -0
  198. package/compiled/src/core/wasm_heap.test.d.ts +2 -0
  199. package/compiled/src/core/wasm_heap.test.d.ts.map +1 -0
  200. package/compiled/src/core/wasm_heap.test.js +546 -0
  201. package/compiled/src/demand/index.d.ts +23 -0
  202. package/compiled/src/demand/index.d.ts.map +1 -0
  203. package/compiled/src/demand/index.js +22 -0
  204. package/compiled/src/ifc/ifc4_gen/IfcLogical.gen.d.ts +1 -1
  205. package/compiled/src/ifc/ifc4_gen/IfcLogical.gen.d.ts.map +1 -1
  206. package/compiled/src/ifc/ifc4_gen/IfcLogical.gen.js +1 -1
  207. package/compiled/src/ifc/ifc4_gen/IfcPresentationStyleAssignment.gen.d.ts.map +1 -1
  208. package/compiled/src/ifc/ifc4_gen/IfcPresentationStyleAssignment.gen.js +2 -2
  209. package/compiled/src/ifc/ifc4_gen/IfcRelInterferesElements.gen.d.ts +1 -1
  210. package/compiled/src/ifc/ifc4_gen/IfcRelInterferesElements.gen.d.ts.map +1 -1
  211. package/compiled/src/ifc/ifc4_gen/IfcRelInterferesElements.gen.js +1 -1
  212. package/compiled/src/ifc/ifc4_gen/schema_ifc.gen.js +2 -2
  213. package/compiled/src/ifc/ifc_demand_extraction.test.d.ts +2 -0
  214. package/compiled/src/ifc/ifc_demand_extraction.test.d.ts.map +1 -0
  215. package/compiled/src/ifc/ifc_demand_extraction.test.js +251 -0
  216. package/compiled/src/ifc/ifc_geometry_extraction.d.ts +367 -6
  217. package/compiled/src/ifc/ifc_geometry_extraction.d.ts.map +1 -1
  218. package/compiled/src/ifc/ifc_geometry_extraction.js +1322 -389
  219. package/compiled/src/ifc/ifc_grid_placement.test.d.ts +2 -0
  220. package/compiled/src/ifc/ifc_grid_placement.test.d.ts.map +1 -0
  221. package/compiled/src/ifc/ifc_grid_placement.test.js +261 -0
  222. package/compiled/src/ifc/ifc_model_geometry.d.ts +12 -0
  223. package/compiled/src/ifc/ifc_model_geometry.d.ts.map +1 -1
  224. package/compiled/src/ifc/ifc_model_geometry.js +15 -0
  225. package/compiled/src/ifc/ifc_regression_batch_main.js +210 -12
  226. package/compiled/src/ifc/ifc_spatial_skeleton.d.ts +145 -0
  227. package/compiled/src/ifc/ifc_spatial_skeleton.d.ts.map +1 -0
  228. package/compiled/src/ifc/ifc_spatial_skeleton.js +266 -0
  229. package/compiled/src/ifc/ifc_spatial_skeleton.test.d.ts +2 -0
  230. package/compiled/src/ifc/ifc_spatial_skeleton.test.d.ts.map +1 -0
  231. package/compiled/src/ifc/ifc_spatial_skeleton.test.js +199 -0
  232. package/compiled/src/ifc/ifc_step_model.d.ts +6 -2
  233. package/compiled/src/ifc/ifc_step_model.d.ts.map +1 -1
  234. package/compiled/src/ifc/ifc_step_model.js +6 -4
  235. package/compiled/src/ifc/ifc_step_parser.d.ts +58 -0
  236. package/compiled/src/ifc/ifc_step_parser.d.ts.map +1 -1
  237. package/compiled/src/ifc/ifc_step_parser.js +64 -0
  238. package/compiled/src/ifc/ifc_stream_model.test.d.ts +2 -0
  239. package/compiled/src/ifc/ifc_stream_model.test.d.ts.map +1 -0
  240. package/compiled/src/ifc/ifc_stream_model.test.js +70 -0
  241. package/compiled/src/ifc/ifc_stream_open.d.ts +131 -0
  242. package/compiled/src/ifc/ifc_stream_open.d.ts.map +1 -0
  243. package/compiled/src/ifc/ifc_stream_open.js +116 -0
  244. package/compiled/src/ifc/ifc_stream_open.test.d.ts +2 -0
  245. package/compiled/src/ifc/ifc_stream_open.test.d.ts.map +1 -0
  246. package/compiled/src/ifc/ifc_stream_open.test.js +230 -0
  247. package/compiled/src/ifc/ifc_tile_extractor.d.ts +84 -0
  248. package/compiled/src/ifc/ifc_tile_extractor.d.ts.map +1 -0
  249. package/compiled/src/ifc/ifc_tile_extractor.js +134 -0
  250. package/compiled/src/ifc/ifc_tile_extractor.test.d.ts +2 -0
  251. package/compiled/src/ifc/ifc_tile_extractor.test.d.ts.map +1 -0
  252. package/compiled/src/ifc/ifc_tile_extractor.test.js +118 -0
  253. package/compiled/src/ifc/ifc_typed_select_enum.test.d.ts +2 -0
  254. package/compiled/src/ifc/ifc_typed_select_enum.test.d.ts.map +1 -0
  255. package/compiled/src/ifc/ifc_typed_select_enum.test.js +60 -0
  256. package/compiled/src/index.d.ts +21 -1
  257. package/compiled/src/index.d.ts.map +1 -1
  258. package/compiled/src/index.js +28 -1
  259. package/compiled/src/logging/logger.d.ts +16 -2
  260. package/compiled/src/logging/logger.d.ts.map +1 -1
  261. package/compiled/src/logging/logger.js +34 -7
  262. package/compiled/src/logging/logger.test.js +30 -0
  263. package/compiled/src/mem/index.d.ts +17 -0
  264. package/compiled/src/mem/index.d.ts.map +1 -0
  265. package/compiled/src/mem/index.js +16 -0
  266. package/compiled/src/namespace_surface.test.d.ts +2 -0
  267. package/compiled/src/namespace_surface.test.d.ts.map +1 -0
  268. package/compiled/src/namespace_surface.test.js +43 -0
  269. package/compiled/src/parsing/parsing_buffer.d.ts +23 -0
  270. package/compiled/src/parsing/parsing_buffer.d.ts.map +1 -1
  271. package/compiled/src/parsing/parsing_buffer.js +31 -0
  272. package/compiled/src/scripts/model_report_displacement.test.d.ts +2 -0
  273. package/compiled/src/scripts/model_report_displacement.test.d.ts.map +1 -0
  274. package/compiled/src/scripts/model_report_displacement.test.js +104 -0
  275. package/compiled/src/scripts/render_glb_paths.test.d.ts +2 -0
  276. package/compiled/src/scripts/render_glb_paths.test.d.ts.map +1 -0
  277. package/compiled/src/scripts/render_glb_paths.test.js +115 -0
  278. package/compiled/src/step/indexing/step_type_indexer.d.ts +20 -0
  279. package/compiled/src/step/indexing/step_type_indexer.d.ts.map +1 -1
  280. package/compiled/src/step/indexing/step_type_indexer.js +67 -0
  281. package/compiled/src/step/parsing/byte_source.d.ts +153 -0
  282. package/compiled/src/step/parsing/byte_source.d.ts.map +1 -0
  283. package/compiled/src/step/parsing/byte_source.js +106 -0
  284. package/compiled/src/step/parsing/byte_source.test.d.ts +2 -0
  285. package/compiled/src/step/parsing/byte_source.test.d.ts.map +1 -0
  286. package/compiled/src/step/parsing/byte_source.test.js +47 -0
  287. package/compiled/src/step/parsing/byte_source_node.d.ts +41 -0
  288. package/compiled/src/step/parsing/byte_source_node.d.ts.map +1 -0
  289. package/compiled/src/step/parsing/byte_source_node.js +54 -0
  290. package/compiled/src/step/parsing/columnar_index.d.ts +103 -0
  291. package/compiled/src/step/parsing/columnar_index.d.ts.map +1 -0
  292. package/compiled/src/step/parsing/columnar_index.js +224 -0
  293. package/compiled/src/step/parsing/columnar_index.test.d.ts +2 -0
  294. package/compiled/src/step/parsing/columnar_index.test.d.ts.map +1 -0
  295. package/compiled/src/step/parsing/columnar_index.test.js +155 -0
  296. package/compiled/src/step/parsing/cross_reference_registry.d.ts +95 -0
  297. package/compiled/src/step/parsing/cross_reference_registry.d.ts.map +1 -0
  298. package/compiled/src/step/parsing/cross_reference_registry.js +91 -0
  299. package/compiled/src/step/parsing/cross_reference_registry.test.d.ts +2 -0
  300. package/compiled/src/step/parsing/cross_reference_registry.test.d.ts.map +1 -0
  301. package/compiled/src/step/parsing/cross_reference_registry.test.js +66 -0
  302. package/compiled/src/step/parsing/decode_utf8.d.ts +15 -0
  303. package/compiled/src/step/parsing/decode_utf8.d.ts.map +1 -1
  304. package/compiled/src/step/parsing/decode_utf8.js +28 -0
  305. package/compiled/src/step/parsing/express_ref_scan.d.ts +20 -0
  306. package/compiled/src/step/parsing/express_ref_scan.d.ts.map +1 -0
  307. package/compiled/src/step/parsing/express_ref_scan.js +91 -0
  308. package/compiled/src/step/parsing/express_ref_scan.test.d.ts +2 -0
  309. package/compiled/src/step/parsing/express_ref_scan.test.d.ts.map +1 -0
  310. package/compiled/src/step/parsing/express_ref_scan.test.js +28 -0
  311. package/compiled/src/step/parsing/index_sidecar.d.ts +81 -0
  312. package/compiled/src/step/parsing/index_sidecar.d.ts.map +1 -0
  313. package/compiled/src/step/parsing/index_sidecar.js +283 -0
  314. package/compiled/src/step/parsing/index_sidecar.test.d.ts +2 -0
  315. package/compiled/src/step/parsing/index_sidecar.test.d.ts.map +1 -0
  316. package/compiled/src/step/parsing/index_sidecar.test.js +122 -0
  317. package/compiled/src/step/parsing/inf_recovery_index.test.d.ts +2 -0
  318. package/compiled/src/step/parsing/inf_recovery_index.test.d.ts.map +1 -0
  319. package/compiled/src/step/parsing/inf_recovery_index.test.js +108 -0
  320. package/compiled/src/step/parsing/prefix_type_index.d.ts +124 -0
  321. package/compiled/src/step/parsing/prefix_type_index.d.ts.map +1 -0
  322. package/compiled/src/step/parsing/prefix_type_index.js +207 -0
  323. package/compiled/src/step/parsing/prefix_type_index.test.d.ts +2 -0
  324. package/compiled/src/step/parsing/prefix_type_index.test.d.ts.map +1 -0
  325. package/compiled/src/step/parsing/prefix_type_index.test.js +298 -0
  326. package/compiled/src/step/parsing/range_byte_source.d.ts +69 -0
  327. package/compiled/src/step/parsing/range_byte_source.d.ts.map +1 -0
  328. package/compiled/src/step/parsing/range_byte_source.js +78 -0
  329. package/compiled/src/step/parsing/range_byte_source.test.d.ts +2 -0
  330. package/compiled/src/step/parsing/range_byte_source.test.d.ts.map +1 -0
  331. package/compiled/src/step/parsing/range_byte_source.test.js +70 -0
  332. package/compiled/src/step/parsing/record_event.d.ts +23 -0
  333. package/compiled/src/step/parsing/record_event.d.ts.map +1 -0
  334. package/compiled/src/step/parsing/record_event.js +1 -0
  335. package/compiled/src/step/parsing/record_field_cursor.d.ts +94 -0
  336. package/compiled/src/step/parsing/record_field_cursor.d.ts.map +1 -0
  337. package/compiled/src/step/parsing/record_field_cursor.js +189 -0
  338. package/compiled/src/step/parsing/step_deserialization_functions.d.ts +29 -0
  339. package/compiled/src/step/parsing/step_deserialization_functions.d.ts.map +1 -1
  340. package/compiled/src/step/parsing/step_deserialization_functions.js +45 -0
  341. package/compiled/src/step/parsing/step_deserialization_functions.test.js +59 -1
  342. package/compiled/src/step/parsing/step_parser.d.ts +66 -1
  343. package/compiled/src/step/parsing/step_parser.d.ts.map +1 -1
  344. package/compiled/src/step/parsing/step_parser.js +164 -10
  345. package/compiled/src/step/parsing/step_string_parser.js +8 -8
  346. package/compiled/src/step/parsing/streaming_index_builder.d.ts +141 -0
  347. package/compiled/src/step/parsing/streaming_index_builder.d.ts.map +1 -0
  348. package/compiled/src/step/parsing/streaming_index_builder.js +280 -0
  349. package/compiled/src/step/parsing/streaming_index_builder.test.d.ts +2 -0
  350. package/compiled/src/step/parsing/streaming_index_builder.test.d.ts.map +1 -0
  351. package/compiled/src/step/parsing/streaming_index_builder.test.js +107 -0
  352. package/compiled/src/step/parsing/streaming_index_builder_async.test.d.ts +2 -0
  353. package/compiled/src/step/parsing/streaming_index_builder_async.test.d.ts.map +1 -0
  354. package/compiled/src/step/parsing/streaming_index_builder_async.test.js +109 -0
  355. package/compiled/src/step/parsing/streaming_record_dispatcher.d.ts +71 -0
  356. package/compiled/src/step/parsing/streaming_record_dispatcher.d.ts.map +1 -0
  357. package/compiled/src/step/parsing/streaming_record_dispatcher.js +88 -0
  358. package/compiled/src/step/parsing/streaming_record_dispatcher.test.d.ts +2 -0
  359. package/compiled/src/step/parsing/streaming_record_dispatcher.test.d.ts.map +1 -0
  360. package/compiled/src/step/parsing/streaming_record_dispatcher.test.js +66 -0
  361. package/compiled/src/step/parsing/uint32_sink.d.ts +72 -0
  362. package/compiled/src/step/parsing/uint32_sink.d.ts.map +1 -0
  363. package/compiled/src/step/parsing/uint32_sink.js +180 -0
  364. package/compiled/src/step/parsing/uint32_sink.test.d.ts +2 -0
  365. package/compiled/src/step/parsing/uint32_sink.test.d.ts.map +1 -0
  366. package/compiled/src/step/parsing/uint32_sink.test.js +199 -0
  367. package/compiled/src/step/step_buffer_provider.d.ts +48 -3
  368. package/compiled/src/step/step_buffer_provider.d.ts.map +1 -1
  369. package/compiled/src/step/step_buffer_provider.js +60 -11
  370. package/compiled/src/step/step_buffer_provider.test.js +14 -0
  371. package/compiled/src/step/step_entity_base.d.ts +65 -3
  372. package/compiled/src/step/step_entity_base.d.ts.map +1 -1
  373. package/compiled/src/step/step_entity_base.js +135 -3
  374. package/compiled/src/step/step_model_base.d.ts +221 -8
  375. package/compiled/src/step/step_model_base.d.ts.map +1 -1
  376. package/compiled/src/step/step_model_base.js +542 -7
  377. package/compiled/src/stream/index.d.ts +34 -0
  378. package/compiled/src/stream/index.d.ts.map +1 -0
  379. package/compiled/src/stream/index.js +32 -0
  380. package/compiled/src/version/version.js +1 -1
  381. package/compiled/tsconfig.tsbuildinfo +1 -1
  382. package/package.json +16 -1
@@ -0,0 +1,546 @@
1
+ // Covers the three ways arrayToWasmHeap used to go wrong quietly. All of them
2
+ // are cheap to exercise against a fake module, and none of them needed the
3
+ // geometry wasm - which is the point, since the real one only misbehaves under
4
+ // full-corpus memory pressure (bldrs-ai/conway#485).
5
+ import { describe, expect, test } from "@jest/globals";
6
+ import { arraysToWasmHeap, arrayToWasmHeap, freeAll, releaseQuietly, wasmHeapByteLength, wasmHeapView, withRelease, } from "./wasm_heap.js";
7
+ const HEAP_BYTES = 1024;
8
+ // #485's captured state in miniature: a heap that has grown, a module view
9
+ // still describing the size before it, and an address that is valid in the
10
+ // first and past the end of the second.
11
+ const STALE_HEAP_BYTES = 256;
12
+ const GROWN_HEAP_BYTES = 1024;
13
+ const GROWN_ADDRESS = 512;
14
+ // Named rather than inlined, and non-zero, since what every assertion here
15
+ // actually checks is that the right bytes landed somewhere that starts out
16
+ // zero-filled.
17
+ const PAYLOAD = Float64Array.from([1, 2, 3]);
18
+ const TAIL = Float64Array.from([7, 8]);
19
+ /**
20
+ * A stand-in for the emscripten module, with a heap we control.
21
+ *
22
+ * @param heapBytes Size of the fake heap.
23
+ * @param malloc What _malloc should hand back.
24
+ * @return {WasmHeapModule} The fake module.
25
+ */
26
+ function fakeModule(heapBytes, malloc) {
27
+ const heap = new Uint8Array(new ArrayBuffer(heapBytes));
28
+ return { _malloc: malloc, _free: () => { }, HEAPU8: heap };
29
+ }
30
+ // Distinctive enough that a test can assert an error is NOT one of these. The
31
+ // point of the assertions using them is that neither ever reaches a caller.
32
+ const SCRATCH_PUSH_FAILURE = "embind push_back could not allocate";
33
+ const SCRATCH_DELETE_FAILURE = "embind delete re-entered a dead runtime";
34
+ /**
35
+ * A module in exactly the state #485 was captured in.
36
+ *
37
+ * The heap has grown - a pthread did it, so this thread's glue never ran - and
38
+ * growth on a NON-extensible SharedArrayBuffer produces a different buffer
39
+ * object rather than lengthening the one in hand. So `_malloc` hands back an
40
+ * address that is perfectly valid in the real heap and past the end of the
41
+ * view the module is still caching, and stays that way until something makes
42
+ * emscripten rebuild its views.
43
+ *
44
+ * `HEAPU8` is a getter for the same reason it is re-read rather than cached in
45
+ * the code under test: the refresh REPLACES the property, and a fake that
46
+ * handed out one fixed view could not tell a helper that re-reads from one
47
+ * that does not.
48
+ *
49
+ * @param staleBytes Size of the heap the module's views still describe.
50
+ * @param grownBytes Size of the heap that actually exists.
51
+ * @param address What _malloc returns, an address in the grown region.
52
+ * @param refresh How the fake models emscripten's refresh route. 'embind'
53
+ * mimics the std::string round trip that is the only route conway's builds
54
+ * have; 'none' models a module with no route at all.
55
+ * @param scratchFaults Which halves of the embind round trip should throw.
56
+ * Only meaningful for the 'embind' route.
57
+ * @return {GrowingFake} The fake and the two buffers to assert against.
58
+ */
59
+ function growingFakeModule(staleBytes, grownBytes, address, refresh = "embind", scratchFaults = {}) {
60
+ const staleBuffer = new ArrayBuffer(staleBytes);
61
+ const grownBuffer = new ArrayBuffer(grownBytes);
62
+ let viewsAreCurrent = false;
63
+ let refreshes = 0;
64
+ let outstanding = 0;
65
+ /** Model emscripten's updateMemoryViews: rebind everything to the real heap. */
66
+ function rebind() {
67
+ ++refreshes;
68
+ viewsAreCurrent = true;
69
+ }
70
+ const wasmModule = {
71
+ _malloc: () => address,
72
+ _free: () => { },
73
+ get HEAPU8() {
74
+ return new Uint8Array(viewsAreCurrent ? grownBuffer : staleBuffer);
75
+ },
76
+ };
77
+ if (refresh === "exported") {
78
+ wasmModule.updateMemoryViews = rebind;
79
+ }
80
+ else if (refresh === "embind") {
81
+ // The refresh conway's builds actually have: emscripten's own glue calls
82
+ // growMemViews() before touching the heap to marshal a std::string, so a
83
+ // push_back is what rebuilds the module's views for us.
84
+ wasmModule.stringVector = class {
85
+ /** @param value Ignored; the marshalling is the point, not the string. */
86
+ push_back(value) {
87
+ void value;
88
+ // Before the rebind, because a marshalling failure is a refresh that
89
+ // did NOT happen - which is the state the caller then has to report.
90
+ if (scratchFaults.push === true) {
91
+ throw new Error(SCRATCH_PUSH_FAILURE);
92
+ }
93
+ rebind();
94
+ }
95
+ /** Returns the scratch vector to wasm. */
96
+ delete() {
97
+ // Counted out first even when the fault is armed: what `balanced`
98
+ // pins is that the delete was ATTEMPTED for every vector taken, and a
99
+ // delete that throws has still been attempted.
100
+ --outstanding;
101
+ if (scratchFaults.delete === true) {
102
+ throw new Error(SCRATCH_DELETE_FAILURE);
103
+ }
104
+ }
105
+ /** Counts itself out so the test can prove it was given back. */
106
+ constructor() {
107
+ ++outstanding;
108
+ }
109
+ };
110
+ }
111
+ return {
112
+ wasmModule,
113
+ staleBuffer,
114
+ grownBuffer,
115
+ refreshes: () => refreshes,
116
+ balanced: () => outstanding === 0,
117
+ };
118
+ }
119
+ describe("arrayToWasmHeap", () => {
120
+ test("copies the array and returns the pointer", () => {
121
+ const address = 64;
122
+ const wasmModule = fakeModule(HEAP_BYTES, () => address);
123
+ const source = PAYLOAD;
124
+ expect(arrayToWasmHeap(wasmModule, source)).toBe(address);
125
+ const written = new Float64Array(wasmModule.HEAPU8.buffer, address, source.length);
126
+ expect(Array.from(written)).toEqual(Array.from(source));
127
+ });
128
+ // The bug the IFC path had already fixed and the AP214 path had not: a
129
+ // subarray shares its parent's buffer, so copying `array.buffer` wholesale
130
+ // silently writes the parent's first bytes instead of the view's.
131
+ test("copies a subarray's own window, not its parent buffer", () => {
132
+ const address = 32;
133
+ const wasmModule = fakeModule(HEAP_BYTES, () => address);
134
+ const parent = Float64Array.from([0, 0, ...TAIL]);
135
+ const view = parent.subarray(2);
136
+ arrayToWasmHeap(wasmModule, view);
137
+ const written = new Float64Array(wasmModule.HEAPU8.buffer, address, view.length);
138
+ expect(Array.from(written)).toEqual(Array.from(TAIL));
139
+ });
140
+ // 0 is a valid byteOffset, so this used to construct a view happily and
141
+ // write over whatever lives at address 0 rather than reporting exhaustion.
142
+ test("reports a failed malloc instead of writing to address 0", () => {
143
+ const wasmModule = fakeModule(HEAP_BYTES, () => 0);
144
+ expect(() => arrayToWasmHeap(wasmModule, PAYLOAD))
145
+ .toThrow(/_malloc returned an unusable address/);
146
+ });
147
+ // A >2GB address is a SUCCESSFUL allocation that arrives signed, because
148
+ // _malloc is a raw i32 export and every target builds with 4GB max. Treating
149
+ // it as a failure would hard-fail every copy once the heap passes 2GB, which
150
+ // is exactly the memory-pressure case #485 is about - so it is normalised,
151
+ // not rejected. Simulated here by a heap sized past 2GB in address terms
152
+ // only; nothing that big is allocated.
153
+ test("an address above 2GB is normalised, not read as a failure", () => {
154
+ const signedAddress = -2147483648;
155
+ const unsignedAddress = 2147483648;
156
+ const headroom = 4096;
157
+ const wasmModule = {
158
+ _malloc: () => signedAddress,
159
+ _free: () => { },
160
+ HEAPU8: { length: 0, buffer: { byteLength: unsignedAddress + headroom } },
161
+ };
162
+ // Fails on the copy rather than on the guard, which is the proof it got
163
+ // past the "unusable address" test with the address intact.
164
+ expect(() => arrayToWasmHeap(wasmModule, PAYLOAD))
165
+ .not.toThrow(/_malloc returned an unusable address/);
166
+ });
167
+ // #485's confirmed shape end to end: the heap grew on another thread, so
168
+ // _malloc's address is real and the module's cached view ends before it.
169
+ // Getting this wrong is not a crash but a WRONG ANSWER - the bytes have to
170
+ // land in the heap that exists, not in the one the view remembers.
171
+ test("copies into the grown heap when a pointer lands past the stale view", () => {
172
+ const address = GROWN_ADDRESS;
173
+ const fake = growingFakeModule(STALE_HEAP_BYTES, GROWN_HEAP_BYTES, address);
174
+ expect(arrayToWasmHeap(fake.wasmModule, PAYLOAD)).toBe(address);
175
+ expect(fake.refreshes()).toBe(1);
176
+ const written = new Float64Array(fake.grownBuffer, address, PAYLOAD.length);
177
+ expect(Array.from(written)).toEqual(Array.from(PAYLOAD));
178
+ // Nothing may have been written to the buffer that is on its way out;
179
+ // a write there is the silent-wrong-digest failure, not a loud one.
180
+ expect(Array.from(new Uint8Array(fake.staleBuffer))
181
+ .some((byte) => byte !== 0)).toBe(false);
182
+ });
183
+ test("gives back the scratch object the refresh borrowed", () => {
184
+ const fake = growingFakeModule(STALE_HEAP_BYTES, GROWN_HEAP_BYTES, GROWN_ADDRESS);
185
+ arrayToWasmHeap(fake.wasmModule, PAYLOAD);
186
+ expect(fake.balanced()).toBe(true);
187
+ });
188
+ // The refresh is not free, so it must not run on the ordinary path - which
189
+ // is every copy but the handful that follow a growth.
190
+ test("does not refresh when the pointer is already inside the view", () => {
191
+ const insideAddress = 64;
192
+ const fake = growingFakeModule(GROWN_HEAP_BYTES, GROWN_HEAP_BYTES * 4, insideAddress);
193
+ arrayToWasmHeap(fake.wasmModule, PAYLOAD);
194
+ expect(fake.refreshes()).toBe(0);
195
+ });
196
+ // Same situation, but on a build that exports emscripten's own rebuilder.
197
+ // Nothing conway ships does today; the point is that the preferred route is
198
+ // taken without the embind detour when it is there.
199
+ test("prefers an exported updateMemoryViews when the build has one", () => {
200
+ const address = GROWN_ADDRESS;
201
+ const fake = growingFakeModule(STALE_HEAP_BYTES, GROWN_HEAP_BYTES, address, "exported");
202
+ expect(arrayToWasmHeap(fake.wasmModule, PAYLOAD)).toBe(address);
203
+ expect(fake.refreshes()).toBe(1);
204
+ });
205
+ // The genuinely-impossible case #498 added the diagnostic for. A refresh
206
+ // that reconciles nothing means the address really is outside the heap, and
207
+ // that has to keep reporting the state rather than being retried away.
208
+ test("still reports the heap state when a refresh cannot reconcile it", () => {
209
+ const past = GROWN_ADDRESS;
210
+ // Grown, but not far enough to contain the address either.
211
+ const fake = growingFakeModule(STALE_HEAP_BYTES, STALE_HEAP_BYTES + PAYLOAD.byteLength, past);
212
+ expect(() => arrayToWasmHeap(fake.wasmModule, PAYLOAD))
213
+ .toThrow(/outside the heap/);
214
+ expect(fake.refreshes()).toBe(1);
215
+ try {
216
+ arrayToWasmHeap(fake.wasmModule, PAYLOAD);
217
+ }
218
+ catch (error) {
219
+ expect(error.message)
220
+ .toContain(`ptr ${past} + ${PAYLOAD.byteLength} bytes`);
221
+ }
222
+ });
223
+ // The refresh is a repair ATTEMPT, and it runs under exactly the memory
224
+ // pressure that makes embind's own marshalling allocation fail. If that
225
+ // failure escapes, it reaches the caller INSTEAD of the heap diagnostic -
226
+ // and #485 is the issue about how expensive it is to debug this path
227
+ // without that diagnostic, so destroying it here would undo the fix.
228
+ test("reports the heap state when the refresh itself cannot allocate", () => {
229
+ const fake = growingFakeModule(STALE_HEAP_BYTES, GROWN_HEAP_BYTES, GROWN_ADDRESS, "embind", { push: true });
230
+ let raised;
231
+ try {
232
+ arrayToWasmHeap(fake.wasmModule, PAYLOAD);
233
+ }
234
+ catch (error) {
235
+ raised = error;
236
+ }
237
+ expect(raised.message).toMatch(/outside the heap/);
238
+ expect(raised.message).not.toContain(SCRATCH_PUSH_FAILURE);
239
+ // The constructor is what registers the embind handle, so a vector whose
240
+ // push threw is still owed a delete.
241
+ expect(fake.balanced()).toBe(true);
242
+ });
243
+ // The mirror case, and the one where quieting actually changes the ANSWER
244
+ // rather than the error text: by the time delete() runs the push has already
245
+ // made emscripten rebuild the views, so the refresh succeeded and the copy
246
+ // has somewhere correct to land. Failing it over the teardown of a scratch
247
+ // object would break an operation that had just been repaired.
248
+ test("completes the copy when only the refresh teardown fails", () => {
249
+ const address = GROWN_ADDRESS;
250
+ const fake = growingFakeModule(STALE_HEAP_BYTES, GROWN_HEAP_BYTES, address, "embind", { delete: true });
251
+ expect(arrayToWasmHeap(fake.wasmModule, PAYLOAD)).toBe(address);
252
+ const written = new Float64Array(fake.grownBuffer, address, PAYLOAD.length);
253
+ expect(Array.from(written)).toEqual(Array.from(PAYLOAD));
254
+ });
255
+ // A module with no refresh route at all - which is what every fake here was
256
+ // before this change, and what a non-emscripten module would be.
257
+ test("reports the heap state when the module offers no refresh route", () => {
258
+ const fake = growingFakeModule(STALE_HEAP_BYTES, GROWN_HEAP_BYTES, GROWN_ADDRESS, "none");
259
+ expect(() => arrayToWasmHeap(fake.wasmModule, PAYLOAD))
260
+ .toThrow(/outside the heap/);
261
+ expect(fake.refreshes()).toBe(0);
262
+ });
263
+ test("a zero-length copy is not mistaken for a failed malloc", () => {
264
+ const wasmModule = fakeModule(HEAP_BYTES, () => 0);
265
+ expect(arrayToWasmHeap(wasmModule, new Float64Array(0))).toBe(0);
266
+ });
267
+ // #485's signature. The bare RangeError says "Invalid typed array length: N"
268
+ // and nothing else; this asserts the replacement carries the state needed to
269
+ // tell a stale view from a genuine over-allocation.
270
+ test("a pointer past the end of the heap view reports the heap state", () => {
271
+ const past = HEAP_BYTES - 8;
272
+ const wasmModule = fakeModule(HEAP_BYTES, () => past);
273
+ const source = PAYLOAD;
274
+ expect(() => arrayToWasmHeap(wasmModule, source))
275
+ .toThrow(/outside the heap/);
276
+ try {
277
+ arrayToWasmHeap(wasmModule, source);
278
+ }
279
+ catch (error) {
280
+ const message = error.message;
281
+ expect(message).toContain(`ptr ${past} + ${PAYLOAD.byteLength} bytes`);
282
+ expect(message).toContain(`byteLength ${HEAP_BYTES}`);
283
+ // 'ArrayBuffer' alone would also match 'SharedArrayBuffer', so this
284
+ // matches with the surrounding text that pins which field it is, and
285
+ // asserts the shared spelling is absent - telling the two apart being
286
+ // the one thing this field exists to do.
287
+ expect(message).toContain("buffer ArrayBuffer byteLength");
288
+ expect(message).not.toContain("SharedArrayBuffer");
289
+ // Resizable, not growable, is the flag a plain ArrayBuffer carries.
290
+ expect(message).toContain("extensible false");
291
+ }
292
+ });
293
+ // Here the allocation SUCCEEDED and only the view was refused, so this owns
294
+ // a pointer no caller can reach - and it is #485's own branch, under a
295
+ // per-record catch, so leaking would mean leaking once per record while
296
+ // reporting that the heap is in trouble.
297
+ test("frees the allocation it is refusing to view", () => {
298
+ const past = HEAP_BYTES - 8;
299
+ const freed = [];
300
+ const wasmModule = {
301
+ ...fakeModule(HEAP_BYTES, () => past),
302
+ _free: (pointer) => {
303
+ freed.push(pointer);
304
+ },
305
+ };
306
+ expect(() => arrayToWasmHeap(wasmModule, PAYLOAD))
307
+ .toThrow(/outside the heap/);
308
+ expect(freed).toEqual([past]);
309
+ });
310
+ });
311
+ describe("wasmHeapView", () => {
312
+ test("views the live heap at the pointer", () => {
313
+ const address = 64;
314
+ const count = 3;
315
+ const wasmModule = fakeModule(HEAP_BYTES, () => address);
316
+ const view = wasmHeapView(wasmModule, Float64Array, address, count);
317
+ view.set(PAYLOAD);
318
+ expect(Array.from(new Float64Array(wasmModule.HEAPU8.buffer, address, count)))
319
+ .toEqual(Array.from(PAYLOAD));
320
+ });
321
+ // The reason views are CONSTRUCTED here rather than subarray'd off the
322
+ // module's view: subarray clamps an out-of-range window down to whatever
323
+ // fits and returns it, so a caller writing through it lands somewhere other
324
+ // than its allocation and no one hears about it. This asserts the difference
325
+ // rather than the mechanism - the clamped subarray is shown to be wrong, and
326
+ // the helper is shown not to produce it.
327
+ test("refuses a window subarray would have silently shortened", () => {
328
+ const count = 4;
329
+ const address = STALE_HEAP_BYTES - count;
330
+ const fake = growingFakeModule(STALE_HEAP_BYTES, STALE_HEAP_BYTES, address, "none");
331
+ expect(fake.wasmModule.HEAPU8
332
+ .subarray(address, address + count * Float64Array.BYTES_PER_ELEMENT)
333
+ .length).toBeLessThan(count * Float64Array.BYTES_PER_ELEMENT);
334
+ expect(() => wasmHeapView(fake.wasmModule, Float64Array, address, count))
335
+ .toThrow(/outside the heap/);
336
+ });
337
+ test("refreshes a stale view before building over it", () => {
338
+ const address = GROWN_ADDRESS;
339
+ const count = 3;
340
+ const fake = growingFakeModule(STALE_HEAP_BYTES, GROWN_HEAP_BYTES, address);
341
+ const view = wasmHeapView(fake.wasmModule, Float64Array, address, count);
342
+ expect(view.buffer).toBe(fake.grownBuffer);
343
+ expect(view.byteOffset).toBe(address);
344
+ expect(view.length).toBe(count);
345
+ });
346
+ // A >2GB heap is reachable - every target builds with 4GB of maximum memory
347
+ // - and a pointer from a raw i32 export arrives negative up there. What
348
+ // matters is not that `>>> 0` works, it is that the view this helper hands
349
+ // back is positioned at the UNSIGNED address; a signed one would put it
350
+ // before the start of the heap. Asserted through a recording element type,
351
+ // because a real 2GB buffer cannot be allocated in a unit test.
352
+ test("positions the view at the unsigned address for a >2GB pointer", () => {
353
+ const signedAddress = -2147483648;
354
+ const unsignedAddress = 2147483648;
355
+ const headroom = 4096;
356
+ const count = 2;
357
+ /** Stands in for a typed array, recording how it was constructed. */
358
+ class RecordingArray {
359
+ /**
360
+ * @param buffer The buffer the helper chose.
361
+ * @param byteOffset The address the helper passed.
362
+ * @param length The element count the helper passed.
363
+ */
364
+ constructor(buffer, byteOffset, length) {
365
+ this.buffer = buffer;
366
+ this.byteOffset = byteOffset;
367
+ this.length = length;
368
+ }
369
+ }
370
+ RecordingArray.BYTES_PER_ELEMENT = 8;
371
+ const wasmModule = {
372
+ _malloc: () => signedAddress,
373
+ _free: () => { },
374
+ HEAPU8: { length: 0, buffer: { byteLength: unsignedAddress + headroom } },
375
+ };
376
+ const view = wasmHeapView(wasmModule, RecordingArray, signedAddress, count);
377
+ expect(view.byteOffset).toBe(unsignedAddress);
378
+ expect(view.length).toBe(count);
379
+ });
380
+ // Left signed, the bounds test passes for free: a negative address plus a
381
+ // length is never greater than a byteLength. So this is the case where
382
+ // normalising is what makes the check able to reject anything at all.
383
+ test("a >2GB pointer past the end of the heap is still caught", () => {
384
+ const signedAddress = -2147483648;
385
+ const wasmModule = {
386
+ _malloc: () => signedAddress,
387
+ _free: () => { },
388
+ HEAPU8: new Uint8Array(new ArrayBuffer(HEAP_BYTES)),
389
+ };
390
+ expect(() => wasmHeapView(wasmModule, Float64Array, signedAddress, 1))
391
+ .toThrow(/outside the heap/);
392
+ });
393
+ });
394
+ describe("wasmHeapByteLength", () => {
395
+ // HEAPU8.length is what this used to read, and it is a growth step short
396
+ // whenever the module's views are behind - so a high-water figure taken from
397
+ // it under-reports exactly when the number is interesting.
398
+ test("reports the heap that exists, not the view that is cached", () => {
399
+ const grownBytes = GROWN_HEAP_BYTES;
400
+ const fake = growingFakeModule(STALE_HEAP_BYTES, grownBytes, GROWN_ADDRESS);
401
+ // Nothing has touched the heap yet, so the module's view is still the
402
+ // pre-growth one - which is exactly the state this must not report from.
403
+ expect(fake.wasmModule.HEAPU8.length).toBe(STALE_HEAP_BYTES);
404
+ expect(wasmHeapByteLength(fake.wasmModule)).toBe(grownBytes);
405
+ expect(fake.refreshes()).toBe(1);
406
+ });
407
+ // No route to refresh through means the cached view is all there is. Better
408
+ // a lagging number than a thrown one from a line that only exists to log.
409
+ test("falls back to the cached view when there is no refresh route", () => {
410
+ const fake = growingFakeModule(STALE_HEAP_BYTES, GROWN_HEAP_BYTES, GROWN_ADDRESS, "none");
411
+ expect(wasmHeapByteLength(fake.wasmModule)).toBe(STALE_HEAP_BYTES);
412
+ });
413
+ // Same reasoning as the no-route case above, but for a route that is present
414
+ // and fails. This one's only consumer is the AP214 CLI's high-water log
415
+ // line, so letting an embind failure out would abort an otherwise complete
416
+ // extraction from a log statement.
417
+ test("falls back to the cached view when the refresh route throws", () => {
418
+ const fake = growingFakeModule(STALE_HEAP_BYTES, GROWN_HEAP_BYTES, GROWN_ADDRESS, "embind", { push: true });
419
+ expect(wasmHeapByteLength(fake.wasmModule)).toBe(STALE_HEAP_BYTES);
420
+ });
421
+ test("reads wasmMemory live when the build exposes it", () => {
422
+ const grownBytes = 4096;
423
+ const wasmModule = {
424
+ _malloc: () => 0,
425
+ _free: () => { },
426
+ HEAPU8: new Uint8Array(new ArrayBuffer(HEAP_BYTES)),
427
+ wasmMemory: { buffer: new ArrayBuffer(grownBytes) },
428
+ };
429
+ expect(wasmHeapByteLength(wasmModule)).toBe(grownBytes);
430
+ });
431
+ });
432
+ describe("arraysToWasmHeap", () => {
433
+ test("returns pointers in the order the arrays were given", () => {
434
+ const first = 16;
435
+ const stride = 64;
436
+ let next = first;
437
+ const wasmModule = fakeModule(HEAP_BYTES, () => {
438
+ const address = next;
439
+ next += stride;
440
+ return address;
441
+ });
442
+ expect(arraysToWasmHeap(wasmModule, [PAYLOAD, TAIL]))
443
+ .toEqual([first, first + stride]);
444
+ });
445
+ // The point of the batch form: a caller holding several allocations frees
446
+ // them together at the end, so a throw part-way through would strand the
447
+ // ones already taken and the retry upstream would do it again.
448
+ test("frees what it already took when a later allocation fails", () => {
449
+ const first = 16;
450
+ const freed = [];
451
+ let call = 0;
452
+ const wasmModule = {
453
+ ...fakeModule(HEAP_BYTES, () => (call++ === 0 ? first : 0)),
454
+ _free: (pointer) => {
455
+ freed.push(pointer);
456
+ },
457
+ };
458
+ expect(() => arraysToWasmHeap(wasmModule, [PAYLOAD, TAIL]))
459
+ .toThrow(/_malloc returned an unusable address/);
460
+ expect(freed).toEqual([first]);
461
+ });
462
+ });
463
+ describe("releaseQuietly", () => {
464
+ test("runs the release", () => {
465
+ let ran = false;
466
+ releaseQuietly(() => {
467
+ ran = true;
468
+ });
469
+ expect(ran).toBe(true);
470
+ });
471
+ // The point: these run from finally blocks that may be unwinding because the
472
+ // wasm runtime just failed, and every release re-enters that same runtime.
473
+ // A throw here would replace the in-flight error, and the per-record catch
474
+ // upstream would log a generic teardown failure instead of the heap
475
+ // diagnostic this module exists to produce.
476
+ test("does not let a failed release replace the error being unwound", () => {
477
+ const original = new Error("the diagnostic worth keeping");
478
+ expect(() => {
479
+ try {
480
+ throw original;
481
+ }
482
+ finally {
483
+ releaseQuietly(() => {
484
+ throw new Error("teardown blew up too");
485
+ });
486
+ }
487
+ }).toThrow(original);
488
+ });
489
+ });
490
+ describe("withRelease", () => {
491
+ test("releases after the body and returns its value", () => {
492
+ const order = [];
493
+ const result = withRelease(() => {
494
+ order.push("body");
495
+ return "value";
496
+ }, () => {
497
+ order.push("release");
498
+ });
499
+ expect(result).toBe("value");
500
+ expect(order).toEqual(["body", "release"]);
501
+ });
502
+ // The asymmetry this exists for. On the success path a teardown failure is a
503
+ // real fault with nothing competing to report it, and swallowing it would let
504
+ // a record be reported COMPLETE with its resources never reclaimed.
505
+ test("propagates a release failure when the body succeeded", () => {
506
+ expect(() => withRelease(() => "fine", () => {
507
+ throw new Error("release failed");
508
+ })).toThrow(/release failed/);
509
+ });
510
+ test("keeps the body's error when the release fails too", () => {
511
+ const original = new Error("the diagnostic worth keeping");
512
+ expect(() => withRelease(() => {
513
+ throw original;
514
+ }, () => {
515
+ throw new Error("teardown blew up too");
516
+ })).toThrow(original);
517
+ });
518
+ test("still releases when the body throws", () => {
519
+ let released = false;
520
+ expect(() => withRelease(() => {
521
+ throw new Error("body failed");
522
+ }, () => {
523
+ released = true;
524
+ })).toThrow(/body failed/);
525
+ expect(released).toBe(true);
526
+ });
527
+ });
528
+ describe("freeAll", () => {
529
+ // Batched into one statement, the first failure abandons every pointer after
530
+ // it - which is the whole reason this is not just four _free calls.
531
+ test("frees every pointer even when one throws, and reports the first", () => {
532
+ const freed = [];
533
+ const bad = 2;
534
+ const wasmModule = {
535
+ ...fakeModule(HEAP_BYTES, () => 0),
536
+ _free: (pointer) => {
537
+ if (pointer === bad) {
538
+ throw new Error("free failed");
539
+ }
540
+ freed.push(pointer);
541
+ },
542
+ };
543
+ expect(() => freeAll(wasmModule, [1, bad, 3])).toThrow(/free failed/);
544
+ expect(freed).toEqual([1, 3]);
545
+ });
546
+ });
@@ -0,0 +1,23 @@
1
+ /**
2
+ * `@bldrs-ai/conway/demand` — demand-driven geometry residency (epic #390;
3
+ * design/new/streaming-federated-loader.md, "two regimes").
4
+ *
5
+ * The synchronous half: a priority {@link DemandGeometryQueue} admits
6
+ * instances under a byte budget against {@link GeometryTiles} — in
7
+ * production the wasm-backed {@link GeometryTilePool} composition created
8
+ * by {@link createWasmTileBackend}, extracting through
9
+ * {@link IfcTileAssetExtractor} into the conway-geom TilePool. The
10
+ * asynchronous half: {@link DemandResidencyPump} pages source-byte ranges
11
+ * in (via the stream plane's windowed provider) before forwarding demand,
12
+ * so a pump cycle never hits a non-resident range mid-extract.
13
+ *
14
+ * Conway-native namespace; see `@bldrs-ai/conway/stream` for the parse
15
+ * plane and `@bldrs-ai/conway/mem` for the general pool primitives this
16
+ * builds on.
17
+ */
18
+ export { DemandGeometryQueue, GeometryTiles, DemandQueueStats, } from "../core/demand_geometry_queue.js";
19
+ export { DemandResidencyPump, ResidencyPrefetcher, PumpResult, } from "../core/demand_residency_pump.js";
20
+ export { GeometryTilePool, InstanceAssetSource, GeometryAsset, } from "../core/geometry_tile_pool.js";
21
+ export { GeometryTilePoolBindings, TileAssetExtractor, WasmTileBackend, createWasmTileBackend, readGeometryTilePayload, GeometryTilePayload, } from "../core/geometry_tile_bindings.js";
22
+ export { IfcTileAssetExtractor, TileCommitBindings } from "../ifc/ifc_tile_extractor.js";
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/demand/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,gBAAgB,GACjB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,GACX,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,GACd,MAAM,4BAA4B,CAAA;AACnC,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * `@bldrs-ai/conway/demand` — demand-driven geometry residency (epic #390;
3
+ * design/new/streaming-federated-loader.md, "two regimes").
4
+ *
5
+ * The synchronous half: a priority {@link DemandGeometryQueue} admits
6
+ * instances under a byte budget against {@link GeometryTiles} — in
7
+ * production the wasm-backed {@link GeometryTilePool} composition created
8
+ * by {@link createWasmTileBackend}, extracting through
9
+ * {@link IfcTileAssetExtractor} into the conway-geom TilePool. The
10
+ * asynchronous half: {@link DemandResidencyPump} pages source-byte ranges
11
+ * in (via the stream plane's windowed provider) before forwarding demand,
12
+ * so a pump cycle never hits a non-resident range mid-extract.
13
+ *
14
+ * Conway-native namespace; see `@bldrs-ai/conway/stream` for the parse
15
+ * plane and `@bldrs-ai/conway/mem` for the general pool primitives this
16
+ * builds on.
17
+ */
18
+ export { DemandGeometryQueue, } from "../core/demand_geometry_queue.js";
19
+ export { DemandResidencyPump, } from "../core/demand_residency_pump.js";
20
+ export { GeometryTilePool, } from "../core/geometry_tile_pool.js";
21
+ export { createWasmTileBackend, readGeometryTilePayload, } from "../core/geometry_tile_bindings.js";
22
+ export { IfcTileAssetExtractor } from "../ifc/ifc_tile_extractor.js";
@@ -5,7 +5,7 @@ import StepModelBase from "../../step/step_model_base.js";
5
5
  export declare class IfcLogical extends StepEntityBase<EntityTypesIfc> {
6
6
  get type(): EntityTypesIfc;
7
7
  private Value_?;
8
- get Value(): boolean;
8
+ get Value(): boolean | null;
9
9
  constructor(localID: number, internalReference: StepEntityInternalReference<EntityTypesIfc>, model: StepModelBase<EntityTypesIfc, StepEntityBase<EntityTypesIfc>>, multiReference?: StepEntityInternalReference<EntityTypesIfc>[]);
10
10
  static readonly query: EntityTypesIfc[];
11
11
  static readonly expectedType: EntityTypesIfc;
@@ -1 +1 @@
1
- {"version":3,"file":"IfcLogical.gen.d.ts","sourceRoot":"","sources":["../../../../src/ifc/ifc4_gen/IfcLogical.gen.ts"],"names":[],"mappings":"AAGA,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,2BAA2B,MAAM,2CAA2C,CAAA;AACnF,OAAO,cAAc,MAAM,6BAA6B,CAAA;AACxD,OAAO,aAAa,MAAM,4BAA4B,CAAA;AAKtD,qBAAa,UAAW,SAAQ,cAAc,CAAE,cAAc,CAAE;IAC9D,IAAW,IAAI,IAAI,cAAc,CAEhC;IAED,OAAO,CAAC,MAAM,CAAC,CAAW;IAE1B,IAAW,KAAK,IAAK,OAAO,CAM3B;gBAGG,OAAO,EAAE,MAAM,EACf,iBAAiB,EAAE,2BAA2B,CAAE,cAAc,CAAE,EAChE,KAAK,EAAE,aAAa,CAAE,cAAc,EAAE,cAAc,CAAE,cAAc,CAAE,CAAE,EACxE,cAAc,CAAC,EAAE,2BAA2B,CAAE,cAAc,CAAE,EAAE;IAIpE,gBAAuB,KAAK,mBACG;IAE/B,gBAAuB,YAAY,EAAE,cAAc,CACxB;CAC5B"}
1
+ {"version":3,"file":"IfcLogical.gen.d.ts","sourceRoot":"","sources":["../../../../src/ifc/ifc4_gen/IfcLogical.gen.ts"],"names":[],"mappings":"AAGA,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,2BAA2B,MAAM,2CAA2C,CAAA;AACnF,OAAO,cAAc,MAAM,6BAA6B,CAAA;AACxD,OAAO,aAAa,MAAM,4BAA4B,CAAA;AAKtD,qBAAa,UAAW,SAAQ,cAAc,CAAE,cAAc,CAAE;IAC9D,IAAW,IAAI,IAAI,cAAc,CAEhC;IAED,OAAO,CAAC,MAAM,CAAC,CAAkB;IAEjC,IAAW,KAAK,IAAK,OAAO,GAAG,IAAI,CAMlC;gBAGG,OAAO,EAAE,MAAM,EACf,iBAAiB,EAAE,2BAA2B,CAAE,cAAc,CAAE,EAChE,KAAK,EAAE,aAAa,CAAE,cAAc,EAAE,cAAc,CAAE,cAAc,CAAE,CAAE,EACxE,cAAc,CAAC,EAAE,2BAA2B,CAAE,cAAc,CAAE,EAAE;IAIpE,gBAAuB,KAAK,mBACG;IAE/B,gBAAuB,YAAY,EAAE,cAAc,CACxB;CAC5B"}
@@ -9,7 +9,7 @@ export class IfcLogical extends StepEntityBase {
9
9
  }
10
10
  get Value() {
11
11
  if (this.Value_ === void 0) {
12
- this.Value_ = this.extractBoolean(0, 0, 0, false);
12
+ this.Value_ = this.extractLogical(0, 0, 0, false);
13
13
  }
14
14
  return this.Value_;
15
15
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IfcPresentationStyleAssignment.gen.d.ts","sourceRoot":"","sources":["../../../../src/ifc/ifc4_gen/IfcPresentationStyleAssignment.gen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,YAAY,EAA+B,MAAM,SAAS,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAStC,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,2BAA2B,MAAM,2CAA2C,CAAA;AACnF,OAAO,cAAc,MAAM,6BAA6B,CAAA;AACxD,OAAO,aAAa,MAAM,4BAA4B,CAAA;AAItD,qBAAc,8BAA+B,SAAQ,cAAc,CAAE,cAAc,CAAE;IACnF,IAAW,IAAI,IAAI,cAAc,CAEhC;IACD,OAAO,CAAC,OAAO,CAAC,CAA0F;IAE1G,IAAW,MAAM,IAAK,KAAK,CAAC,aAAa,GAAG,gBAAgB,GAAG,YAAY,GAAG,eAAe,GAAG,YAAY,CAAC,CAsC5G;gBAEC,OAAO,EAAE,MAAM,EACf,iBAAiB,EAAE,2BAA2B,CAAE,cAAc,CAAE,EAChE,KAAK,EAAE,aAAa,CAAE,cAAc,EAAE,cAAc,CAAE,cAAc,CAAE,CAAE,EACxE,cAAc,CAAC,EAAE,2BAA2B,CAAE,cAAc,CAAE,EAAE;IAKlE,gBAAuB,KAAK,mBACuB;IAEnD,gBAAuB,YAAY,EAAE,cAAc,CACJ;CAChD"}
1
+ {"version":3,"file":"IfcPresentationStyleAssignment.gen.d.ts","sourceRoot":"","sources":["../../../../src/ifc/ifc4_gen/IfcPresentationStyleAssignment.gen.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,YAAY,EAA+B,MAAM,SAAS,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAUtC,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,2BAA2B,MAAM,2CAA2C,CAAA;AACnF,OAAO,cAAc,MAAM,6BAA6B,CAAA;AACxD,OAAO,aAAa,MAAM,4BAA4B,CAAA;AAItD,qBAAc,8BAA+B,SAAQ,cAAc,CAAE,cAAc,CAAE;IACnF,IAAW,IAAI,IAAI,cAAc,CAEhC;IACD,OAAO,CAAC,OAAO,CAAC,CAA0F;IAE1G,IAAW,MAAM,IAAK,KAAK,CAAC,aAAa,GAAG,gBAAgB,GAAG,YAAY,GAAG,eAAe,GAAG,YAAY,CAAC,CAsC5G;gBAEC,OAAO,EAAE,MAAM,EACf,iBAAiB,EAAE,2BAA2B,CAAE,cAAc,CAAE,EAChE,KAAK,EAAE,aAAa,CAAE,cAAc,EAAE,cAAc,CAAE,cAAc,CAAE,CAAE,EACxE,cAAc,CAAC,EAAE,2BAA2B,CAAE,cAAc,CAAE,EAAE;IAKlE,gBAAuB,KAAK,mBACuB;IAEnD,gBAAuB,YAAY,EAAE,cAAc,CACJ;CAChD"}
@@ -3,7 +3,7 @@ import { IfcFillAreaStyle } from "./index.js";
3
3
  import { IfcNullStyle, IfcNullStyleDeserializeStep } from "./index.js";
4
4
  import { IfcSurfaceStyle } from "./index.js";
5
5
  import { IfcTextStyle } from "./index.js";
6
- import { stepExtractOptional, stepExtractArrayToken, stepExtractArrayBegin, skipValue, } from "../../step/parsing/step_deserialization_functions.js";
6
+ import { stepExtractOptional, stepEnterTypedValue, stepExtractArrayToken, stepExtractArrayBegin, skipValue, } from "../../step/parsing/step_deserialization_functions.js";
7
7
  /* This is generated code, don't modify */
8
8
  import EntityTypesIfc from "./entity_types_ifc.gen.js";
9
9
  import StepEntityBase from "../../step/step_entity_base.js";
@@ -25,7 +25,7 @@ export class IfcPresentationStyleAssignment extends StepEntityBase {
25
25
  let signedCursor0 = stepExtractArrayBegin(buffer, cursor, endCursor);
26
26
  cursor = Math.abs(signedCursor0);
27
27
  while (signedCursor0 >= 0) {
28
- const value1Untyped = this.extractBufferReference(buffer, cursor, endCursor) ?? IfcNullStyleDeserializeStep(buffer, cursor, endCursor);
28
+ const value1Untyped = this.extractBufferReference(buffer, cursor, endCursor) ?? IfcNullStyleDeserializeStep(buffer, stepEnterTypedValue(buffer, cursor, endCursor, "IFCNULLSTYLE"), endCursor);
29
29
  if (!(value1Untyped instanceof IfcCurveStyle) && !(value1Untyped instanceof IfcFillAreaStyle) && !(value1Untyped instanceof IfcSurfaceStyle) && !(value1Untyped instanceof IfcTextStyle) && value1Untyped !== IfcNullStyle.NULL) {
30
30
  throw new Error("Value in select must be populated");
31
31
  }
@@ -16,7 +16,7 @@ export declare class IfcRelInterferesElements extends IfcRelConnects {
16
16
  get RelatedElement(): IfcElement;
17
17
  get InterferenceGeometry(): IfcConnectionGeometry | null;
18
18
  get InterferenceType(): string | null;
19
- get ImpliedOrder(): boolean;
19
+ get ImpliedOrder(): boolean | null;
20
20
  constructor(localID: number, internalReference: StepEntityInternalReference<EntityTypesIfc>, model: StepModelBase<EntityTypesIfc, StepEntityBase<EntityTypesIfc>>, multiReference?: StepEntityInternalReference<EntityTypesIfc>[]);
21
21
  static readonly query: EntityTypesIfc[];
22
22
  static readonly expectedType: EntityTypesIfc;