pb-sxp-ui 1.19.16 → 1.19.17

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 CHANGED
@@ -19052,6 +19052,11 @@ const useVisibleHeight = () => {
19052
19052
  const dvhToPx = (dvh) => {
19053
19053
  return Math.round((dvh / 100) * document.documentElement.clientHeight);
19054
19054
  };
19055
+ // 检测是否启用了系统字体缩放
19056
+ const fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
19057
+ const isScaled = fontSize !== 52; // 默认 1rem = 16px
19058
+ // 检测是否处于 Display Zoom 模式(通过屏幕宽高比间接判断)
19059
+ const isZoomed = screen.width <= 375 && screen.height <= 667 && window.devicePixelRatio < 3;
19055
19060
  const systemInfo = {
19056
19061
  visualViewport: (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height,
19057
19062
  innerHeight: window.innerHeight,
@@ -19059,12 +19064,15 @@ const useVisibleHeight = () => {
19059
19064
  screenHeight: window.screen.height,
19060
19065
  bodyHeight: (_b = document === null || document === void 0 ? void 0 : document.body) === null || _b === void 0 ? void 0 : _b.clientHeight,
19061
19066
  agent: navigator.userAgent,
19062
- version: '1.19.16',
19067
+ version: '1.19.17',
19063
19068
  safeArea: getHeightWithSafeArea(),
19064
19069
  dvh: dvhToPx(100),
19065
19070
  dvhInPx: getDvhInPx(),
19066
19071
  vhInPx: getVhInPx(),
19067
- fillAvailableInPx: getFillAvailableInPx()
19072
+ fillAvailableInPx: getFillAvailableInPx(),
19073
+ isScaled,
19074
+ isZoomed,
19075
+ meta: `${window === null || window === void 0 ? void 0 : window.Instagram},${window === null || window === void 0 ? void 0 : window.Facebook}`
19068
19076
  };
19069
19077
  console.log(systemInfo, 'fundebug-init--------------------->systemInfo');
19070
19078
  if ('fundebug' in window) {
@@ -19072,6 +19080,8 @@ const useVisibleHeight = () => {
19072
19080
  }
19073
19081
  const updateHeight = React.useCallback(() => {
19074
19082
  var _a, _b, _c;
19083
+ const fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
19084
+ const isScaled = fontSize !== 52; // 默认 1rem = 16px
19075
19085
  const systemInfo = {
19076
19086
  visualViewport: (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height,
19077
19087
  innerHeight: window.innerHeight,
@@ -19079,12 +19089,15 @@ const useVisibleHeight = () => {
19079
19089
  screenHeight: window.screen.height,
19080
19090
  bodyHeight: (_b = document === null || document === void 0 ? void 0 : document.body) === null || _b === void 0 ? void 0 : _b.clientHeight,
19081
19091
  agent: navigator.userAgent,
19082
- version: '1.19.15',
19092
+ version: '1.19.17',
19083
19093
  safeArea: getHeightWithSafeArea(),
19084
19094
  dvh: dvhToPx(100),
19085
19095
  dvhInPx: getDvhInPx(),
19086
19096
  vhInPx: getVhInPx(),
19087
- fillAvailableInPx: getFillAvailableInPx()
19097
+ fillAvailableInPx: getFillAvailableInPx(),
19098
+ isScaled,
19099
+ isZoomed,
19100
+ meta: `${window === null || window === void 0 ? void 0 : window.Instagram},${window === null || window === void 0 ? void 0 : window.Facebook}`
19088
19101
  };
19089
19102
  console.log(systemInfo, 'fundebug-resize--------------------->systemInfo');
19090
19103
  if ('fundebug' in window) {