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,498 @@
1
+ // The layout-animation preset catalogue: `BounceIn*`, `Fade*`, `Pinwheel*`,
2
+ // `Roll*`, `Rotate*`, `Slide*`, `Stretch*` and `Zoom*` — sixty builders that
3
+ // are all the same builder.
4
+ //
5
+ // Upstream writes each of them as a class with a hand-written `build()`, and
6
+ // every one of those bodies is the same three lines around a different pair of
7
+ // numbers: where a property starts, where it ends, and (for the bounces) which
8
+ // fractions of the duration the overshoots take. So the numbers are the data
9
+ // here and the body is written once — which is not tidiness for its own sake:
10
+ // sixty hand-copied bodies are sixty chances to transpose a sign, and the
11
+ // table below can be read against upstream's own source line by line.
12
+ //
13
+ // EVERY PARAMETER IS UPSTREAM'S, from react-native-reanimated 4.5.3
14
+ // (src/layoutReanimation/defaultAnimations/). The 25 px of a `FadeInRight`,
15
+ // the 0.55/0.15/0.15/0.15 split of a bounce, the 5 radians of a `PinwheelIn`,
16
+ // `SlideInUp` starting at `-windowHeight` where `SlideInDown` starts at
17
+ // `targetOriginY + windowHeight` (upstream is asymmetric there, and this
18
+ // mirrors it rather than tidying it) — all of it is quoted, not invented.
19
+ //
20
+ // WHAT IS NOT HERE, and why it is refused by name rather than approximated:
21
+ // the twelve `Flip*` builders need `perspective` with `rotateX`/`rotateY`, and
22
+ // the four `LightSpeed*` need `skewX`. This platform folds a transform array
23
+ // into ONE 2D affine matrix (src/style/transform.ts, measured in
24
+ // docs/research/transforms.md), which has no third axis to rotate about and
25
+ // deliberately omits skew. See the refusals in index.tsx.
26
+ import { withSequence, withTiming } from "./animation";
27
+ import { AnimationBuilder, } from "./layout-animation";
28
+ const measure = (value, values) => typeof value === "function" ? value(values) : value;
29
+ const EMPTY_SPEC = {};
30
+ /**
31
+ * The one preset body. Every entry in the catalogue is an empty subclass of
32
+ * this carrying its own {@link PresetSpec}.
33
+ */
34
+ export class LayoutAnimationPreset extends AnimationBuilder {
35
+ /**
36
+ * Replaced by every generated subclass — see `definePreset`. A method
37
+ * rather than a field so the two `.rotate()`-aware presets can compute
38
+ * theirs from builder state that is only settled by the time `build()` runs.
39
+ */
40
+ spec() {
41
+ return EMPTY_SPEC;
42
+ }
43
+ build() {
44
+ const spec = this.spec();
45
+ const animate = this.animation();
46
+ const delayMs = this.getDelay();
47
+ const totalDuration = this.getDuration();
48
+ const callback = this.callbackV;
49
+ const extra = this.initialValuesV;
50
+ const run = (track, values) => {
51
+ if (track.steps) {
52
+ const specs = track.steps.map(([target, fraction]) => withTiming(measure(target, values), {
53
+ duration: totalDuration * fraction,
54
+ }));
55
+ return this.delayed(delayMs, specs.length === 1 ? specs[0] : withSequence(...specs));
56
+ }
57
+ return this.delayed(delayMs, animate(measure(track.to ?? track.from, values)));
58
+ };
59
+ return (values) => {
60
+ const initialValues = {};
61
+ const animations = {};
62
+ if (spec.opacity) {
63
+ initialValues.opacity = measure(spec.opacity.from, values);
64
+ animations.opacity = run(spec.opacity, values);
65
+ }
66
+ if (spec.origin) {
67
+ const key = spec.origin.axis === "x" ? "originX" : "originY";
68
+ initialValues[key] = measure(spec.origin.from, values);
69
+ animations[key] = run(spec.origin, values);
70
+ }
71
+ if (spec.transform) {
72
+ // Both arrays are built from the same list in the same order, so a
73
+ // slot's initial value and its animation always line up by index —
74
+ // which is what the runtime's transform channel keys on.
75
+ initialValues.transform = spec.transform.map((track) => ({
76
+ [track.key]: measure(track.from, values),
77
+ }));
78
+ animations.transform = spec.transform.map((track) => ({
79
+ [track.key]: run(track, values),
80
+ }));
81
+ }
82
+ return {
83
+ initialValues: { ...initialValues, ...extra },
84
+ animations,
85
+ callback,
86
+ };
87
+ };
88
+ }
89
+ }
90
+ /**
91
+ * Mints one catalogue entry. The class is empty apart from its spec, so
92
+ * `entering={ZoomIn}` (the class) and `entering={ZoomIn.duration(400)}` (an
93
+ * instance) both work through `AnimationBuilder`'s existing statics.
94
+ */
95
+ const definePreset = (name, spec) => {
96
+ const Preset = class extends LayoutAnimationPreset {
97
+ spec() {
98
+ return spec;
99
+ }
100
+ };
101
+ // So a stack trace, a devtools inspector and `Preset.name` all say
102
+ // `ZoomInRotate` rather than the anonymous class expression above.
103
+ Object.defineProperty(Preset, "name", { value: name });
104
+ return Preset;
105
+ };
106
+ // --- the numbers ---------------------------------------------------------
107
+ const windowWidth = (values) => values.windowWidth;
108
+ const negWindowWidth = (values) => -values.windowWidth;
109
+ const windowHeight = (values) => values.windowHeight;
110
+ const negWindowHeight = (values) => -values.windowHeight;
111
+ /** Degrees, from upstream's radians. `'5rad'` is 286.479°. */
112
+ const rad = (turns) => (turns * 180) / Math.PI;
113
+ // The distance a quarter-turn about the CENTRE moves a corner, which is what
114
+ // `Rotate*` translates by so the view appears to pivot on that corner.
115
+ const targetPivot = (values) => values.targetWidth / 2 - values.targetHeight / 2;
116
+ const negTargetPivot = (values) => -targetPivot(values);
117
+ const currentPivot = (values) => values.currentWidth / 2 - values.currentHeight / 2;
118
+ const negCurrentPivot = (values) => -currentPivot(values);
119
+ const targetHeight = (values) => values.targetHeight;
120
+ const negTargetHeight = (values) => -values.targetHeight;
121
+ const currentHeight = (values) => values.currentHeight;
122
+ const negCurrentHeight = (values) => -values.currentHeight;
123
+ const fadeIn = { from: 0, to: 1 };
124
+ const fadeOut = { from: 1, to: 0 };
125
+ // Upstream's bounce curve: a long overshoot, then two small corrections, then
126
+ // the target — 55 % / 15 % / 15 % / 15 % of the duration. Entering runs it
127
+ // forwards, exiting runs the corrections first and leaves last.
128
+ const bounceIn = (overshoot, back, settle, from, to = 0) => ({
129
+ from,
130
+ steps: [
131
+ [overshoot, 0.55],
132
+ [back, 0.15],
133
+ [settle, 0.15],
134
+ [to, 0.15],
135
+ ],
136
+ });
137
+ const bounceOut = (first, second, third, to, from = 0) => ({
138
+ from,
139
+ steps: [
140
+ [first, 0.15],
141
+ [second, 0.15],
142
+ [third, 0.15],
143
+ [to, 0.55],
144
+ ],
145
+ });
146
+ // --- Fade ----------------------------------------------------------------
147
+ export const FadeInRight = definePreset("FadeInRight", {
148
+ opacity: fadeIn,
149
+ transform: [{ key: "translateX", from: 25, to: 0 }],
150
+ });
151
+ export const FadeInLeft = definePreset("FadeInLeft", {
152
+ opacity: fadeIn,
153
+ transform: [{ key: "translateX", from: -25, to: 0 }],
154
+ });
155
+ export const FadeInUp = definePreset("FadeInUp", {
156
+ opacity: fadeIn,
157
+ transform: [{ key: "translateY", from: -25, to: 0 }],
158
+ });
159
+ export const FadeInDown = definePreset("FadeInDown", {
160
+ opacity: fadeIn,
161
+ transform: [{ key: "translateY", from: 25, to: 0 }],
162
+ });
163
+ export const FadeOutRight = definePreset("FadeOutRight", {
164
+ opacity: fadeOut,
165
+ transform: [{ key: "translateX", from: 0, to: 25 }],
166
+ });
167
+ export const FadeOutLeft = definePreset("FadeOutLeft", {
168
+ opacity: fadeOut,
169
+ transform: [{ key: "translateX", from: 0, to: -25 }],
170
+ });
171
+ export const FadeOutUp = definePreset("FadeOutUp", {
172
+ opacity: fadeOut,
173
+ transform: [{ key: "translateY", from: 0, to: -25 }],
174
+ });
175
+ export const FadeOutDown = definePreset("FadeOutDown", {
176
+ opacity: fadeOut,
177
+ transform: [{ key: "translateY", from: 0, to: 25 }],
178
+ });
179
+ // --- Bounce --------------------------------------------------------------
180
+ export const BounceIn = definePreset("BounceIn", {
181
+ transform: [{ key: "scale", ...bounceIn(1.2, 0.9, 1.1, 0, 1) }],
182
+ });
183
+ export const BounceInDown = definePreset("BounceInDown", {
184
+ transform: [{ key: "translateY", ...bounceIn(-20, 10, -10, windowHeight) }],
185
+ });
186
+ export const BounceInUp = definePreset("BounceInUp", {
187
+ transform: [{ key: "translateY", ...bounceIn(20, -10, 10, negWindowHeight) }],
188
+ });
189
+ export const BounceInLeft = definePreset("BounceInLeft", {
190
+ transform: [{ key: "translateX", ...bounceIn(20, -10, 10, negWindowWidth) }],
191
+ });
192
+ export const BounceInRight = definePreset("BounceInRight", {
193
+ transform: [{ key: "translateX", ...bounceIn(-20, 10, -10, windowWidth) }],
194
+ });
195
+ export const BounceOut = definePreset("BounceOut", {
196
+ transform: [{ key: "scale", ...bounceOut(1.1, 0.9, 1.2, 0, 1) }],
197
+ });
198
+ export const BounceOutDown = definePreset("BounceOutDown", {
199
+ transform: [{ key: "translateY", ...bounceOut(-10, 10, -20, windowHeight) }],
200
+ });
201
+ export const BounceOutUp = definePreset("BounceOutUp", {
202
+ transform: [
203
+ { key: "translateY", ...bounceOut(10, -10, 20, negWindowHeight) },
204
+ ],
205
+ });
206
+ export const BounceOutLeft = definePreset("BounceOutLeft", {
207
+ transform: [{ key: "translateX", ...bounceOut(10, -10, 20, negWindowWidth) }],
208
+ });
209
+ export const BounceOutRight = definePreset("BounceOutRight", {
210
+ transform: [{ key: "translateX", ...bounceOut(-10, 10, -20, windowWidth) }],
211
+ });
212
+ // --- Pinwheel ------------------------------------------------------------
213
+ export const PinwheelIn = definePreset("PinwheelIn", {
214
+ opacity: fadeIn,
215
+ transform: [
216
+ { key: "scale", from: 0, to: 1 },
217
+ { key: "rotate", from: rad(5), to: 0 },
218
+ ],
219
+ });
220
+ export const PinwheelOut = definePreset("PinwheelOut", {
221
+ opacity: fadeOut,
222
+ transform: [
223
+ { key: "scale", from: 1, to: 0 },
224
+ { key: "rotate", from: 0, to: rad(5) },
225
+ ],
226
+ });
227
+ // --- Roll ----------------------------------------------------------------
228
+ export const RollInLeft = definePreset("RollInLeft", {
229
+ transform: [
230
+ { key: "translateX", from: negWindowWidth, to: 0 },
231
+ { key: "rotate", from: -180, to: 0 },
232
+ ],
233
+ });
234
+ export const RollInRight = definePreset("RollInRight", {
235
+ transform: [
236
+ { key: "translateX", from: windowWidth, to: 0 },
237
+ { key: "rotate", from: 180, to: 0 },
238
+ ],
239
+ });
240
+ export const RollOutLeft = definePreset("RollOutLeft", {
241
+ transform: [
242
+ { key: "translateX", from: 0, to: negWindowWidth },
243
+ { key: "rotate", from: 0, to: -180 },
244
+ ],
245
+ });
246
+ export const RollOutRight = definePreset("RollOutRight", {
247
+ transform: [
248
+ { key: "translateX", from: 0, to: windowWidth },
249
+ { key: "rotate", from: 0, to: 180 },
250
+ ],
251
+ });
252
+ // --- Rotate --------------------------------------------------------------
253
+ export const RotateInDownLeft = definePreset("RotateInDownLeft", {
254
+ opacity: fadeIn,
255
+ transform: [
256
+ { key: "rotate", from: -90, to: 0 },
257
+ { key: "translateX", from: targetPivot, to: 0 },
258
+ { key: "translateY", from: negTargetPivot, to: 0 },
259
+ ],
260
+ });
261
+ export const RotateInDownRight = definePreset("RotateInDownRight", {
262
+ opacity: fadeIn,
263
+ transform: [
264
+ { key: "rotate", from: 90, to: 0 },
265
+ { key: "translateX", from: negTargetPivot, to: 0 },
266
+ { key: "translateY", from: negTargetPivot, to: 0 },
267
+ ],
268
+ });
269
+ export const RotateInUpLeft = definePreset("RotateInUpLeft", {
270
+ opacity: fadeIn,
271
+ transform: [
272
+ { key: "rotate", from: 90, to: 0 },
273
+ { key: "translateX", from: targetPivot, to: 0 },
274
+ { key: "translateY", from: targetPivot, to: 0 },
275
+ ],
276
+ });
277
+ export const RotateInUpRight = definePreset("RotateInUpRight", {
278
+ opacity: fadeIn,
279
+ transform: [
280
+ { key: "rotate", from: -90, to: 0 },
281
+ { key: "translateX", from: negTargetPivot, to: 0 },
282
+ { key: "translateY", from: targetPivot, to: 0 },
283
+ ],
284
+ });
285
+ export const RotateOutDownLeft = definePreset("RotateOutDownLeft", {
286
+ opacity: fadeOut,
287
+ transform: [
288
+ { key: "rotate", from: 0, to: 90 },
289
+ { key: "translateX", from: 0, to: currentPivot },
290
+ { key: "translateY", from: 0, to: currentPivot },
291
+ ],
292
+ });
293
+ export const RotateOutDownRight = definePreset("RotateOutDownRight", {
294
+ opacity: fadeOut,
295
+ transform: [
296
+ { key: "rotate", from: 0, to: -90 },
297
+ { key: "translateX", from: 0, to: negCurrentPivot },
298
+ { key: "translateY", from: 0, to: currentPivot },
299
+ ],
300
+ });
301
+ export const RotateOutUpLeft = definePreset("RotateOutUpLeft", {
302
+ opacity: fadeOut,
303
+ transform: [
304
+ { key: "rotate", from: 0, to: -90 },
305
+ { key: "translateX", from: 0, to: currentPivot },
306
+ { key: "translateY", from: 0, to: negCurrentPivot },
307
+ ],
308
+ });
309
+ export const RotateOutUpRight = definePreset("RotateOutUpRight", {
310
+ opacity: fadeOut,
311
+ transform: [
312
+ { key: "rotate", from: 0, to: 90 },
313
+ { key: "translateX", from: 0, to: negCurrentPivot },
314
+ { key: "translateY", from: 0, to: negCurrentPivot },
315
+ ],
316
+ });
317
+ // --- Slide ---------------------------------------------------------------
318
+ //
319
+ // The only presets that animate the layout ORIGIN rather than a transform,
320
+ // and the runtime turns that into the same paint-only translation
321
+ // `LinearTransition` gets. Upstream's own asymmetries are kept: `SlideInUp`
322
+ // starts at `-windowHeight` flat while `SlideInDown` starts a window below
323
+ // where the view landed, and the `SlideOut*` targets are clamped so a view
324
+ // that already sits off-screen still leaves.
325
+ export const SlideInRight = definePreset("SlideInRight", {
326
+ origin: {
327
+ axis: "x",
328
+ from: (values) => values.targetOriginX + values.windowWidth,
329
+ to: (values) => values.targetOriginX,
330
+ },
331
+ });
332
+ export const SlideInLeft = definePreset("SlideInLeft", {
333
+ origin: {
334
+ axis: "x",
335
+ from: (values) => values.targetOriginX - values.windowWidth,
336
+ to: (values) => values.targetOriginX,
337
+ },
338
+ });
339
+ export const SlideOutRight = definePreset("SlideOutRight", {
340
+ origin: {
341
+ axis: "x",
342
+ from: (values) => values.currentOriginX,
343
+ to: (values) => Math.max(values.currentOriginX + values.windowWidth, values.windowWidth),
344
+ },
345
+ });
346
+ export const SlideOutLeft = definePreset("SlideOutLeft", {
347
+ origin: {
348
+ axis: "x",
349
+ from: (values) => values.currentOriginX,
350
+ to: (values) => Math.min(values.currentOriginX - values.windowWidth, -values.windowWidth),
351
+ },
352
+ });
353
+ export const SlideInUp = definePreset("SlideInUp", {
354
+ origin: {
355
+ axis: "y",
356
+ from: negWindowHeight,
357
+ to: (values) => values.targetOriginY,
358
+ },
359
+ });
360
+ export const SlideInDown = definePreset("SlideInDown", {
361
+ origin: {
362
+ axis: "y",
363
+ from: (values) => values.targetOriginY + values.windowHeight,
364
+ to: (values) => values.targetOriginY,
365
+ },
366
+ });
367
+ export const SlideOutUp = definePreset("SlideOutUp", {
368
+ origin: {
369
+ axis: "y",
370
+ from: (values) => values.currentOriginY,
371
+ to: (values) => Math.min(values.currentOriginY - values.windowHeight, -values.windowHeight),
372
+ },
373
+ });
374
+ export const SlideOutDown = definePreset("SlideOutDown", {
375
+ origin: {
376
+ axis: "y",
377
+ from: (values) => values.currentOriginY,
378
+ to: (values) => Math.max(values.currentOriginY + values.windowHeight, values.windowHeight),
379
+ },
380
+ });
381
+ // --- Stretch -------------------------------------------------------------
382
+ export const StretchInX = definePreset("StretchInX", {
383
+ transform: [{ key: "scaleX", from: 0, to: 1 }],
384
+ });
385
+ export const StretchInY = definePreset("StretchInY", {
386
+ transform: [{ key: "scaleY", from: 0, to: 1 }],
387
+ });
388
+ export const StretchOutX = definePreset("StretchOutX", {
389
+ transform: [{ key: "scaleX", from: 1, to: 0 }],
390
+ });
391
+ export const StretchOutY = definePreset("StretchOutY", {
392
+ transform: [{ key: "scaleY", from: 1, to: 0 }],
393
+ });
394
+ // --- Zoom ----------------------------------------------------------------
395
+ export const ZoomIn = definePreset("ZoomIn", {
396
+ transform: [{ key: "scale", from: 0, to: 1 }],
397
+ });
398
+ export const ZoomInLeft = definePreset("ZoomInLeft", {
399
+ transform: [
400
+ { key: "translateX", from: negWindowWidth, to: 0 },
401
+ { key: "scale", from: 0, to: 1 },
402
+ ],
403
+ });
404
+ export const ZoomInRight = definePreset("ZoomInRight", {
405
+ transform: [
406
+ { key: "translateX", from: windowWidth, to: 0 },
407
+ { key: "scale", from: 0, to: 1 },
408
+ ],
409
+ });
410
+ export const ZoomInUp = definePreset("ZoomInUp", {
411
+ transform: [
412
+ { key: "translateY", from: negWindowHeight, to: 0 },
413
+ { key: "scale", from: 0, to: 1 },
414
+ ],
415
+ });
416
+ export const ZoomInDown = definePreset("ZoomInDown", {
417
+ transform: [
418
+ { key: "translateY", from: windowHeight, to: 0 },
419
+ { key: "scale", from: 0, to: 1 },
420
+ ],
421
+ });
422
+ export const ZoomInEasyUp = definePreset("ZoomInEasyUp", {
423
+ transform: [
424
+ { key: "translateY", from: negTargetHeight, to: 0 },
425
+ { key: "scale", from: 0, to: 1 },
426
+ ],
427
+ });
428
+ export const ZoomInEasyDown = definePreset("ZoomInEasyDown", {
429
+ transform: [
430
+ { key: "translateY", from: targetHeight, to: 0 },
431
+ { key: "scale", from: 0, to: 1 },
432
+ ],
433
+ });
434
+ export const ZoomOut = definePreset("ZoomOut", {
435
+ transform: [{ key: "scale", from: 1, to: 0 }],
436
+ });
437
+ export const ZoomOutLeft = definePreset("ZoomOutLeft", {
438
+ transform: [
439
+ { key: "translateX", from: 0, to: negWindowWidth },
440
+ { key: "scale", from: 1, to: 0 },
441
+ ],
442
+ });
443
+ export const ZoomOutRight = definePreset("ZoomOutRight", {
444
+ transform: [
445
+ { key: "translateX", from: 0, to: windowWidth },
446
+ { key: "scale", from: 1, to: 0 },
447
+ ],
448
+ });
449
+ export const ZoomOutUp = definePreset("ZoomOutUp", {
450
+ transform: [
451
+ { key: "translateY", from: 0, to: negWindowHeight },
452
+ { key: "scale", from: 1, to: 0 },
453
+ ],
454
+ });
455
+ export const ZoomOutDown = definePreset("ZoomOutDown", {
456
+ transform: [
457
+ { key: "translateY", from: 0, to: windowHeight },
458
+ { key: "scale", from: 1, to: 0 },
459
+ ],
460
+ });
461
+ export const ZoomOutEasyUp = definePreset("ZoomOutEasyUp", {
462
+ transform: [
463
+ { key: "translateY", from: 0, to: negCurrentHeight },
464
+ { key: "scale", from: 1, to: 0 },
465
+ ],
466
+ });
467
+ export const ZoomOutEasyDown = definePreset("ZoomOutEasyDown", {
468
+ transform: [
469
+ { key: "translateY", from: 0, to: currentHeight },
470
+ { key: "scale", from: 1, to: 0 },
471
+ ],
472
+ });
473
+ // The two that read `.rotate()`, which is why they are classes of their own
474
+ // rather than table entries: the angle is a builder parameter, so the spec
475
+ // cannot be frozen at definition time.
476
+ /** `ZoomIn` with a spin. `.rotate()` sets the angle; upstream's default is 0.3 rad. */
477
+ export class ZoomInRotate extends LayoutAnimationPreset {
478
+ spec() {
479
+ return {
480
+ transform: [
481
+ { key: "scale", from: 0, to: 1 },
482
+ { key: "rotate", from: this.getRotationDegrees(rad(0.3)), to: 0 },
483
+ ],
484
+ };
485
+ }
486
+ }
487
+ /** `ZoomOut` with a spin. `.rotate()` sets the angle; upstream's default is 0.3 rad. */
488
+ export class ZoomOutRotate extends LayoutAnimationPreset {
489
+ spec() {
490
+ return {
491
+ transform: [
492
+ { key: "scale", from: 1, to: 0 },
493
+ { key: "rotate", from: 0, to: this.getRotationDegrees(rad(0.3)) },
494
+ ],
495
+ };
496
+ }
497
+ }
498
+ //# sourceMappingURL=layout-animation-presets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout-animation-presets.js","sourceRoot":"","sources":["../../src/reanimated-compat/layout-animation-presets.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,6EAA6E;AAC7E,4BAA4B;AAC5B,EAAE;AACF,6EAA6E;AAC7E,+EAA+E;AAC/E,+EAA+E;AAC/E,6EAA6E;AAC7E,8EAA8E;AAC9E,0EAA0E;AAC1E,sEAAsE;AACtE,EAAE;AACF,oEAAoE;AACpE,4EAA4E;AAC5E,8EAA8E;AAC9E,wEAAwE;AACxE,yEAAyE;AACzE,0EAA0E;AAC1E,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,6EAA6E;AAC7E,iEAAiE;AACjE,4EAA4E;AAC5E,0DAA0D;AAC1D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EACL,gBAAgB,GAGjB,MAAM,oBAAoB,CAAA;AAK3B,MAAM,OAAO,GAAG,CAAC,KAAc,EAAE,MAA6B,EAAU,EAAE,CACxE,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;AAqCrD,MAAM,UAAU,GAAe,EAAE,CAAA;AAEjC;;;GAGG;AACH,MAAM,OAAO,qBAAsB,SAAQ,gBAAgB;IACzD;;;;OAIG;IACO,IAAI;QACZ,OAAO,UAAU,CAAA;IACnB,CAAC;IAEQ,KAAK;QACZ,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;QACxB,MAAM,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AG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE;gBAChC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE;aAClE;SACF,CAAA;IACH,CAAC;CACF","sourcesContent":["// The layout-animation preset catalogue: `BounceIn*`, `Fade*`, `Pinwheel*`,\n// `Roll*`, `Rotate*`, `Slide*`, `Stretch*` and `Zoom*` — sixty builders that\n// are all the same builder.\n//\n// Upstream writes each of them as a class with a hand-written `build()`, and\n// every one of those bodies is the same three lines around a different pair of\n// numbers: where a property starts, where it ends, and (for the bounces) which\n// fractions of the duration the overshoots take. So the numbers are the data\n// here and the body is written once — which is not tidiness for its own sake:\n// sixty hand-copied bodies are sixty chances to transpose a sign, and the\n// table below can be read against upstream's own source line by line.\n//\n// EVERY PARAMETER IS UPSTREAM'S, from react-native-reanimated 4.5.3\n// (src/layoutReanimation/defaultAnimations/). The 25 px of a `FadeInRight`,\n// the 0.55/0.15/0.15/0.15 split of a bounce, the 5 radians of a `PinwheelIn`,\n// `SlideInUp` starting at `-windowHeight` where `SlideInDown` starts at\n// `targetOriginY + windowHeight` (upstream is asymmetric there, and this\n// mirrors it rather than tidying it) — all of it is quoted, not invented.\n//\n// WHAT IS NOT HERE, and why it is refused by name rather than approximated:\n// the twelve `Flip*` builders need `perspective` with `rotateX`/`rotateY`, and\n// the four `LightSpeed*` need `skewX`. This platform folds a transform array\n// into ONE 2D affine matrix (src/style/transform.ts, measured in\n// docs/research/transforms.md), which has no third axis to rotate about and\n// deliberately omits skew. See the refusals in index.tsx.\nimport { withSequence, withTiming } from \"./animation\"\nimport {\n AnimationBuilder,\n type BuiltLayoutAnimation,\n type LayoutAnimationValues,\n} from \"./layout-animation\"\n\n/** A constant, or a number derived from the rects the builder was handed. */\ntype Measure = number | ((values: LayoutAnimationValues) => number)\n\nconst measure = (value: Measure, values: LayoutAnimationValues): number =>\n typeof value === \"function\" ? value(values) : value\n\n/**\n * One animated property: where it starts, and where it goes.\n *\n * `to` is animated with the BUILDER's animation, so `.springify()`,\n * `.duration()` and `.easing()` all reach it. `steps` is an explicit timing\n * track — upstream writes the bounce curves as literal `withTiming`\n * sequences, and a spring has no way to express \"overshoot to 1.2, settle\n * through 0.9 and 1.1\" — where each step is a target plus the fraction of the\n * builder's duration it takes.\n */\ntype Track = {\n from: Measure\n to?: Measure\n steps?: readonly (readonly [Measure, number])[]\n}\n\n/**\n * The transform keys the catalogue uses, which are exactly the keys\n * src/style/transform.ts folds into its matrix. `rotate` is in DEGREES here:\n * upstream spells it `'-90deg'`/`'5rad'`, and a string cannot go through a\n * numeric animation — `parseAngle` reads a bare number as degrees, so the\n * matrix that reaches GTK is the same one either spelling produces.\n */\ntype TransformKey =\n \"translateX\" | \"translateY\" | \"scale\" | \"scaleX\" | \"scaleY\" | \"rotate\"\n\ntype TransformTrack = Track & { key: TransformKey }\n\ntype PresetSpec = {\n opacity?: Track\n /** `SlideIn*`/`SlideOut*`: the only presets that move the layout origin. */\n origin?: Track & { axis: \"x\" | \"y\" }\n transform?: readonly TransformTrack[]\n}\n\nconst EMPTY_SPEC: PresetSpec = {}\n\n/**\n * The one preset body. Every entry in the catalogue is an empty subclass of\n * this carrying its own {@link PresetSpec}.\n */\nexport class LayoutAnimationPreset extends AnimationBuilder {\n /**\n * Replaced by every generated subclass — see `definePreset`. A method\n * rather than a field so the two `.rotate()`-aware presets can compute\n * theirs from builder state that is only settled by the time `build()` runs.\n */\n protected spec(): PresetSpec {\n return EMPTY_SPEC\n }\n\n override build(): (values: LayoutAnimationValues) => BuiltLayoutAnimation {\n const spec = this.spec()\n const animate = this.animation()\n const delayMs = this.getDelay()\n const totalDuration = this.getDuration()\n const callback = this.callbackV\n const extra = this.initialValuesV\n\n const run = (track: Track, values: LayoutAnimationValues): unknown => {\n if (track.steps) {\n const specs = track.steps.map(([target, fraction]) =>\n withTiming(measure(target, values), {\n duration: totalDuration * fraction,\n }),\n )\n return this.delayed(\n delayMs,\n specs.length === 1 ? specs[0]! : withSequence(...specs),\n )\n }\n return this.delayed(\n delayMs,\n animate(measure(track.to ?? track.from, values)),\n )\n }\n\n return (values) => {\n const initialValues: Record<string, unknown> = {}\n const animations: Record<string, unknown> = {}\n\n if (spec.opacity) {\n initialValues.opacity = measure(spec.opacity.from, values)\n animations.opacity = run(spec.opacity, values)\n }\n if (spec.origin) {\n const key = spec.origin.axis === \"x\" ? \"originX\" : \"originY\"\n initialValues[key] = measure(spec.origin.from, values)\n animations[key] = run(spec.origin, values)\n }\n if (spec.transform) {\n // Both arrays are built from the same list in the same order, so a\n // slot's initial value and its animation always line up by index —\n // which is what the runtime's transform channel keys on.\n initialValues.transform = spec.transform.map((track) => ({\n [track.key]: measure(track.from, values),\n }))\n animations.transform = spec.transform.map((track) => ({\n [track.key]: run(track, values),\n }))\n }\n\n return {\n initialValues: { ...initialValues, ...extra },\n animations,\n callback,\n }\n }\n }\n}\n\n/**\n * Mints one catalogue entry. The class is empty apart from its spec, so\n * `entering={ZoomIn}` (the class) and `entering={ZoomIn.duration(400)}` (an\n * instance) both work through `AnimationBuilder`'s existing statics.\n */\nconst definePreset = (\n name: string,\n spec: PresetSpec,\n): typeof LayoutAnimationPreset => {\n const Preset = class extends LayoutAnimationPreset {\n protected override spec(): PresetSpec {\n return spec\n }\n }\n // So a stack trace, a devtools inspector and `Preset.name` all say\n // `ZoomInRotate` rather than the anonymous class expression above.\n Object.defineProperty(Preset, \"name\", { value: name })\n return Preset\n}\n\n// --- the numbers ---------------------------------------------------------\n\nconst windowWidth = (values: LayoutAnimationValues): number =>\n values.windowWidth\nconst negWindowWidth = (values: LayoutAnimationValues): number =>\n -values.windowWidth\nconst windowHeight = (values: LayoutAnimationValues): number =>\n values.windowHeight\nconst negWindowHeight = (values: LayoutAnimationValues): number =>\n -values.windowHeight\n\n/** Degrees, from upstream's radians. `'5rad'` is 286.479°. */\nconst rad = (turns: number): number => (turns * 180) / Math.PI\n\n// The distance a quarter-turn about the CENTRE moves a corner, which is what\n// `Rotate*` translates by so the view appears to pivot on that corner.\nconst targetPivot = (values: LayoutAnimationValues): number =>\n values.targetWidth / 2 - values.targetHeight / 2\nconst negTargetPivot = (values: LayoutAnimationValues): number =>\n -targetPivot(values)\nconst currentPivot = (values: LayoutAnimationValues): number =>\n values.currentWidth / 2 - values.currentHeight / 2\nconst negCurrentPivot = (values: LayoutAnimationValues): number =>\n -currentPivot(values)\n\nconst targetHeight = (values: LayoutAnimationValues): number =>\n values.targetHeight\nconst negTargetHeight = (values: LayoutAnimationValues): number =>\n -values.targetHeight\nconst currentHeight = (values: LayoutAnimationValues): number =>\n values.currentHeight\nconst negCurrentHeight = (values: LayoutAnimationValues): number =>\n -values.currentHeight\n\nconst fadeIn: Track = { from: 0, to: 1 }\nconst fadeOut: Track = { from: 1, to: 0 }\n\n// Upstream's bounce curve: a long overshoot, then two small corrections, then\n// the target — 55 % / 15 % / 15 % / 15 % of the duration. Entering runs it\n// forwards, exiting runs the corrections first and leaves last.\nconst bounceIn = (\n overshoot: number,\n back: number,\n settle: number,\n from: Measure,\n to: Measure = 0,\n): Track => ({\n from,\n steps: [\n [overshoot, 0.55],\n [back, 0.15],\n [settle, 0.15],\n [to, 0.15],\n ],\n})\n\nconst bounceOut = (\n first: number,\n second: number,\n third: number,\n to: Measure,\n from: Measure = 0,\n): Track => ({\n from,\n steps: [\n [first, 0.15],\n [second, 0.15],\n [third, 0.15],\n [to, 0.55],\n ],\n})\n\n// --- Fade ----------------------------------------------------------------\n\nexport const FadeInRight = definePreset(\"FadeInRight\", {\n opacity: fadeIn,\n transform: [{ key: \"translateX\", from: 25, to: 0 }],\n})\nexport const FadeInLeft = definePreset(\"FadeInLeft\", {\n opacity: fadeIn,\n transform: [{ key: \"translateX\", from: -25, to: 0 }],\n})\nexport const FadeInUp = definePreset(\"FadeInUp\", {\n opacity: fadeIn,\n transform: [{ key: \"translateY\", from: -25, to: 0 }],\n})\nexport const FadeInDown = definePreset(\"FadeInDown\", {\n opacity: fadeIn,\n transform: [{ key: \"translateY\", from: 25, to: 0 }],\n})\nexport const FadeOutRight = definePreset(\"FadeOutRight\", {\n opacity: fadeOut,\n transform: [{ key: \"translateX\", from: 0, to: 25 }],\n})\nexport const FadeOutLeft = definePreset(\"FadeOutLeft\", {\n opacity: fadeOut,\n transform: [{ key: \"translateX\", from: 0, to: -25 }],\n})\nexport const FadeOutUp = definePreset(\"FadeOutUp\", {\n opacity: fadeOut,\n transform: [{ key: \"translateY\", from: 0, to: -25 }],\n})\nexport const FadeOutDown = definePreset(\"FadeOutDown\", {\n opacity: fadeOut,\n transform: [{ key: \"translateY\", from: 0, to: 25 }],\n})\n\n// --- Bounce --------------------------------------------------------------\n\nexport const BounceIn = definePreset(\"BounceIn\", {\n transform: [{ key: \"scale\", ...bounceIn(1.2, 0.9, 1.1, 0, 1) }],\n})\nexport const BounceInDown = definePreset(\"BounceInDown\", {\n transform: [{ key: \"translateY\", ...bounceIn(-20, 10, -10, windowHeight) }],\n})\nexport const BounceInUp = definePreset(\"BounceInUp\", {\n transform: [{ key: \"translateY\", ...bounceIn(20, -10, 10, negWindowHeight) }],\n})\nexport const BounceInLeft = definePreset(\"BounceInLeft\", {\n transform: [{ key: \"translateX\", ...bounceIn(20, -10, 10, negWindowWidth) }],\n})\nexport const BounceInRight = definePreset(\"BounceInRight\", {\n transform: [{ key: \"translateX\", ...bounceIn(-20, 10, -10, windowWidth) }],\n})\nexport const BounceOut = definePreset(\"BounceOut\", {\n transform: [{ key: \"scale\", ...bounceOut(1.1, 0.9, 1.2, 0, 1) }],\n})\nexport const BounceOutDown = definePreset(\"BounceOutDown\", {\n transform: [{ key: \"translateY\", ...bounceOut(-10, 10, -20, windowHeight) }],\n})\nexport const BounceOutUp = definePreset(\"BounceOutUp\", {\n transform: [\n { key: \"translateY\", ...bounceOut(10, -10, 20, negWindowHeight) },\n ],\n})\nexport const BounceOutLeft = definePreset(\"BounceOutLeft\", {\n transform: [{ key: \"translateX\", ...bounceOut(10, -10, 20, negWindowWidth) }],\n})\nexport const BounceOutRight = definePreset(\"BounceOutRight\", {\n transform: [{ key: \"translateX\", ...bounceOut(-10, 10, -20, windowWidth) }],\n})\n\n// --- Pinwheel ------------------------------------------------------------\n\nexport const PinwheelIn = definePreset(\"PinwheelIn\", {\n opacity: fadeIn,\n transform: [\n { key: \"scale\", from: 0, to: 1 },\n { key: \"rotate\", from: rad(5), to: 0 },\n ],\n})\nexport const PinwheelOut = definePreset(\"PinwheelOut\", {\n opacity: fadeOut,\n transform: [\n { key: \"scale\", from: 1, to: 0 },\n { key: \"rotate\", from: 0, to: rad(5) },\n ],\n})\n\n// --- Roll ----------------------------------------------------------------\n\nexport const RollInLeft = definePreset(\"RollInLeft\", {\n transform: [\n { key: \"translateX\", from: negWindowWidth, to: 0 },\n { key: \"rotate\", from: -180, to: 0 },\n ],\n})\nexport const RollInRight = definePreset(\"RollInRight\", {\n transform: [\n { key: \"translateX\", from: windowWidth, to: 0 },\n { key: \"rotate\", from: 180, to: 0 },\n ],\n})\nexport const RollOutLeft = definePreset(\"RollOutLeft\", {\n transform: [\n { key: \"translateX\", from: 0, to: negWindowWidth },\n { key: \"rotate\", from: 0, to: -180 },\n ],\n})\nexport const RollOutRight = definePreset(\"RollOutRight\", {\n transform: [\n { key: \"translateX\", from: 0, to: windowWidth },\n { key: \"rotate\", from: 0, to: 180 },\n ],\n})\n\n// --- Rotate --------------------------------------------------------------\n\nexport const RotateInDownLeft = definePreset(\"RotateInDownLeft\", {\n opacity: fadeIn,\n transform: [\n { key: \"rotate\", from: -90, to: 0 },\n { key: \"translateX\", from: targetPivot, to: 0 },\n { key: \"translateY\", from: negTargetPivot, to: 0 },\n ],\n})\nexport const RotateInDownRight = definePreset(\"RotateInDownRight\", {\n opacity: fadeIn,\n transform: [\n { key: \"rotate\", from: 90, to: 0 },\n { key: \"translateX\", from: negTargetPivot, to: 0 },\n { key: \"translateY\", from: negTargetPivot, to: 0 },\n ],\n})\nexport const RotateInUpLeft = definePreset(\"RotateInUpLeft\", {\n opacity: fadeIn,\n transform: [\n { key: \"rotate\", from: 90, to: 0 },\n { key: \"translateX\", from: targetPivot, to: 0 },\n { key: \"translateY\", from: targetPivot, to: 0 },\n ],\n})\nexport const RotateInUpRight = definePreset(\"RotateInUpRight\", {\n opacity: fadeIn,\n transform: [\n { key: \"rotate\", from: -90, to: 0 },\n { key: \"translateX\", from: negTargetPivot, to: 0 },\n { key: \"translateY\", from: targetPivot, to: 0 },\n ],\n})\nexport const RotateOutDownLeft = definePreset(\"RotateOutDownLeft\", {\n opacity: fadeOut,\n transform: [\n { key: \"rotate\", from: 0, to: 90 },\n { key: \"translateX\", from: 0, to: currentPivot },\n { key: \"translateY\", from: 0, to: currentPivot },\n ],\n})\nexport const RotateOutDownRight = definePreset(\"RotateOutDownRight\", {\n opacity: fadeOut,\n transform: [\n { key: \"rotate\", from: 0, to: -90 },\n { key: \"translateX\", from: 0, to: negCurrentPivot },\n { key: \"translateY\", from: 0, to: currentPivot },\n ],\n})\nexport const RotateOutUpLeft = definePreset(\"RotateOutUpLeft\", {\n opacity: fadeOut,\n transform: [\n { key: \"rotate\", from: 0, to: -90 },\n { key: \"translateX\", from: 0, to: currentPivot },\n { key: \"translateY\", from: 0, to: negCurrentPivot },\n ],\n})\nexport const RotateOutUpRight = definePreset(\"RotateOutUpRight\", {\n opacity: fadeOut,\n transform: [\n { key: \"rotate\", from: 0, to: 90 },\n { key: \"translateX\", from: 0, to: negCurrentPivot },\n { key: \"translateY\", from: 0, to: negCurrentPivot },\n ],\n})\n\n// --- Slide ---------------------------------------------------------------\n//\n// The only presets that animate the layout ORIGIN rather than a transform,\n// and the runtime turns that into the same paint-only translation\n// `LinearTransition` gets. Upstream's own asymmetries are kept: `SlideInUp`\n// starts at `-windowHeight` flat while `SlideInDown` starts a window below\n// where the view landed, and the `SlideOut*` targets are clamped so a view\n// that already sits off-screen still leaves.\n\nexport const SlideInRight = definePreset(\"SlideInRight\", {\n origin: {\n axis: \"x\",\n from: (values) => values.targetOriginX + values.windowWidth,\n to: (values) => values.targetOriginX,\n },\n})\nexport const SlideInLeft = definePreset(\"SlideInLeft\", {\n origin: {\n axis: \"x\",\n from: (values) => values.targetOriginX - values.windowWidth,\n to: (values) => values.targetOriginX,\n },\n})\nexport const SlideOutRight = definePreset(\"SlideOutRight\", {\n origin: {\n axis: \"x\",\n from: (values) => values.currentOriginX,\n to: (values) =>\n Math.max(values.currentOriginX + values.windowWidth, values.windowWidth),\n },\n})\nexport const SlideOutLeft = definePreset(\"SlideOutLeft\", {\n origin: {\n axis: \"x\",\n from: (values) => values.currentOriginX,\n to: (values) =>\n Math.min(values.currentOriginX - values.windowWidth, -values.windowWidth),\n },\n})\nexport const SlideInUp = definePreset(\"SlideInUp\", {\n origin: {\n axis: \"y\",\n from: negWindowHeight,\n to: (values) => values.targetOriginY,\n },\n})\nexport const SlideInDown = definePreset(\"SlideInDown\", {\n origin: {\n axis: \"y\",\n from: (values) => values.targetOriginY + values.windowHeight,\n to: (values) => values.targetOriginY,\n },\n})\nexport const SlideOutUp = definePreset(\"SlideOutUp\", {\n origin: {\n axis: \"y\",\n from: (values) => values.currentOriginY,\n to: (values) =>\n Math.min(\n values.currentOriginY - values.windowHeight,\n -values.windowHeight,\n ),\n },\n})\nexport const SlideOutDown = definePreset(\"SlideOutDown\", {\n origin: {\n axis: \"y\",\n from: (values) => values.currentOriginY,\n to: (values) =>\n Math.max(\n values.currentOriginY + values.windowHeight,\n values.windowHeight,\n ),\n },\n})\n\n// --- Stretch -------------------------------------------------------------\n\nexport const StretchInX = definePreset(\"StretchInX\", {\n transform: [{ key: \"scaleX\", from: 0, to: 1 }],\n})\nexport const StretchInY = definePreset(\"StretchInY\", {\n transform: [{ key: \"scaleY\", from: 0, to: 1 }],\n})\nexport const StretchOutX = definePreset(\"StretchOutX\", {\n transform: [{ key: \"scaleX\", from: 1, to: 0 }],\n})\nexport const StretchOutY = definePreset(\"StretchOutY\", {\n transform: [{ key: \"scaleY\", from: 1, to: 0 }],\n})\n\n// --- Zoom ----------------------------------------------------------------\n\nexport const ZoomIn = definePreset(\"ZoomIn\", {\n transform: [{ key: \"scale\", from: 0, to: 1 }],\n})\nexport const ZoomInLeft = definePreset(\"ZoomInLeft\", {\n transform: [\n { key: \"translateX\", from: negWindowWidth, to: 0 },\n { key: \"scale\", from: 0, to: 1 },\n ],\n})\nexport const ZoomInRight = definePreset(\"ZoomInRight\", {\n transform: [\n { key: \"translateX\", from: windowWidth, to: 0 },\n { key: \"scale\", from: 0, to: 1 },\n ],\n})\nexport const ZoomInUp = definePreset(\"ZoomInUp\", {\n transform: [\n { key: \"translateY\", from: negWindowHeight, to: 0 },\n { key: \"scale\", from: 0, to: 1 },\n ],\n})\nexport const ZoomInDown = definePreset(\"ZoomInDown\", {\n transform: [\n { key: \"translateY\", from: windowHeight, to: 0 },\n { key: \"scale\", from: 0, to: 1 },\n ],\n})\nexport const ZoomInEasyUp = definePreset(\"ZoomInEasyUp\", {\n transform: [\n { key: \"translateY\", from: negTargetHeight, to: 0 },\n { key: \"scale\", from: 0, to: 1 },\n ],\n})\nexport const ZoomInEasyDown = definePreset(\"ZoomInEasyDown\", {\n transform: [\n { key: \"translateY\", from: targetHeight, to: 0 },\n { key: \"scale\", from: 0, to: 1 },\n ],\n})\nexport const ZoomOut = definePreset(\"ZoomOut\", {\n transform: [{ key: \"scale\", from: 1, to: 0 }],\n})\nexport const ZoomOutLeft = definePreset(\"ZoomOutLeft\", {\n transform: [\n { key: \"translateX\", from: 0, to: negWindowWidth },\n { key: \"scale\", from: 1, to: 0 },\n ],\n})\nexport const ZoomOutRight = definePreset(\"ZoomOutRight\", {\n transform: [\n { key: \"translateX\", from: 0, to: windowWidth },\n { key: \"scale\", from: 1, to: 0 },\n ],\n})\nexport const ZoomOutUp = definePreset(\"ZoomOutUp\", {\n transform: [\n { key: \"translateY\", from: 0, to: negWindowHeight },\n { key: \"scale\", from: 1, to: 0 },\n ],\n})\nexport const ZoomOutDown = definePreset(\"ZoomOutDown\", {\n transform: [\n { key: \"translateY\", from: 0, to: windowHeight },\n { key: \"scale\", from: 1, to: 0 },\n ],\n})\nexport const ZoomOutEasyUp = definePreset(\"ZoomOutEasyUp\", {\n transform: [\n { key: \"translateY\", from: 0, to: negCurrentHeight },\n { key: \"scale\", from: 1, to: 0 },\n ],\n})\nexport const ZoomOutEasyDown = definePreset(\"ZoomOutEasyDown\", {\n transform: [\n { key: \"translateY\", from: 0, to: currentHeight },\n { key: \"scale\", from: 1, to: 0 },\n ],\n})\n\n// The two that read `.rotate()`, which is why they are classes of their own\n// rather than table entries: the angle is a builder parameter, so the spec\n// cannot be frozen at definition time.\n\n/** `ZoomIn` with a spin. `.rotate()` sets the angle; upstream's default is 0.3 rad. */\nexport class ZoomInRotate extends LayoutAnimationPreset {\n protected override spec(): PresetSpec {\n return {\n transform: [\n { key: \"scale\", from: 0, to: 1 },\n { key: \"rotate\", from: this.getRotationDegrees(rad(0.3)), to: 0 },\n ],\n }\n }\n}\n\n/** `ZoomOut` with a spin. `.rotate()` sets the angle; upstream's default is 0.3 rad. */\nexport class ZoomOutRotate extends LayoutAnimationPreset {\n protected override spec(): PresetSpec {\n return {\n transform: [\n { key: \"scale\", from: 1, to: 0 },\n { key: \"rotate\", from: 0, to: this.getRotationDegrees(rad(0.3)) },\n ],\n }\n }\n}\n"]}
@@ -0,0 +1,21 @@
1
+ import type { Gtk } from "../gtkx/bridge/index";
2
+ import { type AnimationEngine } from "./animation";
3
+ import type { BuiltLayoutAnimation, LayoutAnimationValues } from "./layout-animation";
4
+ export type LayoutAnimationTarget = {
5
+ widget: Gtk.Widget;
6
+ parentWidget: Gtk.Widget | null;
7
+ };
8
+ export type RunningLayoutAnimation = {
9
+ /** Cuts the animation short. The callback still fires, with `false`. */
10
+ stop(): void;
11
+ };
12
+ /** @internal Test seam: the warning is once per property per session. */
13
+ export declare const resetLayoutAnimationWarnings: () => void;
14
+ /**
15
+ * Runs one built config against one widget.
16
+ *
17
+ * `values` is what the builder was handed, and the runtime needs it back:
18
+ * `originX`/`originY` animate towards `target*`, so the offset to write is
19
+ * the driven value minus that target.
20
+ */
21
+ export declare const runLayoutAnimation: (engine: AnimationEngine, target: LayoutAnimationTarget, config: BuiltLayoutAnimation, values: LayoutAnimationValues, onEnd?: (finished: boolean) => void) => RunningLayoutAnimation;