@wardic/solid 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (510) hide show
  1. package/README.md +5 -2
  2. package/dist/browser/appear.js +42 -3
  3. package/dist/browser/appear.js.map +1 -1
  4. package/dist/browser/batch-handoff.js +2 -17
  5. package/dist/browser/batch-handoff.js.map +1 -1
  6. package/dist/browser/batch-reorder-group.js +40 -11
  7. package/dist/browser/batch-reorder-group.js.map +1 -1
  8. package/dist/browser/batch-reorder-places.js +517 -50
  9. package/dist/browser/batch-reorder-places.js.map +1 -1
  10. package/dist/browser/batch-reorder.js +284 -42
  11. package/dist/browser/batch-reorder.js.map +1 -1
  12. package/dist/browser/batch.js +4 -4
  13. package/dist/browser/batch.js.map +1 -1
  14. package/dist/browser/create-ward.js +28 -10
  15. package/dist/browser/create-ward.js.map +1 -1
  16. package/dist/browser/create-wardic.js +44 -0
  17. package/dist/browser/create-wardic.js.map +1 -0
  18. package/dist/browser/element.js +12 -3
  19. package/dist/browser/element.js.map +1 -1
  20. package/dist/browser/feature.js +57 -22
  21. package/dist/browser/feature.js.map +1 -1
  22. package/dist/browser/features/all.js +8 -0
  23. package/dist/browser/features/all.js.map +1 -1
  24. package/dist/browser/features/colors.js.map +1 -1
  25. package/dist/browser/features/dom-animation.js +8 -0
  26. package/dist/browser/features/dom-animation.js.map +1 -1
  27. package/dist/browser/features/dom-max.js +6 -0
  28. package/dist/browser/features/dom-max.js.map +1 -1
  29. package/dist/browser/features/drag.js.map +1 -1
  30. package/dist/browser/features/focus.js.map +1 -1
  31. package/dist/browser/features/hover.js.map +1 -1
  32. package/dist/browser/features/in-view.js.map +1 -1
  33. package/dist/browser/features/keys.js +6 -0
  34. package/dist/browser/features/keys.js.map +1 -1
  35. package/dist/browser/features/layout.js +14 -3
  36. package/dist/browser/features/layout.js.map +1 -1
  37. package/dist/browser/features/pan.js.map +1 -1
  38. package/dist/browser/features/press.js.map +1 -1
  39. package/dist/browser/features/scroll.js +10 -3
  40. package/dist/browser/features/scroll.js.map +1 -1
  41. package/dist/browser/features/timeline-keys.js +100 -0
  42. package/dist/browser/features/timeline-keys.js.map +1 -0
  43. package/dist/browser/imperative.js +182 -4
  44. package/dist/browser/imperative.js.map +1 -1
  45. package/dist/browser/index.js +2 -1
  46. package/dist/browser/index.js.map +1 -1
  47. package/dist/browser/instance-features.js +66 -0
  48. package/dist/browser/instance-features.js.map +1 -0
  49. package/dist/browser/layout-member.js +0 -2
  50. package/dist/browser/layout-member.js.map +1 -1
  51. package/dist/browser/layout-projection.js +8 -1
  52. package/dist/browser/layout-projection.js.map +1 -1
  53. package/dist/browser/layout.js +5 -6
  54. package/dist/browser/layout.js.map +1 -1
  55. package/dist/browser/live-scroll.js +29 -21
  56. package/dist/browser/live-scroll.js.map +1 -1
  57. package/dist/browser/live-style.js +10 -0
  58. package/dist/browser/live-style.js.map +1 -1
  59. package/dist/browser/live-value.js +11 -2
  60. package/dist/browser/live-value.js.map +1 -1
  61. package/dist/browser/member-hold.js +37 -7
  62. package/dist/browser/member-hold.js.map +1 -1
  63. package/dist/browser/messages.js +20 -0
  64. package/dist/browser/messages.js.map +1 -0
  65. package/dist/browser/presence-controller.js +136 -44
  66. package/dist/browser/presence-controller.js.map +1 -1
  67. package/dist/browser/presence-record.js.map +1 -1
  68. package/dist/browser/presence.js.map +1 -1
  69. package/dist/browser/provider.js +57 -11
  70. package/dist/browser/provider.js.map +1 -1
  71. package/dist/browser/reorder.js.map +1 -1
  72. package/dist/browser/runtime.js +15 -9
  73. package/dist/browser/runtime.js.map +1 -1
  74. package/dist/browser/scroll-values.js +46 -0
  75. package/dist/browser/scroll-values.js.map +1 -0
  76. package/dist/browser/spans-check.js +25 -0
  77. package/dist/browser/spans-check.js.map +1 -0
  78. package/dist/browser/spine.js +149 -207
  79. package/dist/browser/spine.js.map +1 -1
  80. package/dist/browser/timelines.js +9 -0
  81. package/dist/browser/timelines.js.map +1 -0
  82. package/dist/browser/unstable/v2/batch-reorder-group.js +36 -6
  83. package/dist/browser/unstable/v2/batch-reorder-group.js.map +1 -1
  84. package/dist/browser/unstable/v2/create-wardic.js +45 -0
  85. package/dist/browser/unstable/v2/create-wardic.js.map +1 -0
  86. package/dist/browser/unstable/v2/element.js +12 -2
  87. package/dist/browser/unstable/v2/element.js.map +1 -1
  88. package/dist/browser/unstable/v2/index.js +1 -0
  89. package/dist/browser/unstable/v2/index.js.map +1 -1
  90. package/dist/browser/unstable/v2/lifecycle.js +2 -0
  91. package/dist/browser/unstable/v2/lifecycle.js.map +1 -1
  92. package/dist/browser/unstable/v2/live-scroll.js +22 -13
  93. package/dist/browser/unstable/v2/live-scroll.js.map +1 -1
  94. package/dist/browser/unstable/v2/live-value.js +9 -1
  95. package/dist/browser/unstable/v2/live-value.js.map +1 -1
  96. package/dist/browser/unstable/v2/presence.js.map +1 -1
  97. package/dist/browser/unstable/v2/provider.js +60 -13
  98. package/dist/browser/unstable/v2/provider.js.map +1 -1
  99. package/dist/browser/unstable/v2/reorder.js.map +1 -1
  100. package/dist/browser/unstable/v2/w.js +7 -8
  101. package/dist/browser/unstable/v2/w.js.map +1 -1
  102. package/dist/browser/unstable/v2/ward.js +27 -9
  103. package/dist/browser/unstable/v2/ward.js.map +1 -1
  104. package/dist/browser/unstable/v2/wardic-instance.js +2 -0
  105. package/dist/browser/unstable/v2/wardic-instance.js.map +1 -0
  106. package/dist/browser/w.js +8 -9
  107. package/dist/browser/w.js.map +1 -1
  108. package/dist/browser/wardic-instance.js +2 -0
  109. package/dist/browser/wardic-instance.js.map +1 -0
  110. package/dist/server/appear.js +42 -3
  111. package/dist/server/appear.js.map +1 -1
  112. package/dist/server/batch-handoff.js +2 -17
  113. package/dist/server/batch-handoff.js.map +1 -1
  114. package/dist/server/batch-reorder-group.js +40 -11
  115. package/dist/server/batch-reorder-group.js.map +1 -1
  116. package/dist/server/batch-reorder-places.js +517 -50
  117. package/dist/server/batch-reorder-places.js.map +1 -1
  118. package/dist/server/batch-reorder.js +284 -42
  119. package/dist/server/batch-reorder.js.map +1 -1
  120. package/dist/server/batch.js +4 -4
  121. package/dist/server/batch.js.map +1 -1
  122. package/dist/server/create-ward.js +28 -10
  123. package/dist/server/create-ward.js.map +1 -1
  124. package/dist/server/create-wardic.js +44 -0
  125. package/dist/server/create-wardic.js.map +1 -0
  126. package/dist/server/element.js +12 -3
  127. package/dist/server/element.js.map +1 -1
  128. package/dist/server/feature.js +57 -22
  129. package/dist/server/feature.js.map +1 -1
  130. package/dist/server/features/all.js +8 -0
  131. package/dist/server/features/all.js.map +1 -1
  132. package/dist/server/features/colors.js.map +1 -1
  133. package/dist/server/features/dom-animation.js +8 -0
  134. package/dist/server/features/dom-animation.js.map +1 -1
  135. package/dist/server/features/dom-max.js +6 -0
  136. package/dist/server/features/dom-max.js.map +1 -1
  137. package/dist/server/features/drag.js.map +1 -1
  138. package/dist/server/features/focus.js.map +1 -1
  139. package/dist/server/features/hover.js.map +1 -1
  140. package/dist/server/features/in-view.js.map +1 -1
  141. package/dist/server/features/keys.js +6 -0
  142. package/dist/server/features/keys.js.map +1 -1
  143. package/dist/server/features/layout.js +14 -3
  144. package/dist/server/features/layout.js.map +1 -1
  145. package/dist/server/features/pan.js.map +1 -1
  146. package/dist/server/features/press.js.map +1 -1
  147. package/dist/server/features/scroll.js +10 -3
  148. package/dist/server/features/scroll.js.map +1 -1
  149. package/dist/server/features/timeline-keys.js +100 -0
  150. package/dist/server/features/timeline-keys.js.map +1 -0
  151. package/dist/server/imperative.js +182 -4
  152. package/dist/server/imperative.js.map +1 -1
  153. package/dist/server/index.js +2 -1
  154. package/dist/server/index.js.map +1 -1
  155. package/dist/server/instance-features.js +66 -0
  156. package/dist/server/instance-features.js.map +1 -0
  157. package/dist/server/layout-member.js +0 -2
  158. package/dist/server/layout-member.js.map +1 -1
  159. package/dist/server/layout-projection.js +8 -1
  160. package/dist/server/layout-projection.js.map +1 -1
  161. package/dist/server/layout.js +5 -6
  162. package/dist/server/layout.js.map +1 -1
  163. package/dist/server/live-scroll.js +29 -21
  164. package/dist/server/live-scroll.js.map +1 -1
  165. package/dist/server/live-style.js +10 -0
  166. package/dist/server/live-style.js.map +1 -1
  167. package/dist/server/live-value.js +11 -2
  168. package/dist/server/live-value.js.map +1 -1
  169. package/dist/server/member-hold.js +37 -7
  170. package/dist/server/member-hold.js.map +1 -1
  171. package/dist/server/messages.js +20 -0
  172. package/dist/server/messages.js.map +1 -0
  173. package/dist/server/presence-controller.js +136 -44
  174. package/dist/server/presence-controller.js.map +1 -1
  175. package/dist/server/presence-record.js.map +1 -1
  176. package/dist/server/presence.js.map +1 -1
  177. package/dist/server/provider.js +57 -11
  178. package/dist/server/provider.js.map +1 -1
  179. package/dist/server/reorder.js.map +1 -1
  180. package/dist/server/runtime.js +15 -9
  181. package/dist/server/runtime.js.map +1 -1
  182. package/dist/server/scroll-values.js +46 -0
  183. package/dist/server/scroll-values.js.map +1 -0
  184. package/dist/server/spans-check.js +25 -0
  185. package/dist/server/spans-check.js.map +1 -0
  186. package/dist/server/spine.js +149 -207
  187. package/dist/server/spine.js.map +1 -1
  188. package/dist/server/timelines.js +9 -0
  189. package/dist/server/timelines.js.map +1 -0
  190. package/dist/server/unstable/v2/batch-reorder-group.js +36 -6
  191. package/dist/server/unstable/v2/batch-reorder-group.js.map +1 -1
  192. package/dist/server/unstable/v2/create-wardic.js +45 -0
  193. package/dist/server/unstable/v2/create-wardic.js.map +1 -0
  194. package/dist/server/unstable/v2/element.js +12 -2
  195. package/dist/server/unstable/v2/element.js.map +1 -1
  196. package/dist/server/unstable/v2/index.js +1 -0
  197. package/dist/server/unstable/v2/index.js.map +1 -1
  198. package/dist/server/unstable/v2/lifecycle.js +2 -0
  199. package/dist/server/unstable/v2/lifecycle.js.map +1 -1
  200. package/dist/server/unstable/v2/live-scroll.js +22 -13
  201. package/dist/server/unstable/v2/live-scroll.js.map +1 -1
  202. package/dist/server/unstable/v2/live-value.js +9 -1
  203. package/dist/server/unstable/v2/live-value.js.map +1 -1
  204. package/dist/server/unstable/v2/presence.js.map +1 -1
  205. package/dist/server/unstable/v2/provider.js +60 -13
  206. package/dist/server/unstable/v2/provider.js.map +1 -1
  207. package/dist/server/unstable/v2/reorder.js.map +1 -1
  208. package/dist/server/unstable/v2/w.js +7 -8
  209. package/dist/server/unstable/v2/w.js.map +1 -1
  210. package/dist/server/unstable/v2/ward.js +27 -9
  211. package/dist/server/unstable/v2/ward.js.map +1 -1
  212. package/dist/server/unstable/v2/wardic-instance.js +2 -0
  213. package/dist/server/unstable/v2/wardic-instance.js.map +1 -0
  214. package/dist/server/w.js +8 -9
  215. package/dist/server/w.js.map +1 -1
  216. package/dist/server/wardic-instance.js +2 -0
  217. package/dist/server/wardic-instance.js.map +1 -0
  218. package/dist/solid/appear.d.ts +15 -2
  219. package/dist/solid/appear.d.ts.map +1 -1
  220. package/dist/solid/appear.js +43 -2
  221. package/dist/solid/appear.js.map +1 -1
  222. package/dist/solid/batch-handoff.d.ts.map +1 -1
  223. package/dist/solid/batch-handoff.js +2 -15
  224. package/dist/solid/batch-handoff.js.map +1 -1
  225. package/dist/solid/batch-reorder-group.d.ts +17 -15
  226. package/dist/solid/batch-reorder-group.d.ts.map +1 -1
  227. package/dist/solid/batch-reorder-group.jsx +37 -7
  228. package/dist/solid/batch-reorder-group.jsx.map +1 -1
  229. package/dist/solid/batch-reorder-places.d.ts +184 -23
  230. package/dist/solid/batch-reorder-places.d.ts.map +1 -1
  231. package/dist/solid/batch-reorder-places.js +397 -41
  232. package/dist/solid/batch-reorder-places.js.map +1 -1
  233. package/dist/solid/batch-reorder.d.ts +30 -1
  234. package/dist/solid/batch-reorder.d.ts.map +1 -1
  235. package/dist/solid/batch-reorder.js +298 -37
  236. package/dist/solid/batch-reorder.js.map +1 -1
  237. package/dist/solid/batch.d.ts.map +1 -1
  238. package/dist/solid/batch.js +4 -4
  239. package/dist/solid/batch.js.map +1 -1
  240. package/dist/solid/config.d.ts +141 -103
  241. package/dist/solid/config.d.ts.map +1 -1
  242. package/dist/solid/create-ward.d.ts +3 -1
  243. package/dist/solid/create-ward.d.ts.map +1 -1
  244. package/dist/solid/create-ward.jsx +29 -9
  245. package/dist/solid/create-ward.jsx.map +1 -1
  246. package/dist/solid/create-wardic.d.ts +24 -0
  247. package/dist/solid/create-wardic.d.ts.map +1 -0
  248. package/dist/solid/create-wardic.jsx +42 -0
  249. package/dist/solid/create-wardic.jsx.map +1 -0
  250. package/dist/solid/element.d.ts +26 -8
  251. package/dist/solid/element.d.ts.map +1 -1
  252. package/dist/solid/element.jsx +13 -5
  253. package/dist/solid/element.jsx.map +1 -1
  254. package/dist/solid/feature.d.ts +91 -3
  255. package/dist/solid/feature.d.ts.map +1 -1
  256. package/dist/solid/feature.js +48 -19
  257. package/dist/solid/feature.js.map +1 -1
  258. package/dist/solid/features/all.d.ts +9 -2
  259. package/dist/solid/features/all.d.ts.map +1 -1
  260. package/dist/solid/features/all.js +18 -1
  261. package/dist/solid/features/all.js.map +1 -1
  262. package/dist/solid/features/colors.d.ts +1 -1
  263. package/dist/solid/features/colors.d.ts.map +1 -1
  264. package/dist/solid/features/colors.js.map +1 -1
  265. package/dist/solid/features/dom-animation.d.ts +5 -2
  266. package/dist/solid/features/dom-animation.d.ts.map +1 -1
  267. package/dist/solid/features/dom-animation.js +8 -0
  268. package/dist/solid/features/dom-animation.js.map +1 -1
  269. package/dist/solid/features/dom-max.d.ts +2 -2
  270. package/dist/solid/features/dom-max.d.ts.map +1 -1
  271. package/dist/solid/features/dom-max.js +6 -0
  272. package/dist/solid/features/dom-max.js.map +1 -1
  273. package/dist/solid/features/drag.d.ts +1 -1
  274. package/dist/solid/features/drag.d.ts.map +1 -1
  275. package/dist/solid/features/drag.js.map +1 -1
  276. package/dist/solid/features/focus.d.ts +1 -1
  277. package/dist/solid/features/focus.d.ts.map +1 -1
  278. package/dist/solid/features/focus.js.map +1 -1
  279. package/dist/solid/features/hover.d.ts +1 -1
  280. package/dist/solid/features/hover.d.ts.map +1 -1
  281. package/dist/solid/features/hover.js.map +1 -1
  282. package/dist/solid/features/in-view.d.ts +1 -1
  283. package/dist/solid/features/in-view.d.ts.map +1 -1
  284. package/dist/solid/features/in-view.js.map +1 -1
  285. package/dist/solid/features/keys.d.ts +16 -1
  286. package/dist/solid/features/keys.d.ts.map +1 -1
  287. package/dist/solid/features/keys.js +7 -0
  288. package/dist/solid/features/keys.js.map +1 -1
  289. package/dist/solid/features/layout.d.ts +7 -1
  290. package/dist/solid/features/layout.d.ts.map +1 -1
  291. package/dist/solid/features/layout.js +14 -4
  292. package/dist/solid/features/layout.js.map +1 -1
  293. package/dist/solid/features/pan.d.ts +1 -1
  294. package/dist/solid/features/pan.d.ts.map +1 -1
  295. package/dist/solid/features/pan.js.map +1 -1
  296. package/dist/solid/features/press.d.ts +1 -1
  297. package/dist/solid/features/press.d.ts.map +1 -1
  298. package/dist/solid/features/press.js.map +1 -1
  299. package/dist/solid/features/scroll.d.ts +5 -3
  300. package/dist/solid/features/scroll.d.ts.map +1 -1
  301. package/dist/solid/features/scroll.js +12 -3
  302. package/dist/solid/features/scroll.js.map +1 -1
  303. package/dist/solid/features/timeline-keys.d.ts +7 -0
  304. package/dist/solid/features/timeline-keys.d.ts.map +1 -0
  305. package/dist/solid/features/timeline-keys.js +97 -0
  306. package/dist/solid/features/timeline-keys.js.map +1 -0
  307. package/dist/solid/imperative.d.ts +3 -3
  308. package/dist/solid/imperative.d.ts.map +1 -1
  309. package/dist/solid/imperative.js +146 -4
  310. package/dist/solid/imperative.js.map +1 -1
  311. package/dist/solid/index.d.ts +4 -2
  312. package/dist/solid/index.d.ts.map +1 -1
  313. package/dist/solid/index.jsx +2 -1
  314. package/dist/solid/index.jsx.map +1 -1
  315. package/dist/solid/instance-features.d.ts +7 -0
  316. package/dist/solid/instance-features.d.ts.map +1 -0
  317. package/dist/solid/instance-features.js +63 -0
  318. package/dist/solid/instance-features.js.map +1 -0
  319. package/dist/solid/layout-member.d.ts +0 -2
  320. package/dist/solid/layout-member.d.ts.map +1 -1
  321. package/dist/solid/layout-member.js +0 -2
  322. package/dist/solid/layout-member.js.map +1 -1
  323. package/dist/solid/layout-projection.d.ts +6 -0
  324. package/dist/solid/layout-projection.d.ts.map +1 -1
  325. package/dist/solid/layout-projection.jsx +8 -1
  326. package/dist/solid/layout-projection.jsx.map +1 -1
  327. package/dist/solid/layout.d.ts +4 -3
  328. package/dist/solid/layout.d.ts.map +1 -1
  329. package/dist/solid/layout.jsx +5 -6
  330. package/dist/solid/layout.jsx.map +1 -1
  331. package/dist/solid/live-scroll.d.ts +4 -0
  332. package/dist/solid/live-scroll.d.ts.map +1 -1
  333. package/dist/solid/live-scroll.jsx +29 -19
  334. package/dist/solid/live-scroll.jsx.map +1 -1
  335. package/dist/solid/live-style.d.ts +11 -0
  336. package/dist/solid/live-style.d.ts.map +1 -1
  337. package/dist/solid/live-style.js +10 -0
  338. package/dist/solid/live-style.js.map +1 -1
  339. package/dist/solid/live-value.d.ts +1 -0
  340. package/dist/solid/live-value.d.ts.map +1 -1
  341. package/dist/solid/live-value.jsx +12 -3
  342. package/dist/solid/live-value.jsx.map +1 -1
  343. package/dist/solid/member-hold.d.ts +5 -19
  344. package/dist/solid/member-hold.d.ts.map +1 -1
  345. package/dist/solid/member-hold.js +42 -7
  346. package/dist/solid/member-hold.js.map +1 -1
  347. package/dist/solid/messages.d.ts +20 -0
  348. package/dist/solid/messages.d.ts.map +1 -0
  349. package/dist/solid/messages.js +22 -0
  350. package/dist/solid/messages.js.map +1 -0
  351. package/dist/solid/presence-controller.d.ts +1 -1
  352. package/dist/solid/presence-controller.d.ts.map +1 -1
  353. package/dist/solid/presence-controller.js +125 -34
  354. package/dist/solid/presence-controller.js.map +1 -1
  355. package/dist/solid/presence-record.d.ts +3 -3
  356. package/dist/solid/presence-record.d.ts.map +1 -1
  357. package/dist/solid/presence-record.js.map +1 -1
  358. package/dist/solid/presence.d.ts +3 -1
  359. package/dist/solid/presence.d.ts.map +1 -1
  360. package/dist/solid/presence.jsx.map +1 -1
  361. package/dist/solid/provider.d.ts +17 -3
  362. package/dist/solid/provider.d.ts.map +1 -1
  363. package/dist/solid/provider.jsx +55 -7
  364. package/dist/solid/provider.jsx.map +1 -1
  365. package/dist/solid/reorder.d.ts +5 -4
  366. package/dist/solid/reorder.d.ts.map +1 -1
  367. package/dist/solid/reorder.jsx.map +1 -1
  368. package/dist/solid/runtime.d.ts +10 -2
  369. package/dist/solid/runtime.d.ts.map +1 -1
  370. package/dist/solid/runtime.js +15 -9
  371. package/dist/solid/runtime.js.map +1 -1
  372. package/dist/solid/scroll-values.d.ts +30 -0
  373. package/dist/solid/scroll-values.d.ts.map +1 -0
  374. package/dist/solid/scroll-values.js +44 -0
  375. package/dist/solid/scroll-values.js.map +1 -0
  376. package/dist/solid/spans-check.d.ts +4 -0
  377. package/dist/solid/spans-check.d.ts.map +1 -0
  378. package/dist/solid/spans-check.js +23 -0
  379. package/dist/solid/spans-check.js.map +1 -0
  380. package/dist/solid/spine.d.ts +144 -13
  381. package/dist/solid/spine.d.ts.map +1 -1
  382. package/dist/solid/spine.js +131 -183
  383. package/dist/solid/spine.js.map +1 -1
  384. package/dist/solid/timelines.d.ts +44 -0
  385. package/dist/solid/timelines.d.ts.map +1 -0
  386. package/dist/solid/timelines.js +10 -0
  387. package/dist/solid/timelines.js.map +1 -0
  388. package/dist/solid/unstable/v2/batch-reorder-group.d.ts +18 -17
  389. package/dist/solid/unstable/v2/batch-reorder-group.d.ts.map +1 -1
  390. package/dist/solid/unstable/v2/batch-reorder-group.jsx +32 -5
  391. package/dist/solid/unstable/v2/batch-reorder-group.jsx.map +1 -1
  392. package/dist/solid/unstable/v2/create-wardic.d.ts +25 -0
  393. package/dist/solid/unstable/v2/create-wardic.d.ts.map +1 -0
  394. package/dist/solid/unstable/v2/create-wardic.jsx +43 -0
  395. package/dist/solid/unstable/v2/create-wardic.jsx.map +1 -0
  396. package/dist/solid/unstable/v2/element.d.ts +52 -18
  397. package/dist/solid/unstable/v2/element.d.ts.map +1 -1
  398. package/dist/solid/unstable/v2/element.jsx +13 -4
  399. package/dist/solid/unstable/v2/element.jsx.map +1 -1
  400. package/dist/solid/unstable/v2/index.d.ts +3 -1
  401. package/dist/solid/unstable/v2/index.d.ts.map +1 -1
  402. package/dist/solid/unstable/v2/index.jsx +1 -0
  403. package/dist/solid/unstable/v2/index.jsx.map +1 -1
  404. package/dist/solid/unstable/v2/lifecycle.d.ts +29 -0
  405. package/dist/solid/unstable/v2/lifecycle.d.ts.map +1 -1
  406. package/dist/solid/unstable/v2/lifecycle.js +2 -0
  407. package/dist/solid/unstable/v2/lifecycle.js.map +1 -1
  408. package/dist/solid/unstable/v2/live-scroll.d.ts +4 -0
  409. package/dist/solid/unstable/v2/live-scroll.d.ts.map +1 -1
  410. package/dist/solid/unstable/v2/live-scroll.jsx +22 -11
  411. package/dist/solid/unstable/v2/live-scroll.jsx.map +1 -1
  412. package/dist/solid/unstable/v2/live-value.d.ts +1 -0
  413. package/dist/solid/unstable/v2/live-value.d.ts.map +1 -1
  414. package/dist/solid/unstable/v2/live-value.jsx +10 -1
  415. package/dist/solid/unstable/v2/live-value.jsx.map +1 -1
  416. package/dist/solid/unstable/v2/presence.d.ts +3 -1
  417. package/dist/solid/unstable/v2/presence.d.ts.map +1 -1
  418. package/dist/solid/unstable/v2/presence.jsx.map +1 -1
  419. package/dist/solid/unstable/v2/provider.d.ts +17 -3
  420. package/dist/solid/unstable/v2/provider.d.ts.map +1 -1
  421. package/dist/solid/unstable/v2/provider.jsx +58 -10
  422. package/dist/solid/unstable/v2/provider.jsx.map +1 -1
  423. package/dist/solid/unstable/v2/reorder.d.ts +4 -3
  424. package/dist/solid/unstable/v2/reorder.d.ts.map +1 -1
  425. package/dist/solid/unstable/v2/reorder.jsx.map +1 -1
  426. package/dist/solid/unstable/v2/w.d.ts +41 -10
  427. package/dist/solid/unstable/v2/w.d.ts.map +1 -1
  428. package/dist/solid/unstable/v2/w.jsx +5 -7
  429. package/dist/solid/unstable/v2/w.jsx.map +1 -1
  430. package/dist/solid/unstable/v2/ward.d.ts +15 -8
  431. package/dist/solid/unstable/v2/ward.d.ts.map +1 -1
  432. package/dist/solid/unstable/v2/ward.jsx +28 -8
  433. package/dist/solid/unstable/v2/ward.jsx.map +1 -1
  434. package/dist/solid/unstable/v2/wardic-instance.d.ts +47 -0
  435. package/dist/solid/unstable/v2/wardic-instance.d.ts.map +1 -0
  436. package/dist/solid/unstable/v2/wardic-instance.js +2 -0
  437. package/dist/solid/unstable/v2/wardic-instance.js.map +1 -0
  438. package/dist/solid/w.d.ts +24 -10
  439. package/dist/solid/w.d.ts.map +1 -1
  440. package/dist/solid/w.jsx +8 -7
  441. package/dist/solid/w.jsx.map +1 -1
  442. package/dist/solid/ward-keys.d.ts +22 -3
  443. package/dist/solid/ward-keys.d.ts.map +1 -1
  444. package/dist/solid/wardic-instance.d.ts +46 -0
  445. package/dist/solid/wardic-instance.d.ts.map +1 -0
  446. package/dist/solid/wardic-instance.js +2 -0
  447. package/dist/solid/wardic-instance.js.map +1 -0
  448. package/package.json +4 -4
  449. package/src/appear.ts +56 -2
  450. package/src/batch-handoff.ts +2 -16
  451. package/src/batch-reorder-group.tsx +47 -21
  452. package/src/batch-reorder-places.ts +566 -54
  453. package/src/batch-reorder.ts +333 -40
  454. package/src/batch.ts +4 -4
  455. package/src/config.ts +177 -123
  456. package/src/create-ward.tsx +32 -8
  457. package/src/create-wardic.tsx +45 -0
  458. package/src/element.tsx +52 -16
  459. package/src/feature.ts +157 -25
  460. package/src/features/all.ts +11 -2
  461. package/src/features/colors.ts +1 -1
  462. package/src/features/dom-animation.ts +2 -2
  463. package/src/features/dom-max.ts +1 -2
  464. package/src/features/drag.ts +1 -1
  465. package/src/features/focus.ts +1 -1
  466. package/src/features/hover.ts +1 -1
  467. package/src/features/in-view.ts +1 -1
  468. package/src/features/keys.ts +18 -1
  469. package/src/features/layout.ts +17 -5
  470. package/src/features/pan.ts +1 -1
  471. package/src/features/press.ts +1 -1
  472. package/src/features/scroll.ts +14 -4
  473. package/src/features/timeline-keys.ts +109 -0
  474. package/src/imperative.ts +168 -10
  475. package/src/index.tsx +6 -1
  476. package/src/instance-features.ts +88 -0
  477. package/src/layout-member.ts +0 -4
  478. package/src/layout-projection.tsx +10 -1
  479. package/src/layout.tsx +7 -6
  480. package/src/live-scroll.tsx +30 -22
  481. package/src/live-style.ts +21 -0
  482. package/src/live-value.tsx +12 -2
  483. package/src/member-hold.ts +45 -26
  484. package/src/messages.ts +27 -0
  485. package/src/presence-controller.ts +222 -106
  486. package/src/presence-record.ts +3 -3
  487. package/src/presence.tsx +3 -1
  488. package/src/provider.tsx +62 -7
  489. package/src/reorder.tsx +5 -4
  490. package/src/runtime.ts +17 -10
  491. package/src/scroll-values.ts +53 -0
  492. package/src/spans-check.ts +25 -0
  493. package/src/spine.ts +219 -187
  494. package/src/timelines.ts +46 -0
  495. package/src/unstable/v2/batch-reorder-group.tsx +42 -18
  496. package/src/unstable/v2/create-wardic.tsx +46 -0
  497. package/src/unstable/v2/element.tsx +85 -24
  498. package/src/unstable/v2/index.tsx +5 -0
  499. package/src/unstable/v2/lifecycle.ts +35 -0
  500. package/src/unstable/v2/live-scroll.tsx +22 -11
  501. package/src/unstable/v2/live-value.tsx +10 -0
  502. package/src/unstable/v2/presence.tsx +3 -1
  503. package/src/unstable/v2/provider.tsx +65 -9
  504. package/src/unstable/v2/reorder.tsx +9 -4
  505. package/src/unstable/v2/w.tsx +49 -13
  506. package/src/unstable/v2/ward.tsx +48 -13
  507. package/src/unstable/v2/wardic-instance.ts +50 -0
  508. package/src/w.tsx +33 -16
  509. package/src/ward-keys.ts +38 -17
  510. package/src/wardic-instance.ts +49 -0
package/src/config.ts CHANGED
@@ -431,13 +431,8 @@ export type WardicLayoutBox = Box.Box
431
431
  */
432
432
  export type WardicTransformTemplate = DomRenderer.TransformTemplate
433
433
 
434
- /**
435
- * The motion props a Wardic element takes, and the config a ward is made with: what it animates,
436
- * when, how, and what it tells you. Motion's props, by Motion's names.
437
- *
438
- * @see https://wardic.dev/reference/solid/elements/props
439
- */
440
- export interface WardConfig {
434
+ /** The motion props every element takes, whatever its Features: {@link WardConfig}'s base group (#516). */
435
+ export interface WardBaseConfig {
441
436
  /**
442
437
  * Where the element starts: values, a `variants` name, or `false` to start at `animate`, so nothing
443
438
  * animates as it mounts. On a server-rendered page, the element arrives in the HTML at `initial`.
@@ -490,6 +485,70 @@ export interface WardConfig {
490
485
  // #50. By default a Variant child (variants, no initial/animate name of its own) joins its nearest
491
486
  // ancestor with variants (CONTEXT.md).
492
487
  readonly inherit?: boolean
488
+ /**
489
+ * How the element moves to a target: a spring (`stiffness`, `damping`, `mass`, or `duration` and
490
+ * `bounce`), a tween (`duration`, `ease`), keyframes' `times`, or `inertia`, with `delay`, `repeat`
491
+ * and, for variants, `staggerChildren` and `when`. A value's own (`opacity: {…}`) or `layout`'s apply
492
+ * to it alone. Without one, each value gets Motion's default.
493
+ *
494
+ * @example <w.div transition={{ type: "spring", stiffness: 300, damping: 20 }} />
495
+ * @see https://wardic.dev/guides/transitions
496
+ */
497
+ // Per-value entries: ADR-0049. Default transitions: ADR-0051.
498
+ readonly transition?: WardicTransition
499
+ /**
500
+ * Where the element animates as it leaves an `<AnimatePresence>`: values or a `variants` name. The
501
+ * element stays on the page until it has played.
502
+ *
503
+ * @example <w.div exit={{ opacity: 0, scale: 0.9 }} />
504
+ */
505
+ // ADR-0007: the child doesn't drive it (it's disposed); its spine publishes the exit into the
506
+ // presence registration, and the presence runs it on the retained node. A dynamic variant resolves
507
+ // as it leaves (#277); its own transition, else the element's.
508
+ readonly exit?: WardicVariant | WardicVariantLabels
509
+ /**
510
+ * Called when an animation of the element starts, with what it animates to: the variant name, or
511
+ * the values. Not for a layout animation, which has its own. Solid 1's.
512
+ */
513
+ // #257: at each Retarget that starts one (animate, its variant, a gesture layer turning on or off).
514
+ // Not for a same-target change, a drag's momentum or return. Read at that Retarget.
515
+ readonly onAnimationStart?: (definition: WardicAnimationDefinition) => void
516
+ /**
517
+ * Called when that animation lands, with the same definition, once every value it moves has
518
+ * settled. Not for one interrupted by a new target. Solid 1; on Solid 2, the element's ward gives
519
+ * `next("settled")`.
520
+ */
521
+ // #257. Read at the Retarget that started it.
522
+ readonly onAnimationComplete?: (definition: WardicAnimationDefinition) => void
523
+ /**
524
+ * Called once a frame in which the element's values changed, with every value it holds (`x` as a
525
+ * number). The object is reused: read it during the call, or copy it. For one value, `ward.read(key)`
526
+ * on Solid 2, or `ward.value(key)` on Solid 1, costs less.
527
+ */
528
+ // #233. After that frame's commits, before it's drawn. Whether it reports is read once at mount; the
529
+ // function at each call. A signal it sets paints in the next frame.
530
+ readonly onUpdate?: (latest: Readonly<Record<string, number | string>>) => void
531
+ /**
532
+ * Builds the element's whole `transform` from its values and the one Wardic would draw, wherever
533
+ * it's drawn: at rest, animating, on the server and during a layout animation.
534
+ *
535
+ * @example <w.div transformTemplate={(_, generated) => `translate(-50%, -50%) ${generated}`} />
536
+ */
537
+ // #443, a Transform template. See WardicTransformTemplate for what it's handed. Whether it has one is
538
+ // read at mount; the function each frame.
539
+ readonly transformTemplate?: WardicTransformTemplate
540
+ /**
541
+ * `false`: on a server-rendered page, this element's entrance waits for the JavaScript instead of
542
+ * playing from the first paint. The provider's `appear` sets it for every element.
543
+ *
544
+ * @see https://wardic.dev/guides/server-rendering
545
+ */
546
+ // #48, ADR-0044. Read on the server, once.
547
+ readonly appear?: boolean
548
+ }
549
+
550
+ /** The motion props the `hover` Feature reads: {@link WardConfig}'s `hover` group (#516). */
551
+ export interface WardHoverConfig {
493
552
  /**
494
553
  * Where the element animates while the pointer is over it, and back when it leaves: values or a
495
554
  * `variants` name, which children with `variants` follow too. Needs the `hover` Feature.
@@ -499,6 +558,18 @@ export interface WardConfig {
499
558
  // Priority: under whileTap and whileDrag, over whileFocus and whileInView. Names reach Variant
500
559
  // children (#291).
501
560
  readonly whileHover?: WardicVariant | WardicVariantLabels
561
+ // Motion's gesture callbacks (#273, ADR-0047): `(event, info)`, the DOM's PointerEvent first, called
562
+ // at the event, `info.point` in the viewport (not Motion's page). A hover's or a tap's starts its
563
+ // recognizer, as a while* does, set at mount or later. Solid 1's: Solid 2 hears the same through
564
+ // next(name). One that throws is reported, and the gesture goes on.
565
+ /** Called when the pointer comes over the element (a touch never hovers). Solid 1; Solid 2's ward gives `"hoverStart"`. */
566
+ readonly onHoverStart?: (event: PointerEvent, info: WardicPointInfo) => void
567
+ /** Called when the pointer leaves the element. Solid 1; Solid 2's ward gives `"hoverEnd"`. */
568
+ readonly onHoverEnd?: (event: PointerEvent, info: WardicPointInfo) => void
569
+ }
570
+
571
+ /** The motion props the `press` Feature reads: {@link WardConfig}'s `press` group (#516). */
572
+ export interface WardPressConfig {
502
573
  /**
503
574
  * Where the element animates while it's pressed, by a pointer or by Enter or Space while it has
504
575
  * focus. Needs the `press` Feature.
@@ -515,19 +586,40 @@ export interface WardConfig {
515
586
  // element with a press claims; drags hold their own Drag claim.
516
587
  readonly propagate?: WardicPropagate
517
588
  /**
518
- * Where the element animates while it's in view, as `viewport` defines it. Needs the `inView`
519
- * Feature.
520
- *
521
- * @example <w.div whileInView={{ opacity: 1 }} viewport={{ once: true }} />
589
+ * Called when a press begins on the element: a pointer going down, or Enter or Space while it has
590
+ * focus (`info.input` says which). Solid 1; Solid 2's ward gives `"pressStart"`.
522
591
  */
523
- // #273, ADR-0047. Under whileFocus and the pointer gestures.
524
- readonly whileInView?: WardicVariant | WardicVariantLabels
592
+ // Keyboard presses: #427.
593
+ readonly onTapStart?: (event: WardicPressEvent, info: WardicPressInfo) => void
594
+ /** Called when that press ends on the element: a release on it, or its key coming up. Solid 1; Solid 2's ward gives `"tap"`. */
595
+ readonly onTap?: (event: WardicPressEvent, info: WardicPressInfo) => void
596
+ /**
597
+ * Called when that press ends anywhere else, or is cancelled. A press a drag took over is neither a
598
+ * tap nor a cancel. Solid 1; Solid 2's ward gives `"tapCancel"`.
599
+ */
600
+ readonly onTapCancel?: (event: WardicPressEvent, info: WardicPressInfo) => void
601
+ }
602
+
603
+ /** The motion props the `focus` Feature reads: {@link WardConfig}'s `focus` group (#516). */
604
+ export interface WardFocusConfig {
525
605
  /**
526
606
  * Where the element animates while it has the keyboard's focus (as `:focus-visible` shows it, not
527
607
  * a click's). Needs the `focus` Feature.
528
608
  */
529
609
  // #273. Under the pointer gestures, over whileInView.
530
610
  readonly whileFocus?: WardicVariant | WardicVariantLabels
611
+ }
612
+
613
+ /** The motion props the `inView` Feature reads: {@link WardConfig}'s `inView` group (#516). */
614
+ export interface WardInViewConfig {
615
+ /**
616
+ * Where the element animates while it's in view, as `viewport` defines it. Needs the `inView`
617
+ * Feature.
618
+ *
619
+ * @example <w.div whileInView={{ opacity: 1 }} viewport={{ once: true }} />
620
+ */
621
+ // #273, ADR-0047. Under whileFocus and the pointer gestures.
622
+ readonly whileInView?: WardicVariant | WardicVariantLabels
531
623
  /**
532
624
  * What "in view" means for `whileInView` and the viewport callbacks: `root`, a scrolling container
533
625
  * (the window if none); `margin`, grown around it, as CSS `rootMargin`; `amount` of the element that
@@ -535,6 +627,33 @@ export interface WardConfig {
535
627
  */
536
628
  // #273. Read when the recognizer starts.
537
629
  readonly viewport?: WardicViewport
630
+ /** Called when the element comes into view, as `viewport` defines it, with the browser's `IntersectionObserverEntry`. Solid 1; Solid 2's ward gives `"viewportEnter"`. */
631
+ readonly onViewportEnter?: (entry: IntersectionObserverEntry) => void
632
+ /** Called when the element leaves the view. With `viewport.once`, never after the first entry. Solid 1; Solid 2's ward gives `"viewportLeave"`. */
633
+ readonly onViewportLeave?: (entry: IntersectionObserverEntry) => void
634
+ }
635
+
636
+ /** The motion props the `pan` Feature reads: {@link WardConfig}'s `pan` group (#516). */
637
+ export interface WardPanConfig {
638
+ /**
639
+ * Called when a pointer goes down on the element, ready to pan. A pan moves nothing itself: read
640
+ * its offset and velocity in `onPan`. On a touch screen, give the element a `touch-action`, such as
641
+ * `pan-y` for a sideways pan, or the page's scroll takes the gesture. Solid 1; Solid 2's ward gives
642
+ * `"panSessionStart"`.
643
+ */
644
+ // Once started, a pan counts as a drag for the element's press and hover: a press it took over is
645
+ // neither a tap nor a cancel (ADR-0047).
646
+ readonly onPanSessionStart?: (event: PointerEvent, info: WardicPointInfo) => void
647
+ /** Called when a pan starts, past its threshold. Solid 1; Solid 2's ward gives `"panStart"`. */
648
+ readonly onPanStart?: (event: PointerEvent, info: WardicDragInfo) => void
649
+ /** Called as the pan moves: at its start, and each move after. Solid 1; Solid 2's ward gives `"pan"`. */
650
+ readonly onPan?: (event: PointerEvent, info: WardicDragInfo) => void
651
+ /** Called when a pan that started ends, or is cancelled. Solid 1; Solid 2's ward gives `"panEnd"`. */
652
+ readonly onPanEnd?: (event: PointerEvent, info: WardicDragInfo) => void
653
+ }
654
+
655
+ /** The motion props the `drag` Feature reads: {@link WardConfig}'s `drag` group (#516). */
656
+ export interface WardDragConfig {
538
657
  /**
539
658
  * Makes the element draggable: `true` on both axes, `"x"` or `"y"` on one. On release it carries on
540
659
  * at the speed it was let go, a Fling, and slows to a stop. Needs the `drag` Feature.
@@ -615,27 +734,20 @@ export interface WardConfig {
615
734
  */
616
735
  // #431. Read once at mount.
617
736
  readonly dragListener?: boolean
618
- /**
619
- * How the element moves to a target: a spring (`stiffness`, `damping`, `mass`, or `duration` and
620
- * `bounce`), a tween (`duration`, `ease`), keyframes' `times`, or `inertia`, with `delay`, `repeat`
621
- * and, for variants, `staggerChildren` and `when`. A value's own (`opacity: {…}`) or `layout`'s apply
622
- * to it alone. Without one, each value gets Motion's default.
623
- *
624
- * @example <w.div transition={{ type: "spring", stiffness: 300, damping: 20 }} />
625
- * @see https://wardic.dev/guides/transitions
626
- */
627
- // Per-value entries: ADR-0049. Default transitions: ADR-0051.
628
- readonly transition?: WardicTransition
629
- /**
630
- * Where the element animates as it leaves an `<AnimatePresence>`: values or a `variants` name. The
631
- * element stays on the page until it has played.
632
- *
633
- * @example <w.div exit={{ opacity: 0, scale: 0.9 }} />
634
- */
635
- // ADR-0007: the child doesn't drive it (it's disposed); its spine publishes the exit into the
636
- // presence registration, and the presence runs it on the retained node. A dynamic variant resolves
637
- // as it leaves (#277); its own transition, else the element's.
638
- readonly exit?: WardicVariant | WardicVariantLabels
737
+ /** Called when a drag of the element starts. Solid 1; Solid 2's ward gives `"dragStart"`. */
738
+ readonly onDragStart?: (event: PointerEvent, info: WardicDragInfo) => void
739
+ /** Called as the drag moves: at its start, and each move after. Solid 1; Solid 2's ward gives `"drag"`. */
740
+ readonly onDrag?: (event: PointerEvent, info: WardicDragInfo) => void
741
+ /** Called when the drag is let go. Solid 1; Solid 2's ward gives `"dragEnd"`. */
742
+ readonly onDragEnd?: (event: PointerEvent, info: WardicDragInfo) => void
743
+ /** Called when the element comes to rest after it's let go. Not when a new grab stops it. Solid 1; Solid 2's ward gives `"dragTransitionEnd"`. */
744
+ readonly onDragTransitionEnd?: () => void
745
+ /** With `dragDirectionLock`: called with the axis a drag locked to, before `onDragStart`. Solid 1; Solid 2's ward gives `"directionLock"`. */
746
+ readonly onDirectionLock?: (axis: "x" | "y") => void
747
+ }
748
+
749
+ /** The motion props the `layout` Feature reads: {@link WardConfig}'s `layout` group (#516). */
750
+ export interface WardLayoutConfig {
639
751
  /**
640
752
  * Animates the element's layout: when its size or place on the page changes, by its own layout or
641
753
  * its siblings', it moves there smoothly instead of jumping. `"position"` or `"size"` animates only
@@ -695,70 +807,6 @@ export interface WardConfig {
695
807
  */
696
808
  // #442, ADR-0010. Read as each handover begins; only the twin that becomes the Lead reads it.
697
809
  readonly layoutCrossfade?: boolean
698
- /**
699
- * Called when an animation of the element starts, with what it animates to: the variant name, or
700
- * the values. Not for a layout animation, which has its own. Solid 1's.
701
- */
702
- // #257: at each Retarget that starts one (animate, its variant, a gesture layer turning on or off).
703
- // Not for a same-target change, a drag's momentum or return. Read at that Retarget.
704
- readonly onAnimationStart?: (definition: WardicAnimationDefinition) => void
705
- /**
706
- * Called when that animation lands, with the same definition, once every value it moves has
707
- * settled. Not for one interrupted by a new target. Solid 1; on Solid 2, the element's ward gives
708
- * `next("settled")`.
709
- */
710
- // #257. Read at the Retarget that started it.
711
- readonly onAnimationComplete?: (definition: WardicAnimationDefinition) => void
712
- // Motion's gesture callbacks (#273, ADR-0047): `(event, info)`, the DOM's PointerEvent first, called
713
- // at the event, `info.point` in the viewport (not Motion's page). A hover's or a tap's starts its
714
- // recognizer, as a while* does, set at mount or later. Solid 1's: Solid 2 hears the same through
715
- // next(name). One that throws is reported, and the gesture goes on.
716
- /** Called when the pointer comes over the element (a touch never hovers). Solid 1; Solid 2's ward gives `"hoverStart"`. */
717
- readonly onHoverStart?: (event: PointerEvent, info: WardicPointInfo) => void
718
- /** Called when the pointer leaves the element. Solid 1; Solid 2's ward gives `"hoverEnd"`. */
719
- readonly onHoverEnd?: (event: PointerEvent, info: WardicPointInfo) => void
720
- /**
721
- * Called when a press begins on the element: a pointer going down, or Enter or Space while it has
722
- * focus (`info.input` says which). Solid 1; Solid 2's ward gives `"pressStart"`.
723
- */
724
- // Keyboard presses: #427.
725
- readonly onTapStart?: (event: WardicPressEvent, info: WardicPressInfo) => void
726
- /** Called when that press ends on the element: a release on it, or its key coming up. Solid 1; Solid 2's ward gives `"tap"`. */
727
- readonly onTap?: (event: WardicPressEvent, info: WardicPressInfo) => void
728
- /**
729
- * Called when that press ends anywhere else, or is cancelled. A press a drag took over is neither a
730
- * tap nor a cancel. Solid 1; Solid 2's ward gives `"tapCancel"`.
731
- */
732
- readonly onTapCancel?: (event: WardicPressEvent, info: WardicPressInfo) => void
733
- /** Called when a drag of the element starts. Solid 1; Solid 2's ward gives `"dragStart"`. */
734
- readonly onDragStart?: (event: PointerEvent, info: WardicDragInfo) => void
735
- /** Called as the drag moves: at its start, and each move after. Solid 1; Solid 2's ward gives `"drag"`. */
736
- readonly onDrag?: (event: PointerEvent, info: WardicDragInfo) => void
737
- /** Called when the drag is let go. Solid 1; Solid 2's ward gives `"dragEnd"`. */
738
- readonly onDragEnd?: (event: PointerEvent, info: WardicDragInfo) => void
739
- /** Called when the element comes to rest after it's let go. Not when a new grab stops it. Solid 1; Solid 2's ward gives `"dragTransitionEnd"`. */
740
- readonly onDragTransitionEnd?: () => void
741
- /** With `dragDirectionLock`: called with the axis a drag locked to, before `onDragStart`. Solid 1; Solid 2's ward gives `"directionLock"`. */
742
- readonly onDirectionLock?: (axis: "x" | "y") => void
743
- /** Called when the element comes into view, as `viewport` defines it, with the browser's `IntersectionObserverEntry`. Solid 1; Solid 2's ward gives `"viewportEnter"`. */
744
- readonly onViewportEnter?: (entry: IntersectionObserverEntry) => void
745
- /** Called when the element leaves the view. With `viewport.once`, never after the first entry. Solid 1; Solid 2's ward gives `"viewportLeave"`. */
746
- readonly onViewportLeave?: (entry: IntersectionObserverEntry) => void
747
- /**
748
- * Called when a pointer goes down on the element, ready to pan. A pan moves nothing itself: read
749
- * its offset and velocity in `onPan`. On a touch screen, give the element a `touch-action`, such as
750
- * `pan-y` for a sideways pan, or the page's scroll takes the gesture. Solid 1; Solid 2's ward gives
751
- * `"panSessionStart"`.
752
- */
753
- // Once started, a pan counts as a drag for the element's press and hover: a press it took over is
754
- // neither a tap nor a cancel (ADR-0047).
755
- readonly onPanSessionStart?: (event: PointerEvent, info: WardicPointInfo) => void
756
- /** Called when a pan starts, past its threshold. Solid 1; Solid 2's ward gives `"panStart"`. */
757
- readonly onPanStart?: (event: PointerEvent, info: WardicDragInfo) => void
758
- /** Called as the pan moves: at its start, and each move after. Solid 1; Solid 2's ward gives `"pan"`. */
759
- readonly onPan?: (event: PointerEvent, info: WardicDragInfo) => void
760
- /** Called when a pan that started ends, or is cancelled. Solid 1; Solid 2's ward gives `"panEnd"`. */
761
- readonly onPanEnd?: (event: PointerEvent, info: WardicDragInfo) => void
762
810
  /**
763
811
  * Called when a layout animation of the element starts moving. Not when there's nothing to move.
764
812
  * Solid 1; Solid 2's ward gives `"layoutStart"`.
@@ -773,23 +821,6 @@ export interface WardConfig {
773
821
  */
774
822
  // #191, ADR-0039.
775
823
  readonly onLayoutAnimationComplete?: () => void
776
- /**
777
- * Called once a frame in which the element's values changed, with every value it holds (`x` as a
778
- * number). The object is reused: read it during the call, or copy it. For one value, `ward.read(key)`
779
- * on Solid 2, or `ward.value(key)` on Solid 1, costs less.
780
- */
781
- // #233. After that frame's commits, before it's drawn. Whether it reports is read once at mount; the
782
- // function at each call. A signal it sets paints in the next frame.
783
- readonly onUpdate?: (latest: Readonly<Record<string, number | string>>) => void
784
- /**
785
- * Builds the element's whole `transform` from its values and the one Wardic would draw, wherever
786
- * it's drawn: at rest, animating, on the server and during a layout animation.
787
- *
788
- * @example <w.div transformTemplate={(_, generated) => `translate(-50%, -50%) ${generated}`} />
789
- */
790
- // #443, a Transform template. See WardicTransformTemplate for what it's handed. Whether it has one is
791
- // read at mount; the function each frame.
792
- readonly transformTemplate?: WardicTransformTemplate
793
824
  /** Called as each layout measure of this layout element begins, before it's measured. */
794
825
  // #443. Resize-blocked and instant measures included. A throw is reported, and the measure goes on.
795
826
  readonly onBeforeLayoutMeasure?: () => void
@@ -799,12 +830,35 @@ export interface WardConfig {
799
830
  */
800
831
  // #443: after the read, before any animation starts. A throw is reported.
801
832
  readonly onLayoutMeasure?: (box: WardicLayoutBox, prev: WardicLayoutBox | undefined) => void
802
- /**
803
- * `false`: on a server-rendered page, this element's entrance waits for the JavaScript instead of
804
- * playing from the first paint. The provider's `appear` sets it for every element.
805
- *
806
- * @see https://wardic.dev/guides/server-rendering
807
- */
808
- // #48, ADR-0044. Read on the server, once.
809
- readonly appear?: boolean
833
+ }
834
+
835
+ /**
836
+ * The motion props a Wardic element takes, and the config a ward is made with: what it animates,
837
+ * when, how, and what it tells you. Motion's props, by Motion's names.
838
+ *
839
+ * @see https://wardic.dev/reference/solid/elements/props
840
+ */
841
+ export interface WardConfig
842
+ extends WardBaseConfig,
843
+ WardHoverConfig,
844
+ WardPressConfig,
845
+ WardFocusConfig,
846
+ WardInViewConfig,
847
+ WardPanConfig,
848
+ WardDragConfig,
849
+ WardLayoutConfig {}
850
+
851
+ /**
852
+ * Each Feature's motion props, by its name (#516, ADR-0067 *Amendment (#516)*): what a **Wardic
853
+ * instance**'s elements take for the Features it has, beside {@link WardBaseConfig}. `colors` and
854
+ * `scroll` add none. Solid 1's; Solid 2's are these without Solid 1's callbacks.
855
+ */
856
+ export interface WardFeatureConfigs {
857
+ readonly hover: WardHoverConfig
858
+ readonly press: WardPressConfig
859
+ readonly focus: WardFocusConfig
860
+ readonly inView: WardInViewConfig
861
+ readonly pan: WardPanConfig
862
+ readonly drag: WardDragConfig
863
+ readonly layout: WardLayoutConfig
810
864
  }
@@ -72,7 +72,6 @@ import { createVariantNode } from "./variant-node.ts"
72
72
  import { type GestureStates, type NameOrchestration, type ServerVariantNode, serverVariantNode, startingValuesOf, startsQuiet } from "./variant-tree.ts"
73
73
  import { registerAnimatable } from "./imperative.ts"
74
74
  import { projectionNodeOf, useLayoutGroupId } from "./layout.tsx"
75
- import { layoutOptionsOf, wantsLayoutNode } from "./layout-member.ts"
76
75
 
77
76
 
78
77
 
@@ -85,11 +84,11 @@ import { type PresenceSeed, presenceSeedOf } from "./presence-record.ts"
85
84
  import type { PresenceRecord } from "./presence-record.ts"
86
85
  import { createWhenWanted, NEVER_STARTED, type Started, stateOf, type Wants } from "./sensors.tsx"
87
86
  import { type GestureCallbacks, gestureCallbacksOf, inViewOptionsOf, wantsFocus, wantsHover, wantsInView, wantsPan, wantsPress } from "./gesture-callbacks.ts"
88
- import { type Feature, type FeatureRegistry, type FeatureSection, LAYOUT_PROPS, missingMessage, unreadColorIn } from "./feature.ts"
87
+ import { type Feature, type FeatureRegistry, type FeatureSection, type InstanceFeatures, LAYOUT_PROPS, missingMessage, unreadColorIn, wantsLayoutNode } from "./feature.ts"
89
88
  import { runWatch, useBuiltProjection, useElementFeatures, useFeatureRegistry, useWardicAppear, useWardicDefaultTransition, useWardicGate, useWardicPositionalKeys, useWardicReducedMotion, useWardicRenderer, useWardicRuntime, useWardicSkipAnimations } from "./provider.tsx"
90
89
  import { useWardicConfig } from "./wardic-config.tsx"
91
90
  import { transformPagePointOf } from "./wardic-config-value.ts"
92
- import { projectionIn, type WardicRuntime } from "./runtime.ts"
91
+ import { projectionIn, projectionNodesIn, type WardicRuntime } from "./runtime.ts"
93
92
  import { isHydrating, isServer } from "./server.ts"
94
93
  import { reactivity } from "./solid-reactivity.ts"
95
94
  import {
@@ -123,6 +122,8 @@ import {
123
122
  sameResolution,
124
123
  serverStartingStyle,
125
124
  snapshotOf,
125
+ SPINE_DIAGNOSTICS,
126
+ type SpineDiagnostics,
126
127
  startLinksOf,
127
128
  type Start,
128
129
  startOf,
@@ -278,6 +279,8 @@ export interface SpineInternals {
278
279
  readonly gestureless?: boolean | undefined
279
280
  readonly brings?: ReadonlyArray<Feature> | undefined
280
281
  readonly complete?: boolean | undefined
282
+ /** A Wardic instance's Features (#516): its element brings them, given at once or loaded, beside its section's. */
283
+ readonly instance?: InstanceFeatures | undefined
281
284
  /**
282
285
  * Whether the element's drag defaults go on it at mount too, for a `wardic.create(Component)`
283
286
  * wrap: its component may not pass the spread's `style` and `draggable` on (#253).
@@ -459,10 +462,12 @@ const layoutNodeOf = (atMount: ProjectionSystem.NodeHandle | undefined, later: L
459
462
  export function runSpine(opts: RunSpineOptions): void {
460
463
  const { bindGestures, byName, canStart, cfg, controls, defaultsInProps, el, entersFresh, extraDelay, gate, hydrating, id, internal = NO_INTERNALS, live, makeSink, onFrame, parent, restartStyle, runtime, styleOf, tag } = opts
461
464
  // Its Features (#511, ADR-0067): its section's, and those it brings.
462
- const features = UndefinedOr.match(opts.features, { onDefined: identity, onUndefined: () => useElementFeatures(internal.brings, internal.complete === true) })
465
+ const features = UndefinedOr.match(opts.features, { onDefined: identity, onUndefined: () => useElementFeatures(internal) })
463
466
  // Its section's projection system, the `layout` Feature's (#511): `undefined` without it. Read now,
464
467
  // which builds the Features given to its section at once: the first element to ask builds them.
465
468
  const layoutProjection = projectionIn(untrack(features.services))
469
+ // Every Feature its provider has built: where its spine finds its Timeline values (#240).
470
+ const builtFeatures = useFeatureRegistry().built
466
471
  // The provider's, once any section has built it: what its values register with.
467
472
  const builtProjection = useBuiltProjection()
468
473
  // Its Animation controls' change (#433), read with the Override stack: none without them.
@@ -667,9 +672,11 @@ export function runSpine(opts: RunSpineOptions): void {
667
672
  }
668
673
  const onLayoutHandle = internal.onLayoutHandle
669
674
  // Its node on `projection`, handed to a `<Reorder>` item's group; `takenNow`, where a child that
670
- // takes over from a leaver starts, at its mount only (#286).
675
+ // takes over from a leaver starts, at its mount only (#286). Made by the `layout` Feature's code
676
+ // (#746), read from its section's Features, which have `layout` once they have `projection`.
671
677
  const layoutNodeOn = (projection: ProjectionSystem.Shape, takenNow: PresenceSeed | undefined): ProjectionSystem.NodeHandle => {
672
- const handle = projectionNodeOf(projection, layoutOptionsOf({ ...ward, taken: takenNow }))
678
+ const nodes = projectionNodesIn(untrack(features.services))
679
+ const handle = projectionNodeOf(projection, nodes, nodes.optionsOf({ ...ward, taken: takenNow }))
673
680
  if (Predicate.isNotUndefined(onLayoutHandle)) onLayoutHandle(handle)
674
681
  return handle
675
682
  }
@@ -923,6 +930,7 @@ export function runSpine(opts: RunSpineOptions): void {
923
930
  links,
924
931
  styleNow,
925
932
  live,
933
+ builtFeatures,
926
934
  presence: presenceRec,
927
935
  projected: Predicate.isNotUndefined(layoutHandle),
928
936
  dragAxis: dragCfg,
@@ -930,6 +938,7 @@ export function runSpine(opts: RunSpineOptions): void {
930
938
  handoff,
931
939
  // Motion's onAnimationStart / onAnimationComplete (#257).
932
940
  animation: animationCallbacks(runtime, id),
941
+ diagnostics: devSpineDiagnostics(),
933
942
  }
934
943
  // A track that starts once `drag` arrives (#551) is read at each Retarget from then on: only
935
944
  // then is `drag` a getter, so an element that has it at mount, or never wants it, pays nothing.
@@ -977,6 +986,21 @@ export function runSpine(opts: RunSpineOptions): void {
977
986
  )
978
987
  }
979
988
 
989
+ /**
990
+ * Development's diagnostics for the spine (#746, ADR-0067 *Amendment (#746)*, decision 6): given under
991
+ * Solid's `DEV` alone, so a production build ships none of their code.
992
+ */
993
+ const devSpineDiagnostics = (): SpineDiagnostics | undefined => {
994
+ if (DEV) return SPINE_DIAGNOSTICS
995
+ return undefined
996
+ }
997
+
998
+ /** In development alone (#746), what warns once that a `transform` string gave way to `style`'s transform keys. */
999
+ const droppedTransformWarning = (runtime: WardicRuntime, id: string): (() => void) | undefined => {
1000
+ if (DEV) return () => warnDroppedTransform(runtime, id)
1001
+ return undefined
1002
+ }
1003
+
980
1004
  /**
981
1005
  * Says, once per provider and gesture, that the element wants a gesture its section has no Feature for
982
1006
  * (#511, ADR-0067 decision 7): outside a lazy load. Development only (its caller's `DEV`).
@@ -1014,7 +1038,7 @@ export function createWardWith(config: WardConfig | Accessor<WardConfig>, intern
1014
1038
  const runtime = useWardicRuntime()
1015
1039
  // Its Features (#511, ADR-0067), a Complete element's every one: what they register, a server
1016
1040
  // render's elements read too (the `colors` Feature's spaces).
1017
- const features = useElementFeatures(internal.brings, internal.complete === true)
1041
+ const features = useElementFeatures(internal)
1018
1042
  // A server render takes the lean path: the Starting style only, no spine (ADR-0021).
1019
1043
  if (isServer) return serverWard(config, internal)
1020
1044
  const gate = useWardicGate()
@@ -1061,7 +1085,7 @@ export function createWardWith(config: WardConfig | Accessor<WardConfig>, intern
1061
1085
 
1062
1086
  // Its routed `style` keys (#130, ADR-0043): its Live values and transform keys, which the gate
1063
1087
  // writes from mount, and the Starting style carries until then, under `initial`'s.
1064
- const live = createLiveStyle({ registry: registryOf(runtime), onDroppedTransform: () => warnDroppedTransform(runtime, id), reactivity })
1088
+ const live = createLiveStyle({ registry: registryOf(runtime), onDroppedTransform: droppedTransformWarning(runtime, id), reactivity })
1065
1089
  const projectStarting = Bool.match(hydrating, { onTrue: () => DomRenderer.project, onFalse: () => project })
1066
1090
  const startingWith = (routed: Values.Values): Renderer.Patch =>
1067
1091
  Svg.splitPatchForTag(internal.tag, projectStarting(drawnAtRest({ ...routed, ...initialValues }, layoutNode, initialConfig.transformTemplate))).style
@@ -0,0 +1,45 @@
1
+ /**
2
+ * `createWardic(features)` (#516, ADR-0067 *Amendment (#516)*): a **Wardic instance**, a `w` whose
3
+ * elements bring `features` wherever they render, typed to their props alone, and the layout hooks.
4
+ * In a module of its own that names no Feature: an app's instance module ships the Features it gives.
5
+ *
6
+ * @module
7
+ */
8
+ import { type InstanceFeaturesProp } from "./feature.ts"
9
+ import { instanceFeaturesOf } from "./instance-features.ts"
10
+ import { createInstantLayoutTransition, createResetProjection, useAnimateLayout, useInstanceBrought } from "./provider.tsx"
11
+ import { wOf } from "./w.tsx"
12
+ import type { WardicInstance } from "./wardic-instance.ts"
13
+
14
+ /**
15
+ * Makes a Wardic instance: a `w` whose elements bring `features` wherever they render and take their
16
+ * props alone, so a prop of a Feature the list lacks is a type error that names it. Give each Feature
17
+ * at once, or a load (`() => import(…)`), which starts the first time one of its elements or wards is
18
+ * made, or a hook is called, on the client. With `layout`, it returns the layout hooks too, which bring
19
+ * it. Call it once, in a module of its own. Motion has no counterpart; its nearest is `m` under
20
+ * `LazyMotion`, whose Features its types don't follow.
21
+ *
22
+ * @example
23
+ * // src/lib/wardic.ts
24
+ * export const { w } = createWardic([domAnimation, layout])
25
+ * @see https://wardic.dev/reference/solid/elements/wardic-instance
26
+ */
27
+ // #516: decisions 1 (beside the sections), 2 (its elements bring their Features), 4 (every form), 5 (the
28
+ // layout hooks), 7 (loads), 8 (`strict` allows them).
29
+ export function createWardic<const F extends InstanceFeaturesProp>(features: F): WardicInstance<F> {
30
+ const instance = instanceFeaturesOf(features)
31
+ /** `hook`, its instance's Features brought first. */
32
+ const bringing =
33
+ <A,>(hook: () => A) =>
34
+ (): A => {
35
+ useInstanceBrought(instance)
36
+ return hook()
37
+ }
38
+ // The layout hooks are there at runtime whatever its Features: its type shows them only with `layout`.
39
+ return {
40
+ w: wOf({ instance }),
41
+ useAnimateLayout: bringing(useAnimateLayout),
42
+ createInstantLayoutTransition: bringing(createInstantLayoutTransition),
43
+ createResetProjection: bringing(createResetProjection),
44
+ } as unknown as WardicInstance<F>
45
+ }