motionary 10.5.0 → 10.7.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 (128) hide show
  1. package/AGENTS.md +2 -0
  2. package/CHANGELOG.md +28 -0
  3. package/README.md +95 -1
  4. package/bin/motionary-mcp.mjs +160 -11
  5. package/dist/chunks/{anim-image-DuxvYhq6.cjs → anim-image-CFGpUX7t.cjs} +2 -2
  6. package/dist/chunks/{anim-image-DuxvYhq6.cjs.map → anim-image-CFGpUX7t.cjs.map} +1 -1
  7. package/dist/chunks/{anim-image-BlNPv4JG.js → anim-image-CXDD19FH.js} +2 -2
  8. package/dist/chunks/{anim-image-BlNPv4JG.js.map → anim-image-CXDD19FH.js.map} +1 -1
  9. package/dist/chunks/{keyframes-Ce1s05n3.cjs → keyframes-DdwGY1gr.cjs} +2 -2
  10. package/dist/chunks/{keyframes-Ce1s05n3.cjs.map → keyframes-DdwGY1gr.cjs.map} +1 -1
  11. package/dist/chunks/{keyframes-B8ITIAVa.js → keyframes-DwR6GPej.js} +2 -2
  12. package/dist/chunks/{keyframes-B8ITIAVa.js.map → keyframes-DwR6GPej.js.map} +1 -1
  13. package/dist/chunks/{registry-DXdFb2fJ.js → registry-D87dP_aR.js} +3 -3
  14. package/dist/chunks/{registry-DXdFb2fJ.js.map → registry-D87dP_aR.js.map} +1 -1
  15. package/dist/chunks/{registry-VhfPSI0v.cjs → registry-DhKZCitb.cjs} +2 -2
  16. package/dist/chunks/{registry-VhfPSI0v.cjs.map → registry-DhKZCitb.cjs.map} +1 -1
  17. package/dist/chunks/{ticker-C5RMHMW7.js → ticker-CJYI5Pxc.js} +2 -2
  18. package/dist/chunks/{ticker-C5RMHMW7.js.map → ticker-CJYI5Pxc.js.map} +1 -1
  19. package/dist/chunks/{ticker-DvmC6WLS.cjs → ticker-jD9_A9Rh.cjs} +2 -2
  20. package/dist/chunks/{ticker-DvmC6WLS.cjs.map → ticker-jD9_A9Rh.cjs.map} +1 -1
  21. package/dist/chunks/{tween-_BGIl6hK.cjs → tween-Dk0QmNe9.cjs} +2 -2
  22. package/dist/chunks/{tween-_BGIl6hK.cjs.map → tween-Dk0QmNe9.cjs.map} +1 -1
  23. package/dist/chunks/{tween-CPtm-EdT.js → tween-_Lld1MsF.js} +2 -2
  24. package/dist/chunks/{tween-CPtm-EdT.js.map → tween-_Lld1MsF.js.map} +1 -1
  25. package/dist/components/ai.cjs +314 -0
  26. package/dist/components/ai.cjs.map +1 -0
  27. package/dist/components/ai.d.cts +58 -0
  28. package/dist/components/ai.d.ts +58 -0
  29. package/dist/components/ai.js +311 -0
  30. package/dist/components/ai.js.map +1 -0
  31. package/dist/components/lite.cjs +179 -0
  32. package/dist/components/lite.cjs.map +1 -1
  33. package/dist/components/lite.js +176 -1
  34. package/dist/components/lite.js.map +1 -1
  35. package/dist/components/tokens.cjs +179 -0
  36. package/dist/components/tokens.cjs.map +1 -1
  37. package/dist/components/tokens.d.cts +36 -1
  38. package/dist/components/tokens.d.ts +36 -1
  39. package/dist/components/tokens.js +176 -1
  40. package/dist/components/tokens.js.map +1 -1
  41. package/dist/components/widgets.cjs +985 -221
  42. package/dist/components/widgets.cjs.map +1 -1
  43. package/dist/components/widgets.d.cts +606 -4
  44. package/dist/components/widgets.d.ts +606 -4
  45. package/dist/components/widgets.js +976 -222
  46. package/dist/components/widgets.js.map +1 -1
  47. package/dist/components.cjs +4 -0
  48. package/dist/components.cjs.map +1 -1
  49. package/dist/components.d.cts +36 -1
  50. package/dist/components.d.ts +36 -1
  51. package/dist/components.js +1 -1
  52. package/dist/components.umd.js +2 -2
  53. package/dist/components.umd.js.map +1 -1
  54. package/dist/index.umd.js.map +1 -1
  55. package/dist/llms-full.txt +221 -1
  56. package/dist/llms.txt +11 -2
  57. package/dist/manifest.json +580 -1
  58. package/dist/runtime/format-apng.cjs +4 -4
  59. package/dist/runtime/format-apng.js +4 -4
  60. package/dist/runtime/format-css.cjs +4 -4
  61. package/dist/runtime/format-css.js +4 -4
  62. package/dist/runtime/format-gif.cjs +4 -4
  63. package/dist/runtime/format-gif.js +4 -4
  64. package/dist/runtime/format-gltf.cjs +1 -1
  65. package/dist/runtime/format-gltf.js +1 -1
  66. package/dist/runtime/format-motion.cjs +4 -4
  67. package/dist/runtime/format-motion.js +4 -4
  68. package/dist/runtime/format-obj.cjs +1 -1
  69. package/dist/runtime/format-obj.js +1 -1
  70. package/dist/runtime/format-scene.cjs +241 -0
  71. package/dist/runtime/format-scene.cjs.map +1 -0
  72. package/dist/runtime/format-scene.d.cts +349 -0
  73. package/dist/runtime/format-scene.d.ts +349 -0
  74. package/dist/runtime/format-scene.iife.js +2 -0
  75. package/dist/runtime/format-scene.iife.js.map +1 -0
  76. package/dist/runtime/format-scene.js +233 -0
  77. package/dist/runtime/format-scene.js.map +1 -0
  78. package/dist/runtime/format-sprite.cjs +3 -3
  79. package/dist/runtime/format-sprite.js +3 -3
  80. package/dist/runtime/format-svg.cjs +3 -3
  81. package/dist/runtime/format-svg.js +3 -3
  82. package/dist/runtime/format-webp.cjs +4 -4
  83. package/dist/runtime/format-webp.js +4 -4
  84. package/dist/runtime/gl.cjs +1 -1
  85. package/dist/runtime/gl.js +1 -1
  86. package/dist/runtime/physics.cjs +739 -0
  87. package/dist/runtime/physics.cjs.map +1 -0
  88. package/dist/runtime/physics.d.cts +250 -0
  89. package/dist/runtime/physics.d.ts +250 -0
  90. package/dist/runtime/physics.iife.js +2 -0
  91. package/dist/runtime/physics.iife.js.map +1 -0
  92. package/dist/runtime/physics.js +731 -0
  93. package/dist/runtime/physics.js.map +1 -0
  94. package/dist/runtime/scroll.cjs +2 -2
  95. package/dist/runtime/scroll.js +2 -2
  96. package/dist/runtime/smooth.cjs +1 -1
  97. package/dist/runtime/smooth.js +1 -1
  98. package/dist/runtime/text.cjs +1 -1
  99. package/dist/runtime/text.js +1 -1
  100. package/dist/runtime/vector.cjs +704 -0
  101. package/dist/runtime/vector.cjs.map +1 -0
  102. package/dist/runtime/vector.d.cts +306 -0
  103. package/dist/runtime/vector.d.ts +306 -0
  104. package/dist/runtime/vector.iife.js +2 -0
  105. package/dist/runtime/vector.iife.js.map +1 -0
  106. package/dist/runtime/vector.js +692 -0
  107. package/dist/runtime/vector.js.map +1 -0
  108. package/dist/runtime.cjs +3 -3
  109. package/dist/runtime.d.cts +1 -1
  110. package/dist/runtime.d.ts +1 -1
  111. package/dist/runtime.iife.js +1 -1
  112. package/dist/runtime.iife.js.map +1 -1
  113. package/dist/runtime.js +5 -5
  114. package/dist/widgets.umd.js +1 -1
  115. package/dist/widgets.umd.js.map +1 -1
  116. package/docs/ROADMAP.md +2 -2
  117. package/docs/components/README.md +6 -1
  118. package/docs/components/usa-lottie-player.md +60 -0
  119. package/docs/components/usa-motion-prompt.md +32 -0
  120. package/docs/components/usa-physics-playground.md +63 -0
  121. package/docs/components/usa-rive.md +57 -0
  122. package/docs/components/usa-token-editor.md +32 -0
  123. package/docs/components.md +116 -0
  124. package/docs/runtime/format-scene.md +59 -0
  125. package/docs/runtime/physics.md +61 -0
  126. package/docs/runtime/rive.md +55 -0
  127. package/docs/runtime/vector.md +67 -0
  128. package/package.json +46 -2
@@ -3,7 +3,7 @@
3
3
  "format": "motionary/components",
4
4
  "schemaVersion": 1,
5
5
  "package": "motionary",
6
- "version": "10.5.0",
6
+ "version": "10.7.0",
7
7
  "homepage": "https://harrisoncn.github.io/Motionary/",
8
8
  "llms": "https://harrisoncn.github.io/Motionary/llms.txt",
9
9
  "cdn": {
@@ -977,6 +977,305 @@
977
977
  ]
978
978
  ],
979
979
  "example": "import { use } from 'motionary/runtime';\nimport { gl, Scene } from 'motionary/runtime/gl';\nimport { formatObj, loadObj } from 'motionary/runtime/format-obj';\nuse(gl, formatObj);\nconst cube = await loadObj('/models/cube.obj'); // + cube.mtl + textures next to it\nnew Scene().add(cube);"
980
+ },
981
+ {
982
+ "kind": "runtime",
983
+ "id": "vector",
984
+ "label": "motionary/runtime/vector",
985
+ "title": "Lottie + dotLottie player",
986
+ "summary": "Plays Lottie (bodymovin JSON) and dotLottie (.lottie) files on Canvas 2D with Motionary’s own renderer (no lottie-web code): shapes, gradients, trim paths, masks, track mattes, precomps, images; a runtime timeline you can seek, reverse and scrub.",
987
+ "install": "npm i motionary",
988
+ "importPath": "motionary/runtime/vector",
989
+ "import": "import { use } from 'motionary/runtime';\nimport { vector } from 'motionary/runtime/vector';",
990
+ "register": "use(vector);",
991
+ "cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/vector.iife.js\"></script>",
992
+ "cdnEsm": "https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/vector.js",
993
+ "order": "Register the core first, then the module: use(vector) also registers the core. CDN: load runtime.iife.js, then runtime/vector.iife.js (it registers itself).",
994
+ "docs": "docs/runtime/vector.md",
995
+ "budget": 12288,
996
+ "exports": [
997
+ "vector",
998
+ "loadLottie",
999
+ "parseDotLottie",
1000
+ "unzipEntries",
1001
+ "lottiePlayer",
1002
+ "renderLottieFrame",
1003
+ "inspectLottie",
1004
+ "propValue",
1005
+ "transformAt",
1006
+ "trimContours",
1007
+ "loadLottieImages"
1008
+ ],
1009
+ "compat": [
1010
+ [
1011
+ "shape, solid, null, image and precomp layers; parenting; in / out points",
1012
+ "yes",
1013
+ "precomp time stretch + time remap"
1014
+ ],
1015
+ [
1016
+ "transforms: anchor, position (split X / Y, spatial bezier), scale, rotation, skew, opacity",
1017
+ "yes",
1018
+ ""
1019
+ ],
1020
+ [
1021
+ "paths, rectangles (rounded), ellipses, stars / polygons, groups",
1022
+ "yes",
1023
+ ""
1024
+ ],
1025
+ [
1026
+ "fills (non-zero / even-odd), strokes (caps, joins, dashes)",
1027
+ "yes",
1028
+ ""
1029
+ ],
1030
+ [
1031
+ "linear + radial gradient fills / strokes",
1032
+ "yes",
1033
+ "highlight length / angle ignored"
1034
+ ],
1035
+ [
1036
+ "trim paths (individually / simultaneously)",
1037
+ "yes",
1038
+ ""
1039
+ ],
1040
+ [
1041
+ "masks: add, subtract, intersect, inverted, opacity",
1042
+ "yes",
1043
+ ""
1044
+ ],
1045
+ [
1046
+ "track mattes: alpha, alpha inverted",
1047
+ "yes",
1048
+ "luma mattes approximated by alpha"
1049
+ ],
1050
+ [
1051
+ "keyframes: per-dimension bezier easing, hold keyframes, v4 + v5 files",
1052
+ "yes",
1053
+ ""
1054
+ ],
1055
+ [
1056
+ "dotLottie (.lottie): stored + deflate entries, manifest v1 / v2, several animations, embedded images",
1057
+ "yes",
1058
+ "deflate needs the native DecompressionStream"
1059
+ ],
1060
+ [
1061
+ "markers → named segments",
1062
+ "yes",
1063
+ ""
1064
+ ],
1065
+ [
1066
+ "text layers, expressions",
1067
+ "no",
1068
+ "planned for 10.8 (subset)"
1069
+ ],
1070
+ [
1071
+ "3D layers, layer effects, merge paths, repeaters",
1072
+ "no",
1073
+ "listed by inspectLottie() / el.unsupported"
1074
+ ],
1075
+ [
1076
+ "dotLottie themes / state machines",
1077
+ "no",
1078
+ "planned for 10.9 (subset)"
1079
+ ],
1080
+ [
1081
+ "SSR / workers",
1082
+ "partial",
1083
+ "parsing + unzip are pure; rendering needs a 2D canvas (OffscreenCanvas works)"
1084
+ ]
1085
+ ],
1086
+ "example": "import { use } from 'motionary/runtime';\nimport { vector, loadLottie, lottiePlayer } from 'motionary/runtime/vector';\nuse(vector);\nconst { animation } = await loadLottie('/anim/hero.lottie');\nconst player = lottiePlayer(canvas, animation, { loop: true });\nplayer.play();"
1087
+ },
1088
+ {
1089
+ "kind": "peer",
1090
+ "id": "rive",
1091
+ "label": "@rive-app/canvas",
1092
+ "title": "Official Rive runtime",
1093
+ "summary": "The official MIT-licensed Rive runtime, used by <usa-rive> to play .riv files (artboards, animations, state machines with inputs). Optional peer dependency: lazy-loaded on first use, never bundled into Motionary.",
1094
+ "install": "npm i @rive-app/canvas",
1095
+ "importPath": "@rive-app/canvas",
1096
+ "import": "import { provideRiveRuntime } from 'motionary/components/widgets';",
1097
+ "register": "provideRiveRuntime(() => import('@rive-app/canvas')); // lazy: fetched when the first <usa-rive> mounts",
1098
+ "cdn": "<script src=\"https://unpkg.com/@rive-app/canvas@2.44.1/rive.js\"></script>",
1099
+ "cdnEsm": "https://cdn.jsdelivr.net/npm/@rive-app/canvas@2.44.1/+esm",
1100
+ "order": "Install the official runtime next to motionary, then hand <usa-rive> a lazy loader with provideRiveRuntime(() => import('@rive-app/canvas')) before the element mounts — your bundler splits the runtime into its own chunk, fetched only when the first <usa-rive> appears. Without a bundler: load the official rive.js from a CDN before the component bundles (window.rive), use an import map, or set runtime-src on the element. Missing → a clear message in place + usa:runtime-missing.",
1101
+ "why": ".riv is Rive’s proprietary binary format with a state-machine runtime; the official runtime is the only faithful player, so Motionary does not reimplement it",
1102
+ "docs": "docs/runtime/rive.md",
1103
+ "budget": 0,
1104
+ "exports": [
1105
+ "provideRiveRuntime",
1106
+ "loadRiveRuntime",
1107
+ "RIVE_PEER",
1108
+ "RIVE_CDN"
1109
+ ],
1110
+ "compat": [
1111
+ [
1112
+ ".riv files: artboards, linear animations",
1113
+ "yes",
1114
+ "played by the official runtime"
1115
+ ],
1116
+ [
1117
+ "state machines + inputs (boolean, number, trigger)",
1118
+ "yes",
1119
+ "el.input(name)"
1120
+ ],
1121
+ [
1122
+ "fit: contain, cover, fill, fitWidth, fitHeight, none",
1123
+ "yes",
1124
+ ""
1125
+ ],
1126
+ [
1127
+ "lazy loading, clear error when the runtime is missing",
1128
+ "yes",
1129
+ "usa:runtime-missing"
1130
+ ],
1131
+ [
1132
+ "reduced motion",
1133
+ "yes",
1134
+ "no autoplay (first frame)"
1135
+ ],
1136
+ [
1137
+ "WebGL2 renderer (@rive-app/webgl2)",
1138
+ "partial",
1139
+ "pass its URL as runtime-src or provideRiveRuntime(() => import('@rive-app/webgl2'))"
1140
+ ],
1141
+ [
1142
+ "SSR",
1143
+ "yes",
1144
+ "nothing loads until the element mounts in a browser"
1145
+ ]
1146
+ ],
1147
+ "example": "// npm i @rive-app/canvas\nimport { defineRive } from 'motionary/components/widgets';\ndefineRive();\n// <usa-rive src=\"/anim/icon.riv\" state-machine=\"State Machine 1\" autoplay></usa-rive>"
1148
+ },
1149
+ {
1150
+ "kind": "runtime",
1151
+ "id": "physics",
1152
+ "label": "motionary/runtime/physics",
1153
+ "title": "2D rigid-body physics",
1154
+ "summary": "A small 2D rigid-body engine written for Motionary (own implementation and API — no Matter.js / Box2D code): circles, boxes and convex polygons, mass from density, restitution, friction, sensors, collision groups, sleeping, distance / spring / pin constraints, pointer drag, a fixed time step on the shared ticker.",
1155
+ "install": "npm i motionary",
1156
+ "importPath": "motionary/runtime/physics",
1157
+ "import": "import { use } from 'motionary/runtime';\nimport { physics } from 'motionary/runtime/physics';",
1158
+ "register": "use(physics);",
1159
+ "cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/physics.iife.js\"></script>",
1160
+ "cdnEsm": "https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/physics.js",
1161
+ "order": "Register the core first, then the module: use(physics) also registers the core. CDN: load runtime.iife.js, then runtime/physics.iife.js (it registers itself).",
1162
+ "docs": "docs/runtime/physics.md",
1163
+ "budget": 10240,
1164
+ "exports": [
1165
+ "physics",
1166
+ "createWorld",
1167
+ "World",
1168
+ "Body",
1169
+ "Constraint",
1170
+ "collide",
1171
+ "dragConstraint"
1172
+ ],
1173
+ "compat": [
1174
+ [
1175
+ "bodies: circle, box, convex polygon (any winding, made convex)",
1176
+ "yes",
1177
+ "concave shapes: split them into convex parts"
1178
+ ],
1179
+ [
1180
+ "static, dynamic and kinematic bodies; density / mass, inertia, fixed rotation",
1181
+ "yes",
1182
+ ""
1183
+ ],
1184
+ [
1185
+ "collisions: sort-and-sweep broad phase, SAT narrow phase, up to 2 contact points",
1186
+ "yes",
1187
+ "no continuous collision detection: very fast small bodies can tunnel"
1188
+ ],
1189
+ [
1190
+ "restitution, Coulomb friction, warm-started accumulated impulses",
1191
+ "yes",
1192
+ ""
1193
+ ],
1194
+ [
1195
+ "constraints: distance (rigid or spring with stiffness / damping), pin, pointer drag",
1196
+ "yes",
1197
+ "no revolute motors / joint limits"
1198
+ ],
1199
+ [
1200
+ "sensors, collision categories / masks, collision events, sleeping",
1201
+ "yes",
1202
+ ""
1203
+ ],
1204
+ [
1205
+ "fixed time step + accumulator (same result at any frame rate)",
1206
+ "yes",
1207
+ ""
1208
+ ],
1209
+ [
1210
+ "SSR / workers",
1211
+ "yes",
1212
+ "pure maths; world.run() needs the runtime ticker"
1213
+ ]
1214
+ ],
1215
+ "example": "import { use } from 'motionary/runtime';\nimport { physics, createWorld } from 'motionary/runtime/physics';\nuse(physics);\nconst world = createWorld({ gravity: [0, 980] });\nworld.bounds(600, 400);\nconst ball = world.body({ shape: 'circle', x: 300, y: 40, radius: 20, restitution: 0.7 });\nworld.run(); // steps on the shared ticker"
1216
+ },
1217
+ {
1218
+ "kind": "runtime",
1219
+ "id": "format-scene",
1220
+ "label": "motionary/runtime/format-scene",
1221
+ "title": "Scene JSON (motionary-scene@1)",
1222
+ "summary": "The versioned motionary-scene@1 format: a JSON description of a 2D physics scene (world, named materials, bodies, constraints, per-body style) — validate, migrate older drafts, load into a physics world and save one back.",
1223
+ "install": "npm i motionary",
1224
+ "importPath": "motionary/runtime/format-scene",
1225
+ "import": "import { use } from 'motionary/runtime';\nimport { formatScene } from 'motionary/runtime/format-scene';",
1226
+ "register": "use(formatScene);",
1227
+ "cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-scene.iife.js\"></script>",
1228
+ "cdnEsm": "https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-scene.js",
1229
+ "order": "Register the core first, then the module: use(formatScene) also registers the core. CDN: load runtime.iife.js, then runtime/format-scene.iife.js (it registers itself).",
1230
+ "docs": "docs/runtime/format-scene.md",
1231
+ "budget": 3072,
1232
+ "exports": [
1233
+ "formatScene",
1234
+ "SCENE_FORMAT",
1235
+ "migrateScene",
1236
+ "validateScene",
1237
+ "parseScene",
1238
+ "sceneToWorld",
1239
+ "worldToScene"
1240
+ ],
1241
+ "compat": [
1242
+ [
1243
+ "world: size, gravity, walls (with or without a top), solver iterations",
1244
+ "yes",
1245
+ ""
1246
+ ],
1247
+ [
1248
+ "named materials (restitution, friction, density), per-body overrides",
1249
+ "yes",
1250
+ ""
1251
+ ],
1252
+ [
1253
+ "bodies: circle / box / polygon, static / kinematic, velocity, angle, sensor, style",
1254
+ "yes",
1255
+ ""
1256
+ ],
1257
+ [
1258
+ "constraints: distance / spring / pin between bodies or to a world point",
1259
+ "yes",
1260
+ ""
1261
+ ],
1262
+ [
1263
+ "validation (lists every problem, never throws) + parseScene (throws one error)",
1264
+ "yes",
1265
+ ""
1266
+ ],
1267
+ [
1268
+ "migration: unversioned scenes and the motionary-scene@0 draft → @1, with a change list",
1269
+ "yes",
1270
+ ""
1271
+ ],
1272
+ [
1273
+ "save: worldToScene() (walls made by bounds() are left out)",
1274
+ "yes",
1275
+ ""
1276
+ ]
1277
+ ],
1278
+ "example": "import { use } from 'motionary/runtime';\nimport { physics } from 'motionary/runtime/physics';\nimport { formatScene, sceneToWorld } from 'motionary/runtime/format-scene';\nuse(physics, formatScene);\nconst { world, bodies } = sceneToWorld(await (await fetch('/scenes/stack.json')).json());\nworld.run();"
980
1279
  }
981
1280
  ],
982
1281
  "components": [
@@ -4612,6 +4911,75 @@
4612
4911
  "prerequisites": null,
4613
4912
  "source": "src/components/widgets/lottie-icon.ts"
4614
4913
  },
4914
+ {
4915
+ "id": "lottie-player",
4916
+ "tag": "usa-lottie-player",
4917
+ "title": "Lottie player (JSON + dotLottie)",
4918
+ "description": "10.6: plays Lottie JSON and dotLottie (.lottie) files with Motionary’s own Canvas 2D renderer — shapes, gradients, trim paths, masks, track mattes, precomps and images; autoplay, loop, bounce, segments / markers, play on hover or scrub with scroll. Requires motionary/runtime/vector — npm i motionary, then use(vector) before it mounts.",
4919
+ "category": "ui",
4920
+ "since": "10.6",
4921
+ "keywords": [
4922
+ "lottie",
4923
+ "dotlottie",
4924
+ "bodymovin",
4925
+ "vector animation",
4926
+ "player",
4927
+ "runtime"
4928
+ ],
4929
+ "import": {
4930
+ "path": "motionary/components/widgets",
4931
+ "define": "defineLottiePlayer",
4932
+ "register": "defineLottiePlayer();"
4933
+ },
4934
+ "cdn": "https://unpkg.com/motionary@10/dist/widgets.umd.js",
4935
+ "attributes": [
4936
+ "src",
4937
+ "animation",
4938
+ "autoplay",
4939
+ "loop",
4940
+ "speed",
4941
+ "mode",
4942
+ "segment",
4943
+ "hover",
4944
+ "scrub",
4945
+ "fit",
4946
+ "background",
4947
+ "label"
4948
+ ],
4949
+ "events": [
4950
+ "usa:complete",
4951
+ "usa:load",
4952
+ "usa:error",
4953
+ "usa:runtime-missing"
4954
+ ],
4955
+ "slots": [],
4956
+ "methods": [
4957
+ "play",
4958
+ "pause",
4959
+ "stop",
4960
+ "seek"
4961
+ ],
4962
+ "example": "<usa-lottie-player src=\"/anim/hero.lottie\" autoplay loop label=\"Hero animation\"></usa-lottie-player>",
4963
+ "esm": "import { use } from 'motionary/runtime';\nimport { vector } from 'motionary/runtime/vector';\n\nuse(vector);\nimport { defineLottiePlayer } from 'motionary/components/widgets';\n\ndefineLottiePlayer(); // registers <usa-lottie-player>\n\n/* then use it in your HTML:\n<usa-lottie-player src=\"/anim/hero.lottie\" autoplay loop label=\"Hero animation\"></usa-lottie-player>\n*/",
4964
+ "requires": [
4965
+ "vector"
4966
+ ],
4967
+ "prerequisites": {
4968
+ "badge": "Requires: motionary/runtime/vector",
4969
+ "modules": [
4970
+ "motionary/runtime/vector"
4971
+ ],
4972
+ "install": "npm i motionary",
4973
+ "importAndRegister": "import { use } from 'motionary/runtime';\nimport { vector } from 'motionary/runtime/vector';\nimport { defineLottiePlayer } from 'motionary/components/widgets';\n\nuse(vector);\ndefineLottiePlayer(); // registers <usa-lottie-player> — after the prerequisites",
4974
+ "order": "Register the core first, then the module: use(vector) also registers the core. CDN: load runtime.iife.js, then runtime/vector.iife.js (it registers itself).",
4975
+ "cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/vector.iife.js\"></script>\n<!-- then the component bundles -->\n<script src=\"https://unpkg.com/motionary@10/dist/components.umd.js\"></script>\n<script src=\"https://unpkg.com/motionary@10/dist/widgets.umd.js\"></script>",
4976
+ "example": "<usa-lottie-player src=\"/anim/hero.lottie\" autoplay loop label=\"Hero animation\"></usa-lottie-player>",
4977
+ "docs": [
4978
+ "https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/vector.md"
4979
+ ]
4980
+ },
4981
+ "source": "src/components/widgets/lottie-player.ts"
4982
+ },
4615
4983
  {
4616
4984
  "id": "lyrics",
4617
4985
  "tag": "usa-lyrics",
@@ -5137,6 +5505,47 @@
5137
5505
  "prerequisites": null,
5138
5506
  "source": "src/components/widgets/motion-prefs.ts"
5139
5507
  },
5508
+ {
5509
+ "id": "motion-prompt",
5510
+ "tag": "usa-motion-prompt",
5511
+ "title": "Motion prompt (text → motion)",
5512
+ "description": "10.7 (AI-assisted motion): describe a motion in English or Chinese and get a live preview plus ready code — Web Animations, CSS (with a reduced-motion guard) or a Motionary component. A small deterministic parser (motionary/components/ai), no model and no network; the same parser powers suggest_motion in motionary-mcp 2.0.",
5513
+ "category": "ui",
5514
+ "since": "10.7",
5515
+ "keywords": [
5516
+ "ai",
5517
+ "natural language",
5518
+ "prompt",
5519
+ "motion spec",
5520
+ "code generator",
5521
+ "mcp"
5522
+ ],
5523
+ "import": {
5524
+ "path": "motionary/components/widgets",
5525
+ "define": "defineMotionPrompt",
5526
+ "register": "defineMotionPrompt();"
5527
+ },
5528
+ "cdn": "https://unpkg.com/motionary@10/dist/widgets.umd.js",
5529
+ "attributes": [
5530
+ "value",
5531
+ "format",
5532
+ "placeholder",
5533
+ "label"
5534
+ ],
5535
+ "events": [
5536
+ "usa:suggest",
5537
+ "usa:copy"
5538
+ ],
5539
+ "slots": [],
5540
+ "methods": [
5541
+ "suggest"
5542
+ ],
5543
+ "example": "<usa-motion-prompt value=\"fade the cards up slowly, one after another\"></usa-motion-prompt>",
5544
+ "esm": "import { defineMotionPrompt } from 'motionary/components/widgets';\n\ndefineMotionPrompt(); // registers <usa-motion-prompt>\n\n/* then use it in your HTML:\n<usa-motion-prompt value=\"fade the cards up slowly, one after another\"></usa-motion-prompt>\n*/",
5545
+ "requires": [],
5546
+ "prerequisites": null,
5547
+ "source": "src/components/widgets/motion-prompt.ts"
5548
+ },
5140
5549
  {
5141
5550
  "id": "motion-spec",
5142
5551
  "tag": "usa-motion-spec",
@@ -5852,6 +6261,71 @@
5852
6261
  "prerequisites": null,
5853
6262
  "source": "src/components/widgets/perf-monitor.ts"
5854
6263
  },
6264
+ {
6265
+ "id": "physics-playground",
6266
+ "tag": "usa-physics-playground",
6267
+ "title": "Physics playground",
6268
+ "description": "10.7: a 2D rigid-body sandbox on Motionary’s own physics engine — circles, boxes and polygons, friction, restitution, constraints, sleeping — loaded from a versioned motionary-scene@1 JSON (or a preset: balls, pyramid, pendulum, dominoes). Drag bodies, tap to spawn, arrow keys nudge. Requires motionary/runtime/physics + motionary/runtime/format-scene — npm i motionary, then use(physics, formatScene) before it mounts.",
6269
+ "category": "ui",
6270
+ "since": "10.7",
6271
+ "keywords": [
6272
+ "physics",
6273
+ "rigid body",
6274
+ "gravity",
6275
+ "collision",
6276
+ "scene json",
6277
+ "runtime"
6278
+ ],
6279
+ "import": {
6280
+ "path": "motionary/components/widgets",
6281
+ "define": "definePhysicsPlayground",
6282
+ "register": "definePhysicsPlayground();"
6283
+ },
6284
+ "cdn": "https://unpkg.com/motionary@10/dist/widgets.umd.js",
6285
+ "attributes": [
6286
+ "preset",
6287
+ "src",
6288
+ "gravity",
6289
+ "spawn",
6290
+ "label"
6291
+ ],
6292
+ "events": [
6293
+ "usa:collision",
6294
+ "usa:load",
6295
+ "usa:error",
6296
+ "usa:runtime-missing"
6297
+ ],
6298
+ "slots": [],
6299
+ "methods": [
6300
+ "reset",
6301
+ "play",
6302
+ "pause",
6303
+ "toScene"
6304
+ ],
6305
+ "example": "<usa-physics-playground preset=\"pyramid\" spawn label=\"Knock the pyramid over\"></usa-physics-playground>",
6306
+ "esm": "import { use } from 'motionary/runtime';\nimport { physics } from 'motionary/runtime/physics';\nimport { formatScene } from 'motionary/runtime/format-scene';\n\nuse(physics, formatScene);\nimport { definePhysicsPlayground } from 'motionary/components/widgets';\n\ndefinePhysicsPlayground(); // registers <usa-physics-playground>\n\n/* then use it in your HTML:\n<usa-physics-playground preset=\"pyramid\" spawn label=\"Knock the pyramid over\"></usa-physics-playground>\n*/",
6307
+ "requires": [
6308
+ "physics",
6309
+ "format-scene"
6310
+ ],
6311
+ "prerequisites": {
6312
+ "badge": "Requires: motionary/runtime/physics + motionary/runtime/format-scene",
6313
+ "modules": [
6314
+ "motionary/runtime/physics",
6315
+ "motionary/runtime/format-scene"
6316
+ ],
6317
+ "install": "npm i motionary",
6318
+ "importAndRegister": "import { use } from 'motionary/runtime';\nimport { physics } from 'motionary/runtime/physics';\nimport { formatScene } from 'motionary/runtime/format-scene';\nimport { definePhysicsPlayground } from 'motionary/components/widgets';\n\nuse(physics, formatScene);\ndefinePhysicsPlayground(); // registers <usa-physics-playground> — after the prerequisites",
6319
+ "order": "Register the core first, then the module: use(physics) also registers the core. CDN: load runtime.iife.js, then runtime/physics.iife.js (it registers itself). Register the core first, then the module: use(formatScene) also registers the core. CDN: load runtime.iife.js, then runtime/format-scene.iife.js (it registers itself).",
6320
+ "cdn": "<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/physics.iife.js\"></script>\n<script src=\"https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/format-scene.iife.js\"></script>\n<!-- then the component bundles -->\n<script src=\"https://unpkg.com/motionary@10/dist/components.umd.js\"></script>\n<script src=\"https://unpkg.com/motionary@10/dist/widgets.umd.js\"></script>",
6321
+ "example": "<usa-physics-playground preset=\"pyramid\" spawn label=\"Knock the pyramid over\"></usa-physics-playground>",
6322
+ "docs": [
6323
+ "https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/physics.md",
6324
+ "https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/format-scene.md"
6325
+ ]
6326
+ },
6327
+ "source": "src/components/widgets/physics-playground.ts"
6328
+ },
5855
6329
  {
5856
6330
  "id": "pinch-zoom",
5857
6331
  "tag": "usa-pinch-zoom",
@@ -6602,6 +7076,69 @@
6602
7076
  "prerequisites": null,
6603
7077
  "source": "src/components/interaction/ripple.ts"
6604
7078
  },
7079
+ {
7080
+ "id": "rive",
7081
+ "tag": "usa-rive",
7082
+ "title": "Rive player (official runtime)",
7083
+ "description": "10.6: plays Rive (.riv) files — artboards, animations and state machines with inputs — through the official Rive runtime @rive-app/canvas, an optional peer dependency that is lazy-loaded on first use (Motionary does not reimplement the proprietary .riv format). Requires @rive-app/canvas — npm i @rive-app/canvas, or load its CDN script first; missing → a clear message in place.",
7084
+ "category": "ui",
7085
+ "since": "10.6",
7086
+ "keywords": [
7087
+ "rive",
7088
+ "riv",
7089
+ "state machine",
7090
+ "interactive animation",
7091
+ "official runtime",
7092
+ "peer"
7093
+ ],
7094
+ "import": {
7095
+ "path": "motionary/components/widgets",
7096
+ "define": "defineRive",
7097
+ "register": "defineRive();"
7098
+ },
7099
+ "cdn": "https://unpkg.com/motionary@10/dist/widgets.umd.js",
7100
+ "attributes": [
7101
+ "src",
7102
+ "artboard",
7103
+ "animation",
7104
+ "state-machine",
7105
+ "autoplay",
7106
+ "fit",
7107
+ "label",
7108
+ "runtime-src"
7109
+ ],
7110
+ "events": [
7111
+ "usa:load",
7112
+ "usa:error",
7113
+ "usa:runtime-missing"
7114
+ ],
7115
+ "slots": [],
7116
+ "methods": [
7117
+ "play",
7118
+ "pause",
7119
+ "input"
7120
+ ],
7121
+ "example": "<usa-rive src=\"/anim/icon.riv\" state-machine=\"State Machine 1\" autoplay label=\"Icon\"></usa-rive>",
7122
+ "esm": "import { provideRiveRuntime } from 'motionary/components/widgets';\n\nprovideRiveRuntime(() => import('@rive-app/canvas')); // lazy: fetched when the first <usa-rive> mounts\nimport { defineRive } from 'motionary/components/widgets';\n\ndefineRive(); // registers <usa-rive>\n\n/* then use it in your HTML:\n<usa-rive src=\"/anim/icon.riv\" state-machine=\"State Machine 1\" autoplay label=\"Icon\"></usa-rive>\n*/",
7123
+ "requires": [
7124
+ "rive"
7125
+ ],
7126
+ "prerequisites": {
7127
+ "badge": "Requires: @rive-app/canvas",
7128
+ "modules": [
7129
+ "@rive-app/canvas"
7130
+ ],
7131
+ "install": "npm i @rive-app/canvas",
7132
+ "importAndRegister": "import { provideRiveRuntime } from 'motionary/components/widgets';\nimport { defineRive } from 'motionary/components/widgets';\n\nprovideRiveRuntime(() => import('@rive-app/canvas')); // lazy: fetched when the first <usa-rive> mounts\ndefineRive(); // registers <usa-rive> — after the prerequisites",
7133
+ "order": "Install the official runtime next to motionary, then hand <usa-rive> a lazy loader with provideRiveRuntime(() => import('@rive-app/canvas')) before the element mounts — your bundler splits the runtime into its own chunk, fetched only when the first <usa-rive> appears. Without a bundler: load the official rive.js from a CDN before the component bundles (window.rive), use an import map, or set runtime-src on the element. Missing → a clear message in place + usa:runtime-missing.",
7134
+ "cdn": "<script src=\"https://unpkg.com/@rive-app/canvas@2.44.1/rive.js\"></script>\n<!-- then the component bundles -->\n<script src=\"https://unpkg.com/motionary@10/dist/components.umd.js\"></script>\n<script src=\"https://unpkg.com/motionary@10/dist/widgets.umd.js\"></script>",
7135
+ "example": "<usa-rive src=\"/anim/icon.riv\" state-machine=\"State Machine 1\" autoplay label=\"Icon\"></usa-rive>",
7136
+ "docs": [
7137
+ "https://github.com/HarrisonCN/Motionary/blob/main/docs/runtime/rive.md"
7138
+ ]
7139
+ },
7140
+ "source": "src/components/widgets/rive.ts"
7141
+ },
6605
7142
  {
6606
7143
  "id": "route-transition",
6607
7144
  "tag": "usa-route-transition",
@@ -8469,6 +9006,48 @@
8469
9006
  "prerequisites": null,
8470
9007
  "source": "src/components/feedback/toast.ts"
8471
9008
  },
9009
+ {
9010
+ "id": "token-editor",
9011
+ "tag": "usa-token-editor",
9012
+ "title": "Motion token editor (W3C DTCG)",
9013
+ "description": "10.6 (motion design tokens 2.0): edit duration and cubic-bézier easing tokens with a live preview per token, then export W3C Design Tokens (DTCG 2025.10 or the earlier draft) or import a DTCG file — aliases resolved, problems listed; apply writes the tokens to :root custom properties as you edit.",
9014
+ "category": "ui",
9015
+ "since": "10.6",
9016
+ "keywords": [
9017
+ "design tokens",
9018
+ "dtcg",
9019
+ "w3c",
9020
+ "motion tokens",
9021
+ "easing",
9022
+ "duration"
9023
+ ],
9024
+ "import": {
9025
+ "path": "motionary/components/widgets",
9026
+ "define": "defineTokenEditor",
9027
+ "register": "defineTokenEditor();"
9028
+ },
9029
+ "cdn": "https://unpkg.com/motionary@10/dist/widgets.umd.js",
9030
+ "attributes": [
9031
+ "apply",
9032
+ "format",
9033
+ "groups"
9034
+ ],
9035
+ "events": [
9036
+ "usa:export",
9037
+ "usa:import",
9038
+ "usa:change"
9039
+ ],
9040
+ "slots": [],
9041
+ "methods": [
9042
+ "exportJSON",
9043
+ "importJSON"
9044
+ ],
9045
+ "example": "<usa-token-editor apply format=\"2025.10\"></usa-token-editor>",
9046
+ "esm": "import { defineTokenEditor } from 'motionary/components/widgets';\n\ndefineTokenEditor(); // registers <usa-token-editor>\n\n/* then use it in your HTML:\n<usa-token-editor apply format=\"2025.10\"></usa-token-editor>\n*/",
9047
+ "requires": [],
9048
+ "prerequisites": null,
9049
+ "source": "src/components/widgets/token-editor.ts"
9050
+ },
8472
9051
  {
8473
9052
  "id": "typewriter",
8474
9053
  "tag": "usa-typewriter",
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var registry = require('../chunks/registry-VhfPSI0v.cjs');
4
- var animImage = require('../chunks/anim-image-DuxvYhq6.cjs');
5
- require('../chunks/tween-_BGIl6hK.cjs');
6
- require('../chunks/ticker-DvmC6WLS.cjs');
3
+ var registry = require('../chunks/registry-DhKZCitb.cjs');
4
+ var animImage = require('../chunks/anim-image-CFGpUX7t.cjs');
5
+ require('../chunks/tween-Dk0QmNe9.cjs');
6
+ require('../chunks/ticker-jD9_A9Rh.cjs');
7
7
  require('../chunks/ease-HwYZnZat.cjs');
8
8
 
9
9
  /**
@@ -1,7 +1,7 @@
1
- import { R as RUNTIME_VERSION } from '../chunks/registry-DXdFb2fJ.js';
2
- import { a as animatedImagePlayer, b as browserDecode, c as composeFrames, d as bytesOf, u as u8, f as fixDelay, e as crc32 } from '../chunks/anim-image-BlNPv4JG.js';
3
- import '../chunks/tween-CPtm-EdT.js';
4
- import '../chunks/ticker-C5RMHMW7.js';
1
+ import { R as RUNTIME_VERSION } from '../chunks/registry-D87dP_aR.js';
2
+ import { a as animatedImagePlayer, b as browserDecode, c as composeFrames, d as bytesOf, u as u8, f as fixDelay, e as crc32 } from '../chunks/anim-image-CXDD19FH.js';
3
+ import '../chunks/tween-_Lld1MsF.js';
4
+ import '../chunks/ticker-CJYI5Pxc.js';
5
5
  import '../chunks/ease-XN8_0sXu.js';
6
6
 
7
7
  /**