motionary 13.6.0 → 13.8.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 (964) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/bin/mcp-browser.mjs +167 -0
  3. package/bin/mcp-tools-2.mjs +187 -0
  4. package/bin/motionary-mcp.mjs +140 -34
  5. package/dist/chunks/{anim-image-D8KZlriS.js → anim-image-BX42afkj.js} +2 -2
  6. package/dist/chunks/{anim-image-DQH_CWkF.cjs → anim-image-B_Qz4e56.cjs} +2 -2
  7. package/dist/chunks/audio-CZgCXg1t.js +1 -1
  8. package/dist/chunks/audio-D0LwPShE.cjs +1 -1
  9. package/dist/chunks/badge-wall-C0gJ_Kck.js +1 -1
  10. package/dist/chunks/badge-wall-CITexuW7.cjs +1 -1
  11. package/dist/chunks/base-BvH4nAcv.cjs +1 -1
  12. package/dist/chunks/base-C9CJrhL3.js +1 -1
  13. package/dist/chunks/bg-generator-CML8tPN8.cjs +1 -1
  14. package/dist/chunks/bg-generator-oRwfTA5B.js +1 -1
  15. package/dist/chunks/bind-B_CTL6Qn.js +1 -1
  16. package/dist/chunks/bind-Ui43-n2d.cjs +1 -1
  17. package/dist/chunks/builtins-DweCp29Z.cjs +1 -1
  18. package/dist/chunks/builtins-SwWQKzb-.js +1 -1
  19. package/dist/chunks/carousel-DU3rHTq0.cjs +1 -1
  20. package/dist/chunks/carousel-u6rqMqGu.js +1 -1
  21. package/dist/chunks/cart-drawer-CEIZfCw8.js +1 -1
  22. package/dist/chunks/cart-drawer-CkFMKMhx.cjs +1 -1
  23. package/dist/chunks/code-export-PdGSl9WE.cjs +1 -1
  24. package/dist/chunks/code-export-wdrBIWRv.js +1 -1
  25. package/dist/chunks/color-picker-B_xWVH8H.cjs +1 -1
  26. package/dist/chunks/color-picker-CN8ThZfh.js +1 -1
  27. package/dist/chunks/command-palette-IJuNiXhv.js +1 -1
  28. package/dist/chunks/command-palette-ISetAeX1.cjs +1 -1
  29. package/dist/chunks/core-B9Sjd4AV.js +1 -1
  30. package/dist/chunks/core-BZhM_0Zh.js +1 -1
  31. package/dist/chunks/core-BjcOCpJt.cjs +1 -1
  32. package/dist/chunks/core-DbAYRKnS.cjs +1 -1
  33. package/dist/chunks/core-Dj6iomdc.js +1 -1
  34. package/dist/chunks/core-DjjKLmZ6.cjs +1 -1
  35. package/dist/chunks/countdown-RQViryt7.cjs +1 -1
  36. package/dist/chunks/countdown-WDZxXQz7.js +1 -1
  37. package/dist/chunks/date-picker-BgApzPNn.cjs +1 -1
  38. package/dist/chunks/date-picker-D4yqKTMJ.js +1 -1
  39. package/dist/chunks/ease-HwYZnZat.cjs +1 -1
  40. package/dist/chunks/ease-XN8_0sXu.js +1 -1
  41. package/dist/chunks/equalizer-CwGL1sD8.js +1 -1
  42. package/dist/chunks/equalizer-_eD_ZdCl.cjs +1 -1
  43. package/dist/chunks/festival-banner-Bs18K0MJ.cjs +1 -1
  44. package/dist/chunks/festival-banner-Dslu8K1g.js +1 -1
  45. package/dist/chunks/field-DALTalya.js +1 -1
  46. package/dist/chunks/field-Dwq8-CLN.cjs +1 -1
  47. package/dist/chunks/fx-DaVuB89C.cjs +1 -1
  48. package/dist/chunks/fx-Dc1sMyNg.js +1 -1
  49. package/dist/chunks/generative-BKoxWOSP.cjs +1 -1
  50. package/dist/chunks/generative-DWdAwxYB.js +1 -1
  51. package/dist/chunks/{gl-scene-3qV6ttUD.js → gl-scene-CH-D2XGk.js} +10 -3
  52. package/dist/chunks/{gl-scene-D1o7L7cK.cjs → gl-scene-Du5jLwiw.cjs} +10 -3
  53. package/dist/chunks/globe-D56xlOmk.js +1 -1
  54. package/dist/chunks/globe-DA0jyb6s.cjs +1 -1
  55. package/dist/chunks/{gpu-7AY-uzNc.js → gpu-BrdivsHA.js} +5 -2
  56. package/dist/chunks/{gpu-DTO3JmAF.cjs → gpu-C2C6iBQC.cjs} +5 -2
  57. package/dist/chunks/gpu-particles-4DBj91f-.js +1 -1
  58. package/dist/chunks/gpu-particles-wEO_rds1.cjs +1 -1
  59. package/dist/chunks/index-tags-B-JBecYg.js +1 -1
  60. package/dist/chunks/index-tags-hLIF2Clq.cjs +1 -1
  61. package/dist/chunks/key-click-BLm3BI8_.js +1 -1
  62. package/dist/chunks/key-click-v7I4K5Sr.cjs +1 -1
  63. package/dist/chunks/{keyframes-a7rG1heL.js → keyframes-DAsT0Ibx.js} +2 -2
  64. package/dist/chunks/{keyframes-DLTJgjYx.cjs → keyframes-fwq5LWME.cjs} +2 -2
  65. package/dist/chunks/leaderboard-DvSSQ8o3.cjs +1 -1
  66. package/dist/chunks/leaderboard-_UPi0KQX.js +1 -1
  67. package/dist/chunks/location-card-Bq596aK5.js +1 -1
  68. package/dist/chunks/location-card-DSPTApUe.cjs +1 -1
  69. package/dist/chunks/lottie-icon-BoxkukMd.cjs +1 -1
  70. package/dist/chunks/lottie-icon-pqBgCV0y.js +1 -1
  71. package/dist/chunks/{lottie-player-BKBOn96y.cjs → lottie-player-DoQ5402p.cjs} +2 -2
  72. package/dist/chunks/{lottie-player-DwQIRZKy.js → lottie-player-fnaAa9nq.js} +2 -2
  73. package/dist/chunks/lyrics-CRB7dA1j.cjs +1 -1
  74. package/dist/chunks/lyrics-D7mzxVIq.js +1 -1
  75. package/dist/chunks/manifest-CqfKtjeL.js +1 -1
  76. package/dist/chunks/manifest-xr3WET80.cjs +1 -1
  77. package/dist/chunks/menu-CZ1zHTT9.cjs +1 -1
  78. package/dist/chunks/menu-XcdMtcfw.js +1 -1
  79. package/dist/chunks/menu-toggle-DGXN4VsN.cjs +1 -1
  80. package/dist/chunks/menu-toggle-RD6Fu1Gm.js +1 -1
  81. package/dist/chunks/nav-morph-C4rD3wrU.cjs +1 -1
  82. package/dist/chunks/nav-morph-F6qzM20K.js +1 -1
  83. package/dist/chunks/otp-BJKyY7I3.js +1 -1
  84. package/dist/chunks/otp-DUyEWYMi.cjs +1 -1
  85. package/dist/chunks/pagination-D6iMBStU.js +1 -1
  86. package/dist/chunks/pagination-DHmYZZU9.cjs +1 -1
  87. package/dist/chunks/{physics-playground-CS1nX_IJ.js → physics-playground-BVTjc3p8.js} +2 -2
  88. package/dist/chunks/{physics-playground-DOL3NxuS.cjs → physics-playground-Devu3-WW.cjs} +2 -2
  89. package/dist/chunks/player-BTaPvK8G.js +1 -1
  90. package/dist/chunks/player-BZOkQbZ9.cjs +1 -1
  91. package/dist/chunks/presence-6eQ9t5vX.js +1 -1
  92. package/dist/chunks/presence-DAthlALi.cjs +1 -1
  93. package/dist/chunks/presets-BYBVJVeP.js +1 -1
  94. package/dist/chunks/presets-CUHys3sK.cjs +1 -1
  95. package/dist/chunks/prize-wheel-CpGVo8QG.js +1 -1
  96. package/dist/chunks/prize-wheel-emDopI5c.cjs +1 -1
  97. package/dist/chunks/product-gallery-BmnYLKAQ.js +1 -1
  98. package/dist/chunks/product-gallery-CKtSVhZk.cjs +1 -1
  99. package/dist/chunks/progress-ring-C75O4MUi.cjs +1 -1
  100. package/dist/chunks/progress-ring-CKgR1GRB.js +1 -1
  101. package/dist/chunks/prop-panel-BjbCiPAB.js +1 -1
  102. package/dist/chunks/prop-panel-DFqga6H5.cjs +1 -1
  103. package/dist/chunks/radar-D-bZRrgs.cjs +1 -1
  104. package/dist/chunks/radar-rBQT1BFh.js +1 -1
  105. package/dist/chunks/reactions-BL2iO8iy.cjs +1 -1
  106. package/dist/chunks/reactions-CsdP0Su5.js +1 -1
  107. package/dist/chunks/{registry-DU4Fqojq.js → registry-BBRcnwNH.js} +2 -2
  108. package/dist/chunks/registry-CibnX7Ui.cjs +1 -1
  109. package/dist/chunks/registry-DKs_BiEo.js +1 -1
  110. package/dist/chunks/{registry-KZcxpR09.cjs → registry-DghuE1q_.cjs} +2 -2
  111. package/dist/chunks/retro-button-Bw4sqAkl.js +1 -1
  112. package/dist/chunks/retro-button-DrrBZ6w8.cjs +1 -1
  113. package/dist/chunks/rive-D6X4J0Mi.cjs +1 -1
  114. package/dist/chunks/rive-FjeW9KDl.js +1 -1
  115. package/dist/chunks/{runtime-link-y2y-NiI-.js → runtime-link-CaH5d46c.js} +2 -2
  116. package/dist/chunks/{runtime-link-BpG2gXG5.cjs → runtime-link-Cb8pee3R.cjs} +2 -2
  117. package/dist/chunks/scroll-driven-CQbwzCdn.cjs +1 -1
  118. package/dist/chunks/scroll-driven-LghshrWq.js +1 -1
  119. package/dist/chunks/{scroll-scene-COHX5SV0.cjs → scroll-scene-By71XgdX.cjs} +3 -3
  120. package/dist/chunks/{scroll-scene-Cpky_0Ka.js → scroll-scene-hUmpAz7l.js} +3 -3
  121. package/dist/chunks/segmented-BEep92iW.js +1 -1
  122. package/dist/chunks/segmented-CpB4mKIn.cjs +1 -1
  123. package/dist/chunks/{shader-backdrop-C4UhepvI.cjs → shader-backdrop-BodjXMhw.cjs} +9 -1
  124. package/dist/chunks/{shader-backdrop-DC0ZvVMV.js → shader-backdrop-dEs33c18.js} +9 -1
  125. package/dist/chunks/shared-Bf72wLyt.cjs +1 -1
  126. package/dist/chunks/shared-CkKHWrtJ.js +1 -1
  127. package/dist/chunks/shared-jkgRH-Hx.cjs +1 -1
  128. package/dist/chunks/shared-o9CtwHmi.js +1 -1
  129. package/dist/chunks/sheet-B38ylIEW.cjs +1 -1
  130. package/dist/chunks/sheet-BHTMF8qx.js +1 -1
  131. package/dist/chunks/sign-DvZ1jHxE.js +1 -1
  132. package/dist/chunks/sign-RAkQIWrM.cjs +1 -1
  133. package/dist/chunks/skeleton-reveal-BMrbmru6.js +1 -1
  134. package/dist/chunks/skeleton-reveal-Dsd3Wp0n.cjs +1 -1
  135. package/dist/chunks/sparkline-DeKhZpVo.cjs +1 -1
  136. package/dist/chunks/sparkline-htTaTcgs.js +1 -1
  137. package/dist/chunks/spring-DBCejV_z.js +1 -1
  138. package/dist/chunks/spring-XEl_diDJ.cjs +1 -1
  139. package/dist/chunks/stagger-B9sKPwQB.js +1 -1
  140. package/dist/chunks/stagger-DFKwqOQG.cjs +1 -1
  141. package/dist/chunks/suggestion-chips-CAcbFTr4.cjs +1 -1
  142. package/dist/chunks/suggestion-chips-Cj70JCtZ.js +1 -1
  143. package/dist/chunks/switch-CnSs8nDn.js +1 -1
  144. package/dist/chunks/switch-DiTlApGd.cjs +1 -1
  145. package/dist/chunks/tab-bar-B7hFB974.js +1 -1
  146. package/dist/chunks/tab-bar-BBlVAqbq.cjs +1 -1
  147. package/dist/chunks/{ticker-Bb9msR-6.cjs → ticker-C5_w0o1n.cjs} +2 -2
  148. package/dist/chunks/{ticker-CxIkYDct.js → ticker-DNfd8fjK.js} +2 -2
  149. package/dist/chunks/tip-VGS3qAUm.cjs +1 -1
  150. package/dist/chunks/tip-ylGHoOIf.js +1 -1
  151. package/dist/chunks/toast-stack-DprisNp_.cjs +1 -1
  152. package/dist/chunks/toast-stack-Z_5cS1Nz.js +1 -1
  153. package/dist/chunks/{tween-Cj4u9V7o.cjs → tween-BCJbc0Gk.cjs} +2 -2
  154. package/dist/chunks/{tween-ClexTL2D.js → tween-DyoalTCu.js} +2 -2
  155. package/dist/chunks/upload-progress-CEAWkP-p.cjs +1 -1
  156. package/dist/chunks/upload-progress-y7N0eaM4.js +1 -1
  157. package/dist/chunks/variants-BtqEJuki.cjs +1 -1
  158. package/dist/chunks/variants-MxfB3UVB.js +1 -1
  159. package/dist/chunks/viewport-BAXHhZLV.js +1 -1
  160. package/dist/chunks/viewport-EFYGqMNa.cjs +1 -1
  161. package/dist/chunks/voice-button-9UauxvT9.cjs +1 -1
  162. package/dist/chunks/voice-button-DFEoNe24.js +1 -1
  163. package/dist/chunks/weather-card-4Eg6e43D.cjs +1 -1
  164. package/dist/chunks/weather-card-NR0i507J.js +1 -1
  165. package/dist/chunks/worker-canvas-BMBXAFWp.cjs +1 -1
  166. package/dist/chunks/worker-canvas-CPZvzrWQ.js +1 -1
  167. package/dist/chunks/xp-bar-DAbx1LZ_.js +1 -1
  168. package/dist/chunks/xp-bar-DkWfCTfB.cjs +1 -1
  169. package/dist/components/a11y.cjs +1 -1
  170. package/dist/components/a11y.js +1 -1
  171. package/dist/components/ai.cjs +1 -1
  172. package/dist/components/ai.js +1 -1
  173. package/dist/components/angular.cjs +1 -1
  174. package/dist/components/angular.js +1 -1
  175. package/dist/components/background.cjs +1 -1
  176. package/dist/components/background.js +1 -1
  177. package/dist/components/bridge.cjs +1 -1
  178. package/dist/components/bridge.js +1 -1
  179. package/dist/components/cards.cjs +1 -1
  180. package/dist/components/cards.js +1 -1
  181. package/dist/components/click.cjs +1 -1
  182. package/dist/components/click.js +1 -1
  183. package/dist/components/core.cjs +1 -1
  184. package/dist/components/core.js +1 -1
  185. package/dist/components/depth.cjs +1 -1
  186. package/dist/components/depth.js +1 -1
  187. package/dist/components/design.cjs +1 -1
  188. package/dist/components/design.js +1 -1
  189. package/dist/components/dotlottie.cjs +3 -3
  190. package/dist/components/dotlottie.js +3 -3
  191. package/dist/components/dsl.cjs +1 -1
  192. package/dist/components/dsl.js +1 -1
  193. package/dist/components/effects.cjs +1 -1
  194. package/dist/components/effects.js +1 -1
  195. package/dist/components/engine.cjs +1 -1
  196. package/dist/components/engine.js +1 -1
  197. package/dist/components/feedback.cjs +1 -1
  198. package/dist/components/feedback.js +1 -1
  199. package/dist/components/fx-3d.cjs +1 -1
  200. package/dist/components/fx-3d.js +1 -1
  201. package/dist/components/fx-ai.cjs +1 -1
  202. package/dist/components/fx-ai.js +1 -1
  203. package/dist/components/fx-chart.cjs +1 -1
  204. package/dist/components/fx-chart.js +1 -1
  205. package/dist/components/fx-cinema.cjs +1 -1
  206. package/dist/components/fx-cinema.js +1 -1
  207. package/dist/components/fx-cyber.cjs +1 -1
  208. package/dist/components/fx-cyber.js +1 -1
  209. package/dist/components/fx-festival.cjs +1 -1
  210. package/dist/components/fx-festival.js +1 -1
  211. package/dist/components/fx-focus.cjs +1 -1
  212. package/dist/components/fx-focus.js +1 -1
  213. package/dist/components/fx-form.cjs +1 -1
  214. package/dist/components/fx-form.js +1 -1
  215. package/dist/components/fx-game.cjs +1 -1
  216. package/dist/components/fx-game.js +1 -1
  217. package/dist/components/fx-genart.cjs +1 -1
  218. package/dist/components/fx-genart.js +1 -1
  219. package/dist/components/fx-geo.cjs +1 -1
  220. package/dist/components/fx-geo.js +1 -1
  221. package/dist/components/fx-gesture.cjs +1 -1
  222. package/dist/components/fx-gesture.js +1 -1
  223. package/dist/components/fx-gpu.cjs +2 -2
  224. package/dist/components/fx-gpu.js +2 -2
  225. package/dist/components/fx-light.cjs +1 -1
  226. package/dist/components/fx-light.js +1 -1
  227. package/dist/components/fx-lottie.cjs +1 -1
  228. package/dist/components/fx-lottie.js +1 -1
  229. package/dist/components/fx-morph.cjs +1 -1
  230. package/dist/components/fx-morph.js +1 -1
  231. package/dist/components/fx-music.cjs +1 -1
  232. package/dist/components/fx-music.js +1 -1
  233. package/dist/components/fx-organic.cjs +1 -1
  234. package/dist/components/fx-organic.js +1 -1
  235. package/dist/components/fx-paper.cjs +1 -1
  236. package/dist/components/fx-paper.js +1 -1
  237. package/dist/components/fx-perf.cjs +1 -1
  238. package/dist/components/fx-perf.js +1 -1
  239. package/dist/components/fx-physics.cjs +1 -1
  240. package/dist/components/fx-physics.js +1 -1
  241. package/dist/components/fx-retro.cjs +1 -1
  242. package/dist/components/fx-retro.js +1 -1
  243. package/dist/components/fx-safe.cjs +1 -1
  244. package/dist/components/fx-safe.js +1 -1
  245. package/dist/components/fx-shop.cjs +1 -1
  246. package/dist/components/fx-shop.js +1 -1
  247. package/dist/components/fx-social.cjs +1 -1
  248. package/dist/components/fx-social.js +1 -1
  249. package/dist/components/fx-spatial.cjs +1 -1
  250. package/dist/components/fx-spatial.js +1 -1
  251. package/dist/components/fx-surface.cjs +1 -1
  252. package/dist/components/fx-surface.js +1 -1
  253. package/dist/components/fx-text.cjs +1 -1
  254. package/dist/components/fx-text.js +1 -1
  255. package/dist/components/fx-transitions.cjs +1 -1
  256. package/dist/components/fx-transitions.js +1 -1
  257. package/dist/components/fx-video.cjs +1 -1
  258. package/dist/components/fx-video.js +1 -1
  259. package/dist/components/fx-weather.cjs +1 -1
  260. package/dist/components/fx-weather.js +1 -1
  261. package/dist/components/fx.cjs +1 -1
  262. package/dist/components/fx.js +1 -1
  263. package/dist/components/fx2.cjs +2 -2
  264. package/dist/components/fx2.js +3 -3
  265. package/dist/components/gesture.cjs +1 -1
  266. package/dist/components/gesture.js +1 -1
  267. package/dist/components/gl-model.cjs +3 -3
  268. package/dist/components/gl-model.js +3 -3
  269. package/dist/components/gl-pool.cjs +357 -0
  270. package/dist/components/gl-pool.d.cts +91 -0
  271. package/dist/components/gl-pool.d.ts +91 -0
  272. package/dist/components/gl-pool.js +352 -0
  273. package/dist/components/interaction.cjs +1 -1
  274. package/dist/components/interaction.js +1 -1
  275. package/dist/components/jsx.cjs +1 -1
  276. package/dist/components/jsx.js +1 -1
  277. package/dist/components/layout.cjs +1 -1
  278. package/dist/components/layout.js +1 -1
  279. package/dist/components/lazy.cjs +1 -1
  280. package/dist/components/lazy.js +1 -1
  281. package/dist/components/lite.cjs +1 -1
  282. package/dist/components/lite.js +1 -1
  283. package/dist/components/marketplace.cjs +1 -1
  284. package/dist/components/marketplace.js +1 -1
  285. package/dist/components/native.cjs +1 -1
  286. package/dist/components/native.js +1 -1
  287. package/dist/components/offscreen.cjs +1 -1
  288. package/dist/components/offscreen.js +1 -1
  289. package/dist/components/packs.cjs +1 -1
  290. package/dist/components/packs.js +1 -1
  291. package/dist/components/page.cjs +1 -1
  292. package/dist/components/page.js +1 -1
  293. package/dist/components/perf-tasks.cjs +1 -1
  294. package/dist/components/perf-tasks.js +1 -1
  295. package/dist/components/perf.cjs +1 -1
  296. package/dist/components/perf.js +1 -1
  297. package/dist/components/physics.cjs +1 -1
  298. package/dist/components/physics.js +1 -1
  299. package/dist/components/plugins.cjs +2 -2
  300. package/dist/components/plugins.js +2 -2
  301. package/dist/components/react.cjs +1 -1
  302. package/dist/components/react.js +1 -1
  303. package/dist/components/reveal.cjs +1 -1
  304. package/dist/components/reveal.js +1 -1
  305. package/dist/components/snap-carousel.cjs +2 -2
  306. package/dist/components/snap-carousel.js +2 -2
  307. package/dist/components/solid.cjs +1 -1
  308. package/dist/components/solid.js +1 -1
  309. package/dist/components/svelte.cjs +1 -1
  310. package/dist/components/svelte.js +1 -1
  311. package/dist/components/svg.cjs +1 -1
  312. package/dist/components/svg.js +1 -1
  313. package/dist/components/text.cjs +1 -1
  314. package/dist/components/text.js +1 -1
  315. package/dist/components/timeline-editor.cjs +1 -1
  316. package/dist/components/timeline-editor.js +1 -1
  317. package/dist/components/timeline.cjs +1 -1
  318. package/dist/components/timeline.js +1 -1
  319. package/dist/components/tokens.cjs +1 -1
  320. package/dist/components/tokens.js +1 -1
  321. package/dist/components/transitions.cjs +1 -1
  322. package/dist/components/transitions.js +1 -1
  323. package/dist/components/ui.cjs +1 -1
  324. package/dist/components/ui.js +1 -1
  325. package/dist/components/vue.cjs +1 -1
  326. package/dist/components/vue.js +1 -1
  327. package/dist/components/webgl.cjs +1 -1
  328. package/dist/components/webgl.js +1 -1
  329. package/dist/components/widgets.cjs +6 -6
  330. package/dist/components/widgets.js +9 -9
  331. package/dist/components.cjs +1 -1
  332. package/dist/components.js +1 -1
  333. package/dist/components.umd.js +1 -1
  334. package/dist/effects/achievement-unlock.cjs +1 -1
  335. package/dist/effects/achievement-unlock.js +1 -1
  336. package/dist/effects/aurora-veil.cjs +1 -1
  337. package/dist/effects/aurora-veil.js +1 -1
  338. package/dist/effects/badge-pop.cjs +1 -1
  339. package/dist/effects/badge-pop.js +1 -1
  340. package/dist/effects/bars-grow.cjs +1 -1
  341. package/dist/effects/bars-grow.js +1 -1
  342. package/dist/effects/beat-bounce.cjs +1 -1
  343. package/dist/effects/beat-bounce.js +1 -1
  344. package/dist/effects/blob-button.cjs +1 -1
  345. package/dist/effects/blob-button.js +1 -1
  346. package/dist/effects/bloom.cjs +1 -1
  347. package/dist/effects/bloom.js +1 -1
  348. package/dist/effects/breathe.cjs +1 -1
  349. package/dist/effects/breathe.js +1 -1
  350. package/dist/effects/brushed-metal.cjs +1 -1
  351. package/dist/effects/brushed-metal.js +1 -1
  352. package/dist/effects/camera-dolly.cjs +1 -1
  353. package/dist/effects/camera-dolly.js +1 -1
  354. package/dist/effects/card-flip-3d.cjs +1 -1
  355. package/dist/effects/card-flip-3d.js +1 -1
  356. package/dist/effects/chest-open.cjs +1 -1
  357. package/dist/effects/chest-open.js +1 -1
  358. package/dist/effects/cloth.cjs +1 -1
  359. package/dist/effects/cloth.js +1 -1
  360. package/dist/effects/coin-burst.cjs +1 -1
  361. package/dist/effects/coin-burst.js +1 -1
  362. package/dist/effects/color-pulse.cjs +1 -1
  363. package/dist/effects/color-pulse.js +1 -1
  364. package/dist/effects/crt-power.cjs +1 -1
  365. package/dist/effects/crt-power.js +1 -1
  366. package/dist/effects/crumple.cjs +1 -1
  367. package/dist/effects/crumple.js +1 -1
  368. package/dist/effects/data-decode.cjs +1 -1
  369. package/dist/effects/data-decode.js +1 -1
  370. package/dist/effects/day-cycle.cjs +1 -1
  371. package/dist/effects/day-cycle.js +1 -1
  372. package/dist/effects/depth-in.cjs +1 -1
  373. package/dist/effects/depth-in.js +1 -1
  374. package/dist/effects/depth-pop.cjs +1 -1
  375. package/dist/effects/depth-pop.js +1 -1
  376. package/dist/effects/depth-stack.cjs +1 -1
  377. package/dist/effects/depth-stack.js +1 -1
  378. package/dist/effects/dolly-in.cjs +1 -1
  379. package/dist/effects/dolly-in.js +1 -1
  380. package/dist/effects/dots-pop.cjs +1 -1
  381. package/dist/effects/dots-pop.js +1 -1
  382. package/dist/effects/field-shake.cjs +1 -1
  383. package/dist/effects/field-shake.js +1 -1
  384. package/dist/effects/field-success.cjs +1 -1
  385. package/dist/effects/field-success.js +1 -1
  386. package/dist/effects/film-burn.cjs +1 -1
  387. package/dist/effects/film-burn.js +1 -1
  388. package/dist/effects/fire.cjs +2 -2
  389. package/dist/effects/fire.js +2 -2
  390. package/dist/effects/fireflies.cjs +2 -2
  391. package/dist/effects/fireflies.js +2 -2
  392. package/dist/effects/firework-burst.cjs +1 -1
  393. package/dist/effects/firework-burst.js +1 -1
  394. package/dist/effects/flip-chars.cjs +1 -1
  395. package/dist/effects/flip-chars.js +1 -1
  396. package/dist/effects/fluid.cjs +2 -2
  397. package/dist/effects/fluid.js +2 -2
  398. package/dist/effects/fly-to-cart.cjs +1 -1
  399. package/dist/effects/fly-to-cart.js +1 -1
  400. package/dist/effects/focus-draw.cjs +1 -1
  401. package/dist/effects/focus-draw.js +1 -1
  402. package/dist/effects/focus-glow.cjs +1 -1
  403. package/dist/effects/focus-glow.js +1 -1
  404. package/dist/effects/fog.cjs +1 -1
  405. package/dist/effects/fog.js +1 -1
  406. package/dist/effects/font-breathe.cjs +1 -1
  407. package/dist/effects/font-breathe.js +1 -1
  408. package/dist/effects/form-cascade.cjs +1 -1
  409. package/dist/effects/form-cascade.js +1 -1
  410. package/dist/effects/gen-skeleton.cjs +1 -1
  411. package/dist/effects/gen-skeleton.js +1 -1
  412. package/dist/effects/glass-frost.cjs +1 -1
  413. package/dist/effects/glass-frost.js +1 -1
  414. package/dist/effects/glitch-text.cjs +1 -1
  415. package/dist/effects/glitch-text.js +1 -1
  416. package/dist/effects/globe-spin.cjs +1 -1
  417. package/dist/effects/globe-spin.js +1 -1
  418. package/dist/effects/god-rays.cjs +1 -1
  419. package/dist/effects/god-rays.js +1 -1
  420. package/dist/effects/gpu-lift.cjs +1 -1
  421. package/dist/effects/gpu-lift.js +1 -1
  422. package/dist/effects/grain-flicker.cjs +1 -1
  423. package/dist/effects/grain-flicker.js +1 -1
  424. package/dist/effects/halftone-in.cjs +1 -1
  425. package/dist/effects/halftone-in.js +1 -1
  426. package/dist/effects/highlight-sweep.cjs +1 -1
  427. package/dist/effects/highlight-sweep.js +1 -1
  428. package/dist/effects/hologram.cjs +1 -1
  429. package/dist/effects/hologram.js +1 -1
  430. package/dist/effects/hud-frame.cjs +1 -1
  431. package/dist/effects/hud-frame.js +1 -1
  432. package/dist/effects/icon-pop.cjs +1 -1
  433. package/dist/effects/icon-pop.js +1 -1
  434. package/dist/effects/icon-swap.cjs +1 -1
  435. package/dist/effects/icon-swap.js +1 -1
  436. package/dist/effects/idle-reveal.cjs +1 -1
  437. package/dist/effects/idle-reveal.js +1 -1
  438. package/dist/effects/ink.cjs +2 -2
  439. package/dist/effects/ink.js +2 -2
  440. package/dist/effects/jump-cut.cjs +1 -1
  441. package/dist/effects/jump-cut.js +1 -1
  442. package/dist/effects/kaleido.cjs +1 -1
  443. package/dist/effects/kaleido.js +1 -1
  444. package/dist/effects/label-float.cjs +1 -1
  445. package/dist/effects/label-float.js +1 -1
  446. package/dist/effects/lantern-rise.cjs +1 -1
  447. package/dist/effects/lantern-rise.js +1 -1
  448. package/dist/effects/leaves.cjs +2 -2
  449. package/dist/effects/leaves.js +2 -2
  450. package/dist/effects/letterbox.cjs +1 -1
  451. package/dist/effects/letterbox.js +1 -1
  452. package/dist/effects/level-up.cjs +1 -1
  453. package/dist/effects/level-up.js +1 -1
  454. package/dist/effects/light-follow.cjs +1 -1
  455. package/dist/effects/light-follow.js +1 -1
  456. package/dist/effects/lightning.cjs +1 -1
  457. package/dist/effects/lightning.js +1 -1
  458. package/dist/effects/line-draw.cjs +1 -1
  459. package/dist/effects/line-draw.js +1 -1
  460. package/dist/effects/liquid-text.cjs +1 -1
  461. package/dist/effects/liquid-text.js +1 -1
  462. package/dist/effects/liquid-wipe.cjs +1 -1
  463. package/dist/effects/liquid-wipe.js +1 -1
  464. package/dist/effects/lottie-play.cjs +1 -1
  465. package/dist/effects/lottie-play.js +1 -1
  466. package/dist/effects/magnet.cjs +1 -1
  467. package/dist/effects/magnet.js +1 -1
  468. package/dist/effects/marching-ants.cjs +1 -1
  469. package/dist/effects/marching-ants.js +1 -1
  470. package/dist/effects/marker-pulse.cjs +1 -1
  471. package/dist/effects/marker-pulse.js +1 -1
  472. package/dist/effects/mention-glow.cjs +1 -1
  473. package/dist/effects/mention-glow.js +1 -1
  474. package/dist/effects/mesh-drift.cjs +1 -1
  475. package/dist/effects/mesh-drift.js +1 -1
  476. package/dist/effects/message-in.cjs +1 -1
  477. package/dist/effects/message-in.js +1 -1
  478. package/dist/effects/mosaic-flip.cjs +1 -1
  479. package/dist/effects/mosaic-flip.js +1 -1
  480. package/dist/effects/neon-ignite.cjs +1 -1
  481. package/dist/effects/neon-ignite.js +1 -1
  482. package/dist/effects/neon-pulse.cjs +1 -1
  483. package/dist/effects/neon-pulse.js +1 -1
  484. package/dist/effects/neon-write.cjs +1 -1
  485. package/dist/effects/neon-write.js +1 -1
  486. package/dist/effects/neu-press.cjs +1 -1
  487. package/dist/effects/neu-press.js +1 -1
  488. package/dist/effects/noise-reveal.cjs +1 -1
  489. package/dist/effects/noise-reveal.js +1 -1
  490. package/dist/effects/number-roll.cjs +1 -1
  491. package/dist/effects/number-roll.js +1 -1
  492. package/dist/effects/orbit-camera.cjs +1 -1
  493. package/dist/effects/orbit-camera.js +1 -1
  494. package/dist/effects/orbit-in.cjs +1 -1
  495. package/dist/effects/orbit-in.js +1 -1
  496. package/dist/effects/origami.cjs +1 -1
  497. package/dist/effects/origami.js +1 -1
  498. package/dist/effects/page-curl.cjs +1 -1
  499. package/dist/effects/page-curl.js +1 -1
  500. package/dist/effects/pan-reveal.cjs +1 -1
  501. package/dist/effects/pan-reveal.js +1 -1
  502. package/dist/effects/paper-unfold.cjs +1 -1
  503. package/dist/effects/paper-unfold.js +1 -1
  504. package/dist/effects/particle-text.cjs +1 -1
  505. package/dist/effects/particle-text.js +1 -1
  506. package/dist/effects/path-morph.cjs +1 -1
  507. package/dist/effects/path-morph.js +1 -1
  508. package/dist/effects/pearlescent.cjs +1 -1
  509. package/dist/effects/pearlescent.js +1 -1
  510. package/dist/effects/pencil-sketch.cjs +1 -1
  511. package/dist/effects/pencil-sketch.js +1 -1
  512. package/dist/effects/pin-drop.cjs +1 -1
  513. package/dist/effects/pin-drop.js +1 -1
  514. package/dist/effects/pinball.cjs +1 -1
  515. package/dist/effects/pinball.js +1 -1
  516. package/dist/effects/pinch-hint.cjs +1 -1
  517. package/dist/effects/pinch-hint.js +1 -1
  518. package/dist/effects/pixelate-in.cjs +1 -1
  519. package/dist/effects/pixelate-in.js +1 -1
  520. package/dist/effects/pointer-shadow.cjs +1 -1
  521. package/dist/effects/pointer-shadow.js +1 -1
  522. package/dist/effects/portal-open.cjs +1 -1
  523. package/dist/effects/portal-open.js +1 -1
  524. package/dist/effects/price-flip.cjs +1 -1
  525. package/dist/effects/price-flip.js +1 -1
  526. package/dist/effects/product-spin.cjs +1 -1
  527. package/dist/effects/product-spin.js +1 -1
  528. package/dist/effects/rack-focus.cjs +1 -1
  529. package/dist/effects/rack-focus.js +1 -1
  530. package/dist/effects/radial-spectrum.cjs +1 -1
  531. package/dist/effects/radial-spectrum.js +1 -1
  532. package/dist/effects/rain-glass.cjs +1 -1
  533. package/dist/effects/rain-glass.js +1 -1
  534. package/dist/effects/reaction-burst.cjs +1 -1
  535. package/dist/effects/reaction-burst.js +1 -1
  536. package/dist/effects/read-receipt.cjs +1 -1
  537. package/dist/effects/read-receipt.js +1 -1
  538. package/dist/effects/refraction.cjs +1 -1
  539. package/dist/effects/refraction.js +1 -1
  540. package/dist/effects/ring-sweep.cjs +1 -1
  541. package/dist/effects/ring-sweep.js +1 -1
  542. package/dist/effects/ripple-dissolve.cjs +1 -1
  543. package/dist/effects/ripple-dissolve.js +1 -1
  544. package/dist/effects/rope.cjs +1 -1
  545. package/dist/effects/rope.js +1 -1
  546. package/dist/effects/route-draw.cjs +1 -1
  547. package/dist/effects/route-draw.js +1 -1
  548. package/dist/effects/safe-fade.cjs +1 -1
  549. package/dist/effects/safe-fade.js +1 -1
  550. package/dist/effects/sakura.cjs +2 -2
  551. package/dist/effects/sakura.js +2 -2
  552. package/dist/effects/sale-shine.cjs +1 -1
  553. package/dist/effects/sale-shine.js +1 -1
  554. package/dist/effects/sankey-flow.cjs +1 -1
  555. package/dist/effects/sankey-flow.js +1 -1
  556. package/dist/effects/scanline-sweep.cjs +1 -1
  557. package/dist/effects/scanline-sweep.js +1 -1
  558. package/dist/effects/shatter.cjs +1 -1
  559. package/dist/effects/shatter.js +1 -1
  560. package/dist/effects/smoke.cjs +2 -2
  561. package/dist/effects/smoke.js +2 -2
  562. package/dist/effects/snowfall.cjs +1 -1
  563. package/dist/effects/snowfall.js +1 -1
  564. package/dist/effects/soft-body.cjs +1 -1
  565. package/dist/effects/soft-body.js +1 -1
  566. package/dist/effects/sound-particles.cjs +1 -1
  567. package/dist/effects/sound-particles.js +1 -1
  568. package/dist/effects/spatial-float.cjs +1 -1
  569. package/dist/effects/spatial-float.js +1 -1
  570. package/dist/effects/spectrum-mirror.cjs +1 -1
  571. package/dist/effects/spectrum-mirror.js +1 -1
  572. package/dist/effects/splash.cjs +2 -2
  573. package/dist/effects/splash.js +2 -2
  574. package/dist/effects/spooky-float.cjs +1 -1
  575. package/dist/effects/spooky-float.js +1 -1
  576. package/dist/effects/stock-pulse.cjs +1 -1
  577. package/dist/effects/stock-pulse.js +1 -1
  578. package/dist/effects/stream-text.cjs +1 -1
  579. package/dist/effects/stream-text.js +1 -1
  580. package/dist/effects/stroke-draw.cjs +1 -1
  581. package/dist/effects/stroke-draw.js +1 -1
  582. package/dist/effects/success-check.cjs +1 -1
  583. package/dist/effects/success-check.js +1 -1
  584. package/dist/effects/swipe-hint.cjs +1 -1
  585. package/dist/effects/swipe-hint.js +1 -1
  586. package/dist/effects/text-trail.cjs +1 -1
  587. package/dist/effects/text-trail.js +1 -1
  588. package/dist/effects/thinking-glow.cjs +1 -1
  589. package/dist/effects/thinking-glow.js +1 -1
  590. package/dist/effects/tilt-wobble.cjs +1 -1
  591. package/dist/effects/tilt-wobble.js +1 -1
  592. package/dist/effects/typing-dots.cjs +1 -1
  593. package/dist/effects/typing-dots.js +1 -1
  594. package/dist/effects/underline-sweep.cjs +1 -1
  595. package/dist/effects/underline-sweep.js +1 -1
  596. package/dist/effects/vhs-glitch.cjs +1 -1
  597. package/dist/effects/vhs-glitch.js +1 -1
  598. package/dist/effects/vine-grow.cjs +1 -1
  599. package/dist/effects/vine-grow.js +1 -1
  600. package/dist/effects/vinyl-spin.cjs +1 -1
  601. package/dist/effects/vinyl-spin.js +1 -1
  602. package/dist/effects/voice-wave.cjs +1 -1
  603. package/dist/effects/voice-wave.js +1 -1
  604. package/dist/effects/water-drop.cjs +1 -1
  605. package/dist/effects/water-drop.js +1 -1
  606. package/dist/effects/watercolor.cjs +1 -1
  607. package/dist/effects/watercolor.js +1 -1
  608. package/dist/effects/waveform-scope.cjs +1 -1
  609. package/dist/effects/waveform-scope.js +1 -1
  610. package/dist/effects/xmas-snow.cjs +1 -1
  611. package/dist/effects/xmas-snow.js +1 -1
  612. package/dist/effects/xp-gain.cjs +1 -1
  613. package/dist/effects/xp-gain.js +1 -1
  614. package/dist/effects/y2k-shine.cjs +1 -1
  615. package/dist/effects/y2k-shine.js +1 -1
  616. package/dist/element.cjs +1 -1
  617. package/dist/element.js +1 -1
  618. package/dist/element.umd.js +1 -1
  619. package/dist/index.cjs +1 -1
  620. package/dist/index.js +1 -1
  621. package/dist/index.umd.js +1 -1
  622. package/dist/llms-full.txt +24 -18
  623. package/dist/llms.txt +1 -1
  624. package/dist/manifest.json +35 -29
  625. package/dist/presets/extended.cjs +1 -1
  626. package/dist/presets/extended.js +1 -1
  627. package/dist/presets-extended.umd.js +1 -1
  628. package/dist/react.cjs +1 -1
  629. package/dist/react.js +1 -1
  630. package/dist/runtime/drag-snap.cjs +2 -2
  631. package/dist/runtime/drag-snap.iife.js +1 -1
  632. package/dist/runtime/drag-snap.js +2 -2
  633. package/dist/runtime/format-apng.cjs +3 -3
  634. package/dist/runtime/format-apng.iife.js +1 -1
  635. package/dist/runtime/format-apng.js +3 -3
  636. package/dist/runtime/format-css.cjs +3 -3
  637. package/dist/runtime/format-css.iife.js +1 -1
  638. package/dist/runtime/format-css.js +3 -3
  639. package/dist/runtime/format-gif.cjs +3 -3
  640. package/dist/runtime/format-gif.iife.js +1 -1
  641. package/dist/runtime/format-gif.js +3 -3
  642. package/dist/runtime/format-gltf.cjs +2 -2
  643. package/dist/runtime/format-gltf.iife.js +1 -1
  644. package/dist/runtime/format-gltf.js +2 -2
  645. package/dist/runtime/format-motion.cjs +4 -4
  646. package/dist/runtime/format-motion.iife.js +1 -1
  647. package/dist/runtime/format-motion.js +4 -4
  648. package/dist/runtime/format-obj.cjs +2 -2
  649. package/dist/runtime/format-obj.iife.js +1 -1
  650. package/dist/runtime/format-obj.js +2 -2
  651. package/dist/runtime/format-scene.cjs +2 -2
  652. package/dist/runtime/format-scene.iife.js +1 -1
  653. package/dist/runtime/format-scene.js +2 -2
  654. package/dist/runtime/format-sprite.cjs +3 -3
  655. package/dist/runtime/format-sprite.iife.js +1 -1
  656. package/dist/runtime/format-sprite.js +3 -3
  657. package/dist/runtime/format-svg.cjs +3 -3
  658. package/dist/runtime/format-svg.iife.js +1 -1
  659. package/dist/runtime/format-svg.js +3 -3
  660. package/dist/runtime/format-webp.cjs +3 -3
  661. package/dist/runtime/format-webp.iife.js +1 -1
  662. package/dist/runtime/format-webp.js +3 -3
  663. package/dist/runtime/gl.cjs +2 -2
  664. package/dist/runtime/gl.iife.js +1 -1
  665. package/dist/runtime/gl.js +2 -2
  666. package/dist/runtime/gltf-anim.cjs +2 -2
  667. package/dist/runtime/gltf-anim.iife.js +1 -1
  668. package/dist/runtime/gltf-anim.js +2 -2
  669. package/dist/runtime/gltf-decoders.cjs +2 -2
  670. package/dist/runtime/gltf-decoders.iife.js +1 -1
  671. package/dist/runtime/gltf-decoders.js +2 -2
  672. package/dist/runtime/lottie-state.cjs +2 -2
  673. package/dist/runtime/lottie-state.iife.js +1 -1
  674. package/dist/runtime/lottie-state.js +2 -2
  675. package/dist/runtime/physics.cjs +2 -2
  676. package/dist/runtime/physics.iife.js +1 -1
  677. package/dist/runtime/physics.js +2 -2
  678. package/dist/runtime/scroll.cjs +3 -3
  679. package/dist/runtime/scroll.iife.js +1 -1
  680. package/dist/runtime/scroll.js +3 -3
  681. package/dist/runtime/smooth.cjs +2 -2
  682. package/dist/runtime/smooth.iife.js +1 -1
  683. package/dist/runtime/smooth.js +2 -2
  684. package/dist/runtime/text.cjs +2 -2
  685. package/dist/runtime/text.iife.js +1 -1
  686. package/dist/runtime/text.js +2 -2
  687. package/dist/runtime/vector.cjs +3 -3
  688. package/dist/runtime/vector.iife.js +1 -1
  689. package/dist/runtime/vector.js +3 -3
  690. package/dist/runtime.cjs +4 -4
  691. package/dist/runtime.d.cts +1 -1
  692. package/dist/runtime.d.ts +1 -1
  693. package/dist/runtime.iife.js +2 -2
  694. package/dist/runtime.js +6 -6
  695. package/dist/solid.cjs +1 -1
  696. package/dist/solid.js +1 -1
  697. package/dist/svelte.cjs +1 -1
  698. package/dist/svelte.js +1 -1
  699. package/dist/vue.cjs +1 -1
  700. package/dist/vue.js +1 -1
  701. package/dist/widgets/add-to-cart.cjs +1 -1
  702. package/dist/widgets/add-to-cart.js +1 -1
  703. package/dist/widgets/badge-wall.cjs +1 -1
  704. package/dist/widgets/badge-wall.js +1 -1
  705. package/dist/widgets/bar-chart.cjs +1 -1
  706. package/dist/widgets/bar-chart.js +1 -1
  707. package/dist/widgets/bg-generator.cjs +1 -1
  708. package/dist/widgets/bg-generator.js +1 -1
  709. package/dist/widgets/carousel.cjs +1 -1
  710. package/dist/widgets/carousel.js +1 -1
  711. package/dist/widgets/cart-drawer.cjs +1 -1
  712. package/dist/widgets/cart-drawer.js +1 -1
  713. package/dist/widgets/chapter-nav.cjs +1 -1
  714. package/dist/widgets/chapter-nav.js +1 -1
  715. package/dist/widgets/chat-composer.cjs +1 -1
  716. package/dist/widgets/chat-composer.js +1 -1
  717. package/dist/widgets/clock-control.cjs +1 -1
  718. package/dist/widgets/clock-control.js +1 -1
  719. package/dist/widgets/code-export.cjs +1 -1
  720. package/dist/widgets/code-export.js +1 -1
  721. package/dist/widgets/color-picker.cjs +1 -1
  722. package/dist/widgets/color-picker.js +1 -1
  723. package/dist/widgets/command-palette.cjs +1 -1
  724. package/dist/widgets/command-palette.js +1 -1
  725. package/dist/widgets/compare.cjs +1 -1
  726. package/dist/widgets/compare.js +1 -1
  727. package/dist/widgets/countdown.cjs +1 -1
  728. package/dist/widgets/countdown.js +1 -1
  729. package/dist/widgets/cube-gallery.cjs +1 -1
  730. package/dist/widgets/cube-gallery.js +1 -1
  731. package/dist/widgets/date-picker.cjs +1 -1
  732. package/dist/widgets/date-picker.js +1 -1
  733. package/dist/widgets/disclosure.cjs +1 -1
  734. package/dist/widgets/disclosure.js +1 -1
  735. package/dist/widgets/dock.cjs +1 -1
  736. package/dist/widgets/dock.js +1 -1
  737. package/dist/widgets/dotlottie.cjs +1 -1
  738. package/dist/widgets/dotlottie.js +1 -1
  739. package/dist/widgets/equalizer.cjs +1 -1
  740. package/dist/widgets/equalizer.js +1 -1
  741. package/dist/widgets/festival-banner.cjs +1 -1
  742. package/dist/widgets/festival-banner.js +1 -1
  743. package/dist/widgets/field.cjs +1 -1
  744. package/dist/widgets/field.js +1 -1
  745. package/dist/widgets/file-drop.cjs +1 -1
  746. package/dist/widgets/file-drop.js +1 -1
  747. package/dist/widgets/gauge.cjs +1 -1
  748. package/dist/widgets/gauge.js +1 -1
  749. package/dist/widgets/gen-art.cjs +1 -1
  750. package/dist/widgets/gen-art.js +1 -1
  751. package/dist/widgets/gesture-sticker.cjs +1 -1
  752. package/dist/widgets/gesture-sticker.js +1 -1
  753. package/dist/widgets/gl-model.cjs +1 -1
  754. package/dist/widgets/gl-model.js +1 -1
  755. package/dist/widgets/gl-scene.cjs +2 -2
  756. package/dist/widgets/gl-scene.js +2 -2
  757. package/dist/widgets/globe.cjs +1 -1
  758. package/dist/widgets/globe.js +1 -1
  759. package/dist/widgets/gpu-particles.cjs +1 -1
  760. package/dist/widgets/gpu-particles.js +1 -1
  761. package/dist/widgets/gyro-card.cjs +1 -1
  762. package/dist/widgets/gyro-card.js +1 -1
  763. package/dist/widgets/hero-video.cjs +1 -1
  764. package/dist/widgets/hero-video.js +1 -1
  765. package/dist/widgets/hud-panel.cjs +1 -1
  766. package/dist/widgets/hud-panel.js +1 -1
  767. package/dist/widgets/hydrate.cjs +1 -1
  768. package/dist/widgets/hydrate.js +1 -1
  769. package/dist/widgets/install-button.cjs +1 -1
  770. package/dist/widgets/install-button.js +1 -1
  771. package/dist/widgets/kanban.cjs +1 -1
  772. package/dist/widgets/kanban.js +1 -1
  773. package/dist/widgets/keyframe-editor.cjs +1 -1
  774. package/dist/widgets/keyframe-editor.js +1 -1
  775. package/dist/widgets/kpi.cjs +1 -1
  776. package/dist/widgets/kpi.js +1 -1
  777. package/dist/widgets/leaderboard.cjs +1 -1
  778. package/dist/widgets/leaderboard.js +1 -1
  779. package/dist/widgets/liquid-nav.cjs +1 -1
  780. package/dist/widgets/liquid-nav.js +1 -1
  781. package/dist/widgets/location-card.cjs +1 -1
  782. package/dist/widgets/location-card.js +1 -1
  783. package/dist/widgets/lottie-icon.cjs +1 -1
  784. package/dist/widgets/lottie-icon.js +1 -1
  785. package/dist/widgets/lottie-player.cjs +2 -2
  786. package/dist/widgets/lottie-player.js +2 -2
  787. package/dist/widgets/lottie.cjs +1 -1
  788. package/dist/widgets/lottie.js +1 -1
  789. package/dist/widgets/lyrics.cjs +1 -1
  790. package/dist/widgets/lyrics.js +1 -1
  791. package/dist/widgets/masonry-flow.cjs +1 -1
  792. package/dist/widgets/masonry-flow.js +1 -1
  793. package/dist/widgets/menu-toggle.cjs +1 -1
  794. package/dist/widgets/menu-toggle.js +1 -1
  795. package/dist/widgets/menu.cjs +1 -1
  796. package/dist/widgets/menu.js +1 -1
  797. package/dist/widgets/message-list.cjs +1 -1
  798. package/dist/widgets/message-list.js +1 -1
  799. package/dist/widgets/milestones.cjs +1 -1
  800. package/dist/widgets/milestones.js +1 -1
  801. package/dist/widgets/modal.cjs +1 -1
  802. package/dist/widgets/modal.js +1 -1
  803. package/dist/widgets/motion-inspector.cjs +2 -2
  804. package/dist/widgets/motion-inspector.js +2 -2
  805. package/dist/widgets/motion-prefs.cjs +1 -1
  806. package/dist/widgets/motion-prefs.js +1 -1
  807. package/dist/widgets/motion-prompt.cjs +1 -1
  808. package/dist/widgets/motion-prompt.js +1 -1
  809. package/dist/widgets/motion-spec.cjs +1 -1
  810. package/dist/widgets/motion-spec.js +1 -1
  811. package/dist/widgets/motion.cjs +1 -1
  812. package/dist/widgets/motion.js +1 -1
  813. package/dist/widgets/music-player.cjs +1 -1
  814. package/dist/widgets/music-player.js +1 -1
  815. package/dist/widgets/native-preview.cjs +1 -1
  816. package/dist/widgets/native-preview.js +1 -1
  817. package/dist/widgets/nav-morph.cjs +1 -1
  818. package/dist/widgets/nav-morph.js +1 -1
  819. package/dist/widgets/notification-bell.cjs +1 -1
  820. package/dist/widgets/notification-bell.js +1 -1
  821. package/dist/widgets/odometer.cjs +1 -1
  822. package/dist/widgets/odometer.js +1 -1
  823. package/dist/widgets/organic-card.cjs +1 -1
  824. package/dist/widgets/organic-card.js +1 -1
  825. package/dist/widgets/otp.cjs +1 -1
  826. package/dist/widgets/otp.js +1 -1
  827. package/dist/widgets/pagination.cjs +1 -1
  828. package/dist/widgets/pagination.js +1 -1
  829. package/dist/widgets/panorama.cjs +1 -1
  830. package/dist/widgets/panorama.js +1 -1
  831. package/dist/widgets/parallax-layers.cjs +1 -1
  832. package/dist/widgets/parallax-layers.js +1 -1
  833. package/dist/widgets/pause-all.cjs +1 -1
  834. package/dist/widgets/pause-all.js +1 -1
  835. package/dist/widgets/perf-monitor.cjs +1 -1
  836. package/dist/widgets/perf-monitor.js +1 -1
  837. package/dist/widgets/physics-playground.cjs +2 -2
  838. package/dist/widgets/physics-playground.js +2 -2
  839. package/dist/widgets/plugin-card.cjs +3 -3
  840. package/dist/widgets/plugin-card.js +3 -3
  841. package/dist/widgets/plugin-store.cjs +1 -1
  842. package/dist/widgets/plugin-store.js +1 -1
  843. package/dist/widgets/presence.cjs +1 -1
  844. package/dist/widgets/presence.js +1 -1
  845. package/dist/widgets/prize-wheel.cjs +1 -1
  846. package/dist/widgets/prize-wheel.js +1 -1
  847. package/dist/widgets/product-gallery.cjs +1 -1
  848. package/dist/widgets/product-gallery.js +1 -1
  849. package/dist/widgets/progress-ring.cjs +1 -1
  850. package/dist/widgets/progress-ring.js +1 -1
  851. package/dist/widgets/prop-panel.cjs +1 -1
  852. package/dist/widgets/prop-panel.js +1 -1
  853. package/dist/widgets/pull-cord.cjs +1 -1
  854. package/dist/widgets/pull-cord.js +1 -1
  855. package/dist/widgets/radar.cjs +1 -1
  856. package/dist/widgets/radar.js +1 -1
  857. package/dist/widgets/reactions.cjs +1 -1
  858. package/dist/widgets/reactions.js +1 -1
  859. package/dist/widgets/red-envelope.cjs +1 -1
  860. package/dist/widgets/red-envelope.js +1 -1
  861. package/dist/widgets/retro-button.cjs +1 -1
  862. package/dist/widgets/retro-button.js +1 -1
  863. package/dist/widgets/rive.cjs +1 -1
  864. package/dist/widgets/rive.js +1 -1
  865. package/dist/widgets/route-transition.cjs +1 -1
  866. package/dist/widgets/route-transition.js +1 -1
  867. package/dist/widgets/scene.cjs +1 -1
  868. package/dist/widgets/scene.js +1 -1
  869. package/dist/widgets/scroll-ring.cjs +1 -1
  870. package/dist/widgets/scroll-ring.js +1 -1
  871. package/dist/widgets/scroll-scene.cjs +2 -2
  872. package/dist/widgets/scroll-scene.js +2 -2
  873. package/dist/widgets/segmented.cjs +1 -1
  874. package/dist/widgets/segmented.js +1 -1
  875. package/dist/widgets/shader-backdrop.cjs +2 -2
  876. package/dist/widgets/shader-backdrop.js +2 -2
  877. package/dist/widgets/sheet.cjs +1 -1
  878. package/dist/widgets/sheet.js +1 -1
  879. package/dist/widgets/shortcut.cjs +1 -1
  880. package/dist/widgets/shortcut.js +1 -1
  881. package/dist/widgets/skeleton-reveal.cjs +1 -1
  882. package/dist/widgets/skeleton-reveal.js +1 -1
  883. package/dist/widgets/sketch-chart.cjs +1 -1
  884. package/dist/widgets/sketch-chart.js +1 -1
  885. package/dist/widgets/smooth-scroll.cjs +2 -2
  886. package/dist/widgets/smooth-scroll.js +2 -2
  887. package/dist/widgets/snap-carousel.cjs +1 -1
  888. package/dist/widgets/snap-carousel.js +1 -1
  889. package/dist/widgets/sparkline.cjs +1 -1
  890. package/dist/widgets/sparkline.js +1 -1
  891. package/dist/widgets/spatial-card.cjs +1 -1
  892. package/dist/widgets/spatial-card.js +1 -1
  893. package/dist/widgets/star-rating.cjs +1 -1
  894. package/dist/widgets/star-rating.js +1 -1
  895. package/dist/widgets/stepper.cjs +1 -1
  896. package/dist/widgets/stepper.js +1 -1
  897. package/dist/widgets/sticky-wall.cjs +1 -1
  898. package/dist/widgets/sticky-wall.js +1 -1
  899. package/dist/widgets/stories.cjs +1 -1
  900. package/dist/widgets/stories.js +1 -1
  901. package/dist/widgets/suggestion-chips.cjs +1 -1
  902. package/dist/widgets/suggestion-chips.js +1 -1
  903. package/dist/widgets/swipe-deck.cjs +1 -1
  904. package/dist/widgets/swipe-deck.js +1 -1
  905. package/dist/widgets/switch.cjs +1 -1
  906. package/dist/widgets/switch.js +1 -1
  907. package/dist/widgets/tab-bar.cjs +1 -1
  908. package/dist/widgets/tab-bar.js +1 -1
  909. package/dist/widgets/terminal.cjs +1 -1
  910. package/dist/widgets/terminal.js +1 -1
  911. package/dist/widgets/text-splitter.cjs +3 -3
  912. package/dist/widgets/text-splitter.js +3 -3
  913. package/dist/widgets/theme-surface.cjs +1 -1
  914. package/dist/widgets/theme-surface.js +1 -1
  915. package/dist/widgets/theme-switcher.cjs +1 -1
  916. package/dist/widgets/theme-switcher.js +1 -1
  917. package/dist/widgets/tip.cjs +1 -1
  918. package/dist/widgets/tip.js +1 -1
  919. package/dist/widgets/toast-stack.cjs +1 -1
  920. package/dist/widgets/toast-stack.js +1 -1
  921. package/dist/widgets/token-editor.cjs +1 -1
  922. package/dist/widgets/token-editor.js +1 -1
  923. package/dist/widgets/upload-progress.cjs +1 -1
  924. package/dist/widgets/upload-progress.js +1 -1
  925. package/dist/widgets/video-card.cjs +1 -1
  926. package/dist/widgets/video-card.js +1 -1
  927. package/dist/widgets/voice-button.cjs +1 -1
  928. package/dist/widgets/voice-button.js +1 -1
  929. package/dist/widgets/volume-knob.cjs +1 -1
  930. package/dist/widgets/volume-knob.js +1 -1
  931. package/dist/widgets/weather-card.cjs +1 -1
  932. package/dist/widgets/weather-card.js +1 -1
  933. package/dist/widgets/worker-canvas.cjs +1 -1
  934. package/dist/widgets/worker-canvas.js +1 -1
  935. package/dist/widgets/xp-bar.cjs +1 -1
  936. package/dist/widgets/xp-bar.js +1 -1
  937. package/dist/widgets.umd.js +2 -2
  938. package/docs/components/usa-auto-animate.md +4 -2
  939. package/docs/components/usa-badge-wall.md +1 -1
  940. package/docs/components/usa-bar-chart.md +1 -1
  941. package/docs/components/usa-cart-drawer.md +1 -1
  942. package/docs/components/usa-chat-composer.md +1 -1
  943. package/docs/components/usa-clock-control.md +3 -0
  944. package/docs/components/usa-command-palette.md +1 -1
  945. package/docs/components/usa-equalizer.md +1 -1
  946. package/docs/components/usa-file-drop.md +1 -0
  947. package/docs/components/usa-gl-model.md +1 -1
  948. package/docs/components/usa-gl-scene.md +1 -1
  949. package/docs/components/usa-globe.md +1 -1
  950. package/docs/components/usa-keyframe-editor.md +1 -0
  951. package/docs/components/usa-leaderboard.md +1 -1
  952. package/docs/components/usa-loading-bar.md +1 -1
  953. package/docs/components/usa-message-list.md +1 -1
  954. package/docs/components/usa-notification-bell.md +1 -1
  955. package/docs/components/usa-otp.md +1 -1
  956. package/docs/components/usa-pull-refresh.md +1 -1
  957. package/docs/components/usa-shader-backdrop.md +1 -1
  958. package/docs/components/usa-upload-progress.md +1 -1
  959. package/docs/components/usa-voice-button.md +1 -1
  960. package/docs/components/usa-xp-bar.md +3 -1
  961. package/docs/gl-pool.md +79 -0
  962. package/docs/mcp-gateway-interop.md +77 -0
  963. package/docs/scheduling.md +5 -0
  964. package/package.json +11 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,90 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [13.8.0] - 2026-10-11
11
+
12
+ Graphics reliability — a WebGL context pool, a GPU resource budget and verified fallback paths. Additive and opt-in:
13
+ zero runtime dependencies, `motionary/components/lite` unchanged (the pool is its own entry), no size budget raised.
14
+ [docs/gl-pool.md](docs/gl-pool.md)
15
+
16
+ ### Added
17
+
18
+ - **`motionary/components/gl-pool`** — `installGLPool({ maxContexts = 8, budgetBytes = 256 MiB })`: caps live WebGL
19
+ contexts (1–16) below the browser limit; one lease per canvas; probe / detached contexts are reclaimed first; then
20
+ the least recently seen off-screen Motionary component gives its context back and is re-mounted when it scrolls back
21
+ into view; on-screen components and contexts the page created itself are never evicted (a request with every context
22
+ on screen gets `null` → the component's own fallback, re-mounted when a slot frees). A context lost while its
23
+ component is in the document re-mounts it on a fresh canvas (≤ 3 times in 10 s). `data-usa-gl` on the component:
24
+ `live` · `evicted` · `waiting` · `restored` · `lost`.
25
+ - GPU budget: per-context accounting of textures (`texImage2D` / `texStorage2D`), buffers (`bufferData`) and drawing
26
+ buffers; over budget, off-screen components are evicted, largest first. `glPoolStats()` (live, peak, bytes,
27
+ evicted, denied, reclaimed, lost, recovered, leases), `glSupport(kind)` (one shared, immediately released probe),
28
+ `uninstallGLPool()`.
29
+
30
+ ### Fixed
31
+
32
+ - `<usa-shader-backdrop>`: a lost WebGL context showed a blank canvas — it now shows its CSS gradient
33
+ (`data-usa-backend="css"`, `backend` event).
34
+ - `<usa-gl-scene>` / `<usa-gl-model>`: no WebGL or a lost context left an empty box — they now show a static poster
35
+ (`data-usa-backend="none"`, `error` event on loss).
36
+ - The WebGL2 feature probe of the GPU effect packs (`supportsWebGL2()`) released nothing; its probe context now goes
37
+ back right away instead of counting toward the browser's context limit until garbage collection.
38
+
39
+ ### Tests
40
+
41
+ - `test/gl-pool-13-8.test.ts` (14; 13 failed before) and `test/browser/gl-pool.spec.mjs` (Chromium): 32 WebGL
42
+ components stay ≤ 8 live contexts while scrolling with every visible one rendering; forced `WEBGL_lose_context`
43
+ loss → re-mount; no WebGL → every GPU component paints a fallback; reduced motion → one frame, no loop.
44
+
45
+ ## [13.7.0] - 2026-10-11
46
+
47
+ AI tools 2.0 — `motionary-mcp` 2.1 (the MCP server in the package, `npx -p motionary motionary-mcp`). Additive only:
48
+ `list_components`, `search_components` and `get_component` keep their input schema and result fields, no runtime
49
+ code changed, zero runtime dependencies, no size budget raised. [docs/mcp-gateway-interop.md](docs/mcp-gateway-interop.md)
50
+
51
+ ### Added
52
+
53
+ - **`check_compatibility`** tool — framework (html / esm / react / vue / svelte / solid / angular, with setup notes),
54
+ version (added in / changed after the installed version) and browser support (engines the browser suite tests,
55
+ minimum versions, web-platform features with their fallback) for components or for the components a snippet uses;
56
+ `compatible: false` when a component is unknown or newer than the installed version.
57
+ - **`suggest_fix`** tool — concrete `{ find, replace }` patches: wrong tag names (closest real tag), mistyped or
58
+ deprecated attributes, components used but never imported / defined, bare `motionary/…` imports in CDN pages (→ the
59
+ CDN module URL of the same major), missing `motionary/runtime` prerequisites, import paths / event names / CDN pins
60
+ removed in 13.0; `fixed` (all patches applied) and what the validator still reports.
61
+ - **`validate_snippet { browser: true | 'auto' }`** — runs the snippet in a real headless browser (Playwright, optional
62
+ peer, never a dependency) against the local build: HTML as a whole page with its own scripts, ESM behind an import
63
+ map; falls back to the static checks when no browser is available (`mode: 'browser' | 'static'`, `mount.skipped`).
64
+ - Versioned tool schemas: `_meta["motionary/schemaVersion"]` on every tool, `outputSchema` + a `schema` id in the
65
+ results of the new tools.
66
+ - Generated-example regression set (`scripts/mcp-examples.mjs`): every component's scaffold in seven frameworks; CI
67
+ runs all HTML + ESM ones (418) in Chromium through `validate_snippet { browser: true }` and fails on any uncaught
68
+ error or Motionary console error (`test/browser/mcp-examples.spec.mjs`); static checks for all of them in
69
+ `test/ai-tools-13-7.test.ts`.
70
+ - MCP Gateway interop: `scripts/gateway-interop.mjs` + workflow **Gateway interop** run `motionary-mcp` behind
71
+ `npx @winstonsayno/mcp-gateway@latest` and call the new tools through it (the gateway is fetched in that job only).
72
+
73
+ ### Changed
74
+
75
+ - `search_components` ranking: an exact tag (typed bare, with the `usa-` prefix, in angle brackets or as words such as `pull refresh`) always comes
76
+ first, exact tag segments / keywords outrank substrings, typos still match (`acordion` finds the accordion), ties
77
+ break on the tag so results are stable. Same result fields.
78
+ - `scaffold_snippet`: elements an example uses besides its own are registered too (an add-to-cart
79
+ example that flies into a cart drawer), imports are merged per module (one name imported once), CDN pages import modules from the CDN
80
+ instead of bare `motionary/…` specifiers; React output renames DOM attributes and styles properly; solid and angular
81
+ scaffolds.
82
+
83
+ ### Fixed
84
+
85
+ - 50 of 418 generated HTML / ESM examples failed in a real browser (measured on 13.1 / 13.2): example scripts used
86
+ undeclared element variables (`wall`, `cart`, `bar` …), a placeholder `…` inside a script, `fetch('/api')`, undefined
87
+ `a` / `b`, a missing `.grid`, bare `motionary/…` imports in CDN pages, a second element the example needs was never
88
+ registered, a duplicated import, method calls before the element mounted. All examples now run clean in Chromium
89
+ (the official Rive runtime example still needs `@rive-app/canvas`, which the offline test cannot fetch — it is
90
+ expected to report that peer).
91
+ - `validate_snippet`: words inside quoted attribute values were reported as unknown attributes; a runtime module loaded
92
+ as `runtime/*.iife.js` (or named in an HTML comment) was reported as "imported but never registered".
93
+
10
94
  ## [13.6.0] - 2026-10-11
11
95
 
12
96
  Timeline editing model. A new editor-only entry, `motionary/components/timeline-editor`, gives timeline UIs (the
@@ -0,0 +1,167 @@
1
+ // motionary-mcp 13.2 — validate_snippet { browser: true }: run the snippet in a real headless browser (Playwright, optional peer)
2
+ // instead of jsdom. jsdom stays the default for { mount: true }; this is the opt-in, slower and more faithful check.
3
+ // • HTML snippets run as a whole document, their own scripts included. CDN URLs for motionary / use-scroll-animate
4
+ // (unpkg, jsDelivr, any version) are served from the local build, so the snippet runs against the package under test.
5
+ // • ESM snippets (npm + bundler style) run as a module behind an import map that resolves every `motionary/*` subpath the
6
+ // way package.json `exports` names it; the markup comes from the snippet's `/* HTML: … */` block.
7
+ // • JSX / Vue / Svelte / Solid / Angular need their compiler, so only their markup is mounted (with the prerequisites the
8
+ // snippet registers, loaded in the right order) — `run: 'markup'` says so. Real framework builds: scripts/build-examples.mjs.
9
+ // Every other network request is blocked (an official runtime the snippet loads from a CDN is reported, not fetched).
10
+ // Then the same contract checks as the jsdom mount run in the page: defined + upgraded, observed attributes, event names,
11
+ // plus uncaught errors / rejections and motionary console errors from the real run.
12
+ import { readFileSync, existsSync } from 'node:fs';
13
+ import { join, extname } from 'node:path';
14
+ import { markupOf, listenedEvents, LEGACY_EVENTS_12 } from './mcp-mount.mjs';
15
+
16
+ const ORIGIN = 'http://motionary.test';
17
+ const TYPES = { '.js': 'text/javascript', '.mjs': 'text/javascript', '.cjs': 'text/javascript', '.css': 'text/css', '.json': 'application/json', '.wasm': 'application/wasm', '.svg': 'image/svg+xml', '.png': 'image/png' };
18
+ const CDN = /^https?:\/\/(?:unpkg\.com|cdn\.jsdelivr\.net\/npm)\/(?:motionary|use-scroll-animate)(?:@[^/]+)?\/dist\/([^?#]+)/;
19
+ const GLOBAL = new Set(['class', 'id', 'style', 'role', 'slot', 'hidden', 'tabindex', 'title', 'lang', 'dir', 'part', 'is', 'inert', 'nonce', 'popover', 'translate', 'draggable', 'contenteditable', 'autofocus', 'key', 'ref', 'classname']);
20
+
21
+ /** How a snippet can run in a browser: 'document' (HTML), 'module' (ESM + bundler) or 'markup' (needs a framework compiler). */
22
+ export function snippetKind(code) {
23
+ const s = String(code || '');
24
+ const noBlock = s.replace(/\/\*[\s\S]*?\*\//g, '');
25
+ const startsWithImport = /^\s*(?:\/\/[^\n]*\n\s*)*import[\s{*'"]/.test(noBlock);
26
+ const framework = /<script\s+setup|<template[\s>]|\bexport\s+(?:default\s+)?(?:function|class)\b|@Component\(|className=|\sattr:[\w-]+=|=\{|<script(?![^>]*\b(?:src|type)=)[^>]*>[\s\S]*?\bimport\s/.test(s);
27
+ if (framework) return 'markup';
28
+ if (startsWithImport) return /<[a-z][\w-]*[\s>/]/i.test(noBlock) ? 'markup' : 'module';
29
+ return /<[a-z!]/i.test(s) ? 'document' : 'markup';
30
+ }
31
+
32
+ /** package.json `exports` → import map entries ('motionary/runtime' → '/dist/runtime.js'). */
33
+ export function exportsToImports(exports, base = '/dist/') {
34
+ const map = {};
35
+ for (const [k, v] of Object.entries(exports || {})) {
36
+ const t = typeof v === 'string' ? v : v && (v.import ? (typeof v.import === 'string' ? v.import : v.import.default) : v.default);
37
+ if (typeof t === 'string' && t.startsWith('./dist/') && /\.m?js$/.test(t)) map[k === '.' ? 'motionary' : 'motionary/' + k.slice(2)] = base + t.slice(7);
38
+ }
39
+ return map;
40
+ }
41
+
42
+ /** Playwright from the user's project: playwright, playwright-core or @playwright/test (all optional). */
43
+ export async function loadPlaywright() {
44
+ for (const id of ['playwright', 'playwright-core', '@playwright/test']) {
45
+ try {
46
+ const mod = await import(id);
47
+ const pw = mod.chromium ? mod : mod.default;
48
+ if (pw && pw.chromium) return pw;
49
+ } catch { /* next */ }
50
+ }
51
+ throw new Error('playwright is not installed');
52
+ }
53
+
54
+ const esc = (s) => String(s).replace(/</g, '\\u003c');
55
+
56
+ function pageFor(kind, code, { imports, runtimeIds, bundles }) {
57
+ if (kind === 'document') {
58
+ const s = String(code);
59
+ return /<html|<!doctype/i.test(s) ? s : `<!doctype html><html lang="en"><head><meta charset="utf-8"></head><body>\n${s}\n</body></html>`;
60
+ }
61
+ const head = ['<!doctype html><html lang="en"><head><meta charset="utf-8">'];
62
+ let body = '';
63
+ if (kind === 'module') {
64
+ const html = (String(code).match(/\/\*\s*(?:then use it in your )?HTML:?\s*\n?([\s\S]*?)\*\//i) || [])[1] || markupOf(code);
65
+ head.push(`<script type="importmap">${esc(JSON.stringify({ imports }))}</script>`);
66
+ body = `${html}\n<script type="module">\n${String(code).replace(/\/\*[\s\S]*?\*\//g, '')}\n</script>`;
67
+ } else {
68
+ if (runtimeIds.length) { head.push(`<script src="/dist/runtime.iife.js"></script>`); for (const r of runtimeIds) if (r !== 'core') head.push(`<script src="/dist/runtime/${r}.iife.js"></script>`); }
69
+ for (const b of bundles) head.push(`<script src="/dist/${b}"></script>`);
70
+ body = markupOf(code);
71
+ }
72
+ return `${head.join('\n')}</head><body>\n${body}\n</body></html>`;
73
+ }
74
+
75
+ /**
76
+ * Run and check. Returns { mounted, environment, run, components:[{tag, defined, upgraded}], errors, warnings, blocked }
77
+ * or { mounted:false, skipped }. opts: distDir, findComponent, runtimeIds, browser (a launched Playwright browser to reuse),
78
+ * browserName ('chromium' | 'firefox' | 'webkit'), executablePath, loadPlaywright, settle (ms after load, default 400).
79
+ */
80
+ export async function runSnippet(m, code, opts = {}) {
81
+ const { distDir, findComponent, runtimeIds = [], settle = 400 } = opts;
82
+ if (!distDir || !existsSync(join(distDir, 'components.umd.js'))) return { mounted: false, skipped: `no built bundles in ${distDir} — run npm run build` };
83
+ let browser = opts.browser, own = false;
84
+ if (!browser) {
85
+ let pw;
86
+ try { pw = await (opts.loadPlaywright || loadPlaywright)(); } catch {
87
+ return { mounted: false, skipped: 'playwright is not installed — `npm i -D playwright && npx playwright install chromium` (optional peer) to run snippets in a real browser; the static checks still ran' };
88
+ }
89
+ const name = opts.browserName || process.env.MOTIONARY_BROWSER || 'chromium';
90
+ const executablePath = opts.executablePath || process.env.MOTIONARY_BROWSER_PATH || (name === 'chromium' ? process.env.CHROME_PATH : undefined) || undefined;
91
+ try { browser = await pw[name].launch({ headless: true, ...(executablePath ? { executablePath } : {}) }); own = true; } catch (e) {
92
+ return { mounted: false, skipped: `playwright could not start ${name}: ${String(e.message || e).split('\n')[0]} — \`npx playwright install ${name}\`; the static checks still ran` };
93
+ }
94
+ }
95
+ const pkgFile = join(distDir, '..', 'package.json');
96
+ const pkg = existsSync(pkgFile) ? JSON.parse(readFileSync(pkgFile, 'utf8')) : { exports: {} };
97
+ const kind = snippetKind(code);
98
+ const markup = markupOf(code);
99
+ const tags = [...new Set([...(kind === 'document' ? String(code) : markup).matchAll(/<(usa-[a-z0-9-]+)/gi)].map((x) => x[1].toLowerCase()))];
100
+ const widgets = tags.some((t) => /widgets\.umd/.test((findComponent && findComponent(m, t) || {}).cdn || ''));
101
+ const html = pageFor(kind, code, { imports: exportsToImports(pkg.exports), runtimeIds, bundles: ['components.umd.js', ...(widgets ? ['widgets.umd.js'] : [])] });
102
+ const errors = [], warnings = [], blocked = [], seen = new Set();
103
+ const note = (list, msg) => { if (!seen.has(msg)) { seen.add(msg); list.push(msg); } };
104
+ const context = await browser.newContext({ reducedMotion: 'no-preference', viewport: { width: 1024, height: 768 } });
105
+ try {
106
+ await context.route('**/*', async (route) => {
107
+ const url = route.request().url();
108
+ if (url === `${ORIGIN}/`) return route.fulfill({ status: 200, contentType: 'text/html; charset=utf-8', body: html });
109
+ let file = null;
110
+ if (url.startsWith(`${ORIGIN}/dist/`)) file = url.slice(ORIGIN.length + 6).split(/[?#]/)[0];
111
+ else { const c = url.match(CDN); if (c) file = c[1]; }
112
+ if (file != null) {
113
+ const p = join(distDir, file);
114
+ if (existsSync(p)) return route.fulfill({ status: 200, contentType: TYPES[extname(p)] || 'application/octet-stream', body: readFileSync(p), headers: { 'access-control-allow-origin': '*' } });
115
+ return route.fulfill({ status: 404, body: '' });
116
+ }
117
+ if (/^(data|blob):/.test(url)) return route.continue();
118
+ const type = route.request().resourceType();
119
+ if (type === 'script' || type === 'fetch' || type === 'xhr') blocked.push(url);
120
+ return route.abort('blockedbyclient');
121
+ });
122
+ const page = await context.newPage();
123
+ page.on('pageerror', (e) => note(errors, `run: ${String(e.message || e).split('\n')[0]}`));
124
+ page.on('console', (msg) => {
125
+ const t = msg.text();
126
+ if (msg.type() === 'error') {
127
+ if (/Failed to load resource|net::ERR_BLOCKED|blockedbyclient/i.test(t)) return;
128
+ if (/\[motionary\]|requires motionary|Error|error/.test(t)) note(errors, `run: ${t.split('\n')[0]}`);
129
+ } else if (msg.type() === 'warning' && /\[motionary\]/.test(t) && !/lacks .* motionary 5\.0 requires/.test(t)) note(warnings, `run: ${t.split('\n')[0]}`);
130
+ });
131
+ await page.addInitScript(() => { addEventListener('unhandledrejection', (e) => console.error('Unhandled rejection: ' + ((e.reason && e.reason.message) || e.reason))); });
132
+ await page.goto(`${ORIGIN}/`, { waitUntil: 'load', timeout: 20000 });
133
+ await page.waitForTimeout(settle);
134
+ await page.evaluate(() => new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r))));
135
+ const rows = await page.evaluate((list) => list.map((tag) => {
136
+ const ctor = customElements.get(tag), el = document.querySelector(tag);
137
+ return { tag, defined: !!ctor, upgraded: !!(ctor && el instanceof ctor), observed: ctor ? (ctor.observedAttributes || []).map(String) : [], attrs: el ? el.getAttributeNames() : [] };
138
+ }), tags);
139
+ const components = [];
140
+ for (const row of rows) {
141
+ components.push({ tag: row.tag, defined: row.defined, upgraded: row.upgraded });
142
+ const c = findComponent ? findComponent(m, row.tag) : null;
143
+ if (!c) continue;
144
+ if (!row.defined) { note(errors, `<${row.tag}> was never defined in the page — ${kind === 'markup' ? `import it from '${c.import.path}' and call ${c.import.define}()` : `load ${/widgets\.umd/.test(c.cdn) ? 'widgets.umd.js' : 'components.umd.js'} or call ${c.import.define}()`}`); continue; }
145
+ if (!row.upgraded) note(errors, `<${row.tag}> is defined but the element in the page did not upgrade`);
146
+ const observed = new Set(row.observed.map((a) => a.toLowerCase()));
147
+ for (const a of row.attrs) {
148
+ const k = a.toLowerCase();
149
+ if (GLOBAL.has(k) || k.startsWith('data-') || k.startsWith('aria-') || k.startsWith('on') || /[:@()]/.test(k)) continue;
150
+ if ((c.attributes || []).includes(k) && !observed.has(k)) note(warnings, `<${row.tag} ${k}>: the element reads "${k}" but does not observe it — set it before mount; changing it later has no effect (contract exemption)`);
151
+ }
152
+ }
153
+ const used = components.map((x) => findComponent && findComponent(m, x.tag)).filter(Boolean);
154
+ const emitted = new Set(used.flatMap((c) => c.events || []));
155
+ for (const ev of listenedEvents(code)) {
156
+ if (LEGACY_EVENTS_12[ev]) note(errors, `event "${ev}" was removed in 12.0 — listen to "${LEGACY_EVENTS_12[ev]}" (npx usa-codemod-12 --write)`);
157
+ else if (ev.startsWith('usa:') && used.length && !emitted.has(ev)) note(warnings, `no component in this snippet emits "${ev}" (they emit: ${[...emitted].join(', ') || 'no usa:* events'})`);
158
+ }
159
+ for (const u of [...new Set(blocked)]) note(warnings, `network request blocked: ${u} (the validation browser is offline; an official runtime from a CDN is not fetched)`);
160
+ return { mounted: true, environment: `${browser.browserType().name()} ${browser.version()}`, run: kind, components, errors, warnings, blocked: [...new Set(blocked)] };
161
+ } finally {
162
+ await context.close().catch(() => {});
163
+ if (own) await browser.close().catch(() => {});
164
+ }
165
+ }
166
+
167
+ export const PAGE_ORIGIN = ORIGIN;
@@ -0,0 +1,187 @@
1
+ // motionary-mcp 2.1 (13.7) — "AI tools 2.0": versioned result schemas, compatibility checks and auto-fix suggestions.
2
+ // Pure functions over the AI manifest; no dependencies, no network, never writes files. The catalog helpers
3
+ // (findComponent, searchComponents, validateSnippet, cdnImports …) are passed in by bin/motionary-mcp.mjs.
4
+ import { transform as codemod13 } from './usa-codemod-13.mjs';
5
+ import { compatAt, cmpVer } from './compat-history.mjs';
6
+
7
+ /** Result schema versions of the 13.7 tools (bumped on any incompatible change; fields are only ever added within a major). */
8
+ export const SCHEMAS = { search: 'motionary-mcp/search@1', compatibility: 'motionary-mcp/check_compatibility@1', validation: 'motionary-mcp/validate_snippet@1', fix: 'motionary-mcp/suggest_fix@1' };
9
+
10
+ export function levenshtein(a, b) {
11
+ a = String(a); b = String(b);
12
+ if (a === b) return 0;
13
+ const p = Array.from({ length: b.length + 1 }, (_, i) => i);
14
+ for (let i = 1; i <= a.length; i++) {
15
+ let prev = p[0]; p[0] = i;
16
+ for (let j = 1; j <= b.length; j++) { const t = p[j]; p[j] = Math.min(p[j] + 1, p[j - 1] + 1, prev + (a[i - 1] === b[j - 1] ? 0 : 1)); prev = t; }
17
+ }
18
+ return p[b.length];
19
+ }
20
+ const near = (w, x) => { if (w.length < 4 || x.length < 3) return false; const d = levenshtein(w, x); return d <= (w.length >= 7 ? 2 : 1); };
21
+
22
+ /** 13.7 ranking: exact tag (as typed, with or without usa-, spaces or hyphens) first, then exact tag segment / keyword /
23
+ * category, then substring matches, then typo-tolerant (fuzzy) matches; ties break on the tag name, so results are stable. */
24
+ export function rankComponents(m, query) {
25
+ const q = String(query || '').toLowerCase().trim().replace(/^<|\/?>$/g, '');
26
+ const words = q.split(/[^a-z0-9\u00c0-\uffff-]+/).filter(Boolean);
27
+ if (!words.length) return [];
28
+ const joined = 'usa-' + q.replace(/^usa-/, '').split(/[\s_]+/).filter(Boolean).join('-');
29
+ return m.components.map((c) => {
30
+ const tag = c.tag, segs = tag.slice(4).split('-'), title = String(c.title || '').toLowerCase(), kws = (c.keywords || []).map((k) => String(k).toLowerCase()), kw = kws.join(' '), desc = String(c.description || '').toLowerCase(), cat = String(c.category || '').toLowerCase();
31
+ let s = tag === joined ? 100 : 0;
32
+ for (const w0 of words) {
33
+ const w = w0.replace(/^usa-/, '');
34
+ let hit = false;
35
+ if (tag === `usa-${w}`) { s += 20; hit = true; } else if (segs.includes(w)) { s += 10; hit = true; } else if (tag.includes(w)) { s += 8; hit = true; }
36
+ if (title.includes(w)) { s += 6; hit = true; }
37
+ if (kws.includes(w)) { s += 7; hit = true; } else if (kw.includes(w)) { s += 5; hit = true; }
38
+ if (cat === w) { s += 4; hit = true; }
39
+ if (desc.includes(w)) { s += 2; hit = true; }
40
+ if ((c.attributes || []).includes(w)) { s += 1; hit = true; }
41
+ if (!hit) s += segs.some((x) => near(w, x) || (w.length >= 4 && x.startsWith(w))) ? 6 : kws.some((x) => near(w, x)) || title.split(/\W+/).some((x) => near(w, x)) ? 3 : 0;
42
+ }
43
+ return { c, s };
44
+ }).filter((x) => x.s > 0).sort((a, b) => b.s - a.s || a.c.tag.localeCompare(b.c.tag));
45
+ }
46
+
47
+ // ---------------------------------------------------------------- check_compatibility
48
+ export const FRAMEWORK_NOTES = {
49
+ html: 'CDN <script> tags or a <script type="module"> — no build step',
50
+ esm: 'npm + any bundler (Vite, webpack, Rollup, esbuild)',
51
+ react: 'React 19 passes attributes and properties to custom elements natively; React 18 sets attributes only (set object properties / listen to usa:* events through a ref)',
52
+ vue: 'Vue 3: compilerOptions.isCustomElement = (t) => t.startsWith("usa-")',
53
+ svelte: 'Svelte 4 / 5: custom elements work as-is',
54
+ solid: 'Solid: use attr:name for attributes (Solid sets properties otherwise)',
55
+ angular: 'Angular 15+: schemas: [CUSTOM_ELEMENTS_SCHEMA] on the standalone component',
56
+ };
57
+ // Engines the browser suite runs every component in on each PR (docs/browser-matrix.md, 13.1) and the web-platform
58
+ // features some components need beyond the Custom Elements + Shadow DOM baseline (with the fallback they use without them).
59
+ export const ENGINES = ['chromium', 'firefox', 'webkit'];
60
+ const BASELINE = { chrome: '90', edge: '90', firefox: '90', safari: '15' };
61
+ const FEATURES = [
62
+ { id: 'webgl2', test: (c) => c.requires.some((r) => /^(gl|format-gltf|gltf-anim|gltf-decoders|format-obj)$/.test(r)) || /^usa-gl-/.test(c.tag), note: 'WebGL2 — without it the element renders nothing and reports data-backend="none"', fallback: 'none' },
63
+ { id: 'webgl', test: (c) => /^usa-(shader|distort|liquid|post-fx)$/.test(c.tag), note: 'WebGL — falls back to a CSS / canvas2d rendering', fallback: 'css' },
64
+ { id: 'web-audio', test: (c) => /^usa-(equalizer|audio|waveform|voice-button)/.test(c.tag) || c.requires.includes('audio'), note: 'Web Audio — silent / static bars without it', fallback: 'static' },
65
+ { id: 'scroll-timeline', test: (c) => c.requires.includes('scroll'), note: 'scroll-driven animations — uses its own scroll scenes where animation-timeline is missing', fallback: 'js' },
66
+ ];
67
+
68
+ /** Framework, version and browser support for components (or a whole snippet), from the manifest. */
69
+ export function checkCompatibility(m, a, { findComponent, installedVersion, validateSnippet }) {
70
+ const version = a.version || installedVersion() || m.version;
71
+ let tags = (a.tags || []).slice();
72
+ if (a.code) tags.push(...validateSnippet(m, a.code).components);
73
+ tags = [...new Set(tags)];
74
+ if (!tags.length) throw new Error('give tags or code');
75
+ const framework = a.framework ? String(a.framework).toLowerCase() : null;
76
+ if (framework && !FRAMEWORK_NOTES[framework]) throw new Error(`framework must be one of ${Object.keys(FRAMEWORK_NOTES).join(', ')}`);
77
+ const browsers = (a.browsers || []).map((b) => String(b).toLowerCase());
78
+ const issues = [];
79
+ const components = tags.map((t) => {
80
+ const c = findComponent(m, t);
81
+ if (!c) { issues.push({ tag: t, level: 'error', message: `unknown component ${t} — use search_components` }); return { tag: t, known: false }; }
82
+ const at = compatAt(c, version);
83
+ const features = FEATURES.filter((f) => f.test(c)).map(({ id, note, fallback }) => ({ id, note, fallback }));
84
+ if (!at.available) issues.push({ tag: c.tag, level: 'error', message: `<${c.tag}> needs motionary ${c.since} (you have ${version}) — npm i motionary@${m.version}` });
85
+ for (const ch of at.changedAfter || []) issues.push({ tag: c.tag, level: 'warning', message: `<${c.tag}> changed in ${ch} (after ${version}) — see the CHANGELOG` });
86
+ if (c.stability === 'deprecated') issues.push({ tag: c.tag, level: 'warning', message: `<${c.tag}> is deprecated${c.deprecated?.use ? ` — use ${c.deprecated.use}` : ''}` });
87
+ const peer = (c.prerequisites && c.prerequisites.install) || null;
88
+ for (const b of browsers) {
89
+ const eng = /chrom|edge|chrome/.test(b) ? 'chromium' : /firefox|gecko/.test(b) ? 'firefox' : /safari|webkit|ios/.test(b) ? 'webkit' : null;
90
+ if (!eng) issues.push({ tag: c.tag, level: 'warning', message: `${b}: not covered by the browser suite (Chromium, Firefox, WebKit)` });
91
+ for (const f of features) if (f.fallback === 'none') issues.push({ tag: c.tag, level: 'warning', message: `${b}: <${c.tag}> needs ${f.id}; where the GPU / driver lacks it nothing is drawn` });
92
+ }
93
+ return {
94
+ tag: c.tag, known: true, since: c.since || null, available: at.available, changedAfter: at.changedAfter || [], stability: c.stability || 'stable',
95
+ frameworks: Object.fromEntries(Object.entries(FRAMEWORK_NOTES).filter(([k]) => !framework || k === framework).map(([k, note]) => [k, { supported: true, note }])),
96
+ browsers: { tested: ENGINES, minimum: BASELINE, features },
97
+ prerequisites: (c.requires || []).slice(), ...(peer ? { install: peer } : {}),
98
+ };
99
+ });
100
+ return { schema: SCHEMAS.compatibility, version, catalog: m.version, behind: cmpVer(version, m.version) < 0, compatible: !issues.some((i) => i.level === 'error'), components, issues };
101
+ }
102
+
103
+ // ---------------------------------------------------------------- suggest_fix
104
+ const lineOf = (src, i) => src.slice(0, Math.max(0, i)).split('\n').length;
105
+ const GLOBAL = new Set(['id', 'class', 'style', 'slot', 'hidden', 'title', 'lang', 'dir', 'tabindex', 'role', 'part', 'is', 'key', 'ref', 'classname', 'inert', 'draggable', 'contenteditable', 'exportparts', 'nonce', 'autofocus', 'popover', 'translate', 'spellcheck', 'accesskey', 'enterkeyhint', 'inputmode']);
106
+
107
+ /** Concrete patch suggestions for code using <usa-*> components: wrong tag names, unknown (mistyped / deprecated)
108
+ * attributes, components used but never imported / defined, bare `motionary/…` imports in a CDN page, missing
109
+ * runtime prerequisites, import paths / event names / CDN pins removed in 13.0 (the usa-codemod-13 tables).
110
+ * Each fix is { kind, message, line, patch: { find, replace } }; `fixed` is the code with every patch applied. */
111
+ export function suggestFix(m, code, opts, h) {
112
+ const { findComponent, cdnImports, validateSnippet } = h;
113
+ let src = String(code || '');
114
+ const fixes = [];
115
+ const add = (kind, message, find, replace, at) => { if (find && find !== replace && !fixes.some((f) => f.patch.find === find && f.patch.replace === replace)) fixes.push({ kind, message, line: lineOf(String(code || ''), at ?? String(code || '').indexOf(find)), patch: { find, replace } }); };
116
+ const context = opts.context || (/<html|<script\b|unpkg\.com|jsdelivr\.net/i.test(src) ? 'cdn' : /\bimport\s/.test(src) ? 'esm' : 'html');
117
+ // 1. unknown tags → closest tag (open + close)
118
+ for (const mm of src.matchAll(/<(usa-[a-z0-9-]+)/gi)) {
119
+ const t = mm[1].toLowerCase();
120
+ if (findComponent(m, t)) continue;
121
+ const best = m.components.map((k) => [k.tag, levenshtein(t, k.tag)]).sort((a, b) => a[1] - b[1] || a[0].localeCompare(b[0]))[0];
122
+ const rank = h.searchComponents(m, t.slice(4).replace(/-/g, ' '), 1)[0];
123
+ const to = best && best[1] <= Math.max(2, Math.floor(t.length / 4)) ? best[0] : rank?.tag;
124
+ if (to) { add('unknown-tag', `<${t}> is not a Motionary component — did you mean <${to}>?`, `<${mm[1]}`, `<${to}`, mm.index); add('unknown-tag', `closing tag of <${t}>`, `</${mm[1]}>`, `</${to}>`); }
125
+ }
126
+ // later passes look at the code with the tag names already fixed (patches are applied in order)
127
+ for (const f of fixes) src = src.split(f.patch.find).join(f.patch.replace);
128
+ // 2. unknown attributes → closest attribute of that component (typos and renamed / deprecated attributes)
129
+ for (const mm of src.matchAll(/<(usa-[a-z0-9-]+)([^>]*)>/gi)) {
130
+ const c = findComponent(m, mm[1]);
131
+ if (!c || !(c.attributes || []).length) continue;
132
+ const dep = (m.deprecatedAttributes || {})[c.tag] || {};
133
+ for (const am of mm[2].replace(/=\s*("[^"]*"|'[^']*')/g, (q) => q.replace(/[^\s="']/g, 'x').replace(/\s/g, '_')).matchAll(/(?:^|\s)([a-zA-Z_][\w-]*)(?=\s*=|\s|\/?$)/g)) {
134
+ const a = am[1].toLowerCase();
135
+ if (GLOBAL.has(a) || a.startsWith('data-') || a.startsWith('aria-') || a.startsWith('on') || c.attributes.includes(a)) continue;
136
+ const to = dep[a] || c.attributes.map((x) => [x, levenshtein(a, x)]).filter(([, d]) => d <= 2).sort((p, q) => p[1] - q[1])[0]?.[0];
137
+ if (!to) continue;
138
+ const whole = mm[0], fixed = whole.replace(new RegExp(`(\\s)${am[1]}(?=[\\s=/>])`), `$1${to}`);
139
+ add(dep[a] ? 'deprecated-attribute' : 'unknown-attribute', dep[a] ? `<${c.tag}> attribute "${a}" is deprecated — use "${to}"` : `<${c.tag}> has no attribute "${a}" — did you mean "${to}"?`, whole, fixed, mm.index);
140
+ }
141
+ }
142
+ // 3. removed paths / legacy events / old CDN major pins (usa-codemod-13)
143
+ const cm = codemod13(src);
144
+ if (cm.changes.length) {
145
+ const a = src.split('\n'), b = cm.code.split('\n');
146
+ a.forEach((l, i) => { if (b[i] !== undefined && b[i] !== l) add('deprecated-api', `removed in 13.0: ${cm.changes.join('; ')}`, l, b[i]); });
147
+ }
148
+ // 4. bare `motionary/…` imports inside a page that loads Motionary from a CDN
149
+ if (context === 'cdn' || context === 'html') {
150
+ for (const sm of src.matchAll(/<script\b[^>]*type=["']module["'][^>]*>([\s\S]*?)<\/script>/gi)) {
151
+ for (const lm of sm[1].matchAll(/^.*\b(?:from\s*|import\s*\(?\s*)['"]motionary(?:\/[\w./-]+)?['"].*$/gm)) add('bare-import', 'a CDN page cannot resolve bare `motionary/…` specifiers (no import map) — import the module from the same CDN major', lm[0], cdnImports(m, lm[0]));
152
+ }
153
+ }
154
+ // 5. components used but never imported / defined (ESM)
155
+ const usedTags = [...new Set([...src.matchAll(/<(usa-[a-z0-9-]+)/gi)].map((x) => x[1].toLowerCase()))].map((t) => findComponent(m, t) || findComponent(m, fixes.find((f) => f.kind === 'unknown-tag' && f.patch.find === `<${t}`)?.patch.replace.slice(1) || '')).filter(Boolean);
156
+ if (context === 'esm') {
157
+ const lines = [];
158
+ for (const c of usedTags) if (!src.includes(c.import.define + '(') && !/defineAll\w*\(|defineWidgets\(/.test(src)) lines.push(`import { ${c.import.define} } from '${c.import.path}';\n${c.import.register}`);
159
+ if (lines.length) {
160
+ const imp = [...src.matchAll(/^import .*$/gm)].pop();
161
+ if (imp) add('missing-import', `components used but never defined: ${usedTags.filter((c) => !src.includes(c.import.define + '(')).map((c) => `<${c.tag}>`).join(', ')}`, imp[0], `${imp[0]}\n${lines.join('\n')}`, imp.index);
162
+ else fixes.push({ kind: 'missing-import', message: 'components used but never defined', line: 1, patch: { find: '', replace: lines.join('\n') + '\n', insertAt: 'start' } });
163
+ }
164
+ }
165
+ // 6. missing runtime prerequisites (from the static validator)
166
+ const pre = validateSnippet(m, src).errors.concat(validateSnippet(m, src).warnings).filter((e) => /requires motionary\/runtime/.test(e));
167
+ for (const e of pre) {
168
+ const mod = (e.match(/requires (motionary\/runtime(?:\/[\w-]+)?)/) || [])[1];
169
+ if (!mod) continue;
170
+ const id = mod.split('/')[2], camel = id ? id.replace(/-(\w)/g, (_, x) => x.toUpperCase()) : null;
171
+ if (context === 'esm') {
172
+ const imp = src.match(/^import .*$/m);
173
+ const ins = id ? `import { use } from 'motionary/runtime';\nimport { ${camel} } from '${mod}';\nuse(${camel}); // prerequisites first` : `import 'motionary/runtime';`;
174
+ if (imp && !src.includes(`'${mod}'`)) add('missing-prerequisite', e, imp[0], `${ins}\n${imp[0]}`, imp.index);
175
+ } else {
176
+ const base = m.cdn.runtime.replace(/runtime\.iife\.js$/, '');
177
+ const tagAt = src.search(/<script\b[^>]*src=[^>]*(components|widgets)\.umd\.js/);
178
+ const first = tagAt > -1 ? src.slice(tagAt, src.indexOf('>', tagAt) + 1) : null;
179
+ const ins = `${src.includes('runtime.iife.js') ? '' : `<script src="${m.cdn.runtime}"></script>\n`}${id ? `<script src="${base}runtime/${id}.iife.js"></script>\n` : ''}`;
180
+ if (first && ins) add('missing-prerequisite', e, first, ins + first, tagAt);
181
+ }
182
+ }
183
+ let fixed = String(code || '');
184
+ for (const f of fixes) fixed = f.patch.insertAt === 'start' ? f.patch.replace + fixed : fixed.split(f.patch.find).join(f.patch.replace);
185
+ const after = validateSnippet(m, fixed);
186
+ return { schema: SCHEMAS.fix, context, fixes, fixed, valid: after.valid, remaining: { errors: after.errors, warnings: after.warnings } };
187
+ }