zcw-shared 1.2.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 (383) hide show
  1. package/README.md +610 -0
  2. package/assets/logo-colorful.svg +18 -0
  3. package/assets/logo-name.svg +7 -0
  4. package/assets/logo-transparent.svg +14 -0
  5. package/assets/logo.svg +8 -0
  6. package/dist/functions/ag-grid/generateLicense.d.ts +4 -0
  7. package/dist/functions/ag-grid/generateLicense.js +12 -0
  8. package/dist/functions/ag-grid/generateLicense.js.map +1 -0
  9. package/dist/functions/altool/createAltoolClient.d.ts +21 -0
  10. package/dist/functions/altool/createAltoolClient.js +59 -0
  11. package/dist/functions/altool/createAltoolClient.js.map +1 -0
  12. package/dist/functions/altool/getAppInfo.d.ts +13 -0
  13. package/dist/functions/altool/getAppInfo.js +92 -0
  14. package/dist/functions/altool/getAppInfo.js.map +1 -0
  15. package/dist/functions/altool/index.d.ts +10 -0
  16. package/dist/functions/altool/index.js +6 -0
  17. package/dist/functions/altool/index.js.map +1 -0
  18. package/dist/functions/altool/isApiKeyAuth.d.ts +2 -0
  19. package/dist/functions/altool/isApiKeyAuth.js +4 -0
  20. package/dist/functions/altool/isApiKeyAuth.js.map +1 -0
  21. package/dist/functions/altool/isCredentialsAuth.d.ts +2 -0
  22. package/dist/functions/altool/isCredentialsAuth.js +4 -0
  23. package/dist/functions/altool/isCredentialsAuth.js.map +1 -0
  24. package/dist/functions/altool/types.d.ts +26 -0
  25. package/dist/functions/altool/types.js +7 -0
  26. package/dist/functions/altool/types.js.map +1 -0
  27. package/dist/functions/altool/uploadApp.d.ts +6 -0
  28. package/dist/functions/altool/uploadApp.js +36 -0
  29. package/dist/functions/altool/uploadApp.js.map +1 -0
  30. package/dist/functions/altool/validateApp.d.ts +17 -0
  31. package/dist/functions/altool/validateApp.js +59 -0
  32. package/dist/functions/altool/validateApp.js.map +1 -0
  33. package/dist/functions/base64/strToBase64.d.ts +2 -0
  34. package/dist/functions/base64/strToBase64.js +6 -0
  35. package/dist/functions/base64/strToBase64.js.map +1 -0
  36. package/dist/functions/color-converter/COLOR_PATTERNS.d.ts +2 -0
  37. package/dist/functions/color-converter/COLOR_PATTERNS.js +9 -0
  38. package/dist/functions/color-converter/COLOR_PATTERNS.js.map +1 -0
  39. package/dist/functions/color-converter/colorPatterns.d.ts +4 -0
  40. package/dist/functions/color-converter/colorPatterns.js +41 -0
  41. package/dist/functions/color-converter/colorPatterns.js.map +1 -0
  42. package/dist/functions/color-converter/convertColor.d.ts +6 -0
  43. package/dist/functions/color-converter/convertColor.js +238 -0
  44. package/dist/functions/color-converter/convertColor.js.map +1 -0
  45. package/dist/functions/color-converter/detectColorFormat.d.ts +2 -0
  46. package/dist/functions/color-converter/detectColorFormat.js +19 -0
  47. package/dist/functions/color-converter/detectColorFormat.js.map +1 -0
  48. package/dist/functions/color-converter/getColorPatterns.d.ts +2 -0
  49. package/dist/functions/color-converter/getColorPatterns.js +11 -0
  50. package/dist/functions/color-converter/getColorPatterns.js.map +1 -0
  51. package/dist/functions/color-converter/getNamedColorMap.d.ts +2 -0
  52. package/dist/functions/color-converter/getNamedColorMap.js +19 -0
  53. package/dist/functions/color-converter/getNamedColorMap.js.map +1 -0
  54. package/dist/functions/color-converter/hexToRgb.d.ts +2 -0
  55. package/dist/functions/color-converter/hexToRgb.js +42 -0
  56. package/dist/functions/color-converter/hexToRgb.js.map +1 -0
  57. package/dist/functions/color-converter/hslToRgb.d.ts +2 -0
  58. package/dist/functions/color-converter/hslToRgb.js +78 -0
  59. package/dist/functions/color-converter/hslToRgb.js.map +1 -0
  60. package/dist/functions/color-converter/hueToRgb.d.ts +1 -0
  61. package/dist/functions/color-converter/hueToRgb.js +14 -0
  62. package/dist/functions/color-converter/hueToRgb.js.map +1 -0
  63. package/dist/functions/color-converter/isColorValue.d.ts +2 -0
  64. package/dist/functions/color-converter/isColorValue.js +79 -0
  65. package/dist/functions/color-converter/isColorValue.js.map +1 -0
  66. package/dist/functions/color-converter/normalizeColor.d.ts +1 -0
  67. package/dist/functions/color-converter/normalizeColor.js +49 -0
  68. package/dist/functions/color-converter/normalizeColor.js.map +1 -0
  69. package/dist/functions/color-converter/parseColorString.d.ts +15 -0
  70. package/dist/functions/color-converter/parseColorString.js +116 -0
  71. package/dist/functions/color-converter/parseColorString.js.map +1 -0
  72. package/dist/functions/color-converter/rgbToHex.d.ts +2 -0
  73. package/dist/functions/color-converter/rgbToHex.js +65 -0
  74. package/dist/functions/color-converter/rgbToHex.js.map +1 -0
  75. package/dist/functions/color-converter/standardizeColor.d.ts +1 -0
  76. package/dist/functions/color-converter/standardizeColor.js +147 -0
  77. package/dist/functions/color-converter/standardizeColor.js.map +1 -0
  78. package/dist/functions/debug/createDebugger.d.ts +20 -0
  79. package/dist/functions/debug/createDebugger.js +79 -0
  80. package/dist/functions/debug/createDebugger.js.map +1 -0
  81. package/dist/functions/desensitize/desensitizeName.d.ts +1 -0
  82. package/dist/functions/desensitize/desensitizeName.js +8 -0
  83. package/dist/functions/desensitize/desensitizeName.js.map +1 -0
  84. package/dist/functions/desensitize/desensitizePhone.d.ts +1 -0
  85. package/dist/functions/desensitize/desensitizePhone.js +8 -0
  86. package/dist/functions/desensitize/desensitizePhone.js.map +1 -0
  87. package/dist/functions/dom/detectOverflow.d.ts +8 -0
  88. package/dist/functions/dom/detectOverflow.js +17 -0
  89. package/dist/functions/dom/detectOverflow.js.map +1 -0
  90. package/dist/functions/dom/getElementRect.d.ts +3 -0
  91. package/dist/functions/dom/getElementRect.js +14 -0
  92. package/dist/functions/dom/getElementRect.js.map +1 -0
  93. package/dist/functions/dom/getRelativePosition.d.ts +3 -0
  94. package/dist/functions/dom/getRelativePosition.js +14 -0
  95. package/dist/functions/dom/getRelativePosition.js.map +1 -0
  96. package/dist/functions/dom/getViewportRect.d.ts +3 -0
  97. package/dist/functions/dom/getViewportRect.js +15 -0
  98. package/dist/functions/dom/getViewportRect.js.map +1 -0
  99. package/dist/functions/dom/getViewportSize.d.ts +5 -0
  100. package/dist/functions/dom/getViewportSize.js +7 -0
  101. package/dist/functions/dom/getViewportSize.js.map +1 -0
  102. package/dist/functions/image/generateMacIcons.d.ts +6 -0
  103. package/dist/functions/image/generateMacIcons.js +15 -0
  104. package/dist/functions/image/generateMacIcons.js.map +1 -0
  105. package/dist/functions/image/generateMacTrayIcon.d.ts +7 -0
  106. package/dist/functions/image/generateMacTrayIcon.js +15 -0
  107. package/dist/functions/image/generateMacTrayIcon.js.map +1 -0
  108. package/dist/functions/image/generatePaddedImage.d.ts +3 -0
  109. package/dist/functions/image/generatePaddedImage.js +14 -0
  110. package/dist/functions/image/generatePaddedImage.js.map +1 -0
  111. package/dist/functions/image/generatePwaIcons.d.ts +6 -0
  112. package/dist/functions/image/generatePwaIcons.js +15 -0
  113. package/dist/functions/image/generatePwaIcons.js.map +1 -0
  114. package/dist/functions/image/generateRoundedImage.d.ts +3 -0
  115. package/dist/functions/image/generateRoundedImage.js +17 -0
  116. package/dist/functions/image/generateRoundedImage.js.map +1 -0
  117. package/dist/functions/ipc/dispatchIpcRequest.d.ts +6 -0
  118. package/dist/functions/ipc/dispatchIpcRequest.js +10 -0
  119. package/dist/functions/ipc/dispatchIpcRequest.js.map +1 -0
  120. package/dist/functions/software/buildPathExecutables.d.ts +1 -0
  121. package/dist/functions/software/buildPathExecutables.js +4 -0
  122. package/dist/functions/software/buildPathExecutables.js.map +1 -0
  123. package/dist/functions/software/buildSoftwarePaths.d.ts +2 -0
  124. package/dist/functions/software/buildSoftwarePaths.js +22 -0
  125. package/dist/functions/software/buildSoftwarePaths.js.map +1 -0
  126. package/dist/functions/software/createConfigGenerator.d.ts +8 -0
  127. package/dist/functions/software/createConfigGenerator.js +13 -0
  128. package/dist/functions/software/createConfigGenerator.js.map +1 -0
  129. package/dist/functions/software/detectPlatform.d.ts +2 -0
  130. package/dist/functions/software/detectPlatform.js +4 -0
  131. package/dist/functions/software/detectPlatform.js.map +1 -0
  132. package/dist/functions/software/find.d.ts +2 -0
  133. package/dist/functions/software/find.js +12 -0
  134. package/dist/functions/software/find.js.map +1 -0
  135. package/dist/functions/software/findSoftware.d.ts +14 -0
  136. package/dist/functions/software/findSoftware.js +29 -0
  137. package/dist/functions/software/findSoftware.js.map +1 -0
  138. package/dist/functions/software/findSoftwareWithGenerator.d.ts +3 -0
  139. package/dist/functions/software/findSoftwareWithGenerator.js +8 -0
  140. package/dist/functions/software/findSoftwareWithGenerator.js.map +1 -0
  141. package/dist/functions/software/getConfigGenerator.d.ts +2 -0
  142. package/dist/functions/software/getConfigGenerator.js +10 -0
  143. package/dist/functions/software/getConfigGenerator.js.map +1 -0
  144. package/dist/functions/software/getEnvironmentSoftwarePath.d.ts +1 -0
  145. package/dist/functions/software/getEnvironmentSoftwarePath.js +4 -0
  146. package/dist/functions/software/getEnvironmentSoftwarePath.js.map +1 -0
  147. package/dist/functions/software/getSupportedSoftware.d.ts +1 -0
  148. package/dist/functions/software/getSupportedSoftware.js +5 -0
  149. package/dist/functions/software/getSupportedSoftware.js.map +1 -0
  150. package/dist/functions/software/parseEnvironmentPaths.d.ts +1 -0
  151. package/dist/functions/software/parseEnvironmentPaths.js +7 -0
  152. package/dist/functions/software/parseEnvironmentPaths.js.map +1 -0
  153. package/dist/functions/software/softwareConfigs.d.ts +2 -0
  154. package/dist/functions/software/softwareConfigs.js +148 -0
  155. package/dist/functions/software/softwareConfigs.js.map +1 -0
  156. package/dist/functions/software/softwareNameMap.d.ts +1 -0
  157. package/dist/functions/software/softwareNameMap.js +9 -0
  158. package/dist/functions/software/softwareNameMap.js.map +1 -0
  159. package/dist/functions/software/types.d.ts +11 -0
  160. package/dist/functions/software/types.js +2 -0
  161. package/dist/functions/software/types.js.map +1 -0
  162. package/dist/functions/string/camelCase.d.ts +1 -0
  163. package/dist/functions/string/camelCase.js +8 -0
  164. package/dist/functions/string/camelCase.js.map +1 -0
  165. package/dist/functions/string/capitalize.d.ts +1 -0
  166. package/dist/functions/string/capitalize.js +6 -0
  167. package/dist/functions/string/capitalize.js.map +1 -0
  168. package/dist/functions/string/escape.d.ts +1 -0
  169. package/dist/functions/string/escape.js +13 -0
  170. package/dist/functions/string/escape.js.map +1 -0
  171. package/dist/functions/string/kebabCase.d.ts +1 -0
  172. package/dist/functions/string/kebabCase.js +10 -0
  173. package/dist/functions/string/kebabCase.js.map +1 -0
  174. package/dist/functions/string/levenshtein.d.ts +1 -0
  175. package/dist/functions/string/levenshtein.js +27 -0
  176. package/dist/functions/string/levenshtein.js.map +1 -0
  177. package/dist/functions/string/mask.d.ts +1 -0
  178. package/dist/functions/string/mask.js +40 -0
  179. package/dist/functions/string/mask.js.map +1 -0
  180. package/dist/functions/string/normalize.d.ts +8 -0
  181. package/dist/functions/string/normalize.js +37 -0
  182. package/dist/functions/string/normalize.js.map +1 -0
  183. package/dist/functions/string/padEnd.d.ts +1 -0
  184. package/dist/functions/string/padEnd.js +8 -0
  185. package/dist/functions/string/padEnd.js.map +1 -0
  186. package/dist/functions/string/padStart.d.ts +1 -0
  187. package/dist/functions/string/padStart.js +8 -0
  188. package/dist/functions/string/padStart.js.map +1 -0
  189. package/dist/functions/string/palindrome.d.ts +3 -0
  190. package/dist/functions/string/palindrome.js +15 -0
  191. package/dist/functions/string/palindrome.js.map +1 -0
  192. package/dist/functions/string/pascalCase.d.ts +1 -0
  193. package/dist/functions/string/pascalCase.js +8 -0
  194. package/dist/functions/string/pascalCase.js.map +1 -0
  195. package/dist/functions/string/similarity.d.ts +1 -0
  196. package/dist/functions/string/similarity.js +38 -0
  197. package/dist/functions/string/similarity.js.map +1 -0
  198. package/dist/functions/string/snakeCase.d.ts +1 -0
  199. package/dist/functions/string/snakeCase.js +10 -0
  200. package/dist/functions/string/snakeCase.js.map +1 -0
  201. package/dist/functions/string/template.d.ts +4 -0
  202. package/dist/functions/string/template.js +21 -0
  203. package/dist/functions/string/template.js.map +1 -0
  204. package/dist/functions/string/unescape.d.ts +1 -0
  205. package/dist/functions/string/unescape.js +13 -0
  206. package/dist/functions/string/unescape.js.map +1 -0
  207. package/dist/functions/string/wordCount.d.ts +5 -0
  208. package/dist/functions/string/wordCount.js +11 -0
  209. package/dist/functions/string/wordCount.js.map +1 -0
  210. package/dist/functions/tencent-cloud/getSecret.d.ts +7 -0
  211. package/dist/functions/tencent-cloud/getSecret.js +19 -0
  212. package/dist/functions/tencent-cloud/getSecret.js.map +1 -0
  213. package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.d.ts +13 -0
  214. package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.js +175 -0
  215. package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.js.map +1 -0
  216. package/dist/functions/uniapp/app-plus/androidProjectStrategy.d.ts +33 -0
  217. package/dist/functions/uniapp/app-plus/androidProjectStrategy.js +60 -0
  218. package/dist/functions/uniapp/app-plus/androidProjectStrategy.js.map +1 -0
  219. package/dist/functions/uniapp/app-plus/buildAndroidApp.d.ts +2 -0
  220. package/dist/functions/uniapp/app-plus/buildAndroidApp.js +75 -0
  221. package/dist/functions/uniapp/app-plus/buildAndroidApp.js.map +1 -0
  222. package/dist/functions/uniapp/app-plus/buildAndroidProject.d.ts +3 -0
  223. package/dist/functions/uniapp/app-plus/buildAndroidProject.js +60 -0
  224. package/dist/functions/uniapp/app-plus/buildAndroidProject.js.map +1 -0
  225. package/dist/functions/uniapp/app-plus/configureAndroidManifest.d.ts +5 -0
  226. package/dist/functions/uniapp/app-plus/configureAndroidManifest.js +51 -0
  227. package/dist/functions/uniapp/app-plus/configureAndroidManifest.js.map +1 -0
  228. package/dist/functions/uniapp/app-plus/configureAndroidProject.d.ts +3 -0
  229. package/dist/functions/uniapp/app-plus/configureAndroidProject.js +63 -0
  230. package/dist/functions/uniapp/app-plus/configureAndroidProject.js.map +1 -0
  231. package/dist/functions/uniapp/app-plus/configureBuildGradle.d.ts +9 -0
  232. package/dist/functions/uniapp/app-plus/configureBuildGradle.js +57 -0
  233. package/dist/functions/uniapp/app-plus/configureBuildGradle.js.map +1 -0
  234. package/dist/functions/uniapp/app-plus/configureDcloudControl.d.ts +5 -0
  235. package/dist/functions/uniapp/app-plus/configureDcloudControl.js +34 -0
  236. package/dist/functions/uniapp/app-plus/configureDcloudControl.js.map +1 -0
  237. package/dist/functions/uniapp/app-plus/configureStrings.d.ts +5 -0
  238. package/dist/functions/uniapp/app-plus/configureStrings.js +42 -0
  239. package/dist/functions/uniapp/app-plus/configureStrings.js.map +1 -0
  240. package/dist/functions/uniapp/app-plus/copyAppResources.d.ts +8 -0
  241. package/dist/functions/uniapp/app-plus/copyAppResources.js +25 -0
  242. package/dist/functions/uniapp/app-plus/copyAppResources.js.map +1 -0
  243. package/dist/functions/uniapp/app-plus/copyDirectory.d.ts +2 -0
  244. package/dist/functions/uniapp/app-plus/copyDirectory.js +18 -0
  245. package/dist/functions/uniapp/app-plus/copyDirectory.js.map +1 -0
  246. package/dist/functions/uniapp/app-plus/generateUniAppResources.d.ts +2 -0
  247. package/dist/functions/uniapp/app-plus/generateUniAppResources.js +35 -0
  248. package/dist/functions/uniapp/app-plus/generateUniAppResources.js.map +1 -0
  249. package/dist/functions/uniapp/app-plus/parseManifest.d.ts +14 -0
  250. package/dist/functions/uniapp/app-plus/parseManifest.js +44 -0
  251. package/dist/functions/uniapp/app-plus/parseManifest.js.map +1 -0
  252. package/dist/functions/uniapp/app-plus/validateOptions.d.ts +3 -0
  253. package/dist/functions/uniapp/app-plus/validateOptions.js +10 -0
  254. package/dist/functions/uniapp/app-plus/validateOptions.js.map +1 -0
  255. package/dist/functions/uniapp/waitForPages.d.ts +2 -0
  256. package/dist/functions/uniapp/waitForPages.js +19 -0
  257. package/dist/functions/uniapp/waitForPages.js.map +1 -0
  258. package/dist/functions/utils/compose.d.ts +1 -0
  259. package/dist/functions/utils/compose.js +10 -0
  260. package/dist/functions/utils/compose.js.map +1 -0
  261. package/dist/functions/utils/cond.d.ts +1 -0
  262. package/dist/functions/utils/cond.js +15 -0
  263. package/dist/functions/utils/cond.js.map +1 -0
  264. package/dist/functions/utils/curry.d.ts +1 -0
  265. package/dist/functions/utils/curry.js +13 -0
  266. package/dist/functions/utils/curry.js.map +1 -0
  267. package/dist/functions/utils/debounce.d.ts +1 -0
  268. package/dist/functions/utils/debounce.js +13 -0
  269. package/dist/functions/utils/debounce.js.map +1 -0
  270. package/dist/functions/utils/evolve.d.ts +3 -0
  271. package/dist/functions/utils/evolve.js +15 -0
  272. package/dist/functions/utils/evolve.js.map +1 -0
  273. package/dist/functions/utils/flow.d.ts +1 -0
  274. package/dist/functions/utils/flow.js +10 -0
  275. package/dist/functions/utils/flow.js.map +1 -0
  276. package/dist/functions/utils/isType.d.ts +11 -0
  277. package/dist/functions/utils/isType.js +30 -0
  278. package/dist/functions/utils/isType.js.map +1 -0
  279. package/dist/functions/utils/memoize.d.ts +1 -0
  280. package/dist/functions/utils/memoize.js +13 -0
  281. package/dist/functions/utils/memoize.js.map +1 -0
  282. package/dist/functions/utils/once.d.ts +1 -0
  283. package/dist/functions/utils/once.js +13 -0
  284. package/dist/functions/utils/once.js.map +1 -0
  285. package/dist/functions/utils/partial.d.ts +1 -0
  286. package/dist/functions/utils/partial.js +13 -0
  287. package/dist/functions/utils/partial.js.map +1 -0
  288. package/dist/functions/utils/pipe.d.ts +1 -0
  289. package/dist/functions/utils/pipe.js +10 -0
  290. package/dist/functions/utils/pipe.js.map +1 -0
  291. package/dist/functions/utils/retryWithBackoff.d.ts +9 -0
  292. package/dist/functions/utils/retryWithBackoff.js +30 -0
  293. package/dist/functions/utils/retryWithBackoff.js.map +1 -0
  294. package/dist/functions/utils/tap.d.ts +1 -0
  295. package/dist/functions/utils/tap.js +14 -0
  296. package/dist/functions/utils/tap.js.map +1 -0
  297. package/dist/functions/utils/throttle.d.ts +1 -0
  298. package/dist/functions/utils/throttle.js +11 -0
  299. package/dist/functions/utils/throttle.js.map +1 -0
  300. package/dist/functions/utils/until.d.ts +1 -0
  301. package/dist/functions/utils/until.js +10 -0
  302. package/dist/functions/utils/until.js.map +1 -0
  303. package/dist/functions/utils/validate.d.ts +8 -0
  304. package/dist/functions/utils/validate.js +45 -0
  305. package/dist/functions/utils/validate.js.map +1 -0
  306. package/dist/functions/vue/dynamicMount.d.ts +15 -0
  307. package/dist/functions/vue/dynamicMount.js +23 -0
  308. package/dist/functions/vue/dynamicMount.js.map +1 -0
  309. package/dist/functions/vue/isVNode.d.ts +2 -0
  310. package/dist/functions/vue/isVNode.js +4 -0
  311. package/dist/functions/vue/isVNode.js.map +1 -0
  312. package/dist/functions/vue/isVueComponent.d.ts +2 -0
  313. package/dist/functions/vue/isVueComponent.js +6 -0
  314. package/dist/functions/vue/isVueComponent.js.map +1 -0
  315. package/dist/functions/wechat/miniapp/downloadFile.d.ts +2 -0
  316. package/dist/functions/wechat/miniapp/downloadFile.js +39 -0
  317. package/dist/functions/wechat/miniapp/downloadFile.js.map +1 -0
  318. package/dist/hooks/useAi.d.ts +27 -0
  319. package/dist/hooks/useAi.js +163 -0
  320. package/dist/hooks/useAi.js.map +1 -0
  321. package/dist/hooks/useCache.d.ts +18 -0
  322. package/dist/hooks/useCache.js +82 -0
  323. package/dist/hooks/useCache.js.map +1 -0
  324. package/dist/hooks/useFetch.d.ts +3 -0
  325. package/dist/hooks/useFetch.js +154 -0
  326. package/dist/hooks/useFetch.js.map +1 -0
  327. package/dist/hooks/useLocalStorage.d.ts +4 -0
  328. package/dist/hooks/useLocalStorage.js +67 -0
  329. package/dist/hooks/useLocalStorage.js.map +1 -0
  330. package/dist/hooks/usePluginSystem.d.ts +11 -0
  331. package/dist/hooks/usePluginSystem.js +34 -0
  332. package/dist/hooks/usePluginSystem.js.map +1 -0
  333. package/dist/hooks/useRequest.d.ts +3 -0
  334. package/dist/hooks/useRequest.js +139 -0
  335. package/dist/hooks/useRequest.js.map +1 -0
  336. package/dist/hooks/useSessionStorage.d.ts +4 -0
  337. package/dist/hooks/useSessionStorage.js +67 -0
  338. package/dist/hooks/useSessionStorage.js.map +1 -0
  339. package/dist/hooks/useStorage.d.ts +3 -0
  340. package/dist/hooks/useStorage.js +64 -0
  341. package/dist/hooks/useStorage.js.map +1 -0
  342. package/dist/hooks/useStorageWithIndexedDB.d.ts +4 -0
  343. package/dist/hooks/useStorageWithIndexedDB.js +109 -0
  344. package/dist/hooks/useStorageWithIndexedDB.js.map +1 -0
  345. package/dist/hooks/useWASM.d.ts +4 -0
  346. package/dist/hooks/useWASM.js +267 -0
  347. package/dist/hooks/useWASM.js.map +1 -0
  348. package/dist/hooks/useWebWorker.d.ts +4 -0
  349. package/dist/hooks/useWebWorker.js +209 -0
  350. package/dist/hooks/useWebWorker.js.map +1 -0
  351. package/dist/hooks/useWorkerFunction.d.ts +4 -0
  352. package/dist/hooks/useWorkerFunction.js +191 -0
  353. package/dist/hooks/useWorkerFunction.js.map +1 -0
  354. package/dist/hooks/useWorkerPool.d.ts +4 -0
  355. package/dist/hooks/useWorkerPool.js +242 -0
  356. package/dist/hooks/useWorkerPool.js.map +1 -0
  357. package/package.json +145 -0
  358. package/references/browser.d.ts +175 -0
  359. package/references/browser.extension.d.ts +14 -0
  360. package/references/console.d.ts +164 -0
  361. package/references/crypto.d.ts +57 -0
  362. package/references/fetch.d.ts +269 -0
  363. package/references/json5.d.ts +28 -0
  364. package/references/node.d.ts +111 -0
  365. package/references/sharp.d.ts +19 -0
  366. package/references/storage.d.ts +112 -0
  367. package/references/timer.d.ts +46 -0
  368. package/references/uniapp.d.ts +9 -0
  369. package/references/url.d.ts +161 -0
  370. package/references/vue.d.ts +113 -0
  371. package/references/webassembly.d.ts +127 -0
  372. package/references/wechat.d.ts +49 -0
  373. package/references/worker.d.ts +207 -0
  374. package/references/xml.d.ts +56 -0
  375. package/types/altool.d.ts +65 -0
  376. package/types/android-build.d.ts +85 -0
  377. package/types/color.d.ts +115 -0
  378. package/types/geometry.d.ts +64 -0
  379. package/types/network.d.ts +184 -0
  380. package/types/storage.d.ts +49 -0
  381. package/types/util.d.ts +27 -0
  382. package/types/wasm.d.ts +217 -0
  383. package/types/worker.d.ts +364 -0
@@ -0,0 +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
49
+ }
@@ -0,0 +1,207 @@
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
207
+ }
@@ -0,0 +1,56 @@
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
56
+ }
@@ -0,0 +1,65 @@
1
+ /**
2
+ * altool相关的类型定义
3
+ */
4
+
5
+ /**
6
+ * altool支持的应用类型
7
+ */
8
+ export type AltoolAppType = 'ios-app' | 'osx-app' | 'appletvos-app'
9
+
10
+ /**
11
+ * altool输出格式
12
+ */
13
+ export type AltoolOutputFormat = 'xml' | 'normal'
14
+
15
+ /**
16
+ * altool认证方式
17
+ */
18
+ export interface AltoolAuthCredentials {
19
+ /** Apple ID用户名 */
20
+ username: string
21
+ /** 应用专用密码 */
22
+ password: string
23
+ }
24
+
25
+ export interface AltoolAuthApiKey {
26
+ /** API密钥ID */
27
+ apiKey: string
28
+ /** API发行者ID */
29
+ apiIssuer: string
30
+ }
31
+
32
+ export type AltoolAuth = AltoolAuthCredentials | AltoolAuthApiKey
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
+ /**
52
+ * altool执行结果基础接口
53
+ */
54
+ export interface AltoolBaseResult {
55
+ /** 是否成功 */
56
+ success: boolean
57
+ /** 命令输出 */
58
+ output: string
59
+ /** 错误信息 */
60
+ error?: string
61
+ /** 退出码 */
62
+ exitCode: number
63
+ /** 执行的命令 */
64
+ command: string
65
+ }
@@ -0,0 +1,85 @@
1
+ import type { NodeChildProcess, NodeFileSystem, NodePath, NodeProcess } from '../../references/node.d'
2
+ import type { XMLParser, XMLSerializer } from '../../references/xml.d'
3
+ import type { JSON5Parser } from '../../references/json5.d'
4
+
5
+ /**
6
+ * Android 离线打包选项
7
+ */
8
+ export interface AndroidBuildOptions {
9
+ /** UniApp 项目路径 */
10
+ projectPath: string
11
+ /** Android 离线 SDK 路径 */
12
+ sdkPath: string
13
+ /** 输出目录 */
14
+ outputDir: string
15
+ /** DCloud AppKey(必传) */
16
+ appkey: string
17
+ /** Android 应用包名(必传) */
18
+ applicationId: string
19
+ /** 是否为调试版本 */
20
+ debug?: boolean
21
+ /** UniApp 构建脚本名称,如果不指定则直接使用 uni 命令 */
22
+ buildScript?: string
23
+ /** Android 示例工程路径 */
24
+ androidProjectPath: string
25
+ /** 签名配置(可选) */
26
+ signing?: {
27
+ keystore: string
28
+ keystorePassword: string
29
+ keyAlias: string
30
+ keyPassword: string
31
+ }
32
+ }
33
+
34
+ /**
35
+ * Android 打包结果
36
+ */
37
+ export interface AndroidBuildResult {
38
+ /** 是否成功 */
39
+ success: boolean
40
+ /** 输出文件路径 */
41
+ outputPath?: string
42
+ /** 错误信息 */
43
+ error?: string
44
+ /** 构建日志 */
45
+ logs: string[]
46
+ }
47
+
48
+ /**
49
+ * 系统依赖接口
50
+ */
51
+ export interface SystemDependencies {
52
+ childProcess: NodeChildProcess
53
+ fs: NodeFileSystem
54
+ path: NodePath
55
+ process: NodeProcess
56
+ setTimeout: (callback: () => void, delay: number) => any
57
+ require: (id: string) => any
58
+ json5: JSON5Parser
59
+ xmlParser: XMLParser
60
+ xmlSerializer: XMLSerializer
61
+ }
62
+
63
+ /**
64
+ * 验证结果接口
65
+ */
66
+ export interface ValidationResult {
67
+ valid: boolean
68
+ error?: string
69
+ }
70
+
71
+ /**
72
+ * 操作结果接口
73
+ */
74
+ export interface OperationResult {
75
+ success: boolean
76
+ error?: string
77
+ logs: string[]
78
+ }
79
+
80
+ /**
81
+ * 构建结果接口
82
+ */
83
+ export interface BuildResult extends OperationResult {
84
+ outputPath?: string
85
+ }
@@ -0,0 +1,115 @@
1
+ /**
2
+ * 颜色处理相关类型定义
3
+ */
4
+
5
+ /**
6
+ * 支持的颜色格式类型
7
+ */
8
+ export type ColorFormat = 'hex' | 'rgb' | 'rgba' | 'hsl' | 'hsla' | 'named'
9
+
10
+ /**
11
+ * RGB颜色值对象
12
+ */
13
+ export interface RgbColor {
14
+ r: number
15
+ g: number
16
+ b: number
17
+ }
18
+
19
+ /**
20
+ * RGBA颜色值对象
21
+ */
22
+ export interface RgbaColor extends RgbColor {
23
+ a: number
24
+ }
25
+
26
+ /**
27
+ * HSL颜色值对象
28
+ */
29
+ export interface HslColor {
30
+ h: number
31
+ s: number
32
+ l: number
33
+ }
34
+
35
+ /**
36
+ * HSLA颜色值对象
37
+ */
38
+ export interface HslaColor extends HslColor {
39
+ a: number
40
+ }
41
+
42
+ /**
43
+ * 颜色转换结果
44
+ */
45
+ export interface ColorConversionResult {
46
+ /** 转换后的颜色值 */
47
+ value: string
48
+ /** 原始颜色格式 */
49
+ originalFormat: ColorFormat
50
+ /** 目标颜色格式 */
51
+ targetFormat: ColorFormat
52
+ /** 是否转换成功 */
53
+ success: boolean
54
+ }
55
+
56
+ /**
57
+ * 颜色验证结果
58
+ */
59
+ export interface ColorValidationResult {
60
+ /** 是否为有效颜色 */
61
+ isValid: boolean
62
+ /** 检测到的颜色格式 */
63
+ format?: ColorFormat
64
+ /** 标准化后的颜色值 */
65
+ normalizedValue?: string
66
+ }
67
+
68
+ /**
69
+ * 颜色模式匹配正则表达式集合
70
+ */
71
+ export interface ColorPatterns {
72
+ /** 十六进制颜色匹配 */
73
+ hex: RegExp
74
+ /** RGB颜色匹配 */
75
+ rgb: RegExp
76
+ /** RGBA颜色匹配 */
77
+ rgba: RegExp
78
+ /** HSL颜色匹配 */
79
+ hsl: RegExp
80
+ /** HSLA颜色匹配 */
81
+ hsla: RegExp
82
+ /** 命名颜色匹配 */
83
+ namedColors: RegExp
84
+ }
85
+
86
+ /**
87
+ * 命名颜色映射表类型
88
+ */
89
+ export type NamedColorMap = Record<string, string>
90
+
91
+ /**
92
+ * 颜色标准化选项
93
+ */
94
+ export interface ColorNormalizationOptions {
95
+ /** 是否保留原始格式 */
96
+ preserveFormat?: boolean
97
+ /** 是否转换为小写 */
98
+ toLowerCase?: boolean
99
+ /** 是否移除空格 */
100
+ trimSpaces?: boolean
101
+ }
102
+
103
+ /**
104
+ * 颜色转换选项
105
+ */
106
+ export interface ColorConversionOptions {
107
+ /** 目标格式 */
108
+ targetFormat: ColorFormat
109
+ /** 是否包含alpha通道 */
110
+ includeAlpha?: boolean
111
+ /** alpha值(0-1) */
112
+ alphaValue?: number
113
+ /** 是否使用8位十六进制格式 */
114
+ use8BitHex?: boolean
115
+ }
@@ -0,0 +1,64 @@
1
+ /**
2
+ * 几何和位置计算相关类型定义
3
+ */
4
+
5
+ /**
6
+ * 矩形区域定义
7
+ */
8
+ export interface Rectangle {
9
+ x: number
10
+ y: number
11
+ width: number
12
+ height: number
13
+ top: number
14
+ left: number
15
+ right: number
16
+ bottom: number
17
+ }
18
+
19
+ /**
20
+ * 坐标点定义
21
+ */
22
+ export interface Coordinate {
23
+ x: number
24
+ y: number
25
+ }
26
+
27
+ /**
28
+ * 尺寸定义
29
+ */
30
+ export interface Size {
31
+ width: number
32
+ height: number
33
+ }
34
+
35
+ /**
36
+ * 边距定义
37
+ */
38
+ export interface Margin {
39
+ top: number
40
+ right: number
41
+ bottom: number
42
+ left: number
43
+ }
44
+
45
+ /**
46
+ * 边框定义
47
+ */
48
+ export interface Border {
49
+ width: number
50
+ style: 'solid' | 'dashed' | 'dotted' | 'none'
51
+ color: string
52
+ }
53
+
54
+ /**
55
+ * 向量定义
56
+ */
57
+ export interface Vector2D {
58
+ x: number
59
+ y: number
60
+ }
61
+
62
+ // 兼容性别名
63
+ export type Rect = Rectangle
64
+ export type Coords = Coordinate