pb-sxp-ui 1.19.11 → 1.19.13

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.js CHANGED
@@ -18980,30 +18980,9 @@ var NavBack$1 = memo(NavBack);
18980
18980
 
18981
18981
  const useVisibleHeight = () => {
18982
18982
  const [visibleHeight, setVisibleHeight] = useState(0);
18983
- const getVisibleContentHeight = () => {
18984
- // 方法优先级:
18985
- // 1. visualViewport.height (最准确)
18986
- // 2. window.innerHeight (次之)
18987
- // 3. document.documentElement.clientHeight (fallback)
18988
- if (typeof window === 'undefined')
18989
- return 0;
18990
- let height = window.innerHeight;
18991
- // 优先使用 visualViewport
18992
- if (window.visualViewport) {
18993
- height = window.visualViewport.height;
18994
- }
18995
- // 验证高度合理性
18996
- if (height <= 0 || height > window.screen.height) {
18997
- height = window.innerHeight;
18998
- }
18999
- // 最终 fallback
19000
- if (height <= 0) {
19001
- height = document.documentElement.clientHeight;
19002
- }
19003
- return height;
19004
- };
19005
18983
  const updateHeight = useCallback(() => {
19006
- const height = getVisibleContentHeight();
18984
+ var _a;
18985
+ const height = ((_a = document === null || document === void 0 ? void 0 : document.documentElement) === null || _a === void 0 ? void 0 : _a.clientHeight) || (window === null || window === void 0 ? void 0 : window.innerHeight);
19007
18986
  setVisibleHeight(height);
19008
18987
  }, []);
19009
18988
  useEffect(() => {
@@ -19070,7 +19049,7 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19070
19049
  const fbcRef = useRef('');
19071
19050
  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
19051
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
19073
- useVisibleHeight();
19052
+ const visibleHeight = useVisibleHeight();
19074
19053
  const isShowFingerTip = useMemo(() => {
19075
19054
  return data.length > 0 && !loading && (getFeUserState() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
19076
19055
  }, [data, loading, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip]);
@@ -19262,8 +19241,8 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19262
19241
  return safeAreaBottom;
19263
19242
  };
19264
19243
  const height = useMemo(() => {
19265
- return containerHeight - minusHeight - tagHeight - getHeightWithSafeArea2();
19266
- }, [minusHeight, containerHeight, tagHeight, getHeightWithSafeArea2]);
19244
+ return visibleHeight - minusHeight - tagHeight - getHeightWithSafeArea2();
19245
+ }, [minusHeight, visibleHeight, tagHeight, getHeightWithSafeArea2, containerHeight]);
19267
19246
  const visList = useMemo(() => {
19268
19247
  var _a;
19269
19248
  const list = activeIndex === 0 && !waterFallData && !isEditor && !isDiyH5