@fundamental-engine/core 0.4.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 (371) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +128 -0
  3. package/dist/agents/element-agent.d.ts +38 -0
  4. package/dist/agents/element-agent.d.ts.map +1 -0
  5. package/dist/agents/element-agent.js +70 -0
  6. package/dist/agents/element-agent.js.map +1 -0
  7. package/dist/agents/event-agent.d.ts +47 -0
  8. package/dist/agents/event-agent.d.ts.map +1 -0
  9. package/dist/agents/event-agent.js +82 -0
  10. package/dist/agents/event-agent.js.map +1 -0
  11. package/dist/agents/index.d.ts +17 -0
  12. package/dist/agents/index.d.ts.map +1 -0
  13. package/dist/agents/index.js +57 -0
  14. package/dist/agents/index.js.map +1 -0
  15. package/dist/agents/region-agents.d.ts +40 -0
  16. package/dist/agents/region-agents.d.ts.map +1 -0
  17. package/dist/agents/region-agents.js +22 -0
  18. package/dist/agents/region-agents.js.map +1 -0
  19. package/dist/agents/relationship.d.ts +55 -0
  20. package/dist/agents/relationship.d.ts.map +1 -0
  21. package/dist/agents/relationship.js +40 -0
  22. package/dist/agents/relationship.js.map +1 -0
  23. package/dist/agents/user-agent.d.ts +57 -0
  24. package/dist/agents/user-agent.d.ts.map +1 -0
  25. package/dist/agents/user-agent.js +45 -0
  26. package/dist/agents/user-agent.js.map +1 -0
  27. package/dist/config/forces.config.d.ts +101 -0
  28. package/dist/config/forces.config.d.ts.map +1 -0
  29. package/dist/config/forces.config.js +239 -0
  30. package/dist/config/forces.config.js.map +1 -0
  31. package/dist/config/manual.d.ts +134 -0
  32. package/dist/config/manual.d.ts.map +1 -0
  33. package/dist/config/manual.js +604 -0
  34. package/dist/config/manual.js.map +1 -0
  35. package/dist/config/palettes.d.ts +18 -0
  36. package/dist/config/palettes.d.ts.map +1 -0
  37. package/dist/config/palettes.js +34 -0
  38. package/dist/config/palettes.js.map +1 -0
  39. package/dist/config/presets.d.ts +48 -0
  40. package/dist/config/presets.d.ts.map +1 -0
  41. package/dist/config/presets.js +87 -0
  42. package/dist/config/presets.js.map +1 -0
  43. package/dist/config/tokens.d.ts +3 -0
  44. package/dist/config/tokens.d.ts.map +1 -0
  45. package/dist/config/tokens.js +16 -0
  46. package/dist/config/tokens.js.map +1 -0
  47. package/dist/conformance/expectations.d.ts +40 -0
  48. package/dist/conformance/expectations.d.ts.map +1 -0
  49. package/dist/conformance/expectations.js +347 -0
  50. package/dist/conformance/expectations.js.map +1 -0
  51. package/dist/conformance/experiments.d.ts +17 -0
  52. package/dist/conformance/experiments.d.ts.map +1 -0
  53. package/dist/conformance/experiments.js +875 -0
  54. package/dist/conformance/experiments.js.map +1 -0
  55. package/dist/conformance/run.d.ts +18 -0
  56. package/dist/conformance/run.d.ts.map +1 -0
  57. package/dist/conformance/run.js +240 -0
  58. package/dist/conformance/run.js.map +1 -0
  59. package/dist/conformance/types.d.ts +100 -0
  60. package/dist/conformance/types.d.ts.map +1 -0
  61. package/dist/conformance/types.js +2 -0
  62. package/dist/conformance/types.js.map +1 -0
  63. package/dist/contracts/guards.d.ts +51 -0
  64. package/dist/contracts/guards.d.ts.map +1 -0
  65. package/dist/contracts/guards.js +100 -0
  66. package/dist/contracts/guards.js.map +1 -0
  67. package/dist/contracts/index.d.ts +18 -0
  68. package/dist/contracts/index.d.ts.map +1 -0
  69. package/dist/contracts/index.js +107 -0
  70. package/dist/contracts/index.js.map +1 -0
  71. package/dist/contracts/passport.d.ts +88 -0
  72. package/dist/contracts/passport.d.ts.map +1 -0
  73. package/dist/contracts/passport.js +135 -0
  74. package/dist/contracts/passport.js.map +1 -0
  75. package/dist/contracts/types.d.ts +120 -0
  76. package/dist/contracts/types.d.ts.map +1 -0
  77. package/dist/contracts/types.js +24 -0
  78. package/dist/contracts/types.js.map +1 -0
  79. package/dist/core/accretion.d.ts +50 -0
  80. package/dist/core/accretion.d.ts.map +1 -0
  81. package/dist/core/accretion.js +98 -0
  82. package/dist/core/accretion.js.map +1 -0
  83. package/dist/core/agents.d.ts +31 -0
  84. package/dist/core/agents.d.ts.map +1 -0
  85. package/dist/core/agents.js +51 -0
  86. package/dist/core/agents.js.map +1 -0
  87. package/dist/core/attention.d.ts +72 -0
  88. package/dist/core/attention.d.ts.map +1 -0
  89. package/dist/core/attention.js +122 -0
  90. package/dist/core/attention.js.map +1 -0
  91. package/dist/core/causality.d.ts +38 -0
  92. package/dist/core/causality.d.ts.map +1 -0
  93. package/dist/core/causality.js +64 -0
  94. package/dist/core/causality.js.map +1 -0
  95. package/dist/core/conditions.d.ts +10 -0
  96. package/dist/core/conditions.d.ts.map +1 -0
  97. package/dist/core/conditions.js +22 -0
  98. package/dist/core/conditions.js.map +1 -0
  99. package/dist/core/currents.d.ts +53 -0
  100. package/dist/core/currents.d.ts.map +1 -0
  101. package/dist/core/currents.js +65 -0
  102. package/dist/core/currents.js.map +1 -0
  103. package/dist/core/dock.d.ts +35 -0
  104. package/dist/core/dock.d.ts.map +1 -0
  105. package/dist/core/dock.js +39 -0
  106. package/dist/core/dock.js.map +1 -0
  107. package/dist/core/events.d.ts +23 -0
  108. package/dist/core/events.d.ts.map +1 -0
  109. package/dist/core/events.js +34 -0
  110. package/dist/core/events.js.map +1 -0
  111. package/dist/core/feedback-sink.d.ts +32 -0
  112. package/dist/core/feedback-sink.d.ts.map +1 -0
  113. package/dist/core/feedback-sink.js +53 -0
  114. package/dist/core/feedback-sink.js.map +1 -0
  115. package/dist/core/feedback.d.ts +11 -0
  116. package/dist/core/feedback.d.ts.map +1 -0
  117. package/dist/core/feedback.js +16 -0
  118. package/dist/core/feedback.js.map +1 -0
  119. package/dist/core/field-store.d.ts +26 -0
  120. package/dist/core/field-store.d.ts.map +1 -0
  121. package/dist/core/field-store.js +54 -0
  122. package/dist/core/field-store.js.map +1 -0
  123. package/dist/core/field.d.ts +18 -0
  124. package/dist/core/field.d.ts.map +1 -0
  125. package/dist/core/field.js +1943 -0
  126. package/dist/core/field.js.map +1 -0
  127. package/dist/core/fieldline-seeds.d.ts +25 -0
  128. package/dist/core/fieldline-seeds.d.ts.map +1 -0
  129. package/dist/core/fieldline-seeds.js +32 -0
  130. package/dist/core/fieldline-seeds.js.map +1 -0
  131. package/dist/core/fieldlines.d.ts +75 -0
  132. package/dist/core/fieldlines.d.ts.map +1 -0
  133. package/dist/core/fieldlines.js +111 -0
  134. package/dist/core/fieldlines.js.map +1 -0
  135. package/dist/core/flow.d.ts +38 -0
  136. package/dist/core/flow.d.ts.map +1 -0
  137. package/dist/core/flow.js +27 -0
  138. package/dist/core/flow.js.map +1 -0
  139. package/dist/core/formations.d.ts +11 -0
  140. package/dist/core/formations.d.ts.map +1 -0
  141. package/dist/core/formations.js +22 -0
  142. package/dist/core/formations.js.map +1 -0
  143. package/dist/core/geometry.d.ts +67 -0
  144. package/dist/core/geometry.d.ts.map +1 -0
  145. package/dist/core/geometry.js +68 -0
  146. package/dist/core/geometry.js.map +1 -0
  147. package/dist/core/heatmap.d.ts +22 -0
  148. package/dist/core/heatmap.d.ts.map +1 -0
  149. package/dist/core/heatmap.js +55 -0
  150. package/dist/core/heatmap.js.map +1 -0
  151. package/dist/core/host.d.ts +46 -0
  152. package/dist/core/host.d.ts.map +1 -0
  153. package/dist/core/host.js +11 -0
  154. package/dist/core/host.js.map +1 -0
  155. package/dist/core/integrator.d.ts +24 -0
  156. package/dist/core/integrator.d.ts.map +1 -0
  157. package/dist/core/integrator.js +375 -0
  158. package/dist/core/integrator.js.map +1 -0
  159. package/dist/core/math.d.ts +37 -0
  160. package/dist/core/math.d.ts.map +1 -0
  161. package/dist/core/math.js +77 -0
  162. package/dist/core/math.js.map +1 -0
  163. package/dist/core/reactions.d.ts +32 -0
  164. package/dist/core/reactions.d.ts.map +1 -0
  165. package/dist/core/reactions.js +45 -0
  166. package/dist/core/reactions.js.map +1 -0
  167. package/dist/core/registry.d.ts +13 -0
  168. package/dist/core/registry.d.ts.map +1 -0
  169. package/dist/core/registry.js +20 -0
  170. package/dist/core/registry.js.map +1 -0
  171. package/dist/core/render-backend.d.ts +46 -0
  172. package/dist/core/render-backend.d.ts.map +1 -0
  173. package/dist/core/render-backend.js +75 -0
  174. package/dist/core/render-backend.js.map +1 -0
  175. package/dist/core/render-modes.d.ts +42 -0
  176. package/dist/core/render-modes.d.ts.map +1 -0
  177. package/dist/core/render-modes.js +141 -0
  178. package/dist/core/render-modes.js.map +1 -0
  179. package/dist/core/reservoir.d.ts +43 -0
  180. package/dist/core/reservoir.d.ts.map +1 -0
  181. package/dist/core/reservoir.js +207 -0
  182. package/dist/core/reservoir.js.map +1 -0
  183. package/dist/core/scalar-grid.d.ts +51 -0
  184. package/dist/core/scalar-grid.d.ts.map +1 -0
  185. package/dist/core/scalar-grid.js +146 -0
  186. package/dist/core/scalar-grid.js.map +1 -0
  187. package/dist/core/scanner.d.ts +59 -0
  188. package/dist/core/scanner.d.ts.map +1 -0
  189. package/dist/core/scanner.js +260 -0
  190. package/dist/core/scanner.js.map +1 -0
  191. package/dist/core/shadow.d.ts +69 -0
  192. package/dist/core/shadow.d.ts.map +1 -0
  193. package/dist/core/shadow.js +84 -0
  194. package/dist/core/shadow.js.map +1 -0
  195. package/dist/core/spatial-hash.d.ts +30 -0
  196. package/dist/core/spatial-hash.d.ts.map +1 -0
  197. package/dist/core/spatial-hash.js +64 -0
  198. package/dist/core/spatial-hash.js.map +1 -0
  199. package/dist/core/streamlines.d.ts +29 -0
  200. package/dist/core/streamlines.d.ts.map +1 -0
  201. package/dist/core/streamlines.js +70 -0
  202. package/dist/core/streamlines.js.map +1 -0
  203. package/dist/core/surface.d.ts +19 -0
  204. package/dist/core/surface.d.ts.map +1 -0
  205. package/dist/core/surface.js +21 -0
  206. package/dist/core/surface.js.map +1 -0
  207. package/dist/core/temporal.d.ts +110 -0
  208. package/dist/core/temporal.d.ts.map +1 -0
  209. package/dist/core/temporal.js +139 -0
  210. package/dist/core/temporal.js.map +1 -0
  211. package/dist/core/thermo.d.ts +48 -0
  212. package/dist/core/thermo.d.ts.map +1 -0
  213. package/dist/core/thermo.js +48 -0
  214. package/dist/core/thermo.js.map +1 -0
  215. package/dist/core/types.d.ts +610 -0
  216. package/dist/core/types.d.ts.map +1 -0
  217. package/dist/core/types.js +2 -0
  218. package/dist/core/types.js.map +1 -0
  219. package/dist/core/weights.d.ts +111 -0
  220. package/dist/core/weights.d.ts.map +1 -0
  221. package/dist/core/weights.js +128 -0
  222. package/dist/core/weights.js.map +1 -0
  223. package/dist/diagnostics/energy.d.ts +21 -0
  224. package/dist/diagnostics/energy.d.ts.map +1 -0
  225. package/dist/diagnostics/energy.js +27 -0
  226. package/dist/diagnostics/energy.js.map +1 -0
  227. package/dist/diagnostics/fields.d.ts +23 -0
  228. package/dist/diagnostics/fields.d.ts.map +1 -0
  229. package/dist/diagnostics/fields.js +30 -0
  230. package/dist/diagnostics/fields.js.map +1 -0
  231. package/dist/diagnostics/index.d.ts +46 -0
  232. package/dist/diagnostics/index.d.ts.map +1 -0
  233. package/dist/diagnostics/index.js +23 -0
  234. package/dist/diagnostics/index.js.map +1 -0
  235. package/dist/diagnostics/modes.d.ts +108 -0
  236. package/dist/diagnostics/modes.d.ts.map +1 -0
  237. package/dist/diagnostics/modes.js +181 -0
  238. package/dist/diagnostics/modes.js.map +1 -0
  239. package/dist/diagnostics/potential.d.ts +30 -0
  240. package/dist/diagnostics/potential.d.ts.map +1 -0
  241. package/dist/diagnostics/potential.js +43 -0
  242. package/dist/diagnostics/potential.js.map +1 -0
  243. package/dist/diagnostics/probes.d.ts +31 -0
  244. package/dist/diagnostics/probes.d.ts.map +1 -0
  245. package/dist/diagnostics/probes.js +61 -0
  246. package/dist/diagnostics/probes.js.map +1 -0
  247. package/dist/diagnostics/render.d.ts +49 -0
  248. package/dist/diagnostics/render.d.ts.map +1 -0
  249. package/dist/diagnostics/render.js +132 -0
  250. package/dist/diagnostics/render.js.map +1 -0
  251. package/dist/export.d.ts +18 -0
  252. package/dist/export.d.ts.map +1 -0
  253. package/dist/export.js +17 -0
  254. package/dist/export.js.map +1 -0
  255. package/dist/forces/extended.d.ts +121 -0
  256. package/dist/forces/extended.d.ts.map +1 -0
  257. package/dist/forces/extended.js +674 -0
  258. package/dist/forces/extended.js.map +1 -0
  259. package/dist/forces/index.d.ts +33 -0
  260. package/dist/forces/index.d.ts.map +1 -0
  261. package/dist/forces/index.js +237 -0
  262. package/dist/forces/index.js.map +1 -0
  263. package/dist/forces/natural.d.ts +106 -0
  264. package/dist/forces/natural.d.ts.map +1 -0
  265. package/dist/forces/natural.js +385 -0
  266. package/dist/forces/natural.js.map +1 -0
  267. package/dist/index.d.ts +59 -0
  268. package/dist/index.d.ts.map +1 -0
  269. package/dist/index.js +71 -0
  270. package/dist/index.js.map +1 -0
  271. package/dist/inspect/budget.d.ts +17 -0
  272. package/dist/inspect/budget.d.ts.map +1 -0
  273. package/dist/inspect/budget.js +19 -0
  274. package/dist/inspect/budget.js.map +1 -0
  275. package/dist/inspect/index.d.ts +10 -0
  276. package/dist/inspect/index.d.ts.map +1 -0
  277. package/dist/inspect/index.js +10 -0
  278. package/dist/inspect/index.js.map +1 -0
  279. package/dist/inspect/report.d.ts +17 -0
  280. package/dist/inspect/report.d.ts.map +1 -0
  281. package/dist/inspect/report.js +44 -0
  282. package/dist/inspect/report.js.map +1 -0
  283. package/dist/inspect/snapshot.d.ts +21 -0
  284. package/dist/inspect/snapshot.d.ts.map +1 -0
  285. package/dist/inspect/snapshot.js +30 -0
  286. package/dist/inspect/snapshot.js.map +1 -0
  287. package/dist/recipes/catalog.d.ts +51 -0
  288. package/dist/recipes/catalog.d.ts.map +1 -0
  289. package/dist/recipes/catalog.js +1496 -0
  290. package/dist/recipes/catalog.js.map +1 -0
  291. package/dist/recipes/charge.d.ts +18 -0
  292. package/dist/recipes/charge.d.ts.map +1 -0
  293. package/dist/recipes/charge.js +27 -0
  294. package/dist/recipes/charge.js.map +1 -0
  295. package/dist/recipes/compile.d.ts +93 -0
  296. package/dist/recipes/compile.d.ts.map +1 -0
  297. package/dist/recipes/compile.js +113 -0
  298. package/dist/recipes/compile.js.map +1 -0
  299. package/dist/recipes/explain.d.ts +8 -0
  300. package/dist/recipes/explain.d.ts.map +1 -0
  301. package/dist/recipes/explain.js +46 -0
  302. package/dist/recipes/explain.js.map +1 -0
  303. package/dist/recipes/gallery.d.ts +6 -0
  304. package/dist/recipes/gallery.d.ts.map +1 -0
  305. package/dist/recipes/gallery.js +6 -0
  306. package/dist/recipes/gallery.js.map +1 -0
  307. package/dist/recipes/gravity.d.ts +16 -0
  308. package/dist/recipes/gravity.d.ts.map +1 -0
  309. package/dist/recipes/gravity.js +27 -0
  310. package/dist/recipes/gravity.js.map +1 -0
  311. package/dist/recipes/index.d.ts +18 -0
  312. package/dist/recipes/index.d.ts.map +1 -0
  313. package/dist/recipes/index.js +36 -0
  314. package/dist/recipes/index.js.map +1 -0
  315. package/dist/recipes/intent.d.ts +44 -0
  316. package/dist/recipes/intent.d.ts.map +1 -0
  317. package/dist/recipes/intent.js +46 -0
  318. package/dist/recipes/intent.js.map +1 -0
  319. package/dist/recipes/schema.d.ts +103 -0
  320. package/dist/recipes/schema.d.ts.map +1 -0
  321. package/dist/recipes/schema.js +123 -0
  322. package/dist/recipes/schema.js.map +1 -0
  323. package/dist/recipes/wayfinding.d.ts +39 -0
  324. package/dist/recipes/wayfinding.d.ts.map +1 -0
  325. package/dist/recipes/wayfinding.js +77 -0
  326. package/dist/recipes/wayfinding.js.map +1 -0
  327. package/dist/semantic/index.d.ts +13 -0
  328. package/dist/semantic/index.d.ts.map +1 -0
  329. package/dist/semantic/index.js +31 -0
  330. package/dist/semantic/index.js.map +1 -0
  331. package/dist/semantic/layers.d.ts +24 -0
  332. package/dist/semantic/layers.d.ts.map +1 -0
  333. package/dist/semantic/layers.js +27 -0
  334. package/dist/semantic/layers.js.map +1 -0
  335. package/dist/semantic/materials.d.ts +20 -0
  336. package/dist/semantic/materials.d.ts.map +1 -0
  337. package/dist/semantic/materials.js +17 -0
  338. package/dist/semantic/materials.js.map +1 -0
  339. package/dist/semantic/states.d.ts +11 -0
  340. package/dist/semantic/states.d.ts.map +1 -0
  341. package/dist/semantic/states.js +26 -0
  342. package/dist/semantic/states.js.map +1 -0
  343. package/dist/visual/channels.d.ts +71 -0
  344. package/dist/visual/channels.d.ts.map +1 -0
  345. package/dist/visual/channels.js +70 -0
  346. package/dist/visual/channels.js.map +1 -0
  347. package/dist/visual/index.d.ts +39 -0
  348. package/dist/visual/index.d.ts.map +1 -0
  349. package/dist/visual/index.js +30 -0
  350. package/dist/visual/index.js.map +1 -0
  351. package/dist/visual/lint.d.ts +41 -0
  352. package/dist/visual/lint.d.ts.map +1 -0
  353. package/dist/visual/lint.js +58 -0
  354. package/dist/visual/lint.js.map +1 -0
  355. package/dist/visual/mapping.d.ts +13 -0
  356. package/dist/visual/mapping.d.ts.map +1 -0
  357. package/dist/visual/mapping.js +43 -0
  358. package/dist/visual/mapping.js.map +1 -0
  359. package/dist/visual/semantic-text.d.ts +28 -0
  360. package/dist/visual/semantic-text.d.ts.map +1 -0
  361. package/dist/visual/semantic-text.js +36 -0
  362. package/dist/visual/semantic-text.js.map +1 -0
  363. package/dist/visual/tokens.d.ts +23 -0
  364. package/dist/visual/tokens.d.ts.map +1 -0
  365. package/dist/visual/tokens.js +54 -0
  366. package/dist/visual/tokens.js.map +1 -0
  367. package/dist/visual/visualization.d.ts +31 -0
  368. package/dist/visual/visualization.d.ts.map +1 -0
  369. package/dist/visual/visualization.js +47 -0
  370. package/dist/visual/visualization.js.map +1 -0
  371. package/package.json +60 -0
@@ -0,0 +1,610 @@
1
+ /**
2
+ * Core contracts for the reciprocal field.
3
+ *
4
+ * These types encode the spec in `docs/engine-reference/forces-system.md`:
5
+ * - the data model (§3): Particle, Body, Env
6
+ * - the force-registry contract (§4) generalized to agents (§22)
7
+ * - mass & momentum (§21), conditions (§5), formations (§7)
8
+ *
9
+ * This is the contract the engine implements: `createField`, the force registry,
10
+ * the integrator, and the conformance harness all build on these shapes.
11
+ */
12
+ import type { FlowOptions } from './flow.ts';
13
+ import type { FieldHost } from './host.ts';
14
+ import type { ClassifiedTokens } from '../config/forces.config.ts';
15
+ export interface Vec2 {
16
+ x: number;
17
+ y: number;
18
+ }
19
+ /** A force id. Open string so the registry can be extended (§20), but the
20
+ * canonical set is enumerated in `config/forces.config.ts`. */
21
+ export type Token = string;
22
+ /** The three kinds of thing a force can act on (§22). A particle is the
23
+ * lightest agent; an element is a heavy body with a DOM consumer; an event
24
+ * sink is write-only. */
25
+ export type AgentKind = 'particle' | 'element' | 'event';
26
+ /**
27
+ * A free particle — the lightest agent (§3.2, §21).
28
+ *
29
+ * `m` is inertial mass. Today it is nominal (always 1 — the engine integrates
30
+ * `v += F`, §2.2). Under first-class mass (§21, Option B) it becomes `∝ size`
31
+ * and the integrator divides by it. Mutate `vx/vy/heat/x/y` from a force.
32
+ */
33
+ export interface Particle {
34
+ x: number;
35
+ y: number;
36
+ vx: number;
37
+ vy: number;
38
+ /**
39
+ * OPTIONAL Z LANE (docs/engine-reference/z-axis.md): position/velocity along the
40
+ * depth axis. Undefined ⇒ 0 ⇒ the flat field — every formula reduces to the 2D
41
+ * engine exactly. Only a field created with `depth > 0` ever moves these; authors
42
+ * never have to supply them. Bodies (DOM elements) always live on the z = 0 plane.
43
+ */
44
+ z?: number;
45
+ vz?: number;
46
+ /** inertial mass — 1 = nominal (§21). */
47
+ m: number;
48
+ /** ∈ [0,1]; drives color (toward accent), size, and glow (§2.2). */
49
+ heat: number;
50
+ /** render-radius basis. */
51
+ size: number;
52
+ /** the sink/blackhole body holding this particle, or null (§6.9). */
53
+ cap: Body | null;
54
+ /** stable per-particle scatter target fractions, for the `spread` formation (§7). */
55
+ gx?: number;
56
+ gy?: number;
57
+ /** scatter fraction along z — only meaningful in a `depth > 0` field. */
58
+ gz?: number;
59
+ /** frames-to-live for *mortal* (spawned) matter — decremented each tick, despawned at
60
+ * ≤ 0 (the [S] source sink). Undefined ⇒ immortal (the conserved base field). */
61
+ age?: number;
62
+ /** signed charge q, for `charge` / `magnetism` (§20.10). */
63
+ charge?: number;
64
+ /** species tag, for `hunt` (§20.3). */
65
+ species?: number;
66
+ /** carried pigment, conserved color transport (§20.8). */
67
+ color?: string;
68
+ /** an opaque data record bound to this particle by `FieldHandle.seed` (e.g. a "project atom"). */
69
+ atom?: AtomPayload;
70
+ }
71
+ /**
72
+ * A data record bindable to a particle (`FieldHandle.seed`). Opaque to the engine except `weight`
73
+ * (0..1), which scales the particle's mass + size — so richer records read as heavier, more central
74
+ * matter. Picked back out with `FieldHandle.atomAt(x, y)`.
75
+ */
76
+ export interface AtomPayload {
77
+ readonly weight?: number;
78
+ readonly [key: string]: unknown;
79
+ }
80
+ /**
81
+ * A registered DOM element acting as a force source (§3.1). Parsed from
82
+ * `data-*` attributes; the runtime fields are refreshed each scan/frame.
83
+ */
84
+ export interface Body {
85
+ el: HTMLElement;
86
+ /** space-joined force ids from `data-body` (they compose, §4). */
87
+ tokens: Token[];
88
+ /** `tokens` split into `{ modifiers, forces, sources }` per the modifier contract
89
+ * (workover v0.3). The scanner fills it at parse time; the integrator memoizes it
90
+ * lazily for bodies built elsewhere (conformance, tests). Modifiers carry the
91
+ * formalized order `spotlight → screen → resonate`. */
92
+ classified?: ClassifiedTokens;
93
+ /** force magnitude S. */
94
+ strength: number;
95
+ /** influence radius d_max, px. */
96
+ range: number;
97
+ /** capture radius for `sink`. */
98
+ absorbR: number;
99
+ /** load at which a sink supernovas (was `maxMass`, renamed §21.2). */
100
+ capacity: number;
101
+ /** swirl/charge sign or spin (±). */
102
+ spin: number;
103
+ /** heading in radians, with its unit vector, for stream/jet/etc. */
104
+ angle: number;
105
+ ux: number;
106
+ uy: number;
107
+ /** conditional gate id (§5); '' = always. */
108
+ when: string;
109
+ /** opt into two-way density write-back (§8). */
110
+ feedback: boolean;
111
+ /** the body's tint from `data-color`, for `pigment` color transport (§20.8). */
112
+ tint?: string;
113
+ /** shaped source (`data-shaped`): forces reference the nearest point on the element's
114
+ * box, not its centre, so matter gathers in a shell around the shape (field-systems
115
+ * Stage C). Undefined ⇒ point source (the default). */
116
+ shaped?: boolean;
117
+ fmin: number;
118
+ fmax: number;
119
+ opsz: string;
120
+ /** `data-pair` — selector for the body this one is wormhole-paired to (`warp`, §22.3 relocate). */
121
+ pair?: string;
122
+ /** `data-twist` — rotation (radians) applied to matter relocated through a `warp` throat. */
123
+ twist?: number;
124
+ /** `data-scale` — scale applied to the relocated local offset through a `warp` throat (default 1). */
125
+ warpScale?: number;
126
+ /** `data-life` — frames each particle this body's [S] source emits lives (the mortal `age`).
127
+ * Undefined ⇒ the source's own default lifespan. Part of the source budget contract. */
128
+ life?: number;
129
+ /** `data-cap` — the most live particles this body's [S] source may sustain; the emission
130
+ * rate is clamped to `cap / life` per frame. Undefined ⇒ rate-limited by lifespan only. */
131
+ cap?: number;
132
+ /** the [S] budget contract is satisfied — the author declared at least one of
133
+ * `data-life` / `data-cap` / `data-budget` / `data-sink` (workover §"Source and sink rules").
134
+ * False on a source body ⇒ the scanner's dev guard warns and applies the safe defaults. */
135
+ budgeted?: boolean;
136
+ /** `data-screen-min` — the floor of the `screen` modifier's attenuation factor (default 0:
137
+ * full cancellation at the core is allowed). Only read on bodies carrying `screen`. */
138
+ screenMin?: number;
139
+ /** the resolved paired body for `warp` (set each scan from `pair`); undefined if unpaired. */
140
+ pairBody?: Body;
141
+ /** the paired throat's live centre, refreshed each frame from `pairBody` (the relocate target). */
142
+ warpX?: number;
143
+ warpY?: number;
144
+ /** whether a relocate target is currently resolved (the `warp` force no-ops without one). */
145
+ warpHas?: boolean;
146
+ /** source mass M for `gravity`/`charge` (§20.10/§21). */
147
+ M: number;
148
+ cx: number;
149
+ cy: number;
150
+ hw: number;
151
+ hh: number;
152
+ /** engaged (hover/focus/tap → data-active="1"). */
153
+ on: boolean;
154
+ /** on-screen and exerting force (§2.1). */
155
+ vis: boolean;
156
+ /** captured load (was `mass`, renamed §21.2). */
157
+ accreted: number;
158
+ /** per-frame density tally and its eased value d ∈ [0,1] (§8). */
159
+ count: number;
160
+ d: number;
161
+ /** conserved-attention effective-strength multiplier (§2.4); 1 = neutral. */
162
+ attn?: number;
163
+ /** fractional-emission accumulator for a budgeted [S] source (`spawn`) — carries the
164
+ * sub-1/frame remainder when the rate is clamped to `cap / life`. Runtime state. */
165
+ emitAcc?: number;
166
+ /** prior engagement state, for the attention-gated discharge edge (#365). Runtime state. */
167
+ wasOn?: boolean;
168
+ /** per-frame local thermodynamic accumulators (workover §"Metrics") — sums over the same
169
+ * `range/2` sample window as `count`, reset each step, only on `data-feedback` bodies:
170
+ * n samples, Σvx, Σvy, Σ|v|, Σ|v|², Σheat. Allocated lazily on first sample. */
171
+ thermo?: {
172
+ n: number;
173
+ sx: number;
174
+ sy: number;
175
+ ss: number;
176
+ ss2: number;
177
+ sh: number;
178
+ };
179
+ /** the eased measured metrics (workover §"Metrics"): entropy / coherence / temperature
180
+ * ∈ [0,1], exported as `--entropy` / `--coherence` / `--temperature`. Lazily allocated. */
181
+ metrics?: {
182
+ entropy: number;
183
+ coherence: number;
184
+ temperature: number;
185
+ };
186
+ /** target points for `morph` (§20.3 [D]) — a sampled mark / logo / chart / shape the
187
+ * matter assembles into. NEVER words or letterforms (§11); words glow/grow via `--d`. */
188
+ targets?: readonly {
189
+ x: number;
190
+ y: number;
191
+ }[];
192
+ /** custom rectangle provider for a shadow-DOM body whose physical box is not the host
193
+ * box (closed roots, internal cores). The measurer prefers this over the host's own
194
+ * `getBoundingClientRect` (shadow-dom.md §10/§16). */
195
+ rect?: () => DOMRect;
196
+ /** element that receives the field's CSS-variable write-back, when it differs from the
197
+ * body's element (shadow-dom.md §11). Defaults to `el`. */
198
+ writeTarget?: HTMLElement;
199
+ }
200
+ /** A formation preset — a global bias on every free particle (§7). */
201
+ export interface Formation {
202
+ driftX: number;
203
+ wander: number;
204
+ orbit: number;
205
+ spread: number;
206
+ conv: number;
207
+ }
208
+ /** A persistent scalar grid backing field-buffer forces (§20.1 class [C]). */
209
+ export interface ScalarGrid {
210
+ sample(x: number, y: number): number;
211
+ deposit(x: number, y: number, amount: number): void;
212
+ gradient(x: number, y: number): Vec2;
213
+ }
214
+ /**
215
+ * The shared per-frame environment handed to every force (§3.3), extended with
216
+ * the services later classes need (§20.1) and the sim unit-system constants
217
+ * (§20.10). Engines may leave the heavier services as no-ops until built.
218
+ */
219
+ export interface Env {
220
+ /** vector from particle to body: (b.cx − p.x, b.cy − p.y). */
221
+ dx: number;
222
+ dy: number;
223
+ /**
224
+ * z component of the particle→body vector (z-axis.md). OPTIONAL — undefined reads
225
+ * as 0. Bodies live on the z = 0 plane, so this is `0 − (p.z ?? 0)` — always 0 in a
226
+ * flat field, where every force's z term vanishes and the 2D behavior is exact.
227
+ */
228
+ dz?: number;
229
+ /** |(dx, dy, dz)|, clamped ≥ 1 (= the 2D distance in a flat field). */
230
+ dist: number;
231
+ /** the active, eased formation (§7). */
232
+ form: Formation;
233
+ W: number;
234
+ H: number;
235
+ /** depth of the simulation volume (z-axis.md). OPTIONAL; 0/undefined = the flat field. */
236
+ D?: number;
237
+ /** elapsed time in seconds (for time-varying terms: curl drift, resonance). */
238
+ t: number;
239
+ /** frame counter (for the periodic brownian jitter + scatter animation, §7). */
240
+ frameN: number;
241
+ /** integration step: 1 a frame, 0 under reduced motion (§2.2/§18). */
242
+ dt: number;
243
+ /** velocity cap / "speed of light" of the unit system (§20.10). */
244
+ c: number;
245
+ /** gravitational constant of the unit system (§20.10). */
246
+ G: number;
247
+ /** recent page-scroll speed (eased, px/frame); drives the `scrolling` gate (§5).
248
+ * Undefined / 0 off the page, so the gate is inert under the conformance harness. */
249
+ scrollV?: number;
250
+ /** the engine's random source (#371) — forces and the integrator draw jitter from here so a
251
+ * seeded rng makes a run reproducible (record/replay). Optional for fixture back-compat;
252
+ * call sites fall back to Math.random. */
253
+ rng?: () => number;
254
+ /** throw a micro-reaction at a point — sparks/heat (§23). */
255
+ spark(x: number, y: number, power: number, color?: string): void;
256
+ /** release everything a body has captured (§6.9). */
257
+ supernova(b: Body): void;
258
+ /** create a particle — source forces only (§20, class [S]). */
259
+ spawn(p: Partial<Particle>): void;
260
+ /** neighbours within r — particle↔particle forces (§20.1 class [B]). */
261
+ neighbors(p: Particle, r: number): Particle[];
262
+ /** a named scalar grid — field-buffer forces (§20.1 class [C]). */
263
+ grid(name: string): ScalarGrid;
264
+ /** the net *structure* field at a world point — the superposition of every body's
265
+ * `field()` hook (the dipoles and monopoles, field-systems Stage B). The vector matter
266
+ * follows under `fieldflow`. Set by the integrator each step from the live bodies; absent
267
+ * in bare/probe envs, where a field-following force simply no-ops. */
268
+ fieldAt?(x: number, y: number): Vec2;
269
+ }
270
+ /**
271
+ * A force module (§4). The engine owns the loop and everything conserved; a
272
+ * force owns only the math that nudges one agent given the shared `env`.
273
+ *
274
+ * `apply` is the common path (a free particle). A force opts into other agent
275
+ * tiers (§22) by listing them in `targets` and the engine routes accordingly;
276
+ * most forces need no per-tier code because the *agent's* consumer interprets
277
+ * the influence. Default `targets` is `['particle']` — today's behaviour.
278
+ */
279
+ export interface Force {
280
+ token: Token;
281
+ label: string;
282
+ targets?: AgentKind[];
283
+ apply(b: Body, p: Particle, env: Env): void;
284
+ /**
285
+ * This force *replaces* velocity (a reflection, rotation, or relaunch) rather than
286
+ * *adding* an acceleration, so first-class mass (§21.3) must not scale its effect: a
287
+ * bounce reflects and a lens bends regardless of inertia. Additive forces leave this
288
+ * unset and have their Δv scaled by `1/m`. Set on `wall`, `jet`, `lens`, `gate`.
289
+ */
290
+ kinematic?: boolean;
291
+ /**
292
+ * Optional *modifier* hook (§20.3 `resonate`/`spotlight`). Run before the body's
293
+ * other tokens apply, for this particle: a returned `strength` multiplies the
294
+ * sibling forces' strength for this frame; `gate: true` skips them entirely. A
295
+ * pure modifier (e.g. `spotlight`) can leave `apply` a no-op.
296
+ */
297
+ modify?(b: Body, p: Particle, env: Env): {
298
+ strength?: number;
299
+ gate?: boolean;
300
+ };
301
+ /**
302
+ * Optional *source* hook (§20.1 class [S], e.g. `spawn`). Run once per body per frame
303
+ * — not per particle — after the per-particle force pass, so a body can *create*
304
+ * matter via `env.spawn`. A pure source leaves `apply` a no-op. Sources break
305
+ * conservation by design and must self-budget (a lifespan `age` plus the engine's
306
+ * pool ceiling keep the count bounded).
307
+ */
308
+ source?(b: Body, env: Env): void;
309
+ /**
310
+ * Optional *visual field* hook (field-systems plan, Stage B). The in-plane field vector
311
+ * the body projects at a world point, with no particle and no velocity. Renders field
312
+ * lines and makes velocity- or charge-dependent forces (whose `apply` is a no-op on a
313
+ * still probe) visible in the field-flow view. For `magnetism` this is the dipole
314
+ * structure of B — particles still curve perpendicular, they do not follow it; for
315
+ * `charge` it is the electric field the force pushes along. Pure: same input, same output.
316
+ */
317
+ field?(b: Body, x: number, y: number): Vec2;
318
+ /**
319
+ * Optional *scalar field* hook (system-contracts §2 — a field may be vector, scalar, or compound).
320
+ * Returns a scalar value at a world point (e.g. a potential `Φ`, a density, a temperature) for
321
+ * contour / potential / heatmap rendering, with no particle. Pure: same input, same output. A
322
+ * force may own a vector `field()`, a `scalarField()`, both, or neither.
323
+ */
324
+ scalarField?(b: Body, x: number, y: number): number;
325
+ meta?: {
326
+ desc?: string;
327
+ };
328
+ }
329
+ /** A connector between two elements for `field.threads` (§10). */
330
+ export interface ThreadLink {
331
+ a: Element;
332
+ b: Element;
333
+ color?: string;
334
+ }
335
+ /** A `data-when` gate predicate (§5). Selective gates read each particle; the engine
336
+ * also passes the shared `env`, so a gate can read frame state (e.g. `scrolling`). */
337
+ export type Condition = (b: Body, p: Particle, env?: Env) => boolean;
338
+ /** The force registry — `token → module` (§4). */
339
+ export type ForceRegistry = Record<Token, Force>;
340
+ /** The condition registry — `id → predicate` (§5). */
341
+ export type ConditionRegistry = Record<string, Condition>;
342
+ /** Options for `createField` (§2.5 config). */
343
+ /**
344
+ * Field Surfaces — *where* a field visualization composites relative to page content:
345
+ * · the UNDERLAY (behind content) is the default `<field-root>` canvas, driven by `render`/setRender;
346
+ * · the OVERLAY (in front of content) is an optional second surface driven by `overlay`/setOverlay.
347
+ * Setting both (immersive) lets content sit *inside* the field. Overlay modes are READINGS — line/text
348
+ * diagnostics that reveal what the field is doing without occluding text; `'off'` clears the overlay
349
+ * surface. The vocabulary (each: what it draws · which quantity it reads):
350
+ * · `streamlines` — arrows along the net push a still probe would feel · vector flow (felt)
351
+ * · `force-vectors` — the same arrows scaled by raw magnitude · vector flow (absolute)
352
+ * · `field-lines` — arrows along the structure-only field (dipoles/monopoles) · field geometry
353
+ * · `grid` — a reference lattice displaced by the local field · deformation
354
+ * · `temperature` — iso-contour lines of accumulated particle heat · thermal scalar
355
+ * · `energy` — iso-contour lines of kinetic energy (½m|v|²) · energy scalar
356
+ * · `path` — streamline curves integrated from seeded probes · vector flow, traced over distance
357
+ * · `data` — numeric density readouts at each measuring body · per-body measurement
358
+ * Readings are ADDITIVE: `setOverlay` accepts one mode or a stack (array), drawn in order on the one
359
+ * front surface — so matter (underlay) + heatmap + several readings compose into one legible picture.
360
+ */
361
+ export type OverlayMode = 'off' | 'streamlines' | 'force-vectors' | 'field-lines' | 'grid' | 'temperature' | 'energy' | 'path' | 'data';
362
+ /** One reading, or an additive stack of readings, for `setOverlay` / `FieldOptions.overlay`. */
363
+ export type OverlayInput = OverlayMode | readonly OverlayMode[];
364
+ export interface FieldOptions {
365
+ /** travelling accent color (§9). */
366
+ accent?: string;
367
+ /** particle-count multiplier (§2.5). */
368
+ density?: number;
369
+ /**
370
+ * OPT-IN Z VOLUME (docs/engine-reference/z-axis.md): depth of the simulation volume
371
+ * in px. 0 — the default — is the flat field, byte-identical to the 2D engine. > 0
372
+ * lets matter seed, wander, and wrap through a shallow z volume behind the surface;
373
+ * bodies stay on the z = 0 plane and their forces pull matter back toward it. The
374
+ * render projects z as a size/alpha recession. Purely additive: no API requires z.
375
+ */
376
+ depth?: number;
377
+ /** draw the background Currents (§24); default true. Set false for the bare
378
+ * free-particle field with no carrier waves. */
379
+ waves?: boolean;
380
+ /** substrate background: `'opaque'` (default) paints the near-black substrate each frame;
381
+ * `'transparent'` clears to transparent instead, so the underlay can sit OVER light content
382
+ * (a 3D scene, an image, a light page) without blanking it out. The bright matter survives;
383
+ * no `mix-blend-mode` workaround needed. Trails light-paint and fade to transparent rather
384
+ * than to black. Purely additive — the default is unchanged. */
385
+ background?: 'opaque' | 'transparent';
386
+ /** render mode (§20.6): 'dots' (default), 'trails' (light-painting), 'links'
387
+ * (constellation), 'metaballs' (a liquid iso-surface, not dots), 'streamlines'
388
+ * (draw the force field itself — diagnostic, REPLACES the dots), 'flow' (the dots
389
+ * AND the streamlines drawn together in the one underlay canvas — particles
390
+ * drifting along the visible flow, with no separate front surface and no
391
+ * `mix-blend`, so it stays a single cheap layer), 'none' (the signals-only engine,
392
+ * §13.7 / #297: the full simulation + feedback pipeline runs, but no canvas
393
+ * context is acquired, no backing store is sized, and nothing is ever drawn —
394
+ * the field exists purely as signals: `--d`, `--load`, `--lit`, capture
395
+ * events, `scrollV()`). */
396
+ render?: 'dots' | 'trails' | 'links' | 'metaballs' | 'voronoi' | 'streamlines' | 'flow' | 'none';
397
+ /** first-class mass (§21.3): when true, particle mass ∝ size and body forces
398
+ * accelerate by `a = F/m` (heavier matter moves less). Default false (unit mass). */
399
+ mass?: boolean;
400
+ /** color template for the travelling accent (§9): a built-in name
401
+ * (`'ours'` · `'heatmap'` · `'infrared'` · `'spectrum'`) or custom hex stops. */
402
+ palette?: string | readonly string[];
403
+ /** conserved attention (§2.4): one finite strength budget — engaging a body
404
+ * pulls force off every other. Default false; rest-neutral until engaged. */
405
+ attention?: boolean;
406
+ /** cross-boundary causality (Concept 4): a saturated body spills density to its
407
+ * neighbours (writing `--lit` + firing `field:lit`/`field:dim`). Default false. */
408
+ causality?: boolean;
409
+ /** density heatmap (field-systems H1): a scalar buffer of where matter pools, drawn as a
410
+ * glow underlay and sampled to bodies as `--field-heatmap-density`. Default false. */
411
+ heatmap?: boolean;
412
+ /**
413
+ * Field Surfaces (overlay placement): a caller-provided canvas for the OVERLAY surface, drawn in
414
+ * front of page content. Core sizes its backing store (matching the main canvas dpr) and draws the
415
+ * `overlay` mode onto it each frame; the caller owns the element and its CSS placement (fixed,
416
+ * full-viewport, `pointer-events:none`, above content / below nav). Keeps core DOM-free — the host
417
+ * provides the canvas, core only draws. Default unset → no overlay surface.
418
+ */
419
+ overlayCanvas?: HTMLCanvasElement;
420
+ /** initial overlay visualization mode (Field Surfaces); default `'off'`. */
421
+ overlay?: OverlayInput;
422
+ /** the drawing backend for the overlay surface (#373) — defaults to the Canvas 2D
423
+ * implementation over `overlayCanvas`. The structural seam a WebGL/WebGPU surface
424
+ * implements; see render-backend.ts. */
425
+ overlayBackend?: import('./render-backend.ts').RenderBackend;
426
+ /** the random source for ALL engine randomness — particle seeding, spawn scatter, jitter,
427
+ * release angles (#371). Defaults to Math.random; supply a seeded generator and a run
428
+ * becomes reproducible (the record/replay seam). */
429
+ rng?: () => number;
430
+ /** the wall-clock source for input-idle tracking (#371) — defaults to performance.now.
431
+ * One of the three clocks (wall / frame / simulation); see temporal.ts for the others. */
432
+ now?: () => number;
433
+ /**
434
+ * Feedback seam (Phase D3): when set, the engine routes its per-body feedback channels to this
435
+ * sink each frame *instead of* writing CSS variables / dispatching events directly — so the
436
+ * platform's FeedbackRegistry can own the write phase. The simulation (the eased density value) is
437
+ * unchanged; only the write target moves. Default unset → the engine installs an internal default
438
+ * sink (#228) whose direct writes are identical to the historical behavior (same variables, same
439
+ * three-decimal formatting, same `field:lit`/`field:dim` hysteresis) — the sink contract is the
440
+ * one write path either way. Font-variation weight is a typographic render effect and stays in
441
+ * the engine.
442
+ */
443
+ feedbackSink?: FeedbackSink;
444
+ /**
445
+ * The environment seam (frontier): the {@link FieldHost} the engine drives the DOM through. REQUIRED
446
+ * by `createField` (core imports zero DOM). In the browser, use `browserHost()` from
447
+ * `@fundamental-engine/platform`, or the `@fundamental-engine/{vanilla,elements,react}` entry points that wire it for
448
+ * you; inject a custom host for a headless renderer / different document / tests.
449
+ */
450
+ host?: FieldHost;
451
+ }
452
+ /** Per-element feedback values the engine produces each frame (Phase D3 seam). */
453
+ export interface FeedbackChannels {
454
+ /** the body's eased gathered density `d` ∈ [0,1] → `--d` / `--field-density`. */
455
+ density?: number;
456
+ /** the ambient heatmap density at the body → `--field-heatmap-density`. */
457
+ heatmapDensity?: number;
458
+ /** sink accretion fill ∈ [0,1] → `--load` / `--mass`. */
459
+ load?: number;
460
+ /** cross-boundary lit signal ∈ [0,1] → `--lit` + thresholded `field:lit` / `field:dim`. */
461
+ lit?: number;
462
+ /** measured local disorder ∈ [0,1] (workover §"Metrics") → `--entropy`. Engine-measured
463
+ * thermodynamics — distinct from the platform's inferred `--field-entropy` pipeline lane. */
464
+ entropy?: number;
465
+ /** measured local order ∈ [0,1] (= 1 − entropy) → `--coherence`. Engine-measured;
466
+ * distinct from the platform's `--field-coherence` lane AND from the `--coherence`
467
+ * palette *color* token `cssTokens()` sets on `:root`. */
468
+ coherence?: number;
469
+ /** measured local agitation ∈ [0,1] (heat + kinetic) → `--temperature`. */
470
+ temperature?: number;
471
+ }
472
+ /** Receives a body's feedback channels in place of direct DOM writes (Phase D3). */
473
+ export type FeedbackSink = (el: HTMLElement, channels: FeedbackChannels) => void;
474
+ /** The handle returned by `createField` — the public field API (§13). */
475
+ export interface FieldHandle {
476
+ /** (re)scan the document for `[data-body]` bodies after a layout change. */
477
+ scan(): void;
478
+ /** alias of `scan`. */
479
+ rescan(): void;
480
+ /** recolor the travelling accent (§9). */
481
+ setAccent(hex: string): void;
482
+ /** swap the accent's color template live: a built-in name or custom hex stops (§9). */
483
+ setPalette(palette: string | readonly string[]): void;
484
+ /** switch the global formation (§7). */
485
+ setFormation(name: string): void;
486
+ /** toggle conserved attention (§2.4) live — one finite strength budget. */
487
+ setAttention(on: boolean): void;
488
+ /** toggle cross-boundary causality (Concept 4) live — density spills to neighbours. */
489
+ setCausality(on: boolean): void;
490
+ /** toggle the density heatmap layer (field-systems H1) live. */
491
+ setHeatmap(on: boolean): void;
492
+ /**
493
+ * Switch the underlay render mode (§20.6) live — the surface behind content. `'none'` is the
494
+ * signals-only mode (§13.7 / #297): drawing stops from the next frame while the simulation and
495
+ * its signals stay live. Switching TO `'none'` at runtime keeps an already-acquired context and
496
+ * backing store (the no-allocation guarantee belongs to fields CREATED with `render: 'none'`);
497
+ * switching FROM `'none'` acquires the context lazily and sizes the backing store at that moment.
498
+ */
499
+ setRender(mode: 'dots' | 'trails' | 'links' | 'metaballs' | 'voronoi' | 'streamlines' | 'flow' | 'none'): void;
500
+ /**
501
+ * Render field READINGS on the OVERLAY surface — in front of page content (Field Surfaces). Pairs
502
+ * with `setRender` (the underlay); set both for an immersive look. No-op unless the field was created
503
+ * with an `overlayCanvas`. Accepts one reading or an additive stack (drawn in order); `'off'` (or an
504
+ * empty stack) clears the overlay surface.
505
+ */
506
+ setOverlay(mode: OverlayInput): void;
507
+ /** wire glowing connector lines between a set, or clear with null (§10). */
508
+ threads(list: ThreadLink[] | null): void;
509
+ /** a discrete one-shot: shove + heat matter near (x, y), optionally tinting it (§11). */
510
+ burst(x: number, y: number, hex?: string): void;
511
+ /**
512
+ * Place or move a dynamic flow focus at `(x, y)` — a movable target the field bends toward: it
513
+ * pulls free matter in, curves the streamlines, and eases the wave spine to it. Call repeatedly to
514
+ * retarget it (follow the pointer, track an element, animate a path); clear with `clearFlow()`.
515
+ */
516
+ flowTo(x: number, y: number, opts?: FlowOptions): void;
517
+ /** Remove the flow focus — the field relaxes back to its bodies-only shape. */
518
+ clearFlow(): void;
519
+ /**
520
+ * Bind a data record to each base particle, round-robin (so every dot carries a piece of meaning).
521
+ * Each record's `weight` (0..1) scales that particle's mass + size — richer records read as heavier,
522
+ * more central matter. Re-applied across resize/density rebuilds. Pick them back with `atomAt`.
523
+ */
524
+ seed(atoms: readonly AtomPayload[]): void;
525
+ /** The seeded record on the nearest particle to (x, y) within ~24px, or null. For hover-to-inspect. */
526
+ atomAt(x: number, y: number): AtomPayload | null;
527
+ /**
528
+ * Focus the nearest seeded particle to (x, y) within ~24px: hold it still and light it up, and
529
+ * return its record (or null + clear focus if none). The dwell affordance before a click — call
530
+ * on hover-dwell, then `clearFocus()` when the pointer moves on.
531
+ */
532
+ focusAt(x: number, y: number): AtomPayload | null;
533
+ /** Release the focused particle (it resumes drifting). */
534
+ clearFocus(): void;
535
+ /**
536
+ * Live particle count — the current size of the particle pool. Equivalent to `store.size`
537
+ * inside the engine. Use for external budget monitors and debug overlays that need the count
538
+ * without walking the particle array (which `inspectBudget` does internally).
539
+ */
540
+ particleCount(): number;
541
+ /**
542
+ * Snapshot of kinetic, thermal, and total energy for the current frame. Thin forward to
543
+ * `energyReport(store.particles)` from `@fundamental-engine/core/diagnostics/energy` — the function
544
+ * already exists; this accessor exposes it through the public handle so external tools
545
+ * (DataConsole, Inspector) don't need a reference to the internal particle array.
546
+ */
547
+ energy(): {
548
+ kinetic: number;
549
+ thermal: number;
550
+ total: number;
551
+ count: number;
552
+ };
553
+ /**
554
+ * Sample the live field at a point: the net force a still test particle would feel there — the
555
+ * superposition of every visible body's influence (attract/gravity wells, charge/magnetism
556
+ * dipole structure, flow bias, …). Returns the force vector as `{ x, y }` in field-pixel space.
557
+ * Pure and read-only (no pool mutation), safe to call any time and at any spatial resolution —
558
+ * the engine does not pre-bake a grid. The seam external visualizers consume to build their own
559
+ * field geometry: vector grids, streamline tubes, mesh displacement. `@fundamental-engine/three`'s
560
+ * `vectorField` / `streamlineTubes` are the first consumers. Thin wrapper over the existing
561
+ * `forceAt(bodies, forces, env, x, y)`.
562
+ */
563
+ sample(x: number, y: number): Vec2;
564
+ /**
565
+ * Copy live particle state into a caller-owned buffer and return the number of particles
566
+ * written. Stride 5, packed `[x, y, z, heat, size, …]` in CSS-pixel field coordinates — the
567
+ * layout maps straight onto a renderer's vertex buffer (e.g. a `THREE.BufferAttribute`), so an
568
+ * alternative surface can draw the swarm without a 2D context and without the engine exposing
569
+ * its internal particle objects. `z` is the optional depth lane (z-axis.md): always `0` in a flat
570
+ * field, populated only when the field was created with `depth > 0`. Zero-allocation and
571
+ * read-only: it never mutates the pool.
572
+ *
573
+ * Writes `min(particleCount(), floor(out.length / 5))` particles — pass `new Float32Array(cap *
574
+ * 5)` sized to your cap (over-sizing is safe; the return value is the count actually written).
575
+ * Pull-based: call once per frame after the engine has stepped, then upload the slice
576
+ * `[0, n*5)`. The companion of `particleCount()` for renderers that need positions, not just the
577
+ * tally; `@fundamental-engine/three`'s particle bridge is the first consumer.
578
+ */
579
+ readParticles(out: Float32Array): number;
580
+ /**
581
+ * The engine's eased page-scroll velocity for the current frame — the same EMA value the
582
+ * `scrolling` condition gate uses: `(prev × 0.7) + (|scrollDelta| × 0.3)` per frame.
583
+ * Units are pixels per frame at the native rAF cadence (~1 at 60 fps per pixel/s of scroll).
584
+ * Near 0 = user is reading/stopped; 2+ = slow deliberate scroll; 10+ = fast scan/jump.
585
+ * CAVEAT: px/frame is refresh-rate dependent — the same physical scroll reads roughly half
586
+ * this value on a 120 Hz display. A px/ms normalization may replace this unit before 1.0
587
+ * (the surface is experimental); thresholds tuned on 60 Hz should treat the value as coarse.
588
+ * Written to `--field-scroll-v` on `:root` by the platform write phase when a platform
589
+ * runtime is active. Pull-based: read on demand, do not poll in tight loops.
590
+ */
591
+ scrollV(): number;
592
+ /**
593
+ * Element-level visibility hint. `setVisible(false)` while the canvas is hidden or offscreen
594
+ * (`display:none`, scrolled out) skips ALL draw work — usually the dominant frame cost — while
595
+ * the simulation and its signals stay live: `scrollV()`, feedback vars (`--d`, `--load`),
596
+ * capture events keep flowing. Distinct from the tab-level pause (the engine already stops
597
+ * fully on the host's visibilitychange). `<field-root>` wires this automatically from an
598
+ * IntersectionObserver on the host element; call it yourself for custom embeddings.
599
+ */
600
+ setVisible(on: boolean): void;
601
+ /**
602
+ * Switch the substrate background live (the construction `background` option, at runtime).
603
+ * `'transparent'` clears to transparent so the underlay composites over light content;
604
+ * `'opaque'` restores the near-black substrate. Additive — no existing caller is affected.
605
+ */
606
+ setBackground(mode: 'opaque' | 'transparent'): void;
607
+ /** stop the loop and release listeners. */
608
+ destroy(): void;
609
+ }
610
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,WAAW,IAAI;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;gEACgE;AAChE,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAE3B;;0BAE0B;AAC1B,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC;AAEzD;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX;;;;;OAKG;IACH,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yCAAyC;IACzC,CAAC,EAAE,MAAM,CAAC;IACV,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,GAAG,EAAE,IAAI,GAAG,IAAI,CAAC;IACjB,qFAAqF;IACrF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,yEAAyE;IACzE,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;sFACkF;IAClF,GAAG,CAAC,EAAE,MAAM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AE,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B;;;;OAIG;IACH,aAAa,CAAC,IAAI,EAAE,QAAQ,GAAG,aAAa,GAAG,IAAI,CAAC;IACpD,2CAA2C;IAC3C,OAAO,IAAI,IAAI,CAAC;CACjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/core/types.ts"],"names":[],"mappings":""}