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.
- package/README.md +610 -0
- package/assets/logo-colorful.svg +18 -0
- package/assets/logo-name.svg +7 -0
- package/assets/logo-transparent.svg +14 -0
- package/assets/logo.svg +8 -0
- package/dist/functions/ag-grid/generateLicense.d.ts +4 -0
- package/dist/functions/ag-grid/generateLicense.js +12 -0
- package/dist/functions/ag-grid/generateLicense.js.map +1 -0
- package/dist/functions/altool/createAltoolClient.d.ts +21 -0
- package/dist/functions/altool/createAltoolClient.js +59 -0
- package/dist/functions/altool/createAltoolClient.js.map +1 -0
- package/dist/functions/altool/getAppInfo.d.ts +13 -0
- package/dist/functions/altool/getAppInfo.js +92 -0
- package/dist/functions/altool/getAppInfo.js.map +1 -0
- package/dist/functions/altool/index.d.ts +10 -0
- package/dist/functions/altool/index.js +6 -0
- package/dist/functions/altool/index.js.map +1 -0
- package/dist/functions/altool/isApiKeyAuth.d.ts +2 -0
- package/dist/functions/altool/isApiKeyAuth.js +4 -0
- package/dist/functions/altool/isApiKeyAuth.js.map +1 -0
- package/dist/functions/altool/isCredentialsAuth.d.ts +2 -0
- package/dist/functions/altool/isCredentialsAuth.js +4 -0
- package/dist/functions/altool/isCredentialsAuth.js.map +1 -0
- package/dist/functions/altool/types.d.ts +26 -0
- package/dist/functions/altool/types.js +7 -0
- package/dist/functions/altool/types.js.map +1 -0
- package/dist/functions/altool/uploadApp.d.ts +6 -0
- package/dist/functions/altool/uploadApp.js +36 -0
- package/dist/functions/altool/uploadApp.js.map +1 -0
- package/dist/functions/altool/validateApp.d.ts +17 -0
- package/dist/functions/altool/validateApp.js +59 -0
- package/dist/functions/altool/validateApp.js.map +1 -0
- package/dist/functions/base64/strToBase64.d.ts +2 -0
- package/dist/functions/base64/strToBase64.js +6 -0
- package/dist/functions/base64/strToBase64.js.map +1 -0
- package/dist/functions/color-converter/COLOR_PATTERNS.d.ts +2 -0
- package/dist/functions/color-converter/COLOR_PATTERNS.js +9 -0
- package/dist/functions/color-converter/COLOR_PATTERNS.js.map +1 -0
- package/dist/functions/color-converter/colorPatterns.d.ts +4 -0
- package/dist/functions/color-converter/colorPatterns.js +41 -0
- package/dist/functions/color-converter/colorPatterns.js.map +1 -0
- package/dist/functions/color-converter/convertColor.d.ts +6 -0
- package/dist/functions/color-converter/convertColor.js +238 -0
- package/dist/functions/color-converter/convertColor.js.map +1 -0
- package/dist/functions/color-converter/detectColorFormat.d.ts +2 -0
- package/dist/functions/color-converter/detectColorFormat.js +19 -0
- package/dist/functions/color-converter/detectColorFormat.js.map +1 -0
- package/dist/functions/color-converter/getColorPatterns.d.ts +2 -0
- package/dist/functions/color-converter/getColorPatterns.js +11 -0
- package/dist/functions/color-converter/getColorPatterns.js.map +1 -0
- package/dist/functions/color-converter/getNamedColorMap.d.ts +2 -0
- package/dist/functions/color-converter/getNamedColorMap.js +19 -0
- package/dist/functions/color-converter/getNamedColorMap.js.map +1 -0
- package/dist/functions/color-converter/hexToRgb.d.ts +2 -0
- package/dist/functions/color-converter/hexToRgb.js +42 -0
- package/dist/functions/color-converter/hexToRgb.js.map +1 -0
- package/dist/functions/color-converter/hslToRgb.d.ts +2 -0
- package/dist/functions/color-converter/hslToRgb.js +78 -0
- package/dist/functions/color-converter/hslToRgb.js.map +1 -0
- package/dist/functions/color-converter/hueToRgb.d.ts +1 -0
- package/dist/functions/color-converter/hueToRgb.js +14 -0
- package/dist/functions/color-converter/hueToRgb.js.map +1 -0
- package/dist/functions/color-converter/isColorValue.d.ts +2 -0
- package/dist/functions/color-converter/isColorValue.js +79 -0
- package/dist/functions/color-converter/isColorValue.js.map +1 -0
- package/dist/functions/color-converter/normalizeColor.d.ts +1 -0
- package/dist/functions/color-converter/normalizeColor.js +49 -0
- package/dist/functions/color-converter/normalizeColor.js.map +1 -0
- package/dist/functions/color-converter/parseColorString.d.ts +15 -0
- package/dist/functions/color-converter/parseColorString.js +116 -0
- package/dist/functions/color-converter/parseColorString.js.map +1 -0
- package/dist/functions/color-converter/rgbToHex.d.ts +2 -0
- package/dist/functions/color-converter/rgbToHex.js +65 -0
- package/dist/functions/color-converter/rgbToHex.js.map +1 -0
- package/dist/functions/color-converter/standardizeColor.d.ts +1 -0
- package/dist/functions/color-converter/standardizeColor.js +147 -0
- package/dist/functions/color-converter/standardizeColor.js.map +1 -0
- package/dist/functions/debug/createDebugger.d.ts +20 -0
- package/dist/functions/debug/createDebugger.js +79 -0
- package/dist/functions/debug/createDebugger.js.map +1 -0
- package/dist/functions/desensitize/desensitizeName.d.ts +1 -0
- package/dist/functions/desensitize/desensitizeName.js +8 -0
- package/dist/functions/desensitize/desensitizeName.js.map +1 -0
- package/dist/functions/desensitize/desensitizePhone.d.ts +1 -0
- package/dist/functions/desensitize/desensitizePhone.js +8 -0
- package/dist/functions/desensitize/desensitizePhone.js.map +1 -0
- package/dist/functions/dom/detectOverflow.d.ts +8 -0
- package/dist/functions/dom/detectOverflow.js +17 -0
- package/dist/functions/dom/detectOverflow.js.map +1 -0
- package/dist/functions/dom/getElementRect.d.ts +3 -0
- package/dist/functions/dom/getElementRect.js +14 -0
- package/dist/functions/dom/getElementRect.js.map +1 -0
- package/dist/functions/dom/getRelativePosition.d.ts +3 -0
- package/dist/functions/dom/getRelativePosition.js +14 -0
- package/dist/functions/dom/getRelativePosition.js.map +1 -0
- package/dist/functions/dom/getViewportRect.d.ts +3 -0
- package/dist/functions/dom/getViewportRect.js +15 -0
- package/dist/functions/dom/getViewportRect.js.map +1 -0
- package/dist/functions/dom/getViewportSize.d.ts +5 -0
- package/dist/functions/dom/getViewportSize.js +7 -0
- package/dist/functions/dom/getViewportSize.js.map +1 -0
- package/dist/functions/image/generateMacIcons.d.ts +6 -0
- package/dist/functions/image/generateMacIcons.js +15 -0
- package/dist/functions/image/generateMacIcons.js.map +1 -0
- package/dist/functions/image/generateMacTrayIcon.d.ts +7 -0
- package/dist/functions/image/generateMacTrayIcon.js +15 -0
- package/dist/functions/image/generateMacTrayIcon.js.map +1 -0
- package/dist/functions/image/generatePaddedImage.d.ts +3 -0
- package/dist/functions/image/generatePaddedImage.js +14 -0
- package/dist/functions/image/generatePaddedImage.js.map +1 -0
- package/dist/functions/image/generatePwaIcons.d.ts +6 -0
- package/dist/functions/image/generatePwaIcons.js +15 -0
- package/dist/functions/image/generatePwaIcons.js.map +1 -0
- package/dist/functions/image/generateRoundedImage.d.ts +3 -0
- package/dist/functions/image/generateRoundedImage.js +17 -0
- package/dist/functions/image/generateRoundedImage.js.map +1 -0
- package/dist/functions/ipc/dispatchIpcRequest.d.ts +6 -0
- package/dist/functions/ipc/dispatchIpcRequest.js +10 -0
- package/dist/functions/ipc/dispatchIpcRequest.js.map +1 -0
- package/dist/functions/software/buildPathExecutables.d.ts +1 -0
- package/dist/functions/software/buildPathExecutables.js +4 -0
- package/dist/functions/software/buildPathExecutables.js.map +1 -0
- package/dist/functions/software/buildSoftwarePaths.d.ts +2 -0
- package/dist/functions/software/buildSoftwarePaths.js +22 -0
- package/dist/functions/software/buildSoftwarePaths.js.map +1 -0
- package/dist/functions/software/createConfigGenerator.d.ts +8 -0
- package/dist/functions/software/createConfigGenerator.js +13 -0
- package/dist/functions/software/createConfigGenerator.js.map +1 -0
- package/dist/functions/software/detectPlatform.d.ts +2 -0
- package/dist/functions/software/detectPlatform.js +4 -0
- package/dist/functions/software/detectPlatform.js.map +1 -0
- package/dist/functions/software/find.d.ts +2 -0
- package/dist/functions/software/find.js +12 -0
- package/dist/functions/software/find.js.map +1 -0
- package/dist/functions/software/findSoftware.d.ts +14 -0
- package/dist/functions/software/findSoftware.js +29 -0
- package/dist/functions/software/findSoftware.js.map +1 -0
- package/dist/functions/software/findSoftwareWithGenerator.d.ts +3 -0
- package/dist/functions/software/findSoftwareWithGenerator.js +8 -0
- package/dist/functions/software/findSoftwareWithGenerator.js.map +1 -0
- package/dist/functions/software/getConfigGenerator.d.ts +2 -0
- package/dist/functions/software/getConfigGenerator.js +10 -0
- package/dist/functions/software/getConfigGenerator.js.map +1 -0
- package/dist/functions/software/getEnvironmentSoftwarePath.d.ts +1 -0
- package/dist/functions/software/getEnvironmentSoftwarePath.js +4 -0
- package/dist/functions/software/getEnvironmentSoftwarePath.js.map +1 -0
- package/dist/functions/software/getSupportedSoftware.d.ts +1 -0
- package/dist/functions/software/getSupportedSoftware.js +5 -0
- package/dist/functions/software/getSupportedSoftware.js.map +1 -0
- package/dist/functions/software/parseEnvironmentPaths.d.ts +1 -0
- package/dist/functions/software/parseEnvironmentPaths.js +7 -0
- package/dist/functions/software/parseEnvironmentPaths.js.map +1 -0
- package/dist/functions/software/softwareConfigs.d.ts +2 -0
- package/dist/functions/software/softwareConfigs.js +148 -0
- package/dist/functions/software/softwareConfigs.js.map +1 -0
- package/dist/functions/software/softwareNameMap.d.ts +1 -0
- package/dist/functions/software/softwareNameMap.js +9 -0
- package/dist/functions/software/softwareNameMap.js.map +1 -0
- package/dist/functions/software/types.d.ts +11 -0
- package/dist/functions/software/types.js +2 -0
- package/dist/functions/software/types.js.map +1 -0
- package/dist/functions/string/camelCase.d.ts +1 -0
- package/dist/functions/string/camelCase.js +8 -0
- package/dist/functions/string/camelCase.js.map +1 -0
- package/dist/functions/string/capitalize.d.ts +1 -0
- package/dist/functions/string/capitalize.js +6 -0
- package/dist/functions/string/capitalize.js.map +1 -0
- package/dist/functions/string/escape.d.ts +1 -0
- package/dist/functions/string/escape.js +13 -0
- package/dist/functions/string/escape.js.map +1 -0
- package/dist/functions/string/kebabCase.d.ts +1 -0
- package/dist/functions/string/kebabCase.js +10 -0
- package/dist/functions/string/kebabCase.js.map +1 -0
- package/dist/functions/string/levenshtein.d.ts +1 -0
- package/dist/functions/string/levenshtein.js +27 -0
- package/dist/functions/string/levenshtein.js.map +1 -0
- package/dist/functions/string/mask.d.ts +1 -0
- package/dist/functions/string/mask.js +40 -0
- package/dist/functions/string/mask.js.map +1 -0
- package/dist/functions/string/normalize.d.ts +8 -0
- package/dist/functions/string/normalize.js +37 -0
- package/dist/functions/string/normalize.js.map +1 -0
- package/dist/functions/string/padEnd.d.ts +1 -0
- package/dist/functions/string/padEnd.js +8 -0
- package/dist/functions/string/padEnd.js.map +1 -0
- package/dist/functions/string/padStart.d.ts +1 -0
- package/dist/functions/string/padStart.js +8 -0
- package/dist/functions/string/padStart.js.map +1 -0
- package/dist/functions/string/palindrome.d.ts +3 -0
- package/dist/functions/string/palindrome.js +15 -0
- package/dist/functions/string/palindrome.js.map +1 -0
- package/dist/functions/string/pascalCase.d.ts +1 -0
- package/dist/functions/string/pascalCase.js +8 -0
- package/dist/functions/string/pascalCase.js.map +1 -0
- package/dist/functions/string/similarity.d.ts +1 -0
- package/dist/functions/string/similarity.js +38 -0
- package/dist/functions/string/similarity.js.map +1 -0
- package/dist/functions/string/snakeCase.d.ts +1 -0
- package/dist/functions/string/snakeCase.js +10 -0
- package/dist/functions/string/snakeCase.js.map +1 -0
- package/dist/functions/string/template.d.ts +4 -0
- package/dist/functions/string/template.js +21 -0
- package/dist/functions/string/template.js.map +1 -0
- package/dist/functions/string/unescape.d.ts +1 -0
- package/dist/functions/string/unescape.js +13 -0
- package/dist/functions/string/unescape.js.map +1 -0
- package/dist/functions/string/wordCount.d.ts +5 -0
- package/dist/functions/string/wordCount.js +11 -0
- package/dist/functions/string/wordCount.js.map +1 -0
- package/dist/functions/tencent-cloud/getSecret.d.ts +7 -0
- package/dist/functions/tencent-cloud/getSecret.js +19 -0
- package/dist/functions/tencent-cloud/getSecret.js.map +1 -0
- package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.d.ts +13 -0
- package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.js +175 -0
- package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.js.map +1 -0
- package/dist/functions/uniapp/app-plus/androidProjectStrategy.d.ts +33 -0
- package/dist/functions/uniapp/app-plus/androidProjectStrategy.js +60 -0
- package/dist/functions/uniapp/app-plus/androidProjectStrategy.js.map +1 -0
- package/dist/functions/uniapp/app-plus/buildAndroidApp.d.ts +2 -0
- package/dist/functions/uniapp/app-plus/buildAndroidApp.js +75 -0
- package/dist/functions/uniapp/app-plus/buildAndroidApp.js.map +1 -0
- package/dist/functions/uniapp/app-plus/buildAndroidProject.d.ts +3 -0
- package/dist/functions/uniapp/app-plus/buildAndroidProject.js +60 -0
- package/dist/functions/uniapp/app-plus/buildAndroidProject.js.map +1 -0
- package/dist/functions/uniapp/app-plus/configureAndroidManifest.d.ts +5 -0
- package/dist/functions/uniapp/app-plus/configureAndroidManifest.js +51 -0
- package/dist/functions/uniapp/app-plus/configureAndroidManifest.js.map +1 -0
- package/dist/functions/uniapp/app-plus/configureAndroidProject.d.ts +3 -0
- package/dist/functions/uniapp/app-plus/configureAndroidProject.js +63 -0
- package/dist/functions/uniapp/app-plus/configureAndroidProject.js.map +1 -0
- package/dist/functions/uniapp/app-plus/configureBuildGradle.d.ts +9 -0
- package/dist/functions/uniapp/app-plus/configureBuildGradle.js +57 -0
- package/dist/functions/uniapp/app-plus/configureBuildGradle.js.map +1 -0
- package/dist/functions/uniapp/app-plus/configureDcloudControl.d.ts +5 -0
- package/dist/functions/uniapp/app-plus/configureDcloudControl.js +34 -0
- package/dist/functions/uniapp/app-plus/configureDcloudControl.js.map +1 -0
- package/dist/functions/uniapp/app-plus/configureStrings.d.ts +5 -0
- package/dist/functions/uniapp/app-plus/configureStrings.js +42 -0
- package/dist/functions/uniapp/app-plus/configureStrings.js.map +1 -0
- package/dist/functions/uniapp/app-plus/copyAppResources.d.ts +8 -0
- package/dist/functions/uniapp/app-plus/copyAppResources.js +25 -0
- package/dist/functions/uniapp/app-plus/copyAppResources.js.map +1 -0
- package/dist/functions/uniapp/app-plus/copyDirectory.d.ts +2 -0
- package/dist/functions/uniapp/app-plus/copyDirectory.js +18 -0
- package/dist/functions/uniapp/app-plus/copyDirectory.js.map +1 -0
- package/dist/functions/uniapp/app-plus/generateUniAppResources.d.ts +2 -0
- package/dist/functions/uniapp/app-plus/generateUniAppResources.js +35 -0
- package/dist/functions/uniapp/app-plus/generateUniAppResources.js.map +1 -0
- package/dist/functions/uniapp/app-plus/parseManifest.d.ts +14 -0
- package/dist/functions/uniapp/app-plus/parseManifest.js +44 -0
- package/dist/functions/uniapp/app-plus/parseManifest.js.map +1 -0
- package/dist/functions/uniapp/app-plus/validateOptions.d.ts +3 -0
- package/dist/functions/uniapp/app-plus/validateOptions.js +10 -0
- package/dist/functions/uniapp/app-plus/validateOptions.js.map +1 -0
- package/dist/functions/uniapp/waitForPages.d.ts +2 -0
- package/dist/functions/uniapp/waitForPages.js +19 -0
- package/dist/functions/uniapp/waitForPages.js.map +1 -0
- package/dist/functions/utils/compose.d.ts +1 -0
- package/dist/functions/utils/compose.js +10 -0
- package/dist/functions/utils/compose.js.map +1 -0
- package/dist/functions/utils/cond.d.ts +1 -0
- package/dist/functions/utils/cond.js +15 -0
- package/dist/functions/utils/cond.js.map +1 -0
- package/dist/functions/utils/curry.d.ts +1 -0
- package/dist/functions/utils/curry.js +13 -0
- package/dist/functions/utils/curry.js.map +1 -0
- package/dist/functions/utils/debounce.d.ts +1 -0
- package/dist/functions/utils/debounce.js +13 -0
- package/dist/functions/utils/debounce.js.map +1 -0
- package/dist/functions/utils/evolve.d.ts +3 -0
- package/dist/functions/utils/evolve.js +15 -0
- package/dist/functions/utils/evolve.js.map +1 -0
- package/dist/functions/utils/flow.d.ts +1 -0
- package/dist/functions/utils/flow.js +10 -0
- package/dist/functions/utils/flow.js.map +1 -0
- package/dist/functions/utils/isType.d.ts +11 -0
- package/dist/functions/utils/isType.js +30 -0
- package/dist/functions/utils/isType.js.map +1 -0
- package/dist/functions/utils/memoize.d.ts +1 -0
- package/dist/functions/utils/memoize.js +13 -0
- package/dist/functions/utils/memoize.js.map +1 -0
- package/dist/functions/utils/once.d.ts +1 -0
- package/dist/functions/utils/once.js +13 -0
- package/dist/functions/utils/once.js.map +1 -0
- package/dist/functions/utils/partial.d.ts +1 -0
- package/dist/functions/utils/partial.js +13 -0
- package/dist/functions/utils/partial.js.map +1 -0
- package/dist/functions/utils/pipe.d.ts +1 -0
- package/dist/functions/utils/pipe.js +10 -0
- package/dist/functions/utils/pipe.js.map +1 -0
- package/dist/functions/utils/retryWithBackoff.d.ts +9 -0
- package/dist/functions/utils/retryWithBackoff.js +30 -0
- package/dist/functions/utils/retryWithBackoff.js.map +1 -0
- package/dist/functions/utils/tap.d.ts +1 -0
- package/dist/functions/utils/tap.js +14 -0
- package/dist/functions/utils/tap.js.map +1 -0
- package/dist/functions/utils/throttle.d.ts +1 -0
- package/dist/functions/utils/throttle.js +11 -0
- package/dist/functions/utils/throttle.js.map +1 -0
- package/dist/functions/utils/until.d.ts +1 -0
- package/dist/functions/utils/until.js +10 -0
- package/dist/functions/utils/until.js.map +1 -0
- package/dist/functions/utils/validate.d.ts +8 -0
- package/dist/functions/utils/validate.js +45 -0
- package/dist/functions/utils/validate.js.map +1 -0
- package/dist/functions/vue/dynamicMount.d.ts +15 -0
- package/dist/functions/vue/dynamicMount.js +23 -0
- package/dist/functions/vue/dynamicMount.js.map +1 -0
- package/dist/functions/vue/isVNode.d.ts +2 -0
- package/dist/functions/vue/isVNode.js +4 -0
- package/dist/functions/vue/isVNode.js.map +1 -0
- package/dist/functions/vue/isVueComponent.d.ts +2 -0
- package/dist/functions/vue/isVueComponent.js +6 -0
- package/dist/functions/vue/isVueComponent.js.map +1 -0
- package/dist/functions/wechat/miniapp/downloadFile.d.ts +2 -0
- package/dist/functions/wechat/miniapp/downloadFile.js +39 -0
- package/dist/functions/wechat/miniapp/downloadFile.js.map +1 -0
- package/dist/hooks/useAi.d.ts +27 -0
- package/dist/hooks/useAi.js +163 -0
- package/dist/hooks/useAi.js.map +1 -0
- package/dist/hooks/useCache.d.ts +18 -0
- package/dist/hooks/useCache.js +82 -0
- package/dist/hooks/useCache.js.map +1 -0
- package/dist/hooks/useFetch.d.ts +3 -0
- package/dist/hooks/useFetch.js +154 -0
- package/dist/hooks/useFetch.js.map +1 -0
- package/dist/hooks/useLocalStorage.d.ts +4 -0
- package/dist/hooks/useLocalStorage.js +67 -0
- package/dist/hooks/useLocalStorage.js.map +1 -0
- package/dist/hooks/usePluginSystem.d.ts +11 -0
- package/dist/hooks/usePluginSystem.js +34 -0
- package/dist/hooks/usePluginSystem.js.map +1 -0
- package/dist/hooks/useRequest.d.ts +3 -0
- package/dist/hooks/useRequest.js +139 -0
- package/dist/hooks/useRequest.js.map +1 -0
- package/dist/hooks/useSessionStorage.d.ts +4 -0
- package/dist/hooks/useSessionStorage.js +67 -0
- package/dist/hooks/useSessionStorage.js.map +1 -0
- package/dist/hooks/useStorage.d.ts +3 -0
- package/dist/hooks/useStorage.js +64 -0
- package/dist/hooks/useStorage.js.map +1 -0
- package/dist/hooks/useStorageWithIndexedDB.d.ts +4 -0
- package/dist/hooks/useStorageWithIndexedDB.js +109 -0
- package/dist/hooks/useStorageWithIndexedDB.js.map +1 -0
- package/dist/hooks/useWASM.d.ts +4 -0
- package/dist/hooks/useWASM.js +267 -0
- package/dist/hooks/useWASM.js.map +1 -0
- package/dist/hooks/useWebWorker.d.ts +4 -0
- package/dist/hooks/useWebWorker.js +209 -0
- package/dist/hooks/useWebWorker.js.map +1 -0
- package/dist/hooks/useWorkerFunction.d.ts +4 -0
- package/dist/hooks/useWorkerFunction.js +191 -0
- package/dist/hooks/useWorkerFunction.js.map +1 -0
- package/dist/hooks/useWorkerPool.d.ts +4 -0
- package/dist/hooks/useWorkerPool.js +242 -0
- package/dist/hooks/useWorkerPool.js.map +1 -0
- package/package.json +145 -0
- package/references/browser.d.ts +175 -0
- package/references/browser.extension.d.ts +14 -0
- package/references/console.d.ts +164 -0
- package/references/crypto.d.ts +57 -0
- package/references/fetch.d.ts +269 -0
- package/references/json5.d.ts +28 -0
- package/references/node.d.ts +111 -0
- package/references/sharp.d.ts +19 -0
- package/references/storage.d.ts +112 -0
- package/references/timer.d.ts +46 -0
- package/references/uniapp.d.ts +9 -0
- package/references/url.d.ts +161 -0
- package/references/vue.d.ts +113 -0
- package/references/webassembly.d.ts +127 -0
- package/references/wechat.d.ts +49 -0
- package/references/worker.d.ts +207 -0
- package/references/xml.d.ts +56 -0
- package/types/altool.d.ts +65 -0
- package/types/android-build.d.ts +85 -0
- package/types/color.d.ts +115 -0
- package/types/geometry.d.ts +64 -0
- package/types/network.d.ts +184 -0
- package/types/storage.d.ts +49 -0
- package/types/util.d.ts +27 -0
- package/types/wasm.d.ts +217 -0
- package/types/worker.d.ts +364 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 网络请求相关类型定义
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* 定义网络请求hooks使用的接口和类型
|
|
6
|
+
*
|
|
7
|
+
* @since 1.0.0
|
|
8
|
+
* @author Assistant
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { Response } from '../../references/fetch.d'
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 请求选项接口
|
|
15
|
+
*/
|
|
16
|
+
export interface RequestOptions extends RequestInit {
|
|
17
|
+
/** 是否启用缓存 */
|
|
18
|
+
cache?: boolean
|
|
19
|
+
/** 缓存TTL(毫秒) */
|
|
20
|
+
cacheTTL?: number
|
|
21
|
+
/** 重试次数 */
|
|
22
|
+
retry?: number
|
|
23
|
+
/** 重试延迟(毫秒) */
|
|
24
|
+
retryDelay?: number
|
|
25
|
+
/** 请求超时(毫秒) */
|
|
26
|
+
timeout?: number
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 请求结果接口
|
|
31
|
+
*/
|
|
32
|
+
export interface RequestResult<T> {
|
|
33
|
+
/** 请求是否成功 */
|
|
34
|
+
success: boolean
|
|
35
|
+
/** 响应数据 */
|
|
36
|
+
data: T | null
|
|
37
|
+
/** 错误信息 */
|
|
38
|
+
error: Error | null
|
|
39
|
+
/** 是否来自缓存 */
|
|
40
|
+
fromCache: boolean
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 响应式值接口
|
|
45
|
+
*/
|
|
46
|
+
export interface ReactiveValue<T> {
|
|
47
|
+
value: T
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* useRequest返回值接口
|
|
52
|
+
*/
|
|
53
|
+
export interface UseRequestReturn<T> {
|
|
54
|
+
/** 加载状态 */
|
|
55
|
+
loading: ReactiveValue<boolean>
|
|
56
|
+
/** 错误状态 */
|
|
57
|
+
error: ReactiveValue<Error | null>
|
|
58
|
+
/** 数据状态 */
|
|
59
|
+
data: ReactiveValue<T | null>
|
|
60
|
+
/** 执行请求 */
|
|
61
|
+
execute: (url: string, options?: RequestOptions) => Promise<RequestResult<T>>
|
|
62
|
+
/** 取消请求 */
|
|
63
|
+
cancel: () => void
|
|
64
|
+
/** 清除缓存 */
|
|
65
|
+
clearCache: (url?: string) => void
|
|
66
|
+
/** 获取缓存统计 */
|
|
67
|
+
getCacheStats: () => {
|
|
68
|
+
total: number
|
|
69
|
+
valid: number
|
|
70
|
+
expired: number
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* 请求数据类型
|
|
76
|
+
*/
|
|
77
|
+
export type RequestData = string | FormData | Blob | ArrayBuffer | URLSearchParams | Record<string, unknown> | null
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Fetch选项接口
|
|
81
|
+
*/
|
|
82
|
+
export interface FetchOptions {
|
|
83
|
+
/** 基础URL */
|
|
84
|
+
baseURL?: string
|
|
85
|
+
/** 请求数据 */
|
|
86
|
+
data?: RequestData
|
|
87
|
+
/** HTTP方法 */
|
|
88
|
+
method?: string
|
|
89
|
+
/** 请求头 */
|
|
90
|
+
headers?: Record<string, string> | Headers
|
|
91
|
+
/** 请求体 */
|
|
92
|
+
body?: BodyInit | null
|
|
93
|
+
/** 中止信号 */
|
|
94
|
+
signal?: AbortSignal
|
|
95
|
+
/** 凭据模式 */
|
|
96
|
+
credentials?: RequestCredentials
|
|
97
|
+
/** 缓存模式 */
|
|
98
|
+
cache?: RequestCache
|
|
99
|
+
/** 重定向模式 */
|
|
100
|
+
redirect?: RequestRedirect
|
|
101
|
+
/** 引用者 */
|
|
102
|
+
referrer?: string
|
|
103
|
+
/** 引用者策略 */
|
|
104
|
+
referrerPolicy?: ReferrerPolicy
|
|
105
|
+
/** 完整性 */
|
|
106
|
+
integrity?: string
|
|
107
|
+
/** 保持连接 */
|
|
108
|
+
keepalive?: boolean
|
|
109
|
+
/** 模式 */
|
|
110
|
+
mode?: RequestMode
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Fetch结果接口
|
|
115
|
+
*/
|
|
116
|
+
export interface FetchResult<T> {
|
|
117
|
+
/** 请求是否成功 */
|
|
118
|
+
success: boolean
|
|
119
|
+
/** 响应数据 */
|
|
120
|
+
data: T | null
|
|
121
|
+
/** 响应数据 */
|
|
122
|
+
response: Response | null
|
|
123
|
+
/** 错误信息 */
|
|
124
|
+
error: Error | null
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* useFetch返回值接口
|
|
129
|
+
*/
|
|
130
|
+
export interface UseFetchReturn {
|
|
131
|
+
/** 加载状态 */
|
|
132
|
+
loading: ReactiveValue<boolean>
|
|
133
|
+
/** 错误状态 */
|
|
134
|
+
error: ReactiveValue<Error | null>
|
|
135
|
+
/** 通用请求方法 */
|
|
136
|
+
request: <T>(url: string, options?: FetchOptions) => Promise<FetchResult<T>>
|
|
137
|
+
/** GET请求 */
|
|
138
|
+
get: <T>(url: string, options?: Omit<FetchOptions, 'method' | 'data'>) => Promise<FetchResult<T>>
|
|
139
|
+
/** POST请求 */
|
|
140
|
+
post: <T>(url: string, data?: RequestData, options?: Omit<FetchOptions, 'method' | 'data'>) => Promise<FetchResult<T>>
|
|
141
|
+
/** PUT请求 */
|
|
142
|
+
put: <T>(url: string, data?: RequestData, options?: Omit<FetchOptions, 'method' | 'data'>) => Promise<FetchResult<T>>
|
|
143
|
+
/** DELETE请求 */
|
|
144
|
+
delete: <T>(url: string, options?: Omit<FetchOptions, 'method' | 'data'>) => Promise<FetchResult<T>>
|
|
145
|
+
/** PATCH请求 */
|
|
146
|
+
patch: <T>(url: string, data?: RequestData, options?: Omit<FetchOptions, 'method' | 'data'>) => Promise<FetchResult<T>>
|
|
147
|
+
/** HEAD请求 */
|
|
148
|
+
head: (url: string, options?: Omit<FetchOptions, 'method' | 'data'>) => Promise<FetchResult<unknown>>
|
|
149
|
+
/** OPTIONS请求 */
|
|
150
|
+
options: (url: string, options?: Omit<FetchOptions, 'method' | 'data'>) => Promise<FetchResult<unknown>>
|
|
151
|
+
/** 添加请求拦截器 */
|
|
152
|
+
addRequestInterceptor: (interceptor: (config: FetchOptions) => FetchOptions | Promise<FetchOptions>) => void
|
|
153
|
+
/** 添加响应拦截器 */
|
|
154
|
+
addResponseInterceptor: (interceptor: (response: Response) => Response | Promise<Response>) => void
|
|
155
|
+
/** 移除请求拦截器 */
|
|
156
|
+
removeRequestInterceptor: (interceptor: (config: FetchOptions) => FetchOptions | Promise<FetchOptions>) => void
|
|
157
|
+
/** 移除响应拦截器 */
|
|
158
|
+
removeResponseInterceptor: (interceptor: (response: Response) => Response | Promise<Response>) => void
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* 请求拦截器函数类型
|
|
163
|
+
*/
|
|
164
|
+
export type RequestInterceptor = (config: FetchOptions) => FetchOptions | Promise<FetchOptions>
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* 响应拦截器类型
|
|
168
|
+
*/
|
|
169
|
+
export type ResponseInterceptor = (response: Response) => Response | Promise<Response>
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* HTTP方法类型
|
|
173
|
+
*/
|
|
174
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS'
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* 缓存策略类型
|
|
178
|
+
*/
|
|
179
|
+
export type CacheStrategy = 'no-cache' | 'memory' | 'storage'
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* 请求状态类型
|
|
183
|
+
*/
|
|
184
|
+
export type RequestStatus = 'idle' | 'loading' | 'success' | 'error'
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 存储相关的应用层类型定义
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* 定义存储hooks使用的接口和类型,不包含环境相关的类型
|
|
6
|
+
* 环境相关的类型请从 references/storage.d 导入
|
|
7
|
+
*
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
* @author Assistant
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
// 存储操作结果
|
|
13
|
+
export interface StorageResult<T> {
|
|
14
|
+
success: boolean
|
|
15
|
+
data?: T
|
|
16
|
+
error?: string
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// 存储配置选项
|
|
20
|
+
export interface StorageOptions {
|
|
21
|
+
prefix?: string // 键名前缀
|
|
22
|
+
serializer?: {
|
|
23
|
+
serialize: (value: any) => string
|
|
24
|
+
deserialize: (value: string) => any
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// IndexedDB 存储配置
|
|
29
|
+
export interface IndexedDBStorageOptions extends StorageOptions {
|
|
30
|
+
dbName: string // 数据库名称
|
|
31
|
+
storeName: string // 对象存储名称
|
|
32
|
+
version?: number // 数据库版本
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// 存储 Hook 返回值接口
|
|
36
|
+
export interface UseStorageReturn<T> {
|
|
37
|
+
value: T | null
|
|
38
|
+
setValue: (value: T | null) => Promise<void>
|
|
39
|
+
removeValue: () => Promise<void>
|
|
40
|
+
clear: () => Promise<void>
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// 存储适配器接口
|
|
44
|
+
export interface StorageAdapter<T> {
|
|
45
|
+
get: (key: string) => Promise<T | null>
|
|
46
|
+
set: (key: string, value: T) => Promise<void>
|
|
47
|
+
remove: (key: string) => Promise<void>
|
|
48
|
+
clear: () => Promise<void>
|
|
49
|
+
}
|
package/types/util.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 通用工具类型定义
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// 忽略所有body开头的属性
|
|
6
|
+
export type OmitBodyProperties<T> = {
|
|
7
|
+
[K in keyof T as K extends `body${string}` ? never : K]: T[K]
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// 深度可选类型
|
|
11
|
+
export type DeepPartial<T> = {
|
|
12
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// 可选属性类型
|
|
16
|
+
export type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>
|
|
17
|
+
|
|
18
|
+
// 必需属性类型
|
|
19
|
+
export type RequiredKeys<T, K extends keyof T> = T & Required<Pick<T, K>>
|
|
20
|
+
|
|
21
|
+
// 非空类型
|
|
22
|
+
export type NonNullable<T> = T extends null | undefined ? never : T
|
|
23
|
+
|
|
24
|
+
// 键值对类型
|
|
25
|
+
export type KeyValuePair<K extends string | number | symbol, V> = {
|
|
26
|
+
[P in K]: V
|
|
27
|
+
}
|
package/types/wasm.d.ts
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WebAssembly 相关的应用层类型定义
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* 定义 WASM hooks 使用的接口和类型,不包含环境相关的类型
|
|
6
|
+
* 环境相关的类型请从 references/webassembly.d 导入
|
|
7
|
+
*
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
* @author Assistant
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { WebAssembly } from '../../references/webassembly.d'
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 响应式值接口
|
|
16
|
+
*/
|
|
17
|
+
export interface ReactiveValue<T> {
|
|
18
|
+
value: T
|
|
19
|
+
subscribe: (callback: (value: T) => void) => () => void
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* WASM模块信息
|
|
24
|
+
*/
|
|
25
|
+
export interface WASMModule {
|
|
26
|
+
/** 编译后的WASM模块 */
|
|
27
|
+
module: WebAssembly.Module
|
|
28
|
+
/** 模块大小(字节) */
|
|
29
|
+
size: number
|
|
30
|
+
/** 导出的函数名列表 */
|
|
31
|
+
exports: string[]
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* WASM内存管理
|
|
36
|
+
*/
|
|
37
|
+
export interface WASMMemory {
|
|
38
|
+
/** 内存缓冲区 */
|
|
39
|
+
buffer: ArrayBuffer
|
|
40
|
+
/** 内存页数 */
|
|
41
|
+
pages: number
|
|
42
|
+
/** 扩展内存 */
|
|
43
|
+
grow: (pages: number) => number
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* WASM函数包装器
|
|
48
|
+
*/
|
|
49
|
+
export interface WASMFunction {
|
|
50
|
+
/** 函数名 */
|
|
51
|
+
name: string
|
|
52
|
+
/** 调用函数 */
|
|
53
|
+
call: (...args: any[]) => any
|
|
54
|
+
/** 原始函数 */
|
|
55
|
+
original: Function
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* WASM导入对象
|
|
60
|
+
*/
|
|
61
|
+
export interface WASMImports {
|
|
62
|
+
/** 环境导入 */
|
|
63
|
+
env?: {
|
|
64
|
+
/** 内存对象 */
|
|
65
|
+
memory?: WebAssembly.Memory
|
|
66
|
+
/** 其他环境函数 */
|
|
67
|
+
[key: string]: any
|
|
68
|
+
}
|
|
69
|
+
/** 其他模块导入 */
|
|
70
|
+
[module: string]: any
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* WASM配置选项
|
|
75
|
+
*/
|
|
76
|
+
export interface WASMOptions {
|
|
77
|
+
/** WASM文件URL */
|
|
78
|
+
url?: string
|
|
79
|
+
/** WASM字节数组 */
|
|
80
|
+
bytes?: ArrayBuffer
|
|
81
|
+
/** 是否自动加载 */
|
|
82
|
+
autoLoad?: boolean
|
|
83
|
+
/** 初始内存页数 */
|
|
84
|
+
memoryPages?: number
|
|
85
|
+
/** 最大内存页数 */
|
|
86
|
+
maxMemoryPages?: number
|
|
87
|
+
/** 导入对象 */
|
|
88
|
+
imports?: WASMImports
|
|
89
|
+
/** 超时时间(毫秒) */
|
|
90
|
+
timeout?: number
|
|
91
|
+
/** 重试次数 */
|
|
92
|
+
retries?: number
|
|
93
|
+
/** 重试延迟(毫秒) */
|
|
94
|
+
retryDelay?: number
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* WASM操作结果
|
|
99
|
+
*/
|
|
100
|
+
export interface WASMResult {
|
|
101
|
+
/** 是否成功 */
|
|
102
|
+
success: boolean
|
|
103
|
+
/** 模块信息(成功时) */
|
|
104
|
+
module?: WASMModule
|
|
105
|
+
/** 实例对象(成功时) */
|
|
106
|
+
instance?: WebAssembly.Instance
|
|
107
|
+
/** 内存对象(成功时) */
|
|
108
|
+
memory?: WASMMemory
|
|
109
|
+
/** 导出函数(成功时) */
|
|
110
|
+
exports?: Record<string, WASMFunction>
|
|
111
|
+
/** 错误信息(失败时) */
|
|
112
|
+
error?: Error
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* WASM Hook返回值
|
|
117
|
+
*/
|
|
118
|
+
export interface UseWASMReturn {
|
|
119
|
+
/** 是否正在加载 */
|
|
120
|
+
isLoading: ReactiveValue<boolean>
|
|
121
|
+
/** 是否已准备就绪 */
|
|
122
|
+
isReady: ReactiveValue<boolean>
|
|
123
|
+
/** 错误信息 */
|
|
124
|
+
error: ReactiveValue<Error | null>
|
|
125
|
+
/** 模块信息 */
|
|
126
|
+
module: ReactiveValue<WASMModule | null>
|
|
127
|
+
/** 实例对象 */
|
|
128
|
+
instance: ReactiveValue<WebAssembly.Instance | null>
|
|
129
|
+
/** 内存对象 */
|
|
130
|
+
memory: ReactiveValue<WASMMemory | null>
|
|
131
|
+
/** 导出函数 */
|
|
132
|
+
exports: ReactiveValue<Record<string, WASMFunction> | null>
|
|
133
|
+
|
|
134
|
+
/** 加载WASM模块 */
|
|
135
|
+
load: () => Promise<WASMResult>
|
|
136
|
+
/** 调用WASM函数 */
|
|
137
|
+
callFunction: <T>(functionName: string, ...args: any[]) => T
|
|
138
|
+
/** 读取内存数据 */
|
|
139
|
+
readMemory: (
|
|
140
|
+
offset: number,
|
|
141
|
+
length: number,
|
|
142
|
+
type?: 'uint8' | 'uint16' | 'uint32' | 'int8' | 'int16' | 'int32' | 'float32' | 'float64'
|
|
143
|
+
) => number[]
|
|
144
|
+
/** 写入内存数据 */
|
|
145
|
+
writeMemory: (
|
|
146
|
+
offset: number,
|
|
147
|
+
data: number[],
|
|
148
|
+
type?: 'uint8' | 'uint16' | 'uint32' | 'int8' | 'int16' | 'int32' | 'float32' | 'float64'
|
|
149
|
+
) => void
|
|
150
|
+
/** 分配内存 */
|
|
151
|
+
allocateMemory: (size: number) => number
|
|
152
|
+
/** 释放内存 */
|
|
153
|
+
freeMemory: (pointer: number) => void
|
|
154
|
+
/** 重置模块 */
|
|
155
|
+
reset: () => void
|
|
156
|
+
/** 获取模块信息 */
|
|
157
|
+
getModuleInfo: () => {
|
|
158
|
+
module: WebAssembly.Module
|
|
159
|
+
instance: WebAssembly.Instance
|
|
160
|
+
memory: WebAssembly.Memory | null
|
|
161
|
+
exports: string[]
|
|
162
|
+
memorySize: number
|
|
163
|
+
memoryPages: number
|
|
164
|
+
} | null
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* 内存类型
|
|
169
|
+
*/
|
|
170
|
+
export type MemoryType = 'uint8' | 'uint16' | 'uint32' | 'int8' | 'int16' | 'int32' | 'float32' | 'float64'
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* WASM模块状态
|
|
174
|
+
*/
|
|
175
|
+
export type WASMStatus = 'idle' | 'loading' | 'ready' | 'error'
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* WASM错误类型
|
|
179
|
+
*/
|
|
180
|
+
export interface WASMError extends Error {
|
|
181
|
+
/** 错误类型 */
|
|
182
|
+
type: 'compile' | 'instantiate' | 'runtime' | 'memory' | 'function'
|
|
183
|
+
/** 错误详情 */
|
|
184
|
+
details?: any
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* WASM性能指标
|
|
189
|
+
*/
|
|
190
|
+
export interface WASMPerformance {
|
|
191
|
+
/** 编译时间(毫秒) */
|
|
192
|
+
compileTime: number
|
|
193
|
+
/** 实例化时间(毫秒) */
|
|
194
|
+
instantiateTime: number
|
|
195
|
+
/** 总加载时间(毫秒) */
|
|
196
|
+
loadTime: number
|
|
197
|
+
/** 模块大小(字节) */
|
|
198
|
+
moduleSize: number
|
|
199
|
+
/** 内存使用量(字节) */
|
|
200
|
+
memoryUsage: number
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* WASM调试信息
|
|
205
|
+
*/
|
|
206
|
+
export interface WASMDebugInfo {
|
|
207
|
+
/** 模块名称 */
|
|
208
|
+
moduleName?: string
|
|
209
|
+
/** 版本信息 */
|
|
210
|
+
version?: string
|
|
211
|
+
/** 编译器信息 */
|
|
212
|
+
compiler?: string
|
|
213
|
+
/** 源语言 */
|
|
214
|
+
sourceLanguage?: string
|
|
215
|
+
/** 调试符号 */
|
|
216
|
+
debugSymbols?: boolean
|
|
217
|
+
}
|