@poolse/react-native 2.19.0 → 2.20.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/CHANGELOG.md +48 -0
- package/dist/index.cjs +304 -178
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +37 -3
- package/dist/index.d.ts +37 -3
- package/dist/index.js +304 -178
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -224,6 +224,12 @@ interface MessageBubbleProps {
|
|
|
224
224
|
showSenderName?: boolean;
|
|
225
225
|
/** Slot for an actions trigger — typically a chevron rendered by `<MessageRow>`. */
|
|
226
226
|
actionsTrigger?: ReactNode;
|
|
227
|
+
/**
|
|
228
|
+
* Long-press, forwarded into the image tiles. The tiles are
|
|
229
|
+
* Pressables of their own and win the gesture, so a wrapper's
|
|
230
|
+
* onLongPress never fires over an image-only message without this.
|
|
231
|
+
*/
|
|
232
|
+
onLongPress?: () => void;
|
|
227
233
|
/** Render in-bubble attachments (images, file cards). Defaults to true. */
|
|
228
234
|
showAttachments?: boolean;
|
|
229
235
|
/**
|
|
@@ -234,7 +240,14 @@ interface MessageBubbleProps {
|
|
|
234
240
|
*/
|
|
235
241
|
markdown?: boolean;
|
|
236
242
|
}
|
|
237
|
-
|
|
243
|
+
/**
|
|
244
|
+
* One message bubble, structured as stacked sections rather than one
|
|
245
|
+
* padded box: media bleeds to a 3px frame, text carries its own
|
|
246
|
+
* padding, and the timestamp lives ON the last text line (reserved by
|
|
247
|
+
* an invisible twin) instead of a full-width row of its own — which
|
|
248
|
+
* is what makes "ok" a one-line bubble instead of a squat rectangle.
|
|
249
|
+
*/
|
|
250
|
+
declare function MessageBubble({ message, currentUserId, readState, labelFor, onQuotedClick, groupPosition, maxBodyLength, showSenderName, actionsTrigger, showAttachments, markdown, onLongPress, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
238
251
|
|
|
239
252
|
interface MessageRowProps {
|
|
240
253
|
msg: Message;
|
|
@@ -522,8 +535,14 @@ interface AttachmentPreviewProps {
|
|
|
522
535
|
onPress?: () => void;
|
|
523
536
|
/** Render at this max width. Defaults to 280. */
|
|
524
537
|
maxWidth?: number;
|
|
538
|
+
/**
|
|
539
|
+
* `'onBrand'` restyles the file card for a brand-colored self
|
|
540
|
+
* bubble — translucent white instead of surface grey, so the card
|
|
541
|
+
* reads as part of the bubble rather than a patch cut out of it.
|
|
542
|
+
*/
|
|
543
|
+
tone?: 'default' | 'onBrand';
|
|
525
544
|
}
|
|
526
|
-
declare function AttachmentPreview({ attachment, onPress, maxWidth }: AttachmentPreviewProps): react_jsx_runtime.JSX.Element;
|
|
545
|
+
declare function AttachmentPreview({ attachment, onPress, maxWidth, tone, }: AttachmentPreviewProps): react_jsx_runtime.JSX.Element;
|
|
527
546
|
|
|
528
547
|
/**
|
|
529
548
|
* Horizontal scrolling preview row of pending / in-flight / ready
|
|
@@ -619,6 +638,21 @@ interface ImageMosaicProps {
|
|
|
619
638
|
*/
|
|
620
639
|
maxWidth?: number;
|
|
621
640
|
radius?: number;
|
|
641
|
+
/**
|
|
642
|
+
* Square off the bottom corners (a small 5px instead of `radius`).
|
|
643
|
+
* Pass when a caption or file cards follow the mosaic, so the media
|
|
644
|
+
* flows into the text block instead of leaving "ears" of bubble
|
|
645
|
+
* color between the image and the caption.
|
|
646
|
+
*/
|
|
647
|
+
squareBottom?: boolean;
|
|
648
|
+
/**
|
|
649
|
+
* Long-press on any tile. The tiles are Pressables (tap opens the
|
|
650
|
+
* viewer), and a nested Pressable wins the gesture — so without
|
|
651
|
+
* this, holding an image-only message never reached the row's
|
|
652
|
+
* actions sheet. MessageRow threads its long-press down through
|
|
653
|
+
* here.
|
|
654
|
+
*/
|
|
655
|
+
onLongPress?: () => void;
|
|
622
656
|
}
|
|
623
657
|
/**
|
|
624
658
|
* WhatsApp-style multi-image grid for inside the message bubble.
|
|
@@ -632,7 +666,7 @@ interface ImageMosaicProps {
|
|
|
632
666
|
* * n = 3 → 16:9 hero on top + row of 2 squares below.
|
|
633
667
|
* * n ≥ 4 → 2×2 grid with "+N more" overlay on the 4th tile.
|
|
634
668
|
*/
|
|
635
|
-
declare function ImageMosaic({ images, maxWidth, radius }: ImageMosaicProps): react_jsx_runtime.JSX.Element | null;
|
|
669
|
+
declare function ImageMosaic({ images, maxWidth, radius, squareBottom, onLongPress, }: ImageMosaicProps): react_jsx_runtime.JSX.Element | null;
|
|
636
670
|
|
|
637
671
|
declare const ICONS: {
|
|
638
672
|
readonly attachment: {
|
package/dist/index.d.ts
CHANGED
|
@@ -224,6 +224,12 @@ interface MessageBubbleProps {
|
|
|
224
224
|
showSenderName?: boolean;
|
|
225
225
|
/** Slot for an actions trigger — typically a chevron rendered by `<MessageRow>`. */
|
|
226
226
|
actionsTrigger?: ReactNode;
|
|
227
|
+
/**
|
|
228
|
+
* Long-press, forwarded into the image tiles. The tiles are
|
|
229
|
+
* Pressables of their own and win the gesture, so a wrapper's
|
|
230
|
+
* onLongPress never fires over an image-only message without this.
|
|
231
|
+
*/
|
|
232
|
+
onLongPress?: () => void;
|
|
227
233
|
/** Render in-bubble attachments (images, file cards). Defaults to true. */
|
|
228
234
|
showAttachments?: boolean;
|
|
229
235
|
/**
|
|
@@ -234,7 +240,14 @@ interface MessageBubbleProps {
|
|
|
234
240
|
*/
|
|
235
241
|
markdown?: boolean;
|
|
236
242
|
}
|
|
237
|
-
|
|
243
|
+
/**
|
|
244
|
+
* One message bubble, structured as stacked sections rather than one
|
|
245
|
+
* padded box: media bleeds to a 3px frame, text carries its own
|
|
246
|
+
* padding, and the timestamp lives ON the last text line (reserved by
|
|
247
|
+
* an invisible twin) instead of a full-width row of its own — which
|
|
248
|
+
* is what makes "ok" a one-line bubble instead of a squat rectangle.
|
|
249
|
+
*/
|
|
250
|
+
declare function MessageBubble({ message, currentUserId, readState, labelFor, onQuotedClick, groupPosition, maxBodyLength, showSenderName, actionsTrigger, showAttachments, markdown, onLongPress, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
238
251
|
|
|
239
252
|
interface MessageRowProps {
|
|
240
253
|
msg: Message;
|
|
@@ -522,8 +535,14 @@ interface AttachmentPreviewProps {
|
|
|
522
535
|
onPress?: () => void;
|
|
523
536
|
/** Render at this max width. Defaults to 280. */
|
|
524
537
|
maxWidth?: number;
|
|
538
|
+
/**
|
|
539
|
+
* `'onBrand'` restyles the file card for a brand-colored self
|
|
540
|
+
* bubble — translucent white instead of surface grey, so the card
|
|
541
|
+
* reads as part of the bubble rather than a patch cut out of it.
|
|
542
|
+
*/
|
|
543
|
+
tone?: 'default' | 'onBrand';
|
|
525
544
|
}
|
|
526
|
-
declare function AttachmentPreview({ attachment, onPress, maxWidth }: AttachmentPreviewProps): react_jsx_runtime.JSX.Element;
|
|
545
|
+
declare function AttachmentPreview({ attachment, onPress, maxWidth, tone, }: AttachmentPreviewProps): react_jsx_runtime.JSX.Element;
|
|
527
546
|
|
|
528
547
|
/**
|
|
529
548
|
* Horizontal scrolling preview row of pending / in-flight / ready
|
|
@@ -619,6 +638,21 @@ interface ImageMosaicProps {
|
|
|
619
638
|
*/
|
|
620
639
|
maxWidth?: number;
|
|
621
640
|
radius?: number;
|
|
641
|
+
/**
|
|
642
|
+
* Square off the bottom corners (a small 5px instead of `radius`).
|
|
643
|
+
* Pass when a caption or file cards follow the mosaic, so the media
|
|
644
|
+
* flows into the text block instead of leaving "ears" of bubble
|
|
645
|
+
* color between the image and the caption.
|
|
646
|
+
*/
|
|
647
|
+
squareBottom?: boolean;
|
|
648
|
+
/**
|
|
649
|
+
* Long-press on any tile. The tiles are Pressables (tap opens the
|
|
650
|
+
* viewer), and a nested Pressable wins the gesture — so without
|
|
651
|
+
* this, holding an image-only message never reached the row's
|
|
652
|
+
* actions sheet. MessageRow threads its long-press down through
|
|
653
|
+
* here.
|
|
654
|
+
*/
|
|
655
|
+
onLongPress?: () => void;
|
|
622
656
|
}
|
|
623
657
|
/**
|
|
624
658
|
* WhatsApp-style multi-image grid for inside the message bubble.
|
|
@@ -632,7 +666,7 @@ interface ImageMosaicProps {
|
|
|
632
666
|
* * n = 3 → 16:9 hero on top + row of 2 squares below.
|
|
633
667
|
* * n ≥ 4 → 2×2 grid with "+N more" overlay on the 4th tile.
|
|
634
668
|
*/
|
|
635
|
-
declare function ImageMosaic({ images, maxWidth, radius }: ImageMosaicProps): react_jsx_runtime.JSX.Element | null;
|
|
669
|
+
declare function ImageMosaic({ images, maxWidth, radius, squareBottom, onLongPress, }: ImageMosaicProps): react_jsx_runtime.JSX.Element | null;
|
|
636
670
|
|
|
637
671
|
declare const ICONS: {
|
|
638
672
|
readonly attachment: {
|