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/browser.d.ts
CHANGED
|
@@ -1,175 +1,70 @@
|
|
|
1
|
-
// 浏览器环境类型声明
|
|
2
|
-
import type {
|
|
3
|
-
import type { AbortController, Response } from './fetch.d'
|
|
4
|
-
import type { URLSearchParams } from './url.d'
|
|
5
|
-
import type {
|
|
6
|
-
import type { WorkerConstructor } from './worker.d'
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore
|
|
71
|
-
transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface IDBObjectStore {
|
|
75
|
-
get(key: IDBValidKey): IDBRequest
|
|
76
|
-
put(value: any, key?: IDBValidKey): IDBRequest
|
|
77
|
-
delete(key: IDBValidKey): IDBRequest
|
|
78
|
-
clear(): IDBRequest
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
export interface IDBTransaction {
|
|
82
|
-
objectStore(name: string): IDBObjectStore
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface IDBRequest {
|
|
86
|
-
result: any
|
|
87
|
-
error: DOMException | null
|
|
88
|
-
onsuccess: ((event: Event) => void) | null
|
|
89
|
-
onerror: ((event: Event) => void) | null
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export interface IDBVersionChangeEvent extends Event {
|
|
93
|
-
target: IDBOpenDBRequest
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export interface DOMStringList {
|
|
97
|
-
contains(string: string): boolean
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
export type IDBValidKey = string | number | Date | ArrayBuffer | IDBValidKey[]
|
|
101
|
-
export type IDBTransactionMode = 'readonly' | 'readwrite' | 'versionchange'
|
|
102
|
-
export interface IDBObjectStoreParameters {
|
|
103
|
-
keyPath?: string | string[]
|
|
104
|
-
autoIncrement?: boolean
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// Blob 相关类型
|
|
108
|
-
export type BlobPart = BufferSource | Blob | string
|
|
109
|
-
export interface BlobPropertyBag {
|
|
110
|
-
type?: string
|
|
111
|
-
endings?: 'transparent' | 'native'
|
|
112
|
-
}
|
|
113
|
-
export interface Blob {
|
|
114
|
-
readonly size: number
|
|
115
|
-
readonly type: string
|
|
116
|
-
arrayBuffer(): Promise<ArrayBuffer>
|
|
117
|
-
slice(start?: number, end?: number, contentType?: string): Blob
|
|
118
|
-
stream(): ReadableStream<Uint8Array>
|
|
119
|
-
text(): Promise<string>
|
|
120
|
-
}
|
|
121
|
-
export interface MediaSource {
|
|
122
|
-
// MediaSource 的基本定义
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// Fetch API 类型别名(使用标准 Response 接口)
|
|
126
|
-
export type FetchResponse = Response
|
|
127
|
-
export type FetchAPI = typeof fetch
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
export interface ReadableStreamReader<T> {
|
|
132
|
-
read(): Promise<{ done: boolean; value: T }>
|
|
133
|
-
releaseLock(): void
|
|
134
|
-
cancel(reason?: any): Promise<void>
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export interface ReadableStream<T> {
|
|
138
|
-
getReader(): ReadableStreamReader<T>
|
|
139
|
-
cancel(reason?: any): Promise<void>
|
|
140
|
-
locked: boolean
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export interface TextDecoder {
|
|
144
|
-
decode(input?: BufferSource, options?: { stream?: boolean }): string
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export interface TextDecoderConstructor {
|
|
148
|
-
new (label?: string, options?: { fatal?: boolean; ignoreBOM?: boolean }): TextDecoder
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
// 浏览器环境接口
|
|
152
|
-
export interface BrowserEnvironment {
|
|
153
|
-
window: {
|
|
154
|
-
location: {
|
|
155
|
-
search: string
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
__DEV__?: boolean
|
|
159
|
-
localStorage?: StorageInterface
|
|
160
|
-
sessionStorage?: StorageInterface
|
|
161
|
-
indexedDB?: IDBFactory
|
|
162
|
-
fetch: FetchAPI
|
|
163
|
-
AbortController: typeof AbortController
|
|
164
|
-
TextDecoder: TextDecoderConstructor
|
|
165
|
-
Worker?: WorkerConstructor
|
|
166
|
-
console: ConsoleInterface
|
|
167
|
-
URLSearchParams: typeof URLSearchParams
|
|
168
|
-
Blob: {
|
|
169
|
-
new (blobParts?: BlobPart[], options?: BlobPropertyBag): Blob
|
|
170
|
-
}
|
|
171
|
-
URL: {
|
|
172
|
-
createObjectURL(object: Blob | MediaSource): string
|
|
173
|
-
revokeObjectURL(url: string): void
|
|
174
|
-
}
|
|
1
|
+
// 浏览器环境类型声明 - 统一的Window接口
|
|
2
|
+
import type { Console } from './console.d'
|
|
3
|
+
import type { AbortController, Response, FetchFunction } from './fetch.d'
|
|
4
|
+
import type { URLSearchParams } from './url.d'
|
|
5
|
+
import type { Storage } from './storage.d'
|
|
6
|
+
import type { WorkerConstructor } from './worker.d'
|
|
7
|
+
import type { Document, HTMLElement, Element } from './dom.d'
|
|
8
|
+
import type { IDBFactory } from './indexeddb.d'
|
|
9
|
+
import type { Blob, BlobPart, BlobPropertyBag, MediaSource, ReadableStream } from './blob.d'
|
|
10
|
+
import type { TextDecoderConstructor, TextEncoderConstructor } from './encoding.d'
|
|
11
|
+
import type { Location } from './location.d'
|
|
12
|
+
import type { ArrayBufferConstructor, Uint8ArrayConstructor, DataViewConstructor } from './arraybuffer.d'
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// 浏览器Window对象 - 包含所有浏览器API
|
|
17
|
+
export interface Window {
|
|
18
|
+
// 窗口属性
|
|
19
|
+
innerWidth: number
|
|
20
|
+
innerHeight: number
|
|
21
|
+
|
|
22
|
+
// DOM
|
|
23
|
+
document: Document
|
|
24
|
+
|
|
25
|
+
// 位置信息
|
|
26
|
+
location: Location
|
|
27
|
+
|
|
28
|
+
// 存储API
|
|
29
|
+
localStorage: Storage
|
|
30
|
+
sessionStorage: Storage
|
|
31
|
+
indexedDB: IDBFactory
|
|
32
|
+
|
|
33
|
+
// 网络API
|
|
34
|
+
fetch: FetchFunction
|
|
35
|
+
AbortController: typeof AbortController
|
|
36
|
+
|
|
37
|
+
// 编码API
|
|
38
|
+
TextDecoder: TextDecoderConstructor
|
|
39
|
+
TextEncoder: TextEncoderConstructor
|
|
40
|
+
btoa(data: string): string
|
|
41
|
+
atob(data: string): string
|
|
42
|
+
|
|
43
|
+
// Worker API
|
|
44
|
+
Worker?: WorkerConstructor
|
|
45
|
+
|
|
46
|
+
// 控制台
|
|
47
|
+
console: Console
|
|
48
|
+
|
|
49
|
+
// URL API
|
|
50
|
+
URLSearchParams: typeof URLSearchParams
|
|
51
|
+
URL: {
|
|
52
|
+
createObjectURL(object: Blob | MediaSource): string
|
|
53
|
+
revokeObjectURL(url: string): void
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// Blob API
|
|
57
|
+
Blob: {
|
|
58
|
+
new (blobParts?: BlobPart[], options?: BlobPropertyBag): Blob
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// ArrayBuffer API
|
|
62
|
+
ArrayBuffer: ArrayBufferConstructor
|
|
63
|
+
Uint8Array: Uint8ArrayConstructor
|
|
64
|
+
DataView: DataViewConstructor
|
|
65
|
+
|
|
66
|
+
// 开发环境标识
|
|
67
|
+
__DEV__?: boolean
|
|
68
|
+
|
|
69
|
+
|
|
175
70
|
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// Chrome Extension API 类型定义
|
|
2
|
+
|
|
3
|
+
export interface ChromeTab {
|
|
4
|
+
id?: number;
|
|
5
|
+
windowId?: number;
|
|
6
|
+
url?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
pinned?: boolean;
|
|
10
|
+
highlighted?: boolean;
|
|
11
|
+
incognito?: boolean;
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
discarded?: boolean;
|
|
14
|
+
autoDiscardable?: boolean;
|
|
15
|
+
mutedInfo?: {
|
|
16
|
+
muted: boolean;
|
|
17
|
+
reason?: string;
|
|
18
|
+
extensionId?: string;
|
|
19
|
+
};
|
|
20
|
+
favIconUrl?: string;
|
|
21
|
+
status?: 'loading' | 'complete';
|
|
22
|
+
width?: number;
|
|
23
|
+
height?: number;
|
|
24
|
+
sessionId?: string;
|
|
25
|
+
openerTabId?: number;
|
|
26
|
+
pendingUrl?: string;
|
|
27
|
+
groupId?: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type SenderType = 'content' | 'background' | 'popup' | 'sidepanel' | 'options';
|
|
31
|
+
|
|
32
|
+
export interface ChromeMessageSender {
|
|
33
|
+
type: SenderType;
|
|
34
|
+
tab?: ChromeTab;
|
|
35
|
+
id?: string;
|
|
36
|
+
url?: string;
|
|
37
|
+
frameId?: number;
|
|
38
|
+
origin?: string;
|
|
39
|
+
tlsChannelId?: string;
|
|
40
|
+
documentId?: string;
|
|
41
|
+
documentLifecycle?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ChromeRuntime {
|
|
45
|
+
sendMessage: (message: any, responseCallback?: (response: any) => void) => void;
|
|
46
|
+
onMessage: {
|
|
47
|
+
addListener: (callback: (message: any, sender: ChromeMessageSender, sendResponse: (response?: any) => void) => void | boolean) => void;
|
|
48
|
+
removeListener: (callback: Function) => void;
|
|
49
|
+
};
|
|
50
|
+
getURL: (path: string) => string;
|
|
51
|
+
id: string;
|
|
52
|
+
getManifest: () => any;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface ChromeTabs {
|
|
56
|
+
query: (queryInfo: Partial<ChromeTab>, callback: (tabs: ChromeTab[]) => void) => void;
|
|
57
|
+
get: (tabId: number, callback: (tab: ChromeTab) => void) => void;
|
|
58
|
+
create: (createProperties: Partial<ChromeTab>, callback?: (tab: ChromeTab) => void) => void;
|
|
59
|
+
update: (tabId: number, updateProperties: Partial<ChromeTab>, callback?: (tab: ChromeTab) => void) => void;
|
|
60
|
+
remove: (tabIds: number | number[], callback?: () => void) => void;
|
|
61
|
+
sendMessage: (tabId: number, message: any, options?: any, responseCallback?: (response: any) => void) => void;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface ChromeStorage {
|
|
65
|
+
local: {
|
|
66
|
+
get: (keys?: string | string[] | null, callback?: (items: { [key: string]: any }) => void) => void;
|
|
67
|
+
set: (items: { [key: string]: any }, callback?: () => void) => void;
|
|
68
|
+
remove: (keys: string | string[], callback?: () => void) => void;
|
|
69
|
+
clear: (callback?: () => void) => void;
|
|
70
|
+
};
|
|
71
|
+
sync: {
|
|
72
|
+
get: (keys?: string | string[] | null, callback?: (items: { [key: string]: any }) => void) => void;
|
|
73
|
+
set: (items: { [key: string]: any }, callback?: () => void) => void;
|
|
74
|
+
remove: (keys: string | string[], callback?: () => void) => void;
|
|
75
|
+
clear: (callback?: () => void) => void;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface Chrome {
|
|
80
|
+
runtime: ChromeRuntime;
|
|
81
|
+
tabs: ChromeTabs;
|
|
82
|
+
storage: ChromeStorage;
|
|
83
|
+
}
|
package/references/console.d.ts
CHANGED
|
@@ -1,164 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
* 输出警告信息
|
|
27
|
-
* @param message 消息内容
|
|
28
|
-
* @param optionalParams 可选参数
|
|
29
|
-
*/
|
|
30
|
-
warn(message?: any, ...optionalParams: any[]): void
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* 输出信息级别日志
|
|
34
|
-
* @param message 消息内容
|
|
35
|
-
* @param optionalParams 可选参数
|
|
36
|
-
*/
|
|
37
|
-
info(message?: any, ...optionalParams: any[]): void
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 输出调试信息
|
|
41
|
-
* @param message 消息内容
|
|
42
|
-
* @param optionalParams 可选参数
|
|
43
|
-
*/
|
|
44
|
-
debug(message?: any, ...optionalParams: any[]): void
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* 创建一个新的分组
|
|
48
|
-
* @param label 分组标签
|
|
49
|
-
*/
|
|
50
|
-
group(label?: string): void
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* 创建一个新的折叠分组
|
|
54
|
-
* @param label 分组标签
|
|
55
|
-
*/
|
|
56
|
-
groupCollapsed(label?: string): void
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* 结束当前分组
|
|
60
|
-
*/
|
|
61
|
-
groupEnd(): void
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* 输出堆栈跟踪信息
|
|
65
|
-
* @param message 消息内容
|
|
66
|
-
* @param optionalParams 可选参数
|
|
67
|
-
*/
|
|
68
|
-
trace(message?: any, ...optionalParams: any[]): void
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* 清空控制台
|
|
72
|
-
*/
|
|
73
|
-
clear(): void
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* 输出表格数据
|
|
77
|
-
* @param tabularData 表格数据
|
|
78
|
-
* @param properties 要显示的属性
|
|
79
|
-
*/
|
|
80
|
-
table(tabularData: any, properties?: string[]): void
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* 开始计时
|
|
84
|
-
* @param label 计时器标签
|
|
85
|
-
*/
|
|
86
|
-
time(label?: string): void
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* 输出计时器当前时间
|
|
90
|
-
* @param label 计时器标签
|
|
91
|
-
* @param data 附加数据
|
|
92
|
-
*/
|
|
93
|
-
timeLog(label?: string, ...data: any[]): void
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* 结束计时并输出总时间
|
|
97
|
-
* @param label 计时器标签
|
|
98
|
-
*/
|
|
99
|
-
timeEnd(label?: string): void
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* 开始计数
|
|
103
|
-
* @param label 计数器标签
|
|
104
|
-
*/
|
|
105
|
-
count(label?: string): void
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* 重置计数器
|
|
109
|
-
* @param label 计数器标签
|
|
110
|
-
*/
|
|
111
|
-
countReset(label?: string): void
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* 断言,如果条件为 false 则输出错误信息
|
|
115
|
-
* @param condition 断言条件
|
|
116
|
-
* @param data 错误信息
|
|
117
|
-
*/
|
|
118
|
-
assert(condition?: boolean, ...data: any[]): void
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* 输出对象的详细信息
|
|
122
|
-
* @param item 要检查的对象
|
|
123
|
-
* @param options 选项
|
|
124
|
-
*/
|
|
125
|
-
dir(item?: any, options?: any): void
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* 输出 XML/HTML 元素的详细信息
|
|
129
|
-
* @param object 要检查的对象
|
|
130
|
-
*/
|
|
131
|
-
dirxml(object: any): void
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* 在性能面板中标记时间点
|
|
135
|
-
* @param markName 标记名称
|
|
136
|
-
*/
|
|
137
|
-
timeStamp(markName?: string): void
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* 开始性能分析
|
|
141
|
-
* @param reportName 报告名称
|
|
142
|
-
*/
|
|
143
|
-
profile(reportName?: string): void
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* 结束性能分析
|
|
147
|
-
* @param reportName 报告名称
|
|
148
|
-
*/
|
|
149
|
-
profileEnd(reportName?: string): void
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* 控制台对象
|
|
154
|
-
*/
|
|
155
|
-
export declare const console: ConsoleInterface
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* 控制台环境类型定义
|
|
159
|
-
*/
|
|
160
|
-
export interface ConsoleEnvironment {
|
|
161
|
-
console: ConsoleInterface
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// console 已在上面导出
|
|
1
|
+
// Console API 类型定义
|
|
2
|
+
export interface Console {
|
|
3
|
+
log(message?: any, ...optionalParams: any[]): void
|
|
4
|
+
error(message?: any, ...optionalParams: any[]): void
|
|
5
|
+
warn(message?: any, ...optionalParams: any[]): void
|
|
6
|
+
info(message?: any, ...optionalParams: any[]): void
|
|
7
|
+
debug(message?: any, ...optionalParams: any[]): void
|
|
8
|
+
group(label?: string): void
|
|
9
|
+
groupCollapsed(label?: string): void
|
|
10
|
+
groupEnd(): void
|
|
11
|
+
trace(message?: any, ...optionalParams: any[]): void
|
|
12
|
+
clear(): void
|
|
13
|
+
table(tabularData: any, properties?: string[]): void
|
|
14
|
+
time(label?: string): void
|
|
15
|
+
timeLog(label?: string, ...data: any[]): void
|
|
16
|
+
timeEnd(label?: string): void
|
|
17
|
+
count(label?: string): void
|
|
18
|
+
countReset(label?: string): void
|
|
19
|
+
assert(condition?: boolean, ...data: any[]): void
|
|
20
|
+
dir(item?: any, options?: any): void
|
|
21
|
+
dirxml(object: any): void
|
|
22
|
+
timeStamp(markName?: string): void
|
|
23
|
+
profile(reportName?: string): void
|
|
24
|
+
profileEnd(reportName?: string): void
|
|
25
|
+
}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
// 加密相关第三方库类型声明
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* CryptoJS 加密库类型定义
|
|
5
|
-
* 注意:CryptoJS 是一个第三方 JavaScript 加密库,不是浏览器原生 API
|
|
6
|
-
* 需要通过 npm install crypto-js 安装
|
|
7
|
-
*/
|
|
8
|
-
export interface CryptoJS {
|
|
9
|
-
MD5(message: string): {
|
|
10
|
-
toString(): string
|
|
11
|
-
} | string
|
|
12
|
-
|
|
13
|
-
SHA1(message: string): {
|
|
14
|
-
toString(): string
|
|
15
|
-
} | string
|
|
16
|
-
|
|
17
|
-
SHA256(message: string): {
|
|
18
|
-
toString(): string
|
|
19
|
-
} | string
|
|
20
|
-
|
|
21
|
-
SHA512(message: string): {
|
|
22
|
-
toString(): string
|
|
23
|
-
} | string
|
|
24
|
-
|
|
25
|
-
AES: {
|
|
26
|
-
encrypt(message: string, key: string): {
|
|
27
|
-
toString(): string
|
|
28
|
-
}
|
|
29
|
-
decrypt(ciphertext: string, key: string): {
|
|
30
|
-
toString(): string
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
DES: {
|
|
35
|
-
encrypt(message: string, key: string): {
|
|
36
|
-
toString(): string
|
|
37
|
-
}
|
|
38
|
-
decrypt(ciphertext: string, key: string): {
|
|
39
|
-
toString(): string
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
enc: {
|
|
44
|
-
Utf8: {
|
|
45
|
-
parse(str: string): any
|
|
46
|
-
stringify(words: any): string
|
|
47
|
-
}
|
|
48
|
-
Base64: {
|
|
49
|
-
parse(str: string): any
|
|
50
|
-
stringify(words: any): string
|
|
51
|
-
}
|
|
52
|
-
Hex: {
|
|
53
|
-
parse(str: string): any
|
|
54
|
-
stringify(words: any): string
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
1
|
+
// 加密相关第三方库类型声明
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CryptoJS 加密库类型定义
|
|
5
|
+
* 注意:CryptoJS 是一个第三方 JavaScript 加密库,不是浏览器原生 API
|
|
6
|
+
* 需要通过 npm install crypto-js 安装
|
|
7
|
+
*/
|
|
8
|
+
export interface CryptoJS {
|
|
9
|
+
MD5(message: string): {
|
|
10
|
+
toString(): string
|
|
11
|
+
} | string
|
|
12
|
+
|
|
13
|
+
SHA1(message: string): {
|
|
14
|
+
toString(): string
|
|
15
|
+
} | string
|
|
16
|
+
|
|
17
|
+
SHA256(message: string): {
|
|
18
|
+
toString(): string
|
|
19
|
+
} | string
|
|
20
|
+
|
|
21
|
+
SHA512(message: string): {
|
|
22
|
+
toString(): string
|
|
23
|
+
} | string
|
|
24
|
+
|
|
25
|
+
AES: {
|
|
26
|
+
encrypt(message: string, key: string): {
|
|
27
|
+
toString(): string
|
|
28
|
+
}
|
|
29
|
+
decrypt(ciphertext: string, key: string): {
|
|
30
|
+
toString(): string
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
DES: {
|
|
35
|
+
encrypt(message: string, key: string): {
|
|
36
|
+
toString(): string
|
|
37
|
+
}
|
|
38
|
+
decrypt(ciphertext: string, key: string): {
|
|
39
|
+
toString(): string
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
enc: {
|
|
44
|
+
Utf8: {
|
|
45
|
+
parse(str: string): any
|
|
46
|
+
stringify(words: any): string
|
|
47
|
+
}
|
|
48
|
+
Base64: {
|
|
49
|
+
parse(str: string): any
|
|
50
|
+
stringify(words: any): string
|
|
51
|
+
}
|
|
52
|
+
Hex: {
|
|
53
|
+
parse(str: string): any
|
|
54
|
+
stringify(words: any): string
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// DOM 相关类型声明
|
|
2
|
+
|
|
3
|
+
// DOM 元素接口 - 按继承关系组织
|
|
4
|
+
export interface Element {
|
|
5
|
+
parentNode?: Element | null
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface HTMLElement extends Element {
|
|
9
|
+
appendChild(node: Element): Element
|
|
10
|
+
removeChild(node: Element): Element
|
|
11
|
+
getBoundingClientRect(): {
|
|
12
|
+
width: number
|
|
13
|
+
height: number
|
|
14
|
+
top: number
|
|
15
|
+
left: number
|
|
16
|
+
right: number
|
|
17
|
+
bottom: number
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface Document {
|
|
22
|
+
createElement(tagName: string): HTMLElement
|
|
23
|
+
documentElement: {
|
|
24
|
+
clientWidth: number
|
|
25
|
+
clientHeight: number
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// DOM 事件相关
|
|
30
|
+
export interface Event {
|
|
31
|
+
target?: any
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface DOMException {
|
|
35
|
+
name: string
|
|
36
|
+
message: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface DOMStringList {
|
|
40
|
+
contains(string: string): boolean
|
|
41
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// 编码相关类型声明
|
|
2
|
+
import type { BufferSource } from './arraybuffer.d'
|
|
3
|
+
|
|
4
|
+
export interface TextDecoder {
|
|
5
|
+
decode(input?: BufferSource, options?: { stream?: boolean }): string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface TextDecoderConstructor {
|
|
9
|
+
new (label?: string, options?: { fatal?: boolean; ignoreBOM?: boolean }): TextDecoder
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface TextEncoder {
|
|
13
|
+
encode(input?: string): Uint8Array
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface TextEncoderConstructor {
|
|
17
|
+
new (): TextEncoder
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Base64 编码相关
|
|
21
|
+
export interface Base64Encoder {
|
|
22
|
+
btoa(data: string): string
|
|
23
|
+
atob(data: string): string
|
|
24
|
+
}
|