@linktr.ee/messaging-react 1.38.0 → 1.40.0
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/dist/{Card-RgHsp9x1.js → Card-CuiPAb_A.js} +2 -2
- package/dist/{Card-RgHsp9x1.js.map → Card-CuiPAb_A.js.map} +1 -1
- package/dist/{Card-DwgUtqsA.js → Card-RBVM8Gy3.js} +2 -2
- package/dist/{Card-DwgUtqsA.js.map → Card-RBVM8Gy3.js.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/{index-B_4pciGp.js → index-DY-3-rt4.js} +984 -1287
- package/dist/index-DY-3-rt4.js.map +1 -0
- package/dist/index.d.ts +0 -60
- package/dist/index.js +9 -11
- package/package.json +1 -1
- package/src/components/ChannelList/ChannelList.stories.tsx +2 -7
- package/src/components/CustomMessage/MessageVoteButtons.stories.tsx +86 -0
- package/src/components/CustomMessage/MessageVoteButtons.tsx +14 -32
- package/src/components/MessagingShell/index.tsx +2 -110
- package/src/index.ts +0 -4
- package/src/styles.css +83 -7
- package/src/types.ts +0 -37
- package/dist/index-B_4pciGp.js.map +0 -1
- package/src/components/ParticipantPicker/ParticipantItem.stories.tsx +0 -190
- package/src/components/ParticipantPicker/ParticipantItem.tsx +0 -63
- package/src/components/ParticipantPicker/ParticipantPicker.stories.tsx +0 -56
- package/src/components/ParticipantPicker/ParticipantPicker.tsx +0 -229
- package/src/components/ParticipantPicker/index.tsx +0 -262
- package/src/hooks/useParticipants.ts +0 -94
package/src/types.ts
CHANGED
|
@@ -32,30 +32,10 @@ export interface Participant {
|
|
|
32
32
|
metadata?: Record<string, unknown>
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
/**
|
|
36
|
-
* Source for loading participants (followers, team members, etc.)
|
|
37
|
-
*/
|
|
38
|
-
export interface ParticipantSource {
|
|
39
|
-
loadParticipants: (options?: {
|
|
40
|
-
search?: string
|
|
41
|
-
limit?: number
|
|
42
|
-
cursor?: string
|
|
43
|
-
}) => Promise<{
|
|
44
|
-
participants: Participant[]
|
|
45
|
-
hasMore: boolean
|
|
46
|
-
nextCursor?: string
|
|
47
|
-
}>
|
|
48
|
-
totalCount?: number
|
|
49
|
-
loading?: boolean
|
|
50
|
-
}
|
|
51
|
-
|
|
52
35
|
/**
|
|
53
36
|
* Messaging capabilities configuration
|
|
54
37
|
*/
|
|
55
38
|
export interface MessagingCapabilities {
|
|
56
|
-
showStartConversation?: boolean
|
|
57
|
-
participantSource?: ParticipantSource
|
|
58
|
-
participantLabel?: string // e.g., "followers", "team members"
|
|
59
39
|
/**
|
|
60
40
|
* Show the "Delete Conversation" button in channel info dialog.
|
|
61
41
|
* Defaults to true for backward compatibility.
|
|
@@ -69,9 +49,6 @@ export interface MessagingCapabilities {
|
|
|
69
49
|
export interface ChannelListProps {
|
|
70
50
|
onChannelSelect: (channel: Channel) => void
|
|
71
51
|
selectedChannel?: Channel
|
|
72
|
-
showStartConversation?: boolean
|
|
73
|
-
onStartConversation?: () => void
|
|
74
|
-
participantLabel?: string
|
|
75
52
|
className?: string
|
|
76
53
|
filters: ChannelFilters
|
|
77
54
|
/**
|
|
@@ -281,7 +258,6 @@ export interface MessagingShellProps extends ChannelViewPassthroughProps {
|
|
|
281
258
|
capabilities?: MessagingCapabilities
|
|
282
259
|
className?: string
|
|
283
260
|
onChannelSelect?: (channel: Channel) => void
|
|
284
|
-
onParticipantSelect?: (participant: Participant) => void
|
|
285
261
|
|
|
286
262
|
/**
|
|
287
263
|
* Auto-select a conversation with this participant on mount.
|
|
@@ -342,19 +318,6 @@ export interface MessagingShellProps extends ChannelViewPassthroughProps {
|
|
|
342
318
|
) => React.ReactNode
|
|
343
319
|
}
|
|
344
320
|
|
|
345
|
-
/**
|
|
346
|
-
* ParticipantPicker component props
|
|
347
|
-
*/
|
|
348
|
-
export interface ParticipantPickerProps {
|
|
349
|
-
participantSource: ParticipantSource
|
|
350
|
-
onSelectParticipant: (participant: Participant) => void
|
|
351
|
-
onClose: () => void
|
|
352
|
-
existingParticipantIds?: Set<string>
|
|
353
|
-
participantLabel?: string
|
|
354
|
-
searchPlaceholder?: string
|
|
355
|
-
className?: string
|
|
356
|
-
}
|
|
357
|
-
|
|
358
321
|
/**
|
|
359
322
|
* MessagingProvider component props
|
|
360
323
|
*/
|