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,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
|
+
}
|
package/types/color.d.ts
ADDED
|
@@ -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
|