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.
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +28 -0
- package/README.md +95 -1
- package/bin/motionary-mcp.mjs +160 -11
- package/dist/chunks/{anim-image-DuxvYhq6.cjs → anim-image-CFGpUX7t.cjs} +2 -2
- package/dist/chunks/{anim-image-DuxvYhq6.cjs.map → anim-image-CFGpUX7t.cjs.map} +1 -1
- package/dist/chunks/{anim-image-BlNPv4JG.js → anim-image-CXDD19FH.js} +2 -2
- package/dist/chunks/{anim-image-BlNPv4JG.js.map → anim-image-CXDD19FH.js.map} +1 -1
- package/dist/chunks/{keyframes-Ce1s05n3.cjs → keyframes-DdwGY1gr.cjs} +2 -2
- package/dist/chunks/{keyframes-Ce1s05n3.cjs.map → keyframes-DdwGY1gr.cjs.map} +1 -1
- package/dist/chunks/{keyframes-B8ITIAVa.js → keyframes-DwR6GPej.js} +2 -2
- package/dist/chunks/{keyframes-B8ITIAVa.js.map → keyframes-DwR6GPej.js.map} +1 -1
- package/dist/chunks/{registry-DXdFb2fJ.js → registry-D87dP_aR.js} +3 -3
- package/dist/chunks/{registry-DXdFb2fJ.js.map → registry-D87dP_aR.js.map} +1 -1
- package/dist/chunks/{registry-VhfPSI0v.cjs → registry-DhKZCitb.cjs} +2 -2
- package/dist/chunks/{registry-VhfPSI0v.cjs.map → registry-DhKZCitb.cjs.map} +1 -1
- package/dist/chunks/{ticker-C5RMHMW7.js → ticker-CJYI5Pxc.js} +2 -2
- package/dist/chunks/{ticker-C5RMHMW7.js.map → ticker-CJYI5Pxc.js.map} +1 -1
- package/dist/chunks/{ticker-DvmC6WLS.cjs → ticker-jD9_A9Rh.cjs} +2 -2
- package/dist/chunks/{ticker-DvmC6WLS.cjs.map → ticker-jD9_A9Rh.cjs.map} +1 -1
- package/dist/chunks/{tween-_BGIl6hK.cjs → tween-Dk0QmNe9.cjs} +2 -2
- package/dist/chunks/{tween-_BGIl6hK.cjs.map → tween-Dk0QmNe9.cjs.map} +1 -1
- package/dist/chunks/{tween-CPtm-EdT.js → tween-_Lld1MsF.js} +2 -2
- package/dist/chunks/{tween-CPtm-EdT.js.map → tween-_Lld1MsF.js.map} +1 -1
- package/dist/components/ai.cjs +314 -0
- package/dist/components/ai.cjs.map +1 -0
- package/dist/components/ai.d.cts +58 -0
- package/dist/components/ai.d.ts +58 -0
- package/dist/components/ai.js +311 -0
- package/dist/components/ai.js.map +1 -0
- package/dist/components/lite.cjs +179 -0
- package/dist/components/lite.cjs.map +1 -1
- package/dist/components/lite.js +176 -1
- package/dist/components/lite.js.map +1 -1
- package/dist/components/tokens.cjs +179 -0
- package/dist/components/tokens.cjs.map +1 -1
- package/dist/components/tokens.d.cts +36 -1
- package/dist/components/tokens.d.ts +36 -1
- package/dist/components/tokens.js +176 -1
- package/dist/components/tokens.js.map +1 -1
- package/dist/components/widgets.cjs +985 -221
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +606 -4
- package/dist/components/widgets.d.ts +606 -4
- package/dist/components/widgets.js +976 -222
- package/dist/components/widgets.js.map +1 -1
- package/dist/components.cjs +4 -0
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +36 -1
- package/dist/components.d.ts +36 -1
- package/dist/components.js +1 -1
- package/dist/components.umd.js +2 -2
- package/dist/components.umd.js.map +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/llms-full.txt +221 -1
- package/dist/llms.txt +11 -2
- package/dist/manifest.json +580 -1
- package/dist/runtime/format-apng.cjs +4 -4
- package/dist/runtime/format-apng.js +4 -4
- package/dist/runtime/format-css.cjs +4 -4
- package/dist/runtime/format-css.js +4 -4
- package/dist/runtime/format-gif.cjs +4 -4
- package/dist/runtime/format-gif.js +4 -4
- package/dist/runtime/format-gltf.cjs +1 -1
- package/dist/runtime/format-gltf.js +1 -1
- package/dist/runtime/format-motion.cjs +4 -4
- package/dist/runtime/format-motion.js +4 -4
- package/dist/runtime/format-obj.cjs +1 -1
- package/dist/runtime/format-obj.js +1 -1
- package/dist/runtime/format-scene.cjs +241 -0
- package/dist/runtime/format-scene.cjs.map +1 -0
- package/dist/runtime/format-scene.d.cts +349 -0
- package/dist/runtime/format-scene.d.ts +349 -0
- package/dist/runtime/format-scene.iife.js +2 -0
- package/dist/runtime/format-scene.iife.js.map +1 -0
- package/dist/runtime/format-scene.js +233 -0
- package/dist/runtime/format-scene.js.map +1 -0
- package/dist/runtime/format-sprite.cjs +3 -3
- package/dist/runtime/format-sprite.js +3 -3
- package/dist/runtime/format-svg.cjs +3 -3
- package/dist/runtime/format-svg.js +3 -3
- package/dist/runtime/format-webp.cjs +4 -4
- package/dist/runtime/format-webp.js +4 -4
- package/dist/runtime/gl.cjs +1 -1
- package/dist/runtime/gl.js +1 -1
- package/dist/runtime/physics.cjs +739 -0
- package/dist/runtime/physics.cjs.map +1 -0
- package/dist/runtime/physics.d.cts +250 -0
- package/dist/runtime/physics.d.ts +250 -0
- package/dist/runtime/physics.iife.js +2 -0
- package/dist/runtime/physics.iife.js.map +1 -0
- package/dist/runtime/physics.js +731 -0
- package/dist/runtime/physics.js.map +1 -0
- package/dist/runtime/scroll.cjs +2 -2
- package/dist/runtime/scroll.js +2 -2
- package/dist/runtime/smooth.cjs +1 -1
- package/dist/runtime/smooth.js +1 -1
- package/dist/runtime/text.cjs +1 -1
- package/dist/runtime/text.js +1 -1
- package/dist/runtime/vector.cjs +704 -0
- package/dist/runtime/vector.cjs.map +1 -0
- package/dist/runtime/vector.d.cts +306 -0
- package/dist/runtime/vector.d.ts +306 -0
- package/dist/runtime/vector.iife.js +2 -0
- package/dist/runtime/vector.iife.js.map +1 -0
- package/dist/runtime/vector.js +692 -0
- package/dist/runtime/vector.js.map +1 -0
- package/dist/runtime.cjs +3 -3
- package/dist/runtime.d.cts +1 -1
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.iife.js +1 -1
- package/dist/runtime.iife.js.map +1 -1
- package/dist/runtime.js +5 -5
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +2 -2
- package/docs/components/README.md +6 -1
- package/docs/components/usa-lottie-player.md +60 -0
- package/docs/components/usa-motion-prompt.md +32 -0
- package/docs/components/usa-physics-playground.md +63 -0
- package/docs/components/usa-rive.md +57 -0
- package/docs/components/usa-token-editor.md +32 -0
- package/docs/components.md +116 -0
- package/docs/runtime/format-scene.md +59 -0
- package/docs/runtime/physics.md +61 -0
- package/docs/runtime/rive.md +55 -0
- package/docs/runtime/vector.md +67 -0
- package/package.json +46 -2
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# motionary/runtime/vector — Lottie + dotLottie player
|
|
2
|
+
|
|
3
|
+
> Generated from `showcase/catalog/prereqs.js` by `scripts/gen-runtime-docs.mjs` — edit the data, not this page.
|
|
4
|
+
|
|
5
|
+
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.
|
|
6
|
+
|
|
7
|
+
Part of Motionary's own zero-dependency runtime. Size budget: **12.0 KB gzip** (enforced in CI).
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
|
|
11
|
+
1. **Install:** `npm i motionary`
|
|
12
|
+
2. **Import path:** `motionary/runtime/vector`
|
|
13
|
+
3. **CDN:**
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime.iife.js"></script>
|
|
17
|
+
<script src="https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/vector.iife.js"></script>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
ESM from a CDN: `https://cdn.jsdelivr.net/npm/motionary@10/dist/runtime/vector.js`
|
|
21
|
+
|
|
22
|
+
4. **Import order & registration:** 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).
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
import { use } from 'motionary/runtime';
|
|
26
|
+
import { vector } from 'motionary/runtime/vector';
|
|
27
|
+
use(vector);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
import { use } from 'motionary/runtime';
|
|
34
|
+
import { vector, loadLottie, lottiePlayer } from 'motionary/runtime/vector';
|
|
35
|
+
use(vector);
|
|
36
|
+
const { animation } = await loadLottie('/anim/hero.lottie');
|
|
37
|
+
const player = lottiePlayer(canvas, animation, { loop: true });
|
|
38
|
+
player.play();
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Exports
|
|
42
|
+
|
|
43
|
+
`vector` · `loadLottie` · `parseDotLottie` · `unzipEntries` · `lottiePlayer` · `renderLottieFrame` · `inspectLottie` · `propValue` · `transformAt` · `trimContours` · `loadLottieImages`
|
|
44
|
+
|
|
45
|
+
## Compatibility
|
|
46
|
+
|
|
47
|
+
| Feature | Supported | Notes |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| shape, solid, null, image and precomp layers; parenting; in / out points | ✅ yes | precomp time stretch + time remap |
|
|
50
|
+
| transforms: anchor, position (split X / Y, spatial bezier), scale, rotation, skew, opacity | ✅ yes | |
|
|
51
|
+
| paths, rectangles (rounded), ellipses, stars / polygons, groups | ✅ yes | |
|
|
52
|
+
| fills (non-zero / even-odd), strokes (caps, joins, dashes) | ✅ yes | |
|
|
53
|
+
| linear + radial gradient fills / strokes | ✅ yes | highlight length / angle ignored |
|
|
54
|
+
| trim paths (individually / simultaneously) | ✅ yes | |
|
|
55
|
+
| masks: add, subtract, intersect, inverted, opacity | ✅ yes | |
|
|
56
|
+
| track mattes: alpha, alpha inverted | ✅ yes | luma mattes approximated by alpha |
|
|
57
|
+
| keyframes: per-dimension bezier easing, hold keyframes, v4 + v5 files | ✅ yes | |
|
|
58
|
+
| dotLottie (.lottie): stored + deflate entries, manifest v1 / v2, several animations, embedded images | ✅ yes | deflate needs the native DecompressionStream |
|
|
59
|
+
| markers → named segments | ✅ yes | |
|
|
60
|
+
| text layers, expressions | ✕ no | planned for 10.8 (subset) |
|
|
61
|
+
| 3D layers, layer effects, merge paths, repeaters | ✕ no | listed by inspectLottie() / el.unsupported |
|
|
62
|
+
| dotLottie themes / state machines | ✕ no | planned for 10.9 (subset) |
|
|
63
|
+
| SSR / workers | ◐ partial | parsing + unzip are pure; rendering needs a 2D canvas (OffscreenCanvas works) |
|
|
64
|
+
|
|
65
|
+
## Components that need it
|
|
66
|
+
|
|
67
|
+
- `<usa-lottie-player>` — Lottie player (JSON + dotLottie)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motionary",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.7.0",
|
|
4
4
|
"description": "Motionary (formerly use-scroll-animate): dependency-free scroll animations + 94 animated Web Components — 214 scroll-reveal presets, card/click/button morphs, physics, page transitions, generative & sound-reactive backgrounds, cursor/gesture effects, themes, micro-interactions, <usa-player>, WebGL. React, Vue, Svelte, Solid, Angular or plain HTML.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -1198,6 +1198,16 @@
|
|
|
1198
1198
|
"default": "./dist/components/plugins.cjs"
|
|
1199
1199
|
}
|
|
1200
1200
|
},
|
|
1201
|
+
"./components/ai": {
|
|
1202
|
+
"import": {
|
|
1203
|
+
"types": "./dist/components/ai.d.ts",
|
|
1204
|
+
"default": "./dist/components/ai.js"
|
|
1205
|
+
},
|
|
1206
|
+
"require": {
|
|
1207
|
+
"types": "./dist/components/ai.d.cts",
|
|
1208
|
+
"default": "./dist/components/ai.cjs"
|
|
1209
|
+
}
|
|
1210
|
+
},
|
|
1201
1211
|
"./components/lite": {
|
|
1202
1212
|
"import": {
|
|
1203
1213
|
"types": "./dist/components/lite.d.ts",
|
|
@@ -1348,6 +1358,36 @@
|
|
|
1348
1358
|
"default": "./dist/runtime/format-obj.cjs"
|
|
1349
1359
|
}
|
|
1350
1360
|
},
|
|
1361
|
+
"./runtime/vector": {
|
|
1362
|
+
"import": {
|
|
1363
|
+
"types": "./dist/runtime/vector.d.ts",
|
|
1364
|
+
"default": "./dist/runtime/vector.js"
|
|
1365
|
+
},
|
|
1366
|
+
"require": {
|
|
1367
|
+
"types": "./dist/runtime/vector.d.cts",
|
|
1368
|
+
"default": "./dist/runtime/vector.cjs"
|
|
1369
|
+
}
|
|
1370
|
+
},
|
|
1371
|
+
"./runtime/physics": {
|
|
1372
|
+
"import": {
|
|
1373
|
+
"types": "./dist/runtime/physics.d.ts",
|
|
1374
|
+
"default": "./dist/runtime/physics.js"
|
|
1375
|
+
},
|
|
1376
|
+
"require": {
|
|
1377
|
+
"types": "./dist/runtime/physics.d.cts",
|
|
1378
|
+
"default": "./dist/runtime/physics.cjs"
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
"./runtime/format-scene": {
|
|
1382
|
+
"import": {
|
|
1383
|
+
"types": "./dist/runtime/format-scene.d.ts",
|
|
1384
|
+
"default": "./dist/runtime/format-scene.js"
|
|
1385
|
+
},
|
|
1386
|
+
"require": {
|
|
1387
|
+
"types": "./dist/runtime/format-scene.d.cts",
|
|
1388
|
+
"default": "./dist/runtime/format-scene.cjs"
|
|
1389
|
+
}
|
|
1390
|
+
},
|
|
1351
1391
|
"./manifest.json": "./dist/manifest.json",
|
|
1352
1392
|
"./manifest.schema.json": "./dist/manifest.schema.json",
|
|
1353
1393
|
"./components.css": "./dist/components.css",
|
|
@@ -1469,7 +1509,8 @@
|
|
|
1469
1509
|
},
|
|
1470
1510
|
"peerDependencies": {
|
|
1471
1511
|
"solid-js": ">=1.6.0",
|
|
1472
|
-
"svelte": ">=3.0.0"
|
|
1512
|
+
"svelte": ">=3.0.0",
|
|
1513
|
+
"@rive-app/canvas": ">=2.20.0"
|
|
1473
1514
|
},
|
|
1474
1515
|
"peerDependenciesMeta": {
|
|
1475
1516
|
"solid-js": {
|
|
@@ -1477,6 +1518,9 @@
|
|
|
1477
1518
|
},
|
|
1478
1519
|
"svelte": {
|
|
1479
1520
|
"optional": true
|
|
1521
|
+
},
|
|
1522
|
+
"@rive-app/canvas": {
|
|
1523
|
+
"optional": true
|
|
1480
1524
|
}
|
|
1481
1525
|
},
|
|
1482
1526
|
"engines": {
|