use-scroll-animate 3.1.0 → 3.2.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 +1 -0
- package/README_ja.md +1 -0
- package/README_zh.md +1 -0
- package/dist/chunks/{index-tags-Gw1G06Pb.cjs → index-tags-DCTX4F9b.cjs} +2 -1
- package/dist/chunks/{index-tags-Gw1G06Pb.cjs.map → index-tags-DCTX4F9b.cjs.map} +1 -1
- package/dist/chunks/{index-tags-D7NynL4r.js → index-tags-DZ-gjMZc.js} +2 -1
- package/dist/chunks/{index-tags-D7NynL4r.js.map → index-tags-DZ-gjMZc.js.map} +1 -1
- package/dist/components/gesture.cjs +387 -0
- package/dist/components/gesture.cjs.map +1 -0
- package/dist/components/gesture.css +3 -0
- package/dist/components/gesture.d.cts +169 -0
- package/dist/components/gesture.d.ts +169 -0
- package/dist/components/gesture.js +379 -0
- package/dist/components/gesture.js.map +1 -0
- package/dist/components/jsx.d.cts +1 -0
- package/dist/components/jsx.d.ts +1 -0
- package/dist/components/lazy.cjs +2 -1
- package/dist/components/lazy.cjs.map +1 -1
- package/dist/components/lazy.d.cts +1 -0
- package/dist/components/lazy.d.ts +1 -0
- package/dist/components/lazy.js +2 -1
- package/dist/components/lazy.js.map +1 -1
- package/dist/components/react.cjs +1 -1
- package/dist/components/react.js +1 -1
- package/dist/components/vue.cjs +2 -1
- package/dist/components/vue.cjs.map +1 -1
- package/dist/components/vue.d.cts +48 -0
- package/dist/components/vue.d.ts +48 -0
- package/dist/components/vue.js +2 -1
- package/dist/components/vue.js.map +1 -1
- package/dist/components.cjs +9 -1
- package/dist/components.cjs.map +1 -1
- package/dist/components.css +1 -0
- package/dist/components.d.cts +125 -2
- package/dist/components.d.ts +125 -2
- package/dist/components.js +5 -2
- 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 +8 -0
- package/package.json +13 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.2.0] - 2026-10-07
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **Gestures** — new category `use-scroll-animate/components/gesture`:
|
|
14
|
+
- `gesture(el, handlers, options)` — one Pointer Events recognizer for **pan** (`dx`, `dy`, `vx`, `vy`, `first`, `last`), **swipe** (direction + velocity), **pinch** (two pointers, or Ctrl/⌘ + wheel / trackpad pinch), **long-press**, **tap** and **double-tap**; `axis` lock keeps native scrolling on the other axis. Release velocities go straight into springs: `spring.set(0, vx)`. Pure helpers `swipeDirection()` and `pinchScale()` are exported.
|
|
15
|
+
- `<usa-swipeable>` — swipe-to-dismiss / swipe actions: follows the finger (rubber-banded past `distance`), flies out on a swipe, springs home otherwise; `axis`, `distance`, `preset`, `dismiss`; Delete / arrow keys; cancelable `usa:swipe`, `usa:dismiss`.
|
|
16
|
+
- `<usa-pinch-zoom>` — pinch / Ctrl + wheel zoom, pan while zoomed, double-tap toggle, springs back inside bounds; `min`, `max`, `double-tap`; `+` / `-` / `0` keys; `usa:zoom`.
|
|
17
|
+
- Reduced motion: no follow or fly-out animation (events still fire), zoom changes instantly.
|
|
18
|
+
- Showcase: new **Gestures** gallery category with a live `gesture()` + spring demo.
|
|
19
|
+
|
|
10
20
|
## [3.1.0] - 2026-10-07
|
|
11
21
|
|
|
12
22
|
### Added
|
package/README.md
CHANGED
|
@@ -56,6 +56,7 @@ defineComponents(); // or per category: import { defineTextComponents } from 'us
|
|
|
56
56
|
| **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 |
|
|
57
57
|
| **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()` |
|
|
58
58
|
| **Timeline & choreography** (`/components/timeline`) | `timeline()` (chain · overlap · labels · seek · reverse · scrub) · `<usa-timeline>` (`data-tl` steps) |
|
|
59
|
+
| **Gestures** (`/components/gesture`) | `gesture()` (pan · swipe · pinch · long-press · tap · double-tap → springs) · `<usa-swipeable>` · `<usa-pinch-zoom>` |
|
|
59
60
|
|
|
60
61
|
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.
|
|
61
62
|
|
package/README_ja.md
CHANGED
|
@@ -46,6 +46,7 @@ defineComponents(); // カテゴリ単位: import { defineTextComponents } from
|
|
|
46
46
|
| **UI コンポーネント・バリアント**(`/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` |
|
|
47
47
|
| **ページ・アプリ全体**(`/components/page`) | `pageTransition()` · `themeTransition()` · `<usa-cursor>` · `smoothScroll()` · `<usa-fullpage>` · `<usa-loading-bar>` · `<usa-back-to-top>` · `<usa-ambient>` · `<usa-splash>` · `<usa-auto-skeleton>` · `<usa-motion-switch>` |
|
|
48
48
|
| **タイムライン** (`/components/timeline`) | `timeline()`(連結 · 重ね · ラベル · シーク · 逆再生 · スクラブ)· `<usa-timeline>`(`data-tl` ステップ) |
|
|
49
|
+
| **ジェスチャー** (`/components/gesture`) | `gesture()`(パン · スワイプ · ピンチ · 長押し · タップ → スプリング)· `<usa-swipeable>` · `<usa-pinch-zoom>` |
|
|
49
50
|
|
|
50
51
|
## ドキュメント
|
|
51
52
|
|
package/README_zh.md
CHANGED
|
@@ -55,6 +55,7 @@ defineComponents(); // 或按分类:import { defineTextComponents } from 'use-
|
|
|
55
55
|
| **UI 组件与风格变体**(`/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`(极简 / 霓虹 / 玻璃 / 粗野 / Fluent / Material) |
|
|
56
56
|
| **页面与全局效果**(`/components/page`) | `pageTransition()` 页面切换(淡入 · 滑动 · 圆形揭示 · 百叶窗 · 像素溶解,单页 + 多页)· `themeTransition()` 主题圆形切换 · `<usa-cursor>` 自定义光标 · `smoothScroll()` · `<usa-fullpage>` 整屏 · `<usa-loading-bar>` · `<usa-back-to-top>` · `<usa-ambient>` 雪花 / 星空 / 噪点 · `<usa-splash>` 启动屏 · `<usa-auto-skeleton>` 自动骨架屏 · `<usa-motion-switch>` 动效强度 |
|
|
57
57
|
| **时间线与编排** (`/components/timeline`) | `timeline()`(串联 · 重叠 · 标签 · 跳转 · 倒放 · 滚动擦洗)· `<usa-timeline>`(`data-tl` 步骤) |
|
|
58
|
+
| **手势** (`/components/gesture`) | `gesture()`(拖动 · 轻扫 · 捏合 · 长按 · 单击 · 双击 → 弹簧)· `<usa-swipeable>` · `<usa-pinch-zoom>` |
|
|
58
59
|
|
|
59
60
|
完整包约 22 kB gzip(JS + CSS);单个分类 3.5–6.4 kB;单个组件约 2 kB。下方的滚动动画核心不受影响。
|
|
60
61
|
|
|
@@ -15,7 +15,8 @@ const COMPONENT_CATEGORIES = {
|
|
|
15
15
|
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'],
|
|
16
16
|
page: ['usa-cursor', 'usa-fullpage', 'usa-loading-bar', 'usa-back-to-top', 'usa-ambient', 'usa-splash', 'usa-auto-skeleton', 'usa-motion-switch'],
|
|
17
17
|
timeline: ['usa-timeline'],
|
|
18
|
+
gesture: ['usa-swipeable', 'usa-pinch-zoom'],
|
|
18
19
|
};
|
|
19
20
|
|
|
20
21
|
exports.COMPONENT_CATEGORIES = COMPONENT_CATEGORIES;
|
|
21
|
-
//# sourceMappingURL=index-tags-
|
|
22
|
+
//# sourceMappingURL=index-tags-DCTX4F9b.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-tags-
|
|
1
|
+
{"version":3,"file":"index-tags-DCTX4F9b.cjs","sources":["../../src/components/index-tags.ts"],"sourcesContent":["// The component categories and their default tags (no imports: safe for lazy loaders).\n/** The component categories and their default tags. */\nexport const COMPONENT_CATEGORIES = {\n reveal: ['usa-reveal', 'usa-stagger', 'usa-scroll-progress', 'usa-scrolly'],\n text: ['usa-typewriter', 'usa-split-text', 'usa-scramble', 'usa-counter', 'usa-shimmer-text', 'usa-text-rotate', 'usa-wave-text', 'usa-glitch', 'usa-gradient-text', 'usa-handwriting', 'usa-scroll-highlight'],\n interaction: ['usa-ripple', 'usa-magnetic', 'usa-tilt', 'usa-spotlight', 'usa-press', 'usa-toggle'],\n feedback: ['usa-spinner', 'usa-skeleton', 'usa-progress', 'usa-toaster', 'usa-check'],\n background: ['usa-aurora', 'usa-particles', 'usa-grain', 'usa-marquee', 'usa-acrylic', 'usa-grid-glow', 'usa-blobs', 'usa-water-ripple', 'usa-dot-network'],\n transitions: ['usa-dialog', 'usa-accordion', 'usa-flip-list', 'usa-view-switch'],\n physics: ['usa-spring', 'usa-draggable', 'usa-overscroll'],\n cards: ['usa-card', 'usa-card-stack', 'usa-sticky-stack', 'usa-carousel-3d'],\n click: ['usa-click', 'usa-button', 'usa-icon-morph', 'usa-like', 'usa-hold', 'usa-double-tap', 'usa-checkbox'],\n 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'],\n page: ['usa-cursor', 'usa-fullpage', 'usa-loading-bar', 'usa-back-to-top', 'usa-ambient', 'usa-splash', 'usa-auto-skeleton', 'usa-motion-switch'],\n timeline: ['usa-timeline'],\n gesture: ['usa-swipeable', 'usa-pinch-zoom'],\n} as const;\n\nexport type ComponentCategory = keyof typeof COMPONENT_CATEGORIES;\n"],"names":[],"mappings":";;AAAA;AACA;AACO,MAAM,oBAAoB,GAAG;IAClC,MAAM,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,aAAa,CAAC;IAC3E,IAAI,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,sBAAsB,CAAC;AAC/M,IAAA,WAAW,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,CAAC;IACnG,QAAQ,EAAE,CAAC,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,CAAC;AACrF,IAAA,UAAU,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,kBAAkB,EAAE,iBAAiB,CAAC;IAC3J,WAAW,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,iBAAiB,CAAC;AAChF,IAAA,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,gBAAgB,CAAC;IAC1D,KAAK,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,CAAC;AAC5E,IAAA,KAAK,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,cAAc,CAAC;IAC9G,EAAE,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,kBAAkB,CAAC;AAC1L,IAAA,IAAI,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,CAAC;IACjJ,QAAQ,EAAE,CAAC,cAAc,CAAC;AAC1B,IAAA,OAAO,EAAE,CAAC,eAAe,EAAE,gBAAgB,CAAC;;;;;"}
|
|
@@ -13,7 +13,8 @@ const COMPONENT_CATEGORIES = {
|
|
|
13
13
|
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'],
|
|
14
14
|
page: ['usa-cursor', 'usa-fullpage', 'usa-loading-bar', 'usa-back-to-top', 'usa-ambient', 'usa-splash', 'usa-auto-skeleton', 'usa-motion-switch'],
|
|
15
15
|
timeline: ['usa-timeline'],
|
|
16
|
+
gesture: ['usa-swipeable', 'usa-pinch-zoom'],
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
export { COMPONENT_CATEGORIES as C };
|
|
19
|
-
//# sourceMappingURL=index-tags-
|
|
20
|
+
//# sourceMappingURL=index-tags-DZ-gjMZc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-tags-
|
|
1
|
+
{"version":3,"file":"index-tags-DZ-gjMZc.js","sources":["../../src/components/index-tags.ts"],"sourcesContent":["// The component categories and their default tags (no imports: safe for lazy loaders).\n/** The component categories and their default tags. */\nexport const COMPONENT_CATEGORIES = {\n reveal: ['usa-reveal', 'usa-stagger', 'usa-scroll-progress', 'usa-scrolly'],\n text: ['usa-typewriter', 'usa-split-text', 'usa-scramble', 'usa-counter', 'usa-shimmer-text', 'usa-text-rotate', 'usa-wave-text', 'usa-glitch', 'usa-gradient-text', 'usa-handwriting', 'usa-scroll-highlight'],\n interaction: ['usa-ripple', 'usa-magnetic', 'usa-tilt', 'usa-spotlight', 'usa-press', 'usa-toggle'],\n feedback: ['usa-spinner', 'usa-skeleton', 'usa-progress', 'usa-toaster', 'usa-check'],\n background: ['usa-aurora', 'usa-particles', 'usa-grain', 'usa-marquee', 'usa-acrylic', 'usa-grid-glow', 'usa-blobs', 'usa-water-ripple', 'usa-dot-network'],\n transitions: ['usa-dialog', 'usa-accordion', 'usa-flip-list', 'usa-view-switch'],\n physics: ['usa-spring', 'usa-draggable', 'usa-overscroll'],\n cards: ['usa-card', 'usa-card-stack', 'usa-sticky-stack', 'usa-carousel-3d'],\n click: ['usa-click', 'usa-button', 'usa-icon-morph', 'usa-like', 'usa-hold', 'usa-double-tap', 'usa-checkbox'],\n 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'],\n page: ['usa-cursor', 'usa-fullpage', 'usa-loading-bar', 'usa-back-to-top', 'usa-ambient', 'usa-splash', 'usa-auto-skeleton', 'usa-motion-switch'],\n timeline: ['usa-timeline'],\n gesture: ['usa-swipeable', 'usa-pinch-zoom'],\n} as const;\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AAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,aAAa,EAAE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,CAAC;IACjJ,QAAQ,EAAE,CAAC,cAAc,CAAC;AAC1B,IAAA,OAAO,EAAE,CAAC,eAAe,EAAE,gBAAgB,CAAC;;;;;"}
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var base = require('../chunks/base-CXx7jZ-o.cjs');
|
|
4
|
+
var spring = require('../chunks/spring-2OTnYCzm.cjs');
|
|
5
|
+
|
|
6
|
+
/** The swipe a pointer release represents, or `null` (pure). */
|
|
7
|
+
function swipeDirection(dx, dy, vx, vy, o = {}) {
|
|
8
|
+
const dist = o.distance ?? 40;
|
|
9
|
+
const vel = o.velocity ?? 300;
|
|
10
|
+
const horiz = o.axis === 'x' || (o.axis !== 'y' && Math.abs(dx) >= Math.abs(dy));
|
|
11
|
+
const d = horiz ? dx : dy;
|
|
12
|
+
const v = horiz ? vx : vy;
|
|
13
|
+
if (Math.abs(d) < dist && Math.abs(v) < vel * 2)
|
|
14
|
+
return null;
|
|
15
|
+
if (Math.abs(v) < vel && Math.abs(d) < dist * 3)
|
|
16
|
+
return null;
|
|
17
|
+
const direction = horiz ? (d > 0 ? 'right' : 'left') : d > 0 ? 'down' : 'up';
|
|
18
|
+
return { direction, velocity: Math.abs(v), dx, dy };
|
|
19
|
+
}
|
|
20
|
+
/** Scale between two pointer distances, clamped to [min, max] (pure). */
|
|
21
|
+
function pinchScale(startDistance, distance, base$1 = 1, min = 0.5, max = 4) {
|
|
22
|
+
if (!startDistance)
|
|
23
|
+
return base$1;
|
|
24
|
+
return base.clamp(base$1 * (distance / startDistance), min, max);
|
|
25
|
+
}
|
|
26
|
+
const pid = (e) => (typeof e.pointerId === 'number' ? e.pointerId : 1);
|
|
27
|
+
/**
|
|
28
|
+
* One recognizer for pan, swipe, pinch (two pointers or Ctrl + wheel),
|
|
29
|
+
* long-press, tap and double-tap, with velocities ready to hand to a spring
|
|
30
|
+
* (`createSpring().set(target, velocity)`). Works with mouse, touch and pen
|
|
31
|
+
* through Pointer Events. Returns a cleanup function.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* const x = createSpring({ onUpdate: (v) => (card.style.translate = `${v}px`) });
|
|
35
|
+
* gesture(card, {
|
|
36
|
+
* onPan: ({ dx, last, vx }) => (last ? x.set(0, vx) : x.jump(dx)),
|
|
37
|
+
* onSwipe: ({ direction }) => dismiss(direction),
|
|
38
|
+
* }, { axis: 'x' });
|
|
39
|
+
*/
|
|
40
|
+
function gesture(el, h, o = {}) {
|
|
41
|
+
const pts = new Map();
|
|
42
|
+
let start = { x: 0, y: 0 };
|
|
43
|
+
let last = { x: 0, y: 0, t: 0 };
|
|
44
|
+
let vx = 0;
|
|
45
|
+
let vy = 0;
|
|
46
|
+
let panning = false;
|
|
47
|
+
let pinch = null;
|
|
48
|
+
let pinchScaleNow = 1;
|
|
49
|
+
let press;
|
|
50
|
+
let pressed = false;
|
|
51
|
+
let lastTap = -1e9;
|
|
52
|
+
const th = o.threshold ?? 4;
|
|
53
|
+
const dist = () => {
|
|
54
|
+
const [a, b] = [...pts.values()];
|
|
55
|
+
return Math.hypot(a.x - b.x, a.y - b.y);
|
|
56
|
+
};
|
|
57
|
+
const mid = () => {
|
|
58
|
+
const [a, b] = [...pts.values()];
|
|
59
|
+
return { x: (a.x + b.x) / 2, y: (a.y + b.y) / 2 };
|
|
60
|
+
};
|
|
61
|
+
const t = (e) => (e.timeStamp || Date.now());
|
|
62
|
+
const down = (e) => {
|
|
63
|
+
pts.set(pid(e), { x: e.clientX, y: e.clientY });
|
|
64
|
+
try {
|
|
65
|
+
el.setPointerCapture?.(pid(e));
|
|
66
|
+
}
|
|
67
|
+
catch { /* jsdom / synthetic */ }
|
|
68
|
+
if (pts.size === 2 && h.onPinch) {
|
|
69
|
+
clearTimeout(press);
|
|
70
|
+
if (panning)
|
|
71
|
+
h.onPan?.({ dx: last.x - start.x, dy: last.y - start.y, vx: 0, vy: 0, first: false, last: true, event: e });
|
|
72
|
+
panning = false;
|
|
73
|
+
pinch = { d0: dist(), first: true };
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
if (pts.size > 1)
|
|
77
|
+
return;
|
|
78
|
+
start = { x: e.clientX, y: e.clientY };
|
|
79
|
+
last = { ...start, t: t(e) };
|
|
80
|
+
vx = vy = 0;
|
|
81
|
+
pressed = false;
|
|
82
|
+
if (h.onLongPress)
|
|
83
|
+
press = setTimeout(() => { pressed = true; h.onLongPress?.({ x: start.x, y: start.y }); }, o.longPress ?? 500);
|
|
84
|
+
};
|
|
85
|
+
const move = (e) => {
|
|
86
|
+
if (!pts.has(pid(e)))
|
|
87
|
+
return;
|
|
88
|
+
pts.set(pid(e), { x: e.clientX, y: e.clientY });
|
|
89
|
+
if (pinch && pts.size >= 2) {
|
|
90
|
+
const m = mid();
|
|
91
|
+
pinchScaleNow = pinchScale(pinch.d0, dist(), 1, 0.05, 20);
|
|
92
|
+
h.onPinch?.({ scale: pinchScaleNow, x: m.x, y: m.y, first: pinch.first, last: false });
|
|
93
|
+
pinch.first = false;
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const dx = e.clientX - start.x;
|
|
97
|
+
const dy = e.clientY - start.y;
|
|
98
|
+
const dt = Math.max(1, t(e) - last.t) / 1000;
|
|
99
|
+
vx = (e.clientX - last.x) / dt;
|
|
100
|
+
vy = (e.clientY - last.y) / dt;
|
|
101
|
+
last = { x: e.clientX, y: e.clientY, t: t(e) };
|
|
102
|
+
if (!panning) {
|
|
103
|
+
const off = o.axis === 'x' ? Math.abs(dx) : o.axis === 'y' ? Math.abs(dy) : Math.hypot(dx, dy);
|
|
104
|
+
if (off < th)
|
|
105
|
+
return;
|
|
106
|
+
clearTimeout(press);
|
|
107
|
+
if (o.axis && Math.abs(o.axis === 'x' ? dy : dx) > off) {
|
|
108
|
+
pts.delete(pid(e));
|
|
109
|
+
return;
|
|
110
|
+
} // wrong axis: let the page scroll
|
|
111
|
+
panning = true;
|
|
112
|
+
h.onPan?.({ dx: o.axis === 'y' ? 0 : dx, dy: o.axis === 'x' ? 0 : dy, vx, vy, first: true, last: false, event: e });
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (e.cancelable)
|
|
116
|
+
e.preventDefault();
|
|
117
|
+
h.onPan?.({ dx: o.axis === 'y' ? 0 : dx, dy: o.axis === 'x' ? 0 : dy, vx, vy, first: false, last: false, event: e });
|
|
118
|
+
};
|
|
119
|
+
const up = (e) => {
|
|
120
|
+
if (!pts.has(pid(e)))
|
|
121
|
+
return;
|
|
122
|
+
pts.delete(pid(e));
|
|
123
|
+
clearTimeout(press);
|
|
124
|
+
if (pinch) {
|
|
125
|
+
if (pts.size < 2) {
|
|
126
|
+
h.onPinch?.({ scale: pinchScaleNow, ...start, first: false, last: true });
|
|
127
|
+
pinch = null;
|
|
128
|
+
pts.clear();
|
|
129
|
+
}
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const dx = e.clientX - start.x;
|
|
133
|
+
const dy = e.clientY - start.y;
|
|
134
|
+
if (panning) {
|
|
135
|
+
panning = false;
|
|
136
|
+
if (t(e) - last.t > 80)
|
|
137
|
+
vx = vy = 0; // paused before release
|
|
138
|
+
h.onPan?.({ dx: o.axis === 'y' ? 0 : dx, dy: o.axis === 'x' ? 0 : dy, vx, vy, first: false, last: true, event: e });
|
|
139
|
+
const s = swipeDirection(dx, dy, vx, vy, { distance: o.swipeDistance, velocity: o.swipeVelocity, axis: o.axis });
|
|
140
|
+
if (s)
|
|
141
|
+
h.onSwipe?.(s);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
if (pressed || e.type === 'pointercancel')
|
|
145
|
+
return;
|
|
146
|
+
const p = { x: e.clientX, y: e.clientY };
|
|
147
|
+
const n = t(e);
|
|
148
|
+
if (h.onDoubleTap && n - lastTap < 300) {
|
|
149
|
+
lastTap = -1e9;
|
|
150
|
+
h.onDoubleTap(p);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
lastTap = n;
|
|
154
|
+
h.onTap?.(p);
|
|
155
|
+
};
|
|
156
|
+
const wheel = (e) => {
|
|
157
|
+
if (!h.onPinch || o.wheelPinch === false || !e.ctrlKey)
|
|
158
|
+
return;
|
|
159
|
+
e.preventDefault();
|
|
160
|
+
const s = Math.exp(-e.deltaY / 100);
|
|
161
|
+
h.onPinch({ scale: s, x: e.clientX, y: e.clientY, first: true, last: true });
|
|
162
|
+
};
|
|
163
|
+
const opts = { passive: false };
|
|
164
|
+
el.addEventListener('pointerdown', down);
|
|
165
|
+
el.addEventListener('pointermove', move, opts);
|
|
166
|
+
el.addEventListener('pointerup', up);
|
|
167
|
+
el.addEventListener('pointercancel', up);
|
|
168
|
+
el.addEventListener('wheel', wheel, opts);
|
|
169
|
+
if (o.axis && !el.style.touchAction)
|
|
170
|
+
el.style.touchAction = o.axis === 'x' ? 'pan-y' : 'pan-x';
|
|
171
|
+
else if (!o.axis && !el.style.touchAction && (h.onPan || h.onPinch))
|
|
172
|
+
el.style.touchAction = 'none';
|
|
173
|
+
return () => {
|
|
174
|
+
clearTimeout(press);
|
|
175
|
+
el.removeEventListener('pointerdown', down);
|
|
176
|
+
el.removeEventListener('pointermove', move, opts);
|
|
177
|
+
el.removeEventListener('pointerup', up);
|
|
178
|
+
el.removeEventListener('pointercancel', up);
|
|
179
|
+
el.removeEventListener('wheel', wheel, opts);
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
var css = "usa-swipeable{display:block;touch-action:pan-y;user-select:none;-webkit-user-select:none}usa-swipeable[axis=\"y\"]{touch-action:pan-x}usa-swipeable>*{transform:translate3d(var(--usa-swipe,0px),0,0);opacity:calc(1 - var(--usa-swipe-p,0) * 0.5)}usa-swipeable[axis=\"y\"]>*{transform:translate3d(0,var(--usa-swipe,0px),0)}usa-swipeable:focus-visible{outline:2px solid currentColor;outline-offset:2px}usa-pinch-zoom{display:block;overflow:hidden;touch-action:none;position:relative}usa-pinch-zoom>*{transform:translate3d(var(--usa-zoom-x,0px),var(--usa-zoom-y,0px),0) scale(var(--usa-zoom,1));transform-origin:50% 50%}usa-pinch-zoom[data-zoomed]{cursor:grab}usa-pinch-zoom:focus-visible{outline:2px solid currentColor;outline-offset:2px}";
|
|
184
|
+
|
|
185
|
+
function defineSwipeable(tag = 'usa-swipeable') {
|
|
186
|
+
return base.defineElement(tag, (Base) => class UsaSwipeable extends Base {
|
|
187
|
+
constructor() {
|
|
188
|
+
super(...arguments);
|
|
189
|
+
this._off = 0;
|
|
190
|
+
}
|
|
191
|
+
static get observedAttributes() {
|
|
192
|
+
return ['axis', 'disabled'];
|
|
193
|
+
}
|
|
194
|
+
get offset() {
|
|
195
|
+
return this._off;
|
|
196
|
+
}
|
|
197
|
+
put(v) {
|
|
198
|
+
this._off = v;
|
|
199
|
+
this.style.setProperty('--usa-swipe', `${v}px`);
|
|
200
|
+
this.style.setProperty('--usa-swipe-p', String(Math.min(1, Math.abs(v) / this.num('distance', 120))));
|
|
201
|
+
}
|
|
202
|
+
swipe(direction) {
|
|
203
|
+
if (!this.emit('swipe', { direction }))
|
|
204
|
+
return this.reset();
|
|
205
|
+
const sign = direction === 'left' || direction === 'up' ? -1 : 1;
|
|
206
|
+
const far = sign * ((this.str('axis', 'x') === 'y' ? this.offsetHeight : this.offsetWidth) + 80 || 600);
|
|
207
|
+
const done = () => {
|
|
208
|
+
this.emit('dismiss', { direction });
|
|
209
|
+
if (this.flag('dismiss'))
|
|
210
|
+
this.remove();
|
|
211
|
+
};
|
|
212
|
+
if (this.reduced) {
|
|
213
|
+
this.put(0);
|
|
214
|
+
return done();
|
|
215
|
+
}
|
|
216
|
+
this.setAttribute('data-gone', '');
|
|
217
|
+
this._s = spring.createSpring({ spring: 'stiff', value: this._off, onUpdate: (v) => this.put(v), onRest: done });
|
|
218
|
+
this._s.set(far, sign * 1500);
|
|
219
|
+
}
|
|
220
|
+
reset() {
|
|
221
|
+
this.removeAttribute('data-gone');
|
|
222
|
+
if (this.reduced)
|
|
223
|
+
return this.put(0);
|
|
224
|
+
this._s.set(0);
|
|
225
|
+
}
|
|
226
|
+
mount() {
|
|
227
|
+
this._s = spring.createSpring({ spring: this.str('preset', 'default'), onUpdate: (v) => this.put(v) });
|
|
228
|
+
if (!this.hasAttribute('tabindex'))
|
|
229
|
+
this.tabIndex = 0;
|
|
230
|
+
const y = this.str('axis', 'x') === 'y';
|
|
231
|
+
const max = () => this.num('distance', 120);
|
|
232
|
+
this.onCleanup(gesture(this, {
|
|
233
|
+
onPan: ({ dx, dy, vx, vy, last }) => {
|
|
234
|
+
if (this.flag('disabled'))
|
|
235
|
+
return;
|
|
236
|
+
const d = y ? dy : dx;
|
|
237
|
+
if (!last) {
|
|
238
|
+
this._s.stop();
|
|
239
|
+
if (!this.reduced)
|
|
240
|
+
this.put(Math.abs(d) > max() ? Math.sign(d) * (max() + (Math.abs(d) - max()) * 0.35) : d);
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
if (Math.abs(d) > max())
|
|
244
|
+
this.swipe(y ? (d > 0 ? 'down' : 'up') : d > 0 ? 'right' : 'left');
|
|
245
|
+
else if (!this.hasAttribute('data-gone')) {
|
|
246
|
+
if (this.reduced)
|
|
247
|
+
this.put(0);
|
|
248
|
+
else
|
|
249
|
+
this._s.set(0, y ? vy : vx);
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
onSwipe: ({ direction }) => {
|
|
253
|
+
if (this.flag('disabled') || this.hasAttribute('data-gone'))
|
|
254
|
+
return;
|
|
255
|
+
if (y === (direction === 'up' || direction === 'down'))
|
|
256
|
+
this.swipe(direction);
|
|
257
|
+
},
|
|
258
|
+
}, { axis: y ? 'y' : 'x' }));
|
|
259
|
+
this.listen(this, 'keydown', (e) => {
|
|
260
|
+
if (this.flag('disabled'))
|
|
261
|
+
return;
|
|
262
|
+
const map = y ? { ArrowUp: 'up', ArrowDown: 'down' } : { ArrowLeft: 'left', ArrowRight: 'right' };
|
|
263
|
+
if (e.key === 'Delete' || e.key === 'Backspace')
|
|
264
|
+
this.swipe(y ? 'up' : 'left');
|
|
265
|
+
else if (map[e.key])
|
|
266
|
+
this.swipe(map[e.key]);
|
|
267
|
+
else
|
|
268
|
+
return;
|
|
269
|
+
e.preventDefault();
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
unmount() {
|
|
273
|
+
this._s?.stop();
|
|
274
|
+
}
|
|
275
|
+
}, { id: 'gesture', text: css });
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
function definePinchZoom(tag = 'usa-pinch-zoom') {
|
|
279
|
+
return base.defineElement(tag, (Base) => class UsaPinchZoom extends Base {
|
|
280
|
+
constructor() {
|
|
281
|
+
super(...arguments);
|
|
282
|
+
this._v = { k: 1, x: 0, y: 0 };
|
|
283
|
+
}
|
|
284
|
+
get scale() {
|
|
285
|
+
return this._v.k;
|
|
286
|
+
}
|
|
287
|
+
paint() {
|
|
288
|
+
const { k, x, y } = this._v;
|
|
289
|
+
this.style.setProperty('--usa-zoom', String(k));
|
|
290
|
+
this.style.setProperty('--usa-zoom-x', `${x}px`);
|
|
291
|
+
this.style.setProperty('--usa-zoom-y', `${y}px`);
|
|
292
|
+
this.toggleAttribute('data-zoomed', k > 1.01);
|
|
293
|
+
}
|
|
294
|
+
bound(k, x, y) {
|
|
295
|
+
const w = (this.clientWidth * (k - 1)) / 2;
|
|
296
|
+
const h = (this.clientHeight * (k - 1)) / 2;
|
|
297
|
+
return { x: base.clamp(x, -w, w), y: base.clamp(y, -h, h) };
|
|
298
|
+
}
|
|
299
|
+
zoomTo(scale) {
|
|
300
|
+
const k = base.clamp(scale, this.num('min', 1), this.num('max', 4));
|
|
301
|
+
const b = this.bound(k, this._v.x, this._v.y);
|
|
302
|
+
if (this.reduced) {
|
|
303
|
+
this._v = { k, ...b };
|
|
304
|
+
this.paint();
|
|
305
|
+
}
|
|
306
|
+
else {
|
|
307
|
+
this._k.set(k);
|
|
308
|
+
this._x.set(b.x);
|
|
309
|
+
this._y.set(b.y);
|
|
310
|
+
}
|
|
311
|
+
this.emit('zoom', { scale: k });
|
|
312
|
+
}
|
|
313
|
+
mount() {
|
|
314
|
+
const preset = this.str('preset', 'gentle');
|
|
315
|
+
this._k = spring.createSpring({ spring: preset, value: this._v.k, onUpdate: (v) => ((this._v.k = v), this.paint()) });
|
|
316
|
+
this._x = spring.createSpring({ spring: preset, value: this._v.x, onUpdate: (v) => ((this._v.x = v), this.paint()) });
|
|
317
|
+
this._y = spring.createSpring({ spring: preset, value: this._v.y, onUpdate: (v) => ((this._v.y = v), this.paint()) });
|
|
318
|
+
if (!this.hasAttribute('tabindex'))
|
|
319
|
+
this.tabIndex = 0;
|
|
320
|
+
let base$1 = 1;
|
|
321
|
+
let ox = 0;
|
|
322
|
+
let oy = 0;
|
|
323
|
+
this.onCleanup(gesture(this, {
|
|
324
|
+
onPinch: ({ scale, first, last }) => {
|
|
325
|
+
if (first)
|
|
326
|
+
base$1 = this._v.k;
|
|
327
|
+
const k = base.clamp(base$1 * scale, this.num('min', 1) * 0.7, this.num('max', 4) * 1.3);
|
|
328
|
+
if (last)
|
|
329
|
+
return this.zoomTo(k);
|
|
330
|
+
this._k.jump(k);
|
|
331
|
+
},
|
|
332
|
+
onPan: ({ dx, dy, vx, vy, first, last }) => {
|
|
333
|
+
if (this._v.k <= 1.01)
|
|
334
|
+
return;
|
|
335
|
+
if (first)
|
|
336
|
+
((ox = this._v.x), (oy = this._v.y));
|
|
337
|
+
if (!last) {
|
|
338
|
+
this._x.jump(ox + dx);
|
|
339
|
+
this._y.jump(oy + dy);
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
const b = this.bound(this._v.k, ox + dx + vx * 0.15, oy + dy + vy * 0.15);
|
|
343
|
+
this._x.set(b.x, vx);
|
|
344
|
+
this._y.set(b.y, vy);
|
|
345
|
+
},
|
|
346
|
+
onDoubleTap: () => this.zoomTo(this._v.k > 1.01 ? 1 : this.num('double-tap', 2)),
|
|
347
|
+
}));
|
|
348
|
+
this.listen(this, 'keydown', (e) => {
|
|
349
|
+
if (e.key === '+' || e.key === '=')
|
|
350
|
+
this.zoomTo(this._v.k * 1.25);
|
|
351
|
+
else if (e.key === '-')
|
|
352
|
+
this.zoomTo(this._v.k / 1.25);
|
|
353
|
+
else if (e.key === '0')
|
|
354
|
+
this.zoomTo(1);
|
|
355
|
+
else
|
|
356
|
+
return;
|
|
357
|
+
e.preventDefault();
|
|
358
|
+
});
|
|
359
|
+
this.paint();
|
|
360
|
+
}
|
|
361
|
+
unmount() {
|
|
362
|
+
[this._k, this._x, this._y].forEach((s) => s?.stop());
|
|
363
|
+
}
|
|
364
|
+
}, { id: 'gesture', text: css });
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* use-scroll-animate/components/gesture — unified gestures (v3.2).
|
|
369
|
+
* `gesture()` recognises pan, swipe, pinch, long-press, tap and double-tap
|
|
370
|
+
* with release velocities for springs; `<usa-swipeable>` (swipe-to-dismiss)
|
|
371
|
+
* and `<usa-pinch-zoom>` are built on it.
|
|
372
|
+
*/
|
|
373
|
+
/** Register every component of this category under its default tag. */
|
|
374
|
+
function defineGestureComponents() {
|
|
375
|
+
defineSwipeable();
|
|
376
|
+
definePinchZoom();
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
exports.configureComponents = base.configureComponents;
|
|
380
|
+
exports.prefersReducedMotion = base.prefersReducedMotion;
|
|
381
|
+
exports.defineGestureComponents = defineGestureComponents;
|
|
382
|
+
exports.definePinchZoom = definePinchZoom;
|
|
383
|
+
exports.defineSwipeable = defineSwipeable;
|
|
384
|
+
exports.gesture = gesture;
|
|
385
|
+
exports.pinchScale = pinchScale;
|
|
386
|
+
exports.swipeDirection = swipeDirection;
|
|
387
|
+
//# sourceMappingURL=gesture.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gesture.cjs","sources":["../../src/components/gesture/core.ts","../../src/components/gesture/swipeable.ts","../../src/components/gesture/pinch-zoom.ts","../../src/components/gesture/index.ts"],"sourcesContent":["import { clamp } from '../base';\n\nexport interface PanState {\n /** Offset from the gesture start (px). */\n dx: number;\n dy: number;\n /** Velocity (px/s). */\n vx: number;\n vy: number;\n first: boolean;\n last: boolean;\n event: Event;\n}\nexport type SwipeDirection = 'left' | 'right' | 'up' | 'down';\nexport interface SwipeState { direction: SwipeDirection; velocity: number; dx: number; dy: number }\nexport interface PinchState { scale: number; /** Midpoint of the two pointers (client px). */ x: number; y: number; first: boolean; last: boolean }\nexport interface PressState { x: number; y: number }\n\nexport interface GestureHandlers {\n onPan?: (s: PanState) => void;\n onSwipe?: (s: SwipeState) => void;\n onPinch?: (s: PinchState) => void;\n onLongPress?: (s: PressState) => void;\n onTap?: (s: PressState) => void;\n onDoubleTap?: (s: PressState) => void;\n}\n\nexport interface GestureOptions {\n /** Restrict panning to an axis. */\n axis?: 'x' | 'y';\n /** Movement (px) before a pan starts (default 4). */\n threshold?: number;\n /** Minimum distance (px, default 40) and speed (px/s, default 300) for a swipe. */\n swipeDistance?: number;\n swipeVelocity?: number;\n /** Long-press delay (ms, default 500). */\n longPress?: number;\n /** Ctrl/⌘ + wheel (trackpad pinch) counts as pinch (default true). */\n wheelPinch?: boolean;\n}\n\n/** The swipe a pointer release represents, or `null` (pure). */\nexport function swipeDirection(dx: number, dy: number, vx: number, vy: number, o: { distance?: number; velocity?: number; axis?: 'x' | 'y' } = {}): SwipeState | null {\n const dist = o.distance ?? 40;\n const vel = o.velocity ?? 300;\n const horiz = o.axis === 'x' || (o.axis !== 'y' && Math.abs(dx) >= Math.abs(dy));\n const d = horiz ? dx : dy;\n const v = horiz ? vx : vy;\n if (Math.abs(d) < dist && Math.abs(v) < vel * 2) return null;\n if (Math.abs(v) < vel && Math.abs(d) < dist * 3) return null;\n const direction: SwipeDirection = horiz ? (d > 0 ? 'right' : 'left') : d > 0 ? 'down' : 'up';\n return { direction, velocity: Math.abs(v), dx, dy };\n}\n\n/** Scale between two pointer distances, clamped to [min, max] (pure). */\nexport function pinchScale(startDistance: number, distance: number, base = 1, min = 0.5, max = 4): number {\n if (!startDistance) return base;\n return clamp(base * (distance / startDistance), min, max);\n}\n\ntype P = { x: number; y: number };\nconst pid = (e: any): number => (typeof e.pointerId === 'number' ? e.pointerId : 1);\n\n/**\n * One recognizer for pan, swipe, pinch (two pointers or Ctrl + wheel),\n * long-press, tap and double-tap, with velocities ready to hand to a spring\n * (`createSpring().set(target, velocity)`). Works with mouse, touch and pen\n * through Pointer Events. Returns a cleanup function.\n *\n * @example\n * const x = createSpring({ onUpdate: (v) => (card.style.translate = `${v}px`) });\n * gesture(card, {\n * onPan: ({ dx, last, vx }) => (last ? x.set(0, vx) : x.jump(dx)),\n * onSwipe: ({ direction }) => dismiss(direction),\n * }, { axis: 'x' });\n */\nexport function gesture(el: HTMLElement, h: GestureHandlers, o: GestureOptions = {}): () => void {\n const pts = new Map<number, P>();\n let start: P = { x: 0, y: 0 };\n let last: P & { t: number } = { x: 0, y: 0, t: 0 };\n let vx = 0;\n let vy = 0;\n let panning = false;\n let pinch: { d0: number; first: boolean } | null = null;\n let pinchScaleNow = 1;\n let press: ReturnType<typeof setTimeout> | undefined;\n let pressed = false;\n let lastTap = -1e9;\n const th = o.threshold ?? 4;\n const dist = () => {\n const [a, b] = [...pts.values()];\n return Math.hypot(a.x - b.x, a.y - b.y);\n };\n const mid = () => {\n const [a, b] = [...pts.values()];\n return { x: (a.x + b.x) / 2, y: (a.y + b.y) / 2 };\n };\n const t = (e: Event) => (e.timeStamp || Date.now());\n\n const down = (e: PointerEvent) => {\n pts.set(pid(e), { x: e.clientX, y: e.clientY });\n try { el.setPointerCapture?.(pid(e)); } catch { /* jsdom / synthetic */ }\n if (pts.size === 2 && h.onPinch) {\n clearTimeout(press);\n if (panning) h.onPan?.({ dx: last.x - start.x, dy: last.y - start.y, vx: 0, vy: 0, first: false, last: true, event: e });\n panning = false;\n pinch = { d0: dist(), first: true };\n return;\n }\n if (pts.size > 1) return;\n start = { x: e.clientX, y: e.clientY };\n last = { ...start, t: t(e) };\n vx = vy = 0;\n pressed = false;\n if (h.onLongPress) press = setTimeout(() => { pressed = true; h.onLongPress?.({ x: start.x, y: start.y }); }, o.longPress ?? 500);\n };\n const move = (e: PointerEvent) => {\n if (!pts.has(pid(e))) return;\n pts.set(pid(e), { x: e.clientX, y: e.clientY });\n if (pinch && pts.size >= 2) {\n const m = mid();\n pinchScaleNow = pinchScale(pinch.d0, dist(), 1, 0.05, 20);\n h.onPinch?.({ scale: pinchScaleNow, x: m.x, y: m.y, first: pinch.first, last: false });\n pinch.first = false;\n return;\n }\n const dx = e.clientX - start.x;\n const dy = e.clientY - start.y;\n const dt = Math.max(1, t(e) - last.t) / 1000;\n vx = (e.clientX - last.x) / dt;\n vy = (e.clientY - last.y) / dt;\n last = { x: e.clientX, y: e.clientY, t: t(e) };\n if (!panning) {\n const off = o.axis === 'x' ? Math.abs(dx) : o.axis === 'y' ? Math.abs(dy) : Math.hypot(dx, dy);\n if (off < th) return;\n clearTimeout(press);\n if (o.axis && Math.abs(o.axis === 'x' ? dy : dx) > off) { pts.delete(pid(e)); return; } // wrong axis: let the page scroll\n panning = true;\n h.onPan?.({ dx: o.axis === 'y' ? 0 : dx, dy: o.axis === 'x' ? 0 : dy, vx, vy, first: true, last: false, event: e });\n return;\n }\n if (e.cancelable) e.preventDefault();\n h.onPan?.({ dx: o.axis === 'y' ? 0 : dx, dy: o.axis === 'x' ? 0 : dy, vx, vy, first: false, last: false, event: e });\n };\n const up = (e: PointerEvent) => {\n if (!pts.has(pid(e))) return;\n pts.delete(pid(e));\n clearTimeout(press);\n if (pinch) {\n if (pts.size < 2) {\n h.onPinch?.({ scale: pinchScaleNow, ...start, first: false, last: true });\n pinch = null;\n pts.clear();\n }\n return;\n }\n const dx = e.clientX - start.x;\n const dy = e.clientY - start.y;\n if (panning) {\n panning = false;\n if (t(e) - last.t > 80) vx = vy = 0; // paused before release\n h.onPan?.({ dx: o.axis === 'y' ? 0 : dx, dy: o.axis === 'x' ? 0 : dy, vx, vy, first: false, last: true, event: e });\n const s = swipeDirection(dx, dy, vx, vy, { distance: o.swipeDistance, velocity: o.swipeVelocity, axis: o.axis });\n if (s) h.onSwipe?.(s);\n return;\n }\n if (pressed || e.type === 'pointercancel') return;\n const p = { x: e.clientX, y: e.clientY };\n const n = t(e);\n if (h.onDoubleTap && n - lastTap < 300) { lastTap = -1e9; h.onDoubleTap(p); return; }\n lastTap = n;\n h.onTap?.(p);\n };\n const wheel = (e: WheelEvent) => {\n if (!h.onPinch || o.wheelPinch === false || !e.ctrlKey) return;\n e.preventDefault();\n const s = Math.exp(-e.deltaY / 100);\n h.onPinch({ scale: s, x: e.clientX, y: e.clientY, first: true, last: true });\n };\n const opts: AddEventListenerOptions = { passive: false };\n el.addEventListener('pointerdown', down as EventListener);\n el.addEventListener('pointermove', move as EventListener, opts);\n el.addEventListener('pointerup', up as EventListener);\n el.addEventListener('pointercancel', up as EventListener);\n el.addEventListener('wheel', wheel as EventListener, opts);\n if (o.axis && !el.style.touchAction) el.style.touchAction = o.axis === 'x' ? 'pan-y' : 'pan-x';\n else if (!o.axis && !el.style.touchAction && (h.onPan || h.onPinch)) el.style.touchAction = 'none';\n return () => {\n clearTimeout(press);\n el.removeEventListener('pointerdown', down as EventListener);\n el.removeEventListener('pointermove', move as EventListener, opts);\n el.removeEventListener('pointerup', up as EventListener);\n el.removeEventListener('pointercancel', up as EventListener);\n el.removeEventListener('wheel', wheel as EventListener, opts);\n };\n}\n","import { defineElement, type UsaElement } from '../base';\nimport { createSpring, type SpringValue } from '../physics/spring';\nimport { gesture, type SwipeDirection } from './core';\nimport css from './gesture.css?raw';\n\n/**\n * `<usa-swipeable>` — swipe-to-dismiss / swipe actions. The content follows\n * the finger (rubber-banded past `distance`), flies out on a swipe or a drag\n * past `distance`, otherwise springs home with the release velocity.\n *\n * Attributes: `axis` (`x` default · `y`), `distance` (px, 120), `preset`\n * (spring), `dismiss` (remove the element after flying out), `disabled`.\n * Keyboard: Delete/Backspace dismisses, ←/→ swipe. Events `usa:swipe`\n * (`{ direction }`, cancelable), `usa:dismiss`. Methods `swipe(dir)`, `reset()`.\n * Reduced motion: no follow / fly-out animation, events still fire.\n */\nexport interface UsaSwipeableElement extends UsaElement {\n swipe(direction: SwipeDirection): void;\n reset(): void;\n readonly offset: number;\n}\n\nexport function defineSwipeable(tag = 'usa-swipeable'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaSwipeable extends Base {\n static get observedAttributes(): string[] {\n return ['axis', 'disabled'];\n }\n private _s!: SpringValue;\n private _off = 0;\n\n get offset(): number {\n return this._off;\n }\n\n private put(v: number): void {\n this._off = v;\n this.style.setProperty('--usa-swipe', `${v}px`);\n this.style.setProperty('--usa-swipe-p', String(Math.min(1, Math.abs(v) / this.num('distance', 120))));\n }\n\n swipe(direction: SwipeDirection): void {\n if (!this.emit('swipe', { direction })) return this.reset();\n const sign = direction === 'left' || direction === 'up' ? -1 : 1;\n const far = sign * ((this.str('axis', 'x') === 'y' ? this.offsetHeight : this.offsetWidth) + 80 || 600);\n const done = () => {\n this.emit('dismiss', { direction });\n if (this.flag('dismiss')) this.remove();\n };\n if (this.reduced) {\n this.put(0);\n return done();\n }\n this.setAttribute('data-gone', '');\n this._s = createSpring({ spring: 'stiff', value: this._off, onUpdate: (v) => this.put(v), onRest: done });\n this._s.set(far, sign * 1500);\n }\n\n reset(): void {\n this.removeAttribute('data-gone');\n if (this.reduced) return this.put(0);\n this._s.set(0);\n }\n\n mount(): void {\n this._s = createSpring({ spring: this.str('preset', 'default'), onUpdate: (v) => this.put(v) });\n if (!this.hasAttribute('tabindex')) this.tabIndex = 0;\n const y = this.str('axis', 'x') === 'y';\n const max = () => this.num('distance', 120);\n this.onCleanup(\n gesture(this, {\n onPan: ({ dx, dy, vx, vy, last }) => {\n if (this.flag('disabled')) return;\n const d = y ? dy : dx;\n if (!last) {\n this._s.stop();\n if (!this.reduced) this.put(Math.abs(d) > max() ? Math.sign(d) * (max() + (Math.abs(d) - max()) * 0.35) : d);\n return;\n }\n if (Math.abs(d) > max()) this.swipe(y ? (d > 0 ? 'down' : 'up') : d > 0 ? 'right' : 'left');\n else if (!this.hasAttribute('data-gone')) {\n if (this.reduced) this.put(0);\n else this._s.set(0, y ? vy : vx);\n }\n },\n onSwipe: ({ direction }) => {\n if (this.flag('disabled') || this.hasAttribute('data-gone')) return;\n if (y === (direction === 'up' || direction === 'down')) this.swipe(direction);\n },\n }, { axis: y ? 'y' : 'x' })\n );\n this.listen(this, 'keydown', (e: KeyboardEvent) => {\n if (this.flag('disabled')) return;\n const map: Record<string, SwipeDirection> = y ? { ArrowUp: 'up', ArrowDown: 'down' } : { ArrowLeft: 'left', ArrowRight: 'right' };\n if (e.key === 'Delete' || e.key === 'Backspace') this.swipe(y ? 'up' : 'left');\n else if (map[e.key]) this.swipe(map[e.key]);\n else return;\n e.preventDefault();\n });\n }\n\n unmount(): void {\n this._s?.stop();\n }\n },\n { id: 'gesture', text: css }\n );\n}\n","import { defineElement, clamp, type UsaElement } from '../base';\nimport { createSpring, type SpringValue } from '../physics/spring';\nimport { gesture } from './core';\nimport css from './gesture.css?raw';\n\n/**\n * `<usa-pinch-zoom>` — pinch (two fingers or Ctrl/⌘ + wheel / trackpad\n * pinch) to zoom its content, pan while zoomed, double-tap to toggle zoom;\n * scale and position spring back inside the bounds on release.\n *\n * Attributes: `min` (1), `max` (4), `double-tap` (zoom level, 2), `preset`.\n * Keyboard: `+` / `-` / `0`. Property `scale`, method `zoomTo(scale)`.\n * Event `usa:zoom` (`{ scale }`). Reduced motion: zoom changes instantly.\n */\nexport interface UsaPinchZoomElement extends UsaElement {\n readonly scale: number;\n zoomTo(scale: number): void;\n}\n\nexport function definePinchZoom(tag = 'usa-pinch-zoom'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaPinchZoom extends Base {\n private _k!: SpringValue;\n private _x!: SpringValue;\n private _y!: SpringValue;\n private _v = { k: 1, x: 0, y: 0 };\n\n get scale(): number {\n return this._v.k;\n }\n\n private paint(): void {\n const { k, x, y } = this._v;\n this.style.setProperty('--usa-zoom', String(k));\n this.style.setProperty('--usa-zoom-x', `${x}px`);\n this.style.setProperty('--usa-zoom-y', `${y}px`);\n this.toggleAttribute('data-zoomed', k > 1.01);\n }\n\n private bound(k: number, x: number, y: number) {\n const w = (this.clientWidth * (k - 1)) / 2;\n const h = (this.clientHeight * (k - 1)) / 2;\n return { x: clamp(x, -w, w), y: clamp(y, -h, h) };\n }\n\n zoomTo(scale: number): void {\n const k = clamp(scale, this.num('min', 1), this.num('max', 4));\n const b = this.bound(k, this._v.x, this._v.y);\n if (this.reduced) {\n this._v = { k, ...b };\n this.paint();\n } else {\n this._k.set(k);\n this._x.set(b.x);\n this._y.set(b.y);\n }\n this.emit('zoom', { scale: k });\n }\n\n mount(): void {\n const preset = this.str('preset', 'gentle');\n this._k = createSpring({ spring: preset, value: this._v.k, onUpdate: (v) => ((this._v.k = v), this.paint()) });\n this._x = createSpring({ spring: preset, value: this._v.x, onUpdate: (v) => ((this._v.x = v), this.paint()) });\n this._y = createSpring({ spring: preset, value: this._v.y, onUpdate: (v) => ((this._v.y = v), this.paint()) });\n if (!this.hasAttribute('tabindex')) this.tabIndex = 0;\n let base = 1;\n let ox = 0;\n let oy = 0;\n this.onCleanup(\n gesture(this, {\n onPinch: ({ scale, first, last }) => {\n if (first) base = this._v.k;\n const k = clamp(base * scale, this.num('min', 1) * 0.7, this.num('max', 4) * 1.3);\n if (last) return this.zoomTo(k);\n this._k.jump(k);\n },\n onPan: ({ dx, dy, vx, vy, first, last }) => {\n if (this._v.k <= 1.01) return;\n if (first) ((ox = this._v.x), (oy = this._v.y));\n if (!last) {\n this._x.jump(ox + dx);\n this._y.jump(oy + dy);\n return;\n }\n const b = this.bound(this._v.k, ox + dx + vx * 0.15, oy + dy + vy * 0.15);\n this._x.set(b.x, vx);\n this._y.set(b.y, vy);\n },\n onDoubleTap: () => this.zoomTo(this._v.k > 1.01 ? 1 : this.num('double-tap', 2)),\n })\n );\n this.listen(this, 'keydown', (e: KeyboardEvent) => {\n if (e.key === '+' || e.key === '=') this.zoomTo(this._v.k * 1.25);\n else if (e.key === '-') this.zoomTo(this._v.k / 1.25);\n else if (e.key === '0') this.zoomTo(1);\n else return;\n e.preventDefault();\n });\n this.paint();\n }\n\n unmount(): void {\n [this._k, this._x, this._y].forEach((s) => s?.stop());\n }\n },\n { id: 'gesture', text: css }\n );\n}\n","/**\n * use-scroll-animate/components/gesture — unified gestures (v3.2).\n * `gesture()` recognises pan, swipe, pinch, long-press, tap and double-tap\n * with release velocities for springs; `<usa-swipeable>` (swipe-to-dismiss)\n * and `<usa-pinch-zoom>` are built on it.\n */\nimport { defineSwipeable, type UsaSwipeableElement } from './swipeable';\nimport { definePinchZoom, type UsaPinchZoomElement } from './pinch-zoom';\n\nexport { defineSwipeable, definePinchZoom };\nexport { gesture, swipeDirection, pinchScale } from './core';\nexport type { GestureHandlers, GestureOptions, PanState, SwipeState, SwipeDirection, PinchState, PressState } from './core';\nexport type { UsaSwipeableElement, UsaPinchZoomElement };\nexport { configureComponents, prefersReducedMotion } from '../base';\nexport type { ComponentsConfig, UsaElement } from '../base';\n\n/** Register every component of this category under its default tag. */\nexport function defineGestureComponents(): void {\n defineSwipeable();\n definePinchZoom();\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'usa-swipeable': UsaSwipeableElement;\n 'usa-pinch-zoom': UsaPinchZoomElement;\n }\n}\n"],"names":["base","clamp","defineElement","createSpring"],"mappings":";;;;;AAyCA;AACM,SAAU,cAAc,CAAC,EAAU,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU,EAAE,CAAA,GAAgE,EAAE,EAAA;AAC/I,IAAA,MAAM,IAAI,GAAG,CAAC,CAAC,QAAQ,IAAI,EAAE;AAC7B,IAAA,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AG,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;AACjF,aAAA,CAAC,CACH;YACD,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,EAAE,CAAC,CAAgB,KAAI;gBAChD,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG;oBAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;AAC5D,qBAAA,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG;oBAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;AAChD,qBAAA,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG;AAAE,oBAAA,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;;oBACjC;gBACL,CAAC,CAAC,cAAc,EAAE;AACpB,YAAA,CAAC,CAAC;YACF,IAAI,CAAC,KAAK,EAAE;QACd;QAEA,OAAO,GAAA;YACL,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;QACvD;KACD,EACH,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,CAC7B;AACH;;AC7GA;;;;;AAKG;AAWH;SACgB,uBAAuB,GAAA;AACrC,IAAA,eAAe,EAAE;AACjB,IAAA,eAAe,EAAE;AACnB;;;;;;;;;;;"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/* use-scroll-animate/components/gesture */
|
|
2
|
+
.usa-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
|
|
3
|
+
usa-swipeable{display:block;touch-action:pan-y;user-select:none;-webkit-user-select:none}usa-swipeable[axis="y"]{touch-action:pan-x}usa-swipeable>*{transform:translate3d(var(--usa-swipe,0px),0,0);opacity:calc(1 - var(--usa-swipe-p,0) * 0.5)}usa-swipeable[axis="y"]>*{transform:translate3d(0,var(--usa-swipe,0px),0)}usa-swipeable:focus-visible{outline:2px solid currentColor;outline-offset:2px}usa-pinch-zoom{display:block;overflow:hidden;touch-action:none;position:relative}usa-pinch-zoom>*{transform:translate3d(var(--usa-zoom-x,0px),var(--usa-zoom-y,0px),0) scale(var(--usa-zoom,1));transform-origin:50% 50%}usa-pinch-zoom[data-zoomed]{cursor:grab}usa-pinch-zoom:focus-visible{outline:2px solid currentColor;outline-offset:2px}
|