@tarojs/taro-h5 4.0.0-beta.0 → 4.0.0-beta.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.
package/dist/index.esm.js CHANGED
@@ -339,7 +339,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
339
339
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
340
340
  PERFORMANCE OF THIS SOFTWARE.
341
341
  ***************************************************************************** */
342
- /* global Reflect, Promise */
342
+ /* global Reflect, Promise, SuppressedError, Symbol */
343
343
 
344
344
  var extendStatics = function(d, b) {
345
345
  extendStatics = Object.setPrototypeOf ||
@@ -407,10 +407,10 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
407
407
  if (result === null || typeof result !== "object") throw new TypeError("Object expected");
408
408
  if (_ = accept(result.get)) descriptor.get = _;
409
409
  if (_ = accept(result.set)) descriptor.set = _;
410
- if (_ = accept(result.init)) initializers.push(_);
410
+ if (_ = accept(result.init)) initializers.unshift(_);
411
411
  }
412
412
  else if (_ = accept(result)) {
413
- if (kind === "field") initializers.push(_);
413
+ if (kind === "field") initializers.unshift(_);
414
414
  else descriptor[key] = _;
415
415
  }
416
416
  }
@@ -617,7 +617,84 @@ function __classPrivateFieldSet(receiver, state, value, kind, f) {
617
617
  function __classPrivateFieldIn(state, receiver) {
618
618
  if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
619
619
  return typeof state === "function" ? receiver === state : state.has(receiver);
620
- }
620
+ }
621
+
622
+ function __addDisposableResource(env, value, async) {
623
+ if (value !== null && value !== void 0) {
624
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
625
+ var dispose;
626
+ if (async) {
627
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
628
+ dispose = value[Symbol.asyncDispose];
629
+ }
630
+ if (dispose === void 0) {
631
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
632
+ dispose = value[Symbol.dispose];
633
+ }
634
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
635
+ env.stack.push({ value: value, dispose: dispose, async: async });
636
+ }
637
+ else if (async) {
638
+ env.stack.push({ async: true });
639
+ }
640
+ return value;
641
+ }
642
+
643
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
644
+ var e = new Error(message);
645
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
646
+ };
647
+
648
+ function __disposeResources(env) {
649
+ function fail(e) {
650
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
651
+ env.hasError = true;
652
+ }
653
+ function next() {
654
+ while (env.stack.length) {
655
+ var rec = env.stack.pop();
656
+ try {
657
+ var result = rec.dispose && rec.dispose.call(rec.value);
658
+ if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
659
+ }
660
+ catch (e) {
661
+ fail(e);
662
+ }
663
+ }
664
+ if (env.hasError) throw env.error;
665
+ }
666
+ return next();
667
+ }
668
+
669
+ var tslib_es6 = {
670
+ __extends: __extends,
671
+ __assign: __assign,
672
+ __rest: __rest,
673
+ __decorate: __decorate,
674
+ __param: __param,
675
+ __metadata: __metadata,
676
+ __awaiter: __awaiter,
677
+ __generator: __generator,
678
+ __createBinding: __createBinding,
679
+ __exportStar: __exportStar,
680
+ __values: __values,
681
+ __read: __read,
682
+ __spread: __spread,
683
+ __spreadArrays: __spreadArrays,
684
+ __spreadArray: __spreadArray,
685
+ __await: __await,
686
+ __asyncGenerator: __asyncGenerator,
687
+ __asyncDelegator: __asyncDelegator,
688
+ __asyncValues: __asyncValues,
689
+ __makeTemplateObject: __makeTemplateObject,
690
+ __importStar: __importStar,
691
+ __importDefault: __importDefault,
692
+ __classPrivateFieldGet: __classPrivateFieldGet,
693
+ __classPrivateFieldSet: __classPrivateFieldSet,
694
+ __classPrivateFieldIn: __classPrivateFieldIn,
695
+ __addDisposableResource: __addDisposableResource,
696
+ __disposeResources: __disposeResources,
697
+ };
621
698
 
622
699
  /** 跳转系统蓝牙设置页 */
623
700
  const openSystemBluetoothSetting = /* @__PURE__ */ temporarilyNotSupport('openSystemBluetoothSetting');
@@ -967,7 +1044,7 @@ const env = {
967
1044
  TARO_VERSION: process.env.TARO_VERSION,
968
1045
  };
969
1046
  // Note: 该方法由 taro-plugin-platform-h5 实现
970
-
1047
+ // export const canIUse = /* @__PURE__ */ temporarilyNotSupport('canIUse')
971
1048
  function arrayBufferToBase64(arrayBuffer) {
972
1049
  return fromByteArray(arrayBuffer);
973
1050
  }