pb-sxp-ui 1.19.15 → 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 +17 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +5 -5
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +5 -5
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +17 -4
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +5 -5
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/hooks/useVisibleHeight.js +15 -4
- package/lib/core/hooks/useVisibleHeight.js +15 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19030,6 +19030,11 @@ const useVisibleHeight = () => {
|
|
|
19030
19030
|
const dvhToPx = (dvh) => {
|
|
19031
19031
|
return Math.round((dvh / 100) * document.documentElement.clientHeight);
|
|
19032
19032
|
};
|
|
19033
|
+
// 检测是否启用了系统字体缩放
|
|
19034
|
+
const fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
19035
|
+
const isScaled = fontSize !== 52; // 默认 1rem = 16px
|
|
19036
|
+
// 检测是否处于 Display Zoom 模式(通过屏幕宽高比间接判断)
|
|
19037
|
+
const isZoomed = screen.width <= 375 && screen.height <= 667 && window.devicePixelRatio < 3;
|
|
19033
19038
|
const systemInfo = {
|
|
19034
19039
|
visualViewport: (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height,
|
|
19035
19040
|
innerHeight: window.innerHeight,
|
|
@@ -19037,12 +19042,15 @@ const useVisibleHeight = () => {
|
|
|
19037
19042
|
screenHeight: window.screen.height,
|
|
19038
19043
|
bodyHeight: (_b = document === null || document === void 0 ? void 0 : document.body) === null || _b === void 0 ? void 0 : _b.clientHeight,
|
|
19039
19044
|
agent: navigator.userAgent,
|
|
19040
|
-
version: '1.19.
|
|
19045
|
+
version: '1.19.17',
|
|
19041
19046
|
safeArea: getHeightWithSafeArea(),
|
|
19042
19047
|
dvh: dvhToPx(100),
|
|
19043
19048
|
dvhInPx: getDvhInPx(),
|
|
19044
19049
|
vhInPx: getVhInPx(),
|
|
19045
|
-
fillAvailableInPx: getFillAvailableInPx()
|
|
19050
|
+
fillAvailableInPx: getFillAvailableInPx(),
|
|
19051
|
+
isScaled,
|
|
19052
|
+
isZoomed,
|
|
19053
|
+
meta: `${window === null || window === void 0 ? void 0 : window.Instagram},${window === null || window === void 0 ? void 0 : window.Facebook}`
|
|
19046
19054
|
};
|
|
19047
19055
|
console.log(systemInfo, 'fundebug-init--------------------->systemInfo');
|
|
19048
19056
|
if ('fundebug' in window) {
|
|
@@ -19050,6 +19058,8 @@ const useVisibleHeight = () => {
|
|
|
19050
19058
|
}
|
|
19051
19059
|
const updateHeight = useCallback(() => {
|
|
19052
19060
|
var _a, _b, _c;
|
|
19061
|
+
const fontSize = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
19062
|
+
const isScaled = fontSize !== 52; // 默认 1rem = 16px
|
|
19053
19063
|
const systemInfo = {
|
|
19054
19064
|
visualViewport: (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height,
|
|
19055
19065
|
innerHeight: window.innerHeight,
|
|
@@ -19057,12 +19067,15 @@ const useVisibleHeight = () => {
|
|
|
19057
19067
|
screenHeight: window.screen.height,
|
|
19058
19068
|
bodyHeight: (_b = document === null || document === void 0 ? void 0 : document.body) === null || _b === void 0 ? void 0 : _b.clientHeight,
|
|
19059
19069
|
agent: navigator.userAgent,
|
|
19060
|
-
version: '1.19.
|
|
19070
|
+
version: '1.19.17',
|
|
19061
19071
|
safeArea: getHeightWithSafeArea(),
|
|
19062
19072
|
dvh: dvhToPx(100),
|
|
19063
19073
|
dvhInPx: getDvhInPx(),
|
|
19064
19074
|
vhInPx: getVhInPx(),
|
|
19065
|
-
fillAvailableInPx: getFillAvailableInPx()
|
|
19075
|
+
fillAvailableInPx: getFillAvailableInPx(),
|
|
19076
|
+
isScaled,
|
|
19077
|
+
isZoomed,
|
|
19078
|
+
meta: `${window === null || window === void 0 ? void 0 : window.Instagram},${window === null || window === void 0 ? void 0 : window.Facebook}`
|
|
19066
19079
|
};
|
|
19067
19080
|
console.log(systemInfo, 'fundebug-resize--------------------->systemInfo');
|
|
19068
19081
|
if ('fundebug' in window) {
|