stream-chat-react-native-core 5.16.0-beta.3 → 5.17.0-beta.1
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/README.md +0 -1
- package/lib/commonjs/components/Attachment/Gallery.js +75 -75
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +2 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Gallery.js +75 -75
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +2 -1
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +1 -0
- package/package.json +2 -2
- package/src/components/Attachment/Gallery.tsx +55 -54
- package/src/contexts/themeContext/utils/theme.ts +2 -0
- package/src/version.json +1 -1
|
@@ -35,52 +35,6 @@ import { isVideoPackageAvailable } from '../../native';
|
|
|
35
35
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
36
36
|
import { getUrlWithoutParams } from '../../utils/utils';
|
|
37
37
|
|
|
38
|
-
const styles = StyleSheet.create({
|
|
39
|
-
errorTextSize: { fontSize: 10 },
|
|
40
|
-
galleryContainer: {
|
|
41
|
-
borderTopLeftRadius: 13,
|
|
42
|
-
borderTopRightRadius: 13,
|
|
43
|
-
flexDirection: 'row',
|
|
44
|
-
flexWrap: 'wrap',
|
|
45
|
-
overflow: 'hidden',
|
|
46
|
-
},
|
|
47
|
-
imageContainer: {
|
|
48
|
-
alignItems: 'center',
|
|
49
|
-
display: 'flex',
|
|
50
|
-
flexDirection: 'row',
|
|
51
|
-
justifyContent: 'center',
|
|
52
|
-
padding: 1,
|
|
53
|
-
},
|
|
54
|
-
imageContainerStyle: { alignItems: 'center', flex: 1, justifyContent: 'center' },
|
|
55
|
-
imageLoadingErrorIndicatorStyle: {
|
|
56
|
-
bottom: 4,
|
|
57
|
-
left: 4,
|
|
58
|
-
position: 'absolute',
|
|
59
|
-
},
|
|
60
|
-
imageLoadingIndicatorContainer: {
|
|
61
|
-
height: '100%',
|
|
62
|
-
justifyContent: 'center',
|
|
63
|
-
position: 'absolute',
|
|
64
|
-
width: '100%',
|
|
65
|
-
},
|
|
66
|
-
imageLoadingIndicatorStyle: {
|
|
67
|
-
alignItems: 'center',
|
|
68
|
-
justifyContent: 'center',
|
|
69
|
-
position: 'absolute',
|
|
70
|
-
},
|
|
71
|
-
imageReloadContainerStyle: {
|
|
72
|
-
...StyleSheet.absoluteFillObject,
|
|
73
|
-
alignItems: 'center',
|
|
74
|
-
justifyContent: 'center',
|
|
75
|
-
},
|
|
76
|
-
moreImagesContainer: {
|
|
77
|
-
alignItems: 'center',
|
|
78
|
-
justifyContent: 'center',
|
|
79
|
-
margin: 1,
|
|
80
|
-
},
|
|
81
|
-
moreImagesText: { color: '#FFFFFF', fontSize: 26, fontWeight: '700' },
|
|
82
|
-
});
|
|
83
|
-
|
|
84
38
|
export type GalleryPropsWithContext<
|
|
85
39
|
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
86
40
|
> = Pick<ImageGalleryContextValue<StreamChatGenerics>, 'setSelectedMessage' | 'setMessages'> &
|
|
@@ -468,18 +422,19 @@ const GalleryImageThumbnail = <
|
|
|
468
422
|
|
|
469
423
|
const {
|
|
470
424
|
theme: {
|
|
471
|
-
messageSimple: {
|
|
472
|
-
gallery: { image },
|
|
473
|
-
},
|
|
425
|
+
messageSimple: { gallery },
|
|
474
426
|
},
|
|
475
427
|
} = useTheme();
|
|
476
428
|
|
|
477
429
|
return (
|
|
478
430
|
<View
|
|
479
|
-
style={
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
431
|
+
style={[
|
|
432
|
+
{
|
|
433
|
+
height: thumbnail.height - 1,
|
|
434
|
+
width: thumbnail.width - 1,
|
|
435
|
+
},
|
|
436
|
+
gallery.thumbnail,
|
|
437
|
+
]}
|
|
483
438
|
>
|
|
484
439
|
{isLoadingImageError ? (
|
|
485
440
|
<>
|
|
@@ -502,7 +457,7 @@ const GalleryImageThumbnail = <
|
|
|
502
457
|
resizeMode={thumbnail.resizeMode}
|
|
503
458
|
style={[
|
|
504
459
|
borderRadius,
|
|
505
|
-
image,
|
|
460
|
+
gallery.image,
|
|
506
461
|
{
|
|
507
462
|
height: thumbnail.height - 1,
|
|
508
463
|
width: thumbnail.width - 1,
|
|
@@ -680,4 +635,50 @@ export const Gallery = <
|
|
|
680
635
|
);
|
|
681
636
|
};
|
|
682
637
|
|
|
638
|
+
const styles = StyleSheet.create({
|
|
639
|
+
errorTextSize: { fontSize: 10 },
|
|
640
|
+
galleryContainer: {
|
|
641
|
+
borderTopLeftRadius: 13,
|
|
642
|
+
borderTopRightRadius: 13,
|
|
643
|
+
flexDirection: 'row',
|
|
644
|
+
flexWrap: 'wrap',
|
|
645
|
+
overflow: 'hidden',
|
|
646
|
+
},
|
|
647
|
+
imageContainer: {
|
|
648
|
+
alignItems: 'center',
|
|
649
|
+
display: 'flex',
|
|
650
|
+
flexDirection: 'row',
|
|
651
|
+
justifyContent: 'center',
|
|
652
|
+
padding: 1,
|
|
653
|
+
},
|
|
654
|
+
imageContainerStyle: { alignItems: 'center', flex: 1, justifyContent: 'center' },
|
|
655
|
+
imageLoadingErrorIndicatorStyle: {
|
|
656
|
+
bottom: 4,
|
|
657
|
+
left: 4,
|
|
658
|
+
position: 'absolute',
|
|
659
|
+
},
|
|
660
|
+
imageLoadingIndicatorContainer: {
|
|
661
|
+
height: '100%',
|
|
662
|
+
justifyContent: 'center',
|
|
663
|
+
position: 'absolute',
|
|
664
|
+
width: '100%',
|
|
665
|
+
},
|
|
666
|
+
imageLoadingIndicatorStyle: {
|
|
667
|
+
alignItems: 'center',
|
|
668
|
+
justifyContent: 'center',
|
|
669
|
+
position: 'absolute',
|
|
670
|
+
},
|
|
671
|
+
imageReloadContainerStyle: {
|
|
672
|
+
...StyleSheet.absoluteFillObject,
|
|
673
|
+
alignItems: 'center',
|
|
674
|
+
justifyContent: 'center',
|
|
675
|
+
},
|
|
676
|
+
moreImagesContainer: {
|
|
677
|
+
alignItems: 'center',
|
|
678
|
+
justifyContent: 'center',
|
|
679
|
+
margin: 1,
|
|
680
|
+
},
|
|
681
|
+
moreImagesText: { color: '#FFFFFF', fontSize: 26, fontWeight: '700' },
|
|
682
|
+
});
|
|
683
|
+
|
|
683
684
|
Gallery.displayName = 'Gallery{messageSimple{gallery}}';
|
|
@@ -448,6 +448,7 @@ export type Theme = {
|
|
|
448
448
|
minWidth: number;
|
|
449
449
|
moreImagesContainer: ViewStyle;
|
|
450
450
|
moreImagesText: TextStyle;
|
|
451
|
+
thumbnail: ViewStyle;
|
|
451
452
|
};
|
|
452
453
|
giphy: {
|
|
453
454
|
buttonContainer: ViewStyle;
|
|
@@ -982,6 +983,7 @@ export const defaultTheme: Theme = {
|
|
|
982
983
|
minWidth: 170,
|
|
983
984
|
moreImagesContainer: {},
|
|
984
985
|
moreImagesText: {},
|
|
986
|
+
thumbnail: {},
|
|
985
987
|
},
|
|
986
988
|
giphy: {
|
|
987
989
|
buttonContainer: {},
|
package/src/version.json
CHANGED