@tarojs/taro-h5 4.0.7 → 4.0.8-alpha.0

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/api/index.js CHANGED
@@ -16,7 +16,7 @@ import './network/index.js';
16
16
  import './open-api/index.js';
17
17
  export { requestOrderPayment, requestPayment, requestPluginPayment } from './payment/index.js';
18
18
  export { addRecentColorSign, applyAddToMyApps, getGuildInfo, getQQRunData, isAddedToMyApps, openQzonePublish, setCustomDress, setOfficialDress, updateQQApp } from './qq/index.js';
19
- import './route/index.js';
19
+ export { router } from './route/index.js';
20
20
  export { authPrivateMessage, getShareInfo, hideShareMenu, offCopyUrl, onCopyUrl, shareFileMessage, shareVideoMessage, showShareImageMenu, showShareMenu, updateShareMenu } from './share/index.js';
21
21
  export { batchGetStorage, batchGetStorageSync, batchSetStorage, batchSetStorageSync, clearStorage, clearStorageSync, createBufferURL, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, removeStorage, removeStorageSync, revokeBufferURL, setStorage, setStorageSync } from './storage/index.js';
22
22
  export { advancedGeneralIdentify, animalClassify, carClassify, dishClassify, getSwanId, imageAudit, logoClassify, navigateBackSmartProgram, navigateToSmartGameProgram, navigateToSmartProgram, objectDetectIdentify, ocrBankCard, ocrDrivingLicense, ocrIdCard, ocrVehicleLicense, plantClassify, preloadSubPackage, requestPolymerPayment, setPageInfo, textReview, textToAudio } from './swan/index.js';
@@ -117,6 +117,7 @@ export { getWeRunData, shareToWeRun } from './open-api/werun.js';
117
117
  export { getBackgroundFetchData, getBackgroundFetchToken, onBackgroundFetchData, setBackgroundFetchToken } from './storage/background-fetch.js';
118
118
  export { createCacheManager } from './storage/cache-manager.js';
119
119
  export { createAnimation } from './ui/animation/index.js';
120
+ export { worklet } from './ui/animation/worklet.js';
120
121
  export { setBackgroundColor, setBackgroundTextStyle } from './ui/background.js';
121
122
  export { nextTick } from './ui/custom-component.js';
122
123
  export { loadFontFace } from './ui/fonts.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1,7 @@
1
+ declare const router: {
2
+ addRouteBuilder: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
3
+ getRouteContext: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
4
+ removeRouteBuilder: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
5
+ };
1
6
  export { navigateBack, navigateTo, redirectTo, reLaunch, switchTab } from '@tarojs/router';
7
+ export { router };
@@ -1,5 +1,12 @@
1
+ import { temporarilyNotSupport } from '../../utils/index.js';
1
2
  export { navigateBack, navigateTo, reLaunch, redirectTo, switchTab } from '@tarojs/router';
2
3
 
3
- // 路由
4
+ const router = {
5
+ addRouteBuilder: /* @__PURE__ */ temporarilyNotSupport('addRouteBuilder'),
6
+ getRouteContext: /* @__PURE__ */ temporarilyNotSupport('getRouteContext'),
7
+ removeRouteBuilder: /* @__PURE__ */ temporarilyNotSupport('removeRouteBuilder')
8
+ };
4
9
  // FIXME 方法导出类型未对齐,后续修复
10
+
11
+ export { router };
5
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/api/route/index.ts"],"sourcesContent":["// 路由\nexport {\n navigateBack,\n navigateTo,\n redirectTo,\n reLaunch,\n switchTab\n} from '@tarojs/router'\n\n// FIXME 方法导出类型未对齐,后续修复\n"],"names":[],"mappings":";;AAAA;AASA"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/api/route/index.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../utils'\n\nconst router = {\n addRouteBuilder: /* @__PURE__ */ temporarilyNotSupport('addRouteBuilder'),\n getRouteContext: /* @__PURE__ */ temporarilyNotSupport('getRouteContext'),\n removeRouteBuilder: /* @__PURE__ */ temporarilyNotSupport('removeRouteBuilder')\n}\n\n// 路由\nexport {\n navigateBack,\n navigateTo,\n redirectTo,\n reLaunch,\n switchTab,\n} from '@tarojs/router'\n\nexport {\n router\n}\n\n// FIXME 方法导出类型未对齐,后续修复\n"],"names":[],"mappings":";;;AAEA,MAAM,MAAM,GAAG;AACb,IAAA,eAAe,kBAAkB,qBAAqB,CAAC,iBAAiB,CAAC;AACzE,IAAA,eAAe,kBAAkB,qBAAqB,CAAC,iBAAiB,CAAC;AACzE,IAAA,kBAAkB,kBAAkB,qBAAqB,CAAC,oBAAoB,CAAC;EAChF;AAeD;;;;"}
@@ -1,7 +1,10 @@
1
1
  import Taro from '@tarojs/api';
2
2
  import { history } from '@tarojs/router';
3
3
  declare const Behavior: any, getEnv: any, ENV_TYPE: any, Link: any, interceptors: any, interceptorify: any, Current: any, options: any, eventCenter: any, Events: any, preload: any;
4
- declare const taro: typeof Taro;
4
+ type ModifiedTaro = Omit<typeof Taro, 'router'> & {
5
+ router: any;
6
+ };
7
+ declare const taro: ModifiedTaro;
5
8
  declare const requirePlugin: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
6
9
  declare const initPxTransform: ({ designWidth, deviceRatio, baseFontSize, unitPrecision, targetUnit }: {
7
10
  designWidth?: number | undefined;
package/dist/api/taro.js CHANGED
@@ -6,6 +6,8 @@ import './index.js';
6
6
  import { permanentlyNotSupport } from '../utils/index.js';
7
7
  import { getCurrentInstance, getApp } from './framework/index.js';
8
8
  import { nextTick } from './ui/custom-component.js';
9
+ import { router } from './route/index.js';
10
+ import { worklet } from './ui/animation/worklet.js';
9
11
 
10
12
  const { Behavior, getEnv, ENV_TYPE, Link, interceptors, interceptorify, Current, options, eventCenter, Events, preload } = Taro;
11
13
  const taro = {
@@ -29,7 +31,9 @@ const taro = {
29
31
  reLaunch,
30
32
  redirectTo,
31
33
  getCurrentPages,
32
- switchTab
34
+ switchTab,
35
+ router,
36
+ worklet,
33
37
  };
34
38
  const requirePlugin = /* @__PURE__ */ permanentlyNotSupport('requirePlugin');
35
39
  function getConfig() {
@@ -1 +1 @@
1
- {"version":3,"file":"taro.js","sources":["../../src/api/taro.ts"],"sourcesContent":["import Taro from '@tarojs/api'\nimport { history } from '@tarojs/router'\nimport { isFunction, PLATFORM_TYPE } from '@tarojs/shared'\n\nimport { getApp, getCurrentInstance, getCurrentPages, navigateBack, navigateTo, nextTick, redirectTo, reLaunch, switchTab } from '../api'\nimport { permanentlyNotSupport } from '../utils'\n\nconst {\n Behavior,\n getEnv,\n ENV_TYPE,\n Link,\n interceptors,\n interceptorify,\n Current,\n options,\n eventCenter,\n Events,\n preload\n} = Taro as any\n\nconst taro: typeof Taro = {\n // @ts-ignore\n Behavior,\n getEnv,\n ENV_TYPE,\n Link,\n interceptors,\n interceptorify,\n Current,\n getCurrentInstance,\n options,\n nextTick,\n eventCenter,\n Events,\n preload,\n history,\n navigateBack,\n navigateTo,\n reLaunch,\n redirectTo,\n getCurrentPages,\n switchTab\n}\n\nconst requirePlugin = /* @__PURE__ */ permanentlyNotSupport('requirePlugin')\n\nfunction getConfig (): Record<string, any> {\n if (this?.pxTransformConfig) return this.pxTransformConfig\n return ((taro as any).config ||= {})\n}\n\nconst defaultDesignWidth = 750\nconst defaultDesignRatio: TaroGeneral.TDeviceRatio = {\n 640: 2.34 / 2,\n 750: 1,\n 828: 1.81 / 2\n}\nconst defaultBaseFontSize = 20\nconst defaultUnitPrecision = 5\nconst defaultTargetUnit = 'rem'\n\nconst initPxTransform = function ({\n designWidth = defaultDesignWidth,\n deviceRatio = defaultDesignRatio,\n baseFontSize = defaultBaseFontSize,\n unitPrecision = defaultUnitPrecision,\n targetUnit = defaultTargetUnit\n}) {\n const config = getConfig.call(this)\n config.designWidth = designWidth\n config.deviceRatio = deviceRatio\n config.baseFontSize = baseFontSize\n config.targetUnit = targetUnit\n config.unitPrecision = unitPrecision\n}\n\nconst pxTransform = function (size = 0) {\n const config = getConfig.call(this)\n const baseFontSize = config.baseFontSize || defaultBaseFontSize\n const deviceRatio = config.deviceRatio || defaultDesignRatio\n const designWidth = ((input = 0) => isFunction(config.designWidth)\n ? config.designWidth(input)\n : config.designWidth)(size)\n if (!(designWidth in config.deviceRatio)) {\n throw new Error(`deviceRatio 配置中不存在 ${designWidth} 的设置!`)\n }\n const targetUnit = config.targetUnit || defaultTargetUnit\n const unitPrecision = config.unitPrecision || defaultUnitPrecision\n const formatSize = ~~size\n let rootValue = 1 / deviceRatio[designWidth]\n switch (targetUnit) {\n case 'vw':\n rootValue = designWidth / 100\n break\n case 'px':\n rootValue *= 2\n break\n default:\n // rem\n rootValue *= baseFontSize * 2\n }\n let val: number | string = formatSize / rootValue\n if (unitPrecision >= 0 && unitPrecision <= 100) {\n // Number(val): 0.50000 => 0.5\n val = Number(val.toFixed(unitPrecision))\n }\n return val + targetUnit\n}\n\nconst canIUseWebp = function () {\n const canvas = document.createElement('canvas')\n return canvas.toDataURL('image/webp').indexOf('data:image/webp') === 0\n}\n\nconst getAppInfo = function () {\n const config = getConfig.call(this)\n return {\n platform: process.env.TARO_PLATFORM || PLATFORM_TYPE.WEB,\n taroVersion: process.env.TARO_VERSION || 'unknown',\n designWidth: config.designWidth,\n }\n}\n\ntaro.requirePlugin = requirePlugin\ntaro.getApp = getApp\ntaro.pxTransform = pxTransform\ntaro.initPxTransform = initPxTransform\ntaro.canIUseWebp = canIUseWebp\ntaro.getAppInfo = getAppInfo\n\nexport default taro\n\nexport {\n Behavior,\n canIUseWebp,\n Current,\n ENV_TYPE,\n eventCenter,\n Events,\n getAppInfo,\n getEnv,\n history,\n initPxTransform,\n interceptorify,\n interceptors,\n Link,\n options,\n preload,\n pxTransform,\n requirePlugin\n}\n"],"names":[],"mappings":";;;;;;;;;AAOM,MAAA,EACJ,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,YAAY,EACZ,cAAc,EACd,OAAO,EACP,OAAO,EACP,WAAW,EACX,MAAM,EACN,OAAO,EACR,GAAG,KAAW;AAEf,MAAM,IAAI,GAAgB;;IAExB,QAAQ;IACR,MAAM;IACN,QAAQ;IACR,IAAI;IACJ,YAAY;IACZ,cAAc;IACd,OAAO;IACP,kBAAkB;IAClB,OAAO;IACP,QAAQ;IACR,WAAW;IACX,MAAM;IACN,OAAO;IACP,OAAO;IACP,YAAY;IACZ,UAAU;IACV,QAAQ;IACR,UAAU;IACV,eAAe;IACf,SAAS;EACV;AAEK,MAAA,aAAa,mBAAmB,qBAAqB,CAAC,eAAe,EAAC;AAE5E,SAAS,SAAS,GAAA;;AAChB,IAAA,IAAI,IAAI,KAAJ,IAAA,IAAA,IAAI,KAAJ,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,IAAI,CAAE,iBAAiB;QAAE,OAAO,IAAI,CAAC,iBAAiB,CAAA;IAC1D,QAAO,CAAA,EAAA,GAAE,IAAY,EAAC,MAAM,QAAN,MAAM,GAAK,EAAE,CAAA,EAAC;AACtC,CAAC;AAED,MAAM,kBAAkB,GAAG,GAAG,CAAA;AAC9B,MAAM,kBAAkB,GAA6B;IACnD,GAAG,EAAE,IAAI,GAAG,CAAC;AACb,IAAA,GAAG,EAAE,CAAC;IACN,GAAG,EAAE,IAAI,GAAG,CAAC;CACd,CAAA;AACD,MAAM,mBAAmB,GAAG,EAAE,C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a,GAAG,aAAa,CAAA;AAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;AACpB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;AAC9B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;AACtC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;AAC9B,IAAI,CAAC,UAAU,GAAG,UAAU;;;;"}
1
+ {"version":3,"file":"taro.js","sources":["../../src/api/taro.ts"],"sourcesContent":["import Taro from '@tarojs/api'\nimport { history } from '@tarojs/router'\nimport { isFunction, PLATFORM_TYPE } from '@tarojs/shared'\n\nimport { getApp, getCurrentInstance, getCurrentPages, navigateBack, navigateTo, nextTick, redirectTo, reLaunch, router, switchTab, worklet } from '../api'\nimport { permanentlyNotSupport } from '../utils'\n\nconst {\n Behavior,\n getEnv,\n ENV_TYPE,\n Link,\n interceptors,\n interceptorify,\n Current,\n options,\n eventCenter,\n Events,\n preload\n} = Taro as any\n\ntype ModifiedTaro = Omit<typeof Taro, 'router'> & { router: any };\n\nconst taro: ModifiedTaro = {\n // @ts-ignore\n Behavior,\n getEnv,\n ENV_TYPE,\n Link,\n interceptors,\n interceptorify,\n Current,\n getCurrentInstance,\n options,\n nextTick,\n eventCenter,\n Events,\n preload,\n history,\n navigateBack,\n navigateTo,\n reLaunch,\n redirectTo,\n getCurrentPages,\n switchTab,\n router,\n worklet,\n}\n\nconst requirePlugin = /* @__PURE__ */ permanentlyNotSupport('requirePlugin')\n\nfunction getConfig (): Record<string, any> {\n if (this?.pxTransformConfig) return this.pxTransformConfig\n return ((taro as any).config ||= {})\n}\n\nconst defaultDesignWidth = 750\nconst defaultDesignRatio: TaroGeneral.TDeviceRatio = {\n 640: 2.34 / 2,\n 750: 1,\n 828: 1.81 / 2\n}\nconst defaultBaseFontSize = 20\nconst defaultUnitPrecision = 5\nconst defaultTargetUnit = 'rem'\n\nconst initPxTransform = function ({\n designWidth = defaultDesignWidth,\n deviceRatio = defaultDesignRatio,\n baseFontSize = defaultBaseFontSize,\n unitPrecision = defaultUnitPrecision,\n targetUnit = defaultTargetUnit\n}) {\n const config = getConfig.call(this)\n config.designWidth = designWidth\n config.deviceRatio = deviceRatio\n config.baseFontSize = baseFontSize\n config.targetUnit = targetUnit\n config.unitPrecision = unitPrecision\n}\n\nconst pxTransform = function (size = 0) {\n const config = getConfig.call(this)\n const baseFontSize = config.baseFontSize || defaultBaseFontSize\n const deviceRatio = config.deviceRatio || defaultDesignRatio\n const designWidth = ((input = 0) => isFunction(config.designWidth)\n ? config.designWidth(input)\n : config.designWidth)(size)\n if (!(designWidth in config.deviceRatio)) {\n throw new Error(`deviceRatio 配置中不存在 ${designWidth} 的设置!`)\n }\n const targetUnit = config.targetUnit || defaultTargetUnit\n const unitPrecision = config.unitPrecision || defaultUnitPrecision\n const formatSize = ~~size\n let rootValue = 1 / deviceRatio[designWidth]\n switch (targetUnit) {\n case 'vw':\n rootValue = designWidth / 100\n break\n case 'px':\n rootValue *= 2\n break\n default:\n // rem\n rootValue *= baseFontSize * 2\n }\n let val: number | string = formatSize / rootValue\n if (unitPrecision >= 0 && unitPrecision <= 100) {\n // Number(val): 0.50000 => 0.5\n val = Number(val.toFixed(unitPrecision))\n }\n return val + targetUnit\n}\n\nconst canIUseWebp = function () {\n const canvas = document.createElement('canvas')\n return canvas.toDataURL('image/webp').indexOf('data:image/webp') === 0\n}\n\nconst getAppInfo = function () {\n const config = getConfig.call(this)\n return {\n platform: process.env.TARO_PLATFORM || PLATFORM_TYPE.WEB,\n taroVersion: process.env.TARO_VERSION || 'unknown',\n designWidth: config.designWidth,\n }\n}\n\ntaro.requirePlugin = requirePlugin\ntaro.getApp = getApp\ntaro.pxTransform = pxTransform\ntaro.initPxTransform = initPxTransform\ntaro.canIUseWebp = canIUseWebp\ntaro.getAppInfo = getAppInfo\n\nexport default taro\n\nexport {\n Behavior,\n canIUseWebp,\n Current,\n ENV_TYPE,\n eventCenter,\n Events,\n getAppInfo,\n getEnv,\n history,\n initPxTransform,\n interceptor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G,WAAW,CAAA;AAC9B,IAAI,CAAC,UAAU,GAAG,UAAU;;;;"}
@@ -0,0 +1,2 @@
1
+ declare const worklet: any;
2
+ export { worklet };
@@ -0,0 +1,24 @@
1
+ import { temporarilyNotSupport } from '../../../utils/index.js';
2
+
3
+ const createNotSupportedObject = (obj, methods) => {
4
+ methods.forEach(method => {
5
+ Object.defineProperty(obj, method, {
6
+ get: () => temporarilyNotSupport(method)
7
+ });
8
+ });
9
+ return obj;
10
+ };
11
+ const easingMethods = [
12
+ 'bounce', 'ease', 'elastic', 'linear', 'quad', 'cubic', 'poly',
13
+ 'bezier', 'circle', 'sin', 'exp', 'in', 'out', 'inOut'
14
+ ];
15
+ const workletMethods = [
16
+ 'cancelAnimation', 'derived', 'shared', 'decay', 'spring',
17
+ 'timing', 'delay', 'repeat', 'sequence', 'runOnJS', 'runOnUI'
18
+ ];
19
+ const worklet = createNotSupportedObject({}, workletMethods);
20
+ worklet.Easing = createNotSupportedObject({}, easingMethods);
21
+ worklet.scrollViewContext = createNotSupportedObject({}, ['scrollTo']);
22
+
23
+ export { worklet };
24
+ //# sourceMappingURL=worklet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worklet.js","sources":["../../../../src/api/ui/animation/worklet.ts"],"sourcesContent":["import { temporarilyNotSupport } from '../../../utils'\n\nconst createNotSupportedObject = (obj, methods) => {\n methods.forEach(method => {\n Object.defineProperty(obj, method, {\n get: () => temporarilyNotSupport(method)\n })\n })\n return obj\n}\n\nconst easingMethods = [\n 'bounce', 'ease', 'elastic', 'linear', 'quad', 'cubic', 'poly',\n 'bezier', 'circle', 'sin', 'exp', 'in', 'out', 'inOut'\n]\n\nconst workletMethods = [\n 'cancelAnimation', 'derived', 'shared', 'decay', 'spring',\n 'timing', 'delay', 'repeat', 'sequence', 'runOnJS', 'runOnUI'\n]\n\nconst worklet = createNotSupportedObject({}, workletMethods)\n\nworklet.Easing = createNotSupportedObject({}, easingMethods)\n\nworklet.scrollViewContext = createNotSupportedObject({}, ['scrollTo'])\n\nexport {\n worklet\n}\n"],"names":[],"mappings":";;AAEA,MAAM,wBAAwB,GAAG,CAAC,GAAG,EAAE,OAAO,KAAI;AAChD,IAAA,OAAO,CAAC,OAAO,CAAC,MAAM,IAAG;AACvB,QAAA,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE;AACjC,YAAA,GAAG,EAAE,MAAM,qBAAqB,CAAC,MAAM,CAAC;AACzC,SAAA,CAAC,CAAA;AACJ,KAAC,CAAC,CAAA;AACF,IAAA,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAED,MAAM,aAAa,GAAG;IACpB,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;IAC9D,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO;CACvD,CAAA;AAED,MAAM,cAAc,GAAG;AACrB,IAAA,iBAAiB,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ;IACzD,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS;CAC9D,CAAA;AAEK,MAAA,OAAO,GAAG,wBAAwB,CAAC,EAAE,EAAE,cAAc,EAAC;AAE5D,OAAO,CAAC,MAAM,GAAG,wBAAwB,CAAC,EAAE,EAAE,aAAa,CAAC,CAAA;AAE5D,OAAO,CAAC,iBAAiB,GAAG,wBAAwB,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC;;;;"}
@@ -1,4 +1,5 @@
1
1
  export * from "./animation/index.js";
2
+ export * from "./animation/worklet.js";
2
3
  export * from "./background.js";
3
4
  export * from "./custom-component.js";
4
5
  export * from "./fonts.js";
@@ -1,4 +1,5 @@
1
1
  export { createAnimation } from './animation/index.js';
2
+ export { worklet } from './animation/worklet.js';
2
3
  export { setBackgroundColor, setBackgroundTextStyle } from './background.js';
3
4
  export { nextTick } from './custom-component.js';
4
5
  export { loadFontFace } from './fonts.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -2,7 +2,10 @@ import Taro from "@tarojs/api";
2
2
  import { AppConfig } from "@tarojs/api";
3
3
  import { history } from "@tarojs/router";
4
4
  declare const Behavior: any, getEnv: any, ENV_TYPE: any, Link: any, interceptors: any, interceptorify: any, Current: any, options: any, eventCenter: any, Events: any, preload: any;
5
- declare const taro: typeof Taro;
5
+ type ModifiedTaro = Omit<typeof Taro, "router"> & {
6
+ router: any;
7
+ };
8
+ declare const taro: ModifiedTaro;
6
9
  declare const requirePlugin: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
7
10
  declare const initPxTransform: ({ designWidth, deviceRatio, baseFontSize, unitPrecision, targetUnit }: {
8
11
  designWidth?: number | undefined;
@@ -692,6 +695,11 @@ declare const addRecentColorSign: (option?: {}, ...args: any[]) => Promise<Parti
692
695
  declare const getGuildInfo: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
693
696
  declare const applyAddToMyApps: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
694
697
  declare const isAddedToMyApps: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
698
+ declare const router: {
699
+ addRouteBuilder: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
700
+ getRouteContext: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
701
+ removeRouteBuilder: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
702
+ };
695
703
  // 转发
696
704
  /** 更新转发属性 */
697
705
  declare const updateShareMenu: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
@@ -764,6 +772,7 @@ declare const navigateBackSmartProgram: (option?: {}, ...args: any[]) => Promise
764
772
  declare const preloadSubPackage: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
765
773
  // h5 的 createAnimation
766
774
  declare const createAnimation: typeof Taro.createAnimation;
775
+ declare const worklet: any;
767
776
  // 背景
768
777
  declare const setBackgroundTextStyle: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
769
778
  declare const setBackgroundColor: (option?: {}, ...args: any[]) => Promise<Partial<TaroGeneral.CallbackResult> & Record<string, unknown> & TaroGeneral.CallbackResult>;
@@ -894,5 +903,5 @@ declare class NodesRef implements Taro.NodesRef {
894
903
  declare const createSelectorQuery: typeof Taro.createSelectorQuery;
895
904
  declare const createIntersectionObserver: typeof Taro.createIntersectionObserver;
896
905
  declare const createMediaQueryObserver: typeof Taro.createMediaQueryObserver;
897
- export { taro as default, taro, createRewardedVideoAd, createInterstitialAd, stopFaceDetect, initFaceDetect, faceDetect, getInferenceEnvInfo, createInferenceSession, isVKSupport, createVKSession, getOpenUserInfo, tradePay, env, arrayBufferToBase64, base64ToArrayBuffer, getUserCryptoManager, setEnableDebug, getRealtimeLogManager, getLogManager, reportPerformance, getPerformance, preloadWebview, preloadSkylineView, preloadAssets, openSystemBluetoothSetting, openAppAuthorizeSetting, getWindowInfo, getSystemSetting, getDeviceInfo, getAppBaseInfo, getAppAuthorizeSetting, getSystemInfoSync, getSystemInfoAsync, getSystemInfo, getSkylineInfoSync, getSkylineInfo, getRendererUserAgent, updateWeChatApp, getUpdateManager, onUnhandledRejection, onThemeChange, onPageNotFound, onLazyLoadError, onError, onAudioInterruptionEnd, onAudioInterruptionBegin, onAppShow, onAppHide, offUnhandledRejection, offThemeChange, offPageNotFound, offLazyLoadError, offError, offAudioInterruptionEnd, offAudioInterruptionBegin, offAppShow, offAppHide, getLaunchOptionsSync, getEnterOptionsSync, createOffscreenCanvas, createCanvasContext, canvasToTempFilePath, canvasPutImageData, canvasGetImageData, cloud, reportMonitor, reportAnalytics, reportEvent, getExptInfoSync, stopAccelerometer, startAccelerometer, onAccelerometerChange, offAccelerometerChange, checkIsOpenAccessibility, getBatteryInfoSync, getBatteryInfo, stopBluetoothDevicesDiscovery, startBluetoothDevicesDiscovery, openBluetoothAdapter, onBluetoothDeviceFound, onBluetoothAdapterStateChange, offBluetoothDeviceFound, offBluetoothAdapterStateChange, makeBluetoothPair, isBluetoothDevicePaired, getConnectedBluetoothDevices, getBluetoothDevices, getBluetoothAdapterState, closeBluetoothAdapter, writeBLECharacteristicValue, setBLEMTU, readBLECharacteristicValue, onBLEMTUChange, onBLEConnectionStateChange, onBLECharacteristicValueChange, offBLEMTUChange, offBLEConnectionStateChange, offBLECharacteristicValueChange, notifyBLECharacteristicValueChange, getBLEMTU, getBLEDeviceServices, getBLEDeviceRSSI, getBLEDeviceCharacteristics, createBLEConnection, closeBLEConnection, onBLEPeripheralConnectionStateChanged, offBLEPeripheralConnectionStateChanged, createBLEPeripheralServer, addPhoneRepeatCalendar, addPhoneCalendar, setClipboardData, getClipboardData, stopCompass, startCompass, onCompassChange, offCompassChange, chooseContact, addPhoneContact, getRandomValues, stopGyroscope, startGyroscope, onGyroscopeChange, offGyroscopeChange, stopBeaconDiscovery, startBeaconDiscovery, onBeaconUpdate, onBeaconServiceChange, offBeaconUpdate, offBeaconServiceChange, getBeacons, onKeyboardHeightChange, offKeyboardHeightChange, hideKeyboard, getSelectedTextRange, onMemoryWarning, offMemoryWarning, stopDeviceMotionListening, startDeviceMotionListening, onDeviceMotionChange, offDeviceMotionChange, getNetworkType, onNetworkWeakChange, onNetworkStatusChange, offNetworkWeakChange, offNetworkStatusChange, getLocalIPAddress, stopHCE, startHCE, sendHCEMessage, onHCEMessage, offHCEMessage, getNFCAdapter, getHCEState, makePhoneCall, scanCode, setVisualEffectOnCapture, setScreenBrightness, setKeepScreenOn, onUserCaptureScreen, offUserCaptureScreen, getScreenBrightness, onScreenRecordingStateChanged, offScreenRecordingStateChanged, getScreenRecordingState, sendSms, vibrateShort, vibrateLong, stopWifi, startWifi, setWifiList, onWifiConnectedWithPartialInfo, onWifiConnected, onGetWifiList, offWifiConnectedWithPartialInfo, offWifiConnected, offGetWifiList, getWifiList, getConnectedWifi, connectWifi, getExtConfigSync, getExtConfig, saveFileToDisk, saveFile, removeSavedFile, openDocument, getSavedFileList, getSavedFileInfo, getFileSystemManager, getFileInfo, getApp, getCurrentInstance, startLocationUpdateBackground, openLocation, getLocation, choosePoi, getFuzzyLocation, chooseLocation, offLocationChange, offLocationChangeError, onLocationChange, onLocationChangeError, startLocationUpdate, stopLocationUpdate, stopVoice, setInnerAudioOption, playVoice, pauseVoice, getAvailableAudioSources, createWebAudioContext, createMediaAudioPlayer, createInnerAudioContext, createAudioContext, stopBackgroundAudio, seekBackgroundAudio, playBackgroundAudio, pauseBackgroundAudio, onBackgroundAudioStop, onBackgroundAudioPlay, onBackgroundAudioPause, getBackgroundAudioPlayerState, getBackgroundAudioManager, createCameraContext, saveImageToPhotosAlbum, previewMedia, getImageInfo, previewImage, compressImage, chooseMessageFile, chooseImage, editImage, cropImage, createLivePusherContext, createLivePlayerContext, createMapContext, createMediaRecorder, stopRecord, startRecord, getRecorderManager, saveVideoToPhotosAlbum, openVideoEditor, getVideoInfo, createVideoContext, compressVideo, chooseMedia, chooseVideo, createVideoDecoder, createMediaContainer, updateVoIPChatMuteConfig, subscribeVoIPVideoMembers, setEnable1v1Chat, onVoIPVideoMembersChanged, onVoIPChatStateChanged, onVoIPChatSpeakersChanged, onVoIPChatMembersChanged, onVoIPChatInterrupted, offVoIPChatSpeakersChanged, offVoIPVideoMembersChanged, offVoIPChatStateChanged, offVoIPChatMembersChanged, offVoIPChatInterrupted, joinVoIPChat, join1v1Chat, exitVoIPChat, openEmbeddedMiniProgram, navigateToMiniProgram, navigateBackMiniProgram, exitMiniProgram, openBusinessView, downloadFile, stopLocalServiceDiscovery, startLocalServiceDiscovery, onLocalServiceResolveFail, onLocalServiceLost, onLocalServiceFound, onLocalServiceDiscoveryStop, offLocalServiceResolveFail, offLocalServiceLost, offLocalServiceFound, offLocalServiceDiscoveryStop, request, addInterceptor, cleanInterceptors, createTCPSocket, createUDPSocket, uploadFile, sendSocketMessage, onSocketOpen, onSocketMessage, onSocketError, onSocketClose, connectSocket, closeSocket, SocketTask, getAccountInfoSync, chooseAddress, authorizeForMiniProgram, authorize, openCard, addCard, reserveChannelsLive, openChannelsUserProfile, openChannelsLive, openChannelsEvent, openChannelsActivity, getChannelsShareKey, getChannelsLiveNoticeInfo, getChannelsLiveInfo, openCustomerServiceChat, requestDeviceVoIP, getDeviceVoIPList, checkIsSupportFacialRecognition, startFacialRecognitionVerify, startFacialRecognitionVerifyAndUploadVideo, faceVerifyForPay, addVideoToFavorites, addFileToFavorites, getGroupEnterInfo, chooseInvoiceTitle, chooseInvoice, chooseLicensePlate, pluginLogin, login, checkSession, checkIsAddedToMyMiniProgram, requirePrivacyAuthorize, openPrivacyContract, onNeedPrivacyAuthorization, getPrivacySetting, showRedPackage, openSetting, getSetting, startSoterAuthentication, checkIsSupportSoterAuthentication, checkIsSoterEnrolledInDevice, requestSubscribeMessage, requestSubscribeDeviceMessage, getUserProfile, getUserInfo, shareToWeRun, getWeRunData, requestPayment, requestPluginPayment, requestOrderPayment, openQzonePublish, getQQRunData, setOfficialDress, setCustomDress, updateQQApp, addRecentColorSign, getGuildInfo, applyAddToMyApps, isAddedToMyApps, updateShareMenu, showShareMenu, showShareImageMenu, shareVideoMessage, shareFileMessage, onCopyUrl, offCopyUrl, hideShareMenu, getShareInfo, authPrivateMessage, setStorageSync, setStorage, revokeBufferURL, removeStorageSync, removeStorage, getStorageSync, getStorageInfoSync, getStorageInfo, getStorage, createBufferURL, clearStorageSync, clearStorage, batchSetStorageSync, batchSetStorage, batchGetStorageSync, batchGetStorage, setBackgroundFetchToken, onBackgroundFetchData, getBackgroundFetchToken, getBackgroundFetchData, createCacheManager, setPageInfo, ocrIdCard, ocrBankCard, ocrDrivingLicense, ocrVehicleLicense, textReview, textToAudio, imageAudit, advancedGeneralIdentify, objectDetectIdentify, carClassify, dishClassify, logoClassify, animalClassify, plantClassify, getSwanId, requestPolymerPayment, navigateToSmartGameProgram, navigateToSmartProgram, navigateBackSmartProgram, preloadSubPackage, createAnimation, setBackgroundTextStyle, setBackgroundColor, nextTick, loadFontFace, disableAlertBeforeUnload, enableAlertBeforeUnload, hideLoading, hideToast, showActionSheet, showLoading, showModal, showToast, getMenuButtonBoundingClientRect, showNavigationBarLoading, setNavigationBarTitle, setNavigationBarColor, hideNavigationBarLoading, hideHomeButton, startPullDownRefresh, stopPullDownRefresh, pageScrollTo, setTopBarText, initTabBarApis, showTabBarRedDot, showTabBar, setTabBarStyle, setTabBarItem, setTabBarBadge, removeTabBarBadge, hideTabBarRedDot, hideTabBar, setWindowSize, onWindowResize, offWindowResize, checkIsPictureInPictureActive, createWorker, createSelectorQuery, createIntersectionObserver, createMediaQueryObserver, NodesRef, Behavior, canIUseWebp, Current, ENV_TYPE, eventCenter, Events, getAppInfo, getEnv, history, initPxTransform, interceptorify, interceptors, Link, options, preload, pxTransform, requirePlugin };
906
+ export { taro as default, taro, createRewardedVideoAd, createInterstitialAd, stopFaceDetect, initFaceDetect, faceDetect, getInferenceEnvInfo, createInferenceSession, isVKSupport, createVKSession, getOpenUserInfo, tradePay, env, arrayBufferToBase64, base64ToArrayBuffer, getUserCryptoManager, setEnableDebug, getRealtimeLogManager, getLogManager, reportPerformance, getPerformance, preloadWebview, preloadSkylineView, preloadAssets, openSystemBluetoothSetting, openAppAuthorizeSetting, getWindowInfo, getSystemSetting, getDeviceInfo, getAppBaseInfo, getAppAuthorizeSetting, getSystemInfoSync, getSystemInfoAsync, getSystemInfo, getSkylineInfoSync, getSkylineInfo, getRendererUserAgent, updateWeChatApp, getUpdateManager, onUnhandledRejection, onThemeChange, onPageNotFound, onLazyLoadError, onError, onAudioInterruptionEnd, onAudioInterruptionBegin, onAppShow, onAppHide, offUnhandledRejection, offThemeChange, offPageNotFound, offLazyLoadError, offError, offAudioInterruptionEnd, offAudioInterruptionBegin, offAppShow, offAppHide, getLaunchOptionsSync, getEnterOptionsSync, createOffscreenCanvas, createCanvasContext, canvasToTempFilePath, canvasPutImageData, canvasGetImageData, cloud, reportMonitor, reportAnalytics, reportEvent, getExptInfoSync, stopAccelerometer, startAccelerometer, onAccelerometerChange, offAccelerometerChange, checkIsOpenAccessibility, getBatteryInfoSync, getBatteryInfo, stopBluetoothDevicesDiscovery, startBluetoothDevicesDiscovery, openBluetoothAdapter, onBluetoothDeviceFound, onBluetoothAdapterStateChange, offBluetoothDeviceFound, offBluetoothAdapterStateChange, makeBluetoothPair, isBluetoothDevicePaired, getConnectedBluetoothDevices, getBluetoothDevices, getBluetoothAdapterState, closeBluetoothAdapter, writeBLECharacteristicValue, setBLEMTU, readBLECharacteristicValue, onBLEMTUChange, onBLEConnectionStateChange, onBLECharacteristicValueChange, offBLEMTUChange, offBLEConnectionStateChange, offBLECharacteristicValueChange, notifyBLECharacteristicValueChange, getBLEMTU, getBLEDeviceServices, getBLEDeviceRSSI, getBLEDeviceCharacteristics, createBLEConnection, closeBLEConnection, onBLEPeripheralConnectionStateChanged, offBLEPeripheralConnectionStateChanged, createBLEPeripheralServer, addPhoneRepeatCalendar, addPhoneCalendar, setClipboardData, getClipboardData, stopCompass, startCompass, onCompassChange, offCompassChange, chooseContact, addPhoneContact, getRandomValues, stopGyroscope, startGyroscope, onGyroscopeChange, offGyroscopeChange, stopBeaconDiscovery, startBeaconDiscovery, onBeaconUpdate, onBeaconServiceChange, offBeaconUpdate, offBeaconServiceChange, getBeacons, onKeyboardHeightChange, offKeyboardHeightChange, hideKeyboard, getSelectedTextRange, onMemoryWarning, offMemoryWarning, stopDeviceMotionListening, startDeviceMotionListening, onDeviceMotionChange, offDeviceMotionChange, getNetworkType, onNetworkWeakChange, onNetworkStatusChange, offNetworkWeakChange, offNetworkStatusChange, getLocalIPAddress, stopHCE, startHCE, sendHCEMessage, onHCEMessage, offHCEMessage, getNFCAdapter, getHCEState, makePhoneCall, scanCode, setVisualEffectOnCapture, setScreenBrightness, setKeepScreenOn, onUserCaptureScreen, offUserCaptureScreen, getScreenBrightness, onScreenRecordingStateChanged, offScreenRecordingStateChanged, getScreenRecordingState, sendSms, vibrateShort, vibrateLong, stopWifi, startWifi, setWifiList, onWifiConnectedWithPartialInfo, onWifiConnected, onGetWifiList, offWifiConnectedWithPartialInfo, offWifiConnected, offGetWifiList, getWifiList, getConnectedWifi, connectWifi, getExtConfigSync, getExtConfig, saveFileToDisk, saveFile, removeSavedFile, openDocument, getSavedFileList, getSavedFileInfo, getFileSystemManager, getFileInfo, getApp, getCurrentInstance, startLocationUpdateBackground, openLocation, getLocation, choosePoi, getFuzzyLocation, chooseLocation, offLocationChange, offLocationChangeError, onLocationChange, onLocationChangeError, startLocationUpdate, stopLocationUpdate, stopVoice, setInnerAudioOption, playVoice, pauseVoice, getAvailableAudioSources, createWebAudioContext, createMediaAudioPlayer, createInnerAudioContext, createAudioContext, stopBackgroundAudio, seekBackgroundAudio, playBackgroundAudio, pauseBackgroundAudio, onBackgroundAudioStop, onBackgroundAudioPlay, onBackgroundAudioPause, getBackgroundAudioPlayerState, getBackgroundAudioManager, createCameraContext, saveImageToPhotosAlbum, previewMedia, getImageInfo, previewImage, compressImage, chooseMessageFile, chooseImage, editImage, cropImage, createLivePusherContext, createLivePlayerContext, createMapContext, createMediaRecorder, stopRecord, startRecord, getRecorderManager, saveVideoToPhotosAlbum, openVideoEditor, getVideoInfo, createVideoContext, compressVideo, chooseMedia, chooseVideo, createVideoDecoder, createMediaContainer, updateVoIPChatMuteConfig, subscribeVoIPVideoMembers, setEnable1v1Chat, onVoIPVideoMembersChanged, onVoIPChatStateChanged, onVoIPChatSpeakersChanged, onVoIPChatMembersChanged, onVoIPChatInterrupted, offVoIPChatSpeakersChanged, offVoIPVideoMembersChanged, offVoIPChatStateChanged, offVoIPChatMembersChanged, offVoIPChatInterrupted, joinVoIPChat, join1v1Chat, exitVoIPChat, openEmbeddedMiniProgram, navigateToMiniProgram, navigateBackMiniProgram, exitMiniProgram, openBusinessView, downloadFile, stopLocalServiceDiscovery, startLocalServiceDiscovery, onLocalServiceResolveFail, onLocalServiceLost, onLocalServiceFound, onLocalServiceDiscoveryStop, offLocalServiceResolveFail, offLocalServiceLost, offLocalServiceFound, offLocalServiceDiscoveryStop, request, addInterceptor, cleanInterceptors, createTCPSocket, createUDPSocket, uploadFile, sendSocketMessage, onSocketOpen, onSocketMessage, onSocketError, onSocketClose, connectSocket, closeSocket, SocketTask, getAccountInfoSync, chooseAddress, authorizeForMiniProgram, authorize, openCard, addCard, reserveChannelsLive, openChannelsUserProfile, openChannelsLive, openChannelsEvent, openChannelsActivity, getChannelsShareKey, getChannelsLiveNoticeInfo, getChannelsLiveInfo, openCustomerServiceChat, requestDeviceVoIP, getDeviceVoIPList, checkIsSupportFacialRecognition, startFacialRecognitionVerify, startFacialRecognitionVerifyAndUploadVideo, faceVerifyForPay, addVideoToFavorites, addFileToFavorites, getGroupEnterInfo, chooseInvoiceTitle, chooseInvoice, chooseLicensePlate, pluginLogin, login, checkSession, checkIsAddedToMyMiniProgram, requirePrivacyAuthorize, openPrivacyContract, onNeedPrivacyAuthorization, getPrivacySetting, showRedPackage, openSetting, getSetting, startSoterAuthentication, checkIsSupportSoterAuthentication, checkIsSoterEnrolledInDevice, requestSubscribeMessage, requestSubscribeDeviceMessage, getUserProfile, getUserInfo, shareToWeRun, getWeRunData, requestPayment, requestPluginPayment, requestOrderPayment, openQzonePublish, getQQRunData, setOfficialDress, setCustomDress, updateQQApp, addRecentColorSign, getGuildInfo, applyAddToMyApps, isAddedToMyApps, router, updateShareMenu, showShareMenu, showShareImageMenu, shareVideoMessage, shareFileMessage, onCopyUrl, offCopyUrl, hideShareMenu, getShareInfo, authPrivateMessage, setStorageSync, setStorage, revokeBufferURL, removeStorageSync, removeStorage, getStorageSync, getStorageInfoSync, getStorageInfo, getStorage, createBufferURL, clearStorageSync, clearStorage, batchSetStorageSync, batchSetStorage, batchGetStorageSync, batchGetStorage, setBackgroundFetchToken, onBackgroundFetchData, getBackgroundFetchToken, getBackgroundFetchData, createCacheManager, setPageInfo, ocrIdCard, ocrBankCard, ocrDrivingLicense, ocrVehicleLicense, textReview, textToAudio, imageAudit, advancedGeneralIdentify, objectDetectIdentify, carClassify, dishClassify, logoClassify, animalClassify, plantClassify, getSwanId, requestPolymerPayment, navigateToSmartGameProgram, navigateToSmartProgram, navigateBackSmartProgram, preloadSubPackage, createAnimation, worklet, setBackgroundTextStyle, setBackgroundColor, nextTick, loadFontFace, disableAlertBeforeUnload, enableAlertBeforeUnload, hideLoading, hideToast, showActionSheet, showLoading, showModal, showToast, getMenuButtonBoundingClientRect, showNavigationBarLoading, setNavigationBarTitle, setNavigationBarColor, hideNavigationBarLoading, hideHomeButton, startPullDownRefresh, stopPullDownRefresh, pageScrollTo, setTopBarText, initTabBarApis, showTabBarRedDot, showTabBar, setTabBarStyle, setTabBarItem, setTabBarBadge, removeTabBarBadge, hideTabBarRedDot, hideTabBar, setWindowSize, onWindowResize, offWindowResize, checkIsPictureInPictureActive, createWorker, createSelectorQuery, createIntersectionObserver, createMediaQueryObserver, NodesRef, Behavior, canIUseWebp, Current, ENV_TYPE, eventCenter, Events, getAppInfo, getEnv, history, initPxTransform, interceptorify, interceptors, Link, options, preload, pxTransform, requirePlugin };
898
907
  export { getCurrentPages, navigateBack, navigateTo, redirectTo, reLaunch, switchTab } from "@tarojs/router";
package/dist/index.cjs.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var Taro = require('@tarojs/api');
6
- var router = require('@tarojs/router');
6
+ var router$1 = require('@tarojs/router');
7
7
  var shared = require('@tarojs/shared');
8
8
  var runtime = require('@tarojs/runtime');
9
9
  var base64Js = require('base64-js');
@@ -3799,6 +3799,26 @@ const createAnimation = (option) => {
3799
3799
  return new Animation(option);
3800
3800
  };
3801
3801
 
3802
+ const createNotSupportedObject = (obj, methods) => {
3803
+ methods.forEach(method => {
3804
+ Object.defineProperty(obj, method, {
3805
+ get: () => temporarilyNotSupport(method)
3806
+ });
3807
+ });
3808
+ return obj;
3809
+ };
3810
+ const easingMethods = [
3811
+ 'bounce', 'ease', 'elastic', 'linear', 'quad', 'cubic', 'poly',
3812
+ 'bezier', 'circle', 'sin', 'exp', 'in', 'out', 'inOut'
3813
+ ];
3814
+ const workletMethods = [
3815
+ 'cancelAnimation', 'derived', 'shared', 'decay', 'spring',
3816
+ 'timing', 'delay', 'repeat', 'sequence', 'runOnJS', 'runOnUI'
3817
+ ];
3818
+ const worklet = createNotSupportedObject({}, workletMethods);
3819
+ worklet.Easing = createNotSupportedObject({}, easingMethods);
3820
+ worklet.scrollViewContext = createNotSupportedObject({}, ['scrollTo']);
3821
+
3802
3822
  // 背景
3803
3823
  const setBackgroundTextStyle = /* @__PURE__ */ temporarilyNotSupport('setBackgroundTextStyle');
3804
3824
  const setBackgroundColor = /* @__PURE__ */ temporarilyNotSupport('setBackgroundColor');
@@ -3868,7 +3888,7 @@ const getMenuButtonBoundingClientRect = /* @__PURE__ */ temporarilyNotSupport('g
3868
3888
  function showNavigationBarLoading(options = {}) {
3869
3889
  const { success, fail, complete } = options;
3870
3890
  const handle = new MethodHandler({ name: 'showNavigationBarLoading', success, fail, complete });
3871
- router.setNavigationBarLoading(true);
3891
+ router$1.setNavigationBarLoading(true);
3872
3892
  return handle.success();
3873
3893
  }
3874
3894
  function setNavigationBarTitle(options) {
@@ -3890,7 +3910,7 @@ function setNavigationBarTitle(options) {
3890
3910
  })
3891
3911
  });
3892
3912
  }
3893
- router.setTitle(title);
3913
+ router$1.setTitle(title);
3894
3914
  return handle.success();
3895
3915
  }
3896
3916
  /**
@@ -3903,7 +3923,7 @@ const setNavigationBarColor = (options) => {
3903
3923
  meta.setAttribute('name', 'theme-color');
3904
3924
  meta.setAttribute('content', backgroundColor);
3905
3925
  document.head.appendChild(meta);
3906
- router.setNavigationBarStyle({ frontColor, backgroundColor });
3926
+ router$1.setNavigationBarStyle({ frontColor, backgroundColor });
3907
3927
  return handle.success();
3908
3928
  };
3909
3929
  /**
@@ -3912,7 +3932,7 @@ const setNavigationBarColor = (options) => {
3912
3932
  function hideNavigationBarLoading(options = {}) {
3913
3933
  const { success, fail, complete } = options;
3914
3934
  const handle = new MethodHandler({ name: 'hideNavigationBarLoading', success, fail, complete });
3915
- router.setNavigationBarLoading(false);
3935
+ router$1.setNavigationBarLoading(false);
3916
3936
  return handle.success();
3917
3937
  }
3918
3938
  const hideHomeButton = /* @__PURE__ */ temporarilyNotSupport('hideHomeButton');
@@ -5541,7 +5561,11 @@ const getGuildInfo = /* @__PURE__ */ temporarilyNotSupport('getGuildInfo');
5541
5561
  const applyAddToMyApps = /* @__PURE__ */ temporarilyNotSupport('applyAddToMyApps');
5542
5562
  const isAddedToMyApps = /* @__PURE__ */ temporarilyNotSupport('isAddedToMyApps');
5543
5563
 
5544
- // 路由
5564
+ const router = {
5565
+ addRouteBuilder: /* @__PURE__ */ temporarilyNotSupport('addRouteBuilder'),
5566
+ getRouteContext: /* @__PURE__ */ temporarilyNotSupport('getRouteContext'),
5567
+ removeRouteBuilder: /* @__PURE__ */ temporarilyNotSupport('removeRouteBuilder')
5568
+ };
5545
5569
  // FIXME 方法导出类型未对齐,后续修复
5546
5570
 
5547
5571
  // 转发
@@ -6029,13 +6053,15 @@ const taro = {
6029
6053
  eventCenter,
6030
6054
  Events,
6031
6055
  preload,
6032
- history: router.history,
6033
- navigateBack: router.navigateBack,
6034
- navigateTo: router.navigateTo,
6035
- reLaunch: router.reLaunch,
6036
- redirectTo: router.redirectTo,
6037
- getCurrentPages: router.getCurrentPages,
6038
- switchTab: router.switchTab
6056
+ history: router$1.history,
6057
+ navigateBack: router$1.navigateBack,
6058
+ navigateTo: router$1.navigateTo,
6059
+ reLaunch: router$1.reLaunch,
6060
+ redirectTo: router$1.redirectTo,
6061
+ getCurrentPages: router$1.getCurrentPages,
6062
+ switchTab: router$1.switchTab,
6063
+ router,
6064
+ worklet,
6039
6065
  };
6040
6066
  const requirePlugin = /* @__PURE__ */ permanentlyNotSupport('requirePlugin');
6041
6067
  function getConfig() {
@@ -6114,31 +6140,31 @@ taro.getAppInfo = getAppInfo;
6114
6140
 
6115
6141
  Object.defineProperty(exports, 'getCurrentPages', {
6116
6142
  enumerable: true,
6117
- get: function () { return router.getCurrentPages; }
6143
+ get: function () { return router$1.getCurrentPages; }
6118
6144
  });
6119
6145
  Object.defineProperty(exports, 'history', {
6120
6146
  enumerable: true,
6121
- get: function () { return router.history; }
6147
+ get: function () { return router$1.history; }
6122
6148
  });
6123
6149
  Object.defineProperty(exports, 'navigateBack', {
6124
6150
  enumerable: true,
6125
- get: function () { return router.navigateBack; }
6151
+ get: function () { return router$1.navigateBack; }
6126
6152
  });
6127
6153
  Object.defineProperty(exports, 'navigateTo', {
6128
6154
  enumerable: true,
6129
- get: function () { return router.navigateTo; }
6155
+ get: function () { return router$1.navigateTo; }
6130
6156
  });
6131
6157
  Object.defineProperty(exports, 'reLaunch', {
6132
6158
  enumerable: true,
6133
- get: function () { return router.reLaunch; }
6159
+ get: function () { return router$1.reLaunch; }
6134
6160
  });
6135
6161
  Object.defineProperty(exports, 'redirectTo', {
6136
6162
  enumerable: true,
6137
- get: function () { return router.redirectTo; }
6163
+ get: function () { return router$1.redirectTo; }
6138
6164
  });
6139
6165
  Object.defineProperty(exports, 'switchTab', {
6140
6166
  enumerable: true,
6141
- get: function () { return router.switchTab; }
6167
+ get: function () { return router$1.switchTab; }
6142
6168
  });
6143
6169
  exports.Behavior = Behavior;
6144
6170
  exports.Current = Current;
@@ -6512,6 +6538,7 @@ exports.requirePlugin = requirePlugin;
6512
6538
  exports.requirePrivacyAuthorize = requirePrivacyAuthorize;
6513
6539
  exports.reserveChannelsLive = reserveChannelsLive;
6514
6540
  exports.revokeBufferURL = revokeBufferURL;
6541
+ exports.router = router;
6515
6542
  exports.saveFile = saveFile;
6516
6543
  exports.saveFileToDisk = saveFileToDisk;
6517
6544
  exports.saveImageToPhotosAlbum = saveImageToPhotosAlbum;
@@ -6600,5 +6627,6 @@ exports.updateWeChatApp = updateWeChatApp;
6600
6627
  exports.uploadFile = uploadFile;
6601
6628
  exports.vibrateLong = vibrateLong;
6602
6629
  exports.vibrateShort = vibrateShort;
6630
+ exports.worklet = worklet;
6603
6631
  exports.writeBLECharacteristicValue = writeBLECharacteristicValue;
6604
6632
  //# sourceMappingURL=index.cjs.js.map