@poolse/react-native 2.15.0 → 2.15.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/dist/index.d.cts CHANGED
@@ -1326,13 +1326,30 @@ interface CallVideoGridProps {
1326
1326
  */
1327
1327
  onLocalPress?: (() => void) | undefined;
1328
1328
  /**
1329
- * How much chrome sits over the top and bottom of the stage, so the
1330
- * floating preview does not park itself under the control bar.
1329
+ * How much chrome sits over the bottom of the stage.
1330
+ *
1331
+ * Only used to keep the last row of a scrolling group grid clear of
1332
+ * the control bar. It deliberately does NOT bound the floating
1333
+ * preview — see {@link safeArea}.
1331
1334
  */
1332
1335
  chromeInsets?: {
1333
1336
  top: number;
1334
1337
  bottom: number;
1335
1338
  } | undefined;
1339
+ /**
1340
+ * The screen's safe area, which is what the floating preview is
1341
+ * bounded by.
1342
+ *
1343
+ * Separate from `chromeInsets` on purpose. Bounding the preview by the
1344
+ * chrome kept it in a box well inside the screen, floating in the
1345
+ * middle of nowhere rather than tucked into a corner — and on a
1346
+ * connected video call the chrome is hidden most of the time anyway,
1347
+ * so it was reserving space for something that was not there.
1348
+ */
1349
+ safeArea?: {
1350
+ top: number;
1351
+ bottom: number;
1352
+ } | undefined;
1336
1353
  }
1337
1354
  /**
1338
1355
  * The stage: everyone on the call, laid out for how many there are.
@@ -1352,7 +1369,7 @@ interface CallVideoGridProps {
1352
1369
  * every tile draws an avatar, and the layout logic does not need to
1353
1370
  * know whether video was ever on the table.
1354
1371
  */
1355
- declare function CallVideoGrid({ participants, livekitReactNative, labelFor, onLocalPress, chromeInsets, }: CallVideoGridProps): react_jsx_runtime.JSX.Element;
1372
+ declare function CallVideoGrid({ participants, livekitReactNative, labelFor, onLocalPress, chromeInsets, safeArea, }: CallVideoGridProps): react_jsx_runtime.JSX.Element;
1356
1373
 
1357
1374
  interface CallControlButtonProps {
1358
1375
  icon: IconName;
@@ -1440,7 +1457,10 @@ interface LocalVideoPipProps {
1440
1457
  width: number;
1441
1458
  height: number;
1442
1459
  };
1443
- /** Inset from the edges — keeps the tile clear of the call chrome. */
1460
+ /**
1461
+ * Safe-area insets. The tile hugs the edges just inside these, so it
1462
+ * clears the notch and the home indicator and nothing else.
1463
+ */
1444
1464
  insets?: {
1445
1465
  top: number;
1446
1466
  bottom: number;
package/dist/index.d.ts CHANGED
@@ -1326,13 +1326,30 @@ interface CallVideoGridProps {
1326
1326
  */
1327
1327
  onLocalPress?: (() => void) | undefined;
1328
1328
  /**
1329
- * How much chrome sits over the top and bottom of the stage, so the
1330
- * floating preview does not park itself under the control bar.
1329
+ * How much chrome sits over the bottom of the stage.
1330
+ *
1331
+ * Only used to keep the last row of a scrolling group grid clear of
1332
+ * the control bar. It deliberately does NOT bound the floating
1333
+ * preview — see {@link safeArea}.
1331
1334
  */
1332
1335
  chromeInsets?: {
1333
1336
  top: number;
1334
1337
  bottom: number;
1335
1338
  } | undefined;
1339
+ /**
1340
+ * The screen's safe area, which is what the floating preview is
1341
+ * bounded by.
1342
+ *
1343
+ * Separate from `chromeInsets` on purpose. Bounding the preview by the
1344
+ * chrome kept it in a box well inside the screen, floating in the
1345
+ * middle of nowhere rather than tucked into a corner — and on a
1346
+ * connected video call the chrome is hidden most of the time anyway,
1347
+ * so it was reserving space for something that was not there.
1348
+ */
1349
+ safeArea?: {
1350
+ top: number;
1351
+ bottom: number;
1352
+ } | undefined;
1336
1353
  }
1337
1354
  /**
1338
1355
  * The stage: everyone on the call, laid out for how many there are.
@@ -1352,7 +1369,7 @@ interface CallVideoGridProps {
1352
1369
  * every tile draws an avatar, and the layout logic does not need to
1353
1370
  * know whether video was ever on the table.
1354
1371
  */
1355
- declare function CallVideoGrid({ participants, livekitReactNative, labelFor, onLocalPress, chromeInsets, }: CallVideoGridProps): react_jsx_runtime.JSX.Element;
1372
+ declare function CallVideoGrid({ participants, livekitReactNative, labelFor, onLocalPress, chromeInsets, safeArea, }: CallVideoGridProps): react_jsx_runtime.JSX.Element;
1356
1373
 
1357
1374
  interface CallControlButtonProps {
1358
1375
  icon: IconName;
@@ -1440,7 +1457,10 @@ interface LocalVideoPipProps {
1440
1457
  width: number;
1441
1458
  height: number;
1442
1459
  };
1443
- /** Inset from the edges — keeps the tile clear of the call chrome. */
1460
+ /**
1461
+ * Safe-area insets. The tile hugs the edges just inside these, so it
1462
+ * clears the notch and the home indicator and nothing else.
1463
+ */
1444
1464
  insets?: {
1445
1465
  top: number;
1446
1466
  bottom: number;
package/dist/index.js CHANGED
@@ -5420,7 +5420,7 @@ var styles27 = StyleSheet.create({
5420
5420
  });
5421
5421
  var PIP_WIDTH = 108;
5422
5422
  var PIP_HEIGHT = 152;
5423
- var MARGIN = 14;
5423
+ var MARGIN = 12;
5424
5424
  function LocalVideoPip({
5425
5425
  participant,
5426
5426
  VideoTrack,
@@ -5550,7 +5550,8 @@ function CallVideoGrid({
5550
5550
  livekitReactNative,
5551
5551
  labelFor,
5552
5552
  onLocalPress,
5553
- chromeInsets
5553
+ chromeInsets,
5554
+ safeArea
5554
5555
  }) {
5555
5556
  const label = labelFor ?? ((id) => `User ${id.slice(0, 6)}`);
5556
5557
  const VideoTrack = livekitReactNative?.VideoTrack;
@@ -5591,7 +5592,7 @@ function CallVideoGrid({
5591
5592
  VideoTrack,
5592
5593
  label,
5593
5594
  bounds: size,
5594
- insets: chromeInsets ?? { top: 0, bottom: 0 },
5595
+ insets: safeArea ?? { top: 0, bottom: 0 },
5595
5596
  onPress: onLocalPress
5596
5597
  }
5597
5598
  )
@@ -5939,7 +5940,8 @@ function CallScreen({
5939
5940
  livekitReactNative,
5940
5941
  labelFor: label,
5941
5942
  onLocalPress: () => void sfu.switchCamera(),
5942
- chromeInsets
5943
+ chromeInsets,
5944
+ safeArea: { top: insets.top, bottom: insets.bottom }
5943
5945
  }
5944
5946
  ) : /* @__PURE__ */ jsx(View, { style: styles30.identity, children: /* @__PURE__ */ jsx(
5945
5947
  CallAvatar,