• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

humanspeak / svelte-motion / 26467074175
68%
main: 3%

Build:
Build:
LAST BUILD BRANCH: fix/release-cleanup-always-run
DEFAULT BRANCH: main
Ran 26 May 2026 06:26PM UTC
Jobs 1
Files 227
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 May 2026 06:24PM UTC coverage: 67.661%. First build
26467074175

push

github

web-flow
feat(gestures): add Pan gesture (whilePan + onPan callbacks) (#380)

* feat(gestures): add Pan gesture (whilePan + onPan callbacks)

Port framer-motion's Pan gesture to motion.* components — pure pointer
offset/velocity reporter without drag's constraint/momentum/snap-to-origin
baggage. The primitive that powers swipe-to-dismiss drawers, custom
carousels, image-lightbox swipes, and any "tell me what the gesture is
doing right now" interaction.

Lib core:

- src/lib/utils/pan.ts (new) — PanSession class + attachPan factory.
  Direct 1:1 port of framer-motion's PanSession.ts and PanGesture
  Feature in packages/framer-motion/src/gestures/pan/. Includes:
  - pointermove/pointerup/pointercancel on contextWindow (not source el)
    so a fast swipe keeps the gesture alive past the element's bounds
  - distanceThreshold (3px default) gates onStart; onSessionStart fires
    immediately on pointerdown for setup
  - frame.update(updatePoint, true) per-frame throttling
  - getVelocity over 100ms history with the hold-then-flick safeguard
    (skip pointer-down origin if it's > 2× timeDelta old)
  - getPanInfo returns {point, delta, offset, velocity} — identical
    shape to motion-dom's DragInfo/PanInfo
  - scroll compensation on scrollable ancestors + window
  - per-handler frame-loop scheduling: onSessionStart/onStart/onMove
    routed onto motion-dom's `update` step lane via frame.update;
    onEnd/onSessionEnd routed onto `postRender` lane via
    frame.postRender. Mirrors upstream's asyncHandler + frame.postRender
    split byte-for-byte. PanSession stays scheduler-unaware (synchronous,
    for testability) — scheduling lives at the attachPan boundary.

- src/lib/types.ts — MotionWhilePan + four MotionOnPan* callback types
  + five props on MotionProps (whilePan, onPanSessionStart, onPanStart,
  onPan, onPanEnd).

- src/lib/html/_MotionContainer.svelte — \$effect that attaches/detaches
  attachPan based on any onPan*/whilePan being set. Applies whilePan
  k... (continued)

504 of 686 branches covered (73.47%)

Branch coverage included in aggregate %.

27 of 208 new or added lines in 2 files covered. (12.98%)

1992 of 3003 relevant lines covered (66.33%)

11.87 hits per line

Uncovered Changes

Lines Coverage ∆ File
160
6.19
src/lib/utils/pan.ts
21
60.31
src/lib/html/_MotionContainer.svelte
Jobs
ID Job ID Ran Files Coverage
1 node-22 - 26467074175.1 26 May 2026 06:26PM UTC 227
67.66
GitHub Action Run
Source Files on build 26467074175
  • Tree
  • List 227
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #26467074175
  • 9a6de5f9 on github
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc