@nutui/nutui-react-taro 3.0.19-cpp-beta.4 → 3.0.19-cpp.1

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.
Files changed (106) hide show
  1. package/dist/cjs/hooks/taro/use-custom-event.js +5 -5
  2. package/dist/cjs/hooks/use-ref-state.js +3 -3
  3. package/dist/cjs/hooks/use-touch.js +1 -2
  4. package/dist/cjs/packages/address/utils.js +3 -3
  5. package/dist/cjs/packages/avatarcropper/avatarcropper.js +16 -28
  6. package/dist/cjs/packages/badge/badge.js +4 -7
  7. package/dist/cjs/packages/barrage/barrage.js +14 -24
  8. package/dist/cjs/packages/calendar/utils.js +8 -8
  9. package/dist/cjs/packages/calendarcard/icon.js +5 -5
  10. package/dist/cjs/packages/calendarcard/utils.js +6 -6
  11. package/dist/cjs/packages/cascader/cascader.js +12 -21
  12. package/dist/cjs/packages/cascader/utils.js +3 -3
  13. package/dist/cjs/packages/collapseitem/collapseitem.js +4 -7
  14. package/dist/cjs/packages/configprovider/configprovider.js +7 -7
  15. package/dist/cjs/packages/configprovider/index.js +6 -6
  16. package/dist/cjs/packages/countdown/countdown.js +1 -2
  17. package/dist/cjs/packages/datepicker/utils.js +9 -9
  18. package/dist/cjs/packages/dialog/content.js +3 -3
  19. package/dist/cjs/packages/dialog/dialog.js +8 -11
  20. package/dist/cjs/packages/drag/drag.js +4 -7
  21. package/dist/cjs/packages/elevator/elevator.js +7 -10
  22. package/dist/cjs/packages/ellipsis/ellipsis.js +17 -30
  23. package/dist/cjs/packages/form/index.js +0 -2
  24. package/dist/cjs/packages/form/useform.js +50 -57
  25. package/dist/cjs/packages/infiniteloading/infiniteloading.js +8 -14
  26. package/dist/cjs/packages/inputnumber/inputnumber.js +16 -28
  27. package/dist/cjs/packages/lottie/types.js +0 -2
  28. package/dist/cjs/packages/menuitem/menuitem.js +24 -22
  29. package/dist/cjs/packages/noticebar/noticebar.js +71 -67
  30. package/dist/cjs/packages/notify/notify.js +4 -4
  31. package/dist/cjs/packages/nutui.react.build.js +105 -105
  32. package/dist/cjs/packages/nutui.react.js +105 -105
  33. package/dist/cjs/packages/overlay/overlay.js +3 -3
  34. package/dist/cjs/packages/pickerview/pickerroller.js +4 -7
  35. package/dist/cjs/packages/pickerview/pickerview.js +1 -2
  36. package/dist/cjs/packages/pickerview/utils.js +3 -3
  37. package/dist/cjs/packages/popover/popover.js +75 -77
  38. package/dist/cjs/packages/popup/popup.js +8 -14
  39. package/dist/cjs/packages/pulltorefresh/pulltorefresh.js +52 -56
  40. package/dist/cjs/packages/radio/index.js +0 -2
  41. package/dist/cjs/packages/range/range.js +16 -28
  42. package/dist/cjs/packages/shortpassword/shortpassword.js +3 -3
  43. package/dist/cjs/packages/sticky/sticky.js +4 -7
  44. package/dist/cjs/packages/swipe/swipe.js +13 -21
  45. package/dist/cjs/packages/swiper/index.js +0 -1
  46. package/dist/cjs/packages/switch/switch.js +4 -7
  47. package/dist/cjs/packages/toast/toast.js +4 -4
  48. package/dist/cjs/packages/uploader/uploader.js +38 -51
  49. package/dist/cjs/packages/virtuallist/utils.js +6 -6
  50. package/dist/cjs/packages/watermark/watermark.js +4 -8
  51. package/dist/cjs/types/spec/address/base.js +0 -2
  52. package/dist/cjs/utils/date.js +5 -5
  53. package/dist/cjs/utils/event-mocker.js +10 -18
  54. package/dist/cjs/utils/get-rect.js +4 -4
  55. package/dist/cjs/utils/get-scroll-parent.js +3 -3
  56. package/dist/cjs/utils/merge-props.js +3 -3
  57. package/dist/cjs/utils/merge.js +6 -6
  58. package/dist/cjs/utils/raf.js +3 -3
  59. package/dist/cjs/utils/render.js +5 -9
  60. package/dist/cjs/utils/rubberband.js +3 -3
  61. package/dist/cjs/utils/taro/get-rect.js +14 -24
  62. package/dist/cjs/utils/taro/get-system-info.js +4 -4
  63. package/dist/cjs/utils/taro/platform.js +5 -5
  64. package/dist/es/hooks/use-touch.js +1 -1
  65. package/dist/es/packages/avatarcropper/avatarcropper.js +16 -28
  66. package/dist/es/packages/badge/badge.js +4 -7
  67. package/dist/es/packages/barrage/barrage.js +14 -24
  68. package/dist/es/packages/cascader/cascader.js +12 -21
  69. package/dist/es/packages/collapseitem/collapseitem.js +4 -7
  70. package/dist/es/packages/countdown/countdown.js +1 -2
  71. package/dist/es/packages/dialog/dialog.js +4 -7
  72. package/dist/es/packages/drag/drag.js +4 -7
  73. package/dist/es/packages/elevator/elevator.js +4 -7
  74. package/dist/es/packages/ellipsis/ellipsis.js +17 -30
  75. package/dist/es/packages/form/index.js +0 -1
  76. package/dist/es/packages/form/useform.js +46 -53
  77. package/dist/es/packages/infiniteloading/infiniteloading.js +8 -14
  78. package/dist/es/packages/inputnumber/inputnumber.js +16 -28
  79. package/dist/es/packages/lottie/types.js +1 -1
  80. package/dist/es/packages/menuitem/menuitem.js +24 -22
  81. package/dist/es/packages/noticebar/noticebar.js +71 -67
  82. package/dist/es/packages/pickerview/pickerroller.js +4 -7
  83. package/dist/es/packages/pickerview/pickerview.js +1 -2
  84. package/dist/es/packages/popover/popover.js +75 -77
  85. package/dist/es/packages/popup/popup.js +8 -14
  86. package/dist/es/packages/pulltorefresh/pulltorefresh.js +52 -56
  87. package/dist/es/packages/radio/index.js +0 -1
  88. package/dist/es/packages/range/range.js +16 -28
  89. package/dist/es/packages/sticky/sticky.js +4 -7
  90. package/dist/es/packages/swipe/swipe.js +14 -22
  91. package/dist/es/packages/swiper/index.js +0 -1
  92. package/dist/es/packages/switch/switch.js +4 -7
  93. package/dist/es/packages/uploader/uploader.js +38 -51
  94. package/dist/es/packages/watermark/watermark.js +4 -8
  95. package/dist/es/types/spec/address/base.js +1 -1
  96. package/dist/es/utils/event-mocker.js +4 -12
  97. package/dist/es/utils/render.js +2 -6
  98. package/dist/es/utils/taro/get-rect.js +10 -20
  99. package/dist/nutui.react.umd.js +601 -815
  100. package/dist/style-jmapp.css +1 -1
  101. package/dist/style-jmapp.scss +34 -34
  102. package/dist/style-jrkf.css +1 -1
  103. package/dist/style-jrkf.scss +32 -32
  104. package/dist/style.css +1 -1
  105. package/dist/style.scss +42 -42
  106. package/package.json +1 -1
@@ -8,7 +8,7 @@ import classNames from "classnames";
8
8
  import { View } from "@tarojs/components";
9
9
  import { nextTick, useReady } from "@tarojs/taro";
10
10
  import { useTouch } from "../../hooks/use-touch";
11
- import { getRectInMultiPlatformWithoutCache } from "../../utils/taro/get-rect";
11
+ import { getRectInMultiPlatform } from "../../utils/taro/get-rect";
12
12
  import { ComponentDefaults } from "../../utils/typings";
13
13
  import { useRefState } from "../../hooks/use-ref-state";
14
14
  import { useUuid } from "../../hooks/use-uuid";
@@ -29,8 +29,8 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
29
29
  var uid = useUuid();
30
30
  var leftId = "swipe-left-".concat(uid);
31
31
  var rightId = "swipe-right-".concat(uid);
32
- var getWidth = /*#__PURE__*/ function() {
33
- var _ref = _async_to_generator(function() {
32
+ var getWidth = function() {
33
+ return _async_to_generator(function() {
34
34
  var leftRect, rightRect;
35
35
  return _ts_generator(this, function(_state) {
36
36
  switch(_state.label){
@@ -41,7 +41,7 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
41
41
  ];
42
42
  return [
43
43
  4,
44
- getRectInMultiPlatformWithoutCache(leftWrapper.current, leftId)
44
+ getRectInMultiPlatform(leftWrapper.current, leftId)
45
45
  ];
46
46
  case 1:
47
47
  leftRect = _state.sent();
@@ -58,7 +58,7 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
58
58
  ];
59
59
  return [
60
60
  4,
61
- getRectInMultiPlatformWithoutCache(rightWrapper.current, rightId)
61
+ getRectInMultiPlatform(rightWrapper.current, rightId)
62
62
  ];
63
63
  case 3:
64
64
  rightRect = _state.sent();
@@ -74,11 +74,8 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
74
74
  ];
75
75
  }
76
76
  });
77
- });
78
- return function getWidth() {
79
- return _ref.apply(this, arguments);
80
- };
81
- }();
77
+ })();
78
+ };
82
79
  // 获取元素的时候要在页面 onReady 后,需要参考小程序的事件周期
83
80
  useReady(function() {
84
81
  nextTick(function() {
@@ -114,13 +111,14 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
114
111
  var wrapperStyle = useMemo(function() {
115
112
  return {
116
113
  transform: "translate(".concat(state.offset, "px, 0)"),
117
- transitionDuration: '.6s'
114
+ transitionDuration: state.dragging ? '0.01s' : '.6s'
118
115
  };
119
116
  }, [
120
- state.offset
117
+ state.offset,
118
+ state.dragging
121
119
  ]);
122
- var onTouchStart = /*#__PURE__*/ function() {
123
- var _ref = _async_to_generator(function(event) {
120
+ var onTouchStart = function(event) {
121
+ return _async_to_generator(function() {
124
122
  var _props_onTouchStart;
125
123
  return _ts_generator(this, function(_state) {
126
124
  if (!props.disabled) {
@@ -134,11 +132,8 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
134
132
  2
135
133
  ];
136
134
  });
137
- });
138
- return function onTouchStart(event) {
139
- return _ref.apply(this, arguments);
140
- };
141
- }();
135
+ })();
136
+ };
142
137
  var onTouchMove = function(event) {
143
138
  var _props_onTouchMove;
144
139
  if (props.disabled) return;
@@ -194,7 +189,6 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
194
189
  name: name,
195
190
  position: side
196
191
  });
197
- // dd
198
192
  setState(function(prevState) {
199
193
  return _object_spread_props(_object_spread({}, prevState), {
200
194
  offset: Number(offset) || 0
@@ -210,7 +204,6 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
210
204
  position: position || 'left'
211
205
  });
212
206
  }
213
- // setState((v) => ({ ...v, offset: 0 }))
214
207
  setState(function(prevState) {
215
208
  return _object_spread_props(_object_spread({}, prevState), {
216
209
  offset: 0
@@ -257,7 +250,6 @@ export var Swipe = /*#__PURE__*/ forwardRef(function(props, instanceRef) {
257
250
  useEffect(function() {
258
251
  // 并没有生效
259
252
  var handler = function(event) {
260
- console.log('~~hanyu handler---- window', event);
261
253
  var targets = [
262
254
  root
263
255
  ];
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { Swiper } from "./swiper";
3
2
  import SwiperItem from "../swiperitem/index";
4
3
  var InnerSwiper = Swiper;
@@ -62,8 +62,8 @@ export var Switch = function(props) {
62
62
  (_obj = {}, _define_property(_obj, "".concat(classPrefix, "-close"), !value), _define_property(_obj, "".concat(classPrefix, "-disabled"), disabled), _define_property(_obj, "".concat(classPrefix, "-disabled-close"), disabled && !value), _obj)
63
63
  ]);
64
64
  };
65
- var onClick = /*#__PURE__*/ function() {
66
- var _ref = _async_to_generator(function() {
65
+ var onClick = function() {
66
+ return _async_to_generator(function() {
67
67
  var e;
68
68
  return _ts_generator(this, function(_state) {
69
69
  switch(_state.label){
@@ -108,11 +108,8 @@ export var Switch = function(props) {
108
108
  ];
109
109
  }
110
110
  });
111
- });
112
- return function onClick() {
113
- return _ref.apply(this, arguments);
114
- };
115
- }();
111
+ })();
112
+ };
116
113
  var _obj, _obj1;
117
114
  return /*#__PURE__*/ React.createElement(View, _object_spread({
118
115
  className: classes(),
@@ -106,22 +106,24 @@ var InternalUploader = function(props, ref) {
106
106
  var classes = classNames(className, 'nut-uploader');
107
107
  useImperativeHandle(ref, function() {
108
108
  return {
109
- submit: /*#__PURE__*/ _async_to_generator(function() {
110
- return _ts_generator(this, function(_state) {
111
- switch(_state.label){
112
- case 0:
113
- return [
114
- 4,
115
- uploadAction(uploadQueue)
116
- ];
117
- case 1:
118
- _state.sent();
119
- return [
120
- 2
121
- ];
122
- }
123
- });
124
- }),
109
+ submit: function() {
110
+ return _async_to_generator(function() {
111
+ return _ts_generator(this, function(_state) {
112
+ switch(_state.label){
113
+ case 0:
114
+ return [
115
+ 4,
116
+ uploadAction(uploadQueue)
117
+ ];
118
+ case 1:
119
+ _state.sent();
120
+ return [
121
+ 2
122
+ ];
123
+ }
124
+ });
125
+ })();
126
+ },
125
127
  clear: function() {
126
128
  clearUploadQueue();
127
129
  }
@@ -189,8 +191,8 @@ var InternalUploader = function(props, ref) {
189
191
  });
190
192
  }
191
193
  };
192
- var uploadAction = /*#__PURE__*/ function() {
193
- var _ref = _async_to_generator(function(tasks) {
194
+ var uploadAction = function(tasks) {
195
+ return _async_to_generator(function() {
194
196
  var taskIds, list;
195
197
  return _ts_generator(this, function(_state) {
196
198
  switch(_state.label){
@@ -210,8 +212,8 @@ var InternalUploader = function(props, ref) {
210
212
  setFileList(list);
211
213
  return [
212
214
  4,
213
- Promise.all(tasks.map(/*#__PURE__*/ function() {
214
- var _ref = _async_to_generator(function(currentTask, index) {
215
+ Promise.all(tasks.map(function(currentTask, index) {
216
+ return _async_to_generator(function() {
215
217
  var result, list, e, list1;
216
218
  return _ts_generator(this, function(_state) {
217
219
  switch(_state.label){
@@ -258,11 +260,8 @@ var InternalUploader = function(props, ref) {
258
260
  ];
259
261
  }
260
262
  });
261
- });
262
- return function(currentTask, index) {
263
- return _ref.apply(this, arguments);
264
- };
265
- }())).catch(function(errs) {
263
+ })();
264
+ })).catch(function(errs) {
266
265
  return console.error(errs);
267
266
  })
268
267
  ];
@@ -273,14 +272,11 @@ var InternalUploader = function(props, ref) {
273
272
  ];
274
273
  }
275
274
  });
276
- });
277
- return function uploadAction(tasks) {
278
- return _ref.apply(this, arguments);
279
- };
280
- }();
275
+ })();
276
+ };
281
277
  var idCountRef = useRef(0);
282
- var readFile = /*#__PURE__*/ function() {
283
- var _ref = _async_to_generator(function(files) {
278
+ var readFile = function(files) {
279
+ return _async_to_generator(function() {
284
280
  var tasks;
285
281
  return _ts_generator(this, function(_state) {
286
282
  switch(_state.label){
@@ -338,11 +334,8 @@ var InternalUploader = function(props, ref) {
338
334
  ];
339
335
  }
340
336
  });
341
- });
342
- return function readFile(files) {
343
- return _ref.apply(this, arguments);
344
- };
345
- }();
337
+ })();
338
+ };
346
339
  var filterFiles = function(files) {
347
340
  var maximum = maxCount * 1;
348
341
  var maximize = maxFileSize * 1;
@@ -381,8 +374,8 @@ var InternalUploader = function(props, ref) {
381
374
  }
382
375
  });
383
376
  };
384
- var onChangeMedia = /*#__PURE__*/ function() {
385
- var _ref = _async_to_generator(function(res) {
377
+ var onChangeMedia = function(res) {
378
+ return _async_to_generator(function() {
386
379
  var tempFiles, _files;
387
380
  return _ts_generator(this, function(_state) {
388
381
  // 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
@@ -401,13 +394,10 @@ var InternalUploader = function(props, ref) {
401
394
  2
402
395
  ];
403
396
  });
404
- });
405
- return function onChangeMedia(res) {
406
- return _ref.apply(this, arguments);
407
- };
408
- }();
409
- var onChangeImage = /*#__PURE__*/ function() {
410
- var _ref = _async_to_generator(function(res) {
397
+ })();
398
+ };
399
+ var onChangeImage = function(res) {
400
+ return _async_to_generator(function() {
411
401
  var tempFiles, _files;
412
402
  return _ts_generator(this, function(_state) {
413
403
  tempFiles = res.tempFiles;
@@ -425,11 +415,8 @@ var InternalUploader = function(props, ref) {
425
415
  2
426
416
  ];
427
417
  });
428
- });
429
- return function onChangeImage(res) {
430
- return _ref.apply(this, arguments);
431
- };
432
- }();
418
+ })();
419
+ };
433
420
  var handleItemClick = function(file, index) {
434
421
  onFileItemClick === null || onFileItemClick === void 0 ? void 0 : onFileItemClick(file, index);
435
422
  };
@@ -79,20 +79,16 @@ export var WaterMark = function(props) {
79
79
  setBase64Url(canvas.toDataURL());
80
80
  };
81
81
  } else if (content) {
82
- ctx.textBaseline = 'middle' // 设置或返回在绘制文本时使用的当前文本基线。(正中)
83
- ;
84
- ctx.textAlign = 'center' // 设置或返回文本内容的当前对齐方式。
85
- ;
82
+ ctx.textBaseline = 'middle'; // 设置或返回在绘制文本时使用的当前文本基线。(正中)
83
+ ctx.textAlign = 'center'; // 设置或返回文本内容的当前对齐方式。
86
84
  // 文字绕中间旋转
87
85
  ctx.translate(markWidth / 2, markHeight / 2);
88
86
  ctx.rotate(Math.PI / 180 * Number(rotate));
89
87
  var markSize = Number(fontSize) * ratio;
90
88
  ctx.font = "".concat(fontStyle, " normal ").concat(fontWeight, " ").concat(markSize, "px/").concat(markHeight, "px ").concat(fontFamily);
91
89
  ctx.fillStyle = color;
92
- ctx.fillText(content, startX, startY) // 在画布上绘制"被填充的"文本。
93
- ;
94
- ctx.restore() // 返回之前保存过的路径状态和属性。
95
- ;
90
+ ctx.fillText(content, startX, startY); // 在画布上绘制"被填充的"文本。
91
+ ctx.restore(); // 返回之前保存过的路径状态和属性。
96
92
  setBase64Url(canvas.toDataURL());
97
93
  }
98
94
  } else {
@@ -1 +1 @@
1
- import React from "react";
1
+ export { };
@@ -72,10 +72,7 @@ export function triggerDrag(el) {
72
72
  * @param {number} endY 结束触摸点的 Y 坐标
73
73
  * @param {number} duration 移动持续时间(毫秒)
74
74
  */ export function simulateTouchMove(element, startX, startY, endX, endY, duration) {
75
- return _simulateTouchMove.apply(this, arguments);
76
- }
77
- function _simulateTouchMove() {
78
- _simulateTouchMove = _async_to_generator(function(element, startX, startY, endX, endY, duration) {
75
+ return _async_to_generator(function() {
79
76
  var touch, touchList, distanceX, distanceY, startTime, elapsed, progress, currentX, currentY, currentTouch, currentTouchList;
80
77
  return _ts_generator(this, function(_state) {
81
78
  switch(_state.label){
@@ -128,8 +125,7 @@ function _simulateTouchMove() {
128
125
  ];
129
126
  }
130
127
  });
131
- });
132
- return _simulateTouchMove.apply(this, arguments);
128
+ })();
133
129
  }
134
130
  /**
135
131
  * 模拟触摸缩放方法
@@ -138,10 +134,7 @@ function _simulateTouchMove() {
138
134
  * @param {number} endDistance 结束触摸点的距离
139
135
  * @param {number} duration 缩放持续时间(毫秒)
140
136
  */ export function simulateTouchZoom(element, startDistance, endDistance, duration) {
141
- return _simulateTouchZoom.apply(this, arguments);
142
- }
143
- function _simulateTouchZoom() {
144
- _simulateTouchZoom = _async_to_generator(function(element, startDistance, endDistance, duration) {
137
+ return _async_to_generator(function() {
145
138
  var centerX, centerY, startScale, endScale, startTouches, endTouches, progress, currentScale, currentDistance, currentTouches;
146
139
  return _ts_generator(this, function(_state) {
147
140
  switch(_state.label){
@@ -201,6 +194,5 @@ function _simulateTouchZoom() {
201
194
  ];
202
195
  }
203
196
  });
204
- });
205
- return _simulateTouchZoom.apply(this, arguments);
197
+ })();
206
198
  }
@@ -45,10 +45,7 @@ function legacyUnmount(container) {
45
45
  return unmountComponentAtNode(container);
46
46
  }
47
47
  function concurrentUnmount(container) {
48
- return _concurrentUnmount.apply(this, arguments);
49
- }
50
- function _concurrentUnmount() {
51
- _concurrentUnmount = _async_to_generator(function(container) {
48
+ return _async_to_generator(function() {
52
49
  return _ts_generator(this, function(_state) {
53
50
  // Delay to unmount to avoid React 18 sync warning
54
51
  return [
@@ -60,8 +57,7 @@ function _concurrentUnmount() {
60
57
  })
61
58
  ];
62
59
  });
63
- });
64
- return _concurrentUnmount.apply(this, arguments);
60
+ })();
65
61
  }
66
62
  export function unmount(container) {
67
63
  if (createRoot) {
@@ -15,12 +15,10 @@ export function makeRect(width, height) {
15
15
  height: height
16
16
  };
17
17
  }
18
- export var getRectInMultiPlatform = /*#__PURE__*/ function() {
19
- var _ref = _async_to_generator(function(element) {
20
- var harmonyId;
21
- var _arguments = arguments;
18
+ export var getRectInMultiPlatform = function(element) {
19
+ var harmonyId = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
20
+ return _async_to_generator(function() {
22
21
  return _ts_generator(this, function(_state) {
23
- harmonyId = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : '';
24
22
  if (element) {
25
23
  if (inBrowser) {
26
24
  return [
@@ -51,18 +49,13 @@ export var getRectInMultiPlatform = /*#__PURE__*/ function() {
51
49
  Promise.resolve(makeRect(0, 0))
52
50
  ];
53
51
  });
54
- });
55
- return function getRectInMultiPlatform(element) {
56
- return _ref.apply(this, arguments);
57
- };
58
- }();
52
+ })();
53
+ };
59
54
  // 获取元素位置,不走缓存
60
- export var getRectInMultiPlatformWithoutCache = /*#__PURE__*/ function() {
61
- var _ref = _async_to_generator(function(element) {
62
- var harmonyId;
63
- var _arguments = arguments;
55
+ export var getRectInMultiPlatformWithoutCache = function(element) {
56
+ var harmonyId = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : '';
57
+ return _async_to_generator(function() {
64
58
  return _ts_generator(this, function(_state) {
65
- harmonyId = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : '';
66
59
  if (element) {
67
60
  if (inBrowser) {
68
61
  return [
@@ -85,8 +78,5 @@ export var getRectInMultiPlatformWithoutCache = /*#__PURE__*/ function() {
85
78
  Promise.resolve(makeRect(0, 0))
86
79
  ];
87
80
  });
88
- });
89
- return function getRectInMultiPlatformWithoutCache(element) {
90
- return _ref.apply(this, arguments);
91
- };
92
- }();
81
+ })();
82
+ };