@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.
- package/dist/apis/index.ts +22 -12
- package/dist/apis/ui/animation/animation.ts +2 -1
- package/dist/apis/wxml/IntersectionObserver.ts +5 -1
- package/dist/components-harmony-ets/button.ets +8 -1
- package/dist/components-harmony-ets/canvas.ets +13 -5
- package/dist/components-harmony-ets/checkbox.ets +7 -3
- package/dist/components-harmony-ets/form.ets +10 -2
- package/dist/components-harmony-ets/icon.ets +8 -1
- package/dist/components-harmony-ets/image.ets +8 -1
- package/dist/components-harmony-ets/input.ets +2 -1
- package/dist/components-harmony-ets/label.ets +9 -2
- package/dist/components-harmony-ets/movableArea.ets +10 -3
- package/dist/components-harmony-ets/movableView.ets +10 -3
- package/dist/components-harmony-ets/picker.ets +1 -1
- package/dist/components-harmony-ets/progress.ets +8 -1
- package/dist/components-harmony-ets/radio.ets +7 -3
- package/dist/components-harmony-ets/scrollView.ets +9 -2
- package/dist/components-harmony-ets/slider.ets +2 -1
- package/dist/components-harmony-ets/style.ets +40 -4
- package/dist/components-harmony-ets/swiper.ets +8 -1
- package/dist/components-harmony-ets/switch.ets +3 -1
- package/dist/components-harmony-ets/text.ets +8 -1
- package/dist/components-harmony-ets/textArea.ets +2 -1
- package/dist/components-harmony-ets/utils/flexManager.ets +2 -2
- package/dist/components-harmony-ets/utils/helper.ets +1 -3
- package/dist/components-harmony-ets/utils/htmlParser/index.ts +1 -1
- package/dist/components-harmony-ets/utils/index.ts +4 -59
- package/dist/components-harmony-ets/video.ets +9 -2
- package/dist/components-harmony-ets/view.ets +9 -2
- package/dist/runtime-ets/current.ts +1 -0
- package/dist/runtime-ets/dom/bind.ts +3 -3
- package/dist/runtime-ets/dom/cssNesting.ts +104 -22
- package/dist/runtime-ets/dom/cssStyleDeclaration.ts +2 -5
- package/dist/runtime-ets/dom/element/element.ts +1 -5
- package/dist/runtime-ets/dom/element/form.ts +4 -14
- package/dist/runtime-ets/dom/element/progress.ts +0 -1
- package/dist/runtime-ets/dom/element/text.ts +0 -8
- package/dist/runtime-ets/dom/element/video.ts +4 -3
- package/dist/runtime-ets/dom/node.ts +12 -11
- package/dist/runtime-ets/dom/stylesheet/covertWeb2Hm.ts +5 -4
- package/dist/runtime-ets/dom/stylesheet/util.ts +12 -10
- package/dist/runtime-ets/utils/index.ts +16 -2
- package/dist/runtime-ets/utils/info.ts +1 -1
- package/dist/runtime-framework/react/native-page.ts +1 -0
- package/dist/runtime-framework/react/page.ts +1 -0
- package/dist/runtime-framework/solid/reconciler/props.ts +3 -8
- package/dist/runtime-utils.js +16 -10
- package/dist/runtime-utils.js.map +1 -1
- package/dist/runtime.js +16 -10
- package/dist/runtime.js.map +1 -1
- package/package.json +10 -9
- /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) || {};
|