Skip to content

Commit 04170cd

Browse files
committed
chore: resolve colflicts
2 parents 3e8fb88 + 6bb825e commit 04170cd

File tree

137 files changed

+1733
-1816
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+1733
-1816
lines changed

package/src/components/Attachment/Attachment.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22

3-
import type { Attachment as AttachmentType, ExtendableGenerics } from 'stream-chat';
3+
import type { Attachment as AttachmentType } from 'stream-chat';
44

55
import { AttachmentActions as AttachmentActionsDefault } from '../../components/Attachment/AttachmentActions';
66
import { Card as CardDefault } from '../../components/Attachment/Card';
@@ -17,7 +17,7 @@ import type { DefaultStreamChatGenerics } from '../../types/types';
1717
export type ActionHandler = (name: string, value: string) => void;
1818

1919
export type AttachmentPropsWithContext<
20-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
20+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
2121
> = Pick<
2222
MessagesContextValue<StreamChatClient>,
2323
'AttachmentActions' | 'Card' | 'FileAttachment' | 'Gallery' | 'Giphy' | 'UrlPreview'
@@ -29,7 +29,7 @@ export type AttachmentPropsWithContext<
2929
};
3030

3131
const AttachmentWithContext = <
32-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
32+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
3333
>(
3434
props: AttachmentPropsWithContext<StreamChatClient>,
3535
) => {
@@ -82,7 +82,7 @@ const AttachmentWithContext = <
8282
}
8383
};
8484

85-
const areEqual = <StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics>(
85+
const areEqual = <StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(
8686
prevProps: AttachmentPropsWithContext<StreamChatClient>,
8787
nextProps: AttachmentPropsWithContext<StreamChatClient>,
8888
) => {
@@ -103,7 +103,7 @@ const MemoizedAttachment = React.memo(
103103
) as typeof AttachmentWithContext;
104104

105105
export type AttachmentProps<
106-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
106+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
107107
> = Partial<
108108
Pick<
109109
MessagesContextValue<StreamChatClient>,
@@ -115,7 +115,9 @@ export type AttachmentProps<
115115
/**
116116
* Attachment - The message attachment
117117
*/
118-
export const Attachment = <StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics>(
118+
export const Attachment = <
119+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
120+
>(
119121
props: AttachmentProps<StreamChatClient>,
120122
) => {
121123
const {

package/src/components/Attachment/AttachmentActions.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
ViewStyle,
1010
} from 'react-native';
1111

12-
import type { Attachment, ExtendableGenerics } from 'stream-chat';
12+
import type { Attachment } from 'stream-chat';
1313

1414
import {
1515
MessageContextValue,
@@ -34,7 +34,7 @@ const styles = StyleSheet.create({
3434
});
3535

3636
export type AttachmentActionsPropsWithContext<
37-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
37+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
3838
> = Pick<Attachment<StreamChatClient>, 'actions'> &
3939
Pick<MessageContextValue<StreamChatClient>, 'handleAction'> & {
4040
styles?: Partial<{
@@ -45,7 +45,7 @@ export type AttachmentActionsPropsWithContext<
4545
};
4646

4747
const AttachmentActionsWithContext = <
48-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
48+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
4949
>(
5050
props: AttachmentActionsPropsWithContext<StreamChatClient>,
5151
) => {
@@ -116,7 +116,7 @@ const AttachmentActionsWithContext = <
116116
);
117117
};
118118

119-
const areEqual = <StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics>(
119+
const areEqual = <StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(
120120
prevProps: AttachmentActionsPropsWithContext<StreamChatClient>,
121121
nextProps: AttachmentActionsPropsWithContext<StreamChatClient>,
122122
) => {
@@ -134,7 +134,7 @@ const MemoizedAttachmentActions = React.memo(
134134
) as typeof AttachmentActionsWithContext;
135135

136136
export type AttachmentActionsProps<
137-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
137+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
138138
> = Attachment<StreamChatClient> &
139139
Partial<Pick<MessageContextValue<StreamChatClient>, 'handleAction'>>;
140140

@@ -143,7 +143,7 @@ export type AttachmentActionsProps<
143143
* Actions in combination with attachments can be used to build [commands](https://getstream.io/chat/docs/#channel_commands).
144144
*/
145145
export const AttachmentActions = <
146-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
146+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
147147
>(
148148
props: AttachmentActionsProps<StreamChatClient>,
149149
) => {

package/src/components/Attachment/Card.tsx

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
ViewStyle,
1313
} from 'react-native';
1414

15-
import type { Attachment, ExtendableGenerics } from 'stream-chat';
15+
import type { Attachment } from 'stream-chat';
1616

1717
import {
1818
MessageContextValue,
@@ -79,7 +79,7 @@ const goToURL = (url?: string) => {
7979
};
8080

8181
export type CardPropsWithContext<
82-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
82+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
8383
> = Attachment<StreamChatClient> &
8484
Pick<
8585
MessageContextValue<StreamChatClient>,
@@ -105,7 +105,9 @@ export type CardPropsWithContext<
105105
}>;
106106
};
107107

108-
const CardWithContext = <StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics>(
108+
const CardWithContext = <
109+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
110+
>(
109111
props: CardPropsWithContext<StreamChatClient>,
110112
) => {
111113
const {
@@ -265,20 +267,23 @@ const CardWithContext = <StreamChatClient extends ExtendableGenerics = DefaultSt
265267

266268
const MemoizedCard = React.memo(CardWithContext, () => true) as typeof CardWithContext;
267269

268-
export type CardProps<StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics> =
269-
Attachment<StreamChatClient> &
270-
Partial<
271-
Pick<MessageContextValue<StreamChatClient>, 'onLongPress' | 'onPress' | 'onPressIn'> &
272-
Pick<
273-
MessagesContextValue<StreamChatClient>,
274-
'additionalTouchableProps' | 'CardCover' | 'CardFooter' | 'CardHeader'
275-
>
276-
>;
270+
export type CardProps<
271+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
272+
> = Attachment<StreamChatClient> &
273+
Partial<
274+
Pick<MessageContextValue<StreamChatClient>, 'onLongPress' | 'onPress' | 'onPressIn'> &
275+
Pick<
276+
MessagesContextValue<StreamChatClient>,
277+
'additionalTouchableProps' | 'CardCover' | 'CardFooter' | 'CardHeader'
278+
>
279+
>;
277280

278281
/**
279282
* UI component for card in attachments.
280283
*/
281-
export const Card = <StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics>(
284+
export const Card = <
285+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
286+
>(
282287
props: CardProps<StreamChatClient>,
283288
) => {
284289
const { message, onLongPress, onPress, onPressIn, preventPress } =

package/src/components/Attachment/FileAttachment.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ViewStyle,
1111
} from 'react-native';
1212

13-
import type { Attachment, ExtendableGenerics } from 'stream-chat';
13+
import type { Attachment } from 'stream-chat';
1414

1515
import { AttachmentActions as AttachmentActionsDefault } from '../../components/Attachment/AttachmentActions';
1616
import { FileIcon as FileIconDefault } from '../../components/Attachment/FileIcon';
@@ -47,7 +47,7 @@ const styles = StyleSheet.create({
4747
});
4848

4949
export type FileAttachmentPropsWithContext<
50-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
50+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
5151
> = Pick<
5252
MessageContextValue<StreamChatClient>,
5353
'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress'
@@ -68,7 +68,7 @@ export type FileAttachmentPropsWithContext<
6868
};
6969

7070
const FileAttachmentWithContext = <
71-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
71+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
7272
>(
7373
props: FileAttachmentPropsWithContext<StreamChatClient>,
7474
) => {
@@ -145,12 +145,12 @@ const FileAttachmentWithContext = <
145145
};
146146

147147
export type FileAttachmentProps<
148-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
148+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
149149
> = Partial<Omit<FileAttachmentPropsWithContext<StreamChatClient>, 'attachment'>> &
150150
Pick<FileAttachmentPropsWithContext<StreamChatClient>, 'attachment'>;
151151

152152
export const FileAttachment = <
153-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
153+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
154154
>(
155155
props: FileAttachmentProps<StreamChatClient>,
156156
) => {

package/src/components/Attachment/FileAttachmentGroup.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React from 'react';
22
import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
33

4-
import type { ExtendableGenerics } from 'stream-chat';
5-
64
import { Attachment as AttachmentDefault } from './Attachment';
75

86
import {
@@ -24,7 +22,7 @@ const styles = StyleSheet.create({
2422
});
2523

2624
export type FileAttachmentGroupPropsWithContext<
27-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
25+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
2826
> = Pick<MessageContextValue<StreamChatClient>, 'files'> &
2927
Pick<MessagesContextValue<StreamChatClient>, 'Attachment'> & {
3028
/**
@@ -38,7 +36,7 @@ export type FileAttachmentGroupPropsWithContext<
3836
};
3937

4038
const FileAttachmentGroupWithContext = <
41-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
39+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
4240
>(
4341
props: FileAttachmentGroupPropsWithContext<StreamChatClient>,
4442
) => {
@@ -69,7 +67,7 @@ const FileAttachmentGroupWithContext = <
6967
);
7068
};
7169

72-
const areEqual = <StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics>(
70+
const areEqual = <StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(
7371
prevProps: FileAttachmentGroupPropsWithContext<StreamChatClient>,
7472
nextProps: FileAttachmentGroupPropsWithContext<StreamChatClient>,
7573
) => {
@@ -87,12 +85,12 @@ const MemoizedFileAttachmentGroup = React.memo(
8785
) as typeof FileAttachmentGroupWithContext;
8886

8987
export type FileAttachmentGroupProps<
90-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
88+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
9189
> = Partial<Omit<FileAttachmentGroupPropsWithContext<StreamChatClient>, 'messageId'>> &
9290
Pick<FileAttachmentGroupPropsWithContext<StreamChatClient>, 'messageId'>;
9391

9492
export const FileAttachmentGroup = <
95-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
93+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
9694
>(
9795
props: FileAttachmentGroupProps<StreamChatClient>,
9896
) => {

package/src/components/Attachment/Gallery.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React, { useMemo } from 'react';
22
import { Image, ImageProps, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
33

4-
import type { ExtendableGenerics } from 'stream-chat';
5-
64
import { buildGallery } from './utils/buildGallery/buildGallery';
75

86
import { getGalleryImageBorderRadius } from './utils/getGalleryImageBorderRadius';
@@ -71,7 +69,7 @@ const styles = StyleSheet.create({
7169
});
7270

7371
export type GalleryPropsWithContext<
74-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
72+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
7573
> = Pick<ImageGalleryContextValue<StreamChatClient>, 'setImage' | 'setImages'> &
7674
Pick<
7775
MessageContextValue<StreamChatClient>,
@@ -107,7 +105,7 @@ export type GalleryPropsWithContext<
107105
};
108106

109107
const GalleryWithContext = <
110-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
108+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
111109
>(
112110
props: GalleryPropsWithContext<StreamChatClient>,
113111
) => {
@@ -312,7 +310,7 @@ const GalleryWithContext = <
312310
);
313311
};
314312

315-
const areEqual = <StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics>(
313+
const areEqual = <StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(
316314
prevProps: GalleryPropsWithContext<StreamChatClient>,
317315
nextProps: GalleryPropsWithContext<StreamChatClient>,
318316
) => {
@@ -353,13 +351,16 @@ const areEqual = <StreamChatClient extends ExtendableGenerics = DefaultStreamCha
353351

354352
const MemoizedGallery = React.memo(GalleryWithContext, areEqual) as typeof GalleryWithContext;
355353

356-
export type GalleryProps<StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics> =
357-
Partial<GalleryPropsWithContext<StreamChatClient>>;
354+
export type GalleryProps<
355+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
356+
> = Partial<GalleryPropsWithContext<StreamChatClient>>;
358357

359358
/**
360359
* UI component for card in attachments.
361360
*/
362-
export const Gallery = <StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics>(
361+
export const Gallery = <
362+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
363+
>(
363364
props: GalleryProps<StreamChatClient>,
364365
) => {
365366
const {

package/src/components/Attachment/Giphy.tsx

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
33

4-
import type { Attachment, ExtendableGenerics } from 'stream-chat';
4+
import type { Attachment } from 'stream-chat';
55

66
import {
77
MessageContextValue,
@@ -93,7 +93,7 @@ const styles = StyleSheet.create({
9393
});
9494

9595
export type GiphyPropsWithContext<
96-
StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics,
96+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
9797
> = Pick<
9898
MessageContextValue<StreamChatClient>,
9999
'handleAction' | 'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress'
@@ -102,7 +102,9 @@ export type GiphyPropsWithContext<
102102
attachment: Attachment<StreamChatClient>;
103103
};
104104

105-
const GiphyWithContext = <StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics>(
105+
const GiphyWithContext = <
106+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
107+
>(
106108
props: GiphyPropsWithContext<StreamChatClient>,
107109
) => {
108110
const {
@@ -259,7 +261,7 @@ const GiphyWithContext = <StreamChatClient extends ExtendableGenerics = DefaultS
259261
);
260262
};
261263

262-
const areEqual = <StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics>(
264+
const areEqual = <StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(
263265
prevProps: GiphyPropsWithContext<StreamChatClient>,
264266
nextProps: GiphyPropsWithContext<StreamChatClient>,
265267
) => {
@@ -289,18 +291,21 @@ const areEqual = <StreamChatClient extends ExtendableGenerics = DefaultStreamCha
289291

290292
const MemoizedGiphy = React.memo(GiphyWithContext, areEqual) as typeof GiphyWithContext;
291293

292-
export type GiphyProps<StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics> =
293-
Partial<
294-
Pick<MessageContextValue<StreamChatClient>, 'onLongPress' | 'onPressIn'> &
295-
Pick<MessagesContextValue<StreamChatClient>, 'additionalTouchableProps'>
296-
> & {
297-
attachment: Attachment<StreamChatClient>;
298-
};
294+
export type GiphyProps<
295+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
296+
> = Partial<
297+
Pick<MessageContextValue<StreamChatClient>, 'onLongPress' | 'onPressIn'> &
298+
Pick<MessagesContextValue<StreamChatClient>, 'additionalTouchableProps'>
299+
> & {
300+
attachment: Attachment<StreamChatClient>;
301+
};
299302

300303
/**
301304
* UI component for card in attachments.
302305
*/
303-
export const Giphy = <StreamChatClient extends ExtendableGenerics = DefaultStreamChatGenerics>(
306+
export const Giphy = <
307+
StreamChatClient extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
308+
>(
304309
props: GiphyProps<StreamChatClient>,
305310
) => {
306311
const { handleAction, onLongPress, onPress, onPressIn, preventPress } =

0 commit comments

Comments
 (0)