@luna-park/plugin-motion 1.2.0 → 1.4.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/README.md CHANGED
@@ -8,11 +8,13 @@ Powered by [anime.js](https://animejs.com), and what you see in the editor previ
8
8
 
9
9
  | | |
10
10
  |---|---|
11
- | 🎬 **18 ready-made presets** | Enter, emphasis and ambient animations, one click away. |
11
+ | 🎬 **19 ready-made presets** | Enter, emphasis and ambient animations, one click away. |
12
12
  | 🔢 **Count-up** | Numbers count up from 0 (e.g. `0 → 4.9`) when they appear, or as you scroll. |
13
13
  | 🌄 **Scroll-linked & parallax** | Tie any animation to the scroll position, stopping at the center of the page or continuing past it. |
14
14
  | 🧈 **Smooth scroll** | Lenis-powered inertia scrolling for the whole app, in one switch. |
15
- | 🎛️ **Custom from/to** | Animate opacity, position, scale, rotation and blur between your own values. |
15
+ | 🔗 **Smooth anchor links** | Links to a section scroll to it smoothly, stopping below your sticky header. |
16
+ | 📰 **Marquee** | Turn a row into an endless ticker or logo strip. Items are repeated for you. |
17
+ | 🎛️ **Custom from/to** | Animate opacity, position, scale, rotation and blur between your own values, with optional keyframes in between. |
16
18
  | 🎯 **7 triggers** | On mount, when visible, synced with scroll, on hover, on press, on focus, or driven by a state. |
17
19
  | 🌊 **Stagger** | Cascade the animation over children, over sibling elements (lists!), from the first, last, center or at random. |
18
20
  | 🔤 **Split text** | Animate a text letter by letter, word by word, or line by line. |
@@ -30,8 +32,8 @@ Powered by [anime.js](https://animejs.com), and what you see in the editor previ
30
32
  |---|---|---|
31
33
  | **Enter** | `fade`, `slide-up`, `slide-down`, `slide-left`, `slide-right`, `zoom`, `blur`, `count` | Make an element appear (on mount, when scrolled into view…). |
32
34
  | **Emphasis** | `grow`, `shrink`, `lift`, `tilt` | Small feedback on interaction, best with hover, press, focus or state. |
33
- | **Ambient** | `pulse`, `float`, `spin`, `shake`, `blink`, `wiggle` | Loop forever to draw attention. |
34
- | **Custom** | `custom` | Animate from your **From** values to your **To** values (`opacity`, `x`, `y`, `scale`, `rotate`, `blur`). |
35
+ | **Ambient** | `pulse`, `float`, `spin`, `shake`, `blink`, `wiggle`, `marquee` | Loop forever to draw attention. |
36
+ | **Custom** | `custom` | Animate from your **From** values to your **To** values (`opacity`, `x`, `y`, `scale`, `scaleX`, `scaleY`, `rotate`, `blur`). |
35
37
 
36
38
  ## 🎯 Triggers
37
39
 
@@ -53,6 +55,8 @@ Powered by [anime.js](https://animejs.com), and what you see in the editor previ
53
55
  | **Easing** | `linear`, `outQuad`, `outCubic`, `outExpo`, `inOutSine`, `outBack`, `outElastic`, `outBounce`. |
54
56
  | **Loops** | Number of repetitions, `-1` for infinite. Ambient presets loop by default. |
55
57
  | **Alternate** | Play back and forth instead of restarting each loop. |
58
+ | **Keyframes** | With a **Custom** animation, steps played between **From** and **To**, evenly spaced. Use them for a squash, a wiggle or a bounce. |
59
+ | **Stepped** | Jump through that many frames instead of moving smoothly, for a retro or stop-motion feel. |
56
60
  | **Stagger** | Delay between each animated item, in milliseconds. |
57
61
  | **Stagger from** | Where the cascade starts: `first`, `center`, `last` or `random`. |
58
62
  | **Scroll anchor** / **Scroll target** / **Scroll mode** | With **Synced with scroll**, see [Scroll options](#-scroll-options). |
@@ -63,6 +67,9 @@ Powered by [anime.js](https://animejs.com), and what you see in the editor previ
63
67
  >
64
68
  > **Parallax**: pick **Synced with scroll**, **Continue past target** and a **Custom** animation with **From → Y** set to e.g. `100px`. The element is `100px` low when it enters, in place at the target, and keeps rising at the same pace afterwards, so it moves faster than the page. Use a negative value to make it lag behind, like a background. **Continue past target** uses `linear` easing unless you pick one.
65
69
 
70
+ > [!TIP]
71
+ > **Marquee**: put it on a row (`display: flex`) inside a parent with `overflow: hidden`, and list your items once. Motion repeats them so the loop is seamless, and hides the copies from screen readers. **Duration** is the time of one pass.
72
+
66
73
  > [!TIP]
67
74
  > **Stagger** adapts to what you put it on:
68
75
  > - On a **single element**, its children are animated one after the other. Children added later are animated too.
@@ -94,6 +101,8 @@ With the defaults, the animation starts when the top of the element appears and
94
101
  | **Default easing** | `outExpo` | Used by every animation without its own easing (ambient presets have their own). |
95
102
  | **Smooth scroll** | `false` | Smooth the scroll of the whole app with [Lenis](https://lenis.darkroom.engineering). |
96
103
  | **Smooth scroll intensity** | `0.1` | Lenis `lerp`, between `0.01` and `1`. Lower is smoother. |
104
+ | **Smooth anchor links** | `false` | Links to a section of the page (`#pricing`) scroll to it smoothly. |
105
+ | **Anchor offset** | `0` | Space kept above the section, in pixels, e.g. the height of a sticky header. |
97
106
  | **Reduced motion** | `reduce` | With `reduce`, visitors who prefer reduced motion get instant transitions, no delays, no looping or scroll-synced animations, and no smooth scroll. Use `ignore` to always play everything. |
98
107
 
99
108
  ## 📦 In your deployed app