@poolse/react-native 2.20.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 CHANGED
@@ -4,6 +4,16 @@ 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.20.1] — 2026-10-13
8
+
9
+ ### Fixed
10
+
11
+ - **Long-press on an image-only message never opened the actions
12
+ sheet.** The mosaic tiles are Pressables (tap opens the viewer) and
13
+ a nested Pressable wins the gesture, so the row's long-press never
14
+ fired when the image WAS the whole bubble. The long-press now
15
+ threads through `MessageBubble onLongPress` into every tile.
16
+
7
17
  ## [2.20.0] — 2026-10-13
8
18
 
9
19
  ### Changed
package/dist/index.cjs CHANGED
@@ -2439,7 +2439,13 @@ var styles13 = reactNative.StyleSheet.create({
2439
2439
  fontSize: 11
2440
2440
  }
2441
2441
  });
2442
- function ImageMosaic({ images, maxWidth, radius, squareBottom = false }) {
2442
+ function ImageMosaic({
2443
+ images,
2444
+ maxWidth,
2445
+ radius,
2446
+ squareBottom = false,
2447
+ onLongPress
2448
+ }) {
2443
2449
  const theme = usePoolseTheme();
2444
2450
  const r = radius ?? theme.radii.md;
2445
2451
  const rBottom = squareBottom ? 5 : r;
@@ -2472,6 +2478,7 @@ function ImageMosaic({ images, maxWidth, radius, squareBottom = false }) {
2472
2478
  n === 1 ? /* @__PURE__ */ jsxRuntime.jsx(
2473
2479
  Tile,
2474
2480
  {
2481
+ onLongPress,
2475
2482
  attachment: visible[0],
2476
2483
  style: styles14.tileFull,
2477
2484
  onPress: () => setViewerIndex(0),
@@ -2482,6 +2489,7 @@ function ImageMosaic({ images, maxWidth, radius, squareBottom = false }) {
2482
2489
  /* @__PURE__ */ jsxRuntime.jsx(
2483
2490
  Tile,
2484
2491
  {
2492
+ onLongPress,
2485
2493
  attachment: visible[0],
2486
2494
  style: styles14.tileHalfSquare,
2487
2495
  onPress: () => setViewerIndex(0),
@@ -2491,6 +2499,7 @@ function ImageMosaic({ images, maxWidth, radius, squareBottom = false }) {
2491
2499
  /* @__PURE__ */ jsxRuntime.jsx(
2492
2500
  Tile,
2493
2501
  {
2502
+ onLongPress,
2494
2503
  attachment: visible[1],
2495
2504
  style: styles14.tileHalfSquare,
2496
2505
  onPress: () => setViewerIndex(1),
@@ -2502,6 +2511,7 @@ function ImageMosaic({ images, maxWidth, radius, squareBottom = false }) {
2502
2511
  /* @__PURE__ */ jsxRuntime.jsx(
2503
2512
  Tile,
2504
2513
  {
2514
+ onLongPress,
2505
2515
  attachment: visible[0],
2506
2516
  style: styles14.tileHero,
2507
2517
  onPress: () => setViewerIndex(0),
@@ -2512,6 +2522,7 @@ function ImageMosaic({ images, maxWidth, radius, squareBottom = false }) {
2512
2522
  /* @__PURE__ */ jsxRuntime.jsx(
2513
2523
  Tile,
2514
2524
  {
2525
+ onLongPress,
2515
2526
  attachment: visible[1],
2516
2527
  style: styles14.tileHalfSquare,
2517
2528
  onPress: () => setViewerIndex(1),
@@ -2521,6 +2532,7 @@ function ImageMosaic({ images, maxWidth, radius, squareBottom = false }) {
2521
2532
  /* @__PURE__ */ jsxRuntime.jsx(
2522
2533
  Tile,
2523
2534
  {
2535
+ onLongPress,
2524
2536
  attachment: visible[2],
2525
2537
  style: styles14.tileHalfSquare,
2526
2538
  onPress: () => setViewerIndex(2),
@@ -2534,6 +2546,7 @@ function ImageMosaic({ images, maxWidth, radius, squareBottom = false }) {
2534
2546
  /* @__PURE__ */ jsxRuntime.jsx(
2535
2547
  Tile,
2536
2548
  {
2549
+ onLongPress,
2537
2550
  attachment: visible[0],
2538
2551
  style: styles14.tileHalfSquare,
2539
2552
  onPress: () => setViewerIndex(0),
@@ -2543,6 +2556,7 @@ function ImageMosaic({ images, maxWidth, radius, squareBottom = false }) {
2543
2556
  /* @__PURE__ */ jsxRuntime.jsx(
2544
2557
  Tile,
2545
2558
  {
2559
+ onLongPress,
2546
2560
  attachment: visible[1],
2547
2561
  style: styles14.tileHalfSquare,
2548
2562
  onPress: () => setViewerIndex(1),
@@ -2554,6 +2568,7 @@ function ImageMosaic({ images, maxWidth, radius, squareBottom = false }) {
2554
2568
  /* @__PURE__ */ jsxRuntime.jsx(
2555
2569
  Tile,
2556
2570
  {
2571
+ onLongPress,
2557
2572
  attachment: visible[2],
2558
2573
  style: styles14.tileHalfSquare,
2559
2574
  onPress: () => setViewerIndex(2),
@@ -2563,6 +2578,7 @@ function ImageMosaic({ images, maxWidth, radius, squareBottom = false }) {
2563
2578
  /* @__PURE__ */ jsxRuntime.jsx(
2564
2579
  Tile,
2565
2580
  {
2581
+ onLongPress,
2566
2582
  attachment: visible[3],
2567
2583
  style: styles14.tileHalfSquare,
2568
2584
  onPress: () => setViewerIndex(3),
@@ -2596,11 +2612,12 @@ function Tile({
2596
2612
  attachment,
2597
2613
  style,
2598
2614
  overlay,
2599
- onPress
2615
+ onPress,
2616
+ onLongPress
2600
2617
  }) {
2601
2618
  const theme = usePoolseTheme();
2602
2619
  const { url } = react$1.useAttachmentUrl(attachment.id);
2603
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress, style: [styles14.tileBase, style], children: [
2620
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress, onLongPress, style: [styles14.tileBase, style], children: [
2604
2621
  url ? /* @__PURE__ */ jsxRuntime.jsx(
2605
2622
  reactNative.Image,
2606
2623
  {
@@ -2782,7 +2799,8 @@ function MessageBubble({
2782
2799
  showSenderName = false,
2783
2800
  actionsTrigger,
2784
2801
  showAttachments = true,
2785
- markdown = true
2802
+ markdown = true,
2803
+ onLongPress
2786
2804
  }) {
2787
2805
  const theme = usePoolseTheme();
2788
2806
  const { width: screenWidth } = reactNative.useWindowDimensions();
@@ -2899,7 +2917,8 @@ function MessageBubble({
2899
2917
  images,
2900
2918
  maxWidth: mediaWidth,
2901
2919
  radius: Math.max(bubbleRadius - 3, 8),
2902
- squareBottom: !metaOverlay
2920
+ squareBottom: !metaOverlay,
2921
+ ...onLongPress ? { onLongPress } : {}
2903
2922
  }
2904
2923
  ),
2905
2924
  metaOverlay ? metaRow("overlay") : null
@@ -3469,7 +3488,10 @@ function MessageRow({
3469
3488
  maxBodyLength,
3470
3489
  showSenderName,
3471
3490
  showAttachments: attachments,
3472
- markdown
3491
+ markdown,
3492
+ onLongPress: () => {
3493
+ if (actions) setActionsOpen(true);
3494
+ }
3473
3495
  }
3474
3496
  )
3475
3497
  }