@wardic/solid 1.0.1 → 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
@@ -23,7 +23,7 @@
23
23
  import * as Bool from "effect/Boolean"
24
24
  import * as Effect from "effect/Effect"
25
25
  import * as Fiber from "effect/Fiber"
26
- import { constUndefined, identity } from "effect/Function"
26
+ import { constFalse, constUndefined, identity } from "effect/Function"
27
27
  import * as Latch from "effect/Latch"
28
28
  import * as Option from "effect/Option"
29
29
  import * as Predicate from "effect/Predicate"
@@ -34,10 +34,10 @@ import type * as Renderer from "@wardic/core/Renderer"
34
34
  import type * as FlushGate from "@wardic/dom/FlushGate"
35
35
  import type * as ProjectionSystem from "@wardic/dom/ProjectionSystem"
36
36
  import { type HeadTag, isServer, type JSX, useHead } from "@solidjs/web"
37
- import { createContext, DEV, flush, isHydrating, onCleanup, onSettled, runWithOwner, untrack, useContext } from "solid-js"
37
+ import { createContext, DEV, flush, getOwner, isHydrating, onCleanup, onSettled, runWithOwner, untrack, useContext } from "solid-js"
38
38
  import * as Context from "effect/Context"
39
39
  import * as Report from "@wardic/dom/Report"
40
- import { type Feature, type FeatureRegistry, type FeatureSection, type FeaturesProp, ROOT, strictMessage } from "../../feature.ts"
40
+ import { type Feature, type FeatureRegistry, type FeatureSection, type FeaturesProp, type ElementFeatures, type InstanceFeatures, joinSections, type Own, ROOT, strictMessage } from "../../feature.ts"
41
41
  import { FeatureSectionContext, sectionUnder, useLazySection } from "./feature-section.ts"
42
42
  import { explainerOf, type ServerAppear, serverAppear } from "../../appear.ts"
43
43
  import {
@@ -56,7 +56,9 @@ import {
56
56
  type WardicServices,
57
57
  whenIdle,
58
58
  } from "../../runtime.ts"
59
- import { onSettledClientOnly } from "./solid-reactivity.ts"
59
+ import { WAITING_ENV_FIX, WAITING_ENV_LINE } from "../../messages.ts"
60
+ import { warnWithoutSpans } from "../../spans-check.ts"
61
+ import { onSettledClientOnly, reactivityIn } from "./solid-reactivity.ts"
60
62
  import { useWardicConfig } from "./wardic-config.tsx"
61
63
  import { skipAnimationsOf } from "../../wardic-config-value.ts"
62
64
  import { instantLayoutOf, type InstantTransition, instantTransitionOf, resetOf } from "../../instant.ts"
@@ -77,15 +79,27 @@ const WardicContext = createContext<WardicContextValue | null>(null)
77
79
  /** The nearest provider's value, `undefined` outside one. */
78
80
  const contextValue = (): WardicContextValue | undefined => Option.getOrUndefined(Option.fromNullishOr(useContext(WardicContext)))
79
81
 
82
+ /**
83
+ * What a client provider fails with when its `env` waits as it builds (#746, ADR-0067 *Amendment
84
+ * (#746)*, decision 7): the fix in development, under Solid's `DEV`, and one line in a production
85
+ * build. A server render always gives the fix: Solid 1's server build has no `DEV`, and a client build
86
+ * drops the server's branch.
87
+ */
88
+ const waitingEnvMessage = (): string => {
89
+ if (DEV) return WAITING_ENV_FIX
90
+ return WAITING_ENV_LINE
91
+ }
92
+
80
93
  /**
81
94
  * A provider's context: a server render's, inert, or the client's. Decided by a plain `if`: a client
82
95
  * build folds `isServer` and drops the server render's code, where `Bool.match` kept it (#518: 8.4 KB
83
96
  * gzipped in every Solid 2 app). `env` and `appear` are read once, as the provider's docs say.
84
97
  */
85
98
  const contextOf = (given: Parameters<typeof WardicProvider>[0]): WardicContextValue => {
86
- if (isServer) return serverContext(given.env, serverAppearOf(given.appear, given.reducedMotion, given.nonce), () => untrack(() => given.reducedMotion))
99
+ if (isServer) return serverContext(given.env, WAITING_ENV_FIX, serverAppearOf(given.appear, given.reducedMotion, given.nonce), () => untrack(() => given.reducedMotion))
87
100
  return clientContext(
88
101
  given.env,
102
+ waitingEnvMessage(),
89
103
  applyAndFlush,
90
104
  () => untrack(() => given.reducedMotion),
91
105
  // The provider's setting, tracked too: `createReducedMotionConfig` reads it where it tracks (#584).
@@ -108,7 +122,10 @@ const contextOf = (given: Parameters<typeof WardicProvider>[0]): WardicContextVa
108
122
  // unmount, inert during a server render (ADR-0021). reducedMotion is read as each animation starts
109
123
  // (ADR-0029), a WardicConfig's over it (#434); appear (ADR-0044, #585) on the server once.
110
124
  export function WardicProvider(props: {
111
- /** The Environment Wardic runs in: `DomLive` in a browser, from `@wardic/dom`. Read once, and built at once: a Layer that waits as it builds fails it. */
125
+ /**
126
+ * The Environment Wardic runs in: `DomLive` in a browser, from `@wardic/dom`, with Effect's own Layers merged beside it, and
127
+ * `WardicSpans` for Wardic's spans. Read once, and built at once: a Layer that waits as it builds fails it.
128
+ */
112
129
  readonly env: WardicEnv
113
130
  /**
114
131
  * How animations honour the visitor's reduced-motion setting: `"user"` follows it (the default),
@@ -162,7 +179,15 @@ export function WardicProvider(props: {
162
179
  // element mounted after pays none of it. One mounted before then builds it itself, as before. Asked
163
180
  // for here, with no computation of the provider's own (an `onSettled`'s would shift a hydration's
164
181
  // owners from the server's), and on the client alone.
165
- if (!isServer) onCleanup(whenIdle(() => prepareIdle(value, section)))
182
+ if (!isServer) {
183
+ onCleanup(
184
+ whenIdle(() => {
185
+ prepareIdle(value, section)
186
+ // A tracer that reads no Wardic span, development's word (#746).
187
+ if (DEV) warnWithoutSpans(value.runtime)
188
+ }),
189
+ )
190
+ }
166
191
  return <WardicContext value={value}>{props.children}</WardicContext>
167
192
  }
168
193
 
@@ -226,15 +251,46 @@ export function LazyWardic(props: {
226
251
  * one (`brings`), built at once. A Complete element under a `strict` section is an error in
227
252
  * development. Internal.
228
253
  */
229
- export function useElementFeatures(brings: ReadonlyArray<Feature> | undefined, complete: boolean): FeatureSection {
254
+ export function useElementFeatures(internal: ElementFeatures): FeatureSection {
255
+ const { brings, instance } = internal
256
+ const complete = internal.complete === true
230
257
  const section = useFeatureSection()
231
258
  if (DEV && complete && section.strict) throw new Error(strictMessage("wardic.*, wardic.create, ward()", "w.*, w.create, w.ward()"))
259
+ // A Wardic instance's element (#516): its instance's Features, given at once or loaded, beside its section's.
260
+ if (Predicate.isNotUndefined(instance)) return joinSections(section, useInstanceFeatures(instance))
232
261
  if (Predicate.isUndefined(brings)) return section
233
262
  const registry = useFeatureRegistry()
234
263
  // A Complete element has every Feature, whatever its section has: one section per provider.
235
264
  if (complete) return registry.section(brings)
236
265
  const own = registry.build(brings)
237
- return { services: () => Context.merge(section.services(), own), pending: section.pending, strict: section.strict }
266
+ return joinSections(section, { services: () => own, pending: constFalse })
267
+ }
268
+
269
+ /**
270
+ * A Wardic instance's Features in this provider (#516), one per instance (`InstanceFeatures.own`): what's
271
+ * given built on first need, each load started the first time it's asked for, on the client. Internal.
272
+ */
273
+ export function useInstanceFeatures(instance: InstanceFeatures): Own {
274
+ return fromContext(contextValue(), "createWardic", (value) =>
275
+ instance.own(value.features, {
276
+ reactivity: reactivityIn(getOwner()),
277
+ server: isServer,
278
+ report: (cause) => {
279
+ value.runtime.runFork(Report.failure("wardic.createWardic: a lazy load of Features failed", cause))
280
+ },
281
+ }),
282
+ )
283
+ }
284
+
285
+ /**
286
+ * A Wardic instance's Features brought by one of its hooks (#516, Q13): in a provider, what's given is
287
+ * built and its loads start, as at its first element's mount, so its layout hooks bring `layout`.
288
+ * Outside one, nothing. Internal.
289
+ */
290
+ export function useInstanceBrought(instance: InstanceFeatures): void {
291
+ if (Predicate.isUndefined(contextValue())) return
292
+ const own = useInstanceFeatures(instance)
293
+ untrack(() => own.services())
238
294
  }
239
295
 
240
296
  /** The provider's Features (#511). Internal. */
@@ -77,7 +77,7 @@ import { CLIENT_ONLY, CLIENT_ONLY_DEFERRED } from "./solid-reactivity.ts"
77
77
  import { eachOf, neverLands, NO_EVENTS, serverWhen, Waiters, whenOf } from "./waiters.ts"
78
78
  import { BatchGroup, BatchItem } from "./batch-reorder-group.tsx"
79
79
 
80
- export type { ReorderBatchGap, ReorderBatchGroup, ReorderBatchGroupProps, ReorderBatchItemProps, ReorderBatchItemSize } from "./batch-reorder-group.tsx"
80
+ export type { ReorderBatchColumnSize, ReorderBatchGap, ReorderBatchGroup, ReorderBatchGroupProps, ReorderBatchItemProps, ReorderBatchItemSize, ReorderBatchSizing } from "./batch-reorder-group.tsx"
81
81
 
82
82
  /** A Reorder group's config, each key read as a value. */
83
83
  export interface ReorderGroupConfigValues<V> {
@@ -675,7 +675,12 @@ type ItemMotionProps = Omit<WardicMotionProps, "layout" | "layoutId" | "drag">
675
675
  */
676
676
  // #349, #398.
677
677
  export type ReorderItemOf<V, C = {}> =
678
- | (ItemMotionProps & { readonly value: V; readonly layout?: ReorderItemLayout; readonly wardRef?: WardRefCallback | undefined })
678
+ | (ItemMotionProps & {
679
+ /** Its value in the group's `values`, of any type, not its element's `value` attribute. Read once. */
680
+ readonly value: V
681
+ readonly layout?: ReorderItemLayout
682
+ readonly wardRef?: WardRefCallback | undefined
683
+ })
679
684
  | (WardicBeside<C, ItemMotionProps> & {
680
685
  readonly wardRef: AnyReorderItem<V> & GivenWard<C>
681
686
  readonly value?: never
@@ -686,12 +691,12 @@ export type ReorderItemOf<V, C = {}> =
686
691
 
687
692
  /**
688
693
  * `Reorder.Item`'s props: its item ({@link ReorderItemOf}), `as`, the element it renders (`"li"` by
689
- * default, read once), and that element's own props.
694
+ * default, read once), and that element's own props, but its `value` attribute: `value` is the item's (#748).
690
695
  */
691
696
  export type ReorderItemComponentProps<V, Tag extends ReorderElementTag = "li", C = {}> =
692
697
  & ReorderItemOf<V, C>
693
698
  & { readonly as?: Tag }
694
- & Omit<JSX.IntrinsicElements[Tag], "style">
699
+ & Omit<JSX.IntrinsicElements[Tag], "style" | "value">
695
700
  & { readonly style?: WardStyle | string | undefined }
696
701
 
697
702
  /**
@@ -15,27 +15,63 @@
15
15
  * @module
16
16
  */
17
17
  import type { JSX } from "@solidjs/web"
18
- import * as Predicate from "effect/Predicate"
19
- import { type Create, createOf, formOf, type WardicComponent } from "./element.tsx"
20
- import { internalsOf, SLIM, type Ward, type WardChecked, type WardConfig, wardWith, type WardOptions } from "./ward.tsx"
18
+ import type { AbsentGroupsOf, EveryFeature, NamesEvery, PropFeatureNames } from "../../feature.ts"
19
+ import type { WardCheckedConfig } from "../../ward-keys.ts"
20
+ import type { PerKeyApart } from "./config-view.ts"
21
+ import { createOf, type CreateFor, type FeatureProps, formOf, type OwnPropsFor, type WardicComponentFor } from "./element.tsx"
22
+ import { internalsOf, SLIM, type Ward, type WardCallbackKey, type WardChecked, type WardConfig, type WardFor, type WardInternals, wardWith, type WardOptions, type WardStyle } from "./ward.tsx"
21
23
 
22
24
  /** `w.ward(config, options)`: `ward()`'s ward, on a Slim element. */
23
- function slimWard<const C extends WardConfig>(config: WardChecked<C>, options?: WardOptions): Ward<C>
24
- function slimWard(): Ward<{}>
25
- function slimWard(config: undefined, options: WardOptions): Ward<{}>
26
- function slimWard(config?: WardConfig, options?: WardOptions): Ward {
27
- if (Predicate.isUndefined(config)) return wardWith(NO_CONFIG, internalsOf(options, SLIM))
28
- return wardWith(config, internalsOf(options, SLIM))
25
+ interface SlimWard {
26
+ <const C extends WardConfig>(config: WardChecked<C>, options?: WardOptions): Ward<C>
27
+ (): Ward<{}>
28
+ (config: undefined, options: WardOptions): Ward<{}>
29
29
  }
30
30
 
31
31
  /** No config: a ward that only listens (#398), `w.ward()`. */
32
32
  const NO_CONFIG: WardConfig = {}
33
33
 
34
- /** `w`: `w.create`, `w.ward`, and `w.<tag>`, a Slim element's component for that element (one per tag). */
35
- export type W = { readonly create: Create; readonly ward: typeof slimWard } & {
36
- readonly [Tag in keyof JSX.IntrinsicElements]: WardicComponent<Tag>
34
+ /** A ward on an element of `kind`, as `w.ward` makes one. */
35
+ const wardOf =
36
+ (kind: WardInternals) =>
37
+ (config: WardConfig = NO_CONFIG, options?: WardOptions): Ward =>
38
+ wardWith(config, internalsOf(options, kind))
39
+
40
+ /** Every form of a `w` whose elements are of `kind` (#516): the Slim element's `w`, and a Wardic instance's. */
41
+ export const wOf = (kind: WardInternals): W => formOf<W>(createOf(kind), { ward: wardOf(kind) })
42
+
43
+ /**
44
+ * The type of `w`: `w.create`, `w.ward`, and `w.<tag>`, a Slim element's component for that element (one
45
+ * per tag). `W<F>` is a Wardic instance's `w`, whose elements and wards take only Features `F`'s props,
46
+ * and whose wards hear only their events.
47
+ *
48
+ * @see https://wardic.dev/reference/solid/elements/wardic-instance
49
+ */
50
+ // `F`: #516, ADR-0067 *Amendment (#516)*.
51
+ export type W<F = EveryFeature> = WFor<PropFeatureNames<F>>
52
+
53
+ /** {@link W} for the Features named `FN` (#516). */
54
+ type WFor<FN extends string> = { readonly create: CreateFor<FN>; readonly ward: MakeWardFor<FN> } & {
55
+ readonly [Tag in keyof JSX.IntrinsicElements]: WardicComponentFor<Tag, FN>
37
56
  }
38
57
 
58
+ /** `w.ward` for the Features named `FN` (#516): the Slim element's with every one; else a Wardic instance's. */
59
+ type MakeWardFor<FN extends string> = NamesEvery<FeatureProps, FN> extends true ? SlimWard : MakeInstanceWard<FN>
60
+
61
+ /**
62
+ * A Wardic instance's `w.ward` (#516), its Features named `FN`: its config takes their props alone, every
63
+ * other Feature's `NeedsFeature<"name">`, and a key no ward takes `NotAWardKey` (#756). Its ward hears
64
+ * `settled` and their events alone (Q19).
65
+ */
66
+ interface MakeInstanceWard<FN extends string> {
67
+ <const C extends WardConfig>(config: WardCheckedConfig<C, PerKeyApart<InstanceValues<FN>, WardCallbackKey & keyof InstanceValues<FN>>>, options?: WardOptions): WardFor<C, FN>
68
+ (): WardFor<{}, FN>
69
+ (config: undefined, options: WardOptions): WardFor<{}, FN>
70
+ }
71
+
72
+ /** A Wardic instance's ward config values, its Features named `FN`: theirs, `style`, and every other Feature's `NeedsFeature`. */
73
+ type InstanceValues<FN extends string> = OwnPropsFor<FN> & AbsentGroupsOf<FeatureProps, FN> & { readonly style?: WardStyle | string | undefined }
74
+
39
75
  /**
40
76
  * The Slim element: `w.div`, `w.button` and every other tag, each taking the element's own props and
41
77
  * Wardic's motion props. It has the Features its `WardicProvider` and any `LazyWardic` above it give.
@@ -46,4 +82,4 @@ export type W = { readonly create: Create; readonly ward: typeof slimWard } & {
46
82
  * @see https://wardic.dev/reference/solid/elements/w
47
83
  */
48
84
  // Every form of the Slim element, as `wardic`'s and `ward()` are of the Complete one (ADR-0067).
49
- export const w: W = formOf<W>(createOf(SLIM), { ward: slimWard })
85
+ export const w: W = wOf(SLIM)
@@ -93,12 +93,11 @@ import * as OwnerScope from "../../owner-scope.ts"
93
93
 
94
94
  import { GESTURE_WORDS, serviceIn } from "../../gesture-features.ts"
95
95
  import { inViewOptionsOf } from "../../gesture-callbacks.ts"
96
- import { projectionIn, type WardicServices } from "../../runtime.ts"
96
+ import { projectionIn, projectionNodesIn, type WardicRuntime, type WardicServices } from "../../runtime.ts"
97
97
  import type { WardCheckedConfig, WardKey, WardValueOf } from "../../ward-keys.ts"
98
98
  import { createElementStyle } from "../../element-style.ts"
99
99
  import { createLiveStyle, type LiveSource, readLive, serverRegistryOf, split } from "../../live-style.ts"
100
100
  import { dragTransitionOf } from "../../drag-transition.ts"
101
- import { layoutOptionsOf, registrationOf, wantsLayoutNode } from "../../layout-member.ts"
102
101
  import { useLayoutGroupId } from "./layout.tsx"
103
102
  import { registerAnimatable } from "../../imperative.ts"
104
103
  import { type ControlsChange, controlledConfigOf, controlledElement, isAnimationControls, subscribe, uncontrolledOf, type WardicAnimationControls } from "../../animation-controls.ts"
@@ -137,6 +136,8 @@ import {
137
136
  sameResolution,
138
137
  serverStartingStyle,
139
138
  snapshotOf,
139
+ SPINE_DIAGNOSTICS,
140
+ type SpineDiagnostics,
140
141
  startLinksOf,
141
142
  startOf,
142
143
  warnDroppedTransform,
@@ -158,12 +159,12 @@ import {
158
159
  useElementFeatures,
159
160
  useFeatureRegistry,
160
161
  } from "./provider.tsx"
161
- import { type Feature, type FeatureRegistry, type FeatureSection, LAYOUT_PROPS, missingMessage, unreadColorIn } from "../../feature.ts"
162
+ import { type EveryFeature, type Feature, type FeatureRegistry, type FeatureSection, type InstanceFeatures, LAYOUT_PROPS, missingMessage, type PropFeatureNames, unreadColorIn, wantsLayoutNode } from "../../feature.ts"
162
163
  import { CLIENT_ONLY, CLIENT_ONLY_DEFERRED, CLIENT_ONLY_SYNC, CLIENT_ONLY_SYNC_DEFERRED, reactivityIn } from "./solid-reactivity.ts"
163
164
  import { useWardicConfig } from "./wardic-config.tsx"
164
165
  import { pointMapOptionOf, transformPagePointOf } from "../../wardic-config-value.ts"
165
166
  import { configView, type Fixed, type PerKey, type PerKeyApart } from "./config-view.ts"
166
- import { Lifecycle, type WardEvent, type WardEvents, type WardPressInfo, type WardSettled } from "./lifecycle.ts"
167
+ import { type EventNeeds, Lifecycle, type WardEvent, type WardEvents, type WardPressInfo, type WardSettled } from "./lifecycle.ts"
167
168
  import { neverLands, NO_EVENTS, serverWhen } from "./waiters.ts"
168
169
  import { usePresenceContext } from "./presence.tsx"
169
170
  import { createVariantNode, useVariantContext, type VariantNode, WardicVariantContext } from "./variant-node.ts"
@@ -193,7 +194,7 @@ export interface WardConfigValues extends Omit<SharedWardConfig, SolidOneCallbac
193
194
  * `dragConstraints`' function is its container's accessor (#273), read at each measure; a
194
195
  * `transformTemplate` is called by the renderer (#443).
195
196
  */
196
- type WardCallbackKey = "onUpdate" | "dragConstraints" | "onMeasureDragConstraints" | "transformTemplate" | "onBeforeLayoutMeasure" | "onLayoutMeasure"
197
+ export type WardCallbackKey = "onUpdate" | "dragConstraints" | "onMeasureDragConstraints" | "transformTemplate" | "onBeforeLayoutMeasure" | "onLayoutMeasure"
197
198
 
198
199
  /**
199
200
  * A ward's config: each key a value, or an accessor of it, read per key. A getter,
@@ -454,8 +455,19 @@ export interface WardOptions {
454
455
  /**
455
456
  * One element's motion binding: a ref carrying its props (see the module). Spread it, give it to
456
457
  * `ref` (alone, or in an array with your own), or give it to a Wardic component's `wardRef`.
458
+ * `Ward<C, F>` is a Wardic instance's ward, with Features `F`: it hears `settled` and their events alone.
457
459
  */
458
- export interface Ward<C extends WardConfig = WardConfig> extends WardProps, AnyWard {
460
+ // `F` (#516, Q19): its default, every Feature, gives the ward as it was ({@link WardFor}).
461
+ export type Ward<C extends WardConfig = WardConfig, F = EveryFeature> = WardFor<C, PropFeatureNames<F>>
462
+
463
+ /**
464
+ * A {@link Ward} whose Features are named `FN` (#516): its `next`, `each` and `when` take `settled` and
465
+ * their events alone, another Feature's event meeting `NeedsFeature<"name">` ({@link EventNeeds}).
466
+ */
467
+ // They're methods, not function-typed properties: TS compares a method's parameters both ways, so a
468
+ // Wardic instance's ward, which hears fewer events, is still a `Ward` (an `Array<Ward>`, a helper's
469
+ // `(card: Ward) => …`). With every Feature, `EventNeeds` is `unknown`, and each takes every event.
470
+ export interface WardFor<C extends WardConfig, FN extends string> extends WardProps, AnyWard {
459
471
  /** Mounts the ward on `element`: Solid calls it as a ref. */
460
472
  (element: HTMLElement): void
461
473
  /**
@@ -521,7 +533,7 @@ export interface Ward<C extends WardConfig = WardConfig> extends WardProps, AnyW
521
533
  * A gesture's event starts its recognizer, if its `while*` hasn't. Rejected with a
522
534
  * `DOMException` named `"AbortError"` once the ward is disposed.
523
535
  */
524
- readonly next: <E extends WardEvent>(name: E) => Promise<WardEvents[E]>
536
+ next<E extends WardEvent>(name: E & EventNeeds<E, FN>): Promise<WardEvents[E]>
525
537
  /**
526
538
  * Every `name` from the call on, as an async iterable, for a `for await`: each step waits as
527
539
  * `next(name)` does, so one that comes while its body runs is missed; the loop ends once the ward is
@@ -529,7 +541,7 @@ export interface Ward<C extends WardConfig = WardConfig> extends WardProps, AnyW
529
541
  * `each` misses one between its steps, and on a page rendered on the server it needs
530
542
  * `ssrSource: "client"` and a `<Loading>`.
531
543
  */
532
- readonly each: <E extends WardEvent>(name: E) => AsyncIterable<WardEvents[E]>
544
+ each<E extends WardEvent>(name: E & EventNeeds<E, FN>): AsyncIterable<WardEvents[E]>
533
545
  /**
534
546
  * Every `name`, as a memo for an effect: pending until the first, so the effect runs at each
535
547
  * one and never before, typed as the event, on any page (no `ssrSource`, no `<Loading>`). It hears
@@ -546,7 +558,7 @@ export interface Ward<C extends WardConfig = WardConfig> extends WardProps, AnyW
546
558
  * })
547
559
  * ```
548
560
  */
549
- readonly when: <E extends WardEvent>(name: E) => Accessor<WardEvents[E]>
561
+ when<E extends WardEvent>(name: E & EventNeeds<E, FN>): Accessor<WardEvents[E]>
550
562
  /**
551
563
  * The ward's props with the element's own (the Solid 1 ward's `ward({ ref, style })`): its
552
564
  * `ref` called beside the ward's, and its `style` over the config's, key by key. For a style made
@@ -623,6 +635,8 @@ export interface WardInternals {
623
635
  readonly share?: WardShare | undefined
624
636
  /** The Features it brings beside its section's (#511): a Complete element's every one. None for a Slim element. */
625
637
  readonly brings?: ReadonlyArray<Feature> | undefined
638
+ /** A Wardic instance's Features (#516): its element brings them, given at once or loaded, beside its section's. */
639
+ readonly instance?: InstanceFeatures | undefined
626
640
  /** Whether it's a **Complete element** (#511): an error in development under a `strict` section. */
627
641
  readonly complete?: boolean | undefined
628
642
  }
@@ -725,6 +739,21 @@ const isElement = (value: unknown): value is HTMLElement => Predicate.hasPropert
725
739
  /** A context value as Solid 2's context takes it: `null` for none. */
726
740
  const contextOf = (value: WardicVariantContextValue | undefined): WardicVariantContextValue | null => Option.getOrNull(Option.fromUndefinedOr(value))
727
741
 
742
+ /**
743
+ * Development's diagnostics for the spine (#746, ADR-0067 *Amendment (#746)*, decision 6): given under
744
+ * Solid's `DEV` alone, so a production build ships none of their code.
745
+ */
746
+ const devSpineDiagnostics = (): SpineDiagnostics | undefined => {
747
+ if (DEV) return SPINE_DIAGNOSTICS
748
+ return undefined
749
+ }
750
+
751
+ /** In development alone (#746), what warns once that a `transform` string gave way to `style`'s transform keys. */
752
+ const droppedTransformWarning = (runtime: WardicRuntime, id: string): (() => void) | undefined => {
753
+ if (DEV) return () => warnDroppedTransform(runtime, id)
754
+ return undefined
755
+ }
756
+
728
757
  /**
729
758
  * Says, once per provider, that a colour of the element's needs the `colors` Feature (#511, ADR-0067
730
759
  * decision 7): a value naming a wide-gamut space, while the page reads none, outside a lazy load.
@@ -922,7 +951,7 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
922
951
  const runtime = useWardicRuntime()
923
952
  // Its Features (#511, ADR-0067), a Complete element's every one: what they register, a server
924
953
  // render's elements read too (the `colors` Feature's spaces).
925
- const features = useElementFeatures(internal.brings, internal.complete === true)
954
+ const features = useElementFeatures(internal)
926
955
  // A server render takes the lean path: the Starting style only, no spine (ADR-0021).
927
956
  if (isServer) return serverWard(config, internal)
928
957
  const gate = useWardicGate()
@@ -999,7 +1028,7 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
999
1028
  const dragDefaults = dragDefaultsOf(initialConfig, internal)
1000
1029
 
1001
1030
  // Its routed `style` keys (#130, ADR-0043), and its `style`, switched by the gate's hooks.
1002
- const live = createLiveStyle({ registry: registryOf(runtime), onDroppedTransform: () => warnDroppedTransform(runtime, id), reactivity })
1031
+ const live = createLiveStyle({ registry: registryOf(runtime), onDroppedTransform: droppedTransformWarning(runtime, id), reactivity })
1003
1032
  const projectStarting = Bool.match(hydrating, { onTrue: () => DomRenderer.project, onFalse: () => project })
1004
1033
  // The element's style (#264): the config's, with the latest `.with()` style over it, key by key.
1005
1034
  // `.with()` runs in the spread's computation, an owned scope: it tells `read(key)` through a
@@ -1390,13 +1419,16 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
1390
1419
  let arriveLayout: ((projection: ProjectionSystem.Shape) => void) | undefined
1391
1420
  if (wantsNode) {
1392
1421
  // `takenNow`: where a child that takes over from a leaver starts, at its mount only (#286).
1422
+ // Made by the `layout` Feature's code (#746), read from its section's Features, which have `layout`
1423
+ // once they have `projection`.
1393
1424
  const layoutNodeOn = (projection: ProjectionSystem.Shape, takenNow: PresenceSeed | undefined): void => {
1425
+ const nodes = projectionNodesIn(untrack(features.services))
1394
1426
  const started = (): void => lifecycle.layoutStarted()
1395
1427
  const completed = (): void => lifecycle.layoutCompleted()
1396
1428
  const released = (): void => lifecycle.released()
1397
1429
  const handle = projection.register(
1398
- registrationOf({
1399
- ...layoutOptionsOf({
1430
+ nodes.registrationOf({
1431
+ ...nodes.optionsOf({
1400
1432
  id,
1401
1433
  element: el,
1402
1434
  config: configNow,
@@ -1519,12 +1551,15 @@ export function wardWith(config: WardConfig, internal: WardInternals): Ward {
1519
1551
  links,
1520
1552
  styleNow,
1521
1553
  live,
1554
+ // Every Feature its provider has built: where its spine finds its Timeline values (#240).
1555
+ builtFeatures: featureRegistry.built,
1522
1556
  presence: presenceRecord,
1523
1557
  projected: Predicate.isNotUndefined(layout),
1524
1558
  dragAxis,
1525
1559
  drag: dragTrack,
1526
1560
  handoff,
1527
1561
  animation: lifecycle,
1562
+ diagnostics: devSpineDiagnostics(),
1528
1563
  }
1529
1564
  // A `drag` on its way as it mounted (#551): its track starts as the Feature arrives (`startDrag`),
1530
1565
  // and the spine reads it at each Retarget from then on. Only then is `drag` a getter, so an
@@ -0,0 +1,50 @@
1
+ /**
2
+ * A **Wardic instance**'s types on Solid 2 (#516, ADR-0067 *Amendment (#516)*): what
3
+ * `createWardic(features)` returns, its `w` and its wards typed to those Features.
4
+ *
5
+ * @module
6
+ */
7
+ import type { LayoutHooksFor, NamesEvery, PropFeatureNames } from "../../feature.ts"
8
+ import type { WardicMotionPropsV2 } from "../../motion-props.ts"
9
+ import type { FeatureProps, OwnPropsFor } from "./element.tsx"
10
+ import type { createInstantLayoutTransition, createResetProjection, useAnimateLayout } from "./provider.tsx"
11
+ import type { W } from "./w.tsx"
12
+
13
+ /**
14
+ * What `createWardic(features)` returns for Features `F`: a `w` whose elements bring them wherever they
15
+ * render, and take their props alone; a ward from its `w.ward()`, or one its element hands to
16
+ * `wardRef`, hears `settled` and their events alone. A prop or an event of a Feature `F` lacks is
17
+ * typed `NeedsFeature<"name">`, so giving it is a type error that names the Feature. With `layout`,
18
+ * given at once or loaded, it has the layout hooks too. Its `w.li` below takes `layout` and
19
+ * `whileHover`; `<w.li drag />` would be an error naming `drag`.
20
+ *
21
+ * @example
22
+ * export const { w } = createWardic([domAnimation, layout])
23
+ *
24
+ * <w.li layout whileHover={{ scale: 1.05 }} />
25
+ * @see https://wardic.dev/reference/solid/elements/wardic-instance
26
+ */
27
+ // ADR-0067 *Amendment (#516)*: decisions 2 (elements bring their Features), 5 (the layout hooks bring
28
+ // `layout`), 7 (loads), 10 (NeedsFeature, and the events, Q19).
29
+ export type WardicInstance<F> = { readonly w: W<F> } & LayoutHooksFor<PropFeatureNames<F>, LayoutHooks>
30
+
31
+ /** The layout hooks a Wardic instance with `layout` has, typed as the binding's own. */
32
+ interface LayoutHooks {
33
+ readonly useAnimateLayout: typeof useAnimateLayout
34
+ readonly createInstantLayoutTransition: typeof createInstantLayoutTransition
35
+ readonly createResetProjection: typeof createResetProjection
36
+ }
37
+
38
+ /**
39
+ * The motion props of a Wardic instance with Features `F`: the base props and its Features', for a
40
+ * component that hands them on, to the instance's elements or to any with more Features. Another
41
+ * Feature's prop isn't one of them, so giving it is a type error, though not one that names the
42
+ * Feature. With every Feature, it's `WardicMotionProps`.
43
+ *
44
+ * @example
45
+ * const Card = (props: WardConfigOf<typeof domAnimation> & { title: string }) => <w.article {...props}>{props.title}</w.article>
46
+ * @see https://wardic.dev/reference/solid/elements/wardic-instance
47
+ */
48
+ // #516. No `NeedsFeature` here: no element that has a Feature takes its brand, so a wrapper's props
49
+ // with them would fit none with more Features than `F`.
50
+ export type WardConfigOf<F> = NamesEvery<FeatureProps, PropFeatureNames<F>> extends true ? WardicMotionPropsV2 : OwnPropsFor<PropFeatureNames<F>>
package/src/w.tsx CHANGED
@@ -18,32 +18,49 @@ import type { Accessor, JSX } from "solid-js"
18
18
  import type { WardConfig, WardicVariantLabels } from "./config.ts"
19
19
  import { createWardWith, type SpineInternals, type Ward } from "./create-ward.tsx"
20
20
  import { runDirective } from "./directive.tsx"
21
- import { type Create, createOf, formOf, type WardicComponent } from "./element.tsx"
22
- import type { InferredMotion, TargetKey } from "./ward-keys.ts"
21
+ import { createOf, type CreateFor, formOf, type InferredPropsFor, type WardicComponentFor } from "./element.tsx"
22
+ import type { EveryFeature, PropFeatureNames } from "./feature.ts"
23
+ import type { TargetKey } from "./ward-keys.ts"
23
24
 
24
25
  /** What a Slim element tells the spine: it brings no Feature of its own. */
25
26
  const SLIM: SpineInternals = {}
26
27
 
27
- /** The `use:w` directive. An arrow function, as `use:wardic`'s is. */
28
- const wDirective = (el: HTMLElement, value: Accessor<WardConfig>): void => runDirective(el, value, SLIM)
29
-
30
- /** `w.createWard(config)`: `createWard`'s Ward on a Slim element. */
31
- function createSlimWard<
28
+ /** A Wardic instance's `w.createWard` (#516), its Features named `FN`: its config typed to their props alone. */
29
+ type CreateWardFor<FN extends string> = <
32
30
  K extends TargetKey = never,
33
31
  N extends string = never,
34
32
  LI extends WardicVariantLabels = never,
35
33
  LA extends WardicVariantLabels = never,
36
34
  D extends boolean | "x" | "y" = never,
37
- >(config: InferredMotion<WardConfig, K, N, LI, LA, D> | Accessor<InferredMotion<WardConfig, K, N, LI, LA, D>>): Ward {
38
- return createWardWith(config as WardConfig | Accessor<WardConfig>, SLIM)
39
- }
35
+ >(
36
+ config: InferredPropsFor<FN, K, N, LI, LA, D> | Accessor<InferredPropsFor<FN, K, N, LI, LA, D>>,
37
+ ) => Ward
38
+
39
+ /**
40
+ * Every form of a `w` whose elements are of `kind` (#516): the Slim element's `w`, and a Wardic
41
+ * instance's. Its directive is an arrow function, as `use:wardic`'s is.
42
+ */
43
+ export const wOf = (kind: SpineInternals): W =>
44
+ formOf<W>((el: HTMLElement, value: Accessor<WardConfig>): void => runDirective(el, value, kind), createOf(kind), {
45
+ createWard: (config: WardConfig | Accessor<WardConfig>): Ward => createWardWith(config, kind),
46
+ })
47
+
48
+ /**
49
+ * The type of `w`: called, it's the `use:w` directive; `w.create`, `w.createWard` and `w.<tag>` are its
50
+ * forms. `W<F>` is a Wardic instance's `w`, whose elements take only Features `F`'s props; its `use:w`
51
+ * takes every prop all the same, as Solid types a directive by its name.
52
+ *
53
+ * @see https://wardic.dev/reference/solid/elements/wardic-instance
54
+ */
55
+ // `F`: #516, ADR-0067 *Amendment (#516)*; `use:w`, its decision 4.
56
+ export type W<F = EveryFeature> = WFor<PropFeatureNames<F>>
40
57
 
41
- /** The typed `w` proxy: called, it's the `use:w` directive; `w.create`, `w.createWard` and `w.<tag>` are its forms. */
42
- export type W = ((el: HTMLElement, value: Accessor<WardConfig>) => void) & {
43
- readonly create: Create
44
- readonly createWard: typeof createSlimWard
58
+ /** {@link W} for the Features named `FN` (#516). */
59
+ type WFor<FN extends string> = ((el: HTMLElement, value: Accessor<WardConfig>) => void) & {
60
+ readonly create: CreateFor<FN>
61
+ readonly createWard: CreateWardFor<FN>
45
62
  } & {
46
- readonly [Tag in keyof JSX.IntrinsicElements]: WardicComponent<Tag>
63
+ readonly [Tag in keyof JSX.IntrinsicElements]: WardicComponentFor<Tag, FN>
47
64
  }
48
65
 
49
66
  /**
@@ -56,4 +73,4 @@ export type W = ((el: HTMLElement, value: Accessor<WardConfig>) => void) & {
56
73
  * @see https://wardic.dev/reference/solid/elements/w
57
74
  */
58
75
  // Every form of the Slim element, as `wardic`'s are of the Complete one (ADR-0067).
59
- export const w: W = formOf<W>(wDirective, createOf(SLIM), { createWard: createSlimWard })
76
+ export const w: W = wOf(SLIM)
package/src/ward-keys.ts CHANGED
@@ -208,6 +208,16 @@ type NoStray<T> = T extends object
208
208
  /** A target's Transition end, checked (#428): a values map whose names are values. */
209
209
  type CheckedEnd<T> = { readonly transitionEnd?: Omit<WardicValues, "transition"> & NoStray<RawOf<T, "transitionEnd">> }
210
210
 
211
+ /** What a config key no ward takes meets: an error naming it, an object, as {@link NotAValue}'s. */
212
+ type NotAWardKey<P extends string> = { readonly "is not a key a ward takes": P }
213
+
214
+ /**
215
+ * `C`'s keys that config `W` hasn't, each an error (#756). `C` is inferred from the literal with
216
+ * `const`, so it keeps every key it's given, and once one matches `W` nothing else rejects the rest.
217
+ * A config with a computed key (`[key]: …`) has a string index, its names unknown: it isn't checked.
218
+ */
219
+ type NoStrayKey<C, W> = string extends keyof C ? unknown : { readonly [P in Exclude<keyof C & string, keyof W>]: NotAWardKey<P> }
220
+
211
221
  /** The config props that take a target. */
212
222
  type TargetProp = "animate" | "exit" | "whileHover" | "whileTap" | "whileDrag" | "whileFocus" | "whileInView"
213
223
 
@@ -249,9 +259,9 @@ type ElementTransition<C> = HandsDown<C> extends true
249
259
  * `default` and `layout`, every value's name for an element Variant children can join; a target's
250
260
  * own (a variant's, `animate`'s, a gesture's, `exit`'s), the keys that target sets and `default`. A
251
261
  * config typed as a plain `WardConfig` takes every name. Every other key is `W`'s, so a callback's
252
- * parameters are typed as ever.
262
+ * parameters are typed as ever, and a key `W` hasn't is an error naming it ({@link NoStrayKey}).
253
263
  */
254
- export type WardCheckedConfig<C, W> = C & {
264
+ export type WardCheckedConfig<C, W> = C & NoStrayKey<C, W> & {
255
265
  readonly [K in keyof W]?: K extends "transition"
256
266
  ? ElementTransition<C>
257
267
  : K extends keyof C
@@ -326,18 +336,29 @@ type InferredProp = "initial" | "animate" | "exit" | "whileHover" | "whileTap" |
326
336
  */
327
337
  export type InferredMotion<M, K extends TargetKey, N extends string, LI extends WardicVariantLabels, LA extends WardicVariantLabels, D extends boolean | "x" | "y", X extends string = never> =
328
338
  & Omit<M, InferredProp>
329
- & {
330
- readonly initial?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | LI | false
331
- readonly animate?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | LA | WardicAnimationControls
332
- readonly exit?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | WardicVariantLabels
333
- readonly whileHover?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | WardicVariantLabels
334
- readonly whileTap?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | WardicVariantLabels
335
- readonly whileDrag?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | WardicVariantLabels
336
- readonly whileFocus?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | WardicVariantLabels
337
- readonly whileInView?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | WardicVariantLabels
338
- readonly variants?: { readonly [V in N]: InferredTarget<K, NoInfer<ValueNameOf<K>>> | WardicVariantResolver }
339
- readonly drag?: D
340
- readonly transition?: true extends NoInfer<JoinedBy<N, LI, LA> | ([InferredKey<K, D, X>] extends [never] ? true : false)>
341
- ? WardicTransition
342
- : WardicTransitionWith<NoInfer<WardicValueEntries<InferredKey<K, D, X>> & { readonly layout?: WardicValueTransition }>>
343
- }
339
+ & InferredParts<K, N, LI, LA, D, X>
340
+
341
+ /**
342
+ * {@link InferredMotion} for a **Wardic instance**'s motion props `M` (#516): only the props `M` has are
343
+ * typed again, so a gesture's target or `drag`, which its Features may lack, isn't added back.
344
+ */
345
+ export type InferredMotionOf<M, K extends TargetKey, N extends string, LI extends WardicVariantLabels, LA extends WardicVariantLabels, D extends boolean | "x" | "y", X extends string = never> =
346
+ & Omit<M, InferredProp>
347
+ & Pick<InferredParts<K, N, LI, LA, D, X>, InferredProp & keyof M>
348
+
349
+ /** The props {@link InferredMotion} types again, from the keys inferred. */
350
+ type InferredParts<K extends TargetKey, N extends string, LI extends WardicVariantLabels, LA extends WardicVariantLabels, D extends boolean | "x" | "y", X extends string> = {
351
+ readonly initial?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | LI | false
352
+ readonly animate?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | LA | WardicAnimationControls
353
+ readonly exit?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | WardicVariantLabels
354
+ readonly whileHover?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | WardicVariantLabels
355
+ readonly whileTap?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | WardicVariantLabels
356
+ readonly whileDrag?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | WardicVariantLabels
357
+ readonly whileFocus?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | WardicVariantLabels
358
+ readonly whileInView?: InferredTarget<K, NoInfer<ValueNameOf<K>>> | WardicVariantLabels
359
+ readonly variants?: { readonly [V in N]: InferredTarget<K, NoInfer<ValueNameOf<K>>> | WardicVariantResolver }
360
+ readonly drag?: D
361
+ readonly transition?: true extends NoInfer<JoinedBy<N, LI, LA> | ([InferredKey<K, D, X>] extends [never] ? true : false)>
362
+ ? WardicTransition
363
+ : WardicTransitionWith<NoInfer<WardicValueEntries<InferredKey<K, D, X>> & { readonly layout?: WardicValueTransition }>>
364
+ }