@technotoil/image-video-editor 0.1.5 → 0.1.6
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/android/src/main/java/com/technotoil/image_videoeditor/MediaEditorModule.kt +2 -2
- package/lib/commonjs/screens/EditorScreen.js +31 -21
- package/lib/commonjs/screens/EditorScreen.js.map +1 -1
- package/lib/commonjs/screens/PickScreen.js +280 -172
- package/lib/commonjs/screens/PickScreen.js.map +1 -1
- package/lib/module/screens/EditorScreen.js +31 -21
- package/lib/module/screens/EditorScreen.js.map +1 -1
- package/lib/module/screens/PickScreen.js +280 -172
- package/lib/module/screens/PickScreen.js.map +1 -1
- package/package.json +1 -1
- package/src/screens/EditorScreen.tsx +27 -20
- package/src/screens/PickScreen.tsx +118 -16
|
@@ -86,6 +86,12 @@ function PickScreen({
|
|
|
86
86
|
const [albums, setAlbums] = (0, _react.useState)([]);
|
|
87
87
|
const [loading, setLoading] = (0, _react.useState)(false);
|
|
88
88
|
const [previewUri, setPreviewUri] = (0, _react.useState)(null);
|
|
89
|
+
// Track if user has scrolled past the main preview
|
|
90
|
+
const [isScrolledPast, setIsScrolledPast] = (0, _react.useState)(false);
|
|
91
|
+
// Only show overlay when user explicitly clicks media while scrolled past preview
|
|
92
|
+
const [showOverlay, setShowOverlay] = (0, _react.useState)(false);
|
|
93
|
+
const flatListRef = (0, _react.useRef)(null);
|
|
94
|
+
const PREVIEW_HEIGHT = _reactNative.Dimensions.get('window').width;
|
|
89
95
|
|
|
90
96
|
// Aspect ratio logic
|
|
91
97
|
const isRatioLocked = aspectRatio !== 'free';
|
|
@@ -101,6 +107,7 @@ function PickScreen({
|
|
|
101
107
|
const [cropMode, setCropMode] = (0, _react.useState)(isRatioLocked ? '1:1' : '1:1');
|
|
102
108
|
const [videoPaused, setVideoPaused] = (0, _react.useState)(false);
|
|
103
109
|
const scaleAnim = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
|
|
110
|
+
const overlayAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
104
111
|
const [showCustomCamera, setShowCustomCamera] = (0, _react.useState)(false);
|
|
105
112
|
const [facing, setFacing] = (0, _react.useState)('front');
|
|
106
113
|
const [flashMode, setFlashMode] = (0, _react.useState)('off');
|
|
@@ -243,6 +250,15 @@ function PickScreen({
|
|
|
243
250
|
type: 'albumRow'
|
|
244
251
|
}, ...rows];
|
|
245
252
|
}, [filtered]);
|
|
253
|
+
|
|
254
|
+
// Show/hide floating overlay with animation
|
|
255
|
+
(0, _react.useEffect)(() => {
|
|
256
|
+
_reactNative.Animated.timing(overlayAnim, {
|
|
257
|
+
toValue: showOverlay ? 1 : 0,
|
|
258
|
+
duration: 200,
|
|
259
|
+
useNativeDriver: true
|
|
260
|
+
}).start();
|
|
261
|
+
}, [showOverlay]);
|
|
246
262
|
(0, _react.useEffect)(() => {
|
|
247
263
|
let cancelled = false;
|
|
248
264
|
setVideoPaused(false);
|
|
@@ -298,6 +314,11 @@ function PickScreen({
|
|
|
298
314
|
} else {
|
|
299
315
|
setSelectedMedia(item);
|
|
300
316
|
}
|
|
317
|
+
|
|
318
|
+
// Show floating overlay only if user is already scrolled past the main preview
|
|
319
|
+
if (isScrolledPast) {
|
|
320
|
+
setShowOverlay(true);
|
|
321
|
+
}
|
|
301
322
|
_reactNative.Animated.sequence([_reactNative.Animated.timing(scaleAnim, {
|
|
302
323
|
toValue: 0.97,
|
|
303
324
|
duration: 80,
|
|
@@ -514,192 +535,268 @@ function PickScreen({
|
|
|
514
535
|
}, album.id))
|
|
515
536
|
})]
|
|
516
537
|
})]
|
|
517
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
previewUri,
|
|
522
|
-
playableUri,
|
|
523
|
-
videoPaused,
|
|
524
|
-
cropMode,
|
|
525
|
-
isRatioLocked,
|
|
526
|
-
activeAlbum,
|
|
527
|
-
multiSelect,
|
|
528
|
-
selectedItems,
|
|
529
|
-
showAlbumPicker,
|
|
530
|
-
loading
|
|
538
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
539
|
+
style: {
|
|
540
|
+
flex: 1,
|
|
541
|
+
position: 'relative'
|
|
531
542
|
},
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
543
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
|
|
544
|
+
style: [styles.floatingOverlay, {
|
|
545
|
+
opacity: overlayAnim,
|
|
546
|
+
transform: [{
|
|
547
|
+
translateY: overlayAnim.interpolate({
|
|
548
|
+
inputRange: [0, 1],
|
|
549
|
+
outputRange: [-PREVIEW_HEIGHT, 0]
|
|
550
|
+
})
|
|
551
|
+
}]
|
|
552
|
+
}],
|
|
553
|
+
pointerEvents: isScrolledPast ? 'box-none' : 'none',
|
|
554
|
+
children: [selectedMedia?.type === 'video' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
555
|
+
style: styles.previewImage,
|
|
556
|
+
onPress: () => setVideoPaused(v => !v),
|
|
557
|
+
children: [playableUri && isActive ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoPreview.VideoPreview, {
|
|
558
|
+
uri: playableUri,
|
|
559
|
+
paused: videoPaused || !isActive,
|
|
560
|
+
muted: false,
|
|
561
|
+
style: styles.previewImage,
|
|
562
|
+
resizeMode: "cover"
|
|
563
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
564
|
+
source: {
|
|
565
|
+
uri: selectedMedia.thumbnailUri || selectedMedia.uri
|
|
566
|
+
},
|
|
567
|
+
style: styles.previewImage,
|
|
568
|
+
resizeMode: "cover"
|
|
569
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
570
|
+
style: styles.previewOverlay,
|
|
571
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
572
|
+
style: styles.playPauseCircle,
|
|
573
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
574
|
+
name: videoPaused ? 'play' : 'pause',
|
|
575
|
+
size: 24,
|
|
576
|
+
color: "#fff"
|
|
577
|
+
})
|
|
578
|
+
})
|
|
579
|
+
})]
|
|
580
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
581
|
+
source: {
|
|
582
|
+
uri: previewUri ?? selectedMedia?.uri
|
|
583
|
+
},
|
|
584
|
+
style: [styles.previewImage, cropMode === '1:1' ? styles.squareCrop : styles.originalCrop],
|
|
585
|
+
resizeMode: isRatioLocked ? 'cover' : cropMode === '1:1' ? 'cover' : 'contain'
|
|
586
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
587
|
+
style: styles.previewControls,
|
|
588
|
+
children: [isRatioLocked && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
589
|
+
style: styles.ratioBadge,
|
|
590
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
591
|
+
style: styles.ratioBadgeText,
|
|
592
|
+
children: aspectRatio
|
|
593
|
+
})
|
|
594
|
+
}), !isRatioLocked && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
595
|
+
style: styles.cropToggle,
|
|
596
|
+
onPress: () => setCropMode(v => v === '1:1' ? 'original' : '1:1'),
|
|
597
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
598
|
+
name: cropMode === '1:1' ? 'square-outline' : 'expand-outline',
|
|
599
|
+
size: 20,
|
|
600
|
+
color: "#fff"
|
|
601
|
+
})
|
|
602
|
+
})]
|
|
603
|
+
})]
|
|
604
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
|
|
605
|
+
ref: flatListRef,
|
|
606
|
+
data: listData,
|
|
607
|
+
extraData: {
|
|
608
|
+
selectedMedia,
|
|
609
|
+
previewUri,
|
|
610
|
+
playableUri,
|
|
611
|
+
videoPaused,
|
|
612
|
+
cropMode,
|
|
613
|
+
isRatioLocked,
|
|
614
|
+
activeAlbum,
|
|
615
|
+
multiSelect,
|
|
616
|
+
selectedItems,
|
|
617
|
+
showAlbumPicker,
|
|
618
|
+
loading
|
|
619
|
+
},
|
|
620
|
+
keyExtractor: item => item.id,
|
|
621
|
+
stickyHeaderIndices: [1],
|
|
622
|
+
style: styles.libraryList,
|
|
623
|
+
contentContainerStyle: styles.grid,
|
|
624
|
+
onScroll: e => {
|
|
625
|
+
const scrollY = e.nativeEvent.contentOffset.y;
|
|
626
|
+
const scrolledPast = scrollY > PREVIEW_HEIGHT - 10;
|
|
627
|
+
setIsScrolledPast(scrolledPast);
|
|
628
|
+
// When user scrolls back up to see main preview, hide the overlay
|
|
629
|
+
if (!scrolledPast) {
|
|
630
|
+
setShowOverlay(false);
|
|
631
|
+
}
|
|
632
|
+
},
|
|
633
|
+
scrollEventThrottle: 16,
|
|
634
|
+
getItemLayout: (data, index) => {
|
|
635
|
+
const albumRowHeight = 48;
|
|
636
|
+
const rowHeight = _reactNative.Dimensions.get('window').width / 4;
|
|
637
|
+
if (index === 0) return {
|
|
638
|
+
length: PREVIEW_HEIGHT,
|
|
639
|
+
offset: 0,
|
|
640
|
+
index
|
|
641
|
+
};
|
|
642
|
+
if (index === 1) return {
|
|
643
|
+
length: albumRowHeight,
|
|
644
|
+
offset: PREVIEW_HEIGHT,
|
|
645
|
+
index
|
|
646
|
+
};
|
|
647
|
+
const offset = PREVIEW_HEIGHT + albumRowHeight + (index - 2) * rowHeight;
|
|
648
|
+
return {
|
|
649
|
+
length: rowHeight,
|
|
650
|
+
offset,
|
|
651
|
+
index
|
|
652
|
+
};
|
|
653
|
+
},
|
|
654
|
+
removeClippedSubviews: false,
|
|
655
|
+
windowSize: 11,
|
|
656
|
+
ListEmptyComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
657
|
+
style: styles.empty,
|
|
658
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
659
|
+
style: styles.emptyText,
|
|
660
|
+
children: loading ? 'Loading…' : 'No media found'
|
|
661
|
+
})
|
|
662
|
+
}),
|
|
663
|
+
renderItem: ({
|
|
664
|
+
item
|
|
665
|
+
}) => {
|
|
666
|
+
if (item.type === 'preview') {
|
|
667
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
|
|
668
|
+
style: [styles.preview, {
|
|
669
|
+
transform: [{
|
|
670
|
+
scale: scaleAnim
|
|
671
|
+
}],
|
|
672
|
+
height: PREVIEW_HEIGHT
|
|
575
673
|
}],
|
|
576
|
-
|
|
577
|
-
}],
|
|
578
|
-
children: [selectedMedia?.type === 'video' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
579
|
-
style: styles.previewImage,
|
|
580
|
-
onPress: () => setVideoPaused(v => !v),
|
|
581
|
-
children: [playableUri && isActive ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoPreview.VideoPreview, {
|
|
582
|
-
uri: playableUri,
|
|
583
|
-
paused: videoPaused || !isActive,
|
|
584
|
-
muted: false,
|
|
674
|
+
children: [selectedMedia?.type === 'video' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
585
675
|
style: styles.previewImage,
|
|
586
|
-
|
|
676
|
+
onPress: () => setVideoPaused(v => !v),
|
|
677
|
+
children: [playableUri && isActive ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_VideoPreview.VideoPreview, {
|
|
678
|
+
uri: playableUri,
|
|
679
|
+
paused: videoPaused || !isActive,
|
|
680
|
+
muted: false,
|
|
681
|
+
style: styles.previewImage,
|
|
682
|
+
resizeMode: "cover"
|
|
683
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
684
|
+
source: {
|
|
685
|
+
uri: selectedMedia.thumbnailUri || selectedMedia.uri
|
|
686
|
+
},
|
|
687
|
+
style: styles.previewImage,
|
|
688
|
+
resizeMode: "cover"
|
|
689
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
690
|
+
style: styles.previewOverlay,
|
|
691
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
692
|
+
style: styles.playPauseCircle,
|
|
693
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
694
|
+
name: videoPaused ? 'play' : 'pause',
|
|
695
|
+
size: 24,
|
|
696
|
+
color: "#fff"
|
|
697
|
+
})
|
|
698
|
+
})
|
|
699
|
+
})]
|
|
587
700
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
588
701
|
source: {
|
|
589
|
-
uri:
|
|
702
|
+
uri: previewUri ?? selectedMedia?.uri
|
|
590
703
|
},
|
|
591
|
-
style: styles.previewImage,
|
|
592
|
-
resizeMode:
|
|
593
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
594
|
-
style: styles.
|
|
595
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
596
|
-
style: styles.
|
|
704
|
+
style: [styles.previewImage, cropMode === '1:1' ? styles.squareCrop : styles.originalCrop],
|
|
705
|
+
resizeMode: isRatioLocked ? 'cover' : cropMode === '1:1' ? 'cover' : 'contain'
|
|
706
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
707
|
+
style: styles.previewControls,
|
|
708
|
+
children: [isRatioLocked && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
709
|
+
style: styles.ratioBadge,
|
|
710
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
711
|
+
style: styles.ratioBadgeText,
|
|
712
|
+
children: aspectRatio
|
|
713
|
+
})
|
|
714
|
+
}), !isRatioLocked && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
715
|
+
style: styles.cropToggle,
|
|
716
|
+
onPress: () => setCropMode(v => v === '1:1' ? 'original' : '1:1'),
|
|
597
717
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
598
|
-
name:
|
|
599
|
-
size:
|
|
718
|
+
name: cropMode === '1:1' ? 'square-outline' : 'expand-outline',
|
|
719
|
+
size: 20,
|
|
600
720
|
color: "#fff"
|
|
601
721
|
})
|
|
602
|
-
})
|
|
722
|
+
})]
|
|
603
723
|
})]
|
|
604
|
-
})
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
style: [styles.
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
})
|
|
626
|
-
})]
|
|
627
|
-
})]
|
|
628
|
-
});
|
|
629
|
-
}
|
|
630
|
-
if (item.type === 'albumRow') {
|
|
631
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
632
|
-
style: [styles.albumRow, {
|
|
633
|
-
backgroundColor: '#0b0f1a',
|
|
634
|
-
zIndex: 999,
|
|
635
|
-
elevation: 5
|
|
636
|
-
}],
|
|
637
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
638
|
-
style: styles.albumSelector,
|
|
639
|
-
onPress: () => setShowAlbumPicker(v => !v),
|
|
640
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
641
|
-
style: styles.albumTitle,
|
|
642
|
-
children: activeAlbum.title
|
|
643
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
644
|
-
name: "chevron-down",
|
|
645
|
-
size: 16,
|
|
646
|
-
color: "#fff",
|
|
647
|
-
style: {
|
|
648
|
-
marginLeft: 6
|
|
649
|
-
}
|
|
650
|
-
})]
|
|
651
|
-
}), maxSelection > 1 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
652
|
-
style: {
|
|
653
|
-
flexDirection: 'row',
|
|
654
|
-
alignItems: 'center',
|
|
655
|
-
gap: 8
|
|
656
|
-
},
|
|
657
|
-
children: [multiSelect && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
658
|
-
style: {
|
|
659
|
-
color: '#3b82f6',
|
|
660
|
-
fontSize: 12,
|
|
661
|
-
fontWeight: '700'
|
|
662
|
-
},
|
|
663
|
-
children: [selectedItems.length, "/", maxSelection]
|
|
664
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
665
|
-
style: [styles.multiSelectBtn, multiSelect && styles.multiSelectBtnActive, multiSelect && selectedItems.length === 0 && {
|
|
666
|
-
opacity: 0.35
|
|
667
|
-
}],
|
|
668
|
-
onPress: () => {
|
|
669
|
-
if (multiSelect) {
|
|
670
|
-
handleNext();
|
|
671
|
-
} else {
|
|
672
|
-
toggleMultiSelect();
|
|
724
|
+
});
|
|
725
|
+
}
|
|
726
|
+
if (item.type === 'albumRow') {
|
|
727
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
728
|
+
style: [styles.albumRow, {
|
|
729
|
+
backgroundColor: '#0b0f1a',
|
|
730
|
+
zIndex: 999,
|
|
731
|
+
elevation: 5
|
|
732
|
+
}],
|
|
733
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
734
|
+
style: styles.albumSelector,
|
|
735
|
+
onPress: () => setShowAlbumPicker(v => !v),
|
|
736
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
737
|
+
style: styles.albumTitle,
|
|
738
|
+
children: activeAlbum.title
|
|
739
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
740
|
+
name: "chevron-down",
|
|
741
|
+
size: 16,
|
|
742
|
+
color: "#fff",
|
|
743
|
+
style: {
|
|
744
|
+
marginLeft: 6
|
|
673
745
|
}
|
|
746
|
+
})]
|
|
747
|
+
}), maxSelection > 1 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
748
|
+
style: {
|
|
749
|
+
flexDirection: 'row',
|
|
750
|
+
alignItems: 'center',
|
|
751
|
+
gap: 8
|
|
674
752
|
},
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
753
|
+
children: [multiSelect && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
754
|
+
style: {
|
|
755
|
+
color: '#3b82f6',
|
|
756
|
+
fontSize: 12,
|
|
757
|
+
fontWeight: '700'
|
|
758
|
+
},
|
|
759
|
+
children: [selectedItems.length, "/", maxSelection]
|
|
760
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
761
|
+
style: [styles.multiSelectBtn, multiSelect && styles.multiSelectBtnActive, multiSelect && selectedItems.length === 0 && {
|
|
762
|
+
opacity: 0.35
|
|
763
|
+
}],
|
|
764
|
+
onPress: () => {
|
|
765
|
+
if (multiSelect) {
|
|
766
|
+
handleNext();
|
|
767
|
+
} else {
|
|
768
|
+
toggleMultiSelect();
|
|
769
|
+
}
|
|
770
|
+
},
|
|
771
|
+
disabled: multiSelect && selectedItems.length === 0,
|
|
772
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
773
|
+
style: [styles.multiSelectText, multiSelect && styles.multiSelectTextActive],
|
|
774
|
+
children: multiSelect ? 'Done' : 'Select multiple'
|
|
775
|
+
})
|
|
776
|
+
})]
|
|
680
777
|
})]
|
|
681
|
-
})
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
781
|
+
style: {
|
|
782
|
+
flexDirection: 'row'
|
|
783
|
+
},
|
|
784
|
+
children: item.items.map(mediaItem => renderThumb({
|
|
785
|
+
item: mediaItem
|
|
786
|
+
}))
|
|
682
787
|
});
|
|
683
788
|
}
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
children:
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
children: mediaTabs.filter(t => mediaType === 'any' || mediaType === 'photo' && t !== 'VIDEO' || mediaType === 'video' && t !== 'PHOTO').map(t => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
696
|
-
onPress: () => setTab(t),
|
|
697
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
698
|
-
style: [styles.tab, tab === t && styles.tabActive],
|
|
699
|
-
children: t
|
|
700
|
-
})
|
|
701
|
-
}, t))
|
|
702
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
|
|
789
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
790
|
+
style: styles.tabBar,
|
|
791
|
+
children: mediaTabs.filter(t => mediaType === 'any' || mediaType === 'photo' && t !== 'VIDEO' || mediaType === 'video' && t !== 'PHOTO').map(t => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
792
|
+
onPress: () => setTab(t),
|
|
793
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
794
|
+
style: [styles.tab, tab === t && styles.tabActive],
|
|
795
|
+
children: t
|
|
796
|
+
})
|
|
797
|
+
}, t))
|
|
798
|
+
})]
|
|
799
|
+
}), " ", /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
|
|
703
800
|
visible: showCustomCamera,
|
|
704
801
|
animationType: "slide",
|
|
705
802
|
transparent: false,
|
|
@@ -937,10 +1034,21 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
937
1034
|
},
|
|
938
1035
|
preview: {
|
|
939
1036
|
width: '100%',
|
|
940
|
-
height: 420,
|
|
941
1037
|
backgroundColor: '#0f172a',
|
|
942
1038
|
overflow: 'hidden'
|
|
943
1039
|
},
|
|
1040
|
+
floatingOverlay: {
|
|
1041
|
+
position: 'absolute',
|
|
1042
|
+
top: 0,
|
|
1043
|
+
left: 0,
|
|
1044
|
+
right: 0,
|
|
1045
|
+
zIndex: 100,
|
|
1046
|
+
elevation: 20,
|
|
1047
|
+
backgroundColor: '#0f172a',
|
|
1048
|
+
overflow: 'hidden',
|
|
1049
|
+
width: '100%',
|
|
1050
|
+
height: _reactNative.Dimensions.get('window').width
|
|
1051
|
+
},
|
|
944
1052
|
previewImage: {
|
|
945
1053
|
width: '100%',
|
|
946
1054
|
height: '100%',
|