zcw-shared 1.5.0 → 1.7.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.
Files changed (527) hide show
  1. package/README.md +512 -782
  2. package/assets/logo-colorful.svg +18 -18
  3. package/assets/logo-name.svg +7 -7
  4. package/assets/logo-transparent.svg +14 -14
  5. package/assets/logo.svg +8 -8
  6. package/dist/constants/colorPatterns.d.ts +8 -2
  7. package/dist/constants/colorPatterns.js.map +1 -1
  8. package/dist/constants/namedColors.d.ts +16 -2
  9. package/dist/constants/namedColors.js.map +1 -1
  10. package/dist/functions/android/buildProject.d.ts +11 -0
  11. package/dist/functions/android/buildProject.js +97 -0
  12. package/dist/functions/android/buildProject.js.map +1 -0
  13. package/dist/functions/android/modifyGradle.d.ts +17 -0
  14. package/dist/functions/android/modifyGradle.js +69 -0
  15. package/dist/functions/android/modifyGradle.js.map +1 -0
  16. package/dist/functions/android/modifyManifest.d.ts +23 -0
  17. package/dist/functions/android/modifyManifest.js +198 -0
  18. package/dist/functions/android/modifyManifest.js.map +1 -0
  19. package/dist/functions/android/permission.d.ts +30 -0
  20. package/dist/functions/android/permission.js +65 -0
  21. package/dist/functions/android/permission.js.map +1 -0
  22. package/dist/functions/color/colorValidation.d.ts +11 -0
  23. package/dist/functions/color/colorValidation.js +35 -0
  24. package/dist/functions/color/colorValidation.js.map +1 -0
  25. package/dist/functions/color/convertColor.d.ts +0 -1
  26. package/dist/functions/color/convertColor.js +135 -166
  27. package/dist/functions/color/convertColor.js.map +1 -1
  28. package/dist/functions/color/deduplicateColors.js +23 -38
  29. package/dist/functions/color/deduplicateColors.js.map +1 -1
  30. package/dist/functions/color/detectColorFormat.d.ts +8 -2
  31. package/dist/functions/color/detectColorFormat.js +49 -51
  32. package/dist/functions/color/detectColorFormat.js.map +1 -1
  33. package/dist/functions/color/extractColors.js +48 -18
  34. package/dist/functions/color/extractColors.js.map +1 -1
  35. package/dist/functions/css/extractCssVariables.d.ts +1 -1
  36. package/dist/functions/css/extractCssVariables.js +1 -1
  37. package/dist/functions/css/extractCssVariables.js.map +1 -1
  38. package/dist/functions/debug/createDebugger.d.ts +8 -7
  39. package/dist/functions/debug/createDebugger.js +49 -39
  40. package/dist/functions/debug/createDebugger.js.map +1 -1
  41. package/dist/functions/dom/detectOverflow.d.ts +3 -3
  42. package/dist/functions/dom/detectOverflow.js +3 -3
  43. package/dist/functions/dom/detectOverflow.js.map +1 -1
  44. package/dist/functions/dom/getElementRect.d.ts +1 -1
  45. package/dist/functions/dom/getElementRect.js.map +1 -1
  46. package/dist/functions/dom/getRelativePosition.d.ts +1 -1
  47. package/dist/functions/dom/getRelativePosition.js.map +1 -1
  48. package/dist/functions/dom/getViewportRect.d.ts +2 -2
  49. package/dist/functions/dom/getViewportRect.js +2 -2
  50. package/dist/functions/dom/getViewportRect.js.map +1 -1
  51. package/dist/functions/image/generateMacIcons.d.ts +3 -3
  52. package/dist/functions/image/generateMacIcons.js.map +1 -1
  53. package/dist/functions/image/generateMacTrayIcon.d.ts +3 -3
  54. package/dist/functions/image/generateMacTrayIcon.js.map +1 -1
  55. package/dist/functions/image/generatePaddedImage.d.ts +2 -2
  56. package/dist/functions/image/generatePaddedImage.js.map +1 -1
  57. package/dist/functions/image/generatePwaIcons.d.ts +3 -3
  58. package/dist/functions/image/generatePwaIcons.js.map +1 -1
  59. package/dist/functions/image/generateRoundedImage.d.ts +2 -2
  60. package/dist/functions/image/generateRoundedImage.js.map +1 -1
  61. package/dist/functions/ipc/dispatchIpcRequest.d.ts +2 -2
  62. package/dist/functions/ipc/dispatchIpcRequest.js +1 -1
  63. package/dist/functions/ipc/dispatchIpcRequest.js.map +1 -1
  64. package/dist/functions/software/findSoftware.d.ts +3 -3
  65. package/dist/functions/software/findSoftware.js +7 -9
  66. package/dist/functions/software/findSoftware.js.map +1 -1
  67. package/dist/functions/uniapp/app-plus/buildAndroidApp.d.ts +2 -2
  68. package/dist/functions/uniapp/app-plus/buildAndroidApp.js +97 -24
  69. package/dist/functions/uniapp/app-plus/buildAndroidApp.js.map +1 -1
  70. package/dist/functions/uniapp/build.d.ts +20 -0
  71. package/dist/functions/uniapp/build.js +84 -0
  72. package/dist/functions/uniapp/build.js.map +1 -0
  73. package/dist/functions/uniapp/detectAndroidProjectStructure.d.ts +7 -0
  74. package/dist/functions/uniapp/detectAndroidProjectStructure.js +30 -0
  75. package/dist/functions/uniapp/detectAndroidProjectStructure.js.map +1 -0
  76. package/dist/functions/uniapp/detectProjectType.d.ts +16 -0
  77. package/dist/functions/uniapp/detectProjectType.js +68 -0
  78. package/dist/functions/uniapp/detectProjectType.js.map +1 -0
  79. package/dist/functions/uniapp/parseManifest.d.ts +12 -0
  80. package/dist/functions/uniapp/{app-plus/parseManifest.js → parseManifest.js} +9 -7
  81. package/dist/functions/uniapp/parseManifest.js.map +1 -0
  82. package/dist/functions/utils/generateExports.d.ts +16 -0
  83. package/dist/functions/utils/generateExports.js +34 -0
  84. package/dist/functions/utils/generateExports.js.map +1 -0
  85. package/dist/functions/vue/extractColorsFromVueFile.js +2 -11
  86. package/dist/functions/vue/extractColorsFromVueFile.js.map +1 -1
  87. package/dist/functions/vue/extractColorsFromVueSection.js.map +1 -1
  88. package/dist/functions/xml/modifyXml.d.ts +11 -0
  89. package/dist/functions/xml/modifyXml.js +46 -0
  90. package/dist/functions/xml/modifyXml.js.map +1 -0
  91. package/dist/hooks/useAltool.d.ts +3 -32
  92. package/dist/hooks/useAltool.js.map +1 -1
  93. package/dist/hooks/useLocalStorage.d.ts +4 -4
  94. package/dist/hooks/useLocalStorage.js +51 -18
  95. package/dist/hooks/useLocalStorage.js.map +1 -1
  96. package/dist/hooks/useSessionStorage.d.ts +4 -4
  97. package/dist/hooks/useSessionStorage.js +51 -18
  98. package/dist/hooks/useSessionStorage.js.map +1 -1
  99. package/dist/hooks/useStorage.d.ts +10 -3
  100. package/dist/hooks/useStorage.js +33 -35
  101. package/dist/hooks/useStorage.js.map +1 -1
  102. package/dist/hooks/useStorageWithIndexedDB.d.ts +3 -4
  103. package/dist/hooks/useStorageWithIndexedDB.js +39 -29
  104. package/dist/hooks/useStorageWithIndexedDB.js.map +1 -1
  105. package/dist/hooks/useWebWorker.d.ts +25 -4
  106. package/dist/hooks/useWebWorker.js.map +1 -1
  107. package/dist/hooks/useWorkerFunction.d.ts +22 -4
  108. package/dist/hooks/useWorkerFunction.js +28 -28
  109. package/dist/hooks/useWorkerFunction.js.map +1 -1
  110. package/dist/hooks/useWorkerPool.d.ts +30 -4
  111. package/dist/hooks/useWorkerPool.js.map +1 -1
  112. package/package.json +17 -22
  113. package/references/arraybuffer.d.ts +109 -0
  114. package/references/blob.d.ts +37 -0
  115. package/references/browser.d.ts +69 -174
  116. package/references/chrome.extension.d.ts +83 -0
  117. package/references/console.d.ts +25 -164
  118. package/references/{crypto.d.ts → crypto-js.d.ts} +57 -57
  119. package/references/dom.d.ts +41 -0
  120. package/references/encoding.d.ts +24 -0
  121. package/references/fetch.d.ts +124 -269
  122. package/references/indexeddb.d.ts +49 -0
  123. package/references/json5.d.ts +21 -28
  124. package/references/location.d.ts +16 -0
  125. package/references/node.d.ts +116 -111
  126. package/references/sharp.d.ts +18 -18
  127. package/references/storage.d.ts +17 -111
  128. package/references/timer.d.ts +45 -46
  129. package/references/uniapp.d.ts +51 -9
  130. package/references/url.d.ts +55 -160
  131. package/references/vue.d.ts +86 -113
  132. package/references/webassembly.d.ts +101 -127
  133. package/references/wechat.d.ts +48 -48
  134. package/references/worker.d.ts +152 -206
  135. package/references/xml.d.ts +88 -55
  136. package/types/altool.d.ts +49 -17
  137. package/types/android-build.d.ts +60 -85
  138. package/types/color.d.ts +72 -162
  139. package/types/geometry.d.ts +28 -65
  140. package/types/platform.d.ts +4 -0
  141. package/types/software.d.ts +14 -26
  142. package/types/storage.d.ts +50 -48
  143. package/types/uniapp-android-build.d.ts +49 -0
  144. package/types/vue.d.ts +29 -29
  145. package/types/worker.d.ts +178 -364
  146. package/dist/constants/softwareConfigs.d.ts +0 -15
  147. package/dist/constants/softwareConfigs.js +0 -157
  148. package/dist/constants/softwareConfigs.js.map +0 -1
  149. package/dist/functions/ag-grid/generateLicense.d.ts +0 -3
  150. package/dist/functions/ag-grid/generateLicense.js +0 -12
  151. package/dist/functions/ag-grid/generateLicense.js.map +0 -1
  152. package/dist/functions/altool/createAltoolClient.d.ts +0 -21
  153. package/dist/functions/altool/createAltoolClient.js +0 -53
  154. package/dist/functions/altool/createAltoolClient.js.map +0 -1
  155. package/dist/functions/altool/getAltoolAuth.d.ts +0 -2
  156. package/dist/functions/altool/getAltoolAuth.js +0 -8
  157. package/dist/functions/altool/getAltoolAuth.js.map +0 -1
  158. package/dist/functions/altool/getAppInfo.d.ts +0 -13
  159. package/dist/functions/altool/getAppInfo.js +0 -39
  160. package/dist/functions/altool/getAppInfo.js.map +0 -1
  161. package/dist/functions/altool/index.d.ts +0 -10
  162. package/dist/functions/altool/index.js +0 -6
  163. package/dist/functions/altool/index.js.map +0 -1
  164. package/dist/functions/altool/isApiKeyAuth.d.ts +0 -2
  165. package/dist/functions/altool/isApiKeyAuth.js +0 -4
  166. package/dist/functions/altool/isApiKeyAuth.js.map +0 -1
  167. package/dist/functions/altool/isCredentialsAuth.d.ts +0 -2
  168. package/dist/functions/altool/isCredentialsAuth.js +0 -4
  169. package/dist/functions/altool/isCredentialsAuth.js.map +0 -1
  170. package/dist/functions/altool/parseAppInfoOutput.d.ts +0 -2
  171. package/dist/functions/altool/parseAppInfoOutput.js +0 -55
  172. package/dist/functions/altool/parseAppInfoOutput.js.map +0 -1
  173. package/dist/functions/altool/parseValidationOutput.d.ts +0 -6
  174. package/dist/functions/altool/parseValidationOutput.js +0 -21
  175. package/dist/functions/altool/parseValidationOutput.js.map +0 -1
  176. package/dist/functions/altool/types.d.ts +0 -26
  177. package/dist/functions/altool/types.js +0 -7
  178. package/dist/functions/altool/types.js.map +0 -1
  179. package/dist/functions/altool/uploadApp.d.ts +0 -6
  180. package/dist/functions/altool/uploadApp.js +0 -36
  181. package/dist/functions/altool/uploadApp.js.map +0 -1
  182. package/dist/functions/altool/validateApp.d.ts +0 -17
  183. package/dist/functions/altool/validateApp.js +0 -40
  184. package/dist/functions/altool/validateApp.js.map +0 -1
  185. package/dist/functions/base64/strToBase64.d.ts +0 -2
  186. package/dist/functions/base64/strToBase64.js +0 -6
  187. package/dist/functions/base64/strToBase64.js.map +0 -1
  188. package/dist/functions/color-converter/COLOR_PATTERNS.d.ts +0 -2
  189. package/dist/functions/color-converter/COLOR_PATTERNS.js +0 -9
  190. package/dist/functions/color-converter/COLOR_PATTERNS.js.map +0 -1
  191. package/dist/functions/color-converter/colorPatterns.d.ts +0 -4
  192. package/dist/functions/color-converter/colorPatterns.js +0 -41
  193. package/dist/functions/color-converter/colorPatterns.js.map +0 -1
  194. package/dist/functions/color-converter/convertColor.d.ts +0 -6
  195. package/dist/functions/color-converter/convertColor.js +0 -12
  196. package/dist/functions/color-converter/convertColor.js.map +0 -1
  197. package/dist/functions/color-converter/createColorReference.d.ts +0 -2
  198. package/dist/functions/color-converter/createColorReference.js +0 -12
  199. package/dist/functions/color-converter/createColorReference.js.map +0 -1
  200. package/dist/functions/color-converter/detectColorFormat.d.ts +0 -2
  201. package/dist/functions/color-converter/detectColorFormat.js +0 -19
  202. package/dist/functions/color-converter/detectColorFormat.js.map +0 -1
  203. package/dist/functions/color-converter/extractColors.d.ts +0 -3
  204. package/dist/functions/color-converter/extractColors.js +0 -16
  205. package/dist/functions/color-converter/extractColors.js.map +0 -1
  206. package/dist/functions/color-converter/extractColorsFromLine.d.ts +0 -2
  207. package/dist/functions/color-converter/extractColorsFromLine.js +0 -18
  208. package/dist/functions/color-converter/extractColorsFromLine.js.map +0 -1
  209. package/dist/functions/color-converter/extractColorsGeneric.d.ts +0 -2
  210. package/dist/functions/color-converter/extractColorsGeneric.js +0 -12
  211. package/dist/functions/color-converter/extractColorsGeneric.js.map +0 -1
  212. package/dist/functions/color-converter/extractCssVariableReferences.d.ts +0 -2
  213. package/dist/functions/color-converter/extractCssVariableReferences.js +0 -15
  214. package/dist/functions/color-converter/extractCssVariableReferences.js.map +0 -1
  215. package/dist/functions/color-converter/extractThirdPartyVariableReferences.d.ts +0 -2
  216. package/dist/functions/color-converter/extractThirdPartyVariableReferences.js +0 -15
  217. package/dist/functions/color-converter/extractThirdPartyVariableReferences.js.map +0 -1
  218. package/dist/functions/color-converter/formatColorOutput.d.ts +0 -5
  219. package/dist/functions/color-converter/formatColorOutput.js +0 -48
  220. package/dist/functions/color-converter/formatColorOutput.js.map +0 -1
  221. package/dist/functions/color-converter/getColorPatterns.d.ts +0 -2
  222. package/dist/functions/color-converter/getColorPatterns.js +0 -11
  223. package/dist/functions/color-converter/getColorPatterns.js.map +0 -1
  224. package/dist/functions/color-converter/getNamedColorMap.d.ts +0 -2
  225. package/dist/functions/color-converter/getNamedColorMap.js +0 -19
  226. package/dist/functions/color-converter/getNamedColorMap.js.map +0 -1
  227. package/dist/functions/color-converter/hexToRgb.d.ts +0 -2
  228. package/dist/functions/color-converter/hexToRgb.js +0 -42
  229. package/dist/functions/color-converter/hexToRgb.js.map +0 -1
  230. package/dist/functions/color-converter/hslToRgb.d.ts +0 -2
  231. package/dist/functions/color-converter/hslToRgb.js +0 -78
  232. package/dist/functions/color-converter/hslToRgb.js.map +0 -1
  233. package/dist/functions/color-converter/hslToRgbInternal.d.ts +0 -2
  234. package/dist/functions/color-converter/hslToRgbInternal.js +0 -24
  235. package/dist/functions/color-converter/hslToRgbInternal.js.map +0 -1
  236. package/dist/functions/color-converter/hueToRgb.d.ts +0 -1
  237. package/dist/functions/color-converter/hueToRgb.js +0 -14
  238. package/dist/functions/color-converter/hueToRgb.js.map +0 -1
  239. package/dist/functions/color-converter/isColorValue.d.ts +0 -2
  240. package/dist/functions/color-converter/isColorValue.js +0 -79
  241. package/dist/functions/color-converter/isColorValue.js.map +0 -1
  242. package/dist/functions/color-converter/isValidColorValue.d.ts +0 -1
  243. package/dist/functions/color-converter/isValidColorValue.js +0 -4
  244. package/dist/functions/color-converter/isValidColorValue.js.map +0 -1
  245. package/dist/functions/color-converter/isValidHslColor.d.ts +0 -2
  246. package/dist/functions/color-converter/isValidHslColor.js +0 -14
  247. package/dist/functions/color-converter/isValidHslColor.js.map +0 -1
  248. package/dist/functions/color-converter/isValidRgbColor.d.ts +0 -2
  249. package/dist/functions/color-converter/isValidRgbColor.js +0 -14
  250. package/dist/functions/color-converter/isValidRgbColor.js.map +0 -1
  251. package/dist/functions/color-converter/normalizeColor.d.ts +0 -1
  252. package/dist/functions/color-converter/normalizeColor.js +0 -49
  253. package/dist/functions/color-converter/normalizeColor.js.map +0 -1
  254. package/dist/functions/color-converter/normalizeColorInput.d.ts +0 -6
  255. package/dist/functions/color-converter/normalizeColorInput.js +0 -94
  256. package/dist/functions/color-converter/normalizeColorInput.js.map +0 -1
  257. package/dist/functions/color-converter/parseColorString.d.ts +0 -12
  258. package/dist/functions/color-converter/parseColorString.js +0 -89
  259. package/dist/functions/color-converter/parseColorString.js.map +0 -1
  260. package/dist/functions/color-converter/parseCssVariables.d.ts +0 -2
  261. package/dist/functions/color-converter/parseCssVariables.js +0 -19
  262. package/dist/functions/color-converter/parseCssVariables.js.map +0 -1
  263. package/dist/functions/color-converter/parseHexColor.d.ts +0 -6
  264. package/dist/functions/color-converter/parseHexColor.js +0 -42
  265. package/dist/functions/color-converter/parseHexColor.js.map +0 -1
  266. package/dist/functions/color-converter/rgbToHex.d.ts +0 -2
  267. package/dist/functions/color-converter/rgbToHex.js +0 -65
  268. package/dist/functions/color-converter/rgbToHex.js.map +0 -1
  269. package/dist/functions/color-converter/rgbToHslInternal.d.ts +0 -2
  270. package/dist/functions/color-converter/rgbToHslInternal.js +0 -31
  271. package/dist/functions/color-converter/rgbToHslInternal.js.map +0 -1
  272. package/dist/functions/color-converter/standardizeColor.d.ts +0 -1
  273. package/dist/functions/color-converter/standardizeColor.js +0 -147
  274. package/dist/functions/color-converter/standardizeColor.js.map +0 -1
  275. package/dist/functions/desensitize/desensitizeName.d.ts +0 -1
  276. package/dist/functions/desensitize/desensitizeName.js +0 -8
  277. package/dist/functions/desensitize/desensitizeName.js.map +0 -1
  278. package/dist/functions/desensitize/desensitizePhone.d.ts +0 -1
  279. package/dist/functions/desensitize/desensitizePhone.js +0 -8
  280. package/dist/functions/desensitize/desensitizePhone.js.map +0 -1
  281. package/dist/functions/dom/getViewportSize.d.ts +0 -5
  282. package/dist/functions/dom/getViewportSize.js +0 -7
  283. package/dist/functions/dom/getViewportSize.js.map +0 -1
  284. package/dist/functions/software/buildPathExecutables.d.ts +0 -1
  285. package/dist/functions/software/buildPathExecutables.js +0 -14
  286. package/dist/functions/software/buildPathExecutables.js.map +0 -1
  287. package/dist/functions/software/buildSoftwarePaths.d.ts +0 -2
  288. package/dist/functions/software/buildSoftwarePaths.js +0 -22
  289. package/dist/functions/software/buildSoftwarePaths.js.map +0 -1
  290. package/dist/functions/software/createConfigGenerator.d.ts +0 -8
  291. package/dist/functions/software/createConfigGenerator.js +0 -13
  292. package/dist/functions/software/createConfigGenerator.js.map +0 -1
  293. package/dist/functions/software/detectPlatform.d.ts +0 -2
  294. package/dist/functions/software/detectPlatform.js +0 -9
  295. package/dist/functions/software/detectPlatform.js.map +0 -1
  296. package/dist/functions/software/find.d.ts +0 -2
  297. package/dist/functions/software/find.js +0 -12
  298. package/dist/functions/software/find.js.map +0 -1
  299. package/dist/functions/software/findSoftwareWithGenerator.d.ts +0 -3
  300. package/dist/functions/software/findSoftwareWithGenerator.js +0 -8
  301. package/dist/functions/software/findSoftwareWithGenerator.js.map +0 -1
  302. package/dist/functions/software/getConfigGenerator.d.ts +0 -2
  303. package/dist/functions/software/getConfigGenerator.js +0 -10
  304. package/dist/functions/software/getConfigGenerator.js.map +0 -1
  305. package/dist/functions/software/getEnvironmentSoftwarePath.d.ts +0 -1
  306. package/dist/functions/software/getEnvironmentSoftwarePath.js +0 -8
  307. package/dist/functions/software/getEnvironmentSoftwarePath.js.map +0 -1
  308. package/dist/functions/software/getSupportedSoftware.d.ts +0 -1
  309. package/dist/functions/software/getSupportedSoftware.js +0 -5
  310. package/dist/functions/software/getSupportedSoftware.js.map +0 -1
  311. package/dist/functions/software/parseEnvironmentPaths.d.ts +0 -1
  312. package/dist/functions/software/parseEnvironmentPaths.js +0 -11
  313. package/dist/functions/software/parseEnvironmentPaths.js.map +0 -1
  314. package/dist/functions/software/softwareConfigs.d.ts +0 -2
  315. package/dist/functions/software/softwareConfigs.js +0 -148
  316. package/dist/functions/software/softwareConfigs.js.map +0 -1
  317. package/dist/functions/software/softwareNameMap.d.ts +0 -1
  318. package/dist/functions/software/softwareNameMap.js +0 -9
  319. package/dist/functions/software/softwareNameMap.js.map +0 -1
  320. package/dist/functions/software/types.d.ts +0 -11
  321. package/dist/functions/software/types.js +0 -2
  322. package/dist/functions/software/types.js.map +0 -1
  323. package/dist/functions/string/base64.d.ts +0 -2
  324. package/dist/functions/string/base64.js +0 -6
  325. package/dist/functions/string/base64.js.map +0 -1
  326. package/dist/functions/string/camelCase.d.ts +0 -1
  327. package/dist/functions/string/camelCase.js +0 -8
  328. package/dist/functions/string/camelCase.js.map +0 -1
  329. package/dist/functions/string/capitalize.d.ts +0 -1
  330. package/dist/functions/string/capitalize.js +0 -6
  331. package/dist/functions/string/capitalize.js.map +0 -1
  332. package/dist/functions/string/caseConverter.d.ts +0 -20
  333. package/dist/functions/string/caseConverter.js +0 -101
  334. package/dist/functions/string/caseConverter.js.map +0 -1
  335. package/dist/functions/string/desensitize.d.ts +0 -13
  336. package/dist/functions/string/desensitize.js +0 -107
  337. package/dist/functions/string/desensitize.js.map +0 -1
  338. package/dist/functions/string/escape.d.ts +0 -1
  339. package/dist/functions/string/escape.js +0 -13
  340. package/dist/functions/string/escape.js.map +0 -1
  341. package/dist/functions/string/htmlEscape.d.ts +0 -17
  342. package/dist/functions/string/htmlEscape.js +0 -68
  343. package/dist/functions/string/htmlEscape.js.map +0 -1
  344. package/dist/functions/string/kebabCase.d.ts +0 -1
  345. package/dist/functions/string/kebabCase.js +0 -10
  346. package/dist/functions/string/kebabCase.js.map +0 -1
  347. package/dist/functions/string/levenshtein.d.ts +0 -1
  348. package/dist/functions/string/levenshtein.js +0 -27
  349. package/dist/functions/string/levenshtein.js.map +0 -1
  350. package/dist/functions/string/mask.d.ts +0 -1
  351. package/dist/functions/string/mask.js +0 -40
  352. package/dist/functions/string/mask.js.map +0 -1
  353. package/dist/functions/string/normalize.d.ts +0 -8
  354. package/dist/functions/string/normalize.js +0 -37
  355. package/dist/functions/string/normalize.js.map +0 -1
  356. package/dist/functions/string/pad.d.ts +0 -14
  357. package/dist/functions/string/pad.js +0 -53
  358. package/dist/functions/string/pad.js.map +0 -1
  359. package/dist/functions/string/padEnd.d.ts +0 -1
  360. package/dist/functions/string/padEnd.js +0 -8
  361. package/dist/functions/string/padEnd.js.map +0 -1
  362. package/dist/functions/string/padStart.d.ts +0 -1
  363. package/dist/functions/string/padStart.js +0 -8
  364. package/dist/functions/string/padStart.js.map +0 -1
  365. package/dist/functions/string/palindrome.d.ts +0 -3
  366. package/dist/functions/string/palindrome.js +0 -15
  367. package/dist/functions/string/palindrome.js.map +0 -1
  368. package/dist/functions/string/pascalCase.d.ts +0 -1
  369. package/dist/functions/string/pascalCase.js +0 -8
  370. package/dist/functions/string/pascalCase.js.map +0 -1
  371. package/dist/functions/string/similarity.d.ts +0 -1
  372. package/dist/functions/string/similarity.js +0 -13
  373. package/dist/functions/string/similarity.js.map +0 -1
  374. package/dist/functions/string/snakeCase.d.ts +0 -1
  375. package/dist/functions/string/snakeCase.js +0 -10
  376. package/dist/functions/string/snakeCase.js.map +0 -1
  377. package/dist/functions/string/template.d.ts +0 -4
  378. package/dist/functions/string/template.js +0 -21
  379. package/dist/functions/string/template.js.map +0 -1
  380. package/dist/functions/string/unescape.d.ts +0 -1
  381. package/dist/functions/string/unescape.js +0 -13
  382. package/dist/functions/string/unescape.js.map +0 -1
  383. package/dist/functions/string/wordCount.d.ts +0 -5
  384. package/dist/functions/string/wordCount.js +0 -11
  385. package/dist/functions/string/wordCount.js.map +0 -1
  386. package/dist/functions/tencent-cloud/getSecret.d.ts +0 -6
  387. package/dist/functions/tencent-cloud/getSecret.js +0 -18
  388. package/dist/functions/tencent-cloud/getSecret.js.map +0 -1
  389. package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.d.ts +0 -13
  390. package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.js +0 -175
  391. package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.js.map +0 -1
  392. package/dist/functions/uniapp/app-plus/androidProjectStrategy.d.ts +0 -19
  393. package/dist/functions/uniapp/app-plus/androidProjectStrategy.js +0 -55
  394. package/dist/functions/uniapp/app-plus/androidProjectStrategy.js.map +0 -1
  395. package/dist/functions/uniapp/app-plus/buildAndroidProject.d.ts +0 -3
  396. package/dist/functions/uniapp/app-plus/buildAndroidProject.js +0 -60
  397. package/dist/functions/uniapp/app-plus/buildAndroidProject.js.map +0 -1
  398. package/dist/functions/uniapp/app-plus/configureAndroidManifest.d.ts +0 -5
  399. package/dist/functions/uniapp/app-plus/configureAndroidManifest.js +0 -51
  400. package/dist/functions/uniapp/app-plus/configureAndroidManifest.js.map +0 -1
  401. package/dist/functions/uniapp/app-plus/configureAndroidProject.d.ts +0 -3
  402. package/dist/functions/uniapp/app-plus/configureAndroidProject.js +0 -63
  403. package/dist/functions/uniapp/app-plus/configureAndroidProject.js.map +0 -1
  404. package/dist/functions/uniapp/app-plus/configureBuildGradle.d.ts +0 -9
  405. package/dist/functions/uniapp/app-plus/configureBuildGradle.js +0 -57
  406. package/dist/functions/uniapp/app-plus/configureBuildGradle.js.map +0 -1
  407. package/dist/functions/uniapp/app-plus/configureDcloudControl.d.ts +0 -5
  408. package/dist/functions/uniapp/app-plus/configureDcloudControl.js +0 -34
  409. package/dist/functions/uniapp/app-plus/configureDcloudControl.js.map +0 -1
  410. package/dist/functions/uniapp/app-plus/configureStrings.d.ts +0 -5
  411. package/dist/functions/uniapp/app-plus/configureStrings.js +0 -42
  412. package/dist/functions/uniapp/app-plus/configureStrings.js.map +0 -1
  413. package/dist/functions/uniapp/app-plus/copyAppResources.d.ts +0 -8
  414. package/dist/functions/uniapp/app-plus/copyAppResources.js +0 -25
  415. package/dist/functions/uniapp/app-plus/copyAppResources.js.map +0 -1
  416. package/dist/functions/uniapp/app-plus/copyDirectory.d.ts +0 -2
  417. package/dist/functions/uniapp/app-plus/copyDirectory.js +0 -18
  418. package/dist/functions/uniapp/app-plus/copyDirectory.js.map +0 -1
  419. package/dist/functions/uniapp/app-plus/generateUniAppResources.d.ts +0 -2
  420. package/dist/functions/uniapp/app-plus/generateUniAppResources.js +0 -35
  421. package/dist/functions/uniapp/app-plus/generateUniAppResources.js.map +0 -1
  422. package/dist/functions/uniapp/app-plus/parseManifest.d.ts +0 -14
  423. package/dist/functions/uniapp/app-plus/parseManifest.js.map +0 -1
  424. package/dist/functions/uniapp/app-plus/validateOptions.d.ts +0 -3
  425. package/dist/functions/uniapp/app-plus/validateOptions.js +0 -10
  426. package/dist/functions/uniapp/app-plus/validateOptions.js.map +0 -1
  427. package/dist/functions/uniapp/waitForPages.d.ts +0 -2
  428. package/dist/functions/uniapp/waitForPages.js +0 -20
  429. package/dist/functions/uniapp/waitForPages.js.map +0 -1
  430. package/dist/functions/utils/compose.d.ts +0 -1
  431. package/dist/functions/utils/compose.js +0 -10
  432. package/dist/functions/utils/compose.js.map +0 -1
  433. package/dist/functions/utils/cond.d.ts +0 -1
  434. package/dist/functions/utils/cond.js +0 -15
  435. package/dist/functions/utils/cond.js.map +0 -1
  436. package/dist/functions/utils/curry.d.ts +0 -1
  437. package/dist/functions/utils/curry.js +0 -13
  438. package/dist/functions/utils/curry.js.map +0 -1
  439. package/dist/functions/utils/debounce.d.ts +0 -1
  440. package/dist/functions/utils/debounce.js +0 -13
  441. package/dist/functions/utils/debounce.js.map +0 -1
  442. package/dist/functions/utils/evolve.d.ts +0 -3
  443. package/dist/functions/utils/evolve.js +0 -15
  444. package/dist/functions/utils/evolve.js.map +0 -1
  445. package/dist/functions/utils/flow.d.ts +0 -1
  446. package/dist/functions/utils/flow.js +0 -14
  447. package/dist/functions/utils/flow.js.map +0 -1
  448. package/dist/functions/utils/isType.d.ts +0 -11
  449. package/dist/functions/utils/isType.js +0 -30
  450. package/dist/functions/utils/isType.js.map +0 -1
  451. package/dist/functions/utils/memoize.d.ts +0 -1
  452. package/dist/functions/utils/memoize.js +0 -13
  453. package/dist/functions/utils/memoize.js.map +0 -1
  454. package/dist/functions/utils/once.d.ts +0 -1
  455. package/dist/functions/utils/once.js +0 -13
  456. package/dist/functions/utils/once.js.map +0 -1
  457. package/dist/functions/utils/partial.d.ts +0 -1
  458. package/dist/functions/utils/partial.js +0 -13
  459. package/dist/functions/utils/partial.js.map +0 -1
  460. package/dist/functions/utils/pipe.d.ts +0 -1
  461. package/dist/functions/utils/pipe.js +0 -10
  462. package/dist/functions/utils/pipe.js.map +0 -1
  463. package/dist/functions/utils/retryWithBackoff.d.ts +0 -9
  464. package/dist/functions/utils/retryWithBackoff.js +0 -30
  465. package/dist/functions/utils/retryWithBackoff.js.map +0 -1
  466. package/dist/functions/utils/tap.d.ts +0 -1
  467. package/dist/functions/utils/tap.js +0 -14
  468. package/dist/functions/utils/tap.js.map +0 -1
  469. package/dist/functions/utils/throttle.d.ts +0 -1
  470. package/dist/functions/utils/throttle.js +0 -11
  471. package/dist/functions/utils/throttle.js.map +0 -1
  472. package/dist/functions/utils/until.d.ts +0 -1
  473. package/dist/functions/utils/until.js +0 -10
  474. package/dist/functions/utils/until.js.map +0 -1
  475. package/dist/functions/utils/validate.d.ts +0 -8
  476. package/dist/functions/utils/validate.js +0 -45
  477. package/dist/functions/utils/validate.js.map +0 -1
  478. package/dist/functions/vue/checkVueType.d.ts +0 -8
  479. package/dist/functions/vue/checkVueType.js +0 -29
  480. package/dist/functions/vue/checkVueType.js.map +0 -1
  481. package/dist/functions/vue/deduplicateColors.d.ts +0 -2
  482. package/dist/functions/vue/deduplicateColors.js +0 -13
  483. package/dist/functions/vue/deduplicateColors.js.map +0 -1
  484. package/dist/functions/vue/dynamicMount.d.ts +0 -15
  485. package/dist/functions/vue/dynamicMount.js +0 -23
  486. package/dist/functions/vue/dynamicMount.js.map +0 -1
  487. package/dist/functions/vue/filterSections.js +0 -11
  488. package/dist/functions/vue/filterSections.js.map +0 -1
  489. package/dist/functions/vue/isVNode.d.ts +0 -2
  490. package/dist/functions/vue/isVNode.js +0 -4
  491. package/dist/functions/vue/isVNode.js.map +0 -1
  492. package/dist/functions/vue/isVueComponent.d.ts +0 -2
  493. package/dist/functions/vue/isVueComponent.js +0 -6
  494. package/dist/functions/vue/isVueComponent.js.map +0 -1
  495. package/dist/functions/vue/parseVueFile.js +0 -53
  496. package/dist/functions/vue/parseVueFile.js.map +0 -1
  497. package/dist/functions/vue/processVueFile.d.ts +0 -3
  498. package/dist/functions/vue/processVueFile.js +0 -26
  499. package/dist/functions/vue/processVueFile.js.map +0 -1
  500. package/dist/functions/vue/saveVueSection.d.ts +0 -2
  501. package/dist/functions/vue/saveVueSection.js +0 -11
  502. package/dist/functions/vue/saveVueSection.js.map +0 -1
  503. package/dist/functions/wechat/miniapp/downloadFile.d.ts +0 -2
  504. package/dist/functions/wechat/miniapp/downloadFile.js +0 -39
  505. package/dist/functions/wechat/miniapp/downloadFile.js.map +0 -1
  506. package/dist/hooks/useAi.d.ts +0 -27
  507. package/dist/hooks/useAi.js +0 -163
  508. package/dist/hooks/useAi.js.map +0 -1
  509. package/dist/hooks/useCache.d.ts +0 -18
  510. package/dist/hooks/useCache.js +0 -82
  511. package/dist/hooks/useCache.js.map +0 -1
  512. package/dist/hooks/useFetch.d.ts +0 -3
  513. package/dist/hooks/useFetch.js +0 -154
  514. package/dist/hooks/useFetch.js.map +0 -1
  515. package/dist/hooks/usePluginSystem.d.ts +0 -11
  516. package/dist/hooks/usePluginSystem.js +0 -34
  517. package/dist/hooks/usePluginSystem.js.map +0 -1
  518. package/dist/hooks/useRequest.d.ts +0 -3
  519. package/dist/hooks/useRequest.js +0 -139
  520. package/dist/hooks/useRequest.js.map +0 -1
  521. package/dist/hooks/useWASM.d.ts +0 -4
  522. package/dist/hooks/useWASM.js +0 -267
  523. package/dist/hooks/useWASM.js.map +0 -1
  524. package/references/browser.extension.d.ts +0 -14
  525. package/types/network.d.ts +0 -184
  526. package/types/util.d.ts +0 -27
  527. package/types/wasm.d.ts +0 -217
@@ -1,49 +1,49 @@
1
- // 微信小程序环境类型声明
2
-
3
- export interface WxAPI {
4
- env: {
5
- USER_DATA_PATH: string
6
- }
7
- downloadFile(options: {
8
- url: string
9
- filePath: string
10
- success: (res: { statusCode: number; filePath: string }) => void
11
- fail: (err: any) => void
12
- }): void
13
-
14
- uploadFile(options: {
15
- url: string
16
- filePath: string
17
- name: string
18
- formData?: Record<string, any>
19
- success: (res: { statusCode: number; data: string }) => void
20
- fail: (err: any) => void
21
- }): void
22
-
23
- request(options: {
24
- url: string
25
- method?: 'GET' | 'POST' | 'PUT' | 'DELETE'
26
- data?: any
27
- header?: Record<string, string>
28
- success: (res: { statusCode: number; data: any }) => void
29
- fail: (err: any) => void
30
- }): void
31
-
32
- showToast(options: {
33
- title: string
34
- icon?: 'success' | 'error' | 'loading' | 'none'
35
- duration?: number
36
- success?: () => void
37
- fail?: (err: any) => void
38
- }): void
39
-
40
- showModal(options: {
41
- title: string
42
- content: string
43
- showCancel?: boolean
44
- cancelText?: string
45
- confirmText?: string
46
- success: (res: { confirm: boolean; cancel: boolean }) => void
47
- fail?: (err: any) => void
48
- }): void
1
+ // 微信小程序环境类型声明
2
+
3
+ export interface Wx {
4
+ env: {
5
+ USER_DATA_PATH: string
6
+ }
7
+ downloadFile(options: {
8
+ url: string
9
+ filePath: string
10
+ success: (res: { statusCode: number; filePath: string }) => void
11
+ fail: (err: any) => void
12
+ }): void
13
+
14
+ uploadFile(options: {
15
+ url: string
16
+ filePath: string
17
+ name: string
18
+ formData?: Record<string, any>
19
+ success: (res: { statusCode: number; data: string }) => void
20
+ fail: (err: any) => void
21
+ }): void
22
+
23
+ request(options: {
24
+ url: string
25
+ method?: 'GET' | 'POST' | 'PUT' | 'DELETE'
26
+ data?: any
27
+ header?: Record<string, string>
28
+ success: (res: { statusCode: number; data: any }) => void
29
+ fail: (err: any) => void
30
+ }): void
31
+
32
+ showToast(options: {
33
+ title: string
34
+ icon?: 'success' | 'error' | 'loading' | 'none'
35
+ duration?: number
36
+ success?: () => void
37
+ fail?: (err: any) => void
38
+ }): void
39
+
40
+ showModal(options: {
41
+ title: string
42
+ content: string
43
+ showCancel?: boolean
44
+ cancelText?: string
45
+ confirmText?: string
46
+ success: (res: { confirm: boolean; cancel: boolean }) => void
47
+ fail?: (err: any) => void
48
+ }): void
49
49
  }
@@ -1,207 +1,153 @@
1
- /**
2
- * Web Worker 环境类型定义
3
- * 包含浏览器和其他环境的 Worker API 类型支持
4
- */
5
-
6
- /**
7
- * Worker 构造函数选项
8
- */
9
- export interface WorkerOptions {
10
- type?: 'classic' | 'module'
11
- credentials?: 'omit' | 'same-origin' | 'include'
12
- name?: string
13
- }
14
-
15
- /**
16
- * Transferable 对象接口
17
- */
18
- export interface Transferable {
19
- // 标记接口,用于类型检查
20
- }
21
-
22
- /**
23
- * Worker 全局作用域接口
24
- */
25
- export interface WorkerGlobalScope extends EventTarget {
26
- self: WorkerGlobalScope
27
- location: WorkerLocation
28
- navigator: WorkerNavigator
29
- importScripts(...urls: string[]): void
30
- close(): void
31
- postMessage(message: any, transfer?: Transferable[]): void
32
- onmessage: ((event: MessageEvent) => void) | null
33
- onmessageerror: ((event: MessageEvent) => void) | null
34
- onerror: ((event: ErrorEvent) => void) | null
35
- }
36
-
37
- /**
38
- * Worker 位置接口
39
- */
40
- export interface WorkerLocation {
41
- href: string
42
- protocol: string
43
- host: string
44
- hostname: string
45
- port: string
46
- pathname: string
47
- search: string
48
- hash: string
49
- origin: string
50
- }
51
-
52
- /**
53
- * Worker 导航器接口
54
- */
55
- export interface WorkerNavigator {
56
- userAgent: string
57
- platform: string
58
- language: string
59
- languages: readonly string[]
60
- onLine: boolean
61
- hardwareConcurrency: number
62
- }
63
-
64
- /**
65
- * 消息事件接口
66
- */
67
- export interface MessageEvent<T = any> extends Event {
68
- data: T
69
- origin: string
70
- lastEventId: string
71
- source: MessageEventSource | null
72
- ports: readonly MessagePort[]
73
- }
74
-
75
- /**
76
- * 错误事件接口
77
- */
78
- export interface ErrorEvent extends Event {
79
- message: string
80
- filename: string
81
- lineno: number
82
- colno: number
83
- error: any
84
- }
85
-
86
- /**
87
- * 消息端口接口
88
- */
89
- export interface MessagePort extends EventTarget {
90
- postMessage(message: any, transfer?: Transferable[]): void
91
- start(): void
92
- close(): void
93
- onmessage: ((event: MessageEvent) => void) | null
94
- onmessageerror: ((event: MessageEvent) => void) | null
95
- }
96
-
97
- /**
98
- * 消息事件源类型
99
- */
100
- export type MessageEventSource = WindowProxy | MessagePort | ServiceWorker
101
-
102
- /**
103
- * Window 代理接口
104
- */
105
- export interface WindowProxy {
106
- // 标记接口,用于类型检查
107
- }
108
-
109
- /**
110
- * Service Worker 接口
111
- */
112
- export interface ServiceWorker extends EventTarget {
113
- scriptURL: string
114
- state: ServiceWorkerState
115
- postMessage(message: any, transfer?: Transferable[]): void
116
- onstatechange: ((event: Event) => void) | null
117
- }
118
-
119
- /**
120
- * Service Worker 状态类型
121
- */
122
- export type ServiceWorkerState = 'installing' | 'installed' | 'activating' | 'activated' | 'redundant'
123
-
124
- /**
125
- * Worker 构造函数接口
126
- */
127
- export interface WorkerConstructor {
128
- new (scriptURL: string | URL, options?: WorkerOptions): Worker
129
- }
130
-
131
- /**
132
- * Worker 接口
133
- */
134
- export interface Worker extends EventTarget {
135
- postMessage(message: any, transfer?: Transferable[]): void
136
- terminate(): void
137
- onmessage: ((event: MessageEvent) => void) | null
138
- onmessageerror: ((event: MessageEvent) => void) | null
139
- onerror: ((event: ErrorEvent) => void) | null
140
- }
141
-
142
- /**
143
- * Worker 环境接口
144
- * 包含所有 Worker 相关的环境 API
145
- */
146
- export interface WorkerEnvironment {
147
- Worker?: WorkerConstructor
148
- SharedWorker?: SharedWorkerConstructor
149
- ServiceWorker?: ServiceWorkerConstructor
150
- MessageChannel?: MessageChannelConstructor
151
- BroadcastChannel?: BroadcastChannelConstructor
152
- }
153
-
154
- /**
155
- * Shared Worker 构造函数接口
156
- */
157
- export interface SharedWorkerConstructor {
158
- new (scriptURL: string | URL, options?: string | WorkerOptions): SharedWorker
159
- }
160
-
161
- /**
162
- * Shared Worker 接口
163
- */
164
- export interface SharedWorker extends EventTarget {
165
- port: MessagePort
166
- onerror: ((event: ErrorEvent) => void) | null
167
- }
168
-
169
- /**
170
- * Service Worker 构造函数接口
171
- */
172
- export interface ServiceWorkerConstructor {
173
- new (): ServiceWorker
174
- }
175
-
176
- /**
177
- * Message Channel 构造函数接口
178
- */
179
- export interface MessageChannelConstructor {
180
- new (): MessageChannel
181
- }
182
-
183
- /**
184
- * Message Channel 接口
185
- */
186
- export interface MessageChannel {
187
- port1: MessagePort
188
- port2: MessagePort
189
- }
190
-
191
- /**
192
- * Broadcast Channel 构造函数接口
193
- */
194
- export interface BroadcastChannelConstructor {
195
- new (name: string): BroadcastChannel
196
- }
197
-
198
- /**
199
- * Broadcast Channel 接口
200
- */
201
- export interface BroadcastChannel extends EventTarget {
202
- name: string
203
- postMessage(message: any): void
204
- close(): void
205
- onmessage: ((event: MessageEvent) => void) | null
206
- onmessageerror: ((event: MessageEvent) => void) | null
1
+ /**
2
+ * Web Worker 环境类型定义
3
+ * 提供核心 Worker API 的类型支持
4
+ */
5
+
6
+ // 核心类型定义
7
+ export type WorkerType = 'classic' | 'module'
8
+ export type WorkerCredentials = 'omit' | 'same-origin' | 'include'
9
+ export type ServiceWorkerState = 'installing' | 'installed' | 'activating' | 'activated' | 'redundant'
10
+
11
+ // 配置接口
12
+ export interface WorkerConfig {
13
+ type?: WorkerType
14
+ credentials?: WorkerCredentials
15
+ name?: string
16
+ }
17
+
18
+ // 标记接口
19
+ export interface Transferable {}
20
+
21
+ // 位置信息
22
+ export interface WorkerLocation {
23
+ href: string
24
+ protocol: string
25
+ host: string
26
+ hostname: string
27
+ port: string
28
+ pathname: string
29
+ search: string
30
+ hash: string
31
+ origin: string
32
+ }
33
+
34
+ // 导航器信息
35
+ export interface WorkerNavigator {
36
+ userAgent: string
37
+ platform: string
38
+ language: string
39
+ languages: readonly string[]
40
+ onLine: boolean
41
+ hardwareConcurrency: number
42
+ }
43
+
44
+ // 事件接口
45
+ export interface WorkerMessageEvent<T = any> extends Event {
46
+ data: T
47
+ origin: string
48
+ lastEventId: string
49
+ source: WorkerMessageSource | null
50
+ ports: readonly WorkerMessagePort[]
51
+ }
52
+
53
+ export interface WorkerErrorEvent extends Event {
54
+ message: string
55
+ filename: string
56
+ lineno: number
57
+ colno: number
58
+ error: any
59
+ }
60
+
61
+ // 消息通信
62
+ export interface WorkerMessagePort extends EventTarget {
63
+ postMessage(message: any, transfer?: Transferable[]): void
64
+ start(): void
65
+ close(): void
66
+ onmessage: ((event: WorkerMessageEvent) => void) | null
67
+ onmessageerror: ((event: WorkerMessageEvent) => void) | null
68
+ }
69
+
70
+ export type WorkerMessageSource = WorkerWindowProxy | WorkerMessagePort | WorkerServiceWorker
71
+
72
+ // 代理和服务
73
+ export interface WorkerWindowProxy {}
74
+
75
+ export interface WorkerServiceWorker extends EventTarget {
76
+ scriptURL: string
77
+ state: ServiceWorkerState
78
+ postMessage(message: any, transfer?: Transferable[]): void
79
+ onstatechange: ((event: Event) => void) | null
80
+ }
81
+
82
+ // Worker 全局作用域
83
+ export interface WorkerGlobalScope extends EventTarget {
84
+ self: WorkerGlobalScope
85
+ location: WorkerLocation
86
+ navigator: WorkerNavigator
87
+ importScripts(...urls: string[]): void
88
+ close(): void
89
+ postMessage(message: any, transfer?: Transferable[]): void
90
+ onmessage: ((event: WorkerMessageEvent) => void) | null
91
+ onmessageerror: ((event: WorkerMessageEvent) => void) | null
92
+ onerror: ((event: WorkerErrorEvent) => void) | null
93
+ }
94
+
95
+ // Worker 实例
96
+ export interface WorkerInstance extends EventTarget {
97
+ postMessage(message: any, transfer?: Transferable[]): void
98
+ terminate(): void
99
+ onmessage: ((event: WorkerMessageEvent) => void) | null
100
+ onmessageerror: ((event: WorkerMessageEvent) => void) | null
101
+ onerror: ((event: WorkerErrorEvent) => void) | null
102
+ }
103
+
104
+ // 共享 Worker
105
+ export interface WorkerShared extends EventTarget {
106
+ port: WorkerMessagePort
107
+ onerror: ((event: WorkerErrorEvent) => void) | null
108
+ }
109
+
110
+ // 消息通道
111
+ export interface WorkerMessageChannel {
112
+ port1: WorkerMessagePort
113
+ port2: WorkerMessagePort
114
+ }
115
+
116
+ // 广播通道
117
+ export interface WorkerBroadcastChannel extends EventTarget {
118
+ name: string
119
+ postMessage(message: any): void
120
+ close(): void
121
+ onmessage: ((event: WorkerMessageEvent) => void) | null
122
+ onmessageerror: ((event: WorkerMessageEvent) => void) | null
123
+ }
124
+
125
+ // 构造函数类型
126
+ export interface WorkerConstructor {
127
+ new (scriptURL: string | URL, options?: WorkerConfig): WorkerInstance
128
+ }
129
+
130
+ export interface WorkerSharedConstructor {
131
+ new (scriptURL: string | URL, options?: string | WorkerConfig): WorkerShared
132
+ }
133
+
134
+ export interface WorkerServiceConstructor {
135
+ new (): WorkerServiceWorker
136
+ }
137
+
138
+ export interface WorkerMessageChannelConstructor {
139
+ new (): WorkerMessageChannel
140
+ }
141
+
142
+ export interface WorkerBroadcastChannelConstructor {
143
+ new (name: string): WorkerBroadcastChannel
144
+ }
145
+
146
+ // 运行时接口
147
+ export interface WorkerRuntime {
148
+ Worker: WorkerConstructor
149
+ SharedWorker: WorkerSharedConstructor
150
+ ServiceWorker: WorkerServiceConstructor
151
+ MessageChannel: WorkerMessageChannelConstructor
152
+ BroadcastChannel: WorkerBroadcastChannelConstructor
207
153
  }
@@ -1,56 +1,89 @@
1
- /**
2
- * XML 解析器和序列化器类型定义
3
- * 用于支持不同环境下的 XML 处理功能
4
- */
5
-
6
- /**
7
- * XML 解析器接口
8
- */
9
- export interface XMLParser {
10
- parseFromString(xmlString: string, mimeType: string): XMLDocument
11
- }
12
-
13
- /**
14
- * XML 序列化器接口
15
- */
16
- export interface XMLSerializer {
17
- serializeToString(node: Node): string
18
- }
19
-
20
- /**
21
- * XML 文档接口
22
- */
23
- export interface XMLDocument {
24
- documentElement: XMLElement
25
- getElementsByTagName(tagName: string): XMLNodeList
26
- createElement(tagName: string): XMLElement
27
- }
28
-
29
- /**
30
- * XML 元素接口
31
- */
32
- export interface XMLElement {
33
- tagName: string
34
- getAttribute(name: string): string | null
35
- setAttribute(name: string, value: string): void
36
- getElementsByTagName(tagName: string): XMLNodeList
37
- appendChild(child: XMLElement): XMLElement
38
- textContent: string | null
39
- }
40
-
41
- /**
42
- * XML 节点列表接口
43
- */
44
- export interface XMLNodeList {
45
- length: number
46
- item(index: number): XMLElement | null
47
- [index: number]: XMLElement
48
- }
49
-
50
- /**
51
- * XML 环境依赖接口
52
- */
53
- export interface XMLEnvironment {
54
- xmlParser: XMLParser
55
- xmlSerializer: XMLSerializer
1
+ /**
2
+ * XML 处理类型定义
3
+ * 提供核心 XML 处理功能的类型支持
4
+ */
5
+
6
+ // 核心类型定义
7
+ export type XMLMimeType = 'text/xml' | 'application/xml' | 'application/xhtml+xml' | 'image/svg+xml'
8
+ export type XMLNodeType = 'element' | 'text' | 'comment' | 'document'
9
+
10
+ // 节点接口
11
+ export interface XMLNode {
12
+ nodeType: XMLNodeType
13
+ nodeName: string
14
+ nodeValue: string | null
15
+ textContent: string | null
16
+ parentNode: XMLNode | null
17
+ childNodes: XMLNodeList
18
+ }
19
+
20
+ // 元素接口
21
+ export interface XMLElement extends XMLNode {
22
+ tagName: string
23
+ attributes: XMLAttributeMap
24
+ getAttribute(name: string): string | null
25
+ setAttribute(name: string, value: string): void
26
+ removeAttribute(name: string): void
27
+ hasAttribute(name: string): boolean
28
+ getElementsByTagName(tagName: string): XMLNodeList
29
+ appendChild(child: XMLNode): XMLNode
30
+ removeChild(child: XMLNode): XMLNode
31
+ }
32
+
33
+ // 属性映射
34
+ export interface XMLAttributeMap {
35
+ length: number
36
+ getNamedItem(name: string): XMLAttribute | null
37
+ setNamedItem(attr: XMLAttribute): XMLAttribute | null
38
+ removeNamedItem(name: string): XMLAttribute
39
+ item(index: number): XMLAttribute | null
40
+ [index: number]: XMLAttribute
41
+ }
42
+
43
+ // 属性接口
44
+ export interface XMLAttribute {
45
+ name: string
46
+ value: string
47
+ ownerElement: XMLElement | null
48
+ }
49
+
50
+ // 节点列表
51
+ export interface XMLNodeList {
52
+ length: number
53
+ item(index: number): XMLNode | null
54
+ [index: number]: XMLNode
55
+ }
56
+
57
+ // 文档接口
58
+ export interface XMLDocument extends XMLNode {
59
+ documentElement: XMLElement | null
60
+ createElement(tagName: string): XMLElement
61
+ createTextNode(data: string): XMLNode
62
+ createComment(data: string): XMLNode
63
+ getElementsByTagName(tagName: string): XMLNodeList
64
+ getElementById(id: string): XMLElement | null
65
+ }
66
+
67
+ // 解析器和序列化器
68
+ export interface XMLParser {
69
+ parseFromString(xmlString: string, mimeType: XMLMimeType): XMLDocument
70
+ }
71
+
72
+ export interface XMLSerializer {
73
+ serializeToString(node: XMLNode): string
74
+ }
75
+
76
+ // 构造函数类型
77
+ export interface XMLParserConstructor {
78
+ new (): XMLParser
79
+ }
80
+
81
+ export interface XMLSerializerConstructor {
82
+ new (): XMLSerializer
83
+ }
84
+
85
+ // 运行时接口
86
+ export interface XMLRuntime {
87
+ DOMParser: XMLParserConstructor
88
+ XMLSerializer: XMLSerializerConstructor
56
89
  }
package/types/altool.d.ts CHANGED
@@ -31,23 +31,6 @@ export interface AltoolAuthApiKey {
31
31
 
32
32
  export type AltoolAuth = AltoolAuthCredentials | AltoolAuthApiKey
33
33
 
34
- /**
35
- * altool基础选项
36
- */
37
- export interface AltoolBaseOptions {
38
- /** 应用类型 */
39
- type: AltoolAppType
40
- /** 输出格式 */
41
- outputFormat?: AltoolOutputFormat
42
- /** 认证信息 */
43
- auth: AltoolAuth
44
- }
45
-
46
- /**
47
- * altool命令类型
48
- */
49
- export type AltoolCommand = 'upload-app' | 'validate-app' | 'list-apps'
50
-
51
34
  /**
52
35
  * altool执行结果基础接口
53
36
  */
@@ -62,4 +45,53 @@ export interface AltoolBaseResult {
62
45
  exitCode: number
63
46
  /** 执行的命令 */
64
47
  command: string
48
+ }
49
+
50
+ /**
51
+ * altool上传选项
52
+ */
53
+ export interface AltoolUploadOptions {
54
+ file: string
55
+ type: AltoolAppType
56
+ auth: AltoolAuth
57
+ outputFormat?: AltoolOutputFormat
58
+ }
59
+
60
+ /**
61
+ * altool验证选项
62
+ */
63
+ export interface AltoolValidateOptions {
64
+ file: string
65
+ type: AltoolAppType
66
+ auth: AltoolAuth
67
+ outputFormat?: AltoolOutputFormat
68
+ }
69
+
70
+ /**
71
+ * altool验证结果
72
+ */
73
+ export interface AltoolValidateResult {
74
+ hasWarnings: boolean
75
+ hasErrors: boolean
76
+ warnings: string[]
77
+ errors: string[]
78
+ }
79
+
80
+ /**
81
+ * altool应用信息选项
82
+ */
83
+ export interface AltoolAppInfoOptions {
84
+ type: AltoolAppType
85
+ auth: AltoolAuth
86
+ outputFormat?: AltoolOutputFormat
87
+ }
88
+
89
+ /**
90
+ * 应用信息
91
+ */
92
+ export interface AppInfo {
93
+ bundleId: string
94
+ name: string
95
+ version: string
96
+ build: string
65
97
  }