pb-sxp-ui 1.19.7 → 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/pb-ui.js CHANGED
@@ -19130,7 +19130,7 @@ Made in Italy` })));
19130
19130
  if (repCond) {
19131
19131
  setTimeout(() => {
19132
19132
  SXP_EVENT_BUS.emit(SXP_EVENT_TYPE.PAGE_DID_SHOW, item);
19133
- });
19133
+ }, 100);
19134
19134
  backMainFeed('external', selectTag);
19135
19135
  }
19136
19136
  }
@@ -19189,8 +19189,23 @@ Made in Italy` })));
19189
19189
  }
19190
19190
  return minusHeight;
19191
19191
  }, [globalConfig]);
19192
+ const getHeightWithSafeArea = () => {
19193
+ // 获取窗口高度
19194
+ // 动态检测安全区域
19195
+ const detector = document.createElement('div');
19196
+ detector.style.position = 'fixed';
19197
+ detector.style.bottom = '0';
19198
+ detector.style.left = '0';
19199
+ detector.style.paddingBottom = 'env(safe-area-inset-bottom)';
19200
+ detector.style.visibility = 'hidden';
19201
+ document.body.appendChild(detector);
19202
+ const computedStyle = window.getComputedStyle(detector);
19203
+ const safeAreaBottom = parseFloat(computedStyle.paddingBottom) || 0;
19204
+ document.body.removeChild(detector);
19205
+ return safeAreaBottom;
19206
+ };
19192
19207
  const height = React.useMemo(() => {
19193
- return containerHeight - minusHeight - tagHeight;
19208
+ return containerHeight - minusHeight - tagHeight - getHeightWithSafeArea();
19194
19209
  }, [minusHeight, containerHeight, tagHeight]);
19195
19210
  const visList = React.useMemo(() => {
19196
19211
  var _a;
@@ -19332,6 +19347,9 @@ Made in Italy` })));
19332
19347
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconYPosit) === 'top') {
19333
19348
  top += minusHeight;
19334
19349
  }
19350
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconYPosit) !== 'top') {
19351
+ top += getHeightWithSafeArea();
19352
+ }
19335
19353
  if (rec === null || rec === void 0 ? void 0 : rec.video) {
19336
19354
  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: {
19337
19355
  position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.likeIconFixed) ? 'fixed' : 'absolute',
@@ -19566,6 +19584,9 @@ Made in Italy` })));
19566
19584
  if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) === 'top') {
19567
19585
  top += minusHeight;
19568
19586
  }
19587
+ if ((globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) && (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconYPosit) !== 'top') {
19588
+ top += getHeightWithSafeArea();
19589
+ }
19569
19590
  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: {
19570
19591
  position: (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed) ? 'fixed' : 'absolute',
19571
19592
  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',
@@ -19668,10 +19689,10 @@ Made in Italy` })));
19668
19689
  renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))),
19669
19690
  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)),
19670
19691
  React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
19671
- 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 } }))))),
19692
+ 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)' } }))))),
19672
19693
  (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting) && (React.createElement("div", { style: {
19673
19694
  position: 'fixed',
19674
- bottom: 0,
19695
+ bottom: 'env(safe-area-inset-bottom)',
19675
19696
  left: 0,
19676
19697
  right: 0,
19677
19698
  width: '100%',