@weapp-vite/web 1.3.15 → 1.3.16

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 (242) hide show
  1. package/dist/_virtual/_rolldown/runtime.mjs +18 -0
  2. package/dist/compiler/wxml/attributes.mjs +93 -0
  3. package/dist/compiler/wxml/attributes.mjs.map +1 -0
  4. package/dist/compiler/wxml/compile.mjs +158 -0
  5. package/dist/compiler/wxml/compile.mjs.map +1 -0
  6. package/dist/compiler/wxml/dependency.mjs +31 -0
  7. package/dist/compiler/wxml/dependency.mjs.map +1 -0
  8. package/dist/compiler/wxml/interpolation.mjs +142 -0
  9. package/dist/compiler/wxml/interpolation.mjs.map +1 -0
  10. package/dist/compiler/wxml/navigation.mjs +85 -0
  11. package/dist/compiler/wxml/navigation.mjs.map +1 -0
  12. package/dist/compiler/wxml/parser.mjs +41 -0
  13. package/dist/compiler/wxml/parser.mjs.map +1 -0
  14. package/dist/compiler/wxml/renderer.mjs +114 -0
  15. package/dist/compiler/wxml/renderer.mjs.map +1 -0
  16. package/dist/compiler/wxml/specialNodes.mjs +84 -0
  17. package/dist/compiler/wxml/specialNodes.mjs.map +1 -0
  18. package/dist/compiler/wxs.mjs +83 -0
  19. package/dist/compiler/wxs.mjs.map +1 -0
  20. package/dist/css/wxss.d.mts +25 -0
  21. package/dist/css/wxss.mjs +17 -0
  22. package/dist/css/wxss.mjs.map +1 -0
  23. package/dist/index.d.mts +18 -2
  24. package/dist/index.mjs +18 -3
  25. package/dist/plugin/constants.mjs +43 -0
  26. package/dist/plugin/constants.mjs.map +1 -0
  27. package/dist/plugin/entry.mjs +29 -0
  28. package/dist/plugin/entry.mjs.map +1 -0
  29. package/dist/plugin/files.mjs +58 -0
  30. package/dist/plugin/files.mjs.map +1 -0
  31. package/dist/plugin/index.d.mts +33 -0
  32. package/dist/plugin/index.mjs +188 -0
  33. package/dist/plugin/index.mjs.map +1 -0
  34. package/dist/plugin/navigation.mjs +20 -0
  35. package/dist/plugin/navigation.mjs.map +1 -0
  36. package/dist/plugin/path.mjs +85 -0
  37. package/dist/plugin/path.mjs.map +1 -0
  38. package/dist/plugin/register.mjs +83 -0
  39. package/dist/plugin/register.mjs.map +1 -0
  40. package/dist/plugin/scan.mjs +195 -0
  41. package/dist/plugin/scan.mjs.map +1 -0
  42. package/dist/plugin/scanConfig.mjs +45 -0
  43. package/dist/plugin/scanConfig.mjs.map +1 -0
  44. package/dist/plugin/state.mjs +22 -0
  45. package/dist/plugin/state.mjs.map +1 -0
  46. package/dist/plugin/types.d.mts +46 -0
  47. package/dist/plugin.d.mts +3 -2
  48. package/dist/plugin.mjs +3 -2
  49. package/dist/runtime/button/helpers.mjs +92 -0
  50. package/dist/runtime/button/helpers.mjs.map +1 -0
  51. package/dist/runtime/button/index.d.mts +9 -0
  52. package/dist/runtime/button/index.mjs +198 -0
  53. package/dist/runtime/button/index.mjs.map +1 -0
  54. package/dist/runtime/button/style.mjs +168 -0
  55. package/dist/runtime/button/style.mjs.map +1 -0
  56. package/dist/runtime/component/behavior.mjs +98 -0
  57. package/dist/runtime/component/behavior.mjs.map +1 -0
  58. package/dist/runtime/component/constants.mjs +8 -0
  59. package/dist/runtime/component/constants.mjs.map +1 -0
  60. package/dist/runtime/component/dom.mjs +26 -0
  61. package/dist/runtime/component/dom.mjs.map +1 -0
  62. package/dist/runtime/component/element.mjs +208 -0
  63. package/dist/runtime/component/element.mjs.map +1 -0
  64. package/dist/runtime/component/events.mjs +48 -0
  65. package/dist/runtime/component/events.mjs.map +1 -0
  66. package/dist/runtime/component/index.d.mts +7 -0
  67. package/dist/runtime/component/index.mjs +44 -0
  68. package/dist/runtime/component/index.mjs.map +1 -0
  69. package/dist/runtime/component/state.mjs +63 -0
  70. package/dist/runtime/component/state.mjs.map +1 -0
  71. package/dist/runtime/component/types.d.mts +49 -0
  72. package/dist/runtime/component/utils.mjs +39 -0
  73. package/dist/runtime/component/utils.mjs.map +1 -0
  74. package/dist/runtime/execution.d.mts +7 -0
  75. package/dist/runtime/execution.mjs +37 -0
  76. package/dist/runtime/execution.mjs.map +1 -0
  77. package/dist/runtime/index.d.mts +16 -2
  78. package/dist/runtime/index.mjs +16 -2
  79. package/dist/runtime/legacyTemplate/dom.mjs +131 -0
  80. package/dist/runtime/legacyTemplate/dom.mjs.map +1 -0
  81. package/dist/runtime/legacyTemplate/expression.mjs +113 -0
  82. package/dist/runtime/legacyTemplate/expression.mjs.map +1 -0
  83. package/dist/runtime/legacyTemplate/index.d.mts +9 -0
  84. package/dist/runtime/legacyTemplate/index.mjs +131 -0
  85. package/dist/runtime/legacyTemplate/index.mjs.map +1 -0
  86. package/dist/runtime/legacyTemplate/types.d.mts +6 -0
  87. package/dist/runtime/navigationBar/index.d.mts +10 -0
  88. package/dist/runtime/navigationBar/index.mjs +162 -0
  89. package/dist/runtime/navigationBar/index.mjs.map +1 -0
  90. package/dist/runtime/navigationBar/style.mjs +108 -0
  91. package/dist/runtime/navigationBar/style.mjs.map +1 -0
  92. package/dist/runtime/polyfill/ad.mjs +150 -0
  93. package/dist/runtime/polyfill/ad.mjs.map +1 -0
  94. package/dist/runtime/polyfill/appState.mjs +31 -0
  95. package/dist/runtime/polyfill/appState.mjs.map +1 -0
  96. package/dist/runtime/polyfill/async.mjs +31 -0
  97. package/dist/runtime/polyfill/async.mjs.map +1 -0
  98. package/dist/runtime/polyfill/auth.mjs +120 -0
  99. package/dist/runtime/polyfill/auth.mjs.map +1 -0
  100. package/dist/runtime/polyfill/authApi.mjs +101 -0
  101. package/dist/runtime/polyfill/authApi.mjs.map +1 -0
  102. package/dist/runtime/polyfill/background.mjs +31 -0
  103. package/dist/runtime/polyfill/background.mjs.map +1 -0
  104. package/dist/runtime/polyfill/canvasContext.mjs +115 -0
  105. package/dist/runtime/polyfill/canvasContext.mjs.map +1 -0
  106. package/dist/runtime/polyfill/capability.mjs +17 -0
  107. package/dist/runtime/polyfill/capability.mjs.map +1 -0
  108. package/dist/runtime/polyfill/cloud.mjs +39 -0
  109. package/dist/runtime/polyfill/cloud.mjs.map +1 -0
  110. package/dist/runtime/polyfill/device.mjs +44 -0
  111. package/dist/runtime/polyfill/device.mjs.map +1 -0
  112. package/dist/runtime/polyfill/deviceApi.mjs +31 -0
  113. package/dist/runtime/polyfill/deviceApi.mjs.map +1 -0
  114. package/dist/runtime/polyfill/deviceAuthSystemApi.d.mts +102 -0
  115. package/dist/runtime/polyfill/deviceAuthSystemApi.mjs +144 -0
  116. package/dist/runtime/polyfill/deviceAuthSystemApi.mjs.map +1 -0
  117. package/dist/runtime/polyfill/filePicker.mjs +158 -0
  118. package/dist/runtime/polyfill/filePicker.mjs.map +1 -0
  119. package/dist/runtime/polyfill/fileSystemManager.mjs +45 -0
  120. package/dist/runtime/polyfill/fileSystemManager.mjs.map +1 -0
  121. package/dist/runtime/polyfill/files.mjs +118 -0
  122. package/dist/runtime/polyfill/files.mjs.map +1 -0
  123. package/dist/runtime/polyfill/index.d.mts +40 -0
  124. package/dist/runtime/polyfill/index.mjs +99 -0
  125. package/dist/runtime/polyfill/index.mjs.map +1 -0
  126. package/dist/runtime/polyfill/interaction.mjs +38 -0
  127. package/dist/runtime/polyfill/interaction.mjs.map +1 -0
  128. package/dist/runtime/polyfill/interactionApi.mjs +54 -0
  129. package/dist/runtime/polyfill/interactionApi.mjs.map +1 -0
  130. package/dist/runtime/polyfill/location.mjs +106 -0
  131. package/dist/runtime/polyfill/location.mjs.map +1 -0
  132. package/dist/runtime/polyfill/locationApi.mjs +120 -0
  133. package/dist/runtime/polyfill/locationApi.mjs.map +1 -0
  134. package/dist/runtime/polyfill/mediaActions.mjs +52 -0
  135. package/dist/runtime/polyfill/mediaActions.mjs.map +1 -0
  136. package/dist/runtime/polyfill/mediaApi/file.mjs +63 -0
  137. package/dist/runtime/polyfill/mediaApi/file.mjs.map +1 -0
  138. package/dist/runtime/polyfill/mediaApi/info.mjs +59 -0
  139. package/dist/runtime/polyfill/mediaApi/info.mjs.map +1 -0
  140. package/dist/runtime/polyfill/mediaApi/picker.mjs +82 -0
  141. package/dist/runtime/polyfill/mediaApi/picker.mjs.map +1 -0
  142. package/dist/runtime/polyfill/mediaApi/preview.mjs +39 -0
  143. package/dist/runtime/polyfill/mediaApi/preview.mjs.map +1 -0
  144. package/dist/runtime/polyfill/mediaApi/process.mjs +46 -0
  145. package/dist/runtime/polyfill/mediaApi/process.mjs.map +1 -0
  146. package/dist/runtime/polyfill/mediaInfo.mjs +136 -0
  147. package/dist/runtime/polyfill/mediaInfo.mjs.map +1 -0
  148. package/dist/runtime/polyfill/mediaPicker.mjs +213 -0
  149. package/dist/runtime/polyfill/mediaPicker.mjs.map +1 -0
  150. package/dist/runtime/polyfill/mediaProcess.mjs +65 -0
  151. package/dist/runtime/polyfill/mediaProcess.mjs.map +1 -0
  152. package/dist/runtime/polyfill/menuApi.mjs +70 -0
  153. package/dist/runtime/polyfill/menuApi.mjs.map +1 -0
  154. package/dist/runtime/polyfill/navigationBarRuntime.mjs +65 -0
  155. package/dist/runtime/polyfill/navigationBarRuntime.mjs.map +1 -0
  156. package/dist/runtime/polyfill/network/request.mjs +162 -0
  157. package/dist/runtime/polyfill/network/request.mjs.map +1 -0
  158. package/dist/runtime/polyfill/network/requestBridge.mjs +49 -0
  159. package/dist/runtime/polyfill/network/requestBridge.mjs.map +1 -0
  160. package/dist/runtime/polyfill/network/status.mjs +55 -0
  161. package/dist/runtime/polyfill/network/status.mjs.map +1 -0
  162. package/dist/runtime/polyfill/platformApi.mjs +33 -0
  163. package/dist/runtime/polyfill/platformApi.mjs.map +1 -0
  164. package/dist/runtime/polyfill/platformRuntime.mjs +120 -0
  165. package/dist/runtime/polyfill/platformRuntime.mjs.map +1 -0
  166. package/dist/runtime/polyfill/routeRuntime/dom.mjs +36 -0
  167. package/dist/runtime/polyfill/routeRuntime/dom.mjs.map +1 -0
  168. package/dist/runtime/polyfill/routeRuntime/lifecycle.mjs +83 -0
  169. package/dist/runtime/polyfill/routeRuntime/lifecycle.mjs.map +1 -0
  170. package/dist/runtime/polyfill/routeRuntime/options.d.mts +33 -0
  171. package/dist/runtime/polyfill/routeRuntime/options.mjs +76 -0
  172. package/dist/runtime/polyfill/routeRuntime/options.mjs.map +1 -0
  173. package/dist/runtime/polyfill/routeRuntime/url.mjs +35 -0
  174. package/dist/runtime/polyfill/routeRuntime/url.mjs.map +1 -0
  175. package/dist/runtime/polyfill/routeRuntime.d.mts +43 -0
  176. package/dist/runtime/polyfill/routeRuntime.mjs +202 -0
  177. package/dist/runtime/polyfill/routeRuntime.mjs.map +1 -0
  178. package/dist/runtime/polyfill/runtimeCapabilityApi.mjs +26 -0
  179. package/dist/runtime/polyfill/runtimeCapabilityApi.mjs.map +1 -0
  180. package/dist/runtime/polyfill/runtimeDataApi.d.mts +79 -0
  181. package/dist/runtime/polyfill/runtimeDataApi.mjs +134 -0
  182. package/dist/runtime/polyfill/runtimeDataApi.mjs.map +1 -0
  183. package/dist/runtime/polyfill/runtimeInfra.mjs +40 -0
  184. package/dist/runtime/polyfill/runtimeInfra.mjs.map +1 -0
  185. package/dist/runtime/polyfill/runtimeOps.mjs +62 -0
  186. package/dist/runtime/polyfill/runtimeOps.mjs.map +1 -0
  187. package/dist/runtime/polyfill/selectorQuery.mjs +204 -0
  188. package/dist/runtime/polyfill/selectorQuery.mjs.map +1 -0
  189. package/dist/runtime/polyfill/storage.mjs +103 -0
  190. package/dist/runtime/polyfill/storage.mjs.map +1 -0
  191. package/dist/runtime/polyfill/storageAsync.mjs +62 -0
  192. package/dist/runtime/polyfill/storageAsync.mjs.map +1 -0
  193. package/dist/runtime/polyfill/subscribe.mjs +30 -0
  194. package/dist/runtime/polyfill/subscribe.mjs.map +1 -0
  195. package/dist/runtime/polyfill/system.mjs +111 -0
  196. package/dist/runtime/polyfill/system.mjs.map +1 -0
  197. package/dist/runtime/polyfill/systemApi.mjs +65 -0
  198. package/dist/runtime/polyfill/systemApi.mjs.map +1 -0
  199. package/dist/runtime/polyfill/types/base.d.mts +12 -0
  200. package/dist/runtime/polyfill/types/common.d.mts +126 -0
  201. package/dist/runtime/polyfill/types/locationRuntime.d.mts +151 -0
  202. package/dist/runtime/polyfill/types/mediaAuth.d.mts +152 -0
  203. package/dist/runtime/polyfill/types/platformRuntime.d.mts +141 -0
  204. package/dist/runtime/polyfill/types/systemAuth.d.mts +122 -0
  205. package/dist/runtime/polyfill/ui.mjs +135 -0
  206. package/dist/runtime/polyfill/ui.mjs.map +1 -0
  207. package/dist/runtime/polyfill/uiFeedback.mjs +35 -0
  208. package/dist/runtime/polyfill/uiFeedback.mjs.map +1 -0
  209. package/dist/runtime/polyfill/uiMediaApi.d.mts +172 -0
  210. package/dist/runtime/polyfill/uiMediaApi.mjs +162 -0
  211. package/dist/runtime/polyfill/uiMediaApi.mjs.map +1 -0
  212. package/dist/runtime/polyfill/videoContext.mjs +56 -0
  213. package/dist/runtime/polyfill/videoContext.mjs.map +1 -0
  214. package/dist/runtime/polyfill/vkSession.mjs +58 -0
  215. package/dist/runtime/polyfill/vkSession.mjs.map +1 -0
  216. package/dist/runtime/polyfill/windowResize.mjs +39 -0
  217. package/dist/runtime/polyfill/windowResize.mjs.map +1 -0
  218. package/dist/runtime/polyfill/worker.mjs +77 -0
  219. package/dist/runtime/polyfill/worker.mjs.map +1 -0
  220. package/dist/runtime/polyfill.d.mts +5 -0
  221. package/dist/runtime/renderContext.d.mts +21 -0
  222. package/dist/runtime/renderContext.mjs +147 -0
  223. package/dist/runtime/renderContext.mjs.map +1 -0
  224. package/dist/runtime/rpx.d.mts +9 -0
  225. package/dist/runtime/rpx.mjs +27 -0
  226. package/dist/runtime/rpx.mjs.map +1 -0
  227. package/dist/runtime/style.d.mts +6 -0
  228. package/dist/runtime/style.mjs +37 -0
  229. package/dist/runtime/style.mjs.map +1 -0
  230. package/dist/runtime/template.d.mts +10 -0
  231. package/dist/runtime/warning.d.mts +10 -0
  232. package/dist/runtime/warning.mjs +43 -0
  233. package/dist/runtime/warning.mjs.map +1 -0
  234. package/dist/{slugify-B4l45KNs.mjs → shared/slugify.mjs} +3 -1
  235. package/dist/shared/slugify.mjs.map +1 -0
  236. package/dist/shared/wxml.mjs +64 -0
  237. package/dist/shared/wxml.mjs.map +1 -0
  238. package/package.json +1 -1
  239. package/dist/index-w9xxIH-l.d.mts +0 -1229
  240. package/dist/plugin-BARxSPO8.mjs +0 -1567
  241. package/dist/plugin-DP2iPVmw.d.mts +0 -96
  242. package/dist/runtime-D6j2_x_N.mjs +0 -6251
@@ -0,0 +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"}
@@ -0,0 +1,12 @@
1
+ //#region src/runtime/polyfill/types/base.d.ts
2
+ interface WxBaseResult {
3
+ errMsg: string;
4
+ }
5
+ interface WxAsyncOptions<SuccessResult extends WxBaseResult> {
6
+ success?: (result: SuccessResult) => void;
7
+ fail?: (result: WxBaseResult) => void;
8
+ complete?: (result: SuccessResult | WxBaseResult) => void;
9
+ }
10
+ //#endregion
11
+ export { WxAsyncOptions, WxBaseResult };
12
+ //# sourceMappingURL=base.d.mts.map
@@ -0,0 +1,126 @@
1
+ import { WxAsyncOptions, WxBaseResult } from "./base.mjs";
2
+
3
+ //#region src/runtime/polyfill/types/common.d.ts
4
+ interface ShowToastOptions extends WxAsyncOptions<WxBaseResult> {
5
+ title?: string;
6
+ icon?: 'success' | 'error' | 'none';
7
+ duration?: number;
8
+ }
9
+ interface SetClipboardDataOptions extends WxAsyncOptions<WxBaseResult> {
10
+ data?: string;
11
+ }
12
+ interface GetClipboardDataSuccessResult extends WxBaseResult {
13
+ data: string;
14
+ }
15
+ interface GetClipboardDataOptions extends WxAsyncOptions<GetClipboardDataSuccessResult> {}
16
+ interface SetStorageOptions extends WxAsyncOptions<WxBaseResult> {
17
+ key?: string;
18
+ data?: any;
19
+ }
20
+ interface GetStorageSuccessResult extends WxBaseResult {
21
+ data: any;
22
+ }
23
+ interface GetStorageOptions extends WxAsyncOptions<GetStorageSuccessResult> {
24
+ key?: string;
25
+ }
26
+ interface RemoveStorageOptions extends WxAsyncOptions<WxBaseResult> {
27
+ key?: string;
28
+ }
29
+ interface StorageInfoResult extends WxBaseResult {
30
+ keys: string[];
31
+ currentSize: number;
32
+ limitSize: number;
33
+ }
34
+ interface FileReadResult extends WxBaseResult {
35
+ data: string | ArrayBuffer;
36
+ }
37
+ interface FileWriteOptions extends WxAsyncOptions<WxBaseResult> {
38
+ filePath?: string;
39
+ data?: string | ArrayBuffer | ArrayBufferView;
40
+ encoding?: string;
41
+ }
42
+ interface FileReadOptions extends WxAsyncOptions<FileReadResult> {
43
+ filePath?: string;
44
+ encoding?: string;
45
+ }
46
+ interface FileSystemManager {
47
+ writeFile: (options?: FileWriteOptions) => void;
48
+ readFile: (options?: FileReadOptions) => void;
49
+ writeFileSync: (filePath: string, data: string | ArrayBuffer | ArrayBufferView, encoding?: string) => void;
50
+ readFileSync: (filePath: string, encoding?: string) => string | ArrayBuffer;
51
+ }
52
+ type WorkerMessageCallback = (result: {
53
+ data: unknown;
54
+ }) => void;
55
+ type WorkerErrorCallback = (result: {
56
+ message: string;
57
+ filename?: string;
58
+ lineno?: number;
59
+ colno?: number;
60
+ }) => void;
61
+ interface WorkerBridge {
62
+ postMessage: (data: unknown) => void;
63
+ terminate: () => void;
64
+ onMessage: (callback: WorkerMessageCallback) => void;
65
+ offMessage: (callback?: WorkerMessageCallback) => void;
66
+ onError: (callback: WorkerErrorCallback) => void;
67
+ offError: (callback?: WorkerErrorCallback) => void;
68
+ }
69
+ interface RequestSuccessResult extends WxBaseResult {
70
+ data: any;
71
+ statusCode: number;
72
+ header: Record<string, string>;
73
+ }
74
+ interface RequestOptions extends WxAsyncOptions<RequestSuccessResult> {
75
+ url?: string;
76
+ method?: string;
77
+ data?: any;
78
+ header?: Record<string, string>;
79
+ timeout?: number;
80
+ dataType?: 'json' | 'text';
81
+ responseType?: 'text' | 'arraybuffer';
82
+ }
83
+ interface DownloadFileSuccessResult extends WxBaseResult {
84
+ tempFilePath: string;
85
+ statusCode: number;
86
+ }
87
+ interface DownloadFileOptions extends WxAsyncOptions<DownloadFileSuccessResult> {
88
+ url?: string;
89
+ header?: Record<string, string>;
90
+ timeout?: number;
91
+ }
92
+ interface UploadFileSuccessResult extends WxBaseResult {
93
+ data: string;
94
+ statusCode: number;
95
+ header: Record<string, string>;
96
+ }
97
+ interface UploadFileOptions extends WxAsyncOptions<UploadFileSuccessResult> {
98
+ url?: string;
99
+ filePath?: string;
100
+ name?: string;
101
+ header?: Record<string, string>;
102
+ formData?: Record<string, unknown>;
103
+ timeout?: number;
104
+ }
105
+ interface PreviewImageOptions extends WxAsyncOptions<WxBaseResult> {
106
+ current?: string;
107
+ urls?: string[];
108
+ }
109
+ interface ChooseImageTempFile {
110
+ path: string;
111
+ size: number;
112
+ type: string;
113
+ name: string;
114
+ }
115
+ interface ChooseImageSuccessResult extends WxBaseResult {
116
+ tempFilePaths: string[];
117
+ tempFiles: ChooseImageTempFile[];
118
+ }
119
+ interface ChooseImageOptions extends WxAsyncOptions<ChooseImageSuccessResult> {
120
+ count?: number;
121
+ sizeType?: Array<'original' | 'compressed'>;
122
+ sourceType?: Array<'album' | 'camera'>;
123
+ }
124
+ //#endregion
125
+ export { ChooseImageOptions, DownloadFileOptions, FileSystemManager, GetClipboardDataOptions, GetStorageOptions, PreviewImageOptions, RemoveStorageOptions, RequestOptions, SetClipboardDataOptions, SetStorageOptions, ShowToastOptions, StorageInfoResult, UploadFileOptions, WorkerBridge };
126
+ //# sourceMappingURL=common.d.mts.map
@@ -0,0 +1,151 @@
1
+ import { WxAsyncOptions, WxBaseResult } from "./base.mjs";
2
+
3
+ //#region src/runtime/polyfill/types/locationRuntime.d.ts
4
+ interface GetLocationSuccessResult extends WxBaseResult {
5
+ latitude: number;
6
+ longitude: number;
7
+ speed: number;
8
+ accuracy: number;
9
+ altitude: number;
10
+ verticalAccuracy: number;
11
+ horizontalAccuracy: number;
12
+ }
13
+ interface GetLocationOptions extends WxAsyncOptions<GetLocationSuccessResult> {
14
+ type?: 'wgs84' | 'gcj02';
15
+ altitude?: boolean;
16
+ isHighAccuracy?: boolean;
17
+ highAccuracyExpireTime?: number;
18
+ }
19
+ interface GetFuzzyLocationSuccessResult extends WxBaseResult {
20
+ latitude: number;
21
+ longitude: number;
22
+ accuracy: number;
23
+ }
24
+ interface GetFuzzyLocationOptions extends WxAsyncOptions<GetFuzzyLocationSuccessResult> {}
25
+ type NetworkType = 'wifi' | '2g' | '3g' | '4g' | '5g' | 'unknown' | 'none';
26
+ interface NetworkStatusResult {
27
+ isConnected: boolean;
28
+ networkType: NetworkType;
29
+ }
30
+ interface GetNetworkTypeSuccessResult extends WxBaseResult, NetworkStatusResult {}
31
+ interface GetNetworkTypeOptions extends WxAsyncOptions<GetNetworkTypeSuccessResult> {}
32
+ type NetworkStatusChangeCallback = (result: NetworkStatusResult) => void;
33
+ interface WindowResizeResult {
34
+ size: {
35
+ windowWidth: number;
36
+ windowHeight: number;
37
+ };
38
+ windowWidth: number;
39
+ windowHeight: number;
40
+ }
41
+ type WindowResizeCallback = (result: WindowResizeResult) => void;
42
+ interface ShowLoadingOptions extends WxAsyncOptions<WxBaseResult> {
43
+ title?: string;
44
+ mask?: boolean;
45
+ }
46
+ interface SetBackgroundColorOptions extends WxAsyncOptions<WxBaseResult> {
47
+ backgroundColor?: string;
48
+ backgroundColorTop?: string;
49
+ backgroundColorBottom?: string;
50
+ }
51
+ interface SetBackgroundTextStyleOptions extends WxAsyncOptions<WxBaseResult> {
52
+ textStyle?: 'dark' | 'light';
53
+ }
54
+ interface ShareMenuOptions extends WxAsyncOptions<WxBaseResult> {
55
+ withShareTicket?: boolean;
56
+ menus?: string[];
57
+ }
58
+ interface NavigateToMiniProgramOptions extends WxAsyncOptions<WxBaseResult> {
59
+ appId?: string;
60
+ path?: string;
61
+ extraData?: Record<string, any>;
62
+ envVersion?: 'develop' | 'trial' | 'release';
63
+ }
64
+ interface LoadSubPackageOptions extends WxAsyncOptions<WxBaseResult> {
65
+ name?: string;
66
+ root?: string;
67
+ }
68
+ interface PreloadSubpackageOptions extends WxAsyncOptions<WxBaseResult> {
69
+ name?: string;
70
+ root?: string;
71
+ }
72
+ interface UpdateManagerCheckResult {
73
+ hasUpdate: boolean;
74
+ }
75
+ interface UpdateManager {
76
+ applyUpdate: () => void;
77
+ onCheckForUpdate: (callback: (result: UpdateManagerCheckResult) => void) => void;
78
+ onUpdateReady: (callback: () => void) => void;
79
+ onUpdateFailed: (callback: () => void) => void;
80
+ }
81
+ interface LogManagerOptions {
82
+ level?: 0 | 1;
83
+ }
84
+ interface LogManager {
85
+ debug: (...args: unknown[]) => void;
86
+ info: (...args: unknown[]) => void;
87
+ log: (...args: unknown[]) => void;
88
+ warn: (...args: unknown[]) => void;
89
+ }
90
+ interface ChooseLocationSuccessResult extends WxBaseResult {
91
+ name: string;
92
+ address: string;
93
+ latitude: number;
94
+ longitude: number;
95
+ }
96
+ interface ChooseLocationOptions extends WxAsyncOptions<ChooseLocationSuccessResult> {}
97
+ interface ChooseAddressSuccessResult extends WxBaseResult {
98
+ userName: string;
99
+ postalCode: string;
100
+ provinceName: string;
101
+ cityName: string;
102
+ countyName: string;
103
+ detailInfo: string;
104
+ nationalCode: string;
105
+ telNumber: string;
106
+ }
107
+ interface ChooseAddressOptions extends WxAsyncOptions<ChooseAddressSuccessResult> {}
108
+ interface GetImageInfoSuccessResult extends WxBaseResult {
109
+ width: number;
110
+ height: number;
111
+ path: string;
112
+ type: string;
113
+ orientation: 'up';
114
+ }
115
+ interface GetImageInfoOptions extends WxAsyncOptions<GetImageInfoSuccessResult> {
116
+ src?: string;
117
+ }
118
+ interface MakePhoneCallOptions extends WxAsyncOptions<WxBaseResult> {
119
+ phoneNumber?: string;
120
+ }
121
+ interface OpenLocationOptions extends WxAsyncOptions<WxBaseResult> {
122
+ latitude?: number;
123
+ longitude?: number;
124
+ scale?: number;
125
+ name?: string;
126
+ address?: string;
127
+ }
128
+ interface TabBarOptions extends WxAsyncOptions<WxBaseResult> {
129
+ animation?: boolean;
130
+ }
131
+ interface OpenCustomerServiceChatOptions extends WxAsyncOptions<WxBaseResult> {
132
+ corpId?: string;
133
+ extInfo?: Record<string, any>;
134
+ url?: string;
135
+ }
136
+ interface RequestPaymentOptions extends WxAsyncOptions<WxBaseResult> {
137
+ timeStamp?: string;
138
+ nonceStr?: string;
139
+ package?: string;
140
+ signType?: string;
141
+ paySign?: string;
142
+ }
143
+ interface RequestSubscribeMessageSuccessResult extends WxBaseResult {
144
+ [tmplId: string]: string;
145
+ }
146
+ interface RequestSubscribeMessageOptions extends WxAsyncOptions<RequestSubscribeMessageSuccessResult> {
147
+ tmplIds?: string[];
148
+ }
149
+ //#endregion
150
+ export { ChooseAddressOptions, ChooseLocationOptions, GetFuzzyLocationOptions, GetImageInfoOptions, GetLocationOptions, GetNetworkTypeOptions, LoadSubPackageOptions, LogManager, LogManagerOptions, MakePhoneCallOptions, NavigateToMiniProgramOptions, NetworkStatusChangeCallback, OpenCustomerServiceChatOptions, OpenLocationOptions, PreloadSubpackageOptions, RequestPaymentOptions, RequestSubscribeMessageOptions, RequestSubscribeMessageSuccessResult, SetBackgroundColorOptions, SetBackgroundTextStyleOptions, ShareMenuOptions, ShowLoadingOptions, TabBarOptions, UpdateManager, WindowResizeCallback };
151
+ //# sourceMappingURL=locationRuntime.d.mts.map
@@ -0,0 +1,152 @@
1
+ import { WxAsyncOptions, WxBaseResult } from "./base.mjs";
2
+
3
+ //#region src/runtime/polyfill/types/mediaAuth.d.ts
4
+ interface AuthSettingResult {
5
+ authSetting: Record<string, boolean>;
6
+ }
7
+ interface GetSettingSuccessResult extends WxBaseResult, AuthSettingResult {}
8
+ interface GetSettingOptions extends WxAsyncOptions<GetSettingSuccessResult> {}
9
+ interface AuthorizeOptions extends WxAsyncOptions<WxBaseResult> {
10
+ scope?: string;
11
+ }
12
+ interface OpenSettingSuccessResult extends WxBaseResult, AuthSettingResult {}
13
+ interface OpenSettingOptions extends WxAsyncOptions<OpenSettingSuccessResult> {}
14
+ type ChooseMediaType = 'image' | 'video';
15
+ interface ChooseMediaTempFile {
16
+ tempFilePath: string;
17
+ size: number;
18
+ fileType: ChooseMediaType;
19
+ thumbTempFilePath?: string;
20
+ width: number;
21
+ height: number;
22
+ duration: number;
23
+ }
24
+ interface ChooseMediaSuccessResult extends WxBaseResult {
25
+ type: ChooseMediaType;
26
+ tempFiles: ChooseMediaTempFile[];
27
+ }
28
+ interface ChooseMediaOptions extends WxAsyncOptions<ChooseMediaSuccessResult> {
29
+ count?: number;
30
+ mediaType?: Array<'image' | 'video' | 'mix'>;
31
+ sourceType?: Array<'album' | 'camera'>;
32
+ maxDuration?: number;
33
+ sizeType?: Array<'original' | 'compressed'>;
34
+ camera?: 'back' | 'front';
35
+ }
36
+ interface CompressImageSuccessResult extends WxBaseResult {
37
+ tempFilePath: string;
38
+ }
39
+ interface CompressImageOptions extends WxAsyncOptions<CompressImageSuccessResult> {
40
+ src?: string;
41
+ quality?: number;
42
+ compressedWidth?: number;
43
+ compressedHeight?: number;
44
+ }
45
+ interface ChooseVideoSuccessResult extends WxBaseResult {
46
+ tempFilePath: string;
47
+ duration: number;
48
+ size: number;
49
+ height: number;
50
+ width: number;
51
+ }
52
+ interface ChooseVideoOptions extends WxAsyncOptions<ChooseVideoSuccessResult> {
53
+ sourceType?: Array<'album' | 'camera'>;
54
+ compressed?: boolean;
55
+ maxDuration?: number;
56
+ camera?: 'back' | 'front';
57
+ }
58
+ interface GetVideoInfoSuccessResult extends WxBaseResult {
59
+ size: number;
60
+ duration: number;
61
+ width: number;
62
+ height: number;
63
+ fps: number;
64
+ bitrate: number;
65
+ type: string;
66
+ orientation: 'up';
67
+ }
68
+ interface GetVideoInfoOptions extends WxAsyncOptions<GetVideoInfoSuccessResult> {
69
+ src?: string;
70
+ }
71
+ interface CompressVideoSuccessResult extends WxBaseResult {
72
+ tempFilePath: string;
73
+ size: number;
74
+ duration: number;
75
+ width: number;
76
+ height: number;
77
+ bitrate: number;
78
+ fps: number;
79
+ }
80
+ interface CompressVideoOptions extends WxAsyncOptions<CompressVideoSuccessResult> {
81
+ src?: string;
82
+ quality?: 'low' | 'medium' | 'high';
83
+ bitrate?: number;
84
+ }
85
+ interface MediaPreviewSource {
86
+ url: string;
87
+ type?: 'image' | 'video';
88
+ poster?: string;
89
+ }
90
+ interface PreviewMediaOptions extends WxAsyncOptions<WxBaseResult> {
91
+ sources?: MediaPreviewSource[];
92
+ current?: number;
93
+ }
94
+ interface SaveVideoToPhotosAlbumOptions extends WxAsyncOptions<WxBaseResult> {
95
+ filePath?: string;
96
+ }
97
+ interface ChooseFileSuccessResult extends WxBaseResult {
98
+ tempFiles: ChooseMessageFileTempFile[];
99
+ }
100
+ interface ChooseFileOptions extends WxAsyncOptions<ChooseFileSuccessResult> {
101
+ count?: number;
102
+ type?: 'all' | 'video' | 'image' | 'file';
103
+ extension?: string[];
104
+ }
105
+ interface OpenVideoEditorSuccessResult extends WxBaseResult {
106
+ tempFilePath: string;
107
+ }
108
+ interface OpenVideoEditorOptions extends WxAsyncOptions<OpenVideoEditorSuccessResult> {
109
+ src?: string;
110
+ }
111
+ interface SaveFileSuccessResult extends WxBaseResult {
112
+ savedFilePath: string;
113
+ }
114
+ interface SaveFileOptions extends WxAsyncOptions<SaveFileSuccessResult> {
115
+ tempFilePath?: string;
116
+ filePath?: string;
117
+ }
118
+ interface SaveFileToDiskOptions extends WxAsyncOptions<WxBaseResult> {
119
+ filePath?: string;
120
+ fileName?: string;
121
+ }
122
+ interface ChooseMessageFileTempFile {
123
+ path: string;
124
+ size: number;
125
+ type: string;
126
+ name: string;
127
+ time: number;
128
+ }
129
+ interface ChooseMessageFileSuccessResult extends WxBaseResult {
130
+ tempFiles: ChooseMessageFileTempFile[];
131
+ }
132
+ interface ChooseMessageFileOptions extends WxAsyncOptions<ChooseMessageFileSuccessResult> {
133
+ count?: number;
134
+ type?: 'all' | 'video' | 'image' | 'file';
135
+ }
136
+ interface SaveImageToPhotosAlbumOptions extends WxAsyncOptions<WxBaseResult> {
137
+ filePath?: string;
138
+ }
139
+ interface ScanCodeSuccessResult extends WxBaseResult {
140
+ result: string;
141
+ scanType: string;
142
+ charSet: string;
143
+ path: string;
144
+ rawData: string;
145
+ }
146
+ interface ScanCodeOptions extends WxAsyncOptions<ScanCodeSuccessResult> {
147
+ onlyFromCamera?: boolean;
148
+ scanType?: string[];
149
+ }
150
+ //#endregion
151
+ export { AuthorizeOptions, ChooseFileOptions, ChooseMediaOptions, ChooseMessageFileOptions, ChooseVideoOptions, CompressImageOptions, CompressVideoOptions, GetSettingOptions, GetVideoInfoOptions, OpenSettingOptions, OpenVideoEditorOptions, PreviewMediaOptions, SaveFileOptions, SaveFileToDiskOptions, SaveImageToPhotosAlbumOptions, SaveVideoToPhotosAlbumOptions, ScanCodeOptions };
152
+ //# sourceMappingURL=mediaAuth.d.mts.map
@@ -0,0 +1,141 @@
1
+ import { WxAsyncOptions, WxBaseResult } from "./base.mjs";
2
+
3
+ //#region src/runtime/polyfill/types/platformRuntime.d.ts
4
+ interface VibrateShortOptions extends WxAsyncOptions<WxBaseResult> {
5
+ type?: 'heavy' | 'medium' | 'light';
6
+ }
7
+ interface BatteryInfo {
8
+ level: number;
9
+ isCharging: boolean;
10
+ }
11
+ interface GetBatteryInfoSuccessResult extends WxBaseResult, BatteryInfo {}
12
+ interface GetExtConfigSuccessResult extends WxBaseResult {
13
+ extConfig: Record<string, any>;
14
+ }
15
+ interface GetExtConfigOptions extends WxAsyncOptions<GetExtConfigSuccessResult> {}
16
+ interface ShowModalSuccessResult extends WxBaseResult {
17
+ confirm: boolean;
18
+ cancel: boolean;
19
+ }
20
+ interface ShowModalOptions extends WxAsyncOptions<ShowModalSuccessResult> {
21
+ title?: string;
22
+ content?: string;
23
+ showCancel?: boolean;
24
+ confirmText?: string;
25
+ cancelText?: string;
26
+ }
27
+ interface ShowActionSheetSuccessResult extends WxBaseResult {
28
+ tapIndex: number;
29
+ }
30
+ interface ShowActionSheetOptions extends WxAsyncOptions<ShowActionSheetSuccessResult> {
31
+ itemList?: string[];
32
+ itemColor?: string;
33
+ alertText?: string;
34
+ }
35
+ interface OpenDocumentOptions extends WxAsyncOptions<WxBaseResult> {
36
+ filePath?: string;
37
+ fileType?: string;
38
+ showMenu?: boolean;
39
+ }
40
+ interface PageScrollToOptions extends WxAsyncOptions<WxBaseResult> {
41
+ scrollTop?: number;
42
+ duration?: number;
43
+ }
44
+ interface SelectorQueryNodeFields {
45
+ id?: boolean;
46
+ dataset?: boolean;
47
+ rect?: boolean;
48
+ size?: boolean;
49
+ scrollOffset?: boolean;
50
+ properties?: string[];
51
+ computedStyle?: string[];
52
+ context?: boolean;
53
+ node?: boolean;
54
+ }
55
+ type SelectorQueryNodeCallback = (result: any) => void;
56
+ interface SelectorQuery {
57
+ in: (context?: unknown) => SelectorQuery;
58
+ select: (selector: string) => SelectorQueryNodesRef;
59
+ selectAll: (selector: string) => SelectorQueryNodesRef;
60
+ selectViewport: () => SelectorQueryNodesRef;
61
+ exec: (callback?: (result: any[]) => void) => SelectorQuery;
62
+ }
63
+ interface SelectorQueryNodesRef {
64
+ boundingClientRect: (callback?: SelectorQueryNodeCallback) => SelectorQuery;
65
+ scrollOffset: (callback?: SelectorQueryNodeCallback) => SelectorQuery;
66
+ fields: (fields: SelectorQueryNodeFields, callback?: SelectorQueryNodeCallback) => SelectorQuery;
67
+ node: (callback?: SelectorQueryNodeCallback) => SelectorQuery;
68
+ }
69
+ interface CanvasContext {
70
+ setFillStyle: (color: string) => void;
71
+ setStrokeStyle: (color: string) => void;
72
+ setLineWidth: (width: number) => void;
73
+ setFontSize: (size: number) => void;
74
+ fillRect: (x: number, y: number, width: number, height: number) => void;
75
+ strokeRect: (x: number, y: number, width: number, height: number) => void;
76
+ clearRect: (x: number, y: number, width: number, height: number) => void;
77
+ fillText: (text: string, x: number, y: number, maxWidth?: number) => void;
78
+ beginPath: () => void;
79
+ closePath: () => void;
80
+ moveTo: (x: number, y: number) => void;
81
+ lineTo: (x: number, y: number) => void;
82
+ stroke: () => void;
83
+ draw: (reserve?: boolean | (() => void), callback?: () => void) => void;
84
+ }
85
+ interface VideoContext {
86
+ play: () => void;
87
+ pause: () => void;
88
+ stop: () => void;
89
+ seek: (position: number) => void;
90
+ playbackRate: (rate: number) => void;
91
+ requestFullScreen: () => void;
92
+ exitFullScreen: () => void;
93
+ }
94
+ interface AdBaseOptions {
95
+ adUnitId?: string;
96
+ }
97
+ interface AdError {
98
+ errMsg: string;
99
+ errCode: number;
100
+ }
101
+ interface AdLoadResult {
102
+ errMsg: string;
103
+ }
104
+ interface AdShowResult {
105
+ errMsg: string;
106
+ }
107
+ interface RewardedVideoAdCloseResult {
108
+ isEnded: boolean;
109
+ }
110
+ interface RewardedVideoAd {
111
+ load: () => Promise<AdLoadResult>;
112
+ show: () => Promise<AdShowResult>;
113
+ destroy: () => void;
114
+ onLoad: (callback: () => void) => void;
115
+ offLoad: (callback?: () => void) => void;
116
+ onError: (callback: (error: AdError) => void) => void;
117
+ offError: (callback?: (error: AdError) => void) => void;
118
+ onClose: (callback: (result: RewardedVideoAdCloseResult) => void) => void;
119
+ offClose: (callback?: (result: RewardedVideoAdCloseResult) => void) => void;
120
+ }
121
+ interface InterstitialAd {
122
+ load: () => Promise<AdLoadResult>;
123
+ show: () => Promise<AdShowResult>;
124
+ destroy: () => void;
125
+ onLoad: (callback: () => void) => void;
126
+ offLoad: (callback?: () => void) => void;
127
+ onError: (callback: (error: AdError) => void) => void;
128
+ offError: (callback?: (error: AdError) => void) => void;
129
+ onClose: (callback: () => void) => void;
130
+ offClose: (callback?: () => void) => void;
131
+ }
132
+ interface VkSession {
133
+ start: () => Promise<WxBaseResult>;
134
+ stop: () => Promise<WxBaseResult>;
135
+ destroy: () => void;
136
+ on: (eventName: string, callback: (payload: unknown) => void) => void;
137
+ off: (eventName?: string, callback?: (payload: unknown) => void) => void;
138
+ }
139
+ //#endregion
140
+ export { AdBaseOptions, BatteryInfo, CanvasContext, GetBatteryInfoSuccessResult, GetExtConfigOptions, InterstitialAd, OpenDocumentOptions, PageScrollToOptions, RewardedVideoAd, SelectorQuery, ShowActionSheetOptions, ShowModalOptions, VibrateShortOptions, VideoContext, VkSession };
141
+ //# sourceMappingURL=platformRuntime.d.mts.map