animl-cli 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1181) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +34 -0
  3. package/README.md +25 -2
  4. package/docs/AUTHORING.md +1530 -0
  5. package/docs/CLI.md +627 -0
  6. package/docs/parity/inventory.json +34570 -0
  7. package/examples/bell.ani +359 -0
  8. package/examples/bell.animl +114 -0
  9. package/examples/composite.ani +110 -0
  10. package/examples/composite.animl +21 -0
  11. package/examples/feather.ani +56 -0
  12. package/examples/feather.animl +20 -0
  13. package/examples/image-paints.ani +32 -0
  14. package/examples/image-paints.animl +8 -0
  15. package/examples/lib/cards.animl +9 -0
  16. package/examples/lib/shared.animl +10 -0
  17. package/examples/lib/ui.animl +8 -0
  18. package/examples/moon-toggle.png +0 -0
  19. package/examples/moon.ani +250 -0
  20. package/examples/moon.animl +55 -0
  21. package/examples/motion.ani +94 -0
  22. package/examples/motion.animl +24 -0
  23. package/examples/paint.ani +91 -0
  24. package/examples/paint.animl +21 -0
  25. package/examples/photo.ani +29 -0
  26. package/examples/photo.animl +6 -0
  27. package/examples/progress.ani +43 -0
  28. package/examples/progress.animl +6 -0
  29. package/examples/shapes.ani +109 -0
  30. package/examples/shapes.animl +16 -0
  31. package/examples/slice.ani +32 -0
  32. package/examples/slice.animl +9 -0
  33. package/examples/switch.ani +91 -0
  34. package/examples/switch.animl +22 -0
  35. package/examples/toolbar.ani +480 -0
  36. package/examples/toolbar.animl +115 -0
  37. package/examples/trash-ring.png +0 -0
  38. package/examples/trash.ani +357 -0
  39. package/examples/trash.animl +88 -0
  40. package/examples/web/index.html +520 -0
  41. package/examples/web/template.html +162 -0
  42. package/fixtures/bell/rive-reference/frames/00-rest.png +0 -0
  43. package/fixtures/bell/rive-reference/frames/01-hover.png +0 -0
  44. package/fixtures/bell/rive-reference/frames/02-ring-f3.png +0 -0
  45. package/fixtures/bell/rive-reference/frames/03-ring-f7.png +0 -0
  46. package/fixtures/bell/rive-reference/frames/04-ring-f17.png +0 -0
  47. package/fixtures/bell/rive-reference/frames/05-ring-f27.png +0 -0
  48. package/fixtures/bell/rive-reference/frames/06-ring-f57.png +0 -0
  49. package/fixtures/bell/rive-reference/frames/07-rested.png +0 -0
  50. package/fixtures/bell/rive-reference/frames/08-out.png +0 -0
  51. package/fixtures/bell/rive-reference/frames/commands.txt +24 -0
  52. package/llms.txt +30 -0
  53. package/modules/a11y/AUTHORING.md +108 -0
  54. package/modules/a11y/SPEC.md +304 -0
  55. package/modules/a11y/capabilities/a11y-focus-condition/example.ani +69 -0
  56. package/modules/a11y/capabilities/a11y-focus-condition/example.animl +17 -0
  57. package/modules/a11y/capabilities/a11y-inferred-text/example.ani +47 -0
  58. package/modules/a11y/capabilities/a11y-inferred-text/example.animl +13 -0
  59. package/modules/a11y/capabilities/a11y-property-heading-level/example.ani +26 -0
  60. package/modules/a11y/capabilities/a11y-property-heading-level/example.animl +6 -0
  61. package/modules/a11y/capabilities/a11y-tree-bounds/example.ani +88 -0
  62. package/modules/a11y/capabilities/a11y-tree-bounds/example.animl +18 -0
  63. package/modules/a11y/capabilities/a11y-tree-visibility/example.ani +16 -0
  64. package/modules/a11y/capabilities/a11y-tree-visibility/example.animl +4 -0
  65. package/modules/a11y/core/commands.source +135 -0
  66. package/modules/a11y/examples/contract.ani +74 -0
  67. package/modules/a11y/examples/contract.animl +15 -0
  68. package/modules/a11y/examples/focus-ancestor-policy.ani +72 -0
  69. package/modules/a11y/examples/focus-ancestor-policy.animl +16 -0
  70. package/modules/a11y/examples/painted-extents.ani +331 -0
  71. package/modules/a11y/examples/painted-extents.animl +62 -0
  72. package/modules/a11y/examples/painted-groups.ani +88 -0
  73. package/modules/a11y/examples/painted-groups.animl +18 -0
  74. package/modules/a11y/examples/slider-value-text.ani +53 -0
  75. package/modules/a11y/examples/slider-value-text.animl +11 -0
  76. package/modules/a11y/manifest.source +49 -0
  77. package/modules/a11y-actions/manifest.source +22 -0
  78. package/modules/a11y-dom/AUTHORING.md +35 -0
  79. package/modules/a11y-dom/SPEC.md +165 -0
  80. package/modules/a11y-dom/examples/mute.ani +28 -0
  81. package/modules/a11y-dom/examples/mute.animl +6 -0
  82. package/modules/a11y-dom/examples/navigation.ani +152 -0
  83. package/modules/a11y-dom/examples/navigation.animl +35 -0
  84. package/modules/a11y-dom/manifest.source +22 -0
  85. package/modules/assetio/SPEC.md +16 -0
  86. package/modules/assetio/manifest.source +12 -0
  87. package/modules/assets/SPEC.md +23 -0
  88. package/modules/assets/capabilities/assets-audio/example.ani +60 -0
  89. package/modules/assets/capabilities/assets-audio/example.animl +16 -0
  90. package/modules/assets/capabilities/assets-audio-clip/example.ani +62 -0
  91. package/modules/assets/capabilities/assets-audio-clip/example.animl +17 -0
  92. package/modules/assets/capabilities/assets-audio-export-source/example.ani +60 -0
  93. package/modules/assets/capabilities/assets-audio-export-source/example.animl +16 -0
  94. package/modules/assets/capabilities/assets-audio-import-flac/example.ani +63 -0
  95. package/modules/assets/capabilities/assets-audio-import-flac/example.animl +17 -0
  96. package/modules/assets/capabilities/assets-audio-import-mp3/example.ani +63 -0
  97. package/modules/assets/capabilities/assets-audio-import-mp3/example.animl +17 -0
  98. package/modules/assets/capabilities/assets-audio-import-wav/example.ani +60 -0
  99. package/modules/assets/capabilities/assets-audio-import-wav/example.animl +16 -0
  100. package/modules/assets/capabilities/assets-blob/example.ani +52 -0
  101. package/modules/assets/capabilities/assets-blob/example.animl +13 -0
  102. package/modules/assets/capabilities/assets-cdn-disable/example.ani +48 -0
  103. package/modules/assets/capabilities/assets-cdn-disable/example.animl +12 -0
  104. package/modules/assets/capabilities/assets-exclude-export/example.ani +49 -0
  105. package/modules/assets/capabilities/assets-exclude-export/example.animl +12 -0
  106. package/modules/assets/capabilities/assets-host-decode-audio/example.ani +60 -0
  107. package/modules/assets/capabilities/assets-host-decode-audio/example.animl +16 -0
  108. package/modules/assets/capabilities/assets-image-encoding-jpeg/example.ani +50 -0
  109. package/modules/assets/capabilities/assets-image-encoding-jpeg/example.animl +12 -0
  110. package/modules/assets/capabilities/assets-image-encoding-png/example.ani +50 -0
  111. package/modules/assets/capabilities/assets-image-encoding-png/example.animl +12 -0
  112. package/modules/assets/capabilities/assets-image-encoding-webp/example.ani +50 -0
  113. package/modules/assets/capabilities/assets-image-encoding-webp/example.animl +12 -0
  114. package/modules/assets/capabilities/assets-image-export-controls/example.ani +49 -0
  115. package/modules/assets/capabilities/assets-image-export-controls/example.animl +12 -0
  116. package/modules/assets/capabilities/assets-image-filter-bilinear/example.ani +49 -0
  117. package/modules/assets/capabilities/assets-image-filter-bilinear/example.animl +12 -0
  118. package/modules/assets/capabilities/assets-image-filter-nearest/example.ani +49 -0
  119. package/modules/assets/capabilities/assets-image-filter-nearest/example.animl +12 -0
  120. package/modules/assets/capabilities/assets-image-import-jpeg/example.ani +49 -0
  121. package/modules/assets/capabilities/assets-image-import-jpeg/example.animl +12 -0
  122. package/modules/assets/capabilities/assets-image-import-jpg/example.ani +49 -0
  123. package/modules/assets/capabilities/assets-image-import-jpg/example.animl +12 -0
  124. package/modules/assets/capabilities/assets-image-import-png/example.ani +49 -0
  125. package/modules/assets/capabilities/assets-image-import-png/example.animl +12 -0
  126. package/modules/assets/capabilities/assets-image-import-webp/example.ani +49 -0
  127. package/modules/assets/capabilities/assets-image-import-webp/example.animl +12 -0
  128. package/modules/assets/capabilities/assets-image-wrap-x-clamp/example.ani +50 -0
  129. package/modules/assets/capabilities/assets-image-wrap-x-clamp/example.animl +12 -0
  130. package/modules/assets/capabilities/assets-image-wrap-x-mirror/example.ani +50 -0
  131. package/modules/assets/capabilities/assets-image-wrap-x-mirror/example.animl +12 -0
  132. package/modules/assets/capabilities/assets-image-wrap-x-repeat/example.ani +50 -0
  133. package/modules/assets/capabilities/assets-image-wrap-x-repeat/example.animl +12 -0
  134. package/modules/assets/capabilities/assets-image-wrap-y-clamp/example.ani +50 -0
  135. package/modules/assets/capabilities/assets-image-wrap-y-clamp/example.animl +12 -0
  136. package/modules/assets/capabilities/assets-image-wrap-y-mirror/example.ani +50 -0
  137. package/modules/assets/capabilities/assets-image-wrap-y-mirror/example.animl +12 -0
  138. package/modules/assets/capabilities/assets-image-wrap-y-repeat/example.ani +50 -0
  139. package/modules/assets/capabilities/assets-image-wrap-y-repeat/example.animl +12 -0
  140. package/modules/assets/capabilities/assets-lottie-import/example.ani +58 -0
  141. package/modules/assets/capabilities/assets-lottie-import/example.animl +20 -0
  142. package/modules/assets/capabilities/assets-metadata/example.ani +53 -0
  143. package/modules/assets/capabilities/assets-metadata/example.animl +12 -0
  144. package/modules/assets/capabilities/assets-replacement-scope-image/example.ani +48 -0
  145. package/modules/assets/capabilities/assets-replacement-scope-image/example.animl +12 -0
  146. package/modules/assets/capabilities/assets-svg-import/example.ani +52 -0
  147. package/modules/assets/capabilities/assets-svg-import/example.animl +11 -0
  148. package/modules/assets/capabilities/host-api-asset-cdn-policy/example.ani +48 -0
  149. package/modules/assets/capabilities/host-api-asset-cdn-policy/example.animl +12 -0
  150. package/modules/assets/capabilities/host-api-asset-loader/example.ani +48 -0
  151. package/modules/assets/capabilities/host-api-asset-loader/example.animl +12 -0
  152. package/modules/assets/capabilities/host-api-asset-metadata/example.ani +53 -0
  153. package/modules/assets/capabilities/host-api-asset-metadata/example.animl +12 -0
  154. package/modules/assets/manifest.source +79 -0
  155. package/modules/bind/AUTHORING.md +49 -0
  156. package/modules/bind/capabilities/data-bind-listener-actions/example.ani +30 -0
  157. package/modules/bind/capabilities/data-bind-listener-actions/example.animl +5 -0
  158. package/modules/bind/core/expression.source +224 -0
  159. package/modules/bind/examples/filtering-list.ani +122 -0
  160. package/modules/bind/examples/filtering-list.animl +29 -0
  161. package/modules/bind/manifest.source +58 -0
  162. package/modules/canvas/capabilities/host-api-device-pixel-ratio/example.ani +16 -0
  163. package/modules/canvas/capabilities/host-api-device-pixel-ratio/example.animl +3 -0
  164. package/modules/canvas/capabilities/host-api-resize-backing-surface/example.ani +16 -0
  165. package/modules/canvas/capabilities/host-api-resize-backing-surface/example.animl +3 -0
  166. package/modules/canvas/capabilities/platforms-web-canvas/example.ani +16 -0
  167. package/modules/canvas/capabilities/platforms-web-canvas/example.animl +3 -0
  168. package/modules/canvas/manifest.source +16 -0
  169. package/modules/colormix/examples/switch.ani +51 -0
  170. package/modules/colormix/examples/switch.animl +13 -0
  171. package/modules/colormix/manifest.source +39 -0
  172. package/modules/componentpaint/capabilities/drawing-paint-paint-artboard/example.ani +72 -0
  173. package/modules/componentpaint/capabilities/drawing-paint-paint-artboard/example.animl +13 -0
  174. package/modules/componentpaint/examples/live.ani +72 -0
  175. package/modules/componentpaint/examples/live.animl +13 -0
  176. package/modules/componentpaint/manifest.source +29 -0
  177. package/modules/components/manifest.source +61 -0
  178. package/modules/composite/manifest.source +49 -0
  179. package/modules/contour/capabilities/drawing-paint-asymmetric-vertex/example.ani +32 -0
  180. package/modules/contour/capabilities/drawing-paint-asymmetric-vertex/example.animl +5 -0
  181. package/modules/contour/capabilities/drawing-paint-detached-vertex/example.ani +32 -0
  182. package/modules/contour/capabilities/drawing-paint-detached-vertex/example.animl +5 -0
  183. package/modules/contour/capabilities/drawing-paint-effect-order/example.ani +28 -0
  184. package/modules/contour/capabilities/drawing-paint-effect-order/example.animl +3 -0
  185. package/modules/contour/capabilities/drawing-paint-fill-rule-clockwise/example.ani +17 -0
  186. package/modules/contour/capabilities/drawing-paint-fill-rule-clockwise/example.animl +3 -0
  187. package/modules/contour/capabilities/drawing-paint-geometry-origin/example.ani +35 -0
  188. package/modules/contour/capabilities/drawing-paint-geometry-origin/example.animl +5 -0
  189. package/modules/contour/capabilities/drawing-paint-mirrored-vertex/example.ani +31 -0
  190. package/modules/contour/capabilities/drawing-paint-mirrored-vertex/example.animl +5 -0
  191. package/modules/contour/capabilities/drawing-paint-rounded-vertex/example.ani +31 -0
  192. package/modules/contour/capabilities/drawing-paint-rounded-vertex/example.animl +5 -0
  193. package/modules/contour/capabilities/drawing-paint-shared-effects/example.ani +26 -0
  194. package/modules/contour/capabilities/drawing-paint-shared-effects/example.animl +3 -0
  195. package/modules/contour/capabilities/drawing-paint-straight-vertex/example.ani +30 -0
  196. package/modules/contour/capabilities/drawing-paint-straight-vertex/example.animl +5 -0
  197. package/modules/contour/capabilities/drawing-paint-trim-sequential/example.ani +22 -0
  198. package/modules/contour/capabilities/drawing-paint-trim-sequential/example.animl +3 -0
  199. package/modules/contour/capabilities/drawing-paint-trim-synchronized/example.ani +22 -0
  200. package/modules/contour/capabilities/drawing-paint-trim-synchronized/example.animl +3 -0
  201. package/modules/contour/manifest.source +47 -0
  202. package/modules/convert/SPEC.md +140 -0
  203. package/modules/convert/capabilities/data-converter-color-formatting/example.ani +44 -0
  204. package/modules/convert/capabilities/data-converter-color-formatting/example.animl +8 -0
  205. package/modules/convert/capabilities/data-converter-trigger/example.ani +78 -0
  206. package/modules/convert/capabilities/data-converter-trigger/example.animl +22 -0
  207. package/modules/convert/core/math.source +126 -0
  208. package/modules/convert/examples/score.ani +60 -0
  209. package/modules/convert/examples/score.animl +12 -0
  210. package/modules/convert/examples/travelling-indicator.ani +41 -0
  211. package/modules/convert/examples/travelling-indicator.animl +8 -0
  212. package/modules/convert/manifest.source +53 -0
  213. package/modules/corners/examples/switch.ani +20 -0
  214. package/modules/corners/examples/switch.animl +3 -0
  215. package/modules/corners/manifest.source +25 -0
  216. package/modules/data/SPEC.md +216 -0
  217. package/modules/data/capabilities/data-bind-conditions/example.ani +52 -0
  218. package/modules/data/capabilities/data-bind-conditions/example.animl +17 -0
  219. package/modules/data/capabilities/data-bind-converter-options/example.ani +16 -0
  220. package/modules/data/capabilities/data-bind-converter-options/example.animl +4 -0
  221. package/modules/data/capabilities/data-bind-instance-values/example.ani +66 -0
  222. package/modules/data/capabilities/data-bind-instance-values/example.animl +17 -0
  223. package/modules/data/capabilities/data-bind-keyframes/example.ani +16 -0
  224. package/modules/data/capabilities/data-bind-keyframes/example.animl +4 -0
  225. package/modules/data/capabilities/data-bind-script-inputs/example.ani +16 -0
  226. package/modules/data/capabilities/data-bind-script-inputs/example.animl +4 -0
  227. package/modules/data/capabilities/data-bind-text/example.ani +16 -0
  228. package/modules/data/capabilities/data-bind-text/example.animl +4 -0
  229. package/modules/data/capabilities/data-binding-absolute/example.ani +43 -0
  230. package/modules/data/capabilities/data-binding-absolute/example.animl +13 -0
  231. package/modules/data/capabilities/data-binding-once/example.ani +58 -0
  232. package/modules/data/capabilities/data-binding-once/example.animl +20 -0
  233. package/modules/data/capabilities/data-binding-relative/example.ani +16 -0
  234. package/modules/data/capabilities/data-binding-relative/example.animl +4 -0
  235. package/modules/data/capabilities/data-binding-to-source/example.ani +58 -0
  236. package/modules/data/capabilities/data-binding-to-source/example.animl +20 -0
  237. package/modules/data/capabilities/data-binding-two-way-prefer-source/example.ani +59 -0
  238. package/modules/data/capabilities/data-binding-two-way-prefer-source/example.animl +20 -0
  239. package/modules/data/capabilities/data-binding-two-way-prefer-target/example.ani +59 -0
  240. package/modules/data/capabilities/data-binding-two-way-prefer-target/example.animl +20 -0
  241. package/modules/data/capabilities/data-component-public-data/example.ani +66 -0
  242. package/modules/data/capabilities/data-component-public-data/example.animl +17 -0
  243. package/modules/data/capabilities/data-custom-property-boolean/example.ani +35 -0
  244. package/modules/data/capabilities/data-custom-property-boolean/example.animl +9 -0
  245. package/modules/data/capabilities/data-custom-property-color/example.ani +38 -0
  246. package/modules/data/capabilities/data-custom-property-color/example.animl +9 -0
  247. package/modules/data/capabilities/data-custom-property-enum/example.ani +40 -0
  248. package/modules/data/capabilities/data-custom-property-enum/example.animl +9 -0
  249. package/modules/data/capabilities/data-custom-property-number/example.ani +35 -0
  250. package/modules/data/capabilities/data-custom-property-number/example.animl +9 -0
  251. package/modules/data/capabilities/data-custom-property-string/example.ani +35 -0
  252. package/modules/data/capabilities/data-custom-property-string/example.animl +9 -0
  253. package/modules/data/capabilities/data-custom-property-trigger/example.ani +52 -0
  254. package/modules/data/capabilities/data-custom-property-trigger/example.animl +15 -0
  255. package/modules/data/capabilities/data-default-instance/example.ani +43 -0
  256. package/modules/data/capabilities/data-default-instance/example.animl +13 -0
  257. package/modules/data/capabilities/data-editor-preview-instance/example.ani +16 -0
  258. package/modules/data/capabilities/data-editor-preview-instance/example.animl +4 -0
  259. package/modules/data/capabilities/data-enum-members/example.ani +41 -0
  260. package/modules/data/capabilities/data-enum-members/example.animl +8 -0
  261. package/modules/data/capabilities/data-global-model/example.ani +64 -0
  262. package/modules/data/capabilities/data-global-model/example.animl +17 -0
  263. package/modules/data/capabilities/data-instance-export/example.ani +41 -0
  264. package/modules/data/capabilities/data-instance-export/example.animl +8 -0
  265. package/modules/data/capabilities/data-list-items/example.ani +55 -0
  266. package/modules/data/capabilities/data-list-items/example.animl +16 -0
  267. package/modules/data/capabilities/data-model-definition/example.ani +43 -0
  268. package/modules/data/capabilities/data-model-definition/example.animl +13 -0
  269. package/modules/data/capabilities/data-named-instances/example.ani +43 -0
  270. package/modules/data/capabilities/data-named-instances/example.animl +13 -0
  271. package/modules/data/capabilities/data-operation-operand-view-model/example.ani +32 -0
  272. package/modules/data/capabilities/data-operation-operand-view-model/example.animl +9 -0
  273. package/modules/data/capabilities/data-property-artboard/example.ani +16 -0
  274. package/modules/data/capabilities/data-property-artboard/example.animl +4 -0
  275. package/modules/data/capabilities/data-property-asset-blob/example.ani +40 -0
  276. package/modules/data/capabilities/data-property-asset-blob/example.animl +10 -0
  277. package/modules/data/capabilities/data-property-asset-font/example.ani +40 -0
  278. package/modules/data/capabilities/data-property-asset-font/example.animl +10 -0
  279. package/modules/data/capabilities/data-property-asset-image/example.ani +40 -0
  280. package/modules/data/capabilities/data-property-asset-image/example.animl +12 -0
  281. package/modules/data/capabilities/data-property-boolean/example.ani +28 -0
  282. package/modules/data/capabilities/data-property-boolean/example.animl +7 -0
  283. package/modules/data/capabilities/data-property-color/example.ani +29 -0
  284. package/modules/data/capabilities/data-property-color/example.animl +7 -0
  285. package/modules/data/capabilities/data-property-enum-custom/example.ani +29 -0
  286. package/modules/data/capabilities/data-property-enum-custom/example.animl +7 -0
  287. package/modules/data/capabilities/data-property-enum-system/example.ani +29 -0
  288. package/modules/data/capabilities/data-property-enum-system/example.animl +7 -0
  289. package/modules/data/capabilities/data-property-list/example.ani +55 -0
  290. package/modules/data/capabilities/data-property-list/example.animl +16 -0
  291. package/modules/data/capabilities/data-property-number/example.ani +29 -0
  292. package/modules/data/capabilities/data-property-number/example.animl +7 -0
  293. package/modules/data/capabilities/data-property-string/example.ani +29 -0
  294. package/modules/data/capabilities/data-property-string/example.animl +7 -0
  295. package/modules/data/capabilities/data-property-symbol-list-index/example.ani +16 -0
  296. package/modules/data/capabilities/data-property-symbol-list-index/example.animl +4 -0
  297. package/modules/data/capabilities/data-property-text-style/example.ani +16 -0
  298. package/modules/data/capabilities/data-property-text-style/example.animl +4 -0
  299. package/modules/data/capabilities/data-property-trigger/example.ani +51 -0
  300. package/modules/data/capabilities/data-property-trigger/example.animl +17 -0
  301. package/modules/data/capabilities/data-property-view-model/example.ani +55 -0
  302. package/modules/data/capabilities/data-property-view-model/example.animl +16 -0
  303. package/modules/data/capabilities/data-script-model-api/example.ani +16 -0
  304. package/modules/data/capabilities/data-script-model-api/example.animl +4 -0
  305. package/modules/data/capabilities/data-scripted-converter/example.ani +16 -0
  306. package/modules/data/capabilities/data-scripted-converter/example.animl +4 -0
  307. package/modules/data/capabilities/data-state-action-trigger/example.ani +51 -0
  308. package/modules/data/capabilities/data-state-action-trigger/example.animl +17 -0
  309. package/modules/data/capabilities/data-system-enum-horizontal-text-align/example.ani +29 -0
  310. package/modules/data/capabilities/data-system-enum-horizontal-text-align/example.animl +7 -0
  311. package/modules/data/capabilities/data-system-enum-layout-alignment/example.ani +29 -0
  312. package/modules/data/capabilities/data-system-enum-layout-alignment/example.animl +7 -0
  313. package/modules/data/capabilities/data-system-enum-layout-direction/example.ani +29 -0
  314. package/modules/data/capabilities/data-system-enum-layout-direction/example.animl +7 -0
  315. package/modules/data/capabilities/data-system-enum-layout-display/example.ani +29 -0
  316. package/modules/data/capabilities/data-system-enum-layout-display/example.animl +7 -0
  317. package/modules/data/capabilities/data-system-enum-layout-flex-direction/example.ani +29 -0
  318. package/modules/data/capabilities/data-system-enum-layout-flex-direction/example.animl +7 -0
  319. package/modules/data/capabilities/data-system-enum-layout-position/example.ani +29 -0
  320. package/modules/data/capabilities/data-system-enum-layout-position/example.animl +7 -0
  321. package/modules/data/capabilities/data-system-enum-layout-position-units/example.ani +29 -0
  322. package/modules/data/capabilities/data-system-enum-layout-position-units/example.animl +7 -0
  323. package/modules/data/capabilities/data-system-enum-layout-scale-type/example.ani +29 -0
  324. package/modules/data/capabilities/data-system-enum-layout-scale-type/example.animl +7 -0
  325. package/modules/data/capabilities/data-system-enum-layout-wrap/example.ani +29 -0
  326. package/modules/data/capabilities/data-system-enum-layout-wrap/example.animl +7 -0
  327. package/modules/data/capabilities/data-system-enum-scroll-direction/example.ani +29 -0
  328. package/modules/data/capabilities/data-system-enum-scroll-direction/example.animl +7 -0
  329. package/modules/data/capabilities/data-system-enum-semantic-check-state/example.ani +29 -0
  330. package/modules/data/capabilities/data-system-enum-semantic-check-state/example.animl +7 -0
  331. package/modules/data/capabilities/data-system-enum-text-box/example.ani +29 -0
  332. package/modules/data/capabilities/data-system-enum-text-box/example.animl +7 -0
  333. package/modules/data/capabilities/data-system-enum-text-overflow/example.ani +29 -0
  334. package/modules/data/capabilities/data-system-enum-text-overflow/example.animl +7 -0
  335. package/modules/data/capabilities/data-system-enum-text-trim-bottom/example.ani +29 -0
  336. package/modules/data/capabilities/data-system-enum-text-trim-bottom/example.animl +7 -0
  337. package/modules/data/capabilities/data-system-enum-text-trim-top/example.ani +29 -0
  338. package/modules/data/capabilities/data-system-enum-text-trim-top/example.animl +7 -0
  339. package/modules/data/capabilities/data-system-enum-vertical-text-align/example.ani +29 -0
  340. package/modules/data/capabilities/data-system-enum-vertical-text-align/example.animl +7 -0
  341. package/modules/data/capabilities/data-system-enum-word-wrap/example.ani +29 -0
  342. package/modules/data/capabilities/data-system-enum-word-wrap/example.animl +7 -0
  343. package/modules/data/capabilities/drawing-paint-gradient-channel-binding/example.ani +46 -0
  344. package/modules/data/capabilities/drawing-paint-gradient-channel-binding/example.animl +14 -0
  345. package/modules/data/capabilities/input-data-listener/example.ani +41 -0
  346. package/modules/data/capabilities/input-data-listener/example.animl +10 -0
  347. package/modules/data/capabilities/input-write-data-constant/example.ani +41 -0
  348. package/modules/data/capabilities/input-write-data-constant/example.animl +10 -0
  349. package/modules/data/capabilities/input-write-data-copy/example.ani +39 -0
  350. package/modules/data/capabilities/input-write-data-copy/example.animl +10 -0
  351. package/modules/data/capabilities/input-write-focused/example.ani +39 -0
  352. package/modules/data/capabilities/input-write-focused/example.animl +11 -0
  353. package/modules/data/capabilities/input-write-gamepad-axis/example.ani +38 -0
  354. package/modules/data/capabilities/input-write-gamepad-axis/example.animl +9 -0
  355. package/modules/data/capabilities/input-write-gamepad-button-pressed/example.ani +38 -0
  356. package/modules/data/capabilities/input-write-gamepad-button-pressed/example.animl +9 -0
  357. package/modules/data/capabilities/input-write-gamepad-button-value/example.ani +38 -0
  358. package/modules/data/capabilities/input-write-gamepad-button-value/example.animl +9 -0
  359. package/modules/data/capabilities/input-write-gamepad-changed-value/example.ani +38 -0
  360. package/modules/data/capabilities/input-write-gamepad-changed-value/example.animl +9 -0
  361. package/modules/data/examples/data-extras.ani +109 -0
  362. package/modules/data/examples/data-extras.animl +28 -0
  363. package/modules/data/examples/scoreboard.ani +74 -0
  364. package/modules/data/examples/scoreboard.animl +18 -0
  365. package/modules/data/manifest.source +111 -0
  366. package/modules/data-artboard/SPEC.md +94 -0
  367. package/modules/data-artboard/capabilities/components-host-artboard-reference/example.ani +16 -0
  368. package/modules/data-artboard/capabilities/components-host-artboard-reference/example.animl +26 -0
  369. package/modules/data-artboard/capabilities/data-host-artboard/example.ani +16 -0
  370. package/modules/data-artboard/capabilities/data-host-artboard/example.animl +18 -0
  371. package/modules/data-artboard/capabilities/host-api-bindable-artboards/example.ani +16 -0
  372. package/modules/data-artboard/capabilities/host-api-bindable-artboards/example.animl +34 -0
  373. package/modules/data-artboard/capabilities/host-api-data-artboard/example.ani +16 -0
  374. package/modules/data-artboard/capabilities/host-api-data-artboard/example.animl +18 -0
  375. package/modules/data-artboard/manifest.source +41 -0
  376. package/modules/data-host/SPEC.md +50 -0
  377. package/modules/data-host/examples/nested.ani +82 -0
  378. package/modules/data-host/examples/nested.animl +21 -0
  379. package/modules/data-host/manifest.source +26 -0
  380. package/modules/derive/SPEC.md +66 -0
  381. package/modules/derive/examples/scoreboard.ani +121 -0
  382. package/modules/derive/examples/scoreboard.animl +27 -0
  383. package/modules/derive/manifest.source +24 -0
  384. package/modules/devtools/SPEC.md +25 -0
  385. package/modules/devtools/capabilities/host-api-deprecation-policy/example.ani +16 -0
  386. package/modules/devtools/capabilities/host-api-deprecation-policy/example.animl +3 -0
  387. package/modules/devtools/capabilities/host-api-fps-counter/example.ani +16 -0
  388. package/modules/devtools/capabilities/host-api-fps-counter/example.animl +9 -0
  389. package/modules/devtools/capabilities/host-api-performance-marks/example.ani +16 -0
  390. package/modules/devtools/capabilities/host-api-performance-marks/example.animl +3 -0
  391. package/modules/devtools/capabilities/host-api-stop/example.ani +16 -0
  392. package/modules/devtools/capabilities/host-api-stop/example.animl +3 -0
  393. package/modules/devtools/manifest.source +13 -0
  394. package/modules/events/examples/events.ani +75 -0
  395. package/modules/events/examples/events.animl +23 -0
  396. package/modules/events/examples/share-evidence/README.md +48 -0
  397. package/modules/events/examples/share-evidence/clicks.jsonl +51 -0
  398. package/modules/events/examples/share-evidence/clicks.script +102 -0
  399. package/modules/events/examples/share-evidence/interrupt.jsonl +3 -0
  400. package/modules/events/examples/share-evidence/interrupt.script +7 -0
  401. package/modules/events/examples/share-evidence/perf.txt +4 -0
  402. package/modules/events/examples/share-evidence/pulse.jsonl +10 -0
  403. package/modules/events/examples/share-evidence/pulse.script +20 -0
  404. package/modules/events/examples/share-evidence/rest-diff.txt +1 -0
  405. package/modules/events/examples/share-evidence/size.txt +18 -0
  406. package/modules/events/examples/share-evidence/verify.py +48 -0
  407. package/modules/events/examples/share-tone.wav +0 -0
  408. package/modules/events/examples/share.ani +186 -0
  409. package/modules/events/examples/share.animl +40 -0
  410. package/modules/events/manifest.source +74 -0
  411. package/modules/focus/capabilities/input-focus-clear/example.ani +116 -0
  412. package/modules/focus/capabilities/input-focus-clear/example.animl +28 -0
  413. package/modules/focus/capabilities/input-focus-down/example.ani +116 -0
  414. package/modules/focus/capabilities/input-focus-down/example.animl +28 -0
  415. package/modules/focus/capabilities/input-focus-edge-closed-loop/example.ani +116 -0
  416. package/modules/focus/capabilities/input-focus-edge-closed-loop/example.animl +28 -0
  417. package/modules/focus/capabilities/input-focus-edge-parent-scope/example.ani +116 -0
  418. package/modules/focus/capabilities/input-focus-edge-parent-scope/example.animl +28 -0
  419. package/modules/focus/capabilities/input-focus-edge-stop/example.ani +116 -0
  420. package/modules/focus/capabilities/input-focus-edge-stop/example.animl +28 -0
  421. package/modules/focus/capabilities/input-focus-enabled/example.ani +116 -0
  422. package/modules/focus/capabilities/input-focus-enabled/example.animl +28 -0
  423. package/modules/focus/capabilities/input-focus-left/example.ani +116 -0
  424. package/modules/focus/capabilities/input-focus-left/example.animl +28 -0
  425. package/modules/focus/capabilities/input-focus-next/example.ani +116 -0
  426. package/modules/focus/capabilities/input-focus-next/example.animl +28 -0
  427. package/modules/focus/capabilities/input-focus-pointer/example.ani +116 -0
  428. package/modules/focus/capabilities/input-focus-pointer/example.animl +28 -0
  429. package/modules/focus/capabilities/input-focus-previous/example.ani +116 -0
  430. package/modules/focus/capabilities/input-focus-previous/example.animl +28 -0
  431. package/modules/focus/capabilities/input-focus-right/example.ani +116 -0
  432. package/modules/focus/capabilities/input-focus-right/example.animl +28 -0
  433. package/modules/focus/capabilities/input-focus-target/example.ani +116 -0
  434. package/modules/focus/capabilities/input-focus-target/example.animl +28 -0
  435. package/modules/focus/capabilities/input-focus-traverse/example.ani +116 -0
  436. package/modules/focus/capabilities/input-focus-traverse/example.animl +28 -0
  437. package/modules/focus/capabilities/input-focus-up/example.ani +116 -0
  438. package/modules/focus/capabilities/input-focus-up/example.animl +28 -0
  439. package/modules/focus/capabilities/input-listen-blur/example.ani +116 -0
  440. package/modules/focus/capabilities/input-listen-blur/example.animl +28 -0
  441. package/modules/focus/capabilities/input-listen-focus/example.ani +116 -0
  442. package/modules/focus/capabilities/input-listen-focus/example.animl +28 -0
  443. package/modules/focus/examples/README.md +10 -0
  444. package/modules/focus/examples/traversal.ani +70 -0
  445. package/modules/focus/examples/traversal.animl +16 -0
  446. package/modules/focus/manifest.source +48 -0
  447. package/modules/fonts/SPEC.md +92 -0
  448. package/modules/fonts/capabilities/assets-font/example.ani +23 -0
  449. package/modules/fonts/capabilities/assets-font/example.animl +5 -0
  450. package/modules/fonts/capabilities/assets-host-decode-font/example.ani +23 -0
  451. package/modules/fonts/capabilities/assets-host-decode-font/example.animl +5 -0
  452. package/modules/fonts/capabilities/assets-replacement-scope-font/example.ani +23 -0
  453. package/modules/fonts/capabilities/assets-replacement-scope-font/example.animl +5 -0
  454. package/modules/fonts/capabilities/data-host-font/example.ani +23 -0
  455. package/modules/fonts/capabilities/data-host-font/example.animl +5 -0
  456. package/modules/fonts/capabilities/host-api-data-font/example.ani +23 -0
  457. package/modules/fonts/capabilities/host-api-data-font/example.animl +5 -0
  458. package/modules/fonts/capabilities/host-api-font-fallback/example.ani +23 -0
  459. package/modules/fonts/capabilities/host-api-font-fallback/example.animl +5 -0
  460. package/modules/fonts/capabilities/text-font-assets/example.ani +23 -0
  461. package/modules/fonts/capabilities/text-font-assets/example.animl +5 -0
  462. package/modules/fonts/capabilities/text-font-decoding/example.ani +43 -0
  463. package/modules/fonts/capabilities/text-font-decoding/example.animl +9 -0
  464. package/modules/fonts/capabilities/text-font-fallback/example.ani +23 -0
  465. package/modules/fonts/capabilities/text-font-fallback/example.animl +5 -0
  466. package/modules/fonts/capabilities/text-font-metrics/example.ani +40 -0
  467. package/modules/fonts/capabilities/text-font-metrics/example.animl +9 -0
  468. package/modules/fonts/capabilities/text-opentype-features/example.ani +23 -0
  469. package/modules/fonts/capabilities/text-opentype-features/example.animl +7 -0
  470. package/modules/fonts/capabilities/text-variable-axes/example.ani +23 -0
  471. package/modules/fonts/capabilities/text-variable-axes/example.animl +9 -0
  472. package/modules/fonts/manifest.source +57 -0
  473. package/modules/host/AUTHORING.md +33 -0
  474. package/modules/host/SPEC.md +76 -0
  475. package/modules/host/examples/page.html +23 -0
  476. package/modules/host/examples/score.ani +48 -0
  477. package/modules/host/examples/score.animl +10 -0
  478. package/modules/host/manifest.source +19 -0
  479. package/modules/host-edit/AUTHORING.md +66 -0
  480. package/modules/host-edit/SPEC.md +96 -0
  481. package/modules/host-edit/examples/board.ani +72 -0
  482. package/modules/host-edit/examples/board.animl +17 -0
  483. package/modules/host-edit/examples/page.html +34 -0
  484. package/modules/host-edit/manifest.source +21 -0
  485. package/modules/host-fit/capabilities/host-api-fit-layout/example.ani +55 -0
  486. package/modules/host-fit/capabilities/host-api-fit-layout/example.animl +11 -0
  487. package/modules/host-fit/examples/tile.ani +19 -0
  488. package/modules/host-fit/examples/tile.animl +3 -0
  489. package/modules/host-fit/manifest.source +22 -0
  490. package/modules/host-values/SPEC.md +9 -0
  491. package/modules/host-values/manifest.source +22 -0
  492. package/modules/ik/capabilities/rigging-ik/example.ani +16 -0
  493. package/modules/ik/capabilities/rigging-ik/example.animl +11 -0
  494. package/modules/ik/capabilities/rigging-ik-bend/example.ani +16 -0
  495. package/modules/ik/capabilities/rigging-ik-bend/example.animl +11 -0
  496. package/modules/ik/examples/reach.ani +100 -0
  497. package/modules/ik/examples/reach.animl +18 -0
  498. package/modules/ik/manifest.source +30 -0
  499. package/modules/input/SPEC.md +397 -0
  500. package/modules/input/capabilities/host-api-coordinate-mapping/example.ani +32 -0
  501. package/modules/input/capabilities/host-api-coordinate-mapping/example.animl +7 -0
  502. package/modules/input/capabilities/host-api-dom-listener-control/example.ani +32 -0
  503. package/modules/input/capabilities/host-api-dom-listener-control/example.animl +7 -0
  504. package/modules/input/capabilities/host-api-gamepad/example.ani +34 -0
  505. package/modules/input/capabilities/host-api-gamepad/example.animl +7 -0
  506. package/modules/input/capabilities/host-api-low-level-pointer/example.ani +32 -0
  507. package/modules/input/capabilities/host-api-low-level-pointer/example.animl +7 -0
  508. package/modules/input/capabilities/host-api-low-level-scroll/example.ani +32 -0
  509. package/modules/input/capabilities/host-api-low-level-scroll/example.animl +7 -0
  510. package/modules/input/capabilities/host-api-manual-gamepad-batch/example.ani +34 -0
  511. package/modules/input/capabilities/host-api-manual-gamepad-batch/example.animl +7 -0
  512. package/modules/input/capabilities/host-api-multitouch/example.ani +32 -0
  513. package/modules/input/capabilities/host-api-multitouch/example.animl +7 -0
  514. package/modules/input/capabilities/host-api-pointer-exit/example.ani +31 -0
  515. package/modules/input/capabilities/host-api-pointer-exit/example.animl +7 -0
  516. package/modules/input/capabilities/host-api-scroll-hit-policy/example.ani +32 -0
  517. package/modules/input/capabilities/host-api-scroll-hit-policy/example.animl +7 -0
  518. package/modules/input/capabilities/host-api-scroll-latching/example.ani +32 -0
  519. package/modules/input/capabilities/host-api-scroll-latching/example.animl +7 -0
  520. package/modules/input/capabilities/input-align-preserve/example.ani +43 -0
  521. package/modules/input/capabilities/input-align-preserve/example.animl +9 -0
  522. package/modules/input/capabilities/input-align-snap/example.ani +43 -0
  523. package/modules/input/capabilities/input-align-snap/example.animl +9 -0
  524. package/modules/input/capabilities/input-bounded-hit-tests/example.ani +32 -0
  525. package/modules/input/capabilities/input-bounded-hit-tests/example.animl +7 -0
  526. package/modules/input/capabilities/input-button-middle/example.ani +33 -0
  527. package/modules/input/capabilities/input-button-middle/example.animl +7 -0
  528. package/modules/input/capabilities/input-button-secondary/example.ani +33 -0
  529. package/modules/input/capabilities/input-button-secondary/example.animl +7 -0
  530. package/modules/input/capabilities/input-capture-phase/example.ani +60 -0
  531. package/modules/input/capabilities/input-capture-phase/example.animl +11 -0
  532. package/modules/input/capabilities/input-cursor-arrow/example.ani +33 -0
  533. package/modules/input/capabilities/input-cursor-arrow/example.animl +7 -0
  534. package/modules/input/capabilities/input-cursor-hidden/example.ani +33 -0
  535. package/modules/input/capabilities/input-cursor-hidden/example.animl +7 -0
  536. package/modules/input/capabilities/input-cursor-intent/example.ani +33 -0
  537. package/modules/input/capabilities/input-cursor-intent/example.animl +7 -0
  538. package/modules/input/capabilities/input-cursor-pointer/example.ani +33 -0
  539. package/modules/input/capabilities/input-cursor-pointer/example.animl +7 -0
  540. package/modules/input/capabilities/input-cursor-resize-horizontal/example.ani +33 -0
  541. package/modules/input/capabilities/input-cursor-resize-horizontal/example.animl +7 -0
  542. package/modules/input/capabilities/input-cursor-resize-vertical/example.ani +33 -0
  543. package/modules/input/capabilities/input-cursor-resize-vertical/example.animl +7 -0
  544. package/modules/input/capabilities/input-cursor-text/example.ani +33 -0
  545. package/modules/input/capabilities/input-cursor-text/example.animl +7 -0
  546. package/modules/input/capabilities/input-disable-listeners/example.ani +32 -0
  547. package/modules/input/capabilities/input-disable-listeners/example.animl +7 -0
  548. package/modules/input/capabilities/input-gamepad-axis/example.ani +34 -0
  549. package/modules/input/capabilities/input-gamepad-axis/example.animl +7 -0
  550. package/modules/input/capabilities/input-gamepad-button/example.ani +32 -0
  551. package/modules/input/capabilities/input-gamepad-button/example.animl +7 -0
  552. package/modules/input/capabilities/input-gamepad-button-phases/example.ani +33 -0
  553. package/modules/input/capabilities/input-gamepad-button-phases/example.animl +7 -0
  554. package/modules/input/capabilities/input-gamepad-connected/example.ani +31 -0
  555. package/modules/input/capabilities/input-gamepad-connected/example.animl +7 -0
  556. package/modules/input/capabilities/input-gamepad-disconnected/example.ani +31 -0
  557. package/modules/input/capabilities/input-gamepad-disconnected/example.animl +7 -0
  558. package/modules/input/capabilities/input-gamepad-host/example.ani +34 -0
  559. package/modules/input/capabilities/input-gamepad-host/example.animl +7 -0
  560. package/modules/input/capabilities/input-gamepad-index-mapping/example.ani +34 -0
  561. package/modules/input/capabilities/input-gamepad-index-mapping/example.animl +7 -0
  562. package/modules/input/capabilities/input-hit-occlusion-query/example.ani +42 -0
  563. package/modules/input/capabilities/input-hit-occlusion-query/example.animl +8 -0
  564. package/modules/input/capabilities/input-hit-parent-chain/example.ani +39 -0
  565. package/modules/input/capabilities/input-hit-parent-chain/example.animl +9 -0
  566. package/modules/input/capabilities/input-hit-shape-geometry/example.ani +32 -0
  567. package/modules/input/capabilities/input-hit-shape-geometry/example.animl +7 -0
  568. package/modules/input/capabilities/input-hit-test-host/example.ani +32 -0
  569. package/modules/input/capabilities/input-hit-test-host/example.animl +7 -0
  570. package/modules/input/capabilities/input-key-down/example.ani +32 -0
  571. package/modules/input/capabilities/input-key-down/example.animl +7 -0
  572. package/modules/input/capabilities/input-key-filter/example.ani +32 -0
  573. package/modules/input/capabilities/input-key-filter/example.animl +7 -0
  574. package/modules/input/capabilities/input-key-modifiers/example.ani +33 -0
  575. package/modules/input/capabilities/input-key-modifiers/example.animl +7 -0
  576. package/modules/input/capabilities/input-key-repeat/example.ani +32 -0
  577. package/modules/input/capabilities/input-key-repeat/example.animl +7 -0
  578. package/modules/input/capabilities/input-key-up/example.ani +32 -0
  579. package/modules/input/capabilities/input-key-up/example.animl +7 -0
  580. package/modules/input/capabilities/input-keyboard-bubbling/example.ani +45 -0
  581. package/modules/input/capabilities/input-keyboard-bubbling/example.animl +10 -0
  582. package/modules/input/capabilities/input-multi-touch/example.ani +32 -0
  583. package/modules/input/capabilities/input-multi-touch/example.animl +7 -0
  584. package/modules/input/capabilities/input-multi-trigger-listener/example.ani +32 -0
  585. package/modules/input/capabilities/input-multi-trigger-listener/example.animl +7 -0
  586. package/modules/input/capabilities/input-opaque-targets/example.ani +42 -0
  587. package/modules/input/capabilities/input-opaque-targets/example.animl +8 -0
  588. package/modules/input/capabilities/input-pointer-cancel/example.ani +31 -0
  589. package/modules/input/capabilities/input-pointer-cancel/example.animl +7 -0
  590. package/modules/input/capabilities/input-pointer-drag/example.ani +58 -0
  591. package/modules/input/capabilities/input-pointer-drag/example.animl +17 -0
  592. package/modules/input/capabilities/input-pointer-drag-end/example.ani +58 -0
  593. package/modules/input/capabilities/input-pointer-drag-end/example.animl +17 -0
  594. package/modules/input/capabilities/input-pointer-drag-start/example.ani +58 -0
  595. package/modules/input/capabilities/input-pointer-drag-start/example.animl +17 -0
  596. package/modules/input/capabilities/input-pointer-enable/example.ani +32 -0
  597. package/modules/input/capabilities/input-pointer-enable/example.animl +7 -0
  598. package/modules/input/capabilities/input-touch-page-scroll/example.ani +32 -0
  599. package/modules/input/capabilities/input-touch-page-scroll/example.animl +7 -0
  600. package/modules/input/capabilities/input-trackpad-scroll/example.ani +32 -0
  601. package/modules/input/capabilities/input-trackpad-scroll/example.animl +7 -0
  602. package/modules/input/capabilities/input-wheel-scroll/example.ani +32 -0
  603. package/modules/input/capabilities/input-wheel-scroll/example.animl +7 -0
  604. package/modules/input/capabilities/input-write-key-pressed/example.ani +39 -0
  605. package/modules/input/capabilities/input-write-key-pressed/example.animl +7 -0
  606. package/modules/input/capabilities/input-write-pointer-delta-x/example.ani +39 -0
  607. package/modules/input/capabilities/input-write-pointer-delta-x/example.animl +7 -0
  608. package/modules/input/capabilities/input-write-pointer-delta-y/example.ani +39 -0
  609. package/modules/input/capabilities/input-write-pointer-delta-y/example.animl +7 -0
  610. package/modules/input/capabilities/input-write-pointer-x/example.ani +39 -0
  611. package/modules/input/capabilities/input-write-pointer-x/example.animl +7 -0
  612. package/modules/input/capabilities/input-write-pointer-y/example.ani +39 -0
  613. package/modules/input/capabilities/input-write-pointer-y/example.animl +7 -0
  614. package/modules/input/capabilities/transforms-collapse/example.ani +39 -0
  615. package/modules/input/capabilities/transforms-collapse/example.animl +9 -0
  616. package/modules/input/capabilities/transforms-solo/example.ani +48 -0
  617. package/modules/input/capabilities/transforms-solo/example.animl +10 -0
  618. package/modules/input/core/commands.source +64 -0
  619. package/modules/input/core/types.source +97 -0
  620. package/modules/input/examples/README.md +9 -0
  621. package/modules/input/examples/drag-slider.ani +50 -0
  622. package/modules/input/examples/drag-slider.animl +11 -0
  623. package/modules/input/manifest.source +98 -0
  624. package/modules/layout/SPEC.md +210 -0
  625. package/modules/layout/capabilities/data-bind-layout/example.ani +60 -0
  626. package/modules/layout/capabilities/data-bind-layout/example.animl +10 -0
  627. package/modules/layout/capabilities/layout-alignment/example.ani +44 -0
  628. package/modules/layout/capabilities/layout-alignment/example.animl +6 -0
  629. package/modules/layout/capabilities/layout-animated-reflow/example.ani +62 -0
  630. package/modules/layout/capabilities/layout-animated-reflow/example.animl +12 -0
  631. package/modules/layout/capabilities/layout-containers/example.ani +62 -0
  632. package/modules/layout/capabilities/layout-containers/example.animl +9 -0
  633. package/modules/layout/capabilities/layout-fill-sizing/example.ani +45 -0
  634. package/modules/layout/capabilities/layout-fill-sizing/example.animl +6 -0
  635. package/modules/layout/capabilities/layout-fixed-sizing/example.ani +46 -0
  636. package/modules/layout/capabilities/layout-fixed-sizing/example.animl +6 -0
  637. package/modules/layout/capabilities/layout-flex-align-items/example.ani +43 -0
  638. package/modules/layout/capabilities/layout-flex-align-items/example.animl +6 -0
  639. package/modules/layout/capabilities/layout-flex-direction/example.ani +43 -0
  640. package/modules/layout/capabilities/layout-flex-direction/example.animl +6 -0
  641. package/modules/layout/capabilities/layout-flex-justify/example.ani +42 -0
  642. package/modules/layout/capabilities/layout-flex-justify/example.animl +6 -0
  643. package/modules/layout/capabilities/layout-hug-sizing/example.ani +42 -0
  644. package/modules/layout/capabilities/layout-hug-sizing/example.animl +6 -0
  645. package/modules/layout/capabilities/layout-intrinsic/example.ani +40 -0
  646. package/modules/layout/capabilities/layout-intrinsic/example.animl +6 -0
  647. package/modules/layout/capabilities/layout-paint/example.ani +60 -0
  648. package/modules/layout/capabilities/layout-paint/example.animl +8 -0
  649. package/modules/layout/capabilities/layout-participants/example.ani +40 -0
  650. package/modules/layout/capabilities/layout-participants/example.animl +6 -0
  651. package/modules/layout/capabilities/layout-self-alignment/example.ani +45 -0
  652. package/modules/layout/capabilities/layout-self-alignment/example.animl +6 -0
  653. package/modules/layout/capabilities/layout-size-bounds/example.ani +49 -0
  654. package/modules/layout/capabilities/layout-size-bounds/example.animl +6 -0
  655. package/modules/layout/capabilities/layout-spacing/example.ani +45 -0
  656. package/modules/layout/capabilities/layout-spacing/example.animl +6 -0
  657. package/modules/layout/capabilities/layout-visibility/example.ani +56 -0
  658. package/modules/layout/capabilities/layout-visibility/example.animl +7 -0
  659. package/modules/layout/examples/button.ani +61 -0
  660. package/modules/layout/examples/button.animl +12 -0
  661. package/modules/layout/examples/reflow.ani +62 -0
  662. package/modules/layout/examples/reflow.animl +12 -0
  663. package/modules/layout/examples/wrapped.ani +55 -0
  664. package/modules/layout/examples/wrapped.animl +11 -0
  665. package/modules/layout/manifest.source +73 -0
  666. package/modules/lists/SPEC.md +44 -0
  667. package/modules/lists/capabilities/components-explicit-context/example.ani +81 -0
  668. package/modules/lists/capabilities/components-explicit-context/example.animl +22 -0
  669. package/modules/lists/capabilities/components-inherited-context/example.ani +99 -0
  670. package/modules/lists/capabilities/components-inherited-context/example.animl +24 -0
  671. package/modules/lists/capabilities/components-list/example.ani +77 -0
  672. package/modules/lists/capabilities/components-list/example.animl +19 -0
  673. package/modules/lists/capabilities/components-list-map/example.ani +116 -0
  674. package/modules/lists/capabilities/components-list-map/example.animl +29 -0
  675. package/modules/lists/capabilities/components-list-size-override/example.ani +83 -0
  676. package/modules/lists/capabilities/components-list-size-override/example.animl +20 -0
  677. package/modules/lists/capabilities/data-binding-relative/example.ani +77 -0
  678. package/modules/lists/capabilities/data-binding-relative/example.animl +19 -0
  679. package/modules/lists/capabilities/data-converter-number-to-list/example.ani +109 -0
  680. package/modules/lists/capabilities/data-converter-number-to-list/example.animl +29 -0
  681. package/modules/lists/capabilities/data-property-symbol-list-index/example.ani +77 -0
  682. package/modules/lists/capabilities/data-property-symbol-list-index/example.animl +19 -0
  683. package/modules/lists/examples/players.ani +77 -0
  684. package/modules/lists/examples/players.animl +19 -0
  685. package/modules/lists/manifest.source +43 -0
  686. package/modules/machine/capabilities/state-machine-any-state/example.ani +62 -0
  687. package/modules/machine/capabilities/state-machine-any-state/example.animl +22 -0
  688. package/modules/machine/capabilities/state-machine-blend-1d-data/example.ani +74 -0
  689. package/modules/machine/capabilities/state-machine-blend-1d-data/example.animl +23 -0
  690. package/modules/machine/capabilities/state-machine-blend-1d-input/example.ani +70 -0
  691. package/modules/machine/capabilities/state-machine-blend-1d-input/example.animl +23 -0
  692. package/modules/machine/capabilities/state-machine-blend-additive/example.ani +69 -0
  693. package/modules/machine/capabilities/state-machine-blend-additive/example.animl +23 -0
  694. package/modules/machine/capabilities/state-machine-blend-direct/example.ani +64 -0
  695. package/modules/machine/capabilities/state-machine-blend-direct/example.animl +21 -0
  696. package/modules/machine/capabilities/state-machine-blend-exit-clock/example.ani +72 -0
  697. package/modules/machine/capabilities/state-machine-blend-exit-clock/example.animl +25 -0
  698. package/modules/machine/capabilities/state-machine-blend-weight-constant/example.ani +64 -0
  699. package/modules/machine/capabilities/state-machine-blend-weight-constant/example.animl +21 -0
  700. package/modules/machine/capabilities/state-machine-blend-weight-data/example.ani +71 -0
  701. package/modules/machine/capabilities/state-machine-blend-weight-data/example.animl +23 -0
  702. package/modules/machine/capabilities/state-machine-blend-weight-input/example.ani +69 -0
  703. package/modules/machine/capabilities/state-machine-blend-weight-input/example.animl +23 -0
  704. package/modules/machine/capabilities/state-machine-condition-artboard/example.ani +50 -0
  705. package/modules/machine/capabilities/state-machine-condition-artboard/example.animl +13 -0
  706. package/modules/machine/capabilities/state-machine-condition-component/example.ani +76 -0
  707. package/modules/machine/capabilities/state-machine-condition-component/example.animl +19 -0
  708. package/modules/machine/capabilities/state-machine-condition-data/example.ani +54 -0
  709. package/modules/machine/capabilities/state-machine-condition-data/example.animl +15 -0
  710. package/modules/machine/capabilities/state-machine-condition-focus/example.ani +49 -0
  711. package/modules/machine/capabilities/state-machine-condition-focus/example.animl +13 -0
  712. package/modules/machine/capabilities/state-machine-continue-on-exit/example.ani +58 -0
  713. package/modules/machine/capabilities/state-machine-continue-on-exit/example.animl +21 -0
  714. package/modules/machine/capabilities/state-machine-entry-state/example.ani +56 -0
  715. package/modules/machine/capabilities/state-machine-entry-state/example.animl +19 -0
  716. package/modules/machine/capabilities/state-machine-exit-state/example.ani +46 -0
  717. package/modules/machine/capabilities/state-machine-exit-state/example.animl +15 -0
  718. package/modules/machine/capabilities/state-machine-exit-time-relative/example.ani +52 -0
  719. package/modules/machine/capabilities/state-machine-exit-time-relative/example.animl +19 -0
  720. package/modules/machine/capabilities/state-machine-literal-asset/example.ani +62 -0
  721. package/modules/machine/capabilities/state-machine-literal-asset/example.animl +18 -0
  722. package/modules/machine/capabilities/state-machine-literal-boolean/example.ani +53 -0
  723. package/modules/machine/capabilities/state-machine-literal-boolean/example.animl +15 -0
  724. package/modules/machine/capabilities/state-machine-literal-color/example.ani +54 -0
  725. package/modules/machine/capabilities/state-machine-literal-color/example.animl +15 -0
  726. package/modules/machine/capabilities/state-machine-literal-enum/example.ani +54 -0
  727. package/modules/machine/capabilities/state-machine-literal-enum/example.animl +15 -0
  728. package/modules/machine/capabilities/state-machine-literal-string/example.ani +54 -0
  729. package/modules/machine/capabilities/state-machine-literal-string/example.animl +15 -0
  730. package/modules/machine/capabilities/state-machine-literal-trigger/example.ani +53 -0
  731. package/modules/machine/capabilities/state-machine-literal-trigger/example.animl +15 -0
  732. package/modules/machine/capabilities/state-machine-state-entry-actions/example.ani +56 -0
  733. package/modules/machine/capabilities/state-machine-state-entry-actions/example.animl +16 -0
  734. package/modules/machine/capabilities/state-machine-state-exit-actions/example.ani +56 -0
  735. package/modules/machine/capabilities/state-machine-state-exit-actions/example.animl +16 -0
  736. package/modules/machine/capabilities/state-machine-state-random/example.ani +53 -0
  737. package/modules/machine/capabilities/state-machine-state-random/example.animl +17 -0
  738. package/modules/machine/capabilities/state-machine-state-reset/example.ani +52 -0
  739. package/modules/machine/capabilities/state-machine-state-reset/example.animl +18 -0
  740. package/modules/machine/capabilities/state-machine-transition-actions/example.ani +56 -0
  741. package/modules/machine/capabilities/state-machine-transition-actions/example.animl +16 -0
  742. package/modules/machine/capabilities/state-machine-transition-disabled/example.ani +57 -0
  743. package/modules/machine/capabilities/state-machine-transition-disabled/example.animl +19 -0
  744. package/modules/machine/capabilities/state-machine-transition-duration-relative/example.ani +57 -0
  745. package/modules/machine/capabilities/state-machine-transition-duration-relative/example.animl +21 -0
  746. package/modules/machine/capabilities/state-machine-transition-end-actions/example.ani +56 -0
  747. package/modules/machine/capabilities/state-machine-transition-end-actions/example.animl +16 -0
  748. package/modules/machine/capabilities/state-machine-transition-random-weight/example.ani +53 -0
  749. package/modules/machine/capabilities/state-machine-transition-random-weight/example.animl +17 -0
  750. package/modules/machine/examples/README.md +12 -0
  751. package/modules/machine/examples/blend-pulse.ani +115 -0
  752. package/modules/machine/examples/blend-pulse.animl +32 -0
  753. package/modules/machine/manifest.source +73 -0
  754. package/modules/markup/manifest.source +26 -0
  755. package/modules/markup-animation/manifest.source +23 -0
  756. package/modules/markup-hooks/manifest.source +13 -0
  757. package/modules/markup-libraries/SPEC.md +56 -0
  758. package/modules/markup-libraries/capabilities/components-library-export/example.ani +45 -0
  759. package/modules/markup-libraries/capabilities/components-library-export/example.animl +4 -0
  760. package/modules/markup-libraries/capabilities/components-library-models/example.ani +45 -0
  761. package/modules/markup-libraries/capabilities/components-library-models/example.animl +4 -0
  762. package/modules/markup-libraries/capabilities/components-library-update/example.ani +45 -0
  763. package/modules/markup-libraries/capabilities/components-library-update/example.animl +4 -0
  764. package/modules/markup-libraries/manifest.source +38 -0
  765. package/modules/media/manifest.source +21 -0
  766. package/modules/mesh/capabilities/rigging-mesh/example.ani +50 -0
  767. package/modules/mesh/capabilities/rigging-mesh/example.animl +9 -0
  768. package/modules/mesh/capabilities/rigging-mesh-animation/example.ani +65 -0
  769. package/modules/mesh/capabilities/rigging-mesh-animation/example.animl +15 -0
  770. package/modules/mesh/examples/flag.ani +108 -0
  771. package/modules/mesh/examples/flag.animl +23 -0
  772. package/modules/mesh/manifest.source +37 -0
  773. package/modules/mix/capabilities/drawing-paint-additive-strength/example.ani +34 -0
  774. package/modules/mix/capabilities/drawing-paint-additive-strength/example.animl +4 -0
  775. package/modules/mix/capabilities/drawing-paint-blend-additive/example.ani +33 -0
  776. package/modules/mix/capabilities/drawing-paint-blend-additive/example.animl +4 -0
  777. package/modules/mix/capabilities/drawing-paint-paint-blend-override/example.ani +37 -0
  778. package/modules/mix/capabilities/drawing-paint-paint-blend-override/example.animl +4 -0
  779. package/modules/mix/capabilities/host-api-factory/example.ani +16 -0
  780. package/modules/mix/capabilities/host-api-factory/example.animl +3 -0
  781. package/modules/mix/capabilities/host-api-renderer/example.ani +16 -0
  782. package/modules/mix/capabilities/host-api-renderer/example.animl +3 -0
  783. package/modules/mix/manifest.source +36 -0
  784. package/modules/motion/capabilities/animation-cubic-value/example.ani +40 -0
  785. package/modules/motion/capabilities/animation-cubic-value/example.animl +9 -0
  786. package/modules/motion/capabilities/animation-elastic-in/example.ani +40 -0
  787. package/modules/motion/capabilities/animation-elastic-in/example.animl +9 -0
  788. package/modules/motion/capabilities/animation-elastic-in-out/example.ani +40 -0
  789. package/modules/motion/capabilities/animation-elastic-in-out/example.animl +9 -0
  790. package/modules/motion/capabilities/animation-host-loop-override/example.ani +28 -0
  791. package/modules/motion/capabilities/animation-host-loop-override/example.animl +6 -0
  792. package/modules/motion/capabilities/animation-host-play-pause-stop/example.ani +28 -0
  793. package/modules/motion/capabilities/animation-host-play-pause-stop/example.animl +6 -0
  794. package/modules/motion/capabilities/animation-keys-reference/example.ani +55 -0
  795. package/modules/motion/capabilities/animation-keys-reference/example.animl +12 -0
  796. package/modules/motion/capabilities/animation-keys-signed-integer/example.ani +46 -0
  797. package/modules/motion/capabilities/animation-keys-signed-integer/example.animl +11 -0
  798. package/modules/motion/capabilities/animation-keys-string/example.ani +46 -0
  799. package/modules/motion/capabilities/animation-keys-string/example.animl +11 -0
  800. package/modules/motion/capabilities/animation-keys-unsigned-integer/example.ani +46 -0
  801. package/modules/motion/capabilities/animation-keys-unsigned-integer/example.animl +11 -0
  802. package/modules/motion/capabilities/animation-mix-discrete/example.ani +38 -0
  803. package/modules/motion/capabilities/animation-mix-discrete/example.animl +9 -0
  804. package/modules/motion/capabilities/animation-mix-numeric/example.ani +42 -0
  805. package/modules/motion/capabilities/animation-mix-numeric/example.animl +11 -0
  806. package/modules/motion/capabilities/animation-quantized-playback/example.ani +41 -0
  807. package/modules/motion/capabilities/animation-quantized-playback/example.animl +9 -0
  808. package/modules/motion/capabilities/animation-reverse/example.ani +47 -0
  809. package/modules/motion/capabilities/animation-reverse/example.animl +12 -0
  810. package/modules/motion/capabilities/animation-seek/example.ani +28 -0
  811. package/modules/motion/capabilities/animation-seek/example.animl +6 -0
  812. package/modules/motion/capabilities/animation-work-area/example.ani +42 -0
  813. package/modules/motion/capabilities/animation-work-area/example.animl +9 -0
  814. package/modules/motion/capabilities/data-bind-keyframes/example.ani +52 -0
  815. package/modules/motion/capabilities/data-bind-keyframes/example.animl +15 -0
  816. package/modules/motion/capabilities/host-api-animation-metadata/example.ani +31 -0
  817. package/modules/motion/capabilities/host-api-animation-metadata/example.animl +6 -0
  818. package/modules/motion/capabilities/host-api-low-level-animation/example.ani +28 -0
  819. package/modules/motion/capabilities/host-api-low-level-animation/example.animl +6 -0
  820. package/modules/motion/capabilities/host-api-low-level-scene-query/example.ani +41 -0
  821. package/modules/motion/capabilities/host-api-low-level-scene-query/example.animl +9 -0
  822. package/modules/motion/capabilities/host-api-multi-state-machine/example.ani +62 -0
  823. package/modules/motion/capabilities/host-api-multi-state-machine/example.animl +22 -0
  824. package/modules/motion/capabilities/host-api-scrub/example.ani +29 -0
  825. package/modules/motion/capabilities/host-api-scrub/example.animl +6 -0
  826. package/modules/motion/capabilities/state-machine-exit-time-seconds/example.ani +60 -0
  827. package/modules/motion/capabilities/state-machine-exit-time-seconds/example.animl +15 -0
  828. package/modules/motion/capabilities/transforms-origin-animation/example.ani +45 -0
  829. package/modules/motion/capabilities/transforms-origin-animation/example.animl +10 -0
  830. package/modules/motion/examples/README.md +42 -0
  831. package/modules/motion/examples/data-keys.ani +52 -0
  832. package/modules/motion/examples/data-keys.animl +15 -0
  833. package/modules/motion/examples/evidence/hover.jsonl +8 -0
  834. package/modules/motion/examples/evidence/phase.jsonl +9 -0
  835. package/modules/motion/examples/evidence/reduced.jsonl +6 -0
  836. package/modules/motion/examples/evidence/rest.jsonl +1 -0
  837. package/modules/motion/examples/evidence/spin.jsonl +6 -0
  838. package/modules/motion/examples/evidence/stop.jsonl +10 -0
  839. package/modules/motion/examples/evidence/sweep.jsonl +26 -0
  840. package/modules/motion/examples/scripts/hover.txt +21 -0
  841. package/modules/motion/examples/scripts/phase.txt +28 -0
  842. package/modules/motion/examples/scripts/reduced.txt +16 -0
  843. package/modules/motion/examples/scripts/rest.txt +2 -0
  844. package/modules/motion/examples/scripts/spin.txt +14 -0
  845. package/modules/motion/examples/scripts/stop.txt +26 -0
  846. package/modules/motion/examples/scripts/sweep.txt +71 -0
  847. package/modules/motion/examples/sync.ani +272 -0
  848. package/modules/motion/examples/sync.animl +64 -0
  849. package/modules/motion/examples/verify.py +71 -0
  850. package/modules/motion/manifest.source +67 -0
  851. package/modules/nested/SPEC.md +79 -0
  852. package/modules/nested/capabilities/components-leaf-fit/example.ani +50 -0
  853. package/modules/nested/capabilities/components-leaf-fit/example.animl +9 -0
  854. package/modules/nested/capabilities/components-nested-quantize/example.ani +65 -0
  855. package/modules/nested/capabilities/components-nested-quantize/example.animl +15 -0
  856. package/modules/nested/capabilities/components-nested-remap/example.ani +65 -0
  857. package/modules/nested/capabilities/components-nested-remap/example.animl +15 -0
  858. package/modules/nested/capabilities/components-stateful-output/example.ani +51 -0
  859. package/modules/nested/capabilities/components-stateful-output/example.animl +12 -0
  860. package/modules/nested/capabilities/data-property-artboard/example.ani +63 -0
  861. package/modules/nested/capabilities/data-property-artboard/example.animl +14 -0
  862. package/modules/nested/capabilities/state-machine-literal-artboard/example.ani +76 -0
  863. package/modules/nested/capabilities/state-machine-literal-artboard/example.animl +19 -0
  864. package/modules/nested/examples/component-guard.ani +76 -0
  865. package/modules/nested/examples/component-guard.animl +19 -0
  866. package/modules/nested/examples/controls.ani +100 -0
  867. package/modules/nested/examples/controls.animl +21 -0
  868. package/modules/nested/manifest.source +39 -0
  869. package/modules/paint/capabilities/drawing-paint-gradient-angular/example.ani +33 -0
  870. package/modules/paint/capabilities/drawing-paint-gradient-angular/example.animl +8 -0
  871. package/modules/paint/capabilities/drawing-paint-gradient-transform/example.ani +34 -0
  872. package/modules/paint/capabilities/drawing-paint-gradient-transform/example.animl +8 -0
  873. package/modules/paint/capabilities/drawing-paint-image-fit-resize/example.ani +49 -0
  874. package/modules/paint/capabilities/drawing-paint-image-fit-resize/example.animl +12 -0
  875. package/modules/paint/capabilities/drawing-paint-image-wrap-clamp/example.ani +50 -0
  876. package/modules/paint/capabilities/drawing-paint-image-wrap-clamp/example.animl +12 -0
  877. package/modules/paint/capabilities/drawing-paint-image-wrap-mirror/example.ani +50 -0
  878. package/modules/paint/capabilities/drawing-paint-image-wrap-mirror/example.animl +12 -0
  879. package/modules/paint/capabilities/drawing-paint-image-wrap-repeat/example.ani +50 -0
  880. package/modules/paint/capabilities/drawing-paint-image-wrap-repeat/example.animl +12 -0
  881. package/modules/paint/manifest.source +77 -0
  882. package/modules/pathfollow/capabilities/rigging-follow-path/example.ani +16 -0
  883. package/modules/pathfollow/capabilities/rigging-follow-path/example.animl +7 -0
  884. package/modules/pathfollow/capabilities/rigging-list-follow-path/example.ani +16 -0
  885. package/modules/pathfollow/capabilities/rigging-list-follow-path/example.animl +9 -0
  886. package/modules/pathfollow/examples/orbit.ani +130 -0
  887. package/modules/pathfollow/examples/orbit.animl +17 -0
  888. package/modules/pathfollow/manifest.source +35 -0
  889. package/modules/posepad/examples/look.ani +124 -0
  890. package/modules/posepad/examples/look.animl +22 -0
  891. package/modules/posepad/manifest.source +43 -0
  892. package/modules/rig/AUTHORING.md +24 -0
  893. package/modules/rig/capabilities/rigging-bone-chains/example.ani +61 -0
  894. package/modules/rig/capabilities/rigging-bone-chains/example.animl +22 -0
  895. package/modules/rig/capabilities/rigging-constraint-order/example.ani +123 -0
  896. package/modules/rig/capabilities/rigging-constraint-order/example.animl +33 -0
  897. package/modules/rig/capabilities/rigging-constraint-strength/example.ani +105 -0
  898. package/modules/rig/capabilities/rigging-constraint-strength/example.animl +28 -0
  899. package/modules/rig/capabilities/rigging-distance-closer/example.ani +160 -0
  900. package/modules/rig/capabilities/rigging-distance-closer/example.animl +44 -0
  901. package/modules/rig/capabilities/rigging-distance-exact/example.ani +160 -0
  902. package/modules/rig/capabilities/rigging-distance-exact/example.animl +44 -0
  903. package/modules/rig/capabilities/rigging-distance-further/example.ani +160 -0
  904. package/modules/rig/capabilities/rigging-distance-further/example.animl +44 -0
  905. package/modules/rig/capabilities/rigging-root-bones/example.ani +63 -0
  906. package/modules/rig/capabilities/rigging-root-bones/example.animl +22 -0
  907. package/modules/rig/capabilities/rigging-rotation/example.ani +143 -0
  908. package/modules/rig/capabilities/rigging-rotation/example.animl +32 -0
  909. package/modules/rig/capabilities/rigging-scale/example.ani +144 -0
  910. package/modules/rig/capabilities/rigging-scale/example.animl +32 -0
  911. package/modules/rig/capabilities/rigging-transform/example.ani +132 -0
  912. package/modules/rig/capabilities/rigging-transform/example.animl +30 -0
  913. package/modules/rig/capabilities/rigging-translation/example.ani +248 -0
  914. package/modules/rig/capabilities/rigging-translation/example.animl +54 -0
  915. package/modules/rig/examples/arm.ani +120 -0
  916. package/modules/rig/examples/arm.animl +29 -0
  917. package/modules/rig/manifest.source +55 -0
  918. package/modules/scroll/capabilities/rigging-scroll/example.ani +16 -0
  919. package/modules/scroll/capabilities/rigging-scroll/example.animl +11 -0
  920. package/modules/scroll/examples/list.ani +115 -0
  921. package/modules/scroll/examples/list.animl +15 -0
  922. package/modules/scroll/manifest.source +31 -0
  923. package/modules/skin/capabilities/rigging-cubic-weights/example.ani +66 -0
  924. package/modules/skin/capabilities/rigging-cubic-weights/example.animl +17 -0
  925. package/modules/skin/capabilities/rigging-skin/example.ani +165 -0
  926. package/modules/skin/capabilities/rigging-skin/example.animl +33 -0
  927. package/modules/skin/capabilities/rigging-weights/example.ani +147 -0
  928. package/modules/skin/capabilities/rigging-weights/example.animl +37 -0
  929. package/modules/skin/examples/sleeve.ani +91 -0
  930. package/modules/skin/examples/sleeve.animl +14 -0
  931. package/modules/skin/manifest.source +41 -0
  932. package/modules/surface/manifest.source +52 -0
  933. package/modules/text/SPEC.md +269 -0
  934. package/modules/text/capabilities/data-bind-text/example.ani +63 -0
  935. package/modules/text/capabilities/data-bind-text/example.animl +8 -0
  936. package/modules/text/capabilities/data-property-text-style/example.ani +63 -0
  937. package/modules/text/capabilities/data-property-text-style/example.animl +8 -0
  938. package/modules/text/capabilities/host-api-nested-text-run/example.ani +44 -0
  939. package/modules/text/capabilities/host-api-nested-text-run/example.animl +10 -0
  940. package/modules/text/capabilities/host-api-text-run/example.ani +27 -0
  941. package/modules/text/capabilities/host-api-text-run/example.animl +6 -0
  942. package/modules/text/capabilities/text-fit-baseline/example.ani +30 -0
  943. package/modules/text/capabilities/text-fit-baseline/example.animl +6 -0
  944. package/modules/text/capabilities/text-fit-layout-measure/example.ani +30 -0
  945. package/modules/text/capabilities/text-fit-layout-measure/example.animl +6 -0
  946. package/modules/text/capabilities/text-flatten/example.ani +16 -0
  947. package/modules/text/capabilities/text-flatten/example.animl +6 -0
  948. package/modules/text/capabilities/text-font-size/example.ani +59 -0
  949. package/modules/text/capabilities/text-font-size/example.animl +15 -0
  950. package/modules/text/capabilities/text-horizontal-alignment/example.ani +28 -0
  951. package/modules/text/capabilities/text-horizontal-alignment/example.animl +6 -0
  952. package/modules/text/capabilities/text-line-spacing/example.ani +28 -0
  953. package/modules/text/capabilities/text-line-spacing/example.animl +6 -0
  954. package/modules/text/capabilities/text-origin/example.ani +32 -0
  955. package/modules/text/capabilities/text-origin/example.animl +6 -0
  956. package/modules/text/capabilities/text-overflow-clipped/example.ani +29 -0
  957. package/modules/text/capabilities/text-overflow-clipped/example.animl +6 -0
  958. package/modules/text/capabilities/text-overflow-ellipsis/example.ani +29 -0
  959. package/modules/text/capabilities/text-overflow-ellipsis/example.animl +6 -0
  960. package/modules/text/capabilities/text-overflow-fit/example.ani +29 -0
  961. package/modules/text/capabilities/text-overflow-fit/example.animl +6 -0
  962. package/modules/text/capabilities/text-overflow-fit-font-size/example.ani +29 -0
  963. package/modules/text/capabilities/text-overflow-fit-font-size/example.animl +6 -0
  964. package/modules/text/capabilities/text-overflow-hidden/example.ani +29 -0
  965. package/modules/text/capabilities/text-overflow-hidden/example.animl +7 -0
  966. package/modules/text/capabilities/text-overflow-visible/example.ani +29 -0
  967. package/modules/text/capabilities/text-overflow-visible/example.animl +6 -0
  968. package/modules/text/capabilities/text-paint/example.ani +30 -0
  969. package/modules/text/capabilities/text-paint/example.animl +6 -0
  970. package/modules/text/capabilities/text-paragraph-spacing/example.ani +28 -0
  971. package/modules/text/capabilities/text-paragraph-spacing/example.animl +7 -0
  972. package/modules/text/capabilities/text-rich-runs/example.ani +34 -0
  973. package/modules/text/capabilities/text-rich-runs/example.animl +8 -0
  974. package/modules/text/capabilities/text-run-list/example.ani +59 -0
  975. package/modules/text/capabilities/text-run-list/example.animl +7 -0
  976. package/modules/text/capabilities/text-script-hit-testing/example.ani +47 -0
  977. package/modules/text/capabilities/text-script-hit-testing/example.animl +10 -0
  978. package/modules/text/capabilities/text-sizing-auto-height/example.ani +28 -0
  979. package/modules/text/capabilities/text-sizing-auto-height/example.animl +6 -0
  980. package/modules/text/capabilities/text-sizing-auto-width/example.ani +27 -0
  981. package/modules/text/capabilities/text-sizing-auto-width/example.animl +6 -0
  982. package/modules/text/capabilities/text-sizing-fixed/example.ani +26 -0
  983. package/modules/text/capabilities/text-sizing-fixed/example.animl +6 -0
  984. package/modules/text/capabilities/text-style-reference/example.ani +31 -0
  985. package/modules/text/capabilities/text-style-reference/example.animl +7 -0
  986. package/modules/text/capabilities/text-tracking/example.ani +28 -0
  987. package/modules/text/capabilities/text-tracking/example.animl +6 -0
  988. package/modules/text/capabilities/text-vertical-alignment/example.ani +28 -0
  989. package/modules/text/capabilities/text-vertical-alignment/example.animl +6 -0
  990. package/modules/text/capabilities/text-vertical-trim/example.ani +29 -0
  991. package/modules/text/capabilities/text-vertical-trim/example.animl +6 -0
  992. package/modules/text/capabilities/text-word-break/example.ani +28 -0
  993. package/modules/text/capabilities/text-word-break/example.animl +6 -0
  994. package/modules/text/capabilities/text-wrap/example.ani +28 -0
  995. package/modules/text/capabilities/text-wrap/example.animl +6 -0
  996. package/modules/text/manifest.source +92 -0
  997. package/modules/text-effects/SPEC.md +134 -0
  998. package/modules/text-effects/capabilities/text-background/example.ani +32 -0
  999. package/modules/text-effects/capabilities/text-background/example.animl +7 -0
  1000. package/modules/text-effects/capabilities/text-modifier-follow-path/example.ani +34 -0
  1001. package/modules/text-effects/capabilities/text-modifier-follow-path/example.animl +8 -0
  1002. package/modules/text-effects/capabilities/text-modifier-opacity/example.ani +34 -0
  1003. package/modules/text-effects/capabilities/text-modifier-opacity/example.animl +8 -0
  1004. package/modules/text-effects/capabilities/text-modifier-origin/example.ani +36 -0
  1005. package/modules/text-effects/capabilities/text-modifier-origin/example.animl +8 -0
  1006. package/modules/text-effects/capabilities/text-modifier-rotation/example.ani +34 -0
  1007. package/modules/text-effects/capabilities/text-modifier-rotation/example.animl +8 -0
  1008. package/modules/text-effects/capabilities/text-modifier-scale/example.ani +35 -0
  1009. package/modules/text-effects/capabilities/text-modifier-scale/example.animl +8 -0
  1010. package/modules/text-effects/capabilities/text-modifier-translation/example.ani +35 -0
  1011. package/modules/text-effects/capabilities/text-modifier-translation/example.animl +8 -0
  1012. package/modules/text-effects/capabilities/text-modifier-variation/example.ani +36 -0
  1013. package/modules/text-effects/capabilities/text-modifier-variation/example.animl +8 -0
  1014. package/modules/text-effects/capabilities/text-range-combine/example.ani +47 -0
  1015. package/modules/text-effects/capabilities/text-range-combine/example.animl +11 -0
  1016. package/modules/text-effects/capabilities/text-range-easing/example.ani +38 -0
  1017. package/modules/text-effects/capabilities/text-range-easing/example.animl +8 -0
  1018. package/modules/text-effects/capabilities/text-range-falloff/example.ani +37 -0
  1019. package/modules/text-effects/capabilities/text-range-falloff/example.animl +8 -0
  1020. package/modules/text-effects/capabilities/text-range-run/example.ani +37 -0
  1021. package/modules/text-effects/capabilities/text-range-run/example.animl +8 -0
  1022. package/modules/text-effects/capabilities/text-range-units/example.ani +37 -0
  1023. package/modules/text-effects/capabilities/text-range-units/example.animl +8 -0
  1024. package/modules/text-effects/capabilities/text-script-direction/example.ani +30 -0
  1025. package/modules/text-effects/capabilities/text-script-direction/example.animl +7 -0
  1026. package/modules/text-effects/examples/title-wave.ani +68 -0
  1027. package/modules/text-effects/examples/title-wave.animl +15 -0
  1028. package/modules/text-effects/manifest.source +58 -0
  1029. package/modules/text-input/SPEC.md +189 -0
  1030. package/modules/text-input/capabilities/text-input-placeholder/example.ani +16 -0
  1031. package/modules/text-input/capabilities/text-input-placeholder/example.animl +13 -0
  1032. package/modules/text-input/capabilities/text-input-selection/example.ani +66 -0
  1033. package/modules/text-input/capabilities/text-input-selection/example.animl +13 -0
  1034. package/modules/text-input/examples/search-card.ani +195 -0
  1035. package/modules/text-input/examples/search-card.animl +49 -0
  1036. package/modules/text-input/examples/search.txt +6 -0
  1037. package/modules/text-input/manifest.source +79 -0
  1038. package/modules/tooling/capabilities/tooling-benchmark/example.ani +16 -0
  1039. package/modules/tooling/capabilities/tooling-benchmark/example.animl +13 -0
  1040. package/modules/tooling/capabilities/tooling-data-breakpoints/example.ani +75 -0
  1041. package/modules/tooling/capabilities/tooling-data-breakpoints/example.animl +13 -0
  1042. package/modules/tooling/capabilities/tooling-data-debugger/example.ani +16 -0
  1043. package/modules/tooling/capabilities/tooling-data-debugger/example.animl +13 -0
  1044. package/modules/tooling/capabilities/tooling-headless-command-session/example.ani +16 -0
  1045. package/modules/tooling/capabilities/tooling-headless-command-session/example.animl +13 -0
  1046. package/modules/tooling/capabilities/tooling-headless-data/example.ani +16 -0
  1047. package/modules/tooling/capabilities/tooling-headless-data/example.animl +13 -0
  1048. package/modules/tooling/capabilities/tooling-headless-data-dump/example.ani +16 -0
  1049. package/modules/tooling/capabilities/tooling-headless-data-dump/example.animl +13 -0
  1050. package/modules/tooling/capabilities/tooling-headless-data-filter/example.ani +16 -0
  1051. package/modules/tooling/capabilities/tooling-headless-data-filter/example.animl +13 -0
  1052. package/modules/tooling/capabilities/tooling-headless-data-stream/example.ani +16 -0
  1053. package/modules/tooling/capabilities/tooling-headless-data-stream/example.animl +13 -0
  1054. package/modules/tooling/capabilities/tooling-headless-gamepad/example.ani +16 -0
  1055. package/modules/tooling/capabilities/tooling-headless-gamepad/example.animl +13 -0
  1056. package/modules/tooling/capabilities/tooling-headless-key/example.ani +16 -0
  1057. package/modules/tooling/capabilities/tooling-headless-key/example.animl +13 -0
  1058. package/modules/tooling/capabilities/tooling-headless-pointer/example.ani +16 -0
  1059. package/modules/tooling/capabilities/tooling-headless-pointer/example.animl +13 -0
  1060. package/modules/tooling/capabilities/tooling-headless-touch/example.ani +16 -0
  1061. package/modules/tooling/capabilities/tooling-headless-touch/example.animl +13 -0
  1062. package/modules/tooling/capabilities/tooling-headless-wheel/example.ani +16 -0
  1063. package/modules/tooling/capabilities/tooling-headless-wheel/example.animl +13 -0
  1064. package/modules/tooling/capabilities/tooling-seed/example.ani +76 -0
  1065. package/modules/tooling/capabilities/tooling-seed/example.animl +21 -0
  1066. package/modules/tooling/capabilities/tooling-test-assertions/example.ani +16 -0
  1067. package/modules/tooling/capabilities/tooling-test-assertions/example.animl +13 -0
  1068. package/modules/tooling/examples/agent-tools.ani +75 -0
  1069. package/modules/tooling/examples/agent-tools.animl +13 -0
  1070. package/modules/tooling/manifest.source +15 -0
  1071. package/package.json +58 -4
  1072. package/packages/cli/package.json +4 -0
  1073. package/packages/cli/src/asset-info.d.ts +8 -0
  1074. package/packages/cli/src/asset-info.js +122 -0
  1075. package/packages/cli/src/assets.d.ts +8 -0
  1076. package/packages/cli/src/assets.js +66 -0
  1077. package/packages/cli/src/audio.d.ts +3 -0
  1078. package/packages/cli/src/audio.js +77 -0
  1079. package/packages/cli/src/bench.d.ts +32 -0
  1080. package/packages/cli/src/bench.js +46 -0
  1081. package/packages/cli/src/build-assets.d.ts +10 -0
  1082. package/packages/cli/src/build-assets.js +139 -0
  1083. package/packages/cli/src/bundle.d.ts +7 -0
  1084. package/packages/cli/src/bundle.js +53 -0
  1085. package/packages/cli/src/cli.d.ts +19 -0
  1086. package/packages/cli/src/cli.js +1532 -0
  1087. package/packages/cli/src/commands.d.ts +47 -0
  1088. package/packages/cli/src/commands.js +608 -0
  1089. package/packages/cli/src/compare-png.d.ts +21 -0
  1090. package/packages/cli/src/compare-png.js +39 -0
  1091. package/packages/cli/src/compare.d.ts +7 -0
  1092. package/packages/cli/src/compare.js +84 -0
  1093. package/packages/cli/src/completion.d.ts +2 -0
  1094. package/packages/cli/src/completion.js +153 -0
  1095. package/packages/cli/src/discover/api.d.ts +55 -0
  1096. package/packages/cli/src/discover/api.js +185 -0
  1097. package/packages/cli/src/discover/build.d.ts +14 -0
  1098. package/packages/cli/src/discover/build.js +590 -0
  1099. package/packages/cli/src/discover/synonyms.d.ts +1 -0
  1100. package/packages/cli/src/discover/synonyms.js +68 -0
  1101. package/packages/cli/src/docs-view.d.ts +4 -0
  1102. package/packages/cli/src/docs-view.js +279 -0
  1103. package/packages/cli/src/doctor.d.ts +11 -0
  1104. package/packages/cli/src/doctor.js +151 -0
  1105. package/packages/cli/src/encode.d.ts +9 -0
  1106. package/packages/cli/src/encode.js +100 -0
  1107. package/packages/cli/src/font/README.md +45 -0
  1108. package/packages/cli/src/font/binary.d.ts +8 -0
  1109. package/packages/cli/src/font/binary.js +54 -0
  1110. package/packages/cli/src/font/browser.d.ts +4 -0
  1111. package/packages/cli/src/font/browser.js +54 -0
  1112. package/packages/cli/src/font/cff.d.ts +6 -0
  1113. package/packages/cli/src/font/cff.js +154 -0
  1114. package/packages/cli/src/font/container.d.ts +5 -0
  1115. package/packages/cli/src/font/container.js +97 -0
  1116. package/packages/cli/src/font/document.d.ts +28 -0
  1117. package/packages/cli/src/font/document.js +143 -0
  1118. package/packages/cli/src/font/features.d.ts +1 -0
  1119. package/packages/cli/src/font/features.js +1 -0
  1120. package/packages/cli/src/font/flatten.d.ts +5 -0
  1121. package/packages/cli/src/font/flatten.js +146 -0
  1122. package/packages/cli/src/font/import.d.ts +12 -0
  1123. package/packages/cli/src/font/import.js +92 -0
  1124. package/packages/cli/src/font/index.d.ts +8 -0
  1125. package/packages/cli/src/font/index.js +27 -0
  1126. package/packages/cli/src/font/measure.d.ts +37 -0
  1127. package/packages/cli/src/font/measure.js +131 -0
  1128. package/packages/cli/src/font/reader.d.ts +13 -0
  1129. package/packages/cli/src/font/reader.js +26 -0
  1130. package/packages/cli/src/font/subset.d.ts +6 -0
  1131. package/packages/cli/src/font/subset.js +87 -0
  1132. package/packages/cli/src/font/svg.d.ts +3 -0
  1133. package/packages/cli/src/font/svg.js +109 -0
  1134. package/packages/cli/src/font/truetype.d.ts +3 -0
  1135. package/packages/cli/src/font/truetype.js +38 -0
  1136. package/packages/cli/src/font/variation.d.ts +1 -0
  1137. package/packages/cli/src/font/variation.js +1 -0
  1138. package/packages/cli/src/font/woff2.d.ts +3 -0
  1139. package/packages/cli/src/font/woff2.js +166 -0
  1140. package/packages/cli/src/glyphs.d.ts +5 -0
  1141. package/packages/cli/src/glyphs.js +59 -0
  1142. package/packages/cli/src/help.d.ts +5 -0
  1143. package/packages/cli/src/help.js +149 -0
  1144. package/packages/cli/src/html.d.ts +5 -0
  1145. package/packages/cli/src/html.js +119 -0
  1146. package/packages/cli/src/import-lottie.d.ts +2 -0
  1147. package/packages/cli/src/import-lottie.js +274 -0
  1148. package/packages/cli/src/import-svg.d.ts +8 -0
  1149. package/packages/cli/src/import-svg.js +300 -0
  1150. package/packages/cli/src/index.d.ts +1 -0
  1151. package/packages/cli/src/index.js +4 -0
  1152. package/packages/cli/src/inspect-summary.d.ts +7 -0
  1153. package/packages/cli/src/inspect-summary.js +158 -0
  1154. package/packages/cli/src/library.d.ts +6 -0
  1155. package/packages/cli/src/library.js +67 -0
  1156. package/packages/cli/src/locate.d.ts +13 -0
  1157. package/packages/cli/src/locate.js +118 -0
  1158. package/packages/cli/src/main.d.ts +2 -0
  1159. package/packages/cli/src/main.js +13 -0
  1160. package/packages/cli/src/playground.d.ts +11 -0
  1161. package/packages/cli/src/playground.js +169 -0
  1162. package/packages/cli/src/project.d.ts +15 -0
  1163. package/packages/cli/src/project.js +160 -0
  1164. package/packages/cli/src/render-options.d.ts +6 -0
  1165. package/packages/cli/src/render-options.js +40 -0
  1166. package/packages/cli/src/render.d.ts +30 -0
  1167. package/packages/cli/src/render.js +90 -0
  1168. package/packages/cli/src/scaffold.d.ts +17 -0
  1169. package/packages/cli/src/scaffold.js +96 -0
  1170. package/packages/cli/src/schema-view.d.ts +9 -0
  1171. package/packages/cli/src/schema-view.js +493 -0
  1172. package/packages/cli/src/session.d.ts +8 -0
  1173. package/packages/cli/src/session.js +96 -0
  1174. package/packages/cli/src/suggest.d.ts +3 -0
  1175. package/packages/cli/src/suggest.js +62 -0
  1176. package/packages/cli/src/video.d.ts +2 -0
  1177. package/packages/cli/src/video.js +73 -0
  1178. package/packages/core/src/script.source +897 -0
  1179. package/spec/ANIML.md +598 -0
  1180. package/spec/MODULES.md +406 -0
  1181. package/spec/SPEC.md +4083 -0
@@ -0,0 +1,897 @@
1
+ // seam(P8-5): preserve mesh point tuples alongside existing scalar/colour values.
2
+ import { installRandom } from './random.ts';
3
+ import { captureStep } from './script-events.ts';
4
+ import { occurrence, eventSource, type CapturedEvent } from './event-capture.ts';
5
+ import { traceWrites } from './script-writes.ts';
6
+ import { formatHex } from './color.ts';
7
+ // The command language of `anima sample` and the conformance suite (spec §11.2). Tooling only.
8
+
9
+ import { COMMON, OWN, PAINT, markupName } from './registry.ts';
10
+ import { semanticCommand } from '../../../modules/a11y/core/commands.ts';
11
+ import { inputCommand } from '../../../modules/input/core/commands.ts';
12
+ import type { TimelineInstance } from '../../../modules/motion/core/api.ts';
13
+ import { modules } from './modules.ts';
14
+ import { resolveAddress, type Model } from './load.ts';
15
+ import { type AnimaEvent, Player } from './player.ts';
16
+
17
+ export interface Snapshot {
18
+ time: number;
19
+ values: Record<string, number | boolean | string | [number, number]>;
20
+ states: Record<string, string>;
21
+ events: AnimaEvent[];
22
+ settled: boolean;
23
+ data?: Record<string, unknown>;
24
+ semantics?: unknown;
25
+ }
26
+
27
+ export class ScriptError extends Error {
28
+ readonly code: string;
29
+ readonly pointer: string;
30
+ readonly hint: string;
31
+ readonly line: number;
32
+ constructor(message: string, line: number, code = 'script-usage') {
33
+ super(`line ${line}: ${message}`);
34
+ this.code = code;
35
+ this.hint =
36
+ code === 'script-target'
37
+ ? 'inspect declared inputs or run semantics before targeting a node; hidden nodes cannot receive semantic actions'
38
+ : 'check the command syntax in spec §11.2';
39
+ this.line = line;
40
+ this.pointer = `/script/${line - 1}`;
41
+ }
42
+ }
43
+
44
+ export interface ScriptOptions {
45
+ reducedMotion?: boolean;
46
+ all?: boolean;
47
+ semantics?: boolean;
48
+ seed?: number;
49
+ /** Tooling events with absolute occurrence times and their declaring asset scope. */
50
+ onEvents?: (events: CapturedEvent[]) => void;
51
+ }
52
+ export interface ScriptDiagnostic {
53
+ code: string;
54
+ pointer: string;
55
+ message: string;
56
+ hint: string;
57
+ writer?: string[];
58
+ }
59
+ type Operation = (p: Player, instances: Map<string, TimelineInstance>) => void;
60
+ class Breakpoint extends Error {}
61
+
62
+ /** Persistent, tooling-only script interpreter. No browser runtime hooks are installed. */
63
+ export function createScriptSession(model: Model, opts: ScriptOptions = {}) {
64
+ installRandom(Player);
65
+ const p = new Player(model, opts);
66
+ const out: Snapshot[] = [];
67
+ const output: unknown[] = [];
68
+ const diagnostics: ScriptDiagnostic[] = [];
69
+ const instances = new Map<string, TimelineInstance>();
70
+ const journal: { op: Operation; writer: string }[] = [];
71
+ const watched = new Map<string, string | undefined>();
72
+ const changedData = new Set<string>();
73
+ const breaks = new Map<string, { value?: unknown }>();
74
+ let events: AnimaEvent[] = [];
75
+ let settled = false;
76
+ let stopped = false;
77
+ let line = 0;
78
+ let writer = 'script';
79
+ let lastWriter = writer;
80
+ let seed = opts.seed;
81
+ let replaying = false;
82
+ // A running semantic command: its live mutations are replayed on breakpoint probes and journaled
83
+ // as one operation (steps counts the session steps it has completed).
84
+ let semantic: { cmd: string; args: string[]; steps: number } | undefined;
85
+ const stop = {};
86
+ const replaySemantic = (player: Player, cmd: string, args: string[], limit: number) => {
87
+ let n = 0;
88
+ try {
89
+ semanticCommand(
90
+ player,
91
+ cmd,
92
+ args,
93
+ [],
94
+ (dt) => {
95
+ if (n++ >= limit) throw stop;
96
+ player.step(dt);
97
+ },
98
+ () => ({}) as Snapshot,
99
+ );
100
+ } catch {
101
+ // The stop sentinel, or the same failure the live command reported at this boundary.
102
+ }
103
+ };
104
+ const groups: string[] = [];
105
+ let expectedError: string | undefined;
106
+ const targetError = (message: string) => {
107
+ throw new ScriptError(message, line, 'script-target');
108
+ };
109
+ const requireInput = (name: string) => {
110
+ // get resolves component-scoped inputs as well as root inputs.
111
+ if (!model.inputs.has(name) && p.get(name) === undefined)
112
+ targetError('no input "' + name + '"; inspect inputs before targeting them');
113
+ };
114
+ const act = (op: Operation) => {
115
+ op(p, instances);
116
+ journal.push({ op, writer });
117
+ lastWriter = writer;
118
+ };
119
+ const data = (player = p) => {
120
+ if (!model.doc.requires?.includes('data') || !('data' in player))
121
+ throw new Error('data commands need a document with data and the host module loaded');
122
+ return player.data;
123
+ };
124
+ const dataPath = (path: string) => {
125
+ if (model.inputs.has(path)) return model.inputs.get(path)!.name;
126
+ const alias = [...model.inputs].find(
127
+ ([name, input]) => name.startsWith('$') && !name.includes(':') && input.name.includes(':'),
128
+ );
129
+ return !path.includes(':') && alias ? alias[1].name.split(':')[0] + ':' + path.slice(1) : path;
130
+ };
131
+ const writeData = (player: Player, path: string, value: unknown): void => {
132
+ const api = data(player),
133
+ canonical = dataPath(path);
134
+ const [instanceName, propertyPath] = canonical.slice(1).split(':');
135
+ const instance = api.instances().find((item) => item.name === instanceName);
136
+ const document = model.doc.data as import('../../../modules/data/core/types.ts').DataDocument;
137
+ let properties = document.models[instance?.model ?? '']?.properties;
138
+ let property: import('../../../modules/data/core/types.ts').Property | undefined;
139
+ const keys = propertyPath?.split('.') ?? [];
140
+ for (let i = 0; i < keys.length; i++) {
141
+ property = properties?.[keys[i]!];
142
+ if (property?.type === 'model-ref') properties = document.models[property.model!]?.properties;
143
+ if (property?.type === 'list' && i + 1 < keys.length) {
144
+ properties = document.models[property.of!]?.properties;
145
+ i++;
146
+ }
147
+ }
148
+ if (
149
+ property?.type === 'model-ref' &&
150
+ value &&
151
+ typeof value === 'object' &&
152
+ !Array.isArray(value)
153
+ ) {
154
+ const fields = (value as { values?: Record<string, unknown> }).values ?? value;
155
+ for (const [key, item] of Object.entries(fields))
156
+ writeData(player, canonical + '.' + key, item);
157
+ return;
158
+ }
159
+ const method =
160
+ property?.type === 'bool'
161
+ ? 'boolean'
162
+ : property?.type === 'asset-ref'
163
+ ? property.assetType === 'image'
164
+ ? 'image'
165
+ : property.assetType === 'font'
166
+ ? 'font'
167
+ : 'string'
168
+ : property?.type;
169
+ if (
170
+ !method ||
171
+ ![
172
+ 'number',
173
+ 'string',
174
+ 'boolean',
175
+ 'enum',
176
+ 'color',
177
+ 'component',
178
+ 'list',
179
+ 'image',
180
+ 'font',
181
+ ].includes(method)
182
+ )
183
+ throw new Error('unknown or non-writable data path ' + path);
184
+ api[method as 'number'](canonical).set(value as never);
185
+ };
186
+ const dataValues = (player = p): Record<string, unknown> => {
187
+ const api = data(player);
188
+ const values: Record<string, unknown> = {};
189
+ const defaultPrefix = dataPath('$__prefix').split(':')[0] + ':';
190
+ const visit = (path: string, value: unknown, depth = 0): void => {
191
+ values[path] = value;
192
+ if (path.startsWith(defaultPrefix)) values['$' + path.slice(defaultPrefix.length)] = value;
193
+ if (depth >= 32 || value === null || typeof value !== 'object') return;
194
+ if (Array.isArray(value)) visit(path + '.length', value.length, depth + 1);
195
+ for (const [key, child] of Object.entries(value)) visit(path + '.' + key, child, depth + 1);
196
+ };
197
+ for (const instance of api.instances()) {
198
+ const def = api.models().find((m) => m.name === instance.model)!;
199
+ for (const prop of def.properties) {
200
+ if (prop.type === 'trigger') continue;
201
+ const path = '$' + instance.name + ':' + prop.name;
202
+ visit(path, api.get(path));
203
+ }
204
+ }
205
+ return values;
206
+ };
207
+ const step = (dt: number) => {
208
+ if (breaks.size) {
209
+ const probe = new Player(model, opts);
210
+ const handles = new Map<string, TimelineInstance>();
211
+ const trace = traceWrites(probe, (write) => {
212
+ if (replaying) return;
213
+ for (const [path, condition] of breaks) {
214
+ if (
215
+ dataPath(path) !== write.path ||
216
+ ('value' in condition &&
217
+ JSON.stringify(write.value) !== JSON.stringify(condition.value))
218
+ )
219
+ continue;
220
+ diagnostics.push({
221
+ code: 'script-breakpoint',
222
+ pointer: `/script/${line - 1}`,
223
+ message: `${path} would write ${JSON.stringify(write.value)} (before ${JSON.stringify(write.before)})`,
224
+ hint: 'use data break clear, then advance to resume',
225
+ writer: [write.writer],
226
+ });
227
+ stopped = true;
228
+ throw new Breakpoint();
229
+ }
230
+ });
231
+ try {
232
+ // Replay establishes pending writes with their original script provenance. Only trap
233
+ // the proposed step: historical writes have already been accepted by the live player.
234
+ replaying = true;
235
+ for (const { op, writer } of journal) trace.run(writer, () => op(probe, handles));
236
+ const s = semantic,
237
+ last = s ? writer : lastWriter;
238
+ if (s) trace.run(last, () => replaySemantic(probe, s.cmd, s.args, s.steps));
239
+ replaying = false;
240
+ trace.run(last, () => probe.step(dt));
241
+ } finally {
242
+ replaying = false;
243
+ trace.close();
244
+ }
245
+ }
246
+ // Counts attempted live steps: a step that throws has still mutated the player.
247
+ if (semantic) semantic.steps++;
248
+ const r = opts.onEvents ? captureStep(() => p.step(dt)) : p.step(dt);
249
+ if (!semantic)
250
+ journal.push({
251
+ op: (player) => {
252
+ player.step(dt);
253
+ },
254
+ writer,
255
+ });
256
+ opts.onEvents?.(
257
+ r.events.map((event) => {
258
+ const e = event as CapturedEvent;
259
+ return {
260
+ ...e,
261
+ time: p.time - dt + dt * (e[occurrence] ?? 0),
262
+ [eventSource]: e[eventSource] ?? model,
263
+ };
264
+ }),
265
+ );
266
+ events.push(...r.events);
267
+ settled = r.settled;
268
+ for (const [path, previous] of watched) {
269
+ const stamp = JSON.stringify(data().get(dataPath(path)));
270
+ if (stamp !== previous) changedData.add(path);
271
+ watched.set(path, stamp);
272
+ }
273
+ };
274
+ const allValues = (player = p): Record<string, number | string | boolean | [number, number]> => {
275
+ const source = player.model;
276
+ const values = player.values();
277
+ for (const node of source.nodes) {
278
+ const keys = [
279
+ ...Object.keys(COMMON),
280
+ ...Object.keys(OWN[node.type]),
281
+ ...Object.entries(PAINT).flatMap(([paint, fields]) =>
282
+ Object.keys(fields).map((key) => paint + '.' + key),
283
+ ),
284
+ ];
285
+ for (const key of keys) {
286
+ const address = node.id + '.' + key;
287
+ if (address in values) continue;
288
+ const resolved = resolveAddress(address, source.nodes, source.ids);
289
+ if (!Array.isArray(resolved)) {
290
+ const v = resolved.rest;
291
+ if (v !== undefined)
292
+ values[address] = Array.isArray(v) && v.length === 4 ? formatHex(v) : v;
293
+ }
294
+ }
295
+ }
296
+ for (const [name, input] of source.inputs) {
297
+ if (input.type === 'trigger') continue;
298
+ const v = player.get(name);
299
+ if (v !== undefined) values[name] = Array.isArray(v) && v.length === 4 ? formatHex(v) : v;
300
+ }
301
+ const children = (player.nested as { players?: Map<string, Player> } | undefined)?.players;
302
+ for (const [id, child] of children ?? [])
303
+ for (const [address, value] of Object.entries(allValues(child)))
304
+ values[id + '/' + address] = value;
305
+ const lists = modules.get('lists') as
306
+ typeof import('../../../modules/lists/core/index.ts').lists | undefined;
307
+ for (const run of lists?.listState(player)?.runs ?? []) {
308
+ for (const item of run.items) {
309
+ const prefix =
310
+ source.nodes[run.spec.node]!.id.replaceAll('.', '/') + '/' + item.index + '/';
311
+ for (const [address, value] of Object.entries(allValues(item.player)))
312
+ values[prefix + address] = value;
313
+ }
314
+ }
315
+ return values;
316
+ };
317
+ const canonicalAddress = (address: string): string => {
318
+ const aliases = [
319
+ ...[
320
+ ...Object.entries(COMMON),
321
+ ...Object.values(OWN).flatMap((props) => Object.entries(props)),
322
+ ].map(([key, prop]) => [key, markupName(prop, key)]),
323
+ ...Object.entries(PAINT).flatMap(([paint, props]) =>
324
+ Object.entries(props).map(([key, prop]) => [paint + '.' + key, markupName(prop, key)]),
325
+ ),
326
+ ];
327
+ return p.get(address) !== undefined || p.value(address) !== undefined
328
+ ? address
329
+ : (Object.keys(allValues()).find((key) =>
330
+ aliases.some(
331
+ ([path, alias]) =>
332
+ key.endsWith('.' + path) && key.slice(0, -path!.length) + alias === address,
333
+ ),
334
+ ) ?? address);
335
+ };
336
+ const read = (address: string) => {
337
+ address = canonicalAddress(address);
338
+ if (address.startsWith('$')) {
339
+ const value = p.get(address) ?? data().get(dataPath(address));
340
+ return model.inputs.get(address)?.type === 'color' && Array.isArray(value)
341
+ ? formatHex(value as [number, number, number, number])
342
+ : value;
343
+ }
344
+ return p.get(address) ?? p.value(address) ?? allValues()[address];
345
+ };
346
+ const execute = (text: string) => {
347
+ stopped = false;
348
+ out.length = output.length = diagnostics.length = 0;
349
+ const start = { snapshots: out.length, output: output.length, diagnostics: diagnostics.length };
350
+ for (const raw of text.split('\n')) {
351
+ line++;
352
+ let words: string[];
353
+ try {
354
+ words = tokenize(raw, line);
355
+ } catch (e) {
356
+ // A pending `expect-error` also covers a line that does not tokenize.
357
+ if (!expectedError) throw e;
358
+ const code = (e as ScriptError).code ?? 'script-usage';
359
+ if (code !== expectedError)
360
+ diagnostics.push({
361
+ code: 'script-expect-error',
362
+ pointer: `/script/${line - 1}`,
363
+ message: 'expected ' + expectedError + ', received ' + code,
364
+ hint: 'check the expected diagnostic code',
365
+ });
366
+ expectedError = undefined;
367
+ continue;
368
+ }
369
+ if (!words.length) continue;
370
+ const [cmd, ...args] = words;
371
+ const num = (s: string | undefined, what: string) => {
372
+ const n = Number(s);
373
+ if (s === undefined || !Number.isFinite(n))
374
+ throw new ScriptError(`${what} must be a number`, line);
375
+ return n;
376
+ };
377
+ const expected = cmd === 'expect-error' ? undefined : expectedError;
378
+ if (cmd !== 'expect-error') expectedError = undefined;
379
+ const diagnosticStart = diagnostics.length;
380
+ try {
381
+ writer = `script line ${line}: ${raw.trim()}`;
382
+ const literal = (v: string | undefined) => {
383
+ if (v === undefined) throw new ScriptError('missing value', line);
384
+ try {
385
+ return JSON.parse(v);
386
+ } catch {
387
+ return v;
388
+ }
389
+ };
390
+ if (cmd === 'semantic' && args.length === 2) {
391
+ const find = (
392
+ nodes: import('../../../modules/a11y/core/types.ts').SemanticNode[],
393
+ ): boolean => nodes.some((n) => n.id === args[0] || find(n.children));
394
+ if (!find(p.semantics?.() ?? []))
395
+ targetError(
396
+ 'hidden or absent semantic node "' +
397
+ args[0] +
398
+ '"; inspect semantics before targeting it',
399
+ );
400
+ }
401
+ const s = (semantic = { cmd: cmd!, args, steps: 0 });
402
+ let handled = false;
403
+ try {
404
+ handled =
405
+ cmd !== 'snapshot' &&
406
+ semanticCommand(p, cmd!, args, output, step, () => ({}) as Snapshot);
407
+ } catch (e) {
408
+ handled = true;
409
+ throw e;
410
+ } finally {
411
+ semantic = undefined;
412
+ if (handled) {
413
+ // A failure or breakpoint keeps the accepted mutations, up to the step it stopped.
414
+ const limit = s.steps;
415
+ journal.push({ op: (player) => replaySemantic(player, s.cmd, s.args, limit), writer });
416
+ lastWriter = writer;
417
+ }
418
+ }
419
+ if (!handled)
420
+ switch (cmd) {
421
+ case 'group':
422
+ if (args.length !== 1) throw new ScriptError('use group <name>', line);
423
+ groups.push(args[0]!);
424
+ break;
425
+ case 'end':
426
+ if (args.length || !groups.length)
427
+ throw new ScriptError('end requires an open group', line);
428
+ groups.pop();
429
+ break;
430
+ case 'expect-error':
431
+ if (args.length !== 1 || expectedError)
432
+ throw new ScriptError('use expect-error <code> before one command', line);
433
+ expectedError = args[0];
434
+ break;
435
+ case 'seed': {
436
+ if (
437
+ args.length !== 1 ||
438
+ !Number.isInteger(num(args[0], 'seed')) ||
439
+ Number(args[0]) < 0 ||
440
+ Number(args[0]) > 0xffffffff
441
+ )
442
+ throw new ScriptError('seed must be a uint32 integer', line);
443
+ seed = Number(args[0]);
444
+ const nextSeed = seed;
445
+ act((player) => player.randomSource.reset(nextSeed));
446
+ break;
447
+ }
448
+ case 'data': {
449
+ const [op, path] = args;
450
+ if (op === 'set' && args.length === 3 && path?.startsWith('$')) {
451
+ const value = literal(args[2]);
452
+ act((player) => {
453
+ writeData(player, path, value);
454
+ });
455
+ } else if (op === 'dump') {
456
+ const prefixes = args.slice(1);
457
+ const values = Object.fromEntries(
458
+ Object.entries(dataValues()).filter(
459
+ ([key]) =>
460
+ !prefixes.length || prefixes.some((prefix) => key.startsWith(prefix)),
461
+ ),
462
+ );
463
+ output.push({ data: values });
464
+ } else if (op === 'watch' && args.length > 1) {
465
+ for (const path of args.slice(1)) {
466
+ if (!path.startsWith('$')) throw new ScriptError('data watch needs $paths', line);
467
+ watched.set(path, JSON.stringify(data().get(dataPath(path))));
468
+ }
469
+ } else if (op === 'break' && path === 'clear' && args.length === 2) breaks.clear();
470
+ else if (
471
+ op === 'break' &&
472
+ path?.startsWith('$') &&
473
+ (args.length === 2 || (args.length === 4 && args[2] === '=='))
474
+ ) {
475
+ data().get(dataPath(path));
476
+ breaks.set(path, args.length === 4 ? { value: literal(args[3]) } : {});
477
+ } else
478
+ throw new ScriptError(
479
+ 'use data set <$path> <value> | dump [prefix…] | watch <$path…> | break <$path> [== value] | break clear',
480
+ line,
481
+ );
482
+ break;
483
+ }
484
+ case 'expect': {
485
+ if (args.length !== 3 || !['==', '!=', '<', '>', '~'].includes(args[1]!))
486
+ throw new ScriptError('use expect <address|$path|input> ==|!=|<|>|~ <value>', line);
487
+ const actual = read(args[0]!);
488
+ if (actual === undefined)
489
+ throw new ScriptError(`unknown assertion address "${args[0]}"`, line);
490
+ const expected = literal(args[2]),
491
+ op = args[1];
492
+ const same = JSON.stringify(actual) === JSON.stringify(expected);
493
+ const pass =
494
+ op === '=='
495
+ ? same
496
+ : op === '!='
497
+ ? !same
498
+ : typeof actual === 'number' &&
499
+ typeof expected === 'number' &&
500
+ (op === '<'
501
+ ? actual < expected
502
+ : op === '>'
503
+ ? actual > expected
504
+ : Math.abs(actual - expected) <= 1e-6);
505
+ if (!pass)
506
+ diagnostics.push({
507
+ code: 'script-expect',
508
+ pointer: `/script/${line - 1}`,
509
+ message: `${groups.length ? '[' + groups.join('/') + '] ' : ''}${args[0]} ${op} ${args[2]} failed (actual ${JSON.stringify(actual)})`,
510
+ hint: 'check the expected value or advance queued writes before asserting',
511
+ });
512
+ break;
513
+ }
514
+ case 'touch': {
515
+ if (args.length !== 4 || !['down', 'move', 'up'].includes(args[0]!))
516
+ throw new ScriptError('use touch down|move|up <id> <x> <y>', line);
517
+ const id = num(args[1], 'pointer id'),
518
+ x = num(args[2], 'x'),
519
+ y = num(args[3], 'y');
520
+ if (!Number.isInteger(id) || id < 0)
521
+ throw new ScriptError('pointer id must be a nonnegative integer', line);
522
+ act((player) => {
523
+ player.input().pointer(args[0] as 'down' | 'move' | 'up', x, y, { id });
524
+ });
525
+ step(0);
526
+ if (args[0] === 'up') {
527
+ act((player) => {
528
+ player.input().pointer('leave', 0, 0, { id });
529
+ });
530
+ step(0);
531
+ }
532
+ break;
533
+ }
534
+ case 'advance': {
535
+ const t = num(args[0], 'advance time');
536
+ if (t < 0) throw new ScriptError('advance time must be ≥ 0', line);
537
+ let n = 1;
538
+ if (!args.length) throw new ScriptError('advance needs seconds', line);
539
+ if (args.length > 1) {
540
+ if (args[1] !== 'in' || args.length !== 3)
541
+ throw new ScriptError('use "advance <seconds> [in <n>]"', line);
542
+ n = num(args[2], 'step count');
543
+ if (!Number.isInteger(n) || n < 1)
544
+ throw new ScriptError('step count must be a whole number ≥ 1', line);
545
+ }
546
+ for (let k = 0; k < n; k++) step(t / n);
547
+ break;
548
+ }
549
+ case 'set': {
550
+ if (args.length !== 2) throw new ScriptError('use "set <input> <value>"', line);
551
+ requireInput(args[0]!);
552
+ const type = model.inputs.get(args[0]!)?.type;
553
+ const v =
554
+ args[0]!.startsWith('$') && (type === 'string' || type === 'color')
555
+ ? args[1]!.startsWith('"')
556
+ ? JSON.parse(args[1]!)
557
+ : args[1]!
558
+ : args[1] === 'true'
559
+ ? true
560
+ : args[1] === 'false'
561
+ ? false
562
+ : num(args[1], 'value');
563
+ act((player) => {
564
+ player.set(args[0]!, v);
565
+ });
566
+ break;
567
+ }
568
+ case 'fire':
569
+ case 'toggle':
570
+ if (args.length !== 1) throw new ScriptError(`use "${cmd} <input>"`, line);
571
+ requireInput(args[0]!);
572
+ act((player) => {
573
+ if (cmd === 'fire') player.fire(args[0]!);
574
+ else player.toggle(args[0]!);
575
+ });
576
+ break;
577
+ case 'pointer': {
578
+ const kind = args[0];
579
+ if (kind === 'drag') {
580
+ if (args.length !== 5 && !(args.length === 7 && args[5] === 'in'))
581
+ throw new ScriptError('use pointer drag <x0> <y0> <x1> <y1> [in <n>]', line);
582
+ const x0 = num(args[1], 'x0'),
583
+ y0 = num(args[2], 'y0'),
584
+ x1 = num(args[3], 'x1'),
585
+ y1 = num(args[4], 'y1');
586
+ const n = args[6] === undefined ? 1 : num(args[6], 'step count');
587
+ if (!Number.isInteger(n) || n < 1)
588
+ throw new ScriptError('step count must be a whole number ≥ 1', line);
589
+ act((player) => {
590
+ player.pointer('move', x0, y0);
591
+ });
592
+ step(0);
593
+ act((player) => {
594
+ player.pointer('down', x0, y0);
595
+ });
596
+ step(0);
597
+ for (let i = 1; i <= n; i++) {
598
+ act((player) => {
599
+ player.pointer('move', x0 + ((x1 - x0) * i) / n, y0 + ((y1 - y0) * i) / n);
600
+ });
601
+ step(0);
602
+ }
603
+ act((player) => {
604
+ player.pointer('up', x1, y1);
605
+ });
606
+ step(0);
607
+ break;
608
+ }
609
+ if (kind === 'leave' && args.length === 1) {
610
+ act((player) => {
611
+ player.pointer('leave');
612
+ });
613
+ step(0);
614
+ break;
615
+ }
616
+ if (!['move', 'down', 'up', 'click'].includes(kind!) || args.length !== 3)
617
+ throw new ScriptError(
618
+ 'use "pointer move|down|up|click <x> <y>" or "pointer leave"',
619
+ line,
620
+ );
621
+ const x = num(args[1], 'x');
622
+ const y = num(args[2], 'y');
623
+ for (const k of kind === 'click'
624
+ ? (['move', 'down', 'up'] as const)
625
+ : [kind as 'move' | 'down' | 'up']) {
626
+ act((player) => {
627
+ player.pointer(k, x, y);
628
+ });
629
+ step(0);
630
+ }
631
+ break;
632
+ }
633
+ case 'focus': {
634
+ act((player) => {
635
+ if (args[0] === 'clear' && args.length === 1) player.focusClear();
636
+ else if (args[0] === 'target' && args.length === 2) player.focusTarget(args[1]!);
637
+ else if (args[0] === 'traverse' && args.length === 2)
638
+ player.focusTraverse(
639
+ args[1] as import('../../../modules/focus/core/index.ts').Direction,
640
+ );
641
+ else
642
+ throw new ScriptError('use "focus clear|target <id>|traverse <direction>"', line);
643
+ });
644
+ step(0);
645
+ break;
646
+ }
647
+ case 'key': {
648
+ if (model.doc.requires?.includes('input')) {
649
+ act((player) => {
650
+ inputCommand(player, 'key', args);
651
+ });
652
+ step(0);
653
+ break;
654
+ }
655
+ if (
656
+ !['down', 'up'].includes(args[0]!) ||
657
+ args.length < 2 ||
658
+ args.length > 3 ||
659
+ (args.length === 3 && args[2] !== 'shift')
660
+ )
661
+ throw new ScriptError('use "key down|up <key> [shift]"', line);
662
+ act((player) => {
663
+ player.focusKey(args[1]!, args[0] === 'down', args[2] === 'shift');
664
+ });
665
+ step(0);
666
+ break;
667
+ }
668
+ case 'instance': {
669
+ if (args.length < 2 || args.length > 3)
670
+ throw new ScriptError('use "instance <id> <timeline> [mix]"', line);
671
+ act((player, handles) => {
672
+ handles.set(
673
+ args[0]!,
674
+ player.createTimeline(args[1]!, {
675
+ name: args[0]!,
676
+ mix: args[2] === undefined ? 1 : num(args[2], 'mix'),
677
+ }),
678
+ );
679
+ });
680
+ break;
681
+ }
682
+ case 'timeline': {
683
+ const name = args[0]!,
684
+ op = args[1];
685
+ act((player, handles) => {
686
+ const t = handles.get(name) ?? player.timeline(name);
687
+ if (op === 'play' || op === 'pause' || op === 'stop') t[op]();
688
+ else if (op === 'seek' || op === 'scrub') t[op](num(args[2], op));
689
+ else if (op === 'speed' || op === 'mix') t[op] = num(args[2], op);
690
+ else if (
691
+ op === 'loop' &&
692
+ ['once', 'loop', 'pingpong', 'authored'].includes(args[2]!)
693
+ )
694
+ t.loop = args[2] === 'authored' ? null : (args[2] as TimelineInstance['loop']);
695
+ else
696
+ throw new ScriptError(
697
+ 'use "timeline <name> play|pause|stop|seek|scrub|speed|mix|loop [value]"',
698
+ line,
699
+ );
700
+ });
701
+ break;
702
+ }
703
+ case 'machine': {
704
+ act((player) => {
705
+ const m = player.machine(args[0]!),
706
+ op = args[1];
707
+ if (op === 'play' || op === 'pause' || op === 'stop') m[op]();
708
+ else if (op === 'mix') m.mix = num(args[2], 'mix');
709
+ else if (op === 'fire') m.fire(args[2]!);
710
+ else if (op === 'set')
711
+ m.set(
712
+ args[2]!,
713
+ args[3] === 'true' ? true : args[3] === 'false' ? false : num(args[3], 'value'),
714
+ );
715
+ else
716
+ throw new ScriptError(
717
+ 'use "machine <name> play|pause|stop|mix|fire|set [value …]"',
718
+ line,
719
+ );
720
+ });
721
+ break;
722
+ }
723
+ case 'motion':
724
+ if (args[0] !== 'reduce' && args[0] !== 'full')
725
+ throw new ScriptError('use "motion reduce|full"', line);
726
+ act((player) => {
727
+ player.reducedMotion = args[0] === 'reduce';
728
+ });
729
+ break;
730
+ case 'snapshot': {
731
+ const all = opts.all || args.includes('--all');
732
+ const semantics = opts.semantics || args.includes('--semantics');
733
+ const addresses = args.filter((arg) => arg !== '--all' && arg !== '--semantics');
734
+ let values = all ? allValues() : p.values();
735
+ if (addresses.length) {
736
+ const pick: typeof values = {};
737
+ // Prefer exact input/JSON addresses. Resolve AniML aliases from the same registry
738
+ // as the compiler, including slash-scoped component snapshot addresses.
739
+ for (const a of addresses) {
740
+ const canonical = canonicalAddress(a);
741
+ const v = read(canonical);
742
+ if (v === undefined)
743
+ throw new ScriptError(
744
+ `"${a}" is not an animated address or a bool/number input`,
745
+ line,
746
+ );
747
+ pick[canonical] =
748
+ Array.isArray(v) && v.length === 4
749
+ ? formatHex(v as [number, number, number, number])
750
+ : (v as number | boolean | string | [number, number]);
751
+ }
752
+ values = pick;
753
+ }
754
+ const snapshot: Snapshot = {
755
+ time: p.time,
756
+ values,
757
+ states: p.states(),
758
+ events,
759
+ settled,
760
+ };
761
+ if (watched.size) {
762
+ snapshot.data = {};
763
+ for (const path of changedData) snapshot.data[path] = data().get(dataPath(path));
764
+ changedData.clear();
765
+ }
766
+ if (semantics) {
767
+ const semanticPlayer = p as Player & { semantics?: () => unknown };
768
+ if (!semanticPlayer.semantics)
769
+ throw new ScriptError('semantics module is not loaded', line);
770
+ snapshot.semantics = semanticPlayer.semantics();
771
+ }
772
+ out.push(snapshot);
773
+ output.push(snapshot);
774
+ events = [];
775
+ break;
776
+ }
777
+ default:
778
+ if (
779
+ ['contact', 'scroll', 'gamepads', 'pointer-enable', 'scroll-cancel'].includes(cmd!)
780
+ ) {
781
+ act((player) => {
782
+ inputCommand(player, cmd!, args);
783
+ });
784
+ step(0);
785
+ break;
786
+ }
787
+ throw new ScriptError(`unknown command "${cmd}"`, line);
788
+ }
789
+ if (expected) {
790
+ const emitted = diagnostics.splice(diagnosticStart);
791
+ if (!emitted.some((d) => d.code === expected))
792
+ diagnostics.push({
793
+ code: 'script-expect-error',
794
+ pointer: `/script/${line - 1}`,
795
+ message: 'expected error ' + expected + ' in ' + groups.join('/'),
796
+ hint: 'follow expect-error with a command producing that code',
797
+ });
798
+ }
799
+ } catch (e) {
800
+ const error = e as Error & { code?: string; hint?: string };
801
+ if (expected) {
802
+ if ((error.code ?? 'script-usage') !== expected)
803
+ diagnostics.push({
804
+ code: 'script-expect-error',
805
+ pointer: `/script/${line - 1}`,
806
+ message: 'expected ' + expected + ', received ' + (error.code ?? 'script-usage'),
807
+ hint: 'check the expected diagnostic code',
808
+ });
809
+ continue;
810
+ }
811
+ if (e instanceof Breakpoint) break;
812
+ if (e instanceof ScriptError) throw e;
813
+ // seam(P6-9b): preserve structured layout/font diagnostics through script sampling.
814
+ const failure = new ScriptError(error.message.replace(/^anima: /, ''), line, error.code);
815
+ if (error.hint) Object.assign(failure, { hint: error.hint });
816
+ throw failure;
817
+ }
818
+ }
819
+ return {
820
+ snapshots: out.slice(start.snapshots),
821
+ output: output.slice(start.output),
822
+ diagnostics: diagnostics.slice(start.diagnostics),
823
+ stopped,
824
+ };
825
+ };
826
+ if (opts.seed !== undefined) {
827
+ execute('seed ' + opts.seed);
828
+ line = 0;
829
+ }
830
+ return {
831
+ player: p,
832
+ execute,
833
+ dataValues,
834
+ finish() {
835
+ if (groups.length) throw new ScriptError('unclosed group ' + groups.join('/'), line);
836
+ if (expectedError)
837
+ throw new ScriptError(
838
+ 'expect-error needs a following command',
839
+ line,
840
+ 'script-expect-error',
841
+ );
842
+ },
843
+ get seed() {
844
+ return seed;
845
+ },
846
+ };
847
+ }
848
+
849
+ /** Run a script against a fresh player; assertion failures accumulate without aborting. */
850
+ export function runScript(model: Model, text: string, opts: ScriptOptions = {}) {
851
+ const session = createScriptSession(model, opts);
852
+ const result = session.execute(text);
853
+ session.finish();
854
+ return { ...result, player: session.player };
855
+ }
856
+
857
+ /** JSON strings/arrays/objects stay together; #hex is a value, # otherwise begins a comment. */
858
+ function tokenize(raw: string, line: number): string[] {
859
+ const words: string[] = [];
860
+ let token = '',
861
+ quoted = false,
862
+ escaped = false,
863
+ depth = 0;
864
+ for (let i = 0; i < raw.length; i++) {
865
+ const c = raw[i]!;
866
+ if (
867
+ !quoted &&
868
+ depth === 0 &&
869
+ !token &&
870
+ c === '#' &&
871
+ !(
872
+ ((words[0] === 'set' && words.length === 2) ||
873
+ (words[0] === 'data' && words[1] === 'set' && words.length === 3) ||
874
+ (words[0] === 'data' && words[1] === 'break' && words.length === 4) ||
875
+ (words[0] === 'expect' && words.length === 3)) &&
876
+ /^#[a-f\d]{3,8}(?=\s|$)/i.test(raw.slice(i))
877
+ )
878
+ )
879
+ break;
880
+ if (!quoted && depth === 0 && /\s/.test(c)) {
881
+ if (token) words.push(token);
882
+ token = '';
883
+ continue;
884
+ }
885
+ token += c;
886
+ if (quoted) {
887
+ if (escaped) escaped = false;
888
+ else if (c === '\\') escaped = true;
889
+ else if (c === '"') quoted = false;
890
+ } else if (c === '"') quoted = true;
891
+ else if (c === '[' || c === '{') depth++;
892
+ else if (c === ']' || c === '}') depth--;
893
+ }
894
+ if (quoted || depth !== 0) throw new ScriptError('unterminated JSON value', line);
895
+ if (token) words.push(token);
896
+ return words;
897
+ }