motionary 6.7.0 → 6.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/docs/ROADMAP.md CHANGED
@@ -9,6 +9,6 @@
9
9
  - ✅ **v6.5** — 3D 场景卡片 + 组件:景深层叠卡、可旋转商品展示、立方体画廊、折纸展开、轨道相机叙事;新组件 时间轴、瀑布流(布局动画)、图片对比滑块。
10
10
  - ✅ **v6.6** — 形变与 SVG 2.0 + 组件:路径补间、液态 blob 按钮、描边绘制、SVG 滤镜转场、图标变形;新组件 Dock 栏(macOS 放大)、形变下划线导航、汉堡 → 关闭图标、提示 / 气泡。
11
11
  - ✅ **v6.7** — 转场大全 + 组件:涟漪溶解、碎片爆裂、马赛克翻牌、液体擦除、卷页、镜头推拉(View Transitions 优先,MPA 可用);新组件 步骤条 / 向导、分页、分段控件、开关变体。
12
- - **v6.8** — 天气与氛围 + 交互物理 2.0 + 组件:玻璃雨滴、积雪、安全闪电、雾、极光、昼夜光照;软体、布料、绳索、磁吸、弹球、重力翻转(Verlet);新组件 看板 / 拖拽排序、滑动卡片、下拉刷新。
12
+ - ✅ **v6.8** — 天气与氛围 + 交互物理 2.0 + 组件:玻璃雨滴、积雪、安全闪电、雾、极光、昼夜光照;软体、布料、绳索、磁吸、弹球、重力翻转(Verlet);新组件 看板 / 拖拽排序、滑动卡片、下拉刷新。
13
13
  - **v6.9** — 7.0 预备 + 组件:动画编辑器 2.0、效果市场清单格式、7.0 弃用警告、`upgrading-7.md` 与 `usa-codemod-7`;新组件 日期选择器、取色器、文件拖放区动画。
14
14
  - **v7.0** — 破坏性清理:移除 6.9 弃用的 API,效果包与组件按需拆分入口,WebGPU 渲染后端(WebGL2 回退),npm `latest`。
@@ -662,6 +662,33 @@ crossDocumentTransitions('camera-dolly'); // MPA: @view-tr
662
662
  - `<usa-switch variant="ios | daynight | bounce | liquid" checked disabled name value>`: `checked`, `toggle()`; `usa:change`.
663
663
  - Transitions 2.0 (`mode: "in" | "out"`): `ripple-dissolve` (`x`, `y`, from the pointer on click) · `shatter` (`pieces`) · `mosaic-flip` (`cols`, `rows`) · `liquid-wipe` (`direction`, `waves`) · `page-curl` · `camera-dolly` (`scale`). Reduced motion: short fades.
664
664
 
665
+ ### v6.8 Widgets: kanban, swipe deck, weather card, pull-cord (`components/widgets`) + weather & ambience (`components/fx-weather`) + physics 2.0 (`components/fx-physics`)
666
+
667
+ ```html
668
+ <usa-kanban label="Sprint">
669
+ <section data-title="To do"><h3>To do</h3><div data-card>Design</div></section>
670
+ <section data-title="Done"><h3>Done</h3></section>
671
+ </usa-kanban>
672
+ <usa-swipe-deck threshold="110"><article>Ada</article><article>Grace</article></usa-swipe-deck>
673
+ <usa-weather-card condition="snow" temp="-3" place="Oslo"></usa-weather-card>
674
+ <usa-pull-cord label="Desk lamp"></usa-pull-cord>
675
+
676
+ <usa-fx effect="rain-glass" trigger="load"><header>…</header></usa-fx>
677
+ <usa-fx effect="cloth" trigger="load"><div class="banner">…</div></usa-fx>
678
+ ```
679
+ ```js
680
+ import { defineWidgets } from 'motionary/components/widgets';
681
+ import { registerWeatherEffects } from 'motionary/components/fx-weather';
682
+ import { registerPhysicsEffects2, VerletWorld } from 'motionary/components/fx-physics';
683
+ defineWidgets(); registerWeatherEffects(); registerPhysicsEffects2();
684
+ ```
685
+ - `<usa-kanban>`: columns = children (`data-title` / first heading), cards = `[data-card]` or `<li>`; `move(card, column, index)`; `usa:move` (`{ card, from, to, index }`).
686
+ - `<usa-swipe-deck threshold>`: `like()`, `nope()`, `undo()`, `top`; `usa:swipe` (`{ card, dir, index }`), `usa:empty`.
687
+ - `<usa-weather-card condition temp unit place label>`: conditions `clear | cloudy | rain | snow | storm | fog | night`.
688
+ - `<usa-pull-cord threshold on>`: `on`, `toggle()`; `usa:change` (`{ on }`).
689
+ - Weather: `rain-glass` · `snowfall` (`pile`) · `lightning` (`interval` ≥ 2.5, `glow` ≤ 0.22) · `fog` · `aurora-veil` · `day-cycle` (`cycle`, `hour`); `skyAt(hour)`.
690
+ - Physics 2.0: `soft-body` (`stiffness`, `damping`) · `magnet` (`strength`, `radius`) · `cloth` · `rope` · `pinball`; `new VerletWorld(gravity, damping, iterations)`.
691
+
665
692
  ## Frameworks
666
693
 
667
694
  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": "motionary",
3
- "version": "6.7.0",
3
+ "version": "6.8.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",
@@ -478,6 +478,26 @@
478
478
  "default": "./dist/components/fx-transitions.cjs"
479
479
  }
480
480
  },
481
+ "./components/fx-weather": {
482
+ "import": {
483
+ "types": "./dist/components/fx-weather.d.ts",
484
+ "default": "./dist/components/fx-weather.js"
485
+ },
486
+ "require": {
487
+ "types": "./dist/components/fx-weather.d.cts",
488
+ "default": "./dist/components/fx-weather.cjs"
489
+ }
490
+ },
491
+ "./components/fx-physics": {
492
+ "import": {
493
+ "types": "./dist/components/fx-physics.d.ts",
494
+ "default": "./dist/components/fx-physics.js"
495
+ },
496
+ "require": {
497
+ "types": "./dist/components/fx-physics.d.cts",
498
+ "default": "./dist/components/fx-physics.cjs"
499
+ }
500
+ },
481
501
  "./components/lite": {
482
502
  "import": {
483
503
  "types": "./dist/components/lite.d.ts",