motorinc-gallery-picker-pro 1.0.4 → 1.0.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motorinc-gallery-picker-pro",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "A comprehensive React Native media gallery picker with smooth animations, multi-select, single-select, crop functionality, and native iOS/Android support",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -45,6 +45,7 @@ import {
|
|
|
45
45
|
SPACING_16,
|
|
46
46
|
SPACING_24,
|
|
47
47
|
SPACING_4,
|
|
48
|
+
Header,
|
|
48
49
|
} from 'motorinc-global-components';
|
|
49
50
|
import {ThemeContext, FontProvider, useTheme} from 'motorinc-global-components';
|
|
50
51
|
const {width: screenWidth, height: screenHeight} = Dimensions.get('window');
|
|
@@ -1475,7 +1476,7 @@ const MainPhotoGallery = React.forwardRef<MainPhotoGalleryRef, props>(
|
|
|
1475
1476
|
<TouchableOpacity
|
|
1476
1477
|
activeOpacity={0.8}
|
|
1477
1478
|
key={ratio}
|
|
1478
|
-
style={[styles.aspectRatioButton]}
|
|
1479
|
+
// style={[styles.aspectRatioButton]}
|
|
1479
1480
|
onPress={() => setAspectRatio(ratio)}
|
|
1480
1481
|
hitSlop={{top: 12, bottom: 12}}>
|
|
1481
1482
|
<View
|
|
@@ -1576,7 +1577,7 @@ const MainPhotoGallery = React.forwardRef<MainPhotoGalleryRef, props>(
|
|
|
1576
1577
|
? 'rgba(235, 238, 245, 0.60)'
|
|
1577
1578
|
: '#fff'
|
|
1578
1579
|
}>
|
|
1579
|
-
{String.fromCharCode(
|
|
1580
|
+
{String.fromCharCode(60559)}
|
|
1580
1581
|
</PlayyText>
|
|
1581
1582
|
</TouchableOpacity>
|
|
1582
1583
|
</View>
|
|
@@ -1685,6 +1686,12 @@ const MainPhotoGallery = React.forwardRef<MainPhotoGalleryRef, props>(
|
|
|
1685
1686
|
);
|
|
1686
1687
|
};
|
|
1687
1688
|
|
|
1689
|
+
const handleNextPress = useCallback(() => {
|
|
1690
|
+
if (onNext) {
|
|
1691
|
+
onNext(selectedAssets || []);
|
|
1692
|
+
}
|
|
1693
|
+
}, [onNext, selectedAssets]);
|
|
1694
|
+
|
|
1688
1695
|
const renderCancelNextButtons = () => {
|
|
1689
1696
|
// Only show buttons if we have the callbacks and are in multi-select mode
|
|
1690
1697
|
if (!multiSelect || (!onCancel && !onNext)) {
|
|
@@ -1694,19 +1701,36 @@ const MainPhotoGallery = React.forwardRef<MainPhotoGalleryRef, props>(
|
|
|
1694
1701
|
const currentSelectedAssets = selectedAssets || [];
|
|
1695
1702
|
|
|
1696
1703
|
return (
|
|
1697
|
-
<NavigationHeader
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
/>
|
|
1704
|
+
// <NavigationHeader
|
|
1705
|
+
// backIcon
|
|
1706
|
+
// statusBarvalue={statusBarvalue!}
|
|
1707
|
+
// handleBack={onCancel}
|
|
1708
|
+
// buttonTitle="Next"
|
|
1709
|
+
// buttontextColor="#fff"
|
|
1710
|
+
// backIconColor="#fff"
|
|
1711
|
+
// isButton
|
|
1712
|
+
// label="Back"
|
|
1713
|
+
// labelColor="#fff"
|
|
1714
|
+
// // @ts-ignore
|
|
1715
|
+
// handlePressButton={onNext}
|
|
1716
|
+
// />
|
|
1717
|
+
<Header
|
|
1718
|
+
statusBarValue={statusBarvalue}
|
|
1719
|
+
style={{backgroundColor: '#000'}}>
|
|
1720
|
+
<Header.Row>
|
|
1721
|
+
<Header.Left
|
|
1722
|
+
label="Cancel"
|
|
1723
|
+
labelColor="#fff"
|
|
1724
|
+
onBackPress={onCancel}
|
|
1725
|
+
/>
|
|
1726
|
+
<Header.Right
|
|
1727
|
+
buttonTitle="Next"
|
|
1728
|
+
buttonTextColor="#008BF5"
|
|
1729
|
+
isButton
|
|
1730
|
+
onButtonPress={handleNextPress}
|
|
1731
|
+
/>
|
|
1732
|
+
</Header.Row>
|
|
1733
|
+
</Header>
|
|
1710
1734
|
);
|
|
1711
1735
|
};
|
|
1712
1736
|
|
|
@@ -2068,8 +2092,8 @@ const styles = StyleSheet.create({
|
|
|
2068
2092
|
navControls: {
|
|
2069
2093
|
flexDirection: 'row',
|
|
2070
2094
|
justifyContent: 'center',
|
|
2095
|
+
gap: 16,
|
|
2071
2096
|
alignItems: 'center',
|
|
2072
|
-
gap: 8,
|
|
2073
2097
|
},
|
|
2074
2098
|
simpleHeader: {
|
|
2075
2099
|
flexDirection: 'row',
|
|
@@ -2608,6 +2632,7 @@ const styles = StyleSheet.create({
|
|
|
2608
2632
|
aspectRatioContainer: {
|
|
2609
2633
|
flexDirection: 'row',
|
|
2610
2634
|
paddingHorizontal: 4,
|
|
2635
|
+
gap: 12,
|
|
2611
2636
|
},
|
|
2612
2637
|
aspectRatioButton: {
|
|
2613
2638
|
paddingHorizontal: 12,
|