@sciol/xyzen 1.9.96-beta.9b23a00 → 1.9.96-beta.fd4e5f4
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/dist/hooks/useMobileSwipe.d.ts +6 -9
- package/dist/xyzen.css +1 -1
- package/dist/xyzen.es.js +561 -546
- package/dist/xyzen.umd.js +52 -52
- package/package.json +1 -1
|
@@ -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
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
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
|
-
*
|
|
25
|
-
*
|
|
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,
|
|
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;
|