pb-sxp-ui 1.19.8 → 1.19.9
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.cjs +24 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +6 -2
- package/dist/index.js +24 -3
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +4 -4
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +4 -4
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +24 -3
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +4 -4
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/index.js +22 -3
- package/lib/core/components/SxpPageRender/index.js +22 -3
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1068,7 +1068,10 @@ a:active {
|
|
|
1068
1068
|
flex: 1;
|
|
1069
1069
|
height: 100vh;
|
|
1070
1070
|
overflow-y: auto;
|
|
1071
|
-
padding: 18px;
|
|
1071
|
+
padding-top: 18px;
|
|
1072
|
+
padding-left: 18px;
|
|
1073
|
+
padding-right: 18px;
|
|
1074
|
+
padding-bottom: calc(18px + env(safe-area-inset-bottom));
|
|
1072
1075
|
}
|
|
1073
1076
|
.waterfallFlow__title {
|
|
1074
1077
|
text-align: center;
|
|
@@ -1547,6 +1550,7 @@ a:active {
|
|
|
1547
1550
|
top: 0;
|
|
1548
1551
|
left: 0;
|
|
1549
1552
|
right: 0;
|
|
1553
|
+
bottom: env(safe-area-inset-bottom);
|
|
1550
1554
|
width: 100%;
|
|
1551
1555
|
-webkit-box-sizing: border-box;
|
|
1552
1556
|
box-sizing: border-box;
|
|
@@ -2458,7 +2462,7 @@ button.swiper-pagination-bullet {
|
|
|
2458
2462
|
left: 0;
|
|
2459
2463
|
top: 0;
|
|
2460
2464
|
right: 0;
|
|
2461
|
-
bottom:
|
|
2465
|
+
bottom: env(safe-area-inset-bottom);
|
|
2462
2466
|
z-index: 100;
|
|
2463
2467
|
-webkit-box-orient: vertical;
|
|
2464
2468
|
-webkit-box-direction: normal;
|
package/dist/index.js
CHANGED
|
@@ -19174,8 +19174,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19174
19174
|
}
|
|
19175
19175
|
return minusHeight;
|
|
19176
19176
|
}, [globalConfig]);
|
|
19177
|
+
const getHeightWithSafeArea = () => {
|
|
19178
|
+
// 获取窗口高度
|
|
19179
|
+
// 动态检测安全区域
|
|
19180
|
+
const detector = document.createElement('div');
|
|
19181
|
+
detector.style.position = 'fixed';
|
|
19182
|
+
detector.style.bottom = '0';
|
|
19183
|
+
detector.style.left = '0';
|
|
19184
|
+
detector.style.paddingBottom = 'env(safe-area-inset-bottom)';
|
|
19185
|
+
detector.style.visibility = 'hidden';
|
|
19186
|
+
document.body.appendChild(detector);
|
|
19187
|
+
const computedStyle = window.getComputedStyle(detector);
|
|
19188
|
+
const safeAreaBottom = parseFloat(computedStyle.paddingBottom) || 0;
|
|
19189
|
+
document.body.removeChild(detector);
|
|
19190
|
+
return safeAreaBottom;
|
|
19191
|
+
};
|
|
19177
19192
|
const height = useMemo(() => {
|
|
19178
|
-
return containerHeight - minusHeight - tagHeight;
|
|
19193
|
+
return containerHeight - minusHeight - tagHeight - getHeightWithSafeArea();
|
|
19179
19194
|
}, [minusHeight, containerHeight, tagHeight]);
|
|
19180
19195
|
const visList = useMemo(() => {
|
|
19181
19196
|
var _a;
|
|
@@ -19317,6 +19332,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19317
19332
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconYPosit) === 'top') {
|
|
19318
19333
|
top += minusHeight;
|
|
19319
19334
|
}
|
|
19335
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconYPosit) !== 'top') {
|
|
19336
|
+
top += getHeightWithSafeArea();
|
|
19337
|
+
}
|
|
19320
19338
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
|
19321
19339
|
return (React.createElement(LikeButton$1, { key: rec.position, activeIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIcon, unActicveIcon: globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.unlikeIcon, active: rec.isCollected, recData: rec, className: 'clc-sxp-like-button', style: {
|
|
19322
19340
|
position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed) ? 'fixed' : 'absolute',
|
|
@@ -19551,6 +19569,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19551
19569
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) === 'top') {
|
|
19552
19570
|
top += minusHeight;
|
|
19553
19571
|
}
|
|
19572
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== 'top') {
|
|
19573
|
+
top += getHeightWithSafeArea();
|
|
19574
|
+
}
|
|
19554
19575
|
return (((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === undefined || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.isShowMute) === true) && (React.createElement(ToggleButton$1, { style: {
|
|
19555
19576
|
position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
|
|
19556
19577
|
visibility: ((_c = (_b = visList === null || visList === void 0 ? void 0 : visList[activeIndex]) === null || _b === void 0 ? void 0 : _b.video) === null || _c === void 0 ? void 0 : _c.url) ? 'visible' : 'hidden',
|
|
@@ -19653,10 +19674,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19653
19674
|
renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))),
|
|
19654
19675
|
React.createElement(WaterFall$1, Object.assign({}, (_u = (_t = (_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _s === void 0 ? void 0 : _s[0]) === null || _t === void 0 ? void 0 : _t.item) === null || _u === void 0 ? void 0 : _u.props)),
|
|
19655
19676
|
React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
|
|
19656
|
-
openMultiPosts && (React.createElement(MultiPosts$2, Object.assign({}, (_x = (_w = (_v = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.item) === null || _x === void 0 ? void 0 : _x.props, (_0 = (_z = (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.item) === null || _0 === void 0 ? void 0 : _0.event, { style: { position: 'fixed', top: 0, left: 0, right: 0 } }))))),
|
|
19677
|
+
openMultiPosts && (React.createElement(MultiPosts$2, Object.assign({}, (_x = (_w = (_v = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.item) === null || _x === void 0 ? void 0 : _x.props, (_0 = (_z = (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.item) === null || _0 === void 0 ? void 0 : _0.event, { style: { position: 'fixed', top: 0, left: 0, right: 0, bottom: 'env(safe-area-inset-bottom)' } }))))),
|
|
19657
19678
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting) && (React.createElement("div", { style: {
|
|
19658
19679
|
position: 'fixed',
|
|
19659
|
-
bottom:
|
|
19680
|
+
bottom: 'env(safe-area-inset-bottom)',
|
|
19660
19681
|
left: 0,
|
|
19661
19682
|
right: 0,
|
|
19662
19683
|
width: '100%',
|