@wardic/solid 0.0.0-stage → 1.0.0-rc.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 (994) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +26 -2
  3. package/THIRD_PARTY_NOTICES.md +145 -0
  4. package/dist/browser/animation-controls.js +150 -0
  5. package/dist/browser/animation-controls.js.map +1 -0
  6. package/dist/browser/animation-frame.js +29 -0
  7. package/dist/browser/animation-frame.js.map +1 -0
  8. package/dist/browser/appear.js +727 -0
  9. package/dist/browser/appear.js.map +1 -0
  10. package/dist/browser/arc.js +21 -0
  11. package/dist/browser/arc.js.map +1 -0
  12. package/dist/browser/bridge.js +69 -0
  13. package/dist/browser/bridge.js.map +1 -0
  14. package/dist/browser/complete.js +30 -0
  15. package/dist/browser/complete.js.map +1 -0
  16. package/dist/browser/config.js +2 -0
  17. package/dist/browser/config.js.map +1 -0
  18. package/dist/browser/create-animate.js +41 -0
  19. package/dist/browser/create-animate.js.map +1 -0
  20. package/dist/browser/create-ward.js +1001 -0
  21. package/dist/browser/create-ward.js.map +1 -0
  22. package/dist/browser/cycle-index.js +17 -0
  23. package/dist/browser/cycle-index.js.map +1 -0
  24. package/dist/browser/cycle.js +31 -0
  25. package/dist/browser/cycle.js.map +1 -0
  26. package/dist/browser/directive.js +80 -0
  27. package/dist/browser/directive.js.map +1 -0
  28. package/dist/browser/drag-constraints.js +76 -0
  29. package/dist/browser/drag-constraints.js.map +1 -0
  30. package/dist/browser/drag-controls.js +51 -0
  31. package/dist/browser/drag-controls.js.map +1 -0
  32. package/dist/browser/drag-samples.js +40 -0
  33. package/dist/browser/drag-samples.js.map +1 -0
  34. package/dist/browser/drag-sensor.js +35 -0
  35. package/dist/browser/drag-sensor.js.map +1 -0
  36. package/dist/browser/drag-track.js +817 -0
  37. package/dist/browser/drag-track.js.map +1 -0
  38. package/dist/browser/drag-transition.js +56 -0
  39. package/dist/browser/drag-transition.js.map +1 -0
  40. package/dist/browser/drag.js +44 -0
  41. package/dist/browser/drag.js.map +1 -0
  42. package/dist/browser/element-style.js +67 -0
  43. package/dist/browser/element-style.js.map +1 -0
  44. package/dist/browser/element.js +353 -0
  45. package/dist/browser/element.js.map +1 -0
  46. package/dist/browser/feature-section.js +17 -0
  47. package/dist/browser/feature-section.js.map +1 -0
  48. package/dist/browser/feature.js +261 -0
  49. package/dist/browser/feature.js.map +1 -0
  50. package/dist/browser/features/all.js +10 -0
  51. package/dist/browser/features/all.js.map +1 -0
  52. package/dist/browser/features/colors.js +33 -0
  53. package/dist/browser/features/colors.js.map +1 -0
  54. package/dist/browser/features/dom-animation.js +7 -0
  55. package/dist/browser/features/dom-animation.js.map +1 -0
  56. package/dist/browser/features/dom-max.js +4 -0
  57. package/dist/browser/features/dom-max.js.map +1 -0
  58. package/dist/browser/features/drag.js +28 -0
  59. package/dist/browser/features/drag.js.map +1 -0
  60. package/dist/browser/features/focus.js +18 -0
  61. package/dist/browser/features/focus.js.map +1 -0
  62. package/dist/browser/features/hover.js +18 -0
  63. package/dist/browser/features/hover.js.map +1 -0
  64. package/dist/browser/features/in-view.js +18 -0
  65. package/dist/browser/features/in-view.js.map +1 -0
  66. package/dist/browser/features/input.js +30 -0
  67. package/dist/browser/features/input.js.map +1 -0
  68. package/dist/browser/features/keys.js +19 -0
  69. package/dist/browser/features/keys.js.map +1 -0
  70. package/dist/browser/features/layout.js +33 -0
  71. package/dist/browser/features/layout.js.map +1 -0
  72. package/dist/browser/features/pan.js +18 -0
  73. package/dist/browser/features/pan.js.map +1 -0
  74. package/dist/browser/features/press.js +12 -0
  75. package/dist/browser/features/press.js.map +1 -0
  76. package/dist/browser/focus-sensor.js +23 -0
  77. package/dist/browser/focus-sensor.js.map +1 -0
  78. package/dist/browser/frame-time.js +40 -0
  79. package/dist/browser/frame-time.js.map +1 -0
  80. package/dist/browser/gesture-callbacks.js +172 -0
  81. package/dist/browser/gesture-callbacks.js.map +1 -0
  82. package/dist/browser/gesture-features.js +29 -0
  83. package/dist/browser/gesture-features.js.map +1 -0
  84. package/dist/browser/gesture-info.js +43 -0
  85. package/dist/browser/gesture-info.js.map +1 -0
  86. package/dist/browser/hover-sensor.js +29 -0
  87. package/dist/browser/hover-sensor.js.map +1 -0
  88. package/dist/browser/imperative.js +614 -0
  89. package/dist/browser/imperative.js.map +1 -0
  90. package/dist/browser/index.js +165 -0
  91. package/dist/browser/index.js.map +1 -0
  92. package/dist/browser/instant.js +51 -0
  93. package/dist/browser/instant.js.map +1 -0
  94. package/dist/browser/layout-group.js +27 -0
  95. package/dist/browser/layout-group.js.map +1 -0
  96. package/dist/browser/layout-member.js +362 -0
  97. package/dist/browser/layout-member.js.map +1 -0
  98. package/dist/browser/layout-projection.js +19 -0
  99. package/dist/browser/layout-projection.js.map +1 -0
  100. package/dist/browser/layout.js +91 -0
  101. package/dist/browser/layout.js.map +1 -0
  102. package/dist/browser/live-style.js +313 -0
  103. package/dist/browser/live-style.js.map +1 -0
  104. package/dist/browser/live-value.js +252 -0
  105. package/dist/browser/live-value.js.map +1 -0
  106. package/dist/browser/motion-props.js +172 -0
  107. package/dist/browser/motion-props.js.map +1 -0
  108. package/dist/browser/owner-scope.js +29 -0
  109. package/dist/browser/owner-scope.js.map +1 -0
  110. package/dist/browser/page-point.js +92 -0
  111. package/dist/browser/page-point.js.map +1 -0
  112. package/dist/browser/presence-controller.js +1324 -0
  113. package/dist/browser/presence-controller.js.map +1 -0
  114. package/dist/browser/presence-record.js +27 -0
  115. package/dist/browser/presence-record.js.map +1 -0
  116. package/dist/browser/presence.js +207 -0
  117. package/dist/browser/presence.js.map +1 -0
  118. package/dist/browser/press-sensor.js +30 -0
  119. package/dist/browser/press-sensor.js.map +1 -0
  120. package/dist/browser/press.js +24 -0
  121. package/dist/browser/press.js.map +1 -0
  122. package/dist/browser/provider.js +445 -0
  123. package/dist/browser/provider.js.map +1 -0
  124. package/dist/browser/reactivity.js +9 -0
  125. package/dist/browser/reactivity.js.map +1 -0
  126. package/dist/browser/reorder-input.js +46 -0
  127. package/dist/browser/reorder-input.js.map +1 -0
  128. package/dist/browser/reorder.js +543 -0
  129. package/dist/browser/reorder.js.map +1 -0
  130. package/dist/browser/retarget-legs.js +1019 -0
  131. package/dist/browser/retarget-legs.js.map +1 -0
  132. package/dist/browser/runtime.js +249 -0
  133. package/dist/browser/runtime.js.map +1 -0
  134. package/dist/browser/sensors.js +172 -0
  135. package/dist/browser/sensors.js.map +1 -0
  136. package/dist/browser/server-interpolators.js +20 -0
  137. package/dist/browser/server-interpolators.js.map +1 -0
  138. package/dist/browser/server.js +20 -0
  139. package/dist/browser/server.js.map +1 -0
  140. package/dist/browser/solid-reactivity.js +26 -0
  141. package/dist/browser/solid-reactivity.js.map +1 -0
  142. package/dist/browser/spine.js +2939 -0
  143. package/dist/browser/spine.js.map +1 -0
  144. package/dist/browser/stagger.js +13 -0
  145. package/dist/browser/stagger.js.map +1 -0
  146. package/dist/browser/unstable/v2/bridge.js +76 -0
  147. package/dist/browser/unstable/v2/bridge.js.map +1 -0
  148. package/dist/browser/unstable/v2/complete.js +29 -0
  149. package/dist/browser/unstable/v2/complete.js.map +1 -0
  150. package/dist/browser/unstable/v2/config-view.js +111 -0
  151. package/dist/browser/unstable/v2/config-view.js.map +1 -0
  152. package/dist/browser/unstable/v2/create-animate.js +102 -0
  153. package/dist/browser/unstable/v2/create-animate.js.map +1 -0
  154. package/dist/browser/unstable/v2/cycle.js +30 -0
  155. package/dist/browser/unstable/v2/cycle.js.map +1 -0
  156. package/dist/browser/unstable/v2/drag-sensor.js +34 -0
  157. package/dist/browser/unstable/v2/drag-sensor.js.map +1 -0
  158. package/dist/browser/unstable/v2/element.js +393 -0
  159. package/dist/browser/unstable/v2/element.js.map +1 -0
  160. package/dist/browser/unstable/v2/feature-section.js +27 -0
  161. package/dist/browser/unstable/v2/feature-section.js.map +1 -0
  162. package/dist/browser/unstable/v2/focus-sensor.js +23 -0
  163. package/dist/browser/unstable/v2/focus-sensor.js.map +1 -0
  164. package/dist/browser/unstable/v2/hover-sensor.js +28 -0
  165. package/dist/browser/unstable/v2/hover-sensor.js.map +1 -0
  166. package/dist/browser/unstable/v2/index.js +114 -0
  167. package/dist/browser/unstable/v2/index.js.map +1 -0
  168. package/dist/browser/unstable/v2/layout-projection.js +18 -0
  169. package/dist/browser/unstable/v2/layout-projection.js.map +1 -0
  170. package/dist/browser/unstable/v2/layout.js +71 -0
  171. package/dist/browser/unstable/v2/layout.js.map +1 -0
  172. package/dist/browser/unstable/v2/lifecycle.js +455 -0
  173. package/dist/browser/unstable/v2/lifecycle.js.map +1 -0
  174. package/dist/browser/unstable/v2/live-value.js +264 -0
  175. package/dist/browser/unstable/v2/live-value.js.map +1 -0
  176. package/dist/browser/unstable/v2/presence-handle.js +146 -0
  177. package/dist/browser/unstable/v2/presence-handle.js.map +1 -0
  178. package/dist/browser/unstable/v2/presence-hooks.js +142 -0
  179. package/dist/browser/unstable/v2/presence-hooks.js.map +1 -0
  180. package/dist/browser/unstable/v2/presence.js +124 -0
  181. package/dist/browser/unstable/v2/presence.js.map +1 -0
  182. package/dist/browser/unstable/v2/press-sensor.js +29 -0
  183. package/dist/browser/unstable/v2/press-sensor.js.map +1 -0
  184. package/dist/browser/unstable/v2/provider.js +457 -0
  185. package/dist/browser/unstable/v2/provider.js.map +1 -0
  186. package/dist/browser/unstable/v2/reorder.js +663 -0
  187. package/dist/browser/unstable/v2/reorder.js.map +1 -0
  188. package/dist/browser/unstable/v2/sensors.js +138 -0
  189. package/dist/browser/unstable/v2/sensors.js.map +1 -0
  190. package/dist/browser/unstable/v2/solid-reactivity.js +82 -0
  191. package/dist/browser/unstable/v2/solid-reactivity.js.map +1 -0
  192. package/dist/browser/unstable/v2/variant-node.js +395 -0
  193. package/dist/browser/unstable/v2/variant-node.js.map +1 -0
  194. package/dist/browser/unstable/v2/w.js +23 -0
  195. package/dist/browser/unstable/v2/w.js.map +1 -0
  196. package/dist/browser/unstable/v2/waiters.js +185 -0
  197. package/dist/browser/unstable/v2/waiters.js.map +1 -0
  198. package/dist/browser/unstable/v2/ward.js +1620 -0
  199. package/dist/browser/unstable/v2/ward.js.map +1 -0
  200. package/dist/browser/unstable/v2/wardic-config.js +40 -0
  201. package/dist/browser/unstable/v2/wardic-config.js.map +1 -0
  202. package/dist/browser/unstable/v2/wardic.js +16 -0
  203. package/dist/browser/unstable/v2/wardic.js.map +1 -0
  204. package/dist/browser/variant-node.js +308 -0
  205. package/dist/browser/variant-node.js.map +1 -0
  206. package/dist/browser/variant-target.js +224 -0
  207. package/dist/browser/variant-target.js.map +1 -0
  208. package/dist/browser/variant-tree.js +394 -0
  209. package/dist/browser/variant-tree.js.map +1 -0
  210. package/dist/browser/variants.js +43 -0
  211. package/dist/browser/variants.js.map +1 -0
  212. package/dist/browser/w.js +25 -0
  213. package/dist/browser/w.js.map +1 -0
  214. package/dist/browser/ward-keys.js +2 -0
  215. package/dist/browser/ward-keys.js.map +1 -0
  216. package/dist/browser/wardic-component.js +74 -0
  217. package/dist/browser/wardic-component.js.map +1 -0
  218. package/dist/browser/wardic-config-value.js +91 -0
  219. package/dist/browser/wardic-config-value.js.map +1 -0
  220. package/dist/browser/wardic-config.js +42 -0
  221. package/dist/browser/wardic-config.js.map +1 -0
  222. package/dist/browser/wardic.js +31 -0
  223. package/dist/browser/wardic.js.map +1 -0
  224. package/dist/server/animation-controls.js +150 -0
  225. package/dist/server/animation-controls.js.map +1 -0
  226. package/dist/server/animation-frame.js +29 -0
  227. package/dist/server/animation-frame.js.map +1 -0
  228. package/dist/server/appear.js +727 -0
  229. package/dist/server/appear.js.map +1 -0
  230. package/dist/server/arc.js +21 -0
  231. package/dist/server/arc.js.map +1 -0
  232. package/dist/server/bridge.js +69 -0
  233. package/dist/server/bridge.js.map +1 -0
  234. package/dist/server/complete.js +30 -0
  235. package/dist/server/complete.js.map +1 -0
  236. package/dist/server/config.js +2 -0
  237. package/dist/server/config.js.map +1 -0
  238. package/dist/server/create-animate.js +41 -0
  239. package/dist/server/create-animate.js.map +1 -0
  240. package/dist/server/create-ward.js +1001 -0
  241. package/dist/server/create-ward.js.map +1 -0
  242. package/dist/server/cycle-index.js +17 -0
  243. package/dist/server/cycle-index.js.map +1 -0
  244. package/dist/server/cycle.js +31 -0
  245. package/dist/server/cycle.js.map +1 -0
  246. package/dist/server/directive.js +80 -0
  247. package/dist/server/directive.js.map +1 -0
  248. package/dist/server/drag-constraints.js +76 -0
  249. package/dist/server/drag-constraints.js.map +1 -0
  250. package/dist/server/drag-controls.js +51 -0
  251. package/dist/server/drag-controls.js.map +1 -0
  252. package/dist/server/drag-samples.js +40 -0
  253. package/dist/server/drag-samples.js.map +1 -0
  254. package/dist/server/drag-sensor.js +35 -0
  255. package/dist/server/drag-sensor.js.map +1 -0
  256. package/dist/server/drag-track.js +817 -0
  257. package/dist/server/drag-track.js.map +1 -0
  258. package/dist/server/drag-transition.js +56 -0
  259. package/dist/server/drag-transition.js.map +1 -0
  260. package/dist/server/drag.js +44 -0
  261. package/dist/server/drag.js.map +1 -0
  262. package/dist/server/element-style.js +67 -0
  263. package/dist/server/element-style.js.map +1 -0
  264. package/dist/server/element.js +353 -0
  265. package/dist/server/element.js.map +1 -0
  266. package/dist/server/feature-section.js +17 -0
  267. package/dist/server/feature-section.js.map +1 -0
  268. package/dist/server/feature.js +261 -0
  269. package/dist/server/feature.js.map +1 -0
  270. package/dist/server/features/all.js +10 -0
  271. package/dist/server/features/all.js.map +1 -0
  272. package/dist/server/features/colors.js +33 -0
  273. package/dist/server/features/colors.js.map +1 -0
  274. package/dist/server/features/dom-animation.js +7 -0
  275. package/dist/server/features/dom-animation.js.map +1 -0
  276. package/dist/server/features/dom-max.js +4 -0
  277. package/dist/server/features/dom-max.js.map +1 -0
  278. package/dist/server/features/drag.js +28 -0
  279. package/dist/server/features/drag.js.map +1 -0
  280. package/dist/server/features/focus.js +18 -0
  281. package/dist/server/features/focus.js.map +1 -0
  282. package/dist/server/features/hover.js +18 -0
  283. package/dist/server/features/hover.js.map +1 -0
  284. package/dist/server/features/in-view.js +18 -0
  285. package/dist/server/features/in-view.js.map +1 -0
  286. package/dist/server/features/input.js +30 -0
  287. package/dist/server/features/input.js.map +1 -0
  288. package/dist/server/features/keys.js +19 -0
  289. package/dist/server/features/keys.js.map +1 -0
  290. package/dist/server/features/layout.js +33 -0
  291. package/dist/server/features/layout.js.map +1 -0
  292. package/dist/server/features/pan.js +18 -0
  293. package/dist/server/features/pan.js.map +1 -0
  294. package/dist/server/features/press.js +12 -0
  295. package/dist/server/features/press.js.map +1 -0
  296. package/dist/server/focus-sensor.js +23 -0
  297. package/dist/server/focus-sensor.js.map +1 -0
  298. package/dist/server/frame-time.js +40 -0
  299. package/dist/server/frame-time.js.map +1 -0
  300. package/dist/server/gesture-callbacks.js +172 -0
  301. package/dist/server/gesture-callbacks.js.map +1 -0
  302. package/dist/server/gesture-features.js +29 -0
  303. package/dist/server/gesture-features.js.map +1 -0
  304. package/dist/server/gesture-info.js +43 -0
  305. package/dist/server/gesture-info.js.map +1 -0
  306. package/dist/server/hover-sensor.js +29 -0
  307. package/dist/server/hover-sensor.js.map +1 -0
  308. package/dist/server/imperative.js +614 -0
  309. package/dist/server/imperative.js.map +1 -0
  310. package/dist/server/index.js +165 -0
  311. package/dist/server/index.js.map +1 -0
  312. package/dist/server/instant.js +51 -0
  313. package/dist/server/instant.js.map +1 -0
  314. package/dist/server/layout-group.js +27 -0
  315. package/dist/server/layout-group.js.map +1 -0
  316. package/dist/server/layout-member.js +362 -0
  317. package/dist/server/layout-member.js.map +1 -0
  318. package/dist/server/layout-projection.js +19 -0
  319. package/dist/server/layout-projection.js.map +1 -0
  320. package/dist/server/layout.js +90 -0
  321. package/dist/server/layout.js.map +1 -0
  322. package/dist/server/live-style.js +313 -0
  323. package/dist/server/live-style.js.map +1 -0
  324. package/dist/server/live-value.js +252 -0
  325. package/dist/server/live-value.js.map +1 -0
  326. package/dist/server/motion-props.js +172 -0
  327. package/dist/server/motion-props.js.map +1 -0
  328. package/dist/server/owner-scope.js +29 -0
  329. package/dist/server/owner-scope.js.map +1 -0
  330. package/dist/server/page-point.js +92 -0
  331. package/dist/server/page-point.js.map +1 -0
  332. package/dist/server/presence-controller.js +1324 -0
  333. package/dist/server/presence-controller.js.map +1 -0
  334. package/dist/server/presence-record.js +27 -0
  335. package/dist/server/presence-record.js.map +1 -0
  336. package/dist/server/presence.js +207 -0
  337. package/dist/server/presence.js.map +1 -0
  338. package/dist/server/press-sensor.js +30 -0
  339. package/dist/server/press-sensor.js.map +1 -0
  340. package/dist/server/press.js +24 -0
  341. package/dist/server/press.js.map +1 -0
  342. package/dist/server/provider.js +439 -0
  343. package/dist/server/provider.js.map +1 -0
  344. package/dist/server/reactivity.js +9 -0
  345. package/dist/server/reactivity.js.map +1 -0
  346. package/dist/server/reorder-input.js +46 -0
  347. package/dist/server/reorder-input.js.map +1 -0
  348. package/dist/server/reorder.js +543 -0
  349. package/dist/server/reorder.js.map +1 -0
  350. package/dist/server/retarget-legs.js +1019 -0
  351. package/dist/server/retarget-legs.js.map +1 -0
  352. package/dist/server/runtime.js +249 -0
  353. package/dist/server/runtime.js.map +1 -0
  354. package/dist/server/sensors.js +172 -0
  355. package/dist/server/sensors.js.map +1 -0
  356. package/dist/server/server-interpolators.js +20 -0
  357. package/dist/server/server-interpolators.js.map +1 -0
  358. package/dist/server/server.js +20 -0
  359. package/dist/server/server.js.map +1 -0
  360. package/dist/server/solid-reactivity.js +26 -0
  361. package/dist/server/solid-reactivity.js.map +1 -0
  362. package/dist/server/spine.js +2939 -0
  363. package/dist/server/spine.js.map +1 -0
  364. package/dist/server/stagger.js +13 -0
  365. package/dist/server/stagger.js.map +1 -0
  366. package/dist/server/unstable/v2/bridge.js +76 -0
  367. package/dist/server/unstable/v2/bridge.js.map +1 -0
  368. package/dist/server/unstable/v2/complete.js +29 -0
  369. package/dist/server/unstable/v2/complete.js.map +1 -0
  370. package/dist/server/unstable/v2/config-view.js +111 -0
  371. package/dist/server/unstable/v2/config-view.js.map +1 -0
  372. package/dist/server/unstable/v2/create-animate.js +102 -0
  373. package/dist/server/unstable/v2/create-animate.js.map +1 -0
  374. package/dist/server/unstable/v2/cycle.js +30 -0
  375. package/dist/server/unstable/v2/cycle.js.map +1 -0
  376. package/dist/server/unstable/v2/drag-sensor.js +34 -0
  377. package/dist/server/unstable/v2/drag-sensor.js.map +1 -0
  378. package/dist/server/unstable/v2/element.js +402 -0
  379. package/dist/server/unstable/v2/element.js.map +1 -0
  380. package/dist/server/unstable/v2/feature-section.js +27 -0
  381. package/dist/server/unstable/v2/feature-section.js.map +1 -0
  382. package/dist/server/unstable/v2/focus-sensor.js +23 -0
  383. package/dist/server/unstable/v2/focus-sensor.js.map +1 -0
  384. package/dist/server/unstable/v2/hover-sensor.js +28 -0
  385. package/dist/server/unstable/v2/hover-sensor.js.map +1 -0
  386. package/dist/server/unstable/v2/index.js +114 -0
  387. package/dist/server/unstable/v2/index.js.map +1 -0
  388. package/dist/server/unstable/v2/layout-projection.js +18 -0
  389. package/dist/server/unstable/v2/layout-projection.js.map +1 -0
  390. package/dist/server/unstable/v2/layout.js +88 -0
  391. package/dist/server/unstable/v2/layout.js.map +1 -0
  392. package/dist/server/unstable/v2/lifecycle.js +455 -0
  393. package/dist/server/unstable/v2/lifecycle.js.map +1 -0
  394. package/dist/server/unstable/v2/live-value.js +264 -0
  395. package/dist/server/unstable/v2/live-value.js.map +1 -0
  396. package/dist/server/unstable/v2/presence-handle.js +146 -0
  397. package/dist/server/unstable/v2/presence-handle.js.map +1 -0
  398. package/dist/server/unstable/v2/presence-hooks.js +142 -0
  399. package/dist/server/unstable/v2/presence-hooks.js.map +1 -0
  400. package/dist/server/unstable/v2/presence.js +142 -0
  401. package/dist/server/unstable/v2/presence.js.map +1 -0
  402. package/dist/server/unstable/v2/press-sensor.js +29 -0
  403. package/dist/server/unstable/v2/press-sensor.js.map +1 -0
  404. package/dist/server/unstable/v2/provider.js +475 -0
  405. package/dist/server/unstable/v2/provider.js.map +1 -0
  406. package/dist/server/unstable/v2/reorder.js +733 -0
  407. package/dist/server/unstable/v2/reorder.js.map +1 -0
  408. package/dist/server/unstable/v2/sensors.js +138 -0
  409. package/dist/server/unstable/v2/sensors.js.map +1 -0
  410. package/dist/server/unstable/v2/solid-reactivity.js +82 -0
  411. package/dist/server/unstable/v2/solid-reactivity.js.map +1 -0
  412. package/dist/server/unstable/v2/variant-node.js +395 -0
  413. package/dist/server/unstable/v2/variant-node.js.map +1 -0
  414. package/dist/server/unstable/v2/w.js +23 -0
  415. package/dist/server/unstable/v2/w.js.map +1 -0
  416. package/dist/server/unstable/v2/waiters.js +185 -0
  417. package/dist/server/unstable/v2/waiters.js.map +1 -0
  418. package/dist/server/unstable/v2/ward.js +1653 -0
  419. package/dist/server/unstable/v2/ward.js.map +1 -0
  420. package/dist/server/unstable/v2/wardic-config.js +49 -0
  421. package/dist/server/unstable/v2/wardic-config.js.map +1 -0
  422. package/dist/server/unstable/v2/wardic.js +16 -0
  423. package/dist/server/unstable/v2/wardic.js.map +1 -0
  424. package/dist/server/variant-node.js +308 -0
  425. package/dist/server/variant-node.js.map +1 -0
  426. package/dist/server/variant-target.js +224 -0
  427. package/dist/server/variant-target.js.map +1 -0
  428. package/dist/server/variant-tree.js +394 -0
  429. package/dist/server/variant-tree.js.map +1 -0
  430. package/dist/server/variants.js +43 -0
  431. package/dist/server/variants.js.map +1 -0
  432. package/dist/server/w.js +25 -0
  433. package/dist/server/w.js.map +1 -0
  434. package/dist/server/ward-keys.js +2 -0
  435. package/dist/server/ward-keys.js.map +1 -0
  436. package/dist/server/wardic-component.js +74 -0
  437. package/dist/server/wardic-component.js.map +1 -0
  438. package/dist/server/wardic-config-value.js +91 -0
  439. package/dist/server/wardic-config-value.js.map +1 -0
  440. package/dist/server/wardic-config.js +42 -0
  441. package/dist/server/wardic-config.js.map +1 -0
  442. package/dist/server/wardic.js +31 -0
  443. package/dist/server/wardic.js.map +1 -0
  444. package/dist/solid/animation-controls.d.ts +104 -0
  445. package/dist/solid/animation-controls.d.ts.map +1 -0
  446. package/dist/solid/animation-controls.js +129 -0
  447. package/dist/solid/animation-controls.js.map +1 -0
  448. package/dist/solid/animation-frame.d.ts +11 -0
  449. package/dist/solid/animation-frame.d.ts.map +1 -0
  450. package/dist/solid/animation-frame.js +31 -0
  451. package/dist/solid/animation-frame.js.map +1 -0
  452. package/dist/solid/appear.d.ts +205 -0
  453. package/dist/solid/appear.d.ts.map +1 -0
  454. package/dist/solid/appear.js +519 -0
  455. package/dist/solid/appear.js.map +1 -0
  456. package/dist/solid/arc.d.ts +25 -0
  457. package/dist/solid/arc.d.ts.map +1 -0
  458. package/dist/solid/arc.js +21 -0
  459. package/dist/solid/arc.js.map +1 -0
  460. package/dist/solid/bridge.d.ts +53 -0
  461. package/dist/solid/bridge.d.ts.map +1 -0
  462. package/dist/solid/bridge.js +66 -0
  463. package/dist/solid/bridge.js.map +1 -0
  464. package/dist/solid/complete.d.ts +31 -0
  465. package/dist/solid/complete.d.ts.map +1 -0
  466. package/dist/solid/complete.js +27 -0
  467. package/dist/solid/complete.js.map +1 -0
  468. package/dist/solid/config.d.ts +693 -0
  469. package/dist/solid/config.d.ts.map +1 -0
  470. package/dist/solid/config.js +2 -0
  471. package/dist/solid/config.js.map +1 -0
  472. package/dist/solid/create-animate.d.ts +17 -0
  473. package/dist/solid/create-animate.d.ts.map +1 -0
  474. package/dist/solid/create-animate.js +42 -0
  475. package/dist/solid/create-animate.js.map +1 -0
  476. package/dist/solid/create-ward.d.ts +278 -0
  477. package/dist/solid/create-ward.d.ts.map +1 -0
  478. package/dist/solid/create-ward.jsx +874 -0
  479. package/dist/solid/create-ward.jsx.map +1 -0
  480. package/dist/solid/cycle-index.d.ts +7 -0
  481. package/dist/solid/cycle-index.d.ts.map +1 -0
  482. package/dist/solid/cycle-index.js +17 -0
  483. package/dist/solid/cycle-index.js.map +1 -0
  484. package/dist/solid/cycle.d.ts +21 -0
  485. package/dist/solid/cycle.d.ts.map +1 -0
  486. package/dist/solid/cycle.js +31 -0
  487. package/dist/solid/cycle.js.map +1 -0
  488. package/dist/solid/directive.d.ts +21 -0
  489. package/dist/solid/directive.d.ts.map +1 -0
  490. package/dist/solid/directive.js +76 -0
  491. package/dist/solid/directive.js.map +1 -0
  492. package/dist/solid/drag-constraints.d.ts +46 -0
  493. package/dist/solid/drag-constraints.d.ts.map +1 -0
  494. package/dist/solid/drag-constraints.js +49 -0
  495. package/dist/solid/drag-constraints.js.map +1 -0
  496. package/dist/solid/drag-controls.d.ts +50 -0
  497. package/dist/solid/drag-controls.d.ts.map +1 -0
  498. package/dist/solid/drag-controls.js +51 -0
  499. package/dist/solid/drag-controls.js.map +1 -0
  500. package/dist/solid/drag-samples.d.ts +34 -0
  501. package/dist/solid/drag-samples.d.ts.map +1 -0
  502. package/dist/solid/drag-samples.js +28 -0
  503. package/dist/solid/drag-samples.js.map +1 -0
  504. package/dist/solid/drag-sensor.d.ts +23 -0
  505. package/dist/solid/drag-sensor.d.ts.map +1 -0
  506. package/dist/solid/drag-sensor.js +33 -0
  507. package/dist/solid/drag-sensor.js.map +1 -0
  508. package/dist/solid/drag-track.d.ts +227 -0
  509. package/dist/solid/drag-track.d.ts.map +1 -0
  510. package/dist/solid/drag-track.js +631 -0
  511. package/dist/solid/drag-track.js.map +1 -0
  512. package/dist/solid/drag-transition.d.ts +20 -0
  513. package/dist/solid/drag-transition.d.ts.map +1 -0
  514. package/dist/solid/drag-transition.js +31 -0
  515. package/dist/solid/drag-transition.js.map +1 -0
  516. package/dist/solid/drag.d.ts +23 -0
  517. package/dist/solid/drag.d.ts.map +1 -0
  518. package/dist/solid/drag.js +44 -0
  519. package/dist/solid/drag.js.map +1 -0
  520. package/dist/solid/element-style.d.ts +60 -0
  521. package/dist/solid/element-style.d.ts.map +1 -0
  522. package/dist/solid/element-style.js +50 -0
  523. package/dist/solid/element-style.js.map +1 -0
  524. package/dist/solid/element.d.ts +73 -0
  525. package/dist/solid/element.d.ts.map +1 -0
  526. package/dist/solid/element.jsx +326 -0
  527. package/dist/solid/element.jsx.map +1 -0
  528. package/dist/solid/feature-section.d.ts +18 -0
  529. package/dist/solid/feature-section.d.ts.map +1 -0
  530. package/dist/solid/feature-section.js +13 -0
  531. package/dist/solid/feature-section.js.map +1 -0
  532. package/dist/solid/feature.d.ts +114 -0
  533. package/dist/solid/feature.d.ts.map +1 -0
  534. package/dist/solid/feature.js +248 -0
  535. package/dist/solid/feature.js.map +1 -0
  536. package/dist/solid/features/all.d.ts +10 -0
  537. package/dist/solid/features/all.d.ts.map +1 -0
  538. package/dist/solid/features/all.js +10 -0
  539. package/dist/solid/features/all.js.map +1 -0
  540. package/dist/solid/features/colors.d.ts +12 -0
  541. package/dist/solid/features/colors.d.ts.map +1 -0
  542. package/dist/solid/features/colors.js +34 -0
  543. package/dist/solid/features/colors.js.map +1 -0
  544. package/dist/solid/features/dom-animation.d.ts +11 -0
  545. package/dist/solid/features/dom-animation.d.ts.map +1 -0
  546. package/dist/solid/features/dom-animation.js +7 -0
  547. package/dist/solid/features/dom-animation.js.map +1 -0
  548. package/dist/solid/features/dom-max.d.ts +10 -0
  549. package/dist/solid/features/dom-max.d.ts.map +1 -0
  550. package/dist/solid/features/dom-max.js +4 -0
  551. package/dist/solid/features/dom-max.js.map +1 -0
  552. package/dist/solid/features/drag.d.ts +5 -0
  553. package/dist/solid/features/drag.d.ts.map +1 -0
  554. package/dist/solid/features/drag.js +28 -0
  555. package/dist/solid/features/drag.js.map +1 -0
  556. package/dist/solid/features/focus.d.ts +5 -0
  557. package/dist/solid/features/focus.d.ts.map +1 -0
  558. package/dist/solid/features/focus.js +16 -0
  559. package/dist/solid/features/focus.js.map +1 -0
  560. package/dist/solid/features/hover.d.ts +5 -0
  561. package/dist/solid/features/hover.d.ts.map +1 -0
  562. package/dist/solid/features/hover.js +16 -0
  563. package/dist/solid/features/hover.js.map +1 -0
  564. package/dist/solid/features/in-view.d.ts +5 -0
  565. package/dist/solid/features/in-view.d.ts.map +1 -0
  566. package/dist/solid/features/in-view.js +16 -0
  567. package/dist/solid/features/in-view.js.map +1 -0
  568. package/dist/solid/features/input.d.ts +26 -0
  569. package/dist/solid/features/input.d.ts.map +1 -0
  570. package/dist/solid/features/input.js +31 -0
  571. package/dist/solid/features/input.js.map +1 -0
  572. package/dist/solid/features/keys.d.ts +70 -0
  573. package/dist/solid/features/keys.d.ts.map +1 -0
  574. package/dist/solid/features/keys.js +26 -0
  575. package/dist/solid/features/keys.js.map +1 -0
  576. package/dist/solid/features/layout.d.ts +32 -0
  577. package/dist/solid/features/layout.d.ts.map +1 -0
  578. package/dist/solid/features/layout.js +34 -0
  579. package/dist/solid/features/layout.js.map +1 -0
  580. package/dist/solid/features/pan.d.ts +5 -0
  581. package/dist/solid/features/pan.d.ts.map +1 -0
  582. package/dist/solid/features/pan.js +16 -0
  583. package/dist/solid/features/pan.js.map +1 -0
  584. package/dist/solid/features/press.d.ts +11 -0
  585. package/dist/solid/features/press.d.ts.map +1 -0
  586. package/dist/solid/features/press.js +10 -0
  587. package/dist/solid/features/press.js.map +1 -0
  588. package/dist/solid/focus-sensor.d.ts +19 -0
  589. package/dist/solid/focus-sensor.d.ts.map +1 -0
  590. package/dist/solid/focus-sensor.js +23 -0
  591. package/dist/solid/focus-sensor.js.map +1 -0
  592. package/dist/solid/frame-time.d.ts +21 -0
  593. package/dist/solid/frame-time.d.ts.map +1 -0
  594. package/dist/solid/frame-time.js +41 -0
  595. package/dist/solid/frame-time.js.map +1 -0
  596. package/dist/solid/gesture-callbacks.d.ts +53 -0
  597. package/dist/solid/gesture-callbacks.d.ts.map +1 -0
  598. package/dist/solid/gesture-callbacks.js +184 -0
  599. package/dist/solid/gesture-callbacks.js.map +1 -0
  600. package/dist/solid/gesture-features.d.ts +28 -0
  601. package/dist/solid/gesture-features.d.ts.map +1 -0
  602. package/dist/solid/gesture-features.js +29 -0
  603. package/dist/solid/gesture-features.js.map +1 -0
  604. package/dist/solid/gesture-info.d.ts +59 -0
  605. package/dist/solid/gesture-info.d.ts.map +1 -0
  606. package/dist/solid/gesture-info.js +23 -0
  607. package/dist/solid/gesture-info.js.map +1 -0
  608. package/dist/solid/hover-sensor.d.ts +19 -0
  609. package/dist/solid/hover-sensor.d.ts.map +1 -0
  610. package/dist/solid/hover-sensor.js +23 -0
  611. package/dist/solid/hover-sensor.js.map +1 -0
  612. package/dist/solid/imperative.d.ts +195 -0
  613. package/dist/solid/imperative.d.ts.map +1 -0
  614. package/dist/solid/imperative.js +536 -0
  615. package/dist/solid/imperative.js.map +1 -0
  616. package/dist/solid/index.d.ts +180 -0
  617. package/dist/solid/index.d.ts.map +1 -0
  618. package/dist/solid/index.js +165 -0
  619. package/dist/solid/index.js.map +1 -0
  620. package/dist/solid/instant.d.ts +44 -0
  621. package/dist/solid/instant.d.ts.map +1 -0
  622. package/dist/solid/instant.js +49 -0
  623. package/dist/solid/instant.js.map +1 -0
  624. package/dist/solid/layout-group.d.ts +14 -0
  625. package/dist/solid/layout-group.d.ts.map +1 -0
  626. package/dist/solid/layout-group.js +27 -0
  627. package/dist/solid/layout-group.js.map +1 -0
  628. package/dist/solid/layout-member.d.ts +117 -0
  629. package/dist/solid/layout-member.d.ts.map +1 -0
  630. package/dist/solid/layout-member.js +164 -0
  631. package/dist/solid/layout-member.js.map +1 -0
  632. package/dist/solid/layout-projection.d.ts +22 -0
  633. package/dist/solid/layout-projection.d.ts.map +1 -0
  634. package/dist/solid/layout-projection.js +19 -0
  635. package/dist/solid/layout-projection.js.map +1 -0
  636. package/dist/solid/layout.d.ts +76 -0
  637. package/dist/solid/layout.d.ts.map +1 -0
  638. package/dist/solid/layout.jsx +80 -0
  639. package/dist/solid/layout.jsx.map +1 -0
  640. package/dist/solid/live-style.d.ts +147 -0
  641. package/dist/solid/live-style.d.ts.map +1 -0
  642. package/dist/solid/live-style.js +304 -0
  643. package/dist/solid/live-style.js.map +1 -0
  644. package/dist/solid/live-value.d.ts +144 -0
  645. package/dist/solid/live-value.d.ts.map +1 -0
  646. package/dist/solid/live-value.js +223 -0
  647. package/dist/solid/live-value.js.map +1 -0
  648. package/dist/solid/motion-props.d.ts +75 -0
  649. package/dist/solid/motion-props.d.ts.map +1 -0
  650. package/dist/solid/motion-props.js +314 -0
  651. package/dist/solid/motion-props.js.map +1 -0
  652. package/dist/solid/owner-scope.d.ts +16 -0
  653. package/dist/solid/owner-scope.d.ts.map +1 -0
  654. package/dist/solid/owner-scope.js +31 -0
  655. package/dist/solid/owner-scope.js.map +1 -0
  656. package/dist/solid/page-point.d.ts +35 -0
  657. package/dist/solid/page-point.d.ts.map +1 -0
  658. package/dist/solid/page-point.js +87 -0
  659. package/dist/solid/page-point.js.map +1 -0
  660. package/dist/solid/presence-controller.d.ts +122 -0
  661. package/dist/solid/presence-controller.d.ts.map +1 -0
  662. package/dist/solid/presence-controller.js +1207 -0
  663. package/dist/solid/presence-controller.js.map +1 -0
  664. package/dist/solid/presence-record.d.ts +167 -0
  665. package/dist/solid/presence-record.d.ts.map +1 -0
  666. package/dist/solid/presence-record.js +26 -0
  667. package/dist/solid/presence-record.js.map +1 -0
  668. package/dist/solid/presence.d.ts +95 -0
  669. package/dist/solid/presence.d.ts.map +1 -0
  670. package/dist/solid/presence.jsx +195 -0
  671. package/dist/solid/presence.jsx.map +1 -0
  672. package/dist/solid/press-sensor.d.ts +20 -0
  673. package/dist/solid/press-sensor.d.ts.map +1 -0
  674. package/dist/solid/press-sensor.js +24 -0
  675. package/dist/solid/press-sensor.js.map +1 -0
  676. package/dist/solid/press.d.ts +24 -0
  677. package/dist/solid/press.d.ts.map +1 -0
  678. package/dist/solid/press.js +19 -0
  679. package/dist/solid/press.js.map +1 -0
  680. package/dist/solid/provider.d.ts +263 -0
  681. package/dist/solid/provider.d.ts.map +1 -0
  682. package/dist/solid/provider.jsx +411 -0
  683. package/dist/solid/provider.jsx.map +1 -0
  684. package/dist/solid/reactivity.d.ts +27 -0
  685. package/dist/solid/reactivity.d.ts.map +1 -0
  686. package/dist/solid/reactivity.js +9 -0
  687. package/dist/solid/reactivity.js.map +1 -0
  688. package/dist/solid/reorder-input.d.ts +22 -0
  689. package/dist/solid/reorder-input.d.ts.map +1 -0
  690. package/dist/solid/reorder-input.js +45 -0
  691. package/dist/solid/reorder-input.js.map +1 -0
  692. package/dist/solid/reorder.d.ts +241 -0
  693. package/dist/solid/reorder.d.ts.map +1 -0
  694. package/dist/solid/reorder.jsx +427 -0
  695. package/dist/solid/reorder.jsx.map +1 -0
  696. package/dist/solid/retarget-legs.d.ts +189 -0
  697. package/dist/solid/retarget-legs.d.ts.map +1 -0
  698. package/dist/solid/retarget-legs.js +825 -0
  699. package/dist/solid/retarget-legs.js.map +1 -0
  700. package/dist/solid/runtime.d.ts +179 -0
  701. package/dist/solid/runtime.d.ts.map +1 -0
  702. package/dist/solid/runtime.js +237 -0
  703. package/dist/solid/runtime.js.map +1 -0
  704. package/dist/solid/sensors.d.ts +95 -0
  705. package/dist/solid/sensors.d.ts.map +1 -0
  706. package/dist/solid/sensors.js +154 -0
  707. package/dist/solid/sensors.js.map +1 -0
  708. package/dist/solid/server-interpolators.d.ts +13 -0
  709. package/dist/solid/server-interpolators.d.ts.map +1 -0
  710. package/dist/solid/server-interpolators.js +20 -0
  711. package/dist/solid/server-interpolators.js.map +1 -0
  712. package/dist/solid/server.d.ts +9 -0
  713. package/dist/solid/server.d.ts.map +1 -0
  714. package/dist/solid/server.js +20 -0
  715. package/dist/solid/server.js.map +1 -0
  716. package/dist/solid/solid-reactivity.d.ts +3 -0
  717. package/dist/solid/solid-reactivity.d.ts.map +1 -0
  718. package/dist/solid/solid-reactivity.js +19 -0
  719. package/dist/solid/solid-reactivity.js.map +1 -0
  720. package/dist/solid/spine.d.ts +597 -0
  721. package/dist/solid/spine.d.ts.map +1 -0
  722. package/dist/solid/spine.js +2761 -0
  723. package/dist/solid/spine.js.map +1 -0
  724. package/dist/solid/stagger.d.ts +29 -0
  725. package/dist/solid/stagger.d.ts.map +1 -0
  726. package/dist/solid/stagger.js +13 -0
  727. package/dist/solid/stagger.js.map +1 -0
  728. package/dist/solid/unstable/v2/bridge.d.ts +33 -0
  729. package/dist/solid/unstable/v2/bridge.d.ts.map +1 -0
  730. package/dist/solid/unstable/v2/bridge.js +76 -0
  731. package/dist/solid/unstable/v2/bridge.js.map +1 -0
  732. package/dist/solid/unstable/v2/complete.d.ts +21 -0
  733. package/dist/solid/unstable/v2/complete.d.ts.map +1 -0
  734. package/dist/solid/unstable/v2/complete.js +27 -0
  735. package/dist/solid/unstable/v2/complete.js.map +1 -0
  736. package/dist/solid/unstable/v2/config-view.d.ts +49 -0
  737. package/dist/solid/unstable/v2/config-view.d.ts.map +1 -0
  738. package/dist/solid/unstable/v2/config-view.js +114 -0
  739. package/dist/solid/unstable/v2/config-view.js.map +1 -0
  740. package/dist/solid/unstable/v2/create-animate.d.ts +31 -0
  741. package/dist/solid/unstable/v2/create-animate.d.ts.map +1 -0
  742. package/dist/solid/unstable/v2/create-animate.js +102 -0
  743. package/dist/solid/unstable/v2/create-animate.js.map +1 -0
  744. package/dist/solid/unstable/v2/cycle.d.ts +20 -0
  745. package/dist/solid/unstable/v2/cycle.d.ts.map +1 -0
  746. package/dist/solid/unstable/v2/cycle.js +30 -0
  747. package/dist/solid/unstable/v2/cycle.js.map +1 -0
  748. package/dist/solid/unstable/v2/drag-sensor.d.ts +23 -0
  749. package/dist/solid/unstable/v2/drag-sensor.d.ts.map +1 -0
  750. package/dist/solid/unstable/v2/drag-sensor.js +32 -0
  751. package/dist/solid/unstable/v2/drag-sensor.js.map +1 -0
  752. package/dist/solid/unstable/v2/element.d.ts +178 -0
  753. package/dist/solid/unstable/v2/element.d.ts.map +1 -0
  754. package/dist/solid/unstable/v2/element.jsx +325 -0
  755. package/dist/solid/unstable/v2/element.jsx.map +1 -0
  756. package/dist/solid/unstable/v2/feature-section.d.ts +12 -0
  757. package/dist/solid/unstable/v2/feature-section.d.ts.map +1 -0
  758. package/dist/solid/unstable/v2/feature-section.js +23 -0
  759. package/dist/solid/unstable/v2/feature-section.js.map +1 -0
  760. package/dist/solid/unstable/v2/focus-sensor.d.ts +13 -0
  761. package/dist/solid/unstable/v2/focus-sensor.d.ts.map +1 -0
  762. package/dist/solid/unstable/v2/focus-sensor.js +23 -0
  763. package/dist/solid/unstable/v2/focus-sensor.js.map +1 -0
  764. package/dist/solid/unstable/v2/hover-sensor.d.ts +12 -0
  765. package/dist/solid/unstable/v2/hover-sensor.d.ts.map +1 -0
  766. package/dist/solid/unstable/v2/hover-sensor.js +22 -0
  767. package/dist/solid/unstable/v2/hover-sensor.js.map +1 -0
  768. package/dist/solid/unstable/v2/index.d.ts +131 -0
  769. package/dist/solid/unstable/v2/index.d.ts.map +1 -0
  770. package/dist/solid/unstable/v2/index.js +114 -0
  771. package/dist/solid/unstable/v2/index.js.map +1 -0
  772. package/dist/solid/unstable/v2/layout-projection.d.ts +21 -0
  773. package/dist/solid/unstable/v2/layout-projection.d.ts.map +1 -0
  774. package/dist/solid/unstable/v2/layout-projection.js +18 -0
  775. package/dist/solid/unstable/v2/layout-projection.js.map +1 -0
  776. package/dist/solid/unstable/v2/layout.d.ts +47 -0
  777. package/dist/solid/unstable/v2/layout.d.ts.map +1 -0
  778. package/dist/solid/unstable/v2/layout.jsx +62 -0
  779. package/dist/solid/unstable/v2/layout.jsx.map +1 -0
  780. package/dist/solid/unstable/v2/lifecycle.d.ts +267 -0
  781. package/dist/solid/unstable/v2/lifecycle.d.ts.map +1 -0
  782. package/dist/solid/unstable/v2/lifecycle.js +457 -0
  783. package/dist/solid/unstable/v2/lifecycle.js.map +1 -0
  784. package/dist/solid/unstable/v2/live-value.d.ts +146 -0
  785. package/dist/solid/unstable/v2/live-value.d.ts.map +1 -0
  786. package/dist/solid/unstable/v2/live-value.js +235 -0
  787. package/dist/solid/unstable/v2/live-value.js.map +1 -0
  788. package/dist/solid/unstable/v2/presence-handle.d.ts +55 -0
  789. package/dist/solid/unstable/v2/presence-handle.d.ts.map +1 -0
  790. package/dist/solid/unstable/v2/presence-handle.js +119 -0
  791. package/dist/solid/unstable/v2/presence-handle.js.map +1 -0
  792. package/dist/solid/unstable/v2/presence-hooks.d.ts +51 -0
  793. package/dist/solid/unstable/v2/presence-hooks.d.ts.map +1 -0
  794. package/dist/solid/unstable/v2/presence-hooks.js +115 -0
  795. package/dist/solid/unstable/v2/presence-hooks.js.map +1 -0
  796. package/dist/solid/unstable/v2/presence.d.ts +89 -0
  797. package/dist/solid/unstable/v2/presence.d.ts.map +1 -0
  798. package/dist/solid/unstable/v2/presence.jsx +107 -0
  799. package/dist/solid/unstable/v2/presence.jsx.map +1 -0
  800. package/dist/solid/unstable/v2/press-sensor.d.ts +13 -0
  801. package/dist/solid/unstable/v2/press-sensor.d.ts.map +1 -0
  802. package/dist/solid/unstable/v2/press-sensor.js +23 -0
  803. package/dist/solid/unstable/v2/press-sensor.js.map +1 -0
  804. package/dist/solid/unstable/v2/provider.d.ts +239 -0
  805. package/dist/solid/unstable/v2/provider.d.ts.map +1 -0
  806. package/dist/solid/unstable/v2/provider.jsx +423 -0
  807. package/dist/solid/unstable/v2/provider.jsx.map +1 -0
  808. package/dist/solid/unstable/v2/reorder.d.ts +292 -0
  809. package/dist/solid/unstable/v2/reorder.d.ts.map +1 -0
  810. package/dist/solid/unstable/v2/reorder.jsx +525 -0
  811. package/dist/solid/unstable/v2/reorder.jsx.map +1 -0
  812. package/dist/solid/unstable/v2/sensors.d.ts +91 -0
  813. package/dist/solid/unstable/v2/sensors.d.ts.map +1 -0
  814. package/dist/solid/unstable/v2/sensors.js +124 -0
  815. package/dist/solid/unstable/v2/sensors.js.map +1 -0
  816. package/dist/solid/unstable/v2/solid-reactivity.d.ts +61 -0
  817. package/dist/solid/unstable/v2/solid-reactivity.d.ts.map +1 -0
  818. package/dist/solid/unstable/v2/solid-reactivity.js +62 -0
  819. package/dist/solid/unstable/v2/solid-reactivity.js.map +1 -0
  820. package/dist/solid/unstable/v2/variant-node.d.ts +51 -0
  821. package/dist/solid/unstable/v2/variant-node.d.ts.map +1 -0
  822. package/dist/solid/unstable/v2/variant-node.js +336 -0
  823. package/dist/solid/unstable/v2/variant-node.js.map +1 -0
  824. package/dist/solid/unstable/v2/w.d.ts +42 -0
  825. package/dist/solid/unstable/v2/w.d.ts.map +1 -0
  826. package/dist/solid/unstable/v2/w.jsx +22 -0
  827. package/dist/solid/unstable/v2/w.jsx.map +1 -0
  828. package/dist/solid/unstable/v2/waiters.d.ts +72 -0
  829. package/dist/solid/unstable/v2/waiters.d.ts.map +1 -0
  830. package/dist/solid/unstable/v2/waiters.js +175 -0
  831. package/dist/solid/unstable/v2/waiters.js.map +1 -0
  832. package/dist/solid/unstable/v2/ward.d.ts +393 -0
  833. package/dist/solid/unstable/v2/ward.d.ts.map +1 -0
  834. package/dist/solid/unstable/v2/ward.jsx +1475 -0
  835. package/dist/solid/unstable/v2/ward.jsx.map +1 -0
  836. package/dist/solid/unstable/v2/wardic-config.d.ts +68 -0
  837. package/dist/solid/unstable/v2/wardic-config.d.ts.map +1 -0
  838. package/dist/solid/unstable/v2/wardic-config.jsx +28 -0
  839. package/dist/solid/unstable/v2/wardic-config.jsx.map +1 -0
  840. package/dist/solid/unstable/v2/wardic.d.ts +28 -0
  841. package/dist/solid/unstable/v2/wardic.d.ts.map +1 -0
  842. package/dist/solid/unstable/v2/wardic.jsx +16 -0
  843. package/dist/solid/unstable/v2/wardic.jsx.map +1 -0
  844. package/dist/solid/variant-node.d.ts +32 -0
  845. package/dist/solid/variant-node.d.ts.map +1 -0
  846. package/dist/solid/variant-node.js +257 -0
  847. package/dist/solid/variant-node.js.map +1 -0
  848. package/dist/solid/variant-target.d.ts +102 -0
  849. package/dist/solid/variant-target.d.ts.map +1 -0
  850. package/dist/solid/variant-target.js +180 -0
  851. package/dist/solid/variant-target.js.map +1 -0
  852. package/dist/solid/variant-tree.d.ts +349 -0
  853. package/dist/solid/variant-tree.d.ts.map +1 -0
  854. package/dist/solid/variant-tree.js +358 -0
  855. package/dist/solid/variant-tree.js.map +1 -0
  856. package/dist/solid/variants.d.ts +21 -0
  857. package/dist/solid/variants.d.ts.map +1 -0
  858. package/dist/solid/variants.js +43 -0
  859. package/dist/solid/variants.js.map +1 -0
  860. package/dist/solid/w.d.ts +42 -0
  861. package/dist/solid/w.d.ts.map +1 -0
  862. package/dist/solid/w.jsx +23 -0
  863. package/dist/solid/w.jsx.map +1 -0
  864. package/dist/solid/ward-keys.d.ts +236 -0
  865. package/dist/solid/ward-keys.d.ts.map +1 -0
  866. package/dist/solid/ward-keys.js +2 -0
  867. package/dist/solid/ward-keys.js.map +1 -0
  868. package/dist/solid/wardic-component.d.ts +50 -0
  869. package/dist/solid/wardic-component.d.ts.map +1 -0
  870. package/dist/solid/wardic-component.js +74 -0
  871. package/dist/solid/wardic-component.js.map +1 -0
  872. package/dist/solid/wardic-config-value.d.ts +87 -0
  873. package/dist/solid/wardic-config-value.d.ts.map +1 -0
  874. package/dist/solid/wardic-config-value.js +106 -0
  875. package/dist/solid/wardic-config-value.js.map +1 -0
  876. package/dist/solid/wardic-config.d.ts +69 -0
  877. package/dist/solid/wardic-config.d.ts.map +1 -0
  878. package/dist/solid/wardic-config.jsx +30 -0
  879. package/dist/solid/wardic-config.jsx.map +1 -0
  880. package/dist/solid/wardic.d.ts +45 -0
  881. package/dist/solid/wardic.d.ts.map +1 -0
  882. package/dist/solid/wardic.jsx +31 -0
  883. package/dist/solid/wardic.jsx.map +1 -0
  884. package/package.json +98 -4
  885. package/src/animation-controls.ts +204 -0
  886. package/src/animation-frame.ts +32 -0
  887. package/src/appear.ts +804 -0
  888. package/src/arc.ts +34 -0
  889. package/src/bridge.ts +98 -0
  890. package/src/complete.ts +45 -0
  891. package/src/config.ts +805 -0
  892. package/src/create-animate.ts +41 -0
  893. package/src/create-ward.tsx +1271 -0
  894. package/src/cycle-index.ts +18 -0
  895. package/src/cycle.ts +34 -0
  896. package/src/directive.ts +87 -0
  897. package/src/drag-constraints.ts +103 -0
  898. package/src/drag-controls.ts +94 -0
  899. package/src/drag-samples.ts +54 -0
  900. package/src/drag-sensor.ts +46 -0
  901. package/src/drag-track.ts +937 -0
  902. package/src/drag-transition.ts +43 -0
  903. package/src/drag.ts +58 -0
  904. package/src/element-style.ts +112 -0
  905. package/src/element.tsx +400 -0
  906. package/src/feature-section.ts +33 -0
  907. package/src/feature.ts +342 -0
  908. package/src/features/all.ts +18 -0
  909. package/src/features/colors.ts +36 -0
  910. package/src/features/dom-animation.ts +15 -0
  911. package/src/features/dom-max.ts +11 -0
  912. package/src/features/drag.ts +30 -0
  913. package/src/features/focus.ts +17 -0
  914. package/src/features/hover.ts +17 -0
  915. package/src/features/in-view.ts +17 -0
  916. package/src/features/input.ts +42 -0
  917. package/src/features/keys.ts +89 -0
  918. package/src/features/layout.ts +54 -0
  919. package/src/features/pan.ts +17 -0
  920. package/src/features/press.ts +17 -0
  921. package/src/focus-sensor.ts +32 -0
  922. package/src/frame-time.ts +45 -0
  923. package/src/gesture-callbacks.ts +212 -0
  924. package/src/gesture-features.ts +35 -0
  925. package/src/gesture-info.ts +81 -0
  926. package/src/hover-sensor.ts +32 -0
  927. package/src/imperative.ts +782 -0
  928. package/src/index.ts +334 -0
  929. package/src/instant.ts +90 -0
  930. package/src/layout-group.ts +32 -0
  931. package/src/layout-member.ts +300 -0
  932. package/src/layout-projection.ts +28 -0
  933. package/src/layout.tsx +127 -0
  934. package/src/live-style.ts +449 -0
  935. package/src/live-value.ts +378 -0
  936. package/src/motion-props.ts +325 -0
  937. package/src/owner-scope.ts +31 -0
  938. package/src/page-point.ts +98 -0
  939. package/src/presence-controller.ts +1483 -0
  940. package/src/presence-record.ts +189 -0
  941. package/src/presence.tsx +269 -0
  942. package/src/press-sensor.ts +33 -0
  943. package/src/press.ts +40 -0
  944. package/src/provider.tsx +526 -0
  945. package/src/reactivity.ts +29 -0
  946. package/src/reorder-input.ts +53 -0
  947. package/src/reorder.tsx +703 -0
  948. package/src/retarget-legs.ts +1048 -0
  949. package/src/runtime.ts +388 -0
  950. package/src/sensors.ts +189 -0
  951. package/src/server-interpolators.ts +33 -0
  952. package/src/server.ts +21 -0
  953. package/src/solid-reactivity.ts +21 -0
  954. package/src/spine.ts +3385 -0
  955. package/src/stagger.ts +31 -0
  956. package/src/unstable/v2/bridge.ts +79 -0
  957. package/src/unstable/v2/complete.ts +47 -0
  958. package/src/unstable/v2/config-view.ts +156 -0
  959. package/src/unstable/v2/create-animate.ts +123 -0
  960. package/src/unstable/v2/cycle.ts +33 -0
  961. package/src/unstable/v2/drag-sensor.ts +44 -0
  962. package/src/unstable/v2/element.tsx +478 -0
  963. package/src/unstable/v2/feature-section.ts +32 -0
  964. package/src/unstable/v2/focus-sensor.ts +31 -0
  965. package/src/unstable/v2/hover-sensor.ts +30 -0
  966. package/src/unstable/v2/index.ts +270 -0
  967. package/src/unstable/v2/layout-projection.ts +27 -0
  968. package/src/unstable/v2/layout.tsx +89 -0
  969. package/src/unstable/v2/lifecycle.ts +612 -0
  970. package/src/unstable/v2/live-value.ts +414 -0
  971. package/src/unstable/v2/presence-handle.ts +159 -0
  972. package/src/unstable/v2/presence-hooks.ts +157 -0
  973. package/src/unstable/v2/presence.tsx +174 -0
  974. package/src/unstable/v2/press-sensor.ts +31 -0
  975. package/src/unstable/v2/provider.tsx +524 -0
  976. package/src/unstable/v2/reorder.tsx +880 -0
  977. package/src/unstable/v2/sensors.ts +169 -0
  978. package/src/unstable/v2/solid-reactivity.ts +69 -0
  979. package/src/unstable/v2/variant-node.ts +446 -0
  980. package/src/unstable/v2/w.tsx +49 -0
  981. package/src/unstable/v2/waiters.ts +212 -0
  982. package/src/unstable/v2/ward.tsx +2068 -0
  983. package/src/unstable/v2/wardic-config.tsx +84 -0
  984. package/src/unstable/v2/wardic.tsx +41 -0
  985. package/src/variant-node.ts +368 -0
  986. package/src/variant-target.ts +234 -0
  987. package/src/variant-tree.ts +638 -0
  988. package/src/variants.ts +47 -0
  989. package/src/w.tsx +59 -0
  990. package/src/ward-keys.ts +343 -0
  991. package/src/wardic-component.ts +96 -0
  992. package/src/wardic-config-value.ts +150 -0
  993. package/src/wardic-config.tsx +78 -0
  994. package/src/wardic.tsx +59 -0
@@ -0,0 +1,1019 @@
1
+ import * as DefaultTransition from "@wardic/core/DefaultTransition";
2
+ import * as Easing from "@wardic/core/Easing";
3
+ import * as Inertia from "@wardic/core/Inertia";
4
+ import * as Machine from "@wardic/core/Machine";
5
+ import * as ReducedMotion from "@wardic/core/ReducedMotion";
6
+ import * as Spring from "@wardic/core/Spring";
7
+ import * as Values from "@wardic/core/Values";
8
+ import * as MeasuredPair from "@wardic/dom/MeasuredPair";
9
+ import * as Arr from "effect/Array";
10
+ import * as Bool from "effect/Boolean";
11
+ import * as Effect from "effect/Effect";
12
+ import { identity } from "effect/Function";
13
+ import * as Match from "effect/Match";
14
+ import * as Option from "effect/Option";
15
+ import * as Predicate from "effect/Predicate";
16
+ import * as Rec from "effect/Record";
17
+ import * as UndefinedOr from "effect/UndefinedOr";
18
+ /** No velocity: every key at rest. */
19
+ export const NO_VELOCITY = () => 0;
20
+ /** Each key's velocity from a record of them, 0 for one it doesn't have. */
21
+ export const velocitiesOf = record => key => {
22
+ const velocity = record[key];
23
+ if (Predicate.isUndefined(velocity)) return 0;
24
+ return velocity;
25
+ };
26
+ /**
27
+ * The fields no machine reads: the orchestration's (ADR-0007), the variant tree's, and a Path
28
+ * (#438), which {@link legsOf} takes out to `x` and `y`'s leg. Neither defines a transition.
29
+ */
30
+ const ORCHESTRATION = ["staggerChildren", "delayChildren", "from", "staggerDirection", "when", "path"];
31
+ /** Each transition without its orchestration, by the transition: one object each, so core's decode cache hits (#66). */
32
+ // Module state (#460, Q7): a cache held weakly by the object it's for, so it goes with it.
33
+ const MOTIONS = new WeakMap();
34
+ /**
35
+ * A transition as its machines take it: without the orchestration's fields (#243). A stagger's
36
+ * `from` (`"last"`, `"center"`) is the variant tree's, and a spring decodes `from` as its starting
37
+ * position, so it failed every leg; the rest of those fields a machine ignores. The same transition,
38
+ * one with none of them.
39
+ */
40
+ export const motionOf = transition => UndefinedOr.map(transition, t => Bool.match(Arr.some(ORCHESTRATION, key => Object.hasOwn(t, key)), {
41
+ onFalse: () => t,
42
+ onTrue: () => Option.getOrElse(Option.fromUndefinedOr(MOTIONS.get(t)), () => {
43
+ const motion = Rec.filter(t, (_, key) => Bool.not(Arr.contains(ORCHESTRATION, key)));
44
+ MOTIONS.set(t, motion);
45
+ return motion;
46
+ })
47
+ }));
48
+ /** A transition with no entry: what nearly every transition is. */
49
+ const NONE = Symbol("wardic.noEntries");
50
+ /** Each transition's entries, worked out once per object (#301). */
51
+ // Module state (#460, Q7): a cache held weakly by the object it's for, so it goes with it.
52
+ const ENTRIES = new WeakMap();
53
+ /** The entries that aren't a value's. */
54
+ const NOT_VALUES = new Set(["default", "layout"]);
55
+ /**
56
+ * Whether a field is an entry (#301): a transition, under a value's name, `default` or `layout`. No
57
+ * option of a transition's own is a plain object: an easing is a function, `times` an array.
58
+ */
59
+ const isEntry = value => Predicate.isObject(value);
60
+ /**
61
+ * A transition's entries (#301), or `undefined` for one with none: worked out once per transition
62
+ * object, so an element whose transitions have none pays a lookup per Retarget.
63
+ */
64
+ export const entriesOf = given => {
65
+ if (Predicate.isUndefined(given)) return undefined;
66
+ const known = ENTRIES.get(given);
67
+ if (known === NONE) return undefined;
68
+ if (Predicate.isNotUndefined(known)) return known;
69
+ const fields = given;
70
+ const keys = Arr.filter(Rec.keys(fields), key => isEntry(fields[key]));
71
+ if (keys.length === 0) {
72
+ ENTRIES.set(given, NONE);
73
+ return undefined;
74
+ }
75
+ const made = {
76
+ own: Rec.filter(fields, value => Bool.not(isEntry(value))),
77
+ byKey: Rec.fromEntries(Arr.map(keys, key => [key, fields[key]])),
78
+ byValue: Arr.some(keys, key => Bool.not(NOT_VALUES.has(key))),
79
+ resolved: new Map()
80
+ };
81
+ ENTRIES.set(given, made);
82
+ return made;
83
+ };
84
+ /**
85
+ * The transition `key` runs on (#301, Motion's `getValueTransition`): its entry, else `default`, else
86
+ * the transition's own fields; an entry with `inherit: true` laid over the own fields, its own winning.
87
+ * The reduced-motion opt-out is the whole transition's, as the orchestration is: an entry without
88
+ * its own takes the top level's.
89
+ */
90
+ const forKey = (entries, key) => {
91
+ if (Object.hasOwn(entries.byKey, key)) return entryNamed(entries, key);
92
+ if (Object.hasOwn(entries.byKey, "default")) return entryNamed(entries, "default");
93
+ return entries.own;
94
+ };
95
+ /** The entry `name` resolved, once: every key on it runs on the one object, so they share a leg. */
96
+ const entryNamed = (entries, name) => {
97
+ const kept = entries.resolved.get(name);
98
+ if (Predicate.isNotUndefined(kept)) return kept;
99
+ const made = resolvedEntry(entries.own, entries.byKey[name]);
100
+ entries.resolved.set(name, made);
101
+ return made;
102
+ };
103
+ /**
104
+ * An entry as its key runs on it (#301): over the own fields with `inherit`, else with their
105
+ * reduced-motion opt-out and their `skipAnimations` alone (#468: Motion skips every value of a
106
+ * transition that says so).
107
+ */
108
+ const resolvedEntry = (own, entry) => {
109
+ const {
110
+ inherit,
111
+ ...rest
112
+ } = entry;
113
+ if (inherit === true) return {
114
+ ...own,
115
+ ...rest
116
+ };
117
+ let made = rest;
118
+ if (Bool.and(Predicate.isNotUndefined(own.respectReducedMotion), Predicate.isUndefined(rest.respectReducedMotion))) made = {
119
+ ...made,
120
+ respectReducedMotion: own.respectReducedMotion
121
+ };
122
+ if (own.skipAnimations === true) made = {
123
+ ...made,
124
+ skipAnimations: true
125
+ };
126
+ return made;
127
+ };
128
+ /**
129
+ * The transition `key` runs on in `given` (#301): its entry, else `default`, else `given`'s own
130
+ * fields. `given` itself when it has no entry.
131
+ */
132
+ export const transitionForKey = (given, key) => {
133
+ const entries = entriesOf(given);
134
+ if (Predicate.isUndefined(entries)) return given;
135
+ return forKey(entries, key);
136
+ };
137
+ /**
138
+ * `given` held back by `extra` more seconds (ADR-0007's stagger, #290's exit delays): its own `delay`,
139
+ * and each entry's (#301), so a key on its entry waits as the rest do. An `inherit` entry with no
140
+ * `delay` of its own takes the own fields' as they are.
141
+ */
142
+ export const delayedBy = (given, extra) => {
143
+ if (extra === 0) return given;
144
+ const own = {
145
+ ...given,
146
+ delay: delayIn(given) + extra
147
+ };
148
+ const entries = entriesOf(given);
149
+ if (Predicate.isUndefined(entries)) return own;
150
+ return {
151
+ ...own,
152
+ ...Rec.map(entries.byKey, entry => {
153
+ const fields = entry;
154
+ if (Bool.and(fields.inherit === true, Predicate.isUndefined(fields.delay))) return entry;
155
+ return {
156
+ ...entry,
157
+ delay: delayIn(entry) + extra
158
+ };
159
+ })
160
+ };
161
+ };
162
+ /** A transition's `delay`, 0 without one. */
163
+ const delayIn = transition => UndefinedOr.match(transition, {
164
+ onUndefined: () => 0,
165
+ onDefined: t => UndefinedOr.match(t.delay, {
166
+ onUndefined: () => 0,
167
+ onDefined: identity
168
+ })
169
+ });
170
+ /**
171
+ * Whether `key` has Keyframes of more than two stops among `stops`: never a Measured pair (#430). They
172
+ * run through their stops, switching where types mix, as Motion's measures two stops only (#460).
173
+ */
174
+ export const hasManyStops = (stops, key) => {
175
+ if (Predicate.isUndefined(stops)) return false;
176
+ return Object.hasOwn(stops, key);
177
+ };
178
+ /**
179
+ * Where a target's keys start with its **Keyframes** resolved (#429, Motion's): a first `null` stop is
180
+ * where the key is (`from`), each later one the stop before (`fillWildcards`), and an explicit first
181
+ * stop is where it starts, jumped to. `stops` holds the keys with more than two: a key with two runs
182
+ * as a target does, from its first, so a spring takes it with the key's velocity, as Motion's.
183
+ *
184
+ * @param from each key's start
185
+ * @param to each key's target, its Keyframes' last stop
186
+ * @param keyframes each Keyframes key's stops; only the keys `to` has are read
187
+ */
188
+ export const keyframesFrom = (from, to, keyframes) => {
189
+ const started = {
190
+ ...from
191
+ };
192
+ let many;
193
+ Arr.forEach(Rec.keys(keyframes), key => {
194
+ if (Bool.not(Object.hasOwn(to, key))) return;
195
+ const filled = filledStops(UndefinedOr.getOrThrow(keyframes[key]), UndefinedOr.getOrThrow(from[key]));
196
+ started[key] = UndefinedOr.getOrThrow(filled[0]);
197
+ if (filled.length < 3) return;
198
+ if (Predicate.isUndefined(many)) many = {};
199
+ many[key] = filled;
200
+ });
201
+ return {
202
+ from: started,
203
+ stops: many
204
+ };
205
+ };
206
+ /**
207
+ * Stops with each `null` filled (#429, Motion's `fillWildcards`): the first with `start`, a later one
208
+ * with the stop before. A sequence's function Segment fills its own from 0 (#433).
209
+ */
210
+ export const filledStops = (stops, start) => {
211
+ let before = start;
212
+ return Arr.map(stops, stop => {
213
+ if (Predicate.isNotNull(stop)) before = stop;
214
+ return before;
215
+ });
216
+ };
217
+ /**
218
+ * Why Keyframes of more than two stops can't run on a spring (#429): Motion's development error
219
+ * ("Only two keyframes currently supported with spring and inertia animations"), naming each key, its
220
+ * stops and the fix.
221
+ */
222
+ const springStopsError = (stops, kind = "a spring") => new Error(`wardic: ${Arr.map(Rec.toEntries(stops), ([key, list]) => `"${key}" has ${list.length} keyframes`).join(", ")}, and ${kind} takes two, as Motion's does (#429). ` + `Run them on a tween: transition: { ${Arr.map(Rec.keys(stops), key => `${JSON.stringify(key)}: { type: "tween" }`).join(", ")} }.`);
223
+ /** Each tween's answer to {@link keyframedOptions}, by its options: one object each, as {@link RUNS}' (#452). */
224
+ // Module state (#460, Q7): a cache held weakly by the object it's for, so it goes with it.
225
+ const KEYFRAMED = new WeakMap();
226
+ /**
227
+ * Whether a tween's options need `keyframesValues` (#429): `times`, or an `ease` per Interval, which
228
+ * `animateValues` doesn't take. Worked out once per options object (#452): every tween Retarget asks.
229
+ */
230
+ const keyframedOptions = options => {
231
+ const known = KEYFRAMED.get(options);
232
+ if (Predicate.isNotUndefined(known)) return known;
233
+ const keyframed = Bool.or(Predicate.isNotUndefined(options.times), Bool.and(Arr.isArray(options.ease), Bool.not(Easing.isBezier(options.ease))));
234
+ KEYFRAMED.set(options, keyframed);
235
+ return keyframed;
236
+ };
237
+ /**
238
+ * The spring fields: one of them, with no `type`, makes a transition a spring, a value's or a layout
239
+ * animation's (ADR-0009 *Amendment (#171)*, ADR-0051); a time-based spring's `bounce` and
240
+ * `visualDuration` among them (#359), where a `duration` alone is a tween's.
241
+ */
242
+ export const SPRING_FIELDS = ["stiffness", "damping", "mass", "velocity", "restDelta", "restSpeed", "bounce", "visualDuration"];
243
+ /** A spring's physics fields: one of them wins over its time (#359, Motion's `physicsKeys`). */
244
+ const PHYSICS_FIELDS = ["stiffness", "damping", "mass"];
245
+ /** A time-based spring's fields (#359): with no physics field, core solves its physics from them. */
246
+ const TIME_FIELDS = ["duration", "bounce", "visualDuration"];
247
+ /**
248
+ * The fields that don't define a transition, beside the orchestration's ({@link motionOf}): Motion's
249
+ * `isTransitionDefined` (at 16c6122) skips `delay`; Wardic's reduced-motion opt-out, `skipAnimations`
250
+ * (#468) and a target's `inherit` aren't a transition's either. `repeat` and its fields do define one, a tween (ADR-0051).
251
+ */
252
+ const NOT_DEFINING = new Set(["delay", "respectReducedMotion", "skipAnimations", "inherit"]);
253
+ /** Motion's spring defaults (`springDefaults`): what a spring transition leaves out (ADR-0051). */
254
+ const MOTION_SPRING = {
255
+ stiffness: 100,
256
+ damping: 10,
257
+ mass: 1
258
+ };
259
+ /** A transition that defines nothing: its keys run on their Default transitions. */
260
+ const NOT_DEFINED = Symbol("wardic.notDefined");
261
+ /** Each transition as its legs run it, by the transition: one object each, so core's decode cache hits (#66). */
262
+ // Module state (#460, Q7): a cache held weakly by the object it's for, so it goes with it.
263
+ const RUNS = new WeakMap();
264
+ /** A field a transition gives: set, and not an entry (#301). */
265
+ const isGiven = value => Bool.and(Predicate.isNotUndefined(value), Bool.not(isEntry(value)));
266
+ /** Whether a field defines a transition. */
267
+ const isDefining = key => Bool.not(NOT_DEFINING.has(key));
268
+ /** Whether a transition gives any of `keys`. */
269
+ const givesAny = (fields, keys) => Arr.some(keys, key => Object.hasOwn(fields, key));
270
+ /** Whether a transition's fields make it a spring: `type: "spring"`, or no `type` and a spring field. */
271
+ const isSpring = fields => Bool.or(fields.type === "spring", Bool.and(Predicate.isUndefined(fields.type), givesAny(fields, SPRING_FIELDS)));
272
+ /**
273
+ * Whether a spring transition is set by time (#359): a time field and no physics field. Its physics
274
+ * are core's to solve, so it takes none of Motion's defaults, which would win over its time.
275
+ */
276
+ const isTimed = fields => Bool.and(givesAny(fields, TIME_FIELDS), Bool.not(givesAny(fields, PHYSICS_FIELDS)));
277
+ /** {@link runOf}'s work, once a transition: its given fields, and what they make. */
278
+ const madeRun = given => {
279
+ const fields = Rec.filter(UndefinedOr.getOrThrow(motionOf(given)), isGiven);
280
+ if (Bool.not(Arr.some(Rec.keys(fields), isDefining))) return NOT_DEFINED;
281
+ // An inertia (#435): its fields as given, Motion's `timeConstant` in milliseconds as core's seconds.
282
+ if (fields.type === "inertia") {
283
+ return {
284
+ ...fields,
285
+ ...UndefinedOr.match(fields.timeConstant, {
286
+ onUndefined: () => ({}),
287
+ onDefined: ms => ({
288
+ timeConstant: ms / 1000
289
+ })
290
+ })
291
+ };
292
+ }
293
+ return Bool.match(isSpring(fields), {
294
+ onTrue: () => Bool.match(isTimed(fields), {
295
+ onTrue: () => ({
296
+ ...fields,
297
+ type: "spring"
298
+ }),
299
+ onFalse: () => ({
300
+ ...MOTION_SPRING,
301
+ ...fields,
302
+ type: "spring"
303
+ })
304
+ }),
305
+ onFalse: () => ({
306
+ ease: Easing.easeOut,
307
+ ...fields,
308
+ type: "tween"
309
+ })
310
+ });
311
+ };
312
+ /**
313
+ * A transition as its legs run it (ADR-0051, #357), or `undefined` when it isn't defined: none, or
314
+ * one with only orchestration, `delay` and the reduced-motion opt-out (Motion's
315
+ * `isTransitionDefined`). A defined one:
316
+ * - is a spring when it says so, or gives no `type` and a spring field ({@link SPRING_FIELDS});
317
+ * anything else is a tween, as a layout animation's is (ADR-0009 *Amendment (#171)*): `{ duration:
318
+ * 0.5 }` a 0.5 s tween, as Motion's, where `{ stiffness: 300 }` stays a spring;
319
+ * - takes Motion's fields for those it leaves out: a spring's 100 / 10 / 1, a tween's `easeOut`
320
+ * (a tween's 0.3 s is core's too). A spring set by time, a `duration`, `bounce` or
321
+ * `visualDuration` and no stiffness, damping or mass (#359), takes no physics: core solves them.
322
+ *
323
+ * Worked out once per transition object. A field set to `undefined` gives nothing.
324
+ */
325
+ export const runOf = given => {
326
+ if (Predicate.isUndefined(given)) return undefined;
327
+ let run = RUNS.get(given);
328
+ if (Predicate.isUndefined(run)) {
329
+ run = madeRun(given);
330
+ RUNS.set(given, run);
331
+ }
332
+ if (run === NOT_DEFINED) return undefined;
333
+ return run;
334
+ };
335
+ /** No keys: a Retarget with no following return. */
336
+ const NO_KEYS = [];
337
+ /** Whether a value map has any key. */
338
+ const hasKeys = Predicate.not(Rec.isEmptyRecord);
339
+ /**
340
+ * A Retarget's legs, in the order the spine starts them. Positional, as the spine calls it once a
341
+ * Retarget per element (#69's PR 2: what a Retarget allocates shows in `bench:solid`'s bytes).
342
+ *
343
+ * @param from each key's start
344
+ * @param to each key's target
345
+ * @param given the transition the legs run on, any stagger delay folded in (ADR-0007); its orchestration
346
+ * fields are left out ({@link motionOf})
347
+ * @param reducedMotion whether reduced motion is on (the provider's, ADR-0029); a transition can still opt out
348
+ * @param skipped whether its animations are skipped (#468, a `WardicConfig`'s `skipAnimations`): every key
349
+ * lands at its end on the first tick; a transition's `skipAnimations: true` does the same for its keys
350
+ * @param positionalKeys which keys are positional: the Environment's (ADR-0036)
351
+ * @param defaults what a key with no transition defined runs on: the Environment's (ADR-0051)
352
+ * @param velocities each key's velocity now (#464): a spring starts from it, unless its transition gives one
353
+ * @param follow the returns that follow a moving Live value (#130), given only when the Retarget returns a key
354
+ * @param stops each key's Keyframes of more than two stops (#429, {@link keyframesFrom}), `from` at their first
355
+ * @param measured each key's Measured pair (#430), measured at the end of the task
356
+ * @param current where every key is now: a Path's axis the target leaves out starts there (#438)
357
+ * @param rests where a Path's axis the target leaves out comes to rest, when a Path in flight was taking
358
+ * it somewhere (#574): it ends there; else where it starts
359
+ */
360
+ /** A Path's two axes (#438). */
361
+ const AXES = ["x", "y"];
362
+ /**
363
+ * A Retarget's keys with both of a Path's axes (#438): a Path couples `x` and `y`, so with either one
364
+ * retargeted, the other goes along it too, to its own target in `target`, though that hasn't changed
365
+ * and a Retarget otherwise keeps an unchanged key's Leg (#325). Without a Path, or neither axis, the
366
+ * keys as they are.
367
+ */
368
+ export const withPathAxes = (fresh, target, transition) => {
369
+ if (Predicate.isUndefined(UndefinedOr.map(transition, t => t.path))) return fresh;
370
+ if (Bool.not(Arr.some(AXES, key => Object.hasOwn(fresh, key)))) return fresh;
371
+ const missing = Arr.filter(AXES, key => Bool.and(Bool.not(Object.hasOwn(fresh, key)), Object.hasOwn(target, key)));
372
+ if (missing.length === 0) return fresh;
373
+ return {
374
+ ...fresh,
375
+ ...Rec.fromEntries(Arr.map(missing, key => [key, UndefinedOr.getOrThrow(target[key])]))
376
+ };
377
+ };
378
+ /** `key`'s number: from `values`, else from `current`, else its identity, 0; `undefined` for a string. */
379
+ const axisOf = (key, values, current) => {
380
+ const given = values[key];
381
+ if (Predicate.isNumber(given)) return given;
382
+ if (Predicate.isNotUndefined(given)) return undefined;
383
+ const now = UndefinedOr.map(current, all => all[key]);
384
+ if (Predicate.isNumber(now)) return now;
385
+ if (Predicate.isNotUndefined(now)) return undefined;
386
+ return 0;
387
+ };
388
+ /**
389
+ * `x` and `y` along a Path (#438, Motion's `path`): one progress, 0 to 1, on the transition `x` runs
390
+ * on, from rest, as Motion's `{ velocity: 0, ...getValueTransition(transition, "x") }`; a spring's over
391
+ * 1000, as a layout animation's, so its rest thresholds read as at that distance (#344). Its frames
392
+ * write both axes, and the path's turn (`pathRotation`) when it has one; its last, the targets and no turn.
393
+ */
394
+ const pathLegOf = (at, end, transition) => ({
395
+ _tag: "Blend",
396
+ to: end,
397
+ machine: () => Effect.succeed(Machine.make({
398
+ settles: Bool.or(transition.type === "spring", Number.isFinite(UndefinedOr.match(transition.repeat, {
399
+ onUndefined: () => 0,
400
+ onDefined: identity
401
+ }))),
402
+ span: {
403
+ name: "wardic.path",
404
+ attributes: {
405
+ rotates: Object.hasOwn(end, "pathRotation")
406
+ }
407
+ },
408
+ start: () => {
409
+ const progress = progressOf(transition);
410
+ const turns = Object.hasOwn(end, "pathRotation");
411
+ return dt => {
412
+ const frame = progress(dt);
413
+ if (frame.done) return {
414
+ value: end,
415
+ done: true
416
+ };
417
+ const point = at(frame.value);
418
+ if (turns) return {
419
+ value: {
420
+ x: point.x,
421
+ y: point.y,
422
+ pathRotation: UndefinedOr.match(point.rotate, {
423
+ onUndefined: () => 0,
424
+ onDefined: identity
425
+ })
426
+ },
427
+ done: false
428
+ };
429
+ return {
430
+ value: {
431
+ x: point.x,
432
+ y: point.y
433
+ },
434
+ done: false
435
+ };
436
+ };
437
+ }
438
+ }))
439
+ });
440
+ /** A Path's progress, 0 to 1, on `transition`: a spring's from rest over 1000 (#438), a tween's as a Measured pair's. */
441
+ const progressOf = transition => {
442
+ if (transition.type === "spring") {
443
+ const spring = Machine.springValues({
444
+ progress: 1000
445
+ }, {
446
+ ...transition,
447
+ velocity: 0
448
+ }, {
449
+ from: {
450
+ progress: 0
451
+ }
452
+ }).start();
453
+ return dt => {
454
+ const frame = spring(dt);
455
+ return {
456
+ value: UndefinedOr.getOrThrow(frame.value.progress) / 1000,
457
+ done: frame.done
458
+ };
459
+ };
460
+ }
461
+ return Machine.keyframes([0, 1], transition).start();
462
+ };
463
+ /**
464
+ * A Retarget's Path (#438): when its transition has one and its target has `x` or `y`, their leg along
465
+ * it, from where they are (an axis it leaves out from where it is now, `current`), on the transition `x`
466
+ * runs on; and the target without them. An axis it leaves out ends where it rests (#574): where the Path
467
+ * in flight was taking it, in `rests`, so a toss caught mid-air curves back to its line; else back where
468
+ * it starts, as Motion's `yTo = yRaw ?? yFrom`. `undefined` when there's none to take: no
469
+ * Path or no axis, reduced motion snapping them, a Skipped animation, an inertia, an axis that isn't a
470
+ * number. Keyframes' ends are their first and last stops.
471
+ */
472
+ const pathOf = (from, to, given, reducedMotion, skipped, defaults, stops, current, rests) => {
473
+ // Every element's Retarget asks, nearly always with no `path` (#460): guards, nothing built.
474
+ if (Predicate.isUndefined(given)) return undefined;
475
+ const path = given.path;
476
+ if (Predicate.isUndefined(path)) return undefined;
477
+ if (Bool.not(Arr.some(AXES, key => Object.hasOwn(to, key)))) return undefined;
478
+ if (Bool.or(skipped, UndefinedOr.map(given, t => t.skipAnimations) === true)) return undefined;
479
+ // `x`'s transition, as a key's: its own entry (#301), else the transition's, else its Default (ADR-0051).
480
+ const runsOn = UndefinedOr.match(entriesOf(given), {
481
+ onUndefined: () => given,
482
+ onDefined: entries => forKey(entries, "x")
483
+ });
484
+ const run = UndefinedOr.match(runOf(runsOn), {
485
+ onUndefined: () => carried(defaultFor(defaults, "x", to, stops), runsOn),
486
+ onDefined: identity
487
+ });
488
+ if (run.type === "inertia") return undefined;
489
+ // Reduced motion snaps the positional keys, the axes among them (ADR-0029), unless it opts out.
490
+ if (Bool.and(reducedMotion, run.respectReducedMotion !== false)) return undefined;
491
+ const startX = axisOf("x", from, current);
492
+ if (Predicate.isUndefined(startX)) return undefined;
493
+ const startY = axisOf("y", from, current);
494
+ if (Predicate.isUndefined(startY)) return undefined;
495
+ // An axis the target leaves out ends where it rests (#574), else where it starts.
496
+ const resting = {
497
+ x: startX,
498
+ y: startY,
499
+ ...rests
500
+ };
501
+ const endX = axisOf("x", to, resting);
502
+ if (Predicate.isUndefined(endX)) return undefined;
503
+ const endY = axisOf("y", to, resting);
504
+ if (Predicate.isUndefined(endY)) return undefined;
505
+ const at = path({
506
+ x: startX,
507
+ y: startY
508
+ }, {
509
+ x: endX,
510
+ y: endY
511
+ });
512
+ // A path that turns the element says so at its start, as Motion's `interpolate(0).rotate`.
513
+ const end = Bool.match(Predicate.isUndefined(at(0).rotate), {
514
+ onTrue: () => ({
515
+ x: endX,
516
+ y: endY
517
+ }),
518
+ onFalse: () => ({
519
+ x: endX,
520
+ y: endY,
521
+ pathRotation: 0
522
+ })
523
+ });
524
+ return {
525
+ leg: pathLegOf(at, end, run),
526
+ rest: Rec.filter(to, (_, key) => Bool.not(Arr.contains(AXES, key)))
527
+ };
528
+ };
529
+ export const legsOf = (from, to, given, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured, current, rests) => {
530
+ // A Path (#438): `x` and `y` along it, on a leg of their own, and every other key as before.
531
+ const pathed = pathOf(from, to, given, reducedMotion, skipped, defaults, stops, current, rests);
532
+ if (Predicate.isNotUndefined(pathed)) {
533
+ return Arr.prepend(legsOf(from, pathed.rest, given, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured), pathed.leg);
534
+ }
535
+ // Each key on its own transition (#301): with entries, the keys go by the transition each runs on.
536
+ const entries = entriesOf(given);
537
+ if (Predicate.isUndefined(entries)) return legsOn(from, to, given, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured);
538
+ // With no value's entry (`layout` and `default` alone), every key runs on one transition.
539
+ if (Bool.not(entries.byValue)) return legsOn(from, to, forKey(entries, "default"), reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured);
540
+ const byTransition = new Map();
541
+ Arr.forEach(Rec.keys(to), key => {
542
+ const runsOn = forKey(entries, key);
543
+ const keys = byTransition.get(runsOn);
544
+ if (Predicate.isNotUndefined(keys)) {
545
+ keys[key] = to[key];
546
+ return;
547
+ }
548
+ byTransition.set(runsOn, {
549
+ [key]: to[key]
550
+ });
551
+ });
552
+ return Arr.flatMap(Arr.fromIterable(byTransition), ([runsOn, keys]) => legsOn(from, keys, runsOn, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured));
553
+ };
554
+ /** No legs: a Retarget with no key. */
555
+ const NO_LEGS = [];
556
+ /** Whether any key of `values` is a Measured pair (#430): per Retarget, so nothing made. */
557
+ const anyMeasured = (values, measured) => {
558
+ if (Predicate.isUndefined(measured)) return false;
559
+ return Rec.some(values, (_, key) => Object.hasOwn(measured, key));
560
+ };
561
+ /**
562
+ * Measured pairs' leg (#430): their ends in px, read at its first step, which comes a tick after the
563
+ * end-of-task batch that measures them. A tween runs a 0 → 1 progress (`keyframes`' options, so
564
+ * `times`, an `ease` per Interval and the Modifiers apply), a spring the px. Its last frame writes each
565
+ * target as given (`"auto"`, `"50%"`), as Motion's `finalKeyframe`, or each start as given when a turned
566
+ * `repeat` ends it there. A pair its batch couldn't read switches, as a Discrete pair does.
567
+ */
568
+ const measuredLegOf = (pairs, transition) => {
569
+ const to = Rec.map(pairs, pair => pair.to);
570
+ return {
571
+ _tag: "Blend",
572
+ to,
573
+ machine: () => Effect.succeed(measuredMachine(pairs, to, transition))
574
+ };
575
+ };
576
+ /** {@link measuredLegOf}'s machine: its step made at the first step, once the pairs are measured. */
577
+ const measuredMachine = (pairs, to, transition) => Machine.make({
578
+ settles: Bool.or(transition.type === "spring", Number.isFinite(UndefinedOr.match(transition.repeat, {
579
+ onUndefined: () => 0,
580
+ onDefined: identity
581
+ }))),
582
+ span: {
583
+ name: "wardic.measured",
584
+ attributes: {
585
+ keys: Rec.keys(pairs).length
586
+ }
587
+ },
588
+ start: () => {
589
+ let step;
590
+ return dt => {
591
+ if (Predicate.isUndefined(step)) step = measuredStep(pairs, to, transition);
592
+ return step(dt);
593
+ };
594
+ }
595
+ });
596
+ /** {@link measuredMachine}'s step, its pairs measured, or a switch when its batch couldn't read one. Per frame: one Frame a step. */
597
+ const measuredStep = (pairs, to, transition) => {
598
+ const all = Option.all(Rec.map(pairs, MeasuredPair.measured));
599
+ if (Option.isNone(all)) return () => ({
600
+ value: to,
601
+ done: true
602
+ });
603
+ const fromPx = Rec.map(all.value, pair => pair.fromPx);
604
+ const toPx = Rec.map(all.value, pair => pair.toPx);
605
+ if (transition.type === "spring") {
606
+ const spring = Machine.springValues(toPx, transition, {
607
+ from: fromPx
608
+ }).start();
609
+ return dt => {
610
+ const frame = spring(dt);
611
+ if (frame.done) return {
612
+ value: to,
613
+ done: true
614
+ };
615
+ return {
616
+ value: frame.value,
617
+ done: false
618
+ };
619
+ };
620
+ }
621
+ const options = transition;
622
+ const progress = Machine.keyframes([0, 1], options).start();
623
+ // A turned `repeat` can end it at its start (`ReducedMotion.endOf`): the starts as given then.
624
+ const end = Bool.match(ReducedMotion.endOf(false, true, options), {
625
+ onTrue: () => to,
626
+ onFalse: () => Rec.map(pairs, pair => pair.from)
627
+ });
628
+ return dt => {
629
+ const frame = progress(dt);
630
+ if (frame.done) return {
631
+ value: end,
632
+ done: true
633
+ };
634
+ return {
635
+ value: Rec.map(fromPx, (start, key) => start + (UndefinedOr.getOrThrow(toPx[key]) - start) * frame.value),
636
+ done: false
637
+ };
638
+ };
639
+ };
640
+ /** No numbers: a spring whose transition gives every key its velocity (#464). */
641
+ const NO_NUMBERS = {};
642
+ /** No values: the failed leg of Keyframes on a spring draws none (#429). */
643
+ const NO_VALUES = {};
644
+ /** Whether `key` has Keyframes of more than two stops in `stops` (#429): none without any. */
645
+ const hasStops = (stops, key) => {
646
+ if (Predicate.isUndefined(stops)) return false;
647
+ return Object.hasOwn(stops, key);
648
+ };
649
+ /** Whether any key of `values` has Keyframes of more than two stops (#429): per Retarget, so nothing made. */
650
+ const anyKeyframed = (values, stops) => {
651
+ if (Predicate.isUndefined(stops)) return false;
652
+ return Rec.some(values, (_, key) => Object.hasOwn(stops, key));
653
+ };
654
+ /** Each key's stops (#429): its Keyframes', or its start and target. */
655
+ const stopsFor = (from, to, stops) => Rec.map(to, (target, key) => {
656
+ if (hasStops(stops, key)) return stops[key];
657
+ return [UndefinedOr.getOrThrow(from[key]), target];
658
+ });
659
+ /**
660
+ * {@link legsOf} on one transition: as it runs, or, when it defines none, each key on its Default
661
+ * transition (ADR-0051), the keys that share one on one leg's worth.
662
+ */
663
+ const legsOn = (from, to, given, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured) => {
664
+ const run = runOf(given);
665
+ if (Predicate.isNotUndefined(run)) {
666
+ if (run.type === "inertia") return inertiaLegsOn(from, to, run, given, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured);
667
+ return legsWith(from, to, run, reducedMotion, skipped, positionalKeys, velocities, follow, stops, measured);
668
+ }
669
+ const keys = Rec.keys(to);
670
+ if (keys.length === 0) return NO_LEGS;
671
+ // Nearly always one Default transition for every key (a fade, a move): no grouping.
672
+ const first = defaultFor(defaults, UndefinedOr.getOrThrow(keys[0]), to, stops);
673
+ if (Arr.every(keys, key => defaultFor(defaults, key, to, stops) === first)) {
674
+ return legsWith(from, to, carried(first, given), reducedMotion, skipped, positionalKeys, velocities, follow, stops, measured);
675
+ }
676
+ const byDefault = new Map();
677
+ Arr.forEach(keys, key => {
678
+ const runsOn = defaultFor(defaults, key, to, stops);
679
+ const grouped = byDefault.get(runsOn);
680
+ if (Predicate.isNotUndefined(grouped)) {
681
+ grouped[key] = to[key];
682
+ return;
683
+ }
684
+ byDefault.set(runsOn, {
685
+ [key]: to[key]
686
+ });
687
+ });
688
+ return Arr.flatMap(Arr.fromIterable(byDefault), ([runsOn, grouped]) => legsWith(from, grouped, carried(runsOn, given), reducedMotion, skipped, positionalKeys, velocities, follow, stops, measured));
689
+ };
690
+ /**
691
+ * The Default transition `key` runs on (ADR-0051): its Environment's for it, toward its target, or,
692
+ * through Keyframes of more than two stops, its Environment's keyframes one (#429, Motion's).
693
+ */
694
+ const defaultFor = (defaults, key, to, stops) => {
695
+ if (hasStops(stops, key)) return defaults.keyframes;
696
+ return defaults.transitionFor(key, to[key]);
697
+ };
698
+ /**
699
+ * A Default transition with what the transition that defines none still says: its `delay` (a
700
+ * stagger's among it, ADR-0007), its reduced-motion opt-out and its `skipAnimations` (#468). The
701
+ * Default transition itself when it says none, as nearly every element's (it has no transition).
702
+ */
703
+ const carried = (runsOn, given) => {
704
+ if (Predicate.isUndefined(given)) return runsOn;
705
+ const {
706
+ delay,
707
+ respectReducedMotion,
708
+ skipAnimations
709
+ } = given;
710
+ // Per Retarget (#460): statements.
711
+ if (Predicate.isUndefined(delay) && Predicate.isUndefined(respectReducedMotion) && Predicate.isUndefined(skipAnimations)) return runsOn;
712
+ return {
713
+ ...runsOn,
714
+ ...Rec.filter({
715
+ delay,
716
+ respectReducedMotion,
717
+ skipAnimations
718
+ }, Predicate.isNotUndefined)
719
+ };
720
+ };
721
+ /** The keys reduced motion snaps (ADR-0029), when it applies; else none, every key animating. */
722
+ const reducedSplitOf = (to, applies, positionalKeys) => {
723
+ if (applies) return ReducedMotion.split(to, positionalKeys);
724
+ return {
725
+ positional: {},
726
+ rest: to
727
+ };
728
+ };
729
+ /** {@link legsOf} on one transition as it runs. */
730
+ const legsWith = (from, to, transition, reducedMotion, skipped, positionalKeys, velocities, follow, stops, measured) => {
731
+ // A **Skipped animation** (#468, Motion's `skipAnimations`): every key lands where its leg would end,
732
+ // on its first tick, with no delay and whatever reduced motion says. Keyframes land on their last
733
+ // stop, a turned `repeat` where it ends, a Measured pair on its target as given, and a return to a
734
+ // moving Live value on where it is now, its follower taking over once it lands.
735
+ // Per Retarget (#460, compose once): statements.
736
+ if (skipped || transition.skipAnimations === true) return [snapLeg(from, to, Rec.map(to, (target, key) => endOfLeg(from, target, key, transition, velocities)), NO_DELAY)];
737
+ // An inertia's numbers (#435): its other keys went to their Default transitions ({@link inertiaLegsOn}).
738
+ if (transition.type === "inertia") return inertiaLegsWith(from, to, transition, reducedMotion, positionalKeys, velocities, stops);
739
+ const useTween = transition.type === "tween";
740
+ // Reduced motion (ADR-0029): the positional keys snap to where their leg would end, holding
741
+ // through the delay it would hold, and the rest animate as they would. A transition opts out with
742
+ // `respectReducedMotion: false`.
743
+ const respects = transition.respectReducedMotion !== false;
744
+ const {
745
+ positional,
746
+ rest
747
+ } = reducedSplitOf(to, respects && reducedMotion, positionalKeys);
748
+ const snapping = hasKeys(positional);
749
+ let followingKeys = NO_KEYS;
750
+ if (Predicate.isNotUndefined(follow)) followingKeys = follow.keysOf(rest);
751
+ const following = followingKeys.length > 0;
752
+ let fixed = rest;
753
+ if (following) fixed = Rec.filter(rest, (_, key) => !Arr.contains(followingKeys, key));
754
+ // Built a leg at a time, once a Retarget (#69's PR 2: a Retarget is per element, so no spreads).
755
+ const legs = [];
756
+ // Measured pairs (#430): a leg of their own, between their ends in px, on this transition.
757
+ const measuring = anyMeasured(fixed, measured);
758
+ if (measuring) {
759
+ const kept = fixed;
760
+ const pairs = Rec.filter(measured, (_, key) => Object.hasOwn(kept, key));
761
+ legs.push(measuredLegOf(pairs, transition));
762
+ fixed = Rec.filter(kept, (_, key) => !Object.hasOwn(pairs, key));
763
+ }
764
+ if (useTween) {
765
+ // Its options as they are: a missing `duration` is core's 0.3 s, and the rest still apply (#107).
766
+ const options = transition;
767
+ // A tween's snap lands where the tween would end: `repeat` and `reverse` can end it at `from`, a
768
+ // Keyframes key's first stop (#429). Its delay alone is read: an `ease` per Interval isn't a tween's.
769
+ if (snapping) {
770
+ legs.push(snapLeg(from, positional, Rec.map(positional, (to, key) => ReducedMotion.endOf(UndefinedOr.getOrThrow(from[key]), to, options)), () => Machine.resolveTween(Rec.filter({
771
+ delay: options.delay
772
+ }, Predicate.isNotUndefined)).delay));
773
+ }
774
+ // A following return eases toward where its Live value is each frame, so it lands on it.
775
+ if (following) Arr.forEach(followingKeys, key => {
776
+ const start = from[key];
777
+ const target = UndefinedOr.getOrThrow(follow).targetOf(key, start);
778
+ legs.push({
779
+ _tag: "Follow",
780
+ key,
781
+ to: {
782
+ [key]: UndefinedOr.getOrThrow(rest[key])
783
+ },
784
+ machine: () => Machine.map(Machine.animate(0, 1, options), progress => ({
785
+ value: start + (target() - start) * progress.value,
786
+ done: progress.done
787
+ }))
788
+ });
789
+ });
790
+ // With every key snapped, following or measured, there's nothing left to tween.
791
+ if (!snapping && !following && !measuring || hasKeys(fixed)) {
792
+ // A key's Keyframes, or `times` or an `ease` per Interval, run every key through `keyframesValues`
793
+ // (#429), on one run, a target as its two stops.
794
+ if (anyKeyframed(fixed, stops) || keyframedOptions(options)) {
795
+ legs.push({
796
+ _tag: "Blend",
797
+ to: fixed,
798
+ machine: () => Machine.keyframesValues(stopsFor(from, fixed, stops), options)
799
+ });
800
+ return legs;
801
+ }
802
+ legs.push({
803
+ _tag: "Blend",
804
+ to: fixed,
805
+ machine: () => Machine.animateValues(Values.pick(from, fixed), fixed, options)
806
+ });
807
+ }
808
+ return legs;
809
+ }
810
+ // Spring (default): numeric keys via springValues (velocity-carrying Retarget); any string/colour
811
+ // keys via springBlend, the same spring on a 0→100 progress (ADR-0024, D5).
812
+ const springOpts = transition;
813
+ // Keyframes of more than two stops on a spring (#429): Motion's error, a leg that fails as it's
814
+ // built, and each such key snapped to its last stop.
815
+ if (anyKeyframed(fixed, stops)) {
816
+ const kept = fixed;
817
+ const many = Rec.filter(stops, (_, key) => Object.hasOwn(kept, key));
818
+ const ends = Rec.filter(kept, (_, key) => Object.hasOwn(many, key));
819
+ legs.push(snapLeg(from, ends, ends, () => Spring.resolve(springOpts).delay));
820
+ legs.push({
821
+ _tag: "Blend",
822
+ to: NO_VALUES,
823
+ machine: () => Effect.die(springStopsError(many))
824
+ });
825
+ fixed = Rec.filter(kept, (_, key) => !Object.hasOwn(many, key));
826
+ }
827
+ const {
828
+ numbers: numeric,
829
+ strings
830
+ } = Values.split(fixed);
831
+ // A spring settles at its target: the snap lands there.
832
+ if (snapping) legs.push(snapLeg(from, positional, positional, () => Spring.resolve(springOpts).delay));
833
+ // A following return chases its Live value, read each step, and settles at rest on it.
834
+ if (following) Arr.forEach(followingKeys, key => {
835
+ const start = from[key];
836
+ let velocity = springOpts.velocity;
837
+ if (Predicate.isUndefined(velocity)) velocity = velocities(key);
838
+ const chase = Machine.chase(UndefinedOr.getOrThrow(follow).targetOf(key, start), {
839
+ ...springOpts,
840
+ from: start,
841
+ velocity
842
+ });
843
+ legs.push({
844
+ _tag: "Follow",
845
+ key,
846
+ to: {
847
+ [key]: UndefinedOr.getOrThrow(rest[key])
848
+ },
849
+ machine: () => settling(chase)
850
+ });
851
+ });
852
+ if (hasKeys(numeric)) {
853
+ const fromNumeric = Rec.map(numeric, (_, key) => from[key]);
854
+ // Each key's own velocity, read now; none when the transition gives one, which every key then starts with.
855
+ let fromVelocity = NO_NUMBERS;
856
+ if (Predicate.isUndefined(springOpts.velocity)) fromVelocity = Rec.map(numeric, (_, key) => velocities(key));
857
+ legs.push({
858
+ _tag: "Numbers",
859
+ to: numeric,
860
+ machine: () => Machine.springValues(numeric, springOpts, {
861
+ from: fromNumeric,
862
+ velocity: fromVelocity
863
+ })
864
+ });
865
+ }
866
+ if (hasKeys(strings)) {
867
+ const fromStrings = Rec.map(strings, (_, key) => UndefinedOr.getOrThrow(from[key]));
868
+ legs.push({
869
+ _tag: "Blend",
870
+ to: strings,
871
+ machine: () => Machine.springBlend(fromStrings, strings, springOpts)
872
+ });
873
+ }
874
+ return legs;
875
+ };
876
+ /**
877
+ * `leg` with its machine run through `f`: started partway ({@link startingAt}), or through an
878
+ * **Imperative animation**'s Playhead (#433, `Playback.drive`).
879
+ */
880
+ export const mapMachine = (leg, f) => mapMachineMatch({
881
+ leg,
882
+ f
883
+ });
884
+ /** {@link mapMachine}'s cases, built once at module load: it runs per element at hydration (#69's PR 2). */
885
+ const mapMachineMatch = Match.type().pipe(Match.when({
886
+ leg: {
887
+ _tag: "Blend"
888
+ }
889
+ }, ({
890
+ leg,
891
+ f
892
+ }) => ({
893
+ ...leg,
894
+ machine: () => Effect.map(leg.machine(), f)
895
+ })), Match.orElse(({
896
+ leg,
897
+ f
898
+ }) => {
899
+ const plain = leg;
900
+ return {
901
+ ...plain,
902
+ machine: () => f(plain.machine())
903
+ };
904
+ }));
905
+ /**
906
+ * `leg`, started `at()` seconds in (`Machine.startAt`): a Handoff's first legs, which pick up an
907
+ * Appear animation where its CSS has got (#48, ADR-0044 decision 6).
908
+ */
909
+ export const startingAt = (leg, at) => mapMachine(leg, Machine.startAt(at));
910
+ /**
911
+ * Where `key`'s leg would end (#468): an inertia's where its glide rests (#435, `Inertia.restOf`), from
912
+ * its velocity, whatever its target; any other's at its target, or where a turned `repeat` ends.
913
+ */
914
+ const endOfLeg = (from, target, key, transition, velocities) => {
915
+ const start = UndefinedOr.getOrThrow(from[key]);
916
+ if (transition.type !== "inertia") return ReducedMotion.endOf(start, target, transition);
917
+ return Inertia.restOf(start, inertiaVelocityOf(transition, velocities, key), transition);
918
+ };
919
+ /** A key's velocity under an inertia (#435): the transition's `velocity`, else its own (#464). */
920
+ const inertiaVelocityOf = (run, velocities, key) => UndefinedOr.match(run.velocity, {
921
+ onUndefined: () => velocities(key),
922
+ onDefined: identity
923
+ });
924
+ /**
925
+ * {@link legsOf} on an inertia (#435, Q2): the numbers glide on it ({@link inertiaLegsWith}); every
926
+ * other key, and a return following a moving Live value, runs on its Default transition, as if the
927
+ * transition defined none for it, its `delay`, reduced-motion opt-out and `skipAnimations` kept.
928
+ */
929
+ const inertiaLegsOn = (from, to, run, given, reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured) => {
930
+ let followingKeys = NO_KEYS;
931
+ if (Predicate.isNotUndefined(follow)) followingKeys = follow.keysOf(to);
932
+ const glides = (target, key) => Bool.and(Bool.and(Predicate.isNumber(target), Predicate.isNumber(from[key])), Bool.not(Arr.contains(followingKeys, key)));
933
+ const numbers = Rec.filter(to, glides);
934
+ const rest = Rec.filter(to, (target, key) => Bool.not(glides(target, key)));
935
+ const legs = [];
936
+ if (hasKeys(numbers)) Arr.forEach(legsWith(from, numbers, run, reducedMotion, skipped, positionalKeys, velocities, undefined, stops, undefined), leg => legs.push(leg));
937
+ if (hasKeys(rest)) Arr.forEach(legsOn(from, rest, definingNone(given), reducedMotion, skipped, positionalKeys, defaults, velocities, follow, stops, measured), leg => legs.push(leg));
938
+ return legs;
939
+ };
940
+ /** A transition's fields that define none: its `delay`, reduced-motion opt-out and `skipAnimations`, on a Default transition. */
941
+ const definingNone = given => UndefinedOr.map(given, ({
942
+ delay,
943
+ respectReducedMotion,
944
+ skipAnimations
945
+ }) => Rec.filter({
946
+ delay,
947
+ respectReducedMotion,
948
+ skipAnimations
949
+ }, Predicate.isNotUndefined));
950
+ /**
951
+ * An inertia's legs over numbers (#435): each glides from where it is at its velocity, on
952
+ * `Machine.inertiaValues`, whatever its target. Under reduced motion its positional keys land where
953
+ * their glides rest, after its delay (ADR-0029); Keyframes of more than two stops fail, as a spring's
954
+ * (#429, Motion's two-keyframe invariant), each such key landing on its last stop.
955
+ */
956
+ const inertiaLegsWith = (from, to, run, reducedMotion, positionalKeys, velocities, stops) => {
957
+ const legs = [];
958
+ const delay = () => UndefinedOr.match(run.delay, {
959
+ onUndefined: () => 0,
960
+ onDefined: identity
961
+ });
962
+ let fixed = to;
963
+ if (anyKeyframed(fixed, stops)) {
964
+ const kept = fixed;
965
+ const many = Rec.filter(stops, (_, key) => Object.hasOwn(kept, key));
966
+ const ends = Rec.filter(kept, (_, key) => Object.hasOwn(many, key));
967
+ legs.push(snapLeg(from, ends, ends, delay));
968
+ legs.push({
969
+ _tag: "Blend",
970
+ to: NO_VALUES,
971
+ machine: () => Effect.die(springStopsError(many, "an inertia"))
972
+ });
973
+ fixed = Rec.filter(kept, (_, key) => !Object.hasOwn(many, key));
974
+ }
975
+ if (Bool.and(reducedMotion, run.respectReducedMotion !== false)) {
976
+ const {
977
+ positional,
978
+ rest
979
+ } = ReducedMotion.split(fixed, positionalKeys);
980
+ if (hasKeys(positional)) {
981
+ legs.push(snapLeg(from, positional, Rec.map(positional, (_, key) => Inertia.restOf(from[key], inertiaVelocityOf(run, velocities, key), run)), delay));
982
+ }
983
+ fixed = rest;
984
+ }
985
+ if (hasKeys(fixed)) {
986
+ const starts = Rec.map(fixed, (_, key) => from[key]);
987
+ // Each key's own velocity, read now (#464); none when the transition gives one, which every key then starts with.
988
+ const own = Bool.match(Predicate.isUndefined(run.velocity), {
989
+ onTrue: () => Rec.map(fixed, (_, key) => velocities(key)),
990
+ onFalse: () => NO_NUMBERS
991
+ });
992
+ legs.push({
993
+ _tag: "Numbers",
994
+ to: fixed,
995
+ machine: () => Machine.inertiaValues(starts, run, {
996
+ velocity: own
997
+ })
998
+ });
999
+ }
1000
+ return legs;
1001
+ };
1002
+ /** No delay: a Skipped animation's snap (#468). */
1003
+ const NO_DELAY = () => 0;
1004
+ /** The snap's leg: the positional keys, from where they are to `to`, after `delay()`. */
1005
+ const snapLeg = (from, positional, to, delay) => ({
1006
+ _tag: "Snap",
1007
+ keys: Rec.keys(positional),
1008
+ to: positional,
1009
+ machine: () => ReducedMotion.snap(Values.pick(from, positional), to, {
1010
+ delay: delay()
1011
+ })
1012
+ });
1013
+ /** `chase`, ending at its first Frame at rest on its target: a return to a moving Live value (#130). */
1014
+ const settling = chase => Machine.make({
1015
+ start: chase.start,
1016
+ settles: true,
1017
+ span: chase.span
1018
+ });
1019
+ //# sourceMappingURL=retarget-legs.js.map