@chem-po/react-native 0.0.24 → 0.0.26
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/commonjs/components/form/UploadProgress/index.js +8 -17
- package/lib/commonjs/components/form/UploadProgress/index.js.map +1 -1
- package/lib/commonjs/components/form/input/file/index.js +26 -8
- package/lib/commonjs/components/form/input/file/index.js.map +1 -1
- package/lib/commonjs/components/image/ImageViewModal.backup.js +285 -0
- package/lib/commonjs/components/image/ImageViewModal.backup.js.map +1 -0
- package/lib/commonjs/components/image/ImageViewModal.js +79 -99
- package/lib/commonjs/components/image/ImageViewModal.js.map +1 -1
- package/lib/commonjs/components/image/ImageViewModal.old.js +285 -0
- package/lib/commonjs/components/image/ImageViewModal.old.js.map +1 -0
- package/lib/commonjs/components/loading/ProgressBar.js +78 -0
- package/lib/commonjs/components/loading/ProgressBar.js.map +1 -0
- package/lib/commonjs/components/loading/index.js +11 -0
- package/lib/commonjs/components/loading/index.js.map +1 -1
- package/lib/module/components/form/UploadProgress/index.js +6 -15
- package/lib/module/components/form/UploadProgress/index.js.map +1 -1
- package/lib/module/components/form/input/file/index.js +27 -9
- package/lib/module/components/form/input/file/index.js.map +1 -1
- package/lib/module/components/image/ImageViewModal.backup.js +277 -0
- package/lib/module/components/image/ImageViewModal.backup.js.map +1 -0
- package/lib/module/components/image/ImageViewModal.js +80 -100
- package/lib/module/components/image/ImageViewModal.js.map +1 -1
- package/lib/module/components/image/ImageViewModal.old.js +277 -0
- package/lib/module/components/image/ImageViewModal.old.js.map +1 -0
- package/lib/module/components/loading/ProgressBar.js +70 -0
- package/lib/module/components/loading/ProgressBar.js.map +1 -0
- package/lib/module/components/loading/index.js +1 -0
- package/lib/module/components/loading/index.js.map +1 -1
- package/lib/typescript/components/form/UploadProgress/index.d.ts.map +1 -1
- package/lib/typescript/components/form/input/file/index.d.ts +5 -3
- package/lib/typescript/components/form/input/file/index.d.ts.map +1 -1
- package/lib/typescript/components/image/ImageViewModal.backup.d.ts +9 -0
- package/lib/typescript/components/image/ImageViewModal.backup.d.ts.map +1 -0
- package/lib/typescript/components/image/ImageViewModal.d.ts.map +1 -1
- package/lib/typescript/components/image/ImageViewModal.old.d.ts +9 -0
- package/lib/typescript/components/image/ImageViewModal.old.d.ts.map +1 -0
- package/lib/typescript/components/loading/ProgressBar.d.ts +7 -0
- package/lib/typescript/components/loading/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/components/loading/index.d.ts +1 -0
- package/lib/typescript/components/loading/index.d.ts.map +1 -1
- package/package.json +11 -10
- package/src/components/form/UploadProgress/index.tsx +3 -17
- package/src/components/form/input/file/index.tsx +28 -8
- package/src/components/image/ImageViewModal.backup.tsx +261 -0
- package/src/components/image/ImageViewModal.old.tsx +261 -0
- package/src/components/image/ImageViewModal.tsx +72 -79
- package/src/components/loading/ProgressBar.tsx +75 -0
- package/src/components/loading/index.ts +1 -0
|
@@ -9,6 +9,7 @@ var _vectorIcons = require("@expo/vector-icons");
|
|
|
9
9
|
var _react2 = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactNative = require("react-native");
|
|
11
11
|
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
12
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
12
13
|
var _Loading = require("../loading/Loading");
|
|
13
14
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
15
|
const ImageViewModal = ({
|
|
@@ -24,18 +25,15 @@ const ImageViewModal = ({
|
|
|
24
25
|
height: screenHeight / 2
|
|
25
26
|
});
|
|
26
27
|
|
|
27
|
-
//
|
|
28
|
-
const scale = (0,
|
|
29
|
-
const translateX = (0,
|
|
30
|
-
const translateY = (0,
|
|
28
|
+
// Shared values for zoom and pan (reanimated)
|
|
29
|
+
const scale = (0, _reactNativeReanimated.useSharedValue)(1);
|
|
30
|
+
const translateX = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
31
|
+
const translateY = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
31
32
|
|
|
32
|
-
//
|
|
33
|
-
const savedScale = (0,
|
|
34
|
-
const savedTranslateX = (0,
|
|
35
|
-
const savedTranslateY = (0,
|
|
36
|
-
const currentScale = (0, _react2.useRef)(1);
|
|
37
|
-
const currentTranslateX = (0, _react2.useRef)(0);
|
|
38
|
-
const currentTranslateY = (0, _react2.useRef)(0);
|
|
33
|
+
// Saved state for gesture handling
|
|
34
|
+
const savedScale = (0, _reactNativeReanimated.useSharedValue)(1);
|
|
35
|
+
const savedTranslateX = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
36
|
+
const savedTranslateY = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
39
37
|
const {
|
|
40
38
|
height,
|
|
41
39
|
width
|
|
@@ -68,122 +66,111 @@ const ImageViewModal = ({
|
|
|
68
66
|
|
|
69
67
|
// Reset zoom and pan when modal opens/closes
|
|
70
68
|
const resetTransform = (0, _react2.useCallback)(() => {
|
|
71
|
-
scale.
|
|
72
|
-
translateX.
|
|
73
|
-
translateY.
|
|
74
|
-
savedScale.
|
|
75
|
-
savedTranslateX.
|
|
76
|
-
savedTranslateY.
|
|
77
|
-
|
|
78
|
-
currentTranslateX.current = 0;
|
|
79
|
-
currentTranslateY.current = 0;
|
|
80
|
-
}, [scale, translateX, translateY]);
|
|
69
|
+
scale.value = 1;
|
|
70
|
+
translateX.value = 0;
|
|
71
|
+
translateY.value = 0;
|
|
72
|
+
savedScale.value = 1;
|
|
73
|
+
savedTranslateX.value = 0;
|
|
74
|
+
savedTranslateY.value = 0;
|
|
75
|
+
}, [scale, translateX, translateY, savedScale, savedTranslateX, savedTranslateY]);
|
|
81
76
|
|
|
82
77
|
// Reset when modal closes or src changes
|
|
83
|
-
_react2.
|
|
78
|
+
(0, _react2.useEffect)(() => {
|
|
84
79
|
if (!isOpen || !src) {
|
|
85
80
|
resetTransform();
|
|
86
81
|
}
|
|
87
82
|
}, [isOpen, src, resetTransform]);
|
|
88
83
|
|
|
89
|
-
// Pan gesture
|
|
84
|
+
// Pan gesture with worklet
|
|
90
85
|
const panGesture = _reactNativeGestureHandler.Gesture.Pan().onUpdate(event => {
|
|
86
|
+
'worklet';
|
|
87
|
+
|
|
91
88
|
// Only allow panning if zoomed in
|
|
92
|
-
if (savedScale.
|
|
93
|
-
const newTranslateX = savedTranslateX.
|
|
94
|
-
const newTranslateY = savedTranslateY.
|
|
89
|
+
if (savedScale.value > 1) {
|
|
90
|
+
const newTranslateX = savedTranslateX.value + event.translationX;
|
|
91
|
+
const newTranslateY = savedTranslateY.value + event.translationY;
|
|
95
92
|
|
|
96
93
|
// Calculate bounds to prevent panning too far
|
|
97
|
-
const maxTranslateX = (width * savedScale.
|
|
98
|
-
const maxTranslateY = (height * savedScale.
|
|
94
|
+
const maxTranslateX = (width * savedScale.value - width) / 2;
|
|
95
|
+
const maxTranslateY = (height * savedScale.value - height) / 2;
|
|
99
96
|
const boundedTranslateX = Math.max(-maxTranslateX, Math.min(maxTranslateX, newTranslateX));
|
|
100
97
|
const boundedTranslateY = Math.max(-maxTranslateY, Math.min(maxTranslateY, newTranslateY));
|
|
101
|
-
translateX.
|
|
102
|
-
translateY.
|
|
103
|
-
currentTranslateX.current = boundedTranslateX;
|
|
104
|
-
currentTranslateY.current = boundedTranslateY;
|
|
98
|
+
translateX.value = boundedTranslateX;
|
|
99
|
+
translateY.value = boundedTranslateY;
|
|
105
100
|
}
|
|
106
101
|
}).onEnd(() => {
|
|
107
|
-
|
|
108
|
-
|
|
102
|
+
'worklet';
|
|
103
|
+
|
|
104
|
+
savedTranslateX.value = translateX.value;
|
|
105
|
+
savedTranslateY.value = translateY.value;
|
|
109
106
|
});
|
|
110
107
|
|
|
111
|
-
// Pinch gesture
|
|
108
|
+
// Pinch gesture with worklet
|
|
112
109
|
const pinchGesture = _reactNativeGestureHandler.Gesture.Pinch().onUpdate(event => {
|
|
113
|
-
|
|
110
|
+
'worklet';
|
|
111
|
+
|
|
112
|
+
const newScale = savedScale.value * event.scale;
|
|
114
113
|
// Limit zoom between 1x and 5x
|
|
115
114
|
const boundedScale = Math.max(1, Math.min(5, newScale));
|
|
116
|
-
scale.
|
|
117
|
-
currentScale.current = boundedScale;
|
|
115
|
+
scale.value = boundedScale;
|
|
118
116
|
|
|
119
117
|
// If zooming out to 1x, reset position
|
|
120
118
|
if (boundedScale <= 1) {
|
|
121
|
-
translateX.
|
|
122
|
-
translateY.
|
|
123
|
-
currentTranslateX.current = 0;
|
|
124
|
-
currentTranslateY.current = 0;
|
|
119
|
+
translateX.value = 0;
|
|
120
|
+
translateY.value = 0;
|
|
125
121
|
}
|
|
126
122
|
}).onEnd(() => {
|
|
127
|
-
|
|
123
|
+
'worklet';
|
|
124
|
+
|
|
125
|
+
savedScale.value = scale.value;
|
|
128
126
|
// If scale is close to 1, snap back to 1
|
|
129
|
-
if (savedScale.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}), _reactNative.Animated.spring(translateY, {
|
|
137
|
-
toValue: 0,
|
|
138
|
-
useNativeDriver: true
|
|
139
|
-
})]).start();
|
|
140
|
-
savedScale.current = 1;
|
|
141
|
-
savedTranslateX.current = 0;
|
|
142
|
-
savedTranslateY.current = 0;
|
|
143
|
-
currentScale.current = 1;
|
|
144
|
-
currentTranslateX.current = 0;
|
|
145
|
-
currentTranslateY.current = 0;
|
|
127
|
+
if (savedScale.value < 1.1) {
|
|
128
|
+
scale.value = (0, _reactNativeReanimated.withSpring)(1);
|
|
129
|
+
translateX.value = (0, _reactNativeReanimated.withSpring)(0);
|
|
130
|
+
translateY.value = (0, _reactNativeReanimated.withSpring)(0);
|
|
131
|
+
savedScale.value = 1;
|
|
132
|
+
savedTranslateX.value = 0;
|
|
133
|
+
savedTranslateY.value = 0;
|
|
146
134
|
} else {
|
|
147
|
-
savedTranslateX.
|
|
148
|
-
savedTranslateY.
|
|
135
|
+
savedTranslateX.value = translateX.value;
|
|
136
|
+
savedTranslateY.value = translateY.value;
|
|
149
137
|
}
|
|
150
138
|
});
|
|
151
139
|
|
|
152
|
-
// Double tap to zoom
|
|
140
|
+
// Double tap to zoom with worklet
|
|
153
141
|
const doubleTapGesture = _reactNativeGestureHandler.Gesture.Tap().numberOfTaps(2).onEnd(() => {
|
|
154
|
-
|
|
142
|
+
'worklet';
|
|
143
|
+
|
|
144
|
+
if (savedScale.value > 1) {
|
|
155
145
|
// Zoom out
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}), _reactNative.Animated.spring(translateY, {
|
|
163
|
-
toValue: 0,
|
|
164
|
-
useNativeDriver: true
|
|
165
|
-
})]).start();
|
|
166
|
-
savedScale.current = 1;
|
|
167
|
-
savedTranslateX.current = 0;
|
|
168
|
-
savedTranslateY.current = 0;
|
|
169
|
-
currentScale.current = 1;
|
|
170
|
-
currentTranslateX.current = 0;
|
|
171
|
-
currentTranslateY.current = 0;
|
|
146
|
+
scale.value = (0, _reactNativeReanimated.withSpring)(1);
|
|
147
|
+
translateX.value = (0, _reactNativeReanimated.withSpring)(0);
|
|
148
|
+
translateY.value = (0, _reactNativeReanimated.withSpring)(0);
|
|
149
|
+
savedScale.value = 1;
|
|
150
|
+
savedTranslateX.value = 0;
|
|
151
|
+
savedTranslateY.value = 0;
|
|
172
152
|
} else {
|
|
173
153
|
// Zoom in to 2x
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
useNativeDriver: true
|
|
177
|
-
}).start();
|
|
178
|
-
savedScale.current = 2;
|
|
179
|
-
currentScale.current = 2;
|
|
154
|
+
scale.value = (0, _reactNativeReanimated.withSpring)(2);
|
|
155
|
+
savedScale.value = 2;
|
|
180
156
|
}
|
|
181
157
|
});
|
|
182
158
|
|
|
183
|
-
//
|
|
184
|
-
|
|
185
|
-
// Combine gestures - simplified approach
|
|
159
|
+
// Combine gestures
|
|
186
160
|
const combinedGestures = _reactNativeGestureHandler.Gesture.Race(doubleTapGesture, _reactNativeGestureHandler.Gesture.Simultaneous(panGesture, pinchGesture));
|
|
161
|
+
|
|
162
|
+
// Animated style using reanimated
|
|
163
|
+
const animatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
164
|
+
return {
|
|
165
|
+
transform: [{
|
|
166
|
+
scale: scale.value
|
|
167
|
+
}, {
|
|
168
|
+
translateX: translateX.value
|
|
169
|
+
}, {
|
|
170
|
+
translateY: translateY.value
|
|
171
|
+
}]
|
|
172
|
+
};
|
|
173
|
+
});
|
|
187
174
|
if (!isOpen) {
|
|
188
175
|
return null;
|
|
189
176
|
}
|
|
@@ -204,19 +191,12 @@ const ImageViewModal = ({
|
|
|
204
191
|
style: styles.contentContainer
|
|
205
192
|
}, /*#__PURE__*/_react2.default.createElement(_reactNativeGestureHandler.GestureDetector, {
|
|
206
193
|
gesture: combinedGestures
|
|
207
|
-
}, /*#__PURE__*/_react2.default.createElement(
|
|
194
|
+
}, /*#__PURE__*/_react2.default.createElement(_reactNativeReanimated.default.View, {
|
|
208
195
|
style: [styles.imageContainer, {
|
|
209
196
|
width,
|
|
210
197
|
height,
|
|
211
|
-
opacity: loading ? 0 : 1
|
|
212
|
-
|
|
213
|
-
scale
|
|
214
|
-
}, {
|
|
215
|
-
translateX
|
|
216
|
-
}, {
|
|
217
|
-
translateY
|
|
218
|
-
}]
|
|
219
|
-
}]
|
|
198
|
+
opacity: loading ? 0 : 1
|
|
199
|
+
}, animatedStyle]
|
|
220
200
|
}, /*#__PURE__*/_react2.default.createElement(_reactNative.Image, {
|
|
221
201
|
source: src ? {
|
|
222
202
|
uri: src
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_vectorIcons","_react2","_interopRequireWildcard","_reactNative","_reactNativeGestureHandler","_Loading","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ImageViewModal","isOpen","onClose","src","loading","setLoading","useState","screenWidth","useScreen","s","width","screenHeight","height","imageSize","setImageSize","scale","useRef","Animated","Value","current","translateX","translateY","savedScale","savedTranslateX","savedTranslateY","currentScale","currentTranslateX","currentTranslateY","useMemo","ratio","h","Math","min","w","onLoadStart","useCallback","onLoad","naturalWidth","naturalHeight","nativeEvent","source","resetTransform","setValue","React","useEffect","panGesture","Gesture","Pan","onUpdate","event","newTranslateX","translationX","newTranslateY","translationY","maxTranslateX","maxTranslateY","boundedTranslateX","max","boundedTranslateY","onEnd","pinchGesture","Pinch","newScale","boundedScale","parallel","spring","toValue","useNativeDriver","start","doubleTapGesture","Tap","numberOfTaps","combinedGestures","Race","Simultaneous","createElement","Modal","visible","transparent","animationType","onRequestClose","GestureHandlerRootView","style","styles","gestureRoot","View","modalOverlay","TouchableOpacity","backgroundTouchable","activeOpacity","onPress","contentContainer","GestureDetector","gesture","imageContainer","opacity","transform","Image","uri","undefined","image","resizeMode","closeButton","Ionicons","name","size","color","loadingContainer","LoadingLogo","isLoading","exports","StyleSheet","create","flex","backgroundColor","absoluteFillObject","justifyContent","alignItems","padding","overflow","borderRadius","position","top","right"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/image/ImageViewModal.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,I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EAAiB,gBACnCnI,OAAA,CAAAe,OAAA,CAAAoF,aAAA,CAAC/F,QAAA,CAAAgI,WAAW;IAACC,SAAS,EAAEzG,OAAQ;IAACqG,IAAI,EAAE;EAAG,CAAE,CACxC,CAAC,GACL,IACA,CACF,CACgB,CACnB,CAAC;AAEZ,CAAC;AAAAK,OAAA,CAAA9G,cAAA,GAAAA,cAAA;AAED,MAAMmF,MAAM,GAAG4B,uBAAU,CAACC,MAAM,CAAC;EAC/B5B,WAAW,EAAE;IACX6B,IAAI,EAAE;EACR,CAAC;EACD3B,YAAY,EAAE;IACZ2B,IAAI,EAAE,CAAC;IACPC,eAAe,EAAE;EACnB,CAAC;EACD1B,mBAAmB,EAAE;IACnB,GAAGuB,uBAAU,CAACI;EAChB,CAAC;EACDxB,gBAAgB,EAAE;IAChBsB,IAAI,EAAE,CAAC;IACPG,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,OAAO,EAAE;EACX,CAAC;EACDxB,cAAc,EAAE;IACdyB,QAAQ,EAAE,QAAQ;IAClBC,YAAY,EAAE;EAChB,CAAC;EACDpB,KAAK,EAAE;IACL1F,KAAK,EAAE,MAAM;IACbE,MAAM,EAAE;EACV,CAAC;EACD0F,WAAW,EAAE;IACXmB,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,EAAE;IACPC,KAAK,EAAE,EAAE;IACTjH,KAAK,EAAE,EAAE;IACTE,MAAM,EAAE,EAAE;IACV4G,YAAY,EAAE,EAAE;IAChBN,eAAe,EAAE,oBAAoB;IACrCE,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDV,gBAAgB,EAAE;IAChB,GAAGI,uBAAU,CAACI,kBAAkB;IAChCC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","require","_vectorIcons","_react2","_interopRequireWildcard","_reactNative","_reactNativeGestureHandler","_reactNativeReanimated","_Loading","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ImageViewModal","isOpen","onClose","src","loading","setLoading","useState","screenWidth","useScreen","s","width","screenHeight","height","imageSize","setImageSize","scale","useSharedValue","translateX","translateY","savedScale","savedTranslateX","savedTranslateY","useMemo","ratio","h","Math","min","w","onLoadStart","useCallback","onLoad","naturalWidth","naturalHeight","nativeEvent","source","resetTransform","value","useEffect","panGesture","Gesture","Pan","onUpdate","event","newTranslateX","translationX","newTranslateY","translationY","maxTranslateX","maxTranslateY","boundedTranslateX","max","boundedTranslateY","onEnd","pinchGesture","Pinch","newScale","boundedScale","withSpring","doubleTapGesture","Tap","numberOfTaps","combinedGestures","Race","Simultaneous","animatedStyle","useAnimatedStyle","transform","createElement","Modal","visible","transparent","animationType","onRequestClose","GestureHandlerRootView","style","styles","gestureRoot","View","modalOverlay","TouchableOpacity","backgroundTouchable","activeOpacity","onPress","contentContainer","GestureDetector","gesture","imageContainer","opacity","Image","uri","undefined","image","resizeMode","closeButton","Ionicons","name","size","color","loadingContainer","LoadingLogo","isLoading","exports","StyleSheet","create","flex","backgroundColor","absoluteFillObject","justifyContent","alignItems","padding","overflow","borderRadius","position","top","right"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/image/ImageViewModal.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,0BAAA,GAAAL,OAAA;AACA,IAAAM,sBAAA,GAAAH,uBAAA,CAAAH,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAAgD,SAAAG,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAP,u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AAC,GACL,IACA,CACF,CACgB,CACnB,CAAC;AAEZ,CAAC;AAAAK,OAAA,CAAArG,cAAA,GAAAA,cAAA;AAED,MAAM2E,MAAM,GAAG2B,uBAAU,CAACC,MAAM,CAAC;EAC/B3B,WAAW,EAAE;IACX4B,IAAI,EAAE;EACR,CAAC;EACD1B,YAAY,EAAE;IACZ0B,IAAI,EAAE,CAAC;IACPC,eAAe,EAAE;EACnB,CAAC;EACDzB,mBAAmB,EAAE;IACnB,GAAGsB,uBAAU,CAACI;EAChB,CAAC;EACDvB,gBAAgB,EAAE;IAChBqB,IAAI,EAAE,CAAC;IACPG,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,OAAO,EAAE;EACX,CAAC;EACDvB,cAAc,EAAE;IACdwB,QAAQ,EAAE,QAAQ;IAClBC,YAAY,EAAE;EAChB,CAAC;EACDpB,KAAK,EAAE;IACLjF,KAAK,EAAE,MAAM;IACbE,MAAM,EAAE;EACV,CAAC;EACDiF,WAAW,EAAE;IACXmB,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,EAAE;IACPC,KAAK,EAAE,EAAE;IACTxG,KAAK,EAAE,EAAE;IACTE,MAAM,EAAE,EAAE;IACVmG,YAAY,EAAE,EAAE;IAChBN,eAAe,EAAE,oBAAoB;IACrCE,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDV,gBAAgB,EAAE;IAChB,GAAGI,uBAAU,CAACI,kBAAkB;IAChCC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ImageViewModal = void 0;
|
|
7
|
+
var _react = require("@chem-po/react");
|
|
8
|
+
var _vectorIcons = require("@expo/vector-icons");
|
|
9
|
+
var _react2 = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _reactNative = require("react-native");
|
|
11
|
+
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
12
|
+
var _Loading = require("../loading/Loading");
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
+
const ImageViewModal = ({
|
|
15
|
+
isOpen,
|
|
16
|
+
onClose,
|
|
17
|
+
src
|
|
18
|
+
}) => {
|
|
19
|
+
const [loading, setLoading] = (0, _react2.useState)(true);
|
|
20
|
+
const screenWidth = (0, _react.useScreen)(s => s.width);
|
|
21
|
+
const screenHeight = (0, _react.useScreen)(s => s.height);
|
|
22
|
+
const [imageSize, setImageSize] = (0, _react2.useState)({
|
|
23
|
+
width: screenWidth / 2,
|
|
24
|
+
height: screenHeight / 2
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// Animated values for zoom and pan
|
|
28
|
+
const scale = (0, _react2.useRef)(new _reactNative.Animated.Value(1)).current;
|
|
29
|
+
const translateX = (0, _react2.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
30
|
+
const translateY = (0, _react2.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
31
|
+
|
|
32
|
+
// Gesture state
|
|
33
|
+
const savedScale = (0, _react2.useRef)(1);
|
|
34
|
+
const savedTranslateX = (0, _react2.useRef)(0);
|
|
35
|
+
const savedTranslateY = (0, _react2.useRef)(0);
|
|
36
|
+
const currentScale = (0, _react2.useRef)(1);
|
|
37
|
+
const currentTranslateX = (0, _react2.useRef)(0);
|
|
38
|
+
const currentTranslateY = (0, _react2.useRef)(0);
|
|
39
|
+
const {
|
|
40
|
+
height,
|
|
41
|
+
width
|
|
42
|
+
} = (0, _react2.useMemo)(() => {
|
|
43
|
+
if (loading) return imageSize;
|
|
44
|
+
const ratio = imageSize.width / imageSize.height;
|
|
45
|
+
let h = Math.min(imageSize.height, screenHeight * 0.9);
|
|
46
|
+
let w = h * ratio;
|
|
47
|
+
if (w > screenWidth * 0.9) {
|
|
48
|
+
w = Math.min(imageSize.width, screenWidth * 0.9);
|
|
49
|
+
h = w / ratio;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
height: h,
|
|
53
|
+
width: w
|
|
54
|
+
};
|
|
55
|
+
}, [screenHeight, screenWidth, imageSize, loading]);
|
|
56
|
+
const onLoadStart = (0, _react2.useCallback)(() => setLoading(true), []);
|
|
57
|
+
const onLoad = (0, _react2.useCallback)(e => {
|
|
58
|
+
const {
|
|
59
|
+
width: naturalWidth,
|
|
60
|
+
height: naturalHeight
|
|
61
|
+
} = e.nativeEvent.source;
|
|
62
|
+
setImageSize({
|
|
63
|
+
width: naturalWidth,
|
|
64
|
+
height: naturalHeight
|
|
65
|
+
});
|
|
66
|
+
setLoading(false);
|
|
67
|
+
}, []);
|
|
68
|
+
|
|
69
|
+
// Reset zoom and pan when modal opens/closes
|
|
70
|
+
const resetTransform = (0, _react2.useCallback)(() => {
|
|
71
|
+
scale.setValue(1);
|
|
72
|
+
translateX.setValue(0);
|
|
73
|
+
translateY.setValue(0);
|
|
74
|
+
savedScale.current = 1;
|
|
75
|
+
savedTranslateX.current = 0;
|
|
76
|
+
savedTranslateY.current = 0;
|
|
77
|
+
currentScale.current = 1;
|
|
78
|
+
currentTranslateX.current = 0;
|
|
79
|
+
currentTranslateY.current = 0;
|
|
80
|
+
}, [scale, translateX, translateY]);
|
|
81
|
+
|
|
82
|
+
// Reset when modal closes or src changes
|
|
83
|
+
_react2.default.useEffect(() => {
|
|
84
|
+
if (!isOpen || !src) {
|
|
85
|
+
resetTransform();
|
|
86
|
+
}
|
|
87
|
+
}, [isOpen, src, resetTransform]);
|
|
88
|
+
|
|
89
|
+
// Pan gesture
|
|
90
|
+
const panGesture = _reactNativeGestureHandler.Gesture.Pan().onUpdate(event => {
|
|
91
|
+
// Only allow panning if zoomed in
|
|
92
|
+
if (savedScale.current > 1) {
|
|
93
|
+
const newTranslateX = savedTranslateX.current + event.translationX;
|
|
94
|
+
const newTranslateY = savedTranslateY.current + event.translationY;
|
|
95
|
+
|
|
96
|
+
// Calculate bounds to prevent panning too far
|
|
97
|
+
const maxTranslateX = (width * savedScale.current - width) / 2;
|
|
98
|
+
const maxTranslateY = (height * savedScale.current - height) / 2;
|
|
99
|
+
const boundedTranslateX = Math.max(-maxTranslateX, Math.min(maxTranslateX, newTranslateX));
|
|
100
|
+
const boundedTranslateY = Math.max(-maxTranslateY, Math.min(maxTranslateY, newTranslateY));
|
|
101
|
+
translateX.setValue(boundedTranslateX);
|
|
102
|
+
translateY.setValue(boundedTranslateY);
|
|
103
|
+
currentTranslateX.current = boundedTranslateX;
|
|
104
|
+
currentTranslateY.current = boundedTranslateY;
|
|
105
|
+
}
|
|
106
|
+
}).onEnd(() => {
|
|
107
|
+
savedTranslateX.current = currentTranslateX.current;
|
|
108
|
+
savedTranslateY.current = currentTranslateY.current;
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// Pinch gesture
|
|
112
|
+
const pinchGesture = _reactNativeGestureHandler.Gesture.Pinch().onUpdate(event => {
|
|
113
|
+
const newScale = savedScale.current * event.scale;
|
|
114
|
+
// Limit zoom between 1x and 5x
|
|
115
|
+
const boundedScale = Math.max(1, Math.min(5, newScale));
|
|
116
|
+
scale.setValue(boundedScale);
|
|
117
|
+
currentScale.current = boundedScale;
|
|
118
|
+
|
|
119
|
+
// If zooming out to 1x, reset position
|
|
120
|
+
if (boundedScale <= 1) {
|
|
121
|
+
translateX.setValue(0);
|
|
122
|
+
translateY.setValue(0);
|
|
123
|
+
currentTranslateX.current = 0;
|
|
124
|
+
currentTranslateY.current = 0;
|
|
125
|
+
}
|
|
126
|
+
}).onEnd(() => {
|
|
127
|
+
savedScale.current = currentScale.current;
|
|
128
|
+
// If scale is close to 1, snap back to 1
|
|
129
|
+
if (savedScale.current < 1.1) {
|
|
130
|
+
_reactNative.Animated.parallel([_reactNative.Animated.spring(scale, {
|
|
131
|
+
toValue: 1,
|
|
132
|
+
useNativeDriver: true
|
|
133
|
+
}), _reactNative.Animated.spring(translateX, {
|
|
134
|
+
toValue: 0,
|
|
135
|
+
useNativeDriver: true
|
|
136
|
+
}), _reactNative.Animated.spring(translateY, {
|
|
137
|
+
toValue: 0,
|
|
138
|
+
useNativeDriver: true
|
|
139
|
+
})]).start();
|
|
140
|
+
savedScale.current = 1;
|
|
141
|
+
savedTranslateX.current = 0;
|
|
142
|
+
savedTranslateY.current = 0;
|
|
143
|
+
currentScale.current = 1;
|
|
144
|
+
currentTranslateX.current = 0;
|
|
145
|
+
currentTranslateY.current = 0;
|
|
146
|
+
} else {
|
|
147
|
+
savedTranslateX.current = currentTranslateX.current;
|
|
148
|
+
savedTranslateY.current = currentTranslateY.current;
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// Double tap to zoom
|
|
153
|
+
const doubleTapGesture = _reactNativeGestureHandler.Gesture.Tap().numberOfTaps(2).onEnd(() => {
|
|
154
|
+
if (savedScale.current > 1) {
|
|
155
|
+
// Zoom out
|
|
156
|
+
_reactNative.Animated.parallel([_reactNative.Animated.spring(scale, {
|
|
157
|
+
toValue: 1,
|
|
158
|
+
useNativeDriver: true
|
|
159
|
+
}), _reactNative.Animated.spring(translateX, {
|
|
160
|
+
toValue: 0,
|
|
161
|
+
useNativeDriver: true
|
|
162
|
+
}), _reactNative.Animated.spring(translateY, {
|
|
163
|
+
toValue: 0,
|
|
164
|
+
useNativeDriver: true
|
|
165
|
+
})]).start();
|
|
166
|
+
savedScale.current = 1;
|
|
167
|
+
savedTranslateX.current = 0;
|
|
168
|
+
savedTranslateY.current = 0;
|
|
169
|
+
currentScale.current = 1;
|
|
170
|
+
currentTranslateX.current = 0;
|
|
171
|
+
currentTranslateY.current = 0;
|
|
172
|
+
} else {
|
|
173
|
+
// Zoom in to 2x
|
|
174
|
+
_reactNative.Animated.spring(scale, {
|
|
175
|
+
toValue: 2,
|
|
176
|
+
useNativeDriver: true
|
|
177
|
+
}).start();
|
|
178
|
+
savedScale.current = 2;
|
|
179
|
+
currentScale.current = 2;
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
// Test simple single tap gesture
|
|
184
|
+
|
|
185
|
+
// Combine gestures - simplified approach
|
|
186
|
+
const combinedGestures = _reactNativeGestureHandler.Gesture.Race(doubleTapGesture, _reactNativeGestureHandler.Gesture.Simultaneous(panGesture, pinchGesture));
|
|
187
|
+
if (!isOpen) {
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
return /*#__PURE__*/_react2.default.createElement(_reactNative.Modal, {
|
|
191
|
+
visible: isOpen,
|
|
192
|
+
transparent: true,
|
|
193
|
+
animationType: "fade",
|
|
194
|
+
onRequestClose: onClose
|
|
195
|
+
}, /*#__PURE__*/_react2.default.createElement(_reactNativeGestureHandler.GestureHandlerRootView, {
|
|
196
|
+
style: styles.gestureRoot
|
|
197
|
+
}, /*#__PURE__*/_react2.default.createElement(_reactNative.View, {
|
|
198
|
+
style: styles.modalOverlay
|
|
199
|
+
}, /*#__PURE__*/_react2.default.createElement(_reactNative.TouchableOpacity, {
|
|
200
|
+
style: styles.backgroundTouchable,
|
|
201
|
+
activeOpacity: 1,
|
|
202
|
+
onPress: onClose
|
|
203
|
+
}), /*#__PURE__*/_react2.default.createElement(_reactNative.View, {
|
|
204
|
+
style: styles.contentContainer
|
|
205
|
+
}, /*#__PURE__*/_react2.default.createElement(_reactNativeGestureHandler.GestureDetector, {
|
|
206
|
+
gesture: combinedGestures
|
|
207
|
+
}, /*#__PURE__*/_react2.default.createElement(_reactNative.Animated.View, {
|
|
208
|
+
style: [styles.imageContainer, {
|
|
209
|
+
width,
|
|
210
|
+
height,
|
|
211
|
+
opacity: loading ? 0 : 1,
|
|
212
|
+
transform: [{
|
|
213
|
+
scale
|
|
214
|
+
}, {
|
|
215
|
+
translateX
|
|
216
|
+
}, {
|
|
217
|
+
translateY
|
|
218
|
+
}]
|
|
219
|
+
}]
|
|
220
|
+
}, /*#__PURE__*/_react2.default.createElement(_reactNative.Image, {
|
|
221
|
+
source: src ? {
|
|
222
|
+
uri: src
|
|
223
|
+
} : undefined,
|
|
224
|
+
style: styles.image,
|
|
225
|
+
onLoadStart: onLoadStart,
|
|
226
|
+
onLoad: onLoad,
|
|
227
|
+
resizeMode: "contain"
|
|
228
|
+
}))), /*#__PURE__*/_react2.default.createElement(_reactNative.TouchableOpacity, {
|
|
229
|
+
style: styles.closeButton,
|
|
230
|
+
onPress: onClose
|
|
231
|
+
}, /*#__PURE__*/_react2.default.createElement(_vectorIcons.Ionicons, {
|
|
232
|
+
name: "close",
|
|
233
|
+
size: 24,
|
|
234
|
+
color: "white"
|
|
235
|
+
})), loading || !src ? /*#__PURE__*/_react2.default.createElement(_reactNative.View, {
|
|
236
|
+
style: styles.loadingContainer
|
|
237
|
+
}, /*#__PURE__*/_react2.default.createElement(_Loading.LoadingLogo, {
|
|
238
|
+
isLoading: loading,
|
|
239
|
+
size: 70
|
|
240
|
+
})) : null))));
|
|
241
|
+
};
|
|
242
|
+
exports.ImageViewModal = ImageViewModal;
|
|
243
|
+
const styles = _reactNative.StyleSheet.create({
|
|
244
|
+
gestureRoot: {
|
|
245
|
+
flex: 1
|
|
246
|
+
},
|
|
247
|
+
modalOverlay: {
|
|
248
|
+
flex: 1,
|
|
249
|
+
backgroundColor: 'rgba(0, 0, 0, 0.7)'
|
|
250
|
+
},
|
|
251
|
+
backgroundTouchable: {
|
|
252
|
+
..._reactNative.StyleSheet.absoluteFillObject
|
|
253
|
+
},
|
|
254
|
+
contentContainer: {
|
|
255
|
+
flex: 1,
|
|
256
|
+
justifyContent: 'center',
|
|
257
|
+
alignItems: 'center',
|
|
258
|
+
padding: 16
|
|
259
|
+
},
|
|
260
|
+
imageContainer: {
|
|
261
|
+
overflow: 'hidden',
|
|
262
|
+
borderRadius: 4
|
|
263
|
+
},
|
|
264
|
+
image: {
|
|
265
|
+
width: '100%',
|
|
266
|
+
height: '100%'
|
|
267
|
+
},
|
|
268
|
+
closeButton: {
|
|
269
|
+
position: 'absolute',
|
|
270
|
+
top: 16,
|
|
271
|
+
right: 16,
|
|
272
|
+
width: 40,
|
|
273
|
+
height: 40,
|
|
274
|
+
borderRadius: 20,
|
|
275
|
+
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
276
|
+
justifyContent: 'center',
|
|
277
|
+
alignItems: 'center'
|
|
278
|
+
},
|
|
279
|
+
loadingContainer: {
|
|
280
|
+
..._reactNative.StyleSheet.absoluteFillObject,
|
|
281
|
+
justifyContent: 'center',
|
|
282
|
+
alignItems: 'center'
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
//# sourceMappingURL=ImageViewModal.old.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_vectorIcons","_react2","_interopRequireWildcard","_reactNative","_reactNativeGestureHandler","_Loading","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ImageViewModal","isOpen","onClose","src","loading","setLoading","useState","screenWidth","useScreen","s","width","screenHeight","height","imageSize","setImageSize","scale","useRef","Animated","Value","current","translateX","translateY","savedScale","savedTranslateX","savedTranslateY","currentScale","currentTranslateX","currentTranslateY","useMemo","ratio","h","Math","min","w","onLoadStart","useCallback","onLoad","naturalWidth","naturalHeight","nativeEvent","source","resetTransform","setValue","React","useEffect","panGesture","Gesture","Pan","onUpdate","event","newTranslateX","translationX","newTranslateY","translationY","maxTranslateX","maxTranslateY","boundedTranslateX","max","boundedTranslateY","onEnd","pinchGesture","Pinch","newScale","boundedScale","parallel","spring","toValue","useNativeDriver","start","doubleTapGesture","Tap","numberOfTaps","combinedGestures","Race","Simultaneous","createElement","Modal","visible","transparent","animationType","onRequestClose","GestureHandlerRootView","style","styles","gestureRoot","View","modalOverlay","TouchableOpacity","backgroundTouchable","activeOpacity","onPress","contentContainer","GestureDetector","gesture","imageContainer","opacity","transform","Image","uri","undefined","image","resizeMode","closeButton","Ionicons","name","size","color","loadingContainer","LoadingLogo","isLoading","exports","StyleSheet","create","flex","backgroundColor","absoluteFillObject","justifyContent","alignItems","padding","overflow","borderRadius","position","top","right"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/image/ImageViewModal.old.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,0BAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAAgD,SAAAG,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,CAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAA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