shineout 3.3.6-beta.1 → 3.3.6-beta.2

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/cjs/index.js CHANGED
@@ -476,5 +476,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
476
476
  // 此文件由脚本自动生成,请勿直接修改。
477
477
  // This file was generated automatically by a script. Please do not modify it directly.
478
478
  var _default = exports.default = {
479
- version: '3.3.6-beta.1'
479
+ version: '3.3.6-beta.2'
480
480
  };
package/dist/shineout.js CHANGED
@@ -11968,7 +11968,7 @@ var handleStyle = function handleStyle(style) {
11968
11968
  };
11969
11969
  /* harmony default export */ var jss_style_handleStyle = (handleStyle);
11970
11970
  ;// CONCATENATED MODULE: ../shineout-style/src/version.ts
11971
- /* harmony default export */ var version = ('3.3.6-beta.1');
11971
+ /* harmony default export */ var version = ('3.3.6-beta.2');
11972
11972
  ;// CONCATENATED MODULE: ../shineout-style/src/jss-style/index.tsx
11973
11973
 
11974
11974
 
@@ -28476,6 +28476,9 @@ var usePositionStyle = function usePositionStyle(config) {
28476
28476
  var getAbsoluteStyle = function getAbsoluteStyle(position) {
28477
28477
  if (!parentElRef.current) return hideStyle;
28478
28478
  var rect = context.parentRect;
28479
+ console.log('======================');
28480
+ console.log('rect: >>', rect);
28481
+ console.log('======================');
28479
28482
  if (scrollElRef !== null && scrollElRef !== void 0 && scrollElRef.current) {
28480
28483
  var _scrollElRef$current;
28481
28484
  var visibleRect = ((_scrollElRef$current = scrollElRef.current) === null || _scrollElRef$current === void 0 ? void 0 : _scrollElRef$current.getBoundingClientRect()) || {};
@@ -28484,6 +28487,25 @@ var usePositionStyle = function usePositionStyle(config) {
28484
28487
  }
28485
28488
  }
28486
28489
  var style = getAbsolutePositionStyle(rect, position);
28490
+
28491
+ // TODO: 如果是版本大于chrome128,需要根据currentCSSZoom处理chrome的bug
28492
+ if (!isChromeLowerThan(128)) {
28493
+ // @ts-ignore currentCSSZoom
28494
+ var currentCSSZoom = document.body.currentCSSZoom;
28495
+ if (currentCSSZoom === 1 || !currentCSSZoom) return style;
28496
+ if (style.left && typeof style.left === 'number') {
28497
+ style.left = style.left * (1 / currentCSSZoom);
28498
+ }
28499
+ if (style.top && typeof style.top === 'number') {
28500
+ style.top = style.top * (1 / currentCSSZoom);
28501
+ }
28502
+ if (style.right && typeof style.right === 'number') {
28503
+ style.right = style.right * (1 / currentCSSZoom);
28504
+ }
28505
+ if (style.bottom && typeof style.bottom === 'number') {
28506
+ style.bottom = style.bottom * (1 / currentCSSZoom);
28507
+ }
28508
+ }
28487
28509
  return style;
28488
28510
  };
28489
28511
  var getStyle = function getStyle() {
@@ -63751,7 +63773,7 @@ var upload_interface = __webpack_require__(8821);
63751
63773
 
63752
63774
 
63753
63775
  /* harmony default export */ var src_0 = ({
63754
- version: '3.3.6-beta.1'
63776
+ version: '3.3.6-beta.2'
63755
63777
  });
63756
63778
  }();
63757
63779
  /******/ return __webpack_exports__;