@poolse/react-native 2.18.0 → 2.20.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/CHANGELOG.md +65 -0
- package/dist/index.cjs +324 -192
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -28
- package/dist/index.d.ts +22 -28
- package/dist/index.js +324 -192
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -234,6 +234,13 @@ interface MessageBubbleProps {
|
|
|
234
234
|
*/
|
|
235
235
|
markdown?: boolean;
|
|
236
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* One message bubble, structured as stacked sections rather than one
|
|
239
|
+
* padded box: media bleeds to a 3px frame, text carries its own
|
|
240
|
+
* padding, and the timestamp lives ON the last text line (reserved by
|
|
241
|
+
* an invisible twin) instead of a full-width row of its own — which
|
|
242
|
+
* is what makes "ok" a one-line bubble instead of a squat rectangle.
|
|
243
|
+
*/
|
|
237
244
|
declare function MessageBubble({ message, currentUserId, readState, labelFor, onQuotedClick, groupPosition, maxBodyLength, showSenderName, actionsTrigger, showAttachments, markdown, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
238
245
|
|
|
239
246
|
interface MessageRowProps {
|
|
@@ -522,8 +529,14 @@ interface AttachmentPreviewProps {
|
|
|
522
529
|
onPress?: () => void;
|
|
523
530
|
/** Render at this max width. Defaults to 280. */
|
|
524
531
|
maxWidth?: number;
|
|
532
|
+
/**
|
|
533
|
+
* `'onBrand'` restyles the file card for a brand-colored self
|
|
534
|
+
* bubble — translucent white instead of surface grey, so the card
|
|
535
|
+
* reads as part of the bubble rather than a patch cut out of it.
|
|
536
|
+
*/
|
|
537
|
+
tone?: 'default' | 'onBrand';
|
|
525
538
|
}
|
|
526
|
-
declare function AttachmentPreview({ attachment, onPress, maxWidth }: AttachmentPreviewProps): react_jsx_runtime.JSX.Element;
|
|
539
|
+
declare function AttachmentPreview({ attachment, onPress, maxWidth, tone, }: AttachmentPreviewProps): react_jsx_runtime.JSX.Element;
|
|
527
540
|
|
|
528
541
|
/**
|
|
529
542
|
* Horizontal scrolling preview row of pending / in-flight / ready
|
|
@@ -619,6 +632,13 @@ interface ImageMosaicProps {
|
|
|
619
632
|
*/
|
|
620
633
|
maxWidth?: number;
|
|
621
634
|
radius?: number;
|
|
635
|
+
/**
|
|
636
|
+
* Square off the bottom corners (a small 5px instead of `radius`).
|
|
637
|
+
* Pass when a caption or file cards follow the mosaic, so the media
|
|
638
|
+
* flows into the text block instead of leaving "ears" of bubble
|
|
639
|
+
* color between the image and the caption.
|
|
640
|
+
*/
|
|
641
|
+
squareBottom?: boolean;
|
|
622
642
|
}
|
|
623
643
|
/**
|
|
624
644
|
* WhatsApp-style multi-image grid for inside the message bubble.
|
|
@@ -632,7 +652,7 @@ interface ImageMosaicProps {
|
|
|
632
652
|
* * n = 3 → 16:9 hero on top + row of 2 squares below.
|
|
633
653
|
* * n ≥ 4 → 2×2 grid with "+N more" overlay on the 4th tile.
|
|
634
654
|
*/
|
|
635
|
-
declare function ImageMosaic({ images, maxWidth, radius }: ImageMosaicProps): react_jsx_runtime.JSX.Element | null;
|
|
655
|
+
declare function ImageMosaic({ images, maxWidth, radius, squareBottom }: ImageMosaicProps): react_jsx_runtime.JSX.Element | null;
|
|
636
656
|
|
|
637
657
|
declare const ICONS: {
|
|
638
658
|
readonly attachment: {
|
|
@@ -1310,32 +1330,6 @@ interface RingToneModule {
|
|
|
1310
1330
|
startRingtone?: (...args: never[]) => void;
|
|
1311
1331
|
stopRingtone?: (...args: never[]) => void;
|
|
1312
1332
|
}
|
|
1313
|
-
/**
|
|
1314
|
-
* WhatsApp-style call UI: a full-screen sheet that covers the app while
|
|
1315
|
-
* a call is ringing or connected, and renders nothing when idle.
|
|
1316
|
-
*
|
|
1317
|
-
* Mount it once, high in the tree, so a call can arrive on any screen:
|
|
1318
|
-
*
|
|
1319
|
-
* <PoolseProvider config={config}>
|
|
1320
|
-
* <CallScreen
|
|
1321
|
-
* userId={me.id}
|
|
1322
|
-
* livekit={livekit}
|
|
1323
|
-
* livekitReactNative={livekitRN}
|
|
1324
|
-
* />
|
|
1325
|
-
* <YourApp />
|
|
1326
|
-
* </PoolseProvider>
|
|
1327
|
-
*
|
|
1328
|
-
* ## Two media paths
|
|
1329
|
-
*
|
|
1330
|
-
* With `livekit` supplied, media rides the SFU: one upload per
|
|
1331
|
-
* participant regardless of call size, and the camera and microphone can
|
|
1332
|
-
* be switched on and off at any point. Without it — or against a
|
|
1333
|
-
* deployment that has no SFU configured — calls fall back to the
|
|
1334
|
-
* peer-to-peer mesh, which is audio only.
|
|
1335
|
-
*
|
|
1336
|
-
* The fallback is automatic and silent by design. A deployment without
|
|
1337
|
-
* an SFU is a supported configuration, not a broken one.
|
|
1338
|
-
*/
|
|
1339
1333
|
declare function CallScreen({ userId, labelFor, calls: callsProp, webrtc, livekit, livekitReactNative, onStatusChange, onTransportChange, onVideoChange, inCallManager, nativeIncomingUi, }: CallScreenProps): react_jsx_runtime.JSX.Element;
|
|
1340
1334
|
|
|
1341
1335
|
interface CallVideoGridProps {
|
package/dist/index.d.ts
CHANGED
|
@@ -234,6 +234,13 @@ interface MessageBubbleProps {
|
|
|
234
234
|
*/
|
|
235
235
|
markdown?: boolean;
|
|
236
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* One message bubble, structured as stacked sections rather than one
|
|
239
|
+
* padded box: media bleeds to a 3px frame, text carries its own
|
|
240
|
+
* padding, and the timestamp lives ON the last text line (reserved by
|
|
241
|
+
* an invisible twin) instead of a full-width row of its own — which
|
|
242
|
+
* is what makes "ok" a one-line bubble instead of a squat rectangle.
|
|
243
|
+
*/
|
|
237
244
|
declare function MessageBubble({ message, currentUserId, readState, labelFor, onQuotedClick, groupPosition, maxBodyLength, showSenderName, actionsTrigger, showAttachments, markdown, }: MessageBubbleProps): react_jsx_runtime.JSX.Element;
|
|
238
245
|
|
|
239
246
|
interface MessageRowProps {
|
|
@@ -522,8 +529,14 @@ interface AttachmentPreviewProps {
|
|
|
522
529
|
onPress?: () => void;
|
|
523
530
|
/** Render at this max width. Defaults to 280. */
|
|
524
531
|
maxWidth?: number;
|
|
532
|
+
/**
|
|
533
|
+
* `'onBrand'` restyles the file card for a brand-colored self
|
|
534
|
+
* bubble — translucent white instead of surface grey, so the card
|
|
535
|
+
* reads as part of the bubble rather than a patch cut out of it.
|
|
536
|
+
*/
|
|
537
|
+
tone?: 'default' | 'onBrand';
|
|
525
538
|
}
|
|
526
|
-
declare function AttachmentPreview({ attachment, onPress, maxWidth }: AttachmentPreviewProps): react_jsx_runtime.JSX.Element;
|
|
539
|
+
declare function AttachmentPreview({ attachment, onPress, maxWidth, tone, }: AttachmentPreviewProps): react_jsx_runtime.JSX.Element;
|
|
527
540
|
|
|
528
541
|
/**
|
|
529
542
|
* Horizontal scrolling preview row of pending / in-flight / ready
|
|
@@ -619,6 +632,13 @@ interface ImageMosaicProps {
|
|
|
619
632
|
*/
|
|
620
633
|
maxWidth?: number;
|
|
621
634
|
radius?: number;
|
|
635
|
+
/**
|
|
636
|
+
* Square off the bottom corners (a small 5px instead of `radius`).
|
|
637
|
+
* Pass when a caption or file cards follow the mosaic, so the media
|
|
638
|
+
* flows into the text block instead of leaving "ears" of bubble
|
|
639
|
+
* color between the image and the caption.
|
|
640
|
+
*/
|
|
641
|
+
squareBottom?: boolean;
|
|
622
642
|
}
|
|
623
643
|
/**
|
|
624
644
|
* WhatsApp-style multi-image grid for inside the message bubble.
|
|
@@ -632,7 +652,7 @@ interface ImageMosaicProps {
|
|
|
632
652
|
* * n = 3 → 16:9 hero on top + row of 2 squares below.
|
|
633
653
|
* * n ≥ 4 → 2×2 grid with "+N more" overlay on the 4th tile.
|
|
634
654
|
*/
|
|
635
|
-
declare function ImageMosaic({ images, maxWidth, radius }: ImageMosaicProps): react_jsx_runtime.JSX.Element | null;
|
|
655
|
+
declare function ImageMosaic({ images, maxWidth, radius, squareBottom }: ImageMosaicProps): react_jsx_runtime.JSX.Element | null;
|
|
636
656
|
|
|
637
657
|
declare const ICONS: {
|
|
638
658
|
readonly attachment: {
|
|
@@ -1310,32 +1330,6 @@ interface RingToneModule {
|
|
|
1310
1330
|
startRingtone?: (...args: never[]) => void;
|
|
1311
1331
|
stopRingtone?: (...args: never[]) => void;
|
|
1312
1332
|
}
|
|
1313
|
-
/**
|
|
1314
|
-
* WhatsApp-style call UI: a full-screen sheet that covers the app while
|
|
1315
|
-
* a call is ringing or connected, and renders nothing when idle.
|
|
1316
|
-
*
|
|
1317
|
-
* Mount it once, high in the tree, so a call can arrive on any screen:
|
|
1318
|
-
*
|
|
1319
|
-
* <PoolseProvider config={config}>
|
|
1320
|
-
* <CallScreen
|
|
1321
|
-
* userId={me.id}
|
|
1322
|
-
* livekit={livekit}
|
|
1323
|
-
* livekitReactNative={livekitRN}
|
|
1324
|
-
* />
|
|
1325
|
-
* <YourApp />
|
|
1326
|
-
* </PoolseProvider>
|
|
1327
|
-
*
|
|
1328
|
-
* ## Two media paths
|
|
1329
|
-
*
|
|
1330
|
-
* With `livekit` supplied, media rides the SFU: one upload per
|
|
1331
|
-
* participant regardless of call size, and the camera and microphone can
|
|
1332
|
-
* be switched on and off at any point. Without it — or against a
|
|
1333
|
-
* deployment that has no SFU configured — calls fall back to the
|
|
1334
|
-
* peer-to-peer mesh, which is audio only.
|
|
1335
|
-
*
|
|
1336
|
-
* The fallback is automatic and silent by design. A deployment without
|
|
1337
|
-
* an SFU is a supported configuration, not a broken one.
|
|
1338
|
-
*/
|
|
1339
1333
|
declare function CallScreen({ userId, labelFor, calls: callsProp, webrtc, livekit, livekitReactNative, onStatusChange, onTransportChange, onVideoChange, inCallManager, nativeIncomingUi, }: CallScreenProps): react_jsx_runtime.JSX.Element;
|
|
1340
1334
|
|
|
1341
1335
|
interface CallVideoGridProps {
|