@supportworks/multi-imagepicker 8.3.6 → 8.3.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/package.json +1 -1
- package/src/components/AddImages.js +2 -1
- package/src/components/CameraModal.tsx +609 -396
- package/src/components/MultiImagePicker.js +147 -52
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// Supportworks dependencies
|
|
2
2
|
import { colors } from '@supportworks/app-styler'
|
|
3
|
-
import {
|
|
3
|
+
import { SwipeModal } from '@supportworks/core-controls'
|
|
4
4
|
import { Icons } from '@supportworks/icon-library'
|
|
5
5
|
// Camera module
|
|
6
6
|
import {
|
|
7
7
|
CameraView,
|
|
8
8
|
CameraViewRef,
|
|
9
|
+
CameraInfo,
|
|
9
10
|
OnStatusChangeEventPayload,
|
|
10
11
|
OnCamerasAvailableEventPayload,
|
|
11
12
|
OnPhotoCapturedEventPayload,
|
|
@@ -25,7 +26,8 @@ import {
|
|
|
25
26
|
ScrollView,
|
|
26
27
|
Animated,
|
|
27
28
|
PanResponder,
|
|
28
|
-
Platform
|
|
29
|
+
Platform,
|
|
30
|
+
useWindowDimensions
|
|
29
31
|
} from 'react-native'
|
|
30
32
|
import Svg, { Circle, Path } from 'react-native-svg'
|
|
31
33
|
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
|
@@ -50,15 +52,30 @@ interface CameraTestModalProps {
|
|
|
50
52
|
|
|
51
53
|
// Event types are now imported from the camera module
|
|
52
54
|
|
|
53
|
-
const ZOOM_SLIDER_TRACK_LENGTH = 180
|
|
54
|
-
const ZOOM_SLIDER_WIDTH = 40
|
|
55
|
-
const ZOOM_SLIDER_THUMB_SIZE = 32
|
|
56
|
-
const MIN_ZOOM = 1
|
|
57
|
-
const MAX_ZOOM = 5
|
|
58
|
-
const ZOOM_STEP = 0.1
|
|
59
|
-
const ZOOM_RANGE = MAX_ZOOM - MIN_ZOOM
|
|
60
55
|
const DEFAULT_ZOOM = 1
|
|
61
56
|
const FOCUS_RING_SIZE = 72
|
|
57
|
+
const RIGHT_CONTROL_SCALE = 1.4
|
|
58
|
+
const SIDE_BUTTON_SIZE = Math.round(38 * RIGHT_CONTROL_SCALE)
|
|
59
|
+
const SIDE_BUTTON_ICON_SIZE = Math.round(20 * RIGHT_CONTROL_SCALE)
|
|
60
|
+
const SIDE_BUTTON_TEXT_SIZE = Math.round(14 * RIGHT_CONTROL_SCALE)
|
|
61
|
+
const SIDE_BUTTON_GAP = 18
|
|
62
|
+
const SIDE_ACTION_GROUP_MARGIN_BOTTOM = 28
|
|
63
|
+
const GALLERY_PREVIEW_SIZE = Math.round(46 * RIGHT_CONTROL_SCALE)
|
|
64
|
+
const GALLERY_PREVIEW_MARGIN_BOTTOM = 32
|
|
65
|
+
const GALLERY_PREVIEW_BORDER_RADIUS = 14
|
|
66
|
+
const GALLERY_PREVIEW_BADGE_SIZE = 28
|
|
67
|
+
const SHUTTER_BUTTON_SIZE = 76
|
|
68
|
+
const SHUTTER_BUTTON_MARGIN_BOTTOM = 20
|
|
69
|
+
const DONE_BUTTON_HEIGHT = Math.round(36 * RIGHT_CONTROL_SCALE)
|
|
70
|
+
const DONE_BUTTON_HORIZONTAL_PADDING = 24
|
|
71
|
+
const DONE_BUTTON_TEXT_SIZE = 20
|
|
72
|
+
const DONE_BUTTON_ICON_SIZE = 28
|
|
73
|
+
const RIGHT_OVERLAY_WIDTH = 132
|
|
74
|
+
const ZOOM_SLIDER_TRACK_LENGTH = 180
|
|
75
|
+
const ZOOM_SLIDER_WIDTH = 60
|
|
76
|
+
const ZOOM_SLIDER_THUMB_SIZE = 42
|
|
77
|
+
const ZOOM_SLIDER_THUMB_WIDTH = 52
|
|
78
|
+
const ZOOM_STEP = 0.5
|
|
62
79
|
type CameraPermissionState = 'checking' | 'granted' | 'denied'
|
|
63
80
|
|
|
64
81
|
const waitForAppToBeActive = async () => {
|
|
@@ -76,35 +93,73 @@ const waitForAppToBeActive = async () => {
|
|
|
76
93
|
})
|
|
77
94
|
}
|
|
78
95
|
|
|
79
|
-
const
|
|
80
|
-
|
|
96
|
+
const roundZoomValue = (value: number) => Math.round(value * 10) / 10
|
|
97
|
+
const clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max)
|
|
98
|
+
const snapZoomValue = (value: number, min: number, max: number) => {
|
|
99
|
+
const snapped = Math.round(value / ZOOM_STEP) * ZOOM_STEP
|
|
100
|
+
return roundZoomValue(clamp(snapped, min, max))
|
|
81
101
|
}
|
|
82
102
|
|
|
83
103
|
const formatZoomLabel = (zoom: number): ZoomLevel => {
|
|
84
|
-
const rounded =
|
|
104
|
+
const rounded = roundZoomValue(zoom)
|
|
85
105
|
const isWhole = Math.abs(rounded - Math.round(rounded)) < 0.01
|
|
86
106
|
return `${isWhole ? rounded.toFixed(0) : rounded.toFixed(1)}x`
|
|
87
107
|
}
|
|
88
108
|
|
|
89
|
-
const
|
|
90
|
-
|
|
109
|
+
const isSameZoomLevel = (left: number, right: number) => {
|
|
110
|
+
return Math.abs(left - right) < 0.01
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const getTopPositionForZoom = (zoom: number, minZoom: number, maxZoom: number) => {
|
|
114
|
+
const zoomRange = maxZoom - minZoom
|
|
115
|
+
if (zoomRange <= 0.01) {
|
|
91
116
|
return 0
|
|
92
117
|
}
|
|
93
|
-
|
|
94
|
-
const
|
|
118
|
+
|
|
119
|
+
const clampedZoom = clamp(zoom, minZoom, maxZoom)
|
|
120
|
+
const normalized = (maxZoom - clampedZoom) / zoomRange
|
|
95
121
|
return normalized * ZOOM_SLIDER_TRACK_LENGTH
|
|
96
122
|
}
|
|
97
123
|
|
|
98
|
-
const getZoomForTopPosition = (position: number
|
|
99
|
-
|
|
100
|
-
|
|
124
|
+
const getZoomForTopPosition = (position: number, minZoom: number, maxZoom: number) => {
|
|
125
|
+
const zoomRange = maxZoom - minZoom
|
|
126
|
+
if (zoomRange <= 0.01) {
|
|
127
|
+
return minZoom
|
|
101
128
|
}
|
|
102
129
|
|
|
103
130
|
const clampedPosition = clamp(position, 0, ZOOM_SLIDER_TRACK_LENGTH)
|
|
104
131
|
const normalized = clampedPosition / ZOOM_SLIDER_TRACK_LENGTH
|
|
105
|
-
const zoom =
|
|
106
|
-
|
|
107
|
-
|
|
132
|
+
const zoom = maxZoom - normalized * zoomRange
|
|
133
|
+
return snapZoomValue(zoom, minZoom, maxZoom)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const buildZoomRangeForPosition = (cameras: CameraInfo[], position: 'front' | 'back') => {
|
|
137
|
+
const positionCameras = cameras.filter((camera) => camera.position === position && camera.isAvailable)
|
|
138
|
+
|
|
139
|
+
if (!positionCameras.length || position === 'front') {
|
|
140
|
+
return { min: DEFAULT_ZOOM, max: DEFAULT_ZOOM }
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
let minActualZoom = Number.POSITIVE_INFINITY
|
|
144
|
+
let maxActualZoom = DEFAULT_ZOOM
|
|
145
|
+
|
|
146
|
+
positionCameras.forEach((camera) => {
|
|
147
|
+
const opticalZoom = typeof camera.zoomFactor === 'number' && camera.zoomFactor > 0 ? camera.zoomFactor : DEFAULT_ZOOM
|
|
148
|
+
const minFactor = typeof camera.minZoomFactor === 'number' && camera.minZoomFactor > 0 ? camera.minZoomFactor : DEFAULT_ZOOM
|
|
149
|
+
const maxFactor = typeof camera.maxZoomFactor === 'number' && camera.maxZoomFactor > 0 ? camera.maxZoomFactor : DEFAULT_ZOOM
|
|
150
|
+
|
|
151
|
+
minActualZoom = Math.min(minActualZoom, opticalZoom * minFactor)
|
|
152
|
+
maxActualZoom = Math.max(maxActualZoom, opticalZoom * maxFactor)
|
|
153
|
+
})
|
|
154
|
+
|
|
155
|
+
if (!Number.isFinite(minActualZoom)) {
|
|
156
|
+
return { min: DEFAULT_ZOOM, max: DEFAULT_ZOOM }
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const minZoom = roundZoomValue(clamp(minActualZoom, 0.5, 5))
|
|
160
|
+
const maxZoom = roundZoomValue(clamp(Math.max(maxActualZoom, minZoom), minZoom, 5))
|
|
161
|
+
|
|
162
|
+
return { min: minZoom, max: maxZoom }
|
|
108
163
|
}
|
|
109
164
|
|
|
110
165
|
const FlipCameraIcon: React.FC<{ size?: number; color?: string }> = ({ size = 28, color = colors.white }) => (
|
|
@@ -142,6 +197,7 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
142
197
|
const internalCameraRef = useRef<CameraViewRef>(null)
|
|
143
198
|
const cameraRef = externalCameraRef || internalCameraRef
|
|
144
199
|
const insets = useSafeAreaInsets()
|
|
200
|
+
const { height: windowHeight } = useWindowDimensions()
|
|
145
201
|
|
|
146
202
|
// Debug logging
|
|
147
203
|
React.useEffect(() => {
|
|
@@ -153,9 +209,12 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
153
209
|
const [currentZoom, setCurrentZoom] = useState<number>(DEFAULT_ZOOM)
|
|
154
210
|
const [isDepthEnabled, setIsDepthEnabled] = useState<boolean>(true)
|
|
155
211
|
const [isFlashEnabled, setIsFlashEnabled] = useState<boolean>(false)
|
|
156
|
-
const [
|
|
157
|
-
front:
|
|
158
|
-
back:
|
|
212
|
+
const [zoomRangeByPosition, setZoomRangeByPosition] = useState<{
|
|
213
|
+
front: { min: number; max: number }
|
|
214
|
+
back: { min: number; max: number }
|
|
215
|
+
}>({
|
|
216
|
+
front: { min: DEFAULT_ZOOM, max: DEFAULT_ZOOM },
|
|
217
|
+
back: { min: DEFAULT_ZOOM, max: DEFAULT_ZOOM }
|
|
159
218
|
})
|
|
160
219
|
const [capturedImages, setCapturedImages] = useState<CapturedImage[]>([])
|
|
161
220
|
const [isFrontCamera, setIsFrontCamera] = useState<boolean>(false)
|
|
@@ -163,13 +222,52 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
163
222
|
const [isDoneButtonDisabled, setIsDoneButtonDisabled] = useState<boolean>(false)
|
|
164
223
|
const [focusPoint, setFocusPoint] = useState<{ x: number; y: number } | null>(null)
|
|
165
224
|
const [cameraPermissionState, setCameraPermissionState] = useState<CameraPermissionState>('checking')
|
|
166
|
-
const
|
|
225
|
+
const [isCapturePending, setIsCapturePending] = useState<boolean>(false)
|
|
167
226
|
const focusAnim = useRef(new Animated.Value(0)).current
|
|
168
|
-
const
|
|
227
|
+
const knobTop = useRef(new Animated.Value(0)).current
|
|
228
|
+
const isSliderDragging = useRef(false)
|
|
169
229
|
const zoomRailRef = useRef<View>(null)
|
|
170
230
|
const zoomRailTopRef = useRef<number | null>(null)
|
|
171
|
-
const
|
|
172
|
-
const
|
|
231
|
+
const capturePendingRef = useRef(false)
|
|
232
|
+
const capturePendingTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)
|
|
233
|
+
const currentZoomRange = isFrontCamera ? zoomRangeByPosition.front : zoomRangeByPosition.back
|
|
234
|
+
const isZoomAvailable = currentZoomRange.max - currentZoomRange.min > 0.01
|
|
235
|
+
const captureLimit = typeof limit === 'number' && limit > 0 ? limit : null
|
|
236
|
+
const hasReachedCaptureLimit = captureLimit !== null && capturedImages.length >= captureLimit
|
|
237
|
+
const isShutterDisabled = isCapturePending || hasReachedCaptureLimit
|
|
238
|
+
const captureLimitMessage = captureLimit
|
|
239
|
+
? `Maximum of ${captureLimit} photo${captureLimit === 1 ? '' : 's'} reached`
|
|
240
|
+
: ''
|
|
241
|
+
|
|
242
|
+
const showCaptureLimitAlert = React.useCallback(() => {
|
|
243
|
+
if (!captureLimit) {
|
|
244
|
+
return
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
Alert.alert('Selection Limit', captureLimitMessage)
|
|
248
|
+
}, [captureLimit, captureLimitMessage])
|
|
249
|
+
|
|
250
|
+
const clearCapturePendingTimeout = React.useCallback(() => {
|
|
251
|
+
if (capturePendingTimeoutRef.current) {
|
|
252
|
+
clearTimeout(capturePendingTimeoutRef.current)
|
|
253
|
+
capturePendingTimeoutRef.current = null
|
|
254
|
+
}
|
|
255
|
+
}, [])
|
|
256
|
+
|
|
257
|
+
const updateCapturePending = React.useCallback((nextValue: boolean) => {
|
|
258
|
+
capturePendingRef.current = nextValue
|
|
259
|
+
setIsCapturePending(nextValue)
|
|
260
|
+
|
|
261
|
+
if (!nextValue) {
|
|
262
|
+
clearCapturePendingTimeout()
|
|
263
|
+
}
|
|
264
|
+
}, [clearCapturePendingTimeout])
|
|
265
|
+
|
|
266
|
+
React.useEffect(() => {
|
|
267
|
+
return () => {
|
|
268
|
+
clearCapturePendingTimeout()
|
|
269
|
+
}
|
|
270
|
+
}, [clearCapturePendingTimeout])
|
|
173
271
|
|
|
174
272
|
React.useEffect(() => {
|
|
175
273
|
let isCancelled = false
|
|
@@ -225,20 +323,15 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
225
323
|
|
|
226
324
|
const handleCamerasAvailable = React.useCallback((event: { nativeEvent: OnCamerasAvailableEventPayload }) => {
|
|
227
325
|
const cameras = event?.nativeEvent?.cameras || []
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
const minZoom = typeof camera.minZoomFactor === 'number' ? camera.minZoomFactor : 1
|
|
232
|
-
const hasZoom = maxZoom > 1.01 && maxZoom > minZoom
|
|
233
|
-
if (camera.position === 'front' || camera.position === 'back') {
|
|
234
|
-
availability[camera.position] = availability[camera.position] || hasZoom
|
|
235
|
-
}
|
|
326
|
+
setZoomRangeByPosition({
|
|
327
|
+
front: buildZoomRangeForPosition(cameras, 'front'),
|
|
328
|
+
back: buildZoomRangeForPosition(cameras, 'back')
|
|
236
329
|
})
|
|
237
|
-
setCanZoomByPosition(availability)
|
|
238
330
|
}, [])
|
|
239
331
|
|
|
240
332
|
const handlePhotoCaptured = (event: { nativeEvent: OnPhotoCapturedEventPayload }) => {
|
|
241
333
|
console.log('CAMERA: Photo captured event:', event)
|
|
334
|
+
updateCapturePending(false)
|
|
242
335
|
const imageUri = event?.nativeEvent?.imageUri
|
|
243
336
|
const depthMapUri = event?.nativeEvent?.depthMapUri
|
|
244
337
|
const imageSize = event?.nativeEvent?.imageSize
|
|
@@ -253,12 +346,17 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
253
346
|
}
|
|
254
347
|
|
|
255
348
|
setCapturedImages((prevImages) => {
|
|
349
|
+
if (captureLimit && prevImages.length >= captureLimit) {
|
|
350
|
+
return prevImages
|
|
351
|
+
}
|
|
352
|
+
|
|
256
353
|
// If limit is 1, and we already have an image, replace it
|
|
257
354
|
if (limit === 1) {
|
|
258
355
|
return [newImage]
|
|
259
356
|
}
|
|
260
|
-
|
|
261
|
-
|
|
357
|
+
|
|
358
|
+
const nextImages = [...prevImages, newImage]
|
|
359
|
+
return captureLimit ? nextImages.slice(0, captureLimit) : nextImages
|
|
262
360
|
})
|
|
263
361
|
|
|
264
362
|
// If limit is 1, automatically trigger done after capture
|
|
@@ -278,19 +376,6 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
278
376
|
}
|
|
279
377
|
}
|
|
280
378
|
|
|
281
|
-
const handleZoomRailLayout = React.useCallback(() => {
|
|
282
|
-
zoomRailRef.current?.measureInWindow((_, y) => {
|
|
283
|
-
zoomRailTopRef.current = y
|
|
284
|
-
})
|
|
285
|
-
}, [])
|
|
286
|
-
|
|
287
|
-
const getZoomOffsetFromEvent = (event: { nativeEvent: { locationY: number; pageY: number } }) => {
|
|
288
|
-
const { locationY, pageY } = event.nativeEvent
|
|
289
|
-
const railTop = zoomRailTopRef.current
|
|
290
|
-
const rawOffset = railTop == null ? locationY : pageY - railTop
|
|
291
|
-
return clamp(rawOffset - ZOOM_SLIDER_THUMB_SIZE / 2, 0, ZOOM_SLIDER_TRACK_LENGTH)
|
|
292
|
-
}
|
|
293
|
-
|
|
294
379
|
const triggerFocusRing = React.useCallback(
|
|
295
380
|
(x: number, y: number) => {
|
|
296
381
|
setFocusPoint({ x, y })
|
|
@@ -337,11 +422,31 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
337
422
|
}
|
|
338
423
|
|
|
339
424
|
const capturePhoto = () => {
|
|
425
|
+
if (capturePendingRef.current) {
|
|
426
|
+
return
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
if (hasReachedCaptureLimit) {
|
|
430
|
+
showCaptureLimitAlert()
|
|
431
|
+
return
|
|
432
|
+
}
|
|
433
|
+
|
|
340
434
|
console.log('CAMERA: Attempting to capture photo')
|
|
435
|
+
updateCapturePending(true)
|
|
436
|
+
clearCapturePendingTimeout()
|
|
437
|
+
capturePendingTimeoutRef.current = setTimeout(() => {
|
|
438
|
+
updateCapturePending(false)
|
|
439
|
+
}, 4000)
|
|
341
440
|
triggerShutterFlash() // Trigger the flash effect
|
|
342
441
|
if (cameraRef.current) {
|
|
343
|
-
|
|
442
|
+
try {
|
|
443
|
+
cameraRef.current.capturePhoto()
|
|
444
|
+
} catch (error) {
|
|
445
|
+
updateCapturePending(false)
|
|
446
|
+
Alert.alert('Error', 'Unable to capture photo')
|
|
447
|
+
}
|
|
344
448
|
} else {
|
|
449
|
+
updateCapturePending(false)
|
|
345
450
|
Alert.alert('Error', 'Camera reference not available')
|
|
346
451
|
}
|
|
347
452
|
}
|
|
@@ -384,20 +489,18 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
384
489
|
}
|
|
385
490
|
|
|
386
491
|
const handleZoomChange = React.useCallback((newZoom: number) => {
|
|
387
|
-
setCurrentZoom(
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
setCurrentZoom(DEFAULT_ZOOM)
|
|
393
|
-
}
|
|
394
|
-
}, [isFrontCamera, currentZoom])
|
|
492
|
+
setCurrentZoom((prevZoom) => {
|
|
493
|
+
const nextZoom = snapZoomValue(newZoom, currentZoomRange.min, currentZoomRange.max)
|
|
494
|
+
return isSameZoomLevel(prevZoom, nextZoom) ? prevZoom : nextZoom
|
|
495
|
+
})
|
|
496
|
+
}, [currentZoomRange.max, currentZoomRange.min])
|
|
395
497
|
|
|
396
498
|
React.useEffect(() => {
|
|
397
|
-
|
|
398
|
-
|
|
499
|
+
const clampedZoom = snapZoomValue(currentZoom, currentZoomRange.min, currentZoomRange.max)
|
|
500
|
+
if (!isSameZoomLevel(clampedZoom, currentZoom)) {
|
|
501
|
+
setCurrentZoom(clampedZoom)
|
|
399
502
|
}
|
|
400
|
-
}, [
|
|
503
|
+
}, [currentZoom, currentZoomRange.max, currentZoomRange.min])
|
|
401
504
|
|
|
402
505
|
React.useEffect(() => {
|
|
403
506
|
if (cameraRef.current) {
|
|
@@ -406,47 +509,81 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
406
509
|
}, [cameraRef, currentZoom])
|
|
407
510
|
|
|
408
511
|
React.useEffect(() => {
|
|
409
|
-
const targetTop = getTopPositionForZoom(currentZoom)
|
|
410
|
-
|
|
512
|
+
const targetTop = getTopPositionForZoom(currentZoom, currentZoomRange.min, currentZoomRange.max)
|
|
513
|
+
if (isSliderDragging.current) {
|
|
514
|
+
knobTop.setValue(targetTop)
|
|
515
|
+
return
|
|
516
|
+
}
|
|
517
|
+
|
|
411
518
|
Animated.spring(knobTop, {
|
|
412
519
|
toValue: targetTop,
|
|
413
520
|
useNativeDriver: false,
|
|
414
521
|
tension: 180,
|
|
415
522
|
friction: 20
|
|
416
523
|
}).start()
|
|
417
|
-
}, [currentZoom, knobTop])
|
|
524
|
+
}, [currentZoom, currentZoomRange.max, currentZoomRange.min, knobTop])
|
|
525
|
+
|
|
526
|
+
const measureZoomRail = React.useCallback(() => {
|
|
527
|
+
zoomRailRef.current?.measureInWindow((_, y) => {
|
|
528
|
+
zoomRailTopRef.current = y
|
|
529
|
+
})
|
|
530
|
+
}, [])
|
|
531
|
+
|
|
532
|
+
const getSliderTopFromGesture = React.useCallback(
|
|
533
|
+
(pageY: number, fallbackLocationY: number) => {
|
|
534
|
+
const railTop = zoomRailTopRef.current
|
|
535
|
+
const rawTop = railTop == null ? fallbackLocationY - ZOOM_SLIDER_THUMB_SIZE / 2 : pageY - railTop - ZOOM_SLIDER_THUMB_SIZE / 2
|
|
536
|
+
return clamp(rawTop, 0, ZOOM_SLIDER_TRACK_LENGTH)
|
|
537
|
+
},
|
|
538
|
+
[]
|
|
539
|
+
)
|
|
540
|
+
|
|
541
|
+
const updateZoomFromSliderPosition = React.useCallback((rawTop: number) => {
|
|
542
|
+
const nextTop = clamp(rawTop, 0, ZOOM_SLIDER_TRACK_LENGTH)
|
|
543
|
+
const nextZoom = getZoomForTopPosition(nextTop, currentZoomRange.min, currentZoomRange.max)
|
|
544
|
+
const snappedTop = getTopPositionForZoom(nextZoom, currentZoomRange.min, currentZoomRange.max)
|
|
545
|
+
|
|
546
|
+
knobTop.stopAnimation()
|
|
547
|
+
knobTop.setValue(snappedTop)
|
|
548
|
+
handleZoomChange(nextZoom)
|
|
549
|
+
}, [currentZoomRange.max, currentZoomRange.min, handleZoomChange, knobTop])
|
|
418
550
|
|
|
419
551
|
const sliderPanResponder = React.useMemo(
|
|
420
552
|
() =>
|
|
421
553
|
PanResponder.create({
|
|
422
|
-
onStartShouldSetPanResponder: () =>
|
|
423
|
-
onMoveShouldSetPanResponder: () =>
|
|
424
|
-
onPanResponderGrant: (
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
554
|
+
onStartShouldSetPanResponder: () => isZoomAvailable,
|
|
555
|
+
onMoveShouldSetPanResponder: () => isZoomAvailable,
|
|
556
|
+
onPanResponderGrant: (event, gestureState) => {
|
|
557
|
+
isSliderDragging.current = true
|
|
558
|
+
measureZoomRail()
|
|
559
|
+
updateZoomFromSliderPosition(
|
|
560
|
+
getSliderTopFromGesture(gestureState.y0, event.nativeEvent.locationY)
|
|
561
|
+
)
|
|
429
562
|
},
|
|
430
|
-
onPanResponderMove: (
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
563
|
+
onPanResponderMove: (event, gestureState) => {
|
|
564
|
+
updateZoomFromSliderPosition(
|
|
565
|
+
getSliderTopFromGesture(gestureState.moveY, event.nativeEvent.locationY)
|
|
566
|
+
)
|
|
434
567
|
},
|
|
435
|
-
onPanResponderRelease: (
|
|
436
|
-
|
|
437
|
-
|
|
568
|
+
onPanResponderRelease: (event, gestureState) => {
|
|
569
|
+
updateZoomFromSliderPosition(
|
|
570
|
+
getSliderTopFromGesture(gestureState.moveY, event.nativeEvent.locationY)
|
|
571
|
+
)
|
|
572
|
+
isSliderDragging.current = false
|
|
438
573
|
},
|
|
439
|
-
onPanResponderTerminate: (
|
|
440
|
-
|
|
441
|
-
|
|
574
|
+
onPanResponderTerminate: (event, gestureState) => {
|
|
575
|
+
updateZoomFromSliderPosition(
|
|
576
|
+
getSliderTopFromGesture(gestureState.moveY, event.nativeEvent.locationY)
|
|
577
|
+
)
|
|
578
|
+
isSliderDragging.current = false
|
|
442
579
|
}
|
|
443
580
|
}),
|
|
444
|
-
[
|
|
581
|
+
[getSliderTopFromGesture, isZoomAvailable, measureZoomRail, updateZoomFromSliderPosition]
|
|
445
582
|
)
|
|
446
583
|
|
|
447
584
|
const openGalleryModal = () => {
|
|
448
585
|
console.log('OPENING GALLERY MODAL', capturedImages.length)
|
|
449
|
-
if (capturedImages.length > 0) {
|
|
586
|
+
if (limit !== 1 && capturedImages.length > 0) {
|
|
450
587
|
setIsGalleryModalVisible(true)
|
|
451
588
|
}
|
|
452
589
|
}
|
|
@@ -458,6 +595,48 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
458
595
|
})
|
|
459
596
|
}
|
|
460
597
|
|
|
598
|
+
const latestCapturedImage = capturedImages[capturedImages.length - 1]
|
|
599
|
+
const hasCapturedImages = capturedImages.length > 0
|
|
600
|
+
const shouldShowGalleryPreview = limit !== 1
|
|
601
|
+
const shouldShowDoneButton = limit !== 1
|
|
602
|
+
const gallerySubtitle = `${capturedImages.length} ${capturedImages.length === 1 ? 'image' : 'images'}`
|
|
603
|
+
const rightOverlayHeight =
|
|
604
|
+
SIDE_BUTTON_SIZE * 2 +
|
|
605
|
+
SIDE_BUTTON_GAP +
|
|
606
|
+
SIDE_ACTION_GROUP_MARGIN_BOTTOM +
|
|
607
|
+
(shouldShowGalleryPreview ? GALLERY_PREVIEW_SIZE + GALLERY_PREVIEW_MARGIN_BOTTOM : 0) +
|
|
608
|
+
SHUTTER_BUTTON_SIZE +
|
|
609
|
+
SHUTTER_BUTTON_MARGIN_BOTTOM +
|
|
610
|
+
(shouldShowDoneButton ? DONE_BUTTON_HEIGHT + 30 : 0)
|
|
611
|
+
const rightOverlayTop = Math.max(insets.top + 96, Math.round(windowHeight * 0.5 - rightOverlayHeight / 2))
|
|
612
|
+
const zoomSliderHeight = ZOOM_SLIDER_TRACK_LENGTH + ZOOM_SLIDER_THUMB_SIZE
|
|
613
|
+
const zoomSliderTop = Math.max(insets.top + 104, Math.round(windowHeight * 0.5 - zoomSliderHeight / 2))
|
|
614
|
+
|
|
615
|
+
const handleCancelPress = () => {
|
|
616
|
+
if (cameraRef.current) {
|
|
617
|
+
cameraRef.current.stopCamera()
|
|
618
|
+
}
|
|
619
|
+
onCancel()
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
const handleDonePress = () => {
|
|
623
|
+
if (isDoneButtonDisabled) {
|
|
624
|
+
return
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
setIsDoneButtonDisabled(true)
|
|
628
|
+
if (cameraRef.current) {
|
|
629
|
+
cameraRef.current.stopCamera()
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
onDone(
|
|
633
|
+
capturedImages.map((img) => ({
|
|
634
|
+
imageURI: img.uri,
|
|
635
|
+
depthMapURI: img.depthMapUri
|
|
636
|
+
}))
|
|
637
|
+
)
|
|
638
|
+
}
|
|
639
|
+
|
|
461
640
|
if (cameraPermissionState !== 'granted') {
|
|
462
641
|
const isCheckingPermission = cameraPermissionState === 'checking'
|
|
463
642
|
|
|
@@ -465,21 +644,13 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
465
644
|
<View style={styles.container}>
|
|
466
645
|
<View
|
|
467
646
|
style={[
|
|
468
|
-
styles.
|
|
469
|
-
{ paddingTop: insets.top +
|
|
647
|
+
styles.topOverlay,
|
|
648
|
+
{ paddingTop: insets.top + 8, paddingLeft: 18 + insets.left, paddingRight: 18 + insets.right }
|
|
470
649
|
]}
|
|
471
650
|
>
|
|
472
|
-
<
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
style={styles.topTextButton}
|
|
476
|
-
hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}
|
|
477
|
-
onPress={onCancel}
|
|
478
|
-
>
|
|
479
|
-
<Icons.IconUndo width={18} height={18} fill={colors.white} />
|
|
480
|
-
<Text style={styles.topTextButtonLabel}>Cancel</Text>
|
|
481
|
-
</TouchableOpacity>
|
|
482
|
-
</View>
|
|
651
|
+
<TouchableOpacity style={styles.cancelButton} hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }} onPress={onCancel}>
|
|
652
|
+
<Text style={styles.cancelButtonText}>Cancel</Text>
|
|
653
|
+
</TouchableOpacity>
|
|
483
654
|
</View>
|
|
484
655
|
|
|
485
656
|
<View style={styles.permissionStateContainer}>
|
|
@@ -513,54 +684,27 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
513
684
|
|
|
514
685
|
return (
|
|
515
686
|
<View style={styles.container}>
|
|
516
|
-
{/* Top Controls */}
|
|
517
687
|
<View
|
|
518
688
|
style={[
|
|
519
|
-
styles.
|
|
520
|
-
{ paddingTop: insets.top +
|
|
689
|
+
styles.topOverlay,
|
|
690
|
+
{ paddingTop: insets.top + 8, paddingLeft: 18 + insets.left, paddingRight: 18 + insets.right }
|
|
521
691
|
]}
|
|
522
692
|
>
|
|
523
|
-
<View style={styles.topLeft} />
|
|
524
|
-
{/* <View style={styles.topCenter}>
|
|
525
|
-
<Text style={styles.statusText}>{status}</Text>
|
|
526
|
-
</View> */}
|
|
527
|
-
<View style={styles.topRight}>
|
|
528
|
-
<TouchableOpacity
|
|
529
|
-
style={styles.topTextButton}
|
|
530
|
-
hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}
|
|
531
|
-
onPress={() => {
|
|
532
|
-
// Stop camera first
|
|
533
|
-
if (cameraRef.current) {
|
|
534
|
-
cameraRef.current.stopCamera()
|
|
535
|
-
}
|
|
536
|
-
// Then call onCancel
|
|
537
|
-
onCancel()
|
|
538
|
-
}}
|
|
539
|
-
>
|
|
540
|
-
<Icons.IconUndo width={18} height={18} fill={colors.white} />
|
|
541
|
-
<Text style={styles.topTextButtonLabel}>Cancel</Text>
|
|
542
|
-
</TouchableOpacity>
|
|
543
|
-
</View>
|
|
544
|
-
</View>
|
|
545
|
-
<View pointerEvents="box-none" style={[styles.sideControls, { right: 20 + insets.right }]}>
|
|
546
693
|
<TouchableOpacity
|
|
547
|
-
style={
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
isFlashEnabled && styles.sideButtonActive,
|
|
551
|
-
isFrontCamera && styles.sideButtonDisabled
|
|
552
|
-
]}
|
|
553
|
-
onPress={toggleFlash}
|
|
554
|
-
disabled={isFrontCamera}
|
|
694
|
+
style={styles.cancelButton}
|
|
695
|
+
hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}
|
|
696
|
+
onPress={handleCancelPress}
|
|
555
697
|
>
|
|
556
|
-
<Text style={styles.
|
|
557
|
-
</TouchableOpacity>
|
|
558
|
-
<TouchableOpacity style={[styles.sideButton, styles.sideButtonSpacing]} onPress={toggleCamera}>
|
|
559
|
-
<FlipCameraIcon color={colors.white} />
|
|
560
|
-
</TouchableOpacity>
|
|
561
|
-
<TouchableOpacity style={[styles.shutterButton, styles.recordButtonOffset]} onPress={capturePhoto}>
|
|
562
|
-
<View style={styles.shutterInner} />
|
|
698
|
+
<Text style={styles.cancelButtonText}>Cancel</Text>
|
|
563
699
|
</TouchableOpacity>
|
|
700
|
+
|
|
701
|
+
{hasCapturedImages ? (
|
|
702
|
+
<View style={styles.captureCountBadge}>
|
|
703
|
+
<Text style={styles.captureCountBadgeText}>{capturedImages.length}</Text>
|
|
704
|
+
</View>
|
|
705
|
+
) : (
|
|
706
|
+
<View style={styles.topOverlaySpacer} />
|
|
707
|
+
)}
|
|
564
708
|
</View>
|
|
565
709
|
|
|
566
710
|
{/* Camera View */}
|
|
@@ -601,13 +745,84 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
601
745
|
</Pressable>
|
|
602
746
|
</View>
|
|
603
747
|
|
|
748
|
+
<View
|
|
749
|
+
pointerEvents="box-none"
|
|
750
|
+
style={[styles.rightOverlay, { right: 16 + insets.right, top: rightOverlayTop }]}
|
|
751
|
+
>
|
|
752
|
+
<View style={styles.sideActionGroup}>
|
|
753
|
+
<TouchableOpacity
|
|
754
|
+
style={[
|
|
755
|
+
styles.sideButton,
|
|
756
|
+
styles.sideButtonSpacing,
|
|
757
|
+
isFlashEnabled && styles.sideButtonActive,
|
|
758
|
+
isFrontCamera && styles.sideButtonDisabled
|
|
759
|
+
]}
|
|
760
|
+
onPress={toggleFlash}
|
|
761
|
+
disabled={isFrontCamera}
|
|
762
|
+
>
|
|
763
|
+
<Text style={styles.sideButtonText}>⚡</Text>
|
|
764
|
+
</TouchableOpacity>
|
|
765
|
+
<TouchableOpacity style={styles.sideButton} onPress={toggleCamera}>
|
|
766
|
+
<FlipCameraIcon size={SIDE_BUTTON_ICON_SIZE} color={colors.white} />
|
|
767
|
+
</TouchableOpacity>
|
|
768
|
+
</View>
|
|
769
|
+
|
|
770
|
+
{shouldShowGalleryPreview ? (
|
|
771
|
+
<TouchableOpacity
|
|
772
|
+
style={[styles.galleryPreviewButton, !hasCapturedImages && styles.galleryPreviewButtonEmpty]}
|
|
773
|
+
onPress={openGalleryModal}
|
|
774
|
+
activeOpacity={0.9}
|
|
775
|
+
>
|
|
776
|
+
{latestCapturedImage ? (
|
|
777
|
+
<Image source={{ uri: latestCapturedImage.uri }} style={styles.galleryPreviewImage} resizeMode="cover" />
|
|
778
|
+
) : (
|
|
779
|
+
<View style={styles.galleryPreviewPlaceholder} />
|
|
780
|
+
)}
|
|
781
|
+
{hasCapturedImages ? (
|
|
782
|
+
<View style={styles.galleryPreviewBadge} pointerEvents="none">
|
|
783
|
+
<Text style={styles.galleryPreviewBadgeText}>{capturedImages.length}</Text>
|
|
784
|
+
</View>
|
|
785
|
+
) : null}
|
|
786
|
+
</TouchableOpacity>
|
|
787
|
+
) : null}
|
|
788
|
+
|
|
789
|
+
<TouchableOpacity
|
|
790
|
+
style={[styles.shutterButton, isShutterDisabled && styles.shutterButtonDisabled]}
|
|
791
|
+
onPress={capturePhoto}
|
|
792
|
+
>
|
|
793
|
+
<View style={[styles.shutterButtonOuter, isShutterDisabled && styles.shutterButtonOuterDisabled]} />
|
|
794
|
+
<View style={[styles.shutterInner, isShutterDisabled && styles.shutterInnerDisabled]} />
|
|
795
|
+
</TouchableOpacity>
|
|
796
|
+
|
|
797
|
+
{shouldShowDoneButton ? (
|
|
798
|
+
<TouchableOpacity
|
|
799
|
+
style={[styles.doneButton, isDoneButtonDisabled && styles.doneButtonDisabled]}
|
|
800
|
+
onPress={handleDonePress}
|
|
801
|
+
disabled={isDoneButtonDisabled}
|
|
802
|
+
>
|
|
803
|
+
<Text style={styles.doneButtonText}>Done</Text>
|
|
804
|
+
<View style={styles.doneButtonIcon}>
|
|
805
|
+
<Icons.IconForward_WithPad size={DONE_BUTTON_ICON_SIZE} fill={colors.white} fillOpacity={1} />
|
|
806
|
+
</View>
|
|
807
|
+
</TouchableOpacity>
|
|
808
|
+
) : null}
|
|
809
|
+
</View>
|
|
810
|
+
|
|
811
|
+
{hasReachedCaptureLimit && limit !== 1 ? (
|
|
812
|
+
<View pointerEvents="none" style={styles.captureLimitBannerOverlay}>
|
|
813
|
+
<View style={styles.captureLimitBanner}>
|
|
814
|
+
<Text style={styles.captureLimitBannerText}>{captureLimitMessage}</Text>
|
|
815
|
+
</View>
|
|
816
|
+
</View>
|
|
817
|
+
) : null}
|
|
818
|
+
|
|
604
819
|
{isZoomAvailable ? (
|
|
605
|
-
<View pointerEvents="box-none" style={[styles.zoomSliderContainer, { left:
|
|
606
|
-
<View style={
|
|
820
|
+
<View pointerEvents="box-none" style={[styles.zoomSliderContainer, { left: 12 + insets.left, top: zoomSliderTop }]}>
|
|
821
|
+
<View style={styles.zoomSlider}>
|
|
607
822
|
<View
|
|
608
823
|
ref={zoomRailRef}
|
|
609
824
|
style={styles.zoomRailContainer}
|
|
610
|
-
onLayout={
|
|
825
|
+
onLayout={measureZoomRail}
|
|
611
826
|
{...sliderPanResponder.panHandlers}
|
|
612
827
|
>
|
|
613
828
|
<View style={styles.zoomRail} />
|
|
@@ -619,61 +834,6 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
619
834
|
</View>
|
|
620
835
|
) : null}
|
|
621
836
|
|
|
622
|
-
{/* Bottom Controls Container */}
|
|
623
|
-
<View style={styles.bottomControlsContainer}>
|
|
624
|
-
{/* Gallery Thumbnail - Left */}
|
|
625
|
-
|
|
626
|
-
<TouchableOpacity style={styles.galleryContainer} onPress={openGalleryModal}>
|
|
627
|
-
{capturedImages.length > 0 ? (
|
|
628
|
-
<>
|
|
629
|
-
<View style={styles.galleryThumbnail}>
|
|
630
|
-
<Image
|
|
631
|
-
source={{
|
|
632
|
-
uri: capturedImages[capturedImages.length - 1].uri
|
|
633
|
-
}}
|
|
634
|
-
style={styles.galleryImage}
|
|
635
|
-
resizeMode="cover"
|
|
636
|
-
/>
|
|
637
|
-
</View>
|
|
638
|
-
<View style={styles.galleryBadge} pointerEvents="none">
|
|
639
|
-
<Text style={styles.galleryBadgeText}>{capturedImages.length}</Text>
|
|
640
|
-
</View>
|
|
641
|
-
</>
|
|
642
|
-
) : (
|
|
643
|
-
<View style={styles.galleryPlaceholder} />
|
|
644
|
-
)}
|
|
645
|
-
</TouchableOpacity>
|
|
646
|
-
|
|
647
|
-
{/* Done Button - Right */}
|
|
648
|
-
<View style={styles.doneButtonContainer}>
|
|
649
|
-
<CommonButton
|
|
650
|
-
label="Done"
|
|
651
|
-
disabled={isDoneButtonDisabled}
|
|
652
|
-
onPress={() => {
|
|
653
|
-
if (isDoneButtonDisabled) {
|
|
654
|
-
return
|
|
655
|
-
}
|
|
656
|
-
setIsDoneButtonDisabled(true)
|
|
657
|
-
// Stop camera first
|
|
658
|
-
if (cameraRef.current) {
|
|
659
|
-
cameraRef.current.stopCamera()
|
|
660
|
-
}
|
|
661
|
-
// Then call onDone with images
|
|
662
|
-
onDone(
|
|
663
|
-
capturedImages.map((img) => ({
|
|
664
|
-
imageURI: img.uri,
|
|
665
|
-
depthMapURI: img.depthMapUri
|
|
666
|
-
}))
|
|
667
|
-
)
|
|
668
|
-
}}
|
|
669
|
-
size="medium"
|
|
670
|
-
color="primary"
|
|
671
|
-
variant="filled"
|
|
672
|
-
endIcon={<Icons.IconForward_WithPad />}
|
|
673
|
-
/>
|
|
674
|
-
</View>
|
|
675
|
-
</View>
|
|
676
|
-
|
|
677
837
|
{/* Shutter Flash Overlay */}
|
|
678
838
|
<Animated.View style={[styles.shutterFlashOverlay, { opacity: shutterFlashAnim }]} pointerEvents="none" />
|
|
679
839
|
|
|
@@ -682,37 +842,56 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
682
842
|
key={`gallery-${isGalleryModalVisible}`}
|
|
683
843
|
ref={swipeModalRef}
|
|
684
844
|
visible={isGalleryModalVisible}
|
|
685
|
-
title="Captured Images"
|
|
686
|
-
subtitle={`${capturedImages.length} images`}
|
|
687
845
|
onClose={() => setIsGalleryModalVisible(false)}
|
|
688
846
|
scrollOffset={1}
|
|
689
|
-
height={
|
|
847
|
+
height={228}
|
|
690
848
|
propagateSwipe
|
|
691
|
-
|
|
849
|
+
showTopNav={false}
|
|
850
|
+
backgroundColor="#151515"
|
|
692
851
|
>
|
|
693
|
-
<
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
852
|
+
<View style={styles.gallerySheet}>
|
|
853
|
+
<View style={styles.gallerySheetHeader}>
|
|
854
|
+
<TouchableOpacity
|
|
855
|
+
style={styles.gallerySheetClose}
|
|
856
|
+
onPress={() => swipeModalRef.current?.closeModal('cancel')}
|
|
857
|
+
hitSlop={{ top: 12, bottom: 12, left: 12, right: 12 }}
|
|
858
|
+
>
|
|
859
|
+
<Icons.IconClose_WithPad size={18} fill={colors.white} fillOpacity={1} />
|
|
860
|
+
</TouchableOpacity>
|
|
861
|
+
|
|
862
|
+
<View style={styles.gallerySheetTitleWrap}>
|
|
863
|
+
<Text style={styles.gallerySheetTitle}>Session Roll</Text>
|
|
864
|
+
<Text style={styles.gallerySheetSubtitle}>{gallerySubtitle}</Text>
|
|
865
|
+
</View>
|
|
866
|
+
|
|
867
|
+
<View style={styles.gallerySheetHeaderSpacer} />
|
|
868
|
+
</View>
|
|
869
|
+
|
|
870
|
+
<View style={styles.galleryDivider} />
|
|
871
|
+
|
|
872
|
+
<ScrollView
|
|
873
|
+
horizontal
|
|
874
|
+
showsHorizontalScrollIndicator={false}
|
|
875
|
+
contentContainerStyle={styles.galleryScrollContainer}
|
|
876
|
+
decelerationRate="fast"
|
|
877
|
+
>
|
|
878
|
+
{capturedImages
|
|
879
|
+
.slice()
|
|
880
|
+
.reverse()
|
|
881
|
+
.map((image, index) => (
|
|
882
|
+
<View key={index} style={styles.galleryImageItem}>
|
|
883
|
+
<Image source={{ uri: image.uri }} style={styles.galleryModalImage} resizeMode="cover" />
|
|
706
884
|
<TouchableOpacity
|
|
707
885
|
style={styles.removeButton}
|
|
708
886
|
onPress={() => removeImage(capturedImages.length - 1 - index)}
|
|
887
|
+
hitSlop={{ top: 8, bottom: 8, left: 8, right: 8 }}
|
|
709
888
|
>
|
|
710
|
-
<Icons.IconClose_WithPad />
|
|
889
|
+
<Icons.IconClose_WithPad size={16} fill={colors.black} fillOpacity={0.72} />
|
|
711
890
|
</TouchableOpacity>
|
|
712
891
|
</View>
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
</
|
|
892
|
+
))}
|
|
893
|
+
</ScrollView>
|
|
894
|
+
</View>
|
|
716
895
|
</SwipeModal>
|
|
717
896
|
</View>
|
|
718
897
|
)
|
|
@@ -721,7 +900,7 @@ const CameraModal: React.FC<CameraTestModalProps> = ({ onDone, onCancel, cameraR
|
|
|
721
900
|
const styles = StyleSheet.create({
|
|
722
901
|
container: {
|
|
723
902
|
flex: 1,
|
|
724
|
-
|
|
903
|
+
backgroundColor: colors.black
|
|
725
904
|
},
|
|
726
905
|
permissionStateContainer: {
|
|
727
906
|
flex: 1,
|
|
@@ -767,91 +946,62 @@ const styles = StyleSheet.create({
|
|
|
767
946
|
fontSize: 15,
|
|
768
947
|
fontWeight: 'bold'
|
|
769
948
|
},
|
|
770
|
-
|
|
949
|
+
topOverlay: {
|
|
771
950
|
position: 'absolute',
|
|
772
951
|
top: 0,
|
|
773
952
|
left: 0,
|
|
774
953
|
right: 0,
|
|
775
|
-
height: 60,
|
|
776
954
|
flexDirection: 'row',
|
|
777
955
|
alignItems: 'center',
|
|
778
956
|
justifyContent: 'space-between',
|
|
779
957
|
zIndex: 10
|
|
780
958
|
},
|
|
781
|
-
|
|
782
|
-
width:
|
|
783
|
-
|
|
784
|
-
justifyContent: 'center'
|
|
785
|
-
},
|
|
786
|
-
topCenter: {
|
|
787
|
-
flex: 1,
|
|
788
|
-
alignItems: 'center',
|
|
789
|
-
justifyContent: 'center'
|
|
790
|
-
},
|
|
791
|
-
topRight: {
|
|
792
|
-
flexDirection: 'row',
|
|
793
|
-
alignItems: 'center',
|
|
794
|
-
justifyContent: 'flex-end',
|
|
795
|
-
flex: 1
|
|
959
|
+
topOverlaySpacer: {
|
|
960
|
+
width: 30,
|
|
961
|
+
height: 30
|
|
796
962
|
},
|
|
797
|
-
|
|
798
|
-
|
|
963
|
+
cancelButton: {
|
|
964
|
+
minWidth: 56,
|
|
965
|
+
height: 34,
|
|
966
|
+
paddingHorizontal: 14,
|
|
967
|
+
borderRadius: 17,
|
|
968
|
+
backgroundColor: 'rgba(255,255,255,0.14)',
|
|
799
969
|
alignItems: 'center',
|
|
800
|
-
backgroundColor: colors.black60,
|
|
801
|
-
borderRadius: 22,
|
|
802
|
-
paddingHorizontal: 18,
|
|
803
|
-
height: 44,
|
|
804
|
-
minWidth: 100,
|
|
805
970
|
justifyContent: 'center'
|
|
806
971
|
},
|
|
807
|
-
|
|
808
|
-
color: colors.white,
|
|
809
|
-
fontSize: 16,
|
|
810
|
-
fontWeight: 'bold',
|
|
811
|
-
marginLeft: 6
|
|
812
|
-
},
|
|
813
|
-
statusText: {
|
|
972
|
+
cancelButtonText: {
|
|
814
973
|
color: colors.white,
|
|
815
974
|
fontSize: 14,
|
|
816
|
-
fontWeight: '
|
|
817
|
-
|
|
818
|
-
sideControls: {
|
|
819
|
-
position: 'absolute',
|
|
820
|
-
top: 0,
|
|
821
|
-
bottom: 0,
|
|
822
|
-
right: 20,
|
|
823
|
-
justifyContent: 'center',
|
|
824
|
-
alignItems: 'center',
|
|
825
|
-
zIndex: 10
|
|
975
|
+
fontWeight: 'bold',
|
|
976
|
+
opacity: 0.92
|
|
826
977
|
},
|
|
827
|
-
|
|
828
|
-
width:
|
|
829
|
-
height:
|
|
830
|
-
borderRadius:
|
|
831
|
-
backgroundColor: colors.
|
|
978
|
+
captureCountBadge: {
|
|
979
|
+
width: 26,
|
|
980
|
+
height: 26,
|
|
981
|
+
borderRadius: 13,
|
|
982
|
+
backgroundColor: colors.yellow,
|
|
983
|
+
borderWidth: 2,
|
|
984
|
+
borderColor: colors.white,
|
|
832
985
|
alignItems: 'center',
|
|
833
986
|
justifyContent: 'center'
|
|
834
987
|
},
|
|
835
|
-
|
|
836
|
-
|
|
988
|
+
captureCountBadgeText: {
|
|
989
|
+
color: colors.white,
|
|
990
|
+
fontSize: 13,
|
|
991
|
+
fontWeight: 'bold'
|
|
837
992
|
},
|
|
838
993
|
sideButtonText: {
|
|
839
994
|
color: colors.white,
|
|
840
|
-
fontSize:
|
|
995
|
+
fontSize: SIDE_BUTTON_TEXT_SIZE,
|
|
841
996
|
fontWeight: 'bold'
|
|
842
997
|
},
|
|
843
|
-
sideButtonActive: {
|
|
844
|
-
backgroundColor: colors.blue
|
|
845
|
-
},
|
|
846
|
-
sideButtonDisabled: {
|
|
847
|
-
opacity: 0.4
|
|
848
|
-
},
|
|
849
998
|
cameraContainer: {
|
|
850
999
|
position: 'absolute',
|
|
851
1000
|
top: 0,
|
|
852
1001
|
left: 0,
|
|
853
1002
|
right: 0,
|
|
854
|
-
bottom: 0
|
|
1003
|
+
bottom: 0,
|
|
1004
|
+
overflow: 'hidden'
|
|
855
1005
|
},
|
|
856
1006
|
cameraTouchLayer: {
|
|
857
1007
|
flex: 1
|
|
@@ -868,83 +1018,111 @@ const styles = StyleSheet.create({
|
|
|
868
1018
|
borderColor: colors.white,
|
|
869
1019
|
backgroundColor: 'transparent'
|
|
870
1020
|
},
|
|
871
|
-
|
|
1021
|
+
rightOverlay: {
|
|
872
1022
|
position: 'absolute',
|
|
873
|
-
|
|
874
|
-
left: 0,
|
|
875
|
-
right: 0,
|
|
876
|
-
flexDirection: 'row',
|
|
1023
|
+
width: RIGHT_OVERLAY_WIDTH,
|
|
877
1024
|
alignItems: 'center',
|
|
878
|
-
|
|
879
|
-
paddingHorizontal: 20,
|
|
880
|
-
zIndex: 10
|
|
1025
|
+
zIndex: 12
|
|
881
1026
|
},
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
alignItems: 'flex-start',
|
|
1027
|
+
captureLimitBannerOverlay: {
|
|
1028
|
+
...StyleSheet.absoluteFillObject,
|
|
1029
|
+
alignItems: 'center',
|
|
886
1030
|
justifyContent: 'center',
|
|
887
|
-
|
|
1031
|
+
paddingHorizontal: 24,
|
|
1032
|
+
zIndex: 11
|
|
888
1033
|
},
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
backgroundColor:
|
|
896
|
-
|
|
897
|
-
|
|
1034
|
+
captureLimitBanner: {
|
|
1035
|
+
minWidth: 220,
|
|
1036
|
+
maxWidth: 320,
|
|
1037
|
+
paddingHorizontal: 18,
|
|
1038
|
+
paddingVertical: 12,
|
|
1039
|
+
borderRadius: 12,
|
|
1040
|
+
backgroundColor: 'rgba(6, 7, 8, 0.72)',
|
|
1041
|
+
alignItems: 'center',
|
|
1042
|
+
justifyContent: 'center'
|
|
1043
|
+
},
|
|
1044
|
+
captureLimitBannerText: {
|
|
1045
|
+
color: colors.white,
|
|
1046
|
+
fontSize: 12,
|
|
1047
|
+
fontWeight: '600',
|
|
1048
|
+
textAlign: 'center',
|
|
1049
|
+
lineHeight: 16
|
|
1050
|
+
},
|
|
1051
|
+
sideActionGroup: {
|
|
1052
|
+
width: '100%',
|
|
1053
|
+
alignItems: 'center',
|
|
1054
|
+
marginBottom: SIDE_ACTION_GROUP_MARGIN_BOTTOM
|
|
1055
|
+
},
|
|
1056
|
+
sideButtonSpacing: {
|
|
1057
|
+
marginBottom: SIDE_BUTTON_GAP
|
|
1058
|
+
},
|
|
1059
|
+
sideButton: {
|
|
1060
|
+
width: SIDE_BUTTON_SIZE,
|
|
1061
|
+
height: SIDE_BUTTON_SIZE,
|
|
1062
|
+
borderRadius: SIDE_BUTTON_SIZE / 2,
|
|
1063
|
+
backgroundColor: 'rgba(6, 7, 8, 0.34)',
|
|
1064
|
+
alignItems: 'center',
|
|
1065
|
+
justifyContent: 'center'
|
|
1066
|
+
},
|
|
1067
|
+
sideButtonActive: {
|
|
1068
|
+
backgroundColor: 'rgba(24, 113, 231, 0.82)'
|
|
898
1069
|
},
|
|
899
|
-
|
|
1070
|
+
sideButtonDisabled: {
|
|
1071
|
+
opacity: 0.42
|
|
1072
|
+
},
|
|
1073
|
+
galleryPreviewButton: {
|
|
1074
|
+
width: GALLERY_PREVIEW_SIZE,
|
|
1075
|
+
height: GALLERY_PREVIEW_SIZE,
|
|
1076
|
+
borderRadius: GALLERY_PREVIEW_BORDER_RADIUS,
|
|
1077
|
+
backgroundColor: 'rgba(255,255,255,0.12)',
|
|
1078
|
+
borderWidth: 1.5,
|
|
1079
|
+
borderColor: colors.white,
|
|
1080
|
+
overflow: 'visible',
|
|
1081
|
+
alignItems: 'center',
|
|
1082
|
+
justifyContent: 'center',
|
|
1083
|
+
marginBottom: GALLERY_PREVIEW_MARGIN_BOTTOM
|
|
1084
|
+
},
|
|
1085
|
+
galleryPreviewButtonEmpty: {
|
|
1086
|
+
borderColor: 'rgba(255,255,255,0.42)',
|
|
1087
|
+
backgroundColor: 'rgba(6, 7, 8, 0.18)'
|
|
1088
|
+
},
|
|
1089
|
+
galleryPreviewImage: {
|
|
900
1090
|
width: '100%',
|
|
901
1091
|
height: '100%',
|
|
902
|
-
|
|
903
|
-
top: 0,
|
|
904
|
-
left: 0
|
|
1092
|
+
borderRadius: GALLERY_PREVIEW_BORDER_RADIUS - 2
|
|
905
1093
|
},
|
|
906
|
-
|
|
1094
|
+
galleryPreviewPlaceholder: {
|
|
1095
|
+
width: '100%',
|
|
1096
|
+
height: '100%',
|
|
1097
|
+
borderRadius: GALLERY_PREVIEW_BORDER_RADIUS - 2,
|
|
1098
|
+
backgroundColor: 'rgba(255,255,255,0.08)'
|
|
1099
|
+
},
|
|
1100
|
+
galleryPreviewBadge: {
|
|
907
1101
|
position: 'absolute',
|
|
908
|
-
top:
|
|
909
|
-
right:
|
|
910
|
-
|
|
911
|
-
height:
|
|
912
|
-
|
|
1102
|
+
top: 0,
|
|
1103
|
+
right: -8,
|
|
1104
|
+
minWidth: GALLERY_PREVIEW_BADGE_SIZE,
|
|
1105
|
+
height: GALLERY_PREVIEW_BADGE_SIZE,
|
|
1106
|
+
paddingHorizontal: 6,
|
|
1107
|
+
borderRadius: GALLERY_PREVIEW_BADGE_SIZE / 2,
|
|
913
1108
|
backgroundColor: colors.blue,
|
|
914
1109
|
alignItems: 'center',
|
|
915
|
-
justifyContent: 'center'
|
|
916
|
-
opacity: 1
|
|
1110
|
+
justifyContent: 'center'
|
|
917
1111
|
},
|
|
918
|
-
|
|
1112
|
+
galleryPreviewBadgeText: {
|
|
919
1113
|
color: colors.white,
|
|
920
|
-
fontSize:
|
|
1114
|
+
fontSize: 15,
|
|
921
1115
|
fontWeight: 'bold'
|
|
922
1116
|
},
|
|
923
|
-
galleryPlaceholder: {
|
|
924
|
-
width: 50,
|
|
925
|
-
height: 50,
|
|
926
|
-
borderRadius: 8,
|
|
927
|
-
backgroundColor: colors.black60,
|
|
928
|
-
borderWidth: 2,
|
|
929
|
-
borderColor: colors.black40,
|
|
930
|
-
borderStyle: 'dashed'
|
|
931
|
-
},
|
|
932
1117
|
zoomSliderContainer: {
|
|
933
1118
|
position: 'absolute',
|
|
934
|
-
|
|
935
|
-
bottom: 0,
|
|
936
|
-
justifyContent: 'center',
|
|
1119
|
+
width: ZOOM_SLIDER_WIDTH,
|
|
937
1120
|
alignItems: 'center',
|
|
938
1121
|
zIndex: 12,
|
|
939
|
-
width: ZOOM_SLIDER_WIDTH
|
|
940
1122
|
},
|
|
941
1123
|
zoomSlider: {
|
|
942
1124
|
width: ZOOM_SLIDER_WIDTH,
|
|
943
|
-
alignItems: 'center'
|
|
944
|
-
paddingVertical: 12
|
|
945
|
-
},
|
|
946
|
-
zoomSliderDisabled: {
|
|
947
|
-
opacity: 0.4
|
|
1125
|
+
alignItems: 'center'
|
|
948
1126
|
},
|
|
949
1127
|
zoomRailContainer: {
|
|
950
1128
|
width: ZOOM_SLIDER_WIDTH,
|
|
@@ -956,114 +1134,149 @@ const styles = StyleSheet.create({
|
|
|
956
1134
|
position: 'absolute',
|
|
957
1135
|
top: ZOOM_SLIDER_THUMB_SIZE / 2,
|
|
958
1136
|
bottom: ZOOM_SLIDER_THUMB_SIZE / 2,
|
|
959
|
-
width:
|
|
960
|
-
borderRadius:
|
|
961
|
-
backgroundColor:
|
|
1137
|
+
width: 2,
|
|
1138
|
+
borderRadius: 1,
|
|
1139
|
+
backgroundColor: 'rgba(255,255,255,0.18)'
|
|
962
1140
|
},
|
|
963
1141
|
zoomThumb: {
|
|
964
1142
|
position: 'absolute',
|
|
965
|
-
width:
|
|
1143
|
+
width: ZOOM_SLIDER_THUMB_WIDTH,
|
|
966
1144
|
height: ZOOM_SLIDER_THUMB_SIZE,
|
|
967
1145
|
borderRadius: ZOOM_SLIDER_THUMB_SIZE / 2,
|
|
968
|
-
backgroundColor: colors.
|
|
1146
|
+
backgroundColor: colors.blue,
|
|
969
1147
|
alignItems: 'center',
|
|
970
1148
|
justifyContent: 'center',
|
|
971
|
-
left: (ZOOM_SLIDER_WIDTH -
|
|
972
|
-
borderWidth: 2,
|
|
973
|
-
borderColor: colors.blue
|
|
1149
|
+
left: (ZOOM_SLIDER_WIDTH - ZOOM_SLIDER_THUMB_WIDTH) / 2
|
|
974
1150
|
},
|
|
975
1151
|
zoomThumbText: {
|
|
976
|
-
color: colors.
|
|
1152
|
+
color: colors.white,
|
|
977
1153
|
fontSize: 12,
|
|
978
1154
|
fontWeight: 'bold'
|
|
979
1155
|
},
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
right: 0,
|
|
1156
|
+
shutterButton: {
|
|
1157
|
+
width: SHUTTER_BUTTON_SIZE,
|
|
1158
|
+
height: SHUTTER_BUTTON_SIZE,
|
|
1159
|
+
borderRadius: SHUTTER_BUTTON_SIZE / 2,
|
|
985
1160
|
alignItems: 'center',
|
|
986
|
-
justifyContent: 'center'
|
|
1161
|
+
justifyContent: 'center',
|
|
1162
|
+
marginBottom: SHUTTER_BUTTON_MARGIN_BOTTOM
|
|
987
1163
|
},
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
1164
|
+
shutterButtonDisabled: {
|
|
1165
|
+
opacity: 0.65
|
|
1166
|
+
},
|
|
1167
|
+
shutterButtonOuter: {
|
|
1168
|
+
position: 'absolute',
|
|
1169
|
+
width: SHUTTER_BUTTON_SIZE,
|
|
1170
|
+
height: SHUTTER_BUTTON_SIZE,
|
|
1171
|
+
borderRadius: SHUTTER_BUTTON_SIZE / 2,
|
|
1172
|
+
borderWidth: 3,
|
|
1173
|
+
borderColor: colors.white,
|
|
1174
|
+
backgroundColor: 'rgba(255,255,255,0.16)'
|
|
1175
|
+
},
|
|
1176
|
+
shutterButtonOuterDisabled: {
|
|
1177
|
+
borderColor: 'rgba(255,255,255,0.6)',
|
|
1178
|
+
backgroundColor: 'rgba(255,255,255,0.08)'
|
|
1179
|
+
},
|
|
1180
|
+
shutterInner: {
|
|
1181
|
+
width: 62,
|
|
1182
|
+
height: 62,
|
|
1183
|
+
borderRadius: 31,
|
|
1184
|
+
backgroundColor: colors.white
|
|
1185
|
+
},
|
|
1186
|
+
shutterInnerDisabled: {
|
|
1187
|
+
backgroundColor: 'rgba(255,255,255,0.72)'
|
|
1188
|
+
},
|
|
1189
|
+
doneButton: {
|
|
1190
|
+
height: DONE_BUTTON_HEIGHT,
|
|
1191
|
+
paddingHorizontal: DONE_BUTTON_HORIZONTAL_PADDING,
|
|
1192
|
+
borderRadius: DONE_BUTTON_HEIGHT / 2,
|
|
1193
|
+
backgroundColor: colors.blue,
|
|
1194
|
+
flexDirection: 'row',
|
|
993
1195
|
alignItems: 'center',
|
|
994
|
-
justifyContent: 'center'
|
|
1196
|
+
justifyContent: 'center',
|
|
1197
|
+
marginBottom: 30
|
|
995
1198
|
},
|
|
996
|
-
|
|
1199
|
+
doneButtonText: {
|
|
997
1200
|
color: colors.white,
|
|
998
|
-
fontSize:
|
|
1201
|
+
fontSize: DONE_BUTTON_TEXT_SIZE,
|
|
999
1202
|
fontWeight: 'bold'
|
|
1000
1203
|
},
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
height: 80,
|
|
1004
|
-
borderRadius: 40,
|
|
1005
|
-
backgroundColor: 'transparent',
|
|
1006
|
-
alignItems: 'center',
|
|
1007
|
-
justifyContent: 'center',
|
|
1008
|
-
borderWidth: 4,
|
|
1009
|
-
borderColor: colors.white
|
|
1204
|
+
doneButtonIcon: {
|
|
1205
|
+
marginLeft: 8
|
|
1010
1206
|
},
|
|
1011
|
-
|
|
1012
|
-
|
|
1207
|
+
doneButtonDisabled: {
|
|
1208
|
+
opacity: 0.45
|
|
1013
1209
|
},
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
borderRadius: 30,
|
|
1018
|
-
backgroundColor: colors.white
|
|
1210
|
+
gallerySheet: {
|
|
1211
|
+
flex: 1,
|
|
1212
|
+
paddingBottom: 16
|
|
1019
1213
|
},
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
alignItems: '
|
|
1214
|
+
gallerySheetHeader: {
|
|
1215
|
+
flexDirection: 'row',
|
|
1216
|
+
alignItems: 'center',
|
|
1217
|
+
justifyContent: 'space-between',
|
|
1218
|
+
paddingHorizontal: 14,
|
|
1219
|
+
paddingTop: 4,
|
|
1220
|
+
paddingBottom: 10
|
|
1221
|
+
},
|
|
1222
|
+
gallerySheetClose: {
|
|
1223
|
+
width: 32,
|
|
1224
|
+
height: 32,
|
|
1225
|
+
alignItems: 'center',
|
|
1023
1226
|
justifyContent: 'center'
|
|
1024
1227
|
},
|
|
1025
|
-
|
|
1228
|
+
gallerySheetTitleWrap: {
|
|
1229
|
+
flex: 1,
|
|
1230
|
+
alignItems: 'center',
|
|
1231
|
+
justifyContent: 'center'
|
|
1232
|
+
},
|
|
1233
|
+
gallerySheetTitle: {
|
|
1026
1234
|
color: colors.white,
|
|
1027
|
-
fontSize:
|
|
1235
|
+
fontSize: 15,
|
|
1028
1236
|
fontWeight: 'bold'
|
|
1029
1237
|
},
|
|
1238
|
+
gallerySheetSubtitle: {
|
|
1239
|
+
color: 'rgba(255,255,255,0.58)',
|
|
1240
|
+
fontSize: 12,
|
|
1241
|
+
marginTop: 3
|
|
1242
|
+
},
|
|
1243
|
+
gallerySheetHeaderSpacer: {
|
|
1244
|
+
width: 32,
|
|
1245
|
+
height: 32
|
|
1246
|
+
},
|
|
1247
|
+
galleryDivider: {
|
|
1248
|
+
height: 1,
|
|
1249
|
+
backgroundColor: 'rgba(255,255,255,0.09)',
|
|
1250
|
+
marginBottom: 14
|
|
1251
|
+
},
|
|
1030
1252
|
galleryScrollContainer: {
|
|
1031
|
-
paddingHorizontal:
|
|
1032
|
-
paddingVertical: 16,
|
|
1253
|
+
paddingHorizontal: 14,
|
|
1033
1254
|
alignItems: 'center'
|
|
1034
1255
|
},
|
|
1035
1256
|
galleryImageItem: {
|
|
1036
|
-
width:
|
|
1037
|
-
height:
|
|
1038
|
-
marginRight:
|
|
1257
|
+
width: 46,
|
|
1258
|
+
height: 62,
|
|
1259
|
+
marginRight: 8,
|
|
1039
1260
|
borderRadius: 8,
|
|
1040
1261
|
overflow: 'hidden',
|
|
1041
1262
|
position: 'relative',
|
|
1042
|
-
backgroundColor:
|
|
1263
|
+
backgroundColor: 'rgba(255,255,255,0.08)'
|
|
1043
1264
|
},
|
|
1044
1265
|
galleryModalImage: {
|
|
1045
1266
|
width: '100%',
|
|
1046
1267
|
height: '100%'
|
|
1047
1268
|
},
|
|
1048
|
-
galleryImageOverlay: {
|
|
1049
|
-
position: 'absolute',
|
|
1050
|
-
top: 0,
|
|
1051
|
-
left: 0,
|
|
1052
|
-
right: 0,
|
|
1053
|
-
bottom: 0,
|
|
1054
|
-
backgroundColor: colors.black18,
|
|
1055
|
-
alignItems: 'flex-end',
|
|
1056
|
-
justifyContent: 'flex-start',
|
|
1057
|
-
padding: 8
|
|
1058
|
-
},
|
|
1059
1269
|
removeButton: {
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1270
|
+
position: 'absolute',
|
|
1271
|
+
top: 3,
|
|
1272
|
+
left: 3,
|
|
1273
|
+
width: 18,
|
|
1274
|
+
height: 18,
|
|
1275
|
+
borderRadius: 9,
|
|
1063
1276
|
backgroundColor: colors.white,
|
|
1064
1277
|
alignItems: 'center',
|
|
1065
1278
|
justifyContent: 'center',
|
|
1066
|
-
opacity: 0.
|
|
1279
|
+
opacity: 0.95
|
|
1067
1280
|
},
|
|
1068
1281
|
shutterFlashOverlay: {
|
|
1069
1282
|
position: 'absolute',
|