react-native-swappable-grid 1.0.1 → 1.0.2

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.
@@ -40,7 +40,7 @@ interface PanProps {
40
40
  scrollViewRef: AnimatedRef<any>;
41
41
  scrollOffset: SharedValue<number>;
42
42
  viewportH: SharedValue<number>;
43
- longPressMs: number;
43
+ holdToDragMs: number;
44
44
  contentH: SharedValue<number>;
45
45
  reverse?: boolean;
46
46
  deleteComponentPosition?: SharedValue<{
@@ -53,7 +53,9 @@ interface PanProps {
53
53
  contentPaddingBottom?: number; // Padding bottom from style prop to allow dragging into padding area
54
54
  }
55
55
 
56
- export const PanWithLongPress = (props: PanProps & { longPressMs: number }) => {
56
+ export const PanWithLongPress = (
57
+ props: PanProps & { holdToDragMs: number }
58
+ ) => {
57
59
  const {
58
60
  order,
59
61
  dynamicNumColumns,
@@ -77,7 +79,7 @@ export const PanWithLongPress = (props: PanProps & { longPressMs: number }) => {
77
79
  scrollViewRef,
78
80
  scrollOffset,
79
81
  viewportH,
80
- longPressMs,
82
+ holdToDragMs,
81
83
  contentH,
82
84
  reverse = false,
83
85
  deleteComponentPosition,
@@ -132,7 +134,7 @@ export const PanWithLongPress = (props: PanProps & { longPressMs: number }) => {
132
134
 
133
135
  return Gesture.Pan()
134
136
  .minDistance(10)
135
- .activateAfterLongPress(longPressMs)
137
+ .activateAfterLongPress(holdToDragMs)
136
138
  .onStart(({ x, y }) => {
137
139
  initialScrollOffset.value = scrollOffset.value;
138
140
  dragMode.value = true;
@@ -19,7 +19,7 @@ interface useGridLayoutProps {
19
19
  itemHeight: number;
20
20
  gap: number;
21
21
  containerPadding: number;
22
- longPressMs: number;
22
+ holdToDragMs: number;
23
23
  numColumns?: number;
24
24
  onDragEnd?: (ordered: ChildNode[]) => void;
25
25
  onOrderChange?: (keys: string[]) => void;
@@ -37,7 +37,7 @@ export function useGridLayout({
37
37
  itemHeight,
38
38
  gap,
39
39
  containerPadding,
40
- longPressMs,
40
+ holdToDragMs,
41
41
  numColumns,
42
42
  onDragEnd,
43
43
  onOrderChange,
@@ -207,7 +207,7 @@ export function useGridLayout({
207
207
  scrollViewRef,
208
208
  scrollOffset,
209
209
  viewportH,
210
- longPressMs,
210
+ holdToDragMs,
211
211
  scrollSpeed,
212
212
  scrollThreshold,
213
213
  reverse,