react-native-gesture-image-viewer 2.0.0-beta.5 → 2.0.0-beta.7
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/lib/module/GestureTrigger.js +2 -1
- package/lib/module/GestureTrigger.js.map +1 -1
- package/lib/module/GestureViewer.js +16 -10
- package/lib/module/GestureViewer.js.map +1 -1
- package/lib/typescript/src/GestureTrigger.d.ts +1 -1
- package/lib/typescript/src/GestureTrigger.d.ts.map +1 -1
- package/lib/typescript/src/GestureViewer.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +11 -11
- package/package.json +21 -12
- package/src/GestureTrigger.tsx +6 -2
- package/src/GestureViewer.tsx +12 -9
- package/src/types.ts +11 -11
|
@@ -22,7 +22,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
22
22
|
/**
|
|
23
23
|
* Wraps a pressable child element and registers its native view as a trigger for `GestureViewer`.
|
|
24
24
|
*
|
|
25
|
-
* @
|
|
25
|
+
* @remarks
|
|
26
26
|
* Behavior on press:
|
|
27
27
|
* - Registers the child's native node to the internal registry under the given `id`.
|
|
28
28
|
* - Invokes the child's own `onPress` first (if provided).
|
|
@@ -76,6 +76,7 @@ export function GestureTrigger({
|
|
|
76
76
|
}, [id, onPress, children]);
|
|
77
77
|
return /*#__PURE__*/_jsx(View, {
|
|
78
78
|
ref: ref,
|
|
79
|
+
collapsable: false,
|
|
79
80
|
children: wrapped
|
|
80
81
|
});
|
|
81
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Children","cloneElement","isValidElement","useMemo","useRef","View","registry","jsx","_jsx","GestureTrigger","id","children","onPress","ref","wrapped","child","only","originalOnPress","props","handlePress","args","setTriggerNode","current","__DEV__","console","warn"],"sourceRoot":"../../src","sources":["GestureTrigger.tsx"],"mappings":";;AACA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,cAAc,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO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
{"version":3,"names":["Children","cloneElement","isValidElement","useMemo","useRef","View","registry","jsx","_jsx","GestureTrigger","id","children","onPress","ref","wrapped","child","only","originalOnPress","props","handlePress","args","setTriggerNode","current","__DEV__","console","warn","collapsable"],"sourceRoot":"../../src","sources":["GestureTrigger.tsx"],"mappings":";;AACA,SAASA,QAAQ,EAAEC,YAAY,EAAEC,cAAc,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AAC/E,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,QAAQ,QAAQ,4BAAyB;;AAElD;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARA,SAAAC,GAAA,IAAAC,IAAA;AAeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAAwB;EAAEC,EAAE,GAAG,SAAS;EAAEC,QAAQ;EAAEC;AAAgC,CAAC,EAAE;EACnH,MAAMC,GAAG,GAAGT,MAAM,CAAO,IAAI,CAAC;EAE9B,MAAMU,OAAO,GAAGX,OAAO,CAAC,MAAM;IAC5B,MAAMY,KAAK,GAAGf,QAAQ,CAACgB,IAAI,CAACL,QAAQ,CAAC;IAErC,IAAI,eAACT,cAAc,CAACa,KAAK,CAAC,EAAE;MAC1B,OAAOJ,QAAQ;IACjB;IAEA,MAAMM,eAAe,GAAGF,KAAK,CAACG,KAAK,EAAEN,OAAO;IAE5C,MAAMO,WAAW,GAAGA,CAAC,GAAGC,IAAe,KAAK;MAC1Cd,QAAQ,CAACe,cAAc,CAACX,EAAE,EAAEG,GAAG,CAACS,OAAO,CAAC;MACxCL,eAAe,GAAG,GAAGG,IAAI,CAAC;MAC1BR,OAAO,GAAG,GAAGQ,IAAI,CAAC;MAElB,IAAIG,OAAO,IAAI,CAACN,eAAe,IAAI,CAACL,OAAO,EAAE;QAC3CY,OAAO,CAACC,IAAI,CAAC,oFAAoF,CAAC;MACpG;IACF,CAAC;IAED,oBAAOxB,YAAY,CAACc,KAAK,EAAE;MACzB,GAAGA,KAAK,CAACG,KAAK;MACdN,OAAO,EAAEO;IACX,CAAC,CAAC;EACJ,CAAC,EAAE,CAACT,EAAE,EAAEE,OAAO,EAAED,QAAQ,CAAC,CAAC;EAE3B,oBACEH,IAAA,CAACH,IAAI;IAACQ,GAAG,EAAEA,GAAI;IAACa,WAAW,EAAE,KAAM;IAAAf,QAAA,EAChCG;EAAO,CACJ,CAAC;AAEX","ignoreList":[]}
|
|
@@ -28,7 +28,8 @@ export function GestureViewer({
|
|
|
28
28
|
const Component = ListComponent;
|
|
29
29
|
const dataRef = useRef(data);
|
|
30
30
|
const {
|
|
31
|
-
width: screenWidth
|
|
31
|
+
width: screenWidth,
|
|
32
|
+
height: screenHeight
|
|
32
33
|
} = useWindowDimensions();
|
|
33
34
|
const width = enableSnapMode ? customWidth || screenWidth : screenWidth;
|
|
34
35
|
const loopData = useMemo(() => createLoopData(dataRef, enableLoop), [enableLoop]);
|
|
@@ -67,14 +68,12 @@ export function GestureViewer({
|
|
|
67
68
|
return /*#__PURE__*/_jsx(View, {
|
|
68
69
|
style: [{
|
|
69
70
|
width,
|
|
70
|
-
height:
|
|
71
|
-
justifyContent: 'center',
|
|
72
|
-
alignItems: 'center',
|
|
71
|
+
height: screenHeight,
|
|
73
72
|
marginHorizontal: itemSpacing / 2
|
|
74
|
-
}],
|
|
73
|
+
}, styles.item],
|
|
75
74
|
children: renderItemProp(item, index)
|
|
76
75
|
}, isScrollView ? keyExtractor(item, index) : undefined);
|
|
77
|
-
}, [width, itemSpacing, renderItemProp, keyExtractor, isScrollView]);
|
|
76
|
+
}, [width, itemSpacing, renderItemProp, keyExtractor, isScrollView, screenHeight]);
|
|
78
77
|
const getItemLayout = useCallback((_, index) => ({
|
|
79
78
|
length: width + itemSpacing,
|
|
80
79
|
offset: (width + itemSpacing) * index,
|
|
@@ -138,11 +137,14 @@ export function GestureViewer({
|
|
|
138
137
|
renderItem: renderItem,
|
|
139
138
|
initialScrollIndex: enableLoop && data.length > 1 ? initialIndex + 1 : initialIndex,
|
|
140
139
|
keyExtractor: keyExtractor,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
...(isFlashListLike(Component) && {
|
|
140
|
+
...(isFlashListLike(Component) ?
|
|
141
|
+
// NOTE - Deprecated estimatedItemSize for FlashList V2 (https://shopify.github.io/flash-list/docs/v2-changes#deprecated)
|
|
142
|
+
{
|
|
145
143
|
estimatedItemSize: width + itemSpacing
|
|
144
|
+
} : {
|
|
145
|
+
windowSize: 3,
|
|
146
|
+
maxToRenderPerBatch: 3,
|
|
147
|
+
getItemLayout
|
|
146
148
|
}),
|
|
147
149
|
...(Platform.OS === 'web' && isFlatListLike(Component) && {
|
|
148
150
|
dataSet: {
|
|
@@ -168,6 +170,10 @@ const styles = StyleSheet.create({
|
|
|
168
170
|
width: '100%',
|
|
169
171
|
height: '100%'
|
|
170
172
|
},
|
|
173
|
+
item: {
|
|
174
|
+
justifyContent: 'center',
|
|
175
|
+
alignItems: 'center'
|
|
176
|
+
},
|
|
171
177
|
background: {
|
|
172
178
|
position: 'absolute',
|
|
173
179
|
top: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useEffect","useMemo","useRef","Platform","StyleSheet","useWindowDimensions","View","Gesture","GestureDetector","GestureHandlerRootView","Animated","registry","useGestureViewer","createLoopData","isFlashListLike","isFlatListLike","isScrollViewLike","WebPagingFixStyle","jsx","_jsx","jsxs","_jsxs","GestureViewer","id","data","renderItem","renderItemProp","renderContainer","ListComponent","width","customWidth","listProps","backdropStyle","backdropStyleProps","containerStyle","initialIndex","itemSpacing","enableSnapMode","enableLoop","props","Component","dataRef","screenWidth","loopData","isScrollView","listRef","isZoomed","isRotated","dismissGesture","zoomGesture","onMomentumScrollEnd","onScrollBeginDrag","animatedStyle","handleDismiss","keyExtractor","item","index","style","
|
|
1
|
+
{"version":3,"names":["useCallback","useEffect","useMemo","useRef","Platform","StyleSheet","useWindowDimensions","View","Gesture","GestureDetector","GestureHandlerRootView","Animated","registry","useGestureViewer","createLoopData","isFlashListLike","isFlatListLike","isScrollViewLike","WebPagingFixStyle","jsx","_jsx","jsxs","_jsxs","GestureViewer","id","data","renderItem","renderItemProp","renderContainer","ListComponent","width","customWidth","listProps","backdropStyle","backdropStyleProps","containerStyle","initialIndex","itemSpacing","enableSnapMode","enableLoop","props","Component","dataRef","screenWidth","height","screenHeight","loopData","isScrollView","listRef","isZoomed","isRotated","dismissGesture","zoomGesture","onMomentumScrollEnd","onScrollBeginDrag","animatedStyle","handleDismiss","keyExtractor","item","index","style","marginHorizontal","styles","children","undefined","getItemLayout","_","length","offset","gesture","Race","current","createManager","deleteManager","commonProps","horizontal","scrollEnabled","showsHorizontalScrollIndicator","snapToInterval","snapToAlignment","decelerationRate","pagingEnabled","scrollEventThrottle","removeClippedSubviews","control","dismiss","listComponent","container","background","content","OS","dataSet","ref","map","initialScrollIndex","estimatedItemSize","windowSize","maxToRenderPerBatch","create","flex","justifyContent","alignItems","position","top","left","right","bottom","backgroundColor"],"sourceRoot":"../../src","sources":["GestureViewer.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AAC/D,SAASC,QAAQ,EAAyCC,UAAU,EAAEC,mBAAmB,EAAEC,IAAI,QAAQ,cAAc;AACrH,SAASC,OAAO,EAAEC,eAAe,EAAEC,sBAAsB,QAAQ,8BAA8B;AAC/F,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,QAAQ,QAAQ,4BAAyB;AAElD,SAASC,gBAAgB,QAAQ,uBAAoB;AACrD,SAASC,cAAc,EAAEC,eAAe,EAAEC,cAAc,EAAEC,gBAAgB,QAAQ,YAAS;AAC3F,OAAOC,iBAAiB,MAAM,wBAAq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CAAC,eAChBZ,IAAA,CAACF,iBAAiB;UAACuB,SAAS,EAAEA;QAAU,CAAE,CAAC;MAAA,CACvC;IAAC,CACQ;EAAC,CACI,CACzB;EAED,OAAOb,eAAe,GAAGA,eAAe,CAAC0D,aAAa,EAAEF,OAAO,CAAC,GAAGE,aAAa;AAClF;AAEA,MAAMxB,MAAM,GAAGzD,UAAU,CAAC6F,MAAM,CAAC;EAC/BX,SAAS,EAAE;IACTY,IAAI,EAAE;EACR,CAAC;EACDV,OAAO,EAAE;IACPU,IAAI,EAAE,CAAC;IACPrE,KAAK,EAAE,MAAM;IACbc,MAAM,EAAE;EACV,CAAC;EACDc,IAAI,EAAE;IACJ0C,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDb,UAAU,EAAE;IACVc,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -23,7 +23,7 @@ export type GestureTriggerProps<T extends WithOnPress> = {
|
|
|
23
23
|
/**
|
|
24
24
|
* Wraps a pressable child element and registers its native view as a trigger for `GestureViewer`.
|
|
25
25
|
*
|
|
26
|
-
* @
|
|
26
|
+
* @remarks
|
|
27
27
|
* Behavior on press:
|
|
28
28
|
* - Registers the child's native node to the internal registry under the given `id`.
|
|
29
29
|
* - Invokes the child's own `onPress` first (if provided).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureTrigger.d.ts","sourceRoot":"","sources":["../../../src/GestureTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C;;;GAGG;AACH,KAAK,WAAW,GAAG;IAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;CAAE,CAAC;AAE9D;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,IAAI;IACvD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,EAAE,EAAE,EAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,mBAAmB,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"GestureTrigger.d.ts","sourceRoot":"","sources":["../../../src/GestureTrigger.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAK1C;;;GAGG;AACH,KAAK,WAAW,GAAG;IAAE,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAA;CAAE,CAAC;AAE9D;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,IAAI;IACvD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,EAAE,EAAE,EAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,mBAAmB,CAAC,CAAC,CAAC,2CAiClH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GestureViewer.d.ts","sourceRoot":"","sources":["../../../src/GestureViewer.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,UAAU,EAA+D,MAAM,cAAc,CAAC;AAItH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAKlD,wBAAgB,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,EAAE,GAAG,OAAO,UAAU,EAAE,EAC7D,EAAc,EACd,IAAI,EACJ,UAAU,EAAE,cAAc,EAC1B,eAAe,EACf,aAAa,EACb,KAAK,EAAE,WAAW,EAClB,SAAS,EACT,aAAa,EAAE,kBAAkB,EACjC,cAAc,EACd,YAAgB,EAChB,WAAe,EACf,cAAsB,EACtB,UAAkB,EAClB,GAAG,KAAK,EACT,EAAE,kBAAkB,CAAC,CAAC,EAAE,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"GestureViewer.d.ts","sourceRoot":"","sources":["../../../src/GestureViewer.tsx"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,UAAU,EAA+D,MAAM,cAAc,CAAC;AAItH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAKlD,wBAAgB,aAAa,CAAC,CAAC,GAAG,GAAG,EAAE,EAAE,GAAG,OAAO,UAAU,EAAE,EAC7D,EAAc,EACd,IAAI,EACJ,UAAU,EAAE,cAAc,EAC1B,eAAe,EACf,aAAa,EACb,KAAK,EAAE,WAAW,EAClB,SAAS,EACT,aAAa,EAAE,kBAAkB,EACjC,cAAc,EACd,YAAgB,EAChB,WAAe,EACf,cAAsB,EACtB,UAAkB,EAClB,GAAG,KAAK,EACT,EAAE,kBAAkB,CAAC,CAAC,EAAE,EAAE,CAAC,2CA6J3B"}
|
|
@@ -31,7 +31,7 @@ export interface TriggerAnimationConfig extends WithTimingConfig {
|
|
|
31
31
|
export interface GestureViewerProps<T = any, LC = typeof RNScrollView> {
|
|
32
32
|
/**
|
|
33
33
|
* When you want to efficiently manage multiple `GestureViewer` instances, you can use the `id` prop to use multiple `GestureViewer` components.
|
|
34
|
-
* @
|
|
34
|
+
* @remarks `GestureViewer` automatically removes instances from memory when components are unmounted, so no manual memory management is required.
|
|
35
35
|
* @defaultValue 'default'
|
|
36
36
|
*/
|
|
37
37
|
id?: string;
|
|
@@ -75,13 +75,13 @@ export interface GestureViewerProps<T = any, LC = typeof RNScrollView> {
|
|
|
75
75
|
ListComponent: LC;
|
|
76
76
|
/**
|
|
77
77
|
* The width of the `GestureViewer`.
|
|
78
|
-
* @
|
|
78
|
+
* @remarks If you don't set this prop, the width of the `GestureViewer` will be the same as the width of the screen.
|
|
79
79
|
* @defaultValue screen width
|
|
80
80
|
*/
|
|
81
81
|
width?: number;
|
|
82
82
|
/**
|
|
83
83
|
* The props to pass to the list component.
|
|
84
|
-
* @
|
|
84
|
+
* @remarks The `listProps` provides **type inference based on the selected list component**, ensuring accurate autocompletion and type safety in your IDE.
|
|
85
85
|
*/
|
|
86
86
|
listProps?: Partial<ConditionalListProps<LC>>;
|
|
87
87
|
/**
|
|
@@ -94,7 +94,7 @@ export interface GestureViewerProps<T = any, LC = typeof RNScrollView> {
|
|
|
94
94
|
containerStyle?: StyleProp<ViewStyle>;
|
|
95
95
|
/**
|
|
96
96
|
* Dismiss gesture options. Calls `onDismiss` function when swiping down.
|
|
97
|
-
* @
|
|
97
|
+
* @remarks Useful for closing modals with downward swipe gestures.
|
|
98
98
|
*/
|
|
99
99
|
dismiss?: {
|
|
100
100
|
/**
|
|
@@ -114,32 +114,32 @@ export interface GestureViewerProps<T = any, LC = typeof RNScrollView> {
|
|
|
114
114
|
resistance?: number;
|
|
115
115
|
/**
|
|
116
116
|
* By default, the background `opacity` gradually decreases from 1 to 0 during downward swipe gestures.
|
|
117
|
-
* @
|
|
117
|
+
* @remarks When `false`, this animation is disabled.
|
|
118
118
|
* @defaultValue true
|
|
119
119
|
*/
|
|
120
120
|
fadeBackdrop?: boolean;
|
|
121
121
|
};
|
|
122
122
|
/**
|
|
123
123
|
* Controls left/right swipe gestures.
|
|
124
|
-
* @
|
|
124
|
+
* @remarks When `false`, horizontal gestures are disabled.
|
|
125
125
|
* @defaultValue true
|
|
126
126
|
*/
|
|
127
127
|
enableHorizontalSwipe?: boolean;
|
|
128
128
|
/**
|
|
129
129
|
* Only works when zoom is active, allows moving item position when zoomed.
|
|
130
|
-
* @
|
|
130
|
+
* @remarks When `false`, gesture movement is disabled during zoom.
|
|
131
131
|
* @defaultValue true
|
|
132
132
|
*/
|
|
133
133
|
enablePanWhenZoomed?: boolean;
|
|
134
134
|
/**
|
|
135
135
|
* Controls two-finger pinch gestures.
|
|
136
|
-
* @
|
|
136
|
+
* @remarks When `false`, two-finger zoom gestures are disabled.
|
|
137
137
|
* @defaultValue true
|
|
138
138
|
*/
|
|
139
139
|
enablePinchZoom?: boolean;
|
|
140
140
|
/**
|
|
141
141
|
* Controls double-tap zoom gestures.
|
|
142
|
-
* @
|
|
142
|
+
* @remarks When `false`, double-tap zoom gestures are disabled.
|
|
143
143
|
* @defaultValue true
|
|
144
144
|
*/
|
|
145
145
|
enableDoubleTapZoom?: boolean;
|
|
@@ -151,7 +151,7 @@ export interface GestureViewerProps<T = any, LC = typeof RNScrollView> {
|
|
|
151
151
|
/**
|
|
152
152
|
* Enables snap scrolling mode.
|
|
153
153
|
*
|
|
154
|
-
* @
|
|
154
|
+
* @remarks
|
|
155
155
|
* **`false` (default)**: Paging mode (`pagingEnabled: true`)
|
|
156
156
|
* - Scrolls by full screen size increments
|
|
157
157
|
*
|
|
@@ -164,7 +164,7 @@ export interface GestureViewerProps<T = any, LC = typeof RNScrollView> {
|
|
|
164
164
|
enableSnapMode?: boolean;
|
|
165
165
|
/**
|
|
166
166
|
* The spacing between items in pixels.
|
|
167
|
-
* @
|
|
167
|
+
* @remarks Only applied when `enableSnapMode` is `true`.
|
|
168
168
|
* @defaultValue 0
|
|
169
169
|
*/
|
|
170
170
|
itemSpacing?: number;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-gesture-image-viewer",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
4
|
-
"description": "🖼️
|
|
3
|
+
"version": "2.0.0-beta.7",
|
|
4
|
+
"description": "🖼️ React Native Image Viewer - Reanimated-powered image gestures with full control",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -59,11 +59,20 @@
|
|
|
59
59
|
"photo-viewer",
|
|
60
60
|
"image-carousel",
|
|
61
61
|
"touch-gestures",
|
|
62
|
-
"react-native-reanimated",
|
|
63
|
-
"react-native-gesture-handler",
|
|
64
62
|
"lightbox",
|
|
65
63
|
"gallery",
|
|
66
|
-
"viewer"
|
|
64
|
+
"viewer",
|
|
65
|
+
"zoomable",
|
|
66
|
+
"double-tap",
|
|
67
|
+
"image viewer",
|
|
68
|
+
"react native image viewer",
|
|
69
|
+
"react-native-reanimated",
|
|
70
|
+
"react-native-gesture-handler",
|
|
71
|
+
"react-native-viewer",
|
|
72
|
+
"react-native-image-viewer",
|
|
73
|
+
"react-native-image-gallery",
|
|
74
|
+
"react-native-reanimated-image-viewer",
|
|
75
|
+
"react-native-image-zoom-viewer"
|
|
67
76
|
],
|
|
68
77
|
"repository": {
|
|
69
78
|
"type": "git",
|
|
@@ -87,16 +96,16 @@
|
|
|
87
96
|
"@react-native/babel-preset": "0.79.5",
|
|
88
97
|
"@types/babel__core": "^7",
|
|
89
98
|
"@types/jest": "^29.5.5",
|
|
90
|
-
"@types/react": "^19.
|
|
99
|
+
"@types/react": "^19.1.13",
|
|
91
100
|
"commitlint": "^19.6.1",
|
|
92
101
|
"del-cli": "^5.1.0",
|
|
93
102
|
"jest": "^29.7.0",
|
|
94
|
-
"react": "19.
|
|
95
|
-
"react-native": "0.
|
|
96
|
-
"react-native-builder-bob": "^0.40.
|
|
97
|
-
"react-native-gesture-handler": "^2.
|
|
98
|
-
"react-native-reanimated": "^4.0
|
|
99
|
-
"react-native-worklets": "^0.
|
|
103
|
+
"react": "19.1.0",
|
|
104
|
+
"react-native": "0.81.4",
|
|
105
|
+
"react-native-builder-bob": "^0.40.13",
|
|
106
|
+
"react-native-gesture-handler": "^2.28.0",
|
|
107
|
+
"react-native-reanimated": "^4.1.0",
|
|
108
|
+
"react-native-worklets": "^0.5.1",
|
|
100
109
|
"typescript": "^5.8.3"
|
|
101
110
|
},
|
|
102
111
|
"peerDependencies": {
|
package/src/GestureTrigger.tsx
CHANGED
|
@@ -27,7 +27,7 @@ export type GestureTriggerProps<T extends WithOnPress> = {
|
|
|
27
27
|
/**
|
|
28
28
|
* Wraps a pressable child element and registers its native view as a trigger for `GestureViewer`.
|
|
29
29
|
*
|
|
30
|
-
* @
|
|
30
|
+
* @remarks
|
|
31
31
|
* Behavior on press:
|
|
32
32
|
* - Registers the child's native node to the internal registry under the given `id`.
|
|
33
33
|
* - Invokes the child's own `onPress` first (if provided).
|
|
@@ -82,5 +82,9 @@ export function GestureTrigger<T extends WithOnPress>({ id = 'default', children
|
|
|
82
82
|
});
|
|
83
83
|
}, [id, onPress, children]);
|
|
84
84
|
|
|
85
|
-
return
|
|
85
|
+
return (
|
|
86
|
+
<View ref={ref} collapsable={false}>
|
|
87
|
+
{wrapped}
|
|
88
|
+
</View>
|
|
89
|
+
);
|
|
86
90
|
}
|
package/src/GestureViewer.tsx
CHANGED
|
@@ -28,7 +28,7 @@ export function GestureViewer<T = any, LC = typeof ScrollView>({
|
|
|
28
28
|
|
|
29
29
|
const dataRef = useRef(data);
|
|
30
30
|
|
|
31
|
-
const { width: screenWidth } = useWindowDimensions();
|
|
31
|
+
const { width: screenWidth, height: screenHeight } = useWindowDimensions();
|
|
32
32
|
|
|
33
33
|
const width = enableSnapMode ? customWidth || screenWidth : screenWidth;
|
|
34
34
|
|
|
@@ -77,18 +77,17 @@ export function GestureViewer<T = any, LC = typeof ScrollView>({
|
|
|
77
77
|
style={[
|
|
78
78
|
{
|
|
79
79
|
width,
|
|
80
|
-
height:
|
|
81
|
-
justifyContent: 'center',
|
|
82
|
-
alignItems: 'center',
|
|
80
|
+
height: screenHeight,
|
|
83
81
|
marginHorizontal: itemSpacing / 2,
|
|
84
82
|
},
|
|
83
|
+
styles.item,
|
|
85
84
|
]}
|
|
86
85
|
>
|
|
87
86
|
{renderItemProp(item, index)}
|
|
88
87
|
</View>
|
|
89
88
|
);
|
|
90
89
|
},
|
|
91
|
-
[width, itemSpacing, renderItemProp, keyExtractor, isScrollView],
|
|
90
|
+
[width, itemSpacing, renderItemProp, keyExtractor, isScrollView, screenHeight],
|
|
92
91
|
);
|
|
93
92
|
|
|
94
93
|
const getItemLayout = useCallback(
|
|
@@ -162,10 +161,10 @@ export function GestureViewer<T = any, LC = typeof ScrollView>({
|
|
|
162
161
|
renderItem={renderItem}
|
|
163
162
|
initialScrollIndex={enableLoop && data.length > 1 ? initialIndex + 1 : initialIndex}
|
|
164
163
|
keyExtractor={keyExtractor}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
164
|
+
{...(isFlashListLike(Component)
|
|
165
|
+
? // NOTE - Deprecated estimatedItemSize for FlashList V2 (https://shopify.github.io/flash-list/docs/v2-changes#deprecated)
|
|
166
|
+
{ estimatedItemSize: width + itemSpacing }
|
|
167
|
+
: { windowSize: 3, maxToRenderPerBatch: 3, getItemLayout })}
|
|
169
168
|
// NOTE - https://github.com/necolas/react-native-web/issues/1299
|
|
170
169
|
{...(Platform.OS === 'web' &&
|
|
171
170
|
isFlatListLike(Component) && { dataSet: { 'flat-list-paging-enabled-fix': true } })}
|
|
@@ -192,6 +191,10 @@ const styles = StyleSheet.create({
|
|
|
192
191
|
width: '100%',
|
|
193
192
|
height: '100%',
|
|
194
193
|
},
|
|
194
|
+
item: {
|
|
195
|
+
justifyContent: 'center',
|
|
196
|
+
alignItems: 'center',
|
|
197
|
+
},
|
|
195
198
|
background: {
|
|
196
199
|
position: 'absolute',
|
|
197
200
|
top: 0,
|
package/src/types.ts
CHANGED
|
@@ -41,7 +41,7 @@ export interface TriggerAnimationConfig extends WithTimingConfig {
|
|
|
41
41
|
export interface GestureViewerProps<T = any, LC = typeof RNScrollView> {
|
|
42
42
|
/**
|
|
43
43
|
* When you want to efficiently manage multiple `GestureViewer` instances, you can use the `id` prop to use multiple `GestureViewer` components.
|
|
44
|
-
* @
|
|
44
|
+
* @remarks `GestureViewer` automatically removes instances from memory when components are unmounted, so no manual memory management is required.
|
|
45
45
|
* @defaultValue 'default'
|
|
46
46
|
*/
|
|
47
47
|
id?: string;
|
|
@@ -83,13 +83,13 @@ export interface GestureViewerProps<T = any, LC = typeof RNScrollView> {
|
|
|
83
83
|
ListComponent: LC;
|
|
84
84
|
/**
|
|
85
85
|
* The width of the `GestureViewer`.
|
|
86
|
-
* @
|
|
86
|
+
* @remarks If you don't set this prop, the width of the `GestureViewer` will be the same as the width of the screen.
|
|
87
87
|
* @defaultValue screen width
|
|
88
88
|
*/
|
|
89
89
|
width?: number;
|
|
90
90
|
/**
|
|
91
91
|
* The props to pass to the list component.
|
|
92
|
-
* @
|
|
92
|
+
* @remarks The `listProps` provides **type inference based on the selected list component**, ensuring accurate autocompletion and type safety in your IDE.
|
|
93
93
|
*/
|
|
94
94
|
listProps?: Partial<ConditionalListProps<LC>>;
|
|
95
95
|
/**
|
|
@@ -102,7 +102,7 @@ export interface GestureViewerProps<T = any, LC = typeof RNScrollView> {
|
|
|
102
102
|
containerStyle?: StyleProp<ViewStyle>;
|
|
103
103
|
/**
|
|
104
104
|
* Dismiss gesture options. Calls `onDismiss` function when swiping down.
|
|
105
|
-
* @
|
|
105
|
+
* @remarks Useful for closing modals with downward swipe gestures.
|
|
106
106
|
*/
|
|
107
107
|
dismiss?: {
|
|
108
108
|
/**
|
|
@@ -122,32 +122,32 @@ export interface GestureViewerProps<T = any, LC = typeof RNScrollView> {
|
|
|
122
122
|
resistance?: number;
|
|
123
123
|
/**
|
|
124
124
|
* By default, the background `opacity` gradually decreases from 1 to 0 during downward swipe gestures.
|
|
125
|
-
* @
|
|
125
|
+
* @remarks When `false`, this animation is disabled.
|
|
126
126
|
* @defaultValue true
|
|
127
127
|
*/
|
|
128
128
|
fadeBackdrop?: boolean;
|
|
129
129
|
};
|
|
130
130
|
/**
|
|
131
131
|
* Controls left/right swipe gestures.
|
|
132
|
-
* @
|
|
132
|
+
* @remarks When `false`, horizontal gestures are disabled.
|
|
133
133
|
* @defaultValue true
|
|
134
134
|
*/
|
|
135
135
|
enableHorizontalSwipe?: boolean;
|
|
136
136
|
/**
|
|
137
137
|
* Only works when zoom is active, allows moving item position when zoomed.
|
|
138
|
-
* @
|
|
138
|
+
* @remarks When `false`, gesture movement is disabled during zoom.
|
|
139
139
|
* @defaultValue true
|
|
140
140
|
*/
|
|
141
141
|
enablePanWhenZoomed?: boolean;
|
|
142
142
|
/**
|
|
143
143
|
* Controls two-finger pinch gestures.
|
|
144
|
-
* @
|
|
144
|
+
* @remarks When `false`, two-finger zoom gestures are disabled.
|
|
145
145
|
* @defaultValue true
|
|
146
146
|
*/
|
|
147
147
|
enablePinchZoom?: boolean;
|
|
148
148
|
/**
|
|
149
149
|
* Controls double-tap zoom gestures.
|
|
150
|
-
* @
|
|
150
|
+
* @remarks When `false`, double-tap zoom gestures are disabled.
|
|
151
151
|
* @defaultValue true
|
|
152
152
|
*/
|
|
153
153
|
enableDoubleTapZoom?: boolean;
|
|
@@ -159,7 +159,7 @@ export interface GestureViewerProps<T = any, LC = typeof RNScrollView> {
|
|
|
159
159
|
/**
|
|
160
160
|
* Enables snap scrolling mode.
|
|
161
161
|
*
|
|
162
|
-
* @
|
|
162
|
+
* @remarks
|
|
163
163
|
* **`false` (default)**: Paging mode (`pagingEnabled: true`)
|
|
164
164
|
* - Scrolls by full screen size increments
|
|
165
165
|
*
|
|
@@ -172,7 +172,7 @@ export interface GestureViewerProps<T = any, LC = typeof RNScrollView> {
|
|
|
172
172
|
enableSnapMode?: boolean;
|
|
173
173
|
/**
|
|
174
174
|
* The spacing between items in pixels.
|
|
175
|
-
* @
|
|
175
|
+
* @remarks Only applied when `enableSnapMode` is `true`.
|
|
176
176
|
* @defaultValue 0
|
|
177
177
|
*/
|
|
178
178
|
itemSpacing?: number;
|