use-scroll-animate 6.4.0 → 6.6.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/docs/ROADMAP.md CHANGED
@@ -6,8 +6,8 @@
6
6
  - ✅ **v6.2** — 粒子与流体 2.0 + 组件:GPU 流体、烟雾、火焰、墨滴扩散、萤火虫、樱花与落叶、点击水花(WebGL2,自动降级 Canvas 2D);新组件 轮播 / 滑块、动画指示器标签页、手风琴 2.0、快拍浏览器(独立入口 `motionary/components/widgets`)。
7
7
  - ✅ **v6.3** — 文字特效 3.0 + 组件:液态文字、霓虹书写、文字粒子聚散、故障字、光标拖影、可变字体呼吸、逐字 3D 翻转;新组件 通知 / Toast 堆叠、模态对话框、抽屉 / 底部面板。
8
8
  - ✅ **v6.4** — 光影与材质 + 组件:动态光源、玻璃折射、金属拉丝、珠光 / 镭射、体积光、指针实时阴影;新组件 进度条 / 进度环、计数器 / 里程表、骨架屏闪光、评分星。
9
- - **v6.5** — 3D 场景卡片 + 组件:景深层叠卡、可旋转商品展示、立方体画廊、折纸展开、轨道相机叙事;新组件 时间轴、瀑布流(布局动画)、图片对比滑块。
10
- - **v6.6** — 形变与 SVG 2.0 + 组件:路径补间、液态 blob 按钮、描边绘制、SVG 滤镜转场、图标变形;新组件 Dock 栏(macOS 放大)、形变下划线导航、汉堡 → 关闭图标、提示 / 气泡。
9
+ - ✅ **v6.5** — 3D 场景卡片 + 组件:景深层叠卡、可旋转商品展示、立方体画廊、折纸展开、轨道相机叙事;新组件 时间轴、瀑布流(布局动画)、图片对比滑块。
10
+ - ✅ **v6.6** — 形变与 SVG 2.0 + 组件:路径补间、液态 blob 按钮、描边绘制、SVG 滤镜转场、图标变形;新组件 Dock 栏(macOS 放大)、形变下划线导航、汉堡 → 关闭图标、提示 / 气泡。
11
11
  - **v6.7** — 转场大全 + 组件:涟漪溶解、碎片爆裂、马赛克翻牌、液体擦除、卷页、镜头推拉(View Transitions 优先,MPA 可用);新组件 步骤条 / 向导、分页、分段控件、开关变体。
12
12
  - **v6.8** — 天气与氛围 + 交互物理 2.0 + 组件:玻璃雨滴、积雪、安全闪电、雾、极光、昼夜光照;软体、布料、绳索、磁吸、弹球、重力翻转(Verlet);新组件 看板 / 拖拽排序、滑动卡片、下拉刷新。
13
13
  - **v6.9** — 7.0 预备 + 组件:动画编辑器 2.0、效果市场清单格式、7.0 弃用警告、`upgrading-7.md` 与 `usa-codemod-7`;新组件 日期选择器、取色器、文件拖放区动画。
@@ -588,6 +588,57 @@ document.querySelector('usa-skeleton-reveal').loading = false; // dissolve → c
588
588
  - `<usa-star-rating max step icon="star | heart" readonly>`: hover preview, half stars, pop + sparkle burst, `role="slider"` keyboard, `usa:change`.
589
589
  - Light & materials: `light-follow` · `refraction` · `pointer-shadow` (hover) · `brushed-metal` · `pearlescent` (card) · `god-rays` (background). Helper `trackPointer()`. Reduced motion: fixed lighting, one still frame, values switch instantly.
590
590
 
591
+ ### v6.5 Widgets: milestones, masonry flow, compare, cube gallery (`components/widgets`) + 3D scene cards (`components/fx-3d`)
592
+
593
+ ```html
594
+ <usa-milestones>
595
+ <div data-date="2024"><h3>Idea</h3></div><div data-date="2026"><h3>Launch</h3></div>
596
+ </usa-milestones>
597
+ <usa-masonry-flow min="160" gap="12"><img src="1.jpg" alt="…"><img src="2.jpg" alt="…"></usa-masonry-flow>
598
+ <usa-compare labels="Before,After" intro><img src="before.jpg" alt="Before"><img src="after.jpg" alt="After"></usa-compare>
599
+ <usa-cube-gallery autoplay="4000"><img src="a.jpg" alt="…"><img src="b.jpg" alt="…"></usa-cube-gallery>
600
+
601
+ <usa-fx effect="depth-stack" trigger="load"><div class="card"><img data-depth="1" src="bg.png" alt=""><h3 data-depth="3">Title</h3></div></usa-fx>
602
+ <usa-fx effect="card-flip-3d"><div class="card"><div>Front</div><div>Back</div></div></usa-fx>
603
+ ```
604
+ ```js
605
+ import { defineWidgets } from 'motionary/components/widgets';
606
+ import { defineFx } from 'motionary/components/fx';
607
+ import { register3dEffects } from 'motionary/components/fx-3d';
608
+ defineWidgets(); defineFx(); register3dEffects();
609
+ document.querySelector('usa-masonry-flow').filter('.cats'); // items glide (FLIP)
610
+ ```
611
+ - `<usa-milestones layout="alternate | left">`: scroll-drawn rail, dots pop and cards slide in when reached; `usa:reach`.
612
+ - `<usa-masonry-flow min gap>`: masonry with FLIP layout animation; `layout()`, `filter()`, `shuffle()`, `sort()`; `usa:layout`.
613
+ - `<usa-compare orientation labels intro hover>`: before / after slider (`role="slider"`, keyboard), click-to-jump easing; `usa:change`.
614
+ - `<usa-cube-gallery axis="y | x" autoplay>`: slides on a turning 3D cube, swipe / keys / buttons; `next()`, `prev()`, `goTo()`; `usa:change`.
615
+ - 3D scene cards: `depth-stack` · `product-spin` (card) · `card-flip-3d` (click) · `origami` (enter) · `orbit-camera` (scroll). Reduced motion: no tilt / spin / orbit / fold, flips crossfade, milestones fully shown, cube fades.
616
+
617
+ ### v6.6 Widgets: dock, nav morph, menu toggle, tip (`components/widgets`) + morph & SVG 2.0 (`components/fx-morph`)
618
+
619
+ ```html
620
+ <usa-dock magnify="1.9" bounce label="Apps">
621
+ <button data-label="Music" aria-label="Music">🎵</button><a href="/mail" data-label="Mail" aria-label="Mail">✉️</a>
622
+ </usa-dock>
623
+ <usa-nav-morph indicator="underline"><a href="/" aria-current="page">Home</a><a href="/docs">Docs</a></usa-nav-morph>
624
+ <usa-menu-toggle for="site-menu" variant="cross"></usa-menu-toggle><nav id="site-menu" hidden>…</nav>
625
+ <usa-tip text="Copied!" placement="top"><button>Copy</button></usa-tip>
626
+
627
+ <usa-fx effect="path-morph" trigger="loop" options='{"paths":["M…","M…"]}'><svg viewBox="0 0 100 100"><path d="M…"/></svg></usa-fx>
628
+ <usa-fx effect="blob-button" trigger="load"><button>Get started</button></usa-fx>
629
+ ```
630
+ ```js
631
+ import { defineWidgets } from 'motionary/components/widgets';
632
+ import { defineFx } from 'motionary/components/fx';
633
+ import { registerMorphEffects2 } from 'motionary/components/fx-morph';
634
+ defineWidgets(); defineFx(); registerMorphEffects2();
635
+ ```
636
+ - `<usa-dock magnify range bounce orientation>`: cosine magnification, labels from `data-label`, click bounce; `role="toolbar"`.
637
+ - `<usa-nav-morph indicator="underline | pill | blob | dot">`: indicator stretches to the hovered / focused link and back to `aria-current="page"`; arrow keys; `usa:change`.
638
+ - `<usa-menu-toggle variant="cross | arrow | minus | plus-x" for>`: hamburger morph toggle with `aria-expanded`, controls `hidden` / `show()` / `close()` of its target; `usa:toggle`.
639
+ - `<usa-tip text placement trigger="hover | click" delay>`: spring-out tooltip / popover with arrow, viewport flip + shift, Esc, rich `[slot="tip"]` content.
640
+ - Morph & SVG 2.0: `path-morph` (loop) · `blob-button` (hover) · `stroke-draw` · `noise-reveal` (enter) · `icon-swap` (click); helpers `samplePath()`, `pointsToPath()`. Reduced motion: no magnification / stretch / morph loops; reveals and swaps fade.
641
+
591
642
  ## Frameworks
592
643
 
593
644
  Custom elements work in every framework. Register once (e.g. in your entry file), then use the tags.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-scroll-animate",
3
- "version": "6.4.0",
3
+ "version": "6.6.0",
4
4
  "description": "Compatibility alias of motionary (same build). The project was renamed to Motionary — install `motionary` instead. 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",
@@ -448,6 +448,26 @@
448
448
  "default": "./dist/components/fx-light.cjs"
449
449
  }
450
450
  },
451
+ "./components/fx-3d": {
452
+ "import": {
453
+ "types": "./dist/components/fx-3d.d.ts",
454
+ "default": "./dist/components/fx-3d.js"
455
+ },
456
+ "require": {
457
+ "types": "./dist/components/fx-3d.d.cts",
458
+ "default": "./dist/components/fx-3d.cjs"
459
+ }
460
+ },
461
+ "./components/fx-morph": {
462
+ "import": {
463
+ "types": "./dist/components/fx-morph.d.ts",
464
+ "default": "./dist/components/fx-morph.js"
465
+ },
466
+ "require": {
467
+ "types": "./dist/components/fx-morph.d.cts",
468
+ "default": "./dist/components/fx-morph.cjs"
469
+ }
470
+ },
451
471
  "./components/lite": {
452
472
  "import": {
453
473
  "types": "./dist/components/lite.d.ts",