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.cjs
CHANGED
|
@@ -19196,8 +19196,23 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19196
19196
|
}
|
|
19197
19197
|
return minusHeight;
|
|
19198
19198
|
}, [globalConfig]);
|
|
19199
|
+
const getHeightWithSafeArea = () => {
|
|
19200
|
+
// 获取窗口高度
|
|
19201
|
+
// 动态检测安全区域
|
|
19202
|
+
const detector = document.createElement('div');
|
|
19203
|
+
detector.style.position = 'fixed';
|
|
19204
|
+
detector.style.bottom = '0';
|
|
19205
|
+
detector.style.left = '0';
|
|
19206
|
+
detector.style.paddingBottom = 'env(safe-area-inset-bottom)';
|
|
19207
|
+
detector.style.visibility = 'hidden';
|
|
19208
|
+
document.body.appendChild(detector);
|
|
19209
|
+
const computedStyle = window.getComputedStyle(detector);
|
|
19210
|
+
const safeAreaBottom = parseFloat(computedStyle.paddingBottom) || 0;
|
|
19211
|
+
document.body.removeChild(detector);
|
|
19212
|
+
return safeAreaBottom;
|
|
19213
|
+
};
|
|
19199
19214
|
const height = React.useMemo(() => {
|
|
19200
|
-
return containerHeight - minusHeight - tagHeight;
|
|
19215
|
+
return containerHeight - minusHeight - tagHeight - getHeightWithSafeArea();
|
|
19201
19216
|
}, [minusHeight, containerHeight, tagHeight]);
|
|
19202
19217
|
const visList = React.useMemo(() => {
|
|
19203
19218
|
var _a;
|
|
@@ -19339,6 +19354,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19339
19354
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconYPosit) === 'top') {
|
|
19340
19355
|
top += minusHeight;
|
|
19341
19356
|
}
|
|
19357
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconYPosit) !== 'top') {
|
|
19358
|
+
top += getHeightWithSafeArea();
|
|
19359
|
+
}
|
|
19342
19360
|
if (rec === null || rec === void 0 ? void 0 : rec.video) {
|
|
19343
19361
|
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: {
|
|
19344
19362
|
position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed) ? 'fixed' : 'absolute',
|
|
@@ -19573,6 +19591,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19573
19591
|
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) === 'top') {
|
|
19574
19592
|
top += minusHeight;
|
|
19575
19593
|
}
|
|
19594
|
+
if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== 'top') {
|
|
19595
|
+
top += getHeightWithSafeArea();
|
|
19596
|
+
}
|
|
19576
19597
|
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: {
|
|
19577
19598
|
position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
|
|
19578
19599
|
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',
|
|
@@ -19675,10 +19696,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
|
|
|
19675
19696
|
renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))),
|
|
19676
19697
|
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)),
|
|
19677
19698
|
React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
|
|
19678
|
-
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 } }))))),
|
|
19699
|
+
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)' } }))))),
|
|
19679
19700
|
(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting) && (React.createElement("div", { style: {
|
|
19680
19701
|
position: 'fixed',
|
|
19681
|
-
bottom:
|
|
19702
|
+
bottom: 'env(safe-area-inset-bottom)',
|
|
19682
19703
|
left: 0,
|
|
19683
19704
|
right: 0,
|
|
19684
19705
|
width: '100%',
|