@poolse/react-native 2.15.0 → 2.15.2
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 +11 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -4
- package/dist/index.d.ts +24 -4
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
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
|
|
1330
|
-
*
|
|
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
|
-
/**
|
|
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
|
|
1330
|
-
*
|
|
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
|
-
/**
|
|
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 =
|
|
5423
|
+
var MARGIN = 12;
|
|
5424
5424
|
function LocalVideoPip({
|
|
5425
5425
|
participant,
|
|
5426
5426
|
VideoTrack,
|
|
@@ -5517,6 +5517,7 @@ function LocalVideoPip({
|
|
|
5517
5517
|
label,
|
|
5518
5518
|
avatarSize: 48,
|
|
5519
5519
|
hideName: true,
|
|
5520
|
+
bleed: true,
|
|
5520
5521
|
style: styles28.fill
|
|
5521
5522
|
}
|
|
5522
5523
|
) })
|
|
@@ -5532,7 +5533,10 @@ var styles28 = StyleSheet.create({
|
|
|
5532
5533
|
left: 0,
|
|
5533
5534
|
width: PIP_WIDTH,
|
|
5534
5535
|
height: PIP_HEIGHT,
|
|
5535
|
-
|
|
5536
|
+
// Generous enough to read as a bubble rather than a cropped
|
|
5537
|
+
// rectangle. The video is clipped to it, so this is the only
|
|
5538
|
+
// rounding in play.
|
|
5539
|
+
borderRadius: 22,
|
|
5536
5540
|
overflow: "hidden",
|
|
5537
5541
|
// Lifted off the video so it reads as floating rather than inset.
|
|
5538
5542
|
shadowColor: "#000",
|
|
@@ -5550,7 +5554,8 @@ function CallVideoGrid({
|
|
|
5550
5554
|
livekitReactNative,
|
|
5551
5555
|
labelFor,
|
|
5552
5556
|
onLocalPress,
|
|
5553
|
-
chromeInsets
|
|
5557
|
+
chromeInsets,
|
|
5558
|
+
safeArea
|
|
5554
5559
|
}) {
|
|
5555
5560
|
const label = labelFor ?? ((id) => `User ${id.slice(0, 6)}`);
|
|
5556
5561
|
const VideoTrack = livekitReactNative?.VideoTrack;
|
|
@@ -5591,7 +5596,7 @@ function CallVideoGrid({
|
|
|
5591
5596
|
VideoTrack,
|
|
5592
5597
|
label,
|
|
5593
5598
|
bounds: size,
|
|
5594
|
-
insets:
|
|
5599
|
+
insets: safeArea ?? { top: 0, bottom: 0 },
|
|
5595
5600
|
onPress: onLocalPress
|
|
5596
5601
|
}
|
|
5597
5602
|
)
|
|
@@ -5939,7 +5944,8 @@ function CallScreen({
|
|
|
5939
5944
|
livekitReactNative,
|
|
5940
5945
|
labelFor: label,
|
|
5941
5946
|
onLocalPress: () => void sfu.switchCamera(),
|
|
5942
|
-
chromeInsets
|
|
5947
|
+
chromeInsets,
|
|
5948
|
+
safeArea: { top: insets.top, bottom: insets.bottom }
|
|
5943
5949
|
}
|
|
5944
5950
|
) : /* @__PURE__ */ jsx(View, { style: styles30.identity, children: /* @__PURE__ */ jsx(
|
|
5945
5951
|
CallAvatar,
|