@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,616 @@
1
+ /**
2
+ * `RendererDomLive` — the browser realization of `Renderer` (ADR-0002).
3
+ *
4
+ * Split into the two halves the contract mandates:
5
+ *
6
+ * - {@link project} — PURE, synchronous: translates engine values into a DOM
7
+ * `Patch`. Its one piece of real work is grouping the individual transform
8
+ * keys (`x`/`y`/`scale`/`rotate`/…) into a single CSS `transform` string in
9
+ * a canonical order, and applying default units (px/deg) to bare numbers.
10
+ * Reused by the Starting style so this grouping/unit logic isn't duplicated in
11
+ * the binding (ADR-0002). No side effects, no Effect.
12
+ * - {@link commit} — imperative: writes each `Patch` entry onto `target.style`, now.
13
+ * The flush gate calls it once per element per Refresh frame (ADR-0034), and
14
+ * `applyTo` once per Frame.
15
+ *
16
+ * Observability (CONTEXT.md convention): `project` and `commit` are the
17
+ * per-frame hot path, so — exactly like core's `applyTo` per-frame writes and
18
+ * the Clock's `tick` — they stay quiet (no span, no per-call log).
19
+ */
20
+ import * as BaseValue from "@wardic/core/BaseValue";
21
+ import * as Projection from "@wardic/core/Projection";
22
+ import * as Renderer from "@wardic/core/Renderer";
23
+ import { dashCase, isSvgInner, setSvgAttrs, splitPatch } from "./svg.js";
24
+ import * as Bool from "effect/Boolean";
25
+ import * as Layer from "effect/Layer";
26
+ import * as Predicate from "effect/Predicate";
27
+ import * as UndefinedOr from "effect/UndefinedOr";
28
+ /**
29
+ * CSS transform functions in their canonical emission order: translate group,
30
+ * then scale, then rotate, then skew. `project` walks this list and emits a
31
+ * func for each key that is present in `values` and not at its identity, so the
32
+ * resulting `transform` string is always grouped in this order regardless of
33
+ * input key order.
34
+ *
35
+ * `key` is the property name accepted on engine values (shorthands `x`/`y`/`z`
36
+ * included); `fn` is the CSS function name it renders as; `identity` is core's
37
+ * (ADR-0022), the value at which `project` leaves the key out (ADR-0023).
38
+ */
39
+ const TRANSFORM_FUNCS = [
40
+ // translate group — shorthands x/y/z map onto translateX/Y/Z
41
+ { key: "x", fn: "translateX" },
42
+ { key: "y", fn: "translateY" },
43
+ { key: "z", fn: "translateZ" },
44
+ { key: "translateX", fn: "translateX" },
45
+ { key: "translateY", fn: "translateY" },
46
+ { key: "translateZ", fn: "translateZ" },
47
+ // scale group — `scale` is uniform scale(v); scaleX/scaleY are per-axis (flip)
48
+ { key: "scale", fn: "scale" },
49
+ { key: "scaleX", fn: "scaleX" },
50
+ { key: "scaleY", fn: "scaleY" },
51
+ // rotate group: a path's turn after the element's own (#438), which `rotate(a) rotate(b)` adds up
52
+ { key: "rotate", fn: "rotate" },
53
+ { key: "pathRotation", fn: "rotate" },
54
+ { key: "rotateX", fn: "rotateX" },
55
+ { key: "rotateY", fn: "rotateY" },
56
+ { key: "rotateZ", fn: "rotateZ" },
57
+ // skew group
58
+ { key: "skewX", fn: "skewX" },
59
+ { key: "skewY", fn: "skewY" },
60
+ ].map((f) => ({ ...f, identity: UndefinedOr.getOrThrow(BaseValue.TRANSFORM_IDENTITY[f.key]) }));
61
+ /**
62
+ * Whether a transform value is at its identity (ADR-0023), Motion's test
63
+ * (motion-dom build-transform.ts:42-48 at 16c61222c4166bbef5ff6ab0051192faa79fa8c8):
64
+ * a number equal to it, or a string `parseFloat` takes to it (`"0px"`, `"0%"`,
65
+ * `"0deg"`; never `"calc(0px)"` or `"var(--x)"`). Exact: a settled spring lands on
66
+ * its target, and a value next to the identity mid-flight is still written.
67
+ */
68
+ const isIdentity = (value, identity) => {
69
+ if (Predicate.isNumber(value))
70
+ return value === identity;
71
+ return Predicate.isString(value) && Number.parseFloat(value) === identity;
72
+ };
73
+ /** `value` when it's a number, else `fallback`. Per frame: an early return, no Option. */
74
+ const numberOr = (value, fallback) => {
75
+ if (Predicate.isNumber(value))
76
+ return value;
77
+ return fallback;
78
+ };
79
+ /**
80
+ * Default-unit map for transform values: translate (and the x/y/z shorthands)
81
+ * are lengths → `px`; rotate/skew are angles → `deg`; scale* are unitless.
82
+ * A value that is already a string is used verbatim (explicit units honoured),
83
+ * so this map only drives the formatting of bare numbers.
84
+ */
85
+ const TRANSFORM_UNITS = {
86
+ x: "px",
87
+ y: "px",
88
+ z: "px",
89
+ translateX: "px",
90
+ translateY: "px",
91
+ translateZ: "px",
92
+ scale: "",
93
+ scaleX: "",
94
+ scaleY: "",
95
+ rotate: "deg",
96
+ pathRotation: "deg",
97
+ rotateX: "deg",
98
+ rotateY: "deg",
99
+ rotateZ: "deg",
100
+ skewX: "deg",
101
+ skewY: "deg",
102
+ };
103
+ /**
104
+ * Fast membership test for "is this key a transform key?": core's transform keys, the ones
105
+ * it gives an identity (ADR-0022), so the two lists can't drift. Every one has a unit above.
106
+ */
107
+ const TRANSFORM_KEYS = new Set(Object.keys(BaseValue.TRANSFORM_IDENTITY));
108
+ /**
109
+ * The CSS properties a bare number on is a length, drawn in `px`, spelled as Wardic's keys are
110
+ * (`margin-top`): Motion's, and `min-width`, `min-height`, the gaps and `letter-spacing`. The Solid
111
+ * bindings' value types take a number on these and on no other length, so a number never draws CSS a
112
+ * browser drops. `line-height` isn't one: CSS reads its bare number as a multiple. A number on any other
113
+ * key, `opacity`, `z-index`, a custom property, is drawn as it is; a string always is.
114
+ */
115
+ // #522: Motion's `numberValueTypes`' `px` keys; the bindings' `WardicValues`.
116
+ export const LENGTH_KEYS = [
117
+ "border-width",
118
+ "border-top-width",
119
+ "border-right-width",
120
+ "border-bottom-width",
121
+ "border-left-width",
122
+ "border-radius",
123
+ "border-top-left-radius",
124
+ "border-top-right-radius",
125
+ "border-bottom-right-radius",
126
+ "border-bottom-left-radius",
127
+ "width",
128
+ "min-width",
129
+ "max-width",
130
+ "height",
131
+ "min-height",
132
+ "max-height",
133
+ "top",
134
+ "right",
135
+ "bottom",
136
+ "left",
137
+ "inset",
138
+ "inset-block",
139
+ "inset-block-start",
140
+ "inset-block-end",
141
+ "inset-inline",
142
+ "inset-inline-start",
143
+ "inset-inline-end",
144
+ "padding",
145
+ "padding-top",
146
+ "padding-right",
147
+ "padding-bottom",
148
+ "padding-left",
149
+ "padding-block",
150
+ "padding-block-start",
151
+ "padding-block-end",
152
+ "padding-inline",
153
+ "padding-inline-start",
154
+ "padding-inline-end",
155
+ "margin",
156
+ "margin-top",
157
+ "margin-right",
158
+ "margin-bottom",
159
+ "margin-left",
160
+ "margin-block",
161
+ "margin-block-start",
162
+ "margin-block-end",
163
+ "margin-inline",
164
+ "margin-inline-start",
165
+ "margin-inline-end",
166
+ "gap",
167
+ "row-gap",
168
+ "column-gap",
169
+ "font-size",
170
+ "letter-spacing",
171
+ "background-position-x",
172
+ "background-position-y",
173
+ ];
174
+ /** {@link LENGTH_KEYS}, for a membership test a frame can make. */
175
+ const LENGTH_KEY_SET = new Set(LENGTH_KEYS);
176
+ /**
177
+ * Format one transform value into its CSS func argument. Strings pass through
178
+ * verbatim (explicit units respected); numbers get the key's default unit.
179
+ */
180
+ const formatTransformValue = (key, value) => {
181
+ if (Predicate.isString(value))
182
+ return value;
183
+ if (Predicate.isNumber(value))
184
+ return `${value}${unitOf(key)}`;
185
+ return String(value);
186
+ };
187
+ /** A transform key's default unit; none for a key the table doesn't name. */
188
+ const unitOf = (key) => {
189
+ const unit = TRANSFORM_UNITS[key];
190
+ if (Predicate.isUndefined(unit))
191
+ return "";
192
+ return unit;
193
+ };
194
+ /**
195
+ * The unit {@link project} draws a bare number of `key` in: a transform key's (`px`, `deg`, or none
196
+ * for a scale), `px` for a length key, none for the rest. The Appear sampler judges its stops in it
197
+ * (#48, ADR-0044).
198
+ */
199
+ export const drawnUnitOf = (key) => Bool.match(LENGTH_KEY_SET.has(key), { onTrue: () => "px", onFalse: () => unitOf(key) });
200
+ /**
201
+ * Format one non-transform value. Strings pass through verbatim; numbers on a
202
+ * known length key get `px`; every other number stays raw (unitless).
203
+ */
204
+ const formatStyleValue = (key, value) => {
205
+ if (Predicate.isNumber(value) && LENGTH_KEY_SET.has(key))
206
+ return `${value}px`;
207
+ return value;
208
+ };
209
+ /**
210
+ * User-animated transform funcs woven INTO a projection transform (ADR-0009,
211
+ * Motion's `buildProjectionTransform`): `rotate`/`skew` compose with a layout
212
+ * projection and are emitted between the inverse-tree-scale and the element
213
+ * scale, each left out at its identity, 0 (ADR-0009 *Amendment (#57)*). The element's own
214
+ * translate is added to the projection's ({@link ownTranslate}, #363), its own
215
+ * `scale`/`scaleX`/`scaleY` multiply the element scale ({@link ownScale}), and `z` is folded
216
+ * into the projection's `translate3d` (handled inline).
217
+ */
218
+ const PROJECTION_WOVEN = [
219
+ { key: "rotate", fn: "rotate" },
220
+ { key: "pathRotation", fn: "rotate" },
221
+ { key: "rotateX", fn: "rotateX" },
222
+ { key: "rotateY", fn: "rotateY" },
223
+ { key: "rotateZ", fn: "rotateZ" },
224
+ { key: "skewX", fn: "skewX" },
225
+ { key: "skewY", fn: "skewY" },
226
+ ];
227
+ /**
228
+ * The element's own scale on one axis (ADR-0009 *Amendment (Reorder)*): `scale` times
229
+ * `scaleX` (or `scaleY`), 1 for an absent or non-numeric value. Motion renders a
230
+ * projected node with the delta to its target with the element's own transforms
231
+ * applied (`transformBox(targetWithTransforms, latestValues)`,
232
+ * create-projection-node.ts:1820-1845 at 16c61222c4166bbef5ff6ab0051192faa79fa8c8);
233
+ * scaled about the box centre, that multiplies the element scale by this factor and
234
+ * leaves the translate alone (delta-apply.ts:18-30). So a `whileDrag: { scale }` on a
235
+ * `layout` element shows, and its children scale with it through CSS, as in Motion.
236
+ */
237
+ const ownScale = (latest, axisKey) => numberOr(latest.scale, 1) * numberOr(latest[axisKey], 1);
238
+ /**
239
+ * A translate key's pixels on a projected element (#363): a number, or a px string. Another unit
240
+ * (`%`, `rem`) can't be added to the projection's pixel translate without measuring, so it's 0 here,
241
+ * and {@link otherUnitTranslate} draws it as CSS (#594). Per frame.
242
+ */
243
+ const pxOf = (value) => {
244
+ if (Predicate.isNumber(value))
245
+ return value;
246
+ if (!Predicate.isString(value))
247
+ return 0;
248
+ if (!value.endsWith("px"))
249
+ return 0;
250
+ const px = Number.parseFloat(value);
251
+ if (Number.isFinite(px))
252
+ return px;
253
+ return 0;
254
+ };
255
+ /**
256
+ * The element's own translate on one axis (#363, ADR-0009 *Amendment (#363)*): `x` plus
257
+ * `translateX` (or `y` plus `translateY`), in page pixels. Motion lays a layout element's own `x`
258
+ * and `y` on its target box (`transformBox(targetWithTransforms, latestValues)`,
259
+ * `applyTransformsToTarget` at 16c6122), so its delta carries them, divided by the tree scale where
260
+ * it's drawn: this is added to the projection's translate the same way. Motion leaves
261
+ * `translateX`/`translateY` out; nothing set on a layout element is dropped here.
262
+ */
263
+ const ownTranslate = (latest, key, translateKey) => pxOf(latest[key]) + pxOf(latest[translateKey]);
264
+ /** A length in another unit than px: `-100%`, `1.5rem`, `50vw`. */
265
+ const OTHER_UNIT = /^-?[\d.]+(?!px$)[a-z%]+$/i;
266
+ /** A translate key's CSS when it's a length in another unit than px (#594), else `0px`: {@link pxOf} reads the rest. */
267
+ const otherUnitOf = (value) => {
268
+ if (Predicate.isString(value) && OTHER_UNIT.test(value))
269
+ return value;
270
+ return "0px";
271
+ };
272
+ /**
273
+ * One axis pair's CSS translate when either is in another unit than px (#594), else "". The browser
274
+ * resolves it against the element's own box, as it would on a plain element.
275
+ */
276
+ const otherUnitTranslate = (x, y) => {
277
+ const cssX = otherUnitOf(x);
278
+ const cssY = otherUnitOf(y);
279
+ if (cssX === "0px" && cssY === "0px")
280
+ return "";
281
+ return `translate(${cssX}, ${cssY})`;
282
+ };
283
+ /**
284
+ * An element's own move, from its values: what the renderer draws on top of its projection. A binding
285
+ * hands it to the element's layout node, so a twin, a handover and a follower start from, and are drawn,
286
+ * where it's drawn.
287
+ */
288
+ // `ownTranslate`; #363. Tier 2, for binding authors.
289
+ export const ownTranslateOf = (values) => ({
290
+ x: ownTranslate(values, "x", "translateX"),
291
+ y: ownTranslate(values, "y", "translateY"),
292
+ });
293
+ /**
294
+ * An element's own scale on each axis, from its values: what the renderer draws on top of its projection.
295
+ * A binding hands it to the element's layout node, so a handover starts from where a twin is drawn, and a
296
+ * follower is drawn where its lead is.
297
+ */
298
+ // `ownScale`; ADR-0010 *Amendment (#8)*. Tier 2, for binding authors.
299
+ export const ownScaleOf = (values) => ({
300
+ x: ownScale(values, "scaleX"),
301
+ y: ownScale(values, "scaleY"),
302
+ });
303
+ /**
304
+ * An element's own `rotate`, in degrees, from its values: what the renderer weaves into its projection,
305
+ * 0 when it's absent or not a number. A binding hands it to the element's layout node, so a handover
306
+ * blends from a twin's rotation into its own.
307
+ */
308
+ // `ownRotate`; ADR-0010 *Amendment (#166)*. Tier 2, for binding authors.
309
+ export const ownRotateOf = (values) => numberOr(values.rotate, 0);
310
+ /**
311
+ * An element's own opacity, from its values: what the renderer draws, 1 when it's absent or not a
312
+ * number. A binding hands it to the element's layout node, so a handover blends from the leaving
313
+ * element's opacity into it.
314
+ */
315
+ // `ownOpacity`; a Switch (ADR-0010 *Amendment (#166)*). Tier 2, for binding authors.
316
+ export const ownOpacityOf = (values) => numberOr(values.opacity, 1);
317
+ /**
318
+ * Assemble a projection transform string (ADR-0009), ported from Motion's
319
+ * `buildProjectionTransform`: `translate3d` (translation divided by `treeScale`)
320
+ * → inverse tree-scale `scale(1/treeScale)` → woven user `rotate`/`skew` (from
321
+ * `latest`, the element's value-map) → element `scale(delta.scale × treeScale)`.
322
+ * Each term is emitted only when it is non-identity; with nothing to emit the
323
+ * result is `"none"` (an identity projection carrying no woven transform).
324
+ */
325
+ const buildProjectionTransform = (delta, treeScale, latest, rotate) => {
326
+ const funcs = [];
327
+ // The element's own translate, in page pixels, on the projection's: divided by the tree scale
328
+ // together, as Motion's target box carries it (#363).
329
+ const tx = (delta.x.translate + ownTranslate(latest, "x", "translateX")) / treeScale.x;
330
+ const ty = (delta.y.translate + ownTranslate(latest, "y", "translateY")) / treeScale.y;
331
+ const z = latest["z"];
332
+ const translateZ = latest["translateZ"];
333
+ if (tx !== 0 || ty !== 0 || (Predicate.isNotUndefined(z) && !isIdentity(z, 0)) || (Predicate.isNotUndefined(translateZ) && !isIdentity(translateZ, 0))) {
334
+ funcs.push(`translate3d(${tx}px, ${ty}px, ${zArgOf(z, translateZ)})`);
335
+ }
336
+ if (treeScale.x !== 1 || treeScale.y !== 1) {
337
+ funcs.push(`scale(${1 / treeScale.x}, ${1 / treeScale.y})`);
338
+ }
339
+ for (const { key, fn } of PROJECTION_WOVEN) {
340
+ // A handover's blended rotation stands in for the element's own (ADR-0010, *Amendment (#166)*).
341
+ if (key === "rotate" && Predicate.isNotUndefined(rotate)) {
342
+ if (rotate !== 0)
343
+ funcs.push(`rotate(${formatTransformValue(key, rotate)})`);
344
+ continue;
345
+ }
346
+ if (Object.hasOwn(latest, key) && !isIdentity(latest[key], 0))
347
+ funcs.push(`${fn}(${formatTransformValue(key, latest[key])})`);
348
+ }
349
+ const sx = delta.x.scale * treeScale.x * ownScale(latest, "scaleX");
350
+ const sy = delta.y.scale * treeScale.y * ownScale(latest, "scaleY");
351
+ if (sx !== 1 || sy !== 1)
352
+ funcs.push(`scale(${sx}, ${sy})`);
353
+ // An own translate in another unit than px (`x: "-100%"`) can't be added to the projection's pixels,
354
+ // so it's drawn before them, and the browser resolves it against the element's own box (#594). The
355
+ // projection's own math (a handover's start) counts it as 0.
356
+ const ownByUnit = otherUnitTranslate(latest["x"], latest["y"]);
357
+ const translateByUnit = otherUnitTranslate(latest["translateX"], latest["translateY"]);
358
+ if (translateByUnit !== "")
359
+ funcs.unshift(translateByUnit);
360
+ if (ownByUnit !== "")
361
+ funcs.unshift(ownByUnit);
362
+ if (funcs.length === 0)
363
+ return "none";
364
+ return funcs.join(" ");
365
+ };
366
+ /**
367
+ * The key an element's transform template rides under in its values, as its projection rides under
368
+ * `Projection.KEY`: `project` calls it for the element's transform. Namespaced, `@transformTemplate`, so
369
+ * it never collides with a CSS property or a value's key.
370
+ */
371
+ // A **Transform template** (#443, Motion's `transformTemplate`). Tier 2, for binding authors.
372
+ export const TEMPLATE_KEY = "@transformTemplate";
373
+ /** `values`' template, or `undefined`: a function under {@link TEMPLATE_KEY}. Per frame: an early return. */
374
+ const templateOf = (values) => {
375
+ const template = values[TEMPLATE_KEY];
376
+ if (Predicate.isFunction(template))
377
+ return template;
378
+ return undefined;
379
+ };
380
+ /**
381
+ * An element's transform keys as a template takes them at a plain render (#443, Motion's
382
+ * `buildTransform`): each one it has, at its identity too, a number in its unit (`x: "10px"`,
383
+ * `rotate: "45deg"`) and a scale's as it is (`1.5`). Not `pathRotation`, which Motion adds to the
384
+ * transform alone (#438). A templated element's, per frame.
385
+ */
386
+ const templateValuesOf = (values) => {
387
+ const out = {};
388
+ for (const { key } of TRANSFORM_FUNCS) {
389
+ if (key === "pathRotation" || !Object.hasOwn(values, key))
390
+ continue;
391
+ const value = values[key];
392
+ out[key] = templateValueOf(key, value);
393
+ }
394
+ return out;
395
+ };
396
+ /** One transform value as a template takes it: a number in its key's unit, a unitless one as it is, a string as it is. */
397
+ const templateValueOf = (key, value) => {
398
+ if (Predicate.isString(value))
399
+ return value;
400
+ if (!Predicate.isNumber(value))
401
+ return String(value);
402
+ const unit = unitOf(key);
403
+ if (unit === "")
404
+ return value;
405
+ return `${value}${unit}`;
406
+ };
407
+ /**
408
+ * An element's values as a template takes them while projected or held (#443, Motion's
409
+ * `latestValues`): every one as it is, but the reserved keys. A templated element's, per frame.
410
+ */
411
+ const rawValuesOf = (values) => {
412
+ const out = {};
413
+ for (const key in values) {
414
+ if (key === Projection.KEY || key === TEMPLATE_KEY)
415
+ continue;
416
+ out[key] = values[key];
417
+ }
418
+ return out;
419
+ };
420
+ /**
421
+ * Whether a projection moves nothing (#443): no delta, no tree scale, no handover's rotation. A
422
+ * templated element it draws is drawn as at a plain render then, as Motion's is once its projection
423
+ * ends (`transformTemplate({}, "")` with no transform key), so a template is never handed `none`.
424
+ */
425
+ const projectsNothing = (projection) => {
426
+ const { delta, treeScale } = projection;
427
+ if (delta.x.translate !== 0 || delta.y.translate !== 0)
428
+ return false;
429
+ if (delta.x.scale !== 1 || delta.y.scale !== 1)
430
+ return false;
431
+ if (treeScale.x !== 1 || treeScale.y !== 1)
432
+ return false;
433
+ return Predicate.isUndefined(projection.rotate);
434
+ };
435
+ /**
436
+ * The transform keys a plain render draws (ADR-0023): each one present and not at its identity, in
437
+ * the canonical order; `""` when every one present is at its identity; `undefined` with none. Built
438
+ * by concatenation, not an array joined (ADR-0034): this runs per element per frame.
439
+ */
440
+ const plainTransformOf = (values) => {
441
+ let transform = "";
442
+ let separator = "";
443
+ let present = false;
444
+ for (const { key, fn, identity } of TRANSFORM_FUNCS) {
445
+ if (!Object.hasOwn(values, key))
446
+ continue;
447
+ present = true;
448
+ const value = values[key];
449
+ if (isIdentity(value, identity))
450
+ continue;
451
+ transform = `${transform}${separator}${fn}(${formatTransformValue(key, value)})`;
452
+ separator = " ";
453
+ }
454
+ if (!present)
455
+ return undefined;
456
+ return transform;
457
+ };
458
+ /**
459
+ * The transform an element draws at a plain render, or `undefined` to leave its own: its template's,
460
+ * called with no transform key too, as Motion's is (#443); else its keys', `none` when every one is
461
+ * at its identity (ADR-0023), so a class's transform stays overridden and its last one doesn't stay
462
+ * inline. Per frame: early returns.
463
+ */
464
+ const drawnTransformOf = (values) => {
465
+ const template = templateOf(values);
466
+ if (Predicate.isNotUndefined(template))
467
+ return templatedPlain(template, values);
468
+ const transform = plainTransformOf(values);
469
+ if (transform === "")
470
+ return "none";
471
+ return transform;
472
+ };
473
+ /**
474
+ * A templated element's transform at a plain render (#443): its template's, from its keys and the
475
+ * transform Wardic would draw, `""` when that's nothing.
476
+ */
477
+ const templatedPlain = (template, values) => {
478
+ const generated = plainTransformOf(values);
479
+ if (Predicate.isUndefined(generated))
480
+ return template(templateValuesOf(values), "");
481
+ return template(templateValuesOf(values), generated);
482
+ };
483
+ /**
484
+ * The transform a projected element draws (ADR-0009): its projection's, through its template while
485
+ * the projection moves it, and as at a plain render once nothing does (#443). Per frame: early returns.
486
+ */
487
+ const projectedTransformOf = (projection, values) => {
488
+ const template = templateOf(values);
489
+ if (Predicate.isUndefined(template))
490
+ return buildProjectionTransform(projection.delta, projection.treeScale, values, projection.rotate);
491
+ if (projectsNothing(projection))
492
+ return templatedPlain(template, values);
493
+ return template(rawValuesOf(values), buildProjectionTransform(projection.delta, projection.treeScale, values, projection.rotate));
494
+ };
495
+ /**
496
+ * The transform a measure holds an element at, as Motion's `transformTemplate(values, "")`: its
497
+ * template's, with no transform of Wardic's, so a static part of it, centring say, is in the box
498
+ * measured. `""` for an element with none, which the measure clears it to.
499
+ */
500
+ // A Measure pass (#443). Tier 2, for binding authors.
501
+ export const heldTransformOf = (values) => {
502
+ const template = templateOf(values);
503
+ if (Predicate.isUndefined(template))
504
+ return "";
505
+ return template(rawValuesOf(values), "");
506
+ };
507
+ /** `translate3d`'s z argument: the element's own `z`, plus its `translateZ` in pixels when it has one (#363), else none. */
508
+ const zArgOf = (z, translateZ) => {
509
+ if (Predicate.isNotUndefined(translateZ))
510
+ return `${pxOf(z) + pxOf(translateZ)}px`;
511
+ if (Predicate.isUndefined(z))
512
+ return "0px";
513
+ return formatTransformValue("z", z);
514
+ };
515
+ /**
516
+ * The opacity a projection draws, or `undefined` to leave the user's own (ADR-0010): a Switch's
517
+ * blended opacity as it is (*Amendment (#166)*), else the crossfade factor times the user's
518
+ * opacity. Per frame: early returns.
519
+ */
520
+ const projectedOpacity = (projection, values) => {
521
+ if (Predicate.isNotUndefined(projection.blendOpacity))
522
+ return projection.blendOpacity;
523
+ if (Predicate.isUndefined(projection.opacity))
524
+ return undefined;
525
+ return numberOr(values.opacity, 1) * projection.opacity;
526
+ };
527
+ /**
528
+ * A Frame's values as a DOM style patch, pure. The transform keys become one `transform`, each left out
529
+ * at its identity, and `none` when every one is; with no transform key there's no `transform`, so a
530
+ * class's shows. A node's projection, when its values carry one under `Projection.KEY`, becomes its
531
+ * transform instead, with the element's own move, rotation, skew and scale drawn on it. Every other key is
532
+ * copied across, a bare number on a length in `px`. A binding's server render, which builds no runtime,
533
+ * projects with it directly.
534
+ *
535
+ * @example
536
+ * DomRenderer.project({ x: 0, scale: 1, width: 200 }) // { transform: "none", width: "200px" }
537
+ */
538
+ // Two modes. PROJECTION (ADR-0009): the transform is assembled by `buildProjectionTransform` from the
539
+ // node's `delta`/`treeScale`, adding the element's own translate (`x`, `y`, `translate*`, #363), weaving
540
+ // its own animated `rotate`/`skew` and multiplying in its own `scale`/`scaleX`/`scaleY`. NORMAL: the
541
+ // value-spine path, `none` at every identity (ADR-0023). The same function `RendererDomLive` provides
542
+ // (ADR-0021, decision 2). Tier 2, for binding authors.
543
+ export const project = (values) => {
544
+ const patch = {};
545
+ const projection = values[Projection.KEY];
546
+ if (Predicate.isNotUndefined(projection)) {
547
+ // Projection owns the transform; weave this element's rotate/skew from `values`, through its
548
+ // Transform template when it has one (#443).
549
+ patch.transform = projectedTransformOf(projection, values);
550
+ // Copy non-transform style keys (transform keys are consumed by the weave /
551
+ // owned by the projection; the reserved keys never render).
552
+ for (const key in values) {
553
+ if (key === Projection.KEY || key === TEMPLATE_KEY || TRANSFORM_KEYS.has(key))
554
+ continue;
555
+ patch[key] = formatStyleValue(key, values[key]);
556
+ }
557
+ // Shared-element crossfade (ADR-0010): compose the crossfade factor with the
558
+ // user's opacity — `finalOpacity = (userOpacity ?? 1) × factor`. Pure: both
559
+ // values are already in the value-map (like buildProjectionTransform above).
560
+ // A Switch's blended opacity is drawn as it is (ADR-0010, *Amendment (#166)*).
561
+ const opacity = projectedOpacity(projection, values);
562
+ if (Predicate.isNotUndefined(opacity))
563
+ patch.opacity = opacity;
564
+ // A dragged node's raise (ADR-0016 *Amendment (Reorder)*): kebab-case, as the
565
+ // scale correctors' keys are, so the commit's `setProperty` takes it.
566
+ if (Predicate.isNotUndefined(projection.raise))
567
+ patch["z-index"] = projection.raise;
568
+ // A Follower takes no pointer input (`Projection`'s `passesPointer`, ADR-0010, *Amendment
569
+ // (#165)*; Motion's): `pointer-events: none`. A Lead's write leaves the key out, and the gate
570
+ // gives the element its own value back.
571
+ if (projection.passesPointer === true)
572
+ patch["pointer-events"] = "none";
573
+ return patch;
574
+ }
575
+ // Grouped transform: the present keys in the canonical order, through the Transform template
576
+ // when the element has one (#443).
577
+ const transform = drawnTransformOf(values);
578
+ if (Predicate.isNotUndefined(transform))
579
+ patch.transform = transform;
580
+ // Non-transform keys: copy across with default-unit handling.
581
+ for (const key in values) {
582
+ if (key === TEMPLATE_KEY || TRANSFORM_KEYS.has(key))
583
+ continue;
584
+ patch[key] = formatStyleValue(key, values[key]);
585
+ }
586
+ return patch;
587
+ };
588
+ /**
589
+ * Imperative: write a `Patch` onto `target`, now. The engine treats `target` as
590
+ * opaque; the DOM renderer narrows it to an `HTMLElement`/`SVGElement`. CSS keys go
591
+ * through `setProperty` (dash-cased so `transform-box` etc. apply — `el.style[kebab]=`
592
+ * silently fails). An svg-inner element's patch is routed first (ADR-0014,
593
+ * {@link splitPatch}): its attribute keys via `setAttribute`.
594
+ *
595
+ * On the per-frame path (ADR-0034): an HTML element's patch is written as it is, with no
596
+ * routing objects, and each key's dash-cased name is cached. Quiet — no span/log.
597
+ */
598
+ const commit = (target, patch) => {
599
+ const el = target;
600
+ if (isSvgInner(el)) {
601
+ const { style, attrs } = splitPatch(el, patch);
602
+ writeStyle(el.style, style);
603
+ setSvgAttrs(el, attrs);
604
+ return;
605
+ }
606
+ writeStyle(el.style, patch);
607
+ };
608
+ /** Each key of `patch` onto `style`, through `setProperty`. */
609
+ const writeStyle = (style, patch) => {
610
+ for (const key in patch)
611
+ style.setProperty(dashCase(key), String(patch[key]));
612
+ };
613
+ /** Core's `Renderer` for the DOM: `project` and a `commit` that writes a patch onto an element's style. It needs nothing. */
614
+ // `project` and `commit` have no service dependencies, so this is a plain `Layer.succeed`.
615
+ export const RendererDomLive = Layer.succeed(Renderer.Renderer, { project, commit });
616
+ //# sourceMappingURL=renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../src/internal/renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAA;AAEnD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAA;AACrD,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACxE,OAAO,KAAK,IAAI,MAAM,gBAAgB,CAAA;AACtC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,SAAS,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,WAAW,MAAM,oBAA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