@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.
@@ -14,7 +14,7 @@ const env = {
14
14
  TARO_VERSION: process.env.TARO_VERSION,
15
15
  };
16
16
  // Note: 该方法由 taro-plugin-platform-h5 实现
17
-
17
+ // export const canIUse = /* @__PURE__ */ temporarilyNotSupport('canIUse')
18
18
  function arrayBufferToBase64(arrayBuffer) {
19
19
  return fromByteArray(arrayBuffer);
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/api/base/index.ts"],"sourcesContent":["import { fromByteArray, toByteArray } from 'base64-js'\n\nexport const env = {\n FRAMEWORK: process.env.FRAMEWORK,\n TARO_ENV: process.env.TARO_ENV,\n TARO_PLATFORM: process.env.TARO_PLATFORM,\n TARO_VERSION: process.env.TARO_VERSION,\n}\n\n// Note: 该方法由 taro-plugin-platform-h5 实现\n// export const canIUse = /* @__PURE__ */ temporarilyNotSupport('canIUse')\n\nexport function arrayBufferToBase64 (arrayBuffer: ArrayBuffer) {\n return fromByteArray(arrayBuffer as Uint8Array)\n}\n\nexport function base64ToArrayBuffer (base64: string) {\n return toByteArray(base64)\n}\n\nexport * from './crypto'\nexport * from './debug'\nexport * from './performance'\nexport * from './system'\nexport * from './update'\nexport * from './weapp/app-event'\nexport * from './weapp/life-cycle'\n"],"names":[],"mappings":";;;;;;;;;AAEa,MAAA,GAAG,GAAG;AACjB,IAAA,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS;AAChC,IAAA,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;AAC9B,IAAA,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa;AACxC,IAAA,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY;EACvC;AAED;AAC0E;AAEpE,SAAU,mBAAmB,CAAE,WAAwB,EAAA;AAC3D,IAAA,OAAO,aAAa,CAAC,WAAyB,CAAC,CAAA;AACjD,CAAC;AAEK,SAAU,mBAAmB,CAAE,MAAc,EAAA;AACjD,IAAA,OAAO,WAAW,CAAC,MAAM,CAAC,CAAA;AAC5B;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/api/base/index.ts"],"sourcesContent":["import { fromByteArray, toByteArray } from 'base64-js'\n\nexport const env = {\n FRAMEWORK: process.env.FRAMEWORK,\n TARO_ENV: process.env.TARO_ENV,\n TARO_PLATFORM: process.env.TARO_PLATFORM,\n TARO_VERSION: process.env.TARO_VERSION,\n}\n\n// Note: 该方法由 taro-plugin-platform-h5 实现\n// export const canIUse = /* @__PURE__ */ temporarilyNotSupport('canIUse')\n\nexport function arrayBufferToBase64 (arrayBuffer: ArrayBuffer) {\n return fromByteArray(arrayBuffer as Uint8Array)\n}\n\nexport function base64ToArrayBuffer (base64: string) {\n return toByteArray(base64)\n}\n\nexport * from './crypto'\nexport * from './debug'\nexport * from './performance'\nexport * from './system'\nexport * from './update'\nexport * from './weapp/app-event'\nexport * from './weapp/life-cycle'\n"],"names":[],"mappings":";;;;;;;;;AAEa,MAAA,GAAG,GAAG;AACjB,IAAA,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS;AAChC,IAAA,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;AAC9B,IAAA,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa;AACxC,IAAA,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY;EACvC;AAED;AACA;AAEM,SAAU,mBAAmB,CAAE,WAAwB,EAAA;AAC3D,IAAA,OAAO,aAAa,CAAC,WAAyB,CAAC,CAAA;AACjD,CAAC;AAEK,SAAU,mBAAmB,CAAE,MAAc,EAAA;AACjD,IAAA,OAAO,WAAW,CAAC,MAAM,CAAC,CAAA;AAC5B;;;;"}
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
1
+ import { __awaiter } from '../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js';
2
2
  import { getMobileDetect } from '@tarojs/router/dist/utils/navigate';
3
3
  import { temporarilyNotSupport } from '../../utils/index.js';
4
4
  import { MethodHandler } from '../../utils/handler.js';
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
1
+ import { __awaiter } from '../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js';
2
2
 
3
3
  const TextBaseLineMap = {
4
4
  top: 'top',
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
1
+ import { __awaiter } from '../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js';
2
2
  import { permanentlyNotSupport } from '../../utils/index.js';
3
3
  import { MethodHandler } from '../../utils/handler.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
1
+ import { __awaiter } from '../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js';
2
2
  import { isFunction } from '@tarojs/shared';
3
3
  import { MethodHandler } from '../../utils/handler.js';
4
4
  import { setStorage, setStorageSync, getStorageSync } from '../storage/index.js';
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
1
+ import { __awaiter } from '../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js';
2
2
  import { temporarilyNotSupport } from '../../utils/index.js';
3
3
  import { MethodHandler, CallbackManager } from '../../utils/handler.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { __rest } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
1
+ import { __rest } from '../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js';
2
2
  import './style.scss.js';
3
3
  import { stringify } from 'query-string';
4
4
  import { MethodHandler } from '../../utils/handler.js';
@@ -1,4 +1,4 @@
1
- import styleInject from '../../node_modules/.pnpm/registry.npmjs.org_style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
1
+ import styleInject from '../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
3
  var css_248z = ".taro_choose_location {\n display: flex;\n position: fixed;\n top: 100%;\n z-index: 1;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background-color: #fff;\n transition: ease top 0.3s;\n}\n.taro_choose_location_bar {\n display: flex;\n flex: 0 95px;\n height: 95px;\n background-color: #ededed;\n color: #090909;\n}\n.taro_choose_location_back {\n position: relative;\n flex: 0 45px;\n margin-top: 30px;\n width: 33px;\n height: 30px;\n}\n.taro_choose_location_back::before {\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n border: solid 15px;\n border-color: transparent #090909 transparent transparent;\n width: 0;\n height: 0;\n content: \"\";\n}\n.taro_choose_location_back::after {\n display: block;\n position: absolute;\n left: 3px;\n top: 0;\n border: solid 15px;\n border-color: transparent #ededed transparent transparent;\n width: 0;\n height: 0;\n content: \"\";\n}\n.taro_choose_location_title {\n flex: 1;\n padding-left: 30px;\n line-height: 95px;\n}\n.taro_choose_location_submit {\n margin: 18px 30px 0 0;\n padding: 0;\n border: none;\n width: 110px;\n height: 60px;\n background-color: #08bf62;\n line-height: 60px;\n font-size: 28px;\n color: #fff;\n}\n.taro_choose_location_frame {\n flex: 1;\n}";
4
4
  var stylesheet=".taro_choose_location {\n display: flex;\n position: fixed;\n top: 100%;\n z-index: 1;\n flex-direction: column;\n width: 100%;\n height: 100%;\n background-color: #fff;\n transition: ease top 0.3s;\n}\n.taro_choose_location_bar {\n display: flex;\n flex: 0 95px;\n height: 95px;\n background-color: #ededed;\n color: #090909;\n}\n.taro_choose_location_back {\n position: relative;\n flex: 0 45px;\n margin-top: 30px;\n width: 33px;\n height: 30px;\n}\n.taro_choose_location_back::before {\n display: block;\n position: absolute;\n left: 0;\n top: 0;\n border: solid 15px;\n border-color: transparent #090909 transparent transparent;\n width: 0;\n height: 0;\n content: \"\";\n}\n.taro_choose_location_back::after {\n display: block;\n position: absolute;\n left: 3px;\n top: 0;\n border: solid 15px;\n border-color: transparent #ededed transparent transparent;\n width: 0;\n height: 0;\n content: \"\";\n}\n.taro_choose_location_title {\n flex: 1;\n padding-left: 30px;\n line-height: 95px;\n}\n.taro_choose_location_submit {\n margin: 18px 30px 0 0;\n padding: 0;\n border: none;\n width: 110px;\n height: 60px;\n background-color: #08bf62;\n line-height: 60px;\n font-size: 28px;\n color: #fff;\n}\n.taro_choose_location_frame {\n flex: 1;\n}";
@@ -1,4 +1,4 @@
1
- import { __rest } from '../../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
1
+ import { __rest } from '../../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js';
2
2
  import { shouldBeObject } from '../../../utils/index.js';
3
3
  import { chooseMedia } from '../video/chooseMedia.js';
4
4
 
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
1
+ import { __awaiter } from '../../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js';
2
2
  import { defineCustomElementTaroSwiperCore, defineCustomElementTaroSwiperItemCore } from '@tarojs/components/dist/components';
3
3
  import { eventCenter } from '@tarojs/runtime';
4
4
  import { isFunction } from '@tarojs/shared';
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
1
+ import { __awaiter } from '../../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js';
2
2
  import { getMobileDetect } from '@tarojs/router/dist/utils/navigate';
3
3
  import '../../ui/index.js';
4
4
  import { shouldBeObject, getParameterError } from '../../../utils/index.js';
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
1
+ import { __awaiter } from '../../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js';
2
2
  import 'whatwg-fetch';
3
3
  import { shouldBeObject, getParameterError } from '../../../utils/index.js';
4
4
  import { MethodHandler } from '../../../utils/handler.js';
@@ -1,4 +1,4 @@
1
- import { __rest } from '../../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
1
+ import { __rest } from '../../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js';
2
2
  import 'whatwg-fetch';
3
3
  import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only';
4
4
  import Taro from '@tarojs/api';
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
1
+ import { __awaiter } from '../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js';
2
2
  import { MethodHandler } from '../../utils/handler.js';
3
3
 
4
4
  // 字体
@@ -1,4 +1,4 @@
1
- import { __awaiter } from '../../../node_modules/.pnpm/registry.npmjs.org_tslib@2.5.0/node_modules/tslib/tslib.es6.js';
1
+ import { __awaiter } from '../../../node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.js';
2
2
  import Taro from '@tarojs/api';
3
3
  import { Current } from '@tarojs/runtime';
4
4
  import { getParameterError, temporarilyNotSupport } from '../../../utils/index.js';
package/dist/index.cjs.js CHANGED
@@ -361,7 +361,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
361
361
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
362
362
  PERFORMANCE OF THIS SOFTWARE.
363
363
  ***************************************************************************** */
364
- /* global Reflect, Promise */
364
+ /* global Reflect, Promise, SuppressedError, Symbol */
365
365
 
366
366
  var extendStatics = function(d, b) {
367
367
  extendStatics = Object.setPrototypeOf ||
@@ -429,10 +429,10 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e
429
429
  if (result === null || typeof result !== "object") throw new TypeError("Object expected");
430
430
  if (_ = accept(result.get)) descriptor.get = _;
431
431
  if (_ = accept(result.set)) descriptor.set = _;
432
- if (_ = accept(result.init)) initializers.push(_);
432
+ if (_ = accept(result.init)) initializers.unshift(_);
433
433
  }
434
434
  else if (_ = accept(result)) {
435
- if (kind === "field") initializers.push(_);
435
+ if (kind === "field") initializers.unshift(_);
436
436
  else descriptor[key] = _;
437
437
  }
438
438
  }
@@ -639,7 +639,84 @@ function __classPrivateFieldSet(receiver, state, value, kind, f) {
639
639
  function __classPrivateFieldIn(state, receiver) {
640
640
  if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
641
641
  return typeof state === "function" ? receiver === state : state.has(receiver);
642
- }
642
+ }
643
+
644
+ function __addDisposableResource(env, value, async) {
645
+ if (value !== null && value !== void 0) {
646
+ if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
647
+ var dispose;
648
+ if (async) {
649
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
650
+ dispose = value[Symbol.asyncDispose];
651
+ }
652
+ if (dispose === void 0) {
653
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
654
+ dispose = value[Symbol.dispose];
655
+ }
656
+ if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
657
+ env.stack.push({ value: value, dispose: dispose, async: async });
658
+ }
659
+ else if (async) {
660
+ env.stack.push({ async: true });
661
+ }
662
+ return value;
663
+ }
664
+
665
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
666
+ var e = new Error(message);
667
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
668
+ };
669
+
670
+ function __disposeResources(env) {
671
+ function fail(e) {
672
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
673
+ env.hasError = true;
674
+ }
675
+ function next() {
676
+ while (env.stack.length) {
677
+ var rec = env.stack.pop();
678
+ try {
679
+ var result = rec.dispose && rec.dispose.call(rec.value);
680
+ if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
681
+ }
682
+ catch (e) {
683
+ fail(e);
684
+ }
685
+ }
686
+ if (env.hasError) throw env.error;
687
+ }
688
+ return next();
689
+ }
690
+
691
+ var tslib_es6 = {
692
+ __extends: __extends,
693
+ __assign: __assign,
694
+ __rest: __rest,
695
+ __decorate: __decorate,
696
+ __param: __param,
697
+ __metadata: __metadata,
698
+ __awaiter: __awaiter,
699
+ __generator: __generator,
700
+ __createBinding: __createBinding,
701
+ __exportStar: __exportStar,
702
+ __values: __values,
703
+ __read: __read,
704
+ __spread: __spread,
705
+ __spreadArrays: __spreadArrays,
706
+ __spreadArray: __spreadArray,
707
+ __await: __await,
708
+ __asyncGenerator: __asyncGenerator,
709
+ __asyncDelegator: __asyncDelegator,
710
+ __asyncValues: __asyncValues,
711
+ __makeTemplateObject: __makeTemplateObject,
712
+ __importStar: __importStar,
713
+ __importDefault: __importDefault,
714
+ __classPrivateFieldGet: __classPrivateFieldGet,
715
+ __classPrivateFieldSet: __classPrivateFieldSet,
716
+ __classPrivateFieldIn: __classPrivateFieldIn,
717
+ __addDisposableResource: __addDisposableResource,
718
+ __disposeResources: __disposeResources,
719
+ };
643
720
 
644
721
  /** 跳转系统蓝牙设置页 */
645
722
  const openSystemBluetoothSetting = /* @__PURE__ */ temporarilyNotSupport('openSystemBluetoothSetting');
@@ -989,7 +1066,7 @@ const env = {
989
1066
  TARO_VERSION: process.env.TARO_VERSION,
990
1067
  };
991
1068
  // Note: 该方法由 taro-plugin-platform-h5 实现
992
-
1069
+ // export const canIUse = /* @__PURE__ */ temporarilyNotSupport('canIUse')
993
1070
  function arrayBufferToBase64(arrayBuffer) {
994
1071
  return base64Js.fromByteArray(arrayBuffer);
995
1072
  }