@adobe/ecs 0.2.3 → 0.2.4

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 (179) hide show
  1. package/dist/implementation/compiler/body-access.d.ts +18 -1
  2. package/dist/implementation/compiler/body-access.js +104 -15
  3. package/dist/implementation/compiler/body-access.js.map +1 -1
  4. package/dist/implementation/compiler/estree.d.ts +5 -2
  5. package/dist/implementation/compiler/estree.js +8 -5
  6. package/dist/implementation/compiler/estree.js.map +1 -1
  7. package/dist/implementation/compiler/inferred.js +4 -2
  8. package/dist/implementation/compiler/inferred.js.map +1 -1
  9. package/dist/implementation/compiler/transform.js +5 -4
  10. package/dist/implementation/compiler/transform.js.map +1 -1
  11. package/dist/implementation/world/activate.js +14 -2
  12. package/dist/implementation/world/activate.js.map +1 -1
  13. package/dist/implementation/world/buffer.d.ts +7 -0
  14. package/dist/implementation/world/buffer.js +7 -0
  15. package/dist/implementation/world/buffer.js.map +1 -1
  16. package/dist/implementation/world/cascade.d.ts +10 -3
  17. package/dist/implementation/world/cascade.js +48 -23
  18. package/dist/implementation/world/cascade.js.map +1 -1
  19. package/dist/implementation/world/commands.js +40 -5
  20. package/dist/implementation/world/commands.js.map +1 -1
  21. package/dist/implementation/world/create.js +53 -2
  22. package/dist/implementation/world/create.js.map +1 -1
  23. package/dist/implementation/world/execute.d.ts +4 -4
  24. package/dist/implementation/world/execute.js +132 -83
  25. package/dist/implementation/world/execute.js.map +1 -1
  26. package/dist/implementation/world/finalizers.d.ts +2 -0
  27. package/dist/implementation/world/finalizers.js +24 -3
  28. package/dist/implementation/world/finalizers.js.map +1 -1
  29. package/dist/implementation/world/join.js +12 -2
  30. package/dist/implementation/world/join.js.map +1 -1
  31. package/dist/implementation/world/resource-changes.d.ts +18 -0
  32. package/dist/implementation/world/resource-changes.js +66 -0
  33. package/dist/implementation/world/resource-changes.js.map +1 -0
  34. package/dist/implementation/world/rows.js +21 -16
  35. package/dist/implementation/world/rows.js.map +1 -1
  36. package/dist/implementation/world/run-changes.d.ts +38 -0
  37. package/dist/implementation/world/run-changes.js +138 -0
  38. package/dist/implementation/world/run-changes.js.map +1 -0
  39. package/dist/implementation/world/runner.js +16 -12
  40. package/dist/implementation/world/runner.js.map +1 -1
  41. package/dist/implementation/world/state.d.ts +13 -0
  42. package/dist/implementation/world/state.js +13 -1
  43. package/dist/implementation/world/state.js.map +1 -1
  44. package/dist/implementation/world/synchronize.js +72 -22
  45. package/dist/implementation/world/synchronize.js.map +1 -1
  46. package/dist/implementation/world/tables-read.d.ts +5 -3
  47. package/dist/implementation/world/tables-read.js +16 -4
  48. package/dist/implementation/world/tables-read.js.map +1 -1
  49. package/dist/implementation/world/tables.d.ts +3 -2
  50. package/dist/implementation/world/tables.js +83 -37
  51. package/dist/implementation/world/tables.js.map +1 -1
  52. package/dist/implementation/world/thread-observer.js +1 -1
  53. package/dist/implementation/world/thread-observer.js.map +1 -1
  54. package/dist/implementation/world/thread-systems.js +10 -6
  55. package/dist/implementation/world/thread-systems.js.map +1 -1
  56. package/dist/implementation/world/up.js +7 -1
  57. package/dist/implementation/world/up.js.map +1 -1
  58. package/dist/implementation/world/where.d.ts +8 -0
  59. package/dist/implementation/world/where.js +40 -11
  60. package/dist/implementation/world/where.js.map +1 -1
  61. package/dist/interface/finalizer/body.d.ts +18 -3
  62. package/dist/interface/finalizer/create.d.ts +7 -5
  63. package/dist/interface/finalizer/create.js +8 -5
  64. package/dist/interface/finalizer/create.js.map +1 -1
  65. package/dist/interface/finalizer/declaration.d.ts +4 -2
  66. package/dist/interface/indexes/declaration-of.d.ts +17 -0
  67. package/dist/interface/indexes/declaration-of.js +20 -0
  68. package/dist/interface/indexes/declaration-of.js.map +1 -0
  69. package/dist/interface/indexes/index.d.ts +1 -0
  70. package/dist/interface/indexes/index.js +1 -0
  71. package/dist/interface/indexes/index.js.map +1 -1
  72. package/dist/interface/registry/schedule.d.ts +28 -1
  73. package/dist/interface/registry/schedule.js +182 -21
  74. package/dist/interface/registry/schedule.js.map +1 -1
  75. package/dist/interface/system/access.d.ts +15 -0
  76. package/dist/interface/system/check.d.ts +7 -0
  77. package/dist/interface/system/check.js +17 -3
  78. package/dist/interface/system/check.js.map +1 -1
  79. package/dist/interface/system/commands.d.ts +26 -5
  80. package/dist/interface/system/create-resolved.js +1 -1
  81. package/dist/interface/system/create-resolved.js.map +1 -1
  82. package/dist/interface/system/create.d.ts +10 -6
  83. package/dist/interface/system/create.js +5 -4
  84. package/dist/interface/system/create.js.map +1 -1
  85. package/dist/interface/system/describe.d.ts +120 -0
  86. package/dist/interface/system/describe.js +116 -0
  87. package/dist/interface/system/describe.js.map +1 -0
  88. package/dist/interface/system/index.d.ts +1 -0
  89. package/dist/interface/system/index.js +1 -0
  90. package/dist/interface/system/index.js.map +1 -1
  91. package/dist/interface/system/leaf.d.ts +6 -0
  92. package/dist/interface/system/render.js +1 -0
  93. package/dist/interface/system/render.js.map +1 -1
  94. package/dist/interface/system/resolve.d.ts +5 -1
  95. package/dist/interface/system/resolve.js +19 -1
  96. package/dist/interface/system/resolve.js.map +1 -1
  97. package/dist/interface/system/shared-only.d.ts +7 -0
  98. package/dist/interface/system/shared-only.js +2 -0
  99. package/dist/interface/system/shared-only.js.map +1 -0
  100. package/dist/interface/system/tables.d.ts +9 -1
  101. package/dist/interface/world/table/index.d.ts +3 -2
  102. package/dist/interface/world/world.d.ts +15 -0
  103. package/package.json +11 -2
  104. package/src/guide/03-systems.out +1 -1
  105. package/src/guide/06-sync-points.md +12 -8
  106. package/src/guide/06-sync-points.out +1 -2
  107. package/src/guide/06-sync-points.ts +9 -5
  108. package/src/guide/18-identity.out +1 -1
  109. package/src/guide/guide.test.ts +3 -150
  110. package/src/implementation/compiler/body-access.ts +102 -12
  111. package/src/implementation/compiler/estree.ts +9 -6
  112. package/src/implementation/compiler/inferred.test.ts +1 -1
  113. package/src/implementation/compiler/inferred.ts +4 -2
  114. package/src/implementation/compiler/transform.test.ts +41 -21
  115. package/src/implementation/compiler/transform.ts +5 -3
  116. package/src/implementation/world/activate.ts +11 -2
  117. package/src/implementation/world/batches.test.ts +3 -3
  118. package/src/implementation/world/buffer.ts +7 -0
  119. package/src/implementation/world/cascade.ts +46 -22
  120. package/src/implementation/world/commands.ts +36 -5
  121. package/src/implementation/world/create.test.ts +8 -8
  122. package/src/implementation/world/create.ts +57 -2
  123. package/src/implementation/world/despawn-where.test.ts +287 -0
  124. package/src/implementation/world/execute.ts +125 -78
  125. package/src/implementation/world/finalizers.ts +27 -4
  126. package/src/implementation/world/ids.test.ts +1 -1
  127. package/src/implementation/world/indexes.test.ts +2 -1
  128. package/src/implementation/world/join.test.ts +19 -0
  129. package/src/implementation/world/join.ts +16 -2
  130. package/src/implementation/world/names.test.ts +1 -2
  131. package/src/implementation/world/perf.md +3 -1
  132. package/src/implementation/world/resource-changes.test.ts +61 -0
  133. package/src/implementation/world/resource-changes.ts +67 -0
  134. package/src/implementation/world/rows.ts +21 -14
  135. package/src/implementation/world/rules.test.ts +37 -0
  136. package/src/implementation/world/run-changes.test.ts +88 -0
  137. package/src/implementation/world/run-changes.ts +160 -0
  138. package/src/implementation/world/runner.ts +17 -13
  139. package/src/implementation/world/shared.test.ts +2 -2
  140. package/src/implementation/world/state.ts +19 -0
  141. package/src/implementation/world/sync-points.test.ts +135 -0
  142. package/src/implementation/world/synchronize.ts +65 -18
  143. package/src/implementation/world/tables-read.ts +16 -5
  144. package/src/implementation/world/tables.test.ts +106 -4
  145. package/src/implementation/world/tables.ts +71 -33
  146. package/src/implementation/world/thread-observer.ts +1 -1
  147. package/src/implementation/world/thread-systems.ts +10 -6
  148. package/src/implementation/world/up.test.ts +13 -1
  149. package/src/implementation/world/up.ts +6 -1
  150. package/src/implementation/world/where.ts +38 -10
  151. package/src/interface/finalizer/body.ts +13 -3
  152. package/src/interface/finalizer/create.test.ts +3 -1
  153. package/src/interface/finalizer/create.ts +12 -7
  154. package/src/interface/finalizer/declaration.ts +4 -2
  155. package/src/interface/indexes/create.test.ts +10 -0
  156. package/src/interface/indexes/declaration-of.ts +34 -0
  157. package/src/interface/indexes/index.ts +1 -0
  158. package/src/interface/registry/schedule.ts +196 -23
  159. package/src/interface/system/access.ts +16 -0
  160. package/src/interface/system/check.ts +15 -2
  161. package/src/interface/system/commands.ts +23 -4
  162. package/src/interface/system/commands.type-test.ts +31 -0
  163. package/src/interface/system/create-resolved.ts +1 -1
  164. package/src/interface/system/create.test.ts +8 -0
  165. package/src/interface/system/create.ts +9 -5
  166. package/src/interface/system/describe.test.ts +79 -0
  167. package/src/interface/system/describe.ts +122 -0
  168. package/src/interface/system/index.ts +1 -0
  169. package/src/interface/system/leaf.ts +6 -0
  170. package/src/interface/system/render.ts +1 -0
  171. package/src/interface/system/resolve.ts +25 -2
  172. package/src/interface/system/shared-only.ts +5 -0
  173. package/src/interface/system/tables.ts +7 -1
  174. package/src/interface/world/run.type-test.ts +11 -1
  175. package/src/interface/world/table/index.ts +3 -2
  176. package/src/interface/world/world.ts +13 -0
  177. package/src/perftest/benchmarks.ts +18 -0
  178. package/src/perftest/structural.ts +20 -0
  179. package/src/perftest/tables.ts +107 -0
@@ -0,0 +1,120 @@
1
+ import type { System } from './system.js';
2
+ /**
3
+ * Describes how a system or composite runs: its tiers in run order, systems in one tier having no ordering path between
4
+ * them, each with the sync point after it, if any, and its readonly systems apart, which run after its last sync
5
+ * point. For each system, what the build inferred it reads, writes, looks up and commands, whether it takes its row
6
+ * whole, and the systems it follows directly, with what ordered it after each. `text` gives it all to read; the rest
7
+ * is data to assert on.
8
+ */
9
+ export declare const describe: <I, R>(system: System<I, R>) => {
10
+ tiers: {
11
+ systems: {
12
+ /** The system, the value its constructor returned. */
13
+ system: System<unknown, unknown>;
14
+ name: string;
15
+ components: {
16
+ read: symbol[];
17
+ write: readonly symbol[];
18
+ /** What it requires without reading: `with` members it doesn't use, `added` and `changed` filters' among them. */
19
+ has: readonly symbol[];
20
+ optional: readonly symbol[];
21
+ not: readonly symbol[];
22
+ added: readonly symbol[];
23
+ changed: readonly symbol[];
24
+ /** What it reads of each row's parent, through `up`. */
25
+ parent: readonly symbol[];
26
+ };
27
+ resources: {
28
+ read: readonly symbol[];
29
+ write: readonly symbol[];
30
+ reduce: readonly symbol[];
31
+ changed: readonly symbol[];
32
+ is: readonly symbol[];
33
+ not: readonly symbol[];
34
+ };
35
+ lookups: {
36
+ name: string;
37
+ /** The label of the index it looks up through, or null for a lookup by entity. */
38
+ index: string | null;
39
+ read: readonly symbol[];
40
+ }[];
41
+ /** The label of the sorted index ordering its rows, or null. */
42
+ order: string | null;
43
+ /** What its commands name by kind, and whether it despawns; null where the build couldn't follow them. */
44
+ commands: {
45
+ spawn: readonly symbol[];
46
+ add: readonly symbol[];
47
+ remove: readonly symbol[];
48
+ despawn: boolean;
49
+ } | null;
50
+ /** Whether it takes its row whole (`components: { whole: true }`), every member written. */
51
+ whole: boolean;
52
+ /** The systems it follows directly, with what ordered it after each and the keys that need that order. */
53
+ after: {
54
+ system: System<unknown, unknown>;
55
+ name: string;
56
+ because: "before" | "after" | "during" | "reduction";
57
+ conflicts: readonly symbol[];
58
+ }[];
59
+ }[];
60
+ /**
61
+ * Why a sync point follows the tier, applying the commands so far: each system whose commands may change what a
62
+ * later one that follows it uses, through `keys`, none listed where it despawns or a cascade could; null for none.
63
+ */
64
+ sync: {
65
+ from: System<unknown, unknown>;
66
+ to: System<unknown, unknown>;
67
+ keys: readonly symbol[];
68
+ }[] | null;
69
+ }[];
70
+ readonly: {
71
+ /** The system, the value its constructor returned. */
72
+ system: System<unknown, unknown>;
73
+ name: string;
74
+ components: {
75
+ read: symbol[];
76
+ write: readonly symbol[];
77
+ /** What it requires without reading: `with` members it doesn't use, `added` and `changed` filters' among them. */
78
+ has: readonly symbol[];
79
+ optional: readonly symbol[];
80
+ not: readonly symbol[];
81
+ added: readonly symbol[];
82
+ changed: readonly symbol[];
83
+ /** What it reads of each row's parent, through `up`. */
84
+ parent: readonly symbol[];
85
+ };
86
+ resources: {
87
+ read: readonly symbol[];
88
+ write: readonly symbol[];
89
+ reduce: readonly symbol[];
90
+ changed: readonly symbol[];
91
+ is: readonly symbol[];
92
+ not: readonly symbol[];
93
+ };
94
+ lookups: {
95
+ name: string;
96
+ /** The label of the index it looks up through, or null for a lookup by entity. */
97
+ index: string | null;
98
+ read: readonly symbol[];
99
+ }[];
100
+ /** The label of the sorted index ordering its rows, or null. */
101
+ order: string | null;
102
+ /** What its commands name by kind, and whether it despawns; null where the build couldn't follow them. */
103
+ commands: {
104
+ spawn: readonly symbol[];
105
+ add: readonly symbol[];
106
+ remove: readonly symbol[];
107
+ despawn: boolean;
108
+ } | null;
109
+ /** Whether it takes its row whole (`components: { whole: true }`), every member written. */
110
+ whole: boolean;
111
+ /** The systems it follows directly, with what ordered it after each and the keys that need that order. */
112
+ after: {
113
+ system: System<unknown, unknown>;
114
+ name: string;
115
+ because: "before" | "after" | "during" | "reduction";
116
+ conflicts: readonly symbol[];
117
+ }[];
118
+ }[];
119
+ text: string;
120
+ };
@@ -0,0 +1,116 @@
1
+ // © 2026 Adobe. MIT License. See /LICENSE for details.
2
+ import { indexDefinitionOf } from '../registry/indexes.js';
3
+ import { labelOf } from '../registry/names.js';
4
+ import { requireDefinition } from '../registry/program.js';
5
+ import { isLeaf, placementsOf, scheduleOf } from '../registry/schedule.js';
6
+ const none = [];
7
+ /** A leaf as the system value it is. */
8
+ const asSystem = (leaf) => leaf;
9
+ /** What the build inferred one system uses, and what placed it, as plain data. */
10
+ const describeLeaf = (leaf, placements) => {
11
+ const { components, resources, lookup, up, order } = leaf.declaration;
12
+ const { commands } = leaf;
13
+ return {
14
+ /** The system, the value its constructor returned. */
15
+ system: asSystem(leaf),
16
+ name: leaf.name,
17
+ components: {
18
+ read: [...components?.read ?? none, ...up === undefined ? none : [up.through]],
19
+ write: components?.write ?? none,
20
+ /** What it requires without reading: `with` members it doesn't use, `added` and `changed` filters' among them. */
21
+ has: components?.has ?? none,
22
+ optional: components?.optional ?? none,
23
+ not: components?.not ?? none,
24
+ added: components?.added ?? none,
25
+ changed: components?.changed ?? none,
26
+ /** What it reads of each row's parent, through `up`. */
27
+ parent: up?.read ?? none,
28
+ },
29
+ resources: {
30
+ read: resources?.read ?? none,
31
+ write: resources?.write ?? none,
32
+ reduce: resources?.reduce ?? none,
33
+ changed: resources?.changed ?? none,
34
+ is: resources?.is ?? none,
35
+ not: resources?.not ?? none,
36
+ },
37
+ lookups: Object.entries(lookup ?? {}).map(([name, used]) => ({
38
+ name,
39
+ /** The label of the index it looks up through, or null for a lookup by entity. */
40
+ index: "index" in used && used.index !== undefined ? indexDefinitionOf(used.index)?.name ?? null : null,
41
+ read: used.read ?? none,
42
+ })),
43
+ /** The label of the sorted index ordering its rows, or null. */
44
+ order: indexDefinitionOf(order)?.name ?? null,
45
+ /** What its commands name by kind, and whether it despawns; null where the build couldn't follow them. */
46
+ commands: commands === null ? null : {
47
+ spawn: commands?.spawn ?? none,
48
+ add: commands?.add ?? none,
49
+ remove: commands?.remove ?? none,
50
+ despawn: commands?.despawn === true,
51
+ },
52
+ /** Whether it takes its row whole (`components: { whole: true }`), every member written. */
53
+ whole: components?.whole === true,
54
+ /** The systems it follows directly, with what ordered it after each and the keys that need that order. */
55
+ after: placements.map(placement => ({ system: asSystem(placement.leaf), name: placement.leaf.name, because: placement.because, conflicts: placement.conflicts })),
56
+ };
57
+ };
58
+ const keys = (list) => list.map(labelOf).join(" ");
59
+ /** A system's lines of text, after its name in a column of `width`. */
60
+ const linesOf = (system, width) => {
61
+ const lines = [];
62
+ const add = (label, text) => { if (text !== "")
63
+ lines.push(`${label.padEnd(10)}${text}`); };
64
+ const { components, resources, commands } = system;
65
+ add("reads", keys(components.read));
66
+ add("writes", `${keys(components.write)}${system.whole ? " (its whole row)" : ""}`);
67
+ add("requires", [keys(components.has), components.not.length === 0 ? "" : `not ${keys(components.not)}`, components.optional.length === 0 ? "" : `optional ${keys(components.optional)}`].filter(text => text !== "").join(", "));
68
+ add("filters", [...components.added.map(key => `added ${labelOf(key)}`), ...components.changed.map(key => `changed ${labelOf(key)}`), ...resources.changed.map(key => `changed ${labelOf(key)}`)].join(", "));
69
+ add("parent", keys(components.parent));
70
+ add("resources", [resources.read.length === 0 ? "" : `reads ${keys(resources.read)}`, resources.write.length === 0 ? "" : `writes ${keys(resources.write)}`,
71
+ resources.reduce.length === 0 ? "" : `reduces ${keys(resources.reduce)}`, resources.is.length === 0 ? "" : `while ${keys(resources.is)}`,
72
+ resources.not.length === 0 ? "" : `unless ${keys(resources.not)}`].filter(text => text !== "").join(", "));
73
+ for (const lookup of system.lookups)
74
+ add("looks up", `${lookup.name}${lookup.index === null ? "" : ` through ${lookup.index}`}${lookup.read.length === 0 ? "" : `: ${keys(lookup.read)}`}`);
75
+ if (system.order !== null)
76
+ add("ordered", `by ${system.order}`);
77
+ if (commands === null)
78
+ add("commands", "unknown: the build couldn't follow them");
79
+ else
80
+ add("commands", [commands.spawn.length === 0 ? "" : `spawn ${keys(commands.spawn)}`, commands.add.length === 0 ? "" : `add ${keys(commands.add)}`,
81
+ commands.remove.length === 0 ? "" : `remove ${keys(commands.remove)}`, commands.despawn ? "despawn" : ""].filter(text => text !== "").join(", "));
82
+ add("after", system.after.map(placement => `${placement.name} (${placement.because}${placement.conflicts.length === 0 ? "" : `: ${keys(placement.conflicts)}`})`).join(", "));
83
+ const indent = " ".repeat(width);
84
+ return lines.length === 0 ? [system.name] : lines.map((line, i) => `${i === 0 ? system.name.padEnd(width) : indent}${line}`);
85
+ };
86
+ /**
87
+ * Describes how a system or composite runs: its tiers in run order, systems in one tier having no ordering path between
88
+ * them, each with the sync point after it, if any, and its readonly systems apart, which run after its last sync
89
+ * point. For each system, what the build inferred it reads, writes, looks up and commands, whether it takes its row
90
+ * whole, and the systems it follows directly, with what ordered it after each. `text` gives it all to read; the rest
91
+ * is data to assert on.
92
+ */
93
+ export const describe = (system) => {
94
+ const definition = requireDefinition(system);
95
+ const schedule = scheduleOf(definition);
96
+ const placements = placementsOf(definition);
97
+ const tiers = schedule.tiers.map((tier, t) => ({
98
+ systems: tier.map(leaf => describeLeaf(leaf, placements.get(leaf) ?? none)),
99
+ /**
100
+ * Why a sync point follows the tier, applying the commands so far: each system whose commands may change what a
101
+ * later one that follows it uses, through `keys`, none listed where it despawns or a cascade could; null for none.
102
+ */
103
+ sync: schedule.syncs[t]?.map(reason => ({ from: asSystem(reason.from), to: asSystem(reason.to), keys: reason.keys })) ?? null,
104
+ }));
105
+ const readonly = schedule.observer.flatMap(member => isLeaf(member) ? [describeLeaf(member, none)] : []);
106
+ const width = Math.max(0, ...[...tiers.flatMap(tier => tier.systems), ...readonly].map(described => described.name.length)) + 2;
107
+ const text = [
108
+ ...tiers.flatMap((tier, t) => [
109
+ ...tier.systems.flatMap((described, i) => linesOf(described, width).map((line, l) => `${(i === 0 && l === 0 ? `tier ${t}` : "").padEnd(8)}${line}`)),
110
+ ...(tier.sync ?? none).map((reason, r) => `${(r === 0 ? "sync" : "").padEnd(8)}${reason.from.name}'s commands${reason.keys.length === 0 ? "" : ` of ${keys(reason.keys)}`}, for ${reason.to.name}`),
111
+ ]),
112
+ ...readonly.length === 0 ? none : ["readonly", ...readonly.flatMap(described => linesOf(described, width).map(line => `${"".padEnd(8)}${line}`))],
113
+ ].map(line => line.trimEnd()).join("\n");
114
+ return { tiers, readonly, text };
115
+ };
116
+ //# sourceMappingURL=describe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"describe.js","sourceRoot":"","sources":["../../../src/interface/system/describe.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAkB,MAAM,yBAAyB,CAAC;AAM3F,MAAM,IAAI,GAAqB,EAAE,CAAC;A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K,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC;YACpJ,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,cAAc,MAAM,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,SAAS,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;SACtM,CAAC;QACF,GAAG,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,GAAG,QAAQ,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;KACpJ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACrC,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export type { Commands } from './commands.js';
2
2
  export * from './create.js';
3
+ export { describe } from './describe.js';
3
4
  export { render, type RenderContext, type RenderTable } from './render.js';
@@ -1,3 +1,4 @@
1
1
  export * from './create.js';
2
+ export { describe } from './describe.js';
2
3
  export { render } from './render.js';
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interface/system/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAwC,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interface/system/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAwC,MAAM,aAAa,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { Schema } from '../schema/schema.js';
2
+ import type { CommandLists } from './access.js';
2
3
  import type { Resolved } from './declaration.js';
3
4
  import type { Name } from './name.js';
4
5
  /** The schema of a body's input: an object of named fields. */
@@ -16,4 +17,9 @@ export type Leaf = {
16
17
  readonly declaration: Resolved;
17
18
  readonly input: InputSchema | undefined;
18
19
  readonly body: (...parameters: never[]) => void;
20
+ /**
21
+ * What its body's commands name, as the build inferred them: null where it couldn't follow them, undefined for
22
+ * none. Apart from its declaration, so a module evaluated again with other commands declares the same system.
23
+ */
24
+ readonly commands?: CommandLists | null;
19
25
  };
@@ -33,6 +33,7 @@ export const render = (declaration, body) => {
33
33
  },
34
34
  input: undefined,
35
35
  body,
36
+ commands: undefined,
36
37
  };
37
38
  if (uses.write.length > 0 || uses.reduce.length > 0)
38
39
  throw new Error(`${what} writes or reduces into resources; a render system only reads.`);
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","sourceRoot":"","sources":["../../../src/interface/system/render.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9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;QAChB,IAAI;QACJ,QAAQ,EAAE,SAAS;KACtB,CAAC;IACF,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,gEAAgE,CAAC,CAAC;IAC9I,SAAS,CAAC,MAAM,CAAC,CAAC;IAClB,MAAM,SAAS,GAAG,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAClD,IAAI,OAAO,SAAS,KAAK,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,WAAW,IAAI,mBAAmB,SAAS,GAAG,CAAC,CAAC;IACnG,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACxB,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { ComponentAccess, ComponentLists, Lookup, SystemLookup, SystemLookupLists } from './access.js';
1
+ import type { CommandLists, ComponentAccess, ComponentLists, Lookup, SystemLookup, SystemLookupLists } from './access.js';
2
2
  type Key = symbol;
3
3
  /** What a body reads and writes of a group of keys, and those it changes inside their values, read as well. */
4
4
  type Used = {
@@ -23,6 +23,8 @@ export type Access = {
23
23
  readonly up: readonly Key[] | null;
24
24
  /** The resources the predicates of its declaration's `where` read; absent without predicates. */
25
25
  readonly where?: readonly Key[] | null;
26
+ /** What its commands name, keys or lists of them, by kind, and whether it despawns; absent where no build said. */
27
+ readonly commands?: unknown;
26
28
  readonly at: string;
27
29
  };
28
30
  /**
@@ -63,6 +65,8 @@ export declare const resourceUses: (what: string, access: Access, is: readonly K
63
65
  * them, since the world couldn't tell when to evaluate them again.
64
66
  */
65
67
  export declare const whereReadsOf: (what: string, components: ComponentAccess | undefined, access: Access) => readonly Key[];
68
+ /** What a body's commands name, as the world takes it: null where the build couldn't follow them, nothing for none. */
69
+ export declare const commandLists: (access: Access) => CommandLists | null | undefined;
66
70
  /** What a body reads of its parent's values. */
67
71
  export declare const upReads: (what: string, access: Access) => readonly Key[];
68
72
  export {};
@@ -4,6 +4,11 @@ import { indexDefinitionOf } from '../registry/indexes.js';
4
4
  import { declarationOf, labelOf } from '../registry/names.js';
5
5
  import { isString, isStruct } from '../registry/schemas.js';
6
6
  const isKeys = (value) => Array.isArray(value) && value.every(key => typeof key === "symbol");
7
+ const isNamed = (value) => Array.isArray(value) && value.every(item => typeof item === "symbol" || isKeys(item));
8
+ /** A binding a command named that holds neither a key nor a list of them, as one declared below its system, isn't followed. */
9
+ const isCommanded = (value) => typeof value === "object" && value !== null
10
+ && isNamed(Reflect.get(value, "spawn")) && isNamed(Reflect.get(value, "add")) && isNamed(Reflect.get(value, "remove"))
11
+ && typeof Reflect.get(value, "despawn") === "boolean";
7
12
  const isUsed = (value) => typeof value === "object" && value !== null
8
13
  && isKeys(Reflect.get(value, "read")) && isKeys(Reflect.get(value, "write"))
9
14
  && (Reflect.get(value, "mutate") === undefined || isKeys(Reflect.get(value, "mutate")));
@@ -79,7 +84,7 @@ export const componentLists = (components, used, reading, whereReads = []) => {
79
84
  : used.write;
80
85
  const read = used === null ? without(held, write) : without(used.read, write);
81
86
  const has = [...without(members, read, write), ...without(filtered, read, write)];
82
- return compact({ read, write, has, optional, not: components.not, added: components.added, changed: components.changed, where, whereReads });
87
+ return compact({ read, write, has, optional, not: components.not, added: components.added, changed: components.changed, where, whereReads, whole: components.whole });
83
88
  };
84
89
  /**
85
90
  * A lookup's lists: what the body reads of its rows, the rest of its `with` only required. Without the body's uses,
@@ -133,6 +138,19 @@ export const whereReadsOf = (what, components, access) => {
133
138
  throw new Error(`${what}'s where predicates (${access.at}) read resources in a way the build can't follow, so it can't tell when to evaluate them again: index them by key directly, or destructure them by key, in a predicate written in place in a module built with Compiler.plugin().`);
134
139
  return reads;
135
140
  };
141
+ /** What a body's commands name, as the world takes it: null where the build couldn't follow them, nothing for none. */
142
+ export const commandLists = (access) => {
143
+ const { commands } = access;
144
+ if (commands === undefined)
145
+ return undefined;
146
+ if (!isCommanded(commands))
147
+ return null;
148
+ if (!commands.despawn && commands.spawn.length + commands.add.length + commands.remove.length === 0)
149
+ return undefined;
150
+ const flat = (named) => [...new Set(named.flat())];
151
+ const lists = compact({ spawn: flat(commands.spawn), add: flat(commands.add), remove: flat(commands.remove), despawn: commands.despawn ? true : undefined });
152
+ return Object.keys(lists).length === 0 ? undefined : lists;
153
+ };
136
154
  /** What a body reads of its parent's values. */
137
155
  export const upReads = (what, access) => followed(what, access.up, "its parent's values", access);
138
156
  //# sourceMappingURL=resolve.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../../src/interface/system/resolve.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAwB5D,MAAM,MAAM,GAAG,CAAC,KAAc,EAA2B,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC;AAEhI,MAAM,MAAM,GAAG,CAAC,KAAc,EAAiB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;OACtF,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;OACzE,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,SAAS,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,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KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;AAC/D,CAAC,CAAC;AAEF,gDAAgD;AAChD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,IAAY,EAAE,MAAc,EAAkB,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,qBAAqB,EAAE,MAAM,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { Shared } from '../component/value.js';
2
+ /** A `where`'s keys that aren't shared components, each an error: `where` names only shared components. */
3
+ export type SharedOnly<W> = {
4
+ readonly [K in Exclude<keyof W, Shared>]: {
5
+ readonly "error: where names only shared components, which each archetype holds one value of": K;
6
+ };
7
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=shared-only.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-only.js","sourceRoot":"","sources":["../../../src/interface/system/shared-only.ts"],"names":[],"mappings":""}
@@ -1,14 +1,22 @@
1
1
  import type { Component } from '../component/component.js';
2
+ import type { Shared } from '../component/value.js';
2
3
  import type { Resource } from '../resource/resource.js';
3
4
  import type { Table } from '../world/table/table.js';
4
5
  /**
5
- * What a readonly system's `tables` reads: of every archetype matching `with` and `not` that holds any of
6
+ * What a readonly system's `tables` reads: of every archetype matching `with`, `not` and `where` that holds any of
6
7
  * `components`, a table of those it holds; and, with `resources`, each resource's value.
7
8
  */
8
9
  export type TablesDeclaration = {
9
10
  readonly components: readonly Component.Key[];
10
11
  readonly with?: readonly Component.Key[];
11
12
  readonly not?: readonly Component.Key[];
13
+ /**
14
+ * Keeps the tables to the archetypes holding these values of shared components, each one required as `with`
15
+ * requires it, as a system's `where` of values keeps its system to them.
16
+ */
17
+ readonly where?: {
18
+ readonly [K in Shared]?: Component<K>;
19
+ };
12
20
  readonly resources?: readonly Resource.Key[];
13
21
  };
14
22
  /** A readonly system's `tables`: a table of each archetype its declaration reads, and the values of the resources it reads. */
@@ -17,8 +17,9 @@ export type Column = {
17
17
  readonly value: unknown;
18
18
  };
19
19
  /**
20
- * What `commands.spawnTables` spawned: each table's new entities in its row order, `Entity.none` for a row it didn't
21
- * spawn, and how many rows it didn't, those owned by an entity outside the tables.
20
+ * What `commands.spawnTables` spawned: each table's entities in its row order, the one spawned for each row, the one
21
+ * existing for a row its `existing` maps, and `Entity.none` for a row it didn't spawn; and how many rows it didn't,
22
+ * those owned by an entity outside the tables.
22
23
  */
23
24
  export type Spawned = {
24
25
  readonly entities: readonly Float64Array[];
@@ -1,5 +1,8 @@
1
1
  import type { Input } from '../system/input.js';
2
2
  import type { System } from '../system/system.js';
3
+ import type { ChangeSet } from '../finalizer/body.js';
4
+ import type { Essential } from '../component/value.js';
5
+ import type { Resource } from '../resource/resource.js';
3
6
  /**
4
7
  * A world. Systems read and change it; readonly systems read it after each run's and tick's sync point. Every member's
5
8
  * type is named from the package root, so declarations a consumer emits for its results name no internal module.
@@ -21,6 +24,18 @@ export type World = {
21
24
  * added or GPU work, is reported out of band, as ticks' failures are (see `add`).
22
25
  */
23
26
  run<I, R>(system: System<I, R>, ...input: Input<NoInfer<I>>): Promise<R>;
27
+ /**
28
+ * Runs as `run` does, and resolves to this run's own changes, in the shape `Finalizer.changes` gives, rather than its
29
+ * value: the structural changes its commands made, rules and cascades included, to every component that isn't
30
+ * derived or an object a joined thread fills, the values its adds gave components entities had before and after, and
31
+ * each resource its systems write or reduce into whose value changed, compared as `Finalizer.changes` compares them;
32
+ * `previous` and `next` give values before and after the run. Commands the finalizers of an earlier sync point
33
+ * queued apply first, at a sync point of their own. Values written to rows aren't structural changes, so they're in
34
+ * none. The run pays for this only when asked. Only on the world's thread: a joined thread's rejects.
35
+ */
36
+ run<I, R>(system: System<I, R>, ...input: [...Input<NoInfer<I>>, options: {
37
+ readonly changes: true;
38
+ }]): Promise<ChangeSet<Essential, Resource.Key>>;
24
39
  /**
25
40
  * Adds a system to every tick, from the next one on, ordered with those already added by its constraints, as a
26
41
  * composite's members are. A tick runs on a beat of the `cadence` resource where `always` is set, `wake` is due or
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/ecs",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Adobe ECS",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -46,7 +46,8 @@
46
46
  "typescript": "^5.8.3",
47
47
  "vite": "^8.3.4",
48
48
  "vitest": "^5.0.5",
49
- "wabt": "1.0.39"
49
+ "wabt": "1.0.39",
50
+ "ecs-guide-checks": "0.0.0"
50
51
  },
51
52
  "peerDependencies": {
52
53
  "vite": "^8.0.0"
@@ -66,6 +67,14 @@
66
67
  "types": "./dist/implementation/compiler/index.d.ts"
67
68
  }
68
69
  },
70
+ "guide": {
71
+ "files": [
72
+ "src/index.ts",
73
+ "src/interface/**/*.ts",
74
+ "dist/index.js",
75
+ "dist/interface/**/*.js"
76
+ ]
77
+ },
69
78
  "scripts": {
70
79
  "build": "cp ../../LICENSE . && tsc -b",
71
80
  "dev": "tsc -b -w --preserveWatchOutput",
@@ -1,5 +1,5 @@
1
1
  at [ 0, 1, 5 ]
2
2
  moving [ 'at 2', 'at 2', 'still' ]
3
3
  frames 1
4
- Error: System "fail" (@adobe/ecs@0.2.3/src/guide/03-systems.ts#fail) failed: broken
4
+ Error: System "fail" (@adobe/ecs@0.2.4/src/guide/03-systems.ts#fail) failed: broken
5
5
  frames 2
@@ -1,18 +1,22 @@
1
1
  # Sync points
2
2
 
3
- A run ends at a *sync point*, where its commands apply.
3
+ A run applies its commands at *sync points*.
4
4
 
5
5
  - **Values** written to rows and resources apply at once.
6
- - **Commands** wait for the sync point, then apply in the order issued. `commands.spawn` returns the new entity at
7
- once, so [later commands can name it](06-sync-points.ts#L16-L21): `commands.add` sets the hero's health to 5. An
6
+ - **Commands** wait for a sync point, then apply in the order issued. `commands.spawn` returns the new entity at
7
+ once, so [later commands can name it](06-sync-points.ts#L18-L23): `commands.add` sets the hero's health to 5. An
8
8
  entity spawned and removed with `commands.despawn` before the sync point never exists.
9
9
 
10
- A composite is one run with one sync point. In [`frame`](06-sync-points.ts#L25), `count` runs `after: [spawn]` but
11
- before the spawned entities exist, so it counts none; run alone, after the sync point, it counts the hero.
10
+ Every run ends at a sync point. Within it, the build tells which components each system's commands name, and a system
11
+ that follows one whose commands could change what it reads, matches, looks up or indexes gets a sync point before its
12
+ tier. In [`frame`](06-sync-points.ts#L30), `count` runs `after: [spawn]`, so the hero exists by then and it counts it;
13
+ [`early`](06-sync-points.ts#L27-L29), ordered with nothing, runs beside `spawn`, before that sync point, and counts
14
+ none. Sync points cost a little each, so a run adds the fewest that put one between every such pair, and none where no
15
+ system depends on another's commands.
12
16
 
13
- **Readonly systems.** `readonly: true` places a system after the sync point, so it reads what the commands did. Added
14
- to a world, [`watch`](06-sync-points.ts#L27-L29) runs after the sync point of every run and tick, and logs the hero
15
- after the run that spawned it; `count`, which isn't readonly, runs before the sync point, in its tier.
17
+ **Readonly systems.** `readonly: true` places a system after the last sync point, so it reads what the commands did.
18
+ Added to a world, [`watch`](06-sync-points.ts#L32-L34) runs after the last sync point of every run and tick, and logs
19
+ the hero after the run that spawned it; `count`, which isn't readonly, runs in its tier.
16
20
 
17
21
  - **Where:** a readonly system runs on the thread that added or ran it, so a [joined thread](19-threads.md) adds only
18
22
  readonly systems.
@@ -1,3 +1,2 @@
1
- counted 0
2
- counted 1
1
+ counted 1 early 0
3
2
  health 5
@@ -3,6 +3,7 @@ import { System, World } from "../index.js";
3
3
 
4
4
  const health = Symbol();
5
5
  const seen = Symbol();
6
+ const seenEarly = Symbol();
6
7
 
7
8
  declare module "@adobe/ecs" {
8
9
  interface Components {
@@ -10,6 +11,7 @@ declare module "@adobe/ecs" {
10
11
  }
11
12
  interface Resources {
12
13
  [seen]: { type: number };
14
+ [seenEarly]: { type: number };
13
15
  }
14
16
  }
15
17
 
@@ -22,19 +24,21 @@ const spawn = System.create(({ commands }) => {
22
24
  const count = System.create({ components: { with: [health] }, after: [spawn] }, (row, { resources }) => {
23
25
  resources[seen] += 1;
24
26
  });
25
- const frame = System.create([spawn, count]);
27
+ const early = System.create({ components: { with: [health] } }, (row, { resources }) => {
28
+ resources[seenEarly] += 1;
29
+ });
30
+ const frame = System.create([spawn, count, early]);
26
31
 
27
32
  const watch = System.create({ readonly: true, components: { with: [health] } }, row => {
28
33
  console.log("health", row[health]);
29
34
  });
30
- const readSeen = System.create({ readonly: true }, ({ resources }) => resources[seen]);
35
+ const readSeen = System.create({ readonly: true }, ({ resources }) => [resources[seen], resources[seenEarly]]);
31
36
 
32
37
  export const main = async (): Promise<void> => {
33
38
  await using world = World.create();
34
39
  await world.run(frame);
35
- console.log("counted", await world.run(readSeen));
36
- await world.run(count);
37
- console.log("counted", await world.run(readSeen));
40
+ const [counted, countedEarly] = await world.run(readSeen);
41
+ console.log("counted", counted, "early", countedEarly);
38
42
 
39
43
  await using watched = World.create();
40
44
  watched.add(watch);