pb-sxp-ui 1.19.12 → 1.19.14

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
@@ -65,6 +65,7 @@ a:active {
65
65
  }
66
66
 
67
67
  :root {
68
+ --safe-area-inset-bottom: constant(safe-area-inset-bottom);
68
69
  --safe-area-inset-bottom: env(safe-area-inset-bottom);
69
70
  }
70
71
  .pb-appoint-form {
@@ -1075,7 +1076,7 @@ a:active {
1075
1076
  padding-top: 18px;
1076
1077
  padding-left: 18px;
1077
1078
  padding-right: 18px;
1078
- padding-bottom: calc(18px + env(safe-area-inset-bottom));
1079
+ padding-bottom: calc(18px + var(--safe-area-inset-bottom, 0px));
1079
1080
  }
1080
1081
  .waterfallFlow__title {
1081
1082
  text-align: center;
@@ -1554,7 +1555,7 @@ a:active {
1554
1555
  top: 0;
1555
1556
  left: 0;
1556
1557
  right: 0;
1557
- bottom: env(safe-area-inset-bottom);
1558
+ bottom: var(--safe-area-inset-bottom, 0px);
1558
1559
  width: 100%;
1559
1560
  -webkit-box-sizing: border-box;
1560
1561
  box-sizing: border-box;
@@ -2466,7 +2467,7 @@ button.swiper-pagination-bullet {
2466
2467
  left: 0;
2467
2468
  top: 0;
2468
2469
  right: 0;
2469
- bottom: env(safe-area-inset-bottom);
2470
+ bottom: var(--safe-area-inset-bottom, 0px);
2470
2471
  z-index: 100;
2471
2472
  -webkit-box-orient: vertical;
2472
2473
  -webkit-box-direction: normal;
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ import EventEmitter from 'eventemitter3';
7
7
  import { css } from '@emotion/css';
8
8
  import * as ReactDOM from 'react-dom';
9
9
  import ReactDOM__default from 'react-dom';
10
+ import fundebug from 'fundebug-javascript';
10
11
 
11
12
  /******************************************************************************
12
13
  Copyright (c) Microsoft Corporation.
@@ -18978,13 +18979,97 @@ const NavBack = ({ data, minusHeight, tagHeight, onClick }) => {
18978
18979
  };
18979
18980
  var NavBack$1 = memo(NavBack);
18980
18981
 
18982
+ if (fundebug)
18983
+ fundebug.apikey = '522a79b0a6242a8ad683cc045ec9e65bbac3a0f620561ac49d39eaad4f303618';
18981
18984
  const useVisibleHeight = () => {
18985
+ var _a, _b;
18982
18986
  const [visibleHeight, setVisibleHeight] = useState(0);
18987
+ const getDvhInPx = () => {
18988
+ const detector = document.createElement('div');
18989
+ detector.style.position = 'fixed';
18990
+ detector.style.bottom = `${getHeightWithSafeArea()}px`;
18991
+ detector.style.left = '0';
18992
+ detector.style.height = '100dvh';
18993
+ detector.style.visibility = 'hidden';
18994
+ detector.style.zIndex = '-1';
18995
+ document.body.appendChild(detector);
18996
+ const dvhInPx = detector.clientHeight;
18997
+ document.body.removeChild(detector);
18998
+ return dvhInPx;
18999
+ };
19000
+ const getVhInPx = () => {
19001
+ const detector = document.createElement('div');
19002
+ detector.style.position = 'fixed';
19003
+ detector.style.bottom = `${getHeightWithSafeArea()}px`;
19004
+ detector.style.left = '0';
19005
+ detector.style.height = '100vh';
19006
+ detector.style.visibility = 'hidden';
19007
+ detector.style.zIndex = '-1';
19008
+ document.body.appendChild(detector);
19009
+ const dvhInPx = detector.clientHeight;
19010
+ document.body.removeChild(detector);
19011
+ return dvhInPx;
19012
+ };
19013
+ const getFillAvailableInPx = () => {
19014
+ const detector = document.createElement('div');
19015
+ detector.style.position = 'fixed';
19016
+ detector.style.bottom = `${getHeightWithSafeArea()}px`;
19017
+ detector.style.left = '0';
19018
+ detector.style.height = '-webkit-fill-available';
19019
+ detector.style.visibility = 'hidden';
19020
+ detector.style.zIndex = '-1';
19021
+ document.body.appendChild(detector);
19022
+ const dvhInPx = detector.clientHeight;
19023
+ document.body.removeChild(detector);
19024
+ return dvhInPx;
19025
+ };
19026
+ const getHeightWithSafeArea = () => {
19027
+ const root = document.documentElement;
19028
+ const value = getComputedStyle(root).getPropertyValue('--safe-area-inset-bottom');
19029
+ // 处理可能的值(可能是 '0px', '34px' 等)
19030
+ const numericValue = parseInt(value) || 0;
19031
+ return numericValue;
19032
+ };
19033
+ const dvhToPx = (dvh) => {
19034
+ return Math.round((dvh / 100) * document.documentElement.clientHeight);
19035
+ };
19036
+ const systemInfo = {
19037
+ visualViewport: (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height,
19038
+ innerHeight: window.innerHeight,
19039
+ clientHeight: document.documentElement.clientHeight,
19040
+ screenHeight: window.screen.height,
19041
+ bodyHeight: (_b = document === null || document === void 0 ? void 0 : document.body) === null || _b === void 0 ? void 0 : _b.clientHeight,
19042
+ agent: navigator.userAgent,
19043
+ version: '1.19.14',
19044
+ safeArea: getHeightWithSafeArea(),
19045
+ dvh: dvhToPx(100),
19046
+ dvhInPx: getDvhInPx(),
19047
+ vhInPx: getVhInPx(),
19048
+ fillAvailableInPx: getFillAvailableInPx()
19049
+ };
19050
+ console.log(systemInfo, 'fundebug-init--------------------->systemInfo');
19051
+ fundebug.notify('Collect_Info', 'init', { metaData: { systemInfo, otherInfo: {} } });
18983
19052
  const updateHeight = useCallback(() => {
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);
19053
+ var _a, _b, _c;
19054
+ const systemInfo = {
19055
+ visualViewport: (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height,
19056
+ innerHeight: window.innerHeight,
19057
+ clientHeight: document.documentElement.clientHeight,
19058
+ screenHeight: window.screen.height,
19059
+ bodyHeight: (_b = document === null || document === void 0 ? void 0 : document.body) === null || _b === void 0 ? void 0 : _b.clientHeight,
19060
+ agent: navigator.userAgent,
19061
+ version: '1.19.14',
19062
+ safeArea: getHeightWithSafeArea(),
19063
+ dvh: dvhToPx(100),
19064
+ dvhInPx: getDvhInPx(),
19065
+ vhInPx: getVhInPx(),
19066
+ fillAvailableInPx: getFillAvailableInPx()
19067
+ };
19068
+ console.log(systemInfo, 'fundebug-resize--------------------->systemInfo');
19069
+ fundebug.notify('Collect_Info', 'resize', { metaData: { systemInfo, otherInfo: {} } });
19070
+ const height = ((_c = document === null || document === void 0 ? void 0 : document.documentElement) === null || _c === void 0 ? void 0 : _c.clientHeight) || (window === null || window === void 0 ? void 0 : window.innerHeight);
18986
19071
  setVisibleHeight(height);
18987
- }, []);
19072
+ }, [getHeightWithSafeArea, dvhToPx, getDvhInPx, getVhInPx, getFillAvailableInPx]);
18988
19073
  useEffect(() => {
18989
19074
  // 初始计算
18990
19075
  updateHeight();
@@ -19225,24 +19310,9 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19225
19310
  const numericValue = parseInt(value) || 0;
19226
19311
  return numericValue;
19227
19312
  };
19228
- const getHeightWithSafeArea2 = () => {
19229
- // 获取窗口高度
19230
- // 动态检测安全区域
19231
- const detector = document.createElement('div');
19232
- detector.style.position = 'fixed';
19233
- detector.style.bottom = '0';
19234
- detector.style.left = '0';
19235
- detector.style.paddingBottom = 'env(safe-area-inset-bottom)';
19236
- detector.style.visibility = 'hidden';
19237
- document.body.appendChild(detector);
19238
- const computedStyle = window.getComputedStyle(detector);
19239
- const safeAreaBottom = parseFloat(computedStyle.paddingBottom) || 0;
19240
- document.body.removeChild(detector);
19241
- return safeAreaBottom;
19242
- };
19243
19313
  const height = useMemo(() => {
19244
- return visibleHeight - minusHeight - tagHeight - getHeightWithSafeArea2();
19245
- }, [minusHeight, visibleHeight, tagHeight, getHeightWithSafeArea2]);
19314
+ return visibleHeight - minusHeight - tagHeight - getHeightWithSafeArea();
19315
+ }, [minusHeight, visibleHeight, tagHeight, getHeightWithSafeArea, containerHeight]);
19246
19316
  const visList = useMemo(() => {
19247
19317
  var _a;
19248
19318
  const list = activeIndex === 0 && !waterFallData && !isEditor && !isDiyH5
@@ -19725,10 +19795,10 @@ const SxpPageRender = ({ globalConfig, descStyle, containerHeight = window.inner
19725
19795
  renderToggleButton(!!(globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.muteIconFixed))),
19726
19796
  React.createElement(WaterFall$1, Object.assign({}, (_u = (_t = (_s = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.hashTag) === null || _s === void 0 ? void 0 : _s[0]) === null || _t === void 0 ? void 0 : _t.item) === null || _u === void 0 ? void 0 : _u.props)),
19727
19797
  React.createElement(ConsentPopup, { resolver: resolver, globalConfig: globalConfig }),
19728
- openMultiPosts && (React.createElement(MultiPosts$2, Object.assign({}, (_x = (_w = (_v = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.item) === null || _x === void 0 ? void 0 : _x.props, (_0 = (_z = (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.item) === null || _0 === void 0 ? void 0 : _0.event, { style: { position: 'fixed', top: 0, left: 0, right: 0, bottom: 'env(safe-area-inset-bottom)' } }))))),
19798
+ openMultiPosts && (React.createElement(MultiPosts$2, Object.assign({}, (_x = (_w = (_v = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _v === void 0 ? void 0 : _v[0]) === null || _w === void 0 ? void 0 : _w.item) === null || _x === void 0 ? void 0 : _x.props, (_0 = (_z = (_y = globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.multiPosts) === null || _y === void 0 ? void 0 : _y[0]) === null || _z === void 0 ? void 0 : _z.item) === null || _0 === void 0 ? void 0 : _0.event, { style: { position: 'fixed', top: 0, left: 0, right: 0, bottom: 'var(--safe-area-inset-bottom,0px)' } }))))),
19729
19799
  (globalConfig === null || globalConfig === void 0 ? void 0 : globalConfig.enableCookieSetting) && (React.createElement("div", { style: {
19730
19800
  position: 'fixed',
19731
- bottom: 'env(safe-area-inset-bottom)',
19801
+ bottom: 'var(--safe-area-inset-bottom,0px)',
19732
19802
  left: 0,
19733
19803
  right: 0,
19734
19804
  width: '100%',