pb-sxp-ui 1.19.10 → 1.19.11

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.css CHANGED
@@ -62,6 +62,10 @@ a:active {
62
62
  .swiper-button-next,.swiper-button-prev{
63
63
  color: #000;
64
64
  outline: none;
65
+ }
66
+
67
+ :root {
68
+ --safe-area-inset-bottom: env(safe-area-inset-bottom);
65
69
  }
66
70
  .pb-appoint-form {
67
71
  position: relative;
package/dist/index.js CHANGED
@@ -19070,7 +19070,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19070
19070
  const fbcRef = useRef('');
19071
19071
  const { loadVideos, bffEventReport, loading, setPopupDetailData, ctaEvent, swiperRef, waterFallData, setOpenHashtag, appDomain, openHashtag, loadingImage, isFromHashtag, popupDetailData, bffFbReport, curTime, h5EnterLink, isShowConsent, selectTag, isPreview, isEditor, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, isNoMoreData, channel, refreshFeSession, isDiyH5, pixelPvStatusRef } = useSxpDataSource();
19072
19072
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
19073
- const visibleHeight = useVisibleHeight();
19073
+ useVisibleHeight();
19074
19074
  const isShowFingerTip = useMemo(() => {
19075
19075
  return data.length > 0 && !loading && (getFeUserState() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
19076
19076
  }, [data, loading, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip]);
@@ -19240,6 +19240,13 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19240
19240
  return minusHeight;
19241
19241
  }, [globalConfig]);
19242
19242
  const getHeightWithSafeArea = () => {
19243
+ const root = document.documentElement;
19244
+ const value = getComputedStyle(root).getPropertyValue('--safe-area-inset-bottom');
19245
+ // 处理可能的值(可能是 '0px', '34px' 等)
19246
+ const numericValue = parseInt(value) || 0;
19247
+ return numericValue;
19248
+ };
19249
+ const getHeightWithSafeArea2 = () => {
19243
19250
  // 获取窗口高度
19244
19251
  // 动态检测安全区域
19245
19252
  const detector = document.createElement('div');
@@ -19255,8 +19262,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19255
19262
  return safeAreaBottom;
19256
19263
  };
19257
19264
  const height = useMemo(() => {
19258
- return visibleHeight - minusHeight - tagHeight;
19259
- }, [minusHeight, visibleHeight, tagHeight]);
19265
+ return containerHeight - minusHeight - tagHeight - getHeightWithSafeArea2();
19266
+ }, [minusHeight, containerHeight, tagHeight, getHeightWithSafeArea2]);
19260
19267
  const visList = useMemo(() => {
19261
19268
  var _a;
19262
19269
  const list = activeIndex === 0 && !waterFallData && !isEditor && !isDiyH5