@tarojs/plugin-platform-harmony-ets 4.0.0-beta.64 → 4.0.0-beta.66

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/runtime.js CHANGED
@@ -279,6 +279,12 @@ Current.contextPromise.then((context) => {
279
279
  windowRect = mainWindow.getWindowProperties().windowRect;
280
280
  try {
281
281
  display$1 = _display.getDefaultDisplaySync();
282
+ setSafeArea({
283
+ top: statusBarHeight,
284
+ left: 0,
285
+ right: display$1.width,
286
+ bottom: navigationIndicatorRect === null || navigationIndicatorRect === void 0 ? void 0 : navigationIndicatorRect.top
287
+ });
282
288
  // @ts-ignore
283
289
  display$1.getCutoutInfo((err, { boundingRects = [], waterfallDisplayAreaRects = {} } = {}) => {
284
290
  var _a, _b, _c, _d, _e, _f;
@@ -290,14 +296,12 @@ Current.contextPromise.then((context) => {
290
296
  const bottom = Math.min(display$1.height - ((_c = waterfallDisplayAreaRects.bottom) === null || _c === void 0 ? void 0 : _c.top), navigationIndicatorRect === null || navigationIndicatorRect === void 0 ? void 0 : navigationIndicatorRect.top);
291
297
  const left = ((_d = waterfallDisplayAreaRects.left) === null || _d === void 0 ? void 0 : _d.left) + ((_e = waterfallDisplayAreaRects.left) === null || _e === void 0 ? void 0 : _e.width);
292
298
  const right = display$1.width - ((_f = waterfallDisplayAreaRects.right) === null || _f === void 0 ? void 0 : _f.left);
293
- safeArea = {
299
+ setSafeArea({
294
300
  top,
295
- bottom,
296
301
  left,
297
302
  right,
298
- height: bottom - top,
299
- width: right - left,
300
- };
303
+ bottom
304
+ });
301
305
  });
302
306
  }
303
307
  catch (e) {
@@ -305,6 +309,16 @@ Current.contextPromise.then((context) => {
305
309
  }
306
310
  });
307
311
  });
312
+ function setSafeArea({ top, left, right, bottom }) {
313
+ safeArea = {
314
+ top,
315
+ bottom,
316
+ left,
317
+ right,
318
+ height: bottom - top,
319
+ width: right - left,
320
+ };
321
+ }
308
322
  /* 同步版本 */
309
323
  const getSystemInfoSync = function () {
310
324
  var _a, _b;