@tarojs/plugin-platform-harmony-ets 4.0.0-beta.22 → 4.0.0-beta.23

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 (52) hide show
  1. package/dist/apis/index.ts +22 -12
  2. package/dist/apis/ui/animation/animation.ts +2 -1
  3. package/dist/apis/wxml/IntersectionObserver.ts +5 -1
  4. package/dist/components-harmony-ets/button.ets +8 -1
  5. package/dist/components-harmony-ets/canvas.ets +13 -5
  6. package/dist/components-harmony-ets/checkbox.ets +7 -3
  7. package/dist/components-harmony-ets/form.ets +10 -2
  8. package/dist/components-harmony-ets/icon.ets +8 -1
  9. package/dist/components-harmony-ets/image.ets +8 -1
  10. package/dist/components-harmony-ets/input.ets +2 -1
  11. package/dist/components-harmony-ets/label.ets +9 -2
  12. package/dist/components-harmony-ets/movableArea.ets +10 -3
  13. package/dist/components-harmony-ets/movableView.ets +10 -3
  14. package/dist/components-harmony-ets/picker.ets +1 -1
  15. package/dist/components-harmony-ets/progress.ets +8 -1
  16. package/dist/components-harmony-ets/radio.ets +7 -3
  17. package/dist/components-harmony-ets/scrollView.ets +9 -2
  18. package/dist/components-harmony-ets/slider.ets +2 -1
  19. package/dist/components-harmony-ets/style.ets +40 -4
  20. package/dist/components-harmony-ets/swiper.ets +8 -1
  21. package/dist/components-harmony-ets/switch.ets +3 -1
  22. package/dist/components-harmony-ets/text.ets +8 -1
  23. package/dist/components-harmony-ets/textArea.ets +2 -1
  24. package/dist/components-harmony-ets/utils/flexManager.ets +2 -2
  25. package/dist/components-harmony-ets/utils/helper.ets +1 -3
  26. package/dist/components-harmony-ets/utils/htmlParser/index.ts +1 -1
  27. package/dist/components-harmony-ets/utils/index.ts +4 -59
  28. package/dist/components-harmony-ets/video.ets +9 -2
  29. package/dist/components-harmony-ets/view.ets +9 -2
  30. package/dist/runtime-ets/current.ts +1 -0
  31. package/dist/runtime-ets/dom/bind.ts +3 -3
  32. package/dist/runtime-ets/dom/cssNesting.ts +104 -22
  33. package/dist/runtime-ets/dom/cssStyleDeclaration.ts +2 -5
  34. package/dist/runtime-ets/dom/element/element.ts +1 -5
  35. package/dist/runtime-ets/dom/element/form.ts +4 -14
  36. package/dist/runtime-ets/dom/element/progress.ts +0 -1
  37. package/dist/runtime-ets/dom/element/text.ts +0 -8
  38. package/dist/runtime-ets/dom/element/video.ts +4 -3
  39. package/dist/runtime-ets/dom/node.ts +12 -11
  40. package/dist/runtime-ets/dom/stylesheet/covertWeb2Hm.ts +5 -4
  41. package/dist/runtime-ets/dom/stylesheet/util.ts +12 -10
  42. package/dist/runtime-ets/utils/index.ts +16 -2
  43. package/dist/runtime-ets/utils/info.ts +1 -1
  44. package/dist/runtime-framework/react/native-page.ts +1 -0
  45. package/dist/runtime-framework/react/page.ts +1 -0
  46. package/dist/runtime-framework/solid/reconciler/props.ts +3 -8
  47. package/dist/runtime-utils.js +16 -10
  48. package/dist/runtime-utils.js.map +1 -1
  49. package/dist/runtime.js +16 -10
  50. package/dist/runtime.js.map +1 -1
  51. package/package.json +10 -9
  52. /package/dist/template/{container.js/container.js → container.js} +0 -0
package/dist/runtime.js CHANGED
@@ -266,7 +266,7 @@ const preloadWebview = /* @__PURE__ */ temporarilyNotSupport('preloadWebview');
266
266
  const preloadSkylineView = /* @__PURE__ */ temporarilyNotSupport('preloadSkylineView');
267
267
  const preloadAssets = /* @__PURE__ */ temporarilyNotSupport('preloadAssets');
268
268
 
269
- let display;
269
+ let display$1;
270
270
  let navigationIndicatorRect;
271
271
  let safeArea = null;
272
272
  let statusBarHeight;
@@ -279,18 +279,18 @@ Current.contextPromise.then((context) => {
279
279
  statusBarHeight = topRect.top + topRect.height;
280
280
  windowRect = mainWindow.getWindowProperties().windowRect;
281
281
  try {
282
- display = _display.getDefaultDisplaySync();
282
+ display$1 = _display.getDefaultDisplaySync();
283
283
  // @ts-ignore
284
- display.getCutoutInfo((err, { boundingRects = [], waterfallDisplayAreaRects = {} } = {}) => {
284
+ display$1.getCutoutInfo((err, { boundingRects = [], waterfallDisplayAreaRects = {} } = {}) => {
285
285
  var _a, _b, _c, _d, _e, _f;
286
286
  if (err === null || err === void 0 ? void 0 : err.code) {
287
287
  console.error('Failed to get cutout info', JSON.stringify(err));
288
288
  return;
289
289
  }
290
290
  const top = Math.max(...boundingRects.map(rect => rect.top + rect.height), ((_a = waterfallDisplayAreaRects.top) === null || _a === void 0 ? void 0 : _a.top) + ((_b = waterfallDisplayAreaRects.top) === null || _b === void 0 ? void 0 : _b.height), statusBarHeight);
291
- const bottom = display.height - Math.min((_c = waterfallDisplayAreaRects.bottom) === null || _c === void 0 ? void 0 : _c.top, navigationIndicatorRect === null || navigationIndicatorRect === void 0 ? void 0 : navigationIndicatorRect.top);
291
+ const bottom = display$1.height - Math.min((_c = waterfallDisplayAreaRects.bottom) === null || _c === void 0 ? void 0 : _c.top, navigationIndicatorRect === null || navigationIndicatorRect === void 0 ? void 0 : navigationIndicatorRect.top);
292
292
  const left = ((_d = waterfallDisplayAreaRects.left) === null || _d === void 0 ? void 0 : _d.left) + ((_e = waterfallDisplayAreaRects.left) === null || _e === void 0 ? void 0 : _e.width);
293
- const right = display.width - ((_f = waterfallDisplayAreaRects.right) === null || _f === void 0 ? void 0 : _f.left);
293
+ const right = display$1.width - ((_f = waterfallDisplayAreaRects.right) === null || _f === void 0 ? void 0 : _f.left);
294
294
  safeArea = {
295
295
  top,
296
296
  bottom,
@@ -329,11 +329,11 @@ const getSystemInfoSync = function () {
329
329
  res.notificationSoundAuthorized = false; // 通知带有声音的开关(仅 iOS 有效)boolean
330
330
  res.phoneCalendarAuthorized = null; // 使用日历的开关 boolean
331
331
  res.wifiEnabled = false; // Wi-Fi 的系统开关 boolean
332
- res.pixelRatio = display && display.densityPixels; // 设备像素比,number
332
+ res.pixelRatio = display$1 && display$1.densityPixels; // 设备像素比,number
333
333
  res.platform = 'harmony'; // 客户端平台 string
334
334
  res.safeArea = safeArea; // 在竖屏正方向下的安全区域 General.SafeAreaResult
335
- res.screenHeight = display === null || display === void 0 ? void 0 : display.height; // 屏幕高度,单位px number
336
- res.screenWidth = display === null || display === void 0 ? void 0 : display.width; // 屏幕宽度,单位px number
335
+ res.screenHeight = display$1 === null || display$1 === void 0 ? void 0 : display$1.height; // 屏幕高度,单位px number
336
+ res.screenWidth = display$1 === null || display$1 === void 0 ? void 0 : display$1.width; // 屏幕宽度,单位px number
337
337
  res.statusBarHeight = statusBarHeight; // 状态栏的高度,单位px number
338
338
  res.system = deviceInfo === null || deviceInfo === void 0 ? void 0 : deviceInfo.osFullName; // 操作系统及版本 string
339
339
  // Note: 更新配置时才能记录
@@ -3444,7 +3444,7 @@ class Animation {
3444
3444
  return this;
3445
3445
  }
3446
3446
  scale(sx, sy) {
3447
- this.rule.scale = { x: sx, y: sy };
3447
+ this.rule.scale = { x: sx, y: isUndefined(sy) ? sx : sy };
3448
3448
  return this;
3449
3449
  }
3450
3450
  scale3d(sx, sy, sz) {
@@ -4055,6 +4055,11 @@ class IntersectionObserver {
4055
4055
  });
4056
4056
  }
4057
4057
  }
4058
+ else {
4059
+ callback({
4060
+ errMsg: 'IntersectionObserver.observe:fail cannot find the node for selector.'
4061
+ });
4062
+ }
4058
4063
  }
4059
4064
  relativeTo() {
4060
4065
  temporarilyNotSupport('relativeTo')();
@@ -4806,7 +4811,8 @@ function initPxTransform({ designWidth = defaultDesignWidth, deviceRatio = defau
4806
4811
  config.unitPrecision = unitPrecision;
4807
4812
  }
4808
4813
  }
4809
- _display.getDefaultDisplaySync();
4814
+ const display = _display.getDefaultDisplaySync();
4815
+ display.width;
4810
4816
  function pxTransform(size) {
4811
4817
  var _a;
4812
4818
  const config = ((_a = Current.taro) === null || _a === void 0 ? void 0 : _a.config) || {};