@oasys/oecs 0.4.0 → 0.5.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 (272) hide show
  1. package/CHANGELOG.md +553 -0
  2. package/README.md +42 -31
  3. package/dist/core/ecs/access_check.d.cts +77 -0
  4. package/dist/core/ecs/access_check.d.ts +8 -8
  5. package/dist/core/ecs/access_check.d.ts.map +1 -1
  6. package/dist/core/ecs/archetype.d.cts +486 -0
  7. package/dist/core/ecs/archetype.d.ts +23 -11
  8. package/dist/core/ecs/archetype.d.ts.map +1 -1
  9. package/dist/core/ecs/archetype_graph.d.cts +96 -0
  10. package/dist/core/ecs/archetype_graph.d.ts +96 -0
  11. package/dist/core/ecs/archetype_graph.d.ts.map +1 -0
  12. package/dist/core/ecs/builtin_relations.d.cts +43 -0
  13. package/dist/core/ecs/builtin_relations.d.ts +8 -8
  14. package/dist/core/ecs/builtin_relations.d.ts.map +1 -1
  15. package/dist/core/ecs/command_log.d.cts +116 -0
  16. package/dist/core/ecs/command_log.d.ts +13 -10
  17. package/dist/core/ecs/command_log.d.ts.map +1 -1
  18. package/dist/core/ecs/component.d.cts +176 -0
  19. package/dist/core/ecs/component.d.ts +75 -5
  20. package/dist/core/ecs/component.d.ts.map +1 -1
  21. package/dist/core/ecs/compute_backend.d.cts +37 -0
  22. package/dist/core/ecs/compute_backend.d.ts +2 -2
  23. package/dist/core/ecs/debug_names.d.cts +7 -0
  24. package/dist/core/ecs/debug_names.d.ts +7 -0
  25. package/dist/core/ecs/debug_names.d.ts.map +1 -0
  26. package/dist/core/ecs/deferred_commands.d.cts +55 -0
  27. package/dist/core/ecs/deferred_commands.d.ts +55 -0
  28. package/dist/core/ecs/deferred_commands.d.ts.map +1 -0
  29. package/dist/core/ecs/dispatch_trace.d.cts +93 -0
  30. package/dist/core/ecs/dispatch_trace.d.ts +3 -3
  31. package/dist/core/ecs/ecs.d.cts +562 -0
  32. package/dist/core/ecs/ecs.d.ts +314 -285
  33. package/dist/core/ecs/ecs.d.ts.map +1 -1
  34. package/dist/core/ecs/ecs_memory.d.cts +179 -0
  35. package/dist/core/ecs/ecs_memory.d.ts +1 -1
  36. package/dist/core/ecs/entity.d.cts +34 -0
  37. package/dist/core/ecs/entity.d.ts +7 -1
  38. package/dist/core/ecs/entity.d.ts.map +1 -1
  39. package/dist/core/ecs/entity_allocator.d.cts +59 -0
  40. package/dist/core/ecs/entity_allocator.d.ts +59 -0
  41. package/dist/core/ecs/entity_allocator.d.ts.map +1 -0
  42. package/dist/core/ecs/event.d.cts +79 -0
  43. package/dist/core/ecs/event.d.ts +36 -11
  44. package/dist/core/ecs/event.d.ts.map +1 -1
  45. package/dist/core/ecs/event_registry.d.cts +22 -0
  46. package/dist/core/ecs/event_registry.d.ts +22 -0
  47. package/dist/core/ecs/event_registry.d.ts.map +1 -0
  48. package/dist/core/ecs/facades.d.cts +158 -0
  49. package/dist/core/ecs/facades.d.ts +158 -0
  50. package/dist/core/ecs/facades.d.ts.map +1 -0
  51. package/dist/core/ecs/frame_stepper.d.cts +58 -0
  52. package/dist/core/ecs/frame_stepper.d.ts +58 -0
  53. package/dist/core/ecs/frame_stepper.d.ts.map +1 -0
  54. package/dist/core/ecs/frame_trace.d.cts +133 -0
  55. package/dist/core/ecs/frame_trace.d.ts +5 -5
  56. package/dist/core/ecs/frame_trace.d.ts.map +1 -1
  57. package/dist/core/ecs/host_commands.d.cts +274 -0
  58. package/dist/core/ecs/host_commands.d.ts +53 -31
  59. package/dist/core/ecs/host_commands.d.ts.map +1 -1
  60. package/dist/core/ecs/index.d.cts +46 -0
  61. package/dist/core/ecs/index.d.ts +45 -40
  62. package/dist/core/ecs/index.d.ts.map +1 -1
  63. package/dist/core/ecs/observer.d.cts +173 -0
  64. package/dist/core/ecs/observer.d.ts +43 -12
  65. package/dist/core/ecs/observer.d.ts.map +1 -1
  66. package/dist/core/ecs/query.d.cts +718 -0
  67. package/dist/core/ecs/query.d.ts +251 -90
  68. package/dist/core/ecs/query.d.ts.map +1 -1
  69. package/dist/core/ecs/ref.d.cts +31 -0
  70. package/dist/core/ecs/ref.d.ts +3 -3
  71. package/dist/core/ecs/relation.d.cts +243 -0
  72. package/dist/core/ecs/relation.d.ts +26 -14
  73. package/dist/core/ecs/relation.d.ts.map +1 -1
  74. package/dist/core/ecs/relation_service.d.cts +235 -0
  75. package/dist/core/ecs/relation_service.d.ts +235 -0
  76. package/dist/core/ecs/relation_service.d.ts.map +1 -0
  77. package/dist/core/ecs/resource.d.cts +53 -0
  78. package/dist/core/ecs/resource.d.ts +25 -5
  79. package/dist/core/ecs/resource.d.ts.map +1 -1
  80. package/dist/core/ecs/resource_registry.d.cts +20 -0
  81. package/dist/core/ecs/resource_registry.d.ts +20 -0
  82. package/dist/core/ecs/resource_registry.d.ts.map +1 -0
  83. package/dist/core/ecs/resume.d.cts +85 -0
  84. package/dist/core/ecs/resume.d.ts +6 -6
  85. package/dist/core/ecs/resume.d.ts.map +1 -1
  86. package/dist/core/ecs/run_condition.d.cts +81 -0
  87. package/dist/core/ecs/run_condition.d.ts +15 -9
  88. package/dist/core/ecs/run_condition.d.ts.map +1 -1
  89. package/dist/core/ecs/schedule.d.cts +142 -0
  90. package/dist/core/ecs/schedule.d.ts +15 -6
  91. package/dist/core/ecs/schedule.d.ts.map +1 -1
  92. package/dist/core/ecs/snapshot_service.d.cts +94 -0
  93. package/dist/core/ecs/snapshot_service.d.ts +94 -0
  94. package/dist/core/ecs/snapshot_service.d.ts.map +1 -0
  95. package/dist/core/ecs/sparse_store.d.cts +110 -0
  96. package/dist/core/ecs/sparse_store.d.ts +5 -2
  97. package/dist/core/ecs/sparse_store.d.ts.map +1 -1
  98. package/dist/core/ecs/store.d.cts +950 -0
  99. package/dist/core/ecs/store.d.ts +143 -342
  100. package/dist/core/ecs/store.d.ts.map +1 -1
  101. package/dist/core/ecs/store_layout_listener.d.cts +23 -0
  102. package/dist/core/ecs/system.d.cts +250 -0
  103. package/dist/core/ecs/system.d.ts +138 -22
  104. package/dist/core/ecs/system.d.ts.map +1 -1
  105. package/dist/{utils/arrays.d.ts → core/ecs/utils/arrays.d.cts} +1 -0
  106. package/dist/core/ecs/utils/error.d.cts +61 -0
  107. package/dist/core/ecs/utils/error.d.ts +12 -2
  108. package/dist/core/ecs/utils/error.d.ts.map +1 -1
  109. package/dist/core/store/action_ring.d.cts +136 -0
  110. package/dist/core/store/allocator.d.cts +238 -0
  111. package/dist/core/store/allocator.d.ts.map +1 -1
  112. package/dist/core/store/buffer_backed_column.d.cts +69 -0
  113. package/dist/core/store/buffer_backed_column.d.ts +2 -2
  114. package/dist/core/store/column_store.d.cts +273 -0
  115. package/dist/core/store/column_store.d.ts +18 -10
  116. package/dist/core/store/column_store.d.ts.map +1 -1
  117. package/dist/core/store/command_dispatch.d.cts +52 -0
  118. package/dist/core/store/command_ring.d.cts +107 -0
  119. package/dist/core/store/descriptor.d.cts +80 -0
  120. package/dist/core/store/descriptor.d.ts +1 -1
  121. package/dist/core/store/descriptor.d.ts.map +1 -1
  122. package/dist/core/store/entity_index.d.cts +108 -0
  123. package/dist/core/store/event_ring.d.cts +95 -0
  124. package/dist/core/store/extend.d.cts +39 -0
  125. package/dist/core/store/extend.d.ts +3 -73
  126. package/dist/core/store/extend.d.ts.map +1 -1
  127. package/dist/core/store/grow.d.cts +34 -0
  128. package/dist/core/store/grow.d.ts +4 -9
  129. package/dist/core/store/grow.d.ts.map +1 -1
  130. package/dist/core/store/header.d.cts +64 -0
  131. package/dist/core/store/header.d.ts +1 -1
  132. package/dist/core/store/header.d.ts.map +1 -1
  133. package/dist/core/store/index.d.cts +17 -0
  134. package/dist/core/store/index.d.ts +16 -15
  135. package/dist/core/store/index.d.ts.map +1 -1
  136. package/dist/core/store/layout_ops.d.cts +152 -0
  137. package/dist/core/store/layout_ops.d.ts +152 -0
  138. package/dist/core/store/layout_ops.d.ts.map +1 -0
  139. package/dist/core/store/region_table.d.cts +74 -0
  140. package/dist/core/store/region_table.d.ts +1 -1
  141. package/dist/core/store/region_table.d.ts.map +1 -1
  142. package/dist/core/store/snapshot.d.cts +43 -0
  143. package/dist/core/store/snapshot.d.ts +2 -2
  144. package/dist/core/store/state_hash.d.cts +38 -0
  145. package/dist/core/store/state_hash.d.ts +1 -1
  146. package/dist/core/store/store_regions.d.cts +38 -0
  147. package/dist/core/store/store_regions.d.ts +1 -1
  148. package/dist/core/store/vendored_abi/abi.d.ts +43 -0
  149. package/dist/core/store/{__generated__ → vendored_abi}/abi.d.ts.map +1 -1
  150. package/dist/dev_flag.d.cts +17 -0
  151. package/dist/dev_flag.d.ts +17 -0
  152. package/dist/dev_flag.d.ts.map +1 -0
  153. package/dist/extensions/editor/editor.d.cts +170 -0
  154. package/dist/extensions/editor/editor.d.ts +43 -22
  155. package/dist/extensions/editor/editor.d.ts.map +1 -1
  156. package/dist/extensions/editor/field_handle.d.cts +40 -0
  157. package/dist/extensions/editor/field_handle.d.ts +8 -3
  158. package/dist/extensions/editor/field_handle.d.ts.map +1 -1
  159. package/dist/extensions/editor/index.cjs +1 -1
  160. package/dist/extensions/editor/index.d.cts +21 -0
  161. package/dist/extensions/editor/index.d.ts +2 -2
  162. package/dist/extensions/editor/index.js +116 -88
  163. package/dist/extensions/reactive/ecs_sync.d.cts +214 -0
  164. package/dist/extensions/reactive/ecs_sync.d.ts +26 -22
  165. package/dist/extensions/reactive/ecs_sync.d.ts.map +1 -1
  166. package/dist/extensions/reactive/index.cjs +1 -1
  167. package/dist/extensions/reactive/index.d.cts +23 -0
  168. package/dist/extensions/reactive/index.d.ts +1 -1
  169. package/dist/extensions/reactive/index.js +106 -116
  170. package/dist/extensions/solid/index.cjs +1 -1
  171. package/dist/extensions/solid/index.d.cts +6 -0
  172. package/dist/extensions/solid/index.d.ts +2 -2
  173. package/dist/extensions/solid/index.js +8 -4
  174. package/dist/extensions/solid/kernel_solid.d.cts +45 -0
  175. package/dist/extensions/solid/kernel_solid.d.ts +6 -3
  176. package/dist/extensions/solid/kernel_solid.d.ts.map +1 -1
  177. package/dist/host_commands-BF8QMi3c.cjs +1 -0
  178. package/dist/host_commands-i4cAeyL5.js +2318 -0
  179. package/dist/index.cjs +1 -2
  180. package/dist/index.d.cts +66 -0
  181. package/dist/index.d.ts +50 -1
  182. package/dist/index.d.ts.map +1 -1
  183. package/dist/index.js +4469 -5933
  184. package/dist/internal.cjs +2 -0
  185. package/dist/internal.d.cts +20 -0
  186. package/dist/internal.d.ts +20 -0
  187. package/dist/internal.d.ts.map +1 -0
  188. package/dist/internal.js +141 -0
  189. package/dist/primitives.cjs +1 -1
  190. package/dist/primitives.d.cts +18 -0
  191. package/dist/primitives.d.ts +6 -6
  192. package/dist/primitives.js +24 -23
  193. package/dist/reactive/array.d.ts +24 -0
  194. package/dist/reactive/array.d.ts.map +1 -0
  195. package/dist/reactive/index.cjs +1 -0
  196. package/dist/reactive/index.d.cts +11 -0
  197. package/dist/reactive/index.d.ts +11 -0
  198. package/dist/reactive/index.d.ts.map +1 -0
  199. package/dist/reactive/index.js +18 -0
  200. package/dist/reactive/interop.d.cts +19 -0
  201. package/dist/{core/reactive → reactive}/interop.d.ts +1 -1
  202. package/dist/reactive/interop.d.ts.map +1 -0
  203. package/dist/reactive/kernel.d.cts +73 -0
  204. package/dist/{core/reactive → reactive}/kernel.d.ts +5 -3
  205. package/dist/reactive/kernel.d.ts.map +1 -0
  206. package/dist/reactive/map.d.ts +16 -0
  207. package/dist/reactive/map.d.ts.map +1 -0
  208. package/dist/reactive/shallow.d.cts +11 -0
  209. package/dist/reactive/shallow.d.ts +11 -0
  210. package/dist/reactive/shallow.d.ts.map +1 -0
  211. package/dist/reactive/struct.d.cts +10 -0
  212. package/dist/{core/reactive → reactive}/struct.d.ts +1 -1
  213. package/dist/reactive/struct.d.ts.map +1 -0
  214. package/dist/shallow-DQ8aG51_.cjs +1 -0
  215. package/dist/shallow-DfnAm9vG.js +150 -0
  216. package/dist/shared-BU1Cd40h.js +103 -0
  217. package/dist/shared-BymrGTyR.cjs +1 -0
  218. package/dist/shared.cjs +1 -1
  219. package/dist/shared.d.cts +22 -0
  220. package/dist/shared.d.ts +2 -2
  221. package/dist/shared.js +1 -1
  222. package/dist/topological_sort-BDvEyb9W.cjs +1 -0
  223. package/dist/topological_sort-DK6EjpWa.js +135 -0
  224. package/dist/type_primitives/assertions.d.cts +32 -0
  225. package/dist/type_primitives/assertions.d.ts +13 -1
  226. package/dist/type_primitives/assertions.d.ts.map +1 -1
  227. package/dist/type_primitives/binary_heap/binary_heap.d.cts +37 -0
  228. package/dist/type_primitives/bitset/bitset.d.cts +54 -0
  229. package/dist/type_primitives/brand.d.cts +23 -0
  230. package/dist/type_primitives/error.d.cts +16 -0
  231. package/dist/type_primitives/error.d.ts +4 -3
  232. package/dist/type_primitives/error.d.ts.map +1 -1
  233. package/dist/type_primitives/index.d.cts +13 -0
  234. package/dist/type_primitives/index.d.ts +9 -9
  235. package/dist/type_primitives/sparse_map/sparse_map.d.cts +30 -0
  236. package/dist/type_primitives/sparse_set/sparse_set.d.cts +28 -0
  237. package/dist/type_primitives/topological_sort/topological_sort.d.cts +29 -0
  238. package/dist/type_primitives/typed_arrays/typed_arrays.d.cts +127 -0
  239. package/dist/typed_arrays-BcXcnzB4.js +258 -0
  240. package/dist/typed_arrays-D3NmwtCG.cjs +1 -0
  241. package/dist/utils/error.d.cts +6 -0
  242. package/dist/version.d.cts +10 -0
  243. package/dist/version.d.ts +10 -0
  244. package/dist/version.d.ts.map +1 -0
  245. package/package.json +102 -19
  246. package/dist/array-CxbPyiHO.cjs +0 -1
  247. package/dist/array-uFR7Q8fU.js +0 -132
  248. package/dist/core/reactive/array.d.ts.map +0 -1
  249. package/dist/core/reactive/index.cjs +0 -1
  250. package/dist/core/reactive/index.d.ts +0 -10
  251. package/dist/core/reactive/index.d.ts.map +0 -1
  252. package/dist/core/reactive/index.js +0 -17
  253. package/dist/core/reactive/interop.d.ts.map +0 -1
  254. package/dist/core/reactive/kernel.d.ts.map +0 -1
  255. package/dist/core/reactive/map.d.ts.map +0 -1
  256. package/dist/core/reactive/struct.d.ts.map +0 -1
  257. package/dist/log/console_sink.d.ts +0 -4
  258. package/dist/log/console_sink.d.ts.map +0 -1
  259. package/dist/log/index.d.ts +0 -3
  260. package/dist/log/index.d.ts.map +0 -1
  261. package/dist/log/logger.d.ts +0 -27
  262. package/dist/log/logger.d.ts.map +0 -1
  263. package/dist/shared-BXSZnxx4.cjs +0 -1
  264. package/dist/shared-C678TAPY.js +0 -99
  265. package/dist/topological_sort-DlRpSrxu.js +0 -391
  266. package/dist/topological_sort-WAT-VHb-.cjs +0 -1
  267. package/dist/utils/arrays.d.ts.map +0 -1
  268. package/dist/utils/constants.d.ts.map +0 -1
  269. /package/dist/{utils/constants.d.ts → core/ecs/utils/constants.d.cts} +0 -0
  270. /package/dist/core/store/{__generated__/abi.d.ts → vendored_abi/abi.d.cts} +0 -0
  271. /package/dist/{core/reactive/array.d.ts → reactive/array.d.cts} +0 -0
  272. /package/dist/{core/reactive/map.d.ts → reactive/map.d.cts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"frame_trace.d.ts","sourceRoot":"","sources":["../../../src/core/ecs/frame_trace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;wCAEwC;AACxC,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEzF;uDACuD;AACvD,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC9B,2EAA2E;IA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.cjs';
4
+ import { SystemContext } from './query.cjs';
5
+ import { SCHEDULE } from './schedule.cjs';
6
+ import { PayloadCodec } from '../store/index.cjs';
7
+ /** One component to attach to a freshly spawned entity. `values` are required
8
+ * and complete as a *strictness* choice, not a runtime need: since #716 every
9
+ * attach path (deferred included — `writeFields`'s `?? 0`) zero-fills omitted
10
+ * fields, same as templates. A host command is a reified, replayable record,
11
+ * so it carries explicit intent for every field rather than relying on the
12
+ * zero-fill; a tag component takes `{}`. Build type-safely with `spawnEntry`. */
13
+ export interface SpawnEntry {
14
+ readonly def: ComponentDef;
15
+ readonly values: FieldValues<ComponentSchema>;
16
+ }
17
+ /** Extracts the schema out of a `ComponentDef` handle. */
18
+ type SchemaOf<D extends ComponentDef> = D extends ComponentDef<infer S> ? S : ComponentSchema;
19
+ /** One schema-checked spawn entry: `values` is complete for its own def (see
20
+ * the `SpawnEntry` doc — explicit intent per field, though the attach path
21
+ * zero-fills since #716), and a tag takes exactly `{}`. */
22
+ export type SpawnEntryFor<D extends ComponentDef> = {
23
+ readonly def: D;
24
+ readonly values: CompleteFieldValues<SchemaOf<D>>;
25
+ };
26
+ /** The entries tuple for `HostCommandQueue.spawn` — each element's `values` is
27
+ * checked against its own `def`'s schema. Unlike `TemplateEntries` (which
28
+ * stays `Partial` — a template is a reusable default set), a host command
29
+ * demands complete values: it is a reified, replayable record, so every
30
+ * field is explicit even though the attach path would zero-fill (#716). */
31
+ export type SpawnEntries<Defs extends readonly ComponentDef[]> = readonly [
32
+ ...{
33
+ [K in keyof Defs]: SpawnEntryFor<Defs[K]>;
34
+ }
35
+ ];
36
+ /** Type-checked `SpawnEntry` constructor — keeps `values` aligned to `def`'s
37
+ * schema at the call site even though the stored entry is schema-erased. */
38
+ export declare function spawnEntry<S extends ComponentSchema>(def: ComponentDef<S>, values: CompleteFieldValues<S>): SpawnEntry;
39
+ /**
40
+ * A single world mutation, as plain data. Every transport (typed queue today, a
41
+ * SAB ring codec tomorrow) and every consumer (editor undo, record/replay)
42
+ * speaks this one vocabulary, applied by the one `applyHostCommand` dispatch.
43
+ *
44
+ * Component fields are `string` / `def: ComponentDef` (schema-erased) so the
45
+ * union stays flat; the typed `HostCommandQueue` methods preserve type-safety at
46
+ * the enqueue site. `applyHostCommand` re-applies them through `SystemContext`,
47
+ * which type-checks because `ComponentDef` defaults its schema to
48
+ * `ComponentSchema` (whose `keyof` is `string`).
49
+ */
50
+ export type HostCommand = {
51
+ readonly kind: "spawn";
52
+ readonly components: readonly SpawnEntry[];
53
+ /** Fired with the new id once the spawn applies (the id only exists
54
+ * after the deferred create) — lets a producer/editor learn it. */
55
+ readonly onSpawned?: (eid: EntityID) => void;
56
+ } | {
57
+ readonly kind: "despawn";
58
+ readonly eid: EntityID;
59
+ } | {
60
+ readonly kind: "add_component";
61
+ readonly eid: EntityID;
62
+ readonly def: ComponentDef;
63
+ readonly values: FieldValues<ComponentSchema>;
64
+ } | {
65
+ readonly kind: "remove_component";
66
+ readonly eid: EntityID;
67
+ readonly def: ComponentDef;
68
+ } | {
69
+ readonly kind: "set_field";
70
+ readonly eid: EntityID;
71
+ readonly def: ComponentDef;
72
+ readonly field: string;
73
+ readonly value: number;
74
+ } | {
75
+ readonly kind: "disable";
76
+ readonly eid: EntityID;
77
+ } | {
78
+ readonly kind: "enable";
79
+ readonly eid: EntityID;
80
+ };
81
+ /**
82
+ * THE ONE APPLY DISPATCH. Maps a `HostCommand` onto `SystemContext` ops. Only
83
+ * ever called from inside the blessed apply system, which holds the `ctx` and is
84
+ * `exclusive` (full access). Structural changes (`spawn`/`despawn`/component
85
+ * add-remove) are deferred to the phase flush, exactly like a normal system's;
86
+ * `setField` is immediate and bumps the change-tick. Returns the new entity for
87
+ * `spawn`, otherwise `undefined`.
88
+ *
89
+ * That immediate/deferred split is a sharp edge: a `setField` targeting a
90
+ * component the entity does NOT yet have — because an `addComponent`/`spawn`
91
+ * enqueued in the SAME drain is still pending its flush — would otherwise fail
92
+ * deep in `getColumn` with an opaque "component not registered". The `DEV`
93
+ * guard below turns that into an actionable message. The fix is structural, not a
94
+ * retry: pass the value in `addComponent`/`spawnEntry` (which carries complete
95
+ * field values), or issue the `setField` on a later frame.
96
+ */
97
+ export declare function applyHostCommand(ctx: SystemContext, cmd: HostCommand): EntityID | undefined;
98
+ /**
99
+ * The host-facing write handle. Mutating methods ENQUEUE (off-schedule, pure);
100
+ * nothing reaches the world until the apply system drains it at the next
101
+ * schedule head. Mirrors Bevy's `Commands` ergonomics over the flat `HostCommand`
102
+ * vocabulary. The returned-from-`installHostCommandSeam` instance is the
103
+ * write counterpart to the reactive bridge's returned `reactiveMap`.
104
+ */
105
+ export declare class HostCommandQueue {
106
+ private readonly queued;
107
+ /** Spawn an entity carrying `components`. `onSpawned` receives the new id
108
+ * once the spawn applies. Each entry's `values` is checked against its own
109
+ * `def`'s schema (`SpawnEntries`); the stored command stays schema-erased. */
110
+ spawn<Defs extends readonly ComponentDef[]>(components: SpawnEntries<Defs>, onSpawned?: (eid: EntityID) => void): void;
111
+ despawn(eid: EntityID): void;
112
+ addComponent<S extends ComponentSchema>(eid: EntityID, def: ComponentDef<S>, values: CompleteFieldValues<S>): void;
113
+ removeComponent(eid: EntityID, def: ComponentDef): void;
114
+ /** Set `field` of `def` on `eid`. Applied IMMEDIATELY at the drain, unlike the
115
+ * deferred structural ops — so `def` must already be on `eid`. Do NOT
116
+ * `addComponent`/`spawn` `def` and `setField` it in the same frame: the add is
117
+ * still pending its flush when the immediate set runs (carry the value in
118
+ * `addComponent`/`spawnEntry` instead). `applyHostCommand` throws an
119
+ * actionable error in `DEV` if you do. */
120
+ setField<S extends ComponentSchema>(eid: EntityID, def: ComponentDef<S>, field: string & keyof S, value: number): void;
121
+ disable(eid: EntityID): void;
122
+ enable(eid: EntityID): void;
123
+ /** Enqueue a pre-built command. The path for a SAB-ring codec, an editor's
124
+ * reified inverse, or a replay log — all of which produce `HostCommand` data
125
+ * directly rather than calling the typed sugar above. */
126
+ push(cmd: HostCommand): void;
127
+ /** Commands buffered but not yet applied. */
128
+ pending(): number;
129
+ /** Drop every buffered command without applying it (M15) — e.g. abandoning
130
+ * queued edits on a scene unload. Returns how many were dropped. Does not
131
+ * touch commands already drained into the world. */
132
+ clear(): number;
133
+ /**
134
+ * Apply and clear every buffered command. Called by the blessed apply system
135
+ * inside its schedule span; not part of the host-facing surface. Returns the
136
+ * count applied.
137
+ *
138
+ * `tap`, when present, is invoked with each command in apply order just before
139
+ * it is applied — the record/replay hook ({@link HostCommandRecorder}). It is
140
+ * an OPT-IN observer: the tap-free path keeps the original tight loop, so an
141
+ * un-recorded drain pays nothing (#702).
142
+ */
143
+ drain(ctx: SystemContext, tap?: (cmd: HostCommand) => void): number;
144
+ }
145
+ /** Bytes of the payload region inside one `command_ring` slot (15). The slot's
146
+ * leading byte is the opCode; `COMMAND_RING_SLOT_BYTES` (16) is the whole slot. */
147
+ export declare const HOST_COMMAND_PAYLOAD_BYTES: number;
148
+ /**
149
+ * Ring codec for a `setField` on a FIXED `(def, field)`. The component + field
150
+ * are bound INTO the codec, not carried in the bytes — the consumer-owned-codec
151
+ * rule (mirroring `command_dispatch`): the engine ships the mechanism, a
152
+ * consumer's codec knows which component+field an opcode means.
153
+ *
154
+ * Payload (15 B): `[ eid: u32 LE @0 ][ value: f64 LE @4 ][ _reserved: 3 B @12 ]`
155
+ *
156
+ * `value` rides as `f64` (covers every numeric column type losslessly within
157
+ * range); the trailing 3 bytes stay zero. Packing the id as `u32` is what makes
158
+ * `setField` fit the 15-byte slot.
159
+ */
160
+ export declare function ringSetFieldCodec<S extends ComponentSchema>(def: ComponentDef<S>, field: string & keyof S): PayloadCodec<HostCommand>;
161
+ /** Ring codec for `despawn` — `[ eid: u32 LE @0 ]`, trailing 11 B reserved-zero. */
162
+ export declare function ringDespawnCodec(): PayloadCodec<HostCommand>;
163
+ /** Ring codec for `disable` — `[ eid: u32 LE @0 ]`, trailing 11 B reserved-zero. */
164
+ export declare function ringDisableCodec(): PayloadCodec<HostCommand>;
165
+ /** Ring codec for `enable` — `[ eid: u32 LE @0 ]`, trailing 11 B reserved-zero. */
166
+ export declare function ringEnableCodec(): PayloadCodec<HostCommand>;
167
+ /**
168
+ * Ring codec for `removeComponent` of a FIXED `def` — `[ eid: u32 LE @0 ]`, the
169
+ * component bound into the codec (consumer-owned-codec rule). `spawn` /
170
+ * `addComponent` are deliberately absent: they carry component field values
171
+ * that don't fit the 15-byte slot generically, so they stay typed-transport-only
172
+ * (the prototype's finding — the in-process queue has no width limit).
173
+ */
174
+ export declare function ringRemoveComponentCodec(def: ComponentDef): PayloadCodec<HostCommand>;
175
+ /** A ctx-aware applier for one ring opcode: runs on the system `ctx` (which the
176
+ * apply system holds) with the raw 15-byte payload. `tap`, when present, is the
177
+ * record/replay hook (#702) — a generic, `onCommand`-bound applier decodes the
178
+ * slot to a `HostCommand` and feeds it to `tap` before applying, so ring-sourced
179
+ * commands land in the same log as typed-queue ones. A raw `on` applier (a
180
+ * consumer's own non-`HostCommand` op, e.g. the game's `spawn_unit`) has no
181
+ * `HostCommand` to surface and simply ignores `tap`. */
182
+ export type RingCommandApplier = (ctx: SystemContext, payload: Uint8Array, tap?: (cmd: HostCommand) => void) => void;
183
+ /**
184
+ * Drains the SAB `command_ring` as the second host-command transport, dispatching
185
+ * each opcode to a bound applier. Two binding styles:
186
+ *
187
+ * - `onCommand(op, codec)` — decode the slot to a `HostCommand` and run it
188
+ * through the ONE `applyHostCommand` (the same dispatch the typed queue
189
+ * uses). This is the generic cross-thread / wire host-write path.
190
+ * - `on(op, applier)` — a raw ctx-aware handler for a consumer's OWN ring ops
191
+ * that aren't generic host commands (e.g. the game's `spawn_unit`, which runs
192
+ * a BFS placement + game spawn). Same drain, same ring: the "one bus".
193
+ *
194
+ * Opcodes + codecs are CONSUMER-supplied — the engine ships the mechanism and the
195
+ * `ring_*_codec` factories, never the opcode numbers (mirrors `command_dispatch`).
196
+ *
197
+ * Exactly ONE dispatcher should drain a given ring — a second drain would consume
198
+ * the first's slots. The in-process apply system passes its dispatcher via
199
+ * `installHostCommandSeam({ ring })`; a system that owns a timing-coupled drain
200
+ * point (e.g. `wave_spawn`, which must drain between the spatial-index build and
201
+ * the flow-field rebuild) constructs one and calls `drain` itself.
202
+ */
203
+ export declare class HostCommandDispatcher {
204
+ private readonly appliers;
205
+ /** Bind a raw ctx-aware applier to `opCode`. Re-binding replaces. */
206
+ on(opCode: number, applier: RingCommandApplier): this;
207
+ /** Unbind `opCode` (M15). Returns whether a binding was removed; subsequent
208
+ * slots carrying it hit the unknown-opcode path. */
209
+ off(opCode: number): boolean;
210
+ /** Bind a `HostCommand` codec to `opCode`: each matching slot is decoded and
211
+ * run through `applyHostCommand` — the SAME dispatch the typed queue uses.
212
+ * A drain-time `tap` (record/replay, #702) sees the decoded command before it
213
+ * applies, so ring-sourced commands share one log with the typed transport. */
214
+ onCommand(opCode: number, codec: PayloadCodec<HostCommand>): this;
215
+ /** Drain every pending slot, dispatching each to its bound applier. Unbound
216
+ * opcodes are skipped (the read head still advances — matching
217
+ * `drainCommandRing` / `CommandDispatcher`). Returns slots drained. `tap`,
218
+ * when present, is forwarded to each applier as the record/replay hook (#702);
219
+ * only `onCommand`-bound (generic `HostCommand`) opcodes surface to it. */
220
+ drain(ctx: SystemContext, view: DataView, ringOff: number, tap?: (cmd: HostCommand) => void): number;
221
+ }
222
+ /**
223
+ * A per-tick sink the apply system feeds drained commands into — the record side
224
+ * of record/replay (#702). Declared structurally HERE (not imported from
225
+ * `command_log.ts`) so the seam needs no dependency on the recorder: the one-way
226
+ * edge is `command_log` → `host_commands`, never back. {@link HostCommandRecorder}
227
+ * is the in-tree implementation.
228
+ *
229
+ * The protocol the apply system follows: at each UPDATE-phase drain it calls
230
+ * `openTick(tick, dt)` to open that tick's bucket; STARTUP-phase drains skip
231
+ * `openTick`, so seed-time commands land in the recorder's startup bucket. Then
232
+ * every applied command (both transports) is handed to `record`.
233
+ */
234
+ export interface HostCommandSink {
235
+ /** Open (or reuse) the bucket for update `tick` with its `dt`. Multiple drains
236
+ * in one tick (several update phases) reuse the one bucket. */
237
+ openTick(tick: number, dt: number): void;
238
+ /** Record one applied command, in apply order. Pre-bound so it can be passed
239
+ * straight as a drain `tap` without per-tick closure allocation. */
240
+ readonly record: (cmd: HostCommand) => void;
241
+ }
242
+ /** Options for {@link installHostCommandSeam}. */
243
+ export interface HostCommandSeamOptions {
244
+ /** Schedule phases whose head drains the queue. Default
245
+ * `[PRE_STARTUP, PRE_UPDATE]` — seed-time edits plus every frame. */
246
+ readonly schedules?: readonly SCHEDULE[];
247
+ /** Apply-system name (diagnostics). Default `"host_command_apply"`. */
248
+ readonly name?: string;
249
+ /** When provided, the apply system ALSO drains the world's SAB `command_ring`
250
+ * through this dispatcher at each schedule head — the cross-thread / wire
251
+ * transport, resolving to the same `applyHostCommand` as the typed queue.
252
+ * The ECS `Store` always allocates a ring; if one is somehow absent
253
+ * (`command_ring_off === 0`) the ring drain is a no-op. Bind opcodes with the
254
+ * `ring_*_codec` factories, or `dispatcher.on` for a consumer's own ops. */
255
+ readonly ring?: HostCommandDispatcher;
256
+ /** When provided, every command the apply system drains — from BOTH transports
257
+ * (typed queue + `onCommand`-bound ring ops) — is logged into this sink,
258
+ * tagged with the tick + `dt`, for record/replay (#702). Off by default: an
259
+ * un-recorded seam keeps the original tap-free drain and pays nothing.
260
+ * {@link HostCommandRecorder} is the in-tree sink; replay it with
261
+ * `replayCommandLog`. */
262
+ readonly recorder?: HostCommandSink;
263
+ }
264
+ /**
265
+ * Tear down a seam installed by {@link installHostCommandSeam} (M15): removes
266
+ * its apply systems from the world's schedule and clears any still-buffered
267
+ * commands. The queue itself stays usable as a buffer, but nothing drains it
268
+ * until a new seam is installed. No-op (returns `false`) if `queue` was not
269
+ * produced by `installHostCommandSeam` on this world.
270
+ */
271
+ export declare function uninstallHostCommandSeam(ecs: ECS, queue: HostCommandQueue): boolean;
272
+ export declare function installHostCommandSeam(ecs: ECS, opts?: HostCommandSeamOptions): HostCommandQueue;
273
+ export {};
274
+ //# sourceMappingURL=host_commands.d.ts.map
@@ -1,21 +1,41 @@
1
- import { ComponentDef, ComponentSchema, FieldValues } from './component';
2
- import { ECS } from './ecs';
3
- import { EntityID } from './entity';
4
- import { SystemContext } from './query';
5
- import { SCHEDULE } from './schedule';
6
- import { PayloadCodec } from '../store';
7
- /** One component to attach to a freshly spawned entity. `values` are required and
8
- * complete: the deferred add path writes exactly the fields given and does NOT
9
- * zero-default omitted ones (unlike Template/direct spawn), so an omitted f64
10
- * field would read back NaN. Provide every field (use `0` for "default"); a tag
11
- * component takes `{}`. Build type-safely with `spawnEntry`. */
1
+ import { ComponentDef, ComponentSchema, CompleteFieldValues, FieldValues } from './component.js';
2
+ import { ECS } from './ecs.js';
3
+ import { EntityID } from './entity.js';
4
+ import { SystemContext } from './query.js';
5
+ import { SCHEDULE } from './schedule.js';
6
+ import { PayloadCodec } from '../store/index.js';
7
+ /** One component to attach to a freshly spawned entity. `values` are required
8
+ * and complete as a *strictness* choice, not a runtime need: since #716 every
9
+ * attach path (deferred included — `writeFields`'s `?? 0`) zero-fills omitted
10
+ * fields, same as templates. A host command is a reified, replayable record,
11
+ * so it carries explicit intent for every field rather than relying on the
12
+ * zero-fill; a tag component takes `{}`. Build type-safely with `spawnEntry`. */
12
13
  export interface SpawnEntry {
13
14
  readonly def: ComponentDef;
14
15
  readonly values: FieldValues<ComponentSchema>;
15
16
  }
17
+ /** Extracts the schema out of a `ComponentDef` handle. */
18
+ type SchemaOf<D extends ComponentDef> = D extends ComponentDef<infer S> ? S : ComponentSchema;
19
+ /** One schema-checked spawn entry: `values` is complete for its own def (see
20
+ * the `SpawnEntry` doc — explicit intent per field, though the attach path
21
+ * zero-fills since #716), and a tag takes exactly `{}`. */
22
+ export type SpawnEntryFor<D extends ComponentDef> = {
23
+ readonly def: D;
24
+ readonly values: CompleteFieldValues<SchemaOf<D>>;
25
+ };
26
+ /** The entries tuple for `HostCommandQueue.spawn` — each element's `values` is
27
+ * checked against its own `def`'s schema. Unlike `TemplateEntries` (which
28
+ * stays `Partial` — a template is a reusable default set), a host command
29
+ * demands complete values: it is a reified, replayable record, so every
30
+ * field is explicit even though the attach path would zero-fill (#716). */
31
+ export type SpawnEntries<Defs extends readonly ComponentDef[]> = readonly [
32
+ ...{
33
+ [K in keyof Defs]: SpawnEntryFor<Defs[K]>;
34
+ }
35
+ ];
16
36
  /** Type-checked `SpawnEntry` constructor — keeps `values` aligned to `def`'s
17
37
  * schema at the call site even though the stored entry is schema-erased. */
18
- export declare function spawnEntry<S extends ComponentSchema>(def: ComponentDef<S>, values: FieldValues<S>): SpawnEntry;
38
+ export declare function spawnEntry<S extends ComponentSchema>(def: ComponentDef<S>, values: CompleteFieldValues<S>): SpawnEntry;
19
39
  /**
20
40
  * A single world mutation, as plain data. Every transport (typed queue today, a
21
41
  * SAB ring codec tomorrow) and every consumer (editor undo, record/replay)
@@ -69,7 +89,7 @@ export type HostCommand = {
69
89
  * That immediate/deferred split is a sharp edge: a `setField` targeting a
70
90
  * component the entity does NOT yet have — because an `addComponent`/`spawn`
71
91
  * enqueued in the SAME drain is still pending its flush — would otherwise fail
72
- * deep in `getColumn` with an opaque "component not registered". The `__DEV__`
92
+ * deep in `getColumn` with an opaque "component not registered". The `DEV`
73
93
  * guard below turns that into an actionable message. The fix is structural, not a
74
94
  * retry: pass the value in `addComponent`/`spawnEntry` (which carries complete
75
95
  * field values), or issue the `setField` on a later frame.
@@ -85,17 +105,18 @@ export declare function applyHostCommand(ctx: SystemContext, cmd: HostCommand):
85
105
  export declare class HostCommandQueue {
86
106
  private readonly queued;
87
107
  /** Spawn an entity carrying `components`. `onSpawned` receives the new id
88
- * once the spawn applies. */
89
- spawn(components: readonly SpawnEntry[], onSpawned?: (eid: EntityID) => void): void;
108
+ * once the spawn applies. Each entry's `values` is checked against its own
109
+ * `def`'s schema (`SpawnEntries`); the stored command stays schema-erased. */
110
+ spawn<Defs extends readonly ComponentDef[]>(components: SpawnEntries<Defs>, onSpawned?: (eid: EntityID) => void): void;
90
111
  despawn(eid: EntityID): void;
91
- addComponent<S extends ComponentSchema>(eid: EntityID, def: ComponentDef<S>, values: FieldValues<S>): void;
112
+ addComponent<S extends ComponentSchema>(eid: EntityID, def: ComponentDef<S>, values: CompleteFieldValues<S>): void;
92
113
  removeComponent(eid: EntityID, def: ComponentDef): void;
93
114
  /** Set `field` of `def` on `eid`. Applied IMMEDIATELY at the drain, unlike the
94
115
  * deferred structural ops — so `def` must already be on `eid`. Do NOT
95
116
  * `addComponent`/`spawn` `def` and `setField` it in the same frame: the add is
96
117
  * still pending its flush when the immediate set runs (carry the value in
97
118
  * `addComponent`/`spawnEntry` instead). `applyHostCommand` throws an
98
- * actionable error in `__DEV__` if you do. */
119
+ * actionable error in `DEV` if you do. */
99
120
  setField<S extends ComponentSchema>(eid: EntityID, def: ComponentDef<S>, field: string & keyof S, value: number): void;
100
121
  disable(eid: EntityID): void;
101
122
  enable(eid: EntityID): void;
@@ -105,6 +126,10 @@ export declare class HostCommandQueue {
105
126
  push(cmd: HostCommand): void;
106
127
  /** Commands buffered but not yet applied. */
107
128
  pending(): number;
129
+ /** Drop every buffered command without applying it (M15) — e.g. abandoning
130
+ * queued edits on a scene unload. Returns how many were dropped. Does not
131
+ * touch commands already drained into the world. */
132
+ clear(): number;
108
133
  /**
109
134
  * Apply and clear every buffered command. Called by the blessed apply system
110
135
  * inside its schedule span; not part of the host-facing surface. Returns the
@@ -179,6 +204,9 @@ export declare class HostCommandDispatcher {
179
204
  private readonly appliers;
180
205
  /** Bind a raw ctx-aware applier to `opCode`. Re-binding replaces. */
181
206
  on(opCode: number, applier: RingCommandApplier): this;
207
+ /** Unbind `opCode` (M15). Returns whether a binding was removed; subsequent
208
+ * slots carrying it hit the unknown-opcode path. */
209
+ off(opCode: number): boolean;
182
210
  /** Bind a `HostCommand` codec to `opCode`: each matching slot is decoded and
183
211
  * run through `applyHostCommand` — the SAME dispatch the typed queue uses.
184
212
  * A drain-time `tap` (record/replay, #702) sees the decoded command before it
@@ -234,19 +262,13 @@ export interface HostCommandSeamOptions {
234
262
  readonly recorder?: HostCommandSink;
235
263
  }
236
264
  /**
237
- * Install the write seam on `world`: registers the blessed `exclusive`
238
- * command-apply system at the head of the given schedules and returns the
239
- * {@link HostCommandQueue} to enqueue into. Opt-in and explicit, symmetric to
240
- * the read bridge's `syncComponentToMap`.
241
- *
242
- * Call this BEFORE adding your own systems and BEFORE `world.startup()`: the
243
- * apply system must be registered first so insertion order runs it at the head
244
- * of its phase (the schedule has no dedicated "first" slot), and the PRE_STARTUP
245
- * drain only fires if it exists before startup.
246
- *
247
- * Lives in engine CORE (not extensions): unlike the read bridge there is no
248
- * external reactive kernel to quarantine — this is pure ECS plumbing over the
249
- * deferred buffers and `SystemContext` the core already owns.
265
+ * Tear down a seam installed by {@link installHostCommandSeam} (M15): removes
266
+ * its apply systems from the world's schedule and clears any still-buffered
267
+ * commands. The queue itself stays usable as a buffer, but nothing drains it
268
+ * until a new seam is installed. No-op (returns `false`) if `queue` was not
269
+ * produced by `installHostCommandSeam` on this world.
250
270
  */
251
- export declare function installHostCommandSeam(world: ECS, opts?: HostCommandSeamOptions): HostCommandQueue;
271
+ export declare function uninstallHostCommandSeam(ecs: ECS, queue: HostCommandQueue): boolean;
272
+ export declare function installHostCommandSeam(ecs: ECS, opts?: HostCommandSeamOptions): HostCommandQueue;
273
+ export {};
252
274
  //# sourceMappingURL=host_commands.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"host_commands.d.ts","sourceRoot":"","sources":["../../../src/core/ecs/host_commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa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AE,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC;wEACoE;IACpE,QAAQ,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;CAC5C;AAUD,kDAAkD;AAClD,MAAM,WAAW,sBAAsB;IACtC;yEACqE;IACrE,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;IACzC,uEAAuE;IACvE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;gFAK4E;IAC5E,QAAQ,CAAC,IAAI,CAAC,EAAE,qBAAqB,CAAC;IACtC;;;;;6BAKyB;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC;CACpC;AAoBD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAOnF;AAED,wBAAgB,sBAAsB,CACrC,GAAG,EAAE,GAAG,EACR,IAAI,CAAC,EAAE,sBAAsB,GAC3B,gBAAgB,CA2DlB"}
@@ -0,0 +1,46 @@
1
+ export { ECS, type ECSOptions } from './ecs.cjs';
2
+ export type { ECSRelations, ECSEvents, ECSResources, ECSSnapshots } from './facades.cjs';
3
+ export { resolveECSMemory, DEFAULT_ECS_CAP_BYTES, BUDGET_GROWTH_HEADROOM, BUDGET_DEFAULT_BYTES_PER_ENTITY, BUDGET_DEFAULT_ARCHETYPES, type ECSMemoryOptions, type ResolvedECSMemory, type ECSMemoryCapContext, type EntityBudget, type WasmMemoryArm } from './ecs_memory.cjs';
4
+ export type { Template, TemplateEntry, TemplateEntries, TemplateOverrides } from './store.cjs';
5
+ export type { StoreLayoutListener } from './store_layout_listener.cjs';
6
+ export type { ComputeBackend, BackendSystemHandle } from './compute_backend.cjs';
7
+ export { SCHEDULE, type SystemEntry, type SystemOrdering, type SystemOrderingTarget, systemSet, type SystemSet, type SystemSetConfig } from './schedule.cjs';
8
+ export { type RunCondition, type ConditionContext, runIfResourceEq, runEveryNTicks, runIfAnyMatch, not, allOf, anyOf } from './run_condition.cjs';
9
+ export { SystemContext } from './query.cjs';
10
+ export type { SystemFn, SystemConfig, SystemDescriptor, SystemAccessConfig, SystemAccessDeclaration, SystemTransition } from './system.cjs';
11
+ export type { SystemAccess, DeclaredAccess, TypedSystemConfig, DeclaredRead, DeclaredWrite, DeclaredAdd, DeclaredRemove, DeclaredSparseRead, DeclaredSparseWrite, DeclaredRelationRead, DeclaredRelationWrite, DeclaredResourceRead, DeclaredResourceWrite, DespawnArg, DenseAccessDecl, SpawnsAccessDecl, DespawnsAccessDecl, TransitionsAccessDecl, SparseAccessDecl, RelationsAccessDecl, ResourcesAccessDecl } from './system.cjs';
12
+ export type { DeclaredBundleOrDef } from './query.cjs';
13
+ export { accessCheck } from './access_check.cjs';
14
+ export type { ObserverConfig, ObserverHandle, ObserverFn, ArchetypeObserverFn, StructuralObserverConfig, EntitySetObserverConfig, ArchetypeSetObserverConfig } from './observer.cjs';
15
+ export { installHostCommandSeam, uninstallHostCommandSeam, applyHostCommand, HostCommandQueue, HostCommandDispatcher, spawnEntry, ringSetFieldCodec, ringDespawnCodec, ringDisableCodec, ringEnableCodec, ringRemoveComponentCodec, HOST_COMMAND_PAYLOAD_BYTES } from './host_commands.cjs';
16
+ export type { HostCommand, SpawnEntry, SpawnEntryFor, SpawnEntries, HostCommandSeamOptions, HostCommandSink, RingCommandApplier } from './host_commands.cjs';
17
+ export { HostCommandRecorder, serializeCommandLog, deserializeCommandLog, replayCommandLog } from './command_log.cjs';
18
+ export type { CommandLog, RecordedTick, ReplayResult, ReplayOptions } from './command_log.cjs';
19
+ export { FrameTraceRecorder } from './frame_trace.cjs';
20
+ export type { FrameTraceSink, FrameTrace, FrameTraceEvent, StructuralOp, ObserverOp } from './frame_trace.cjs';
21
+ export { FrameStepper } from './frame_stepper.cjs';
22
+ export type { FrameStepperOptions } from './frame_stepper.cjs';
23
+ export { ECSRestoreError, ECS_SNAPSHOT_VERSION } from './resume.cjs';
24
+ export type { ComponentRef, ReadonlyComponentRef } from './ref.cjs';
25
+ export { Query, QueryBuilder, ChangedQuery, HIERARCHY_UNBOUNDED } from './query.cjs';
26
+ export type { HierarchyTerm } from './query.cjs';
27
+ export { ChunkColumns, Commands } from './query.cjs';
28
+ export type { ArchetypeView, ArchetypeID } from './archetype.cjs';
29
+ export type { EntityID, ReadonlyEntityIdArray } from './entity.cjs';
30
+ export { getEntityIndex } from './entity.cjs';
31
+ export { createEntityId, getEntityGeneration, MAX_INDEX, MAX_GENERATION, MAX_LIVE_GENERATION, RETIRED_GENERATION, MAX_ENTITY_ID } from './entity.cjs';
32
+ export type { ComponentDef, ComponentHandle, ComponentRegisterOptions, ComponentSchema, SchemaOf, DeclaredQueryTerm, FieldValues, CompleteFieldValues, ValuesArg, AttachValuesArg, TagToTypedArray, ColumnsForSchema, MutableColumnsForSchema, ReadonlyColumn, ReadonlyUint32Array } from './component.cjs';
33
+ export { bundle } from './component.cjs';
34
+ export type { Bundle, BundleOrDef } from './component.cjs';
35
+ export type { SparseComponentDef, SparseComponentID, SparseSchemaOf } from './sparse_store.cjs';
36
+ export { SparseRestoreError } from './sparse_store.cjs';
37
+ export type { RelationDef, RelationID, RelationCardinality, RelationOptions, OnDeleteTarget } from './relation.cjs';
38
+ export { ANY_RELATION } from './relation.cjs';
39
+ export { registerIsA, registerChildOf, type BuiltinRelationOptions } from './builtin_relations.cjs';
40
+ export type { EventReader, EventKey, EventSchema, EventShape, EventFieldsCover, EmptyEventSchema, SignalKey } from './event.cjs';
41
+ export { eventKey, signalKey } from './event.cjs';
42
+ export type { ResourceKey, ResourceValueOf } from './resource.cjs';
43
+ export { resourceKey } from './resource.cjs';
44
+ export { dispatchTrace, type DispatchTraceSnapshot, type DispatchTraceEntry } from './dispatch_trace.cjs';
45
+ export { ECSError, ECS_ERROR, isEcsError } from './utils/error.cjs';
46
+ //# sourceMappingURL=index.d.ts.map
@@ -1,41 +1,46 @@
1
- export { ECS, type ECSOptions } from './ecs';
2
- export { resolveECSMemory, DEFAULT_ECS_CAP_BYTES, BUDGET_GROWTH_HEADROOM, BUDGET_DEFAULT_BYTES_PER_ENTITY, BUDGET_DEFAULT_ARCHETYPES, type ECSMemoryOptions, type ResolvedECSMemory, type ECSMemoryCapContext, type EntityBudget, type WasmMemoryArm } from './ecs_memory';
3
- export type { Template, TemplateEntry, TemplateEntries, TemplateOverrides } from './store';
4
- export type { StoreLayoutListener } from './store_layout_listener';
5
- export type { ComputeBackend, BackendSystemHandle } from './compute_backend';
6
- export { SCHEDULE, type SystemEntry, type SystemOrdering, type SystemOrderingTarget, systemSet, type SystemSet, type SystemSetConfig } from './schedule';
7
- export { type RunCondition, type ConditionContext, runIfResourceEq, runEveryNTicks, runIfAnyMatch } from './run_condition';
8
- export { SystemContext } from './query';
9
- export type { SystemFn, SystemConfig, SystemDescriptor, SystemAccessConfig, SystemAccessDeclaration, SystemTransition } from './system';
10
- export { accessCheck } from './access_check';
11
- export type { ObserverConfig, ObserverHandle, ObserverFn, ArchetypeObserverFn, StructuralObserverConfig, EntitySetObserverConfig, ArchetypeSetObserverConfig } from './observer';
12
- export { installHostCommandSeam, applyHostCommand, HostCommandQueue, HostCommandDispatcher, spawnEntry, ringSetFieldCodec, ringDespawnCodec, ringDisableCodec, ringEnableCodec, ringRemoveComponentCodec, HOST_COMMAND_PAYLOAD_BYTES } from './host_commands';
13
- export type { HostCommand, SpawnEntry, HostCommandSeamOptions, HostCommandSink, RingCommandApplier } from './host_commands';
14
- export { HostCommandRecorder, serializeCommandLog, deserializeCommandLog, replayCommandLog } from './command_log';
15
- export type { CommandLog, RecordedTick, ReplayResult, ReplayOptions } from './command_log';
16
- export { FrameTraceRecorder } from './frame_trace';
17
- export type { FrameTraceSink, FrameTrace, FrameTraceEvent, StructuralOp, ObserverOp } from './frame_trace';
18
- export { WorldRestoreError, WORLD_SNAPSHOT_VERSION } from './resume';
19
- export type { ComponentRef, ReadonlyComponentRef } from './ref';
20
- export { Query, QueryBuilder, ChangedQuery, HIERARCHY_UNBOUNDED } from './query';
21
- export type { HierarchyTerm } from './query';
22
- export { ChunkColumns, Commands } from './query';
23
- export type { ArchetypeView, ArchetypeID } from './archetype';
24
- export type { EntityID, ReadonlyEntityIdArray } from './entity';
25
- export { getEntityIndex } from './entity';
26
- export { createEntityId, getEntityGeneration, MAX_INDEX, MAX_GENERATION, MAX_LIVE_GENERATION, RETIRED_GENERATION, MAX_ENTITY_ID } from './entity';
27
- export type { ComponentDef, ComponentHandle, ComponentSchema, FieldValues, TagToTypedArray, ColumnsForSchema, MutableColumnsForSchema, ReadonlyColumn, ReadonlyUint32Array } from './component';
28
- export { bundle } from './component';
29
- export type { Bundle, BundleOrDef } from './component';
30
- export type { SparseComponentDef, SparseComponentID } from './sparse_store';
31
- export { SparseRestoreError } from './sparse_store';
32
- export type { RelationDef, RelationID, RelationOptions, OnDeleteTarget } from './relation';
33
- export { ANY_RELATION } from './relation';
34
- export { registerIsA, registerChildOf, type BuiltinRelationOptions } from './builtin_relations';
35
- export type { EventReader, EventKey, EventSchema, EmptyEventSchema, SignalKey } from './event';
36
- export { eventKey, signalKey } from './event';
37
- export type { ResourceKey } from './resource';
38
- export { resourceKey } from './resource';
39
- export { dispatchTrace, type DispatchTraceSnapshot, type DispatchTraceEntry } from './dispatch_trace';
40
- export { ECSError, ECS_ERROR, isEcsError } from './utils/error';
1
+ export { ECS, type ECSOptions } from './ecs.js';
2
+ export type { ECSRelations, ECSEvents, ECSResources, ECSSnapshots } from './facades.js';
3
+ export { resolveECSMemory, DEFAULT_ECS_CAP_BYTES, BUDGET_GROWTH_HEADROOM, BUDGET_DEFAULT_BYTES_PER_ENTITY, BUDGET_DEFAULT_ARCHETYPES, type ECSMemoryOptions, type ResolvedECSMemory, type ECSMemoryCapContext, type EntityBudget, type WasmMemoryArm } from './ecs_memory.js';
4
+ export type { Template, TemplateEntry, TemplateEntries, TemplateOverrides } from './store.js';
5
+ export type { StoreLayoutListener } from './store_layout_listener.js';
6
+ export type { ComputeBackend, BackendSystemHandle } from './compute_backend.js';
7
+ export { SCHEDULE, type SystemEntry, type SystemOrdering, type SystemOrderingTarget, systemSet, type SystemSet, type SystemSetConfig } from './schedule.js';
8
+ export { type RunCondition, type ConditionContext, runIfResourceEq, runEveryNTicks, runIfAnyMatch, not, allOf, anyOf } from './run_condition.js';
9
+ export { SystemContext } from './query.js';
10
+ export type { SystemFn, SystemConfig, SystemDescriptor, SystemAccessConfig, SystemAccessDeclaration, SystemTransition } from './system.js';
11
+ export type { SystemAccess, DeclaredAccess, TypedSystemConfig, DeclaredRead, DeclaredWrite, DeclaredAdd, DeclaredRemove, DeclaredSparseRead, DeclaredSparseWrite, DeclaredRelationRead, DeclaredRelationWrite, DeclaredResourceRead, DeclaredResourceWrite, DespawnArg, DenseAccessDecl, SpawnsAccessDecl, DespawnsAccessDecl, TransitionsAccessDecl, SparseAccessDecl, RelationsAccessDecl, ResourcesAccessDecl } from './system.js';
12
+ export type { DeclaredBundleOrDef } from './query.js';
13
+ export { accessCheck } from './access_check.js';
14
+ export type { ObserverConfig, ObserverHandle, ObserverFn, ArchetypeObserverFn, StructuralObserverConfig, EntitySetObserverConfig, ArchetypeSetObserverConfig } from './observer.js';
15
+ export { installHostCommandSeam, uninstallHostCommandSeam, applyHostCommand, HostCommandQueue, HostCommandDispatcher, spawnEntry, ringSetFieldCodec, ringDespawnCodec, ringDisableCodec, ringEnableCodec, ringRemoveComponentCodec, HOST_COMMAND_PAYLOAD_BYTES } from './host_commands.js';
16
+ export type { HostCommand, SpawnEntry, SpawnEntryFor, SpawnEntries, HostCommandSeamOptions, HostCommandSink, RingCommandApplier } from './host_commands.js';
17
+ export { HostCommandRecorder, serializeCommandLog, deserializeCommandLog, replayCommandLog } from './command_log.js';
18
+ export type { CommandLog, RecordedTick, ReplayResult, ReplayOptions } from './command_log.js';
19
+ export { FrameTraceRecorder } from './frame_trace.js';
20
+ export type { FrameTraceSink, FrameTrace, FrameTraceEvent, StructuralOp, ObserverOp } from './frame_trace.js';
21
+ export { FrameStepper } from './frame_stepper.js';
22
+ export type { FrameStepperOptions } from './frame_stepper.js';
23
+ export { ECSRestoreError, ECS_SNAPSHOT_VERSION } from './resume.js';
24
+ export type { ComponentRef, ReadonlyComponentRef } from './ref.js';
25
+ export { Query, QueryBuilder, ChangedQuery, HIERARCHY_UNBOUNDED } from './query.js';
26
+ export type { HierarchyTerm } from './query.js';
27
+ export { ChunkColumns, Commands } from './query.js';
28
+ export type { ArchetypeView, ArchetypeID } from './archetype.js';
29
+ export type { EntityID, ReadonlyEntityIdArray } from './entity.js';
30
+ export { getEntityIndex } from './entity.js';
31
+ export { createEntityId, getEntityGeneration, MAX_INDEX, MAX_GENERATION, MAX_LIVE_GENERATION, RETIRED_GENERATION, MAX_ENTITY_ID } from './entity.js';
32
+ export type { ComponentDef, ComponentHandle, ComponentRegisterOptions, ComponentSchema, SchemaOf, DeclaredQueryTerm, FieldValues, CompleteFieldValues, ValuesArg, AttachValuesArg, TagToTypedArray, ColumnsForSchema, MutableColumnsForSchema, ReadonlyColumn, ReadonlyUint32Array } from './component.js';
33
+ export { bundle } from './component.js';
34
+ export type { Bundle, BundleOrDef } from './component.js';
35
+ export type { SparseComponentDef, SparseComponentID, SparseSchemaOf } from './sparse_store.js';
36
+ export { SparseRestoreError } from './sparse_store.js';
37
+ export type { RelationDef, RelationID, RelationCardinality, RelationOptions, OnDeleteTarget } from './relation.js';
38
+ export { ANY_RELATION } from './relation.js';
39
+ export { registerIsA, registerChildOf, type BuiltinRelationOptions } from './builtin_relations.js';
40
+ export type { EventReader, EventKey, EventSchema, EventShape, EventFieldsCover, EmptyEventSchema, SignalKey } from './event.js';
41
+ export { eventKey, signalKey } from './event.js';
42
+ export type { ResourceKey, ResourceValueOf } from './resource.js';
43
+ export { resourceKey } from './resource.js';
44
+ export { dispatchTrace, type DispatchTraceSnapshot, type DispatchTraceEntry } from './dispatch_trace.js';
45
+ export { ECSError, ECS_ERROR, isEcsError } from './utils/error.js';
41
46
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/ecs/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,KAAK,UAAU,EAAE,MAAM,OAAO,CAAC;AAM7C,OAAO,EACN,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,+BAA+B,EAC/B,yBAAyB,EACzB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,MAAM,cAAc,CAAC;AAItB,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAM3F,YAAY,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAMnE,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7E,OAAO,EACN,QAAQ,EACR,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EAEzB,SAAS,EACT,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,MAAM,YAAY,CAAC;AAIpB,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,eAAe,EACf,cAAc,EACd,aAAa,EACb,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,YAAY,EACX,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,gBAAgB,EAChB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAO7C,YAAY,EACX,cAAc,EACd,cAAc,EACd,UAAU,EACV,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,0BAA0B,EAC1B,MAAM,YAAY,CAAC;AAUpB,OAAO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