use-scroll-animate 2.7.0 → 2.8.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/CHANGELOG.md +10 -0
- package/README.md +2 -2
- package/README_ja.md +2 -2
- package/README_zh.md +2 -2
- package/dist/chunks/{base-D6zLiNGH.js → base-C_w9ibbn.js} +2 -2
- package/dist/chunks/{base-D6zLiNGH.js.map → base-C_w9ibbn.js.map} +1 -1
- package/dist/chunks/{spring-C2Megtcf.js → spring-Dc8ZqDWE.js} +2 -2
- package/dist/chunks/{spring-C2Megtcf.js.map → spring-Dc8ZqDWE.js.map} +1 -1
- package/dist/chunks/variants-Bbatdq8d.cjs +39 -0
- package/dist/chunks/variants-Bbatdq8d.cjs.map +1 -0
- package/dist/chunks/variants-idgMVXhE.js +35 -0
- package/dist/chunks/variants-idgMVXhE.js.map +1 -0
- package/dist/components/background.cjs +276 -10
- package/dist/components/background.cjs.map +1 -1
- package/dist/components/background.css +2 -0
- package/dist/components/background.d.cts +63 -2
- package/dist/components/background.d.ts +63 -2
- package/dist/components/background.js +274 -13
- package/dist/components/background.js.map +1 -1
- package/dist/components/cards.js +3 -3
- package/dist/components/click.js +3 -3
- package/dist/components/feedback.js +2 -2
- package/dist/components/interaction.js +2 -2
- package/dist/components/page.js +3 -3
- package/dist/components/physics.js +4 -4
- package/dist/components/reveal.js +2 -2
- package/dist/components/text.cjs +179 -10
- package/dist/components/text.cjs.map +1 -1
- package/dist/components/text.css +1 -0
- package/dist/components/text.d.cts +54 -2
- package/dist/components/text.d.ts +54 -2
- package/dist/components/text.js +177 -13
- package/dist/components/text.js.map +1 -1
- package/dist/components/transitions.js +2 -2
- package/dist/components/ui.cjs +16 -46
- package/dist/components/ui.cjs.map +1 -1
- package/dist/components/ui.js +6 -35
- package/dist/components/ui.js.map +1 -1
- package/dist/components.cjs +17 -6
- package/dist/components.cjs.map +1 -1
- package/dist/components.css +3 -0
- package/dist/components.d.cts +117 -4
- package/dist/components.d.ts +117 -4
- package/dist/components.js +11 -9
- package/dist/components.js.map +1 -1
- package/dist/components.umd.js +2 -2
- package/dist/components.umd.js.map +1 -1
- package/docs/components.md +17 -0
- package/docs/windows-apps.md +11 -0
- package/package.json +1 -1
package/docs/components.md
CHANGED
|
@@ -192,6 +192,23 @@ Presets (`SPRING_PRESETS`): `default` (170/26), `gentle` (120/14), `wobbly` (180
|
|
|
192
192
|
| `<usa-auto-skeleton>` | Automatic skeletons | `loading`; `data-no-skeleton` on children | `loading` |
|
|
193
193
|
| `<usa-motion-switch>` · `setMotionIntensity()` | Global motion intensity | `labels`, `label` · `'off' \| 'low' \| 'normal' \| 'high'`, `persist` | `usa:change`; `--usa-motion`, `data-usa-motion` |
|
|
194
194
|
|
|
195
|
+
### v2.8 additions to Text, Background & Windows
|
|
196
|
+
|
|
197
|
+
| Element / API | Category | What it does | Key attributes |
|
|
198
|
+
|---|---|---|---|
|
|
199
|
+
| `<usa-wave-text>` | text | Letters bob in a wave | `amplitude` (0.25em), `speed` (1.6s), `stagger` (0.06s) |
|
|
200
|
+
| `<usa-glitch>` | text | RGB-split glitch | `trigger` (`always` · `hover`), `intensity` (3px) |
|
|
201
|
+
| `<usa-gradient-text>` | text | Flowing gradient fill | `colors`, `speed` (6s), `angle` (90) |
|
|
202
|
+
| `<usa-handwriting>` | text | Stroke-by-stroke draw, then fill | `text`, `duration` (2400), `size` (64), `font`, `stroke`; `play()`, `usa:complete` |
|
|
203
|
+
| `<usa-scroll-highlight>` | text | Words light up while reading / marker sweep | `mode` (`words` · `marker`), `dim` (0.2), `color`; `progress` |
|
|
204
|
+
| `<usa-grid-glow>` | background | Grid lit around the pointer | `size` (32), `radius` (220), `color` |
|
|
205
|
+
| `<usa-blobs>` | background | Fluid morphing blobs | `colors`, `speed` (1), `blur` (60) |
|
|
206
|
+
| `<usa-water-ripple>` | background | Interactive water ripples (canvas) | `damping` (0.96), `strength` (1), `color` (`r,g,b`); `drop(x, y, s?)` |
|
|
207
|
+
| `<usa-dot-network>` | background | Dot grid linking to the pointer (canvas) | `gap` (28), `radius` (140), `color` (`r,g,b`) |
|
|
208
|
+
| `fluentPreset(opts)` | background | Windows 11 Fluent: variant + Mica tint + Acrylic + Reveal highlight | `reveal`, `mica`, `selector`, `root`; returns undo |
|
|
209
|
+
|
|
210
|
+
WinUI 3 / WebView2 sample app: [`examples/webview2-winui/`](../examples/webview2-winui/).
|
|
211
|
+
|
|
195
212
|
## Frameworks
|
|
196
213
|
|
|
197
214
|
Custom elements work in every framework. Register once (e.g. in your entry file), then use the tags.
|
package/docs/windows-apps.md
CHANGED
|
@@ -106,3 +106,14 @@ Link the bundle (or import it in your module graph) and install the site from Ed
|
|
|
106
106
|
- Register only what you use (`define<Category>Components()` or single `define*()` calls) to keep start-up light.
|
|
107
107
|
- Background effects (`<usa-aurora>`, `<usa-particles>`, `<usa-marquee>`) stop animating when off-screen and when the window is hidden/minimised (`document.hidden`).
|
|
108
108
|
- All motion runs on the compositor (`transform` / `opacity`), so it stays smooth on integrated GPUs and in battery-saver mode; call `configureComponents({ reducedMotion: 'reduce' })` to force the calm variants (e.g. for a "Reduce animations" toggle in your app settings).
|
|
109
|
+
|
|
110
|
+
## WinUI 3 sample app + Fluent preset (v2.8)
|
|
111
|
+
|
|
112
|
+
[`examples/webview2-winui/`](../examples/webview2-winui/) is a complete WinUI 3 app (Windows App SDK, native **Mica** backdrop, full-window WebView2 with `SetVirtualHostNameToFolderMapping`) whose UI is a plain `index.html` using `components.umd.js`.
|
|
113
|
+
|
|
114
|
+
```js
|
|
115
|
+
import { fluentPreset } from 'use-scroll-animate/components/background';
|
|
116
|
+
const off = fluentPreset({ reveal: true, mica: true }); // Fluent variant + Mica-style bg + Acrylic + Reveal highlight
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`fluentPreset()` sets `variant="fluent"` page-wide (Segoe UI Variable, Windows 11 accent `#0067c0` / `#4cc2ff` dark, 8 px radii), tints the body like Mica (skip with `mica: false` when the host window already uses `MicaBackdrop`), turns `.usa-acrylic` / `[data-acrylic]` into Acrylic surfaces and adds Reveal highlight to buttons and `[data-fluent-reveal]` items. Reduced motion / reduced transparency / high contrast fall back to solid materials without Reveal tracking.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "use-scroll-animate",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "A lightweight, high-performance, dependency-free scroll animation library and animated UI components (Web Components) for the web and Windows web-view apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|