animl-cli 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1181) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +34 -0
  3. package/README.md +21 -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 +57 -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,1530 @@
1
+ # Authoring in AniML
2
+
3
+ Write `.animl`; `anima build` produces `.ani` for the runtime. Check motion from markup.
4
+ Read `anima docs markup` for syntax and `anima docs spec` for playback rules.
5
+ `anima docs` shows a table of contents. Use `anima docs --list` to find topics,
6
+ then fetch one with `anima docs <topic>` or a guide section with
7
+ `anima docs authoring <section-slug>`. Topic names accept camelCase or kebab-case;
8
+ near misses suggest the closest topic (for example `textInput` resolves to `text-input`).
9
+ New to Anima? [GETTING-STARTED.md](GETTING-STARTED.md) builds a complete control step by step;
10
+ [FEATURES.md](FEATURES.md) lists every optional feature with its import and size.
11
+
12
+ ## The loop
13
+
14
+ ```sh
15
+ anima new bell --glyph fixtures/glyphs/bell.svg -o bell.animl
16
+ # Edit bell.animl: add ring input, swing node, timeline, states and listeners (see below).
17
+ anima validate bell.animl
18
+ anima inspect bell.animl
19
+ anima sample bell.animl -e "fire ring; advance 0; advance 0.2; snapshot swing.rotate"
20
+ anima render bell.animl -o sheet.png --sheet 8 -e "fire ring"
21
+ anima build bell.animl -o bell.ani
22
+ ```
23
+
24
+ Fix validation errors first. Exit codes: 0 success, 1 diagnostics, 2 usage errors.
25
+ `--format=json` includes codes, source positions, JSON pointers and available hints.
26
+
27
+ ## Start from the glyph
28
+
29
+ ```sh
30
+ anima new bell --glyph fixtures/glyphs/bell.svg
31
+ anima new bell --glyphy path/to/glyphy-project -o bell.animl
32
+ ```
33
+
34
+ The scaffold embeds the path byte for byte with its SHA-256. The Glyphy form also reads
35
+ its pick, grid and metadata. Keep rest transforms at identity and added parts at
36
+ `opacity="0"` or `scale="0"` to preserve the static glyph.
37
+
38
+ Split parts with `subpaths="0 1"`. Indices start at 0, in the order of `M` commands in `d`.
39
+ `anima inspect bell.animl` lists each glyph's indices and bounding boxes in grid units
40
+ (`minX minY maxX maxY`), also available with `--format=json`. A “likely hole” hint means
41
+ only that another subpath's bbox contains it; inspect the geometry before splitting.
42
+ Keep a hole and its outline together with `fill-rule="evenodd"`. Render parts separately
43
+ when their indices are unclear. `examples/bell.animl` shows the real bell split.
44
+
45
+ <!-- fragment -->
46
+ ```xml
47
+ <glyph name="shape" d="M2 2L18 2L18 16L2 16ZM4 4L16 4L16 14L4 14ZM8 17L12 17L10 19Z"/>
48
+ <group id="swing" pivot="10 2.5">
49
+ <path id="body" glyph="shape" subpaths="0 1" fill="currentColor" fill-rule="evenodd"/>
50
+ <path id="clapper" glyph="shape" subpaths="2" pivot="10 9" fill="currentColor"/>
51
+ </group>
52
+ ```
53
+
54
+ Check source parity directly, without an external comparison harness:
55
+
56
+ ```sh
57
+ anima render bell.animl --compare fixtures/glyphs/bell.svg
58
+ anima render bell.animl --compare fixtures/glyphs/bell.svg --size 256 --tolerance 0 -o diff.png
59
+ ```
60
+
61
+ Comparison renders both SVGs at the same square size (default 256), on transparency,
62
+ with `currentColor` set to black regardless of `--current` or `--dark`. Explicit paint
63
+ colours and slot overrides still apply. It reports differing RGBA pixels, maximum channel
64
+ difference and pass/fail; exit 1 means a channel exceeds `--tolerance` (0–255, default 0).
65
+ The optional diff PNG shows maximum channel differences as grayscale (black is identical).
66
+ Use `--at` or a script to check a later frame; `--sheet` cannot be combined with comparison.
67
+
68
+ See `docs/research/glyphy-compat.md` for the grid, outline and stroke conventions.
69
+
70
+ ## Geometry and pivots
71
+
72
+ Coordinates use grid units, with y down. Children keep their parent's coordinate system;
73
+ nesting does not move the origin to the child's bounds. Positive rotation is clockwise.
74
+ Set `pivot="10 2.5"` to turn or scale about that point (default `0 0`). Nest groups to
75
+ compose motion. Enlarge `viewBox` for bleed; the layout box still uses `grid`.
76
+
77
+ Use SVG-style attribute names: `cx`, `cy`, `width`, `height`, `fill`, `fill-rule`,
78
+ `stroke`, `stroke-width`, `stroke-linecap`, `stroke-linejoin`.
79
+ `anima schema <type>` shows both the markup and JSON spellings and marks required attributes.
80
+ For example, `anima schema rect` marks `x0`, `y0`, `width` and `height` as required.
81
+ Rects start at `x0`, `y0`; `x`, `y` translate any node. Arcs take `cx`, `cy`, `r`,
82
+ `from`, `to` and stroke paint. Caps and joins default to `round`; strokes scale with nodes.
83
+ A fill detail needs `fill`; every stroke detail needs `stroke`.
84
+
85
+ ## Timelines and keyframes
86
+
87
+ Tracks target `node-id.attribute`: `dot.fill`, `bar.width`, `wave.stroke-width`,
88
+ `wave.trimEnd`. Times are seconds, angles degrees; scale and opacity have no units.
89
+
90
+ Each keyframe is `time value [ease]`. Align columns with whitespace, or use `;` inline.
91
+ The ease on a key shapes the segment to the next key. Omit ease on the last key.
92
+ Before the first key and after the last, the endpoint value holds.
93
+
94
+ ```xml
95
+ <anima version="0.1" name="turn" grid="20">
96
+ <group id="icon" pivot="10 10">
97
+ <circle id="dot" cx="14" cy="10" r="2" fill="currentColor"/>
98
+ </group>
99
+ <ease name="sway" curve="cubic(0.45, 0, 0.55, 1)"/>
100
+ <timeline name="turn" duration="1" reducedMotion="end">
101
+ <track target="icon.rotate">
102
+ 0 0 sway
103
+ 0.5 20 sway
104
+ 1 0
105
+ </track>
106
+ <track target="dot.scale">0 1 hold; 0.5 1 out; 1 1.2</track>
107
+ </timeline>
108
+ <layer name="main" initial="turning">
109
+ <state name="turning" play="turn"/>
110
+ </layer>
111
+ </anima>
112
+ ```
113
+
114
+ Eases: `linear`, `hold`, `in`, `out`, `inOut`, `cubic(x1, y1, x2, y2)`,
115
+ `elastic(amplitude, period)`. Name reusable curves with `<ease>`; do not shadow built-ins.
116
+ Timelines default to `loop="once"`; alternatives are `loop` and `pingpong`.
117
+ `reducedMotion="end"` jumps to the end; `skip` freezes at the start; `play` runs normally.
118
+ Animate literal hex colours; colour slots and `currentColor` are for host theming.
119
+
120
+ ## States inputs and listeners
121
+
122
+ Declare every input: `bool`, `number` (optional `min`, `max`) or `trigger`.
123
+ Listeners write inputs; transitions read them:
124
+
125
+ <!-- fragment -->
126
+ ```xml
127
+ <bool name="hover"/>
128
+ <bool name="down"/>
129
+ <trigger name="ring" buffer="0.3"/>
130
+ <group id="icon" pivot="10 10"/>
131
+ <a11y role="button" label="Ring" activate="ring" held="down"/>
132
+ <layer name="main" initial="rest">
133
+ <state name="rest"><on when="hover and !down" to="over" blend="0.18"/></state>
134
+ <state name="over">
135
+ <pose icon.scale="1.05"/>
136
+ <on when="!hover" to="rest" blend="0.22"/>
137
+ <on when="ring" to="over" blend="0.09" interruptible="false"/>
138
+ </state>
139
+ </layer>
140
+ <listener on="click" fire="ring"/>
141
+ <listener on="enter" set="hover=true"/>
142
+ <listener on="down" set="down=true"/>
143
+ <listener on="leave" set="hover=false down=false"/>
144
+ <listener on="up" set="down=false"/>
145
+ ```
146
+
147
+ Use `play="timeline-name"` and `@end` for one-shot motion. A state without `play` is a
148
+ pose; without `<pose>` it writes nothing. Later layers win on shared properties;
149
+ inspect reports overlaps. Empty poses return to values below that layer.
150
+
151
+ Conditions accept `hover`, `!down`, `level > 0.5`, `@after(0.3)` and `@end`, joined with
152
+ `and`. For “or”, write separate transitions. `@end` needs a `once` timeline.
153
+ Guards are not bind expressions: negate with `!name`, not `not name`, and there is no `or` or
154
+ parentheses. `not`, `or` and parentheses belong to bind and derive expressions (below), and a guard
155
+ that uses them fails with `bad-condition`.
156
+ Use `fire` for triggers, `set="a=true b=false"` for declared bools or numbers,
157
+ and `toggle` for bools. A listener's optional `target` names a node; otherwise it hits
158
+ `<hit>` or the viewBox. For example, `<hit circle="10 10 10.8"/>` sets a hit disc.
159
+ Triggers normally expire after one step. `buffer` keeps an unconsumed trigger pending.
160
+ `interruptible="false"` lets a crossfade finish before another transition can run.
161
+ Keyboard activation uses `a11y`: `activate` names a trigger to fire or a bool to toggle, and `held` names a bool.
162
+
163
+ ## Checking the motion
164
+
165
+ ```sh
166
+ anima render examples/bell.animl -o rest.png
167
+ anima render examples/bell.animl -o sheet.png --sheet 8 -e "fire ring"
168
+ anima render examples/bell.animl -o reduced.png -e "motion reduce; fire ring; advance 0"
169
+ ```
170
+
171
+ A script's first `advance` also enters the initial states. A `set` before it is already in place when
172
+ they resolve, so transitions that react to the change never run (the document starts in the end
173
+ state). To see a reaction to an input change, `advance 0` first, then `set`, then advance.
174
+
175
+ Scripts accept `advance <seconds> [in <steps>]`, `set <input> <value>`, `fire <input>`,
176
+ `toggle <input>`, `pointer move|down|up|click <x> <y>`, `pointer leave`,
177
+ `motion reduce|full` and `snapshot [addresses]`. Pointer coordinates use grid units.
178
+ Input writes queue until a step; `advance 0` processes them without advancing time.
179
+ Snapshots report values, states, events and `settled`. Select bool/number inputs alongside
180
+ animated addresses with `snapshot dark knob.x`; input values appear under their names.
181
+ They reflect applied values, so step first to process queued writes. Triggers have no
182
+ persistent value. Without a list, snapshots still contain only animated addresses.
183
+ Check that one-shots settle.
184
+
185
+ Sheets start at the end of the script and sample until settled, or for `--over <seconds>`.
186
+ Use `--dark` and `--color accent=#e08a6d` to check themes. Check rest parity, pivots,
187
+ clipping and the final pose. Rendered geometry catches errors that valid numbers cannot.
188
+
189
+ ## Common mistakes
190
+
191
+ Save each bad input below under its marked filename. Run `anima validate <filename>`.
192
+
193
+ **Misspelled attribute. Use `rotate`.**
194
+
195
+ <!-- invalid: typo.animl -->
196
+ ```text
197
+ <anima version="0.1" name="demo" grid="20">
198
+ <circle id="dot" cx="10" cy="10" r="2" fill="currentColor" roate="5"/>
199
+ </anima>
200
+ ```
201
+
202
+ <!-- diagnostics: typo.animl -->
203
+ ```text
204
+ typo.animl:2:60 error unknown-attribute <circle> takes no "roate" attribute
205
+ hint: did you mean "rotate"?
206
+ typo.animl: 1 error
207
+ ```
208
+
209
+ **Fill detail without paint. Add `fill="currentColor"`.**
210
+
211
+ <!-- invalid: paint.animl -->
212
+ ```text
213
+ <anima version="0.1" name="demo" grid="20">
214
+ <circle id="dot" cx="10" cy="10" r="2" fill-rule="evenodd"/>
215
+ </anima>
216
+ ```
217
+
218
+ <!-- diagnostics: paint.animl -->
219
+ ```text
220
+ paint.animl:2:51 error paint-attribute "fill-rule" needs "fill"
221
+ hint: add fill="…"
222
+ paint.animl: 1 error
223
+ ```
224
+
225
+ **Incomplete keyframe. Supply both time and value.**
226
+
227
+ <!-- invalid: keyframe.animl -->
228
+ ```text
229
+ <anima version="0.1" name="demo" grid="20">
230
+ <group id="icon"/>
231
+ <timeline name="turn" duration="1"><track target="icon.rotate">0</track></timeline>
232
+ </anima>
233
+ ```
234
+
235
+ <!-- diagnostics: keyframe.animl -->
236
+ ```text
237
+ keyframe.animl:3:64 error bad-keyframe expected time value [ease]
238
+ keyframe.animl: 1 error
239
+ ```
240
+
241
+ **Unknown track target. Use an existing node id.**
242
+
243
+ <!-- invalid: target.animl -->
244
+ ```text
245
+ <anima version="0.1" name="demo" grid="20">
246
+ <group id="icon"/>
247
+ <timeline name="turn" duration="1"><track target="ghost.rotate">0 0; 1 20</track></timeline>
248
+ </anima>
249
+ ```
250
+
251
+ <!-- diagnostics: target.animl -->
252
+ ```text
253
+ target.animl:3:51 error unknown-address no node "ghost"
254
+ target.animl: 1 error
255
+ ```
256
+
257
+ **Undeclared condition input. Add `<bool name="hover"/>`.**
258
+
259
+ <!-- invalid: input.animl -->
260
+ ```text
261
+ <anima version="0.1" name="demo" grid="20">
262
+ <group id="icon"/>
263
+ <layer name="main" initial="idle"><state name="idle"><on when="hover" to="active"/></state><state name="active"/></layer>
264
+ </anima>
265
+ ```
266
+
267
+ <!-- diagnostics: input.animl -->
268
+ ```text
269
+ input.animl:3:64 error unknown-input no input "hover"
270
+ hint: declare it: <bool name="…"/>, <number name="…"/> or <trigger name="…"/>
271
+ input.animl: 1 error
272
+ ```
273
+
274
+ **Trigger in `set`. Use `fire="ring"`.**
275
+
276
+ <!-- invalid: trigger.animl -->
277
+ ```text
278
+ <anima version="0.1" name="demo" grid="20">
279
+ <group id="icon"/>
280
+ <trigger name="ring"/>
281
+ <listener on="click" set="ring=true"/>
282
+ </anima>
283
+ ```
284
+
285
+ <!-- diagnostics: trigger.animl -->
286
+ ```text
287
+ trigger.animl:4:27 error input-type "set" needs a bool or number or string or color input; "ring" is trigger
288
+ hint: use fire for a trigger
289
+ trigger.animl: 1 error
290
+ ```
291
+
292
+ **Forgotten pivot.** This is valid. Save as `pivot.animl`:
293
+
294
+ ```xml
295
+ <anima version="0.1" name="pivot" grid="20">
296
+ <circle id="dot" cx="10" cy="4" r="2" rotate="90" fill="currentColor"/>
297
+ </anima>
298
+ ```
299
+
300
+ Run `anima inspect pivot.animl`: its node line is `dot (circle)`, with no pivot.
301
+ Run `anima render pivot.animl -o pivot.svg`: the centre turns to `-4 10`, outside the box.
302
+ Add `pivot="10 4"` to keep the centre fixed. Validation cannot infer the intended hinge.
303
+
304
+ ## Formatting
305
+
306
+ `anima fmt icon.animl` prints formatted markup. Use `--write` to edit the file or `--check`
307
+ to check it. Formatting aligns keyframe columns and keeps comments, element order and named
308
+ eases. It does not reorder layers. Run validation again after edits.
309
+
310
+ ## Markup in HTML
311
+
312
+ Wrap AniML in a script so HTML does not interpret its node tags:
313
+
314
+ ```html
315
+ <anima-icon>
316
+ <script type="application/vnd.anima+xml">
317
+ <anima version="0.1" name="dot" grid="20">
318
+ <circle id="dot" cx="10" cy="10" r="2" fill="currentColor"/>
319
+ </anima>
320
+ </script>
321
+ </anima-icon>
322
+ ```
323
+
324
+ Run `anima build page.html -o page.built.html`. It replaces AniML scripts inside
325
+ `<anima-icon>` with compiled `application/vnd.anima+json` scripts. Load the regular
326
+ `@anima-format/web` runtime on that page.
327
+ To compile markup in the browser instead (prototypes, playgrounds), also import
328
+ `@anima-format/web/markup-hooks`. This single authoring import includes the lean `markup`
329
+ compiler and every compiler hook needed by the runtime modules you load (paint, surface,
330
+ components, bind, convert, events, focus, motion and data). Runtime entries register runtime
331
+ features only. Import the authoring entry before or after the runtime entries; hook registration
332
+ is synchronous in either order, including modules loaded later. Existing browser authoring pages
333
+ can replace their `@anima-format/web/markup` import with this one. The standalone browser file is
334
+ `anima-markup-hooks.js`.
335
+
336
+ The lean `@anima-format/web/markup` entry remains available for static AniML and explicit
337
+ `markup-<name>` hook imports. When using that lean entry, add
338
+ `@anima-format/web/markup-animation` for track text, named eases, transition conditions or listener
339
+ `set` assignments. It includes the lean compiler and works before or after it; its standalone file
340
+ is `anima-markup-animation.js`. Missing animation syntax reports `markup-animation-unavailable`
341
+ with a pointer and source position. Loading the entry later retries failed retained sources.
342
+ `markup-hooks` already includes animation support, so pages using it need no extra import. Library/template expansion still uses the optional
343
+ `@anima-format/web/markup-libraries` entry alongside the authoring import. Without a compiler,
344
+ an icon holding AniML reports a `markup-unavailable` error. Pages that ship built `.ani` never
345
+ need authoring imports.
346
+
347
+ ## Hand-written ani
348
+
349
+ Hand-written `.ani` JSON is still valid. It is the runtime format that `anima build`
350
+ produces. `validate`, `inspect`, `sample`, `render` and `fmt` accept it too.
351
+ Follow `anima docs spec` and the JSON spellings in `anima schema`.
352
+ Use `anima decompile icon.ani -o icon.animl` to move authoring to markup.
353
+
354
+ ## Paint module
355
+
356
+ Add `requires="paint"` to use gradients and dashed strokes. Browser pages also import
357
+ `@anima-format/web/paint` (or load `anima-paint.js`); authoring tools register modules automatically.
358
+ A page without paint refuses the document with `unknown-feature`. See `examples/paint.animl` for
359
+ animated stop colours, coordinates and dash offset.
360
+
361
+ ```xml
362
+ <anima version="0.1" name="paint-demo" grid="20" requires="paint">
363
+ <circle id="disc" cx="10" cy="10" r="8" stroke="#000" stroke-dasharray="10% 5%">
364
+ <linearGradient x1="2" y1="2" x2="18" y2="18">
365
+ <stop offset="0" stop-color="#ff000080"/>
366
+ <stop offset="1" stop-color="#00f"/>
367
+ </linearGradient>
368
+ </circle>
369
+ </anima>
370
+ ```
371
+
372
+ Use `paint="stroke"` on a gradient child for a gradient stroke. Animate `disc.fill.x2`,
373
+ `disc.fill.stops.0.color`, `disc.fill.stops.0.position` or `disc.stroke-dashoffset`. Animated colours
374
+ must be hex literals; unanimated stops may use colour slots. Dash numbers are grid units; percentages
375
+ are fractions of the full path length, with offset expressed as a fraction (0.1 = 10%). A partial
376
+ trim overrides dashes. Round caps extend each dash by half the stroke width on both ends,
377
+ which can hide short gaps; use `stroke-linecap="butt"` for short dashes.
378
+ Validate and render the `.animl` directly as usual.
379
+
380
+ ### Optional compositing
381
+
382
+ Add `requires="composite"` for blend modes, masks, clips, multiple paints, paint visibility,
383
+ stroke position or sibling draw order. Browser pages import `@anima-format/web/composite`
384
+ (or load `anima-composite.js`). When also using gradients, dashes, shapes, corners, morphs
385
+ or fixed strokes, declare `requires="paint composite"` and import both browser modules.
386
+ Neither module implies the other. See `examples/composite.animl`, SPEC's `composite` chapter
387
+ and ANIML's composite forms. The base runtime continues to refuse unavailable features.
388
+
389
+ ### Pose morphs and group clips
390
+
391
+ With `requires="paint"`, a pose can write `pathId.d` directly to a path string. Blend between
392
+ poses with `<on blend="…">`. Rest, pose and track paths must have the same expanded commands,
393
+ including case and repetition count; `morph-mismatch` points to the incompatible value.
394
+ `anima schema pose` describes the address map; `anima schema state` shows the containing state.
395
+
396
+ With `requires="composite"`, put `<clip source="outline"/>` inside a group to clip all its
397
+ children to that painted node's outline. `rule` defaults to `nonzero`; use `rule="evenodd"`
398
+ for holes. Source transforms apply, but its paint, visibility and opacity do not affect the clip.
399
+
400
+ ```xml
401
+ <anima version="0.1" name="pose-clip" grid="20" requires="paint composite">
402
+ <rect id="outline" x0="0" y0="0" width="10" height="20" fill="#000" visible="false"/>
403
+ <group id="icon">
404
+ <clip source="outline"/>
405
+ <path id="line" d="M2 2L18 18" stroke="#000"/>
406
+ </group>
407
+ <bool name="done"/>
408
+ <layer name="main" initial="rest">
409
+ <state name="rest">
410
+ <pose line.d="M2 2L18 18"/>
411
+ <on when="done" to="done" blend="0.3"/>
412
+ </state>
413
+ <state name="done"><pose line.d="M2 18L18 2"/></state>
414
+ </layer>
415
+ <listener on="click" toggle="done"/>
416
+ </anima>
417
+ ```
418
+
419
+ ## Reusing markup
420
+
421
+ Keep shared interaction wiring in a library, then import it from each icon. The bell, moon and
422
+ trash examples import `examples/lib/ui.animl` and use `<apply template="ui:press"/>`; their compiled
423
+ `.ani` files stay byte-identical. That template sets the common `hover` and `down` inputs. Each
424
+ icon retains its own animation layers, timing and accessibility behavior.
425
+
426
+ A library starts with `<library name="ui">`. Put a template inside it, for example
427
+ `<template name="press" params="hover=hover down=down">`, whose listener attributes use
428
+ `set="{hover}=true"` and `set="{down}=false"`. At the document root, add
429
+ `<import src="lib/ui.animl" as="ui"/>`. Override defaults on an application, for example
430
+ `<apply template="ui:press" hover="over" down="held"/>`, after declaring those inputs.
431
+
432
+ Templates can contain nodes, timelines, layers or listeners; apply them where those elements
433
+ are allowed. Parameters substitute attribute values and text, including keyframes. Required
434
+ parameters have no default (`params="target scale=0.92"`). Missing, extra and unused parameters,
435
+ unknown imported names, cycles and recursive applications produce diagnostics showing the
436
+ library's source position and the application/import site. Libraries also share colours, glyphs
437
+ and named eases through `ui:name` references. Libraries can also share components and their model definitions.
438
+
439
+ `anima build` and `validate` resolve imports relative to each importing file. The playground
440
+ resolves them inside the project directory; the browser markup module fetches them relative
441
+ to the document URL. API hosts supply `compile(source, {file, resolve})`, or `compileAsync` with
442
+ an asynchronous resolver. Formatting preserves reusable source forms. Decompiling `.ani` gives
443
+ the expanded markup: imports and templates cannot be recovered.
444
+
445
+ ## Bindings
446
+
447
+ Use `requires="bind"` when a value should follow an input continuously. This ring follows
448
+ `progress` on the next frame with no timeline or transition:
449
+
450
+ ```xml
451
+ <anima version="0.1" name="progress" grid="20" requires="bind">
452
+ <number name="progress" default="0" min="0" max="1"/>
453
+ <circle id="ring" cx="10" cy="10" r="8" stroke="#d97757" trimEnd="0"/>
454
+ <bind target="ring.trimEnd" value="progress"/>
455
+ </anima>
456
+ ```
457
+
458
+ Bindings override state and timeline writes, then clamp to the property's range. Expressions
459
+ accept arithmetic and `min`, `max`, `clamp`, `mix`; bool inputs work directly for visibility or
460
+ as 0/1 in arithmetic. Use `mix(#000, #fff, progress)` for colour. `bind-type` means the expression
461
+ and target disagree; `unknown-input` means an input needs declaring; `bind-syntax` names malformed
462
+ expressions. `anima inspect` lists bound addresses, `anima schema bind` describes the form, and
463
+ `anima sample --script` includes resolved values. Browser hosts import `@anima-format/web/bind`.
464
+ See `examples/progress.animl`; see the data section below for view-model bindings.
465
+ ## Images and assets
466
+
467
+ Import both `@anima-format/web/paint` and `@anima-format/web/assets` for image documents.
468
+ Declare an asset, then place it in a box (see `examples/photo.animl`, an original generated PNG):
469
+
470
+ ```xml
471
+ <anima version="0.1" name="photo" grid="24" requires="paint assets">
472
+ <asset name="photo" type="image" src="photo.png"/>
473
+ <image id="photo" asset="photo" x0="2" y0="2" width="20" height="20" fit="contain"/>
474
+ </anima>
475
+ ```
476
+
477
+ `contain` preserves the full image; `cover` fills and crops; `fill` and `resize` stretch. `none`,
478
+ `scale-down`, `fit-width`, and `fit-height` use intrinsic size. Set `align="top-left"` (or
479
+ center/edge/corner names) to position it, and `sampling="nearest"` for pixel art. The box clips
480
+ overflow. Asset `width`/`height` override decoded intrinsic dimensions when needed.
481
+
482
+ Paths resolve relative to the document URL in the browser and source file in the CLI.
483
+ Components inherit asset names from their enclosing component/document, with local declarations
484
+ shadowing outer ones. Image/audio asset-ref values use this same lookup, so shared data models do
485
+ not need a catalog copied into every row. Image nodes can be click targets using their bounds.
486
+
487
+ `anima build photo.animl --embed -o photo.ani` embeds local files as data URIs, including component
488
+ catalogs and imported libraries (paths relative to the declaring source file); only assets
489
+ change. `anima render photo.animl -o photo.png` reads local images directly.
490
+ For hosted assets, assign `icon.assets = (name, info) => urlOrBlob` before loading; promises
491
+ work too. Await `icon.ready` on initial load, or listen for `anima:load` on reload. Failed
492
+ loads emit `anima:error`. Embedded images make no network request. `icon.assetPolicy` defaults to `'local'`: same-origin URLs and data URIs. Set it to `'any'`
493
+ for a CDN, or supply a resolver to authorize a replacement explicitly. The resolver receives
494
+ `type`, `source`, optional `size`/`mime`, and detached `metadata` in `info`.
495
+
496
+ Import `@anima-format/web/paint-sampling` (includes paint) for SVG wrapping; canvas supports it directly.
497
+ Sampling can tile outside the fitted rectangle. `wrap="repeat"` repeats it; `wrap="mirror"`
498
+ reflects alternate tiles. SVG repeat requires `sampling="nearest"`; use canvas for bilinear repeat. `wrap-x` and `wrap-y` override one axis. Clamp edge extension is still incomplete: the current
499
+ runtime preserves transparent fitted margins. The three clamp parity rows remain open. For example:
500
+
501
+ ```xml
502
+ <anima version="0.1" name="tiles" grid="24" requires="paint assets">
503
+ <asset name="photo" type="image" src="photo.png" width="8" height="4"/>
504
+ <image id="photo" asset="photo" x0="0" y0="0" width="24" height="24"
505
+ fit="none" align="top-left" sampling="nearest" wrap="mirror" wrap-y="repeat"/>
506
+ </anima>
507
+ ```
508
+
509
+ Build options go on the declaration: `encode="png|jpeg|webp" quality="0.8"` re-encodes and embeds
510
+ pixels. Quality is [0,1]; PNG ignores it. PNG encoding runs in-process; JPEG/WebP encoding and
511
+ WebP decoding need the cached headless Chromium (`CHROMIUM_PATH` overrides its executable).
512
+ Missing Chromium reports `build-encoder-unavailable`. Build checks signatures against extensions
513
+ and MIME, and writes inspected `size`, `mime` and audio `duration`. Audio validation inspects
514
+ headers; playback still requires a browser decoder. `export="false"` leaves a declaration for
515
+ the host resolver and excludes its bytes from build inspection, encoding and embedding. Embedded
516
+ source payloads become `src="anima:NAME"` placeholders that require the resolver.
517
+
518
+ Import `@anima-format/web/media` to read audio/blob bytes: `await icon.asset('bytes')` yields an
519
+ ArrayBuffer, cached per asset/load. Treat cached bytes as read-only; pass a copy (`bytes.slice(0)`)
520
+ to `AudioContext.decodeAudioData`, which takes ownership of its input. Images/fonts return source URLs. Events owns activated audio
521
+ playback; import `@anima-format/web/events` and `@anima-format/web/assets`, then use a clip:
522
+
523
+ ```xml
524
+ <anima version="0.1" name="clip" grid="24" requires="assets events">
525
+ <asset name="tone" type="audio" src="tone.wav" start="0.2" end="0.9"/>
526
+ <circle id="button" cx="12" cy="12" r="10" fill="#d97757"/>
527
+ <event-def name="play" audio="tone" volume="0.5"/>
528
+ <listener on="click" target="button" emit="play"/>
529
+ </anima>
530
+ ```
531
+
532
+ `start`/`end` are seconds within the source. Events before user activation are dropped; they do
533
+ not queue or load audio. Fonts remain declarations until text support arrives.
534
+
535
+ `anima import art.svg -o art.animl` handles vector geometry, groups, paints, user-space gradients
536
+ and representable transforms. `anima import animation.json -o animation.animl` imports the Lottie
537
+ shape subset (groups, paths, paints, transforms, keyframes/easing and stroke trims). Every unsupported
538
+ feature reports `import-unsupported` with a source path; review the warnings before using a lossy
539
+ import. Original hand-made importer inputs and compiled examples are covered by the asset CLI tests.
540
+
541
+
542
+ ## Components
543
+
544
+ Use a template for repeated markup and a component when each placement needs its own inputs and
545
+ state. Declare components at the document level or in an imported library; place them with
546
+ `<instance>`. A component's coordinates stay local: translate/scale the instance to place it.
547
+
548
+ ```xml
549
+ <anima version="0.1" name="badges" grid="20" requires="components bind">
550
+ <number name="unread" default="3"/>
551
+ <component name="badge" grid="8">
552
+ <number name="count" min="0" max="8"/>
553
+ <circle id="dot" cx="4" cy="4" r="1" fill="#e44"/>
554
+ <bind target="dot.r" value="count"/>
555
+ <listener on="click" emit="selected"/>
556
+ </component>
557
+ <instance id="left" component="badge" count="{unread}"/>
558
+ <instance id="right" component="badge" x="10" count="2"/>
559
+ <listener on="left.selected" set="unread=0 right.count=0"/>
560
+ </anima>
561
+ ```
562
+
563
+ `count="{unread}"` evaluates against parent inputs every step. Literal initializers apply once;
564
+ listener actions can subsequently write `right.count`, and `fire="right.pop"` addresses a trigger.
565
+ For a continuous explicit binding use `<bind target="right.count" value="unread * 2"/>`.
566
+ Explicit bound/animated addresses override inline expressions. Do not use a node attribute name
567
+ such as `x` as a component input name (`reserved-input-name` at the declaration); use names such
568
+ as `pos-x`, `count` or `enabled`. Installed module node keys are reserved too.
569
+
570
+ Child events bubble as `left.selected`. Parent listeners and transitions see them on the next
571
+ step (including `advance 0`); the player stays awake for that step. Paused children keep their
572
+ state; invisible settled children sleep. Recursive definitions are `component-cycle`; depth >8
573
+ or >256 expanded instances is `limit-exceeded`. Unknown components/inputs are errors with their
574
+ source location, not silent no-ops.
575
+
576
+ Run `anima inspect examples/toolbar.animl` to see instance layers. With `anima sample`, select
577
+ `left/count` or `left/dot.r`; snapshot state keys are scoped too (`left/interaction`).
578
+ `examples/toolbar.animl` combines three Glyphy icons using the same imported press template and
579
+ an unread badge. Browser hosts import `@anima-format/web/components` and, when expressions are
580
+ used, `@anima-format/web/bind`, alongside the base runtime.
581
+
582
+
583
+ Load `@anima-format/web/nested` alongside components for explicit instance clocks, fitting,
584
+ outputs and component-valued selections. In this complete example, `$t` controls the child's
585
+ animation time in seconds, `fps` floors it to a 12 Hz clock, and `fit` maps the child viewBox into
586
+ `size`. Fitting also transforms pointer hits. Cover does not add a clip; add one explicitly when
587
+ needed.
588
+
589
+ ```xml
590
+ <anima version="0.1" name="nested-controls" grid="30" requires="components nested data bind">
591
+ <model name="Controls">
592
+ <number name="t" default="0.5"/>
593
+ <component name="card" default="row"/>
594
+ </model>
595
+ <component name="row" grid="10">
596
+ <number name="count" default="3"/>
597
+ <circle id="dot" cx="5" cy="5" r="1" fill="#d97757"/>
598
+ <output name="done" value="count > 0"/>
599
+ <timeline name="grow" duration="1">
600
+ <track target="dot.r">0 1; 1 4</track>
601
+ </timeline>
602
+ <layer name="main" initial="growing">
603
+ <state name="growing" play="grow"/>
604
+ </layer>
605
+ </component>
606
+ <instance id="clocked" component="row" time="$t" fps="12" size="20 10" fit="contain" align="right"/>
607
+ <instance id="selected" component="$card" x="20"/>
608
+ <circle id="indicator" cx="2" cy="15" r="1" fill="#000"/>
609
+ <bind target="indicator.opacity" value="clocked.outputs.done"/>
610
+ </anima>
611
+ ```
612
+
613
+ The source and compiled document are [controls.animl](../modules/nested/examples/controls.animl)
614
+ and [controls.ani](../modules/nested/examples/controls.ani). `clocked.outputs.done` is read-only;
615
+ write `clocked.count` instead. A parent evaluates before its children, so a child change reaches
616
+ parent bindings on the next step. Output snapshots use `clocked/outputs.done`. Backward scrubbing
617
+ resamples the current child state; it does not undo transitions. A component property holds a
618
+ declared name or empty string. Changing `$card` rebuilds `selected`; an unchanged name keeps its
619
+ state. Empty selection hides and stops that placement. Typed `component("row")` guard literals
620
+ are still pending shared parser integration.
621
+
622
+ Libraries may expose only selected declarations with `<library name="cards" exports="row Score">`.
623
+ An import can select a subset: `<import src="lib/cards.animl" as="cards" select="row"/>`.
624
+ Private dependencies remain available inside the library. Put `<model name="Score">…</model>` in
625
+ the library and use `data="Score"` on its component; references are renamed consistently when
626
+ compiled. [cards.animl](../examples/lib/cards.animl) and the three `components-library-*`
627
+ conformance examples show the expanded documents.
628
+
629
+ For local vendoring, retain the upstream path as import metadata:
630
+ `<import src="vendor/cards.animl" source="../shared/cards.animl" as="cards"/>`.
631
+ Run `anima library update icon.animl --check` to check staleness, then
632
+ `anima library update icon.animl` to refresh it. The command reads local files only, preflights
633
+ all sources before writing, and never contacts a service. Building continues to read the vendored
634
+ `src`, so library updates are explicit and reviewable.
635
+
636
+ Choose `renderer="canvas"` on the HTML host after importing `@anima-format/web/canvas` when a scene
637
+ needs world-space feathering or a raster surface for future scene features. Keep SVG for ordinary
638
+ icons, automatic CSS recolouring and visible overflow. The document and AniML do not change, and
639
+ all required paint/asset/component modules still load explicitly. Canvas follows CSS size and DPR;
640
+ call `invalidate()` when changing an idle canvas's colour slots. Consult the canvas comparison report
641
+ for raster differences and unsupported feature diagnostics before choosing it for a scene.
642
+
643
+ ## Timeline control
644
+
645
+ Use `requires="motion bind"` for input-controlled timeline clocks. A state such as
646
+ `<state name="idle" play="turn" time="phase * 1.2"/>` scrubs a 1.2-second timeline from `phase`.
647
+ Quantize stays on the timeline, so the same sampling grid applies to ticking and scrubbing.
648
+ An input-controlled clock sleeps until its input changes.
649
+
650
+ For hover reversal, define one peek timeline, play it in a forward state and in a `speed="-1"`
651
+ state, and put `sync="true"` on both transitions. The target starts at the current clock,
652
+ including an enter during reverse. It keeps the usual interruptible-fade behaviour.
653
+
654
+ To stop a ticking loop cleanly, put `exitNext="step" sync="true"` on its stop transition.
655
+ Target a state playing the same timeline with `hold="true"` to keep the stopping angle.
656
+ Use `exitNext="loop"` to finish the turn instead. A target with a `time` expression also holds
657
+ that captured angle until the expression value changes, letting a phase input take over later.
658
+ Reduced-motion entry policy still takes precedence. See `anima docs motion` for timing details
659
+ and `modules/motion/examples/sync.animl` plus its sample scripts for a complete button.
660
+
661
+ `anima docs --list` includes every module chapter; `anima docs bind` explains expressions.
662
+
663
+ ## Interaction examples
664
+
665
+ `anima docs input`, `anima docs focus` and `anima docs machine` include their complete
666
+ contracts inline and list module examples with built JSON siblings:
667
+
668
+ - `modules/input/examples/drag-slider.animl`: parent-space writes with a preserved grab offset.
669
+ - `modules/focus/examples/traversal.animl`: ordered focus, Tab and arrow traversal.
670
+ - `modules/machine/examples/blend-pulse.animl`: continuous blend plus restart on every increase.
671
+
672
+ `write='{"x":"level"}'` means event field x → input level; writes are values,
673
+ not arithmetic expressions. Use exact DOM keys such as `ArrowRight`, event `key-down`,
674
+ and `modifiers="shift+control"` for that exact held set.
675
+
676
+ Sample snapshots accept AniML spelling (`ring.trimEnd`) as well as JSON spelling
677
+ (`ring.stroke.trimEnd`), and always print JSON spelling. This applies to complete and
678
+ selected snapshots in either source format.
679
+
680
+ ## Counting clicks with expressions
681
+
682
+ Declare `requires="bind events"`, a number `count`, and a trigger `pulse`. Then use
683
+ `<listener on="click" set="count=count+1" fire="pulse"/>`. No state ladder or host increment is
684
+ needed. A transition can use `when="pulse and count > 0 and mod(count, 5) == 0"` to select a
685
+ milestone state; keep the ordinary pulse transition after it. `floor(x)` and `mod(a,b)` use the
686
+ same evaluator as property bindings. Spaces around subtraction avoid hyphenated input names.
687
+
688
+ Sets within one action read one pre-action snapshot; separate actions see prior writes. Numbers
689
+ clamp to their input bounds. Machine state `entry`/`exit` and transition `actions` JSON attributes
690
+ accept the same actions, with the listener action keys as JSON:
691
+ `<state name="idle" entry='{"set":{"count":0}}'>` and
692
+ `<on when="tap" to="playing" actions='{"set":{"count":"count+1"}}'/>`. Emit `shared` on pulse entry and define its fields with
693
+ `<event-def name="shared" payload='{"count":{"type":"number","value":"{count}"},"channel":{"type":"string","value":"button"}}'/>`.
694
+ Fields resolve at the end of the step. Run `anima schema listener`, `anima schema state` or `anima schema transition` to inspect
695
+ the forms. See `modules/events/examples/share.animl` and its sample scripts for a complete share
696
+ button, including milestones past ten and an audio request verified through browser tests.
697
+
698
+ ## Data: view models, `$` paths and converters
699
+
700
+ Declare `requires="data bind"` for view models and bindings, adding `convert` for named
701
+ converters. A model declares types; an instance stores values. This complete document declares
702
+ every supported property type. `type` on an `asset-ref` is the asset kind, not a model name.
703
+ Empty asset references need no asset declaration; nonempty references must name a declared asset
704
+ of the same kind (`image`, `audio`, `font` or `blob`, with `requires="assets"`).
705
+
706
+ ```xml
707
+ <anima version="0.1" name="data-types" grid="20" requires="data bind">
708
+ <model name="Team"><string name="title" default="Blue"/></model>
709
+ <model name="Player" global="true">
710
+ <number name="score" default="0" min="0" max="100"/>
711
+ <string name="name" default="Ada"/>
712
+ <bool name="online" default="true"/>
713
+ <color name="tint" default="#d97757"/>
714
+ <trigger name="levelUp"/>
715
+ <enum name="mood" values="calm happy angry" default="calm"/>
716
+ <list name="items" of="Team"/>
717
+ <model-ref name="team" model="Team"/>
718
+ <asset-ref name="avatar" type="image"/>
719
+ </model>
720
+ <instance name="main" model="Player" default="true">
721
+ <set path="score" value="12"/>
722
+ <set path="team" value="blue"/>
723
+ </instance>
724
+ <instance name="other" model="Player"><set path="name" value="Grace"/></instance>
725
+ <instance name="blue" model="Team"/>
726
+ <circle id="dot" cx="10" cy="10" r="2" fill="#000"/>
727
+ <bind target="dot.x" value="$score / 10"/>
728
+ <bind target="dot.fill" value="$tint"/>
729
+ </anima>
730
+ ```
731
+
732
+ `$score` resolves in the default instance; `$main:score` explicitly selects `main`.
733
+ `$team.title` walks a model reference. The default instance is the one flagged `default="true"`
734
+ (at most one), otherwise the first authored instance. With no instances the runtime constructs
735
+ `default` from the first model. Root `data='{"model":"Player"}'` explicitly selects a default
736
+ model. Instance `<set path="score">` initializes a property by its bare name; it is not a listener
737
+ action. Compound initializers use JSON in `value`. A named reference preserves identity.
738
+ `global="true"` shares matching named instances through a component tree; independent root players
739
+ still have independent storage. A component can declare `data="Player"` and its placement can use
740
+ `data="main"` to share the parent's instance; components without `data` inherit their parent when `lists` is declared; components with a public model keep local storage unless explicitly supplied a context.
741
+
742
+ Use `$` paths wherever an input name is accepted: conditions, binding expressions, listener and
743
+ state/transition actions, event fields and component input expressions. Strings/enums compare with
744
+ double-quoted literals; numbers accept arithmetic. Triggers use `fire`, never a stored default.
745
+ This document demonstrates conditions, `set`, `fire`, `copy`, event fields and a component input:
746
+
747
+ ```xml
748
+ <anima version="0.1" name="data-actions" grid="20" requires="data bind events components">
749
+ <model name="Score">
750
+ <number name="score"/><number name="saved"/>
751
+ <bool name="online" default="true"/><trigger name="pulse"/>
752
+ </model>
753
+ <instance name="main" model="Score" default="true"/>
754
+ <circle id="dot" cx="10" cy="10" r="2" fill="#000"/>
755
+ <component name="badge" grid="4">
756
+ <number name="count"/>
757
+ <circle id="pip" cx="2" cy="2" r="1" fill="#000"/>
758
+ <bind target="pip.x" value="count"/>
759
+ </component>
760
+ <instance id="badge" component="badge" count="{$main:score}"/>
761
+ <layer name="status" initial="idle">
762
+ <state name="idle"><on when="$pulse and $online and $score > 0" to="done"/></state>
763
+ <state name="done"><pose dot.x="2"/></state>
764
+ </layer>
765
+ <listener on="click" set="$score=$score+1" fire="$pulse" emit="scored"/>
766
+ <listener on="change:$score" copy="$score -> $saved"/>
767
+ <event-def name="scored" payload='{"score":{"type":"number","value":"{$score}"}}'/>
768
+ </anima>
769
+ ```
770
+
771
+ Event fields resolve at the end of the step. `change:$score` compares final values after the step;
772
+ multiple writes coalesce. Its actions queue for the **next** step, including `advance 0`; they never
773
+ re-enter the current step. Change listeners observe every source, including host writes, bindings
774
+ and state actions firing triggers. This intentionally differs from the native internal-trigger
775
+ observation in `tests/oracle/input-data-listener/internal-trigger-difference/finding.json`.
776
+ Host API subscriptions also run after the step; callback writes wait for the next step.
777
+
778
+ A list of N items can drive N explicitly authored nodes without the lists module. The Lists section
779
+ below shows automatic repetition and item contexts. Here three model instances drive three nodes; `$items.2.title` selects the third
780
+ item and `$items.length` is a read-only number. `data-label` declares a custom string property;
781
+ `properties` JSON declares typed number/bool/string/color/enum/trigger properties when needed.
782
+ Custom channels use `node.properties.name`; strings/enums are discrete, hold-only channels.
783
+
784
+ ```xml
785
+ <anima version="0.1" name="data-list" grid="20" requires="data bind">
786
+ <model name="Item"><string name="title"/><number name="score"/></model>
787
+ <model name="Board"><list name="items" of="Item"/></model>
788
+ <instance name="main" model="Board" default="true">
789
+ <set path="items" value='[{"title":"Ada","score":2},{"title":"Grace","score":4},{"title":"Lin","score":6}]'/>
790
+ </instance>
791
+ <circle id="a" cx="4" cy="10" r="1" fill="#000" data-label=""/>
792
+ <circle id="b" cx="10" cy="10" r="1" fill="#000" data-label=""/>
793
+ <circle id="c" cx="16" cy="10" r="1" fill="#000" data-label=""/>
794
+ <bind target="a.r" value="$items.0.score"/>
795
+ <bind target="b.r" value="$items.1.score"/>
796
+ <bind target="c.r" value="$items.2.score"/>
797
+ <bind target="a.properties.label" value="$items.0.title"/>
798
+ <bind target="b.properties.label" value="$items.1.title"/>
799
+ <bind target="c.properties.label" value="$items.2.title"/>
800
+ <bind target="c.x" value="$items.length"/>
801
+ </anima>
802
+ ```
803
+
804
+ Add `derive` for computed scalar properties. `value` is a bind expression, with optional
805
+ `convert` (requires `convert`). Inside a model `$score` means that instance's score;
806
+ `$main:players.0.score` remains absolute. Each list item gets its own computed values.
807
+ Number, string, bool, color and enum properties can be computed. Their `$` paths work in
808
+ conditions, bindings, event fields, selected sample snapshots and host handles.
809
+ They initialize on load and recompute in the data binding pass, before visual bindings.
810
+ Conditions earlier in the step see the previous resolved computed value. Host subscriptions
811
+ observe the final value after the step. Computed dependencies must be acyclic.
812
+
813
+ This scoreboard exposes `$players.0.label` as `1,250 pts`, `$players.1.label` as `980 pts`,
814
+ and `$players.2.label` as `40 pts`. Updating a score updates its label on the next step.
815
+ The three comparison bindings choose exactly one leader, with earlier players winning ties.
816
+
817
+ ```xml
818
+ <anima version="0.1" name="derived-scoreboard" grid="20" requires="data bind derive convert">
819
+ <model name="Player">
820
+ <string name="name"/>
821
+ <number name="score" min="0" max="2000"/>
822
+ <string name="label" value="$score" convert="points"/>
823
+ <bool name="milestone" value="$score >= 1500"/>
824
+ </model>
825
+ <model name="Board"><list name="players" of="Player"/></model>
826
+ <instance name="main" model="Board" default="true">
827
+ <set path="players" value='[{"name":"Ada","score":1250},{"name":"Lin","score":980},{"name":"Sam","score":40}]'/>
828
+ </instance>
829
+ <converter name="grouped" type="number-format" decimals="0" grouping="true"/>
830
+ <converter name="suffix" type="template" text="{0} pts"/>
831
+ <converter-group name="points" chain="grouped suffix"/>
832
+ <circle id="a" cx="4" cy="10" r="1" fill="#000" data-label=""/>
833
+ <circle id="b" cx="10" cy="10" r="1" fill="#000" data-label=""/>
834
+ <circle id="c" cx="16" cy="10" r="1" fill="#000" data-label=""/>
835
+ <bind target="a.properties.label" value="$players.0.label"/>
836
+ <bind target="b.properties.label" value="$players.1.label"/>
837
+ <bind target="c.properties.label" value="$players.2.label"/>
838
+ <bind target="a.x" value="$players.0.score >= $players.1.score and $players.0.score >= $players.2.score"/>
839
+ <bind target="b.x" value="$players.1.score > $players.0.score and $players.1.score >= $players.2.score"/>
840
+ <bind target="c.x" value="$players.2.score > $players.0.score and $players.2.score > $players.1.score"/>
841
+ </anima>
842
+ ```
843
+
844
+ Computed properties are read-only: `set`, `copy`, reverse binding modes and instance
845
+ initializers fail with `read-only-path`. Host `.set()` throws the same code; write `score`
846
+ instead. For example `icon.data.string('players.0.label').value` reads the label and
847
+ `.on('change', callback)` observes it after a step. Load `/derive` beside `/data` and `/bind`,
848
+ plus `/convert` when formatting. See `anima docs derive` and `modules/derive/examples/scoreboard.animl`.
849
+
850
+ Bind expressions also accept `<`, `<=`, `>`, `>=`, `==`, `!=`, `and`, `or`, `not`.
851
+ In XML attributes escape `<` as `&lt;`. Precedence, strongest first: unary `+ -`,
852
+ `* /`, `+ -`, comparisons, `not`, `and`, `or`; parentheses override it.
853
+ Comparisons require matching types; ordering requires numbers, equality accepts strings/enums
854
+ and booleans. Logic requires booleans and short-circuits. Results are bool; number targets
855
+ receive 0 or 1. The same grammar applies to `set` actions and computed expressions.
856
+
857
+ Bindings default to `mode="to-target"`: sample the source after state/timeline resolution and
858
+ write the target. `to-source` writes the target's underlying animated/rest value into the source.
859
+ `two-way` tracks both sides; simultaneous changes use `prefer="source"` (default) or `target`.
860
+ The initial evaluation counts both as changed. Reverse modes require a direct writable scalar
861
+ path, not arithmetic or list length. `once` computes once and holds the result. Reverse writes
862
+ apply in authored order after all bindings sample their snapshot; there is no binding iteration.
863
+
864
+ ```xml
865
+ <anima version="0.1" name="data-modes" grid="20" requires="data bind">
866
+ <model name="Controls">
867
+ <number name="forward" default="2"/><number name="reverse"/>
868
+ <number name="both"/><number name="initial" default="3"/>
869
+ </model>
870
+ <circle id="dot" cx="10" cy="10" r="1" fill="#000"/>
871
+ <bind target="dot.x" value="$forward" mode="to-target"/>
872
+ <bind target="dot.y" value="$reverse" mode="to-source"/>
873
+ <bind target="dot.r" value="$both" mode="two-way" prefer="target"/>
874
+ <bind target="dot.rotate" value="$initial" mode="once"/>
875
+ </anima>
876
+ ```
877
+
878
+ `convert="name"` selects a declared converter or group. Groups run left to right; forward
879
+ references work, cycles do not. This example maps a fraction to a percentage, rounds it, formats
880
+ thousands with grouping, inserts it into a label, and smooths a numeric channel over 200 ms.
881
+ `interpolate` is initialized from the load value; duration uses milliseconds, unlike timelines.
882
+ Binding `options` JSON overrides declaration options; a whole `$path` option reads live data.
883
+
884
+ ```xml
885
+ <anima version="0.1" name="data-converters" grid="20" requires="data bind convert">
886
+ <model name="Score"><number name="progress" default="0.25"/><number name="points" default="1234.5"/></model>
887
+ <circle id="dot" cx="10" cy="10" r="1" fill="#000" data-label="" data-total=""/>
888
+ <converter name="pct" type="range" from="0 1" to="0 100" clamp="true"/>
889
+ <converter name="whole" type="round" decimals="0" mode="round"/>
890
+ <converter name="label" type="template" text="{0} percent"/>
891
+ <converter-group name="percentage" chain="pct whole label"/>
892
+ <converter name="money" type="number-format" decimals="2" grouping="true"/>
893
+ <converter name="smooth" type="interpolate" duration="200"/>
894
+ <bind target="dot.properties.label" value="$progress" convert="percentage"/>
895
+ <bind target="dot.properties.total" value="$points" convert="money"/>
896
+ <bind target="dot.x" value="$progress" convert="smooth"/>
897
+ </anima>
898
+ ```
899
+
900
+ The label starts as `25 percent`; total is `1,234.50`. Other converter types:
901
+
902
+ | Type | Use and options |
903
+ | --- | --- |
904
+ | `formula` | `expression="sin(value) * 2"`; trig uses radians. `random="always|once|on-change"` controls seeded random evaluation. Math also includes cos/tan/inverse trig, log/exp/pow/sqrt/abs/round/ceil/floor. |
905
+ | `calculate` | `operation="add" operand="2"` (or a numeric `$path`); arithmetic/math operation. |
906
+ | `negate` | Invert a boolean. |
907
+ | `to-number`, `to-string` | ECMAScript conversion; nonnumeric strings become zero for to-number. |
908
+ | `color-format` | Hex/RGBA input; `format="hex|hexa|rgb|rgba"`. |
909
+ | `pad` | `length="8" fill="0" side="start|end"`; UTF-16 string length. |
910
+ | `trim` | Whitespace removal with `mode="start|end|all|none"`. |
911
+ | `remove-zeros` | Remove redundant fractional zeros and an empty decimal point. |
912
+ | `enum-to-index` | `values="calm happy angry"`; zero-based ordered member index. |
913
+ | `list-length` | List to number. |
914
+ | `number-to-list` | Bounded integer count to index values or repeated `item`; no retained model creation. |
915
+ | `trigger` | Boolean passthrough or truncated integer counter; a trigger destination fires on output changes after the baseline, on the next step. |
916
+ | `degrees-to-radians` | Multiply by pi/180; reverse multiplies by 180/pi. |
917
+ | `normalize` | `from="0 100"`; reverse denormalizes, no implicit clamp. |
918
+
919
+ `range` also supports modulo, reverse and easing. `round` accepts floor/ceil and 0–100 decimals.
920
+ Templates support positional/named `args` JSON (including `$path` values), sequential `{}` slots,
921
+ custom `open`/`close`, grouping and precision/padding such as `{points:2:8}`.
922
+ See `anima docs convert` for all defaults and limits.
923
+
924
+ Check a saved list example with these commands (shell single quotes preserve `$`):
925
+
926
+ ```sh
927
+ anima validate board.animl
928
+ anima inspect board.animl
929
+ anima sample board.animl -e 'advance 0; snapshot $items.2.title $items.length $main:items.0.score c.r'
930
+ anima schema data
931
+ anima schema bind
932
+ anima docs data
933
+ anima docs convert
934
+ anima docs host
935
+ ```
936
+
937
+ `inspect` lists scalar `$` paths as inputs; selected sample snapshots print their typed values.
938
+ For the list above the selected data values are `"Lin"`, `3`, `2`, with `c.r` equal to `6`.
939
+ Use `set $score 12`, `set $name "Ada"` and `fire $pulse` in sample scripts. Import
940
+ `@anima-format/web/data`, `/bind`, `/convert` as needed alongside the web runtime; host access
941
+ additionally needs `/host`. Inline markup also needs its matching markup bundles.
942
+
943
+ Common diagnostics carry a code, JSON pointer, message and hint (AniML also gives source positions):
944
+
945
+ | Code | Fix |
946
+ | --- | --- |
947
+ | `data-path` | Declare the property/instance; check the list index and `$main:score` spelling. |
948
+ | `data-type` | Match the declared type; use `fire` for triggers, not defaults or sets. |
949
+ | `data-model`, `data-instance` | Declare the referenced model/instance; flag only one default. |
950
+ | `data-property`, `data-enum` | Use valid property names, ordered numeric limits and unique enum members. |
951
+ | `data-readonly` | Write an item property, not list length. |
952
+ | `data-cycle` | Make nested defaults/references acyclic. |
953
+ | `data-guard` | Match the declared literal type and use equality; asset literals need a typed declared asset. |
954
+ | `data-asset` | Declare an asset with the reference's kind. |
955
+ | `data-binding` | Reverse modes need a direct writable path and compatible target. |
956
+ | `data-converter`, `convert-reference` | Declare the converter/group name. |
957
+ | `convert-cycle`, `convert-options`, `convert-type`, `convert-unknown-type` | Break group cycles; check type/option names and operand types. |
958
+ | `data-copy`, `data-value-source` | Use `$source -> $destination` of matching types; load input/focus for their value sources. |
959
+
960
+
961
+ <!-- invalid: data-trigger.animl -->
962
+ ```text
963
+ <anima version="0.1" name="bad-trigger" grid="20" requires="data">
964
+ <model name="Score"><trigger name="pulse" default="true"/></model>
965
+ <circle id="dot" cx="10" cy="10" r="1" fill="#000"/>
966
+ </anima>
967
+ ```
968
+
969
+ <!-- diagnostics: data-trigger.animl -->
970
+ ```text
971
+ data-trigger.animl:2:23 error data-type triggers have no stored value
972
+ hint: use fire with the trigger path
973
+ data-trigger.animl: 1 error
974
+ ```
975
+
976
+ <!-- invalid: data-enum.animl -->
977
+ ```text
978
+ <anima version="0.1" name="bad-enum" grid="20" requires="data">
979
+ <model name="Score"><enum name="mood" values="happy happy"/></model>
980
+ <circle id="dot" cx="10" cy="10" r="1" fill="#000"/>
981
+ </anima>
982
+ ```
983
+
984
+ <!-- diagnostics: data-enum.animl -->
985
+ ```text
986
+ data-enum.animl:2:23 error data-enum enum needs unique members or a declared system enum
987
+ hint: check the data model, instance and property declaration
988
+ data-enum.animl: 1 error
989
+ ```
990
+
991
+ Intentional converter differences: boolean → string is `"true"`/`"false"` (native true is
992
+ `"1"`); interpolation starts eagerly from the load value instead of snapping on the first
993
+ non-default change, and RGBA channel rounding is round-half-up. Decimal rounding and degrees →
994
+ radians keep doubles; measured native differences are float32 storage precision. Enum → index's
995
+ native dump is an observation limit. The unchanged findings and exact paths are linked in
996
+ `anima docs convert`; they remain findings, not passing oracle comparisons.
997
+
998
+ Remaining data work includes layout/text consumers, scripting and text-style properties.
999
+ Data-backed keyframes, relative component contexts, component-valued properties, exported instance
1000
+ discovery and contextual list indices are implemented; see the examples below. The converter-options row's named integration now exists, but its inventory
1001
+ status remains pending. The four pending convert rows cover HSL/component-format markers,
1002
+ retained number-to-model-list creation, counter delivery into trigger destinations and scripted
1003
+ converters. Scalar/index-list/boolean functions do not imply those broader capabilities. System
1004
+ enums declare vocabulary only; they do not implement future layout/text consumers.
1005
+
1006
+ With `derive`, use `$title.length` directly in bindings or computed number properties; it is a
1007
+ read-only count of UTF-16 code units and follows title-only edits. For example
1008
+ `<number name="titleChars" value="$title.length"/>` needs no separately maintained auxiliary value.
1009
+
1010
+
1011
+ ### Animate a bound position
1012
+
1013
+ Use the existing `interpolate` converter for a travelling indicator; its `duration` is
1014
+ milliseconds and `ease` uses the timeline easing grammar:
1015
+
1016
+ ```xml
1017
+ <anima version="0.1" name="travelling-indicator" grid="120" requires="data bind convert">
1018
+ <model name="Position"><number name="x"/></model>
1019
+ <converter name="travel" type="interpolate" duration="200" ease="cubic(0.42, 0, 1, 1)"/>
1020
+ <circle id="indicator" cx="10" cy="10" r="3" fill="#4263eb"/>
1021
+ <bind target="indicator.x" value="$x" convert="travel"/>
1022
+ </anima>
1023
+ ```
1024
+
1025
+ Sample the initial state (`advance 0`), then `set $x 100`, `advance 0`, and
1026
+ `advance 0.1`: x is about 31.5357. Another 0.1 seconds reaches 100. In a browser,
1027
+ set the typed number/path and let the player's ordinary frame loop advance the converter.
1028
+ Retargeting begins at the current sample; no page-side interpolation is needed. The first
1029
+ binding evaluation initializes immediately. Timelines use seconds; converter duration uses ms.
1030
+
1031
+ ## Filtering a list by typed text
1032
+
1033
+ Use `text-input` to write committed field text to a string `$query`. Derive one bool per label
1034
+ with `contains(lower($label0), lower($query))`, then derive a number `$count` by adding the
1035
+ bools (each becomes 0 or 1). Bind row visibility to those bools. The empty query shows all rows;
1036
+ matching ignores case, preserves spaces and uses Unicode default lowercase without normalization.
1037
+ Both functions require strings; wrong argument types report `bind-type` at load time.
1038
+
1039
+ ```xml
1040
+ <anima version="0.1" name="filtering-list" grid="20" requires="text textinput a11y focus data bind derive convert">
1041
+ <model name="Search">
1042
+ <string name="query"/>
1043
+ <string name="label0" default="Sound"/>
1044
+ <string name="label1" default="Motion"/>
1045
+ <bool name="shown0" value="contains(lower($label0), lower($query))"/>
1046
+ <bool name="shown1" value="contains(lower($label1), lower($query))"/>
1047
+ <number name="count" value="$shown0 + $shown1"/>
1048
+ <string name="summary" value="$count" convert="results"/>
1049
+ </model>
1050
+ <instance name="main" model="Search" default="true"/>
1051
+ <converter name="results" type="template" text="{0} results"/>
1052
+ <text-style id="body" size="1"/>
1053
+ <text id="search" x="1" y="1" width="18" height="2" sizing="fixed">
1054
+ <run text="" style="body"/>
1055
+ <text-input placeholder="Filter labels" write-text="$query" label="Search labels"/>
1056
+ </text>
1057
+ <text id="row0" x="1" y="5">
1058
+ <run text="$label0" style="body"/>
1059
+ </text>
1060
+ <text id="row1" x="1" y="8">
1061
+ <run text="$label1" style="body"/>
1062
+ </text>
1063
+ <text id="total" x="1" y="12">
1064
+ <run text="$summary" style="body"/>
1065
+ </text>
1066
+ <bind target="row0.visible" value="$shown0"/>
1067
+ <bind target="row1.visible" value="$shown1"/>
1068
+ </anima>
1069
+ ```
1070
+
1071
+ Typing `SO` selects Sound and produces `1 results`; clearing the field restores both rows and
1072
+ `2 results`. A `$query` write updates the derived bools, count and visual bindings in the same
1073
+ `Player.step`, including `step(0)`. Native field commit scheduling is owned by `text-input`.
1074
+ For headless text sampling, supply a font with `--font sans-serif=fixtures/fonts/anima-test.ttf`.
1075
+ Browser hosts load `/text`, `/text-input`, `/a11y`, `/focus`, `/data`, `/bind`, `/derive` and
1076
+ `/convert` beside the base web entry. The complete example pair is
1077
+ `modules/bind/examples/filtering-list.animl` and `.ani`; `anima docs bind` includes this recipe.
1078
+
1079
+ <!-- // seam(P7-1): hosts must opt into the text overflow implementation after the text split. -->
1080
+
1081
+ ## Text browser imports
1082
+
1083
+ Import `@anima-format/web/text` for text measurement and retained SVG. For text nodes using
1084
+ `overflow="hidden"`, `"ellipsis"`, `"fit"` or `"fit-font-size"`, import
1085
+ `@anima-format/web/text-overflow` before loading the document (it includes `/text`). `visible` and
1086
+ `clipped` need only `/text`. A missing overflow implementation reports `text-overflow` at
1087
+ `/requires`; add the overflow import. CLI commands already include all overflow modes.
1088
+ Canvas hosts import `/canvas` as before; it now includes the optional `/text-canvas` drawer.
1089
+ Direct `canvasShapes` consumers import `/text-canvas` explicitly. The `.ani`/AniML spellings,
1090
+ measurer contract and fitting results are unchanged. See [text's spec](../modules/text/SPEC.md)
1091
+ for the `measureText(player, nodeId, maxWidth?)` layout-consumer hook.
1092
+
1093
+ ## Lists
1094
+
1095
+ Use `count="$tracks.length"` for a live dot counter. Any readable numeric data path is accepted.
1096
+ `anima inspect` lists the currently existing repeated input slots, including triggers.
1097
+
1098
+ Add `lists components data` to `requires` and import `@anima-format/web/lists` alongside
1099
+ components, data and bind. A repeat creates one component player per list item. Bindings in that
1100
+ component read the item: `$score` is its score, `$index` is its current zero-based position,
1101
+ and `$parent.bonus` reads the enclosing board. The component's data declaration names the item's
1102
+ model. `index` and `parent` are reserved property names (`reserved-name`).
1103
+
1104
+ ```xml
1105
+ <anima version="0.1" name="players" grid="30" requires="components data bind lists">
1106
+ <model name="Player">
1107
+ <number name="score"/>
1108
+ </model>
1109
+ <model name="Board">
1110
+ <number name="bonus" default="2"/>
1111
+ <list name="players" of="Player"/>
1112
+ </model>
1113
+ <instance name="main" model="Board" default="true">
1114
+ <set path="players" value="[{&quot;score&quot;:3},{&quot;score&quot;:7}]"/>
1115
+ </instance>
1116
+ <component name="row" grid="10" data="Player">
1117
+ <circle id="dot" cx="2" cy="2" r="1" fill="#000"/>
1118
+ <bind target="dot.r" value="$score"/>
1119
+ <bind target="dot.x" value="$index"/>
1120
+ <bind target="dot.y" value="$parent.bonus"/>
1121
+ </component>
1122
+ <repeat id="rows" list="$players" component="row" dy="10" size="30 10"/>
1123
+ </anima>
1124
+ ```
1125
+
1126
+ `dy="10"` offsets each row by its current index; `dx` works the same way. `size="30 10"`
1127
+ overrides each instance's local bounds without scaling its geometry. Inserting, removing or swapping
1128
+ list objects preserves the surviving component players, including clocks and machine state.
1129
+ A removed item releases its player. Repeated references to one object have separate players,
1130
+ matched in occurrence order. There can be at most 256 live repeated instances per player.
1131
+
1132
+ For mixed models, use `component="Player:row Header:heading"`; JSON uses
1133
+ `"component": {"Player":"row","Header":"heading"}`. Declare each mapped component with its own
1134
+ model. A missing mapping for a list with a known model is `list-map`; an unmapped runtime model is
1135
+ skipped and recorded in `listState(player).warnings` from `@anima-format/core/lists`.
1136
+
1137
+ An explicit `<instance id="badge" component="row" data="$team"/>` supplies a model reference;
1138
+ `data="main"` selects a named instance. A component without `data` inherits its parent's context.
1139
+ Inside a nested component, `$parent.parent.bonus` walks two context levels. `$index` is read-only;
1140
+ relative parent paths are read-only too. A component with `data="Player"` keeps its own default
1141
+ Player storage when it is placed without an explicit context.
1142
+
1143
+ Use `count` when a number supplies the length. This is the number-to-list form of a repeat;
1144
+ instances retain index identity as the count grows and shrinks. Counts are floored, negative counts
1145
+ produce no items, and counts above 256 are rejected.
1146
+
1147
+ ```xml
1148
+ <anima version="0.1" name="stars" grid="20" requires="components data bind lists">
1149
+ <model name="Board"><number name="stars" default="3"/></model>
1150
+ <component name="star" grid="4">
1151
+ <circle id="dot" cx="2" cy="2" r="1" fill="#e90"/>
1152
+ <bind target="dot.opacity" value="1 - $index / 10"/>
1153
+ </component>
1154
+ <repeat id="stars" count="$stars" component="star" dx="4"/>
1155
+ </anima>
1156
+ ```
1157
+
1158
+ `anima schema repeat` lists both source fields. Inspect and sample accept the same documents;
1159
+ select `rows/0/dot.r` in snapshots and use `rows.0.input` for a child input. Browser hosts using
1160
+ AniML also import `@anima-format/web/markup-components` for component and repeat authoring.
1161
+
1162
+ ## Page data API (host module)
1163
+
1164
+ Load `anima-icon.js`, `anima-data.js` and `anima-host.js` as module scripts, plus
1165
+ `anima-markup.js` when using inline AniML. Data and host can arrive in either order.
1166
+ Add `auto-bind` to select the default model instance, or call `icon.data.bind('main')`.
1167
+ Wait for `anima:load` before accessing data. A retained API/handle belongs to that load;
1168
+ reacquire it after reload. Destroying an icon stops its scheduler.
1169
+
1170
+ ```js
1171
+ const api = icon.data;
1172
+ const score = api.number('$score');
1173
+ const unsubscribe = score.on('change', (value) => {
1174
+ output.textContent = String(value);
1175
+ });
1176
+ api.batch(() => {
1177
+ score.set(10);
1178
+ score.set(12);
1179
+ api.string('$label').set('Ada');
1180
+ });
1181
+ // The next animation step delivers 12 once.
1182
+ unsubscribe();
1183
+ const next = api.create('Score', { score: 4, label: 'Grace' });
1184
+ api.bind(next);
1185
+ ```
1186
+
1187
+ Use `models()` to discover properties and enum members, `instances()` for named
1188
+ instances, `get('$main:score')` for an explicit read. `.boolean`, `.color`, `.enum`,
1189
+ `.list`, `.image`, `.font` work like `.number`. `.trigger('$pulse').fire()` sends a
1190
+ signal. Catch `DataError` to inspect `code`, `pointer`, `message`, `hint`.
1191
+
1192
+ `examples/web/index.html` is a self-contained page using the built browser bundles.
1193
+ See `anima docs host` for the complete host contract.
1194
+
1195
+ ## Editing page data (host-edit module)
1196
+
1197
+ Import `@anima-format/web/data`, `@anima-format/web/host`, and
1198
+ `@anima-format/web/host-edit` (either host load order). Await the imports, then
1199
+ `await customElements.get('anima-icon').ready`. This is module registration readiness;
1200
+ `await icon.ready` waits for that icon's document.
1201
+
1202
+ ```js
1203
+ icon.data.bind(icon.data.defaultInstance());
1204
+ const tracks = icon.data.list('$tracks');
1205
+ const first = tracks.at(0);
1206
+ icon.data.batch(() => {
1207
+ tracks.add({ title: 'Next' });
1208
+ tracks.insert(0, { title: 'Intro' });
1209
+ });
1210
+ // Changes appear on the next frame, or player.step(0) for manual playback.
1211
+ // After that frame:
1212
+ tracks.swap(0, 1);
1213
+ tracks.remove(first); // follows the item identity, even after a move
1214
+ icon.data.color('$accent').set([217, 119, 87, 255]);
1215
+ console.log(icon.data.color('$accent').rgba, icon.data.color('$accent').hex);
1216
+ icon.data.enum('$mood').index = 1;
1217
+ console.log(icon.data.enum('$mood').values);
1218
+ ```
1219
+
1220
+ `tracks.length` is read-only; `tracks.at(i).string('title')` is a typed nested handle.
1221
+ Call the nested accessor again after reordering to obtain its current property path.
1222
+ To insert a shared or mixed-model item, pass `icon.data.instance('named')` or the record returned
1223
+ by `icon.data.create('Track', values)`. `defaultInstance()` discovers but does not bind the default.
1224
+
1225
+ List helpers preserve stored item objects for the lists module's repeat matching. Whole-list
1226
+ `.set()` remains a replacement. In a step mixing helpers with ordinary host `.set()` writes,
1227
+ helpers apply first; use separate steps when the order matters.
1228
+
1229
+ With components imported, `icon.instance('badge').data` addresses the existing child's models.
1230
+ `<anima-icon component="badge" src="icons.ani">` selects a component as root. Set the component
1231
+ attribute before loading; change it and reload to select another component.
1232
+ Imported components keep their original key when unique: a library `switch` can be selected with
1233
+ `component="switch"`. The import alias is always accepted (`component="ui:switch"` for `as="ui"`).
1234
+ On a clash, imported keys are `ui:switch`, `other:switch`; nested imports use the full alias chain.
1235
+ Local declarations retain their exact keys. Ambiguous bare names report `ambiguous-component`;
1236
+ use a qualified name from the diagnostic hint (hints are present in verbose/tooling builds).
1237
+ CLI `--component`, core component references and `data.component(path).set(name)` use the same lookup.
1238
+ The core components entry exports `componentNames(doc, name)`, returning matching definition keys
1239
+ (one on success, several on ambiguity, none if unknown). Compiled aliases live in
1240
+ `meta.componentNames`, survive JSON/decompile round trips and preserve other metadata.
1241
+ Old generated keys still work; after rebuilding, `import-4-switch` resolves by its unique `switch`
1242
+ suffix or reports qualified alternatives if ambiguous.
1243
+
1244
+ Components without their own `data` declaration share the document's live named instances through
1245
+ every nesting level. Theme colours therefore reach nested digits without a `global` model flag.
1246
+ An explicitly declared child model remains local unless bound to a parent instance; separate root
1247
+ icons keep separate data. Colour handles accept `#rgb`, `#rrggbb`, `#rrggbbaa` or RGBA arrays and throw
1248
+ `DataError` (`data-type`, data path and hint) for invalid values. RGBA channels must be integers
1249
+ in [0,255]. Writes commit on the next step;
1250
+ `batch` groups scheduling and notifications and does not synchronously render:
1251
+
1252
+ ```js
1253
+ icon.data.batch(() => icon.data.color('$theme:ink').set('#abcdef'));
1254
+ // The next scheduled frame updates top-level and inherited nested bindings.
1255
+ ```
1256
+
1257
+ For images, point the property at a declared image asset first, then:
1258
+
1259
+ ```js
1260
+ await icon.data.image('$cover').set('/images/cover.png');
1261
+ await icon.data.image('$cover').set(fileBlob);
1262
+ ```
1263
+
1264
+ These promises wait for decode. The next frame applies the decoded replacement to uses of the
1265
+ current asset in that icon; the data value remains its asset name. Failed decode rejects with a
1266
+ `DataError`. Use `assetPolicy = 'any'` (assets module) for external URLs. Core-only consumers can
1267
+ set declared asset names, while URLs and Blobs require the web consumer.
1268
+
1269
+ For typed constructor readiness, import `AnimaIcon` from `@anima-format/web/host-edit` and await
1270
+ `AnimaIcon.ready` after all desired module imports. The base web constructor has no preload cost.
1271
+
1272
+ ### Typed guards, colour markers and exported instances
1273
+
1274
+ Data paths accept equality literals of their declared type: `$mood == "happy"`,
1275
+ `$ready == true`, `$tint == #d97757`, or `$avatar == asset("photo")`. Enum members must
1276
+ exist; an asset id must name the declared asset type. Use `==` or `!=`; a trigger stays
1277
+ `when="$levelUp"`. Double quotes in AniML attributes need `&quot;`, and conjunctions need
1278
+ `&amp;&amp;`. A quoted string may itself contain `&&`. Colors compare RGBA, including alpha.
1279
+
1280
+ A `color-format` converter can use `pattern="{h} {s}% {l}%"`. The markers `{r} {g} {b} {a}`
1281
+ produce integer RGBA bytes, `{h}` rounded hue degrees, `{s}`/`{l}` rounded percentages and
1282
+ `{hex}` lowercase `#rrggbb`. Achromatic hue is zero. Other text passes through; unknown markers
1283
+ are load errors.
1284
+
1285
+ A binding target can be a trigger. Conversion runs once per step; the first result establishes
1286
+ a baseline. Each later converted-value change queues one pulse for the next step. A change
1287
+ from 1.1 to 1.9 through `trigger` stays integer 1 and does not pulse; a change to 2 does. Both
1288
+ directions of a value change fire. Use forward-only `to-target` or `once` modes.
1289
+
1290
+ This complete example is compiled as [data-extras.ani](../modules/data/examples/data-extras.ani)
1291
+ from [data-extras.animl](../modules/data/examples/data-extras.animl):
1292
+
1293
+ ```xml
1294
+ <anima version="0.1" name="data-extras" grid="20" requires="data bind convert">
1295
+ <model name="Player">
1296
+ <enum name="mood" values="calm happy" default="calm"/>
1297
+ <color name="tint" default="#d97757"/>
1298
+ <bool name="ready"/>
1299
+ <number name="level"/>
1300
+ <trigger name="levelUp"/>
1301
+ </model>
1302
+ <instance name="main" model="Player" default="true" export="true"/>
1303
+ <converter name="hsl" type="color-format" pattern="{h} {s}% {l}%"/>
1304
+ <converter name="pulse" type="trigger"/>
1305
+ <circle id="dot" cx="10" cy="10" r="1" fill="#d97757" data-label=""/>
1306
+ <bind target="dot.properties.label" value="$tint" convert="hsl"/>
1307
+ <bind target="$levelUp" value="$level" convert="pulse"/>
1308
+ <layer name="status" initial="idle">
1309
+ <state name="idle">
1310
+ <pose dot.r="1"/>
1311
+ <on when="$mood == &quot;happy&quot; &amp;&amp; $ready == true &amp;&amp; $tint == #d97757" to="ready"/>
1312
+ </state>
1313
+ <state name="ready"><pose dot.r="3"/><on when="$levelUp" to="levelled"/></state>
1314
+ <state name="levelled"><pose dot.r="5"/></state>
1315
+ </layer>
1316
+ </anima>
1317
+ ```
1318
+
1319
+ ```sh
1320
+ anima inspect modules/data/examples/data-extras.ani
1321
+ anima sample modules/data/examples/data-extras.ani -e 'advance 0; set $mood "happy"; set $ready true; advance 0; set $level 1; advance 0; advance 0; snapshot dot.r dot.properties.label'
1322
+ anima docs data
1323
+ anima docs convert
1324
+ ```
1325
+
1326
+ Instance JSON `exported: true` is AniML `export="true"`. Hosts importing `dataState` from
1327
+ `@anima-format/web/data` can call `dataState(icon.player).exports()` to discover explicitly
1328
+ exported authored `{name,model}` records. Internal private instances remain usable in bindings;
1329
+ the existing host/host-edit all-instance list keeps its own behavior.
1330
+
1331
+ Data-bound keyframe values (`value="$peak"`) read each player's current data; import `data` and
1332
+ `motion`. The following example also shows the element form.
1333
+
1334
+ ### Live key values and component selections
1335
+
1336
+ Import `data` and `motion` for player-local key values. This track interpolates from zero to the
1337
+ player's current `peak`, including when `peak` changes while paused or during a state blend:
1338
+
1339
+ ```xml
1340
+ <anima version="0.1" name="data-bind-keyframes" grid="20" requires="data motion">
1341
+ <model name="Levels">
1342
+ <number name="peak" default="8"/>
1343
+ </model>
1344
+ <circle id="probe" cx="10" cy="10" r="1" fill="#000"/>
1345
+ <timeline name="rise" duration="1">
1346
+ <track target="probe.r">
1347
+ <key t="0" value="0"/>
1348
+ <key t="1" value="$peak"/>
1349
+ </track>
1350
+ </timeline>
1351
+ <layer name="main" initial="run">
1352
+ <state name="run" play="rise"/>
1353
+ </layer>
1354
+ </anima>
1355
+ ```
1356
+
1357
+ The complete compiled pair is [data-keys.animl](../modules/motion/examples/data-keys.animl) /
1358
+ [data-keys.ani](../modules/motion/examples/data-keys.ani). JSON keys retain ordinary tuples:
1359
+ `[1, "$peak"]`. Both endpoints resolve against that player; independent players and timeline
1360
+ instances never modify one another's key values.
1361
+
1362
+ A model's `<component name="card" default="row"/>` stores a local definition name. With
1363
+ `data components nested`, use `<instance id="badge" component="$card"/>` and guards such as
1364
+ `when="$card == component(&quot;row&quot;)"`. These typed guards do not require `bind`.
1365
+ Complete compiled guard example: [component-guard.animl](../modules/nested/examples/component-guard.animl) /
1366
+ [component-guard.ani](../modules/nested/examples/component-guard.ani).
1367
+
1368
+ With host and host-edit imported, bind the icon's default data instance (or set `auto-bind`):
1369
+
1370
+ ```js
1371
+ const card = icon.data.component('card');
1372
+ card.on('change', (name) => console.log(name));
1373
+ card.set('box'); // commits on the next step, rebuilding the consuming badge
1374
+ card.value; // the committed local component name
1375
+ ```
1376
+
1377
+ Use the same name to retain the current child, `''` to hide it, or another declared name to start
1378
+ that component with default state. The handle uses the ordinary shared host write queue and
1379
+ subscriptions; another root icon keeps its own selection. `icon.instance('badge')` addresses the
1380
+ selected nested player. It is distinct from the component-valued data handle.
1381
+
1382
+ ## Project defaults and headless tools
1383
+
1384
+ Put `anima.json` beside your sources. Set `entry` to your `.animl`, `out` to a local export
1385
+ folder, and optionally `sources` to named AniML libraries and `presets` to render defaults.
1386
+ Paths resolve relative to the configuration file; commands find the nearest file upward from
1387
+ the working directory. A library named `ui` in `sources` is available as `ui:button`, using
1388
+ the ordinary library import system. These files remain normal AniML libraries.
1389
+
1390
+ For example, a project can use `entry: "main.animl"`, `out: "dist"`, and
1391
+ `presets: {"thumb": {"viewport": "64x32", "fit": "contain", "scale": 0.5}}`.
1392
+ Run `anima validate`, `anima render --preset thumb -o thumb.png`, or `anima build` from that
1393
+ project. Explicit render flags override presets. `anima build --out-dir dist` exports the
1394
+ compiled document, embedded assets, a runtime and an HTML page locally.
1395
+
1396
+ Start with `anima new my-icon --sample bell` (also `moon` or `progress`). Existing directories
1397
+ are protected. Glyph-based `anima new` remains available for your own SVGs.
1398
+
1399
+ Use `anima render --component button --viewport 200x100 --fit cover --scale 0.5 -o frame.png`
1400
+ for a selected component. Fit choices are `contain`, `cover`, `fill`, `none`; scale is in `(0,1]`.
1401
+ A probe such as `--probe '0,0;50,25'` returns RGBA in the **final output pixel coordinates**, so
1402
+ the second point in this example is in a 100×50 image. Probes can run without `-o`.
1403
+ `anima compare before.png after.png --tolerance 2 -o diff.png` compares all RGBA channels and
1404
+ prints maximum/mean differences and pixel counts; exit 1 means the tolerance was exceeded.
1405
+
1406
+ `anima render -s interaction.txt --audio out.wav` mixes audio events offline up to the final
1407
+ script time. Use `advance` to include the intended playback duration. It requires cached
1408
+ Playwright Chromium (or `CHROMIUM_PATH`); missing browsers produce an actionable diagnostic.
1409
+ Local and base64 sources are supported, including inherited or shadowed component/repeat audio
1410
+ assets. Events are scheduled at their exact timeline crossing within each step, including loops.
1411
+
1412
+ Use `anima schema --search 'stroke width'` for ranked registry and diagnostic matches,
1413
+ `anima schema rect.width` for one field, `anima inspect --summary` for a static wiring table,
1414
+ and `anima doctor --format=json` for Node, browser, cache and module-wiring checks. Doctor reports
1415
+ failures with hints and changes no installation or generated files.
1416
+
1417
+ Host playback: `icon.stop()` holds the current frame and stops its clock; `icon.play()`
1418
+ resumes. Import `@anima-format/web/devtools` for `icon.stats`, the `perf` attribute or
1419
+ `icon.perfMarks`, and `AnimaIcon.warnings` (see `modules/devtools/SPEC.md`).
1420
+
1421
+
1422
+ ## Agent tools
1423
+
1424
+ `anima sample board.animl -e 'advance 0; snapshot --all'` includes static values as well as
1425
+ animated properties. Add `--semantics` to each snapshot (or the CLI invocation) to get the semantic
1426
+ tree; the a11y module must be loaded. `semantics [id]` prints the whole tree or a subtree;
1427
+ `semantic <id> tap|increase|decrease|focus` performs an advertised action and steps at zero.
1428
+ `snapshot --semantics` includes the tree alongside values. Use `anima docs a11y` for node
1429
+ roles, states, properties and actions, `anima docs a11y-dom` for native browser controls,
1430
+ and `anima schema a11y` for both node fields and the separately labelled root icon form.
1431
+ `anima docs --list` includes every module with an authoring guide or spec.
1432
+ Selected snapshot and expect addresses accept JSON and AniML property spellings, such as
1433
+ `volumeFill.w` and `volumeFill.width`; exact input/JSON addresses take precedence over aliases.
1434
+ Data names may contain hyphens: write `$volume - 5` with spaces for subtraction.
1435
+
1436
+ A slider's spoken value can differ from its number: `<a11y role="slider" value="$volume"
1437
+ value-text="$volumeText" min="0" max="100" step="5"/>` (`.ani` `valueText`), with `$volumeText` a
1438
+ derived string such as "Volume 40 %"; see `anima docs a11y`. In scripts, keys delivered to the
1439
+ logically focused semantic control act as its native browser element would: slider
1440
+ ArrowRight/ArrowUp increase and ArrowLeft/ArrowDown decrease (Home/End reach the ends), Space and
1441
+ Enter activate buttons, switches, checkboxes, radios and links, and arrows rove a tab list
1442
+ (`semantic volume focus`, then `key down ArrowRight` / `key up ArrowRight`).
1443
+
1444
+ For ordered synthetic input, use `pointer click 10 10`, `pointer drag 2 2 10 10 in 4`,
1445
+ `touch down 1 10 10` / `touch move 1 12 10` / `touch up 1 12 10`. Different touch ids coexist.
1446
+ The existing input commands also support `scroll 10 10 0 24`, `key down Enter - button` and
1447
+ `gamepads [{"index":0,"connected":true,"axes":[0.5],"buttons":[{"value":1,"pressed":true}]}]`.
1448
+ They use the same public input API as browser hosts. Touch up also delivers leave.
1449
+
1450
+ Data debugging uses the public host API: `data set $score 12`, `data set $name "Ada Lovelace"`,
1451
+ `advance 0`, `data dump $score $name`. Prefixes filter the dump; omit them for all data.
1452
+ `data watch $score $name` puts changed watched values in every later snapshot's `data` object.
1453
+ `data break $score == 12` preflights steps and pauses before a matching write, even if the value
1454
+ is unchanged or overwritten later in the step. `data break clear` lets the next advance apply it.
1455
+ Diagnostics identify the actual script, listener, action or binding writer. Preflight instruments
1456
+ writes while replaying history on a separate player; it adds no bytes to the data/host runtime.
1457
+
1458
+ Assertions collect failures while continuing: `expect $score == 12`, `expect knob.x > 0`,
1459
+ `expect knob.x ~ 0.5` (absolute error ≤ 1e-6). Operators are `==`, `!=`, `<`, `>`, `~`.
1460
+ A failed assertion makes sample exit 1; a malformed command exits 2. Values are read after the
1461
+ last applied step, so advance after queued data/input edits before asserting them.
1462
+
1463
+ `anima session board.animl` reads one script command per stdin line, or `{"cmd":"snapshot --all"}`,
1464
+ and replies with one JSON line per request. It retains time, input, timeline handles, watches and
1465
+ breakpoints. `reload` validates the file again and restores compatible data, reporting any skipped
1466
+ paths; failed reload leaves the current player usable. `quit` closes the session.
1467
+
1468
+ `anima bench board.animl -s exercise.txt --frames 600 --format=json` reports compile time in ms
1469
+ and per-frame step/draw median and p95 in µs, using the renderer-neutral path from `tools/perf.ts`.
1470
+ It excludes browser layout, DOM updates and rasterization. A script can establish the workload
1471
+ before measurement; failed assertions prevent a misleading timing report.
1472
+
1473
+ ## Accessible node controls in the browser
1474
+
1475
+ Import `@anima-format/web/a11y-dom` to render node semantics as transparent native
1476
+ controls; add the optional focus module for shared logical/DOM focus and manual
1477
+ traversal. See [a11y-dom/AUTHORING.md](../modules/a11y-dom/AUTHORING.md) for the
1478
+ JSON/AniML authoring contract, host APIs and `a11y="off"` host-owned policy.
1479
+
1480
+ `seed 42` and `--seed 42` accept uint32 values and control every machine/converter random draw
1481
+ through core's shared source, including nested stepping. `new Player(model, { seed: 42 })` selects
1482
+ the same stream. Reseeding starts its sequence again without clearing converter once/on-change
1483
+ caches. Omit the seed to reproduce the established deterministic defaults exactly (machineSeed or
1484
+ 0x6d2b79f5 for machines, 1 for converters). See spec §11.2 for all commands.
1485
+
1486
+
1487
+ Toolbar and grid roving use `@anima-format/web/a11y-navigation`, which includes
1488
+ `a11y-dom`. Author a `toolbar` with direct controls, or a `grid` with `row` groups
1489
+ of `gridcell` nodes. Gridcells gain implicit logical focus with the focus module.
1490
+ Toolbar arrows work on both axes; Home/End select endpoints. Grid arrows move by
1491
+ cell/column, Home/End stay in the row, and Ctrl+Home/End reach the whole grid's
1492
+ endpoints. Row `<focus enabled="false" scope="true" edge="closed-loop"/>` wraps
1493
+ horizontally without making the row a focus target or hiding its children.
1494
+ Page Up/Down are left unprevented for your page's calendar/month handling.
1495
+ See [the example pair](../modules/a11y-dom/examples/navigation.animl) and
1496
+ [the exact navigation contract](../modules/a11y-dom/SPEC.md).
1497
+
1498
+ Keyboard/assistive-technology semantic actions dispatch state-entry events and
1499
+ state changes synchronously, including events from component instances. No dummy
1500
+ timeline is needed. Disabling a focus scope only removes that scope's own focus
1501
+ eligibility; use semantic `hidden` when you intend to hide a subtree.
1502
+
1503
+ ## Project tooling recipes
1504
+
1505
+ Use `anima docs authoring <section-slug>` to read one contents entry, or `anima docs spec --list`
1506
+ to find a normative chapter. `anima schema circle --animatable --bindable --inherited` shows shared
1507
+ addressable properties. `--editor-only` reports not applicable.
1508
+
1509
+ An `anima.json` can keep tests out of production imports and substitute build-time attributes:
1510
+
1511
+ ```json
1512
+ {
1513
+ "entry": "main.animl",
1514
+ "sources": ["ui.animl", "ui.test.animl"],
1515
+ "exclude": ["**/*.test.animl"],
1516
+ "constants": { "radius": 8 },
1517
+ "presets": { "preview": { "frames": 30, "fps": 30, "size": 160 } }
1518
+ }
1519
+ ```
1520
+
1521
+ Write `r="{{radius}}"` in an AniML attribute; constants also work in imported libraries.
1522
+ `anima render --preset preview -o preview.png` writes numbered PNG frames;
1523
+ `-o preview.webm` records video through cached Chromium. Repeat `--preset` to run a sequential queue;
1524
+ outputs gain each preset's name. Encoder failure includes a PNG fallback hint.
1525
+
1526
+ Scripts can bracket named cases with `group name` and `end`, compare with `expect`, and put
1527
+ `expect-error script-target` before a deliberate bad target. A hidden/absent semantic target or
1528
+ unknown input reports a code, line pointer and hint. `anima doctor --format=json` checks the local
1529
+ project, port, browser/device support and tools. `anima bench --frames 600` reports compile/step/draw
1530
+ cost and observed JS heap growth, including bytes per frame (GC can make it negative).