@unrulysystems/native-motion-core 0.1.0-alpha.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 (326) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/LICENSE +21 -0
  3. package/README.md +48 -0
  4. package/dist/clock.cjs +71 -0
  5. package/dist/clock.d.cts +23 -0
  6. package/dist/clock.d.ts +23 -0
  7. package/dist/clock.js +66 -0
  8. package/dist/collect-reads.cjs +68 -0
  9. package/dist/collect-reads.d.cts +23 -0
  10. package/dist/collect-reads.d.ts +23 -0
  11. package/dist/collect-reads.js +62 -0
  12. package/dist/component/boundedArray.cjs +74 -0
  13. package/dist/component/boundedArray.d.cts +25 -0
  14. package/dist/component/boundedArray.d.ts +25 -0
  15. package/dist/component/boundedArray.js +68 -0
  16. package/dist/component/index.cjs +57 -0
  17. package/dist/component/index.d.cts +12 -0
  18. package/dist/component/index.d.ts +12 -0
  19. package/dist/component/index.js +22 -0
  20. package/dist/component/orchestration.cjs +129 -0
  21. package/dist/component/orchestration.d.cts +66 -0
  22. package/dist/component/orchestration.d.ts +66 -0
  23. package/dist/component/orchestration.js +124 -0
  24. package/dist/component/resolve.cjs +104 -0
  25. package/dist/component/resolve.d.cts +11 -0
  26. package/dist/component/resolve.d.ts +11 -0
  27. package/dist/component/resolve.js +97 -0
  28. package/dist/component/transition.cjs +352 -0
  29. package/dist/component/transition.d.cts +33 -0
  30. package/dist/component/transition.d.ts +33 -0
  31. package/dist/component/transition.js +339 -0
  32. package/dist/component/types.cjs +114 -0
  33. package/dist/component/types.d.cts +60 -0
  34. package/dist/component/types.d.ts +60 -0
  35. package/dist/component/types.js +111 -0
  36. package/dist/component/validate.cjs +1015 -0
  37. package/dist/component/validate.d.cts +37 -0
  38. package/dist/component/validate.d.ts +37 -0
  39. package/dist/component/validate.js +1002 -0
  40. package/dist/component/variants.cjs +333 -0
  41. package/dist/component/variants.d.cts +106 -0
  42. package/dist/component/variants.d.ts +106 -0
  43. package/dist/component/variants.js +321 -0
  44. package/dist/config/constants.cjs +41 -0
  45. package/dist/config/constants.d.cts +29 -0
  46. package/dist/config/constants.d.ts +29 -0
  47. package/dist/config/constants.js +38 -0
  48. package/dist/delay.cjs +72 -0
  49. package/dist/delay.d.cts +26 -0
  50. package/dist/delay.d.ts +26 -0
  51. package/dist/delay.js +70 -0
  52. package/dist/derived.cjs +143 -0
  53. package/dist/derived.d.cts +41 -0
  54. package/dist/derived.d.ts +41 -0
  55. package/dist/derived.js +139 -0
  56. package/dist/driver/index.cjs +22 -0
  57. package/dist/driver/index.d.cts +7 -0
  58. package/dist/driver/index.d.ts +7 -0
  59. package/dist/driver/index.js +14 -0
  60. package/dist/driver/keyframeTiming.cjs +130 -0
  61. package/dist/driver/keyframeTiming.d.cts +18 -0
  62. package/dist/driver/keyframeTiming.d.ts +18 -0
  63. package/dist/driver/keyframeTiming.js +124 -0
  64. package/dist/driver/keyframeTimingConfig.cjs +24 -0
  65. package/dist/driver/keyframeTimingConfig.d.cts +5 -0
  66. package/dist/driver/keyframeTimingConfig.d.ts +5 -0
  67. package/dist/driver/keyframeTimingConfig.js +22 -0
  68. package/dist/driver/prepare.cjs +459 -0
  69. package/dist/driver/prepare.d.cts +4 -0
  70. package/dist/driver/prepare.d.ts +4 -0
  71. package/dist/driver/prepare.js +454 -0
  72. package/dist/driver/reference.cjs +762 -0
  73. package/dist/driver/reference.d.cts +53 -0
  74. package/dist/driver/reference.d.ts +53 -0
  75. package/dist/driver/reference.js +757 -0
  76. package/dist/driver/step.cjs +55 -0
  77. package/dist/driver/step.d.cts +9 -0
  78. package/dist/driver/step.d.ts +9 -0
  79. package/dist/driver/step.js +52 -0
  80. package/dist/driver/tiers.cjs +40 -0
  81. package/dist/driver/tiers.d.cts +2 -0
  82. package/dist/driver/tiers.d.ts +2 -0
  83. package/dist/driver/tiers.js +37 -0
  84. package/dist/driver/types.cjs +9 -0
  85. package/dist/driver/types.d.cts +68 -0
  86. package/dist/driver/types.d.ts +68 -0
  87. package/dist/driver/types.js +8 -0
  88. package/dist/external-animation-ledger.cjs +1250 -0
  89. package/dist/external-animation-ledger.d.cts +416 -0
  90. package/dist/external-animation-ledger.d.ts +416 -0
  91. package/dist/external-animation-ledger.js +1243 -0
  92. package/dist/gesture/directionLock.cjs +25 -0
  93. package/dist/gesture/directionLock.d.cts +8 -0
  94. package/dist/gesture/directionLock.d.ts +8 -0
  95. package/dist/gesture/directionLock.js +21 -0
  96. package/dist/gesture/dragConfig.cjs +634 -0
  97. package/dist/gesture/dragConfig.d.cts +298 -0
  98. package/dist/gesture/dragConfig.d.ts +298 -0
  99. package/dist/gesture/dragConfig.js +624 -0
  100. package/dist/gesture/elastic.cjs +44 -0
  101. package/dist/gesture/elastic.d.cts +4 -0
  102. package/dist/gesture/elastic.d.ts +4 -0
  103. package/dist/gesture/elastic.js +39 -0
  104. package/dist/gesture/handoffSession.cjs +161 -0
  105. package/dist/gesture/handoffSession.d.cts +35 -0
  106. package/dist/gesture/handoffSession.d.ts +35 -0
  107. package/dist/gesture/handoffSession.js +158 -0
  108. package/dist/gesture/index.cjs +37 -0
  109. package/dist/gesture/index.d.cts +12 -0
  110. package/dist/gesture/index.d.ts +12 -0
  111. package/dist/gesture/index.js +11 -0
  112. package/dist/gesture/projection.cjs +95 -0
  113. package/dist/gesture/projection.d.cts +7 -0
  114. package/dist/gesture/projection.d.ts +7 -0
  115. package/dist/gesture/projection.js +87 -0
  116. package/dist/gesture/session.cjs +162 -0
  117. package/dist/gesture/session.d.cts +29 -0
  118. package/dist/gesture/session.d.ts +29 -0
  119. package/dist/gesture/session.js +158 -0
  120. package/dist/gesture/types.cjs +5 -0
  121. package/dist/gesture/types.d.cts +13 -0
  122. package/dist/gesture/types.d.ts +13 -0
  123. package/dist/gesture/types.js +4 -0
  124. package/dist/gesture/viewportConstraints.cjs +38 -0
  125. package/dist/gesture/viewportConstraints.d.cts +6 -0
  126. package/dist/gesture/viewportConstraints.d.ts +6 -0
  127. package/dist/gesture/viewportConstraints.js +34 -0
  128. package/dist/graph.cjs +226 -0
  129. package/dist/graph.d.cts +2 -0
  130. package/dist/graph.d.ts +2 -0
  131. package/dist/graph.js +223 -0
  132. package/dist/index.cjs +140 -0
  133. package/dist/index.d.cts +33 -0
  134. package/dist/index.d.ts +33 -0
  135. package/dist/index.js +70 -0
  136. package/dist/inertia.cjs +214 -0
  137. package/dist/inertia.d.cts +53 -0
  138. package/dist/inertia.d.ts +53 -0
  139. package/dist/inertia.js +212 -0
  140. package/dist/instant.cjs +66 -0
  141. package/dist/instant.d.cts +16 -0
  142. package/dist/instant.d.ts +16 -0
  143. package/dist/instant.js +63 -0
  144. package/dist/internal-driver.cjs +81 -0
  145. package/dist/internal-driver.d.cts +19 -0
  146. package/dist/internal-driver.d.ts +19 -0
  147. package/dist/internal-driver.js +35 -0
  148. package/dist/keyframes.cjs +191 -0
  149. package/dist/keyframes.d.cts +13 -0
  150. package/dist/keyframes.d.ts +13 -0
  151. package/dist/keyframes.js +188 -0
  152. package/dist/layout/commitDetector.cjs +67 -0
  153. package/dist/layout/commitDetector.d.cts +21 -0
  154. package/dist/layout/commitDetector.d.ts +21 -0
  155. package/dist/layout/commitDetector.js +64 -0
  156. package/dist/layout/compose.cjs +67 -0
  157. package/dist/layout/compose.d.cts +30 -0
  158. package/dist/layout/compose.d.ts +30 -0
  159. package/dist/layout/compose.js +65 -0
  160. package/dist/layout/constants.cjs +13 -0
  161. package/dist/layout/constants.d.cts +6 -0
  162. package/dist/layout/constants.d.ts +6 -0
  163. package/dist/layout/constants.js +10 -0
  164. package/dist/layout/identity.cjs +700 -0
  165. package/dist/layout/identity.d.cts +67 -0
  166. package/dist/layout/identity.d.ts +67 -0
  167. package/dist/layout/identity.js +698 -0
  168. package/dist/layout/index.cjs +36 -0
  169. package/dist/layout/index.d.cts +18 -0
  170. package/dist/layout/index.d.ts +18 -0
  171. package/dist/layout/index.js +13 -0
  172. package/dist/layout/measure.cjs +81 -0
  173. package/dist/layout/measure.d.cts +43 -0
  174. package/dist/layout/measure.d.ts +43 -0
  175. package/dist/layout/measure.js +78 -0
  176. package/dist/layout/projection.cjs +99 -0
  177. package/dist/layout/projection.d.cts +23 -0
  178. package/dist/layout/projection.d.ts +23 -0
  179. package/dist/layout/projection.js +97 -0
  180. package/dist/layout/scroll.cjs +27 -0
  181. package/dist/layout/scroll.d.cts +13 -0
  182. package/dist/layout/scroll.d.ts +13 -0
  183. package/dist/layout/scroll.js +24 -0
  184. package/dist/layout/session.cjs +207 -0
  185. package/dist/layout/session.d.cts +73 -0
  186. package/dist/layout/session.d.ts +73 -0
  187. package/dist/layout/session.js +205 -0
  188. package/dist/layout/tree.cjs +826 -0
  189. package/dist/layout/tree.d.cts +70 -0
  190. package/dist/layout/tree.d.ts +70 -0
  191. package/dist/layout/tree.js +823 -0
  192. package/dist/layout/types.cjs +36 -0
  193. package/dist/layout/types.d.cts +31 -0
  194. package/dist/layout/types.d.ts +31 -0
  195. package/dist/layout/types.js +35 -0
  196. package/dist/motion-arc.cjs +184 -0
  197. package/dist/motion-arc.d.cts +78 -0
  198. package/dist/motion-arc.d.ts +78 -0
  199. package/dist/motion-arc.js +183 -0
  200. package/dist/motion-mix.cjs +205 -0
  201. package/dist/motion-mix.d.cts +3 -0
  202. package/dist/motion-mix.d.ts +3 -0
  203. package/dist/motion-mix.js +202 -0
  204. package/dist/motion-value-driver-port.cjs +636 -0
  205. package/dist/motion-value-driver-port.d.cts +406 -0
  206. package/dist/motion-value-driver-port.d.ts +406 -0
  207. package/dist/motion-value-driver-port.js +627 -0
  208. package/dist/motion-value.cjs +189 -0
  209. package/dist/motion-value.d.cts +51 -0
  210. package/dist/motion-value.d.ts +51 -0
  211. package/dist/motion-value.js +185 -0
  212. package/dist/presence/controller.cjs +657 -0
  213. package/dist/presence/controller.d.cts +6 -0
  214. package/dist/presence/controller.d.ts +6 -0
  215. package/dist/presence/controller.js +652 -0
  216. package/dist/presence/index.cjs +19 -0
  217. package/dist/presence/index.d.cts +4 -0
  218. package/dist/presence/index.d.ts +4 -0
  219. package/dist/presence/index.js +12 -0
  220. package/dist/presence/machine.cjs +50 -0
  221. package/dist/presence/machine.d.cts +10 -0
  222. package/dist/presence/machine.d.ts +10 -0
  223. package/dist/presence/machine.js +46 -0
  224. package/dist/presence/types.cjs +6 -0
  225. package/dist/presence/types.d.cts +32 -0
  226. package/dist/presence/types.d.ts +32 -0
  227. package/dist/presence/types.js +5 -0
  228. package/dist/repeat.cjs +311 -0
  229. package/dist/repeat.d.cts +174 -0
  230. package/dist/repeat.d.ts +174 -0
  231. package/dist/repeat.js +300 -0
  232. package/dist/spring.cjs +128 -0
  233. package/dist/spring.d.cts +18 -0
  234. package/dist/spring.d.ts +18 -0
  235. package/dist/spring.js +125 -0
  236. package/dist/subscriptions.cjs +74 -0
  237. package/dist/subscriptions.d.cts +19 -0
  238. package/dist/subscriptions.d.ts +19 -0
  239. package/dist/subscriptions.js +69 -0
  240. package/dist/subset/index.cjs +23 -0
  241. package/dist/subset/index.d.cts +6 -0
  242. package/dist/subset/index.d.ts +6 -0
  243. package/dist/subset/index.js +13 -0
  244. package/dist/subset/normalize.cjs +90 -0
  245. package/dist/subset/normalize.d.cts +10 -0
  246. package/dist/subset/normalize.d.ts +10 -0
  247. package/dist/subset/normalize.js +85 -0
  248. package/dist/subset/registry.cjs +259 -0
  249. package/dist/subset/registry.d.cts +25 -0
  250. package/dist/subset/registry.d.ts +25 -0
  251. package/dist/subset/registry.js +256 -0
  252. package/dist/subset/resolve.cjs +98 -0
  253. package/dist/subset/resolve.d.cts +24 -0
  254. package/dist/subset/resolve.d.ts +24 -0
  255. package/dist/subset/resolve.js +90 -0
  256. package/dist/timing.cjs +206 -0
  257. package/dist/timing.d.cts +17 -0
  258. package/dist/timing.d.ts +17 -0
  259. package/dist/timing.js +201 -0
  260. package/dist/transformTemplate.cjs +219 -0
  261. package/dist/transformTemplate.d.cts +29 -0
  262. package/dist/transformTemplate.d.ts +29 -0
  263. package/dist/transformTemplate.js +215 -0
  264. package/dist/transition.cjs +231 -0
  265. package/dist/transition.d.cts +89 -0
  266. package/dist/transition.d.ts +89 -0
  267. package/dist/transition.js +223 -0
  268. package/dist/types.cjs +4 -0
  269. package/dist/types.d.cts +175 -0
  270. package/dist/types.d.ts +175 -0
  271. package/dist/types.js +3 -0
  272. package/dist/value-types/color.cjs +220 -0
  273. package/dist/value-types/color.d.cts +19 -0
  274. package/dist/value-types/color.d.ts +19 -0
  275. package/dist/value-types/color.js +218 -0
  276. package/dist/value-types/complex.cjs +160 -0
  277. package/dist/value-types/complex.d.cts +19 -0
  278. package/dist/value-types/complex.d.ts +19 -0
  279. package/dist/value-types/complex.js +155 -0
  280. package/dist/value-types/constants.cjs +15 -0
  281. package/dist/value-types/constants.d.cts +6 -0
  282. package/dist/value-types/constants.d.ts +6 -0
  283. package/dist/value-types/constants.js +12 -0
  284. package/dist/value-types/discrete.cjs +62 -0
  285. package/dist/value-types/discrete.d.cts +4 -0
  286. package/dist/value-types/discrete.d.ts +4 -0
  287. package/dist/value-types/discrete.js +56 -0
  288. package/dist/value-types/index.cjs +59 -0
  289. package/dist/value-types/index.d.cts +14 -0
  290. package/dist/value-types/index.d.ts +14 -0
  291. package/dist/value-types/index.js +24 -0
  292. package/dist/value-types/measure-resolve.cjs +325 -0
  293. package/dist/value-types/measure-resolve.d.cts +91 -0
  294. package/dist/value-types/measure-resolve.d.ts +91 -0
  295. package/dist/value-types/measure-resolve.js +313 -0
  296. package/dist/value-types/mix.cjs +90 -0
  297. package/dist/value-types/mix.d.cts +27 -0
  298. package/dist/value-types/mix.d.ts +27 -0
  299. package/dist/value-types/mix.js +85 -0
  300. package/dist/value-types/named-colors.cjs +61 -0
  301. package/dist/value-types/named-colors.d.cts +2 -0
  302. package/dist/value-types/named-colors.d.ts +2 -0
  303. package/dist/value-types/named-colors.js +58 -0
  304. package/dist/value-types/numeric.cjs +86 -0
  305. package/dist/value-types/numeric.d.cts +16 -0
  306. package/dist/value-types/numeric.d.ts +16 -0
  307. package/dist/value-types/numeric.js +79 -0
  308. package/dist/worklet-layout/config/constants.js +39 -0
  309. package/dist/worklet-layout/layout/constants.js +11 -0
  310. package/dist/worklet-layout/layout/identity.js +699 -0
  311. package/dist/worklet-layout/layout/projection.js +98 -0
  312. package/dist/worklet-layout/layout/session.js +206 -0
  313. package/dist/worklet-layout/layout/tree.js +824 -0
  314. package/dist/worklet-layout/layout/types.js +36 -0
  315. package/dist/worklet-layout/spring.js +125 -0
  316. package/dist/worklet-layout/timing.js +201 -0
  317. package/dist/worklet-layout/transition.js +223 -0
  318. package/dist/worklet-layout.cjs +47 -0
  319. package/dist/worklet-layout.d.cts +15 -0
  320. package/dist/worklet-layout.d.ts +15 -0
  321. package/dist/worklet-layout.js +28 -0
  322. package/dist/wrap.cjs +7 -0
  323. package/dist/wrap.d.cts +1 -0
  324. package/dist/wrap.d.ts +1 -0
  325. package/dist/wrap.js +4 -0
  326. package/package.json +45 -0
@@ -0,0 +1,212 @@
1
+ 'worklet';
2
+ // @frame-path — executes inside the UI-runtime frame step; allocation-gated (REQ-DRIVER-021).
3
+ // Two-phase inertia generator (SPEC-GESTURE REQ-GESTURE-016/-023/-027, R16 packet): a pure
4
+ // closed-form exponential-decay evaluator with a latched boundary spring, pinned verbatim to
5
+ // motion-dom@12.42.2 `inertia()` under the drag-layer invocation
6
+ // (VisualElementDragControls.startAnimation: timeConstant 750, power 0.8, restDelta 1,
7
+ // restSpeed 10, elastic-conditional bounce pairs). Host-agnostic (REQ-CORE-003): imports nothing
8
+ // from motion/react. Parity is proven by golden traces in inertia.test.ts.
9
+ //
10
+ // Pin semantics (motion-dom inertia.ts, replicated exactly):
11
+ // amplitude = power · velocity (px — the time constant absorbs the unit)
12
+ // target = origin + amplitude (free-drag: no modifyTarget)
13
+ // value(t) = target − amplitude·e^(−t/timeConstant)
14
+ // done = |amplitude·e^(−t/timeConstant)| ≤ restDelta (value snaps to target)
15
+ // Every sample, if the value lies outside [min, max] — INCLUDING a snapped out-of-bounds target —
16
+ // the generator permanently switches to a spring from that value toward the violated bound,
17
+ // seeded with the decay velocity at the crossing instant (stiffness/damping = bounce params).
18
+ // An out-of-bounds origin latches the boundary spring at t=0 (the past-bound release,
19
+ // REQ-GESTURE-016). The decay's initial velocity is amplitude/timeConstant, NOT the seeded
20
+ // velocity — this is the pin's curve, and the goldens hold it.
21
+ // spring.ts's rest-threshold constants (REQ-SPRING-003/-011), pinned to the same motion
22
+ // springDefaults source: the under/critical latch used to defer to springGenerator for this
23
+ // resolution, so the repair reproduces it verbatim — scale switch at |Δ| < 5, granular
24
+ // 0.01/0.005, default 2/0.5, zero-as-absent (`||`, never `??`).
25
+ const BOUNDARY_GRANULAR_SCALE = 5;
26
+ const BOUNDARY_REST_SPEED = { default: 2, granular: 0.01 };
27
+ const BOUNDARY_REST_DELTA = { default: 0.5, granular: 0.005 };
28
+ /**
29
+ * Build an inertia `GeneratorFactory` from pinned physics. The seed supplies the origin (`from`)
30
+ * and the release velocity (`velocity`, px/s — dragMomentum=false hands 0, the pin's
31
+ * `velocity: dragMomentum ? v : 0`).
32
+ */
33
+ // alloc-ok: lifecycle-edge — the factory binds physics once per animate command; per-frame work
34
+ // is sample() below. The boundary spring's coefficients latch into one preallocated
35
+ // BoundarySpringState (packet §6: no closure, sample record, generator object, or
36
+ // springGenerator factory at the crossing); sample() itself allocates nothing.
37
+ export function inertiaGenerator(physics) {
38
+ const { power, timeConstant, bounceStiffness, bounceDamping, restDelta, restSpeed } = physics;
39
+ const min = physics.min;
40
+ const max = physics.max;
41
+ return (seed) => {
42
+ const amplitude = power * seed.velocity;
43
+ const target = seed.from + amplitude;
44
+ const decayDelta = (t) => -amplitude * Math.exp(-t / timeConstant);
45
+ const decayValue = (t) => target + decayDelta(t);
46
+ // Analytic decay velocity (px/s): d/dt[target − amplitude·e^(−t/tc)] = amplitude/tc·e^(−t/tc) px/ms.
47
+ const decayVelocity = (t) => (amplitude / timeConstant) * Math.exp(-t / timeConstant) * 1000;
48
+ const outOfBounds = (v) => {
49
+ if (min !== undefined && v < min)
50
+ return min;
51
+ if (max !== undefined && v > max)
52
+ return max;
53
+ return undefined;
54
+ };
55
+ // Boundary-spring latch (the pin's timeReachedBoundary + spring, created on first OOB sample).
56
+ let crossingT;
57
+ // One preallocated state per generator — reset at the latch, sampled in place per frame.
58
+ const boundaryState = {
59
+ bound: 0,
60
+ from: seed.from,
61
+ velocity: 0,
62
+ initialDelta: 0,
63
+ initialVelocity: 0,
64
+ restSpeed,
65
+ restDelta,
66
+ wd: 0,
67
+ a: 0,
68
+ sinCoeff: 0,
69
+ cosCoeff: 0,
70
+ c: 0,
71
+ sinhCoeff: 0,
72
+ coshCoeff: 0,
73
+ };
74
+ // The pin's overdamped branch with its sinh/cosh exponent cap (motion-dom spring.ts:340-374,
75
+ // the #1207 mechanism — `Math.min(dampedAngularFreq*t, 300)`). Cross-engine parity: the pin
76
+ // uses the capped form for EVERY overdamped boundary spring (bounceZ > 1), so this generator
77
+ // does the same — the capped form is the pin's own formula, fp behavior included. Selecting
78
+ // it only when the cap engages within one frame diverges for intermediate overdamped pairs
79
+ // (review r3 major 1: bounceStiffness 10000/damping 30000 caps at ~20ms; core's cap-free
80
+ // solver stays unsettled past 200ms where the pin settles at 70ms). Under/critically-damped
81
+ // pairs (bounceZ ≤ 1) stay on core's solver — the pin's own branches there are the same
82
+ // cap-free math (golden regime continuity).
83
+ const bounceOmega0 = Math.sqrt(bounceStiffness / 1) / 1000; // rad/ms (mass 1)
84
+ const bounceZ = bounceDamping / (2 * Math.sqrt(bounceStiffness * 1));
85
+ const bounceDampedFreq = bounceZ > 1 ? bounceOmega0 * Math.sqrt(bounceZ * bounceZ - 1) : 0;
86
+ // Write target/origin/velocity and the primitive coefficients for the latched regime —
87
+ // spring.ts's exact closed forms for under/critical (including its REQ-SPRING-011 scale
88
+ // thresholds and pinned zero-as-absent || fallback) and the pin's capped overdamped branch
89
+ // (raw physics thresholds, as at HEAD). Runs at the initial or mid-flight latch only.
90
+ function resetBoundarySpringState(bound, from, velocity, state) {
91
+ state.bound = bound;
92
+ state.from = from;
93
+ state.velocity = velocity;
94
+ const delta = bound - from; // px (pin: initialDelta = target − origin)
95
+ const v0 = -velocity / 1000; // px/ms (pin: −millisecondsToSeconds; spring.ts REQ-SPRING-008)
96
+ state.initialDelta = delta;
97
+ state.initialVelocity = v0;
98
+ if (bounceZ > 1) {
99
+ state.restSpeed = restSpeed;
100
+ state.restDelta = restDelta;
101
+ const P = (v0 + bounceZ * bounceOmega0 * delta) / bounceDampedFreq;
102
+ state.sinhCoeff = bounceZ * bounceOmega0 * P - delta * bounceDampedFreq;
103
+ state.coshCoeff = bounceZ * bounceOmega0 * delta - P * bounceDampedFreq;
104
+ return;
105
+ }
106
+ // Under/critical latch — springGenerator's exact threshold resolution (scale defaults,
107
+ // granular switch, zero-as-absent) for the same { restDelta, restSpeed } settle input.
108
+ const granular = Math.abs(delta) < BOUNDARY_GRANULAR_SCALE;
109
+ state.restSpeed =
110
+ restSpeed || (granular ? BOUNDARY_REST_SPEED.granular : BOUNDARY_REST_SPEED.default);
111
+ state.restDelta =
112
+ restDelta || (granular ? BOUNDARY_REST_DELTA.granular : BOUNDARY_REST_DELTA.default);
113
+ if (bounceZ < 1) {
114
+ const wd = bounceOmega0 * Math.sqrt(1 - bounceZ * bounceZ);
115
+ const a = (v0 + bounceZ * bounceOmega0 * delta) / wd;
116
+ state.wd = wd;
117
+ state.a = a;
118
+ state.sinCoeff = bounceZ * bounceOmega0 * a + delta * wd;
119
+ state.cosCoeff = bounceZ * bounceOmega0 * delta - a * wd;
120
+ }
121
+ else {
122
+ state.c = v0 + bounceOmega0 * delta;
123
+ }
124
+ }
125
+ // Sample the latched boundary spring in place: underdamped, critical, and the pin's
126
+ // capped-overdamped branch — the exact spring.ts/capped-form math, no allocation.
127
+ function sampleBoundarySpringInto(elapsedMs, state, out) {
128
+ if (bounceZ > 1) {
129
+ const f = Math.min(bounceDampedFreq * elapsedMs, 300);
130
+ const envelope = Math.exp(-bounceZ * bounceOmega0 * elapsedMs);
131
+ const current = state.bound -
132
+ (envelope *
133
+ ((state.initialVelocity + bounceZ * bounceOmega0 * state.initialDelta) * Math.sinh(f) +
134
+ bounceDampedFreq * state.initialDelta * Math.cosh(f))) /
135
+ bounceDampedFreq;
136
+ const velocityNow = envelope * (state.sinhCoeff * Math.sinh(f) + state.coshCoeff * Math.cosh(f)) * 1000;
137
+ const done = Math.abs(velocityNow) <= state.restSpeed &&
138
+ Math.abs(state.bound - current) <= state.restDelta;
139
+ out.value = done ? state.bound : current;
140
+ out.velocity = velocityNow;
141
+ out.done = done;
142
+ return;
143
+ }
144
+ let current;
145
+ let velocityPerMs;
146
+ if (bounceZ < 1) {
147
+ const env = Math.exp(-bounceZ * bounceOmega0 * elapsedMs);
148
+ current =
149
+ state.bound -
150
+ env *
151
+ (state.a * Math.sin(state.wd * elapsedMs) +
152
+ state.initialDelta * Math.cos(state.wd * elapsedMs));
153
+ velocityPerMs =
154
+ env *
155
+ (state.sinCoeff * Math.sin(state.wd * elapsedMs) +
156
+ state.cosCoeff * Math.cos(state.wd * elapsedMs));
157
+ }
158
+ else {
159
+ current =
160
+ state.bound -
161
+ Math.exp(-bounceOmega0 * elapsedMs) * (state.initialDelta + state.c * elapsedMs);
162
+ velocityPerMs =
163
+ Math.exp(-bounceOmega0 * elapsedMs) *
164
+ (bounceOmega0 * state.c * elapsedMs - state.initialVelocity);
165
+ }
166
+ const velocity = velocityPerMs * 1000; // → px/s (REQ-SPRING-008)
167
+ const done = Math.abs(velocity) <= state.restSpeed && Math.abs(state.bound - current) <= state.restDelta;
168
+ out.value = done ? state.bound : current;
169
+ out.velocity = velocity;
170
+ out.done = done;
171
+ }
172
+ function latchBoundaryInto(bound, value, t, state) {
173
+ crossingT = t;
174
+ // The pin's seed (motion-dom getGeneratorVelocity at the latch): the 5ms backward
175
+ // finite-diff of the DECAY curve — which degenerates to 0 at t=0 (empty window), so an
176
+ // out-of-bounds origin springs from rest, never from the analytic decay velocity.
177
+ const prevT = Math.max(t - 5, 0);
178
+ const dt = t - prevT;
179
+ const seedVelocity = dt === 0 ? 0 : ((value - decayValue(prevT)) / dt) * 1000;
180
+ resetBoundarySpringState(bound, value, seedVelocity, state);
181
+ }
182
+ // The pin's checkCatchBoundary(0): an out-of-bounds origin springs from t=0.
183
+ const initialBound = outOfBounds(seed.from);
184
+ if (initialBound !== undefined)
185
+ latchBoundaryInto(initialBound, seed.from, 0, boundaryState);
186
+ const record = { value: seed.from, velocity: seed.velocity, done: false };
187
+ return {
188
+ sample(elapsedMs) {
189
+ if (crossingT !== undefined && elapsedMs >= crossingT) {
190
+ sampleBoundarySpringInto(elapsedMs - crossingT, boundaryState, record);
191
+ return record;
192
+ }
193
+ const delta = decayDelta(elapsedMs);
194
+ const decayDone = Math.abs(delta) <= restDelta;
195
+ const value = decayDone ? target : decayValue(elapsedMs);
196
+ const velocity = decayVelocity(elapsedMs);
197
+ // OOB check on the POST-friction value — the pin checks after applyFriction, so a decay
198
+ // that settles past the wall (out-of-bounds target) still engages the boundary spring.
199
+ const bound = outOfBounds(value);
200
+ if (bound !== undefined) {
201
+ latchBoundaryInto(bound, value, elapsedMs, boundaryState);
202
+ sampleBoundarySpringInto(0, boundaryState, record);
203
+ return record;
204
+ }
205
+ record.value = value;
206
+ record.velocity = decayDone ? 0 : velocity;
207
+ record.done = decayDone;
208
+ return record;
209
+ },
210
+ };
211
+ };
212
+ }
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ // @frame-path — executes inside the UI-runtime frame step; allocation-gated (REQ-DRIVER-021).
3
+ // U7a + transition-default-selection F5 — the INSTANT lane (the pin's makeAnimationInstant,
4
+ // motion-dom@12.42.2 animation/interfaces/motion-value.ts:89-98,122-136). The pin's guard is
5
+ // `type === false || (duration === 0 && !repeatDelay)` — TYPE-INDEPENDENT, so a zero authored
6
+ // duration routes here exactly like the authored `{ type: false }` form; a repeatDelay-bearing
7
+ // bag is exempt and keeps its generator (the zero-length timing base takes this same SHAPE at the
8
+ // drivers, so the fold's plays hold the seed at t ≤ 0 and commit the final keyframe past it).
9
+ // The pin SKIPS animation creation entirely and commits the final keyframe via `frame.update(() => {
10
+ // onUpdate(finalKeyframe); onComplete() })` — next-frame, NEVER synchronously — and a nonzero
11
+ // authored `delay` is HONORED (the pin zeroes delay only for the GLOBAL instantAnimations flag,
12
+ // 7b's window — never for the authored form). In this repo's driver architecture every trajectory
13
+ // is a `Generator` sampled by accumulated elapsed time, so the instant lane is the degenerate
14
+ // one: it holds the seed value at t ≤ 0 (the command applies; nothing has committed yet) and
15
+ // commits the final keyframe, done, at the first tick past it. The shared `delayGenerator`
16
+ // rebase wraps it like any other trajectory, which is what honors the authored delay. No
17
+ // spring/timing/keyframes resolution ever runs for this lane. Host-agnostic (REQ-CORE-003):
18
+ // relative imports only.
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.instantFinalKeyframe = instantFinalKeyframe;
21
+ exports.instantGenerator = instantGenerator;
22
+ /**
23
+ * The final keyframe of an instant target — the pin's `getFinalKeyframe`: a scalar rests at
24
+ * itself; a keyframe array rests at its LAST non-null element (validation guarantees one exists
25
+ * for an array target — a null FIRST element is the from-current form, R8-F2). Fail-loud on a
26
+ * target with no numeric terminal, never a silent 0 (the uiTerminalTarget law).
27
+ */
28
+ // alloc-ok: lifecycle-edge — terminal-keyframe resolution at command time, never per frame.
29
+ function instantFinalKeyframe(to) {
30
+ if (typeof to === 'number')
31
+ return to;
32
+ for (let index = to.length - 1; index >= 0; index--) {
33
+ const value = to[index];
34
+ if (value !== null && value !== undefined)
35
+ return value;
36
+ }
37
+ throw new Error('an instant transition needs a numeric terminal keyframe (REQ-API-033).');
38
+ }
39
+ /**
40
+ * The instant "trajectory": no generator math runs. `sample(0)` is the seed value, NOT done —
41
+ * the driver's command edge seeds committed from it, so the value does not move at command time
42
+ * (the pin's frame.update deferral). The first sample past zero commits the final keyframe and
43
+ * reports done, so the commit, the onUpdate marshal, and the settle edge all land on the
44
+ * driver's next update tick. Velocity is always 0 — there is no motion to measure.
45
+ */
46
+ // alloc-ok: lifecycle-edge — generator construction at command time; the one reused sample
47
+ // record is built here, never per frame (REQ-DRIVER-021).
48
+ function instantGenerator(target) {
49
+ return (seed) => {
50
+ const out = { value: seed.from, velocity: 0, done: false };
51
+ return {
52
+ sample(elapsedMs) {
53
+ if (elapsedMs <= 0) {
54
+ out.value = seed.from;
55
+ out.velocity = 0;
56
+ out.done = false;
57
+ return out;
58
+ }
59
+ out.value = target;
60
+ out.velocity = 0;
61
+ out.done = true;
62
+ return out;
63
+ },
64
+ };
65
+ };
66
+ }
@@ -0,0 +1,16 @@
1
+ import type { GeneratorFactory } from "./types.cjs";
2
+ /**
3
+ * The final keyframe of an instant target — the pin's `getFinalKeyframe`: a scalar rests at
4
+ * itself; a keyframe array rests at its LAST non-null element (validation guarantees one exists
5
+ * for an array target — a null FIRST element is the from-current form, R8-F2). Fail-loud on a
6
+ * target with no numeric terminal, never a silent 0 (the uiTerminalTarget law).
7
+ */
8
+ export declare function instantFinalKeyframe(to: number | readonly (number | null)[]): number;
9
+ /**
10
+ * The instant "trajectory": no generator math runs. `sample(0)` is the seed value, NOT done —
11
+ * the driver's command edge seeds committed from it, so the value does not move at command time
12
+ * (the pin's frame.update deferral). The first sample past zero commits the final keyframe and
13
+ * reports done, so the commit, the onUpdate marshal, and the settle edge all land on the
14
+ * driver's next update tick. Velocity is always 0 — there is no motion to measure.
15
+ */
16
+ export declare function instantGenerator(target: number): GeneratorFactory;
@@ -0,0 +1,16 @@
1
+ import type { GeneratorFactory } from "./types.js";
2
+ /**
3
+ * The final keyframe of an instant target — the pin's `getFinalKeyframe`: a scalar rests at
4
+ * itself; a keyframe array rests at its LAST non-null element (validation guarantees one exists
5
+ * for an array target — a null FIRST element is the from-current form, R8-F2). Fail-loud on a
6
+ * target with no numeric terminal, never a silent 0 (the uiTerminalTarget law).
7
+ */
8
+ export declare function instantFinalKeyframe(to: number | readonly (number | null)[]): number;
9
+ /**
10
+ * The instant "trajectory": no generator math runs. `sample(0)` is the seed value, NOT done —
11
+ * the driver's command edge seeds committed from it, so the value does not move at command time
12
+ * (the pin's frame.update deferral). The first sample past zero commits the final keyframe and
13
+ * reports done, so the commit, the onUpdate marshal, and the settle edge all land on the
14
+ * driver's next update tick. Velocity is always 0 — there is no motion to measure.
15
+ */
16
+ export declare function instantGenerator(target: number): GeneratorFactory;
@@ -0,0 +1,63 @@
1
+ 'worklet';
2
+ // @frame-path — executes inside the UI-runtime frame step; allocation-gated (REQ-DRIVER-021).
3
+ // U7a + transition-default-selection F5 — the INSTANT lane (the pin's makeAnimationInstant,
4
+ // motion-dom@12.42.2 animation/interfaces/motion-value.ts:89-98,122-136). The pin's guard is
5
+ // `type === false || (duration === 0 && !repeatDelay)` — TYPE-INDEPENDENT, so a zero authored
6
+ // duration routes here exactly like the authored `{ type: false }` form; a repeatDelay-bearing
7
+ // bag is exempt and keeps its generator (the zero-length timing base takes this same SHAPE at the
8
+ // drivers, so the fold's plays hold the seed at t ≤ 0 and commit the final keyframe past it).
9
+ // The pin SKIPS animation creation entirely and commits the final keyframe via `frame.update(() => {
10
+ // onUpdate(finalKeyframe); onComplete() })` — next-frame, NEVER synchronously — and a nonzero
11
+ // authored `delay` is HONORED (the pin zeroes delay only for the GLOBAL instantAnimations flag,
12
+ // 7b's window — never for the authored form). In this repo's driver architecture every trajectory
13
+ // is a `Generator` sampled by accumulated elapsed time, so the instant lane is the degenerate
14
+ // one: it holds the seed value at t ≤ 0 (the command applies; nothing has committed yet) and
15
+ // commits the final keyframe, done, at the first tick past it. The shared `delayGenerator`
16
+ // rebase wraps it like any other trajectory, which is what honors the authored delay. No
17
+ // spring/timing/keyframes resolution ever runs for this lane. Host-agnostic (REQ-CORE-003):
18
+ // relative imports only.
19
+ /**
20
+ * The final keyframe of an instant target — the pin's `getFinalKeyframe`: a scalar rests at
21
+ * itself; a keyframe array rests at its LAST non-null element (validation guarantees one exists
22
+ * for an array target — a null FIRST element is the from-current form, R8-F2). Fail-loud on a
23
+ * target with no numeric terminal, never a silent 0 (the uiTerminalTarget law).
24
+ */
25
+ // alloc-ok: lifecycle-edge — terminal-keyframe resolution at command time, never per frame.
26
+ export function instantFinalKeyframe(to) {
27
+ if (typeof to === 'number')
28
+ return to;
29
+ for (let index = to.length - 1; index >= 0; index--) {
30
+ const value = to[index];
31
+ if (value !== null && value !== undefined)
32
+ return value;
33
+ }
34
+ throw new Error('an instant transition needs a numeric terminal keyframe (REQ-API-033).');
35
+ }
36
+ /**
37
+ * The instant "trajectory": no generator math runs. `sample(0)` is the seed value, NOT done —
38
+ * the driver's command edge seeds committed from it, so the value does not move at command time
39
+ * (the pin's frame.update deferral). The first sample past zero commits the final keyframe and
40
+ * reports done, so the commit, the onUpdate marshal, and the settle edge all land on the
41
+ * driver's next update tick. Velocity is always 0 — there is no motion to measure.
42
+ */
43
+ // alloc-ok: lifecycle-edge — generator construction at command time; the one reused sample
44
+ // record is built here, never per frame (REQ-DRIVER-021).
45
+ export function instantGenerator(target) {
46
+ return (seed) => {
47
+ const out = { value: seed.from, velocity: 0, done: false };
48
+ return {
49
+ sample(elapsedMs) {
50
+ if (elapsedMs <= 0) {
51
+ out.value = seed.from;
52
+ out.velocity = 0;
53
+ out.done = false;
54
+ return out;
55
+ }
56
+ out.value = target;
57
+ out.velocity = 0;
58
+ out.done = true;
59
+ return out;
60
+ },
61
+ };
62
+ };
63
+ }
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ // Internal cross-package seam for native driver implementations (REQ-DRIVER-030). This is deliberately
3
+ // absent from the package root: application consumers keep the simple Driver.command(raw) protocol,
4
+ // while concrete backends can implement only the immutable prepared-command shape.
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.initialExternalAnimationLedgerState = exports.ExternalAnimationLedgerUnimplementedError = exports.ExternalAnimationLedgerInvariantError = exports.EXTERNAL_ANIMATION_LEDGER_UNIMPLEMENTED = exports.EXTERNAL_ANIMATION_LEDGER_INVARIANT = exports.createExternalAnimationLedger = exports.MotionValueDriverPortUnimplementedError = exports.MotionValueDriverPortInvariantError = exports.MOTION_VALUE_DRIVER_PORT_UNIMPLEMENTED = exports.MOTION_VALUE_DRIVER_PORT_INVARIANT = exports.isDirectPublicNumericMotionValue = exports.createMotionValueDriverPort = exports.createLocalFrameEventPort = exports.createDirectPublicMotionValue = exports.REPEAT_REFUSAL_NAME = exports.REPEAT_REFUSAL_KEY = exports.repeatRefusalMessage = exports.iterationMeasurementLane = exports.isRepeatFoldRefusalIdentity = exports.isRepeatFoldRefusal = exports.executableLengthValueRefusal = exports.toTimingLaneConfig = exports.isTimingLaneTransition = exports.isDurationZeroInstantTransition = exports.resolveTransitionForKey = exports.normalizeTransitionEaseAlias = exports.effectiveTransitionEase = exports.keyframeSegmentEase = exports.keyframeOffsetAt = exports.keyframeTransitionRefusal = exports.keyframeTimingRefusal = exports.initialTargetRefusal = exports.resolveVariantDefinitionResult = exports.capturedArrayDescription = exports.captureBoundedArray = exports.instantGenerator = exports.instantFinalKeyframe = exports.sampleArcPoint = exports.isNativeArcPath = exports.applyPathProgressInto = exports.applyPathProgress = exports.prepareDriverCommand = exports.adaptPreparedDriver = void 0;
7
+ var prepare_1 = require("./driver/prepare.cjs");
8
+ Object.defineProperty(exports, "adaptPreparedDriver", { enumerable: true, get: function () { return prepare_1.adaptPreparedDriver; } });
9
+ Object.defineProperty(exports, "prepareDriverCommand", { enumerable: true, get: function () { return prepare_1.prepareDriverCommand; } });
10
+ // U8 (REQ-API-059): UI sampler + brand predicate — backend/controller only. `applyPathProgressInto`
11
+ // is the frame-path form (REQ-DRIVER-021): caller-owned sample/scratch slots, no per-frame records.
12
+ var motion_arc_1 = require("./motion-arc.cjs");
13
+ Object.defineProperty(exports, "applyPathProgress", { enumerable: true, get: function () { return motion_arc_1.applyPathProgress; } });
14
+ Object.defineProperty(exports, "applyPathProgressInto", { enumerable: true, get: function () { return motion_arc_1.applyPathProgressInto; } });
15
+ Object.defineProperty(exports, "isNativeArcPath", { enumerable: true, get: function () { return motion_arc_1.isNativeArcPath; } });
16
+ Object.defineProperty(exports, "sampleArcPoint", { enumerable: true, get: function () { return motion_arc_1.sampleArcPoint; } });
17
+ // U7a's authored `{ type: false }` instant lane (the pin's makeAnimationInstant): backend-only,
18
+ // never the package root.
19
+ var instant_1 = require("./instant.cjs");
20
+ Object.defineProperty(exports, "instantFinalKeyframe", { enumerable: true, get: function () { return instant_1.instantFinalKeyframe; } });
21
+ Object.defineProperty(exports, "instantGenerator", { enumerable: true, get: function () { return instant_1.instantGenerator; } });
22
+ var boundedArray_1 = require("./component/boundedArray.cjs");
23
+ Object.defineProperty(exports, "captureBoundedArray", { enumerable: true, get: function () { return boundedArray_1.captureBoundedArray; } });
24
+ Object.defineProperty(exports, "capturedArrayDescription", { enumerable: true, get: function () { return boundedArray_1.capturedArrayDescription; } });
25
+ var variants_1 = require("./component/variants.cjs");
26
+ Object.defineProperty(exports, "resolveVariantDefinitionResult", { enumerable: true, get: function () { return variants_1.resolveVariantDefinitionResult; } });
27
+ var keyframeTiming_1 = require("./driver/keyframeTiming.cjs");
28
+ Object.defineProperty(exports, "initialTargetRefusal", { enumerable: true, get: function () { return keyframeTiming_1.initialTargetRefusal; } });
29
+ Object.defineProperty(exports, "keyframeTimingRefusal", { enumerable: true, get: function () { return keyframeTiming_1.keyframeTimingRefusal; } });
30
+ Object.defineProperty(exports, "keyframeTransitionRefusal", { enumerable: true, get: function () { return keyframeTiming_1.keyframeTransitionRefusal; } });
31
+ var keyframeTimingConfig_1 = require("./driver/keyframeTimingConfig.cjs");
32
+ Object.defineProperty(exports, "keyframeOffsetAt", { enumerable: true, get: function () { return keyframeTimingConfig_1.keyframeOffsetAt; } });
33
+ Object.defineProperty(exports, "keyframeSegmentEase", { enumerable: true, get: function () { return keyframeTimingConfig_1.keyframeSegmentEase; } });
34
+ // Family-2 host implementation helpers — not consumer public API (00i0nt).
35
+ var transition_1 = require("./component/transition.cjs");
36
+ Object.defineProperty(exports, "effectiveTransitionEase", { enumerable: true, get: function () { return transition_1.effectiveTransitionEase; } });
37
+ Object.defineProperty(exports, "normalizeTransitionEaseAlias", { enumerable: true, get: function () { return transition_1.normalizeTransitionEaseAlias; } });
38
+ Object.defineProperty(exports, "resolveTransitionForKey", { enumerable: true, get: function () { return transition_1.resolveTransitionForKey; } });
39
+ // REQ-TIMING-006 + transition-default-selection F1/F5/F6: the generator-selection predicates
40
+ // (duration-only untyped; duration-zero instant; the F6 timing lane adding the ease-only untyped
41
+ // form) + the ONE timing-lane config with the pin's easeOut base — backend seams only (both
42
+ // drivers, validation), never the package root.
43
+ var transition_2 = require("./component/transition.cjs");
44
+ Object.defineProperty(exports, "isDurationZeroInstantTransition", { enumerable: true, get: function () { return transition_2.isDurationZeroInstantTransition; } });
45
+ Object.defineProperty(exports, "isTimingLaneTransition", { enumerable: true, get: function () { return transition_2.isTimingLaneTransition; } });
46
+ Object.defineProperty(exports, "toTimingLaneConfig", { enumerable: true, get: function () { return transition_2.toTimingLaneConfig; } });
47
+ // The ONE key-aware executable length matrix (review 91d41675d511): verdict-shaped (string|null)
48
+ // and therefore INTERNAL-only by the value-types barrel's own law (review ab7c5370fc5a) —
49
+ // native supplying boundaries (variants, gesture state, style bases) import it from this seam.
50
+ var measure_resolve_1 = require("./value-types/measure-resolve.cjs");
51
+ Object.defineProperty(exports, "executableLengthValueRefusal", { enumerable: true, get: function () { return measure_resolve_1.executableLengthValueRefusal; } });
52
+ // T18-a: the fold's backend protocol — the ONE iteration-measurement lane rule both backends call
53
+ // (three parallel copies of it drifted across four review rounds), and the refusal identity they
54
+ // must present identically. Backend-only by the same law as the prepared-command shape above:
55
+ // an application consumer never measures a fold or builds its refusal.
56
+ var repeat_1 = require("./repeat.cjs");
57
+ Object.defineProperty(exports, "isRepeatFoldRefusal", { enumerable: true, get: function () { return repeat_1.isRepeatFoldRefusal; } });
58
+ Object.defineProperty(exports, "isRepeatFoldRefusalIdentity", { enumerable: true, get: function () { return repeat_1.isRepeatFoldRefusalIdentity; } });
59
+ Object.defineProperty(exports, "iterationMeasurementLane", { enumerable: true, get: function () { return repeat_1.iterationMeasurementLane; } });
60
+ Object.defineProperty(exports, "repeatRefusalMessage", { enumerable: true, get: function () { return repeat_1.repeatRefusalMessage; } });
61
+ Object.defineProperty(exports, "REPEAT_REFUSAL_KEY", { enumerable: true, get: function () { return repeat_1.REPEAT_REFUSAL_KEY; } });
62
+ Object.defineProperty(exports, "REPEAT_REFUSAL_NAME", { enumerable: true, get: function () { return repeat_1.REPEAT_REFUSAL_NAME; } });
63
+ // Identity-global direct numeric MotionValue channel (REQ-VALUE-014/015): private CORE capability,
64
+ // transported-sample/cache port, and external execution/target-batch ledger. These seams are staged
65
+ // behind explicit typed refusals for the row-2 TDD red and never enter the consumer root.
66
+ var motion_value_driver_port_1 = require("./motion-value-driver-port.cjs");
67
+ Object.defineProperty(exports, "createDirectPublicMotionValue", { enumerable: true, get: function () { return motion_value_driver_port_1.createDirectPublicMotionValue; } });
68
+ Object.defineProperty(exports, "createLocalFrameEventPort", { enumerable: true, get: function () { return motion_value_driver_port_1.createLocalFrameEventPort; } });
69
+ Object.defineProperty(exports, "createMotionValueDriverPort", { enumerable: true, get: function () { return motion_value_driver_port_1.createMotionValueDriverPort; } });
70
+ Object.defineProperty(exports, "isDirectPublicNumericMotionValue", { enumerable: true, get: function () { return motion_value_driver_port_1.isDirectPublicNumericMotionValue; } });
71
+ Object.defineProperty(exports, "MOTION_VALUE_DRIVER_PORT_INVARIANT", { enumerable: true, get: function () { return motion_value_driver_port_1.MOTION_VALUE_DRIVER_PORT_INVARIANT; } });
72
+ Object.defineProperty(exports, "MOTION_VALUE_DRIVER_PORT_UNIMPLEMENTED", { enumerable: true, get: function () { return motion_value_driver_port_1.MOTION_VALUE_DRIVER_PORT_UNIMPLEMENTED; } });
73
+ Object.defineProperty(exports, "MotionValueDriverPortInvariantError", { enumerable: true, get: function () { return motion_value_driver_port_1.MotionValueDriverPortInvariantError; } });
74
+ Object.defineProperty(exports, "MotionValueDriverPortUnimplementedError", { enumerable: true, get: function () { return motion_value_driver_port_1.MotionValueDriverPortUnimplementedError; } });
75
+ var external_animation_ledger_1 = require("./external-animation-ledger.cjs");
76
+ Object.defineProperty(exports, "createExternalAnimationLedger", { enumerable: true, get: function () { return external_animation_ledger_1.createExternalAnimationLedger; } });
77
+ Object.defineProperty(exports, "EXTERNAL_ANIMATION_LEDGER_INVARIANT", { enumerable: true, get: function () { return external_animation_ledger_1.EXTERNAL_ANIMATION_LEDGER_INVARIANT; } });
78
+ Object.defineProperty(exports, "EXTERNAL_ANIMATION_LEDGER_UNIMPLEMENTED", { enumerable: true, get: function () { return external_animation_ledger_1.EXTERNAL_ANIMATION_LEDGER_UNIMPLEMENTED; } });
79
+ Object.defineProperty(exports, "ExternalAnimationLedgerInvariantError", { enumerable: true, get: function () { return external_animation_ledger_1.ExternalAnimationLedgerInvariantError; } });
80
+ Object.defineProperty(exports, "ExternalAnimationLedgerUnimplementedError", { enumerable: true, get: function () { return external_animation_ledger_1.ExternalAnimationLedgerUnimplementedError; } });
81
+ Object.defineProperty(exports, "initialExternalAnimationLedgerState", { enumerable: true, get: function () { return external_animation_ledger_1.initialExternalAnimationLedgerState; } });
@@ -0,0 +1,19 @@
1
+ export { adaptPreparedDriver, prepareDriverCommand } from "./driver/prepare.cjs";
2
+ export { applyPathProgress, applyPathProgressInto, isNativeArcPath, sampleArcPoint, } from "./motion-arc.cjs";
3
+ export type { ArcScratch, NativeArcPath, PathChannelGeometry, PathProgressSample, } from "./motion-arc.cjs";
4
+ export { instantFinalKeyframe, instantGenerator } from "./instant.cjs";
5
+ export { captureBoundedArray, capturedArrayDescription } from "./component/boundedArray.cjs";
6
+ export type { BoundedArrayCapture } from "./component/boundedArray.cjs";
7
+ export { resolveVariantDefinitionResult } from "./component/variants.cjs";
8
+ export { initialTargetRefusal, keyframeTimingRefusal, keyframeTransitionRefusal, } from "./driver/keyframeTiming.cjs";
9
+ export { keyframeOffsetAt, keyframeSegmentEase } from "./driver/keyframeTimingConfig.cjs";
10
+ export { effectiveTransitionEase, normalizeTransitionEaseAlias, resolveTransitionForKey, } from "./component/transition.cjs";
11
+ export { isDurationZeroInstantTransition, isTimingLaneTransition, toTimingLaneConfig, } from "./component/transition.cjs";
12
+ export { executableLengthValueRefusal } from "./value-types/measure-resolve.cjs";
13
+ export type { PreparedDriver, PreparedDriverCommand, PreparedPropTarget } from "./driver/types.cjs";
14
+ export { isRepeatFoldRefusal, isRepeatFoldRefusalIdentity, iterationMeasurementLane, repeatRefusalMessage, REPEAT_REFUSAL_KEY, REPEAT_REFUSAL_NAME, } from "./repeat.cjs";
15
+ export type { IterationMeasurementLane } from "./repeat.cjs";
16
+ export { createDirectPublicMotionValue, createLocalFrameEventPort, createMotionValueDriverPort, isDirectPublicNumericMotionValue, MOTION_VALUE_DRIVER_PORT_INVARIANT, MOTION_VALUE_DRIVER_PORT_UNIMPLEMENTED, MotionValueDriverPortInvariantError, MotionValueDriverPortUnimplementedError, } from "./motion-value-driver-port.cjs";
17
+ export type { CachedNumericHistory, CollectorSilentMotionValueRawSnapshot, CreateLocalFrameEventPortOptions, CreateMotionValueDriverPortOptions, DirectMotionValueOperation, DirectMotionValueOperationReceipt, DirectPublicInitializerProvenance, LocalFrameEventPort, LocalFrameEventPortObservation, LocalFrameEventPortState, MotionValueDriverBindingEligibility, MotionValueDriverCreation, MotionValueDriverPort, MotionValueDriverPortInvariant, MotionValueDriverPortObservation, MotionValueDriverPortOperation, MotionValueDriverPortState, MotionValueLifecycleTerminalEvent, MotionValuePublicControlSlotInstallation, MotionValuePublicControlSlotReceipt, MotionValuePublicControlSlotState, MotionValueTerminalCandidateCacheGuard, PrimitiveMotionValueSnapshot, PrimitiveNumericHistory, PrimitiveTransitionEvent, SynchronousSnapshotAdoption, TransportedExecutionGeneratorSample, TransportedMotionValueSample, TransportedSampleApplication, TransportedSampleOrigin, TransportedSampleIrreversibleSubphase, TransportedSampleProgressEntry, TransportedSampleProgressState, TransportedSampleProgressWriter, TransportedTaskCallbackKind, TransportedTerminalApplication, TokenlessCallbackReplaySuppression, TokenlessMotionValueTaskKind, } from "./motion-value-driver-port.cjs";
18
+ export { createExternalAnimationLedger, EXTERNAL_ANIMATION_LEDGER_INVARIANT, EXTERNAL_ANIMATION_LEDGER_UNIMPLEMENTED, ExternalAnimationLedgerInvariantError, ExternalAnimationLedgerUnimplementedError, initialExternalAnimationLedgerState, } from "./external-animation-ledger.cjs";
19
+ export type { CreateExternalAnimationLedgerOptions, ExternalAnimationExecutionState, ExternalAnimationIdentityAuthorityState, ExternalAnimationIdentityObservation, ExternalAnimationLedger, ExternalAnimationLedgerEffect, ExternalAnimationLedgerEvent, ExternalAnimationLedgerInvariant, ExternalAnimationLedgerObservation, ExternalAnimationLedgerOperation, ExternalAnimationLedgerState, ExternalAnimationLedgerTransition, ExternalAnimationTargetBatchAuthorityState, IdentityTargetBatchDependencyEvent, IdentityTargetBatchDependencyEventOutboxEntry, PendingFrameActivityRetention, PrivateControlTargetBatchDependencySource, PublicIdentityTargetBatchDependencySource, PublicControlSlotState, TargetBatchAuthoredCarrier, TargetBatchActivityState, TargetBatchDependencyEvent, TargetBatchDependencyAcknowledgement, TargetBatchDependencyReference, TargetBatchDependencySource, TargetBatchDependencyState, } from "./external-animation-ledger.cjs";
@@ -0,0 +1,19 @@
1
+ export { adaptPreparedDriver, prepareDriverCommand } from "./driver/prepare.js";
2
+ export { applyPathProgress, applyPathProgressInto, isNativeArcPath, sampleArcPoint, } from "./motion-arc.js";
3
+ export type { ArcScratch, NativeArcPath, PathChannelGeometry, PathProgressSample, } from "./motion-arc.js";
4
+ export { instantFinalKeyframe, instantGenerator } from "./instant.js";
5
+ export { captureBoundedArray, capturedArrayDescription } from "./component/boundedArray.js";
6
+ export type { BoundedArrayCapture } from "./component/boundedArray.js";
7
+ export { resolveVariantDefinitionResult } from "./component/variants.js";
8
+ export { initialTargetRefusal, keyframeTimingRefusal, keyframeTransitionRefusal, } from "./driver/keyframeTiming.js";
9
+ export { keyframeOffsetAt, keyframeSegmentEase } from "./driver/keyframeTimingConfig.js";
10
+ export { effectiveTransitionEase, normalizeTransitionEaseAlias, resolveTransitionForKey, } from "./component/transition.js";
11
+ export { isDurationZeroInstantTransition, isTimingLaneTransition, toTimingLaneConfig, } from "./component/transition.js";
12
+ export { executableLengthValueRefusal } from "./value-types/measure-resolve.js";
13
+ export type { PreparedDriver, PreparedDriverCommand, PreparedPropTarget } from "./driver/types.js";
14
+ export { isRepeatFoldRefusal, isRepeatFoldRefusalIdentity, iterationMeasurementLane, repeatRefusalMessage, REPEAT_REFUSAL_KEY, REPEAT_REFUSAL_NAME, } from "./repeat.js";
15
+ export type { IterationMeasurementLane } from "./repeat.js";
16
+ export { createDirectPublicMotionValue, createLocalFrameEventPort, createMotionValueDriverPort, isDirectPublicNumericMotionValue, MOTION_VALUE_DRIVER_PORT_INVARIANT, MOTION_VALUE_DRIVER_PORT_UNIMPLEMENTED, MotionValueDriverPortInvariantError, MotionValueDriverPortUnimplementedError, } from "./motion-value-driver-port.js";
17
+ export type { CachedNumericHistory, CollectorSilentMotionValueRawSnapshot, CreateLocalFrameEventPortOptions, CreateMotionValueDriverPortOptions, DirectMotionValueOperation, DirectMotionValueOperationReceipt, DirectPublicInitializerProvenance, LocalFrameEventPort, LocalFrameEventPortObservation, LocalFrameEventPortState, MotionValueDriverBindingEligibility, MotionValueDriverCreation, MotionValueDriverPort, MotionValueDriverPortInvariant, MotionValueDriverPortObservation, MotionValueDriverPortOperation, MotionValueDriverPortState, MotionValueLifecycleTerminalEvent, MotionValuePublicControlSlotInstallation, MotionValuePublicControlSlotReceipt, MotionValuePublicControlSlotState, MotionValueTerminalCandidateCacheGuard, PrimitiveMotionValueSnapshot, PrimitiveNumericHistory, PrimitiveTransitionEvent, SynchronousSnapshotAdoption, TransportedExecutionGeneratorSample, TransportedMotionValueSample, TransportedSampleApplication, TransportedSampleOrigin, TransportedSampleIrreversibleSubphase, TransportedSampleProgressEntry, TransportedSampleProgressState, TransportedSampleProgressWriter, TransportedTaskCallbackKind, TransportedTerminalApplication, TokenlessCallbackReplaySuppression, TokenlessMotionValueTaskKind, } from "./motion-value-driver-port.js";
18
+ export { createExternalAnimationLedger, EXTERNAL_ANIMATION_LEDGER_INVARIANT, EXTERNAL_ANIMATION_LEDGER_UNIMPLEMENTED, ExternalAnimationLedgerInvariantError, ExternalAnimationLedgerUnimplementedError, initialExternalAnimationLedgerState, } from "./external-animation-ledger.js";
19
+ export type { CreateExternalAnimationLedgerOptions, ExternalAnimationExecutionState, ExternalAnimationIdentityAuthorityState, ExternalAnimationIdentityObservation, ExternalAnimationLedger, ExternalAnimationLedgerEffect, ExternalAnimationLedgerEvent, ExternalAnimationLedgerInvariant, ExternalAnimationLedgerObservation, ExternalAnimationLedgerOperation, ExternalAnimationLedgerState, ExternalAnimationLedgerTransition, ExternalAnimationTargetBatchAuthorityState, IdentityTargetBatchDependencyEvent, IdentityTargetBatchDependencyEventOutboxEntry, PendingFrameActivityRetention, PrivateControlTargetBatchDependencySource, PublicIdentityTargetBatchDependencySource, PublicControlSlotState, TargetBatchAuthoredCarrier, TargetBatchActivityState, TargetBatchDependencyEvent, TargetBatchDependencyAcknowledgement, TargetBatchDependencyReference, TargetBatchDependencySource, TargetBatchDependencyState, } from "./external-animation-ledger.js";
@@ -0,0 +1,35 @@
1
+ // Internal cross-package seam for native driver implementations (REQ-DRIVER-030). This is deliberately
2
+ // absent from the package root: application consumers keep the simple Driver.command(raw) protocol,
3
+ // while concrete backends can implement only the immutable prepared-command shape.
4
+ export { adaptPreparedDriver, prepareDriverCommand } from "./driver/prepare.js";
5
+ // U8 (REQ-API-059): UI sampler + brand predicate — backend/controller only. `applyPathProgressInto`
6
+ // is the frame-path form (REQ-DRIVER-021): caller-owned sample/scratch slots, no per-frame records.
7
+ export { applyPathProgress, applyPathProgressInto, isNativeArcPath, sampleArcPoint, } from "./motion-arc.js";
8
+ // U7a's authored `{ type: false }` instant lane (the pin's makeAnimationInstant): backend-only,
9
+ // never the package root.
10
+ export { instantFinalKeyframe, instantGenerator } from "./instant.js";
11
+ export { captureBoundedArray, capturedArrayDescription } from "./component/boundedArray.js";
12
+ export { resolveVariantDefinitionResult } from "./component/variants.js";
13
+ export { initialTargetRefusal, keyframeTimingRefusal, keyframeTransitionRefusal, } from "./driver/keyframeTiming.js";
14
+ export { keyframeOffsetAt, keyframeSegmentEase } from "./driver/keyframeTimingConfig.js";
15
+ // Family-2 host implementation helpers — not consumer public API (00i0nt).
16
+ export { effectiveTransitionEase, normalizeTransitionEaseAlias, resolveTransitionForKey, } from "./component/transition.js";
17
+ // REQ-TIMING-006 + transition-default-selection F1/F5/F6: the generator-selection predicates
18
+ // (duration-only untyped; duration-zero instant; the F6 timing lane adding the ease-only untyped
19
+ // form) + the ONE timing-lane config with the pin's easeOut base — backend seams only (both
20
+ // drivers, validation), never the package root.
21
+ export { isDurationZeroInstantTransition, isTimingLaneTransition, toTimingLaneConfig, } from "./component/transition.js";
22
+ // The ONE key-aware executable length matrix (review 91d41675d511): verdict-shaped (string|null)
23
+ // and therefore INTERNAL-only by the value-types barrel's own law (review ab7c5370fc5a) —
24
+ // native supplying boundaries (variants, gesture state, style bases) import it from this seam.
25
+ export { executableLengthValueRefusal } from "./value-types/measure-resolve.js";
26
+ // T18-a: the fold's backend protocol — the ONE iteration-measurement lane rule both backends call
27
+ // (three parallel copies of it drifted across four review rounds), and the refusal identity they
28
+ // must present identically. Backend-only by the same law as the prepared-command shape above:
29
+ // an application consumer never measures a fold or builds its refusal.
30
+ export { isRepeatFoldRefusal, isRepeatFoldRefusalIdentity, iterationMeasurementLane, repeatRefusalMessage, REPEAT_REFUSAL_KEY, REPEAT_REFUSAL_NAME, } from "./repeat.js";
31
+ // Identity-global direct numeric MotionValue channel (REQ-VALUE-014/015): private CORE capability,
32
+ // transported-sample/cache port, and external execution/target-batch ledger. These seams are staged
33
+ // behind explicit typed refusals for the row-2 TDD red and never enter the consumer root.
34
+ export { createDirectPublicMotionValue, createLocalFrameEventPort, createMotionValueDriverPort, isDirectPublicNumericMotionValue, MOTION_VALUE_DRIVER_PORT_INVARIANT, MOTION_VALUE_DRIVER_PORT_UNIMPLEMENTED, MotionValueDriverPortInvariantError, MotionValueDriverPortUnimplementedError, } from "./motion-value-driver-port.js";
35
+ export { createExternalAnimationLedger, EXTERNAL_ANIMATION_LEDGER_INVARIANT, EXTERNAL_ANIMATION_LEDGER_UNIMPLEMENTED, ExternalAnimationLedgerInvariantError, ExternalAnimationLedgerUnimplementedError, initialExternalAnimationLedgerState, } from "./external-animation-ledger.js";