@wardic/dom 0.0.0-stage → 1.0.0-rc.2

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 (285) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +8 -2
  3. package/THIRD_PARTY_NOTICES.md +145 -0
  4. package/dist/Appear.d.ts +24 -0
  5. package/dist/Appear.d.ts.map +1 -0
  6. package/dist/Appear.js +25 -0
  7. package/dist/Appear.js.map +1 -0
  8. package/dist/Color.d.ts +14 -0
  9. package/dist/Color.d.ts.map +1 -0
  10. package/dist/Color.js +16 -0
  11. package/dist/Color.js.map +1 -0
  12. package/dist/DomAnnouncer.d.ts +13 -0
  13. package/dist/DomAnnouncer.d.ts.map +1 -0
  14. package/dist/DomAnnouncer.js +14 -0
  15. package/dist/DomAnnouncer.js.map +1 -0
  16. package/dist/DomClock.d.ts +11 -0
  17. package/dist/DomClock.d.ts.map +1 -0
  18. package/dist/DomClock.js +12 -0
  19. package/dist/DomClock.js.map +1 -0
  20. package/dist/DomDefaultTransition.d.ts +12 -0
  21. package/dist/DomDefaultTransition.d.ts.map +1 -0
  22. package/dist/DomDefaultTransition.js +13 -0
  23. package/dist/DomDefaultTransition.js.map +1 -0
  24. package/dist/DomInput.d.ts +13 -0
  25. package/dist/DomInput.d.ts.map +1 -0
  26. package/dist/DomInput.js +15 -0
  27. package/dist/DomInput.js.map +1 -0
  28. package/dist/DomInterpolators.d.ts +13 -0
  29. package/dist/DomInterpolators.d.ts.map +1 -0
  30. package/dist/DomInterpolators.js +14 -0
  31. package/dist/DomInterpolators.js.map +1 -0
  32. package/dist/DomKeyRules.d.ts +13 -0
  33. package/dist/DomKeyRules.d.ts.map +1 -0
  34. package/dist/DomKeyRules.js +14 -0
  35. package/dist/DomKeyRules.js.map +1 -0
  36. package/dist/DomPositionalKeys.d.ts +13 -0
  37. package/dist/DomPositionalKeys.d.ts.map +1 -0
  38. package/dist/DomPositionalKeys.js +14 -0
  39. package/dist/DomPositionalKeys.js.map +1 -0
  40. package/dist/DomProbe.d.ts +13 -0
  41. package/dist/DomProbe.d.ts.map +1 -0
  42. package/dist/DomProbe.js +14 -0
  43. package/dist/DomProbe.js.map +1 -0
  44. package/dist/DomProjectionSystem.d.ts +28 -0
  45. package/dist/DomProjectionSystem.d.ts.map +1 -0
  46. package/dist/DomProjectionSystem.js +41 -0
  47. package/dist/DomProjectionSystem.js.map +1 -0
  48. package/dist/DomRenderer.d.ts +13 -0
  49. package/dist/DomRenderer.d.ts.map +1 -0
  50. package/dist/DomRenderer.js +15 -0
  51. package/dist/DomRenderer.js.map +1 -0
  52. package/dist/FlushGate.d.ts +48 -0
  53. package/dist/FlushGate.d.ts.map +1 -0
  54. package/dist/FlushGate.js +62 -0
  55. package/dist/FlushGate.js.map +1 -0
  56. package/dist/MeasuredPair.d.ts +14 -0
  57. package/dist/MeasuredPair.d.ts.map +1 -0
  58. package/dist/MeasuredPair.js +16 -0
  59. package/dist/MeasuredPair.js.map +1 -0
  60. package/dist/OwnValues.d.ts +14 -0
  61. package/dist/OwnValues.d.ts.map +1 -0
  62. package/dist/OwnValues.js +15 -0
  63. package/dist/OwnValues.js.map +1 -0
  64. package/dist/ProjectionSystem.d.ts +34 -0
  65. package/dist/ProjectionSystem.d.ts.map +1 -0
  66. package/dist/ProjectionSystem.js +29 -0
  67. package/dist/ProjectionSystem.js.map +1 -0
  68. package/dist/ReorderController.d.ts +41 -0
  69. package/dist/ReorderController.d.ts.map +1 -0
  70. package/dist/ReorderController.js +44 -0
  71. package/dist/ReorderController.js.map +1 -0
  72. package/dist/Report.d.ts +12 -0
  73. package/dist/Report.d.ts.map +1 -0
  74. package/dist/Report.js +13 -0
  75. package/dist/Report.js.map +1 -0
  76. package/dist/ScrollOffset.d.ts +34 -0
  77. package/dist/ScrollOffset.d.ts.map +1 -0
  78. package/dist/ScrollOffset.js +42 -0
  79. package/dist/ScrollOffset.js.map +1 -0
  80. package/dist/Style.d.ts +15 -0
  81. package/dist/Style.d.ts.map +1 -0
  82. package/dist/Style.js +17 -0
  83. package/dist/Style.js.map +1 -0
  84. package/dist/Svg.d.ts +13 -0
  85. package/dist/Svg.d.ts.map +1 -0
  86. package/dist/Svg.js +14 -0
  87. package/dist/Svg.js.map +1 -0
  88. package/dist/Variables.d.ts +13 -0
  89. package/dist/Variables.d.ts.map +1 -0
  90. package/dist/Variables.js +14 -0
  91. package/dist/Variables.js.map +1 -0
  92. package/dist/index.d.ts +72 -0
  93. package/dist/index.d.ts.map +1 -0
  94. package/dist/index.js +60 -0
  95. package/dist/index.js.map +1 -0
  96. package/dist/internal/announcer.d.ts +50 -0
  97. package/dist/internal/announcer.d.ts.map +1 -0
  98. package/dist/internal/announcer.js +115 -0
  99. package/dist/internal/announcer.js.map +1 -0
  100. package/dist/internal/appear.d.ts +169 -0
  101. package/dist/internal/appear.d.ts.map +1 -0
  102. package/dist/internal/appear.js +499 -0
  103. package/dist/internal/appear.js.map +1 -0
  104. package/dist/internal/auto-scroll.d.ts +24 -0
  105. package/dist/internal/auto-scroll.d.ts.map +1 -0
  106. package/dist/internal/auto-scroll.js +124 -0
  107. package/dist/internal/auto-scroll.js.map +1 -0
  108. package/dist/internal/clock.d.ts +19 -0
  109. package/dist/internal/clock.d.ts.map +1 -0
  110. package/dist/internal/clock.js +39 -0
  111. package/dist/internal/clock.js.map +1 -0
  112. package/dist/internal/colors.d.ts +45 -0
  113. package/dist/internal/colors.d.ts.map +1 -0
  114. package/dist/internal/colors.js +193 -0
  115. package/dist/internal/colors.js.map +1 -0
  116. package/dist/internal/complex.d.ts +24 -0
  117. package/dist/internal/complex.d.ts.map +1 -0
  118. package/dist/internal/complex.js +28 -0
  119. package/dist/internal/complex.js.map +1 -0
  120. package/dist/internal/content-watch.d.ts +20 -0
  121. package/dist/internal/content-watch.d.ts.map +1 -0
  122. package/dist/internal/content-watch.js +76 -0
  123. package/dist/internal/content-watch.js.map +1 -0
  124. package/dist/internal/default-transition.d.ts +25 -0
  125. package/dist/internal/default-transition.d.ts.map +1 -0
  126. package/dist/internal/default-transition.js +41 -0
  127. package/dist/internal/default-transition.js.map +1 -0
  128. package/dist/internal/drag-defaults.d.ts +18 -0
  129. package/dist/internal/drag-defaults.d.ts.map +1 -0
  130. package/dist/internal/drag-defaults.js +38 -0
  131. package/dist/internal/drag-defaults.js.map +1 -0
  132. package/dist/internal/gate.d.ts +186 -0
  133. package/dist/internal/gate.d.ts.map +1 -0
  134. package/dist/internal/gate.js +453 -0
  135. package/dist/internal/gate.js.map +1 -0
  136. package/dist/internal/input.d.ts +41 -0
  137. package/dist/internal/input.d.ts.map +1 -0
  138. package/dist/internal/input.js +476 -0
  139. package/dist/internal/input.js.map +1 -0
  140. package/dist/internal/interpolators.d.ts +19 -0
  141. package/dist/internal/interpolators.d.ts.map +1 -0
  142. package/dist/internal/interpolators.js +30 -0
  143. package/dist/internal/interpolators.js.map +1 -0
  144. package/dist/internal/key-rules.d.ts +11 -0
  145. package/dist/internal/key-rules.d.ts.map +1 -0
  146. package/dist/internal/key-rules.js +244 -0
  147. package/dist/internal/key-rules.js.map +1 -0
  148. package/dist/internal/measure.d.ts +150 -0
  149. package/dist/internal/measure.d.ts.map +1 -0
  150. package/dist/internal/measure.js +278 -0
  151. package/dist/internal/measure.js.map +1 -0
  152. package/dist/internal/measured-pairs.d.ts +38 -0
  153. package/dist/internal/measured-pairs.d.ts.map +1 -0
  154. package/dist/internal/measured-pairs.js +251 -0
  155. package/dist/internal/measured-pairs.js.map +1 -0
  156. package/dist/internal/own-values.d.ts +35 -0
  157. package/dist/internal/own-values.d.ts.map +1 -0
  158. package/dist/internal/own-values.js +117 -0
  159. package/dist/internal/own-values.js.map +1 -0
  160. package/dist/internal/pass-ends.d.ts +21 -0
  161. package/dist/internal/pass-ends.d.ts.map +1 -0
  162. package/dist/internal/pass-ends.js +14 -0
  163. package/dist/internal/pass-ends.js.map +1 -0
  164. package/dist/internal/positional-keys.d.ts +16 -0
  165. package/dist/internal/positional-keys.d.ts.map +1 -0
  166. package/dist/internal/positional-keys.js +21 -0
  167. package/dist/internal/positional-keys.js.map +1 -0
  168. package/dist/internal/probe.d.ts +10 -0
  169. package/dist/internal/probe.d.ts.map +1 -0
  170. package/dist/internal/probe.js +117 -0
  171. package/dist/internal/probe.js.map +1 -0
  172. package/dist/internal/projection-defaults.d.ts +34 -0
  173. package/dist/internal/projection-defaults.d.ts.map +1 -0
  174. package/dist/internal/projection-defaults.js +21 -0
  175. package/dist/internal/projection-defaults.js.map +1 -0
  176. package/dist/internal/projection.d.ts +529 -0
  177. package/dist/internal/projection.d.ts.map +1 -0
  178. package/dist/internal/projection.js +4990 -0
  179. package/dist/internal/projection.js.map +1 -0
  180. package/dist/internal/renderer.d.ts +86 -0
  181. package/dist/internal/renderer.d.ts.map +1 -0
  182. package/dist/internal/renderer.js +616 -0
  183. package/dist/internal/renderer.js.map +1 -0
  184. package/dist/internal/reorder.d.ts +159 -0
  185. package/dist/internal/reorder.d.ts.map +1 -0
  186. package/dist/internal/reorder.js +437 -0
  187. package/dist/internal/reorder.js.map +1 -0
  188. package/dist/internal/report.d.ts +30 -0
  189. package/dist/internal/report.d.ts.map +1 -0
  190. package/dist/internal/report.js +60 -0
  191. package/dist/internal/report.js.map +1 -0
  192. package/dist/internal/require-global.d.ts +11 -0
  193. package/dist/internal/require-global.d.ts.map +1 -0
  194. package/dist/internal/require-global.js +31 -0
  195. package/dist/internal/require-global.js.map +1 -0
  196. package/dist/internal/reveal.d.ts +16 -0
  197. package/dist/internal/reveal.d.ts.map +1 -0
  198. package/dist/internal/reveal.js +66 -0
  199. package/dist/internal/reveal.js.map +1 -0
  200. package/dist/internal/runner.d.ts +21 -0
  201. package/dist/internal/runner.d.ts.map +1 -0
  202. package/dist/internal/runner.js +48 -0
  203. package/dist/internal/runner.js.map +1 -0
  204. package/dist/internal/scale-correction.d.ts +80 -0
  205. package/dist/internal/scale-correction.d.ts.map +1 -0
  206. package/dist/internal/scale-correction.js +227 -0
  207. package/dist/internal/scale-correction.js.map +1 -0
  208. package/dist/internal/scroll.d.ts +35 -0
  209. package/dist/internal/scroll.d.ts.map +1 -0
  210. package/dist/internal/scroll.js +244 -0
  211. package/dist/internal/scroll.js.map +1 -0
  212. package/dist/internal/scrollers.d.ts +35 -0
  213. package/dist/internal/scrollers.d.ts.map +1 -0
  214. package/dist/internal/scrollers.js +38 -0
  215. package/dist/internal/scrollers.js.map +1 -0
  216. package/dist/internal/starting-style.d.ts +141 -0
  217. package/dist/internal/starting-style.d.ts.map +1 -0
  218. package/dist/internal/starting-style.js +300 -0
  219. package/dist/internal/starting-style.js.map +1 -0
  220. package/dist/internal/svg.d.ts +60 -0
  221. package/dist/internal/svg.d.ts.map +1 -0
  222. package/dist/internal/svg.js +257 -0
  223. package/dist/internal/svg.js.map +1 -0
  224. package/dist/internal/variables.d.ts +45 -0
  225. package/dist/internal/variables.d.ts.map +1 -0
  226. package/dist/internal/variables.js +92 -0
  227. package/dist/internal/variables.js.map +1 -0
  228. package/package.json +65 -4
  229. package/src/Appear.ts +45 -0
  230. package/src/Color.ts +24 -0
  231. package/src/DomAnnouncer.ts +22 -0
  232. package/src/DomClock.ts +13 -0
  233. package/src/DomDefaultTransition.ts +16 -0
  234. package/src/DomInput.ts +22 -0
  235. package/src/DomInterpolators.ts +16 -0
  236. package/src/DomKeyRules.ts +17 -0
  237. package/src/DomPositionalKeys.ts +16 -0
  238. package/src/DomProbe.ts +15 -0
  239. package/src/DomProjectionSystem.ts +44 -0
  240. package/src/DomRenderer.ts +26 -0
  241. package/src/FlushGate.ts +81 -0
  242. package/src/MeasuredPair.ts +15 -0
  243. package/src/OwnValues.ts +19 -0
  244. package/src/ProjectionSystem.ts +51 -0
  245. package/src/ReorderController.ts +72 -0
  246. package/src/Report.ts +17 -0
  247. package/src/ScrollOffset.ts +54 -0
  248. package/src/Style.ts +37 -0
  249. package/src/Svg.ts +21 -0
  250. package/src/Variables.ts +17 -0
  251. package/src/index.ts +106 -0
  252. package/src/internal/announcer.ts +132 -0
  253. package/src/internal/appear.ts +739 -0
  254. package/src/internal/auto-scroll.ts +176 -0
  255. package/src/internal/clock.ts +45 -0
  256. package/src/internal/colors.ts +258 -0
  257. package/src/internal/complex.ts +29 -0
  258. package/src/internal/content-watch.ts +84 -0
  259. package/src/internal/culori.d.ts +58 -0
  260. package/src/internal/default-transition.ts +50 -0
  261. package/src/internal/drag-defaults.ts +54 -0
  262. package/src/internal/gate.ts +593 -0
  263. package/src/internal/input.ts +579 -0
  264. package/src/internal/interpolators.ts +33 -0
  265. package/src/internal/key-rules.ts +357 -0
  266. package/src/internal/measure.ts +357 -0
  267. package/src/internal/measured-pairs.ts +297 -0
  268. package/src/internal/own-values.ts +166 -0
  269. package/src/internal/pass-ends.ts +23 -0
  270. package/src/internal/positional-keys.ts +24 -0
  271. package/src/internal/probe.ts +176 -0
  272. package/src/internal/projection-defaults.ts +45 -0
  273. package/src/internal/projection.ts +5999 -0
  274. package/src/internal/renderer.ts +646 -0
  275. package/src/internal/reorder.ts +604 -0
  276. package/src/internal/report.ts +69 -0
  277. package/src/internal/require-global.ts +46 -0
  278. package/src/internal/reveal.ts +69 -0
  279. package/src/internal/runner.ts +64 -0
  280. package/src/internal/scale-correction.ts +310 -0
  281. package/src/internal/scroll.ts +356 -0
  282. package/src/internal/scrollers.ts +51 -0
  283. package/src/internal/starting-style.ts +396 -0
  284. package/src/internal/svg.ts +300 -0
  285. package/src/internal/variables.ts +145 -0
@@ -0,0 +1,529 @@
1
+ /**
2
+ * The box-based Projection system (ADR-0009), the reusable DOM half of
3
+ * layout animation. It holds the projection nodes, the trigger sources, and the
4
+ * Clock-driven coordinator that derives each node's transform every frame.
5
+ *
6
+ * It has NO framework reactivity: it reaches its host binding through two seams
7
+ * only — a {@link ProjectionSink} (`write` per-element projection values into the
8
+ * binding's flush gate + `flushPass` a Measure pass, applying its writes at once) and a
9
+ * `ManagedRuntime` providing the Environment's {@link FrameLoop} (the coordinator is one
10
+ * run on it, ADR-0027).
11
+ * So it lives here in `@wardic/dom`, next to `ClockDomLive`/the Renderer, and any
12
+ * binding (Solid today; React/vanilla later) wires it with its own gate + runtime.
13
+ *
14
+ * Pipeline (the locked design):
15
+ * - REGISTER a node (its gate `id`, `element`, and a `transition` accessor, ADR-0009 *Amendment (#171)*).
16
+ * - TRIGGER (registration / a shared `ResizeObserver` size change /
17
+ * `layoutDependency` via `notify`) -> ONE **Measure pass** per task, run by the
18
+ * engine in a microtask at the end of that task (ADR-0018).
19
+ * - MEASURE pass (through `sink.flushPass`, which applies what it wrote before
20
+ * returning): re-measure EVERY node's untransformed box (Q5); compute the
21
+ * projection TREE by DOM ancestry (each node's parent = the nearest ancestor
22
+ * ELEMENT that is a registered node); for each node that moved, set up an
23
+ * animation (origin + target) and seed the progress-0 frame; start the
24
+ * coordinator. A running node whose box didn't change is left alone. A trigger
25
+ * during the pass's own flush repeats it (at most 5 rounds). Every node the pass
26
+ * seeded takes its first step at the Frame loop's next tick, whose end flushes the
27
+ * gate, so it moves in that Refresh frame whatever the Clock's state (ADR-0033).
28
+ * - COORDINATOR (one run on the Environment's Frame loop while >=1 node animates,
29
+ * Q4; ADR-0027, #75): each tick steps every active node's progress spring, then
30
+ * `deriveAll()` walks the active nodes TOP-DOWN (ancestors first) computing
31
+ * each node's `projectionDelta` + `treeScale` via `applyTreeDeltas` over its
32
+ * animating ancestors' deltas, and writes the `@projection` value (the renderer
33
+ * assembles the transform). On settle it drops the node; when none remain the
34
+ * run settles and leaves the loop (idle = zero cost).
35
+ *
36
+ * DRAG (ADR-0016 and its *Amendment (#26)*): a dragged node follows the pointer through
37
+ * its target (`grabBox + dragDelta`), and it and its subtree are drag-blocked: a
38
+ * Measure pass updates their slots but starts no animation there, the dragged node is
39
+ * its subtree's relative parent, and a resting descendant is left to ride the drag
40
+ * through CSS. A pointer move re-derives the dragged group. The drag is a layer on top of
41
+ * the node's layout animation, which a grab leaves running; the release is a **Release
42
+ * offset**, the drag target's distance from where the layout puts the node, springing to
43
+ * zero per axis on top of it from the loop's next tick (ADR-0016, *Amendment (velocity
44
+ * family)*).
45
+ *
46
+ * Nesting: parent links come from a DOM-ancestry WALK (CSS composes by DOM
47
+ * nesting, so that is exactly what projection must follow), and a child's box is
48
+ * corrected for its ancestors' transforms via `applyTreeDeltas` (+ `treeScale`)
49
+ * for nested SCALE. For nested layout, an animating child with a pure-translate
50
+ * animating ancestor uses RELATIVE projection (`relativeParentOf` + `derive`): it
51
+ * re-anchors to its `relativeParent`'s CURRENT target each frame, so it stays
52
+ * glued even when parent and child run DIFFERENT transitions ("not left behind").
53
+ *
54
+ * DOM ACCESS (#16, parked until a second Environment): the engine is meant to move into
55
+ * `@wardic/core` behind a port its Environment implements, once a non-DOM Environment (canvas,
56
+ * native) gives that port a second implementation to be shaped against. Until then, NEW DOM
57
+ * access goes through a named read function in `measure.ts`, never inline here (no new
58
+ * `getComputedStyle`, `getBoundingClientRect`, `parentElement` walk or `contains` in this file):
59
+ * `measure.ts` is the port's surface, and #16 maps what this file still does inline.
60
+ */
61
+ import * as Box from "@wardic/core/Box";
62
+ import * as FrameLoop from "@wardic/core/FrameLoop";
63
+ import type * as Arc from "@wardic/core/Arc";
64
+ import type * as Point from "@wardic/core/Point";
65
+ import * as Probe from "@wardic/core/Probe";
66
+ import * as Projection from "@wardic/core/Projection";
67
+ import * as Renderer from "@wardic/core/Renderer";
68
+ import * as Effect from "effect/Effect";
69
+ import type * as Fiber from "effect/Fiber";
70
+ import * as Inspectable from "effect/Inspectable";
71
+ import * as Option from "effect/Option";
72
+ import * as Scope from "effect/Scope";
73
+ import { AtomRegistry } from "effect/reactivity";
74
+ import { type DragTransition, type LayoutTransition } from "./projection-defaults.ts";
75
+ import { type ScaleCorrectorEntry } from "./scale-correction.ts";
76
+ /**
77
+ * What the engine writes each node's projection through: a `FlushGate` is one, so the engine never
78
+ * imports a framework. `write` merges an element's projection into what it draws at the next frame;
79
+ * `flushPass` runs a measure now, and draws what it wrote before it returns, so a new layout never paints
80
+ * without its projection.
81
+ */
82
+ export interface ProjectionSink {
83
+ /** Merges `partial` into element `id`'s values, drawn at the next frame. */
84
+ readonly write: (id: string, partial: Record<string, unknown>) => void;
85
+ /** Runs `pass`, a measure, now, and draws what it wrote before it returns. */
86
+ readonly flushPass: (pass: () => void) => void;
87
+ }
88
+ /**
89
+ * What the engine needs from its Environment: the Frame loop it runs on, the renderer, which draws a
90
+ * leaving follower whose gate is gone, and the Probe's viewport, read through the Environment's
91
+ * `AtomRegistry`, so it lands rather than animates through a resize.
92
+ */
93
+ export type ProjectionServices = FrameLoop.FrameLoop | Renderer.Renderer | Probe.Probe | AtomRegistry.AtomRegistry;
94
+ /**
95
+ * How the engine runs its Effects: synchronously, and forked. `DomProjectionSystem.make` builds one
96
+ * from its Layer's context, forking into its Scope (#132, ADR-0041); a test's `ManagedRuntime`
97
+ * is one too.
98
+ */
99
+ export interface ProjectionRuntime {
100
+ readonly runSync: <A, E>(effect: Effect.Effect<A, E, ProjectionServices>) => A;
101
+ readonly runFork: <A, E>(effect: Effect.Effect<A, E, ProjectionServices>) => Fiber.Fiber<A, E>;
102
+ /** The Scope it was built in: its own fibers live there, ended as it closes (#618). */
103
+ readonly scope: Scope.Scope;
104
+ }
105
+ /**
106
+ * Whether `a` and `b` draw the same (#27, ADR-0009 *Amendment (#27)*): every field the renderer reads,
107
+ * each axis's translate and scale, the tree scale, the opacities, the rotation, the raise and the
108
+ * pointer pass-through, and each axis's origin. Not `originPoint`, the engine's own, which moves with
109
+ * a translating parent while nothing drawn changes. Per frame: statement `if`s, no allocation. Exported
110
+ * for its test, not from the package.
111
+ */
112
+ export declare const drawsSame: (a: Projection.Value, b: Projection.Value) => boolean;
113
+ /** Options to register a layout element as a projection node. */
114
+ export interface RegisterNodeOptions {
115
+ /** The element's id in the flush gate: the engine writes its projection there, beside its animated values. */
116
+ readonly id: string;
117
+ /** The live DOM element to measure + project. */
118
+ readonly element: HTMLElement;
119
+ /**
120
+ * The node's layout transition, read at each layout animation's (re)start: a spring or a tween, or
121
+ * `None` for Motion's default, {@link DEFAULT_LAYOUT_TRANSITION}.
122
+ */
123
+ readonly transition: () => Option.Option<LayoutTransition>;
124
+ /**
125
+ * The element's Path, read at each layout animation's start: a flight of 20 px or more curves its
126
+ * centre along it, from where it starts to its box, its size still mixed straight, as Motion's
127
+ * `interpolateProjection`. None, or left out, and every flight is straight.
128
+ */
129
+ readonly path?: (() => Option.Option<Arc.Path>) | undefined;
130
+ /**
131
+ * The app's `onLayoutAnimationStart`, read when it fires: at the frame where a layout animation of
132
+ * this node takes its first step, once per animation (restarts in one task are one). Not for a node
133
+ * that is a **Follower**: a handover is its Lead's. `None` when the app has none.
134
+ */
135
+ readonly onLayoutAnimationStart?: () => Option.Option<() => void>;
136
+ /**
137
+ * The app's `onLayoutAnimationComplete`, read when it fires: at the frame where a layout animation of
138
+ * this node lands on its own. Not for one interrupted by a restart, finished early by a window resize,
139
+ * or cut off by an unmount; not for a Follower. `None` when the app has none.
140
+ */
141
+ readonly onLayoutAnimationComplete?: () => Option.Option<() => void>;
142
+ /**
143
+ * The app's `onDragTransitionEnd` (Motion's), read when it fires: once a drag's release (its **Release
144
+ * offset**) comes to rest on its own, after that frame's flush; for a drag released in place at rest,
145
+ * which starts none, from a microtask after the release. Not for one a grab stopped and a drag took
146
+ * over, nor one an unmount or a resize ended. `None` when the app has none.
147
+ */
148
+ readonly onReleaseEnd?: () => Option.Option<() => void>;
149
+ /**
150
+ * The node's drag transition, read at each release: what its Release offset runs on, or `None` for
151
+ * Motion's, {@link DEFAULT_DRAG_TRANSITION}.
152
+ */
153
+ readonly dragTransition?: () => Option.Option<DragTransition>;
154
+ /**
155
+ * Whether the node's layout animations honour reduced motion, read at each (re)start: `false` animates
156
+ * them whatever the system's `reducedMotion` says (a binding's per-transition opt-out). Default
157
+ * `true`.
158
+ */
159
+ readonly respectReducedMotion?: () => boolean;
160
+ /**
161
+ * Whether reduced motion applies to the node now, read at each layout animation's (re)start: a
162
+ * binding's setting for its subtree with the user's preference (Wardic's `WardicConfig`). Default: the
163
+ * system's `reducedMotion`.
164
+ */
165
+ readonly reducedMotion?: () => boolean;
166
+ /**
167
+ * Whether the node's animations are skipped now (a binding's `skipAnimations`), read at each layout
168
+ * animation's (re)start and each drag release: it lands at once, whatever reduced motion says, and a
169
+ * release lands on its slot. Default: never.
170
+ */
171
+ readonly skipAnimations?: () => boolean;
172
+ /**
173
+ * The node's **Layout mode**, read at each layout animation's start: which parts of a layout change it
174
+ * animates. Default `true`, position and size.
175
+ */
176
+ readonly layoutMode?: () => Projection.LayoutMode;
177
+ /**
178
+ * The element's own scale per axis: its `scale` times its `scaleX` or `scaleY`, which the renderer
179
+ * draws on top of its projection (`ownScaleOf`). Read at each handover, and each frame a Follower is
180
+ * derived. Default `{ x: 1, y: 1 }`.
181
+ */
182
+ readonly ownScale?: () => Point.Point;
183
+ /**
184
+ * The element's own translate: its `x` plus `translateX` and `y` plus `translateY`, in page pixels,
185
+ * which the renderer adds to its projection's (`ownTranslateOf`). Read where its own scale is. Default
186
+ * `{ x: 0, y: 0 }`.
187
+ */
188
+ readonly ownTranslate?: () => Point.Point;
189
+ /**
190
+ * The element's own `rotate` in degrees, which the renderer weaves into its projection
191
+ * (`ownRotateOf`): what a handover blends a twin's rotation into, read each frame of one. Default 0.
192
+ */
193
+ readonly ownRotate?: () => number;
194
+ /**
195
+ * The element's own opacity (`ownOpacityOf`): what a Switch blends the leaver's opacity into, read
196
+ * each frame of one, and a leaver's when it's already off the page. Default 1.
197
+ */
198
+ readonly ownOpacity?: () => number;
199
+ /**
200
+ * The transform a Measure pass holds the element at (Motion's `transformTemplate(values, "")`): its
201
+ * **Transform template**'s with no transform of Wardic's, so a static part of it, such as centring, is
202
+ * in the boxes it flies between. Read at each pass. Without one, the pass clears it.
203
+ */
204
+ readonly heldTransform?: () => string;
205
+ /**
206
+ * Called as each Measure pass that measures the node begins (Motion's `onBeforeLayoutMeasure`): in its
207
+ * write phase, before its transform is held for the read, blocked passes included. A throw is
208
+ * reported, and the pass goes on.
209
+ */
210
+ readonly onBeforeMeasure?: () => void;
211
+ /**
212
+ * Called with the node's box each Measure pass measures it (Motion's `onLayoutMeasure`), after the
213
+ * read: in its Scroll-stable frame, Motion's page layout box, and the box before it, none at its
214
+ * first. Blocked passes included. A throw is reported, and the pass goes on.
215
+ */
216
+ readonly onMeasure?: (box: Box.Box, prev: Option.Option<Box.Box>) => void;
217
+ /**
218
+ * Its shared-element key: nodes with the same `layoutId` are twins, and one flies into the other, the
219
+ * newest leading and the others following, crossfading. A twin removed in the same task as its twin
220
+ * arrives hands it where it was. Left out for a plain layout node.
221
+ */
222
+ readonly layoutId?: string;
223
+ /**
224
+ * Marks the element a scroll container, as Motion's `layoutScroll`: its scroll is read at each measure
225
+ * and taken out of its descendants' boxes, so a scroll between two layout changes doesn't animate them;
226
+ * as a `position: fixed` scroll root, its style is read at every measure. Every other ancestor that can
227
+ * scroll is taken out too, unmarked.
228
+ */
229
+ readonly layoutScroll?: boolean;
230
+ /**
231
+ * Marks the element a layout root, as Motion's `layoutRoot`: it never animates its own layout change,
232
+ * landing on it at once, and its subtree's projections stop at it, so a change outside it doesn't move
233
+ * what's inside.
234
+ */
235
+ readonly layoutRoot?: boolean;
236
+ /**
237
+ * Where in its parent the node is anchored, as Motion's `layoutAnchor`, from 0 to 1 on each axis: its
238
+ * top-left, `{ x: 0, y: 0 }`, by default. Its box is kept relative to that point while its parent
239
+ * animates. `false` keeps it absolute.
240
+ */
241
+ readonly layoutAnchor?: Point.Point | false;
242
+ /**
243
+ * Whether a handover onto this node crossfades (Motion's `layoutCrossfade`), read as each begins:
244
+ * `false` hides its Followers as it starts, and it moves at its own opacity. A Switch blends as ever.
245
+ * Left out, every handover crossfades.
246
+ */
247
+ readonly crossfade?: (() => boolean) | undefined;
248
+ /**
249
+ * Raises the node while it's dragged: from the drag's start until its release settles, at once for a
250
+ * release in place, its projection carries a raise the renderer draws as `z-index`, so it paints above
251
+ * its siblings, as Motion's Reorder items do; then one last write drops it. It's `2` while dragged and
252
+ * `1` once released, so the item under the pointer paints above one flying back. A Reorder item sets it.
253
+ */
254
+ readonly raiseWhileDragged?: boolean;
255
+ /**
256
+ * Where a presence child taking over from its leaver starts: the leaver's box in the **Root frame**,
257
+ * as it painted ({@link ProjectionSystem.rootBoxOf}). The node's first measure moves it from there to
258
+ * its own box, as a layout change, with no handover. A live twin to crossfade from comes first; this
259
+ * comes before a Switch seed.
260
+ */
261
+ readonly enteredFrom?: Box.Box;
262
+ /**
263
+ * Where the handover its first measure begins starts its fade: a keyed twin back while its leaver
264
+ * crossfades out goes on from the factor that leaver had faded to ({@link
265
+ * ProjectionSystem.dropLeaver}). Omitted, 0.
266
+ */
267
+ readonly fadeFrom?: number;
268
+ }
269
+ /**
270
+ * How a draggable layout node is dragged: through its projection, not its own `x` and `y`, which stay its
271
+ * animations', drawn on top. A binding's drag calls these, so the element follows the pointer and flies to
272
+ * its place at the release. Part of `ProjectionNodeHandle`.
273
+ */
274
+ export interface DragProjectionHandle {
275
+ /**
276
+ * Begin a drag: capture the grab-time slot box as the pointer anchor, from where a stopped
277
+ * release left the node; hold the node active. A layout animation running at the grab runs
278
+ * on under the drag.
279
+ */
280
+ readonly dragStart: () => void;
281
+ /**
282
+ * The live pointer translate from the grab point — the node tracks `grabBox + delta`.
283
+ * Re-derives the dragged group into the sink at once, so the gate's next flush paints it.
284
+ */
285
+ readonly dragMove: (delta: Point.Point) => void;
286
+ /**
287
+ * End the drag: from the loop's next tick, the drag target's distance from where the layout
288
+ * puts the node springs to zero on each axis (a **Release offset**), starting at `velocity`
289
+ * (px/s; at rest when omitted) on top of the node's layout animation.
290
+ */
291
+ readonly dragEnd: (velocity?: Point.Point) => void;
292
+ /**
293
+ * A grab (a press on the element): stop a running release where it is, as Motion's drag
294
+ * stops its offset at the press. A drag that follows continues from there.
295
+ */
296
+ readonly stopRelease: () => void;
297
+ /** A press that ends with no drag: start a stopped release again, from rest. */
298
+ readonly resumeRelease: () => void;
299
+ }
300
+ /** Handle returned from {@link ProjectionSystem.register}. */
301
+ export interface ProjectionNodeHandle extends DragProjectionHandle {
302
+ /** Asks for a measure at the end of the task, however many ask: this node's `layoutDependency` changed, say. */
303
+ readonly notify: () => void;
304
+ /**
305
+ * The node's slot (its layout box) in the Scroll-stable frame, as of its last Measure pass; none
306
+ * before the first. A plain read: no layout read.
307
+ */
308
+ readonly layoutBox: () => Option.Option<Box.Box>;
309
+ /**
310
+ * How far the node paints from its slot while dragged (the drag target minus the
311
+ * slot, per axis, leaving out a layout animation the grab left running); `{ x: 0, y: 0 }`
312
+ * otherwise, the release included.
313
+ */
314
+ readonly dragOffset: () => Point.Point;
315
+ /**
316
+ * A count that rises with every Measure pass round that measures the node (a
317
+ * blocked one included); 0 before the first. A **Reorder group** waits on it after
318
+ * a reorder, as on Motion's former `layoutVersion` counter (removed in motion-dom
319
+ * 13.4.5).
320
+ */
321
+ readonly layoutVersion: () => number;
322
+ /**
323
+ * A **Keyboard reorder**'s lift: `true` raises the node as a drag does (`2`) while it's lifted,
324
+ * through the layout animations its steps start; `false` (its drop or cancel) leaves it raised (`1`)
325
+ * until its last one lands, as a drag's release does, or drops the raise now at rest.
326
+ */
327
+ readonly setLifted: (on: boolean) => void;
328
+ /** Unregisters the node, ending an animation in flight. */
329
+ readonly dispose: () => void;
330
+ }
331
+ /** The Projection system: what a binding registers its layout elements with, one per provider. */
332
+ export interface ProjectionSystem extends Inspectable.Inspectable {
333
+ /**
334
+ * Registers a layout element: its node, from then on measured at each layout change and animated from
335
+ * where it was. The handle tells the engine what changed, and its `dispose` removes the node.
336
+ */
337
+ readonly register: (opts: RegisterNodeOptions) => ProjectionNodeHandle;
338
+ /**
339
+ * Asks for a measure of the whole tree at the end of the task, however many ask: for a change a group
340
+ * declares, as a layout group's `layoutDependency` does, so every node its change moves animates.
341
+ */
342
+ readonly notify: () => void;
343
+ /**
344
+ * A **Declared layout change**: run `fn`, and animate the layout change it makes from where every node
345
+ * is at the call, even where no trigger sees the change or a node's last Measurement is out of date.
346
+ * Returns `fn`'s result; its error throws to the caller.
347
+ *
348
+ * - **The Measurements.** The first call in a task measures every node before `fn` runs. A Measure
349
+ * pass already due in the task runs then instead, so what triggered it animates as before, and its
350
+ * reads are the Measurements. Later calls in the task share them, so a node one call's change pushes
351
+ * animates from before the first change (Motion's `parallel-calls-intersecting`).
352
+ * - **The pass.** The Measure pass at the end of the task animates every node that moved from those
353
+ * Measurements. A running animation `fn` moves restarts from where it paints; one it doesn't move
354
+ * carries on.
355
+ * - **What stays as in any pass.** A **Resize block** wins: `fn` runs and nothing animates. A dragged
356
+ * subtree takes its slot-only update. A call from inside a pass's own flush uses the reads that pass
357
+ * just made.
358
+ * - **Synchronous only.** A promise `fn` returns isn't awaited: a change after an `await` is in a
359
+ * later task. Such a call logs a warning.
360
+ * - **`onSettled`** is called once the change has settled: every layout animation the end-of-task pass
361
+ * started has ended, however each ended (landed, cut short by a resize or an unmount, or restarted
362
+ * by a later change), or at the end of that pass if it started none. Calls in one task share that
363
+ * pass, so they settle together.
364
+ */
365
+ readonly animateLayout: <A>(fn: () => A, options?: AnimateLayoutOptions) => A;
366
+ /**
367
+ * An **Instant change** (Motion's `useInstantLayoutTransition`): run `fn`, and the Measure pass at the
368
+ * end of the task gives every node its new box and starts nothing, as a Resize block's does. Every
369
+ * running layout animation but a dragged node's ends on its slot as that pass begins.
370
+ */
371
+ readonly instant: (fn?: () => void) => void;
372
+ /**
373
+ * A **Projection reset** (Motion's `useResetProjection`): every running layout animation and Release
374
+ * offset ends on its slot, every leaver and Switch seed goes (each `layoutId` stack keeps its live
375
+ * nodes), and the next Measure pass measures every box afresh, animating none.
376
+ */
377
+ readonly reset: () => void;
378
+ /**
379
+ * A leaving `layoutId` element its exit keeps in the document: `true` when there's a live twin, the
380
+ * lead, to crossfade toward. The engine then draws `el` as a leaving follower, on the lead's box and
381
+ * fading out, through the renderer since its gate is gone, and calls `onDone` once the crossfade settles,
382
+ * so the exit removes it. `false` for one with no twin: its own exit runs as usual.
383
+ */
384
+ readonly handleLeave: (el: HTMLElement, onDone: () => void) => boolean;
385
+ /**
386
+ * Hand back the twins inside a leaving element that isn't a twin, for a presence child {@link
387
+ * handleLeave} declined: each crossfades onto its other twin, following the leaver's own exit.
388
+ * `onDone` once every handover has ended; the returned call drops them at once. `None` when it held
389
+ * none, so presence runs its exit alone.
390
+ */
391
+ readonly handBackWithin: (el: HTMLElement, onDone: () => void) => Option.Option<() => void>;
392
+ /**
393
+ * A presence child leaving with nobody to take its twins over: the twins it held as it went, inside it
394
+ * or it a twin itself, stay a later twin's to take over while it's on the page, until the returned
395
+ * call: the presence removing it, which ends their records at once (a held leaver otherwise lasts
396
+ * until a task ends with it off the page). A twin that registers meanwhile brings one back as its
397
+ * leaving Follower, as if it were live in its stack, and tells the presence through `taken` ({@link
398
+ * LateTaken}), which holds the child for that handover.
399
+ *
400
+ * Its layout nodes with no `layoutId`, it included, come back as nodes it carries: corrected for an
401
+ * ancestor's layout animation while it exits, its exit's own values drawn on the correction, and gone
402
+ * with the returned call.
403
+ */
404
+ readonly keepLeaving: (el: HTMLElement, taken: LateTaken) => () => void;
405
+ /**
406
+ * Whether a twin that `el` is, or holds, left in this task with no live twin in its stack yet: a twin
407
+ * arriving later in the same update takes it over, so a presence decides on `el`'s leave at the task's
408
+ * end, when {@link handleLeave} or {@link handBackWithin} finds that twin.
409
+ */
410
+ readonly awaitsTwin: (el: HTMLElement) => boolean;
411
+ /**
412
+ * A leaver its presence popped out of the flow: at the first frame after, if the page scrolled since
413
+ * (a router's scroll to the top at a navigation), `move` takes it by that scroll, so it stays where it
414
+ * was seen, and the leaving nodes inside it go with it. Once: scrolling after moves it with the page.
415
+ */
416
+ readonly keepSeen: (el: HTMLElement, move: (by: Point.Point) => void) => void;
417
+ /**
418
+ * Register an element's values: a binding hands every element's, read from what it last wrote, so a
419
+ * `layoutId` twin's flight follows the translate and scale Wardic animates on its ancestors each
420
+ * frame, an element that isn't a projection node included. A presence registers a leaver's drawn
421
+ * values in their place, its Transform template among them, so it's drawn through it as it leaves.
422
+ * Returns the unregistration, for the element's dispose.
423
+ */
424
+ readonly registerValues: (el: Element, read: () => Readonly<Record<string, unknown>>) => () => void;
425
+ /**
426
+ * An element's box in the **Root frame** as it paints now, its transforms included: where a presence
427
+ * child taking over from it starts ({@link RegisterNodeOptions.enteredFrom}). `None` for one off the
428
+ * page.
429
+ */
430
+ readonly rootBoxOf: (el: HTMLElement) => Option.Option<Box.Box>;
431
+ /**
432
+ * End a leaving Follower at once: a keyed presence child is back while its twin crossfades out, and
433
+ * takes over. Its `onDone` is called, as at its handover's end. Returns the crossfade factor it had
434
+ * faded to, for the child's new node to go on from ({@link RegisterNodeOptions.fadeFrom}); `None` for
435
+ * an element that isn't one.
436
+ */
437
+ readonly dropLeaver: (el: HTMLElement) => Option.Option<number>;
438
+ /** Stops the engine: its run, its observers and its listeners. The Layer's Scope calls it. */
439
+ readonly dispose: () => void;
440
+ /**
441
+ * Run `listener` at the end of every Measure pass; returns the unsubscribe. The engine's Layer hands
442
+ * it out as the internal `PassEnds` service, beside the engine, not on it (internal/pass-ends.ts).
443
+ */
444
+ readonly onPassEnd: (listener: () => void) => () => void;
445
+ /**
446
+ * The tree as plain data, for a diagnostic read: every node now, in the order it was registered.
447
+ * `console.log(system)` shows it (Effect's `Inspectable`). Parent links are the last Measure pass's,
448
+ * as the engine reads them.
449
+ */
450
+ readonly toJSON: () => Tree;
451
+ }
452
+ /** {@link ProjectionSystem.toJSON}'s tree. */
453
+ export interface Tree {
454
+ /** What it is, as Effect's `Inspectable` names it. */
455
+ readonly _id: "ProjectionSystem";
456
+ /** Every node, in the order it was registered. */
457
+ readonly nodes: ReadonlyArray<TreeNode>;
458
+ }
459
+ /** One node in a {@link Tree}. */
460
+ export interface TreeNode {
461
+ /** The id its binding registered it with. */
462
+ readonly id: string;
463
+ /** Its element's tag, lower-case. */
464
+ readonly tag: string;
465
+ /** Its `layoutId`, if it has one. */
466
+ readonly layoutId: string | undefined;
467
+ /** Its parent's id, as the last Measure pass found it by DOM ancestry; `undefined` for a root. */
468
+ readonly parent: string | undefined;
469
+ /** Whether it's a layout root. */
470
+ readonly layoutRoot: boolean;
471
+ /** A `layoutId` twin's part: the Lead, the newest live one, or a Follower; `undefined` for none. */
472
+ readonly twin: "lead" | "follower" | undefined;
473
+ /** A Follower's Lead's id. */
474
+ readonly lead: string | undefined;
475
+ /** A layout animation in flight. */
476
+ readonly animating: boolean;
477
+ /** A drag in progress. */
478
+ readonly dragging: boolean;
479
+ /** A drag's release, running on its Release offset. */
480
+ readonly releasing: boolean;
481
+ /** Kept by a presence while it leaves. */
482
+ readonly leaving: boolean;
483
+ }
484
+ /** `animateLayout`'s options. */
485
+ export interface AnimateLayoutOptions {
486
+ /** Called once the change has settled: every layout animation it started has ended, however; at once after its pass if it started none. */
487
+ readonly onSettled?: () => void;
488
+ /**
489
+ * Where the change animates from: the boxes at the call (`"call"`, the default), or the last Measure
490
+ * pass's (`"lastPass"`), for a change a framework applied after the call, such as a write Solid 2
491
+ * held, which no pass has seen yet. With `"lastPass"` the call takes no Measurements of its own: the
492
+ * pass it asks for compares with the boxes the last one kept.
493
+ */
494
+ readonly from?: "call" | "lastPass" | undefined;
495
+ }
496
+ /**
497
+ * A late take-over of a twin inside a leaving presence child, told to its presence, with `drop` to end
498
+ * the handover at once. Returns what ends it as one of the child's parts.
499
+ */
500
+ export type LateTaken = (drop: () => void) => () => void;
501
+ /** What a binding hands its engine. */
502
+ export interface ProjectionSystemOptions {
503
+ /**
504
+ * Whether reduced motion applies now, read when a layout animation starts: the binding's
505
+ * `ReducedMotion.applies` of its app's setting and the user's preference. Under it, a layout animation
506
+ * lands on its new box at once, and a crossfade switches at once; a drag's release still returns to
507
+ * its slot, since it continues the gesture (as Motion's does). By default, never.
508
+ */
509
+ readonly reducedMotion?: () => boolean;
510
+ /**
511
+ * The app's own scale correctors (Motion's `addScaleCorrector` entries), by the value key each
512
+ * corrects, for this system's nodes alone. Each is handed the element's own value for its key each
513
+ * frame (from its `style` or an animation), else its computed value read at its first Measurement, and
514
+ * writes nothing while the projection doesn't scale it, putting the value back once. One keyed
515
+ * `borderRadius` or `boxShadow` replaces the built-in one, and a replaced radius isn't blended across
516
+ * a handover.
517
+ */
518
+ readonly scaleCorrectors?: Readonly<Record<string, ScaleCorrectorEntry>> | undefined;
519
+ }
520
+ /**
521
+ * Build a projection system against a binding's `runtime` (providing its
522
+ * {@link FrameLoop}) and its {@link ProjectionSink} (its flush gate).
523
+ *
524
+ * Runs the coordinator on `runtime`'s Frame loop; the binding disposes the system in
525
+ * its own teardown (e.g. the provider's `onCleanup`).
526
+ */
527
+ export declare const makeProjectionSystem: (runtime: ProjectionRuntime, sink: ProjectionSink, options?: ProjectionSystemOptions) => ProjectionSystem;
528
+ export { DEFAULT_DRAG_TRANSITION, DEFAULT_LAYOUT_TRANSITION, type DragTransition, type LayoutTransition } from "./projection-defaults.ts";
529
+ //# sourceMappingURL=projection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../src/internal/projection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,OAAO,KAAK,GAAG,MAAM,kBAAkB,CAAA;AAEvC,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAA;AAGnD,OAAO,KAAK,KAAK,GAAG,MAAM,kBAAkB,CAAA;AAC5C,OAAO,KAAK,KAAK,KAAK,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAA;AAC3C,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAA;AACrD,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAA;AAOjD,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAI1C,OAAO,KAAK,WAAW,MAAM,oBAAoB,CAAA;AAGj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