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,175 @@
1
+ // 浏览器环境类型声明
2
+ import type { ConsoleInterface } from './console.d'
3
+ import type { AbortController, Response } from './fetch.d'
4
+ import type { URLSearchParams } from './url.d'
5
+ import type { StorageInterface } from './storage.d'
6
+ import type { WorkerConstructor } from './worker.d'
7
+
8
+ // 重新导出常用类型
9
+ export type { ConsoleInterface, AbortController, Response, URLSearchParams, StorageInterface }
10
+
11
+ export interface WindowLike {
12
+ innerWidth: number
13
+ innerHeight: number
14
+ document: {
15
+ documentElement: {
16
+ clientWidth: number
17
+ clientHeight: number
18
+ }
19
+ }
20
+ }
21
+
22
+ export interface DocumentLike {
23
+ createElement(tagName: string): HTMLElement
24
+ }
25
+
26
+ export interface HTMLElement {
27
+ appendChild(node: Element): Element
28
+ removeChild(node: Element): Element
29
+ parentNode?: Element | null
30
+ getBoundingClientRect(): {
31
+ width: number
32
+ height: number
33
+ top: number
34
+ left: number
35
+ right: number
36
+ bottom: number
37
+ }
38
+ [key: string]: any
39
+ }
40
+
41
+ export interface Element {
42
+ parentNode?: Element | null
43
+ [key: string]: any
44
+ }
45
+
46
+ export interface Base64Encoder {
47
+ btoa(data: string): string
48
+ atob(data: string): string
49
+ }
50
+
51
+
52
+
53
+ // URLSearchParams 类型别名(使用标准 URLSearchParams 类)
54
+ export type URLSearchParamsConstructor = typeof URLSearchParams
55
+
56
+ export interface IDBFactory {
57
+ open(name: string, version?: number): IDBOpenDBRequest
58
+ }
59
+
60
+ export interface IDBOpenDBRequest {
61
+ result: IDBDatabase
62
+ error: DOMException | null
63
+ onsuccess: ((event: Event) => void) | null
64
+ onerror: ((event: Event) => void) | null
65
+ onupgradeneeded: ((event: IDBVersionChangeEvent) => void) | null
66
+ }
67
+
68
+ export interface IDBDatabase {
69
+ objectStoreNames: DOMStringList
70
+ createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore
71
+ transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction
72
+ }
73
+
74
+ export interface IDBObjectStore {
75
+ get(key: IDBValidKey): IDBRequest
76
+ put(value: any, key?: IDBValidKey): IDBRequest
77
+ delete(key: IDBValidKey): IDBRequest
78
+ clear(): IDBRequest
79
+ }
80
+
81
+ export interface IDBTransaction {
82
+ objectStore(name: string): IDBObjectStore
83
+ }
84
+
85
+ export interface IDBRequest {
86
+ result: any
87
+ error: DOMException | null
88
+ onsuccess: ((event: Event) => void) | null
89
+ onerror: ((event: Event) => void) | null
90
+ }
91
+
92
+ export interface IDBVersionChangeEvent extends Event {
93
+ target: IDBOpenDBRequest
94
+ }
95
+
96
+ export interface DOMStringList {
97
+ contains(string: string): boolean
98
+ }
99
+
100
+ export type IDBValidKey = string | number | Date | ArrayBuffer | IDBValidKey[]
101
+ export type IDBTransactionMode = 'readonly' | 'readwrite' | 'versionchange'
102
+ export interface IDBObjectStoreParameters {
103
+ keyPath?: string | string[]
104
+ autoIncrement?: boolean
105
+ }
106
+
107
+ // Blob 相关类型
108
+ export type BlobPart = BufferSource | Blob | string
109
+ export interface BlobPropertyBag {
110
+ type?: string
111
+ endings?: 'transparent' | 'native'
112
+ }
113
+ export interface Blob {
114
+ readonly size: number
115
+ readonly type: string
116
+ arrayBuffer(): Promise<ArrayBuffer>
117
+ slice(start?: number, end?: number, contentType?: string): Blob
118
+ stream(): ReadableStream<Uint8Array>
119
+ text(): Promise<string>
120
+ }
121
+ export interface MediaSource {
122
+ // MediaSource 的基本定义
123
+ }
124
+
125
+ // Fetch API 类型别名(使用标准 Response 接口)
126
+ export type FetchResponse = Response
127
+ export type FetchAPI = typeof fetch
128
+
129
+
130
+
131
+ export interface ReadableStreamReader<T> {
132
+ read(): Promise<{ done: boolean; value: T }>
133
+ releaseLock(): void
134
+ cancel(reason?: any): Promise<void>
135
+ }
136
+
137
+ export interface ReadableStream<T> {
138
+ getReader(): ReadableStreamReader<T>
139
+ cancel(reason?: any): Promise<void>
140
+ locked: boolean
141
+ }
142
+
143
+ export interface TextDecoder {
144
+ decode(input?: BufferSource, options?: { stream?: boolean }): string
145
+ }
146
+
147
+ export interface TextDecoderConstructor {
148
+ new (label?: string, options?: { fatal?: boolean; ignoreBOM?: boolean }): TextDecoder
149
+ }
150
+
151
+ // 浏览器环境接口
152
+ export interface BrowserEnvironment {
153
+ window: {
154
+ location: {
155
+ search: string
156
+ }
157
+ }
158
+ __DEV__?: boolean
159
+ localStorage?: StorageInterface
160
+ sessionStorage?: StorageInterface
161
+ indexedDB?: IDBFactory
162
+ fetch: FetchAPI
163
+ AbortController: typeof AbortController
164
+ TextDecoder: TextDecoderConstructor
165
+ Worker?: WorkerConstructor
166
+ console: ConsoleInterface
167
+ URLSearchParams: typeof URLSearchParams
168
+ Blob: {
169
+ new (blobParts?: BlobPart[], options?: BlobPropertyBag): Blob
170
+ }
171
+ URL: {
172
+ createObjectURL(object: Blob | MediaSource): string
173
+ revokeObjectURL(url: string): void
174
+ }
175
+ }
@@ -0,0 +1,14 @@
1
+ export interface TabInfo {
2
+ id?: number;
3
+ windowId?: number;
4
+ }
5
+
6
+ export type SenderType = 'content' | 'background' | 'popup' | 'sidepanel' | 'options';
7
+
8
+ export interface MessageSender {
9
+ type: SenderType;
10
+ tab?: TabInfo;
11
+ id?: string;
12
+ url?: string;
13
+ frameId?: number;
14
+ }
@@ -0,0 +1,164 @@
1
+ /**
2
+ * 控制台 API 类型定义
3
+ * 包含浏览器和 Node.js 环境都支持的控制台相关 API
4
+ */
5
+
6
+ /**
7
+ * 控制台接口
8
+ * 提供调试和日志输出功能
9
+ */
10
+ export interface ConsoleInterface {
11
+ /**
12
+ * 输出普通日志信息
13
+ * @param message 消息内容
14
+ * @param optionalParams 可选参数
15
+ */
16
+ log(message?: any, ...optionalParams: any[]): void
17
+
18
+ /**
19
+ * 输出错误信息
20
+ * @param message 消息内容
21
+ * @param optionalParams 可选参数
22
+ */
23
+ error(message?: any, ...optionalParams: any[]): void
24
+
25
+ /**
26
+ * 输出警告信息
27
+ * @param message 消息内容
28
+ * @param optionalParams 可选参数
29
+ */
30
+ warn(message?: any, ...optionalParams: any[]): void
31
+
32
+ /**
33
+ * 输出信息级别日志
34
+ * @param message 消息内容
35
+ * @param optionalParams 可选参数
36
+ */
37
+ info(message?: any, ...optionalParams: any[]): void
38
+
39
+ /**
40
+ * 输出调试信息
41
+ * @param message 消息内容
42
+ * @param optionalParams 可选参数
43
+ */
44
+ debug(message?: any, ...optionalParams: any[]): void
45
+
46
+ /**
47
+ * 创建一个新的分组
48
+ * @param label 分组标签
49
+ */
50
+ group(label?: string): void
51
+
52
+ /**
53
+ * 创建一个新的折叠分组
54
+ * @param label 分组标签
55
+ */
56
+ groupCollapsed(label?: string): void
57
+
58
+ /**
59
+ * 结束当前分组
60
+ */
61
+ groupEnd(): void
62
+
63
+ /**
64
+ * 输出堆栈跟踪信息
65
+ * @param message 消息内容
66
+ * @param optionalParams 可选参数
67
+ */
68
+ trace(message?: any, ...optionalParams: any[]): void
69
+
70
+ /**
71
+ * 清空控制台
72
+ */
73
+ clear(): void
74
+
75
+ /**
76
+ * 输出表格数据
77
+ * @param tabularData 表格数据
78
+ * @param properties 要显示的属性
79
+ */
80
+ table(tabularData: any, properties?: string[]): void
81
+
82
+ /**
83
+ * 开始计时
84
+ * @param label 计时器标签
85
+ */
86
+ time(label?: string): void
87
+
88
+ /**
89
+ * 输出计时器当前时间
90
+ * @param label 计时器标签
91
+ * @param data 附加数据
92
+ */
93
+ timeLog(label?: string, ...data: any[]): void
94
+
95
+ /**
96
+ * 结束计时并输出总时间
97
+ * @param label 计时器标签
98
+ */
99
+ timeEnd(label?: string): void
100
+
101
+ /**
102
+ * 开始计数
103
+ * @param label 计数器标签
104
+ */
105
+ count(label?: string): void
106
+
107
+ /**
108
+ * 重置计数器
109
+ * @param label 计数器标签
110
+ */
111
+ countReset(label?: string): void
112
+
113
+ /**
114
+ * 断言,如果条件为 false 则输出错误信息
115
+ * @param condition 断言条件
116
+ * @param data 错误信息
117
+ */
118
+ assert(condition?: boolean, ...data: any[]): void
119
+
120
+ /**
121
+ * 输出对象的详细信息
122
+ * @param item 要检查的对象
123
+ * @param options 选项
124
+ */
125
+ dir(item?: any, options?: any): void
126
+
127
+ /**
128
+ * 输出 XML/HTML 元素的详细信息
129
+ * @param object 要检查的对象
130
+ */
131
+ dirxml(object: any): void
132
+
133
+ /**
134
+ * 在性能面板中标记时间点
135
+ * @param markName 标记名称
136
+ */
137
+ timeStamp(markName?: string): void
138
+
139
+ /**
140
+ * 开始性能分析
141
+ * @param reportName 报告名称
142
+ */
143
+ profile(reportName?: string): void
144
+
145
+ /**
146
+ * 结束性能分析
147
+ * @param reportName 报告名称
148
+ */
149
+ profileEnd(reportName?: string): void
150
+ }
151
+
152
+ /**
153
+ * 控制台对象
154
+ */
155
+ export declare const console: ConsoleInterface
156
+
157
+ /**
158
+ * 控制台环境类型定义
159
+ */
160
+ export interface ConsoleEnvironment {
161
+ console: ConsoleInterface
162
+ }
163
+
164
+ // console 已在上面导出
@@ -0,0 +1,57 @@
1
+ // 加密相关第三方库类型声明
2
+
3
+ /**
4
+ * CryptoJS 加密库类型定义
5
+ * 注意:CryptoJS 是一个第三方 JavaScript 加密库,不是浏览器原生 API
6
+ * 需要通过 npm install crypto-js 安装
7
+ */
8
+ export interface CryptoJS {
9
+ MD5(message: string): {
10
+ toString(): string
11
+ } | string
12
+
13
+ SHA1(message: string): {
14
+ toString(): string
15
+ } | string
16
+
17
+ SHA256(message: string): {
18
+ toString(): string
19
+ } | string
20
+
21
+ SHA512(message: string): {
22
+ toString(): string
23
+ } | string
24
+
25
+ AES: {
26
+ encrypt(message: string, key: string): {
27
+ toString(): string
28
+ }
29
+ decrypt(ciphertext: string, key: string): {
30
+ toString(): string
31
+ }
32
+ }
33
+
34
+ DES: {
35
+ encrypt(message: string, key: string): {
36
+ toString(): string
37
+ }
38
+ decrypt(ciphertext: string, key: string): {
39
+ toString(): string
40
+ }
41
+ }
42
+
43
+ enc: {
44
+ Utf8: {
45
+ parse(str: string): any
46
+ stringify(words: any): string
47
+ }
48
+ Base64: {
49
+ parse(str: string): any
50
+ stringify(words: any): string
51
+ }
52
+ Hex: {
53
+ parse(str: string): any
54
+ stringify(words: any): string
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,269 @@
1
+ /**
2
+ * Fetch API 类型定义
3
+ * 包含浏览器和 Node.js 环境都支持的 Fetch 相关 API
4
+ */
5
+
6
+ /**
7
+ * 请求凭据类型
8
+ */
9
+ type RequestCredentials = 'omit' | 'same-origin' | 'include'
10
+
11
+ /**
12
+ * 请求缓存类型
13
+ */
14
+ type RequestCache = 'default' | 'no-store' | 'reload' | 'no-cache' | 'force-cache' | 'only-if-cached'
15
+
16
+ /**
17
+ * 请求重定向类型
18
+ */
19
+ type RequestRedirect = 'follow' | 'error' | 'manual'
20
+
21
+ /**
22
+ * 引用策略类型
23
+ */
24
+ type ReferrerPolicy = 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url'
25
+
26
+ /**
27
+ * 请求模式类型
28
+ */
29
+ type RequestMode = 'cors' | 'no-cors' | 'same-origin' | 'navigate'
30
+
31
+ /**
32
+ * 请求体类型
33
+ */
34
+ type BodyInit = Blob | BufferSource | FormData | URLSearchParams | string
35
+
36
+ /**
37
+ * Headers 接口
38
+ */
39
+ export interface Headers {
40
+ append(name: string, value: string): void
41
+ delete(name: string): void
42
+ get(name: string): string | null
43
+ has(name: string): boolean
44
+ set(name: string, value: string): void
45
+ forEach(callbackfn: (value: string, key: string, parent: Headers) => void, thisArg?: any): void
46
+ [Symbol.iterator](): IterableIterator<[string, string]>
47
+ entries(): IterableIterator<[string, string]>
48
+ keys(): IterableIterator<string>
49
+ values(): IterableIterator<string>
50
+ }
51
+
52
+ /**
53
+ * Headers 构造函数
54
+ */
55
+ export declare const Headers: {
56
+ new (init?: HeadersInit): Headers
57
+ }
58
+
59
+ /**
60
+ * Headers 初始化类型
61
+ */
62
+ type HeadersInit = string[][] | Record<string, string> | Headers
63
+
64
+ /**
65
+ * 中止信号接口
66
+ */
67
+ export interface AbortSignal {
68
+ /** 是否已中止 */
69
+ aborted: boolean
70
+
71
+ /** 中止原因 */
72
+ reason?: any
73
+
74
+ /**
75
+ * 添加事件监听器
76
+ * @param type 事件类型
77
+ * @param listener 监听器函数
78
+ */
79
+ addEventListener(type: 'abort', listener: () => void): void
80
+
81
+ /**
82
+ * 移除事件监听器
83
+ * @param type 事件类型
84
+ * @param listener 监听器函数
85
+ */
86
+ removeEventListener(type: 'abort', listener: () => void): void
87
+
88
+ /**
89
+ * 抛出中止异常(如果已中止)
90
+ */
91
+ throwIfAborted(): void
92
+ }
93
+
94
+ /**
95
+ * 中止控制器接口
96
+ */
97
+ export interface AbortController {
98
+ /** 中止信号 */
99
+ signal: AbortSignal
100
+
101
+ /**
102
+ * 中止操作
103
+ * @param reason 中止原因
104
+ */
105
+ abort(reason?: any): void
106
+ }
107
+
108
+ /**
109
+ * 中止控制器构造函数
110
+ */
111
+ export declare const AbortController: {
112
+ new (): AbortController
113
+ }
114
+
115
+ /**
116
+ * 请求初始化选项
117
+ */
118
+ export interface RequestInit {
119
+ /** HTTP 方法 */
120
+ method?: string
121
+
122
+ /** 请求头 */
123
+ headers?: HeadersInit
124
+
125
+ /** 请求体 */
126
+ body?: BodyInit | null
127
+
128
+ /** 中止信号 */
129
+ signal?: AbortSignal
130
+
131
+ /** 凭据模式 */
132
+ credentials?: RequestCredentials
133
+
134
+ /** 缓存模式 */
135
+ cache?: RequestCache
136
+
137
+ /** 重定向模式 */
138
+ redirect?: RequestRedirect
139
+
140
+ /** 引用页面 */
141
+ referrer?: string
142
+
143
+ /** 引用策略 */
144
+ referrerPolicy?: ReferrerPolicy
145
+
146
+ /** 完整性校验 */
147
+ integrity?: string
148
+
149
+ /** 保持连接 */
150
+ keepalive?: boolean
151
+
152
+ /** 请求模式 */
153
+ mode?: RequestMode
154
+ }
155
+
156
+ /**
157
+ * Request 接口
158
+ */
159
+ export interface Request {
160
+ readonly url: string
161
+ readonly method: string
162
+ readonly headers: Headers
163
+ readonly body: ReadableStream<Uint8Array> | null
164
+ readonly bodyUsed: boolean
165
+ readonly cache: RequestCache
166
+ readonly credentials: RequestCredentials
167
+ readonly destination: string
168
+ readonly integrity: string
169
+ readonly keepalive: boolean
170
+ readonly mode: RequestMode
171
+ readonly redirect: RequestRedirect
172
+ readonly referrer: string
173
+ readonly referrerPolicy: ReferrerPolicy
174
+ readonly signal: AbortSignal
175
+
176
+ clone(): Request
177
+ arrayBuffer(): Promise<ArrayBuffer>
178
+ blob(): Promise<Blob>
179
+ formData(): Promise<FormData>
180
+ json(): Promise<any>
181
+ text(): Promise<string>
182
+ }
183
+
184
+ /**
185
+ * Request 构造函数
186
+ */
187
+ export declare const Request: {
188
+ new (input: RequestInfo, init?: RequestInit): Request
189
+ }
190
+
191
+ /**
192
+ * RequestInfo 类型
193
+ */
194
+ type RequestInfo = Request | string
195
+
196
+ /**
197
+ * Response 接口
198
+ */
199
+ export interface Response {
200
+ readonly ok: boolean
201
+ readonly status: number
202
+ readonly statusText: string
203
+ readonly headers: Headers
204
+ readonly body: ReadableStream<Uint8Array> | null
205
+ readonly bodyUsed: boolean
206
+ readonly redirected: boolean
207
+ readonly type: ResponseType
208
+ readonly url: string
209
+
210
+ clone(): Response
211
+ arrayBuffer(): Promise<ArrayBuffer>
212
+ blob(): Promise<Blob>
213
+ formData(): Promise<FormData>
214
+ json(): Promise<any>
215
+ text(): Promise<string>
216
+ }
217
+
218
+ /**
219
+ * Response 构造函数
220
+ */
221
+ export declare const Response: {
222
+ new (body?: BodyInit | null, init?: ResponseInit): Response
223
+ error(): Response
224
+ redirect(url: string, status?: number): Response
225
+ }
226
+
227
+ /**
228
+ * Response 初始化选项
229
+ */
230
+ export interface ResponseInit {
231
+ status?: number
232
+ statusText?: string
233
+ headers?: HeadersInit
234
+ }
235
+
236
+ /**
237
+ * Response 类型
238
+ */
239
+ type ResponseType = 'basic' | 'cors' | 'default' | 'error' | 'opaque' | 'opaqueredirect'
240
+
241
+ /**
242
+ * Fetch 函数
243
+ */
244
+ export declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>
245
+
246
+ /**
247
+ * Fetch 环境类型定义
248
+ */
249
+ export interface FetchEnvironment {
250
+ fetch: typeof fetch
251
+ Request: typeof Request
252
+ Response: typeof Response
253
+ Headers: typeof Headers
254
+ AbortController: typeof AbortController
255
+ }
256
+
257
+ // 导出 Fetch 相关 API
258
+ // 导出类型别名
259
+ export type {
260
+ RequestCredentials,
261
+ RequestCache,
262
+ RequestRedirect,
263
+ ReferrerPolicy,
264
+ RequestMode,
265
+ BodyInit,
266
+ HeadersInit,
267
+ RequestInfo,
268
+ ResponseType
269
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * JSON5 解析器类型定义
3
+ * JSON5 是 JSON 的扩展,支持注释、尾随逗号等特性
4
+ */
5
+ export interface JSON5Parser {
6
+ /**
7
+ * 解析 JSON5 字符串
8
+ * @param text 要解析的 JSON5 字符串
9
+ * @returns 解析后的对象
10
+ */
11
+ parse(text: string): any
12
+
13
+ /**
14
+ * 将对象序列化为 JSON5 字符串
15
+ * @param value 要序列化的值
16
+ * @param replacer 替换函数或属性数组
17
+ * @param space 缩进空格数
18
+ * @returns JSON5 字符串
19
+ */
20
+ stringify(value: any, replacer?: any, space?: string | number): string
21
+ }
22
+
23
+ /**
24
+ * JSON5 环境类型定义
25
+ */
26
+ export interface JSON5Environment {
27
+ JSON5: JSON5Parser
28
+ }