react-native-gtkx 0.2.0-alpha.2 → 0.3.0-alpha.1

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 (340) hide show
  1. package/README.md +5 -2
  2. package/dist/aliases/index.d.ts +84 -0
  3. package/dist/aliases/index.js +208 -0
  4. package/dist/aliases/index.js.map +1 -0
  5. package/dist/animated/index.d.ts +2 -0
  6. package/dist/animated/index.js +5 -0
  7. package/dist/animated/index.js.map +1 -1
  8. package/dist/animated/types.d.ts +1 -0
  9. package/dist/animated/types.js.map +1 -1
  10. package/dist/animated/value-animation.js +17 -4
  11. package/dist/animated/value-animation.js.map +1 -1
  12. package/dist/apis/host.gtkx.js +9 -12
  13. package/dist/apis/host.gtkx.js.map +1 -1
  14. package/dist/apis/index.d.ts +4 -2
  15. package/dist/apis/index.js +2 -0
  16. package/dist/apis/index.js.map +1 -1
  17. package/dist/apis/keyboard.d.ts +60 -0
  18. package/dist/apis/keyboard.js +63 -0
  19. package/dist/apis/keyboard.js.map +1 -0
  20. package/dist/apis/log-box.d.ts +15 -0
  21. package/dist/apis/log-box.js +46 -0
  22. package/dist/apis/log-box.js.map +1 -0
  23. package/dist/apis/platform.d.ts +18 -1
  24. package/dist/apis/platform.js.map +1 -1
  25. package/dist/common/index.d.ts +0 -1
  26. package/dist/common/index.js +24 -1
  27. package/dist/common/index.js.map +1 -1
  28. package/dist/components/animated.d.ts +70 -6
  29. package/dist/components/animated.js +559 -46
  30. package/dist/components/animated.js.map +1 -1
  31. package/dist/components/driven-size.d.ts +27 -0
  32. package/dist/components/driven-size.js +85 -0
  33. package/dist/components/driven-size.js.map +1 -0
  34. package/dist/components/find-node-handle.d.ts +11 -0
  35. package/dist/components/find-node-handle.js +53 -0
  36. package/dist/components/find-node-handle.js.map +1 -0
  37. package/dist/components/flat-list.d.ts +3 -2
  38. package/dist/components/flat-list.js.map +1 -1
  39. package/dist/components/frame-scheduler.d.ts +16 -0
  40. package/dist/components/frame-scheduler.js +37 -0
  41. package/dist/components/frame-scheduler.js.map +1 -0
  42. package/dist/components/image.d.ts +6 -1
  43. package/dist/components/image.js +15 -4
  44. package/dist/components/image.js.map +1 -1
  45. package/dist/components/index.d.ts +7 -5
  46. package/dist/components/index.js +5 -3
  47. package/dist/components/index.js.map +1 -1
  48. package/dist/components/measure.d.ts +51 -1
  49. package/dist/components/measure.js +101 -2
  50. package/dist/components/measure.js.map +1 -1
  51. package/dist/components/pressable.d.ts +61 -1
  52. package/dist/components/pressable.js +151 -4
  53. package/dist/components/pressable.js.map +1 -1
  54. package/dist/components/rect-store.d.ts +58 -0
  55. package/dist/components/rect-store.js +124 -3
  56. package/dist/components/rect-store.js.map +1 -1
  57. package/dist/components/root.js +6 -1
  58. package/dist/components/root.js.map +1 -1
  59. package/dist/components/scroll-phase.d.ts +35 -0
  60. package/dist/components/scroll-phase.js +26 -0
  61. package/dist/components/scroll-phase.js.map +1 -0
  62. package/dist/components/scroll-view.d.ts +39 -3
  63. package/dist/components/scroll-view.js +378 -43
  64. package/dist/components/scroll-view.js.map +1 -1
  65. package/dist/components/text-input.js +9 -25
  66. package/dist/components/text-input.js.map +1 -1
  67. package/dist/components/text.d.ts +6 -2
  68. package/dist/components/text.js +43 -8
  69. package/dist/components/text.js.map +1 -1
  70. package/dist/components/use-focus.d.ts +27 -0
  71. package/dist/components/use-focus.js +116 -0
  72. package/dist/components/use-focus.js.map +1 -0
  73. package/dist/components/use-layout-child.d.ts +13 -1
  74. package/dist/components/use-layout-child.js +188 -5
  75. package/dist/components/use-layout-child.js.map +1 -1
  76. package/dist/components/view.d.ts +5 -2
  77. package/dist/components/view.js +18 -13
  78. package/dist/components/view.js.map +1 -1
  79. package/dist/components/virtualized-list.d.ts +45 -5
  80. package/dist/components/virtualized-list.js +90 -24
  81. package/dist/components/virtualized-list.js.map +1 -1
  82. package/dist/components/wheel-scroll-session.d.ts +7 -0
  83. package/dist/components/wheel-scroll-session.js +53 -0
  84. package/dist/components/wheel-scroll-session.js.map +1 -0
  85. package/dist/components/widget-retention.d.ts +35 -0
  86. package/dist/components/widget-retention.js +169 -0
  87. package/dist/components/widget-retention.js.map +1 -0
  88. package/dist/contracts.d.ts +4 -0
  89. package/dist/contracts.js.map +1 -1
  90. package/dist/dnd/context.d.ts +69 -0
  91. package/dist/dnd/context.js +149 -0
  92. package/dist/dnd/context.js.map +1 -0
  93. package/dist/dnd/draggable.d.ts +59 -0
  94. package/dist/dnd/draggable.js +149 -0
  95. package/dist/dnd/draggable.js.map +1 -0
  96. package/dist/dnd/droppable.d.ts +24 -0
  97. package/dist/dnd/droppable.js +74 -0
  98. package/dist/dnd/droppable.js.map +1 -0
  99. package/dist/dnd/gtk-controllers.d.ts +39 -0
  100. package/dist/dnd/gtk-controllers.js +110 -0
  101. package/dist/dnd/gtk-controllers.js.map +1 -0
  102. package/dist/dnd/index.d.ts +6 -0
  103. package/dist/dnd/index.js +31 -0
  104. package/dist/dnd/index.js.map +1 -0
  105. package/dist/dnd/order.d.ts +7 -0
  106. package/dist/dnd/order.js +20 -0
  107. package/dist/dnd/order.js.map +1 -0
  108. package/dist/dnd/payload.d.ts +14 -0
  109. package/dist/dnd/payload.js +41 -0
  110. package/dist/dnd/payload.js.map +1 -0
  111. package/dist/dnd/sortable.d.ts +49 -0
  112. package/dist/dnd/sortable.js +307 -0
  113. package/dist/dnd/sortable.js.map +1 -0
  114. package/dist/dnd/types.d.ts +290 -0
  115. package/dist/dnd/types.js +25 -0
  116. package/dist/dnd/types.js.map +1 -0
  117. package/dist/gesture-handler-compat/builder.d.ts +251 -0
  118. package/dist/gesture-handler-compat/builder.js +513 -0
  119. package/dist/gesture-handler-compat/builder.js.map +1 -0
  120. package/dist/gesture-handler-compat/composition.d.ts +23 -0
  121. package/dist/gesture-handler-compat/composition.js +111 -0
  122. package/dist/gesture-handler-compat/composition.js.map +1 -0
  123. package/dist/gesture-handler-compat/deciders.d.ts +3 -0
  124. package/dist/gesture-handler-compat/deciders.js +47 -0
  125. package/dist/gesture-handler-compat/deciders.js.map +1 -0
  126. package/dist/gesture-handler-compat/detector-runtime.d.ts +44 -0
  127. package/dist/gesture-handler-compat/detector-runtime.js +374 -0
  128. package/dist/gesture-handler-compat/detector-runtime.js.map +1 -0
  129. package/dist/gesture-handler-compat/detector.d.ts +22 -0
  130. package/dist/gesture-handler-compat/detector.js +104 -0
  131. package/dist/gesture-handler-compat/detector.js.map +1 -0
  132. package/dist/gesture-handler-compat/fling.d.ts +24 -0
  133. package/dist/gesture-handler-compat/fling.js +123 -0
  134. package/dist/gesture-handler-compat/fling.js.map +1 -0
  135. package/dist/gesture-handler-compat/force-touch.d.ts +13 -0
  136. package/dist/gesture-handler-compat/force-touch.js +40 -0
  137. package/dist/gesture-handler-compat/force-touch.js.map +1 -0
  138. package/dist/gesture-handler-compat/hooks.d.ts +157 -0
  139. package/dist/gesture-handler-compat/hooks.js +268 -0
  140. package/dist/gesture-handler-compat/hooks.js.map +1 -0
  141. package/dist/gesture-handler-compat/hover.d.ts +2 -0
  142. package/dist/gesture-handler-compat/hover.js +22 -0
  143. package/dist/gesture-handler-compat/hover.js.map +1 -0
  144. package/dist/gesture-handler-compat/index.d.ts +98 -0
  145. package/dist/gesture-handler-compat/index.js +255 -0
  146. package/dist/gesture-handler-compat/index.js.map +1 -0
  147. package/dist/gesture-handler-compat/long-press.d.ts +6 -0
  148. package/dist/gesture-handler-compat/long-press.js +21 -0
  149. package/dist/gesture-handler-compat/long-press.js.map +1 -0
  150. package/dist/gesture-handler-compat/manual.d.ts +2 -0
  151. package/dist/gesture-handler-compat/manual.js +18 -0
  152. package/dist/gesture-handler-compat/manual.js.map +1 -0
  153. package/dist/gesture-handler-compat/native.d.ts +7 -0
  154. package/dist/gesture-handler-compat/native.js +34 -0
  155. package/dist/gesture-handler-compat/native.js.map +1 -0
  156. package/dist/gesture-handler-compat/orchestrator.d.ts +77 -0
  157. package/dist/gesture-handler-compat/orchestrator.js +284 -0
  158. package/dist/gesture-handler-compat/orchestrator.js.map +1 -0
  159. package/dist/gesture-handler-compat/pan.d.ts +23 -0
  160. package/dist/gesture-handler-compat/pan.js +116 -0
  161. package/dist/gesture-handler-compat/pan.js.map +1 -0
  162. package/dist/gesture-handler-compat/recognizer.d.ts +268 -0
  163. package/dist/gesture-handler-compat/recognizer.js +1056 -0
  164. package/dist/gesture-handler-compat/recognizer.js.map +1 -0
  165. package/dist/gesture-handler-compat/relations.d.ts +43 -0
  166. package/dist/gesture-handler-compat/relations.js +128 -0
  167. package/dist/gesture-handler-compat/relations.js.map +1 -0
  168. package/dist/gesture-handler-compat/tap.d.ts +6 -0
  169. package/dist/gesture-handler-compat/tap.js +29 -0
  170. package/dist/gesture-handler-compat/tap.js.map +1 -0
  171. package/dist/gesture-handler-compat/touchpad.d.ts +41 -0
  172. package/dist/gesture-handler-compat/touchpad.js +64 -0
  173. package/dist/gesture-handler-compat/touchpad.js.map +1 -0
  174. package/dist/gesture-handler-compat/types.d.ts +441 -0
  175. package/dist/gesture-handler-compat/types.js +167 -0
  176. package/dist/gesture-handler-compat/types.js.map +1 -0
  177. package/dist/gtk/controllers.d.ts +39 -0
  178. package/dist/gtk/controllers.js +92 -0
  179. package/dist/gtk/controllers.js.map +1 -0
  180. package/dist/gtk/index.d.ts +2 -1
  181. package/dist/gtk/index.js +7 -1
  182. package/dist/gtk/index.js.map +1 -1
  183. package/dist/gtkx/bridge/geometry.js +6 -4
  184. package/dist/gtkx/bridge/geometry.js.map +1 -1
  185. package/dist/gtkx/bridge/index.d.ts +5 -3
  186. package/dist/gtkx/bridge/index.js +6 -3
  187. package/dist/gtkx/bridge/index.js.map +1 -1
  188. package/dist/gtkx/bridge/slot-portal.js.map +1 -1
  189. package/dist/gtkx/bridge/use-signal.js +1 -1
  190. package/dist/gtkx/bridge/use-signal.js.map +1 -1
  191. package/dist/gtkx/bridge/view-box.d.ts +56 -0
  192. package/dist/gtkx/bridge/view-box.js +394 -9
  193. package/dist/gtkx/bridge/view-box.js.map +1 -1
  194. package/dist/gtkx/bridge/widget-css.d.ts +17 -0
  195. package/dist/gtkx/bridge/widget-css.js +72 -0
  196. package/dist/gtkx/bridge/widget-css.js.map +1 -0
  197. package/dist/index.d.ts +3 -3
  198. package/dist/index.js +2 -2
  199. package/dist/index.js.map +1 -1
  200. package/dist/layout/driven-size.d.ts +12 -0
  201. package/dist/layout/driven-size.js +70 -0
  202. package/dist/layout/driven-size.js.map +1 -0
  203. package/dist/layout/engine.d.ts +17 -1
  204. package/dist/layout/engine.js +3 -20
  205. package/dist/layout/engine.js.map +1 -1
  206. package/dist/layout/node.d.ts +13 -0
  207. package/dist/layout/node.js +14 -0
  208. package/dist/layout/node.js.map +1 -1
  209. package/dist/layout/yoga.d.ts +3 -2
  210. package/dist/layout/yoga.js +5 -2
  211. package/dist/layout/yoga.js.map +1 -1
  212. package/dist/mcp/data/generated.d.ts +257 -60
  213. package/dist/mcp/data/generated.js +306 -62
  214. package/dist/mcp/data/generated.js.map +1 -1
  215. package/dist/metro/index.d.ts +10 -0
  216. package/dist/metro/index.js +21 -12
  217. package/dist/metro/index.js.map +1 -1
  218. package/dist/navigation/sidebar.d.ts +16 -0
  219. package/dist/navigation/sidebar.js +65 -1
  220. package/dist/navigation/sidebar.js.map +1 -1
  221. package/dist/reanimated-compat/animated-ref.d.ts +32 -0
  222. package/dist/reanimated-compat/animated-ref.js +57 -0
  223. package/dist/reanimated-compat/animated-ref.js.map +1 -0
  224. package/dist/reanimated-compat/animation.d.ts +177 -0
  225. package/dist/reanimated-compat/animation.js +540 -0
  226. package/dist/reanimated-compat/animation.js.map +1 -0
  227. package/dist/reanimated-compat/color.d.ts +28 -0
  228. package/dist/reanimated-compat/color.js +249 -0
  229. package/dist/reanimated-compat/color.js.map +1 -0
  230. package/dist/reanimated-compat/decay.d.ts +39 -0
  231. package/dist/reanimated-compat/decay.js +96 -0
  232. package/dist/reanimated-compat/decay.js.map +1 -0
  233. package/dist/reanimated-compat/easing.d.ts +30 -0
  234. package/dist/reanimated-compat/easing.js +76 -0
  235. package/dist/reanimated-compat/easing.js.map +1 -0
  236. package/dist/reanimated-compat/hooks.d.ts +14 -0
  237. package/dist/reanimated-compat/hooks.js +217 -0
  238. package/dist/reanimated-compat/hooks.js.map +1 -0
  239. package/dist/reanimated-compat/index.d.ts +258 -0
  240. package/dist/reanimated-compat/index.js +464 -0
  241. package/dist/reanimated-compat/index.js.map +1 -0
  242. package/dist/reanimated-compat/interpolation.d.ts +18 -0
  243. package/dist/reanimated-compat/interpolation.js +122 -0
  244. package/dist/reanimated-compat/interpolation.js.map +1 -0
  245. package/dist/reanimated-compat/layout-animation-config.d.ts +43 -0
  246. package/dist/reanimated-compat/layout-animation-config.js +78 -0
  247. package/dist/reanimated-compat/layout-animation-config.js.map +1 -0
  248. package/dist/reanimated-compat/layout-animation-presets.d.ts +117 -0
  249. package/dist/reanimated-compat/layout-animation-presets.js +498 -0
  250. package/dist/reanimated-compat/layout-animation-presets.js.map +1 -0
  251. package/dist/reanimated-compat/layout-animation-runtime.d.ts +21 -0
  252. package/dist/reanimated-compat/layout-animation-runtime.js +311 -0
  253. package/dist/reanimated-compat/layout-animation-runtime.js.map +1 -0
  254. package/dist/reanimated-compat/layout-animation-view.d.ts +27 -0
  255. package/dist/reanimated-compat/layout-animation-view.js +266 -0
  256. package/dist/reanimated-compat/layout-animation-view.js.map +1 -0
  257. package/dist/reanimated-compat/layout-animation.d.ts +171 -0
  258. package/dist/reanimated-compat/layout-animation.js +469 -0
  259. package/dist/reanimated-compat/layout-animation.js.map +1 -0
  260. package/dist/reanimated-compat/layout-transitions.d.ts +83 -0
  261. package/dist/reanimated-compat/layout-transitions.js +350 -0
  262. package/dist/reanimated-compat/layout-transitions.js.map +1 -0
  263. package/dist/reanimated-compat/mutable.d.ts +29 -0
  264. package/dist/reanimated-compat/mutable.js +139 -0
  265. package/dist/reanimated-compat/mutable.js.map +1 -0
  266. package/dist/reanimated-compat/props.d.ts +18 -0
  267. package/dist/reanimated-compat/props.js +111 -0
  268. package/dist/reanimated-compat/props.js.map +1 -0
  269. package/dist/reanimated-compat/scroll-handler.d.ts +119 -0
  270. package/dist/reanimated-compat/scroll-handler.js +274 -0
  271. package/dist/reanimated-compat/scroll-handler.js.map +1 -0
  272. package/dist/reanimated-compat/scroll-offset.d.ts +12 -0
  273. package/dist/reanimated-compat/scroll-offset.js +104 -0
  274. package/dist/reanimated-compat/scroll-offset.js.map +1 -0
  275. package/dist/reanimated-compat/style.d.ts +90 -0
  276. package/dist/reanimated-compat/style.js +452 -0
  277. package/dist/reanimated-compat/style.js.map +1 -0
  278. package/dist/reanimated-compat/test-timers.d.ts +28 -0
  279. package/dist/reanimated-compat/test-timers.js +136 -0
  280. package/dist/reanimated-compat/test-timers.js.map +1 -0
  281. package/dist/reanimated-compat/threads.d.ts +13 -0
  282. package/dist/reanimated-compat/threads.js +41 -0
  283. package/dist/reanimated-compat/threads.js.map +1 -0
  284. package/dist/reanimated-compat/tracking.d.ts +41 -0
  285. package/dist/reanimated-compat/tracking.js +106 -0
  286. package/dist/reanimated-compat/tracking.js.map +1 -0
  287. package/dist/reanimated-compat/updater-animations.d.ts +36 -0
  288. package/dist/reanimated-compat/updater-animations.js +273 -0
  289. package/dist/reanimated-compat/updater-animations.js.map +1 -0
  290. package/dist/responder/system.d.ts +80 -7
  291. package/dist/responder/system.js +143 -23
  292. package/dist/responder/system.js.map +1 -1
  293. package/dist/responder/use-responder.d.ts +11 -0
  294. package/dist/responder/use-responder.js +225 -6
  295. package/dist/responder/use-responder.js.map +1 -1
  296. package/dist/runner/host-dev.js +1 -1
  297. package/dist/runner/host-dev.js.map +1 -1
  298. package/dist/runner/host.js +1 -1
  299. package/dist/runner/host.js.map +1 -1
  300. package/dist/runner/index.js +3 -3
  301. package/dist/runner/index.js.map +1 -1
  302. package/dist/sea/gtkx-config-module.js +1 -1
  303. package/dist/sea/gtkx-config-module.js.map +1 -1
  304. package/dist/style/absolute-insets.d.ts +26 -0
  305. package/dist/style/absolute-insets.js +113 -0
  306. package/dist/style/absolute-insets.js.map +1 -0
  307. package/dist/style/animated-size.d.ts +25 -0
  308. package/dist/style/animated-size.js +225 -0
  309. package/dist/style/animated-size.js.map +1 -0
  310. package/dist/style/colors.d.ts +17 -0
  311. package/dist/style/colors.js +25 -6
  312. package/dist/style/colors.js.map +1 -1
  313. package/dist/style/imperative-css.d.ts +21 -0
  314. package/dist/style/imperative-css.js +63 -0
  315. package/dist/style/imperative-css.js.map +1 -0
  316. package/dist/style/index.d.ts +2 -1
  317. package/dist/style/index.js +2 -1
  318. package/dist/style/index.js.map +1 -1
  319. package/dist/style/split-style.js +5 -0
  320. package/dist/style/split-style.js.map +1 -1
  321. package/dist/testing/index.js.map +1 -1
  322. package/dist/unsupported-export.d.ts +8 -0
  323. package/dist/unsupported-export.js +66 -0
  324. package/dist/unsupported-export.js.map +1 -0
  325. package/dist/vite/index.d.ts +21 -8
  326. package/dist/vite/index.js +127 -82
  327. package/dist/vite/index.js.map +1 -1
  328. package/dist/vitest/index.d.ts +2 -2
  329. package/dist/vitest/index.js.map +1 -1
  330. package/dist/worklets-compat/index.d.ts +4 -0
  331. package/dist/worklets-compat/index.js +28 -0
  332. package/dist/worklets-compat/index.js.map +1 -0
  333. package/dist/worklets-compat/surface.d.ts +110 -0
  334. package/dist/worklets-compat/surface.js +153 -0
  335. package/dist/worklets-compat/surface.js.map +1 -0
  336. package/package.json +25 -9
  337. package/types.d.ts +9 -0
  338. package/dist/common/list.d.ts +0 -82
  339. package/dist/common/list.js +0 -166
  340. package/dist/common/list.js.map +0 -1
@@ -0,0 +1,464 @@
1
+ // react-native-gtkx/reanimated — `react-native-reanimated`'s SEMANTICS on a
2
+ // platform that has none of its architecture, because it needs none of it.
3
+ //
4
+ // Reanimated exists to cross a thread boundary: on mobile, JS and UI are
5
+ // separate runtimes and the worklet machinery, shared values, `runOnUI` and
6
+ // the Babel plugin all exist to move work across. Here GTK's main loop IS the
7
+ // JS thread — a widget call is a synchronous C call on the same stack — so
8
+ // every one of those mechanisms flattens. That is not our reinterpretation:
9
+ // upstream ships the flattened version itself, selected by `SHOULD_BE_USE_WEB
10
+ // = IS_JEST || IS_WEB || IS_WINDOWS`, and routes react-native-windows (no
11
+ // DOM, no second runtime) down it. Full evidence and the cost analysis:
12
+ // docs/research/reanimated.md.
13
+ //
14
+ // This is a reimplementation, not a vendoring. Upstream's `src/` is ~35,700
15
+ // lines with 21 DOM-bound files and a `Platform.OS` gate that does not know
16
+ // about `linux`, and it moves fast; forking it is the trap
17
+ // docs/research/gestures.md already identified for RNGH's `src/web/`. The web
18
+ // path is the blueprint — every behaviour here was read off it — and the
19
+ // pure-JS parts (`interpolate`, `Easing`, the spring solver's config
20
+ // normalisation) are ported rather than imported.
21
+ //
22
+ // THE BABEL PLUGIN IS NOT NEEDED, and cannot be relied on either. Its output
23
+ // is an ordinary lexical closure with metadata properties and no injected
24
+ // runtime import, so a worklet is directly callable and `'worklet'` is an
25
+ // inert directive. This platform never runs Babel at all (vite/rolldown; the
26
+ // Metro path uses the app's own stock preset), while an app that also targets
27
+ // iOS or Android keeps the plugin for those builds. Both configurations
28
+ // therefore have to work: dependency tracking here is DYNAMIC — recorded from
29
+ // the reads a mapper actually performs — so it never consults `__closure`,
30
+ // and `dependencies` arrays are honoured but never required.
31
+ //
32
+ // WHAT IS AND IS NOT HERE. Shared values, animations, the mapper core,
33
+ // `useAnimatedStyle`, `useAnimatedProps`, `interpolateColor`,
34
+ // `createAnimatedComponent`, `Animated.View`/`Text`/`Image`/`ScrollView`, the
35
+ // `entering`/`exiting`/`layout` props with the layout-animation catalogue —
36
+ // `FadeIn`/`FadeOut`/`Keyframe`, the five `*Transition` builders and sixty of
37
+ // the seventy-six presets (the sixteen that are not are `Flip*`, which needs
38
+ // a 3D rotation, and `LightSpeed*`, which needs a skew) — `LayoutAnimationConfig`,
39
+ // and the test helpers that drive the frame clock
40
+ // are implemented. Everything else throws through the `unsupported()` proxy,
41
+ // naming itself. The boundary is `opacity`, `transform` and colours — the
42
+ // things this platform can write to a mounted widget without a React render
43
+ // (plus the numeric SVG props, whose components subscribe to an animated node
44
+ // themselves). What is deliberately outside it is LAYOUT: `width`, `top`,
45
+ // `flex` and the rest go through Yoga, and a Yoga pass costs what the tree
46
+ // costs rather than what the animated value costs, so it is refused by name
47
+ // with the transform to use instead. Both halves of that are measured in
48
+ // docs/research/animated-colors.md. See docs/api.md.
49
+ import { useState } from "react";
50
+ import { Animated as PlatformAnimated } from "../components/animated";
51
+ import { glibScheduler } from "../components/frame-scheduler";
52
+ import { createUnsupportedFactory } from "../unsupported-export";
53
+ // The worklet surface lives one package over now (see src/worklets-compat),
54
+ // and these are re-exported from there rather than built again: upstream
55
+ // re-exports them from that package too, and a second `createThreads` would
56
+ // be a second batch queue behind one name.
57
+ import { makeShareableCloneRecursive, runOnJS, runOnUI, scheduleOnRN, scheduleOnUI, } from "../worklets-compat/index";
58
+ import { measure, useAnimatedRef } from "./animated-ref";
59
+ import { withClamp, withDecay, withDelay, withRepeat, withSequence, withSpring, withTiming, } from "./animation";
60
+ import { convertToRGBA, interpolateColor, isColor, rgbaArrayToRGBAColor, } from "./color";
61
+ import { Easing } from "./easing";
62
+ import { createHooks } from "./hooks";
63
+ import { clamp, Extrapolation, interpolate } from "./interpolation";
64
+ import { FadeIn, FadeOut, Keyframe, AnimationBuilder as LayoutAnimationBuilder, LinearTransition, } from "./layout-animation";
65
+ import { withLayoutAnimations, } from "./layout-animation-view";
66
+ import { cancelAnimation, createMakeMutable, isSharedValue, } from "./mutable";
67
+ import { scrollTo, useAnimatedScrollHandler, useEvent, useHandler, } from "./scroll-handler";
68
+ import { createScrollOffsetHooks } from "./scroll-offset";
69
+ import { isWorkletFunction } from "./threads";
70
+ import { createMapper } from "./tracking";
71
+ // --- the one clock -------------------------------------------------------
72
+ // Both halves are wired to the SAME frame scheduler the platform's own
73
+ // `Animated` uses. That is the point: this layer adds no timer, no scheduler
74
+ // and no second clock — it sits on top of what already ships.
75
+ // The frame scheduler is handed to the mutable factory as well as to the
76
+ // Animated api built on it: `withDecay` is the first animation whose maths
77
+ // upstream owns rather than the platform, so it drives the frame loop
78
+ // directly instead of reaching for `api.timing`/`api.spring`.
79
+ const makeMutable = createMakeMutable(PlatformAnimated, glibScheduler);
80
+ const { useSharedValue, useDerivedValue, useAnimatedReaction, useAnimatedStyle, useAnimatedProps, } = createHooks(makeMutable, {
81
+ api: PlatformAnimated,
82
+ scheduler: glibScheduler,
83
+ });
84
+ const { useScrollOffset, useScrollViewOffset } = createScrollOffsetHooks(makeMutable);
85
+ // --- the implemented surface --------------------------------------------
86
+ export { cancelAnimation, clamp, convertToRGBA, Easing, Extrapolation, interpolate, interpolateColor, isColor, isSharedValue, isWorkletFunction, makeMutable, makeShareableCloneRecursive, measure, rgbaArrayToRGBAColor, runOnJS, runOnUI, scheduleOnRN, scheduleOnUI, scrollTo, useAnimatedProps, useAnimatedReaction, useAnimatedRef, useAnimatedScrollHandler, useAnimatedStyle, useDerivedValue, useEvent, useHandler, useScrollOffset, useScrollViewOffset, useSharedValue, withClamp, withDecay, withDelay, withRepeat, withSequence, withSpring, withTiming, };
87
+ /**
88
+ * RN's `PlatformColor`, which Reanimated re-exports. This is the platform's
89
+ * own — theme colours by name, resolved by GTK against the live Adwaita
90
+ * palette (`var(--accent-bg-color)`). It can be written to a style, animated
91
+ * BETWEEN by a shared value, and not interpolated THROUGH: see
92
+ * {@link interpolateColor}.
93
+ */
94
+ export { PlatformColor } from "../style/colors";
95
+ /** Deprecated upstream alias of {@link Extrapolation}, kept for source parity. */
96
+ export const Extrapolate = Extrapolation;
97
+ /**
98
+ * Upstream's spring presets, which are plain data and therefore free to
99
+ * mirror exactly. `GentleSpringConfig` is `withSpring`'s default.
100
+ */
101
+ export const Reanimated3DefaultSpringConfig = {
102
+ damping: 10,
103
+ mass: 1,
104
+ stiffness: 100,
105
+ };
106
+ export const Reanimated3DefaultSpringConfigWithDuration = {
107
+ duration: 1333,
108
+ dampingRatio: 0.5,
109
+ };
110
+ export const WigglySpringConfig = {
111
+ damping: 90,
112
+ mass: 4,
113
+ stiffness: 900,
114
+ };
115
+ export const WigglySpringConfigWithDuration = {
116
+ duration: 550,
117
+ dampingRatio: 0.75,
118
+ };
119
+ export const GentleSpringConfig = {
120
+ damping: 120,
121
+ mass: 4,
122
+ stiffness: 900,
123
+ };
124
+ export const GentleSpringConfigWithDuration = {
125
+ duration: 550,
126
+ dampingRatio: 1,
127
+ };
128
+ export const SnappySpringConfig = {
129
+ damping: 110,
130
+ mass: 4,
131
+ stiffness: 900,
132
+ overshootClamping: true,
133
+ };
134
+ export const SnappySpringConfigWithDuration = {
135
+ duration: 550,
136
+ dampingRatio: 0.92,
137
+ overshootClamping: true,
138
+ };
139
+ /**
140
+ * How an animation should respond to the OS "reduce motion" setting. The
141
+ * enum is mirrored so a config carrying it type-checks and runs; the setting
142
+ * itself is not wired up on this platform yet, so every value behaves as
143
+ * `Never` and {@link useReducedMotion} reports false. GNOME's
144
+ * `gtk-enable-animations` is the signal to read when it is.
145
+ */
146
+ export var ReduceMotion;
147
+ (function (ReduceMotion) {
148
+ ReduceMotion["System"] = "system";
149
+ ReduceMotion["Always"] = "always";
150
+ ReduceMotion["Never"] = "never";
151
+ })(ReduceMotion || (ReduceMotion = {}));
152
+ export var ReanimatedLogLevel;
153
+ (function (ReanimatedLogLevel) {
154
+ ReanimatedLogLevel[ReanimatedLogLevel["warn"] = 1] = "warn";
155
+ ReanimatedLogLevel[ReanimatedLogLevel["error"] = 2] = "error";
156
+ })(ReanimatedLogLevel || (ReanimatedLogLevel = {}));
157
+ /**
158
+ * Accepted and ignored: there is no Reanimated logger to configure here.
159
+ * Warnings come from the platform's own one-per-session channel, which is not
160
+ * routed through this object. Refusing would break apps that call it at
161
+ * startup for a setting that changes nothing.
162
+ */
163
+ export const configureReanimatedLogger = () => { };
164
+ /** No reduce-motion source is wired on this platform yet — see {@link ReduceMotion}. */
165
+ export const useReducedMotion = () => false;
166
+ /**
167
+ * Upstream's keyboard states. Mirrored because {@link useAnimatedKeyboard}
168
+ * returns one of them, and because a caller comparing against
169
+ * `KeyboardState.CLOSED` should type-check and be right.
170
+ */
171
+ export var KeyboardState;
172
+ (function (KeyboardState) {
173
+ KeyboardState[KeyboardState["UNKNOWN"] = 0] = "UNKNOWN";
174
+ KeyboardState[KeyboardState["OPENING"] = 1] = "OPENING";
175
+ KeyboardState[KeyboardState["OPEN"] = 2] = "OPEN";
176
+ KeyboardState[KeyboardState["CLOSING"] = 3] = "CLOSING";
177
+ KeyboardState[KeyboardState["CLOSED"] = 4] = "CLOSED";
178
+ })(KeyboardState || (KeyboardState = {}));
179
+ /**
180
+ * The keyboard's height and state as shared values — **honoured and never
181
+ * updated**, which is the same shape and the same reason as RN's `Keyboard`
182
+ * (src/apis/keyboard.ts): every number this hook reports describes a software
183
+ * panel sliding over the app and taking screen space from it, and a desktop
184
+ * has no such panel. The height a caller reads is 0 because the keyboard
185
+ * occupies nothing, and the state is `CLOSED` because it is.
186
+ *
187
+ * Both values are REAL shared values, so a `useAnimatedStyle` reading them
188
+ * subscribes, computes and settles exactly once, and a layout that offsets
189
+ * itself by `keyboard.height.value` lands where it should instead of
190
+ * throwing. That is the whole of the difference from refusing: an app written
191
+ * for three platforms keeps one source and gets the right answer here.
192
+ *
193
+ * `UNKNOWN` is deliberately not the state. Upstream seeds `UNKNOWN` and
194
+ * replaces it the moment the native side reports; here nothing ever will, so
195
+ * a permanent "we do not know" would be false — the state IS known.
196
+ *
197
+ * The measured caller is `@gorhom/bottom-sheet`, which has its own
198
+ * `useAnimatedKeyboard` over RN's `Keyboard` and never reaches this one; the
199
+ * hook is here for apps, which do.
200
+ */
201
+ export const useAnimatedKeyboard = (
202
+ // Upstream's Android translucency options. Accepted and ignored: they
203
+ // describe how the keyboard's rectangle relates to a system bar, and there
204
+ // is neither.
205
+ options) => {
206
+ void options;
207
+ const [keyboard] = useState(() => ({
208
+ height: makeMutable(0),
209
+ state: makeMutable(KeyboardState.CLOSED),
210
+ }));
211
+ return keyboard;
212
+ };
213
+ /**
214
+ * Both are deprecated warn-only aliases upstream, and libraries call them to
215
+ * ask "is Reanimated present and modern". Here the answer is yes.
216
+ */
217
+ export const isConfigured = () => true;
218
+ export const isReanimated3 = () => true;
219
+ /**
220
+ * The upstream version whose API this surface mirrors — NOT a claim to be
221
+ * that package. Libraries read it to gate on API level, which is exactly what
222
+ * it answers.
223
+ */
224
+ export const reanimatedVersion = "4.5.3";
225
+ // `startMapper`/`stopMapper` are the primitive `useAnimatedReaction` and
226
+ // `useDerivedValue` are built on, and a few libraries reach for them
227
+ // directly. `inputs` is accepted and ignored: it is upstream's static
228
+ // candidate list from the Babel plugin, and tracking here is dynamic, so the
229
+ // mapper subscribes to what it reads instead of what it was told.
230
+ const runningMappers = new Map();
231
+ let nextMapperId = 1;
232
+ export const startMapper = (mapper) => {
233
+ const id = nextMapperId++;
234
+ const created = createMapper(mapper);
235
+ runningMappers.set(id, created);
236
+ created.run();
237
+ return id;
238
+ };
239
+ export const stopMapper = (id) => {
240
+ runningMappers.get(id)?.dispose();
241
+ runningMappers.delete(id);
242
+ };
243
+ /**
244
+ * The platform's own `Animated.View`, with `entering`/`exiting`/`layout`
245
+ * added around it.
246
+ *
247
+ * The style half is the load-bearing discovery of the epic: `isAnimatedNode`
248
+ * in src/components/animated.tsx recognises an animated node STRUCTURALLY
249
+ * (`addListener` + `__getValue`), so the nodes `useAnimatedStyle` produces
250
+ * already ARE animated nodes and reach GTK through the path that has always
251
+ * been there — `setStoredTransform` plus `queueAllocate` for transforms,
252
+ * `widget.setOpacity` for opacity. No new view layer, and no React render per
253
+ * frame.
254
+ *
255
+ * The layout-animation half adds no widget either: `withLayoutAnimations`
256
+ * renders the component it wraps and reaches the widget through the ref that
257
+ * component already exposes. See layout-animation-view.tsx for why `exiting`
258
+ * has to live one component ABOVE the one that owns the widget.
259
+ */
260
+ const View = withLayoutAnimations(PlatformAnimated.View);
261
+ const unsupported = createUnsupportedFactory("react-native-reanimated", "Implemented here: shared values, useAnimatedStyle/useAnimatedProps/useDerivedValue/useAnimatedReaction, " +
262
+ "withTiming/withSpring/withDecay/withClamp/withSequence/withRepeat/withDelay, interpolate, " +
263
+ "interpolateColor, Easing, useAnimatedRef + measure, " +
264
+ "useAnimatedScrollHandler + scrollTo, runOnUI/runOnJS, " +
265
+ "the entering/exiting/layout props with Keyframe, the five *Transition builders and 60 of the 76 " +
266
+ "presets (Flip* and LightSpeed* are the exceptions), LayoutAnimationConfig, " +
267
+ "withReanimatedTimer/advanceAnimationByTime, " +
268
+ "Animated.View/Text/Image/ScrollView and createAnimatedComponent. " +
269
+ "See docs/api.md for what is not, and why.");
270
+ /* eslint-disable @typescript-eslint/no-explicit-any */
271
+ /**
272
+ * Documented no-ops upstream too — the allow-lists they wrote to are gone
273
+ * from Reanimated itself. Kept callable so startup code does not fail on a
274
+ * line that already did nothing.
275
+ */
276
+ const addWhitelistedNativeProps = () => { };
277
+ const addWhitelistedUIProps = () => { };
278
+ /**
279
+ * Wrapping in the layout-animation half is what makes `entering`/`exiting`/
280
+ * `layout` work on ANY animated component rather than only on
281
+ * `Animated.View`. Neither wrapper adds a widget: both render what they were
282
+ * given and reach the real widget through the ref it already exposes.
283
+ */
284
+ const createLayoutAnimatedComponent = (component) => withLayoutAnimations(PlatformAnimated.createAnimatedComponent(component));
285
+ /**
286
+ * The rest of the host components, and the factory behind them. All four are
287
+ * the platform's own, because the imperative write path never needed to know
288
+ * what it was writing to: it needs the child's widget and its parent's, and
289
+ * `createAnimatedComponent` reads the first back out of the ref the wrapped
290
+ * component exposes. It adds NO widget to the tree — wrapping in an
291
+ * `Animated.View` would change flex layout and change what `measureLayout` is
292
+ * relative to, which is a different tree, not a shim.
293
+ *
294
+ * `FlatList` is the one refusal, and it is a decision rather than an
295
+ * omission: it is a composite over the windowed core over a ScrollView, and
296
+ * its ref is a scroll API, so no widget is reachable. It throws on render,
297
+ * naming itself and naming the workaround.
298
+ */
299
+ const Animated = {
300
+ View,
301
+ Text: withLayoutAnimations(PlatformAnimated.Text),
302
+ ScrollView: withLayoutAnimations(PlatformAnimated.ScrollView),
303
+ Image: withLayoutAnimations(PlatformAnimated.Image),
304
+ FlatList: PlatformAnimated.FlatList,
305
+ createAnimatedComponent: createLayoutAnimatedComponent,
306
+ addWhitelistedNativeProps,
307
+ addWhitelistedUIProps,
308
+ };
309
+ export default Animated;
310
+ export const createAnimatedComponent = createLayoutAnimatedComponent;
311
+ // --- the refusals -------------------------------------------------------
312
+ //
313
+ // Enumerated by hand rather than produced by a Proxy over the module,
314
+ // because ESM named imports resolve statically: a symbol missing from this
315
+ // list fails at BUILD time with "no export named X", which is loud in its own
316
+ // right — but only the names here can produce the descriptive runtime
317
+ // message, so the list is worth keeping complete. Measured against
318
+ // react-native-reanimated 4.5.3.
319
+ // --- animations not implemented ---
320
+ export const defineAnimation = unsupported("defineAnimation");
321
+ // --- colours: what is left after the gap closed ---
322
+ // `processColor` returns RN's packed AARRGGBB integer, whose only purpose is
323
+ // to cross to a native module. There is no native side here — a colour's
324
+ // destination is a GTK stylesheet, which takes strings — so a number handed
325
+ // back from this function would be accepted by nothing downstream, including
326
+ // this platform's own styles. Refusing beats returning a value that only
327
+ // fails later.
328
+ export const processColor = unsupported("processColor");
329
+ export const DynamicColorIOS = unsupported("DynamicColorIOS");
330
+ // --- layout animations: the four written by hand ---
331
+ //
332
+ // `BaseAnimationBuilder` and `ComplexAnimationBuilder` are upstream's two
333
+ // halves of one hierarchy — the plain chain and the chain plus the spring
334
+ // parameters — and this platform has a single class doing both, exported
335
+ // under both names so a library subclassing either one keeps working.
336
+ export { FadeIn, FadeOut, Keyframe, LinearTransition };
337
+ export const BaseAnimationBuilder = LayoutAnimationBuilder;
338
+ export const ComplexAnimationBuilder = LayoutAnimationBuilder;
339
+ /** Upstream's own deprecated alias of {@link LinearTransition}. */
340
+ export const Layout = LinearTransition;
341
+ // --- layout animations: the catalogue ---
342
+ //
343
+ // Sixty presets over the same base class, minted from upstream's own
344
+ // parameters — see layout-animation-presets.ts, which is the table, and
345
+ // layout-transitions.ts for the four `*Transition` builders beside
346
+ // `LinearTransition`. What is NOT here is directly below.
347
+ export { BounceIn, BounceInDown, BounceInLeft, BounceInRight, BounceInUp, BounceOut, BounceOutDown, BounceOutLeft, BounceOutRight, BounceOutUp, FadeInDown, FadeInLeft, FadeInRight, FadeInUp, FadeOutDown, FadeOutLeft, FadeOutRight, FadeOutUp, PinwheelIn, PinwheelOut, RollInLeft, RollInRight, RollOutLeft, RollOutRight, RotateInDownLeft, RotateInDownRight, RotateInUpLeft, RotateInUpRight, RotateOutDownLeft, RotateOutDownRight, RotateOutUpLeft, RotateOutUpRight, SlideInDown, SlideInLeft, SlideInRight, SlideInUp, SlideOutDown, SlideOutLeft, SlideOutRight, SlideOutUp, StretchInX, StretchInY, StretchOutX, StretchOutY, ZoomIn, ZoomInDown, ZoomInEasyDown, ZoomInEasyUp, ZoomInLeft, ZoomInRight, ZoomInRotate, ZoomInUp, ZoomOut, ZoomOutDown, ZoomOutEasyDown, ZoomOutEasyUp, ZoomOutLeft, ZoomOutRight, ZoomOutRotate, ZoomOutUp, } from "./layout-animation-presets";
348
+ export { CurvedTransition, EntryExitTransition, FadingTransition, JumpingTransition, SequencedTransition, } from "./layout-transitions";
349
+ export { enableLayoutAnimations, LayoutAnimationConfig, } from "./layout-animation-config";
350
+ // --- layout animations: what the catalogue cannot reach ---
351
+ //
352
+ // Two refusals, both structural, both named rather than approximated — a
353
+ // `FlipInEasyX` that quietly rotated in the plane instead of out of it is
354
+ // exactly the "compiled, ran, did the wrong thing" failure this surface
355
+ // exists to avoid.
356
+ //
357
+ // The twelve `Flip*` builders are `perspective` plus `rotateX`/`rotateY`: a
358
+ // real 3D rotation with a projection. This platform folds a transform array
359
+ // into ONE 2D affine matrix and hands it to `gsk_transform_matrix2d()`, which
360
+ // is 3.2x cheaper than a GskTransform chain (docs/research/transforms.md) and
361
+ // has no third axis in it.
362
+ //
363
+ // The four `LightSpeed*` builders need `skewX`, which a 2D affine matrix
364
+ // COULD carry — it is left out on purpose, across the whole platform's
365
+ // transform surface (docs/api.md, src/style/README.md), and the catalogue is
366
+ // not the place to reverse that.
367
+ export const FlipInEasyX = unsupported("FlipInEasyX");
368
+ export const FlipInEasyY = unsupported("FlipInEasyY");
369
+ export const FlipInXDown = unsupported("FlipInXDown");
370
+ export const FlipInXUp = unsupported("FlipInXUp");
371
+ export const FlipInYLeft = unsupported("FlipInYLeft");
372
+ export const FlipInYRight = unsupported("FlipInYRight");
373
+ export const FlipOutEasyX = unsupported("FlipOutEasyX");
374
+ export const FlipOutEasyY = unsupported("FlipOutEasyY");
375
+ export const FlipOutXDown = unsupported("FlipOutXDown");
376
+ export const FlipOutXUp = unsupported("FlipOutXUp");
377
+ export const FlipOutYLeft = unsupported("FlipOutYLeft");
378
+ export const FlipOutYRight = unsupported("FlipOutYRight");
379
+ export const LightSpeedInLeft = unsupported("LightSpeedInLeft");
380
+ export const LightSpeedInRight = unsupported("LightSpeedInRight");
381
+ export const LightSpeedOutLeft = unsupported("LightSpeedOutLeft");
382
+ export const LightSpeedOutRight = unsupported("LightSpeedOutRight");
383
+ // --- shared element transitions ---
384
+ //
385
+ // A different mechanism, not a preset: it matches two views in two different
386
+ // screens by a `sharedTransitionTag`, lifts one into an overlay above both,
387
+ // and interpolates it towards the other while a navigator drives the screen
388
+ // change. None of those three pieces exists here — there is no
389
+ // `sharedTransitionTag` prop on any component, no overlay layer above the
390
+ // navigation stack, and the retention primitive an exit animation rides on
391
+ // deliberately holds a widget in its OWN parent (src/components/
392
+ // widget-retention.ts) rather than reparenting it, which is the one thing a
393
+ // shared element has to do. Upstream's own web path does not implement it
394
+ // either.
395
+ export const SharedTransition = unsupported("SharedTransition");
396
+ export const SharedTransitionBoundary = unsupported("SharedTransitionBoundary");
397
+ // --- Reanimated 4's CSS animations ---
398
+ export const css = unsupported("css");
399
+ export const createCSSAnimatedComponent = unsupported("createCSSAnimatedComponent");
400
+ export const cubicBezier = unsupported("cubicBezier");
401
+ export const linear = unsupported("linear");
402
+ export const steps = unsupported("steps");
403
+ // --- hooks built on the event system, sensors and the keyboard ---
404
+ export const useAnimatedSensor = unsupported("useAnimatedSensor");
405
+ export const useComposedEventHandler = unsupported("useComposedEventHandler");
406
+ export const useFrameCallback = unsupported("useFrameCallback");
407
+ export const useTimestamp = unsupported("useTimestamp");
408
+ // --- a worklet runtime, which is structural by definition ---
409
+ // Upstream's own non-native runtimes.ts throws for these too.
410
+ export const createWorkletRuntime = unsupported("createWorkletRuntime");
411
+ export const runOnRuntime = unsupported("runOnRuntime");
412
+ export const executeOnUIRuntimeSync = unsupported("executeOnUIRuntimeSync");
413
+ // --- platform functions with no analogue here ---
414
+ export const dispatchCommand = unsupported("dispatchCommand");
415
+ export const getRelativeCoords = unsupported("getRelativeCoords");
416
+ export const setGestureState = unsupported("setGestureState");
417
+ export const setNativeProps = unsupported("setNativeProps");
418
+ export const getViewProp = unsupported("getViewProp");
419
+ export const createAnimatedPropAdapter = unsupported("createAnimatedPropAdapter");
420
+ export const NativeEventsManager = unsupported("NativeEventsManager");
421
+ export const getUseOfValueInStyleWarning = unsupported("getUseOfValueInStyleWarning");
422
+ // --- enums with no source of truth on a desktop ---
423
+ export const InterfaceOrientation = unsupported("InterfaceOrientation");
424
+ export const IOSReferenceFrame = unsupported("IOSReferenceFrame");
425
+ export const SensorType = unsupported("SensorType");
426
+ // --- screen transitions ---
427
+ export const ScreenTransition = unsupported("ScreenTransition");
428
+ export const startScreenTransition = unsupported("startScreenTransition");
429
+ export const finishScreenTransition = unsupported("finishScreenTransition");
430
+ // --- dev tooling ---
431
+ export const PerformanceMonitor = unsupported("PerformanceMonitor");
432
+ export const ReducedMotionConfig = unsupported("ReducedMotionConfig");
433
+ export const getDynamicFeatureFlag = unsupported("getDynamicFeatureFlag");
434
+ export const getStaticFeatureFlag = unsupported("getStaticFeatureFlag");
435
+ export const setDynamicFeatureFlag = unsupported("setDynamicFeatureFlag");
436
+ // --- the test helpers ---
437
+ //
438
+ // The three that control TIME are real, and they are not an emulation:
439
+ // upstream fakes Jest's timers and synthesises frames on top of them, while
440
+ // the frame driver every animation on this platform runs on is this repo's
441
+ // own, so a test simply takes it. See test-timers.ts.
442
+ export { advanceAnimationByFrame, advanceAnimationByTime, withReanimatedTimer, } from "./test-timers";
443
+ // The two that read a STYLE BACK are refused, and it is the same refusal
444
+ // twice. Upstream's `getAnimatedStyle` returns the style object its updater
445
+ // produced, which exists on mobile only because its Jest path keeps a mirror
446
+ // of it on the component (`props.animatedStyle.value`). There is no such
447
+ // object here at any point after bind time: `useAnimatedStyle`'s result is
448
+ // taken apart into per-property channels — opacity to the widget, colours to
449
+ // a private CSS provider, and the whole `transform` array folded into ONE 2D
450
+ // matrix in the rect store, from which the array cannot be recovered. A
451
+ // `getAnimatedStyle` here would therefore answer a different question than
452
+ // the one it was asked, silently.
453
+ //
454
+ // What to assert instead is what every GTK test in this repo already
455
+ // asserts, and it is strictly stronger — the widget itself:
456
+ // `widget.getOpacity()`, `widget.computeBounds(stage)`, `widget.measure()`.
457
+ // Drive the clock with `withReanimatedTimer` + `advanceAnimationByTime` and
458
+ // those reads are deterministic.
459
+ //
460
+ // `setUpTests` exists only to install `toHaveAnimatedStyle` /
461
+ // `toHaveAnimatedProps`, both of which are `getAnimatedStyle` in a matcher.
462
+ export const getAnimatedStyle = unsupported("getAnimatedStyle");
463
+ export const setUpTests = unsupported("setUpTests");
464
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/reanimated-compat/index.tsx"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,2EAA2E;AAC3E,EAAE;AACF,yEAAyE;AACzE,4EAA4E;AAC5E,8EAA8E;AAC9E,2EAA2E;AAC3E,4EAA4E;AAC5E,8EAA8E;AAC9E,0EAA0E;AAC1E,wEAAwE;AACxE,+BAA+B;AAC/B,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,2DAA2D;AAC3D,8EAA8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AuB,CAAC,CAAA;AAC9E,MAAM,CAAC,MAAM,oBAAoB,GAAQ,WAAW,CAAC,sBAAsB,CAAC,CAAA;AAC5E,MAAM,CAAC,MAAM,qBAAqB,GAAQ,WAAW,CAAC,uBAAuB,CAAC,CAAA;AAE9E,2BAA2B;AAC3B,EAAE;AACF,uEAAuE;AACvE,4EAA4E;AAC5E,2EAA2E;AAC3E,sDAAsD;AACtD,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,eAAe,CAAA;AAEtB,yEAAyE;AACzE,4EAA4E;AAC5E,6EAA6E;AAC7E,yEAAyE;AACzE,2EAA2E;AAC3E,6EAA6E;AAC7E,6EAA6E;AAC7E,wEAAwE;AACxE,2EAA2E;AAC3E,kCAAkC;AAClC,EAAE;AACF,qEAAqE;AACrE,4DAA4D;AAC5D,4EAA4E;AAC5E,4EAA4E;AAC5E,iCAAiC;AACjC,EAAE;AACF,8DAA8D;AAC9D,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gBAAgB,GAAQ,WAAW,CAAC,kBAAkB,CAAC,CAAA;AACpE,MAAM,CAAC,MAAM,UAAU,GAAQ,WAAW,CAAC,YAAY,CAAC,CAAA","sourcesContent":["// react-native-gtkx/reanimated — `react-native-reanimated`'s SEMANTICS on a\n// platform that has none of its architecture, because it needs none of it.\n//\n// Reanimated exists to cross a thread boundary: on mobile, JS and UI are\n// separate runtimes and the worklet machinery, shared values, `runOnUI` and\n// the Babel plugin all exist to move work across. Here GTK's main loop IS the\n// JS thread — a widget call is a synchronous C call on the same stack — so\n// every one of those mechanisms flattens. That is not our reinterpretation:\n// upstream ships the flattened version itself, selected by `SHOULD_BE_USE_WEB\n// = IS_JEST || IS_WEB || IS_WINDOWS`, and routes react-native-windows (no\n// DOM, no second runtime) down it. Full evidence and the cost analysis:\n// docs/research/reanimated.md.\n//\n// This is a reimplementation, not a vendoring. Upstream's `src/` is ~35,700\n// lines with 21 DOM-bound files and a `Platform.OS` gate that does not know\n// about `linux`, and it moves fast; forking it is the trap\n// docs/research/gestures.md already identified for RNGH's `src/web/`. The web\n// path is the blueprint — every behaviour here was read off it — and the\n// pure-JS parts (`interpolate`, `Easing`, the spring solver's config\n// normalisation) are ported rather than imported.\n//\n// THE BABEL PLUGIN IS NOT NEEDED, and cannot be relied on either. Its output\n// is an ordinary lexical closure with metadata properties and no injected\n// runtime import, so a worklet is directly callable and `'worklet'` is an\n// inert directive. This platform never runs Babel at all (vite/rolldown; the\n// Metro path uses the app's own stock preset), while an app that also targets\n// iOS or Android keeps the plugin for those builds. Both configurations\n// therefore have to work: dependency tracking here is DYNAMIC — recorded from\n// the reads a mapper actually performs — so it never consults `__closure`,\n// and `dependencies` arrays are honoured but never required.\n//\n// WHAT IS AND IS NOT HERE. Shared values, animations, the mapper core,\n// `useAnimatedStyle`, `useAnimatedProps`, `interpolateColor`,\n// `createAnimatedComponent`, `Animated.View`/`Text`/`Image`/`ScrollView`, the\n// `entering`/`exiting`/`layout` props with the layout-animation catalogue —\n// `FadeIn`/`FadeOut`/`Keyframe`, the five `*Transition` builders and sixty of\n// the seventy-six presets (the sixteen that are not are `Flip*`, which needs\n// a 3D rotation, and `LightSpeed*`, which needs a skew) — `LayoutAnimationConfig`,\n// and the test helpers that drive the frame clock\n// are implemented. Everything else throws through the `unsupported()` proxy,\n// naming itself. The boundary is `opacity`, `transform` and colours — the\n// things this platform can write to a mounted widget without a React render\n// (plus the numeric SVG props, whose components subscribe to an animated node\n// themselves). What is deliberately outside it is LAYOUT: `width`, `top`,\n// `flex` and the rest go through Yoga, and a Yoga pass costs what the tree\n// costs rather than what the animated value costs, so it is refused by name\n// with the transform to use instead. Both halves of that are measured in\n// docs/research/animated-colors.md. See docs/api.md.\nimport { useState, type ElementType, type ReactNode } from \"react\"\nimport { Animated as PlatformAnimated } from \"../components/animated\"\nimport type {\n AnimatedViewStyle,\n AnimatedViewProps as PlatformAnimatedViewProps,\n} from \"../components/animated\"\nimport { glibScheduler } from \"../components/frame-scheduler\"\nimport { createUnsupportedFactory } from \"../unsupported-export\"\n// The worklet surface lives one package over now (see src/worklets-compat),\n// and these are re-exported from there rather than built again: upstream\n// re-exports them from that package too, and a second `createThreads` would\n// be a second batch queue behind one name.\nimport {\n makeShareableCloneRecursive,\n runOnJS,\n runOnUI,\n scheduleOnRN,\n scheduleOnUI,\n} from \"../worklets-compat/index\"\nimport { measure, useAnimatedRef } from \"./animated-ref\"\nimport {\n withClamp,\n withDecay,\n withDelay,\n withRepeat,\n withSequence,\n withSpring,\n withTiming,\n} from \"./animation\"\nimport {\n convertToRGBA,\n interpolateColor,\n isColor,\n rgbaArrayToRGBAColor,\n} from \"./color\"\nimport { Easing } from \"./easing\"\nimport { createHooks } from \"./hooks\"\nimport { clamp, Extrapolation, interpolate } from \"./interpolation\"\nimport {\n FadeIn,\n FadeOut,\n Keyframe,\n AnimationBuilder as LayoutAnimationBuilder,\n LinearTransition,\n} from \"./layout-animation\"\nimport {\n withLayoutAnimations,\n type LayoutAnimationProps,\n} from \"./layout-animation-view\"\nimport {\n cancelAnimation,\n createMakeMutable,\n isSharedValue,\n type SharedValue,\n} from \"./mutable\"\nimport {\n scrollTo,\n useAnimatedScrollHandler,\n useEvent,\n useHandler,\n type AnimatedScrollEvent,\n type ScrollHandlerCallback,\n type ScrollHandlers,\n type UseHandlerContext,\n} from \"./scroll-handler\"\nimport { createScrollOffsetHooks } from \"./scroll-offset\"\nimport type { StyleObject } from \"./style\"\nimport { isWorkletFunction } from \"./threads\"\nimport { createMapper, type Mapper } from \"./tracking\"\n\n// --- the one clock -------------------------------------------------------\n\n// Both halves are wired to the SAME frame scheduler the platform's own\n// `Animated` uses. That is the point: this layer adds no timer, no scheduler\n// and no second clock — it sits on top of what already ships.\n// The frame scheduler is handed to the mutable factory as well as to the\n// Animated api built on it: `withDecay` is the first animation whose maths\n// upstream owns rather than the platform, so it drives the frame loop\n// directly instead of reaching for `api.timing`/`api.spring`.\nconst makeMutable = createMakeMutable(PlatformAnimated, glibScheduler)\n\nconst {\n useSharedValue,\n useDerivedValue,\n useAnimatedReaction,\n useAnimatedStyle,\n useAnimatedProps,\n} = createHooks(makeMutable, {\n api: PlatformAnimated,\n scheduler: glibScheduler,\n})\n\nconst { useScrollOffset, useScrollViewOffset } =\n createScrollOffsetHooks(makeMutable)\n\n// --- the implemented surface --------------------------------------------\n\nexport {\n cancelAnimation,\n clamp,\n convertToRGBA,\n Easing,\n Extrapolation,\n interpolate,\n interpolateColor,\n isColor,\n isSharedValue,\n isWorkletFunction,\n makeMutable,\n makeShareableCloneRecursive,\n measure,\n rgbaArrayToRGBAColor,\n runOnJS,\n runOnUI,\n scheduleOnRN,\n scheduleOnUI,\n scrollTo,\n useAnimatedProps,\n useAnimatedReaction,\n useAnimatedRef,\n useAnimatedScrollHandler,\n useAnimatedStyle,\n useDerivedValue,\n useEvent,\n useHandler,\n useScrollOffset,\n useScrollViewOffset,\n useSharedValue,\n withClamp,\n withDecay,\n withDelay,\n withRepeat,\n withSequence,\n withSpring,\n withTiming,\n}\n\n/**\n * RN's `PlatformColor`, which Reanimated re-exports. This is the platform's\n * own — theme colours by name, resolved by GTK against the live Adwaita\n * palette (`var(--accent-bg-color)`). It can be written to a style, animated\n * BETWEEN by a shared value, and not interpolated THROUGH: see\n * {@link interpolateColor}.\n */\nexport { PlatformColor } from \"../style/colors\"\n\nexport type {\n AnimationCallback,\n WithDecayConfig,\n WithSpringConfig,\n WithTimingConfig,\n} from \"./animation\"\nexport type {\n ColorInterpolationOptions,\n ColorSpace,\n ParsedColorArray,\n} from \"./color\"\nexport type { EasingFunction, EasingFunctionFactory } from \"./easing\"\nexport type { AnimatedRef, MeasuredDimensions } from \"./animated-ref\"\nexport type {\n AnimatedScrollEvent,\n ScrollHandlerCallback,\n ScrollHandlers,\n UseHandlerContext,\n}\nexport type { DependencyList } from \"./hooks\"\nexport type { ExtrapolationConfig, ExtrapolationType } from \"./interpolation\"\nexport type { DerivedValue, SharedValue } from \"./mutable\"\nexport type { PropsObject as AnimatedProps } from \"./props\"\nexport type {\n KeyframeDefinitions,\n LayoutAnimationCallback,\n BuiltLayoutAnimation,\n LayoutAnimationValues,\n} from \"./layout-animation\"\nexport type { LayoutAnimationProps } from \"./layout-animation-view\"\n\n/** Deprecated upstream alias of {@link Extrapolation}, kept for source parity. */\nexport const Extrapolate = Extrapolation\n\n/**\n * Upstream's spring presets, which are plain data and therefore free to\n * mirror exactly. `GentleSpringConfig` is `withSpring`'s default.\n */\nexport const Reanimated3DefaultSpringConfig = {\n damping: 10,\n mass: 1,\n stiffness: 100,\n} as const\nexport const Reanimated3DefaultSpringConfigWithDuration = {\n duration: 1333,\n dampingRatio: 0.5,\n} as const\nexport const WigglySpringConfig = {\n damping: 90,\n mass: 4,\n stiffness: 900,\n} as const\nexport const WigglySpringConfigWithDuration = {\n duration: 550,\n dampingRatio: 0.75,\n} as const\nexport const GentleSpringConfig = {\n damping: 120,\n mass: 4,\n stiffness: 900,\n} as const\nexport const GentleSpringConfigWithDuration = {\n duration: 550,\n dampingRatio: 1,\n} as const\nexport const SnappySpringConfig = {\n damping: 110,\n mass: 4,\n stiffness: 900,\n overshootClamping: true,\n} as const\nexport const SnappySpringConfigWithDuration = {\n duration: 550,\n dampingRatio: 0.92,\n overshootClamping: true,\n} as const\n\n/**\n * How an animation should respond to the OS \"reduce motion\" setting. The\n * enum is mirrored so a config carrying it type-checks and runs; the setting\n * itself is not wired up on this platform yet, so every value behaves as\n * `Never` and {@link useReducedMotion} reports false. GNOME's\n * `gtk-enable-animations` is the signal to read when it is.\n */\nexport enum ReduceMotion {\n System = \"system\",\n Always = \"always\",\n Never = \"never\",\n}\n\nexport enum ReanimatedLogLevel {\n warn = 1,\n error = 2,\n}\n\n/**\n * Accepted and ignored: there is no Reanimated logger to configure here.\n * Warnings come from the platform's own one-per-session channel, which is not\n * routed through this object. Refusing would break apps that call it at\n * startup for a setting that changes nothing.\n */\nexport const configureReanimatedLogger = (): void => {}\n\n/** No reduce-motion source is wired on this platform yet — see {@link ReduceMotion}. */\nexport const useReducedMotion = (): boolean => false\n\n/**\n * Upstream's keyboard states. Mirrored because {@link useAnimatedKeyboard}\n * returns one of them, and because a caller comparing against\n * `KeyboardState.CLOSED` should type-check and be right.\n */\nexport enum KeyboardState {\n UNKNOWN = 0,\n OPENING = 1,\n OPEN = 2,\n CLOSING = 3,\n CLOSED = 4,\n}\n\n/**\n * The keyboard's height and state as shared values — **honoured and never\n * updated**, which is the same shape and the same reason as RN's `Keyboard`\n * (src/apis/keyboard.ts): every number this hook reports describes a software\n * panel sliding over the app and taking screen space from it, and a desktop\n * has no such panel. The height a caller reads is 0 because the keyboard\n * occupies nothing, and the state is `CLOSED` because it is.\n *\n * Both values are REAL shared values, so a `useAnimatedStyle` reading them\n * subscribes, computes and settles exactly once, and a layout that offsets\n * itself by `keyboard.height.value` lands where it should instead of\n * throwing. That is the whole of the difference from refusing: an app written\n * for three platforms keeps one source and gets the right answer here.\n *\n * `UNKNOWN` is deliberately not the state. Upstream seeds `UNKNOWN` and\n * replaces it the moment the native side reports; here nothing ever will, so\n * a permanent \"we do not know\" would be false — the state IS known.\n *\n * The measured caller is `@gorhom/bottom-sheet`, which has its own\n * `useAnimatedKeyboard` over RN's `Keyboard` and never reaches this one; the\n * hook is here for apps, which do.\n */\nexport const useAnimatedKeyboard = (\n // Upstream's Android translucency options. Accepted and ignored: they\n // describe how the keyboard's rectangle relates to a system bar, and there\n // is neither.\n options?: unknown,\n): { height: SharedValue<number>; state: SharedValue<KeyboardState> } => {\n void options\n const [keyboard] = useState(() => ({\n height: makeMutable(0),\n state: makeMutable(KeyboardState.CLOSED),\n }))\n return keyboard\n}\n\n/**\n * Both are deprecated warn-only aliases upstream, and libraries call them to\n * ask \"is Reanimated present and modern\". Here the answer is yes.\n */\nexport const isConfigured = (): boolean => true\nexport const isReanimated3 = (): boolean => true\n\n/**\n * The upstream version whose API this surface mirrors — NOT a claim to be\n * that package. Libraries read it to gate on API level, which is exactly what\n * it answers.\n */\nexport const reanimatedVersion = \"4.5.3\"\n\n// `startMapper`/`stopMapper` are the primitive `useAnimatedReaction` and\n// `useDerivedValue` are built on, and a few libraries reach for them\n// directly. `inputs` is accepted and ignored: it is upstream's static\n// candidate list from the Babel plugin, and tracking here is dynamic, so the\n// mapper subscribes to what it reads instead of what it was told.\nconst runningMappers = new Map<number, Mapper>()\nlet nextMapperId = 1\n\nexport const startMapper = (mapper: () => void): number => {\n const id = nextMapperId++\n const created = createMapper(mapper)\n runningMappers.set(id, created)\n created.run()\n return id\n}\n\nexport const stopMapper = (id: number): void => {\n runningMappers.get(id)?.dispose()\n runningMappers.delete(id)\n}\n\n// --- Animated.View ------------------------------------------------------\n\n/** A style object whose animatable leaves `useAnimatedStyle` has replaced with nodes. */\nexport type AnimatedStyleProp = StyleObject\n\ntype StyleEntry = AnimatedViewStyle | AnimatedStyleProp\n\nexport type AnimatedViewProps = Omit<PlatformAnimatedViewProps, \"style\"> &\n LayoutAnimationProps & {\n style?: StyleEntry | readonly (StyleEntry | false | null | undefined)[]\n }\n\n/**\n * The platform's own `Animated.View`, with `entering`/`exiting`/`layout`\n * added around it.\n *\n * The style half is the load-bearing discovery of the epic: `isAnimatedNode`\n * in src/components/animated.tsx recognises an animated node STRUCTURALLY\n * (`addListener` + `__getValue`), so the nodes `useAnimatedStyle` produces\n * already ARE animated nodes and reach GTK through the path that has always\n * been there — `setStoredTransform` plus `queueAllocate` for transforms,\n * `widget.setOpacity` for opacity. No new view layer, and no React render per\n * frame.\n *\n * The layout-animation half adds no widget either: `withLayoutAnimations`\n * renders the component it wraps and reaches the widget through the ref that\n * component already exposes. See layout-animation-view.tsx for why `exiting`\n * has to live one component ABOVE the one that owns the widget.\n */\nconst View = withLayoutAnimations(PlatformAnimated.View) as (\n props: AnimatedViewProps,\n) => ReactNode\n\nconst unsupported = createUnsupportedFactory(\n \"react-native-reanimated\",\n \"Implemented here: shared values, useAnimatedStyle/useAnimatedProps/useDerivedValue/useAnimatedReaction, \" +\n \"withTiming/withSpring/withDecay/withClamp/withSequence/withRepeat/withDelay, interpolate, \" +\n \"interpolateColor, Easing, useAnimatedRef + measure, \" +\n \"useAnimatedScrollHandler + scrollTo, runOnUI/runOnJS, \" +\n \"the entering/exiting/layout props with Keyframe, the five *Transition builders and 60 of the 76 \" +\n \"presets (Flip* and LightSpeed* are the exceptions), LayoutAnimationConfig, \" +\n \"withReanimatedTimer/advanceAnimationByTime, \" +\n \"Animated.View/Text/Image/ScrollView and createAnimatedComponent. \" +\n \"See docs/api.md for what is not, and why.\",\n)\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Documented no-ops upstream too — the allow-lists they wrote to are gone\n * from Reanimated itself. Kept callable so startup code does not fail on a\n * line that already did nothing.\n */\nconst addWhitelistedNativeProps = (): void => {}\nconst addWhitelistedUIProps = (): void => {}\n\n/**\n * Wrapping in the layout-animation half is what makes `entering`/`exiting`/\n * `layout` work on ANY animated component rather than only on\n * `Animated.View`. Neither wrapper adds a widget: both render what they were\n * given and reach the real widget through the ref it already exposes.\n */\nconst createLayoutAnimatedComponent = (component: ElementType) =>\n withLayoutAnimations(PlatformAnimated.createAnimatedComponent(component))\n\n/**\n * The rest of the host components, and the factory behind them. All four are\n * the platform's own, because the imperative write path never needed to know\n * what it was writing to: it needs the child's widget and its parent's, and\n * `createAnimatedComponent` reads the first back out of the ref the wrapped\n * component exposes. It adds NO widget to the tree — wrapping in an\n * `Animated.View` would change flex layout and change what `measureLayout` is\n * relative to, which is a different tree, not a shim.\n *\n * `FlatList` is the one refusal, and it is a decision rather than an\n * omission: it is a composite over the windowed core over a ScrollView, and\n * its ref is a scroll API, so no widget is reachable. It throws on render,\n * naming itself and naming the workaround.\n */\nconst Animated = {\n View,\n Text: withLayoutAnimations(PlatformAnimated.Text) as any,\n ScrollView: withLayoutAnimations(PlatformAnimated.ScrollView) as any,\n Image: withLayoutAnimations(PlatformAnimated.Image) as any,\n FlatList: PlatformAnimated.FlatList as any,\n createAnimatedComponent: createLayoutAnimatedComponent as any,\n addWhitelistedNativeProps,\n addWhitelistedUIProps,\n}\n\nexport default Animated\n\nexport const createAnimatedComponent: any = createLayoutAnimatedComponent\n\n// --- the refusals -------------------------------------------------------\n//\n// Enumerated by hand rather than produced by a Proxy over the module,\n// because ESM named imports resolve statically: a symbol missing from this\n// list fails at BUILD time with \"no export named X\", which is loud in its own\n// right — but only the names here can produce the descriptive runtime\n// message, so the list is worth keeping complete. Measured against\n// react-native-reanimated 4.5.3.\n\n// --- animations not implemented ---\nexport const defineAnimation: any = unsupported(\"defineAnimation\")\n\n// --- colours: what is left after the gap closed ---\n// `processColor` returns RN's packed AARRGGBB integer, whose only purpose is\n// to cross to a native module. There is no native side here — a colour's\n// destination is a GTK stylesheet, which takes strings — so a number handed\n// back from this function would be accepted by nothing downstream, including\n// this platform's own styles. Refusing beats returning a value that only\n// fails later.\nexport const processColor: any = unsupported(\"processColor\")\nexport const DynamicColorIOS: any = unsupported(\"DynamicColorIOS\")\n\n// --- layout animations: the four written by hand ---\n//\n// `BaseAnimationBuilder` and `ComplexAnimationBuilder` are upstream's two\n// halves of one hierarchy — the plain chain and the chain plus the spring\n// parameters — and this platform has a single class doing both, exported\n// under both names so a library subclassing either one keeps working.\nexport { FadeIn, FadeOut, Keyframe, LinearTransition }\nexport const BaseAnimationBuilder = LayoutAnimationBuilder\nexport const ComplexAnimationBuilder = LayoutAnimationBuilder\n/** Upstream's own deprecated alias of {@link LinearTransition}. */\nexport const Layout = LinearTransition\n\n// --- layout animations: the catalogue ---\n//\n// Sixty presets over the same base class, minted from upstream's own\n// parameters — see layout-animation-presets.ts, which is the table, and\n// layout-transitions.ts for the four `*Transition` builders beside\n// `LinearTransition`. What is NOT here is directly below.\nexport {\n BounceIn,\n BounceInDown,\n BounceInLeft,\n BounceInRight,\n BounceInUp,\n BounceOut,\n BounceOutDown,\n BounceOutLeft,\n BounceOutRight,\n BounceOutUp,\n FadeInDown,\n FadeInLeft,\n FadeInRight,\n FadeInUp,\n FadeOutDown,\n FadeOutLeft,\n FadeOutRight,\n FadeOutUp,\n PinwheelIn,\n PinwheelOut,\n RollInLeft,\n RollInRight,\n RollOutLeft,\n RollOutRight,\n RotateInDownLeft,\n RotateInDownRight,\n RotateInUpLeft,\n RotateInUpRight,\n RotateOutDownLeft,\n RotateOutDownRight,\n RotateOutUpLeft,\n RotateOutUpRight,\n SlideInDown,\n SlideInLeft,\n SlideInRight,\n SlideInUp,\n SlideOutDown,\n SlideOutLeft,\n SlideOutRight,\n SlideOutUp,\n StretchInX,\n StretchInY,\n StretchOutX,\n StretchOutY,\n ZoomIn,\n ZoomInDown,\n ZoomInEasyDown,\n ZoomInEasyUp,\n ZoomInLeft,\n ZoomInRight,\n ZoomInRotate,\n ZoomInUp,\n ZoomOut,\n ZoomOutDown,\n ZoomOutEasyDown,\n ZoomOutEasyUp,\n ZoomOutLeft,\n ZoomOutRight,\n ZoomOutRotate,\n ZoomOutUp,\n} from \"./layout-animation-presets\"\nexport {\n CurvedTransition,\n EntryExitTransition,\n FadingTransition,\n JumpingTransition,\n SequencedTransition,\n} from \"./layout-transitions\"\nexport {\n enableLayoutAnimations,\n LayoutAnimationConfig,\n} from \"./layout-animation-config\"\nexport type { LayoutAnimationConfigProps } from \"./layout-animation-config\"\n\n// --- layout animations: what the catalogue cannot reach ---\n//\n// Two refusals, both structural, both named rather than approximated — a\n// `FlipInEasyX` that quietly rotated in the plane instead of out of it is\n// exactly the \"compiled, ran, did the wrong thing\" failure this surface\n// exists to avoid.\n//\n// The twelve `Flip*` builders are `perspective` plus `rotateX`/`rotateY`: a\n// real 3D rotation with a projection. This platform folds a transform array\n// into ONE 2D affine matrix and hands it to `gsk_transform_matrix2d()`, which\n// is 3.2x cheaper than a GskTransform chain (docs/research/transforms.md) and\n// has no third axis in it.\n//\n// The four `LightSpeed*` builders need `skewX`, which a 2D affine matrix\n// COULD carry — it is left out on purpose, across the whole platform's\n// transform surface (docs/api.md, src/style/README.md), and the catalogue is\n// not the place to reverse that.\nexport const FlipInEasyX: any = unsupported(\"FlipInEasyX\")\nexport const FlipInEasyY: any = unsupported(\"FlipInEasyY\")\nexport const FlipInXDown: any = unsupported(\"FlipInXDown\")\nexport const FlipInXUp: any = unsupported(\"FlipInXUp\")\nexport const FlipInYLeft: any = unsupported(\"FlipInYLeft\")\nexport const FlipInYRight: any = unsupported(\"FlipInYRight\")\nexport const FlipOutEasyX: any = unsupported(\"FlipOutEasyX\")\nexport const FlipOutEasyY: any = unsupported(\"FlipOutEasyY\")\nexport const FlipOutXDown: any = unsupported(\"FlipOutXDown\")\nexport const FlipOutXUp: any = unsupported(\"FlipOutXUp\")\nexport const FlipOutYLeft: any = unsupported(\"FlipOutYLeft\")\nexport const FlipOutYRight: any = unsupported(\"FlipOutYRight\")\nexport const LightSpeedInLeft: any = unsupported(\"LightSpeedInLeft\")\nexport const LightSpeedInRight: any = unsupported(\"LightSpeedInRight\")\nexport const LightSpeedOutLeft: any = unsupported(\"LightSpeedOutLeft\")\nexport const LightSpeedOutRight: any = unsupported(\"LightSpeedOutRight\")\n\n// --- shared element transitions ---\n//\n// A different mechanism, not a preset: it matches two views in two different\n// screens by a `sharedTransitionTag`, lifts one into an overlay above both,\n// and interpolates it towards the other while a navigator drives the screen\n// change. None of those three pieces exists here — there is no\n// `sharedTransitionTag` prop on any component, no overlay layer above the\n// navigation stack, and the retention primitive an exit animation rides on\n// deliberately holds a widget in its OWN parent (src/components/\n// widget-retention.ts) rather than reparenting it, which is the one thing a\n// shared element has to do. Upstream's own web path does not implement it\n// either.\nexport const SharedTransition: any = unsupported(\"SharedTransition\")\nexport const SharedTransitionBoundary: any = unsupported(\n \"SharedTransitionBoundary\",\n)\n\n// --- Reanimated 4's CSS animations ---\nexport const css: any = unsupported(\"css\")\nexport const createCSSAnimatedComponent: any = unsupported(\n \"createCSSAnimatedComponent\",\n)\nexport const cubicBezier: any = unsupported(\"cubicBezier\")\nexport const linear: any = unsupported(\"linear\")\nexport const steps: any = unsupported(\"steps\")\n\n// --- hooks built on the event system, sensors and the keyboard ---\nexport const useAnimatedSensor: any = unsupported(\"useAnimatedSensor\")\nexport const useComposedEventHandler: any = unsupported(\n \"useComposedEventHandler\",\n)\nexport const useFrameCallback: any = unsupported(\"useFrameCallback\")\nexport const useTimestamp: any = unsupported(\"useTimestamp\")\n\n// --- a worklet runtime, which is structural by definition ---\n// Upstream's own non-native runtimes.ts throws for these too.\nexport const createWorkletRuntime: any = unsupported(\"createWorkletRuntime\")\nexport const runOnRuntime: any = unsupported(\"runOnRuntime\")\nexport const executeOnUIRuntimeSync: any = unsupported(\"executeOnUIRuntimeSync\")\n\n// --- platform functions with no analogue here ---\nexport const dispatchCommand: any = unsupported(\"dispatchCommand\")\nexport const getRelativeCoords: any = unsupported(\"getRelativeCoords\")\nexport const setGestureState: any = unsupported(\"setGestureState\")\nexport const setNativeProps: any = unsupported(\"setNativeProps\")\nexport const getViewProp: any = unsupported(\"getViewProp\")\nexport const createAnimatedPropAdapter: any = unsupported(\n \"createAnimatedPropAdapter\",\n)\nexport const NativeEventsManager: any = unsupported(\"NativeEventsManager\")\nexport const getUseOfValueInStyleWarning: any = unsupported(\n \"getUseOfValueInStyleWarning\",\n)\n\n// --- enums with no source of truth on a desktop ---\nexport const InterfaceOrientation: any = unsupported(\"InterfaceOrientation\")\nexport const IOSReferenceFrame: any = unsupported(\"IOSReferenceFrame\")\nexport const SensorType: any = unsupported(\"SensorType\")\n\n// --- screen transitions ---\nexport const ScreenTransition: any = unsupported(\"ScreenTransition\")\nexport const startScreenTransition: any = unsupported(\"startScreenTransition\")\nexport const finishScreenTransition: any = unsupported(\"finishScreenTransition\")\n\n// --- dev tooling ---\nexport const PerformanceMonitor: any = unsupported(\"PerformanceMonitor\")\nexport const ReducedMotionConfig: any = unsupported(\"ReducedMotionConfig\")\nexport const getDynamicFeatureFlag: any = unsupported(\"getDynamicFeatureFlag\")\nexport const getStaticFeatureFlag: any = unsupported(\"getStaticFeatureFlag\")\nexport const setDynamicFeatureFlag: any = unsupported(\"setDynamicFeatureFlag\")\n\n// --- the test helpers ---\n//\n// The three that control TIME are real, and they are not an emulation:\n// upstream fakes Jest's timers and synthesises frames on top of them, while\n// the frame driver every animation on this platform runs on is this repo's\n// own, so a test simply takes it. See test-timers.ts.\nexport {\n advanceAnimationByFrame,\n advanceAnimationByTime,\n withReanimatedTimer,\n} from \"./test-timers\"\n\n// The two that read a STYLE BACK are refused, and it is the same refusal\n// twice. Upstream's `getAnimatedStyle` returns the style object its updater\n// produced, which exists on mobile only because its Jest path keeps a mirror\n// of it on the component (`props.animatedStyle.value`). There is no such\n// object here at any point after bind time: `useAnimatedStyle`'s result is\n// taken apart into per-property channels — opacity to the widget, colours to\n// a private CSS provider, and the whole `transform` array folded into ONE 2D\n// matrix in the rect store, from which the array cannot be recovered. A\n// `getAnimatedStyle` here would therefore answer a different question than\n// the one it was asked, silently.\n//\n// What to assert instead is what every GTK test in this repo already\n// asserts, and it is strictly stronger — the widget itself:\n// `widget.getOpacity()`, `widget.computeBounds(stage)`, `widget.measure()`.\n// Drive the clock with `withReanimatedTimer` + `advanceAnimationByTime` and\n// those reads are deterministic.\n//\n// `setUpTests` exists only to install `toHaveAnimatedStyle` /\n// `toHaveAnimatedProps`, both of which are `getAnimatedStyle` in a matcher.\nexport const getAnimatedStyle: any = unsupported(\"getAnimatedStyle\")\nexport const setUpTests: any = unsupported(\"setUpTests\")\n"]}
@@ -0,0 +1,18 @@
1
+ /** Behaviour for inputs outside `inputRange`. */
2
+ export declare enum Extrapolation {
3
+ IDENTITY = "identity",
4
+ CLAMP = "clamp",
5
+ EXTEND = "extend"
6
+ }
7
+ export type ExtrapolationConfig = {
8
+ extrapolateLeft?: Extrapolation | string;
9
+ extrapolateRight?: Extrapolation | string;
10
+ };
11
+ export type ExtrapolationType = ExtrapolationConfig | Extrapolation | "identity" | "clamp" | "extend" | undefined;
12
+ /**
13
+ * Maps `value` from `inputRange` onto `outputRange` with linear
14
+ * interpolation between the two enclosing stops.
15
+ */
16
+ export declare const interpolate: (value: number, inputRange: readonly number[], outputRange: readonly number[], type?: ExtrapolationType) => number;
17
+ /** Constrains `value` to `[min, max]`. */
18
+ export declare const clamp: (value: number, min: number, max: number) => number;