@sciol/xyzen 1.9.96-beta.9b23a00 → 1.9.96-beta.fabd485

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.
@@ -7,8 +7,6 @@ interface SwipeOptions {
7
7
  velocityThreshold?: number;
8
8
  /** Minimum drag fraction of container width to trigger page change */
9
9
  distanceThreshold?: number;
10
- /** Damping factor for overscroll rubber-band (0–1) */
11
- rubberBand?: number;
12
10
  /** Width in px from each screen edge that activates the swipe gesture */
13
11
  edgeWidth?: number;
14
12
  /** When true, swipe activates from anywhere (bypasses edge detection) */
@@ -17,15 +15,14 @@ interface SwipeOptions {
17
15
  /**
18
16
  * iOS-style gesture-driven horizontal page swipe.
19
17
  *
20
- * Content follows the finger 1:1 during drag, rubber-bands at
21
- * boundaries, and snaps to the nearest page based on velocity
22
- * and distance on release.
18
+ * Uses native `scrollLeft` on the wrapper instead of CSS `transform` on
19
+ * the track. This avoids creating a new CSS coordinate system, which
20
+ * would cause textarea caret misposition on mobile browsers.
23
21
  *
24
- * Touch listeners are attached with `{ passive: false }` on
25
- * touchmove so we can `preventDefault()` to suppress vertical
26
- * scroll during a horizontal swipe.
22
+ * Content follows the finger 1:1 during drag and snaps to the nearest
23
+ * page based on velocity and distance on release.
27
24
  */
28
- export declare function useMobileSwipe({ pageCount, onSnap, velocityThreshold, distanceThreshold, rubberBand, edgeWidth, bypassEdge, }: SwipeOptions): {
25
+ export declare function useMobileSwipe({ pageCount, onSnap, velocityThreshold, distanceThreshold, edgeWidth, bypassEdge, }: SwipeOptions): {
29
26
  wrapperRef: import('react').RefObject<HTMLDivElement | null>;
30
27
  trackRef: import('react').RefObject<HTMLDivElement | null>;
31
28
  currentPage: number;