zcw-shared 1.4.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +513 -610
- package/assets/logo-colorful.svg +18 -18
- package/assets/logo-name.svg +7 -7
- package/assets/logo-transparent.svg +14 -14
- package/assets/logo.svg +8 -8
- package/dist/constants/colorPatterns.d.ts +8 -0
- package/dist/{functions/color-converter/COLOR_PATTERNS.js → constants/colorPatterns.js} +1 -1
- package/dist/constants/colorPatterns.js.map +1 -0
- package/dist/constants/namedColors.d.ts +16 -0
- package/dist/constants/namedColors.js +17 -0
- package/dist/constants/namedColors.js.map +1 -0
- package/dist/functions/android/buildProject.d.ts +11 -0
- package/dist/functions/android/buildProject.js +97 -0
- package/dist/functions/android/buildProject.js.map +1 -0
- package/dist/functions/android/modifyGradle.d.ts +17 -0
- package/dist/functions/android/modifyGradle.js +69 -0
- package/dist/functions/android/modifyGradle.js.map +1 -0
- package/dist/functions/android/modifyManifest.d.ts +23 -0
- package/dist/functions/android/modifyManifest.js +198 -0
- package/dist/functions/android/modifyManifest.js.map +1 -0
- package/dist/functions/android/permission.d.ts +30 -0
- package/dist/functions/android/permission.js +65 -0
- package/dist/functions/android/permission.js.map +1 -0
- package/dist/functions/color/colorValidation.d.ts +11 -0
- package/dist/functions/color/colorValidation.js +35 -0
- package/dist/functions/color/colorValidation.js.map +1 -0
- package/dist/functions/{color-converter → color}/convertColor.d.ts +0 -1
- package/dist/functions/color/convertColor.js +277 -0
- package/dist/functions/color/convertColor.js.map +1 -0
- package/dist/functions/color/deduplicateColors.d.ts +4 -0
- package/dist/functions/color/deduplicateColors.js +40 -0
- package/dist/functions/color/deduplicateColors.js.map +1 -0
- package/dist/functions/color/detectColorFormat.d.ts +8 -0
- package/dist/functions/color/detectColorFormat.js +110 -0
- package/dist/functions/color/detectColorFormat.js.map +1 -0
- package/dist/functions/color/extractColors.d.ts +4 -0
- package/dist/functions/color/extractColors.js +128 -0
- package/dist/functions/color/extractColors.js.map +1 -0
- package/dist/functions/css/extractCssVariables.d.ts +12 -0
- package/dist/functions/css/extractCssVariables.js +53 -0
- package/dist/functions/css/extractCssVariables.js.map +1 -0
- package/dist/functions/debug/createDebugger.d.ts +8 -7
- package/dist/functions/debug/createDebugger.js +49 -39
- package/dist/functions/debug/createDebugger.js.map +1 -1
- package/dist/functions/dom/detectOverflow.d.ts +3 -3
- package/dist/functions/dom/detectOverflow.js +3 -3
- package/dist/functions/dom/detectOverflow.js.map +1 -1
- package/dist/functions/dom/getElementRect.d.ts +1 -1
- package/dist/functions/dom/getElementRect.js.map +1 -1
- package/dist/functions/dom/getRelativePosition.d.ts +1 -1
- package/dist/functions/dom/getRelativePosition.js.map +1 -1
- package/dist/functions/dom/getViewportRect.d.ts +2 -2
- package/dist/functions/dom/getViewportRect.js +2 -2
- package/dist/functions/dom/getViewportRect.js.map +1 -1
- package/dist/functions/image/generateMacIcons.d.ts +3 -3
- package/dist/functions/image/generateMacIcons.js.map +1 -1
- package/dist/functions/image/generateMacTrayIcon.d.ts +3 -3
- package/dist/functions/image/generateMacTrayIcon.js.map +1 -1
- package/dist/functions/image/generatePaddedImage.d.ts +2 -2
- package/dist/functions/image/generatePaddedImage.js.map +1 -1
- package/dist/functions/image/generatePwaIcons.d.ts +3 -3
- package/dist/functions/image/generatePwaIcons.js.map +1 -1
- package/dist/functions/image/generateRoundedImage.d.ts +2 -2
- package/dist/functions/image/generateRoundedImage.js.map +1 -1
- package/dist/functions/ipc/dispatchIpcRequest.d.ts +2 -2
- package/dist/functions/ipc/dispatchIpcRequest.js +1 -1
- package/dist/functions/ipc/dispatchIpcRequest.js.map +1 -1
- package/dist/functions/software/findSoftware.d.ts +4 -5
- package/dist/functions/software/findSoftware.js +32 -20
- package/dist/functions/software/findSoftware.js.map +1 -1
- package/dist/functions/uniapp/app-plus/buildAndroidApp.d.ts +2 -2
- package/dist/functions/uniapp/app-plus/buildAndroidApp.js +97 -24
- package/dist/functions/uniapp/app-plus/buildAndroidApp.js.map +1 -1
- package/dist/functions/uniapp/build.d.ts +20 -0
- package/dist/functions/uniapp/build.js +84 -0
- package/dist/functions/uniapp/build.js.map +1 -0
- package/dist/functions/uniapp/detectAndroidProjectStructure.d.ts +7 -0
- package/dist/functions/uniapp/detectAndroidProjectStructure.js +30 -0
- package/dist/functions/uniapp/detectAndroidProjectStructure.js.map +1 -0
- package/dist/functions/uniapp/detectProjectType.d.ts +16 -0
- package/dist/functions/uniapp/detectProjectType.js +68 -0
- package/dist/functions/uniapp/detectProjectType.js.map +1 -0
- package/dist/functions/uniapp/parseManifest.d.ts +12 -0
- package/dist/functions/uniapp/{app-plus/parseManifest.js → parseManifest.js} +9 -7
- package/dist/functions/uniapp/parseManifest.js.map +1 -0
- package/dist/functions/utils/generateExports.d.ts +16 -0
- package/dist/functions/utils/generateExports.js +34 -0
- package/dist/functions/utils/generateExports.js.map +1 -0
- package/dist/functions/vue/extractColorsFromVueFile.d.ts +3 -0
- package/dist/functions/vue/extractColorsFromVueFile.js +18 -0
- package/dist/functions/vue/extractColorsFromVueFile.js.map +1 -0
- package/dist/functions/vue/extractColorsFromVueSection.d.ts +3 -0
- package/dist/functions/vue/extractColorsFromVueSection.js +53 -0
- package/dist/functions/vue/extractColorsFromVueSection.js.map +1 -0
- package/dist/functions/vue/filterSections.d.ts +2 -0
- package/dist/functions/vue/parseVueFile.d.ts +2 -0
- package/dist/functions/xml/modifyXml.d.ts +11 -0
- package/dist/functions/xml/modifyXml.js +46 -0
- package/dist/functions/xml/modifyXml.js.map +1 -0
- package/dist/hooks/useAltool.d.ts +39 -0
- package/dist/hooks/useAltool.js +350 -0
- package/dist/hooks/useAltool.js.map +1 -0
- package/dist/hooks/useLocalStorage.d.ts +4 -4
- package/dist/hooks/useLocalStorage.js +51 -18
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useSessionStorage.d.ts +4 -4
- package/dist/hooks/useSessionStorage.js +51 -18
- package/dist/hooks/useSessionStorage.js.map +1 -1
- package/dist/hooks/useStorage.d.ts +10 -3
- package/dist/hooks/useStorage.js +33 -35
- package/dist/hooks/useStorage.js.map +1 -1
- package/dist/hooks/useStorageWithIndexedDB.d.ts +3 -4
- package/dist/hooks/useStorageWithIndexedDB.js +39 -29
- package/dist/hooks/useStorageWithIndexedDB.js.map +1 -1
- package/dist/hooks/useWebWorker.d.ts +25 -4
- package/dist/hooks/useWebWorker.js.map +1 -1
- package/dist/hooks/useWorkerFunction.d.ts +22 -4
- package/dist/hooks/useWorkerFunction.js +28 -28
- package/dist/hooks/useWorkerFunction.js.map +1 -1
- package/dist/hooks/useWorkerPool.d.ts +30 -4
- package/dist/hooks/useWorkerPool.js.map +1 -1
- package/package.json +39 -63
- package/references/arraybuffer.d.ts +109 -0
- package/references/blob.d.ts +37 -0
- package/references/browser.d.ts +69 -174
- package/references/chrome.extension.d.ts +83 -0
- package/references/console.d.ts +25 -164
- package/references/{crypto.d.ts → crypto-js.d.ts} +57 -57
- package/references/dom.d.ts +41 -0
- package/references/encoding.d.ts +24 -0
- package/references/fetch.d.ts +124 -269
- package/references/indexeddb.d.ts +49 -0
- package/references/json5.d.ts +21 -28
- package/references/location.d.ts +16 -0
- package/references/node.d.ts +116 -111
- package/references/sharp.d.ts +18 -18
- package/references/storage.d.ts +17 -111
- package/references/timer.d.ts +45 -46
- package/references/uniapp.d.ts +51 -9
- package/references/url.d.ts +55 -160
- package/references/vue.d.ts +86 -113
- package/references/webassembly.d.ts +101 -127
- package/references/wechat.d.ts +48 -48
- package/references/worker.d.ts +152 -206
- package/references/xml.d.ts +88 -55
- package/types/altool.d.ts +49 -17
- package/types/android-build.d.ts +60 -85
- package/types/color.d.ts +72 -135
- package/types/geometry.d.ts +28 -63
- package/types/platform.d.ts +4 -0
- package/types/software.d.ts +15 -0
- package/types/storage.d.ts +50 -48
- package/types/uniapp-android-build.d.ts +49 -0
- package/types/vue.d.ts +30 -0
- package/types/worker.d.ts +178 -364
- package/dist/functions/ag-grid/generateLicense.d.ts +0 -4
- package/dist/functions/ag-grid/generateLicense.js +0 -12
- package/dist/functions/ag-grid/generateLicense.js.map +0 -1
- package/dist/functions/altool/createAltoolClient.d.ts +0 -21
- package/dist/functions/altool/createAltoolClient.js +0 -59
- package/dist/functions/altool/createAltoolClient.js.map +0 -1
- package/dist/functions/altool/getAppInfo.d.ts +0 -13
- package/dist/functions/altool/getAppInfo.js +0 -92
- package/dist/functions/altool/getAppInfo.js.map +0 -1
- package/dist/functions/altool/index.d.ts +0 -10
- package/dist/functions/altool/index.js +0 -6
- package/dist/functions/altool/index.js.map +0 -1
- package/dist/functions/altool/isApiKeyAuth.d.ts +0 -2
- package/dist/functions/altool/isApiKeyAuth.js +0 -4
- package/dist/functions/altool/isApiKeyAuth.js.map +0 -1
- package/dist/functions/altool/isCredentialsAuth.d.ts +0 -2
- package/dist/functions/altool/isCredentialsAuth.js +0 -4
- package/dist/functions/altool/isCredentialsAuth.js.map +0 -1
- package/dist/functions/altool/types.d.ts +0 -26
- package/dist/functions/altool/types.js +0 -7
- package/dist/functions/altool/types.js.map +0 -1
- package/dist/functions/altool/uploadApp.d.ts +0 -6
- package/dist/functions/altool/uploadApp.js +0 -36
- package/dist/functions/altool/uploadApp.js.map +0 -1
- package/dist/functions/altool/validateApp.d.ts +0 -17
- package/dist/functions/altool/validateApp.js +0 -59
- package/dist/functions/altool/validateApp.js.map +0 -1
- package/dist/functions/base64/strToBase64.d.ts +0 -2
- package/dist/functions/base64/strToBase64.js +0 -6
- package/dist/functions/base64/strToBase64.js.map +0 -1
- package/dist/functions/color-converter/COLOR_PATTERNS.d.ts +0 -2
- package/dist/functions/color-converter/COLOR_PATTERNS.js.map +0 -1
- package/dist/functions/color-converter/colorPatterns.d.ts +0 -4
- package/dist/functions/color-converter/colorPatterns.js +0 -41
- package/dist/functions/color-converter/colorPatterns.js.map +0 -1
- package/dist/functions/color-converter/convertColor.js +0 -238
- package/dist/functions/color-converter/convertColor.js.map +0 -1
- package/dist/functions/color-converter/detectColorFormat.d.ts +0 -2
- package/dist/functions/color-converter/detectColorFormat.js +0 -19
- package/dist/functions/color-converter/detectColorFormat.js.map +0 -1
- package/dist/functions/color-converter/extractColors.d.ts +0 -16
- package/dist/functions/color-converter/extractColors.js +0 -111
- package/dist/functions/color-converter/extractColors.js.map +0 -1
- package/dist/functions/color-converter/getColorPatterns.d.ts +0 -2
- package/dist/functions/color-converter/getColorPatterns.js +0 -11
- package/dist/functions/color-converter/getColorPatterns.js.map +0 -1
- package/dist/functions/color-converter/getNamedColorMap.d.ts +0 -2
- package/dist/functions/color-converter/getNamedColorMap.js +0 -19
- package/dist/functions/color-converter/getNamedColorMap.js.map +0 -1
- package/dist/functions/color-converter/hexToRgb.d.ts +0 -2
- package/dist/functions/color-converter/hexToRgb.js +0 -42
- package/dist/functions/color-converter/hexToRgb.js.map +0 -1
- package/dist/functions/color-converter/hslToRgb.d.ts +0 -2
- package/dist/functions/color-converter/hslToRgb.js +0 -78
- package/dist/functions/color-converter/hslToRgb.js.map +0 -1
- package/dist/functions/color-converter/hueToRgb.d.ts +0 -1
- package/dist/functions/color-converter/hueToRgb.js +0 -14
- package/dist/functions/color-converter/hueToRgb.js.map +0 -1
- package/dist/functions/color-converter/isColorValue.d.ts +0 -2
- package/dist/functions/color-converter/isColorValue.js +0 -79
- package/dist/functions/color-converter/isColorValue.js.map +0 -1
- package/dist/functions/color-converter/normalizeColor.d.ts +0 -1
- package/dist/functions/color-converter/normalizeColor.js +0 -49
- package/dist/functions/color-converter/normalizeColor.js.map +0 -1
- package/dist/functions/color-converter/parseColorString.d.ts +0 -15
- package/dist/functions/color-converter/parseColorString.js +0 -116
- package/dist/functions/color-converter/parseColorString.js.map +0 -1
- package/dist/functions/color-converter/rgbToHex.d.ts +0 -2
- package/dist/functions/color-converter/rgbToHex.js +0 -65
- package/dist/functions/color-converter/rgbToHex.js.map +0 -1
- package/dist/functions/color-converter/standardizeColor.d.ts +0 -1
- package/dist/functions/color-converter/standardizeColor.js +0 -147
- package/dist/functions/color-converter/standardizeColor.js.map +0 -1
- package/dist/functions/desensitize/desensitizeName.d.ts +0 -1
- package/dist/functions/desensitize/desensitizeName.js +0 -8
- package/dist/functions/desensitize/desensitizeName.js.map +0 -1
- package/dist/functions/desensitize/desensitizePhone.d.ts +0 -1
- package/dist/functions/desensitize/desensitizePhone.js +0 -8
- package/dist/functions/desensitize/desensitizePhone.js.map +0 -1
- package/dist/functions/dom/getViewportSize.d.ts +0 -5
- package/dist/functions/dom/getViewportSize.js +0 -7
- package/dist/functions/dom/getViewportSize.js.map +0 -1
- package/dist/functions/software/buildPathExecutables.d.ts +0 -1
- package/dist/functions/software/buildPathExecutables.js +0 -4
- package/dist/functions/software/buildPathExecutables.js.map +0 -1
- package/dist/functions/software/buildSoftwarePaths.d.ts +0 -2
- package/dist/functions/software/buildSoftwarePaths.js +0 -22
- package/dist/functions/software/buildSoftwarePaths.js.map +0 -1
- package/dist/functions/software/createConfigGenerator.d.ts +0 -8
- package/dist/functions/software/createConfigGenerator.js +0 -13
- package/dist/functions/software/createConfigGenerator.js.map +0 -1
- package/dist/functions/software/detectPlatform.d.ts +0 -2
- package/dist/functions/software/detectPlatform.js +0 -4
- package/dist/functions/software/detectPlatform.js.map +0 -1
- package/dist/functions/software/find.d.ts +0 -2
- package/dist/functions/software/find.js +0 -12
- package/dist/functions/software/find.js.map +0 -1
- package/dist/functions/software/findSoftwareWithGenerator.d.ts +0 -3
- package/dist/functions/software/findSoftwareWithGenerator.js +0 -8
- package/dist/functions/software/findSoftwareWithGenerator.js.map +0 -1
- package/dist/functions/software/getConfigGenerator.d.ts +0 -2
- package/dist/functions/software/getConfigGenerator.js +0 -10
- package/dist/functions/software/getConfigGenerator.js.map +0 -1
- package/dist/functions/software/getEnvironmentSoftwarePath.d.ts +0 -1
- package/dist/functions/software/getEnvironmentSoftwarePath.js +0 -4
- package/dist/functions/software/getEnvironmentSoftwarePath.js.map +0 -1
- package/dist/functions/software/getSupportedSoftware.d.ts +0 -1
- package/dist/functions/software/getSupportedSoftware.js +0 -5
- package/dist/functions/software/getSupportedSoftware.js.map +0 -1
- package/dist/functions/software/parseEnvironmentPaths.d.ts +0 -1
- package/dist/functions/software/parseEnvironmentPaths.js +0 -7
- package/dist/functions/software/parseEnvironmentPaths.js.map +0 -1
- package/dist/functions/software/softwareConfigs.d.ts +0 -2
- package/dist/functions/software/softwareConfigs.js +0 -148
- package/dist/functions/software/softwareConfigs.js.map +0 -1
- package/dist/functions/software/softwareNameMap.d.ts +0 -1
- package/dist/functions/software/softwareNameMap.js +0 -9
- package/dist/functions/software/softwareNameMap.js.map +0 -1
- package/dist/functions/software/types.d.ts +0 -11
- package/dist/functions/software/types.js +0 -2
- package/dist/functions/software/types.js.map +0 -1
- package/dist/functions/string/camelCase.d.ts +0 -1
- package/dist/functions/string/camelCase.js +0 -8
- package/dist/functions/string/camelCase.js.map +0 -1
- package/dist/functions/string/capitalize.d.ts +0 -1
- package/dist/functions/string/capitalize.js +0 -6
- package/dist/functions/string/capitalize.js.map +0 -1
- package/dist/functions/string/escape.d.ts +0 -1
- package/dist/functions/string/escape.js +0 -13
- package/dist/functions/string/escape.js.map +0 -1
- package/dist/functions/string/kebabCase.d.ts +0 -1
- package/dist/functions/string/kebabCase.js +0 -10
- package/dist/functions/string/kebabCase.js.map +0 -1
- package/dist/functions/string/levenshtein.d.ts +0 -1
- package/dist/functions/string/levenshtein.js +0 -27
- package/dist/functions/string/levenshtein.js.map +0 -1
- package/dist/functions/string/mask.d.ts +0 -1
- package/dist/functions/string/mask.js +0 -40
- package/dist/functions/string/mask.js.map +0 -1
- package/dist/functions/string/normalize.d.ts +0 -8
- package/dist/functions/string/normalize.js +0 -37
- package/dist/functions/string/normalize.js.map +0 -1
- package/dist/functions/string/padEnd.d.ts +0 -1
- package/dist/functions/string/padEnd.js +0 -8
- package/dist/functions/string/padEnd.js.map +0 -1
- package/dist/functions/string/padStart.d.ts +0 -1
- package/dist/functions/string/padStart.js +0 -8
- package/dist/functions/string/padStart.js.map +0 -1
- package/dist/functions/string/palindrome.d.ts +0 -3
- package/dist/functions/string/palindrome.js +0 -15
- package/dist/functions/string/palindrome.js.map +0 -1
- package/dist/functions/string/pascalCase.d.ts +0 -1
- package/dist/functions/string/pascalCase.js +0 -8
- package/dist/functions/string/pascalCase.js.map +0 -1
- package/dist/functions/string/similarity.d.ts +0 -1
- package/dist/functions/string/similarity.js +0 -38
- package/dist/functions/string/similarity.js.map +0 -1
- package/dist/functions/string/snakeCase.d.ts +0 -1
- package/dist/functions/string/snakeCase.js +0 -10
- package/dist/functions/string/snakeCase.js.map +0 -1
- package/dist/functions/string/template.d.ts +0 -4
- package/dist/functions/string/template.js +0 -21
- package/dist/functions/string/template.js.map +0 -1
- package/dist/functions/string/unescape.d.ts +0 -1
- package/dist/functions/string/unescape.js +0 -13
- package/dist/functions/string/unescape.js.map +0 -1
- package/dist/functions/string/wordCount.d.ts +0 -5
- package/dist/functions/string/wordCount.js +0 -11
- package/dist/functions/string/wordCount.js.map +0 -1
- package/dist/functions/tencent-cloud/getSecret.d.ts +0 -7
- package/dist/functions/tencent-cloud/getSecret.js +0 -19
- package/dist/functions/tencent-cloud/getSecret.js.map +0 -1
- package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.d.ts +0 -13
- package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.js +0 -175
- package/dist/functions/uniapp/app-plus/androidProjectConfigSteps.js.map +0 -1
- package/dist/functions/uniapp/app-plus/androidProjectStrategy.d.ts +0 -33
- package/dist/functions/uniapp/app-plus/androidProjectStrategy.js +0 -60
- package/dist/functions/uniapp/app-plus/androidProjectStrategy.js.map +0 -1
- package/dist/functions/uniapp/app-plus/buildAndroidProject.d.ts +0 -3
- package/dist/functions/uniapp/app-plus/buildAndroidProject.js +0 -60
- package/dist/functions/uniapp/app-plus/buildAndroidProject.js.map +0 -1
- package/dist/functions/uniapp/app-plus/configureAndroidManifest.d.ts +0 -5
- package/dist/functions/uniapp/app-plus/configureAndroidManifest.js +0 -51
- package/dist/functions/uniapp/app-plus/configureAndroidManifest.js.map +0 -1
- package/dist/functions/uniapp/app-plus/configureAndroidProject.d.ts +0 -3
- package/dist/functions/uniapp/app-plus/configureAndroidProject.js +0 -63
- package/dist/functions/uniapp/app-plus/configureAndroidProject.js.map +0 -1
- package/dist/functions/uniapp/app-plus/configureBuildGradle.d.ts +0 -9
- package/dist/functions/uniapp/app-plus/configureBuildGradle.js +0 -57
- package/dist/functions/uniapp/app-plus/configureBuildGradle.js.map +0 -1
- package/dist/functions/uniapp/app-plus/configureDcloudControl.d.ts +0 -5
- package/dist/functions/uniapp/app-plus/configureDcloudControl.js +0 -34
- package/dist/functions/uniapp/app-plus/configureDcloudControl.js.map +0 -1
- package/dist/functions/uniapp/app-plus/configureStrings.d.ts +0 -5
- package/dist/functions/uniapp/app-plus/configureStrings.js +0 -42
- package/dist/functions/uniapp/app-plus/configureStrings.js.map +0 -1
- package/dist/functions/uniapp/app-plus/copyAppResources.d.ts +0 -8
- package/dist/functions/uniapp/app-plus/copyAppResources.js +0 -25
- package/dist/functions/uniapp/app-plus/copyAppResources.js.map +0 -1
- package/dist/functions/uniapp/app-plus/copyDirectory.d.ts +0 -2
- package/dist/functions/uniapp/app-plus/copyDirectory.js +0 -18
- package/dist/functions/uniapp/app-plus/copyDirectory.js.map +0 -1
- package/dist/functions/uniapp/app-plus/generateUniAppResources.d.ts +0 -2
- package/dist/functions/uniapp/app-plus/generateUniAppResources.js +0 -35
- package/dist/functions/uniapp/app-plus/generateUniAppResources.js.map +0 -1
- package/dist/functions/uniapp/app-plus/parseManifest.d.ts +0 -14
- package/dist/functions/uniapp/app-plus/parseManifest.js.map +0 -1
- package/dist/functions/uniapp/app-plus/validateOptions.d.ts +0 -3
- package/dist/functions/uniapp/app-plus/validateOptions.js +0 -10
- package/dist/functions/uniapp/app-plus/validateOptions.js.map +0 -1
- package/dist/functions/uniapp/waitForPages.d.ts +0 -2
- package/dist/functions/uniapp/waitForPages.js +0 -19
- package/dist/functions/uniapp/waitForPages.js.map +0 -1
- package/dist/functions/utils/compose.d.ts +0 -1
- package/dist/functions/utils/compose.js +0 -10
- package/dist/functions/utils/compose.js.map +0 -1
- package/dist/functions/utils/cond.d.ts +0 -1
- package/dist/functions/utils/cond.js +0 -15
- package/dist/functions/utils/cond.js.map +0 -1
- package/dist/functions/utils/curry.d.ts +0 -1
- package/dist/functions/utils/curry.js +0 -13
- package/dist/functions/utils/curry.js.map +0 -1
- package/dist/functions/utils/debounce.d.ts +0 -1
- package/dist/functions/utils/debounce.js +0 -13
- package/dist/functions/utils/debounce.js.map +0 -1
- package/dist/functions/utils/evolve.d.ts +0 -3
- package/dist/functions/utils/evolve.js +0 -15
- package/dist/functions/utils/evolve.js.map +0 -1
- package/dist/functions/utils/flow.d.ts +0 -1
- package/dist/functions/utils/flow.js +0 -10
- package/dist/functions/utils/flow.js.map +0 -1
- package/dist/functions/utils/isType.d.ts +0 -11
- package/dist/functions/utils/isType.js +0 -30
- package/dist/functions/utils/isType.js.map +0 -1
- package/dist/functions/utils/memoize.d.ts +0 -1
- package/dist/functions/utils/memoize.js +0 -13
- package/dist/functions/utils/memoize.js.map +0 -1
- package/dist/functions/utils/once.d.ts +0 -1
- package/dist/functions/utils/once.js +0 -13
- package/dist/functions/utils/once.js.map +0 -1
- package/dist/functions/utils/partial.d.ts +0 -1
- package/dist/functions/utils/partial.js +0 -13
- package/dist/functions/utils/partial.js.map +0 -1
- package/dist/functions/utils/pipe.d.ts +0 -1
- package/dist/functions/utils/pipe.js +0 -10
- package/dist/functions/utils/pipe.js.map +0 -1
- package/dist/functions/utils/retryWithBackoff.d.ts +0 -9
- package/dist/functions/utils/retryWithBackoff.js +0 -30
- package/dist/functions/utils/retryWithBackoff.js.map +0 -1
- package/dist/functions/utils/tap.d.ts +0 -1
- package/dist/functions/utils/tap.js +0 -14
- package/dist/functions/utils/tap.js.map +0 -1
- package/dist/functions/utils/throttle.d.ts +0 -1
- package/dist/functions/utils/throttle.js +0 -11
- package/dist/functions/utils/throttle.js.map +0 -1
- package/dist/functions/utils/until.d.ts +0 -1
- package/dist/functions/utils/until.js +0 -10
- package/dist/functions/utils/until.js.map +0 -1
- package/dist/functions/utils/validate.d.ts +0 -8
- package/dist/functions/utils/validate.js +0 -45
- package/dist/functions/utils/validate.js.map +0 -1
- package/dist/functions/vue/dynamicMount.d.ts +0 -15
- package/dist/functions/vue/dynamicMount.js +0 -23
- package/dist/functions/vue/dynamicMount.js.map +0 -1
- package/dist/functions/vue/isVNode.d.ts +0 -2
- package/dist/functions/vue/isVNode.js +0 -4
- package/dist/functions/vue/isVNode.js.map +0 -1
- package/dist/functions/vue/isVueComponent.d.ts +0 -2
- package/dist/functions/vue/isVueComponent.js +0 -6
- package/dist/functions/vue/isVueComponent.js.map +0 -1
- package/dist/functions/vue/processVueFile.d.ts +0 -20
- package/dist/functions/vue/processVueFile.js +0 -98
- package/dist/functions/vue/processVueFile.js.map +0 -1
- package/dist/functions/wechat/miniapp/downloadFile.d.ts +0 -2
- package/dist/functions/wechat/miniapp/downloadFile.js +0 -39
- package/dist/functions/wechat/miniapp/downloadFile.js.map +0 -1
- package/dist/hooks/useAi.d.ts +0 -27
- package/dist/hooks/useAi.js +0 -163
- package/dist/hooks/useAi.js.map +0 -1
- package/dist/hooks/useCache.d.ts +0 -18
- package/dist/hooks/useCache.js +0 -82
- package/dist/hooks/useCache.js.map +0 -1
- package/dist/hooks/useFetch.d.ts +0 -3
- package/dist/hooks/useFetch.js +0 -154
- package/dist/hooks/useFetch.js.map +0 -1
- package/dist/hooks/usePluginSystem.d.ts +0 -11
- package/dist/hooks/usePluginSystem.js +0 -34
- package/dist/hooks/usePluginSystem.js.map +0 -1
- package/dist/hooks/useRequest.d.ts +0 -3
- package/dist/hooks/useRequest.js +0 -139
- package/dist/hooks/useRequest.js.map +0 -1
- package/dist/hooks/useWASM.d.ts +0 -4
- package/dist/hooks/useWASM.js +0 -267
- package/dist/hooks/useWASM.js.map +0 -1
- package/references/browser.extension.d.ts +0 -14
- package/types/network.d.ts +0 -184
- package/types/util.d.ts +0 -27
- package/types/wasm.d.ts +0 -217
package/references/node.d.ts
CHANGED
|
@@ -1,111 +1,116 @@
|
|
|
1
|
-
// Node.js
|
|
2
|
-
|
|
3
|
-
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
export
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
1
|
+
// Node.js 环境类型声明 - 统一的Global接口
|
|
2
|
+
import type { Console } from './console.d'
|
|
3
|
+
import type { TextDecoderConstructor, TextEncoderConstructor } from './encoding.d'
|
|
4
|
+
import type { ArrayBufferConstructor, Uint8ArrayConstructor, DataViewConstructor } from './arraybuffer.d'
|
|
5
|
+
|
|
6
|
+
// 基础类型定义
|
|
7
|
+
export interface ReadableStream {
|
|
8
|
+
// ReadableStream 基本接口
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface WritableStream {
|
|
12
|
+
// WritableStream 基本接口
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface Process {
|
|
16
|
+
env: Record<string, string | undefined>
|
|
17
|
+
argv: string[]
|
|
18
|
+
platform: string
|
|
19
|
+
cwd(): string
|
|
20
|
+
exit(code?: number): never
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface Buffer {
|
|
24
|
+
length: number
|
|
25
|
+
toString(encoding?: string): string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface FileSystem {
|
|
29
|
+
readFile(path: string, encoding?: string): Promise<any>
|
|
30
|
+
readFileSync(path: string, encoding?: string): string
|
|
31
|
+
writeFile(path: string, data: any): Promise<void>
|
|
32
|
+
writeFileSync(path: string, data: any, encoding?: string): void
|
|
33
|
+
mkdir(path: string, options?: any): Promise<void>
|
|
34
|
+
mkdirSync(path: string, options?: any): void
|
|
35
|
+
copyFileSync(src: string, dest: string): void
|
|
36
|
+
existsSync(path: string): boolean
|
|
37
|
+
readdirSync(path: string): string[]
|
|
38
|
+
promises: {
|
|
39
|
+
cp(source: string, destination: string, options?: any): Promise<void>
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface Path {
|
|
44
|
+
join(...paths: string[]): string
|
|
45
|
+
resolve(...paths: string[]): string
|
|
46
|
+
dirname(path: string): string
|
|
47
|
+
basename(path: string, ext?: string): string
|
|
48
|
+
extname(path: string): string
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface ChildProcess {
|
|
52
|
+
exec(command: string, callback?: (error: any, stdout: string, stderr: string) => void): any
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface Util {
|
|
56
|
+
promisify<T extends (...args: any[]) => any>(fn: T): (...args: Parameters<T>) => Promise<any>
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface BufferConstructor {
|
|
60
|
+
from(str: string, encoding?: string): Buffer
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface Timeout {
|
|
64
|
+
ref(): this
|
|
65
|
+
unref(): this
|
|
66
|
+
hasRef(): boolean
|
|
67
|
+
refresh(): this
|
|
68
|
+
[Symbol.toPrimitive](): number
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface Immediate {
|
|
72
|
+
ref(): this
|
|
73
|
+
unref(): this
|
|
74
|
+
hasRef(): boolean
|
|
75
|
+
_onImmediate: Function
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Node.js Global对象 - 包含所有Node.js API
|
|
79
|
+
export interface Global {
|
|
80
|
+
// 进程对象
|
|
81
|
+
process: Process
|
|
82
|
+
|
|
83
|
+
// 控制台
|
|
84
|
+
console: Console
|
|
85
|
+
|
|
86
|
+
// Buffer API
|
|
87
|
+
Buffer: BufferConstructor
|
|
88
|
+
|
|
89
|
+
// 编码API
|
|
90
|
+
TextDecoder: TextDecoderConstructor
|
|
91
|
+
TextEncoder: TextEncoderConstructor
|
|
92
|
+
|
|
93
|
+
// 定时器API
|
|
94
|
+
setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): Timeout
|
|
95
|
+
clearTimeout(timeoutId: Timeout): void
|
|
96
|
+
setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): Timeout
|
|
97
|
+
clearInterval(intervalId: Timeout): void
|
|
98
|
+
setImmediate(callback: (...args: any[]) => void, ...args: any[]): Immediate
|
|
99
|
+
clearImmediate(immediateId: Immediate): void
|
|
100
|
+
|
|
101
|
+
// 类型化数组
|
|
102
|
+
ArrayBuffer: ArrayBufferConstructor
|
|
103
|
+
Uint8Array: Uint8ArrayConstructor
|
|
104
|
+
DataView: DataViewConstructor
|
|
105
|
+
|
|
106
|
+
// 全局变量
|
|
107
|
+
__dirname?: string
|
|
108
|
+
__filename?: string
|
|
109
|
+
|
|
110
|
+
// 开发环境标识
|
|
111
|
+
__DEV__?: boolean
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// 定时器函数
|
|
115
|
+
export declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): Immediate
|
|
116
|
+
export declare function clearImmediate(immediateId: Immediate): void
|
package/references/sharp.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import type { NodeBuffer } from './node.d'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Sharp 图像处理库的类型定义
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export interface SharpInstance {
|
|
8
|
-
metadata(): Promise<{ width?: number; height?: number }>;
|
|
9
|
-
resize(width: number, height: number): SharpInstance;
|
|
10
|
-
composite(images: Array<{ input: NodeBuffer; top: number; left: number; blend?: string }>): SharpInstance;
|
|
11
|
-
extend(options: { top: number; bottom: number; left: number; right: number; background: { r: number; g: number; b: number; alpha: number } }): SharpInstance;
|
|
12
|
-
flatten(options?: { background?: string | { r: number; g: number; b: number } }): SharpInstance;
|
|
13
|
-
negate(options?: boolean): SharpInstance;
|
|
14
|
-
toBuffer(): Promise<NodeBuffer>;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface Sharp {
|
|
18
|
-
(input: NodeBuffer): SharpInstance;
|
|
1
|
+
import type { NodeBuffer } from './node.d'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sharp 图像处理库的类型定义
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export interface SharpInstance {
|
|
8
|
+
metadata(): Promise<{ width?: number; height?: number }>;
|
|
9
|
+
resize(width: number, height: number): SharpInstance;
|
|
10
|
+
composite(images: Array<{ input: NodeBuffer; top: number; left: number; blend?: string }>): SharpInstance;
|
|
11
|
+
extend(options: { top: number; bottom: number; left: number; right: number; background: { r: number; g: number; b: number; alpha: number } }): SharpInstance;
|
|
12
|
+
flatten(options?: { background?: string | { r: number; g: number; b: number } }): SharpInstance;
|
|
13
|
+
negate(options?: boolean): SharpInstance;
|
|
14
|
+
toBuffer(): Promise<NodeBuffer>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface Sharp {
|
|
18
|
+
(input: NodeBuffer): SharpInstance;
|
|
19
19
|
}
|
package/references/storage.d.ts
CHANGED
|
@@ -1,112 +1,18 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 存储环境类型定义
|
|
3
|
-
* 包含浏览器和其他环境的存储 API 类型支持
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 基础存储接口
|
|
8
|
-
* 对应浏览器的 localStorage 和 sessionStorage API
|
|
9
|
-
*/
|
|
10
|
-
export interface
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* IndexedDB 工厂接口
|
|
19
|
-
* 已在 browser.d.ts 中定义,这里重新导出以保持一致性
|
|
20
|
-
*/
|
|
21
|
-
export interface IDBFactory {
|
|
22
|
-
open(name: string, version?: number): IDBOpenDBRequest
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* IndexedDB 请求接口
|
|
27
|
-
*/
|
|
28
|
-
export interface IDBOpenDBRequest extends EventTarget {
|
|
29
|
-
result: IDBDatabase
|
|
30
|
-
error: DOMException | null
|
|
31
|
-
onsuccess: ((event: Event) => void) | null
|
|
32
|
-
onerror: ((event: Event) => void) | null
|
|
33
|
-
onupgradeneeded: ((event: IDBVersionChangeEvent) => void) | null
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* IndexedDB 数据库接口
|
|
38
|
-
*/
|
|
39
|
-
export interface IDBDatabase {
|
|
40
|
-
objectStoreNames: DOMStringList
|
|
41
|
-
createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore
|
|
42
|
-
transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* IndexedDB 对象存储接口
|
|
47
|
-
*/
|
|
48
|
-
export interface IDBObjectStore {
|
|
49
|
-
get(key: IDBValidKey): IDBRequest
|
|
50
|
-
put(value: any, key?: IDBValidKey): IDBRequest
|
|
51
|
-
delete(key: IDBValidKey): IDBRequest
|
|
52
|
-
clear(): IDBRequest
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* IndexedDB 事务接口
|
|
57
|
-
*/
|
|
58
|
-
export interface IDBTransaction {
|
|
59
|
-
objectStore(name: string): IDBObjectStore
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* IndexedDB 请求接口
|
|
64
|
-
*/
|
|
65
|
-
export interface IDBRequest {
|
|
66
|
-
result: any
|
|
67
|
-
error: DOMException | null
|
|
68
|
-
onsuccess: ((event: Event) => void) | null
|
|
69
|
-
onerror: ((event: Event) => void) | null
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* IndexedDB 版本变更事件接口
|
|
74
|
-
*/
|
|
75
|
-
export interface IDBVersionChangeEvent extends Event {
|
|
76
|
-
target: IDBOpenDBRequest
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* DOM 字符串列表接口
|
|
81
|
-
*/
|
|
82
|
-
export interface DOMStringList {
|
|
83
|
-
contains(string: string): boolean
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* IndexedDB 有效键类型
|
|
88
|
-
*/
|
|
89
|
-
export type IDBValidKey = string | number | Date | ArrayBuffer | IDBValidKey[]
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* IndexedDB 事务模式类型
|
|
93
|
-
*/
|
|
94
|
-
export type IDBTransactionMode = 'readonly' | 'readwrite' | 'versionchange'
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* IndexedDB 对象存储参数接口
|
|
98
|
-
*/
|
|
99
|
-
export interface IDBObjectStoreParameters {
|
|
100
|
-
keyPath?: string | string[]
|
|
101
|
-
autoIncrement?: boolean
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* 存储环境接口
|
|
106
|
-
* 包含所有存储相关的环境 API
|
|
107
|
-
*/
|
|
108
|
-
export interface StorageEnvironment {
|
|
109
|
-
localStorage?: StorageInterface
|
|
110
|
-
sessionStorage?: StorageInterface
|
|
111
|
-
indexedDB?: IDBFactory
|
|
1
|
+
/**
|
|
2
|
+
* 存储环境类型定义
|
|
3
|
+
* 包含浏览器和其他环境的存储 API 类型支持
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 基础存储接口
|
|
8
|
+
* 对应浏览器的 localStorage 和 sessionStorage API
|
|
9
|
+
*/
|
|
10
|
+
export interface Storage {
|
|
11
|
+
readonly length: number
|
|
12
|
+
clear(): void
|
|
13
|
+
getItem(key: string): string | null
|
|
14
|
+
key(index: number): string | null
|
|
15
|
+
removeItem(key: string): void
|
|
16
|
+
setItem(key: string, value: string): void
|
|
17
|
+
[name: string]: any
|
|
112
18
|
}
|
package/references/timer.d.ts
CHANGED
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 定时器 API 类型定义
|
|
3
|
-
* 包含浏览器和 Node.js 环境都支持的定时器相关 API
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 设置定时器
|
|
8
|
-
* @param callback 回调函数
|
|
9
|
-
* @param ms 延迟时间(毫秒)
|
|
10
|
-
* @param args 传递给回调函数的参数
|
|
11
|
-
* @returns 定时器 ID
|
|
12
|
-
*/
|
|
13
|
-
export declare const setTimeout: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => any
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* 清除定时器
|
|
17
|
-
* @param timeoutId 定时器 ID
|
|
18
|
-
*/
|
|
19
|
-
export declare const clearTimeout: (timeoutId: any) => void
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* 设置间隔定时器
|
|
23
|
-
* @param callback 回调函数
|
|
24
|
-
* @param ms 间隔时间(毫秒)
|
|
25
|
-
* @param args 传递给回调函数的参数
|
|
26
|
-
* @returns 间隔定时器 ID
|
|
27
|
-
*/
|
|
28
|
-
export declare const setInterval: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => any
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* 清除间隔定时器
|
|
32
|
-
* @param intervalId 间隔定时器 ID
|
|
33
|
-
*/
|
|
34
|
-
export declare const clearInterval: (intervalId: any) => void
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// 定时器函数已在上面导出
|
|
1
|
+
/**
|
|
2
|
+
* 定时器 API 类型定义
|
|
3
|
+
* 包含浏览器和 Node.js 环境都支持的定时器相关 API
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 设置定时器
|
|
8
|
+
* @param callback 回调函数
|
|
9
|
+
* @param ms 延迟时间(毫秒)
|
|
10
|
+
* @param args 传递给回调函数的参数
|
|
11
|
+
* @returns 定时器 ID
|
|
12
|
+
*/
|
|
13
|
+
export declare const setTimeout: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => any
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* 清除定时器
|
|
17
|
+
* @param timeoutId 定时器 ID
|
|
18
|
+
*/
|
|
19
|
+
export declare const clearTimeout: (timeoutId: any) => void
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 设置间隔定时器
|
|
23
|
+
* @param callback 回调函数
|
|
24
|
+
* @param ms 间隔时间(毫秒)
|
|
25
|
+
* @param args 传递给回调函数的参数
|
|
26
|
+
* @returns 间隔定时器 ID
|
|
27
|
+
*/
|
|
28
|
+
export declare const setInterval: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => any
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 清除间隔定时器
|
|
32
|
+
* @param intervalId 间隔定时器 ID
|
|
33
|
+
*/
|
|
34
|
+
export declare const clearInterval: (intervalId: any) => void
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* 定时器环境接口
|
|
38
|
+
* 包含所有定时器相关的 API
|
|
39
|
+
*/
|
|
40
|
+
export interface Timer {
|
|
41
|
+
setTimeout: typeof setTimeout
|
|
42
|
+
clearTimeout: typeof clearTimeout
|
|
43
|
+
setInterval: typeof setInterval
|
|
44
|
+
clearInterval: typeof clearInterval
|
|
45
|
+
}
|
package/references/uniapp.d.ts
CHANGED
|
@@ -1,9 +1,51 @@
|
|
|
1
|
-
// UniApp 环境类型声明
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
// UniApp 环境类型声明
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* UniApp 页面实例接口
|
|
5
|
+
*/
|
|
6
|
+
export interface UniPage {
|
|
7
|
+
route: string
|
|
8
|
+
options: Record<string, any>
|
|
9
|
+
$vm: any
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* UniApp 全局对象
|
|
14
|
+
* 定义 UniApp 框架的完整能力
|
|
15
|
+
*/
|
|
16
|
+
export interface UniApp {
|
|
17
|
+
// 页面管理
|
|
18
|
+
getCurrentPages(): any[]
|
|
19
|
+
|
|
20
|
+
// 路由导航
|
|
21
|
+
navigateTo(options: { url: string; success?: () => void; fail?: () => void }): void
|
|
22
|
+
redirectTo(options: { url: string; success?: () => void; fail?: () => void }): void
|
|
23
|
+
switchTab(options: { url: string; success?: () => void; fail?: () => void }): void
|
|
24
|
+
navigateBack(options?: { delta?: number; success?: () => void; fail?: () => void }): void
|
|
25
|
+
reLaunch(options: { url: string; success?: () => void; fail?: () => void }): void
|
|
26
|
+
|
|
27
|
+
// UI 交互
|
|
28
|
+
showToast(options: { title: string; icon?: 'success' | 'loading' | 'none'; duration?: number }): void
|
|
29
|
+
hideToast(): void
|
|
30
|
+
showModal(options: { title?: string; content: string; showCancel?: boolean; success?: (res: { confirm: boolean; cancel: boolean }) => void }): void
|
|
31
|
+
showActionSheet(options: { itemList: string[]; success?: (res: { tapIndex: number }) => void }): void
|
|
32
|
+
|
|
33
|
+
// 系统信息
|
|
34
|
+
getSystemInfo(options: { success?: (res: any) => void; fail?: () => void }): void
|
|
35
|
+
|
|
36
|
+
// 本地存储
|
|
37
|
+
getStorageSync(key: string): any
|
|
38
|
+
setStorageSync(key: string, data: any): void
|
|
39
|
+
removeStorageSync(key: string): void
|
|
40
|
+
clearStorageSync(): void
|
|
41
|
+
|
|
42
|
+
// 网络请求
|
|
43
|
+
request(options: {
|
|
44
|
+
url: string
|
|
45
|
+
method?: 'GET' | 'POST' | 'PUT' | 'DELETE'
|
|
46
|
+
data?: any
|
|
47
|
+
header?: Record<string, string>
|
|
48
|
+
success?: (res: any) => void
|
|
49
|
+
fail?: () => void
|
|
50
|
+
}): void
|
|
51
|
+
}
|