@poolse/react-native 2.22.0 → 2.23.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 +27 -0
- package/dist/index.cjs +65 -51
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +65 -51
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,33 @@ All notable changes to `@poolse/react-native` are documented here.
|
|
|
4
4
|
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
|
|
5
5
|
versions follow [semver](https://semver.org).
|
|
6
6
|
|
|
7
|
+
## [2.23.0] — 2026-10-14
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **Leaving a group call no longer ends it for everyone.** With two or
|
|
12
|
+
more others still connected, hanging up just walks out — the room's
|
|
13
|
+
presence tells them — and the end-the-call signal is only sent when
|
|
14
|
+
at most one other person remains. WhatsApp semantics.
|
|
15
|
+
- **The video grid clears the control dock.** The grid's bottom
|
|
16
|
+
clearance matched the old chrome; a group call's last row of tiles
|
|
17
|
+
hid behind the new dock and hang-up button.
|
|
18
|
+
- Errors only show while the call is NOT working — a stale "timed out"
|
|
19
|
+
banner no longer sits over a healthy connected call.
|
|
20
|
+
|
|
21
|
+
## [2.22.1] — 2026-10-14
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- **Bubble text rendered doubled on Android.** The inline timestamp
|
|
26
|
+
reserved its spot with an invisible twin of itself — but
|
|
27
|
+
`color: transparent` on a nested Text does not reliably apply on
|
|
28
|
+
Android, so the twin rendered visibly at the end of every plain
|
|
29
|
+
message, with the real meta overlaid. The reservation trick is gone:
|
|
30
|
+
the last text line and the meta are measured (`onTextLayout`), and
|
|
31
|
+
the meta shares the line only when it provably fits, else takes its
|
|
32
|
+
own flush-right row.
|
|
33
|
+
|
|
7
34
|
## [2.22.0] — 2026-10-14
|
|
8
35
|
|
|
9
36
|
### Added
|
package/dist/index.cjs
CHANGED
|
@@ -2787,6 +2787,9 @@ function MessageBubble({
|
|
|
2787
2787
|
const { width: screenWidth } = reactNative.useWindowDimensions();
|
|
2788
2788
|
const isSelf = currentUserId !== null && message.sender_id === currentUserId;
|
|
2789
2789
|
const [expanded, setExpanded] = react.useState(false);
|
|
2790
|
+
const [lastLineWidth, setLastLineWidth] = react.useState(null);
|
|
2791
|
+
const [textBoxWidth, setTextBoxWidth] = react.useState(null);
|
|
2792
|
+
const [metaWidth, setMetaWidth] = react.useState(null);
|
|
2790
2793
|
const bubbleMaxWidth = Math.floor(screenWidth * 0.78);
|
|
2791
2794
|
const mediaWidth = Math.min(bubbleMaxWidth - 6, 420);
|
|
2792
2795
|
const sender = react$1.useUser(!isSelf ? message.sender_external_id : null);
|
|
@@ -2822,7 +2825,7 @@ function MessageBubble({
|
|
|
2822
2825
|
const jumboCount = hasBody && !hasMedia && !hasFiles && !message.quoted_message_id ? emojiOnlyCount(body) : 0;
|
|
2823
2826
|
const inlineMeta = hasBody && jumboCount === 0 && !trimmable && (!markdown || !hasMarkdown(truncated));
|
|
2824
2827
|
const sectionAbove = hasMedia || hasFiles || !!message.quoted_message || isDeleted;
|
|
2825
|
-
const
|
|
2828
|
+
const metaFits = lastLineWidth !== null && textBoxWidth !== null && metaWidth !== null && lastLineWidth + metaWidth + 14 <= textBoxWidth;
|
|
2826
2829
|
const metaRow = (variant) => {
|
|
2827
2830
|
const color = variant === "overlay" ? "#FFFFFF" : variant === "jumbo" ? theme.colors.ink3 : mutedOnBubble;
|
|
2828
2831
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -2831,6 +2834,7 @@ function MessageBubble({
|
|
|
2831
2834
|
style: [
|
|
2832
2835
|
styles15.metaRow,
|
|
2833
2836
|
variant === "inline" && styles15.metaInline,
|
|
2837
|
+
variant === "wrapped" && styles15.metaWrapped,
|
|
2834
2838
|
variant === "overlay" && styles15.metaOverlay,
|
|
2835
2839
|
variant === "block" && styles15.metaBlock,
|
|
2836
2840
|
// File-only bubble: the meta row follows the cards directly —
|
|
@@ -2838,6 +2842,7 @@ function MessageBubble({
|
|
|
2838
2842
|
variant === "block" && hasFiles && !hasBody && styles15.metaBlockAfterFiles,
|
|
2839
2843
|
variant === "jumbo" && styles15.metaJumbo
|
|
2840
2844
|
],
|
|
2845
|
+
onLayout: variant === "inline" || variant === "wrapped" ? (e) => setMetaWidth(e.nativeEvent.layout.width) : void 0,
|
|
2841
2846
|
pointerEvents: "none",
|
|
2842
2847
|
children: [
|
|
2843
2848
|
isEdited ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.editedTag, { color, opacity: 0.8 }], children: "edited" }) : null,
|
|
@@ -2935,51 +2940,53 @@ function MessageBubble({
|
|
|
2935
2940
|
children: body
|
|
2936
2941
|
}
|
|
2937
2942
|
) }) : null,
|
|
2938
|
-
hasBody && jumboCount === 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
return false;
|
|
2948
|
-
}
|
|
2949
|
-
}) : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2950
|
-
reactNative.Text,
|
|
2951
|
-
{
|
|
2952
|
-
style: {
|
|
2953
|
-
color: textColor,
|
|
2943
|
+
hasBody && jumboCount === 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2944
|
+
reactNative.View,
|
|
2945
|
+
{
|
|
2946
|
+
style: [styles15.textBlock, sectionAbove && styles15.textBlockAfter],
|
|
2947
|
+
onLayout: inlineMeta ? (e) => setTextBoxWidth(e.nativeEvent.layout.width - 24) : void 0,
|
|
2948
|
+
children: [
|
|
2949
|
+
markdown && !inlineMeta ? renderMarkdown(truncated, {
|
|
2950
|
+
textColor,
|
|
2951
|
+
linkColor: isSelf ? theme.colors.onBrand : theme.colors.brand,
|
|
2954
2952
|
fontFamily: theme.type.fontBody,
|
|
2955
2953
|
fontSize: theme.type.bodySize,
|
|
2956
|
-
lineHeight: theme.type.lineHeight
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2954
|
+
lineHeight: theme.type.lineHeight,
|
|
2955
|
+
onLinkPress: (url) => {
|
|
2956
|
+
void reactNative.Linking.openURL(url).catch(() => void 0);
|
|
2957
|
+
return false;
|
|
2958
|
+
}
|
|
2959
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2960
|
+
reactNative.Text,
|
|
2961
|
+
{
|
|
2962
|
+
style: {
|
|
2963
|
+
color: textColor,
|
|
2964
|
+
fontFamily: theme.type.fontBody,
|
|
2965
|
+
fontSize: theme.type.bodySize,
|
|
2966
|
+
lineHeight: theme.type.lineHeight
|
|
2967
|
+
},
|
|
2968
|
+
onTextLayout: inlineMeta ? (e) => {
|
|
2969
|
+
const lines = e.nativeEvent.lines;
|
|
2970
|
+
const last = lines[lines.length - 1];
|
|
2971
|
+
setLastLineWidth(last ? Math.ceil(last.width) : 0);
|
|
2972
|
+
} : void 0,
|
|
2973
|
+
children: truncated
|
|
2974
|
+
}
|
|
2975
|
+
),
|
|
2976
|
+
trimmable ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: () => setExpanded((e) => !e), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2977
|
+
reactNative.Text,
|
|
2978
|
+
{
|
|
2979
|
+
style: [
|
|
2980
|
+
styles15.readMore,
|
|
2981
|
+
{ color: isSelf ? theme.colors.onBrand : theme.colors.brand }
|
|
2982
|
+
],
|
|
2983
|
+
children: expanded ? "Show less" : "Read more"
|
|
2984
|
+
}
|
|
2985
|
+
) }) : null,
|
|
2986
|
+
inlineMeta ? metaRow(metaFits ? "inline" : "wrapped") : null
|
|
2987
|
+
]
|
|
2988
|
+
}
|
|
2989
|
+
) : null,
|
|
2983
2990
|
!inlineMeta && !metaOverlay && jumboCount === 0 ? metaRow("block") : null,
|
|
2984
2991
|
actionsTrigger ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles15.actionsSlot, children: actionsTrigger }) : null
|
|
2985
2992
|
]
|
|
@@ -3075,9 +3082,11 @@ var styles15 = reactNative.StyleSheet.create({
|
|
|
3075
3082
|
jumboBlock: {
|
|
3076
3083
|
paddingVertical: 2
|
|
3077
3084
|
},
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3085
|
+
// The meta on its own line inside the text block, flush right —
|
|
3086
|
+
// the fallback whenever the last text line has no room for it.
|
|
3087
|
+
metaWrapped: {
|
|
3088
|
+
alignSelf: "flex-end",
|
|
3089
|
+
marginTop: 3
|
|
3081
3090
|
},
|
|
3082
3091
|
readMore: {
|
|
3083
3092
|
fontSize: 12,
|
|
@@ -6133,10 +6142,14 @@ function CallScreen({
|
|
|
6133
6142
|
[wakeChrome]
|
|
6134
6143
|
);
|
|
6135
6144
|
const hangUp = react.useCallback(() => {
|
|
6145
|
+
const othersOnCall = (usingSfu ? sfu.participants : mesh.participants).filter(
|
|
6146
|
+
(p) => !p.isSelf
|
|
6147
|
+
).length;
|
|
6136
6148
|
sfu.leave();
|
|
6137
6149
|
mesh.leave();
|
|
6138
|
-
|
|
6139
|
-
|
|
6150
|
+
if (calls.phase === "active" && othersOnCall >= 2) calls.reset();
|
|
6151
|
+
else void calls.hangUp();
|
|
6152
|
+
}, [sfu, mesh, calls, usingSfu]);
|
|
6140
6153
|
const alone = usingSfu ? sfu.alone : mesh.alone;
|
|
6141
6154
|
const endedOnEmpty = react.useRef(false);
|
|
6142
6155
|
if (calls.phase !== "active") endedOnEmpty.current = false;
|
|
@@ -6177,10 +6190,11 @@ function CallScreen({
|
|
|
6177
6190
|
const statusText = duration ?? statusLine(calls, status);
|
|
6178
6191
|
const subtitle = convName && !duration && peerIds.length > 0 ? `${peerTitle} \xB7 ${statusText}` : statusText;
|
|
6179
6192
|
const showStage = connected && usingSfu && participants.length > 0;
|
|
6180
|
-
const
|
|
6193
|
+
const rawError = calls.error ?? (usingSfu ? sfu.error : mesh.error);
|
|
6194
|
+
const error = connected ? null : rawError;
|
|
6181
6195
|
const chromeInsets = {
|
|
6182
6196
|
top: insets.top + 72,
|
|
6183
|
-
bottom: insets.bottom +
|
|
6197
|
+
bottom: insets.bottom + 236
|
|
6184
6198
|
};
|
|
6185
6199
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6186
6200
|
reactNative.Modal,
|