use-scroll-animate 5.9.0 → 6.0.1
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 +24 -0
- package/README.md +3 -2
- package/README_ja.md +1 -0
- package/README_zh.md +2 -1
- package/dist/components/angular.d.cts +5 -4
- package/dist/components/angular.d.ts +5 -4
- package/dist/components/click.cjs +2 -23
- package/dist/components/click.cjs.map +1 -1
- package/dist/components/click.d.cts +3 -13
- package/dist/components/click.d.ts +3 -13
- package/dist/components/click.js +11 -29
- package/dist/components/click.js.map +1 -1
- package/dist/components/lite.cjs +19 -41
- package/dist/components/lite.cjs.map +1 -1
- package/dist/components/lite.js +20 -39
- package/dist/components/lite.js.map +1 -1
- package/dist/components/page.cjs +6 -7
- package/dist/components/page.cjs.map +1 -1
- package/dist/components/page.css +1 -1
- package/dist/components/page.d.cts +4 -3
- package/dist/components/page.d.ts +4 -3
- package/dist/components/page.js +7 -8
- package/dist/components/page.js.map +1 -1
- package/dist/components/solid.d.cts +5 -4
- package/dist/components/solid.d.ts +5 -4
- package/dist/components/svelte.d.cts +5 -4
- package/dist/components/svelte.d.ts +5 -4
- package/dist/components/vue.d.cts +5 -4
- package/dist/components/vue.d.ts +5 -4
- package/dist/components.cjs +0 -3
- package/dist/components.cjs.map +1 -1
- package/dist/components.css +1 -1
- package/dist/components.d.cts +7 -16
- package/dist/components.d.ts +7 -16
- package/dist/components.js +1 -1
- package/dist/components.umd.js +2 -2
- package/dist/components.umd.js.map +1 -1
- package/docs/ROADMAP.md +12 -12
- package/docs/components.md +3 -3
- package/docs/performance.md +1 -1
- package/docs/upgrading-6.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [6.0.1] - 2026-10-08
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **Showcase — components gallery overflowed phones horizontally (~48 px at 390 px wide).** The header's six nav items (Store · Playground · Story · language · theme · GitHub) could not shrink, so the whole page scrolled sideways and the scroll-progress bar ran past the edge. On screens ≤ 480 px the bar now shrinks and tightens to one row (the sticky filter bar keeps its offset): the duplicate “Animation Store” link is hidden (the logo already links to the store) along with the “Components” badge, and below 375 px the GitHub icon moves to the footer link only. Checked in headless Chromium at 320 / 360 / 390 / 414 / 480 px in English and Chinese: `scrollWidth` equals the viewport width and every remaining header control is on screen.
|
|
14
|
+
- Crawl of all showcase pages (`/showcase/`, `components.html`, `playground.html`, `story.html`, desktop 1280 px + mobile 390 px): no other console errors, failed requests or overflow found.
|
|
15
|
+
|
|
16
|
+
### Tests
|
|
17
|
+
- New `test/fixes-6-0-1.test.ts` regression suite.
|
|
18
|
+
|
|
19
|
+
## [6.0.0] - 2026-10-08
|
|
20
|
+
|
|
21
|
+
### ⚠ BREAKING CHANGES
|
|
22
|
+
- **Removed `burst()`, `confetti()`, `shake()`** from `use-scroll-animate/components`, `/components/click` and the UMD global (deprecated in 5.9). Play the registered effects instead: `playEffect(document.body, 'burst', { x, y, …options })`, `playEffect(el, 'confetti', options)`, `playEffect(el, 'shake', { intensity, duration })` (`use-scroll-animate/components/fx`). `haptic()` stays.
|
|
23
|
+
- **Removed `<usa-cursor mode="trail">`** (deprecated in 5.9): `CURSOR_MODES` is now `dot` · `magnetic` · `glow`, and an unknown mode renders as `dot`. Use the 5.7 `comet-trail` effect: `<usa-fx effect="comet-trail" trigger="load" self>…</usa-fx>`.
|
|
24
|
+
- Every effect now goes through the 5.0 registry (`registerEffect()` / `playEffect()` / `bindEffect()` / `<usa-fx>`); the 5.1–5.9 packs live in `use-scroll-animate/components/effects`.
|
|
25
|
+
|
|
26
|
+
### Migration
|
|
27
|
+
- `npx usa-codemod-6 --write src` rewrites the helper calls and imports (aliases and the `UsaComponents` global included) and lists `<usa-cursor mode="trail">` for a manual edit. Guide: `docs/upgrading-6.md`.
|
|
28
|
+
- CDN URLs move to the `@6` range: `https://unpkg.com/use-scroll-animate@6/dist/components.umd.js`.
|
|
29
|
+
|
|
30
|
+
### Docs
|
|
31
|
+
- README (EN / 中文 / 日本語): new **Effect packs** (`/components/effects`) row.
|
|
32
|
+
- `docs/ROADMAP.md`: post-6.0 roadmap (v6.1 → v7.0).
|
|
33
|
+
|
|
10
34
|
## [5.9.0] - 2026-10-08
|
|
11
35
|
|
|
12
36
|
### Added
|
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ defineComponents(); // or per category: import { defineTextComponents } from 'us
|
|
|
39
39
|
|
|
40
40
|
```html
|
|
41
41
|
<!-- or with no build step -->
|
|
42
|
-
<script src="https://unpkg.com/use-scroll-animate@
|
|
42
|
+
<script src="https://unpkg.com/use-scroll-animate@6/dist/components.umd.js"></script>
|
|
43
43
|
<usa-typewriter words="Hello, Windows.|Hello, web."></usa-typewriter>
|
|
44
44
|
<usa-spinner kind="fluent"></usa-spinner>
|
|
45
45
|
```
|
|
@@ -54,7 +54,7 @@ defineComponents(); // or per category: import { defineTextComponents } from 'us
|
|
|
54
54
|
| **Transitions** (`/components/transitions`) | `<usa-dialog>` (modal / drawer / sheet) · `<usa-accordion>` · `<usa-view-switch>` · `viewTransition()` · `flip()` |
|
|
55
55
|
| **Spring & physics** (`/components/physics`) | `<usa-spring>` (bounce-in · pop · drop · jelly · rubber-band) · `<usa-draggable>` (spring-back · inertia · snap) · `<usa-overscroll>` · `spring()` · `createSpring()` · `SPRING_PRESETS` |
|
|
56
56
|
| **Card effects** (`/components/cards`) | `<usa-card>` (flip · holo · glass · border-glow · conic-border · lift · spotlight · sheen · parallax-layers · expand — combinable) · `<usa-card-stack>` (swipe) · `<usa-sticky-stack>` · `<usa-carousel-3d>` |
|
|
57
|
-
| **Click & tap** (`/components/click`) | `<usa-button>` **button click deformation** (squash · wobble · gooey · dent · shape morph · submit→loading→success) · `<usa-icon-morph>` · `<usa-click>` (ripple · burst · confetti · squish · press-spring · shake) · `<usa-like>` · `<usa-hold>` · `<usa-double-tap>` · `<usa-checkbox>` · `
|
|
57
|
+
| **Click & tap** (`/components/click`) | `<usa-button>` **button click deformation** (squash · wobble · gooey · dent · shape morph · submit→loading→success) · `<usa-icon-morph>` · `<usa-click>` (ripple · burst · confetti · squish · press-spring · shake) · `<usa-like>` · `<usa-hold>` · `<usa-double-tap>` · `<usa-checkbox>` · `haptic()` (click effects from code: `playEffect(el, 'confetti')`) |
|
|
58
58
|
| **UI components & variants** (`/components/ui`) | `<usa-tabs>` · `<usa-drawer>` · `<usa-bottom-sheet>` · `<usa-pull-refresh>` · `<usa-fab>` · `<usa-navbar>` · `<usa-slider>` · `<usa-rating>` · `<usa-tooltip>` · `<usa-popover>` · `<usa-badge>` · `<usa-avatar-stack>` · `variant="minimal \| neon \| glass \| brutalist \| fluent \| material"` on every component |
|
|
59
59
|
| **Page & app-wide** (`/components/page`) | `pageTransition()` (fade · slide · circle · blinds · pixel · zoom; SPA + MPA) · `themeTransition()` · `<usa-cursor>` · `smoothScroll()` · `<usa-fullpage>` · `<usa-loading-bar>` · `<usa-back-to-top>` · `<usa-ambient>` (particles · snow · stars · noise · gradient) · `<usa-splash>` · `<usa-auto-skeleton>` · `<usa-motion-switch>` / `setMotionIntensity()` |
|
|
60
60
|
| **Timeline & choreography** (`/components/timeline`) | `timeline()` (chain · overlap · labels · seek · reverse · scrub) · `<usa-timeline>` (`data-tl` steps) |
|
|
@@ -65,6 +65,7 @@ defineComponents(); // or per category: import { defineTextComponents } from 'us
|
|
|
65
65
|
| **Layout animation** (`/components/layout`) | `<usa-auto-animate>` / `autoAnimate()` (list & grid reflow) · `<usa-masonry>` · `sharedTransition()` (shared elements) |
|
|
66
66
|
| **Effect packs** (`/components/packs`) | `<usa-pack>` (`name="ecommerce \| portfolio \| dashboard \| game \| landing"`) · `applyPack()` · `flyToCart()` · `countUp()` |
|
|
67
67
|
| **Effects — plugin API** (`/components/fx`) | `<usa-fx>` (`effect` · `trigger` click / hover / enter / load / loop) · `registerEffect()` · `playEffect()` · `bindEffect()` · built-ins: every timeline entrance, pulse · pop · jelly · wiggle · heartbeat · bounce · flash · tada · shake, burst · confetti · ripple |
|
|
68
|
+
| **Effect packs** (`/components/effects`) | `registerAllEffects()` · card & click 2.0 · physics · page-wide · `<usa-story>` scroll stories · generative backgrounds · sound-reactive (`<usa-audio>`) · cursor trails & gestures (`<usa-gesture-fx>`) · theme packs (`<usa-theme>`) · 23 micro-interactions · `<usa-player>` JSON animations |
|
|
68
69
|
|
|
69
70
|
Whole bundle ≈ 22 kB gzip (JS + CSS); one category 3.5–6.4 kB; a single component ≈ 2 kB. The scroll-animation core below is unaffected.
|
|
70
71
|
|
package/README_ja.md
CHANGED
|
@@ -53,6 +53,7 @@ defineComponents(); // カテゴリ単位: import { defineTextComponents } from
|
|
|
53
53
|
| **レイアウト** (`/components/layout`) | `<usa-auto-animate>` / `autoAnimate()` · `<usa-masonry>` · `sharedTransition()`(共有要素) |
|
|
54
54
|
| **エフェクトパック** (`/components/packs`) | `<usa-pack>` (`name="ecommerce \| portfolio \| dashboard \| game \| landing"`) · `applyPack()` · `flyToCart()` |
|
|
55
55
|
| **エフェクト API** (`/components/fx`) | `<usa-fx>` · `registerEffect()` · `playEffect()` · `bindEffect()` · 内蔵: タイムライン入場、pulse · pop · jelly · wiggle · bounce · tada · shake、burst · confetti · ripple |
|
|
56
|
+
| **エフェクトパック** (`/components/effects`) | `registerAllEffects()` · カード & クリック 2.0 · 物理 · ページ全体 · `<usa-story>` スクロールストーリー · ジェネレーティブ背景 · サウンド連動(`<usa-audio>`)· カーソル & ジェスチャー(`<usa-gesture-fx>`)· テーマパック(`<usa-theme>`)· マイクロインタラクション 23 種 · `<usa-player>` JSON アニメーション |
|
|
56
57
|
|
|
57
58
|
## ドキュメント
|
|
58
59
|
|
package/README_zh.md
CHANGED
|
@@ -36,7 +36,7 @@ defineComponents(); // 或按分类:import { defineTextComponents } from 'use-
|
|
|
36
36
|
|
|
37
37
|
```html
|
|
38
38
|
<!-- 或免构建直接使用 -->
|
|
39
|
-
<script src="https://unpkg.com/use-scroll-animate@
|
|
39
|
+
<script src="https://unpkg.com/use-scroll-animate@6/dist/components.umd.js"></script>
|
|
40
40
|
<usa-typewriter words="你好,Windows。|你好,Web。"></usa-typewriter>
|
|
41
41
|
<usa-spinner kind="fluent"></usa-spinner>
|
|
42
42
|
```
|
|
@@ -62,6 +62,7 @@ defineComponents(); // 或按分类:import { defineTextComponents } from 'use-
|
|
|
62
62
|
| **布局动画** (`/components/layout`) | `<usa-auto-animate>` / `autoAnimate()`(列表与网格重排)· `<usa-masonry>`(瀑布流)· `sharedTransition()`(共享元素) |
|
|
63
63
|
| **效果包** (`/components/packs`) | `<usa-pack>` (`name="ecommerce \| portfolio \| dashboard \| game \| landing"`) · `applyPack()` · `flyToCart()` · `countUp()` |
|
|
64
64
|
| **特效插件 API** (`/components/fx`) | `<usa-fx>`(`effect` · `trigger`)· `registerEffect()` · `playEffect()` · `bindEffect()` · 内置:全部时间线入场、pulse · pop · jelly · wiggle · heartbeat · bounce · flash · tada · shake、burst · confetti · ripple |
|
|
65
|
+
| **特效包** (`/components/effects`) | `registerAllEffects()` · 卡片与点击 2.0 · 物理 · 全页特效 · `<usa-story>` 滚动叙事 · 生成式背景 · 声音响应(`<usa-audio>`)· 光标拖尾与手势(`<usa-gesture-fx>`)· 主题包(`<usa-theme>`)· 23 个微交互 · `<usa-player>` JSON 动画 |
|
|
65
66
|
|
|
66
67
|
完整包约 22 kB gzip(JS + CSS);单个分类 3.5–6.4 kB;单个组件约 2 kB。下方的滚动动画核心不受影响。
|
|
67
68
|
|
|
@@ -1033,8 +1033,8 @@ interface UsaCheckboxElement extends UsaElement {
|
|
|
1033
1033
|
* `<usa-button>` (button click deformation: squash, wobble, gooey, dent;
|
|
1034
1034
|
* shape morph; submit → loading → success), `<usa-icon-morph>`,
|
|
1035
1035
|
* `<usa-like>`, `<usa-hold>`, `<usa-double-tap>`, `<usa-checkbox>`, plus
|
|
1036
|
-
* `haptic()
|
|
1037
|
-
*
|
|
1036
|
+
* `haptic()`. 6.0: `burst()`, `confetti()` and `shake()` were removed — play
|
|
1037
|
+
* the registered effects instead: `playEffect(el, 'burst' | 'confetti' | 'shake')`.
|
|
1038
1038
|
*/
|
|
1039
1039
|
|
|
1040
1040
|
declare global {
|
|
@@ -1226,10 +1226,11 @@ declare global {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
|
|
1228
1228
|
/**
|
|
1229
|
-
* `<usa-cursor mode="dot |
|
|
1229
|
+
* `<usa-cursor mode="dot | magnetic | glow">` — a custom cursor for
|
|
1230
1230
|
* the page (place it once, e.g. at the end of `<body>`).
|
|
1231
1231
|
* - `dot` — a ring that follows with spring lag around the real pointer;
|
|
1232
|
-
*
|
|
1232
|
+
* (6.0: `mode="trail"` was removed — use the registered `comet-trail` effect;
|
|
1233
|
+
* unknown modes render as `dot`.)
|
|
1233
1234
|
* - `magnetic` — the ring snaps onto and wraps hovered targets (`a`,
|
|
1234
1235
|
* `button`, `[data-cursor]`);
|
|
1235
1236
|
* - `glow` — a large soft light following the pointer (great on dark UIs).
|
|
@@ -1033,8 +1033,8 @@ interface UsaCheckboxElement extends UsaElement {
|
|
|
1033
1033
|
* `<usa-button>` (button click deformation: squash, wobble, gooey, dent;
|
|
1034
1034
|
* shape morph; submit → loading → success), `<usa-icon-morph>`,
|
|
1035
1035
|
* `<usa-like>`, `<usa-hold>`, `<usa-double-tap>`, `<usa-checkbox>`, plus
|
|
1036
|
-
* `haptic()
|
|
1037
|
-
*
|
|
1036
|
+
* `haptic()`. 6.0: `burst()`, `confetti()` and `shake()` were removed — play
|
|
1037
|
+
* the registered effects instead: `playEffect(el, 'burst' | 'confetti' | 'shake')`.
|
|
1038
1038
|
*/
|
|
1039
1039
|
|
|
1040
1040
|
declare global {
|
|
@@ -1226,10 +1226,11 @@ declare global {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
|
|
1228
1228
|
/**
|
|
1229
|
-
* `<usa-cursor mode="dot |
|
|
1229
|
+
* `<usa-cursor mode="dot | magnetic | glow">` — a custom cursor for
|
|
1230
1230
|
* the page (place it once, e.g. at the end of `<body>`).
|
|
1231
1231
|
* - `dot` — a ring that follows with spring lag around the real pointer;
|
|
1232
|
-
*
|
|
1232
|
+
* (6.0: `mode="trail"` was removed — use the registered `comet-trail` effect;
|
|
1233
|
+
* unknown modes render as `dot`.)
|
|
1233
1234
|
* - `magnetic` — the ring snaps onto and wraps hovered targets (`a`,
|
|
1234
1235
|
* `button`, `[data-cursor]`);
|
|
1235
1236
|
* - `glow` — a large soft light following the pointer (great on dark UIs).
|
|
@@ -847,27 +847,9 @@ function defineCheckbox(tag = 'usa-checkbox') {
|
|
|
847
847
|
* `<usa-button>` (button click deformation: squash, wobble, gooey, dent;
|
|
848
848
|
* shape morph; submit → loading → success), `<usa-icon-morph>`,
|
|
849
849
|
* `<usa-like>`, `<usa-hold>`, `<usa-double-tap>`, `<usa-checkbox>`, plus
|
|
850
|
-
* `haptic()
|
|
851
|
-
*
|
|
850
|
+
* `haptic()`. 6.0: `burst()`, `confetti()` and `shake()` were removed — play
|
|
851
|
+
* the registered effects instead: `playEffect(el, 'burst' | 'confetti' | 'shake')`.
|
|
852
852
|
*/
|
|
853
|
-
/**
|
|
854
|
-
* @deprecated 5.9 — removed in 6.0. Use the registered effect:
|
|
855
|
-
* `playEffect(document.body, 'burst', { x, y, ...options })` (`use-scroll-animate/components/fx`).
|
|
856
|
-
*/
|
|
857
|
-
function burst(x, y, options = {}) {
|
|
858
|
-
base.deprecate('burst()', "burst() is deprecated and removed in 6.0 — use playEffect(el, 'burst', { x, y, …options }) from use-scroll-animate/components/fx (npx usa-codemod-6).");
|
|
859
|
-
return fx.burst(x, y, options);
|
|
860
|
-
}
|
|
861
|
-
/** @deprecated 5.9 — removed in 6.0. Use `playEffect(document.body, 'confetti', options)`. */
|
|
862
|
-
function confetti(options = {}) {
|
|
863
|
-
base.deprecate('confetti()', "confetti() is deprecated and removed in 6.0 — use playEffect(el, 'confetti', options) from use-scroll-animate/components/fx (npx usa-codemod-6).");
|
|
864
|
-
return fx.confetti(options);
|
|
865
|
-
}
|
|
866
|
-
/** @deprecated 5.9 — removed in 6.0. Use `playEffect(el, 'shake', { intensity, duration })`. */
|
|
867
|
-
function shake(el, intensity = 8, duration = 480) {
|
|
868
|
-
base.deprecate('shake()', "shake() is deprecated and removed in 6.0 — use playEffect(el, 'shake', { intensity, duration }) from use-scroll-animate/components/fx (npx usa-codemod-6).");
|
|
869
|
-
return fx.shake(el, intensity, duration);
|
|
870
|
-
}
|
|
871
853
|
/** Register every component of this category under its default tag. */
|
|
872
854
|
function defineClickComponents() {
|
|
873
855
|
defineClick();
|
|
@@ -883,8 +865,6 @@ exports.haptic = fx.haptic;
|
|
|
883
865
|
exports.BUTTON_DEFORMS = BUTTON_DEFORMS;
|
|
884
866
|
exports.CLICK_EFFECTS = CLICK_EFFECTS;
|
|
885
867
|
exports.MORPH_ICONS = MORPH_ICONS;
|
|
886
|
-
exports.burst = burst;
|
|
887
|
-
exports.confetti = confetti;
|
|
888
868
|
exports.defineButton = defineButton;
|
|
889
869
|
exports.defineCheckbox = defineCheckbox;
|
|
890
870
|
exports.defineClick = defineClick;
|
|
@@ -894,5 +874,4 @@ exports.defineHold = defineHold;
|
|
|
894
874
|
exports.defineIconMorph = defineIconMorph;
|
|
895
875
|
exports.defineLike = defineLike;
|
|
896
876
|
exports.morphPath = morphPath;
|
|
897
|
-
exports.shake = shake;
|
|
898
877
|
//# sourceMappingURL=click.cjs.map
|