@weapp-vite/web 1.3.16 → 1.3.18

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.
Files changed (83) hide show
  1. package/README.md +2 -2
  2. package/dist/compiler/wxml/attributes.mjs +6 -6
  3. package/dist/compiler/wxml/attributes.mjs.map +1 -1
  4. package/dist/compiler/wxml/renderer.mjs +6 -6
  5. package/dist/compiler/wxml/renderer.mjs.map +1 -1
  6. package/dist/compiler/wxml/specialNodes.mjs +6 -5
  7. package/dist/compiler/wxml/specialNodes.mjs.map +1 -1
  8. package/dist/plugin/files.mjs +1 -1
  9. package/dist/plugin/files.mjs.map +1 -1
  10. package/dist/runtime/component/constants.mjs +7 -2
  11. package/dist/runtime/component/constants.mjs.map +1 -1
  12. package/dist/runtime/component/dom.mjs +9 -3
  13. package/dist/runtime/component/dom.mjs.map +1 -1
  14. package/dist/runtime/component/events.mjs +5 -4
  15. package/dist/runtime/component/events.mjs.map +1 -1
  16. package/dist/runtime/legacyTemplate/dom.mjs +10 -65
  17. package/dist/runtime/legacyTemplate/dom.mjs.map +1 -1
  18. package/dist/runtime/legacyTemplate/index.mjs +7 -6
  19. package/dist/runtime/legacyTemplate/index.mjs.map +1 -1
  20. package/dist/runtime/polyfill/async.mjs +3 -3
  21. package/dist/runtime/polyfill/async.mjs.map +1 -1
  22. package/dist/runtime/polyfill/authApi.mjs +16 -16
  23. package/dist/runtime/polyfill/authApi.mjs.map +1 -1
  24. package/dist/runtime/polyfill/background.mjs +4 -4
  25. package/dist/runtime/polyfill/background.mjs.map +1 -1
  26. package/dist/runtime/polyfill/capability.mjs +6 -3
  27. package/dist/runtime/polyfill/capability.mjs.map +1 -1
  28. package/dist/runtime/polyfill/cloud.mjs +3 -3
  29. package/dist/runtime/polyfill/cloud.mjs.map +1 -1
  30. package/dist/runtime/polyfill/deviceApi.mjs +5 -5
  31. package/dist/runtime/polyfill/deviceApi.mjs.map +1 -1
  32. package/dist/runtime/polyfill/deviceAuthSystemApi.d.mts +2 -2
  33. package/dist/runtime/polyfill/deviceAuthSystemApi.mjs.map +1 -1
  34. package/dist/runtime/polyfill/fileSystemManager.mjs +7 -7
  35. package/dist/runtime/polyfill/fileSystemManager.mjs.map +1 -1
  36. package/dist/runtime/polyfill/index.mjs +21 -10
  37. package/dist/runtime/polyfill/index.mjs.map +1 -1
  38. package/dist/runtime/polyfill/interactionApi.mjs +8 -8
  39. package/dist/runtime/polyfill/interactionApi.mjs.map +1 -1
  40. package/dist/runtime/polyfill/locationApi.mjs +21 -21
  41. package/dist/runtime/polyfill/locationApi.mjs.map +1 -1
  42. package/dist/runtime/polyfill/mediaApi/file.mjs +12 -12
  43. package/dist/runtime/polyfill/mediaApi/file.mjs.map +1 -1
  44. package/dist/runtime/polyfill/mediaApi/info.mjs +7 -7
  45. package/dist/runtime/polyfill/mediaApi/info.mjs.map +1 -1
  46. package/dist/runtime/polyfill/mediaApi/picker.mjs +11 -11
  47. package/dist/runtime/polyfill/mediaApi/picker.mjs.map +1 -1
  48. package/dist/runtime/polyfill/mediaApi/preview.mjs +7 -7
  49. package/dist/runtime/polyfill/mediaApi/preview.mjs.map +1 -1
  50. package/dist/runtime/polyfill/mediaApi/process.mjs +6 -6
  51. package/dist/runtime/polyfill/mediaApi/process.mjs.map +1 -1
  52. package/dist/runtime/polyfill/menuApi.mjs +13 -13
  53. package/dist/runtime/polyfill/menuApi.mjs.map +1 -1
  54. package/dist/runtime/polyfill/navigationBarRuntime.mjs +5 -4
  55. package/dist/runtime/polyfill/navigationBarRuntime.mjs.map +1 -1
  56. package/dist/runtime/polyfill/network/requestBridge.mjs +7 -7
  57. package/dist/runtime/polyfill/network/requestBridge.mjs.map +1 -1
  58. package/dist/runtime/polyfill/platformApi.mjs +2 -2
  59. package/dist/runtime/polyfill/platformApi.mjs.map +1 -1
  60. package/dist/runtime/polyfill/runtimeCapabilityApi.mjs +2 -2
  61. package/dist/runtime/polyfill/runtimeCapabilityApi.mjs.map +1 -1
  62. package/dist/runtime/polyfill/runtimeDataApi.d.mts +7 -7
  63. package/dist/runtime/polyfill/runtimeDataApi.mjs +5 -5
  64. package/dist/runtime/polyfill/runtimeDataApi.mjs.map +1 -1
  65. package/dist/runtime/polyfill/runtimeOps.mjs +10 -10
  66. package/dist/runtime/polyfill/runtimeOps.mjs.map +1 -1
  67. package/dist/runtime/polyfill/storageAsync.mjs +12 -12
  68. package/dist/runtime/polyfill/storageAsync.mjs.map +1 -1
  69. package/dist/runtime/polyfill/systemApi.mjs +3 -3
  70. package/dist/runtime/polyfill/systemApi.mjs.map +1 -1
  71. package/dist/runtime/polyfill/types/base.d.mts +5 -5
  72. package/dist/runtime/polyfill/types/common.d.mts +22 -22
  73. package/dist/runtime/polyfill/types/locationRuntime.d.mts +27 -27
  74. package/dist/runtime/polyfill/types/mediaAuth.d.mts +30 -30
  75. package/dist/runtime/polyfill/types/platformRuntime.d.mts +13 -13
  76. package/dist/runtime/polyfill/types/systemAuth.d.mts +11 -11
  77. package/dist/runtime/polyfill/uiFeedback.mjs +4 -4
  78. package/dist/runtime/polyfill/uiFeedback.mjs.map +1 -1
  79. package/dist/runtime/polyfill/uiMediaApi.d.mts +2 -2
  80. package/dist/runtime/polyfill/uiMediaApi.mjs.map +1 -1
  81. package/dist/shared/wxml.mjs +29 -10
  82. package/dist/shared/wxml.mjs.map +1 -1
  83. package/package.json +3 -3
@@ -1,33 +1,33 @@
1
- import { callWxAsyncFailure, callWxAsyncSuccess } from "./async.mjs";
1
+ import { callMiniProgramAsyncFailure, callMiniProgramAsyncSuccess } from "./async.mjs";
2
2
  import { clearStorageSyncInternal, getStorageInfoSyncInternal, getStorageSyncInternal, hasStorageKey, normalizeStorageKey, removeStorageSyncInternal, setStorageSyncInternal } from "./storage.mjs";
3
3
 
4
4
  //#region src/runtime/polyfill/storageAsync.ts
5
5
  function setStorageBridge(options) {
6
6
  const key = normalizeStorageKey(options?.key);
7
7
  if (!key) {
8
- const failure = callWxAsyncFailure(options, "setStorage:fail invalid key");
8
+ const failure = callMiniProgramAsyncFailure(options, "setStorage:fail invalid key");
9
9
  return Promise.reject(failure);
10
10
  }
11
11
  try {
12
12
  setStorageSyncInternal(key, options?.data);
13
13
  } catch (error) {
14
- const failure = callWxAsyncFailure(options, `setStorage:fail ${error instanceof Error ? error.message : String(error)}`);
14
+ const failure = callMiniProgramAsyncFailure(options, `setStorage:fail ${error instanceof Error ? error.message : String(error)}`);
15
15
  return Promise.reject(failure);
16
16
  }
17
- return Promise.resolve(callWxAsyncSuccess(options, { errMsg: "setStorage:ok" }));
17
+ return Promise.resolve(callMiniProgramAsyncSuccess(options, { errMsg: "setStorage:ok" }));
18
18
  }
19
19
  function getStorageBridge(options) {
20
20
  const key = normalizeStorageKey(options?.key);
21
21
  if (!key) {
22
- const failure = callWxAsyncFailure(options, "getStorage:fail invalid key");
22
+ const failure = callMiniProgramAsyncFailure(options, "getStorage:fail invalid key");
23
23
  return Promise.reject(failure);
24
24
  }
25
25
  if (!hasStorageKey(key)) {
26
- const failure = callWxAsyncFailure(options, `getStorage:fail data not found for key ${key}`);
26
+ const failure = callMiniProgramAsyncFailure(options, `getStorage:fail data not found for key ${key}`);
27
27
  return Promise.reject(failure);
28
28
  }
29
29
  const data = getStorageSyncInternal(key);
30
- return Promise.resolve(callWxAsyncSuccess(options, {
30
+ return Promise.resolve(callMiniProgramAsyncSuccess(options, {
31
31
  errMsg: "getStorage:ok",
32
32
  data
33
33
  }));
@@ -35,23 +35,23 @@ function getStorageBridge(options) {
35
35
  function removeStorageBridge(options) {
36
36
  const key = normalizeStorageKey(options?.key);
37
37
  if (!key) {
38
- const failure = callWxAsyncFailure(options, "removeStorage:fail invalid key");
38
+ const failure = callMiniProgramAsyncFailure(options, "removeStorage:fail invalid key");
39
39
  return Promise.reject(failure);
40
40
  }
41
41
  try {
42
42
  removeStorageSyncInternal(key);
43
43
  } catch (error) {
44
- const failure = callWxAsyncFailure(options, `removeStorage:fail ${error instanceof Error ? error.message : String(error)}`);
44
+ const failure = callMiniProgramAsyncFailure(options, `removeStorage:fail ${error instanceof Error ? error.message : String(error)}`);
45
45
  return Promise.reject(failure);
46
46
  }
47
- return Promise.resolve(callWxAsyncSuccess(options, { errMsg: "removeStorage:ok" }));
47
+ return Promise.resolve(callMiniProgramAsyncSuccess(options, { errMsg: "removeStorage:ok" }));
48
48
  }
49
49
  function clearStorageBridge(options) {
50
50
  clearStorageSyncInternal();
51
- return Promise.resolve(callWxAsyncSuccess(options, { errMsg: "clearStorage:ok" }));
51
+ return Promise.resolve(callMiniProgramAsyncSuccess(options, { errMsg: "clearStorage:ok" }));
52
52
  }
53
53
  function getStorageInfoBridge(options) {
54
- return Promise.resolve(callWxAsyncSuccess(options, {
54
+ return Promise.resolve(callMiniProgramAsyncSuccess(options, {
55
55
  ...getStorageInfoSyncInternal(),
56
56
  errMsg: "getStorageInfo:ok"
57
57
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"storageAsync.mjs","names":[],"sources":["../../../src/runtime/polyfill/storageAsync.ts"],"sourcesContent":["import type { WxAsyncOptions, WxBaseResult } from './types/base'\nimport type { GetStorageOptions, RemoveStorageOptions, SetStorageOptions, StorageInfoResult } from './types/common'\nimport {\n callWxAsyncFailure,\n callWxAsyncSuccess,\n} from './async'\nimport {\n clearStorageSyncInternal,\n getStorageInfoSyncInternal,\n getStorageSyncInternal,\n hasStorageKey,\n normalizeStorageKey,\n removeStorageSyncInternal,\n setStorageSyncInternal,\n} from './storage'\n\nexport function setStorageBridge(options?: SetStorageOptions) {\n const key = normalizeStorageKey(options?.key)\n if (!key) {\n const failure = callWxAsyncFailure(options, 'setStorage:fail invalid key')\n return Promise.reject(failure)\n }\n try {\n setStorageSyncInternal(key, options?.data)\n }\n catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n const failure = callWxAsyncFailure(options, `setStorage:fail ${message}`)\n return Promise.reject(failure)\n }\n return Promise.resolve(callWxAsyncSuccess(options, { errMsg: 'setStorage:ok' }))\n}\n\nexport function getStorageBridge(options?: GetStorageOptions) {\n const key = normalizeStorageKey(options?.key)\n if (!key) {\n const failure = callWxAsyncFailure(options, 'getStorage:fail invalid key')\n return Promise.reject(failure)\n }\n if (!hasStorageKey(key)) {\n const failure = callWxAsyncFailure(options, `getStorage:fail data not found for key ${key}`)\n return Promise.reject(failure)\n }\n const data = getStorageSyncInternal(key)\n return Promise.resolve(callWxAsyncSuccess(options, { errMsg: 'getStorage:ok', data }))\n}\n\nexport function removeStorageBridge(options?: RemoveStorageOptions) {\n const key = normalizeStorageKey(options?.key)\n if (!key) {\n const failure = callWxAsyncFailure(options, 'removeStorage:fail invalid key')\n return Promise.reject(failure)\n }\n try {\n removeStorageSyncInternal(key)\n }\n catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n const failure = callWxAsyncFailure(options, `removeStorage:fail ${message}`)\n return Promise.reject(failure)\n }\n return Promise.resolve(callWxAsyncSuccess(options, { errMsg: 'removeStorage:ok' }))\n}\n\nexport function clearStorageBridge(options?: WxAsyncOptions<WxBaseResult>) {\n clearStorageSyncInternal()\n return Promise.resolve(callWxAsyncSuccess(options, { errMsg: 'clearStorage:ok' }))\n}\n\nexport function getStorageInfoBridge(options?: WxAsyncOptions<StorageInfoResult>) {\n return Promise.resolve(callWxAsyncSuccess(options, {\n ...getStorageInfoSyncInternal(),\n errMsg: 'getStorageInfo:ok',\n }))\n}\n"],"mappings":";;;;AAgBA,SAAgB,iBAAiB,SAA6B;CAC5D,MAAM,MAAM,oBAAoB,SAAS,IAAI;AAC7C,KAAI,CAAC,KAAK;EACR,MAAM,UAAU,mBAAmB,SAAS,8BAA8B;AAC1E,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,KAAI;AACF,yBAAuB,KAAK,SAAS,KAAK;UAErC,OAAO;EAEZ,MAAM,UAAU,mBAAmB,SAAS,mBAD5B,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GACG;AACzE,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,QAAO,QAAQ,QAAQ,mBAAmB,SAAS,EAAE,QAAQ,iBAAiB,CAAC,CAAC;;AAGlF,SAAgB,iBAAiB,SAA6B;CAC5D,MAAM,MAAM,oBAAoB,SAAS,IAAI;AAC7C,KAAI,CAAC,KAAK;EACR,MAAM,UAAU,mBAAmB,SAAS,8BAA8B;AAC1E,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,KAAI,CAAC,cAAc,IAAI,EAAE;EACvB,MAAM,UAAU,mBAAmB,SAAS,0CAA0C,MAAM;AAC5F,SAAO,QAAQ,OAAO,QAAQ;;CAEhC,MAAM,OAAO,uBAAuB,IAAI;AACxC,QAAO,QAAQ,QAAQ,mBAAmB,SAAS;EAAE,QAAQ;EAAiB;EAAM,CAAC,CAAC;;AAGxF,SAAgB,oBAAoB,SAAgC;CAClE,MAAM,MAAM,oBAAoB,SAAS,IAAI;AAC7C,KAAI,CAAC,KAAK;EACR,MAAM,UAAU,mBAAmB,SAAS,iCAAiC;AAC7E,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,KAAI;AACF,4BAA0B,IAAI;UAEzB,OAAO;EAEZ,MAAM,UAAU,mBAAmB,SAAS,sBAD5B,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GACM;AAC5E,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,QAAO,QAAQ,QAAQ,mBAAmB,SAAS,EAAE,QAAQ,oBAAoB,CAAC,CAAC;;AAGrF,SAAgB,mBAAmB,SAAwC;AACzE,2BAA0B;AAC1B,QAAO,QAAQ,QAAQ,mBAAmB,SAAS,EAAE,QAAQ,mBAAmB,CAAC,CAAC;;AAGpF,SAAgB,qBAAqB,SAA6C;AAChF,QAAO,QAAQ,QAAQ,mBAAmB,SAAS;EACjD,GAAG,4BAA4B;EAC/B,QAAQ;EACT,CAAC,CAAC"}
1
+ {"version":3,"file":"storageAsync.mjs","names":[],"sources":["../../../src/runtime/polyfill/storageAsync.ts"],"sourcesContent":["import type { MiniProgramAsyncOptions, MiniProgramBaseResult } from './types/base'\nimport type { GetStorageOptions, RemoveStorageOptions, SetStorageOptions, StorageInfoResult } from './types/common'\nimport {\n callMiniProgramAsyncFailure,\n callMiniProgramAsyncSuccess,\n} from './async'\nimport {\n clearStorageSyncInternal,\n getStorageInfoSyncInternal,\n getStorageSyncInternal,\n hasStorageKey,\n normalizeStorageKey,\n removeStorageSyncInternal,\n setStorageSyncInternal,\n} from './storage'\n\nexport function setStorageBridge(options?: SetStorageOptions) {\n const key = normalizeStorageKey(options?.key)\n if (!key) {\n const failure = callMiniProgramAsyncFailure(options, 'setStorage:fail invalid key')\n return Promise.reject(failure)\n }\n try {\n setStorageSyncInternal(key, options?.data)\n }\n catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n const failure = callMiniProgramAsyncFailure(options, `setStorage:fail ${message}`)\n return Promise.reject(failure)\n }\n return Promise.resolve(callMiniProgramAsyncSuccess(options, { errMsg: 'setStorage:ok' }))\n}\n\nexport function getStorageBridge(options?: GetStorageOptions) {\n const key = normalizeStorageKey(options?.key)\n if (!key) {\n const failure = callMiniProgramAsyncFailure(options, 'getStorage:fail invalid key')\n return Promise.reject(failure)\n }\n if (!hasStorageKey(key)) {\n const failure = callMiniProgramAsyncFailure(options, `getStorage:fail data not found for key ${key}`)\n return Promise.reject(failure)\n }\n const data = getStorageSyncInternal(key)\n return Promise.resolve(callMiniProgramAsyncSuccess(options, { errMsg: 'getStorage:ok', data }))\n}\n\nexport function removeStorageBridge(options?: RemoveStorageOptions) {\n const key = normalizeStorageKey(options?.key)\n if (!key) {\n const failure = callMiniProgramAsyncFailure(options, 'removeStorage:fail invalid key')\n return Promise.reject(failure)\n }\n try {\n removeStorageSyncInternal(key)\n }\n catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n const failure = callMiniProgramAsyncFailure(options, `removeStorage:fail ${message}`)\n return Promise.reject(failure)\n }\n return Promise.resolve(callMiniProgramAsyncSuccess(options, { errMsg: 'removeStorage:ok' }))\n}\n\nexport function clearStorageBridge(options?: MiniProgramAsyncOptions<MiniProgramBaseResult>) {\n clearStorageSyncInternal()\n return Promise.resolve(callMiniProgramAsyncSuccess(options, { errMsg: 'clearStorage:ok' }))\n}\n\nexport function getStorageInfoBridge(options?: MiniProgramAsyncOptions<StorageInfoResult>) {\n return Promise.resolve(callMiniProgramAsyncSuccess(options, {\n ...getStorageInfoSyncInternal(),\n errMsg: 'getStorageInfo:ok',\n }))\n}\n"],"mappings":";;;;AAgBA,SAAgB,iBAAiB,SAA6B;CAC5D,MAAM,MAAM,oBAAoB,SAAS,IAAI;AAC7C,KAAI,CAAC,KAAK;EACR,MAAM,UAAU,4BAA4B,SAAS,8BAA8B;AACnF,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,KAAI;AACF,yBAAuB,KAAK,SAAS,KAAK;UAErC,OAAO;EAEZ,MAAM,UAAU,4BAA4B,SAAS,mBADrC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GACY;AAClF,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,QAAO,QAAQ,QAAQ,4BAA4B,SAAS,EAAE,QAAQ,iBAAiB,CAAC,CAAC;;AAG3F,SAAgB,iBAAiB,SAA6B;CAC5D,MAAM,MAAM,oBAAoB,SAAS,IAAI;AAC7C,KAAI,CAAC,KAAK;EACR,MAAM,UAAU,4BAA4B,SAAS,8BAA8B;AACnF,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,KAAI,CAAC,cAAc,IAAI,EAAE;EACvB,MAAM,UAAU,4BAA4B,SAAS,0CAA0C,MAAM;AACrG,SAAO,QAAQ,OAAO,QAAQ;;CAEhC,MAAM,OAAO,uBAAuB,IAAI;AACxC,QAAO,QAAQ,QAAQ,4BAA4B,SAAS;EAAE,QAAQ;EAAiB;EAAM,CAAC,CAAC;;AAGjG,SAAgB,oBAAoB,SAAgC;CAClE,MAAM,MAAM,oBAAoB,SAAS,IAAI;AAC7C,KAAI,CAAC,KAAK;EACR,MAAM,UAAU,4BAA4B,SAAS,iCAAiC;AACtF,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,KAAI;AACF,4BAA0B,IAAI;UAEzB,OAAO;EAEZ,MAAM,UAAU,4BAA4B,SAAS,sBADrC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GACe;AACrF,SAAO,QAAQ,OAAO,QAAQ;;AAEhC,QAAO,QAAQ,QAAQ,4BAA4B,SAAS,EAAE,QAAQ,oBAAoB,CAAC,CAAC;;AAG9F,SAAgB,mBAAmB,SAA0D;AAC3F,2BAA0B;AAC1B,QAAO,QAAQ,QAAQ,4BAA4B,SAAS,EAAE,QAAQ,mBAAmB,CAAC,CAAC;;AAG7F,SAAgB,qBAAqB,SAAsD;AACzF,QAAO,QAAQ,QAAQ,4BAA4B,SAAS;EAC1D,GAAG,4BAA4B;EAC/B,QAAQ;EACT,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { callWxAsyncFailure, callWxAsyncSuccess } from "./async.mjs";
1
+ import { callMiniProgramAsyncFailure, callMiniProgramAsyncSuccess } from "./async.mjs";
2
2
  import { buildMenuButtonRect, buildWindowInfoSnapshot, readDeviceMemorySize, readSystemInfoSnapshot, resolveAccountAppId, resolveDeviceOrientation, resolveRuntimeTheme } from "./system.mjs";
3
3
 
4
4
  //#region src/runtime/polyfill/systemApi.ts
@@ -8,12 +8,12 @@ function getSystemInfoSyncBridge() {
8
8
  function getSystemInfoBridge(options) {
9
9
  try {
10
10
  const info = getSystemInfoSyncBridge();
11
- return Promise.resolve(callWxAsyncSuccess(options, {
11
+ return Promise.resolve(callMiniProgramAsyncSuccess(options, {
12
12
  errMsg: "getSystemInfo:ok",
13
13
  ...info
14
14
  }));
15
15
  } catch (error) {
16
- const failure = callWxAsyncFailure(options, `getSystemInfo:fail ${error instanceof Error ? error.message : String(error)}`);
16
+ const failure = callMiniProgramAsyncFailure(options, `getSystemInfo:fail ${error instanceof Error ? error.message : String(error)}`);
17
17
  return Promise.reject(failure);
18
18
  }
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"systemApi.mjs","names":[],"sources":["../../../src/runtime/polyfill/systemApi.ts"],"sourcesContent":["import {\n callWxAsyncFailure,\n callWxAsyncSuccess,\n} from './async'\nimport {\n buildMenuButtonRect,\n buildWindowInfoSnapshot,\n readDeviceMemorySize,\n readSystemInfoSnapshot,\n resolveAccountAppId,\n resolveDeviceOrientation,\n resolveRuntimeTheme,\n} from './system'\n\nexport function getSystemInfoSyncBridge() {\n return readSystemInfoSnapshot()\n}\n\nexport function getSystemInfoBridge(options?: any): Promise<any> {\n try {\n const info = getSystemInfoSyncBridge()\n return Promise.resolve(callWxAsyncSuccess(options, {\n errMsg: 'getSystemInfo:ok',\n ...info,\n }))\n }\n catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n const failure = callWxAsyncFailure(options, `getSystemInfo:fail ${message}`)\n return Promise.reject(failure)\n }\n}\n\nexport function getWindowInfoBridge() {\n return buildWindowInfoSnapshot(getSystemInfoSyncBridge())\n}\n\nexport function getDeviceInfoBridge() {\n const systemInfo = getSystemInfoSyncBridge()\n return {\n brand: systemInfo.brand,\n model: systemInfo.model,\n system: systemInfo.system,\n platform: systemInfo.platform,\n memorySize: readDeviceMemorySize(),\n benchmarkLevel: -1,\n abi: 'web',\n deviceOrientation: resolveDeviceOrientation(),\n }\n}\n\nexport function getAccountInfoSyncBridge() {\n const appId = resolveAccountAppId()\n return {\n miniProgram: {\n appId,\n envVersion: 'develop',\n version: '0.0.0-web',\n },\n plugin: {},\n }\n}\n\nexport function getAppBaseInfoBridge() {\n const systemInfo = getSystemInfoSyncBridge()\n const runtimeNavigator = typeof navigator !== 'undefined' ? navigator : undefined\n return {\n SDKVersion: 'web',\n language: runtimeNavigator?.language ?? 'en',\n version: runtimeNavigator?.appVersion ?? runtimeNavigator?.userAgent ?? 'web',\n platform: systemInfo.platform,\n enableDebug: false,\n theme: resolveRuntimeTheme(),\n }\n}\n\nexport function getMenuButtonBoundingClientRectBridge() {\n const { windowWidth, statusBarHeight } = getSystemInfoSyncBridge()\n return buildMenuButtonRect(windowWidth, statusBarHeight)\n}\n"],"mappings":";;;;AAcA,SAAgB,0BAA0B;AACxC,QAAO,wBAAwB;;AAGjC,SAAgB,oBAAoB,SAA6B;AAC/D,KAAI;EACF,MAAM,OAAO,yBAAyB;AACtC,SAAO,QAAQ,QAAQ,mBAAmB,SAAS;GACjD,QAAQ;GACR,GAAG;GACJ,CAAC,CAAC;UAEE,OAAO;EAEZ,MAAM,UAAU,mBAAmB,SAAS,sBAD5B,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GACM;AAC5E,SAAO,QAAQ,OAAO,QAAQ;;;AAIlC,SAAgB,sBAAsB;AACpC,QAAO,wBAAwB,yBAAyB,CAAC;;AAG3D,SAAgB,sBAAsB;CACpC,MAAM,aAAa,yBAAyB;AAC5C,QAAO;EACL,OAAO,WAAW;EAClB,OAAO,WAAW;EAClB,QAAQ,WAAW;EACnB,UAAU,WAAW;EACrB,YAAY,sBAAsB;EAClC,gBAAgB;EAChB,KAAK;EACL,mBAAmB,0BAA0B;EAC9C;;AAGH,SAAgB,2BAA2B;AAEzC,QAAO;EACL,aAAa;GACX,OAHU,qBAAqB;GAI/B,YAAY;GACZ,SAAS;GACV;EACD,QAAQ,EAAE;EACX;;AAGH,SAAgB,uBAAuB;CACrC,MAAM,aAAa,yBAAyB;CAC5C,MAAM,mBAAmB,OAAO,cAAc,cAAc,YAAY;AACxE,QAAO;EACL,YAAY;EACZ,UAAU,kBAAkB,YAAY;EACxC,SAAS,kBAAkB,cAAc,kBAAkB,aAAa;EACxE,UAAU,WAAW;EACrB,aAAa;EACb,OAAO,qBAAqB;EAC7B;;AAGH,SAAgB,wCAAwC;CACtD,MAAM,EAAE,aAAa,oBAAoB,yBAAyB;AAClE,QAAO,oBAAoB,aAAa,gBAAgB"}
1
+ {"version":3,"file":"systemApi.mjs","names":[],"sources":["../../../src/runtime/polyfill/systemApi.ts"],"sourcesContent":["import {\n callMiniProgramAsyncFailure,\n callMiniProgramAsyncSuccess,\n} from './async'\nimport {\n buildMenuButtonRect,\n buildWindowInfoSnapshot,\n readDeviceMemorySize,\n readSystemInfoSnapshot,\n resolveAccountAppId,\n resolveDeviceOrientation,\n resolveRuntimeTheme,\n} from './system'\n\nexport function getSystemInfoSyncBridge() {\n return readSystemInfoSnapshot()\n}\n\nexport function getSystemInfoBridge(options?: any): Promise<any> {\n try {\n const info = getSystemInfoSyncBridge()\n return Promise.resolve(callMiniProgramAsyncSuccess(options, {\n errMsg: 'getSystemInfo:ok',\n ...info,\n }))\n }\n catch (error) {\n const message = error instanceof Error ? error.message : String(error)\n const failure = callMiniProgramAsyncFailure(options, `getSystemInfo:fail ${message}`)\n return Promise.reject(failure)\n }\n}\n\nexport function getWindowInfoBridge() {\n return buildWindowInfoSnapshot(getSystemInfoSyncBridge())\n}\n\nexport function getDeviceInfoBridge() {\n const systemInfo = getSystemInfoSyncBridge()\n return {\n brand: systemInfo.brand,\n model: systemInfo.model,\n system: systemInfo.system,\n platform: systemInfo.platform,\n memorySize: readDeviceMemorySize(),\n benchmarkLevel: -1,\n abi: 'web',\n deviceOrientation: resolveDeviceOrientation(),\n }\n}\n\nexport function getAccountInfoSyncBridge() {\n const appId = resolveAccountAppId()\n return {\n miniProgram: {\n appId,\n envVersion: 'develop',\n version: '0.0.0-web',\n },\n plugin: {},\n }\n}\n\nexport function getAppBaseInfoBridge() {\n const systemInfo = getSystemInfoSyncBridge()\n const runtimeNavigator = typeof navigator !== 'undefined' ? navigator : undefined\n return {\n SDKVersion: 'web',\n language: runtimeNavigator?.language ?? 'en',\n version: runtimeNavigator?.appVersion ?? runtimeNavigator?.userAgent ?? 'web',\n platform: systemInfo.platform,\n enableDebug: false,\n theme: resolveRuntimeTheme(),\n }\n}\n\nexport function getMenuButtonBoundingClientRectBridge() {\n const { windowWidth, statusBarHeight } = getSystemInfoSyncBridge()\n return buildMenuButtonRect(windowWidth, statusBarHeight)\n}\n"],"mappings":";;;;AAcA,SAAgB,0BAA0B;AACxC,QAAO,wBAAwB;;AAGjC,SAAgB,oBAAoB,SAA6B;AAC/D,KAAI;EACF,MAAM,OAAO,yBAAyB;AACtC,SAAO,QAAQ,QAAQ,4BAA4B,SAAS;GAC1D,QAAQ;GACR,GAAG;GACJ,CAAC,CAAC;UAEE,OAAO;EAEZ,MAAM,UAAU,4BAA4B,SAAS,sBADrC,iBAAiB,QAAQ,MAAM,UAAU,OAAO,MAAM,GACe;AACrF,SAAO,QAAQ,OAAO,QAAQ;;;AAIlC,SAAgB,sBAAsB;AACpC,QAAO,wBAAwB,yBAAyB,CAAC;;AAG3D,SAAgB,sBAAsB;CACpC,MAAM,aAAa,yBAAyB;AAC5C,QAAO;EACL,OAAO,WAAW;EAClB,OAAO,WAAW;EAClB,QAAQ,WAAW;EACnB,UAAU,WAAW;EACrB,YAAY,sBAAsB;EAClC,gBAAgB;EAChB,KAAK;EACL,mBAAmB,0BAA0B;EAC9C;;AAGH,SAAgB,2BAA2B;AAEzC,QAAO;EACL,aAAa;GACX,OAHU,qBAAqB;GAI/B,YAAY;GACZ,SAAS;GACV;EACD,QAAQ,EAAE;EACX;;AAGH,SAAgB,uBAAuB;CACrC,MAAM,aAAa,yBAAyB;CAC5C,MAAM,mBAAmB,OAAO,cAAc,cAAc,YAAY;AACxE,QAAO;EACL,YAAY;EACZ,UAAU,kBAAkB,YAAY;EACxC,SAAS,kBAAkB,cAAc,kBAAkB,aAAa;EACxE,UAAU,WAAW;EACrB,aAAa;EACb,OAAO,qBAAqB;EAC7B;;AAGH,SAAgB,wCAAwC;CACtD,MAAM,EAAE,aAAa,oBAAoB,yBAAyB;AAClE,QAAO,oBAAoB,aAAa,gBAAgB"}
@@ -1,12 +1,12 @@
1
1
  //#region src/runtime/polyfill/types/base.d.ts
2
- interface WxBaseResult {
2
+ interface MiniProgramBaseResult {
3
3
  errMsg: string;
4
4
  }
5
- interface WxAsyncOptions<SuccessResult extends WxBaseResult> {
5
+ interface MiniProgramAsyncOptions<SuccessResult extends MiniProgramBaseResult> {
6
6
  success?: (result: SuccessResult) => void;
7
- fail?: (result: WxBaseResult) => void;
8
- complete?: (result: SuccessResult | WxBaseResult) => void;
7
+ fail?: (result: MiniProgramBaseResult) => void;
8
+ complete?: (result: SuccessResult | MiniProgramBaseResult) => void;
9
9
  }
10
10
  //#endregion
11
- export { WxAsyncOptions, WxBaseResult };
11
+ export { MiniProgramAsyncOptions, MiniProgramBaseResult };
12
12
  //# sourceMappingURL=base.d.mts.map
@@ -1,45 +1,45 @@
1
- import { WxAsyncOptions, WxBaseResult } from "./base.mjs";
1
+ import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "./base.mjs";
2
2
 
3
3
  //#region src/runtime/polyfill/types/common.d.ts
4
- interface ShowToastOptions extends WxAsyncOptions<WxBaseResult> {
4
+ interface ShowToastOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
5
5
  title?: string;
6
6
  icon?: 'success' | 'error' | 'none';
7
7
  duration?: number;
8
8
  }
9
- interface SetClipboardDataOptions extends WxAsyncOptions<WxBaseResult> {
9
+ interface SetClipboardDataOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
10
10
  data?: string;
11
11
  }
12
- interface GetClipboardDataSuccessResult extends WxBaseResult {
12
+ interface GetClipboardDataSuccessResult extends MiniProgramBaseResult {
13
13
  data: string;
14
14
  }
15
- interface GetClipboardDataOptions extends WxAsyncOptions<GetClipboardDataSuccessResult> {}
16
- interface SetStorageOptions extends WxAsyncOptions<WxBaseResult> {
15
+ interface GetClipboardDataOptions extends MiniProgramAsyncOptions<GetClipboardDataSuccessResult> {}
16
+ interface SetStorageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
17
17
  key?: string;
18
18
  data?: any;
19
19
  }
20
- interface GetStorageSuccessResult extends WxBaseResult {
20
+ interface GetStorageSuccessResult extends MiniProgramBaseResult {
21
21
  data: any;
22
22
  }
23
- interface GetStorageOptions extends WxAsyncOptions<GetStorageSuccessResult> {
23
+ interface GetStorageOptions extends MiniProgramAsyncOptions<GetStorageSuccessResult> {
24
24
  key?: string;
25
25
  }
26
- interface RemoveStorageOptions extends WxAsyncOptions<WxBaseResult> {
26
+ interface RemoveStorageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
27
27
  key?: string;
28
28
  }
29
- interface StorageInfoResult extends WxBaseResult {
29
+ interface StorageInfoResult extends MiniProgramBaseResult {
30
30
  keys: string[];
31
31
  currentSize: number;
32
32
  limitSize: number;
33
33
  }
34
- interface FileReadResult extends WxBaseResult {
34
+ interface FileReadResult extends MiniProgramBaseResult {
35
35
  data: string | ArrayBuffer;
36
36
  }
37
- interface FileWriteOptions extends WxAsyncOptions<WxBaseResult> {
37
+ interface FileWriteOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
38
38
  filePath?: string;
39
39
  data?: string | ArrayBuffer | ArrayBufferView;
40
40
  encoding?: string;
41
41
  }
42
- interface FileReadOptions extends WxAsyncOptions<FileReadResult> {
42
+ interface FileReadOptions extends MiniProgramAsyncOptions<FileReadResult> {
43
43
  filePath?: string;
44
44
  encoding?: string;
45
45
  }
@@ -66,12 +66,12 @@ interface WorkerBridge {
66
66
  onError: (callback: WorkerErrorCallback) => void;
67
67
  offError: (callback?: WorkerErrorCallback) => void;
68
68
  }
69
- interface RequestSuccessResult extends WxBaseResult {
69
+ interface RequestSuccessResult extends MiniProgramBaseResult {
70
70
  data: any;
71
71
  statusCode: number;
72
72
  header: Record<string, string>;
73
73
  }
74
- interface RequestOptions extends WxAsyncOptions<RequestSuccessResult> {
74
+ interface RequestOptions extends MiniProgramAsyncOptions<RequestSuccessResult> {
75
75
  url?: string;
76
76
  method?: string;
77
77
  data?: any;
@@ -80,21 +80,21 @@ interface RequestOptions extends WxAsyncOptions<RequestSuccessResult> {
80
80
  dataType?: 'json' | 'text';
81
81
  responseType?: 'text' | 'arraybuffer';
82
82
  }
83
- interface DownloadFileSuccessResult extends WxBaseResult {
83
+ interface DownloadFileSuccessResult extends MiniProgramBaseResult {
84
84
  tempFilePath: string;
85
85
  statusCode: number;
86
86
  }
87
- interface DownloadFileOptions extends WxAsyncOptions<DownloadFileSuccessResult> {
87
+ interface DownloadFileOptions extends MiniProgramAsyncOptions<DownloadFileSuccessResult> {
88
88
  url?: string;
89
89
  header?: Record<string, string>;
90
90
  timeout?: number;
91
91
  }
92
- interface UploadFileSuccessResult extends WxBaseResult {
92
+ interface UploadFileSuccessResult extends MiniProgramBaseResult {
93
93
  data: string;
94
94
  statusCode: number;
95
95
  header: Record<string, string>;
96
96
  }
97
- interface UploadFileOptions extends WxAsyncOptions<UploadFileSuccessResult> {
97
+ interface UploadFileOptions extends MiniProgramAsyncOptions<UploadFileSuccessResult> {
98
98
  url?: string;
99
99
  filePath?: string;
100
100
  name?: string;
@@ -102,7 +102,7 @@ interface UploadFileOptions extends WxAsyncOptions<UploadFileSuccessResult> {
102
102
  formData?: Record<string, unknown>;
103
103
  timeout?: number;
104
104
  }
105
- interface PreviewImageOptions extends WxAsyncOptions<WxBaseResult> {
105
+ interface PreviewImageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
106
106
  current?: string;
107
107
  urls?: string[];
108
108
  }
@@ -112,11 +112,11 @@ interface ChooseImageTempFile {
112
112
  type: string;
113
113
  name: string;
114
114
  }
115
- interface ChooseImageSuccessResult extends WxBaseResult {
115
+ interface ChooseImageSuccessResult extends MiniProgramBaseResult {
116
116
  tempFilePaths: string[];
117
117
  tempFiles: ChooseImageTempFile[];
118
118
  }
119
- interface ChooseImageOptions extends WxAsyncOptions<ChooseImageSuccessResult> {
119
+ interface ChooseImageOptions extends MiniProgramAsyncOptions<ChooseImageSuccessResult> {
120
120
  count?: number;
121
121
  sizeType?: Array<'original' | 'compressed'>;
122
122
  sourceType?: Array<'album' | 'camera'>;
@@ -1,7 +1,7 @@
1
- import { WxAsyncOptions, WxBaseResult } from "./base.mjs";
1
+ import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "./base.mjs";
2
2
 
3
3
  //#region src/runtime/polyfill/types/locationRuntime.d.ts
4
- interface GetLocationSuccessResult extends WxBaseResult {
4
+ interface GetLocationSuccessResult extends MiniProgramBaseResult {
5
5
  latitude: number;
6
6
  longitude: number;
7
7
  speed: number;
@@ -10,25 +10,25 @@ interface GetLocationSuccessResult extends WxBaseResult {
10
10
  verticalAccuracy: number;
11
11
  horizontalAccuracy: number;
12
12
  }
13
- interface GetLocationOptions extends WxAsyncOptions<GetLocationSuccessResult> {
13
+ interface GetLocationOptions extends MiniProgramAsyncOptions<GetLocationSuccessResult> {
14
14
  type?: 'wgs84' | 'gcj02';
15
15
  altitude?: boolean;
16
16
  isHighAccuracy?: boolean;
17
17
  highAccuracyExpireTime?: number;
18
18
  }
19
- interface GetFuzzyLocationSuccessResult extends WxBaseResult {
19
+ interface GetFuzzyLocationSuccessResult extends MiniProgramBaseResult {
20
20
  latitude: number;
21
21
  longitude: number;
22
22
  accuracy: number;
23
23
  }
24
- interface GetFuzzyLocationOptions extends WxAsyncOptions<GetFuzzyLocationSuccessResult> {}
24
+ interface GetFuzzyLocationOptions extends MiniProgramAsyncOptions<GetFuzzyLocationSuccessResult> {}
25
25
  type NetworkType = 'wifi' | '2g' | '3g' | '4g' | '5g' | 'unknown' | 'none';
26
26
  interface NetworkStatusResult {
27
27
  isConnected: boolean;
28
28
  networkType: NetworkType;
29
29
  }
30
- interface GetNetworkTypeSuccessResult extends WxBaseResult, NetworkStatusResult {}
31
- interface GetNetworkTypeOptions extends WxAsyncOptions<GetNetworkTypeSuccessResult> {}
30
+ interface GetNetworkTypeSuccessResult extends MiniProgramBaseResult, NetworkStatusResult {}
31
+ interface GetNetworkTypeOptions extends MiniProgramAsyncOptions<GetNetworkTypeSuccessResult> {}
32
32
  type NetworkStatusChangeCallback = (result: NetworkStatusResult) => void;
33
33
  interface WindowResizeResult {
34
34
  size: {
@@ -39,33 +39,33 @@ interface WindowResizeResult {
39
39
  windowHeight: number;
40
40
  }
41
41
  type WindowResizeCallback = (result: WindowResizeResult) => void;
42
- interface ShowLoadingOptions extends WxAsyncOptions<WxBaseResult> {
42
+ interface ShowLoadingOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
43
43
  title?: string;
44
44
  mask?: boolean;
45
45
  }
46
- interface SetBackgroundColorOptions extends WxAsyncOptions<WxBaseResult> {
46
+ interface SetBackgroundColorOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
47
47
  backgroundColor?: string;
48
48
  backgroundColorTop?: string;
49
49
  backgroundColorBottom?: string;
50
50
  }
51
- interface SetBackgroundTextStyleOptions extends WxAsyncOptions<WxBaseResult> {
51
+ interface SetBackgroundTextStyleOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
52
52
  textStyle?: 'dark' | 'light';
53
53
  }
54
- interface ShareMenuOptions extends WxAsyncOptions<WxBaseResult> {
54
+ interface ShareMenuOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
55
55
  withShareTicket?: boolean;
56
56
  menus?: string[];
57
57
  }
58
- interface NavigateToMiniProgramOptions extends WxAsyncOptions<WxBaseResult> {
58
+ interface NavigateToMiniProgramOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
59
59
  appId?: string;
60
60
  path?: string;
61
61
  extraData?: Record<string, any>;
62
62
  envVersion?: 'develop' | 'trial' | 'release';
63
63
  }
64
- interface LoadSubPackageOptions extends WxAsyncOptions<WxBaseResult> {
64
+ interface LoadSubPackageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
65
65
  name?: string;
66
66
  root?: string;
67
67
  }
68
- interface PreloadSubpackageOptions extends WxAsyncOptions<WxBaseResult> {
68
+ interface PreloadSubpackageOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
69
69
  name?: string;
70
70
  root?: string;
71
71
  }
@@ -87,14 +87,14 @@ interface LogManager {
87
87
  log: (...args: unknown[]) => void;
88
88
  warn: (...args: unknown[]) => void;
89
89
  }
90
- interface ChooseLocationSuccessResult extends WxBaseResult {
90
+ interface ChooseLocationSuccessResult extends MiniProgramBaseResult {
91
91
  name: string;
92
92
  address: string;
93
93
  latitude: number;
94
94
  longitude: number;
95
95
  }
96
- interface ChooseLocationOptions extends WxAsyncOptions<ChooseLocationSuccessResult> {}
97
- interface ChooseAddressSuccessResult extends WxBaseResult {
96
+ interface ChooseLocationOptions extends MiniProgramAsyncOptions<ChooseLocationSuccessResult> {}
97
+ interface ChooseAddressSuccessResult extends MiniProgramBaseResult {
98
98
  userName: string;
99
99
  postalCode: string;
100
100
  provinceName: string;
@@ -104,46 +104,46 @@ interface ChooseAddressSuccessResult extends WxBaseResult {
104
104
  nationalCode: string;
105
105
  telNumber: string;
106
106
  }
107
- interface ChooseAddressOptions extends WxAsyncOptions<ChooseAddressSuccessResult> {}
108
- interface GetImageInfoSuccessResult extends WxBaseResult {
107
+ interface ChooseAddressOptions extends MiniProgramAsyncOptions<ChooseAddressSuccessResult> {}
108
+ interface GetImageInfoSuccessResult extends MiniProgramBaseResult {
109
109
  width: number;
110
110
  height: number;
111
111
  path: string;
112
112
  type: string;
113
113
  orientation: 'up';
114
114
  }
115
- interface GetImageInfoOptions extends WxAsyncOptions<GetImageInfoSuccessResult> {
115
+ interface GetImageInfoOptions extends MiniProgramAsyncOptions<GetImageInfoSuccessResult> {
116
116
  src?: string;
117
117
  }
118
- interface MakePhoneCallOptions extends WxAsyncOptions<WxBaseResult> {
118
+ interface MakePhoneCallOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
119
119
  phoneNumber?: string;
120
120
  }
121
- interface OpenLocationOptions extends WxAsyncOptions<WxBaseResult> {
121
+ interface OpenLocationOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
122
122
  latitude?: number;
123
123
  longitude?: number;
124
124
  scale?: number;
125
125
  name?: string;
126
126
  address?: string;
127
127
  }
128
- interface TabBarOptions extends WxAsyncOptions<WxBaseResult> {
128
+ interface TabBarOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
129
129
  animation?: boolean;
130
130
  }
131
- interface OpenCustomerServiceChatOptions extends WxAsyncOptions<WxBaseResult> {
131
+ interface OpenCustomerServiceChatOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
132
132
  corpId?: string;
133
133
  extInfo?: Record<string, any>;
134
134
  url?: string;
135
135
  }
136
- interface RequestPaymentOptions extends WxAsyncOptions<WxBaseResult> {
136
+ interface RequestPaymentOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
137
137
  timeStamp?: string;
138
138
  nonceStr?: string;
139
139
  package?: string;
140
140
  signType?: string;
141
141
  paySign?: string;
142
142
  }
143
- interface RequestSubscribeMessageSuccessResult extends WxBaseResult {
143
+ interface RequestSubscribeMessageSuccessResult extends MiniProgramBaseResult {
144
144
  [tmplId: string]: string;
145
145
  }
146
- interface RequestSubscribeMessageOptions extends WxAsyncOptions<RequestSubscribeMessageSuccessResult> {
146
+ interface RequestSubscribeMessageOptions extends MiniProgramAsyncOptions<RequestSubscribeMessageSuccessResult> {
147
147
  tmplIds?: string[];
148
148
  }
149
149
  //#endregion
@@ -1,16 +1,16 @@
1
- import { WxAsyncOptions, WxBaseResult } from "./base.mjs";
1
+ import { MiniProgramAsyncOptions, MiniProgramBaseResult } from "./base.mjs";
2
2
 
3
3
  //#region src/runtime/polyfill/types/mediaAuth.d.ts
4
4
  interface AuthSettingResult {
5
5
  authSetting: Record<string, boolean>;
6
6
  }
7
- interface GetSettingSuccessResult extends WxBaseResult, AuthSettingResult {}
8
- interface GetSettingOptions extends WxAsyncOptions<GetSettingSuccessResult> {}
9
- interface AuthorizeOptions extends WxAsyncOptions<WxBaseResult> {
7
+ interface GetSettingSuccessResult extends MiniProgramBaseResult, AuthSettingResult {}
8
+ interface GetSettingOptions extends MiniProgramAsyncOptions<GetSettingSuccessResult> {}
9
+ interface AuthorizeOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
10
10
  scope?: string;
11
11
  }
12
- interface OpenSettingSuccessResult extends WxBaseResult, AuthSettingResult {}
13
- interface OpenSettingOptions extends WxAsyncOptions<OpenSettingSuccessResult> {}
12
+ interface OpenSettingSuccessResult extends MiniProgramBaseResult, AuthSettingResult {}
13
+ interface OpenSettingOptions extends MiniProgramAsyncOptions<OpenSettingSuccessResult> {}
14
14
  type ChooseMediaType = 'image' | 'video';
15
15
  interface ChooseMediaTempFile {
16
16
  tempFilePath: string;
@@ -21,11 +21,11 @@ interface ChooseMediaTempFile {
21
21
  height: number;
22
22
  duration: number;
23
23
  }
24
- interface ChooseMediaSuccessResult extends WxBaseResult {
24
+ interface ChooseMediaSuccessResult extends MiniProgramBaseResult {
25
25
  type: ChooseMediaType;
26
26
  tempFiles: ChooseMediaTempFile[];
27
27
  }
28
- interface ChooseMediaOptions extends WxAsyncOptions<ChooseMediaSuccessResult> {
28
+ interface ChooseMediaOptions extends MiniProgramAsyncOptions<ChooseMediaSuccessResult> {
29
29
  count?: number;
30
30
  mediaType?: Array<'image' | 'video' | 'mix'>;
31
31
  sourceType?: Array<'album' | 'camera'>;
@@ -33,29 +33,29 @@ interface ChooseMediaOptions extends WxAsyncOptions<ChooseMediaSuccessResult> {
33
33
  sizeType?: Array<'original' | 'compressed'>;
34
34
  camera?: 'back' | 'front';
35
35
  }
36
- interface CompressImageSuccessResult extends WxBaseResult {
36
+ interface CompressImageSuccessResult extends MiniProgramBaseResult {
37
37
  tempFilePath: string;
38
38
  }
39
- interface CompressImageOptions extends WxAsyncOptions<CompressImageSuccessResult> {
39
+ interface CompressImageOptions extends MiniProgramAsyncOptions<CompressImageSuccessResult> {
40
40
  src?: string;
41
41
  quality?: number;
42
42
  compressedWidth?: number;
43
43
  compressedHeight?: number;
44
44
  }
45
- interface ChooseVideoSuccessResult extends WxBaseResult {
45
+ interface ChooseVideoSuccessResult extends MiniProgramBaseResult {
46
46
  tempFilePath: string;
47
47
  duration: number;
48
48
  size: number;
49
49
  height: number;
50
50
  width: number;
51
51
  }
52
- interface ChooseVideoOptions extends WxAsyncOptions<ChooseVideoSuccessResult> {
52
+ interface ChooseVideoOptions extends MiniProgramAsyncOptions<ChooseVideoSuccessResult> {
53
53
  sourceType?: Array<'album' | 'camera'>;
54
54
  compressed?: boolean;
55
55
  maxDuration?: number;
56
56
  camera?: 'back' | 'front';
57
57
  }
58
- interface GetVideoInfoSuccessResult extends WxBaseResult {
58
+ interface GetVideoInfoSuccessResult extends MiniProgramBaseResult {
59
59
  size: number;
60
60
  duration: number;
61
61
  width: number;
@@ -65,10 +65,10 @@ interface GetVideoInfoSuccessResult extends WxBaseResult {
65
65
  type: string;
66
66
  orientation: 'up';
67
67
  }
68
- interface GetVideoInfoOptions extends WxAsyncOptions<GetVideoInfoSuccessResult> {
68
+ interface GetVideoInfoOptions extends MiniProgramAsyncOptions<GetVideoInfoSuccessResult> {
69
69
  src?: string;
70
70
  }
71
- interface CompressVideoSuccessResult extends WxBaseResult {
71
+ interface CompressVideoSuccessResult extends MiniProgramBaseResult {
72
72
  tempFilePath: string;
73
73
  size: number;
74
74
  duration: number;
@@ -77,7 +77,7 @@ interface CompressVideoSuccessResult extends WxBaseResult {
77
77
  bitrate: number;
78
78
  fps: number;
79
79
  }
80
- interface CompressVideoOptions extends WxAsyncOptions<CompressVideoSuccessResult> {
80
+ interface CompressVideoOptions extends MiniProgramAsyncOptions<CompressVideoSuccessResult> {
81
81
  src?: string;
82
82
  quality?: 'low' | 'medium' | 'high';
83
83
  bitrate?: number;
@@ -87,35 +87,35 @@ interface MediaPreviewSource {
87
87
  type?: 'image' | 'video';
88
88
  poster?: string;
89
89
  }
90
- interface PreviewMediaOptions extends WxAsyncOptions<WxBaseResult> {
90
+ interface PreviewMediaOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
91
91
  sources?: MediaPreviewSource[];
92
92
  current?: number;
93
93
  }
94
- interface SaveVideoToPhotosAlbumOptions extends WxAsyncOptions<WxBaseResult> {
94
+ interface SaveVideoToPhotosAlbumOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
95
95
  filePath?: string;
96
96
  }
97
- interface ChooseFileSuccessResult extends WxBaseResult {
97
+ interface ChooseFileSuccessResult extends MiniProgramBaseResult {
98
98
  tempFiles: ChooseMessageFileTempFile[];
99
99
  }
100
- interface ChooseFileOptions extends WxAsyncOptions<ChooseFileSuccessResult> {
100
+ interface ChooseFileOptions extends MiniProgramAsyncOptions<ChooseFileSuccessResult> {
101
101
  count?: number;
102
102
  type?: 'all' | 'video' | 'image' | 'file';
103
103
  extension?: string[];
104
104
  }
105
- interface OpenVideoEditorSuccessResult extends WxBaseResult {
105
+ interface OpenVideoEditorSuccessResult extends MiniProgramBaseResult {
106
106
  tempFilePath: string;
107
107
  }
108
- interface OpenVideoEditorOptions extends WxAsyncOptions<OpenVideoEditorSuccessResult> {
108
+ interface OpenVideoEditorOptions extends MiniProgramAsyncOptions<OpenVideoEditorSuccessResult> {
109
109
  src?: string;
110
110
  }
111
- interface SaveFileSuccessResult extends WxBaseResult {
111
+ interface SaveFileSuccessResult extends MiniProgramBaseResult {
112
112
  savedFilePath: string;
113
113
  }
114
- interface SaveFileOptions extends WxAsyncOptions<SaveFileSuccessResult> {
114
+ interface SaveFileOptions extends MiniProgramAsyncOptions<SaveFileSuccessResult> {
115
115
  tempFilePath?: string;
116
116
  filePath?: string;
117
117
  }
118
- interface SaveFileToDiskOptions extends WxAsyncOptions<WxBaseResult> {
118
+ interface SaveFileToDiskOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
119
119
  filePath?: string;
120
120
  fileName?: string;
121
121
  }
@@ -126,24 +126,24 @@ interface ChooseMessageFileTempFile {
126
126
  name: string;
127
127
  time: number;
128
128
  }
129
- interface ChooseMessageFileSuccessResult extends WxBaseResult {
129
+ interface ChooseMessageFileSuccessResult extends MiniProgramBaseResult {
130
130
  tempFiles: ChooseMessageFileTempFile[];
131
131
  }
132
- interface ChooseMessageFileOptions extends WxAsyncOptions<ChooseMessageFileSuccessResult> {
132
+ interface ChooseMessageFileOptions extends MiniProgramAsyncOptions<ChooseMessageFileSuccessResult> {
133
133
  count?: number;
134
134
  type?: 'all' | 'video' | 'image' | 'file';
135
135
  }
136
- interface SaveImageToPhotosAlbumOptions extends WxAsyncOptions<WxBaseResult> {
136
+ interface SaveImageToPhotosAlbumOptions extends MiniProgramAsyncOptions<MiniProgramBaseResult> {
137
137
  filePath?: string;
138
138
  }
139
- interface ScanCodeSuccessResult extends WxBaseResult {
139
+ interface ScanCodeSuccessResult extends MiniProgramBaseResult {
140
140
  result: string;
141
141
  scanType: string;
142
142
  charSet: string;
143
143
  path: string;
144
144
  rawData: string;
145
145
  }
146
- interface ScanCodeOptions extends WxAsyncOptions<ScanCodeSuccessResult> {
146
+ interface ScanCodeOptions extends MiniProgramAsyncOptions<ScanCodeSuccessResult> {
147
147
  onlyFromCamera?: boolean;
148
148
  scanType?: string[];
149
149
  }