@adobe/ecs 0.1.0 → 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 (2153) hide show
  1. package/README.md +58 -0
  2. package/dist/implementation/compiler/access.js +9 -5
  3. package/dist/implementation/compiler/access.js.map +1 -1
  4. package/dist/implementation/compiler/archetypes.d.ts +17 -0
  5. package/dist/implementation/compiler/archetypes.js +141 -0
  6. package/dist/implementation/compiler/archetypes.js.map +1 -0
  7. package/dist/implementation/compiler/assign.js.map +1 -1
  8. package/dist/implementation/compiler/augmentations.d.ts +25 -0
  9. package/dist/implementation/compiler/augmentations.js +943 -0
  10. package/dist/implementation/compiler/augmentations.js.map +1 -0
  11. package/dist/implementation/compiler/bind.js +5 -4
  12. package/dist/implementation/compiler/bind.js.map +1 -1
  13. package/dist/implementation/compiler/body-access.d.ts +20 -3
  14. package/dist/implementation/compiler/body-access.js +138 -36
  15. package/dist/implementation/compiler/body-access.js.map +1 -1
  16. package/dist/implementation/compiler/booleans.js.map +1 -1
  17. package/dist/implementation/compiler/branches.js.map +1 -1
  18. package/dist/implementation/compiler/calls.js +14 -3
  19. package/dist/implementation/compiler/calls.js.map +1 -1
  20. package/dist/implementation/compiler/columns.d.ts +8 -2
  21. package/dist/implementation/compiler/columns.js +19 -3
  22. package/dist/implementation/compiler/columns.js.map +1 -1
  23. package/dist/implementation/compiler/compile-kernel.d.ts +24 -1
  24. package/dist/implementation/compiler/compile-kernel.js +66 -22
  25. package/dist/implementation/compiler/compile-kernel.js.map +1 -1
  26. package/dist/implementation/compiler/compiler.d.ts +6 -0
  27. package/dist/implementation/compiler/compiler.js +7 -0
  28. package/dist/implementation/compiler/compiler.js.map +1 -0
  29. package/dist/implementation/compiler/data.js.map +1 -1
  30. package/dist/implementation/compiler/describe.d.ts +41 -0
  31. package/dist/implementation/compiler/describe.js +510 -0
  32. package/dist/implementation/compiler/describe.js.map +1 -0
  33. package/dist/implementation/compiler/estree.js.map +1 -1
  34. package/dist/implementation/compiler/expression.js +26 -2
  35. package/dist/implementation/compiler/expression.js.map +1 -1
  36. package/dist/implementation/compiler/failure.js.map +1 -1
  37. package/dist/implementation/compiler/identify.d.ts +18 -8
  38. package/dist/implementation/compiler/identify.js +90 -32
  39. package/dist/implementation/compiler/identify.js.map +1 -1
  40. package/dist/implementation/compiler/index.d.ts +5 -1
  41. package/dist/implementation/compiler/index.js +6 -1
  42. package/dist/implementation/compiler/index.js.map +1 -1
  43. package/dist/implementation/compiler/inferred.d.ts +32 -0
  44. package/dist/implementation/compiler/inferred.js +185 -0
  45. package/dist/implementation/compiler/inferred.js.map +1 -0
  46. package/dist/implementation/compiler/inline-kernels.d.ts +7 -0
  47. package/dist/implementation/compiler/inline-kernels.js +16 -0
  48. package/dist/implementation/compiler/inline-kernels.js.map +1 -0
  49. package/dist/implementation/compiler/input-schemas.d.ts +23 -0
  50. package/dist/implementation/compiler/input-schemas.js +102 -0
  51. package/dist/implementation/compiler/input-schemas.js.map +1 -0
  52. package/dist/implementation/compiler/ir.d.ts +13 -1
  53. package/dist/implementation/compiler/ir.js.map +1 -1
  54. package/dist/implementation/compiler/kernel-id.js +1 -0
  55. package/dist/implementation/compiler/kernel-id.js.map +1 -1
  56. package/dist/implementation/compiler/key.js.map +1 -1
  57. package/dist/implementation/compiler/link.d.ts +13 -0
  58. package/dist/implementation/compiler/link.js +17 -0
  59. package/dist/implementation/compiler/link.js.map +1 -1
  60. package/dist/implementation/compiler/lists.d.ts +12 -1
  61. package/dist/implementation/compiler/lists.js +35 -14
  62. package/dist/implementation/compiler/lists.js.map +1 -1
  63. package/dist/implementation/compiler/lookups.js.map +1 -1
  64. package/dist/implementation/compiler/math.js +1 -0
  65. package/dist/implementation/compiler/math.js.map +1 -1
  66. package/dist/implementation/compiler/memory-compiler.d.ts +61 -0
  67. package/dist/implementation/compiler/memory-compiler.js +271 -0
  68. package/dist/implementation/compiler/memory-compiler.js.map +1 -0
  69. package/dist/implementation/compiler/module-scope.js.map +1 -1
  70. package/dist/implementation/compiler/module-value.js +18 -3
  71. package/dist/implementation/compiler/module-value.js.map +1 -1
  72. package/dist/implementation/compiler/out.js.map +1 -1
  73. package/dist/implementation/compiler/oxc.d.ts +41 -0
  74. package/dist/implementation/compiler/oxc.js +80 -0
  75. package/dist/implementation/compiler/oxc.js.map +1 -0
  76. package/dist/implementation/compiler/package-copies.d.ts +60 -0
  77. package/dist/implementation/compiler/package-copies.js +140 -0
  78. package/dist/implementation/compiler/package-copies.js.map +1 -0
  79. package/dist/implementation/compiler/passes.d.ts +25 -0
  80. package/dist/implementation/compiler/passes.js +24 -0
  81. package/dist/implementation/compiler/passes.js.map +1 -0
  82. package/dist/implementation/compiler/paths.d.ts +5 -14
  83. package/dist/implementation/compiler/paths.js +16 -25
  84. package/dist/implementation/compiler/paths.js.map +1 -1
  85. package/dist/implementation/compiler/plugin.d.ts +17 -1
  86. package/dist/implementation/compiler/plugin.js +207 -35
  87. package/dist/implementation/compiler/plugin.js.map +1 -1
  88. package/dist/implementation/compiler/posix.d.ts +8 -0
  89. package/dist/implementation/compiler/posix.js +205 -0
  90. package/dist/implementation/compiler/posix.js.map +1 -0
  91. package/dist/implementation/compiler/predicates.d.ts +11 -0
  92. package/dist/implementation/compiler/predicates.js +281 -0
  93. package/dist/implementation/compiler/predicates.js.map +1 -0
  94. package/dist/implementation/compiler/print.js +27 -7
  95. package/dist/implementation/compiler/print.js.map +1 -1
  96. package/dist/implementation/compiler/program.js +3 -0
  97. package/dist/implementation/compiler/program.js.map +1 -1
  98. package/dist/implementation/compiler/public.d.ts +1 -0
  99. package/dist/implementation/compiler/public.js +3 -0
  100. package/dist/implementation/compiler/public.js.map +1 -0
  101. package/dist/implementation/compiler/scalar.js.map +1 -1
  102. package/dist/implementation/compiler/scope.js.map +1 -1
  103. package/dist/implementation/compiler/serialize.js +1 -0
  104. package/dist/implementation/compiler/serialize.js.map +1 -1
  105. package/dist/implementation/compiler/signature.d.ts +18 -3
  106. package/dist/implementation/compiler/signature.js +68 -30
  107. package/dist/implementation/compiler/signature.js.map +1 -1
  108. package/dist/implementation/compiler/snapshot.d.ts +3 -1
  109. package/dist/implementation/compiler/snapshot.js +1 -1
  110. package/dist/implementation/compiler/snapshot.js.map +1 -1
  111. package/dist/implementation/compiler/source-map.js +1 -0
  112. package/dist/implementation/compiler/source-map.js.map +1 -1
  113. package/dist/implementation/compiler/spawns.d.ts +13 -1
  114. package/dist/implementation/compiler/spawns.js +67 -5
  115. package/dist/implementation/compiler/spawns.js.map +1 -1
  116. package/dist/implementation/compiler/stamps.d.ts +10 -3
  117. package/dist/implementation/compiler/stamps.js +28 -9
  118. package/dist/implementation/compiler/stamps.js.map +1 -1
  119. package/dist/implementation/compiler/statement.js.map +1 -1
  120. package/dist/implementation/compiler/terminal.js.map +1 -1
  121. package/dist/implementation/compiler/transform.d.ts +55 -5
  122. package/dist/implementation/compiler/transform.js +311 -55
  123. package/dist/implementation/compiler/transform.js.map +1 -1
  124. package/dist/implementation/compiler/type-schemas.d.ts +130 -0
  125. package/dist/implementation/compiler/type-schemas.js +701 -0
  126. package/dist/implementation/compiler/type-schemas.js.map +1 -0
  127. package/dist/implementation/compiler/unit.d.ts +20 -3
  128. package/dist/implementation/compiler/unit.js +2 -2
  129. package/dist/implementation/compiler/unit.js.map +1 -1
  130. package/dist/implementation/compiler/value.js.map +1 -1
  131. package/dist/implementation/compiler/wat.d.ts +12 -0
  132. package/dist/implementation/compiler/wat.js +379 -0
  133. package/dist/implementation/compiler/wat.js.map +1 -0
  134. package/dist/implementation/index.js +1 -0
  135. package/dist/implementation/index.js.map +1 -1
  136. package/dist/implementation/world/activate.js +8 -3
  137. package/dist/implementation/world/activate.js.map +1 -1
  138. package/dist/implementation/world/archetype.d.ts +64 -9
  139. package/dist/implementation/world/archetype.js +103 -14
  140. package/dist/implementation/world/archetype.js.map +1 -1
  141. package/dist/implementation/world/arrays.d.ts +6 -1
  142. package/dist/implementation/world/arrays.js +3 -0
  143. package/dist/implementation/world/arrays.js.map +1 -1
  144. package/dist/implementation/world/arrivals.d.ts +52 -0
  145. package/dist/implementation/world/arrivals.js +146 -0
  146. package/dist/implementation/world/arrivals.js.map +1 -0
  147. package/dist/implementation/world/attach-kernel.d.ts +3 -2
  148. package/dist/implementation/world/attach-kernel.js +16 -8
  149. package/dist/implementation/world/attach-kernel.js.map +1 -1
  150. package/dist/implementation/world/batches.d.ts +5 -2
  151. package/dist/implementation/world/batches.js +72 -8
  152. package/dist/implementation/world/batches.js.map +1 -1
  153. package/dist/implementation/world/buffer.js +37 -4
  154. package/dist/implementation/world/buffer.js.map +1 -1
  155. package/dist/implementation/world/cascade.js +1 -1
  156. package/dist/implementation/world/cascade.js.map +1 -1
  157. package/dist/implementation/world/cells.js.map +1 -1
  158. package/dist/implementation/world/check-kernel.d.ts +7 -5
  159. package/dist/implementation/world/check-kernel.js +51 -34
  160. package/dist/implementation/world/check-kernel.js.map +1 -1
  161. package/dist/implementation/world/claims.js +1 -0
  162. package/dist/implementation/world/claims.js.map +1 -1
  163. package/dist/implementation/world/closure.js +1 -0
  164. package/dist/implementation/world/closure.js.map +1 -1
  165. package/dist/implementation/world/command-ring.js +2 -1
  166. package/dist/implementation/world/command-ring.js.map +1 -1
  167. package/dist/implementation/world/commands.js +26 -4
  168. package/dist/implementation/world/commands.js.map +1 -1
  169. package/dist/implementation/world/create.d.ts +40 -0
  170. package/dist/implementation/world/create.js +479 -257
  171. package/dist/implementation/world/create.js.map +1 -1
  172. package/dist/implementation/world/directories.js +2 -1
  173. package/dist/implementation/world/directories.js.map +1 -1
  174. package/dist/implementation/world/entities.js.map +1 -1
  175. package/dist/implementation/world/execute.d.ts +1 -7
  176. package/dist/implementation/world/execute.js +248 -107
  177. package/dist/implementation/world/execute.js.map +1 -1
  178. package/dist/implementation/world/failures.d.ts +48 -5
  179. package/dist/implementation/world/failures.js +36 -4
  180. package/dist/implementation/world/failures.js.map +1 -1
  181. package/dist/implementation/world/finalizers.d.ts +2 -0
  182. package/dist/implementation/world/finalizers.js +42 -14
  183. package/dist/implementation/world/finalizers.js.map +1 -1
  184. package/dist/implementation/world/gpu.d.ts +8 -8
  185. package/dist/implementation/world/gpu.js +21 -12
  186. package/dist/implementation/world/gpu.js.map +1 -1
  187. package/dist/implementation/world/holders.js +1 -0
  188. package/dist/implementation/world/holders.js.map +1 -1
  189. package/dist/implementation/world/index-build.js +1 -0
  190. package/dist/implementation/world/index-build.js.map +1 -1
  191. package/dist/implementation/world/index-hash.d.ts +52 -13
  192. package/dist/implementation/world/index-hash.js +440 -71
  193. package/dist/implementation/world/index-hash.js.map +1 -1
  194. package/dist/implementation/world/index-keys.js +1 -0
  195. package/dist/implementation/world/index-keys.js.map +1 -1
  196. package/dist/implementation/world/index-lookups.d.ts +3 -3
  197. package/dist/implementation/world/index-lookups.js +22 -17
  198. package/dist/implementation/world/index-lookups.js.map +1 -1
  199. package/dist/implementation/world/index-order.js.map +1 -1
  200. package/dist/implementation/world/index-readers.js.map +1 -1
  201. package/dist/implementation/world/index-sorted.d.ts +2 -2
  202. package/dist/implementation/world/index-sorted.js +10 -4
  203. package/dist/implementation/world/index-sorted.js.map +1 -1
  204. package/dist/implementation/world/indexes.d.ts +9 -14
  205. package/dist/implementation/world/indexes.js +57 -115
  206. package/dist/implementation/world/indexes.js.map +1 -1
  207. package/dist/implementation/world/input.js +1 -1
  208. package/dist/implementation/world/input.js.map +1 -1
  209. package/dist/implementation/world/intrinsics.js.map +1 -1
  210. package/dist/implementation/world/join.d.ts +10 -7
  211. package/dist/implementation/world/join.js +116 -59
  212. package/dist/implementation/world/join.js.map +1 -1
  213. package/dist/implementation/world/joined-observer.d.ts +31 -2
  214. package/dist/implementation/world/joined-observer.js +69 -17
  215. package/dist/implementation/world/joined-observer.js.map +1 -1
  216. package/dist/implementation/world/joining.d.ts +60 -6
  217. package/dist/implementation/world/joining.js +47 -3
  218. package/dist/implementation/world/joining.js.map +1 -1
  219. package/dist/implementation/world/journal.d.ts +3 -2
  220. package/dist/implementation/world/journal.js +7 -4
  221. package/dist/implementation/world/journal.js.map +1 -1
  222. package/dist/implementation/world/kernel-indexes.d.ts +9 -2
  223. package/dist/implementation/world/kernel-indexes.js +13 -3
  224. package/dist/implementation/world/kernel-indexes.js.map +1 -1
  225. package/dist/implementation/world/kernel.d.ts +39 -5
  226. package/dist/implementation/world/kernel.js +2 -0
  227. package/dist/implementation/world/kernel.js.map +1 -1
  228. package/dist/implementation/world/kernels.d.ts +10 -2
  229. package/dist/implementation/world/kernels.js +85 -13
  230. package/dist/implementation/world/kernels.js.map +1 -1
  231. package/dist/implementation/world/layout-directory.d.ts +28 -12
  232. package/dist/implementation/world/layout-directory.js +72 -17
  233. package/dist/implementation/world/layout-directory.js.map +1 -1
  234. package/dist/implementation/world/lists.d.ts +37 -7
  235. package/dist/implementation/world/lists.js +169 -29
  236. package/dist/implementation/world/lists.js.map +1 -1
  237. package/dist/implementation/world/lookup-keys.d.ts +9 -8
  238. package/dist/implementation/world/lookup-keys.js.map +1 -1
  239. package/dist/implementation/world/loop.js +4 -5
  240. package/dist/implementation/world/loop.js.map +1 -1
  241. package/dist/implementation/world/memory.js +1 -0
  242. package/dist/implementation/world/memory.js.map +1 -1
  243. package/dist/implementation/world/mirror.d.ts +16 -3
  244. package/dist/implementation/world/mirror.js +37 -9
  245. package/dist/implementation/world/mirror.js.map +1 -1
  246. package/dist/implementation/world/move-log.js.map +1 -1
  247. package/dist/implementation/world/observer.d.ts +1 -1
  248. package/dist/implementation/world/observer.js +1 -2
  249. package/dist/implementation/world/observer.js.map +1 -1
  250. package/dist/implementation/world/order.js +1 -0
  251. package/dist/implementation/world/order.js.map +1 -1
  252. package/dist/implementation/world/out-of-band.d.ts +28 -0
  253. package/dist/implementation/world/out-of-band.js +66 -0
  254. package/dist/implementation/world/out-of-band.js.map +1 -0
  255. package/dist/implementation/world/plan.js.map +1 -1
  256. package/dist/implementation/world/pool.js +1 -0
  257. package/dist/implementation/world/pool.js.map +1 -1
  258. package/dist/implementation/world/port.d.ts +4 -3
  259. package/dist/implementation/world/port.js +14 -9
  260. package/dist/implementation/world/port.js.map +1 -1
  261. package/dist/implementation/world/prepared-lookup.js +1 -0
  262. package/dist/implementation/world/prepared-lookup.js.map +1 -1
  263. package/dist/implementation/world/prepared-spawn.js +13 -9
  264. package/dist/implementation/world/prepared-spawn.js.map +1 -1
  265. package/dist/implementation/world/program.js.map +1 -1
  266. package/dist/implementation/world/protocol.d.ts +8 -1
  267. package/dist/implementation/world/protocol.js.map +1 -1
  268. package/dist/implementation/world/publish.js.map +1 -1
  269. package/dist/implementation/world/ranges.d.ts +13 -3
  270. package/dist/implementation/world/ranges.js +118 -35
  271. package/dist/implementation/world/ranges.js.map +1 -1
  272. package/dist/implementation/world/reclaim.d.ts +27 -0
  273. package/dist/implementation/world/reclaim.js +176 -0
  274. package/dist/implementation/world/reclaim.js.map +1 -0
  275. package/dist/implementation/world/reductions.d.ts +7 -6
  276. package/dist/implementation/world/reductions.js +11 -11
  277. package/dist/implementation/world/reductions.js.map +1 -1
  278. package/dist/implementation/world/register.js +2 -2
  279. package/dist/implementation/world/register.js.map +1 -1
  280. package/dist/implementation/world/remote-systems.d.ts +9 -4
  281. package/dist/implementation/world/remote-systems.js +33 -28
  282. package/dist/implementation/world/remote-systems.js.map +1 -1
  283. package/dist/implementation/world/remote.js +1 -0
  284. package/dist/implementation/world/remote.js.map +1 -1
  285. package/dist/implementation/world/render-order.d.ts +19 -0
  286. package/dist/implementation/world/render-order.js +126 -0
  287. package/dist/implementation/world/render-order.js.map +1 -0
  288. package/dist/implementation/world/required.d.ts +3 -0
  289. package/dist/implementation/world/required.js +9 -0
  290. package/dist/implementation/world/required.js.map +1 -0
  291. package/dist/implementation/world/resources.d.ts +4 -1
  292. package/dist/implementation/world/resources.js +6 -3
  293. package/dist/implementation/world/resources.js.map +1 -1
  294. package/dist/implementation/world/rows.d.ts +15 -12
  295. package/dist/implementation/world/rows.js +90 -20
  296. package/dist/implementation/world/rows.js.map +1 -1
  297. package/dist/implementation/world/runner.d.ts +10 -0
  298. package/dist/implementation/world/runner.js +398 -78
  299. package/dist/implementation/world/runner.js.map +1 -1
  300. package/dist/implementation/world/shared.d.ts +55 -0
  301. package/dist/implementation/world/shared.js +301 -0
  302. package/dist/implementation/world/shared.js.map +1 -0
  303. package/dist/implementation/world/sharing.d.ts +7 -6
  304. package/dist/implementation/world/sharing.js +86 -23
  305. package/dist/implementation/world/sharing.js.map +1 -1
  306. package/dist/implementation/world/staging.d.ts +28 -5
  307. package/dist/implementation/world/staging.js +35 -9
  308. package/dist/implementation/world/staging.js.map +1 -1
  309. package/dist/implementation/world/state.d.ts +72 -13
  310. package/dist/implementation/world/state.js +138 -14
  311. package/dist/implementation/world/state.js.map +1 -1
  312. package/dist/implementation/world/stop-lists.d.ts +25 -2
  313. package/dist/implementation/world/stop-lists.js +63 -8
  314. package/dist/implementation/world/stop-lists.js.map +1 -1
  315. package/dist/implementation/world/strings.js +1 -0
  316. package/dist/implementation/world/strings.js.map +1 -1
  317. package/dist/implementation/world/structure.d.ts +1 -1
  318. package/dist/implementation/world/structure.js +4 -1
  319. package/dist/implementation/world/structure.js.map +1 -1
  320. package/dist/implementation/world/synchronize.d.ts +1 -1
  321. package/dist/implementation/world/synchronize.js +59 -17
  322. package/dist/implementation/world/synchronize.js.map +1 -1
  323. package/dist/implementation/world/tail-blocks.d.ts +5 -2
  324. package/dist/implementation/world/tail-blocks.js +9 -4
  325. package/dist/implementation/world/tail-blocks.js.map +1 -1
  326. package/dist/implementation/world/tails.d.ts +10 -5
  327. package/dist/implementation/world/tails.js +25 -18
  328. package/dist/implementation/world/tails.js.map +1 -1
  329. package/dist/implementation/world/terminal.js +1 -0
  330. package/dist/implementation/world/terminal.js.map +1 -1
  331. package/dist/implementation/world/thread-directory.d.ts +8 -2
  332. package/dist/implementation/world/thread-directory.js +82 -12
  333. package/dist/implementation/world/thread-directory.js.map +1 -1
  334. package/dist/implementation/world/thread-finalizers.d.ts +1 -2
  335. package/dist/implementation/world/thread-finalizers.js +129 -19
  336. package/dist/implementation/world/thread-finalizers.js.map +1 -1
  337. package/dist/implementation/world/thread-indexes.d.ts +3 -1
  338. package/dist/implementation/world/thread-indexes.js +4 -3
  339. package/dist/implementation/world/thread-indexes.js.map +1 -1
  340. package/dist/implementation/world/thread-observer.d.ts +4 -2
  341. package/dist/implementation/world/thread-observer.js +53 -11
  342. package/dist/implementation/world/thread-observer.js.map +1 -1
  343. package/dist/implementation/world/thread-systems.d.ts +10 -2
  344. package/dist/implementation/world/thread-systems.js +396 -78
  345. package/dist/implementation/world/thread-systems.js.map +1 -1
  346. package/dist/implementation/world/thread-tasks.d.ts +8 -4
  347. package/dist/implementation/world/thread-tasks.js +9 -4
  348. package/dist/implementation/world/thread-tasks.js.map +1 -1
  349. package/dist/implementation/world/transfers.js.map +1 -1
  350. package/dist/implementation/world/up.d.ts +9 -6
  351. package/dist/implementation/world/up.js +291 -75
  352. package/dist/implementation/world/up.js.map +1 -1
  353. package/dist/implementation/world/wasm.d.ts +39 -8
  354. package/dist/implementation/world/wasm.js +428 -127
  355. package/dist/implementation/world/wasm.js.map +1 -1
  356. package/dist/implementation/world/wgsl.d.ts +4 -2
  357. package/dist/implementation/world/wgsl.js +20 -8
  358. package/dist/implementation/world/wgsl.js.map +1 -1
  359. package/dist/implementation/world/where.d.ts +74 -0
  360. package/dist/implementation/world/where.js +202 -0
  361. package/dist/implementation/world/where.js.map +1 -0
  362. package/dist/implementation/world/worker-platform.js.map +1 -1
  363. package/dist/implementation/world/worker-window.d.ts +7 -0
  364. package/dist/implementation/world/worker-window.js +47 -0
  365. package/dist/implementation/world/worker-window.js.map +1 -0
  366. package/dist/implementation/world/worker.js +47 -61
  367. package/dist/implementation/world/worker.js.map +1 -1
  368. package/dist/index.js +5 -0
  369. package/dist/index.js.map +1 -1
  370. package/dist/interface/component/component.js +1 -0
  371. package/dist/interface/component/component.js.map +1 -1
  372. package/dist/interface/component/index.d.ts +0 -1
  373. package/dist/interface/component/index.js +1 -1
  374. package/dist/interface/component/index.js.map +1 -1
  375. package/dist/interface/component/types.d.ts +2 -2
  376. package/dist/interface/component/value.d.ts +7 -2
  377. package/dist/interface/entity/entity.js.map +1 -1
  378. package/dist/interface/entity/index.d.ts +2 -0
  379. package/dist/interface/entity/index.js +2 -0
  380. package/dist/interface/entity/index.js.map +1 -1
  381. package/dist/interface/finalizer/body.d.ts +14 -11
  382. package/dist/interface/finalizer/create.d.ts +14 -14
  383. package/dist/interface/finalizer/create.js +43 -10
  384. package/dist/interface/finalizer/create.js.map +1 -1
  385. package/dist/interface/finalizer/created.d.ts +5 -5
  386. package/dist/interface/finalizer/declaration.d.ts +33 -13
  387. package/dist/interface/finalizer/finalizer.d.ts +2 -2
  388. package/dist/interface/finalizer/finalizer.js.map +1 -1
  389. package/dist/interface/finalizer/index.js +1 -0
  390. package/dist/interface/finalizer/index.js.map +1 -1
  391. package/dist/interface/gpu/accessors.d.ts +4 -3
  392. package/dist/interface/gpu/accessors.js +25 -8
  393. package/dist/interface/gpu/accessors.js.map +1 -1
  394. package/dist/interface/gpu/gpu.js.map +1 -1
  395. package/dist/interface/gpu/index.js +1 -0
  396. package/dist/interface/gpu/index.js.map +1 -1
  397. package/dist/interface/gpu/layout.js +1 -0
  398. package/dist/interface/gpu/layout.js.map +1 -1
  399. package/dist/interface/gpu/record.js +1 -0
  400. package/dist/interface/gpu/record.js.map +1 -1
  401. package/dist/interface/gpu/wgsl.d.ts +2 -1
  402. package/dist/interface/gpu/wgsl.js +9 -5
  403. package/dist/interface/gpu/wgsl.js.map +1 -1
  404. package/dist/interface/index.d.ts +0 -3
  405. package/dist/interface/index.js +1 -3
  406. package/dist/interface/index.js.map +1 -1
  407. package/dist/interface/indexes/create.d.ts +18 -9
  408. package/dist/interface/indexes/create.js +16 -13
  409. package/dist/interface/indexes/create.js.map +1 -1
  410. package/dist/interface/indexes/created.d.ts +2 -2
  411. package/dist/interface/indexes/declaration.d.ts +8 -3
  412. package/dist/interface/indexes/index-type.d.ts +3 -3
  413. package/dist/interface/indexes/index-type.js.map +1 -1
  414. package/dist/interface/indexes/index.js +1 -0
  415. package/dist/interface/indexes/index.js.map +1 -1
  416. package/dist/interface/math/f32/default.d.ts +4 -0
  417. package/dist/interface/math/f32/default.js +4 -0
  418. package/dist/interface/math/f32/default.js.map +1 -0
  419. package/dist/interface/math/f32/index.d.ts +3 -1
  420. package/dist/interface/math/f32/index.js.map +1 -1
  421. package/dist/interface/math/f32/public.d.ts +1 -0
  422. package/dist/interface/math/f32/public.js +2 -0
  423. package/dist/interface/math/f32/public.js.map +1 -1
  424. package/dist/interface/math/f32/round-half-even.js +1 -0
  425. package/dist/interface/math/f32/round-half-even.js.map +1 -1
  426. package/dist/interface/math/f32/schema.js.map +1 -1
  427. package/dist/interface/math/i32/default.d.ts +4 -0
  428. package/dist/interface/math/i32/default.js +4 -0
  429. package/dist/interface/math/i32/default.js.map +1 -0
  430. package/dist/interface/math/i32/index.d.ts +3 -1
  431. package/dist/interface/math/i32/index.js.map +1 -1
  432. package/dist/interface/math/i32/public.d.ts +1 -0
  433. package/dist/interface/math/i32/public.js +2 -0
  434. package/dist/interface/math/i32/public.js.map +1 -1
  435. package/dist/interface/math/i32/schema.js.map +1 -1
  436. package/dist/interface/math/i32/shift-right.js.map +1 -1
  437. package/dist/interface/math/index.js +1 -0
  438. package/dist/interface/math/index.js.map +1 -1
  439. package/dist/interface/math/intrinsic.js.map +1 -1
  440. package/dist/interface/math/mat4x4/add.js.map +1 -1
  441. package/dist/interface/math/mat4x4/determinant.js.map +1 -1
  442. package/dist/interface/math/mat4x4/identity.js.map +1 -1
  443. package/dist/interface/math/mat4x4/index.d.ts +3 -1
  444. package/dist/interface/math/mat4x4/index.js.map +1 -1
  445. package/dist/interface/math/mat4x4/inverse.js.map +1 -1
  446. package/dist/interface/math/mat4x4/look-at.js.map +1 -1
  447. package/dist/interface/math/mat4x4/multiply-vec3.js.map +1 -1
  448. package/dist/interface/math/mat4x4/multiply-vec4.js.map +1 -1
  449. package/dist/interface/math/mat4x4/multiply.js.map +1 -1
  450. package/dist/interface/math/mat4x4/orthographic.js.map +1 -1
  451. package/dist/interface/math/mat4x4/perspective.js.map +1 -1
  452. package/dist/interface/math/mat4x4/public.d.ts +1 -0
  453. package/dist/interface/math/mat4x4/public.js +2 -0
  454. package/dist/interface/math/mat4x4/public.js.map +1 -1
  455. package/dist/interface/math/mat4x4/rotation-x.js.map +1 -1
  456. package/dist/interface/math/mat4x4/rotation-y.js.map +1 -1
  457. package/dist/interface/math/mat4x4/rotation-z.js.map +1 -1
  458. package/dist/interface/math/mat4x4/scale.js.map +1 -1
  459. package/dist/interface/math/mat4x4/scaling.js.map +1 -1
  460. package/dist/interface/math/mat4x4/schema.js.map +1 -1
  461. package/dist/interface/math/mat4x4/subtract.js.map +1 -1
  462. package/dist/interface/math/mat4x4/translation.js.map +1 -1
  463. package/dist/interface/math/mat4x4/transpose.js.map +1 -1
  464. package/dist/interface/math/mat4x4/zero.js.map +1 -1
  465. package/dist/interface/math/quat/add.js.map +1 -1
  466. package/dist/interface/math/quat/align-to.js.map +1 -1
  467. package/dist/interface/math/quat/conjugate.js.map +1 -1
  468. package/dist/interface/math/quat/distance.js.map +1 -1
  469. package/dist/interface/math/quat/dot.js.map +1 -1
  470. package/dist/interface/math/quat/from-axis-angle.js.map +1 -1
  471. package/dist/interface/math/quat/from-euler.js.map +1 -1
  472. package/dist/interface/math/quat/identity.js.map +1 -1
  473. package/dist/interface/math/quat/index.d.ts +3 -1
  474. package/dist/interface/math/quat/index.js.map +1 -1
  475. package/dist/interface/math/quat/inverse.js.map +1 -1
  476. package/dist/interface/math/quat/length-squared.js.map +1 -1
  477. package/dist/interface/math/quat/length.js.map +1 -1
  478. package/dist/interface/math/quat/lerp.js.map +1 -1
  479. package/dist/interface/math/quat/look-at.js.map +1 -1
  480. package/dist/interface/math/quat/multiply.js.map +1 -1
  481. package/dist/interface/math/quat/negate.js.map +1 -1
  482. package/dist/interface/math/quat/normalize.js.map +1 -1
  483. package/dist/interface/math/quat/public.d.ts +1 -0
  484. package/dist/interface/math/quat/public.js +2 -0
  485. package/dist/interface/math/quat/public.js.map +1 -1
  486. package/dist/interface/math/quat/rotate-vec3.js.map +1 -1
  487. package/dist/interface/math/quat/scale.js.map +1 -1
  488. package/dist/interface/math/quat/schema.js.map +1 -1
  489. package/dist/interface/math/quat/slerp.js.map +1 -1
  490. package/dist/interface/math/quat/subtract.js.map +1 -1
  491. package/dist/interface/math/quat/to-axis-angle.js.map +1 -1
  492. package/dist/interface/math/quat/to-euler.js.map +1 -1
  493. package/dist/interface/math/quat/to-mat4.js.map +1 -1
  494. package/dist/interface/math/u32/count-leading-zeros.js.map +1 -1
  495. package/dist/interface/math/u32/count-one-bits.js.map +1 -1
  496. package/dist/interface/math/u32/count-trailing-zeros.js.map +1 -1
  497. package/dist/interface/math/u32/default.d.ts +4 -0
  498. package/dist/interface/math/u32/default.js +4 -0
  499. package/dist/interface/math/u32/default.js.map +1 -0
  500. package/dist/interface/math/u32/index.d.ts +3 -1
  501. package/dist/interface/math/u32/index.js.map +1 -1
  502. package/dist/interface/math/u32/public.d.ts +1 -0
  503. package/dist/interface/math/u32/public.js +2 -0
  504. package/dist/interface/math/u32/public.js.map +1 -1
  505. package/dist/interface/math/u32/reverse-bits.js.map +1 -1
  506. package/dist/interface/math/u32/schema.js.map +1 -1
  507. package/dist/interface/math/u32/shift-right.js.map +1 -1
  508. package/dist/interface/math/vec2/f32/abs.js.map +1 -1
  509. package/dist/interface/math/vec2/f32/acos.js.map +1 -1
  510. package/dist/interface/math/vec2/f32/acosh.js.map +1 -1
  511. package/dist/interface/math/vec2/f32/add.js.map +1 -1
  512. package/dist/interface/math/vec2/f32/asin.js.map +1 -1
  513. package/dist/interface/math/vec2/f32/asinh.js.map +1 -1
  514. package/dist/interface/math/vec2/f32/atan.js.map +1 -1
  515. package/dist/interface/math/vec2/f32/atanh.js.map +1 -1
  516. package/dist/interface/math/vec2/f32/ceil.js.map +1 -1
  517. package/dist/interface/math/vec2/f32/clamp.js.map +1 -1
  518. package/dist/interface/math/vec2/f32/cos.js.map +1 -1
  519. package/dist/interface/math/vec2/f32/cosh.js.map +1 -1
  520. package/dist/interface/math/vec2/f32/distance.js.map +1 -1
  521. package/dist/interface/math/vec2/f32/dot.js.map +1 -1
  522. package/dist/interface/math/vec2/f32/equals.js.map +1 -1
  523. package/dist/interface/math/vec2/f32/exp.js.map +1 -1
  524. package/dist/interface/math/vec2/f32/exp2.js.map +1 -1
  525. package/dist/interface/math/vec2/f32/f32.d.ts +3 -1
  526. package/dist/interface/math/vec2/f32/f32.js.map +1 -1
  527. package/dist/interface/math/vec2/f32/faceforward.js.map +1 -1
  528. package/dist/interface/math/vec2/f32/floor.js.map +1 -1
  529. package/dist/interface/math/vec2/f32/fract.js.map +1 -1
  530. package/dist/interface/math/vec2/f32/length.js.map +1 -1
  531. package/dist/interface/math/vec2/f32/log.js.map +1 -1
  532. package/dist/interface/math/vec2/f32/log2.js.map +1 -1
  533. package/dist/interface/math/vec2/f32/max.js.map +1 -1
  534. package/dist/interface/math/vec2/f32/min.js.map +1 -1
  535. package/dist/interface/math/vec2/f32/mix.js.map +1 -1
  536. package/dist/interface/math/vec2/f32/mod.js.map +1 -1
  537. package/dist/interface/math/vec2/f32/modf.js.map +1 -1
  538. package/dist/interface/math/vec2/f32/negate.js.map +1 -1
  539. package/dist/interface/math/vec2/f32/normalize.js.map +1 -1
  540. package/dist/interface/math/vec2/f32/pow.js.map +1 -1
  541. package/dist/interface/math/vec2/f32/public.d.ts +1 -0
  542. package/dist/interface/math/vec2/f32/public.js +2 -0
  543. package/dist/interface/math/vec2/f32/public.js.map +1 -1
  544. package/dist/interface/math/vec2/f32/reflect.js.map +1 -1
  545. package/dist/interface/math/vec2/f32/refract.js.map +1 -1
  546. package/dist/interface/math/vec2/f32/round.js.map +1 -1
  547. package/dist/interface/math/vec2/f32/scale.js.map +1 -1
  548. package/dist/interface/math/vec2/f32/schema.js.map +1 -1
  549. package/dist/interface/math/vec2/f32/sign.js.map +1 -1
  550. package/dist/interface/math/vec2/f32/sin.js.map +1 -1
  551. package/dist/interface/math/vec2/f32/sinh.js.map +1 -1
  552. package/dist/interface/math/vec2/f32/smoothstep.js.map +1 -1
  553. package/dist/interface/math/vec2/f32/sqrt.js.map +1 -1
  554. package/dist/interface/math/vec2/f32/step.js.map +1 -1
  555. package/dist/interface/math/vec2/f32/subtract.js.map +1 -1
  556. package/dist/interface/math/vec2/f32/tan.js.map +1 -1
  557. package/dist/interface/math/vec2/f32/tanh.js.map +1 -1
  558. package/dist/interface/math/vec2/f32/trunc.js.map +1 -1
  559. package/dist/interface/math/vec2/f32/zero.js.map +1 -1
  560. package/dist/interface/math/vec2/i32/abs.js.map +1 -1
  561. package/dist/interface/math/vec2/i32/add.js.map +1 -1
  562. package/dist/interface/math/vec2/i32/bitwise-and.js.map +1 -1
  563. package/dist/interface/math/vec2/i32/bitwise-not.js.map +1 -1
  564. package/dist/interface/math/vec2/i32/bitwise-or.js.map +1 -1
  565. package/dist/interface/math/vec2/i32/bitwise-xor.js.map +1 -1
  566. package/dist/interface/math/vec2/i32/clamp.js.map +1 -1
  567. package/dist/interface/math/vec2/i32/count-leading-zeros.js.map +1 -1
  568. package/dist/interface/math/vec2/i32/count-one-bits.js.map +1 -1
  569. package/dist/interface/math/vec2/i32/count-trailing-zeros.js.map +1 -1
  570. package/dist/interface/math/vec2/i32/equals.js.map +1 -1
  571. package/dist/interface/math/vec2/i32/i32.d.ts +3 -1
  572. package/dist/interface/math/vec2/i32/i32.js.map +1 -1
  573. package/dist/interface/math/vec2/i32/max.js.map +1 -1
  574. package/dist/interface/math/vec2/i32/min.js.map +1 -1
  575. package/dist/interface/math/vec2/i32/negate.js.map +1 -1
  576. package/dist/interface/math/vec2/i32/public.d.ts +1 -0
  577. package/dist/interface/math/vec2/i32/public.js +2 -0
  578. package/dist/interface/math/vec2/i32/public.js.map +1 -1
  579. package/dist/interface/math/vec2/i32/reverse-bits.js.map +1 -1
  580. package/dist/interface/math/vec2/i32/scale.js.map +1 -1
  581. package/dist/interface/math/vec2/i32/schema.js.map +1 -1
  582. package/dist/interface/math/vec2/i32/shift-left.js.map +1 -1
  583. package/dist/interface/math/vec2/i32/shift-right.js.map +1 -1
  584. package/dist/interface/math/vec2/i32/subtract.js.map +1 -1
  585. package/dist/interface/math/vec2/i32/zero.js.map +1 -1
  586. package/dist/interface/math/vec2/index.js.map +1 -1
  587. package/dist/interface/math/vec2/public.d.ts +1 -0
  588. package/dist/interface/math/vec2/public.js +2 -0
  589. package/dist/interface/math/vec2/public.js.map +1 -1
  590. package/dist/interface/math/vec2/u32/add.js.map +1 -1
  591. package/dist/interface/math/vec2/u32/bitwise-and.js.map +1 -1
  592. package/dist/interface/math/vec2/u32/bitwise-not.js.map +1 -1
  593. package/dist/interface/math/vec2/u32/bitwise-or.js.map +1 -1
  594. package/dist/interface/math/vec2/u32/bitwise-xor.js.map +1 -1
  595. package/dist/interface/math/vec2/u32/clamp.js.map +1 -1
  596. package/dist/interface/math/vec2/u32/count-leading-zeros.js.map +1 -1
  597. package/dist/interface/math/vec2/u32/count-one-bits.js.map +1 -1
  598. package/dist/interface/math/vec2/u32/count-trailing-zeros.js.map +1 -1
  599. package/dist/interface/math/vec2/u32/equals.js.map +1 -1
  600. package/dist/interface/math/vec2/u32/max.js.map +1 -1
  601. package/dist/interface/math/vec2/u32/min.js.map +1 -1
  602. package/dist/interface/math/vec2/u32/negate.js.map +1 -1
  603. package/dist/interface/math/vec2/u32/public.d.ts +1 -0
  604. package/dist/interface/math/vec2/u32/public.js +2 -0
  605. package/dist/interface/math/vec2/u32/public.js.map +1 -1
  606. package/dist/interface/math/vec2/u32/reverse-bits.js.map +1 -1
  607. package/dist/interface/math/vec2/u32/scale.js.map +1 -1
  608. package/dist/interface/math/vec2/u32/schema.js.map +1 -1
  609. package/dist/interface/math/vec2/u32/shift-left.js.map +1 -1
  610. package/dist/interface/math/vec2/u32/shift-right.js.map +1 -1
  611. package/dist/interface/math/vec2/u32/subtract.js.map +1 -1
  612. package/dist/interface/math/vec2/u32/u32.d.ts +3 -1
  613. package/dist/interface/math/vec2/u32/u32.js.map +1 -1
  614. package/dist/interface/math/vec2/u32/zero.js.map +1 -1
  615. package/dist/interface/math/vec3/f32/abs.js.map +1 -1
  616. package/dist/interface/math/vec3/f32/acos.js.map +1 -1
  617. package/dist/interface/math/vec3/f32/acosh.js.map +1 -1
  618. package/dist/interface/math/vec3/f32/add.js.map +1 -1
  619. package/dist/interface/math/vec3/f32/asin.js.map +1 -1
  620. package/dist/interface/math/vec3/f32/asinh.js.map +1 -1
  621. package/dist/interface/math/vec3/f32/atan.js.map +1 -1
  622. package/dist/interface/math/vec3/f32/atanh.js.map +1 -1
  623. package/dist/interface/math/vec3/f32/ceil.js.map +1 -1
  624. package/dist/interface/math/vec3/f32/clamp.js.map +1 -1
  625. package/dist/interface/math/vec3/f32/cos.js.map +1 -1
  626. package/dist/interface/math/vec3/f32/cosh.js.map +1 -1
  627. package/dist/interface/math/vec3/f32/cross.js.map +1 -1
  628. package/dist/interface/math/vec3/f32/distance-squared.js.map +1 -1
  629. package/dist/interface/math/vec3/f32/distance.js.map +1 -1
  630. package/dist/interface/math/vec3/f32/dot.js.map +1 -1
  631. package/dist/interface/math/vec3/f32/equals.js.map +1 -1
  632. package/dist/interface/math/vec3/f32/exp.js.map +1 -1
  633. package/dist/interface/math/vec3/f32/exp2.js.map +1 -1
  634. package/dist/interface/math/vec3/f32/f32.d.ts +3 -1
  635. package/dist/interface/math/vec3/f32/f32.js.map +1 -1
  636. package/dist/interface/math/vec3/f32/faceforward.js.map +1 -1
  637. package/dist/interface/math/vec3/f32/floor.js.map +1 -1
  638. package/dist/interface/math/vec3/f32/fract.js.map +1 -1
  639. package/dist/interface/math/vec3/f32/length-squared.js.map +1 -1
  640. package/dist/interface/math/vec3/f32/length.js.map +1 -1
  641. package/dist/interface/math/vec3/f32/log.js.map +1 -1
  642. package/dist/interface/math/vec3/f32/log2.js.map +1 -1
  643. package/dist/interface/math/vec3/f32/max.js.map +1 -1
  644. package/dist/interface/math/vec3/f32/min.js.map +1 -1
  645. package/dist/interface/math/vec3/f32/mix.js.map +1 -1
  646. package/dist/interface/math/vec3/f32/mod.js.map +1 -1
  647. package/dist/interface/math/vec3/f32/modf.js.map +1 -1
  648. package/dist/interface/math/vec3/f32/multiply.js.map +1 -1
  649. package/dist/interface/math/vec3/f32/negate.js.map +1 -1
  650. package/dist/interface/math/vec3/f32/normalize.js.map +1 -1
  651. package/dist/interface/math/vec3/f32/one.js.map +1 -1
  652. package/dist/interface/math/vec3/f32/pow.js.map +1 -1
  653. package/dist/interface/math/vec3/f32/public.d.ts +1 -0
  654. package/dist/interface/math/vec3/f32/public.js +2 -0
  655. package/dist/interface/math/vec3/f32/public.js.map +1 -1
  656. package/dist/interface/math/vec3/f32/random.js.map +1 -1
  657. package/dist/interface/math/vec3/f32/reflect.js.map +1 -1
  658. package/dist/interface/math/vec3/f32/refract.js.map +1 -1
  659. package/dist/interface/math/vec3/f32/round.js.map +1 -1
  660. package/dist/interface/math/vec3/f32/scale.js.map +1 -1
  661. package/dist/interface/math/vec3/f32/schema.js.map +1 -1
  662. package/dist/interface/math/vec3/f32/sign.js.map +1 -1
  663. package/dist/interface/math/vec3/f32/sin.js.map +1 -1
  664. package/dist/interface/math/vec3/f32/sinh.js.map +1 -1
  665. package/dist/interface/math/vec3/f32/smoothstep.js.map +1 -1
  666. package/dist/interface/math/vec3/f32/sqrt.js.map +1 -1
  667. package/dist/interface/math/vec3/f32/step.js.map +1 -1
  668. package/dist/interface/math/vec3/f32/subtract.js.map +1 -1
  669. package/dist/interface/math/vec3/f32/tan.js.map +1 -1
  670. package/dist/interface/math/vec3/f32/tanh.js.map +1 -1
  671. package/dist/interface/math/vec3/f32/trunc.js.map +1 -1
  672. package/dist/interface/math/vec3/f32/zero.js.map +1 -1
  673. package/dist/interface/math/vec3/i32/abs.js.map +1 -1
  674. package/dist/interface/math/vec3/i32/add.js.map +1 -1
  675. package/dist/interface/math/vec3/i32/bitwise-and.js.map +1 -1
  676. package/dist/interface/math/vec3/i32/bitwise-not.js.map +1 -1
  677. package/dist/interface/math/vec3/i32/bitwise-or.js.map +1 -1
  678. package/dist/interface/math/vec3/i32/bitwise-xor.js.map +1 -1
  679. package/dist/interface/math/vec3/i32/clamp.js.map +1 -1
  680. package/dist/interface/math/vec3/i32/count-leading-zeros.js.map +1 -1
  681. package/dist/interface/math/vec3/i32/count-one-bits.js.map +1 -1
  682. package/dist/interface/math/vec3/i32/count-trailing-zeros.js.map +1 -1
  683. package/dist/interface/math/vec3/i32/equals.js.map +1 -1
  684. package/dist/interface/math/vec3/i32/i32.d.ts +3 -1
  685. package/dist/interface/math/vec3/i32/i32.js.map +1 -1
  686. package/dist/interface/math/vec3/i32/max.js.map +1 -1
  687. package/dist/interface/math/vec3/i32/min.js.map +1 -1
  688. package/dist/interface/math/vec3/i32/multiply.js.map +1 -1
  689. package/dist/interface/math/vec3/i32/negate.js.map +1 -1
  690. package/dist/interface/math/vec3/i32/one.js.map +1 -1
  691. package/dist/interface/math/vec3/i32/public.d.ts +1 -0
  692. package/dist/interface/math/vec3/i32/public.js +2 -0
  693. package/dist/interface/math/vec3/i32/public.js.map +1 -1
  694. package/dist/interface/math/vec3/i32/reverse-bits.js.map +1 -1
  695. package/dist/interface/math/vec3/i32/scale.js.map +1 -1
  696. package/dist/interface/math/vec3/i32/schema.js.map +1 -1
  697. package/dist/interface/math/vec3/i32/shift-left.js.map +1 -1
  698. package/dist/interface/math/vec3/i32/shift-right.js.map +1 -1
  699. package/dist/interface/math/vec3/i32/subtract.js.map +1 -1
  700. package/dist/interface/math/vec3/i32/zero.js.map +1 -1
  701. package/dist/interface/math/vec3/index.js.map +1 -1
  702. package/dist/interface/math/vec3/public.d.ts +1 -0
  703. package/dist/interface/math/vec3/public.js +2 -0
  704. package/dist/interface/math/vec3/public.js.map +1 -1
  705. package/dist/interface/math/vec3/u32/add.js.map +1 -1
  706. package/dist/interface/math/vec3/u32/bitwise-and.js.map +1 -1
  707. package/dist/interface/math/vec3/u32/bitwise-not.js.map +1 -1
  708. package/dist/interface/math/vec3/u32/bitwise-or.js.map +1 -1
  709. package/dist/interface/math/vec3/u32/bitwise-xor.js.map +1 -1
  710. package/dist/interface/math/vec3/u32/clamp.js.map +1 -1
  711. package/dist/interface/math/vec3/u32/count-leading-zeros.js.map +1 -1
  712. package/dist/interface/math/vec3/u32/count-one-bits.js.map +1 -1
  713. package/dist/interface/math/vec3/u32/count-trailing-zeros.js.map +1 -1
  714. package/dist/interface/math/vec3/u32/equals.js.map +1 -1
  715. package/dist/interface/math/vec3/u32/max.js.map +1 -1
  716. package/dist/interface/math/vec3/u32/min.js.map +1 -1
  717. package/dist/interface/math/vec3/u32/multiply.js.map +1 -1
  718. package/dist/interface/math/vec3/u32/negate.js.map +1 -1
  719. package/dist/interface/math/vec3/u32/one.js.map +1 -1
  720. package/dist/interface/math/vec3/u32/public.d.ts +1 -0
  721. package/dist/interface/math/vec3/u32/public.js +2 -0
  722. package/dist/interface/math/vec3/u32/public.js.map +1 -1
  723. package/dist/interface/math/vec3/u32/reverse-bits.js.map +1 -1
  724. package/dist/interface/math/vec3/u32/scale.js.map +1 -1
  725. package/dist/interface/math/vec3/u32/schema.js.map +1 -1
  726. package/dist/interface/math/vec3/u32/shift-left.js.map +1 -1
  727. package/dist/interface/math/vec3/u32/shift-right.js.map +1 -1
  728. package/dist/interface/math/vec3/u32/subtract.js.map +1 -1
  729. package/dist/interface/math/vec3/u32/u32.d.ts +3 -1
  730. package/dist/interface/math/vec3/u32/u32.js.map +1 -1
  731. package/dist/interface/math/vec3/u32/volume.js.map +1 -1
  732. package/dist/interface/math/vec3/u32/zero.js.map +1 -1
  733. package/dist/interface/math/vec4/f32/abs.js.map +1 -1
  734. package/dist/interface/math/vec4/f32/acos.js.map +1 -1
  735. package/dist/interface/math/vec4/f32/acosh.js.map +1 -1
  736. package/dist/interface/math/vec4/f32/add.js.map +1 -1
  737. package/dist/interface/math/vec4/f32/asin.js.map +1 -1
  738. package/dist/interface/math/vec4/f32/asinh.js.map +1 -1
  739. package/dist/interface/math/vec4/f32/atan.js.map +1 -1
  740. package/dist/interface/math/vec4/f32/atanh.js.map +1 -1
  741. package/dist/interface/math/vec4/f32/ceil.js.map +1 -1
  742. package/dist/interface/math/vec4/f32/clamp.js.map +1 -1
  743. package/dist/interface/math/vec4/f32/cos.js.map +1 -1
  744. package/dist/interface/math/vec4/f32/cosh.js.map +1 -1
  745. package/dist/interface/math/vec4/f32/default.d.ts +4 -0
  746. package/dist/interface/math/vec4/f32/default.js +4 -0
  747. package/dist/interface/math/vec4/f32/default.js.map +1 -0
  748. package/dist/interface/math/vec4/f32/distance.js.map +1 -1
  749. package/dist/interface/math/vec4/f32/dot.js.map +1 -1
  750. package/dist/interface/math/vec4/f32/exp.js.map +1 -1
  751. package/dist/interface/math/vec4/f32/exp2.js.map +1 -1
  752. package/dist/interface/math/vec4/f32/f32.d.ts +3 -1
  753. package/dist/interface/math/vec4/f32/f32.js.map +1 -1
  754. package/dist/interface/math/vec4/f32/faceforward.js.map +1 -1
  755. package/dist/interface/math/vec4/f32/floor.js.map +1 -1
  756. package/dist/interface/math/vec4/f32/fract.js.map +1 -1
  757. package/dist/interface/math/vec4/f32/length.js.map +1 -1
  758. package/dist/interface/math/vec4/f32/log.js.map +1 -1
  759. package/dist/interface/math/vec4/f32/log2.js.map +1 -1
  760. package/dist/interface/math/vec4/f32/max.js.map +1 -1
  761. package/dist/interface/math/vec4/f32/min.js.map +1 -1
  762. package/dist/interface/math/vec4/f32/mix.js.map +1 -1
  763. package/dist/interface/math/vec4/f32/mod.js.map +1 -1
  764. package/dist/interface/math/vec4/f32/modf.js.map +1 -1
  765. package/dist/interface/math/vec4/f32/multiply.js.map +1 -1
  766. package/dist/interface/math/vec4/f32/negate.js.map +1 -1
  767. package/dist/interface/math/vec4/f32/normalize.js.map +1 -1
  768. package/dist/interface/math/vec4/f32/pow.js.map +1 -1
  769. package/dist/interface/math/vec4/f32/public.d.ts +1 -0
  770. package/dist/interface/math/vec4/f32/public.js +2 -0
  771. package/dist/interface/math/vec4/f32/public.js.map +1 -1
  772. package/dist/interface/math/vec4/f32/reflect.js.map +1 -1
  773. package/dist/interface/math/vec4/f32/refract.js.map +1 -1
  774. package/dist/interface/math/vec4/f32/round.js.map +1 -1
  775. package/dist/interface/math/vec4/f32/scale.js.map +1 -1
  776. package/dist/interface/math/vec4/f32/schema.js.map +1 -1
  777. package/dist/interface/math/vec4/f32/sign.js.map +1 -1
  778. package/dist/interface/math/vec4/f32/sin.js.map +1 -1
  779. package/dist/interface/math/vec4/f32/sinh.js.map +1 -1
  780. package/dist/interface/math/vec4/f32/smoothstep.js.map +1 -1
  781. package/dist/interface/math/vec4/f32/sqrt.js.map +1 -1
  782. package/dist/interface/math/vec4/f32/step.js.map +1 -1
  783. package/dist/interface/math/vec4/f32/subtract.js.map +1 -1
  784. package/dist/interface/math/vec4/f32/tan.js.map +1 -1
  785. package/dist/interface/math/vec4/f32/tanh.js.map +1 -1
  786. package/dist/interface/math/vec4/f32/trunc.js.map +1 -1
  787. package/dist/interface/math/vec4/i32/abs.js.map +1 -1
  788. package/dist/interface/math/vec4/i32/add.js.map +1 -1
  789. package/dist/interface/math/vec4/i32/bitwise-and.js.map +1 -1
  790. package/dist/interface/math/vec4/i32/bitwise-not.js.map +1 -1
  791. package/dist/interface/math/vec4/i32/bitwise-or.js.map +1 -1
  792. package/dist/interface/math/vec4/i32/bitwise-xor.js.map +1 -1
  793. package/dist/interface/math/vec4/i32/clamp.js.map +1 -1
  794. package/dist/interface/math/vec4/i32/count-leading-zeros.js.map +1 -1
  795. package/dist/interface/math/vec4/i32/count-one-bits.js.map +1 -1
  796. package/dist/interface/math/vec4/i32/count-trailing-zeros.js.map +1 -1
  797. package/dist/interface/math/vec4/i32/equals.js.map +1 -1
  798. package/dist/interface/math/vec4/i32/i32.d.ts +3 -1
  799. package/dist/interface/math/vec4/i32/i32.js.map +1 -1
  800. package/dist/interface/math/vec4/i32/max.js.map +1 -1
  801. package/dist/interface/math/vec4/i32/min.js.map +1 -1
  802. package/dist/interface/math/vec4/i32/multiply.js.map +1 -1
  803. package/dist/interface/math/vec4/i32/negate.js.map +1 -1
  804. package/dist/interface/math/vec4/i32/one.js.map +1 -1
  805. package/dist/interface/math/vec4/i32/public.d.ts +1 -0
  806. package/dist/interface/math/vec4/i32/public.js +2 -0
  807. package/dist/interface/math/vec4/i32/public.js.map +1 -1
  808. package/dist/interface/math/vec4/i32/reverse-bits.js.map +1 -1
  809. package/dist/interface/math/vec4/i32/scale.js.map +1 -1
  810. package/dist/interface/math/vec4/i32/schema.js.map +1 -1
  811. package/dist/interface/math/vec4/i32/shift-left.js.map +1 -1
  812. package/dist/interface/math/vec4/i32/shift-right.js.map +1 -1
  813. package/dist/interface/math/vec4/i32/subtract.js.map +1 -1
  814. package/dist/interface/math/vec4/i32/zero.js.map +1 -1
  815. package/dist/interface/math/vec4/index.js.map +1 -1
  816. package/dist/interface/math/vec4/public.d.ts +1 -0
  817. package/dist/interface/math/vec4/public.js +2 -0
  818. package/dist/interface/math/vec4/public.js.map +1 -1
  819. package/dist/interface/math/vec4/u32/add.js.map +1 -1
  820. package/dist/interface/math/vec4/u32/bitwise-and.js.map +1 -1
  821. package/dist/interface/math/vec4/u32/bitwise-not.js.map +1 -1
  822. package/dist/interface/math/vec4/u32/bitwise-or.js.map +1 -1
  823. package/dist/interface/math/vec4/u32/bitwise-xor.js.map +1 -1
  824. package/dist/interface/math/vec4/u32/clamp.js.map +1 -1
  825. package/dist/interface/math/vec4/u32/count-leading-zeros.js.map +1 -1
  826. package/dist/interface/math/vec4/u32/count-one-bits.js.map +1 -1
  827. package/dist/interface/math/vec4/u32/count-trailing-zeros.js.map +1 -1
  828. package/dist/interface/math/vec4/u32/equals.js.map +1 -1
  829. package/dist/interface/math/vec4/u32/max.js.map +1 -1
  830. package/dist/interface/math/vec4/u32/min.js.map +1 -1
  831. package/dist/interface/math/vec4/u32/multiply.js.map +1 -1
  832. package/dist/interface/math/vec4/u32/negate.js.map +1 -1
  833. package/dist/interface/math/vec4/u32/one.js.map +1 -1
  834. package/dist/interface/math/vec4/u32/public.d.ts +1 -0
  835. package/dist/interface/math/vec4/u32/public.js +2 -0
  836. package/dist/interface/math/vec4/u32/public.js.map +1 -1
  837. package/dist/interface/math/vec4/u32/reverse-bits.js.map +1 -1
  838. package/dist/interface/math/vec4/u32/scale.js.map +1 -1
  839. package/dist/interface/math/vec4/u32/schema.js.map +1 -1
  840. package/dist/interface/math/vec4/u32/shift-left.js.map +1 -1
  841. package/dist/interface/math/vec4/u32/shift-right.js.map +1 -1
  842. package/dist/interface/math/vec4/u32/subtract.js.map +1 -1
  843. package/dist/interface/math/vec4/u32/u32.d.ts +3 -1
  844. package/dist/interface/math/vec4/u32/u32.js.map +1 -1
  845. package/dist/interface/math/vec4/u32/zero.js.map +1 -1
  846. package/dist/interface/registry/archetypes.d.ts +25 -3
  847. package/dist/interface/registry/archetypes.js +40 -10
  848. package/dist/interface/registry/archetypes.js.map +1 -1
  849. package/dist/interface/registry/declarations.d.ts +7 -7
  850. package/dist/interface/registry/declarations.js +120 -10
  851. package/dist/interface/registry/declarations.js.map +1 -1
  852. package/dist/interface/registry/finalizer-order.js +3 -3
  853. package/dist/interface/registry/finalizer-order.js.map +1 -1
  854. package/dist/interface/registry/ids.d.ts +23 -0
  855. package/dist/interface/registry/ids.js +42 -0
  856. package/dist/interface/registry/ids.js.map +1 -1
  857. package/dist/interface/registry/index.d.ts +3 -3
  858. package/dist/interface/registry/index.js +3 -3
  859. package/dist/interface/registry/index.js.map +1 -1
  860. package/dist/interface/registry/indexes.js +2 -2
  861. package/dist/interface/registry/indexes.js.map +1 -1
  862. package/dist/interface/registry/items.d.ts +6 -11
  863. package/dist/interface/registry/items.js +14 -43
  864. package/dist/interface/registry/items.js.map +1 -1
  865. package/dist/interface/registry/layout.d.ts +3 -1
  866. package/dist/interface/registry/layout.js +7 -1
  867. package/dist/interface/registry/layout.js.map +1 -1
  868. package/dist/interface/registry/names.d.ts +13 -5
  869. package/dist/interface/registry/names.js +55 -38
  870. package/dist/interface/registry/names.js.map +1 -1
  871. package/dist/interface/registry/program.js.map +1 -1
  872. package/dist/interface/registry/reduction.js.map +1 -1
  873. package/dist/interface/registry/schedule.d.ts +5 -1
  874. package/dist/interface/registry/schedule.js +8 -13
  875. package/dist/interface/registry/schedule.js.map +1 -1
  876. package/dist/interface/registry/schemas.d.ts +9 -0
  877. package/dist/interface/registry/schemas.js +65 -0
  878. package/dist/interface/registry/schemas.js.map +1 -1
  879. package/dist/interface/registry/strata.js +1 -0
  880. package/dist/interface/registry/strata.js.map +1 -1
  881. package/dist/interface/registry/threads.js +3 -2
  882. package/dist/interface/registry/threads.js.map +1 -1
  883. package/dist/interface/registry/traits.js +2 -1
  884. package/dist/interface/registry/traits.js.map +1 -1
  885. package/dist/interface/registry/written.js +1 -0
  886. package/dist/interface/registry/written.js.map +1 -1
  887. package/dist/interface/resource/index.d.ts +0 -1
  888. package/dist/interface/resource/index.js +1 -1
  889. package/dist/interface/resource/index.js.map +1 -1
  890. package/dist/interface/resource/resource.js +1 -0
  891. package/dist/interface/resource/resource.js.map +1 -1
  892. package/dist/interface/resource/types.d.ts +4 -1
  893. package/dist/interface/resources/always.js +3 -2
  894. package/dist/interface/resources/always.js.map +1 -1
  895. package/dist/interface/resources/cadence.js +4 -3
  896. package/dist/interface/resources/cadence.js.map +1 -1
  897. package/dist/interface/resources/clock.js +5 -3
  898. package/dist/interface/resources/clock.js.map +1 -1
  899. package/dist/interface/resources/gpu-device.js +3 -2
  900. package/dist/interface/resources/gpu-device.js.map +1 -1
  901. package/dist/interface/resources/index.js +1 -0
  902. package/dist/interface/resources/index.js.map +1 -1
  903. package/dist/interface/resources/wake.js +3 -2
  904. package/dist/interface/resources/wake.js.map +1 -1
  905. package/dist/interface/resources/workers.js +3 -2
  906. package/dist/interface/resources/workers.js.map +1 -1
  907. package/dist/interface/rule/create.d.ts +6 -2
  908. package/dist/interface/rule/create.js +8 -6
  909. package/dist/interface/rule/create.js.map +1 -1
  910. package/dist/interface/rule/created.d.ts +3 -3
  911. package/dist/interface/rule/declaration.d.ts +8 -3
  912. package/dist/interface/rule/index.js +1 -0
  913. package/dist/interface/rule/index.js.map +1 -1
  914. package/dist/interface/rule/rule.js.map +1 -1
  915. package/dist/interface/schema/is-struct.d.ts +15 -0
  916. package/dist/interface/schema/schema.d.ts +21 -1
  917. package/dist/interface/system/access.d.ts +87 -26
  918. package/dist/interface/system/body.d.ts +53 -26
  919. package/dist/interface/system/check.d.ts +13 -3
  920. package/dist/interface/system/check.js +87 -47
  921. package/dist/interface/system/check.js.map +1 -1
  922. package/dist/interface/system/commands.d.ts +54 -5
  923. package/dist/interface/system/composite-declaration.d.ts +0 -2
  924. package/dist/interface/system/create-resolved.d.ts +9 -0
  925. package/dist/interface/system/create-resolved.js +18 -0
  926. package/dist/interface/system/create-resolved.js.map +1 -0
  927. package/dist/interface/system/create.d.ts +116 -110
  928. package/dist/interface/system/create.js +34 -8
  929. package/dist/interface/system/create.js.map +1 -1
  930. package/dist/interface/system/declaration.d.ts +33 -29
  931. package/dist/interface/system/index.js.map +1 -1
  932. package/dist/interface/system/input.d.ts +37 -6
  933. package/dist/interface/system/leaf.d.ts +10 -3
  934. package/dist/interface/system/name.d.ts +3 -3
  935. package/dist/interface/system/property.js +1 -0
  936. package/dist/interface/system/property.js.map +1 -1
  937. package/dist/interface/system/render.d.ts +35 -16
  938. package/dist/interface/system/render.js +19 -5
  939. package/dist/interface/system/render.js.map +1 -1
  940. package/dist/interface/system/resolve.d.ts +68 -0
  941. package/dist/interface/system/resolve.js +138 -0
  942. package/dist/interface/system/resolve.js.map +1 -0
  943. package/dist/interface/system/system.d.ts +5 -3
  944. package/dist/interface/system/system.js.map +1 -1
  945. package/dist/interface/system/threads.d.ts +8 -7
  946. package/dist/interface/system/values-of.d.ts +17 -0
  947. package/dist/interface/system/values-of.js.map +1 -0
  948. package/dist/interface/system/values.d.ts +12 -12
  949. package/dist/interface/thread/of.d.ts +4 -2
  950. package/dist/interface/trait/key.d.ts +1 -1
  951. package/dist/interface/trait/types.d.ts +23 -5
  952. package/dist/interface/world/create.d.ts +8 -2
  953. package/dist/interface/world/declarations.d.ts +37 -0
  954. package/dist/interface/world/declarations.js +2 -0
  955. package/dist/interface/world/declarations.js.map +1 -0
  956. package/dist/interface/world/filter.js +1 -0
  957. package/dist/interface/world/filter.js.map +1 -1
  958. package/dist/interface/world/join.d.ts +10 -4
  959. package/dist/interface/world/world.d.ts +31 -17
  960. package/package.json +18 -5
  961. package/src/exports.test.ts +149 -44
  962. package/src/guide/00-keys.md +34 -0
  963. package/src/guide/00-keys.out +1 -0
  964. package/src/guide/00-keys.ts +35 -0
  965. package/src/guide/00-setup.md +24 -0
  966. package/src/guide/01-resources.md +22 -0
  967. package/src/guide/01-resources.out +2 -0
  968. package/src/guide/01-resources.ts +33 -0
  969. package/src/guide/02-entities.md +19 -0
  970. package/src/guide/02-entities.out +2 -0
  971. package/src/guide/02-entities.ts +43 -0
  972. package/src/guide/03-systems.md +22 -0
  973. package/src/guide/03-systems.out +5 -0
  974. package/src/guide/03-systems.ts +68 -0
  975. package/src/guide/04-ticks.md +18 -0
  976. package/src/guide/04-ticks.out +3 -0
  977. package/src/guide/04-ticks.ts +53 -0
  978. package/src/guide/05-scheduling.md +14 -0
  979. package/src/guide/05-scheduling.out +2 -0
  980. package/src/guide/05-scheduling.ts +46 -0
  981. package/src/guide/06-sync-points.md +14 -0
  982. package/src/guide/06-sync-points.out +3 -0
  983. package/src/guide/06-sync-points.ts +42 -0
  984. package/src/guide/07-change-filters.md +14 -0
  985. package/src/guide/07-change-filters.out +6 -0
  986. package/src/guide/07-change-filters.ts +70 -0
  987. package/src/guide/08-input.md +12 -0
  988. package/src/guide/08-input.out +1 -0
  989. package/src/guide/08-input.ts +45 -0
  990. package/src/guide/09-rules.md +12 -0
  991. package/src/guide/09-rules.out +2 -0
  992. package/src/guide/09-rules.ts +50 -0
  993. package/src/guide/10-finalizers.md +13 -0
  994. package/src/guide/10-finalizers.out +4 -0
  995. package/src/guide/10-finalizers.ts +48 -0
  996. package/src/guide/11-traits.md +16 -0
  997. package/src/guide/11-traits.out +2 -0
  998. package/src/guide/11-traits.ts +51 -0
  999. package/src/guide/11-traits.type-test.ts +11 -13
  1000. package/src/guide/12-lookups.md +14 -0
  1001. package/src/guide/12-lookups.out +3 -0
  1002. package/src/guide/12-lookups.ts +59 -0
  1003. package/src/guide/13-indexes.md +21 -0
  1004. package/src/guide/13-indexes.out +8 -0
  1005. package/src/guide/13-indexes.ts +73 -0
  1006. package/src/guide/14-kernels.md +15 -0
  1007. package/src/guide/14-kernels.out +1 -0
  1008. package/src/guide/14-kernels.ts +48 -0
  1009. package/src/guide/15-reductions.md +12 -0
  1010. package/src/guide/15-reductions.out +1 -0
  1011. package/src/guide/15-reductions.ts +38 -0
  1012. package/src/guide/16-gpu.md +18 -0
  1013. package/src/guide/16-gpu.out +3 -0
  1014. package/src/guide/16-gpu.ts +51 -0
  1015. package/src/guide/17-hierarchies.md +11 -0
  1016. package/src/guide/17-hierarchies.out +1 -0
  1017. package/src/guide/17-hierarchies.ts +40 -0
  1018. package/src/guide/18-identity.md +10 -0
  1019. package/src/guide/18-identity.out +1 -0
  1020. package/src/guide/18-identity.ts +11 -0
  1021. package/src/guide/19-threads.md +16 -0
  1022. package/src/guide/19-threads.out +2 -0
  1023. package/src/guide/19-threads.ts +65 -0
  1024. package/src/guide/20-shared.md +29 -0
  1025. package/src/guide/20-shared.out +4 -0
  1026. package/src/guide/20-shared.ts +118 -0
  1027. package/src/guide/21-dom.md +22 -0
  1028. package/src/guide/21-dom.out +5 -0
  1029. package/src/guide/21-dom.ts +117 -0
  1030. package/src/guide/22-canvas.md +15 -0
  1031. package/src/guide/22-canvas.out +3 -0
  1032. package/src/guide/22-canvas.ts +119 -0
  1033. package/src/guide/CLAUDE.md +40 -25
  1034. package/src/guide/README.md +42 -0
  1035. package/src/guide/guide.test.ts +215 -0
  1036. package/src/implementation/compiler/access.ts +10 -4
  1037. package/src/implementation/compiler/archetypes.test.ts +64 -0
  1038. package/src/implementation/compiler/archetypes.ts +134 -0
  1039. package/src/implementation/compiler/assign.ts +1 -0
  1040. package/src/implementation/compiler/augmentations.test.ts +418 -0
  1041. package/src/implementation/compiler/augmentations.ts +871 -0
  1042. package/src/implementation/compiler/bind.ts +6 -4
  1043. package/src/implementation/compiler/body-access.ts +135 -33
  1044. package/src/implementation/compiler/booleans.ts +1 -0
  1045. package/src/implementation/compiler/branches.ts +1 -0
  1046. package/src/implementation/compiler/calls.ts +14 -3
  1047. package/src/implementation/compiler/columns.ts +21 -5
  1048. package/src/implementation/compiler/compile-kernel.ts +88 -23
  1049. package/src/implementation/compiler/compiler.ts +9 -0
  1050. package/src/implementation/compiler/data.ts +1 -0
  1051. package/src/implementation/compiler/describe.test-helper.ts +97 -0
  1052. package/src/implementation/compiler/describe.test.ts +168 -0
  1053. package/src/implementation/compiler/describe.ts +489 -0
  1054. package/src/implementation/compiler/estree.ts +1 -0
  1055. package/src/implementation/compiler/expression.ts +24 -2
  1056. package/src/implementation/compiler/failure.ts +1 -0
  1057. package/src/implementation/compiler/hygiene.test.ts +4 -11
  1058. package/src/implementation/compiler/identify.test.ts +100 -46
  1059. package/src/implementation/compiler/identify.ts +89 -32
  1060. package/src/implementation/compiler/index.ts +6 -1
  1061. package/src/implementation/compiler/inferred.test.ts +32 -0
  1062. package/src/implementation/compiler/inferred.ts +197 -0
  1063. package/src/implementation/compiler/inline-kernels.test.ts +10 -0
  1064. package/src/implementation/compiler/inline-kernels.ts +21 -0
  1065. package/src/implementation/compiler/input-schemas.test.ts +182 -0
  1066. package/src/implementation/compiler/input-schemas.ts +107 -0
  1067. package/src/implementation/compiler/ir.ts +7 -2
  1068. package/src/implementation/compiler/kernel-id.ts +1 -0
  1069. package/src/implementation/compiler/key.ts +1 -0
  1070. package/src/implementation/compiler/link.test.ts +3 -0
  1071. package/src/implementation/compiler/link.ts +29 -0
  1072. package/src/implementation/compiler/lists.ts +41 -13
  1073. package/src/implementation/compiler/lookups.ts +1 -0
  1074. package/src/implementation/compiler/math.ts +1 -0
  1075. package/src/implementation/compiler/memory-compiler.browser.test.ts +85 -0
  1076. package/src/implementation/compiler/memory-compiler.test.ts +147 -0
  1077. package/src/implementation/compiler/memory-compiler.ts +307 -0
  1078. package/src/implementation/compiler/module-scope.ts +1 -0
  1079. package/src/implementation/compiler/module-value.ts +18 -3
  1080. package/src/implementation/compiler/out.ts +1 -0
  1081. package/src/implementation/compiler/oxc.test-helper.ts +20 -0
  1082. package/src/implementation/compiler/oxc.test.ts +69 -0
  1083. package/src/implementation/compiler/oxc.ts +90 -0
  1084. package/src/implementation/compiler/package-copies.ts +208 -0
  1085. package/src/implementation/compiler/passes.ts +34 -0
  1086. package/src/implementation/compiler/paths.ts +19 -38
  1087. package/src/implementation/compiler/plugin.test.ts +373 -62
  1088. package/src/implementation/compiler/plugin.ts +199 -38
  1089. package/src/implementation/compiler/posix.test.ts +34 -0
  1090. package/src/implementation/compiler/posix.ts +183 -0
  1091. package/src/implementation/compiler/predicates.test.ts +90 -0
  1092. package/src/implementation/compiler/predicates.ts +250 -0
  1093. package/src/implementation/compiler/print.ts +26 -6
  1094. package/src/implementation/compiler/program.ts +4 -1
  1095. package/src/implementation/compiler/public.ts +2 -0
  1096. package/src/implementation/compiler/scalar.ts +1 -0
  1097. package/src/implementation/compiler/scope.ts +1 -0
  1098. package/src/implementation/compiler/serialize.ts +1 -0
  1099. package/src/implementation/compiler/shared-kernels.test.ts +57 -0
  1100. package/src/implementation/compiler/signature.ts +70 -30
  1101. package/src/implementation/compiler/snapshot.ts +5 -2
  1102. package/src/implementation/compiler/source-map.test.ts +1 -0
  1103. package/src/implementation/compiler/source-map.ts +1 -0
  1104. package/src/implementation/compiler/spawns.ts +62 -5
  1105. package/src/implementation/compiler/stamps.ts +30 -8
  1106. package/src/implementation/compiler/statement.ts +1 -0
  1107. package/src/implementation/compiler/subset.md +4 -3
  1108. package/src/implementation/compiler/terminal.ts +1 -0
  1109. package/src/implementation/compiler/transform.test.ts +371 -258
  1110. package/src/implementation/compiler/transform.ts +321 -62
  1111. package/src/implementation/compiler/type-host.test-helper.ts +27 -0
  1112. package/src/implementation/compiler/type-schemas.ts +714 -0
  1113. package/src/implementation/compiler/unit.ts +22 -4
  1114. package/src/implementation/compiler/value.ts +1 -0
  1115. package/src/implementation/compiler/wat.test.ts +135 -0
  1116. package/src/implementation/compiler/wat.ts +365 -0
  1117. package/src/implementation/index.ts +1 -0
  1118. package/src/implementation/world/activate.ts +10 -3
  1119. package/src/implementation/world/archetype.ts +133 -19
  1120. package/src/implementation/world/arrays.test.ts +1 -0
  1121. package/src/implementation/world/arrays.ts +6 -1
  1122. package/src/implementation/world/arrivals.test.ts +89 -0
  1123. package/src/implementation/world/arrivals.ts +165 -0
  1124. package/src/implementation/world/async-loading.test.ts +13 -28
  1125. package/src/implementation/world/attach-kernel.test.ts +10 -2
  1126. package/src/implementation/world/attach-kernel.ts +14 -7
  1127. package/src/implementation/world/batches.test.ts +14 -17
  1128. package/src/implementation/world/batches.ts +67 -8
  1129. package/src/implementation/world/buffer.ts +35 -4
  1130. package/src/implementation/world/builtins.test.ts +5 -10
  1131. package/src/implementation/world/cascade.ts +2 -1
  1132. package/src/implementation/world/cells.ts +1 -0
  1133. package/src/implementation/world/change-blocks.browser.test.ts +76 -0
  1134. package/src/implementation/world/change-blocks.cases.ts +14 -0
  1135. package/src/implementation/world/change-blocks.fixture.ts +70 -0
  1136. package/src/implementation/world/change-blocks.test.ts +264 -0
  1137. package/src/implementation/world/changes-finalizers.test.ts +6 -8
  1138. package/src/implementation/world/check-kernel.ts +46 -32
  1139. package/src/implementation/world/claims.test.ts +1 -0
  1140. package/src/implementation/world/claims.ts +1 -0
  1141. package/src/implementation/world/closure.test.ts +1 -0
  1142. package/src/implementation/world/closure.ts +1 -0
  1143. package/src/implementation/world/command-ring.ts +2 -1
  1144. package/src/implementation/world/command-rings.cases.ts +5 -2
  1145. package/src/implementation/world/command-rings.fixture.ts +27 -36
  1146. package/src/implementation/world/commands.test.ts +84 -43
  1147. package/src/implementation/world/commands.ts +26 -4
  1148. package/src/implementation/world/composite-input.test.ts +17 -15
  1149. package/src/implementation/world/conditions.test.ts +17 -28
  1150. package/src/implementation/world/constant-unions.test.ts +43 -0
  1151. package/src/implementation/world/create.test.ts +50 -71
  1152. package/src/implementation/world/create.ts +486 -250
  1153. package/src/implementation/world/defaults.test.ts +86 -0
  1154. package/src/implementation/world/directories.ts +2 -1
  1155. package/src/implementation/world/directory.test.ts +2 -3
  1156. package/src/implementation/world/dispatch.cases.ts +1 -0
  1157. package/src/implementation/world/dispatch.fixture.ts +16 -25
  1158. package/src/implementation/world/entities.ts +1 -0
  1159. package/src/implementation/world/entity-lookup-workers.cases.ts +1 -0
  1160. package/src/implementation/world/entity-lookup-workers.fixture.ts +9 -16
  1161. package/src/implementation/world/entity-lookups.browser.test.ts +8 -14
  1162. package/src/implementation/world/entity-lookups.test-helper.ts +28 -34
  1163. package/src/implementation/world/entity-lookups.test.ts +9 -16
  1164. package/src/implementation/world/execute.ts +232 -96
  1165. package/src/implementation/world/failing-worker.fixture.ts +3 -0
  1166. package/src/implementation/world/failures.ts +64 -7
  1167. package/src/implementation/world/finalizers.test.ts +33 -49
  1168. package/src/implementation/world/finalizers.ts +46 -14
  1169. package/src/implementation/world/fixtures.test-helper.ts +1 -0
  1170. package/src/implementation/world/generated-code.md +10 -6
  1171. package/src/implementation/world/gpu.browser.test.ts +100 -92
  1172. package/src/implementation/world/gpu.test-helper.ts +12 -0
  1173. package/src/implementation/world/gpu.ts +26 -14
  1174. package/src/implementation/world/holders.ts +1 -0
  1175. package/src/implementation/world/ids-changes.test-helper.ts +4 -0
  1176. package/src/implementation/world/ids-keys.test-helper.ts +21 -0
  1177. package/src/implementation/world/ids.test.ts +12 -49
  1178. package/src/implementation/world/imported-lists.test-helper.ts +2 -6
  1179. package/src/implementation/world/imported-lists.test.ts +4 -5
  1180. package/src/implementation/world/index-buckets.test.ts +276 -0
  1181. package/src/implementation/world/index-build-csp.test.ts +8 -9
  1182. package/src/implementation/world/index-build.cases.ts +1 -0
  1183. package/src/implementation/world/index-build.fixture.ts +12 -15
  1184. package/src/implementation/world/index-build.ts +1 -0
  1185. package/src/implementation/world/index-changed.test.ts +27 -34
  1186. package/src/implementation/world/index-hash.test.ts +34 -0
  1187. package/src/implementation/world/index-hash.ts +454 -74
  1188. package/src/implementation/world/index-joined.test.ts +232 -74
  1189. package/src/implementation/world/index-kernels.test.ts +26 -35
  1190. package/src/implementation/world/index-keyless.test.ts +21 -28
  1191. package/src/implementation/world/index-keys.ts +1 -0
  1192. package/src/implementation/world/index-lookups-csp.test.ts +5 -6
  1193. package/src/implementation/world/index-lookups.ts +28 -22
  1194. package/src/implementation/world/index-order.test.ts +13 -17
  1195. package/src/implementation/world/index-order.ts +1 -0
  1196. package/src/implementation/world/index-readers.ts +1 -0
  1197. package/src/implementation/world/index-sorted.test.ts +1 -0
  1198. package/src/implementation/world/index-sorted.ts +10 -5
  1199. package/src/implementation/world/index-workers.cases.ts +10 -0
  1200. package/src/implementation/world/index-workers.fixture.ts +98 -39
  1201. package/src/implementation/world/indexes.test.ts +62 -74
  1202. package/src/implementation/world/indexes.ts +62 -108
  1203. package/src/implementation/world/input.ts +2 -1
  1204. package/src/implementation/world/intrinsics-coverage.test.ts +1 -0
  1205. package/src/implementation/world/intrinsics.browser.test.ts +22 -62
  1206. package/src/implementation/world/intrinsics.ts +1 -0
  1207. package/src/implementation/world/join.test.ts +182 -43
  1208. package/src/implementation/world/join.ts +112 -59
  1209. package/src/implementation/world/join.type-test.ts +7 -5
  1210. package/src/implementation/world/joined-observer.test.ts +58 -0
  1211. package/src/implementation/world/joined-observer.ts +85 -19
  1212. package/src/implementation/world/joining-worker.fixture.ts +51 -11
  1213. package/src/implementation/world/joining.cases.ts +43 -7
  1214. package/src/implementation/world/joining.fixture.ts +114 -14
  1215. package/src/implementation/world/joining.test-helper.ts +25 -27
  1216. package/src/implementation/world/joining.ts +85 -7
  1217. package/src/implementation/world/journal.ts +8 -4
  1218. package/src/implementation/world/kernel-imports-sparks.test-helper.ts +3 -4
  1219. package/src/implementation/world/kernel-imports-steer.test-helper.ts +1 -0
  1220. package/src/implementation/world/kernel-imports.test.ts +10 -12
  1221. package/src/implementation/world/kernel-indexes.ts +12 -3
  1222. package/src/implementation/world/kernel-lookup.test-helper.ts +6 -10
  1223. package/src/implementation/world/kernel-path.test-helper.ts +2 -4
  1224. package/src/implementation/world/kernel-spawns.test.ts +17 -28
  1225. package/src/implementation/world/kernel-tried.test-helper.ts +31 -0
  1226. package/src/implementation/world/kernel.ts +30 -6
  1227. package/src/implementation/world/kernels-csp.test.ts +5 -5
  1228. package/src/implementation/world/kernels.test.ts +18 -14
  1229. package/src/implementation/world/kernels.ts +82 -13
  1230. package/src/implementation/world/layout-directory.browser.test.ts +18 -28
  1231. package/src/implementation/world/layout-directory.cases.ts +1 -0
  1232. package/src/implementation/world/layout-directory.fixture.ts +18 -28
  1233. package/src/implementation/world/layout-directory.ts +69 -17
  1234. package/src/implementation/world/lifetime.cases.ts +2 -1
  1235. package/src/implementation/world/lifetime.fixture.ts +12 -21
  1236. package/src/implementation/world/lifetime.test-helper.ts +2 -1
  1237. package/src/implementation/world/lifetime.test.ts +7 -14
  1238. package/src/implementation/world/lists.ts +179 -28
  1239. package/src/implementation/world/lookup-keys.ts +10 -9
  1240. package/src/implementation/world/loop.test.ts +19 -8
  1241. package/src/implementation/world/loop.ts +4 -4
  1242. package/src/implementation/world/memory.test.ts +1 -0
  1243. package/src/implementation/world/memory.ts +1 -0
  1244. package/src/implementation/world/mirror.ts +45 -10
  1245. package/src/implementation/world/move-log.test.ts +114 -11
  1246. package/src/implementation/world/move-log.ts +1 -0
  1247. package/src/implementation/world/names.test.ts +31 -31
  1248. package/src/implementation/world/observe-cases.browser.test.ts +11 -11
  1249. package/src/implementation/world/observe-cases.test.ts +49 -95
  1250. package/src/implementation/world/observe-factories.test.ts +17 -19
  1251. package/src/implementation/world/observe-joined-cases.test.ts +34 -45
  1252. package/src/implementation/world/observe-ticks-cases.test.ts +33 -35
  1253. package/src/implementation/world/observe.test-helper.ts +2 -1
  1254. package/src/implementation/world/observed-workers.cases.ts +1 -0
  1255. package/src/implementation/world/observed-workers.fixture.ts +7 -8
  1256. package/src/implementation/world/observer-contained-worker.fixture.ts +4 -3
  1257. package/src/implementation/world/observer-contained.browser.test.ts +1 -0
  1258. package/src/implementation/world/observer-contained.cases.ts +1 -0
  1259. package/src/implementation/world/observer-contained.fixture.ts +3 -7
  1260. package/src/implementation/world/observer-contained.test-helper.ts +7 -8
  1261. package/src/implementation/world/observer-contained.test.ts +11 -19
  1262. package/src/implementation/world/observer-joined-worker.fixture.ts +2 -1
  1263. package/src/implementation/world/observer-joined.cases.ts +1 -0
  1264. package/src/implementation/world/observer-joined.fixture.ts +8 -6
  1265. package/src/implementation/world/observer-joined.test-helper.ts +25 -34
  1266. package/src/implementation/world/observer-joined.test.ts +78 -62
  1267. package/src/implementation/world/observer.browser.test.ts +13 -13
  1268. package/src/implementation/world/observer.test.ts +34 -44
  1269. package/src/implementation/world/observer.ts +3 -3
  1270. package/src/implementation/world/optional-workers.cases.ts +19 -0
  1271. package/src/implementation/world/optional-workers.fixture.ts +55 -0
  1272. package/src/implementation/world/optional.test.ts +351 -0
  1273. package/src/implementation/world/order.ts +1 -0
  1274. package/src/implementation/world/out-of-band.ts +61 -0
  1275. package/src/implementation/world/outcomes.test-helper.ts +138 -0
  1276. package/src/implementation/world/package-id.test-helper.ts +9 -0
  1277. package/src/implementation/world/perf.md +124 -4
  1278. package/src/implementation/world/plan.ts +1 -0
  1279. package/src/implementation/world/platforms.test-helper.ts +1 -0
  1280. package/src/implementation/world/pool-size.cases.ts +18 -0
  1281. package/src/implementation/world/pool-size.fixture.ts +98 -6
  1282. package/src/implementation/world/pool.cases.ts +1 -0
  1283. package/src/implementation/world/pool.fixture.ts +1 -0
  1284. package/src/implementation/world/pool.ts +1 -0
  1285. package/src/implementation/world/port.test.ts +45 -0
  1286. package/src/implementation/world/port.ts +18 -11
  1287. package/src/implementation/world/ports.cases.ts +2 -2
  1288. package/src/implementation/world/ports.fixture.ts +4 -5
  1289. package/src/implementation/world/ports.type-test.ts +1 -0
  1290. package/src/implementation/world/precision.test.ts +174 -0
  1291. package/src/implementation/world/prepared-lookup.ts +1 -0
  1292. package/src/implementation/world/prepared-spawn.ts +14 -10
  1293. package/src/implementation/world/program.ts +1 -0
  1294. package/src/implementation/world/protocol.ts +9 -2
  1295. package/src/implementation/world/publish.ts +1 -0
  1296. package/src/implementation/world/ranges.test.ts +66 -0
  1297. package/src/implementation/world/ranges.ts +98 -32
  1298. package/src/implementation/world/reads.test-helper.ts +1 -0
  1299. package/src/implementation/world/reclaim.test.ts +214 -0
  1300. package/src/implementation/world/reclaim.ts +170 -0
  1301. package/src/implementation/world/reductions.cases.ts +1 -0
  1302. package/src/implementation/world/reductions.fixture.ts +5 -10
  1303. package/src/implementation/world/reductions.test.ts +36 -49
  1304. package/src/implementation/world/reductions.ts +14 -12
  1305. package/src/implementation/world/reevaluation.test-helper.ts +3 -3
  1306. package/src/implementation/world/reevaluation.test.ts +9 -8
  1307. package/src/implementation/world/register.ts +3 -2
  1308. package/src/implementation/world/remote-finalizers-worker.fixture.ts +25 -10
  1309. package/src/implementation/world/remote-finalizers.cases.ts +19 -1
  1310. package/src/implementation/world/remote-finalizers.fixture.ts +86 -11
  1311. package/src/implementation/world/remote-finalizers.test-helper.ts +119 -27
  1312. package/src/implementation/world/remote-finalizers.test.ts +86 -20
  1313. package/src/implementation/world/remote-objects-worker.fixture.ts +2 -1
  1314. package/src/implementation/world/remote-objects.cases.ts +1 -0
  1315. package/src/implementation/world/remote-objects.fixture.ts +3 -1
  1316. package/src/implementation/world/remote-objects.test-helper.ts +9 -10
  1317. package/src/implementation/world/remote-systems.ts +42 -28
  1318. package/src/implementation/world/remote.test.ts +46 -48
  1319. package/src/implementation/world/remote.ts +1 -0
  1320. package/src/implementation/world/removal-worker.fixture.ts +3 -2
  1321. package/src/implementation/world/removal.cases.ts +1 -0
  1322. package/src/implementation/world/removal.fixture.ts +3 -2
  1323. package/src/implementation/world/remove-joined.test.ts +4 -3
  1324. package/src/implementation/world/remove.test-helper.ts +11 -13
  1325. package/src/implementation/world/remove.test.ts +14 -17
  1326. package/src/implementation/world/render-order.browser.test.ts +209 -0
  1327. package/src/implementation/world/render-order.ts +150 -0
  1328. package/src/implementation/world/required.ts +10 -0
  1329. package/src/implementation/world/resources.ts +7 -3
  1330. package/src/implementation/world/rows.test.ts +8 -11
  1331. package/src/implementation/world/rows.ts +99 -30
  1332. package/src/implementation/world/rules.test.ts +38 -39
  1333. package/src/implementation/world/run-results.test.ts +374 -0
  1334. package/src/implementation/world/runner.ts +379 -73
  1335. package/src/implementation/world/schedule.test.ts +65 -67
  1336. package/src/implementation/world/semantics.test.ts +11 -16
  1337. package/src/implementation/world/share.test.ts +4 -3
  1338. package/src/implementation/world/shared-gpu.browser.test.ts +109 -0
  1339. package/src/implementation/world/shared-kernels.test.ts +117 -0
  1340. package/src/implementation/world/shared-workers.cases.ts +20 -0
  1341. package/src/implementation/world/shared-workers.fixture.ts +74 -0
  1342. package/src/implementation/world/shared.test.ts +348 -0
  1343. package/src/implementation/world/shared.ts +316 -0
  1344. package/src/implementation/world/sharing.ts +96 -32
  1345. package/src/implementation/world/staging.ts +53 -10
  1346. package/src/implementation/world/state.ts +180 -23
  1347. package/src/implementation/world/stop-lists.ts +78 -9
  1348. package/src/implementation/world/strings.test.ts +23 -34
  1349. package/src/implementation/world/strings.ts +1 -0
  1350. package/src/implementation/world/structure.ts +6 -2
  1351. package/src/implementation/world/synchronize.test.ts +1 -0
  1352. package/src/implementation/world/synchronize.ts +60 -17
  1353. package/src/implementation/world/tail-blocks.ts +9 -4
  1354. package/src/implementation/world/tails-worker.fixture.ts +9 -13
  1355. package/src/implementation/world/tails.cases.ts +3 -2
  1356. package/src/implementation/world/tails.fixture.ts +5 -2
  1357. package/src/implementation/world/tails.test-helper.ts +48 -41
  1358. package/src/implementation/world/tails.test.ts +24 -29
  1359. package/src/implementation/world/tails.ts +35 -22
  1360. package/src/implementation/world/target.test.ts +10 -13
  1361. package/src/implementation/world/terminal.ts +1 -0
  1362. package/src/implementation/world/thread-directory.ts +85 -16
  1363. package/src/implementation/world/thread-finalizers.ts +128 -22
  1364. package/src/implementation/world/thread-indexes.ts +5 -3
  1365. package/src/implementation/world/thread-observer.ts +60 -13
  1366. package/src/implementation/world/thread-systems-worker.fixture.ts +5 -6
  1367. package/src/implementation/world/thread-systems.cases.ts +15 -2
  1368. package/src/implementation/world/thread-systems.fixture.ts +41 -12
  1369. package/src/implementation/world/thread-systems.test-helper.ts +57 -52
  1370. package/src/implementation/world/thread-systems.test.ts +51 -26
  1371. package/src/implementation/world/thread-systems.ts +398 -84
  1372. package/src/implementation/world/thread-tasks.ts +9 -4
  1373. package/src/implementation/world/threads.browser.test.ts +5 -0
  1374. package/src/implementation/world/threads.test.ts +10 -0
  1375. package/src/implementation/world/ticks.browser.test.ts +3 -4
  1376. package/src/implementation/world/ticks.test.ts +5 -5
  1377. package/src/implementation/world/traits.test.ts +4 -8
  1378. package/src/implementation/world/transfers-worker.fixture.ts +17 -12
  1379. package/src/implementation/world/transfers.cases.ts +1 -0
  1380. package/src/implementation/world/transfers.fixture.ts +18 -25
  1381. package/src/implementation/world/transfers.test-helper.ts +18 -28
  1382. package/src/implementation/world/transfers.test.ts +19 -23
  1383. package/src/implementation/world/transfers.ts +1 -0
  1384. package/src/implementation/world/unidentified-finalizers.test.ts +58 -0
  1385. package/src/implementation/world/up-tree.test.ts +181 -21
  1386. package/src/implementation/world/up-workers.cases.ts +1 -0
  1387. package/src/implementation/world/up-workers.fixture.ts +6 -10
  1388. package/src/implementation/world/up.browser.test.ts +9 -12
  1389. package/src/implementation/world/up.test.ts +56 -42
  1390. package/src/implementation/world/up.ts +299 -71
  1391. package/src/implementation/world/wasm-kernels.test.ts +55 -49
  1392. package/src/implementation/world/wasm.test.ts +200 -22
  1393. package/src/implementation/world/wasm.ts +399 -127
  1394. package/src/implementation/world/wgsl.test.ts +1 -0
  1395. package/src/implementation/world/wgsl.ts +22 -5
  1396. package/src/implementation/world/where.test.ts +342 -0
  1397. package/src/implementation/world/where.ts +236 -0
  1398. package/src/implementation/world/worker-platform.ts +1 -0
  1399. package/src/implementation/world/worker-window.test.ts +43 -0
  1400. package/src/implementation/world/worker-window.ts +43 -0
  1401. package/src/implementation/world/worker.ts +47 -59
  1402. package/src/implementation/world/workers-follow.test.ts +51 -0
  1403. package/src/implementation/world/workers.cases.ts +1 -0
  1404. package/src/implementation/world/workers.fixture.ts +31 -54
  1405. package/src/implementation/world/world-host.fixture.ts +1 -0
  1406. package/src/index.ts +5 -0
  1407. package/src/interface/CLAUDE.md +1 -1
  1408. package/src/interface/component/component.ts +1 -0
  1409. package/src/interface/component/index.ts +1 -1
  1410. package/src/interface/component/key.ts +1 -0
  1411. package/src/interface/component/key.type-test.ts +1 -2
  1412. package/src/interface/component/register.test.ts +27 -34
  1413. package/src/interface/component/types.ts +3 -2
  1414. package/src/interface/component/value.ts +9 -2
  1415. package/src/interface/component/values.ts +1 -0
  1416. package/src/interface/entity/entity.ts +1 -0
  1417. package/src/interface/entity/index.ts +4 -0
  1418. package/src/interface/finalizer/body.ts +12 -11
  1419. package/src/interface/finalizer/create.test.ts +67 -72
  1420. package/src/interface/finalizer/create.ts +52 -22
  1421. package/src/interface/finalizer/created.ts +6 -5
  1422. package/src/interface/finalizer/declaration.ts +28 -9
  1423. package/src/interface/finalizer/finalizer.ts +3 -2
  1424. package/src/interface/finalizer/index.ts +1 -0
  1425. package/src/interface/gpu/accessors.ts +26 -8
  1426. package/src/interface/gpu/gpu.ts +1 -0
  1427. package/src/interface/gpu/gpu.type-test.ts +2 -2
  1428. package/src/interface/gpu/index.ts +1 -0
  1429. package/src/interface/gpu/layout.ts +1 -0
  1430. package/src/interface/gpu/record.ts +1 -0
  1431. package/src/interface/gpu/wgsl.ts +9 -6
  1432. package/src/interface/index.ts +1 -3
  1433. package/src/interface/index.type-test.ts +11 -14
  1434. package/src/interface/indexes/create.test.ts +44 -43
  1435. package/src/interface/indexes/create.ts +24 -16
  1436. package/src/interface/indexes/created.ts +3 -2
  1437. package/src/interface/indexes/declaration.ts +7 -3
  1438. package/src/interface/indexes/index-type.ts +4 -3
  1439. package/src/interface/indexes/index.ts +1 -0
  1440. package/src/interface/indexes/index.type-test.ts +45 -94
  1441. package/src/interface/math/f32/default.ts +6 -0
  1442. package/src/interface/math/f32/index.ts +5 -1
  1443. package/src/interface/math/f32/public.ts +2 -0
  1444. package/src/interface/math/f32/round-half-even.ts +1 -0
  1445. package/src/interface/math/f32/schema.ts +1 -0
  1446. package/src/interface/math/i32/default.ts +6 -0
  1447. package/src/interface/math/i32/index.ts +5 -1
  1448. package/src/interface/math/i32/public.ts +2 -0
  1449. package/src/interface/math/i32/schema.ts +1 -0
  1450. package/src/interface/math/i32/shift-right.ts +1 -0
  1451. package/src/interface/math/index.ts +1 -0
  1452. package/src/interface/math/intrinsic.ts +1 -0
  1453. package/src/interface/math/mat4x4/add.ts +1 -0
  1454. package/src/interface/math/mat4x4/determinant.ts +1 -0
  1455. package/src/interface/math/mat4x4/identity.ts +1 -0
  1456. package/src/interface/math/mat4x4/index.ts +4 -1
  1457. package/src/interface/math/mat4x4/inverse.ts +1 -0
  1458. package/src/interface/math/mat4x4/look-at.test.ts +1 -0
  1459. package/src/interface/math/mat4x4/look-at.ts +1 -0
  1460. package/src/interface/math/mat4x4/multiply-vec3.ts +1 -0
  1461. package/src/interface/math/mat4x4/multiply-vec4.ts +1 -0
  1462. package/src/interface/math/mat4x4/multiply.ts +1 -0
  1463. package/src/interface/math/mat4x4/orthographic.ts +1 -0
  1464. package/src/interface/math/mat4x4/perspective.ts +1 -0
  1465. package/src/interface/math/mat4x4/public.ts +2 -0
  1466. package/src/interface/math/mat4x4/rotation-x.ts +1 -0
  1467. package/src/interface/math/mat4x4/rotation-y.ts +1 -0
  1468. package/src/interface/math/mat4x4/rotation-z.ts +1 -0
  1469. package/src/interface/math/mat4x4/rotation.test.ts +1 -0
  1470. package/src/interface/math/mat4x4/scale.ts +1 -0
  1471. package/src/interface/math/mat4x4/scaling.ts +1 -0
  1472. package/src/interface/math/mat4x4/schema.ts +1 -0
  1473. package/src/interface/math/mat4x4/subtract.ts +1 -0
  1474. package/src/interface/math/mat4x4/translation.ts +1 -0
  1475. package/src/interface/math/mat4x4/transpose.ts +1 -0
  1476. package/src/interface/math/mat4x4/zero.ts +1 -0
  1477. package/src/interface/math/math.type-test.ts +24 -1
  1478. package/src/interface/math/quat/add.ts +1 -0
  1479. package/src/interface/math/quat/align-to.ts +1 -0
  1480. package/src/interface/math/quat/conjugate.ts +1 -0
  1481. package/src/interface/math/quat/distance.ts +1 -0
  1482. package/src/interface/math/quat/dot.ts +1 -0
  1483. package/src/interface/math/quat/from-axis-angle.ts +1 -0
  1484. package/src/interface/math/quat/from-euler.ts +1 -0
  1485. package/src/interface/math/quat/identity.ts +1 -0
  1486. package/src/interface/math/quat/index.ts +5 -1
  1487. package/src/interface/math/quat/inverse.ts +1 -0
  1488. package/src/interface/math/quat/length-squared.ts +1 -0
  1489. package/src/interface/math/quat/length.ts +1 -0
  1490. package/src/interface/math/quat/lerp.ts +1 -0
  1491. package/src/interface/math/quat/look-at.ts +1 -0
  1492. package/src/interface/math/quat/multiply.ts +1 -0
  1493. package/src/interface/math/quat/negate.ts +1 -0
  1494. package/src/interface/math/quat/normalize.ts +1 -0
  1495. package/src/interface/math/quat/public.ts +2 -0
  1496. package/src/interface/math/quat/rotate-vec3.ts +1 -0
  1497. package/src/interface/math/quat/scale.ts +1 -0
  1498. package/src/interface/math/quat/schema.ts +1 -0
  1499. package/src/interface/math/quat/slerp.ts +1 -0
  1500. package/src/interface/math/quat/subtract.ts +1 -0
  1501. package/src/interface/math/quat/to-axis-angle.ts +1 -0
  1502. package/src/interface/math/quat/to-euler.ts +1 -0
  1503. package/src/interface/math/quat/to-mat4.ts +1 -0
  1504. package/src/interface/math/semantics.test.ts +1 -0
  1505. package/src/interface/math/u32/count-leading-zeros.ts +1 -0
  1506. package/src/interface/math/u32/count-one-bits.ts +1 -0
  1507. package/src/interface/math/u32/count-trailing-zeros.ts +1 -0
  1508. package/src/interface/math/u32/default.ts +6 -0
  1509. package/src/interface/math/u32/index.ts +5 -1
  1510. package/src/interface/math/u32/public.ts +2 -0
  1511. package/src/interface/math/u32/reverse-bits.ts +1 -0
  1512. package/src/interface/math/u32/schema.ts +1 -0
  1513. package/src/interface/math/u32/shift-right.ts +1 -0
  1514. package/src/interface/math/vec2/f32/abs.ts +1 -0
  1515. package/src/interface/math/vec2/f32/acos.ts +1 -0
  1516. package/src/interface/math/vec2/f32/acosh.ts +1 -0
  1517. package/src/interface/math/vec2/f32/add.ts +1 -0
  1518. package/src/interface/math/vec2/f32/asin.ts +1 -0
  1519. package/src/interface/math/vec2/f32/asinh.ts +1 -0
  1520. package/src/interface/math/vec2/f32/atan.ts +1 -0
  1521. package/src/interface/math/vec2/f32/atanh.ts +1 -0
  1522. package/src/interface/math/vec2/f32/ceil.ts +1 -0
  1523. package/src/interface/math/vec2/f32/clamp.ts +1 -0
  1524. package/src/interface/math/vec2/f32/cos.ts +1 -0
  1525. package/src/interface/math/vec2/f32/cosh.ts +1 -0
  1526. package/src/interface/math/vec2/f32/distance.ts +1 -0
  1527. package/src/interface/math/vec2/f32/dot.ts +1 -0
  1528. package/src/interface/math/vec2/f32/equals.ts +1 -0
  1529. package/src/interface/math/vec2/f32/exp.ts +1 -0
  1530. package/src/interface/math/vec2/f32/exp2.ts +1 -0
  1531. package/src/interface/math/vec2/f32/f32.ts +5 -1
  1532. package/src/interface/math/vec2/f32/faceforward.ts +1 -0
  1533. package/src/interface/math/vec2/f32/floor.ts +1 -0
  1534. package/src/interface/math/vec2/f32/fract.ts +1 -0
  1535. package/src/interface/math/vec2/f32/length.ts +1 -0
  1536. package/src/interface/math/vec2/f32/log.ts +1 -0
  1537. package/src/interface/math/vec2/f32/log2.ts +1 -0
  1538. package/src/interface/math/vec2/f32/max.ts +1 -0
  1539. package/src/interface/math/vec2/f32/min.ts +1 -0
  1540. package/src/interface/math/vec2/f32/mix.ts +1 -0
  1541. package/src/interface/math/vec2/f32/mod.ts +1 -0
  1542. package/src/interface/math/vec2/f32/modf.ts +1 -0
  1543. package/src/interface/math/vec2/f32/negate.ts +1 -0
  1544. package/src/interface/math/vec2/f32/normalize.ts +1 -0
  1545. package/src/interface/math/vec2/f32/pow.ts +1 -0
  1546. package/src/interface/math/vec2/f32/public.ts +2 -0
  1547. package/src/interface/math/vec2/f32/reflect.ts +1 -0
  1548. package/src/interface/math/vec2/f32/refract.ts +1 -0
  1549. package/src/interface/math/vec2/f32/round.ts +1 -0
  1550. package/src/interface/math/vec2/f32/scale.ts +1 -0
  1551. package/src/interface/math/vec2/f32/schema.ts +1 -0
  1552. package/src/interface/math/vec2/f32/sign.ts +1 -0
  1553. package/src/interface/math/vec2/f32/sin.ts +1 -0
  1554. package/src/interface/math/vec2/f32/sinh.ts +1 -0
  1555. package/src/interface/math/vec2/f32/smoothstep.ts +1 -0
  1556. package/src/interface/math/vec2/f32/sqrt.ts +1 -0
  1557. package/src/interface/math/vec2/f32/step.ts +1 -0
  1558. package/src/interface/math/vec2/f32/subtract.ts +1 -0
  1559. package/src/interface/math/vec2/f32/tan.ts +1 -0
  1560. package/src/interface/math/vec2/f32/tanh.ts +1 -0
  1561. package/src/interface/math/vec2/f32/trunc.ts +1 -0
  1562. package/src/interface/math/vec2/f32/zero.ts +1 -0
  1563. package/src/interface/math/vec2/i32/abs.ts +1 -0
  1564. package/src/interface/math/vec2/i32/add.ts +1 -0
  1565. package/src/interface/math/vec2/i32/bitwise-and.ts +1 -0
  1566. package/src/interface/math/vec2/i32/bitwise-not.ts +1 -0
  1567. package/src/interface/math/vec2/i32/bitwise-or.ts +1 -0
  1568. package/src/interface/math/vec2/i32/bitwise-xor.ts +1 -0
  1569. package/src/interface/math/vec2/i32/clamp.ts +1 -0
  1570. package/src/interface/math/vec2/i32/count-leading-zeros.ts +1 -0
  1571. package/src/interface/math/vec2/i32/count-one-bits.ts +1 -0
  1572. package/src/interface/math/vec2/i32/count-trailing-zeros.ts +1 -0
  1573. package/src/interface/math/vec2/i32/equals.ts +1 -0
  1574. package/src/interface/math/vec2/i32/i32.ts +5 -1
  1575. package/src/interface/math/vec2/i32/max.ts +1 -0
  1576. package/src/interface/math/vec2/i32/min.ts +1 -0
  1577. package/src/interface/math/vec2/i32/negate.ts +1 -0
  1578. package/src/interface/math/vec2/i32/public.ts +2 -0
  1579. package/src/interface/math/vec2/i32/reverse-bits.ts +1 -0
  1580. package/src/interface/math/vec2/i32/scale.ts +1 -0
  1581. package/src/interface/math/vec2/i32/schema.ts +1 -0
  1582. package/src/interface/math/vec2/i32/shift-left.ts +1 -0
  1583. package/src/interface/math/vec2/i32/shift-right.ts +1 -0
  1584. package/src/interface/math/vec2/i32/subtract.ts +1 -0
  1585. package/src/interface/math/vec2/i32/zero.ts +1 -0
  1586. package/src/interface/math/vec2/index.ts +1 -0
  1587. package/src/interface/math/vec2/public.ts +2 -0
  1588. package/src/interface/math/vec2/u32/add.ts +1 -0
  1589. package/src/interface/math/vec2/u32/bitwise-and.ts +1 -0
  1590. package/src/interface/math/vec2/u32/bitwise-not.ts +1 -0
  1591. package/src/interface/math/vec2/u32/bitwise-or.ts +1 -0
  1592. package/src/interface/math/vec2/u32/bitwise-xor.ts +1 -0
  1593. package/src/interface/math/vec2/u32/clamp.ts +1 -0
  1594. package/src/interface/math/vec2/u32/count-leading-zeros.ts +1 -0
  1595. package/src/interface/math/vec2/u32/count-one-bits.ts +1 -0
  1596. package/src/interface/math/vec2/u32/count-trailing-zeros.ts +1 -0
  1597. package/src/interface/math/vec2/u32/equals.ts +1 -0
  1598. package/src/interface/math/vec2/u32/max.ts +1 -0
  1599. package/src/interface/math/vec2/u32/min.ts +1 -0
  1600. package/src/interface/math/vec2/u32/negate.ts +1 -0
  1601. package/src/interface/math/vec2/u32/public.ts +2 -0
  1602. package/src/interface/math/vec2/u32/reverse-bits.ts +1 -0
  1603. package/src/interface/math/vec2/u32/scale.ts +1 -0
  1604. package/src/interface/math/vec2/u32/schema.ts +1 -0
  1605. package/src/interface/math/vec2/u32/shift-left.ts +1 -0
  1606. package/src/interface/math/vec2/u32/shift-right.ts +1 -0
  1607. package/src/interface/math/vec2/u32/subtract.ts +1 -0
  1608. package/src/interface/math/vec2/u32/u32.ts +5 -1
  1609. package/src/interface/math/vec2/u32/zero.ts +1 -0
  1610. package/src/interface/math/vec3/f32/abs.ts +1 -0
  1611. package/src/interface/math/vec3/f32/acos.ts +1 -0
  1612. package/src/interface/math/vec3/f32/acosh.ts +1 -0
  1613. package/src/interface/math/vec3/f32/add.ts +1 -0
  1614. package/src/interface/math/vec3/f32/asin.ts +1 -0
  1615. package/src/interface/math/vec3/f32/asinh.ts +1 -0
  1616. package/src/interface/math/vec3/f32/atan.ts +1 -0
  1617. package/src/interface/math/vec3/f32/atanh.ts +1 -0
  1618. package/src/interface/math/vec3/f32/ceil.ts +1 -0
  1619. package/src/interface/math/vec3/f32/clamp.ts +1 -0
  1620. package/src/interface/math/vec3/f32/cos.ts +1 -0
  1621. package/src/interface/math/vec3/f32/cosh.ts +1 -0
  1622. package/src/interface/math/vec3/f32/cross.ts +1 -0
  1623. package/src/interface/math/vec3/f32/distance-squared.ts +1 -0
  1624. package/src/interface/math/vec3/f32/distance.ts +1 -0
  1625. package/src/interface/math/vec3/f32/dot.ts +1 -0
  1626. package/src/interface/math/vec3/f32/equals.ts +1 -0
  1627. package/src/interface/math/vec3/f32/exp.ts +1 -0
  1628. package/src/interface/math/vec3/f32/exp2.ts +1 -0
  1629. package/src/interface/math/vec3/f32/f32.ts +5 -1
  1630. package/src/interface/math/vec3/f32/faceforward.ts +1 -0
  1631. package/src/interface/math/vec3/f32/floor.ts +1 -0
  1632. package/src/interface/math/vec3/f32/fract.ts +1 -0
  1633. package/src/interface/math/vec3/f32/length-squared.ts +1 -0
  1634. package/src/interface/math/vec3/f32/length.ts +1 -0
  1635. package/src/interface/math/vec3/f32/log.ts +1 -0
  1636. package/src/interface/math/vec3/f32/log2.ts +1 -0
  1637. package/src/interface/math/vec3/f32/max.ts +1 -0
  1638. package/src/interface/math/vec3/f32/min.ts +1 -0
  1639. package/src/interface/math/vec3/f32/mix.ts +1 -0
  1640. package/src/interface/math/vec3/f32/mod.ts +1 -0
  1641. package/src/interface/math/vec3/f32/modf.ts +1 -0
  1642. package/src/interface/math/vec3/f32/multiply.ts +1 -0
  1643. package/src/interface/math/vec3/f32/negate.ts +1 -0
  1644. package/src/interface/math/vec3/f32/normalize.ts +1 -0
  1645. package/src/interface/math/vec3/f32/one.ts +1 -0
  1646. package/src/interface/math/vec3/f32/pow.ts +1 -0
  1647. package/src/interface/math/vec3/f32/public.ts +2 -0
  1648. package/src/interface/math/vec3/f32/random.ts +1 -0
  1649. package/src/interface/math/vec3/f32/reflect.ts +1 -0
  1650. package/src/interface/math/vec3/f32/refract.ts +1 -0
  1651. package/src/interface/math/vec3/f32/round.ts +1 -0
  1652. package/src/interface/math/vec3/f32/scale.ts +1 -0
  1653. package/src/interface/math/vec3/f32/schema.ts +1 -0
  1654. package/src/interface/math/vec3/f32/sign.ts +1 -0
  1655. package/src/interface/math/vec3/f32/sin.ts +1 -0
  1656. package/src/interface/math/vec3/f32/sinh.ts +1 -0
  1657. package/src/interface/math/vec3/f32/smoothstep.ts +1 -0
  1658. package/src/interface/math/vec3/f32/sqrt.ts +1 -0
  1659. package/src/interface/math/vec3/f32/step.ts +1 -0
  1660. package/src/interface/math/vec3/f32/subtract.ts +1 -0
  1661. package/src/interface/math/vec3/f32/tan.ts +1 -0
  1662. package/src/interface/math/vec3/f32/tanh.ts +1 -0
  1663. package/src/interface/math/vec3/f32/trunc.ts +1 -0
  1664. package/src/interface/math/vec3/f32/zero.ts +1 -0
  1665. package/src/interface/math/vec3/i32/abs.ts +1 -0
  1666. package/src/interface/math/vec3/i32/add.ts +1 -0
  1667. package/src/interface/math/vec3/i32/bitwise-and.ts +1 -0
  1668. package/src/interface/math/vec3/i32/bitwise-not.ts +1 -0
  1669. package/src/interface/math/vec3/i32/bitwise-or.ts +1 -0
  1670. package/src/interface/math/vec3/i32/bitwise-xor.ts +1 -0
  1671. package/src/interface/math/vec3/i32/clamp.ts +1 -0
  1672. package/src/interface/math/vec3/i32/count-leading-zeros.ts +1 -0
  1673. package/src/interface/math/vec3/i32/count-one-bits.ts +1 -0
  1674. package/src/interface/math/vec3/i32/count-trailing-zeros.ts +1 -0
  1675. package/src/interface/math/vec3/i32/equals.ts +1 -0
  1676. package/src/interface/math/vec3/i32/i32.ts +5 -1
  1677. package/src/interface/math/vec3/i32/max.ts +1 -0
  1678. package/src/interface/math/vec3/i32/min.ts +1 -0
  1679. package/src/interface/math/vec3/i32/multiply.ts +1 -0
  1680. package/src/interface/math/vec3/i32/negate.ts +1 -0
  1681. package/src/interface/math/vec3/i32/one.ts +1 -0
  1682. package/src/interface/math/vec3/i32/public.ts +2 -0
  1683. package/src/interface/math/vec3/i32/reverse-bits.ts +1 -0
  1684. package/src/interface/math/vec3/i32/scale.ts +1 -0
  1685. package/src/interface/math/vec3/i32/schema.ts +1 -0
  1686. package/src/interface/math/vec3/i32/shift-left.ts +1 -0
  1687. package/src/interface/math/vec3/i32/shift-right.ts +1 -0
  1688. package/src/interface/math/vec3/i32/subtract.ts +1 -0
  1689. package/src/interface/math/vec3/i32/zero.ts +1 -0
  1690. package/src/interface/math/vec3/index.ts +1 -0
  1691. package/src/interface/math/vec3/public.ts +2 -0
  1692. package/src/interface/math/vec3/u32/add.ts +1 -0
  1693. package/src/interface/math/vec3/u32/bitwise-and.ts +1 -0
  1694. package/src/interface/math/vec3/u32/bitwise-not.ts +1 -0
  1695. package/src/interface/math/vec3/u32/bitwise-or.ts +1 -0
  1696. package/src/interface/math/vec3/u32/bitwise-xor.ts +1 -0
  1697. package/src/interface/math/vec3/u32/clamp.ts +1 -0
  1698. package/src/interface/math/vec3/u32/count-leading-zeros.ts +1 -0
  1699. package/src/interface/math/vec3/u32/count-one-bits.ts +1 -0
  1700. package/src/interface/math/vec3/u32/count-trailing-zeros.ts +1 -0
  1701. package/src/interface/math/vec3/u32/equals.ts +1 -0
  1702. package/src/interface/math/vec3/u32/max.ts +1 -0
  1703. package/src/interface/math/vec3/u32/min.ts +1 -0
  1704. package/src/interface/math/vec3/u32/multiply.ts +1 -0
  1705. package/src/interface/math/vec3/u32/negate.ts +1 -0
  1706. package/src/interface/math/vec3/u32/one.ts +1 -0
  1707. package/src/interface/math/vec3/u32/public.ts +2 -0
  1708. package/src/interface/math/vec3/u32/reverse-bits.ts +1 -0
  1709. package/src/interface/math/vec3/u32/scale.ts +1 -0
  1710. package/src/interface/math/vec3/u32/schema.ts +1 -0
  1711. package/src/interface/math/vec3/u32/shift-left.ts +1 -0
  1712. package/src/interface/math/vec3/u32/shift-right.ts +1 -0
  1713. package/src/interface/math/vec3/u32/subtract.ts +1 -0
  1714. package/src/interface/math/vec3/u32/u32.ts +5 -1
  1715. package/src/interface/math/vec3/u32/volume.ts +1 -0
  1716. package/src/interface/math/vec3/u32/zero.ts +1 -0
  1717. package/src/interface/math/vec4/f32/abs.ts +1 -0
  1718. package/src/interface/math/vec4/f32/acos.ts +1 -0
  1719. package/src/interface/math/vec4/f32/acosh.ts +1 -0
  1720. package/src/interface/math/vec4/f32/add.ts +1 -0
  1721. package/src/interface/math/vec4/f32/asin.ts +1 -0
  1722. package/src/interface/math/vec4/f32/asinh.ts +1 -0
  1723. package/src/interface/math/vec4/f32/atan.ts +1 -0
  1724. package/src/interface/math/vec4/f32/atanh.ts +1 -0
  1725. package/src/interface/math/vec4/f32/ceil.ts +1 -0
  1726. package/src/interface/math/vec4/f32/clamp.ts +1 -0
  1727. package/src/interface/math/vec4/f32/cos.ts +1 -0
  1728. package/src/interface/math/vec4/f32/cosh.ts +1 -0
  1729. package/src/interface/math/vec4/f32/default.ts +6 -0
  1730. package/src/interface/math/vec4/f32/distance.ts +1 -0
  1731. package/src/interface/math/vec4/f32/dot.ts +1 -0
  1732. package/src/interface/math/vec4/f32/exp.ts +1 -0
  1733. package/src/interface/math/vec4/f32/exp2.ts +1 -0
  1734. package/src/interface/math/vec4/f32/f32.ts +5 -1
  1735. package/src/interface/math/vec4/f32/faceforward.ts +1 -0
  1736. package/src/interface/math/vec4/f32/floor.ts +1 -0
  1737. package/src/interface/math/vec4/f32/fract.ts +1 -0
  1738. package/src/interface/math/vec4/f32/length.ts +1 -0
  1739. package/src/interface/math/vec4/f32/log.ts +1 -0
  1740. package/src/interface/math/vec4/f32/log2.ts +1 -0
  1741. package/src/interface/math/vec4/f32/max.ts +1 -0
  1742. package/src/interface/math/vec4/f32/min.ts +1 -0
  1743. package/src/interface/math/vec4/f32/mix.ts +1 -0
  1744. package/src/interface/math/vec4/f32/mod.ts +1 -0
  1745. package/src/interface/math/vec4/f32/modf.ts +1 -0
  1746. package/src/interface/math/vec4/f32/multiply.ts +1 -0
  1747. package/src/interface/math/vec4/f32/negate.ts +1 -0
  1748. package/src/interface/math/vec4/f32/normalize.ts +1 -0
  1749. package/src/interface/math/vec4/f32/pow.ts +1 -0
  1750. package/src/interface/math/vec4/f32/public.ts +2 -0
  1751. package/src/interface/math/vec4/f32/reflect.ts +1 -0
  1752. package/src/interface/math/vec4/f32/refract.ts +1 -0
  1753. package/src/interface/math/vec4/f32/round.ts +1 -0
  1754. package/src/interface/math/vec4/f32/scale.ts +1 -0
  1755. package/src/interface/math/vec4/f32/schema.ts +1 -0
  1756. package/src/interface/math/vec4/f32/sign.ts +1 -0
  1757. package/src/interface/math/vec4/f32/sin.ts +1 -0
  1758. package/src/interface/math/vec4/f32/sinh.ts +1 -0
  1759. package/src/interface/math/vec4/f32/smoothstep.ts +1 -0
  1760. package/src/interface/math/vec4/f32/sqrt.ts +1 -0
  1761. package/src/interface/math/vec4/f32/step.ts +1 -0
  1762. package/src/interface/math/vec4/f32/subtract.ts +1 -0
  1763. package/src/interface/math/vec4/f32/tan.ts +1 -0
  1764. package/src/interface/math/vec4/f32/tanh.ts +1 -0
  1765. package/src/interface/math/vec4/f32/trunc.ts +1 -0
  1766. package/src/interface/math/vec4/i32/abs.ts +1 -0
  1767. package/src/interface/math/vec4/i32/add.ts +1 -0
  1768. package/src/interface/math/vec4/i32/bitwise-and.ts +1 -0
  1769. package/src/interface/math/vec4/i32/bitwise-not.ts +1 -0
  1770. package/src/interface/math/vec4/i32/bitwise-or.ts +1 -0
  1771. package/src/interface/math/vec4/i32/bitwise-xor.ts +1 -0
  1772. package/src/interface/math/vec4/i32/clamp.ts +1 -0
  1773. package/src/interface/math/vec4/i32/count-leading-zeros.ts +1 -0
  1774. package/src/interface/math/vec4/i32/count-one-bits.ts +1 -0
  1775. package/src/interface/math/vec4/i32/count-trailing-zeros.ts +1 -0
  1776. package/src/interface/math/vec4/i32/equals.ts +1 -0
  1777. package/src/interface/math/vec4/i32/i32.ts +5 -1
  1778. package/src/interface/math/vec4/i32/max.ts +1 -0
  1779. package/src/interface/math/vec4/i32/min.ts +1 -0
  1780. package/src/interface/math/vec4/i32/multiply.ts +1 -0
  1781. package/src/interface/math/vec4/i32/negate.ts +1 -0
  1782. package/src/interface/math/vec4/i32/one.ts +1 -0
  1783. package/src/interface/math/vec4/i32/public.ts +2 -0
  1784. package/src/interface/math/vec4/i32/reverse-bits.ts +1 -0
  1785. package/src/interface/math/vec4/i32/scale.ts +1 -0
  1786. package/src/interface/math/vec4/i32/schema.ts +1 -0
  1787. package/src/interface/math/vec4/i32/shift-left.ts +1 -0
  1788. package/src/interface/math/vec4/i32/shift-right.ts +1 -0
  1789. package/src/interface/math/vec4/i32/subtract.ts +1 -0
  1790. package/src/interface/math/vec4/i32/zero.ts +1 -0
  1791. package/src/interface/math/vec4/index.ts +1 -0
  1792. package/src/interface/math/vec4/public.ts +2 -0
  1793. package/src/interface/math/vec4/u32/add.ts +1 -0
  1794. package/src/interface/math/vec4/u32/bitwise-and.ts +1 -0
  1795. package/src/interface/math/vec4/u32/bitwise-not.ts +1 -0
  1796. package/src/interface/math/vec4/u32/bitwise-or.ts +1 -0
  1797. package/src/interface/math/vec4/u32/bitwise-xor.ts +1 -0
  1798. package/src/interface/math/vec4/u32/clamp.ts +1 -0
  1799. package/src/interface/math/vec4/u32/count-leading-zeros.ts +1 -0
  1800. package/src/interface/math/vec4/u32/count-one-bits.ts +1 -0
  1801. package/src/interface/math/vec4/u32/count-trailing-zeros.ts +1 -0
  1802. package/src/interface/math/vec4/u32/equals.ts +1 -0
  1803. package/src/interface/math/vec4/u32/max.ts +1 -0
  1804. package/src/interface/math/vec4/u32/min.ts +1 -0
  1805. package/src/interface/math/vec4/u32/multiply.ts +1 -0
  1806. package/src/interface/math/vec4/u32/negate.ts +1 -0
  1807. package/src/interface/math/vec4/u32/one.ts +1 -0
  1808. package/src/interface/math/vec4/u32/public.ts +2 -0
  1809. package/src/interface/math/vec4/u32/reverse-bits.ts +1 -0
  1810. package/src/interface/math/vec4/u32/scale.ts +1 -0
  1811. package/src/interface/math/vec4/u32/schema.ts +1 -0
  1812. package/src/interface/math/vec4/u32/shift-left.ts +1 -0
  1813. package/src/interface/math/vec4/u32/shift-right.ts +1 -0
  1814. package/src/interface/math/vec4/u32/subtract.ts +1 -0
  1815. package/src/interface/math/vec4/u32/u32.ts +5 -1
  1816. package/src/interface/math/vec4/u32/zero.ts +1 -0
  1817. package/src/interface/platform/platform.ts +1 -0
  1818. package/src/interface/registry/archetypes.test.ts +50 -0
  1819. package/src/interface/registry/archetypes.ts +45 -9
  1820. package/src/interface/registry/declarations.ts +107 -13
  1821. package/src/interface/registry/declared.test.ts +40 -0
  1822. package/src/interface/registry/finalizer-order.ts +4 -3
  1823. package/src/interface/registry/ids.test-helper.ts +35 -1
  1824. package/src/interface/registry/ids.test.ts +43 -56
  1825. package/src/interface/registry/ids.ts +46 -0
  1826. package/src/interface/registry/index.ts +4 -3
  1827. package/src/interface/registry/indexes.ts +3 -2
  1828. package/src/interface/registry/items.ts +17 -47
  1829. package/src/interface/registry/layout.test.ts +20 -0
  1830. package/src/interface/registry/layout.ts +11 -3
  1831. package/src/interface/registry/names.test.ts +16 -18
  1832. package/src/interface/registry/names.ts +62 -42
  1833. package/src/interface/registry/program.ts +1 -0
  1834. package/src/interface/registry/reduction.ts +1 -0
  1835. package/src/interface/registry/schedule.ts +10 -14
  1836. package/src/interface/registry/schemas.ts +58 -0
  1837. package/src/interface/registry/strata.ts +1 -0
  1838. package/src/interface/registry/threads.ts +3 -2
  1839. package/src/interface/registry/traits.ts +2 -1
  1840. package/src/interface/registry/written.ts +1 -0
  1841. package/src/interface/resource/condition.ts +1 -0
  1842. package/src/interface/resource/index.ts +1 -1
  1843. package/src/interface/resource/key.ts +1 -0
  1844. package/src/interface/resource/reduction.ts +1 -0
  1845. package/src/interface/resource/register.test.ts +42 -56
  1846. package/src/interface/resource/resource.ts +1 -0
  1847. package/src/interface/resource/types.ts +5 -1
  1848. package/src/interface/resource/value.ts +1 -0
  1849. package/src/interface/resource/written.ts +1 -0
  1850. package/src/interface/resources/always.ts +3 -2
  1851. package/src/interface/resources/cadence.ts +4 -3
  1852. package/src/interface/resources/clock.ts +5 -3
  1853. package/src/interface/resources/gpu-device.ts +3 -2
  1854. package/src/interface/resources/index.ts +1 -0
  1855. package/src/interface/resources/wake.ts +3 -2
  1856. package/src/interface/resources/workers.ts +3 -2
  1857. package/src/interface/rule/create.ts +9 -7
  1858. package/src/interface/rule/created.ts +3 -2
  1859. package/src/interface/rule/declaration.ts +7 -3
  1860. package/src/interface/rule/index.ts +1 -0
  1861. package/src/interface/rule/rule.ts +1 -0
  1862. package/src/interface/rule/rule.type-test.ts +17 -27
  1863. package/src/interface/schema/is-struct.ts +12 -0
  1864. package/src/interface/schema/schema.ts +23 -1
  1865. package/src/interface/schema/schema.type-test.ts +18 -16
  1866. package/src/interface/schema/schemas.type-test.ts +1 -0
  1867. package/src/interface/system/access.ts +68 -28
  1868. package/src/interface/system/body.ts +53 -23
  1869. package/src/interface/system/check.ts +82 -44
  1870. package/src/interface/system/commands.ts +50 -5
  1871. package/src/interface/system/commands.type-test.ts +2 -8
  1872. package/src/interface/system/composite-declaration.ts +1 -2
  1873. package/src/interface/system/composite-input.type-test.ts +13 -29
  1874. package/src/interface/system/composite.ts +1 -0
  1875. package/src/interface/system/conditions.type-test.ts +11 -22
  1876. package/src/interface/system/create-resolved.ts +21 -0
  1877. package/src/interface/system/create.test.ts +96 -116
  1878. package/src/interface/system/create.ts +121 -94
  1879. package/src/interface/system/declaration.ts +33 -25
  1880. package/src/interface/system/definition.ts +1 -0
  1881. package/src/interface/system/index.ts +1 -0
  1882. package/src/interface/system/input.ts +35 -4
  1883. package/src/interface/system/leaf.ts +10 -3
  1884. package/src/interface/system/lists.type-test.ts +53 -0
  1885. package/src/interface/system/name.ts +4 -3
  1886. package/src/interface/system/optional.type-test.ts +51 -0
  1887. package/src/interface/system/property.ts +1 -0
  1888. package/src/interface/system/render.ts +45 -20
  1889. package/src/interface/system/resolve.test.ts +49 -0
  1890. package/src/interface/system/resolve.ts +165 -0
  1891. package/src/interface/system/shared.type-test.ts +205 -0
  1892. package/src/interface/system/struct.ts +1 -0
  1893. package/src/interface/system/system.ts +5 -3
  1894. package/src/interface/system/system.type-test.ts +160 -197
  1895. package/src/interface/system/threads.ts +9 -8
  1896. package/src/interface/system/threads.type-test.ts +29 -60
  1897. package/src/interface/system/up.type-test.ts +15 -28
  1898. package/src/interface/system/values-of.ts +17 -0
  1899. package/src/interface/system/values.ts +15 -12
  1900. package/src/interface/thread/of.ts +4 -3
  1901. package/src/interface/thread/thread.ts +1 -0
  1902. package/src/interface/thread/thread.type-test.ts +3 -68
  1903. package/src/interface/trait/key.ts +2 -1
  1904. package/src/interface/trait/trait.type-test.ts +4 -77
  1905. package/src/interface/trait/types.ts +19 -6
  1906. package/src/interface/tsconfig.json +1 -1
  1907. package/src/interface/world/create.ts +9 -2
  1908. package/src/interface/world/declarations.ts +34 -0
  1909. package/src/interface/world/filter.ts +1 -0
  1910. package/src/interface/world/index.ts +1 -0
  1911. package/src/interface/world/join.ts +11 -4
  1912. package/src/interface/world/loop.type-test.ts +15 -10
  1913. package/src/interface/world/run.type-test.ts +87 -0
  1914. package/src/interface/world/share.type-test.ts +8 -2
  1915. package/src/interface/world/world.ts +32 -17
  1916. package/src/interface/world/world.type-test.ts +6 -10
  1917. package/src/observe/compare.ts +1 -0
  1918. package/src/observe/entity.ts +21 -13
  1919. package/src/observe/index.ts +1 -0
  1920. package/src/observe/members.ts +1 -0
  1921. package/src/observe/observe.ts +1 -0
  1922. package/src/observe/observe.type-test.ts +1 -4
  1923. package/src/observe/plans.ts +1 -0
  1924. package/src/observe/query.ts +1 -0
  1925. package/src/observe/resource.ts +5 -4
  1926. package/src/observe/select.ts +13 -12
  1927. package/src/observe/to-promise.ts +1 -0
  1928. package/src/observe/tsconfig.json +1 -1
  1929. package/src/observe/values.ts +1 -0
  1930. package/src/observe/world-state.ts +41 -34
  1931. package/src/observe-imports.test.ts +1 -0
  1932. package/src/perftest/benchmark.ts +1 -0
  1933. package/src/perftest/benchmarks.ts +24 -8
  1934. package/src/perftest/editor.ts +126 -0
  1935. package/src/perftest/filters.ts +124 -0
  1936. package/src/perftest/finalized.ts +72 -24
  1937. package/src/perftest/flat.ts +16 -26
  1938. package/src/perftest/growth.ts +7 -15
  1939. package/src/perftest/handoff.ts +30 -37
  1940. package/src/perftest/hierarchy.ts +23 -40
  1941. package/src/perftest/indexes.ts +132 -64
  1942. package/src/perftest/invariants.ts +63 -0
  1943. package/src/perftest/joined.ts +13 -5
  1944. package/src/perftest/journal.ts +55 -0
  1945. package/src/perftest/keys.ts +1 -0
  1946. package/src/perftest/log.ts +6 -6
  1947. package/src/perftest/loop.ts +2 -1
  1948. package/src/perftest/observed-gpu.ts +6 -7
  1949. package/src/perftest/observed.ts +6 -12
  1950. package/src/perftest/observer.ts +5 -4
  1951. package/src/perftest/optional.ts +102 -0
  1952. package/src/perftest/particles.ts +13 -20
  1953. package/src/perftest/placed.ts +1 -0
  1954. package/src/perftest/reads.ts +13 -18
  1955. package/src/perftest/remote.ts +26 -28
  1956. package/src/perftest/render-order.ts +86 -0
  1957. package/src/perftest/run.ts +1 -0
  1958. package/src/perftest/shared.ts +416 -0
  1959. package/src/perftest/strings.ts +14 -12
  1960. package/src/perftest/structural.ts +32 -46
  1961. package/src/perftest/suite.perf-browser-test.ts +3 -0
  1962. package/src/perftest/suite.perf-test.ts +1 -0
  1963. package/src/perftest/suite.ts +41 -59
  1964. package/src/perftest/systems.ts +4 -6
  1965. package/src/perftest/tails.ts +40 -48
  1966. package/src/perftest/transfers.ts +25 -20
  1967. package/src/perftest/uploads.ts +11 -13
  1968. package/src/perftest/values.ts +8 -12
  1969. package/src/perftest/wake.ts +1 -0
  1970. package/src/world.test.ts +10 -10
  1971. package/dist/implementation/compiler/exact.d.ts +0 -24
  1972. package/dist/implementation/compiler/exact.js +0 -64
  1973. package/dist/implementation/compiler/exact.js.map +0 -1
  1974. package/dist/implementation/world/reports.d.ts +0 -63
  1975. package/dist/implementation/world/reports.js +0 -180
  1976. package/dist/implementation/world/reports.js.map +0 -1
  1977. package/dist/interface/archetype/archetype.d.ts +0 -2
  1978. package/dist/interface/archetype/archetype.js +0 -2
  1979. package/dist/interface/archetype/archetype.js.map +0 -1
  1980. package/dist/interface/archetype/create.d.ts +0 -7
  1981. package/dist/interface/archetype/create.js +0 -11
  1982. package/dist/interface/archetype/create.js.map +0 -1
  1983. package/dist/interface/archetype/index.d.ts +0 -1
  1984. package/dist/interface/archetype/index.js +0 -2
  1985. package/dist/interface/archetype/index.js.map +0 -1
  1986. package/dist/interface/archetype/values-of.d.ts +0 -17
  1987. package/dist/interface/archetype/values-of.js.map +0 -1
  1988. package/dist/interface/component/declaration.d.ts +0 -74
  1989. package/dist/interface/component/declaration.js +0 -2
  1990. package/dist/interface/component/declaration.js.map +0 -1
  1991. package/dist/interface/component/register.d.ts +0 -23
  1992. package/dist/interface/component/register.js +0 -6
  1993. package/dist/interface/component/register.js.map +0 -1
  1994. package/dist/interface/finalizer/name.d.ts +0 -6
  1995. package/dist/interface/finalizer/name.js +0 -2
  1996. package/dist/interface/finalizer/name.js.map +0 -1
  1997. package/dist/interface/indexes/name.d.ts +0 -5
  1998. package/dist/interface/indexes/name.js +0 -2
  1999. package/dist/interface/indexes/name.js.map +0 -1
  2000. package/dist/interface/report/components.d.ts +0 -38
  2001. package/dist/interface/report/components.js +0 -48
  2002. package/dist/interface/report/components.js.map +0 -1
  2003. package/dist/interface/report/failure.d.ts +0 -29
  2004. package/dist/interface/report/failure.js +0 -2
  2005. package/dist/interface/report/failure.js.map +0 -1
  2006. package/dist/interface/report/index.d.ts +0 -5
  2007. package/dist/interface/report/index.js +0 -6
  2008. package/dist/interface/report/index.js.map +0 -1
  2009. package/dist/interface/report/report.d.ts +0 -12
  2010. package/dist/interface/report/report.js +0 -2
  2011. package/dist/interface/report/report.js.map +0 -1
  2012. package/dist/interface/resource/declaration.d.ts +0 -31
  2013. package/dist/interface/resource/declaration.js +0 -2
  2014. package/dist/interface/resource/declaration.js.map +0 -1
  2015. package/dist/interface/resource/register.d.ts +0 -13
  2016. package/dist/interface/resource/register.js +0 -6
  2017. package/dist/interface/resource/register.js.map +0 -1
  2018. package/dist/interface/rule/name.d.ts +0 -6
  2019. package/dist/interface/rule/name.js +0 -2
  2020. package/dist/interface/rule/name.js.map +0 -1
  2021. package/dist/interface/schema/is-data.d.ts +0 -19
  2022. package/dist/interface/schema/is-data.js +0 -2
  2023. package/dist/interface/schema/is-data.js.map +0 -1
  2024. package/dist/interface/trait/index.d.ts +0 -1
  2025. package/dist/interface/trait/index.js +0 -2
  2026. package/dist/interface/trait/index.js.map +0 -1
  2027. package/dist/interface/trait/register.d.ts +0 -7
  2028. package/dist/interface/trait/register.js +0 -8
  2029. package/dist/interface/trait/register.js.map +0 -1
  2030. package/dist/interface/trait/required.d.ts +0 -10
  2031. package/dist/interface/trait/required.js +0 -2
  2032. package/dist/interface/trait/required.js.map +0 -1
  2033. package/dist/interface/trait/symbol-keys.d.ts +0 -16
  2034. package/dist/interface/trait/symbol-keys.js +0 -2
  2035. package/dist/interface/trait/symbol-keys.js.map +0 -1
  2036. package/dist/interface/trait/trait.d.ts +0 -2
  2037. package/dist/interface/trait/trait.js +0 -2
  2038. package/dist/interface/trait/trait.js.map +0 -1
  2039. package/src/guide/01-resources.test.ts +0 -44
  2040. package/src/guide/02-entities.test.ts +0 -57
  2041. package/src/guide/03-systems.test.ts +0 -87
  2042. package/src/guide/04-ticks.test.ts +0 -73
  2043. package/src/guide/05-scheduling.test.ts +0 -60
  2044. package/src/guide/06-sync-points.test.ts +0 -59
  2045. package/src/guide/07-change-filters.test.ts +0 -87
  2046. package/src/guide/08-input.test.ts +0 -47
  2047. package/src/guide/09-rules.test.ts +0 -57
  2048. package/src/guide/10-finalizers.test.ts +0 -64
  2049. package/src/guide/11-traits.test.ts +0 -58
  2050. package/src/guide/13-indexes.test.ts +0 -95
  2051. package/src/guide/guide.md +0 -551
  2052. package/src/implementation/compiler/exact.ts +0 -77
  2053. package/src/implementation/world/reports.test-helper.ts +0 -117
  2054. package/src/implementation/world/reports.test.ts +0 -167
  2055. package/src/implementation/world/reports.ts +0 -203
  2056. package/src/interface/archetype/archetype.ts +0 -3
  2057. package/src/interface/archetype/archetype.type-test.ts +0 -37
  2058. package/src/interface/archetype/create.test.ts +0 -40
  2059. package/src/interface/archetype/create.ts +0 -12
  2060. package/src/interface/archetype/index.ts +0 -1
  2061. package/src/interface/archetype/values-of.ts +0 -16
  2062. package/src/interface/component/declaration.ts +0 -67
  2063. package/src/interface/component/declaration.type-test.ts +0 -87
  2064. package/src/interface/component/register.ts +0 -28
  2065. package/src/interface/finalizer/name.ts +0 -6
  2066. package/src/interface/indexes/name.ts +0 -5
  2067. package/src/interface/report/components.ts +0 -69
  2068. package/src/interface/report/failure.ts +0 -26
  2069. package/src/interface/report/index.ts +0 -8
  2070. package/src/interface/report/report.ts +0 -11
  2071. package/src/interface/report/report.type-test.ts +0 -63
  2072. package/src/interface/resource/declaration.ts +0 -29
  2073. package/src/interface/resource/declaration.type-test.ts +0 -89
  2074. package/src/interface/resource/register.ts +0 -18
  2075. package/src/interface/rule/name.ts +0 -6
  2076. package/src/interface/schema/is-data.ts +0 -25
  2077. package/src/interface/trait/index.ts +0 -1
  2078. package/src/interface/trait/register.ts +0 -9
  2079. package/src/interface/trait/required.ts +0 -7
  2080. package/src/interface/trait/symbol-keys.ts +0 -19
  2081. package/src/interface/trait/symbol-keys.type-test.ts +0 -14
  2082. package/src/interface/trait/trait.ts +0 -3
  2083. package/src/samples/particles/build.test.ts +0 -23
  2084. package/src/samples/particles/gpu/main.ts +0 -96
  2085. package/src/samples/particles/gpu/particles.ts +0 -138
  2086. package/src/samples/particles/index.html +0 -22
  2087. package/src/samples/particles/particles.test.ts +0 -31
  2088. package/src/samples/particles/particles.ts +0 -85
  2089. package/src/samples/particles/particles.type-test.ts +0 -7
  2090. package/src/samples/todo/README.md +0 -174
  2091. package/src/samples/todo/app/app.browser.test.ts +0 -215
  2092. package/src/samples/todo/app/app.ts +0 -30
  2093. package/src/samples/todo/app/log-failures.test.ts +0 -28
  2094. package/src/samples/todo/app/log-failures.ts +0 -7
  2095. package/src/samples/todo/app/main.ts +0 -4
  2096. package/src/samples/todo/app/profile.perf-browser-test.ts +0 -100
  2097. package/src/samples/todo/app/proportional.browser.test.ts +0 -157
  2098. package/src/samples/todo/app/todo.perf-browser-test.ts +0 -207
  2099. package/src/samples/todo/build.test.ts +0 -23
  2100. package/src/samples/todo/features/completion/data.ts +0 -5
  2101. package/src/samples/todo/features/completion/dom.browser.test.ts +0 -53
  2102. package/src/samples/todo/features/completion/dom.ts +0 -39
  2103. package/src/samples/todo/features/completion/elements/elements.browser.test.ts +0 -68
  2104. package/src/samples/todo/features/completion/elements/todo-summary.ts +0 -82
  2105. package/src/samples/todo/features/completion/elements/todo-toggle-all.ts +0 -69
  2106. package/src/samples/todo/features/completion/events.ts +0 -7
  2107. package/src/samples/todo/features/completion/feature.ts +0 -13
  2108. package/src/samples/todo/features/completion/model.test.ts +0 -40
  2109. package/src/samples/todo/features/completion/model.ts +0 -21
  2110. package/src/samples/todo/features/filter/data.ts +0 -16
  2111. package/src/samples/todo/features/filter/dom.browser.test.ts +0 -84
  2112. package/src/samples/todo/features/filter/dom.ts +0 -63
  2113. package/src/samples/todo/features/filter/elements/elements.browser.test.ts +0 -43
  2114. package/src/samples/todo/features/filter/elements/todo-filters.ts +0 -70
  2115. package/src/samples/todo/features/filter/events.ts +0 -4
  2116. package/src/samples/todo/features/filter/feature.ts +0 -12
  2117. package/src/samples/todo/features/filter/model.test.ts +0 -18
  2118. package/src/samples/todo/features/filter/model.ts +0 -10
  2119. package/src/samples/todo/features/generate/elements/elements.browser.test.ts +0 -18
  2120. package/src/samples/todo/features/generate/elements/todo-generate.ts +0 -36
  2121. package/src/samples/todo/features/generate/events.ts +0 -4
  2122. package/src/samples/todo/features/generate/feature.ts +0 -11
  2123. package/src/samples/todo/features/generate/model.test.ts +0 -13
  2124. package/src/samples/todo/features/generate/model.ts +0 -19
  2125. package/src/samples/todo/features/index.ts +0 -4
  2126. package/src/samples/todo/features/todos/data.ts +0 -31
  2127. package/src/samples/todo/features/todos/dom.browser.test.ts +0 -205
  2128. package/src/samples/todo/features/todos/dom.ts +0 -90
  2129. package/src/samples/todo/features/todos/elements/elements.browser.test.ts +0 -211
  2130. package/src/samples/todo/features/todos/elements/todo-entry.ts +0 -45
  2131. package/src/samples/todo/features/todos/elements/todo-list.ts +0 -93
  2132. package/src/samples/todo/features/todos/elements/todo-row.ts +0 -138
  2133. package/src/samples/todo/features/todos/events.ts +0 -11
  2134. package/src/samples/todo/features/todos/feature.ts +0 -14
  2135. package/src/samples/todo/features/todos/model.test.ts +0 -77
  2136. package/src/samples/todo/features/todos/model.ts +0 -80
  2137. package/src/samples/todo/features/todos/todos.test-helper.ts +0 -34
  2138. package/src/samples/todo/imports.test.ts +0 -113
  2139. package/src/samples/todo/index.html +0 -51
  2140. package/src/samples/todo/shared/attach.browser.test.ts +0 -73
  2141. package/src/samples/todo/shared/attach.ts +0 -32
  2142. package/src/samples/todo/shared/connect.ts +0 -21
  2143. package/src/samples/todo/shared/elements/define.ts +0 -7
  2144. package/src/samples/todo/shared/elements/elements.test-helper.ts +0 -28
  2145. package/src/samples/todo/shared/feature.ts +0 -20
  2146. package/src/samples/todo/shared/ticks.test-helper.ts +0 -25
  2147. package/src/samples/transfers/build.test.ts +0 -22
  2148. package/src/samples/transfers/index.html +0 -18
  2149. package/src/samples/transfers/loader.ts +0 -42
  2150. package/src/samples/transfers/main.ts +0 -46
  2151. package/src/samples/transfers/sprites.ts +0 -96
  2152. package/src/samples/transfers/world.ts +0 -11
  2153. /package/dist/interface/{archetype → system}/values-of.js +0 -0
@@ -8,6 +8,7 @@ import { isBinary, isUnary, local, not, number } from './ir.js';
8
8
  import { memberKey } from './key.js';
9
9
  import { moduleValue } from './module-value.js';
10
10
  import { scalar } from './scalar.js';
11
+ import { presence } from './columns.js';
11
12
  import { findLocal } from './scope.js';
12
13
  import { fresh } from './unit.js';
13
14
  import { scalarValue } from './value.js';
@@ -61,6 +62,23 @@ const literal = (node) => {
61
62
  return scalarValue({ kind: "nullish", value: "null" });
62
63
  return fail(node, "only number, boolean and null literals are in the kernel subset");
63
64
  };
65
+ /**
66
+ * `value === undefined` and its variants, `== null` included, for an optional component's whole value: whether the
67
+ * call's archetype lacks it, or has it. Null for anything else.
68
+ */
69
+ const presenceTest = (operator, value, other, scope) => {
70
+ if (!["===", "!==", "==", "!="].includes(operator) || other.kind !== "scalar" || other.expression.kind !== "nullish")
71
+ return null;
72
+ if (other.expression.value === "null" && (operator === "===" || operator === "!=="))
73
+ return null;
74
+ const { unit } = scope;
75
+ const present = value.kind === "snapshot" && value.path.length === 0 ? value.snapshot.presence
76
+ : value.kind === "component" && value.up !== true && value.path.length === 0 && unit.signature.optional.has(value.component) ? presence(unit, value.component)
77
+ : null;
78
+ if (present === null)
79
+ return null;
80
+ return operator === "!==" || operator === "!=" ? present : not(present);
81
+ };
64
82
  /** Compiles an expression to a value, emitting any statements it needs into `out`. */
65
83
  export const expression = (node, scope, out) => {
66
84
  switch (node.type) {
@@ -96,8 +114,14 @@ export const expression = (node, scope, out) => {
96
114
  const operator = node.operator;
97
115
  if (!isBinary(operator) || node.left.type === "PrivateIdentifier")
98
116
  return fail(node, `${node.operator} is not in the kernel subset`);
99
- const left = scalar(expression(node.left, scope, out), node.left, scope);
100
- const right = scalar(expression(node.right, scope, out), node.right, scope);
117
+ const leftValue = expression(node.left, scope, out);
118
+ const rightValue = expression(node.right, scope, out);
119
+ // An optional component tested for undefined is its archetype's presence, the same for every row of a call.
120
+ const tested = presenceTest(operator, leftValue, rightValue, scope) ?? presenceTest(operator, rightValue, leftValue, scope);
121
+ if (tested !== null)
122
+ return scalarValue(tested);
123
+ const left = scalar(leftValue, node.left, scope);
124
+ const right = scalar(rightValue, node.right, scope);
101
125
  // Strict equality tells true from 1, so boolean reads are converted here.
102
126
  const strict = operator === "===" || operator === "!==";
103
127
  return scalarValue(strict
@@ -1 +1 @@
1
- {"version":3,"file":"expression.js","sourceRoot":"","sources":["../../../src/implementation/compiler/expression.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAA6C,MAAM,EAAa,MAAM,WAAW,CAAC;AACzF,OAAO,EAAE,IAAI,EAAE,MAAM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';
3
4
  export type Parse = (code: string) => Program;
4
5
  /** Code with its top-level symbols identified, and its map back to the code given. */
@@ -6,14 +7,20 @@ export type Identified = {
6
7
  readonly code: string;
7
8
  readonly map: SourceMap;
8
9
  };
9
- /** The name a directory's package.json gives: undefined without one, null for one without a name. */
10
- export type PackageNameOf = (directory: string) => string | null | undefined;
10
+ /** What a directory's package.json gives: undefined without one, null for one without a name. */
11
+ export type PackageOf = (directory: string) => {
12
+ readonly name: string;
13
+ readonly version?: string;
14
+ } | null | undefined;
11
15
  /**
12
- * A module's id: the name of the nearest package.json above it that has one and its path in that package, else for a
13
- * dependency its package name and subpath, else its path from `root`. Without a query and with forward slashes, so it's
14
- * the same on every machine and names no directory outside its package.
16
+ * A module's id: the name and version of the nearest package.json above it that has a name, and its path in that
17
+ * package, else for a dependency its package name and subpath; null outside both. Without a query and with forward
18
+ * slashes, so it's the same on every machine and names no directory outside its package. Copies of one package at
19
+ * different versions have different ids.
15
20
  */
16
- export declare const moduleIdOf: (file: string, root: string, packageNameOf: PackageNameOf) => string;
21
+ export declare const moduleIdOf: (file: string, packageOf: PackageOf) => string | null;
22
+ /** How messages name a module: its package's name and its path there, as its id has them, else the file's name. */
23
+ export declare const moduleLabelOf: (file: string, packageOf: PackageOf) => string;
17
24
  /** The package's namespaces whose constructors declare systems, rules, finalizers and indexes. */
18
25
  export type Namespace = "System" | "Rule" | "Finalizer" | "Index";
19
26
  /** Whether an import specifier, resolved from the module being transformed, is a module of the package exporting `namespace`. */
@@ -28,6 +35,9 @@ export type ResolveNamespace = (source: string, namespace: Namespace) => Promise
28
35
  *
29
36
  * The same bindings initialized by a constructor call of the package's `System`, `Rule`, `Finalizer` or `Index`, imported under
30
37
  * any local name, give the call's declaration their id, which the constructor takes from the map: a kernel's call as
31
- * the kernel transform wrapped it too. Returns null when nothing is identified.
38
+ * the kernel transform wrapped it too. Returns null when nothing is identified, and a failure when something is but the
39
+ * module has no id (`moduleIdOf`). `packages` tells the kernel transform's hook from other imports.
32
40
  */
33
- export declare const identify: (code: string, id: string, parse: Parse, resolve: ResolveNamespace) => Promise<Identified | null>;
41
+ export declare const identify: (code: string, id: string | null, parse: Parse, resolve: ResolveNamespace, packages: PackageCopies) => Promise<Identified | {
42
+ readonly failure: string;
43
+ } | null>;
@@ -1,30 +1,41 @@
1
- import { posix } from 'node:path';
2
- import { idsName } from '../../interface/registry/ids.js';
1
+ import { idsName, labelsName } from '../../interface/registry/ids.js';
3
2
  import { children, isFunction } from './estree.js';
4
3
  import { moduleScope } from './module-scope.js';
5
- import { attachKernelPath } from './paths.js';
4
+ import * as posix from './posix.js';
6
5
  import { insertInto } from './source-map.js';
7
6
  /** A dependency's path inside the last `node_modules`: its package name and subpath. */
8
7
  const dependency = /\/node_modules\/(?!.*\/node_modules\/)(.+)$/;
9
- /**
10
- * A module's id: the name of the nearest package.json above it that has one and its path in that package, else for a
11
- * dependency its package name and subpath, else its path from `root`. Without a query and with forward slashes, so it's
12
- * the same on every machine and names no directory outside its package.
13
- */
14
- export const moduleIdOf = (file, root, packageNameOf) => {
15
- const path = (file.split("?")[0] ?? file).replace(/\\/g, "/");
8
+ /** A module's file without a query, with forward slashes. */
9
+ const pathOf = (file) => (file.split("?")[0] ?? file).replace(/\\/g, "/");
10
+ /** The nearest package.json above a module that has a name, with the module's path in it. */
11
+ const packageAbove = (file, packageOf) => {
12
+ const path = pathOf(file);
16
13
  for (let directory = posix.dirname(path);; directory = posix.dirname(directory)) {
17
- const name = packageNameOf(directory);
18
- if (typeof name === "string")
19
- return `${name}/${posix.relative(directory, path)}`;
20
- if (posix.dirname(directory) === directory)
21
- break;
14
+ const found = packageOf(directory);
15
+ if (found !== null && found !== undefined)
16
+ return { ...found, path: posix.relative(directory, path) };
17
+ // A filesystem's root, `/` or a drive's `C:`, whose parent posix paths give as itself or as `.`.
18
+ const parent = posix.dirname(directory);
19
+ if (parent === directory || parent === ".")
20
+ return null;
22
21
  }
23
- const found = dependency.exec(path)?.[1];
24
- if (found !== undefined)
25
- return found;
26
- const relative = posix.relative(root.replace(/\\/g, "/"), path);
27
- return posix.isAbsolute(relative) ? posix.basename(path) : relative;
22
+ };
23
+ /**
24
+ * A module's id: the name and version of the nearest package.json above it that has a name, and its path in that
25
+ * package, else for a dependency its package name and subpath; null outside both. Without a query and with forward
26
+ * slashes, so it's the same on every machine and names no directory outside its package. Copies of one package at
27
+ * different versions have different ids.
28
+ */
29
+ export const moduleIdOf = (file, packageOf) => {
30
+ const found = packageAbove(file, packageOf);
31
+ if (found !== null)
32
+ return `${found.name}${found.version === undefined ? "" : `@${found.version}`}/${found.path}`;
33
+ return dependency.exec(pathOf(file))?.[1] ?? null;
34
+ };
35
+ /** How messages name a module: its package's name and its path there, as its id has them, else the file's name. */
36
+ export const moduleLabelOf = (file, packageOf) => {
37
+ const found = packageAbove(file, packageOf);
38
+ return found !== null ? `${found.name}/${found.path}` : dependency.exec(pathOf(file))?.[1] ?? posix.basename(pathOf(file));
28
39
  };
29
40
  /** Whether a binding named `name` is declared in the module's scope: at top level, or as a `var` in any of its blocks. */
30
41
  const declaresInModule = (program, name) => {
@@ -49,7 +60,7 @@ const constructors = {
49
60
  };
50
61
  const isNamespace = (name) => name === "System" || name === "Rule" || name === "Finalizer" || name === "Index";
51
62
  /** The module's local names of the package's namespaces, and of the kernel transform's `attachKernel`. */
52
- const localsOf = async (program, resolve) => {
63
+ const localsOf = async (program, resolve, packages) => {
53
64
  const namespaces = new Map();
54
65
  const attach = new Set();
55
66
  for (const statement of program.body) {
@@ -59,7 +70,7 @@ const localsOf = async (program, resolve) => {
59
70
  if (specifier.type !== "ImportSpecifier" || specifier.imported.type !== "Identifier")
60
71
  continue;
61
72
  const imported = specifier.imported.name;
62
- if (statement.source.value === attachKernelPath && imported === "attachKernel")
73
+ if (imported === "attachKernel" && packages.isAttachKernelModule(statement.source.value))
63
74
  attach.add(specifier.local.name);
64
75
  else if (isNamespace(imported) && await resolve(statement.source.value, imported))
65
76
  namespaces.set(specifier.local.name, imported);
@@ -105,15 +116,16 @@ const mayDeclare = /\.(create|render|changes)\(/;
105
116
  *
106
117
  * The same bindings initialized by a constructor call of the package's `System`, `Rule`, `Finalizer` or `Index`, imported under
107
118
  * any local name, give the call's declaration their id, which the constructor takes from the map: a kernel's call as
108
- * the kernel transform wrapped it too. Returns null when nothing is identified.
119
+ * the kernel transform wrapped it too. Returns null when nothing is identified, and a failure when something is but the
120
+ * module has no id (`moduleIdOf`). `packages` tells the kernel transform's hook from other imports.
109
121
  */
110
- export const identify = async (code, id, parse, resolve) => {
122
+ export const identify = async (code, id, parse, resolve, packages) => {
111
123
  const symbols = code.includes("Symbol(");
112
124
  const items = mayDeclare.test(code);
113
125
  if (!symbols && !items)
114
126
  return null;
115
127
  const program = parse(code);
116
- const { namespaces, attach } = items ? await localsOf(program, resolve) : { namespaces: new Map(), attach: new Set() };
128
+ const { namespaces, attach } = items ? await localsOf(program, resolve, packages) : { namespaces: new Map(), attach: new Set() };
117
129
  const found = [];
118
130
  const consider = (init, binding) => {
119
131
  if (isSymbolCall(init))
@@ -135,15 +147,61 @@ export const identify = async (code, id, parse, resolve) => {
135
147
  consider(statement.declaration, "default");
136
148
  }
137
149
  }
138
- if (found.length === 0 || declaresInModule(program, "Symbol") || declaresInModule(program, "globalThis"))
150
+ const labeled = namespaces.size > 0 ? labelsOf(program, namespaces, attach, new Set(found.map(({ value }) => value))) : [];
151
+ if ((found.length === 0 && labeled.length === 0) || declaresInModule(program, "Symbol") || declaresInModule(program, "globalThis"))
139
152
  return null;
140
- const identifier = uniqueName(code, "identify$");
141
153
  const insertions = [];
142
- for (const { value, binding } of found) {
143
- insertions.push({ at: value.start, text: `${identifier}(` }, { at: value.end, text: `, ${JSON.stringify(`${id}#${binding}`)})` });
154
+ if (found.length > 0) {
155
+ if (id === null)
156
+ return { failure: "this module's keys and systems need ids, which name its package, but no package.json above it gives a name: give its package one" };
157
+ const identifier = uniqueName(code, "identify$");
158
+ for (const { value, binding } of found) {
159
+ insertions.push({ at: value.start, text: `${identifier}(` }, { at: value.end, text: `, ${JSON.stringify(`${id}#${binding}`)})` });
160
+ }
161
+ const ids = JSON.stringify(idsName);
162
+ insertions.push({ at: code.length, text: `\nfunction ${identifier}(value, id) { const ids = Symbol.for(${ids}); (globalThis[ids] || (globalThis[ids] = new Map())).set(value, id); return value; }\n` });
144
163
  }
145
- const ids = JSON.stringify(idsName);
146
- insertions.push({ at: code.length, text: `\nfunction ${identifier}(value, id) { const ids = Symbol.for(${ids}); (globalThis[ids] || (globalThis[ids] = new Map())).set(value, id); return value; }\n` });
147
- return insertInto(code, insertions, id);
164
+ if (labeled.length > 0) {
165
+ const identifier = uniqueName(code, "label$");
166
+ for (const { value, label } of labeled)
167
+ insertions.push({ at: value.start, text: `${identifier}(` }, { at: value.end, text: `, ${JSON.stringify(label)})` });
168
+ const labels = JSON.stringify(labelsName);
169
+ // A label already given, as an internal factory gives its own, stands.
170
+ insertions.push({ at: code.length, text: `\nfunction ${identifier}(value, label) { const labels = Symbol.for(${labels}); const map = globalThis[labels] || (globalThis[labels] = new WeakMap()); if (!map.has(value)) map.set(value, label); return value; }\n` });
171
+ }
172
+ return insertInto(code, insertions, id ?? "");
173
+ };
174
+ /** The name a node gives what's declared in it: a variable's, a function's, a property's or a method's. */
175
+ const nameIn = (node) => {
176
+ switch (node.type) {
177
+ case "VariableDeclarator": return node.id.type === "Identifier" ? node.id.name : null;
178
+ case "FunctionDeclaration":
179
+ case "FunctionExpression": return node.id?.name ?? null;
180
+ case "Property":
181
+ case "MethodDefinition":
182
+ case "PropertyDefinition": return !node.computed && node.key.type === "Identifier" ? node.key.name : null;
183
+ case "AssignmentExpression": return node.left.type === "Identifier" ? node.left.name : null;
184
+ default: return null;
185
+ }
186
+ };
187
+ /**
188
+ * The declarations of constructor calls that `identified` leaves out, each with a label: the name of the nearest
189
+ * variable, function, property or method it's made in, as `mover` for one made in `const mover = (speed) => ...`.
190
+ */
191
+ const labelsOf = (program, namespaces, attach, identified) => {
192
+ const labeled = [];
193
+ const visit = (node, names) => {
194
+ const declaration = declarationOf(node, namespaces, attach);
195
+ const label = names.at(-1);
196
+ // Calls in its arguments are labeled too, by the names nearest them.
197
+ if (declaration !== undefined && !identified.has(declaration) && label !== undefined)
198
+ labeled.push({ value: declaration, label });
199
+ const name = nameIn(node);
200
+ const inner = name === null ? names : [...names, name];
201
+ for (const child of children(node))
202
+ visit(child, inner);
203
+ };
204
+ visit(program, []);
205
+ return labeled;
148
206
  };
149
207
  //# sourceMappingURL=identify.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"identify.js","sourceRoot":"","sources":["../../../src/implementation/compiler/identify.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAkC,MAAM,iBAAiB,CAAC;AAO7E,wFAAwF;AACxF,MAAM,UAAU,GAAG,6CAA6C,CAAC;AAKjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,IAAY,EAAE,aAA4B,EAAU,EAAE;IAC3F,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC9D,KAAK,IAAI,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAI,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QAC/E,MAAM,IAAI,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;QACtC,IAAI,OAAO,IAA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AAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC;QAClI,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;QAC1B,MAAM,KAAK,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC;QACvD,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,IAAI,CAAC;YAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAC5D,CAAC,CAAC;IACF,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACnB,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC"}
@@ -1 +1,5 @@
1
- export * from './plugin.js';
1
+ /**
2
+ * The build plugin, which every application and library using the ECS builds with.
3
+ * @module @adobe/ecs/compiler
4
+ */
5
+ export { Compiler } from './compiler.js';
@@ -1,2 +1,7 @@
1
- export * from './plugin.js';
1
+ // © 2026 Adobe. MIT License. See /LICENSE for details.
2
+ /**
3
+ * The build plugin, which every application and library using the ECS builds with.
4
+ * @module @adobe/ecs/compiler
5
+ */
6
+ export { Compiler } from './compiler.js';
2
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/implementation/compiler/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/implementation/compiler/index.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD;;;GAGG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,32 @@
1
+ import type { ObjectExpression } from 'estree';
2
+ import type { Used } from './body-access.js';
3
+ /**
4
+ * Whether the build saw every use the body makes of its row, resources and parent, and of its lookups through an
5
+ * index: a kernel compiles from them. A lookup by entity whose rows it didn't follow reads all of its `with`.
6
+ */
7
+ export declare const followsAll: (used: Used, declaration: ObjectExpression) => boolean;
8
+ /**
9
+ * What a body uses, its row's and each lookup's keys in the order their `with` lists them, so the lists the world
10
+ * takes follow the declaration as written.
11
+ */
12
+ export declare const inOrder: (used: Used, declaration: ObjectExpression) => Used;
13
+ /**
14
+ * The first key a body uses of its row, or of a lookup's rows by entity, that its declaration doesn't require, and
15
+ * where it's required: types reject it too, but a body the build reads may have none. Null when every one is
16
+ * required, or a list isn't an array literal the build can read.
17
+ */
18
+ export declare const unrequired: (used: Used, declaration: ObjectExpression) => {
19
+ readonly key: string;
20
+ readonly list: string;
21
+ } | null;
22
+ /**
23
+ * The source of what the build inferred a body uses, `Access` in `interface/system/resolve.ts`: its keys as the
24
+ * module-scope bindings the body indexes by, null for a group it couldn't follow, and `at` where the body is.
25
+ */
26
+ export declare const accessText: (used: Used, at: string, where?: ReadonlySet<string> | null) => string;
27
+ /**
28
+ * A kernel's declaration as the compiler reads it, from the declaration written and what the build inferred its body
29
+ * uses: `components` with `read` and `write` from the body beside its `with`, `resources` with `read` and `reduce`,
30
+ * each lookup with `read`, and `up` with `read`. `used` follows every use (`followsAll`).
31
+ */
32
+ export declare const resolvedDeclaration: (declaration: ObjectExpression, used: Used) => ObjectExpression;
@@ -0,0 +1,185 @@
1
+ /** An object literal's plain-named properties; none for anything else. */
2
+ const fields = (node) => new Map(node?.type !== "ObjectExpression" ? [] :
3
+ node.properties.flatMap((property) => property.type === "Property" && !property.computed && property.key.type === "Identifier" ? [[property.key.name, property]] : []));
4
+ /**
5
+ * Whether the build saw every use the body makes of its row, resources and parent, and of its lookups through an
6
+ * index: a kernel compiles from them. A lookup by entity whose rows it didn't follow reads all of its `with`.
7
+ */
8
+ export const followsAll = (used, declaration) => {
9
+ if (used.query === null || used.resources === null || used.up === null)
10
+ return false;
11
+ const lookups = fields(valueOf(fields(declaration).get("lookup")));
12
+ if (used.lookups === null)
13
+ return lookups.size === 0;
14
+ return [...used.lookups].every(([name, read]) => read !== null || !fields(valueOf(lookups.get(name))).has("index"));
15
+ };
16
+ /** `names` in the order `first` lists them, then the rest in the order the body first used them. */
17
+ const ordered = (names, first) => new Set([...first.filter(name => names.has(name)), ...names]);
18
+ /**
19
+ * What a body uses, its row's and each lookup's keys in the order their `with` lists them, so the lists the world
20
+ * takes follow the declaration as written.
21
+ */
22
+ export const inOrder = (used, declaration) => {
23
+ const declared = fields(declaration);
24
+ const components = fields(valueOf(declared.get("components")));
25
+ const members = [...namesIn(valueOf(components.get("with"))), ...namesIn(valueOf(components.get("optional")))];
26
+ const lookups = fields(valueOf(declared.get("lookup")));
27
+ return {
28
+ ...used,
29
+ query: used.query === null ? null : { read: ordered(used.query.read, members), write: ordered(used.query.write, members), mutate: ordered(used.query.mutate, members) },
30
+ lookups: used.lookups === null ? null : new Map([...used.lookups].map(([name, read]) => [name, read === null ? null : ordered(read, namesIn(valueOf(fields(valueOf(lookups.get(name))).get("with"))))])),
31
+ };
32
+ };
33
+ /**
34
+ * The first key a body uses of its row, or of a lookup's rows by entity, that its declaration doesn't require, and
35
+ * where it's required: types reject it too, but a body the build reads may have none. Null when every one is
36
+ * required, or a list isn't an array literal the build can read.
37
+ */
38
+ export const unrequired = (used, declaration) => {
39
+ const declared = fields(declaration);
40
+ const components = fields(valueOf(declared.get("components")));
41
+ const literal = (names) => {
42
+ const lists = names.filter(node => node !== undefined);
43
+ return lists.every(node => node.type === "ArrayExpression" && node.elements.every(element => element?.type === "Identifier" || element?.type === "MemberExpression"))
44
+ ? lists.flatMap(node => namesIn(node)) : null;
45
+ };
46
+ const members = literal(["with", "optional", "added", "changed"].map(name => valueOf(components.get(name))));
47
+ if (used.query !== null && members !== null) {
48
+ const key = [...used.query.read, ...used.query.write].find(name => !members.includes(name));
49
+ if (key !== undefined)
50
+ return { key, list: "components with or optional" };
51
+ }
52
+ if (used.lookups !== null) {
53
+ for (const [name, lookup] of fields(valueOf(declared.get("lookup")))) {
54
+ const parts = fields(valueOf(lookup));
55
+ const read = used.lookups.get(name);
56
+ if (parts.has("index") || read === null || read === undefined)
57
+ continue;
58
+ const required = literal([valueOf(parts.get("with")), valueOf(parts.get("optional")), valueOf(parts.get("changed"))]);
59
+ const key = required === null ? undefined : [...read].find(key => !required.includes(key));
60
+ if (key !== undefined)
61
+ return { key, list: `lookup.${name}.with or optional` };
62
+ }
63
+ }
64
+ return null;
65
+ };
66
+ const list = (names) => `[${[...names].join(", ")}]`;
67
+ /**
68
+ * The source of what the build inferred a body uses, `Access` in `interface/system/resolve.ts`: its keys as the
69
+ * module-scope bindings the body indexes by, null for a group it couldn't follow, and `at` where the body is.
70
+ */
71
+ export const accessText = (used, at, where) => {
72
+ const { query, resources, lookups, up } = used;
73
+ // Keys changed inside their values are listed only when there are some, for registration to judge by kind.
74
+ const mutate = (keys) => keys.size === 0 ? "" : `, mutate: ${list(keys)}`;
75
+ const components = query === null ? "null" : `{ read: ${list([...query.read].filter(key => !query.write.has(key)))}, write: ${list(query.write)}${mutate(query.mutate)} }`;
76
+ const resourceText = resources === null ? "null" : `{ read: ${list(resources.read)}, write: ${list(resources.write)}, reduce: ${list(resources.reduce)}${mutate(resources.mutate)} }`;
77
+ const lookupText = lookups === null ? "null" : `{ ${[...lookups].map(([name, read]) => `${JSON.stringify(name)}: ${read === null ? "null" : list(read)}`).join(", ")} }`;
78
+ // The resources `where`'s predicates read, only with predicates.
79
+ const whereText = where === undefined ? "" : `, where: ${where === null ? "null" : list(where)}`;
80
+ return `{ components: ${components}, resources: ${resourceText}, lookup: ${lookupText}, up: ${up === null ? "null" : list(up)}${whereText}, at: ${JSON.stringify(at)} }`;
81
+ };
82
+ /** A declaration's parts the build makes, located at `at`, so a failure in them points at the declaration. */
83
+ const made = (at) => {
84
+ const identifier = (name) => ({ type: "Identifier", name, start: at.start, end: at.end });
85
+ /** A key as the body named it: a binding, or a namespace's member. */
86
+ const key = (name) => {
87
+ const [object, member] = name.split(".");
88
+ return member === undefined || object === undefined ? identifier(name) : {
89
+ type: "MemberExpression", object: identifier(object), property: identifier(member), computed: false, optional: false, start: at.start, end: at.end,
90
+ };
91
+ };
92
+ const array = (names) => ({ type: "ArrayExpression", elements: [...names].map(key), start: at.start, end: at.end });
93
+ const property = (name, value) => ({
94
+ type: "Property", key: identifier(name), value, kind: "init", computed: false, method: false, shorthand: false, start: at.start, end: at.end,
95
+ });
96
+ const object = (properties) => ({ type: "ObjectExpression", properties: [...properties], start: at.start, end: at.end });
97
+ return { identifier, array, property, object };
98
+ };
99
+ /** `node`'s value when it's a property whose value is an expression. */
100
+ const valueOf = (property) => property !== undefined && property.value.type !== "ObjectPattern" && property.value.type !== "ArrayPattern" && property.value.type !== "RestElement" && property.value.type !== "AssignmentPattern"
101
+ ? property.value : undefined;
102
+ /** The names an array literal of keys lists: bindings, or namespaces' members (`Shapes.circle`). */
103
+ const namesIn = (node) => node?.type !== "ArrayExpression" ? [] :
104
+ node.elements.flatMap(element => element?.type === "Identifier" ? [element.name]
105
+ : element?.type === "MemberExpression" && !element.computed && element.object.type === "Identifier" && element.property.type === "Identifier" ? [`${element.object.name}.${element.property.name}`]
106
+ : []);
107
+ /**
108
+ * A kernel's declaration as the compiler reads it, from the declaration written and what the build inferred its body
109
+ * uses: `components` with `read` and `write` from the body beside its `with`, `resources` with `read` and `reduce`,
110
+ * each lookup with `read`, and `up` with `read`. `used` follows every use (`followsAll`).
111
+ */
112
+ export const resolvedDeclaration = (declaration, used) => {
113
+ const { array, property, object } = made(declaration);
114
+ const keep = (from, names) => names.flatMap(name => from.get(name) ?? []);
115
+ const properties = [];
116
+ let resourcesDeclared = false;
117
+ for (const original of declaration.properties) {
118
+ if (original.type !== "Property" || original.computed || original.key.type !== "Identifier") {
119
+ properties.push(...original.type === "Property" ? [original] : []);
120
+ continue;
121
+ }
122
+ const value = valueOf(original);
123
+ const parts = fields(value);
124
+ switch (original.key.name) {
125
+ case "components": {
126
+ if (value?.type !== "ObjectExpression" || used.query === null)
127
+ break;
128
+ const { read, write, mutate } = used.query;
129
+ // A change inside a value is a write to the compiler, which rejects it for values written whole.
130
+ const written = new Set([...write, ...mutate]);
131
+ properties.push(property("components", object([
132
+ property("read", array([...read].filter(key => !written.has(key)))),
133
+ property("write", array(written)),
134
+ ...keep(parts, ["with", "optional", "not", "added", "changed"]),
135
+ ])));
136
+ continue;
137
+ }
138
+ case "resources": {
139
+ if (value?.type !== "ObjectExpression" || used.resources === null)
140
+ break;
141
+ resourcesDeclared = true;
142
+ properties.push(property("resources", resourcesOf(used.resources, keep(parts, ["is", "not", "changed"]), namesIn(valueOf(parts.get("is"))), array, property, object)));
143
+ continue;
144
+ }
145
+ case "lookup": {
146
+ if (value?.type !== "ObjectExpression" || used.lookups === null)
147
+ break;
148
+ properties.push(property("lookup", object([...parts].map(([name, lookup]) => {
149
+ const lookupParts = fields(valueOf(lookup));
150
+ // A lookup the body never uses reads nothing; null, one whose rows it didn't follow.
151
+ const found = used.lookups?.get(name);
152
+ const reads = found === undefined ? [] : found;
153
+ if (lookupParts.has("index")) {
154
+ // Rows the build didn't follow read everything the index holds, as the world resolves it.
155
+ const read = reads === null ? [] : [property("read", array(reads))];
156
+ return property(name, object([...read, ...keep(lookupParts, ["index", "changed"])]));
157
+ }
158
+ const withList = valueOf(lookupParts.get("with"));
159
+ // Rows the build didn't follow read everything the lookup requires.
160
+ const read = reads === null ? withList ?? array([]) : array(reads);
161
+ return property(name, object([property("read", read), ...keep(lookupParts, ["with", "optional", "not", "changed"])]));
162
+ }))));
163
+ continue;
164
+ }
165
+ case "up": {
166
+ if (value?.type !== "ObjectExpression" || used.up === null)
167
+ break;
168
+ properties.push(property("up", object([...keep(parts, ["through"]), property("read", array(used.up))])));
169
+ continue;
170
+ }
171
+ }
172
+ properties.push(original);
173
+ }
174
+ if (!resourcesDeclared && used.resources !== null)
175
+ properties.push(property("resources", resourcesOf(used.resources, [], [], array, property, object)));
176
+ return object(properties);
177
+ };
178
+ /** A kernel's `resources`: what its body reads, but conditions it reads already, and reduces into; a write is refused by the compiler. */
179
+ const resourcesOf = (resources, declared, is, array, property, object) => object([
180
+ property("read", array([...resources.read].filter(key => !resources.write.has(key) && !is.includes(key)))),
181
+ ...resources.write.size === 0 ? [] : [property("write", array(resources.write))],
182
+ ...resources.reduce.size === 0 ? [] : [property("reduce", array(resources.reduce))],
183
+ ...declared,
184
+ ]);
185
+ //# sourceMappingURL=inferred.js.map