@natoe/colab 0.1.2 → 0.1.4
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/index.d.mts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +655 -237
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +655 -237
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -130,6 +130,13 @@ interface Message {
|
|
|
130
130
|
isPinned?: boolean;
|
|
131
131
|
pinnedAt?: string;
|
|
132
132
|
pinnedBy?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Client-side delivery status for optimistically-sent messages.
|
|
135
|
+
* - undefined: a real, server-persisted message
|
|
136
|
+
* - 'sending': optimistic, awaiting socket round-trip
|
|
137
|
+
* - 'failed': socket send threw; user can retry
|
|
138
|
+
*/
|
|
139
|
+
status?: 'sending' | 'failed';
|
|
133
140
|
}
|
|
134
141
|
interface SendMessagePayload {
|
|
135
142
|
body: string;
|
|
@@ -402,6 +409,8 @@ interface UseConversationReturn {
|
|
|
402
409
|
/** Set/clear the active reply target */
|
|
403
410
|
setReplyTo: (message: Message | null) => void;
|
|
404
411
|
sendMessage: (body: string) => Promise<void>;
|
|
412
|
+
/** Re-attempt sending a previously-failed optimistic text message */
|
|
413
|
+
retryMessage: (messageId: string) => Promise<void>;
|
|
405
414
|
sendAudioMessage: (audioBlob: Blob, duration: number) => Promise<void>;
|
|
406
415
|
sendFileMessage: (file: File) => Promise<void>;
|
|
407
416
|
sendDeepLink: (path: string, label: string) => Promise<void>;
|
|
@@ -673,6 +682,8 @@ interface MessageListProps {
|
|
|
673
682
|
onPin?: (messageId: string) => void;
|
|
674
683
|
onUnpin?: (messageId: string) => void;
|
|
675
684
|
onCopy?: (text: string) => void;
|
|
685
|
+
/** Retry a failed message (own bubbles only) */
|
|
686
|
+
onRetry?: (messageId: string) => void;
|
|
676
687
|
pinDisabled?: boolean;
|
|
677
688
|
className?: string;
|
|
678
689
|
}
|
|
@@ -693,11 +704,13 @@ interface MessageBubbleProps {
|
|
|
693
704
|
onUnpin?: (messageId: string) => void;
|
|
694
705
|
onCopy?: (text: string) => void;
|
|
695
706
|
onReplyJumpTo?: (messageId: string) => void;
|
|
707
|
+
/** Re-send a previously-failed message (own bubbles only) */
|
|
708
|
+
onRetry?: (messageId: string) => void;
|
|
696
709
|
/** True if pin limit reached — disables pin action */
|
|
697
710
|
pinDisabled?: boolean;
|
|
698
711
|
className?: string;
|
|
699
712
|
}
|
|
700
|
-
declare function MessageBubble({ message, isOwn, participants, currentUserId, showSeenBy, onDeepLinkClick, onReply, onPin, onUnpin, onCopy, onReplyJumpTo, pinDisabled, className, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
713
|
+
declare function MessageBubble({ message, isOwn, participants, currentUserId, showSeenBy, onDeepLinkClick, onReply, onPin, onUnpin, onCopy, onReplyJumpTo, onRetry, pinDisabled, className, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
701
714
|
|
|
702
715
|
interface MessageInputProps {
|
|
703
716
|
onSendText: (body: string) => Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -130,6 +130,13 @@ interface Message {
|
|
|
130
130
|
isPinned?: boolean;
|
|
131
131
|
pinnedAt?: string;
|
|
132
132
|
pinnedBy?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Client-side delivery status for optimistically-sent messages.
|
|
135
|
+
* - undefined: a real, server-persisted message
|
|
136
|
+
* - 'sending': optimistic, awaiting socket round-trip
|
|
137
|
+
* - 'failed': socket send threw; user can retry
|
|
138
|
+
*/
|
|
139
|
+
status?: 'sending' | 'failed';
|
|
133
140
|
}
|
|
134
141
|
interface SendMessagePayload {
|
|
135
142
|
body: string;
|
|
@@ -402,6 +409,8 @@ interface UseConversationReturn {
|
|
|
402
409
|
/** Set/clear the active reply target */
|
|
403
410
|
setReplyTo: (message: Message | null) => void;
|
|
404
411
|
sendMessage: (body: string) => Promise<void>;
|
|
412
|
+
/** Re-attempt sending a previously-failed optimistic text message */
|
|
413
|
+
retryMessage: (messageId: string) => Promise<void>;
|
|
405
414
|
sendAudioMessage: (audioBlob: Blob, duration: number) => Promise<void>;
|
|
406
415
|
sendFileMessage: (file: File) => Promise<void>;
|
|
407
416
|
sendDeepLink: (path: string, label: string) => Promise<void>;
|
|
@@ -673,6 +682,8 @@ interface MessageListProps {
|
|
|
673
682
|
onPin?: (messageId: string) => void;
|
|
674
683
|
onUnpin?: (messageId: string) => void;
|
|
675
684
|
onCopy?: (text: string) => void;
|
|
685
|
+
/** Retry a failed message (own bubbles only) */
|
|
686
|
+
onRetry?: (messageId: string) => void;
|
|
676
687
|
pinDisabled?: boolean;
|
|
677
688
|
className?: string;
|
|
678
689
|
}
|
|
@@ -693,11 +704,13 @@ interface MessageBubbleProps {
|
|
|
693
704
|
onUnpin?: (messageId: string) => void;
|
|
694
705
|
onCopy?: (text: string) => void;
|
|
695
706
|
onReplyJumpTo?: (messageId: string) => void;
|
|
707
|
+
/** Re-send a previously-failed message (own bubbles only) */
|
|
708
|
+
onRetry?: (messageId: string) => void;
|
|
696
709
|
/** True if pin limit reached — disables pin action */
|
|
697
710
|
pinDisabled?: boolean;
|
|
698
711
|
className?: string;
|
|
699
712
|
}
|
|
700
|
-
declare function MessageBubble({ message, isOwn, participants, currentUserId, showSeenBy, onDeepLinkClick, onReply, onPin, onUnpin, onCopy, onReplyJumpTo, pinDisabled, className, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
713
|
+
declare function MessageBubble({ message, isOwn, participants, currentUserId, showSeenBy, onDeepLinkClick, onReply, onPin, onUnpin, onCopy, onReplyJumpTo, onRetry, pinDisabled, className, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
701
714
|
|
|
702
715
|
interface MessageInputProps {
|
|
703
716
|
onSendText: (body: string) => Promise<void>;
|