pb-sxp-ui 1.19.11 → 1.19.12

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
@@ -18995,30 +18995,9 @@ Made in Italy` })));
18995
18995
 
18996
18996
  const useVisibleHeight = () => {
18997
18997
  const [visibleHeight, setVisibleHeight] = React.useState(0);
18998
- const getVisibleContentHeight = () => {
18999
- // 方法优先级:
19000
- // 1. visualViewport.height (最准确)
19001
- // 2. window.innerHeight (次之)
19002
- // 3. document.documentElement.clientHeight (fallback)
19003
- if (typeof window === 'undefined')
19004
- return 0;
19005
- let height = window.innerHeight;
19006
- // 优先使用 visualViewport
19007
- if (window.visualViewport) {
19008
- height = window.visualViewport.height;
19009
- }
19010
- // 验证高度合理性
19011
- if (height <= 0 || height > window.screen.height) {
19012
- height = window.innerHeight;
19013
- }
19014
- // 最终 fallback
19015
- if (height <= 0) {
19016
- height = document.documentElement.clientHeight;
19017
- }
19018
- return height;
19019
- };
19020
18998
  const updateHeight = React.useCallback(() => {
19021
- const height = getVisibleContentHeight();
18999
+ var _a;
19000
+ 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);
19022
19001
  setVisibleHeight(height);
19023
19002
  }, []);
19024
19003
  React.useEffect(() => {
@@ -19085,7 +19064,7 @@ Made in Italy` })));
19085
19064
  const fbcRef = React.useRef('');
19086
19065
  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();
19087
19066
  const { backMainFeed, productView, jumpToWeb } = useEventReport();
19088
- useVisibleHeight();
19067
+ const visibleHeight = useVisibleHeight();
19089
19068
  const isShowFingerTip = React.useMemo(() => {
19090
19069
  return data.length > 0 && !loading && (getFeUserState() || (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip));
19091
19070
  }, [data, loading, globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableSwiperTip]);
@@ -19277,8 +19256,8 @@ Made in Italy` })));
19277
19256
  return safeAreaBottom;
19278
19257
  };
19279
19258
  const height = React.useMemo(() => {
19280
- return containerHeight - minusHeight - tagHeight - getHeightWithSafeArea2();
19281
- }, [minusHeight, containerHeight, tagHeight, getHeightWithSafeArea2]);
19259
+ return visibleHeight - minusHeight - tagHeight - getHeightWithSafeArea2();
19260
+ }, [minusHeight, visibleHeight, tagHeight, getHeightWithSafeArea2]);
19282
19261
  const visList = React.useMemo(() => {
19283
19262
  var _a;
19284
19263
  const list = activeIndex === 0 && !waterFallData && !isEditor && !isDiyH5