@quicktvui/ai 1.0.5 → 1.0.7
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/package.json +1 -1
- package/rules/.clinerules +16 -1
- package/rules/.cursorrules +16 -1
- package/rules/.github/copilot-instructions.md +16 -1
- package/rules/.source/ESADPlayer/package.json +24 -0
- package/rules/.source/ESADPlayer/rollup.config.js +33 -0
- package/rules/.source/ESADPlayer/src/component/ESADPlayerViewComponent.ts +466 -0
- package/rules/.source/ESADPlayer/src/core/ESADType.ts +6 -0
- package/rules/.source/ESADPlayer/src/index.ts +18 -0
- package/rules/.source/ESADPlayer/src/index.vue +963 -0
- package/rules/.source/ESADPlayer/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/ESADPlayer/tsconfig.json +34 -0
- package/rules/.source/ESAudioPlayer/package.json +23 -0
- package/rules/.source/ESAudioPlayer/rollup.config.js +33 -0
- package/rules/.source/ESAudioPlayer/src/index.ts +10 -0
- package/rules/.source/ESAudioPlayer/src/index.vue +1441 -0
- package/rules/.source/ESAudioPlayer/src/module/ESAudioPlayer.ts +169 -0
- package/rules/.source/ESAudioPlayer/src/module/ESAudioPlayerModule.android.ts +134 -0
- package/rules/.source/ESAudioPlayer/src/module/ESAudioPlayerModule.harmony.ts +139 -0
- package/rules/.source/ESAudioPlayer/src/module/ESAudioPlayerModule.ts +44 -0
- package/rules/.source/ESAudioPlayer/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/ESAudioPlayer/src/utils/ESAudioPlayerDefinitionUtils.ts +36 -0
- package/rules/.source/ESAudioPlayer/tsconfig.json +34 -0
- package/rules/.source/ESAudioServicePlayer/package.json +23 -0
- package/rules/.source/ESAudioServicePlayer/rollup.config.js +33 -0
- package/rules/.source/ESAudioServicePlayer/src/index.ts +10 -0
- package/rules/.source/ESAudioServicePlayer/src/index.vue +1400 -0
- package/rules/.source/ESAudioServicePlayer/src/module/ESAudioServicePlayer.ts +189 -0
- package/rules/.source/ESAudioServicePlayer/src/module/ESAudioServicePlayerModule.android.ts +155 -0
- package/rules/.source/ESAudioServicePlayer/src/module/ESAudioServicePlayerModule.harmony.ts +163 -0
- package/rules/.source/ESAudioServicePlayer/src/module/ESAudioServicePlayerModule.ts +50 -0
- package/rules/.source/ESAudioServicePlayer/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/ESAudioServicePlayer/src/utils/ESAudioServicePlayerDefinitionUtils.ts +36 -0
- package/rules/.source/ESAudioServicePlayer/tsconfig.json +34 -0
- package/rules/.source/ESAxios/CHANGELOG.md +1072 -0
- package/rules/.source/ESAxios/LICENSE +7 -0
- package/rules/.source/ESAxios/MIGRATION_GUIDE.md +3 -0
- package/rules/.source/ESAxios/README.md +1673 -0
- package/rules/.source/ESAxios/index.d.cts +549 -0
- package/rules/.source/ESAxios/index.d.ts +766 -0
- package/rules/.source/ESAxios/index.js +43 -0
- package/rules/.source/ESAxios/lib/adapters/README.md +37 -0
- package/rules/.source/ESAxios/lib/adapters/adapters.js +80 -0
- package/rules/.source/ESAxios/lib/adapters/fetch.js +295 -0
- package/rules/.source/ESAxios/lib/axios.js +90 -0
- package/rules/.source/ESAxios/lib/cancel/CancelToken.js +135 -0
- package/rules/.source/ESAxios/lib/cancel/CanceledError.js +31 -0
- package/rules/.source/ESAxios/lib/cancel/isCancel.js +5 -0
- package/rules/.source/ESAxios/lib/core/Axios.js +292 -0
- package/rules/.source/ESAxios/lib/core/AxiosError.js +108 -0
- package/rules/.source/ESAxios/lib/core/AxiosHeaders.js +340 -0
- package/rules/.source/ESAxios/lib/core/InterceptorManager.js +71 -0
- package/rules/.source/ESAxios/lib/core/README.md +8 -0
- package/rules/.source/ESAxios/lib/core/buildFullPath.js +26 -0
- package/rules/.source/ESAxios/lib/core/dispatchRequest.js +81 -0
- package/rules/.source/ESAxios/lib/core/mergeConfig.js +112 -0
- package/rules/.source/ESAxios/lib/core/settle.js +31 -0
- package/rules/.source/ESAxios/lib/core/transformData.js +33 -0
- package/rules/.source/ESAxios/lib/defaults/index.js +182 -0
- package/rules/.source/ESAxios/lib/defaults/transitional.js +7 -0
- package/rules/.source/ESAxios/lib/env/README.md +3 -0
- package/rules/.source/ESAxios/lib/env/classes/FormData.js +2 -0
- package/rules/.source/ESAxios/lib/env/data.js +1 -0
- package/rules/.source/ESAxios/lib/helpers/AxiosTransformStream.js +160 -0
- package/rules/.source/ESAxios/lib/helpers/AxiosURLSearchParams.js +65 -0
- package/rules/.source/ESAxios/lib/helpers/HttpStatusCode.js +71 -0
- package/rules/.source/ESAxios/lib/helpers/README.md +7 -0
- package/rules/.source/ESAxios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
- package/rules/.source/ESAxios/lib/helpers/bind.js +7 -0
- package/rules/.source/ESAxios/lib/helpers/buildURL.js +69 -0
- package/rules/.source/ESAxios/lib/helpers/callbackify.js +18 -0
- package/rules/.source/ESAxios/lib/helpers/combineURLs.js +15 -0
- package/rules/.source/ESAxios/lib/helpers/composeSignals.js +61 -0
- package/rules/.source/ESAxios/lib/helpers/cookies.js +40 -0
- package/rules/.source/ESAxios/lib/helpers/deprecatedMethod.js +31 -0
- package/rules/.source/ESAxios/lib/helpers/formDataToJSON.js +95 -0
- package/rules/.source/ESAxios/lib/helpers/formDataToStream.js +122 -0
- package/rules/.source/ESAxios/lib/helpers/fromDataURI.js +62 -0
- package/rules/.source/ESAxios/lib/helpers/isAbsoluteURL.js +15 -0
- package/rules/.source/ESAxios/lib/helpers/isAxiosError.js +14 -0
- package/rules/.source/ESAxios/lib/helpers/isURLSameOrigin.js +17 -0
- package/rules/.source/ESAxios/lib/helpers/null.js +2 -0
- package/rules/.source/ESAxios/lib/helpers/parseHeaders.js +69 -0
- package/rules/.source/ESAxios/lib/helpers/parseProtocol.js +6 -0
- package/rules/.source/ESAxios/lib/helpers/progressEventReducer.js +51 -0
- package/rules/.source/ESAxios/lib/helpers/readBlob.js +15 -0
- package/rules/.source/ESAxios/lib/helpers/resolveConfig.js +83 -0
- package/rules/.source/ESAxios/lib/helpers/speedometer.js +55 -0
- package/rules/.source/ESAxios/lib/helpers/spread.js +28 -0
- package/rules/.source/ESAxios/lib/helpers/throttle.js +44 -0
- package/rules/.source/ESAxios/lib/helpers/toFormData.js +241 -0
- package/rules/.source/ESAxios/lib/helpers/toURLEncodedForm.js +25 -0
- package/rules/.source/ESAxios/lib/helpers/trackStream.js +89 -0
- package/rules/.source/ESAxios/lib/helpers/validator.js +120 -0
- package/rules/.source/ESAxios/lib/platform/browser/classes/Blob.js +3 -0
- package/rules/.source/ESAxios/lib/platform/browser/classes/FormData.js +3 -0
- package/rules/.source/ESAxios/lib/platform/browser/classes/URLSearchParams.js +6 -0
- package/rules/.source/ESAxios/lib/platform/browser/index.js +13 -0
- package/rules/.source/ESAxios/lib/platform/common/classes/FormData.js +142 -0
- package/rules/.source/ESAxios/lib/platform/common/index.js +7 -0
- package/rules/.source/ESAxios/lib/platform/common/utils.js +54 -0
- package/rules/.source/ESAxios/lib/platform/index.js +7 -0
- package/rules/.source/ESAxios/lib/platform/node/classes/FormData.js +3 -0
- package/rules/.source/ESAxios/lib/platform/node/classes/URLSearchParams.js +4 -0
- package/rules/.source/ESAxios/lib/platform/node/index.js +12 -0
- package/rules/.source/ESAxios/lib/utils.js +820 -0
- package/rules/.source/ESCore/CHANGELOG.md +7 -0
- package/rules/.source/ESCore/package.json +24 -0
- package/rules/.source/ESCore/rollup.config.js +28 -0
- package/rules/.source/ESCore/src/actionbar/ESActionBar.ts +48 -0
- package/rules/.source/ESCore/src/actionbar/ESActionBarModule.android.ts +29 -0
- package/rules/.source/ESCore/src/actionbar/ESActionBarModule.harmony.ts +31 -0
- package/rules/.source/ESCore/src/actionbar/ESActionBarModule.ts +9 -0
- package/rules/.source/ESCore/src/actionbar/index.ts +2 -0
- package/rules/.source/ESCore/src/app/ESAppInfo.ts +12 -0
- package/rules/.source/ESCore/src/app/ESAppInfoList.ts +9 -0
- package/rules/.source/ESCore/src/app/ESAppList.ts +64 -0
- package/rules/.source/ESCore/src/app/ESAppListModule.android.ts +55 -0
- package/rules/.source/ESCore/src/app/ESAppListModule.harmony.ts +57 -0
- package/rules/.source/ESCore/src/app/ESAppListModule.ts +15 -0
- package/rules/.source/ESCore/src/app/index.ts +4 -0
- package/rules/.source/ESCore/src/application/ESAppContext.ts +99 -0
- package/rules/.source/ESCore/src/application/ESAppKeyManager.android.ts +86 -0
- package/rules/.source/ESCore/src/application/ESAppKeyManager.harmony.ts +91 -0
- package/rules/.source/ESCore/src/application/ESAppKeyManager.ts +23 -0
- package/rules/.source/ESCore/src/application/ESAppLifecycleManager.android.ts +199 -0
- package/rules/.source/ESCore/src/application/ESAppLifecycleManager.harmony.ts +197 -0
- package/rules/.source/ESCore/src/application/ESAppLifecycleManager.ts +36 -0
- package/rules/.source/ESCore/src/application/ESAppModuleManager.ts +294 -0
- package/rules/.source/ESCore/src/application/ESAppParams.ts +14 -0
- package/rules/.source/ESCore/src/application/ESApplication.ts +169 -0
- package/rules/.source/ESCore/src/application/index.ts +38 -0
- package/rules/.source/ESCore/src/audio/ESAudio.ts +190 -0
- package/rules/.source/ESCore/src/audio/ESAudioContentType.ts +7 -0
- package/rules/.source/ESCore/src/audio/ESAudioDirection.ts +5 -0
- package/rules/.source/ESCore/src/audio/ESAudioDurationHint.ts +7 -0
- package/rules/.source/ESCore/src/audio/ESAudioManagerFlag.ts +14 -0
- package/rules/.source/ESCore/src/audio/ESAudioModule.android.ts +173 -0
- package/rules/.source/ESCore/src/audio/ESAudioModule.harmony.ts +152 -0
- package/rules/.source/ESCore/src/audio/ESAudioModule.ts +63 -0
- package/rules/.source/ESCore/src/audio/ESAudioStreamType.ts +15 -0
- package/rules/.source/ESCore/src/audio/ESAudioUsage.ts +20 -0
- package/rules/.source/ESCore/src/audio/index.ts +9 -0
- package/rules/.source/ESCore/src/brightness/ESBrightness.ts +69 -0
- package/rules/.source/ESCore/src/brightness/ESBrightnessModule.android.ts +73 -0
- package/rules/.source/ESCore/src/brightness/ESBrightnessModule.harmony.ts +59 -0
- package/rules/.source/ESCore/src/brightness/ESBrightnessModule.ts +15 -0
- package/rules/.source/ESCore/src/brightness/index.ts +2 -0
- package/rules/.source/ESCore/src/broadcast/ESBroadcast.ts +107 -0
- package/rules/.source/ESCore/src/broadcast/ESBroadcastModule.android.ts +42 -0
- package/rules/.source/ESCore/src/broadcast/ESBroadcastModule.harmony.ts +45 -0
- package/rules/.source/ESCore/src/broadcast/ESBroadcastModule.ts +10 -0
- package/rules/.source/ESCore/src/broadcast/ESBroadcastReceiver.ts +5 -0
- package/rules/.source/ESCore/src/broadcast/ESIntent.ts +6 -0
- package/rules/.source/ESCore/src/broadcast/ESIntentDataAuthority.ts +4 -0
- package/rules/.source/ESCore/src/broadcast/ESIntentDataPath.ts +4 -0
- package/rules/.source/ESCore/src/broadcast/ESIntentDataSchemeSpecificPart.ts +4 -0
- package/rules/.source/ESCore/src/broadcast/ESIntentFilter.ts +13 -0
- package/rules/.source/ESCore/src/broadcast/index.ts +8 -0
- package/rules/.source/ESCore/src/core/IESComponent.ts +1 -0
- package/rules/.source/ESCore/src/core/IESManager.ts +7 -0
- package/rules/.source/ESCore/src/core/IESModule.ts +13 -0
- package/rules/.source/ESCore/src/core/NeedToTyped.ts +1 -0
- package/rules/.source/ESCore/src/core/index.ts +4 -0
- package/rules/.source/ESCore/src/database/ESDatabase.ts +63 -0
- package/rules/.source/ESCore/src/database/ESDatabaseModule.android.ts +49 -0
- package/rules/.source/ESCore/src/database/ESDatabaseModule.harmony.ts +46 -0
- package/rules/.source/ESCore/src/database/ESDatabaseModule.ts +23 -0
- package/rules/.source/ESCore/src/database/index.ts +2 -0
- package/rules/.source/ESCore/src/develop/ESDevelop.ts +75 -0
- package/rules/.source/ESCore/src/develop/ESDevelopInfo.ts +9 -0
- package/rules/.source/ESCore/src/develop/ESDevelopModule.android.ts +50 -0
- package/rules/.source/ESCore/src/develop/ESDevelopModule.harmony.ts +52 -0
- package/rules/.source/ESCore/src/develop/ESDevelopModule.ts +14 -0
- package/rules/.source/ESCore/src/develop/index.ts +3 -0
- package/rules/.source/ESCore/src/device/ESDevice.ts +289 -0
- package/rules/.source/ESCore/src/device/ESDeviceInfo.ts +51 -0
- package/rules/.source/ESCore/src/device/ESDeviceModule.android.ts +143 -0
- package/rules/.source/ESCore/src/device/ESDeviceModule.harmony.ts +116 -0
- package/rules/.source/ESCore/src/device/ESDeviceModule.ts +42 -0
- package/rules/.source/ESCore/src/device/index.ts +3 -0
- package/rules/.source/ESCore/src/display/ESDisplay.ts +61 -0
- package/rules/.source/ESCore/src/display/index.ts +2 -0
- package/rules/.source/ESCore/src/download/ESDownload.ts +181 -0
- package/rules/.source/ESCore/src/download/ESDownloadInfo.ts +14 -0
- package/rules/.source/ESCore/src/download/ESDownloadListener.ts +21 -0
- package/rules/.source/ESCore/src/download/ESDownloadModule.android.ts +57 -0
- package/rules/.source/ESCore/src/download/ESDownloadModule.harmony.ts +66 -0
- package/rules/.source/ESCore/src/download/ESDownloadModule.ts +21 -0
- package/rules/.source/ESCore/src/download/ESDownloadParams.ts +4 -0
- package/rules/.source/ESCore/src/download/ESDownloadState.ts +9 -0
- package/rules/.source/ESCore/src/download/ESDownloadStatus.ts +11 -0
- package/rules/.source/ESCore/src/download/index.ts +7 -0
- package/rules/.source/ESCore/src/error/ESError.ts +88 -0
- package/rules/.source/ESCore/src/error/ESErrorListener.ts +9 -0
- package/rules/.source/ESCore/src/error/ErrorOptions.ts +16 -0
- package/rules/.source/ESCore/src/error/index.ts +2 -0
- package/rules/.source/ESCore/src/es/ES.ts +140 -0
- package/rules/.source/ESCore/src/es/ESModule.android.ts +166 -0
- package/rules/.source/ESCore/src/es/ESModule.harmony.ts +167 -0
- package/rules/.source/ESCore/src/es/ESModule.ts +41 -0
- package/rules/.source/ESCore/src/es/ESSDKInfo.ts +17 -0
- package/rules/.source/ESCore/src/es/ESVersion.ts +14 -0
- package/rules/.source/ESCore/src/es/index.ts +4 -0
- package/rules/.source/ESCore/src/eventbus/ESEventBus.ts +135 -0
- package/rules/.source/ESCore/src/eventbus/ESEventBusArg.ts +2 -0
- package/rules/.source/ESCore/src/eventbus/ESEventBusCallback.ts +4 -0
- package/rules/.source/ESCore/src/eventbus/ESEventBusContext.ts +2 -0
- package/rules/.source/ESCore/src/eventbus/ESEventBusEvent.ts +7 -0
- package/rules/.source/ESCore/src/eventbus/index.ts +6 -0
- package/rules/.source/ESCore/src/file/ESFile.ts +381 -0
- package/rules/.source/ESCore/src/file/ESFileModule.android.ts +334 -0
- package/rules/.source/ESCore/src/file/ESFileModule.harmony.ts +343 -0
- package/rules/.source/ESCore/src/file/ESFileModule.ts +101 -0
- package/rules/.source/ESCore/src/file/ESFileStat.ts +19 -0
- package/rules/.source/ESCore/src/file/index.ts +1 -0
- package/rules/.source/ESCore/src/focus/ESFocus.ts +56 -0
- package/rules/.source/ESCore/src/focus/ESFocusModule.android.ts +35 -0
- package/rules/.source/ESCore/src/focus/ESFocusModule.harmony.ts +35 -0
- package/rules/.source/ESCore/src/focus/ESFocusModule.ts +12 -0
- package/rules/.source/ESCore/src/focus/ESFocusable.ts +1 -0
- package/rules/.source/ESCore/src/focus/index.ts +3 -0
- package/rules/.source/ESCore/src/global.d.ts +37 -0
- package/rules/.source/ESCore/src/hlog/ESHLog.ts +276 -0
- package/rules/.source/ESCore/src/hlog/ESHLogModule.ts +130 -0
- package/rules/.source/ESCore/src/hlog/ESLogListener.ts +959 -0
- package/rules/.source/ESCore/src/hlog/LogPluginHelper.ts +44 -0
- package/rules/.source/ESCore/src/hlog/index.ts +6 -0
- package/rules/.source/ESCore/src/hlog/listener/OnInitListenerBase.ts +24 -0
- package/rules/.source/ESCore/src/hlog/listener/OnUploadListenerBase.ts +39 -0
- package/rules/.source/ESCore/src/hlog/listener/RemoveInitListenerBase.ts +17 -0
- package/rules/.source/ESCore/src/hlog/listener/RemoveOldUploadListenerBase.ts +21 -0
- package/rules/.source/ESCore/src/hlog/listener/RemoveUploadListenerBase.ts +29 -0
- package/rules/.source/ESCore/src/hlog/listener/SetInitListenerBase.ts +25 -0
- package/rules/.source/ESCore/src/hlog/listener/SetOldUploadListenerBase.ts +33 -0
- package/rules/.source/ESCore/src/hlog/listener/SetUploadListenerBase.ts +47 -0
- package/rules/.source/ESCore/src/iac/ESIAC.ts +150 -0
- package/rules/.source/ESCore/src/iac/ESIACMessage.ts +5 -0
- package/rules/.source/ESCore/src/iac/ESIACMessageFilter.ts +3 -0
- package/rules/.source/ESCore/src/iac/ESIACModule.android.ts +40 -0
- package/rules/.source/ESCore/src/iac/ESIACModule.harmony.ts +63 -0
- package/rules/.source/ESCore/src/iac/ESIACModule.ts +15 -0
- package/rules/.source/ESCore/src/iac/ESIACReceiver.ts +5 -0
- package/rules/.source/ESCore/src/iac/index.ts +5 -0
- package/rules/.source/ESCore/src/index.ts +92 -0
- package/rules/.source/ESCore/src/key/ESKeyAction.ts +5 -0
- package/rules/.source/ESCore/src/key/ESKeyCode.ts +15 -0
- package/rules/.source/ESCore/src/key/ESKeyEvent.ts +8 -0
- package/rules/.source/ESCore/src/key/index.ts +3 -0
- package/rules/.source/ESCore/src/kv/ESKV.ts +104 -0
- package/rules/.source/ESCore/src/kv/ESKVModule.android.ts +60 -0
- package/rules/.source/ESCore/src/kv/ESKVModule.harmony.ts +80 -0
- package/rules/.source/ESCore/src/kv/ESKVModule.ts +28 -0
- package/rules/.source/ESCore/src/kv/index.ts +2 -0
- package/rules/.source/ESCore/src/local/ESLocalStorage.ts +114 -0
- package/rules/.source/ESCore/src/local/ESLocalStorageModule.android.ts +150 -0
- package/rules/.source/ESCore/src/local/ESLocalStorageModule.harmony.ts +119 -0
- package/rules/.source/ESCore/src/local/ESLocalStorageModule.ts +23 -0
- package/rules/.source/ESCore/src/local/index.ts +2 -0
- package/rules/.source/ESCore/src/location/ESLocation.ts +89 -0
- package/rules/.source/ESCore/src/location/ESLocationInfo.ts +9 -0
- package/rules/.source/ESCore/src/location/ESLocationListener.ts +5 -0
- package/rules/.source/ESCore/src/location/ESLocationModule.android.ts +53 -0
- package/rules/.source/ESCore/src/location/ESLocationModule.harmony.ts +23 -0
- package/rules/.source/ESCore/src/location/ESLocationModule.ts +8 -0
- package/rules/.source/ESCore/src/location/index.ts +4 -0
- package/rules/.source/ESCore/src/log/ESLog.ts +163 -0
- package/rules/.source/ESCore/src/log/ESLogModule.android.ts +51 -0
- package/rules/.source/ESCore/src/log/ESLogModule.harmony.ts +52 -0
- package/rules/.source/ESCore/src/log/ESLogModule.ts +18 -0
- package/rules/.source/ESCore/src/log/index.ts +3 -0
- package/rules/.source/ESCore/src/network/ESNetwork.ts +102 -0
- package/rules/.source/ESCore/src/network/ESNetworkInfo.ts +20 -0
- package/rules/.source/ESCore/src/network/ESNetworkInfoState.ts +8 -0
- package/rules/.source/ESCore/src/network/ESNetworkInfoType.ts +6 -0
- package/rules/.source/ESCore/src/network/ESNetworkListener.ts +5 -0
- package/rules/.source/ESCore/src/network/ESNetworkModule.android.ts +38 -0
- package/rules/.source/ESCore/src/network/ESNetworkModule.harmony.ts +122 -0
- package/rules/.source/ESCore/src/network/ESNetworkModule.ts +13 -0
- package/rules/.source/ESCore/src/network/ESWifiInfo.ts +6 -0
- package/rules/.source/ESCore/src/network/index.ts +9 -0
- package/rules/.source/ESCore/src/page/ESPageParams.ts +14 -0
- package/rules/.source/ESCore/src/page/index.ts +1 -0
- package/rules/.source/ESCore/src/permission/ESPermission.ts +46 -0
- package/rules/.source/ESCore/src/permission/ESPermissionModule.android.ts +33 -0
- package/rules/.source/ESCore/src/permission/ESPermissionModule.harmony.ts +33 -0
- package/rules/.source/ESCore/src/permission/ESPermissionModule.ts +12 -0
- package/rules/.source/ESCore/src/permission/ESRequestPermissionsResult.ts +6 -0
- package/rules/.source/ESCore/src/permission/index.ts +3 -0
- package/rules/.source/ESCore/src/platform/ESPlatform.ts +63 -0
- package/rules/.source/ESCore/src/platform/index.ts +1 -0
- package/rules/.source/ESCore/src/plugin/ESPlugin.ts +152 -0
- package/rules/.source/ESCore/src/plugin/ESPluginModule.android.ts +20 -0
- package/rules/.source/ESCore/src/plugin/ESPluginModule.harmony.ts +24 -0
- package/rules/.source/ESCore/src/plugin/ESPluginModule.ts +9 -0
- package/rules/.source/ESCore/src/plugin/index.ts +3 -0
- package/rules/.source/ESCore/src/power/ESPower.ts +41 -0
- package/rules/.source/ESCore/src/power/ESPowerModule.android.ts +31 -0
- package/rules/.source/ESCore/src/power/ESPowerModule.harmony.ts +33 -0
- package/rules/.source/ESCore/src/power/ESPowerModule.ts +7 -0
- package/rules/.source/ESCore/src/power/index.ts +2 -0
- package/rules/.source/ESCore/src/provider/ESContentProvider.ts +82 -0
- package/rules/.source/ESCore/src/provider/ESContentProviderInfo.ts +8 -0
- package/rules/.source/ESCore/src/provider/ESContentProviderModule.android.ts +62 -0
- package/rules/.source/ESCore/src/provider/ESContentProviderModule.harmony.ts +62 -0
- package/rules/.source/ESCore/src/provider/ESContentProviderModule.ts +29 -0
- package/rules/.source/ESCore/src/provider/ESContentProviderResult.ts +4 -0
- package/rules/.source/ESCore/src/provider/ESContentValues.ts +3 -0
- package/rules/.source/ESCore/src/provider/index.ts +5 -0
- package/rules/.source/ESCore/src/router/ESData.ts +3 -0
- package/rules/.source/ESCore/src/router/ESParams.ts +3 -0
- package/rules/.source/ESCore/src/router/ESRouter.ts +364 -0
- package/rules/.source/ESCore/src/router/ESRouterKeyManager.android.ts +107 -0
- package/rules/.source/ESCore/src/router/ESRouterKeyManager.harmony.ts +205 -0
- package/rules/.source/ESCore/src/router/ESRouterKeyManager.ts +11 -0
- package/rules/.source/ESCore/src/router/ESRouterLifecycleManager.ts +301 -0
- package/rules/.source/ESCore/src/router/ESRouterManager.ts +221 -0
- package/rules/.source/ESCore/src/router/index.ts +9 -0
- package/rules/.source/ESCore/src/runtime/ESRuntime.ts +164 -0
- package/rules/.source/ESCore/src/runtime/ESRuntimeDeviceModule.android.ts +76 -0
- package/rules/.source/ESCore/src/runtime/ESRuntimeDeviceModule.harmony.ts +39 -0
- package/rules/.source/ESCore/src/runtime/ESRuntimeDeviceModule.ts +14 -0
- package/rules/.source/ESCore/src/runtime/ESRuntimeDeviceType.ts +53 -0
- package/rules/.source/ESCore/src/runtime/index.ts +4 -0
- package/rules/.source/ESCore/src/service/ESService.ts +34 -0
- package/rules/.source/ESCore/src/service/ESServiceModule.android.ts +20 -0
- package/rules/.source/ESCore/src/service/ESServiceModule.harmony.ts +19 -0
- package/rules/.source/ESCore/src/service/ESServiceModule.ts +5 -0
- package/rules/.source/ESCore/src/service/index.ts +2 -0
- package/rules/.source/ESCore/src/share/ESShareData.ts +177 -0
- package/rules/.source/ESCore/src/share/ESShareDataModule.android.ts +370 -0
- package/rules/.source/ESCore/src/share/ESShareDataModule.harmony.ts +201 -0
- package/rules/.source/ESCore/src/share/ESShareDataModule.ts +83 -0
- package/rules/.source/ESCore/src/share/ESSharedData.ts +9 -0
- package/rules/.source/ESCore/src/share/ESSharedDataMode.ts +5 -0
- package/rules/.source/ESCore/src/share/ESSharedDataParams.ts +4 -0
- package/rules/.source/ESCore/src/share/ESSharedDataType.ts +9 -0
- package/rules/.source/ESCore/src/share/index.ts +7 -0
- package/rules/.source/ESCore/src/slot/ESSlot.ts +75 -0
- package/rules/.source/ESCore/src/slot/ESSlotEvent.ts +4 -0
- package/rules/.source/ESCore/src/slot/ESSlotEventName.ts +3 -0
- package/rules/.source/ESCore/src/slot/ESSlotParams.ts +14 -0
- package/rules/.source/ESCore/src/slot/index.ts +3 -0
- package/rules/.source/ESCore/src/theme/ESTheme.ts +88 -0
- package/rules/.source/ESCore/src/theme/ESThemeListener.ts +3 -0
- package/rules/.source/ESCore/src/theme/index.ts +3 -0
- package/rules/.source/ESCore/src/toast/ESToast.ts +47 -0
- package/rules/.source/ESCore/src/toast/ESToastModule.android.ts +30 -0
- package/rules/.source/ESCore/src/toast/ESToastModule.harmony.ts +30 -0
- package/rules/.source/ESCore/src/toast/ESToastModule.ts +9 -0
- package/rules/.source/ESCore/src/toast/index.ts +2 -0
- package/rules/.source/ESCore/src/upload/ESUpload.ts +226 -0
- package/rules/.source/ESCore/src/upload/ESUploadInfo.ts +13 -0
- package/rules/.source/ESCore/src/upload/ESUploadListener.ts +21 -0
- package/rules/.source/ESCore/src/upload/ESUploadModule.android.ts +60 -0
- package/rules/.source/ESCore/src/upload/ESUploadModule.harmony.ts +51 -0
- package/rules/.source/ESCore/src/upload/ESUploadModule.ts +19 -0
- package/rules/.source/ESCore/src/upload/ESUploadState.ts +9 -0
- package/rules/.source/ESCore/src/upload/ESUploadStatus.ts +11 -0
- package/rules/.source/ESCore/src/upload/index.ts +6 -0
- package/rules/.source/ESCore/src/usb/ESUsbDevice.ts +112 -0
- package/rules/.source/ESCore/src/usb/ESUsbDeviceInfo.ts +11 -0
- package/rules/.source/ESCore/src/usb/ESUsbDeviceListener.ts +7 -0
- package/rules/.source/ESCore/src/usb/ESUsbDeviceModule.android.ts +62 -0
- package/rules/.source/ESCore/src/usb/ESUsbDeviceModule.harmony.ts +58 -0
- package/rules/.source/ESCore/src/usb/ESUsbDeviceModule.ts +23 -0
- package/rules/.source/ESCore/src/usb/index.ts +4 -0
- package/rules/.source/ESCore/src/useApi.ts +257 -0
- package/rules/.source/ESCore/src/xlog/ESLogUpload.ts +92 -0
- package/rules/.source/ESCore/src/xlog/ESLogUploadInfo.ts +12 -0
- package/rules/.source/ESCore/src/xlog/ESLogUploadListener.ts +7 -0
- package/rules/.source/ESCore/src/xlog/ESXLog.ts +130 -0
- package/rules/.source/ESCore/src/xlog/ESXLogModule.android.ts +74 -0
- package/rules/.source/ESCore/src/xlog/ESXLogModule.harmony.ts +47 -0
- package/rules/.source/ESCore/src/xlog/ESXLogModule.ts +24 -0
- package/rules/.source/ESCore/src/xlog/index.ts +6 -0
- package/rules/.source/ESCore/tsconfig.json +34 -0
- package/rules/.source/ESPlayer/package.json +24 -0
- package/rules/.source/ESPlayer/rollup.config.js +28 -0
- package/rules/.source/ESPlayer/src/cache/ESPlayerCache.ts +14 -0
- package/rules/.source/ESPlayer/src/cache/ESPlayerCacheManager.ts +39 -0
- package/rules/.source/ESPlayer/src/core/ESIPlayer.ts +179 -0
- package/rules/.source/ESPlayer/src/core/ESIPlayerManager.ts +7 -0
- package/rules/.source/ESPlayer/src/core/ESMediaMetadata.ts +8 -0
- package/rules/.source/ESPlayer/src/core/ESMediaSource.ts +13 -0
- package/rules/.source/ESPlayer/src/core/ESMediaSourceList.ts +15 -0
- package/rules/.source/ESPlayer/src/core/ESPlayer.ts +100 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerBufferPercentCallback.ts +3 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerCDNInfo.ts +5 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerCommand.ts +1 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerComponentInfo.ts +7 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerConfiguration.ts +13 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerControlOptions.ts +8 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerDurationCallback.ts +3 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerMediaMeta.ts +48 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerPosition.ts +5 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerProgressCallback.ts +3 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerState.ts +44 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerStatus.ts +10 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerTrackInfo.ts +36 -0
- package/rules/.source/ESPlayer/src/core/ESPlayerTrackType.ts +5 -0
- package/rules/.source/ESPlayer/src/core/M3U8DefinitionInfo.ts +38 -0
- package/rules/.source/ESPlayer/src/decode/ESPlayerDecode.ts +12 -0
- package/rules/.source/ESPlayer/src/decode/ESPlayerDecodeManager.ts +81 -0
- package/rules/.source/ESPlayer/src/definition/ESPlayerDefinition.ts +21 -0
- package/rules/.source/ESPlayer/src/definition/ESPlayerDefinitionManager.ts +93 -0
- package/rules/.source/ESPlayer/src/definition/ESPlayerDefinitionStrategy.ts +12 -0
- package/rules/.source/ESPlayer/src/device/ESPlayerDevice.ts +4 -0
- package/rules/.source/ESPlayer/src/device/ESPlayerDeviceManager.ts +41 -0
- package/rules/.source/ESPlayer/src/device/ESPlayerDeviceType.ts +53 -0
- package/rules/.source/ESPlayer/src/display/ESPlayerDisplay.ts +4 -0
- package/rules/.source/ESPlayer/src/display/ESPlayerDisplayManager.ts +63 -0
- package/rules/.source/ESPlayer/src/error/ESPlayerError.ts +5 -0
- package/rules/.source/ESPlayer/src/error/ESPlayerErrors.ts +8 -0
- package/rules/.source/ESPlayer/src/event/ESPlayerEventDefaultListener.ts +127 -0
- package/rules/.source/ESPlayer/src/event/ESPlayerEventListener.ts +120 -0
- package/rules/.source/ESPlayer/src/event/ESPlayerEventManager.ts +451 -0
- package/rules/.source/ESPlayer/src/index.ts +166 -0
- package/rules/.source/ESPlayer/src/info/ESPlayerInfo.ts +16 -0
- package/rules/.source/ESPlayer/src/injectionSymbols.ts +84 -0
- package/rules/.source/ESPlayer/src/interceptor/ESIPlayerInterceptor.ts +11 -0
- package/rules/.source/ESPlayer/src/interceptor/ESPlayerInterceptError.ts +8 -0
- package/rules/.source/ESPlayer/src/interceptor/ESPlayerInterceptResult.ts +8 -0
- package/rules/.source/ESPlayer/src/interceptor/ESPlayerInterceptorManager.ts +95 -0
- package/rules/.source/ESPlayer/src/interceptor/ESPlayerInterceptorType.ts +17 -0
- package/rules/.source/ESPlayer/src/log/ESPlayerLog.ts +143 -0
- package/rules/.source/ESPlayer/src/log/ESPlayerLogModule.ts +43 -0
- package/rules/.source/ESPlayer/src/mode/ESPlayerPlayMode.ts +8 -0
- package/rules/.source/ESPlayer/src/mode/ESPlayerPlayModeManager.ts +39 -0
- package/rules/.source/ESPlayer/src/option/ESPlayerOption.ts +11 -0
- package/rules/.source/ESPlayer/src/option/ESPlayerOptionType.ts +14 -0
- package/rules/.source/ESPlayer/src/rate/ESPlayerRate.ts +11 -0
- package/rules/.source/ESPlayer/src/rate/ESPlayerRateManager.ts +39 -0
- package/rules/.source/ESPlayer/src/ratio/ESPlayerAspectRatio.ts +9 -0
- package/rules/.source/ESPlayer/src/ratio/ESPlayerAspectRatioManager.ts +39 -0
- package/rules/.source/ESPlayer/src/render/ESPlayerRender.ts +5 -0
- package/rules/.source/ESPlayer/src/render/ESPlayerRenderManager.ts +36 -0
- package/rules/.source/ESPlayer/src/storage/ESPlayerLocalStorageManager.ts +97 -0
- package/rules/.source/ESPlayer/src/storage/ESPlayerLocalStorageModule.android.ts +111 -0
- package/rules/.source/ESPlayer/src/storage/ESPlayerLocalStorageModule.harmony.ts +111 -0
- package/rules/.source/ESPlayer/src/storage/ESPlayerLocalStorageModule.ts +21 -0
- package/rules/.source/ESPlayer/src/type/ESPlayerType.ts +18 -0
- package/rules/.source/ESPlayer/src/type/ESPlayerTypeManager.ts +81 -0
- package/rules/.source/ESPlayer/src/useApi.ts +108 -0
- package/rules/.source/ESPlayer/src/view/ESIPlayerView.ts +120 -0
- package/rules/.source/ESPlayer/src/view/ESPlayerDefaultView.ts +127 -0
- package/rules/.source/ESPlayer/src/view/ESPlayerViewManager.ts +453 -0
- package/rules/.source/ESPlayer/src/volume/ESPlayerVolume.ts +4 -0
- package/rules/.source/ESPlayer/src/volume/ESPlayerVolumeManager.ts +51 -0
- package/rules/.source/ESPlayer/src/window/ESPlayerWindowType.ts +5 -0
- package/rules/.source/ESPlayer/tsconfig.json +34 -0
- package/rules/.source/ESPlayer/yarn.lock +4 -0
- package/rules/.source/ESPlayerManager/package.json +24 -0
- package/rules/.source/ESPlayerManager/rollup.config.js +33 -0
- package/rules/.source/ESPlayerManager/src/core/ESBuiltinADPlayerType.ts +9 -0
- package/rules/.source/ESPlayerManager/src/core/ESBuiltinPlayerType.ts +8 -0
- package/rules/.source/ESPlayerManager/src/core/ESIPlayerManager.ts +71 -0
- package/rules/.source/ESPlayerManager/src/core/ESMediaItem.ts +47 -0
- package/rules/.source/ESPlayerManager/src/core/ESMediaItemList.ts +11 -0
- package/rules/.source/ESPlayerManager/src/core/ESPlayerManager.ts +41 -0
- package/rules/.source/ESPlayerManager/src/core/ESPlayerManagerConfiguration.ts +6 -0
- package/rules/.source/ESPlayerManager/src/core/ESPlayerManagerErrors.ts +6 -0
- package/rules/.source/ESPlayerManager/src/event/ESPlayerManagerEventDefaultListener.ts +154 -0
- package/rules/.source/ESPlayerManager/src/event/ESPlayerManagerEventListener.ts +37 -0
- package/rules/.source/ESPlayerManager/src/event/ESPlayerManagerEventManager.ts +521 -0
- package/rules/.source/ESPlayerManager/src/index.ts +37 -0
- package/rules/.source/ESPlayerManager/src/index.vue +2676 -0
- package/rules/.source/ESPlayerManager/src/injectionSymbols.ts +16 -0
- package/rules/.source/ESPlayerManager/src/mode/ESPlayerManagerPlayModeManager.ts +27 -0
- package/rules/.source/ESPlayerManager/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/ESPlayerManager/src/useApi.ts +22 -0
- package/rules/.source/ESPlayerManager/src/utils/SparseArray.ts +103 -0
- package/rules/.source/ESPlayerManager/src/view/ESIPlayerManagerDefaultView.ts +167 -0
- package/rules/.source/ESPlayerManager/src/view/ESIPlayerManagerView.ts +44 -0
- package/rules/.source/ESPlayerManager/src/view/ESPlayerManagerViewManager.ts +517 -0
- package/rules/.source/ESPlayerManager/tsconfig.json +34 -0
- package/rules/.source/ESRouter/CHANGELOGG.md +899 -0
- package/rules/.source/ESRouter/SECURITY.md +20 -0
- package/rules/.source/ESRouter/api-extractor.json +49 -0
- package/rules/.source/ESRouter/index.js +7 -0
- package/rules/.source/ESRouter/nightwatch.conf.js +240 -0
- package/rules/.source/ESRouter/package.json +19 -0
- package/rules/.source/ESRouter/rollup.config.mjs +195 -0
- package/rules/.source/ESRouter/src/RouterLink.ts +358 -0
- package/rules/.source/ESRouter/src/RouterView.ts +794 -0
- package/rules/.source/ESRouter/src/SlotView.ts +477 -0
- package/rules/.source/ESRouter/src/config.ts +6 -0
- package/rules/.source/ESRouter/src/devtools.ts +576 -0
- package/rules/.source/ESRouter/src/encoding.ts +147 -0
- package/rules/.source/ESRouter/src/errors.ts +200 -0
- package/rules/.source/ESRouter/src/es/ESNativeRouter.android.ts +100 -0
- package/rules/.source/ESRouter/src/es/ESNativeRouter.harmony.ts +155 -0
- package/rules/.source/ESRouter/src/es/ESNativeRouter.ts +24 -0
- package/rules/.source/ESRouter/src/es/ESNativeRouterLaunchMode.ts +7 -0
- package/rules/.source/ESRouter/src/es/ESNativeRouterSplash.ts +6 -0
- package/rules/.source/ESRouter/src/global.d.ts +15 -0
- package/rules/.source/ESRouter/src/globalExtensions.ts +83 -0
- package/rules/.source/ESRouter/src/history/common.ts +237 -0
- package/rules/.source/ESRouter/src/history/es.ts +278 -0
- package/rules/.source/ESRouter/src/history/hash.ts +46 -0
- package/rules/.source/ESRouter/src/history/html5.ts +354 -0
- package/rules/.source/ESRouter/src/history/index.ts +40 -0
- package/rules/.source/ESRouter/src/history/memory.ts +127 -0
- package/rules/.source/ESRouter/src/index.ts +131 -0
- package/rules/.source/ESRouter/src/injectionSymbols.ts +91 -0
- package/rules/.source/ESRouter/src/location.ts +251 -0
- package/rules/.source/ESRouter/src/log/RouterLog.ts +90 -0
- package/rules/.source/ESRouter/src/log/info.ts +9 -0
- package/rules/.source/ESRouter/src/matcher/index.ts +533 -0
- package/rules/.source/ESRouter/src/matcher/pathMatcher.ts +55 -0
- package/rules/.source/ESRouter/src/matcher/pathParserRanker.ts +369 -0
- package/rules/.source/ESRouter/src/matcher/pathTokenizer.ts +200 -0
- package/rules/.source/ESRouter/src/matcher/types.ts +131 -0
- package/rules/.source/ESRouter/src/navigationGuards.ts +409 -0
- package/rules/.source/ESRouter/src/page/PageRouteView.ts +11 -0
- package/rules/.source/ESRouter/src/page/PageView.ts +12 -0
- package/rules/.source/ESRouter/src/query.ts +149 -0
- package/rules/.source/ESRouter/src/result/RouteResult.ts +11 -0
- package/rules/.source/ESRouter/src/result/RouteResultCallback.ts +5 -0
- package/rules/.source/ESRouter/src/router.ts +1930 -0
- package/rules/.source/ESRouter/src/scrollBehavior.ts +194 -0
- package/rules/.source/ESRouter/src/slot/SlotRootView.ts +11 -0
- package/rules/.source/ESRouter/src/slot/SlotView.ts +11 -0
- package/rules/.source/ESRouter/src/types/index.ts +605 -0
- package/rules/.source/ESRouter/src/types/typeGuards.ts +9 -0
- package/rules/.source/ESRouter/src/types/utils.ts +77 -0
- package/rules/.source/ESRouter/src/useApi.ts +29 -0
- package/rules/.source/ESRouter/src/utils/callbacks.ts +24 -0
- package/rules/.source/ESRouter/src/utils/env.ts +1 -0
- package/rules/.source/ESRouter/src/utils/index.ts +60 -0
- package/rules/.source/ESRouter/src/warning.ts +9 -0
- package/rules/.source/ESRouter/tsconfig.json +37 -0
- package/rules/.source/ESSoundPoolPlayer/package.json +23 -0
- package/rules/.source/ESSoundPoolPlayer/rollup.config.js +33 -0
- package/rules/.source/ESSoundPoolPlayer/src/core/ESSoundPoolContentType.ts +7 -0
- package/rules/.source/ESSoundPoolPlayer/src/core/ESSoundPoolStreamType.ts +15 -0
- package/rules/.source/ESSoundPoolPlayer/src/core/ESSoundPoolUsage.ts +19 -0
- package/rules/.source/ESSoundPoolPlayer/src/index.ts +19 -0
- package/rules/.source/ESSoundPoolPlayer/src/index.vue +1564 -0
- package/rules/.source/ESSoundPoolPlayer/src/module/ESSoundPoolPlayerModul.android.ts +133 -0
- package/rules/.source/ESSoundPoolPlayer/src/module/ESSoundPoolPlayerModul.harmony.ts +119 -0
- package/rules/.source/ESSoundPoolPlayer/src/module/ESSoundPoolPlayerModule.ts +48 -0
- package/rules/.source/ESSoundPoolPlayer/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/ESSoundPoolPlayer/tsconfig.json +34 -0
- package/rules/.source/ESVideoPlayer/package.json +26 -0
- package/rules/.source/ESVideoPlayer/rollup.config.js +33 -0
- package/rules/.source/ESVideoPlayer/src/component/ESVideoPlayerViewComponent.android.ts +948 -0
- package/rules/.source/ESVideoPlayer/src/component/ESVideoPlayerViewComponent.harmony.ts +763 -0
- package/rules/.source/ESVideoPlayer/src/index.ts +18 -0
- package/rules/.source/ESVideoPlayer/src/index.vue +2003 -0
- package/rules/.source/ESVideoPlayer/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/ESVideoPlayer/src/utils/ESVideoPlayerDefinitionUtils.ts +36 -0
- package/rules/.source/ESVideoPlayer/tsconfig.json +34 -0
- package/rules/.source/ESVideoPlayer/tsconfig.json.vite +0 -0
- package/rules/.source/ESVideoPlayer/tsconfig.node.json +0 -0
- package/rules/.source/ESVideoPlayer/vite.config.ts +29 -0
- package/rules/.source/ESVue/CHANGELOG.MD +201 -0
- package/rules/.source/ESVue/api-extractor.json +41 -0
- package/rules/.source/ESVue/package.json +42 -0
- package/rules/.source/ESVue/rollup.config.js +40 -0
- package/rules/.source/ESVue/src/built-in-component.ts +650 -0
- package/rules/.source/ESVue/src/config/index.ts +109 -0
- package/rules/.source/ESVue/src/global.d.ts +636 -0
- package/rules/.source/ESVue/src/hooks/lifecycle.ts +248 -0
- package/rules/.source/ESVue/src/index.ts +365 -0
- package/rules/.source/ESVue/src/modules/attrs.ts +24 -0
- package/rules/.source/ESVue/src/modules/class.ts +31 -0
- package/rules/.source/ESVue/src/modules/events.ts +119 -0
- package/rules/.source/ESVue/src/modules/patch-log.ts +39 -0
- package/rules/.source/ESVue/src/modules/style.ts +68 -0
- package/rules/.source/ESVue/src/node-ops.ts +153 -0
- package/rules/.source/ESVue/src/patch-prop.ts +93 -0
- package/rules/.source/ESVue/src/runtime/component/index.ts +83 -0
- package/rules/.source/ESVue/src/runtime/document/hippy-document.ts +56 -0
- package/rules/.source/ESVue/src/runtime/element/hippy-comment-element.ts +21 -0
- package/rules/.source/ESVue/src/runtime/element/hippy-element.ts +1623 -0
- package/rules/.source/ESVue/src/runtime/element/hippy-input-element.ts +75 -0
- package/rules/.source/ESVue/src/runtime/element/hippy-list-element.ts +306 -0
- package/rules/.source/ESVue/src/runtime/event/event-bus.ts +148 -0
- package/rules/.source/ESVue/src/runtime/event/hippy-event-dispatcher.ts +391 -0
- package/rules/.source/ESVue/src/runtime/event/hippy-event-target.ts +191 -0
- package/rules/.source/ESVue/src/runtime/event/hippy-event.ts +317 -0
- package/rules/.source/ESVue/src/runtime/native/index.ts +924 -0
- package/rules/.source/ESVue/src/runtime/node/hippy-node.ts +722 -0
- package/rules/.source/ESVue/src/runtime/node/node-log.ts +39 -0
- package/rules/.source/ESVue/src/runtime/render/index.ts +550 -0
- package/rules/.source/ESVue/src/runtime/style/css-map.ts +100 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-auto-style.ts +119 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-percent-style.ts +111 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-rem-style.ts +45 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-scale-style.ts +103 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-style.ts +24 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-variables.ts +209 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-vwvh-style.ts +65 -0
- package/rules/.source/ESVue/src/runtime/style/css-resolve-width-height-style.ts +18 -0
- package/rules/.source/ESVue/src/runtime/style/css-selectors-match.ts +295 -0
- package/rules/.source/ESVue/src/runtime/style/css-selectors.ts +1173 -0
- package/rules/.source/ESVue/src/runtime/style/index.ts +154 -0
- package/rules/.source/ESVue/src/runtime/style/log.ts +39 -0
- package/rules/.source/ESVue/src/runtime/style/parser.ts +291 -0
- package/rules/.source/ESVue/src/runtime/text/hippy-text.ts +41 -0
- package/rules/.source/ESVue/src/runtime/websocket/websocket.ts +282 -0
- package/rules/.source/ESVue/src/types/index.ts +25 -0
- package/rules/.source/ESVue/src/types/native-modules/clip-board-module.ts +24 -0
- package/rules/.source/ESVue/src/types/native-modules/device-event-module.ts +24 -0
- package/rules/.source/ESVue/src/types/native-modules/http.ts +57 -0
- package/rules/.source/ESVue/src/types/native-modules/image-loader-module.ts +27 -0
- package/rules/.source/ESVue/src/types/native-modules/net-info.ts +29 -0
- package/rules/.source/ESVue/src/types/native-modules/network.ts +24 -0
- package/rules/.source/ESVue/src/types/native-modules/test-module.ts +23 -0
- package/rules/.source/ESVue/src/types/native-modules/ui-manager-module.ts +44 -0
- package/rules/.source/ESVue/src/types/native-modules/websocket.ts +49 -0
- package/rules/.source/ESVue/src/types/native-modules.ts +41 -0
- package/rules/.source/ESVue/src/types/native-node.ts +48 -0
- package/rules/.source/ESVue/src/util/event.ts +74 -0
- package/rules/.source/ESVue/src/util/i18n.ts +32 -0
- package/rules/.source/ESVue/src/util/index.ts +418 -0
- package/rules/.source/ESVue/src/util/instance.ts +77 -0
- package/rules/.source/ESVue/src/util/log.ts +39 -0
- package/rules/.source/ESVue/src/util/node.ts +152 -0
- package/rules/.source/ESVue/src/util/rem.ts +54 -0
- package/rules/.source/ESVue/src/util/screen.ts +42 -0
- package/rules/.source/ESVue/tsconfig.json +34 -0
- package/rules/.source/ESVue/tsdoc.json +6 -0
- package/rules/.source/ESVue/yarn.lock +4 -0
- package/rules/.source/ESVueCssLoader/package.json +27 -0
- package/rules/.source/ESVueCssLoader/rollup.config.js +20 -0
- package/rules/.source/ESVueCssLoader/src/index.ts +2 -0
- package/rules/.source/ESVueCssLoader/src/log/log.ts +38 -0
- package/rules/.source/ESVueCssLoader/src/style-parser/color-parser.ts +357 -0
- package/rules/.source/ESVueCssLoader/src/style-parser/css-loader.ts +93 -0
- package/rules/.source/ESVueCssLoader/src/style-parser/css-parser.ts +1123 -0
- package/rules/.source/ESVueCssLoader/src/types.ts +5 -0
- package/rules/.source/ESVueCssLoader/src/utils/utils.ts +59 -0
- package/rules/.source/ESVueCssLoader/tsconfig.json +34 -0
- package/rules/.source/ESVueStyleParser/api-extractor.json +38 -0
- package/rules/.source/ESVueStyleParser/package.json +24 -0
- package/rules/.source/ESVueStyleParser/rollup.config.js +28 -0
- package/rules/.source/ESVueStyleParser/src/index.ts +24 -0
- package/rules/.source/ESVueStyleParser/src/style-parser/android-color-parser.ts +143 -0
- package/rules/.source/ESVueStyleParser/src/style-parser/color-parser.ts +256 -0
- package/rules/.source/ESVueStyleParser/src/style-parser/css-parser.ts +1371 -0
- package/rules/.source/ESVueStyleParser/src/style-parser/named-colors.ts +154 -0
- package/rules/.source/ESVueStyleParser/src/style-parser/utils.ts +55 -0
- package/rules/.source/ESVueStyleParser/src/types.ts +5 -0
- package/rules/.source/ESVueStyleParser/tsconfig.json +34 -0
- package/rules/.source/component/package.json +24 -0
- package/rules/.source/component/rollup.config.js +28 -0
- package/rules/.source/component/src/ESAnimationView/ESAnimationViewComponent.ts +51 -0
- package/rules/.source/component/src/ESAppIconView/ESAppIconViewComponent.ts +46 -0
- package/rules/.source/component/src/ESAppIconView/ESIAppIcon.ts +5 -0
- package/rules/.source/component/src/ESCardView/ESCardContainerViewComponent.ts +127 -0
- package/rules/.source/component/src/ESCardView/ESCardEvent.ts +3 -0
- package/rules/.source/component/src/ESCardView/ESCardViewComponent.ts +54 -0
- package/rules/.source/component/src/ESCardView/ESICard.ts +9 -0
- package/rules/.source/component/src/ESCardView/ESICardContainer.ts +25 -0
- package/rules/.source/component/src/ESChartView/ESBarChartViewComponent.ts +35 -0
- package/rules/.source/component/src/ESChartView/ESIChart.ts +3 -0
- package/rules/.source/component/src/ESChartView/ESLineChartViewComponent.ts +35 -0
- package/rules/.source/component/src/ESDialog/ESDialogComponent.ts +15 -0
- package/rules/.source/component/src/ESFastSwiperSlideView/ESFastSwiperSlideViewComponent.ts +46 -0
- package/rules/.source/component/src/ESFlexView/ESFlexViewComponent.ts +22 -0
- package/rules/.source/component/src/ESGradient/ESGradient.ts +14 -0
- package/rules/.source/component/src/ESGradient/ESGradientOrientation.ts +10 -0
- package/rules/.source/component/src/ESGradient/ESGradientShape.ts +6 -0
- package/rules/.source/component/src/ESGradient/ESGradientType.ts +5 -0
- package/rules/.source/component/src/ESItem/ESItemComponent.ts +40 -0
- package/rules/.source/component/src/ESItemStoreView/ESItemStoreViewComponent.ts +23 -0
- package/rules/.source/component/src/ESLargeListView/ESLargeListViewComponent.ts +136 -0
- package/rules/.source/component/src/ESLoading/ESLoadingViewComponent.ts +16 -0
- package/rules/.source/component/src/ESLoading/ESLoadingViewElement.android.ts +11 -0
- package/rules/.source/component/src/ESLoading/ESLoadingViewElement.harmony.ts +11 -0
- package/rules/.source/component/src/ESLottieView/ESLottieViewComponent.android.ts +29 -0
- package/rules/.source/component/src/ESLottieView/ESLottieViewComponent.harmony.ts +29 -0
- package/rules/.source/component/src/ESMediaSeries/ESIMediaSeries.ts +24 -0
- package/rules/.source/component/src/ESMediaSeries/ESMediaSeries.ts +6 -0
- package/rules/.source/component/src/ESMediaSeries/ESMediaSeriesComponent.ts +142 -0
- package/rules/.source/component/src/ESOrientationSeekBar/ESHorizontalSeekBarViewComponent.ts +1305 -0
- package/rules/.source/component/src/ESOrientationSeekBar/ESIHorizontalSeekBar.ts +255 -0
- package/rules/.source/component/src/ESOrientationSeekBar/ESIVerticalSeekBar.ts +13 -0
- package/rules/.source/component/src/ESOrientationSeekBar/ESVerticalSeekBarViewComponent.ts +1356 -0
- package/rules/.source/component/src/ESPlayMarkView/ESPlayMarkViewComponent.ts +21 -0
- package/rules/.source/component/src/ESPluginView/ESPluginViewComponent.ts +34 -0
- package/rules/.source/component/src/ESProgressBarView/ESProgressBarViewComponent.ts +38 -0
- package/rules/.source/component/src/ESQRCodeView/ESQRCodeViewComponent.ts +11 -0
- package/rules/.source/component/src/ESReplaceChildView/ESReplaceChildViewComponent.ts +151 -0
- package/rules/.source/component/src/ESRippleView/ESRippleViewComponent.ts +45 -0
- package/rules/.source/component/src/ESScrollView/ESIScrollView.ts +7 -0
- package/rules/.source/component/src/ESScrollView/ESScrollViewComponent.ts +49 -0
- package/rules/.source/component/src/ESSeekBarView/ESSeekBarViewElement.android.ts +38 -0
- package/rules/.source/component/src/ESSeekBarView/ESSeekBarViewElement.harmony.ts +38 -0
- package/rules/.source/component/src/ESSurfaceView/ESSurfaceViewComponent.ts +21 -0
- package/rules/.source/component/src/ESSwiftListView/ESSwiftListViewComponent.ts +117 -0
- package/rules/.source/component/src/ESSwiperSlideView/ESSwiperSlideViewComponent.ts +31 -0
- package/rules/.source/component/src/ESSwiperView/ESSwiperViewComponent.ts +82 -0
- package/rules/.source/component/src/ESTVItemView/ESTVItemViewComponent.ts +185 -0
- package/rules/.source/component/src/ESTVListView/ESIListView.ts +184 -0
- package/rules/.source/component/src/ESTVListView/ESListInitPosition.ts +15 -0
- package/rules/.source/component/src/ESTVListView/ESListViewItem.ts +10 -0
- package/rules/.source/component/src/ESTVListView/ESListViewItemDecoration.ts +7 -0
- package/rules/.source/component/src/ESTVListView/ESListViewItemFunctionParams.ts +7 -0
- package/rules/.source/component/src/ESTVListView/ESTVListViewComponent.ts +697 -0
- package/rules/.source/component/src/ESTabsView/ESITab.ts +90 -0
- package/rules/.source/component/src/ESTabsView/ESTab.ts +7 -0
- package/rules/.source/component/src/ESTabsView/ESTabItem.ts +8 -0
- package/rules/.source/component/src/ESTabsView/ESTabsViewComponent.ts +383 -0
- package/rules/.source/component/src/ESTestView/ESITestAView.ts +1 -0
- package/rules/.source/component/src/ESTestView/ESITestGroup.ts +3 -0
- package/rules/.source/component/src/ESTestView/ESITestView.ts +3 -0
- package/rules/.source/component/src/ESTestView/ESTestAViewComponent.ts +34 -0
- package/rules/.source/component/src/ESTestView/ESTestGroupComponent.ts +39 -0
- package/rules/.source/component/src/ESTestView/ESTestViewComponent.ts +51 -0
- package/rules/.source/component/src/ESTextView/ESTextViewComponent.ts +22 -0
- package/rules/.source/component/src/ESTransitionImageView/ESITransitionImage.ts +7 -0
- package/rules/.source/component/src/ESTransitionImageView/ESTransitionImageViewComponent.ts +58 -0
- package/rules/.source/component/src/ESView/ESDirections.ts +7 -0
- package/rules/.source/component/src/ESView/ESIView.ts +6 -0
- package/rules/.source/component/src/ESView/ESViewComponent.ts +24 -0
- package/rules/.source/component/src/ESView/ESViewCoordinate.ts +4 -0
- package/rules/.source/component/src/ESView/ESViewScrollState.ts +5 -0
- package/rules/.source/component/src/ESView/ESViewState.ts +16 -0
- package/rules/.source/component/src/ESView/ESViewStateCallback.ts +5 -0
- package/rules/.source/component/src/ESViewPager/ESIViewPager.ts +8 -0
- package/rules/.source/component/src/ESViewPager/ESPageData.ts +7 -0
- package/rules/.source/component/src/ESViewPager/ESViewPagerComponent.ts +58 -0
- package/rules/.source/component/src/ESWebView/ESWebViewComponent.ts +48 -0
- package/rules/.source/component/src/ESX5WebView/ESX5WebViewElement.android.ts +70 -0
- package/rules/.source/component/src/ESX5WebView/ESX5WebViewElement.harmony.ts +70 -0
- package/rules/.source/component/src/index.ts +180 -0
- package/rules/.source/component/src/tv-div/TVDivComponent.ts +131 -0
- package/rules/.source/component/src/tv-image/TVImageComponent.ts +126 -0
- package/rules/.source/component/src/tv-li/TVLiComponent.ts +10 -0
- package/rules/.source/component/src/tv-swiper/TVSwiperComponent.ts +110 -0
- package/rules/.source/component/src/tv-ul/TVULComponent.ts +82 -0
- package/rules/.source/component/src/typings/index.ts +7 -0
- package/rules/.source/component/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/component/tsconfig.json +34 -0
- package/rules/.source/quicktvui/assets/ic_media_sereis_vip.png +0 -0
- package/rules/.source/quicktvui/package.json +38 -0
- package/rules/.source/quicktvui/rollup.config.js +33 -0
- package/rules/.source/quicktvui/src/animation/QTAnimation.android.ts +1139 -0
- package/rules/.source/quicktvui/src/animation/QTAnimation.harmony.ts +1088 -0
- package/rules/.source/quicktvui/src/animation/QTIAnimation.ts +336 -0
- package/rules/.source/quicktvui/src/animation/QtAnimationAPI.ts +467 -0
- package/rules/.source/quicktvui/src/animation/types.ts +97 -0
- package/rules/.source/quicktvui/src/app/QTAppIcon.ts +41 -0
- package/rules/.source/quicktvui/src/app/QTIAppIcon.ts +5 -0
- package/rules/.source/quicktvui/src/app/QtAppIconAPI.ts +56 -0
- package/rules/.source/quicktvui/src/assets/vip.png +0 -0
- package/rules/.source/quicktvui/src/base/QTIBaseView.ts +95 -0
- package/rules/.source/quicktvui/src/base/QtBaseNativeViewAPI.ts +604 -0
- package/rules/.source/quicktvui/src/base/QtBaseViewAPI.ts +750 -0
- package/rules/.source/quicktvui/src/base/useBaseView.ts +374 -0
- package/rules/.source/quicktvui/src/button/QTIButton.ts +3 -0
- package/rules/.source/quicktvui/src/button/QtButtonAPI.ts +9 -0
- package/rules/.source/quicktvui/src/button/index.vue +223 -0
- package/rules/.source/quicktvui/src/canvas/CanvasGradient.ts +84 -0
- package/rules/.source/quicktvui/src/canvas/QTCanvasView.ts +468 -0
- package/rules/.source/quicktvui/src/canvas/QTICanvasView.ts +141 -0
- package/rules/.source/quicktvui/src/canvas/QtCanvasViewAPI.ts +1140 -0
- package/rules/.source/quicktvui/src/classified-list-view/QtClassifiedListViewAPI.ts +115 -0
- package/rules/.source/quicktvui/src/classified-list-view/core/QTClassifiedListViewItem.ts +11 -0
- package/rules/.source/quicktvui/src/classified-list-view/core/QTClassifiedListViewItemDecoration.ts +7 -0
- package/rules/.source/quicktvui/src/classified-list-view/core/QTIClassifiedListView.ts +18 -0
- package/rules/.source/quicktvui/src/classified-list-view/index.vue +520 -0
- package/rules/.source/quicktvui/src/collapse/QtCollapseAPI.ts +60 -0
- package/rules/.source/quicktvui/src/collapse/core/QTCollapse.ts +13 -0
- package/rules/.source/quicktvui/src/collapse/core/QTCollapseItem.ts +7 -0
- package/rules/.source/quicktvui/src/collapse/core/QTICollapse.ts +15 -0
- package/rules/.source/quicktvui/src/collapse/core/QTICollapseItem.ts +5 -0
- package/rules/.source/quicktvui/src/collapse/index.vue +337 -0
- package/rules/.source/quicktvui/src/column/QTIColumn.ts +3 -0
- package/rules/.source/quicktvui/src/column/QtColumnAPI.ts +9 -0
- package/rules/.source/quicktvui/src/column/index.vue +29 -0
- package/rules/.source/quicktvui/src/core/QTEventData.ts +4 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleBackground.ts +4 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleCoordinate.ts +5 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleDecoration.ts +7 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleGradientBackground.ts +6 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleMargin.ts +8 -0
- package/rules/.source/quicktvui/src/core/QTFlexStylePadding.ts +8 -0
- package/rules/.source/quicktvui/src/core/QTFlexStylePosition.ts +7 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleSize.ts +6 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleSpacing.ts +4 -0
- package/rules/.source/quicktvui/src/core/QTFlexStyleText.ts +5 -0
- package/rules/.source/quicktvui/src/core/QTFocusable.ts +5 -0
- package/rules/.source/quicktvui/src/core/QTLocation.ts +4 -0
- package/rules/.source/quicktvui/src/core/QTNativeParams.ts +22 -0
- package/rules/.source/quicktvui/src/core/QTPosition.ts +4 -0
- package/rules/.source/quicktvui/src/core/QTVisibility.ts +5 -0
- package/rules/.source/quicktvui/src/dialog/QTDialog.ts +28 -0
- package/rules/.source/quicktvui/src/dialog/QTIDialog.ts +3 -0
- package/rules/.source/quicktvui/src/file-browse/QTFileBrowse.ts +76 -0
- package/rules/.source/quicktvui/src/file-browse/QTIFileBrowse.ts +13 -0
- package/rules/.source/quicktvui/src/focus/QTDescendantFocusability.ts +5 -0
- package/rules/.source/quicktvui/src/focus/QTFocusDescendant.ts +5 -0
- package/rules/.source/quicktvui/src/focus/QTFocusDirection.ts +8 -0
- package/rules/.source/quicktvui/src/focus/QTFocusDirectionName.ts +7 -0
- package/rules/.source/quicktvui/src/gradient/QTGradient.ts +14 -0
- package/rules/.source/quicktvui/src/gradient/QTGradientOrientation.ts +10 -0
- package/rules/.source/quicktvui/src/gradient/QTGradientShape.ts +6 -0
- package/rules/.source/quicktvui/src/gradient/QTGradientType.ts +5 -0
- package/rules/.source/quicktvui/src/grid-view/QtGridViewAPI.ts +121 -0
- package/rules/.source/quicktvui/src/grid-view/README.md +93 -0
- package/rules/.source/quicktvui/src/grid-view/core/QTGridViewItem.ts +4 -0
- package/rules/.source/quicktvui/src/grid-view/core/QTGridViewItemDecoration.ts +7 -0
- package/rules/.source/quicktvui/src/grid-view/core/QTGridViewItemFunctionParams.ts +7 -0
- package/rules/.source/quicktvui/src/grid-view/core/QTIGridView.ts +23 -0
- package/rules/.source/quicktvui/src/grid-view/index.vue +390 -0
- package/rules/.source/quicktvui/src/image/QTIImage.ts +8 -0
- package/rules/.source/quicktvui/src/image/QTImageResizeMode.ts +7 -0
- package/rules/.source/quicktvui/src/image/QtImageAPI.ts +54 -0
- package/rules/.source/quicktvui/src/image/index.vue +33 -0
- package/rules/.source/quicktvui/src/index.ts +404 -0
- package/rules/.source/quicktvui/src/list/QTIBaseListView.ts +144 -0
- package/rules/.source/quicktvui/src/list/QTListInitPosition.ts +15 -0
- package/rules/.source/quicktvui/src/list/QtBaseListViewAPI.ts +930 -0
- package/rules/.source/quicktvui/src/list/useBaseListView.ts +454 -0
- package/rules/.source/quicktvui/src/list/useListView.ts +294 -0
- package/rules/.source/quicktvui/src/list-indicator/QTIndicatorListViewComponent.ts +553 -0
- package/rules/.source/quicktvui/src/list-indicator/QtIndicatorViewAPI.ts +114 -0
- package/rules/.source/quicktvui/src/list-indicator/core/QTIIndicatorView.ts +21 -0
- package/rules/.source/quicktvui/src/list-item/ESListItemComponent.ts +86 -0
- package/rules/.source/quicktvui/src/list-item/QTIListItem.ts +14 -0
- package/rules/.source/quicktvui/src/list-item/QtListItemAPI.ts +107 -0
- package/rules/.source/quicktvui/src/list-view/QTListViewComponent.ts +389 -0
- package/rules/.source/quicktvui/src/list-view/QtListViewAPI.ts +101 -0
- package/rules/.source/quicktvui/src/list-view/core/QTIListView.ts +19 -0
- package/rules/.source/quicktvui/src/list-view/core/QTListViewItem.ts +12 -0
- package/rules/.source/quicktvui/src/list-view/core/QTListViewItemDecoration.ts +7 -0
- package/rules/.source/quicktvui/src/list-view/core/QTListViewItemFunctionParams.ts +7 -0
- package/rules/.source/quicktvui/src/list-view/core/QTListViewItemState.ts +8 -0
- package/rules/.source/quicktvui/src/loading/QTILoadingView.ts +3 -0
- package/rules/.source/quicktvui/src/loading/QTLoadingView.ts +25 -0
- package/rules/.source/quicktvui/src/loading/QtLoadingAPI.ts +9 -0
- package/rules/.source/quicktvui/src/long-image/QTILongImage.ts +68 -0
- package/rules/.source/quicktvui/src/long-image/QTLongImage.ts +442 -0
- package/rules/.source/quicktvui/src/long-image/QTLongImageEventBean.ts +62 -0
- package/rules/.source/quicktvui/src/long-image/QTLongImageOrientation.ts +19 -0
- package/rules/.source/quicktvui/src/long-image/QTLongImagePositionType.ts +5 -0
- package/rules/.source/quicktvui/src/long-image/QTLongImageScaleType.ts +9 -0
- package/rules/.source/quicktvui/src/long-image/QtLongImageAPI.ts +9 -0
- package/rules/.source/quicktvui/src/long-image/index.vue +397 -0
- package/rules/.source/quicktvui/src/lottie/QTILottieView.ts +62 -0
- package/rules/.source/quicktvui/src/lottie/QTLottieAsyncUpdates.ts +5 -0
- package/rules/.source/quicktvui/src/lottie/QTLottieEvent.ts +5 -0
- package/rules/.source/quicktvui/src/lottie/QTLottieRenderMode.ts +5 -0
- package/rules/.source/quicktvui/src/lottie/QTLottieRepeatMode.ts +5 -0
- package/rules/.source/quicktvui/src/lottie/QTLottieView.android.ts +207 -0
- package/rules/.source/quicktvui/src/lottie/QTLottieView.harmony.ts +207 -0
- package/rules/.source/quicktvui/src/lottie/QtLottieViewAPI.ts +586 -0
- package/rules/.source/quicktvui/src/nav-bar/QTINavBar.ts +11 -0
- package/rules/.source/quicktvui/src/nav-bar/QTNavBar.ts +9 -0
- package/rules/.source/quicktvui/src/nav-bar/QTNavBarItem.ts +9 -0
- package/rules/.source/quicktvui/src/nav-bar/QTNavBarItemType.ts +3 -0
- package/rules/.source/quicktvui/src/nav-bar/QtNavBarAPI.ts +36 -0
- package/rules/.source/quicktvui/src/nav-bar/index.vue +220 -0
- package/rules/.source/quicktvui/src/plugin/QTIPluginView.ts +11 -0
- package/rules/.source/quicktvui/src/plugin/QTPluginView.ts +49 -0
- package/rules/.source/quicktvui/src/plugin/QtPluginViewAPI.ts +44 -0
- package/rules/.source/quicktvui/src/poster/QtPosterAPI.ts +9 -0
- package/rules/.source/quicktvui/src/poster/core/QTIPoster.ts +3 -0
- package/rules/.source/quicktvui/src/poster/core/QTPoster.ts +32 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterCorner.ts +9 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterElement.ts +8 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterImage.ts +7 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterPlaceholderImg.ts +4 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterRipple.ts +10 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterScore.ts +14 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterShadow.ts +4 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterShimmer.ts +4 -0
- package/rules/.source/quicktvui/src/poster/core/QTPosterTitle.ts +17 -0
- package/rules/.source/quicktvui/src/poster/index.vue +279 -0
- package/rules/.source/quicktvui/src/poster/qt-poster-corner-title.vue +69 -0
- package/rules/.source/quicktvui/src/poster/qt-poster-focus-title.vue +113 -0
- package/rules/.source/quicktvui/src/progressbar/QTIProgressBar.ts +264 -0
- package/rules/.source/quicktvui/src/progressbar/QTProgressBar.ts +1284 -0
- package/rules/.source/quicktvui/src/progressbar/QtProgressBarAPI.ts +2637 -0
- package/rules/.source/quicktvui/src/qrcode/QTIQRCode.ts +3 -0
- package/rules/.source/quicktvui/src/qrcode/QTQRCodeView.ts +24 -0
- package/rules/.source/quicktvui/src/qrcode/QtQRCodeAPI.ts +9 -0
- package/rules/.source/quicktvui/src/qt/QtAPI.ts +337 -0
- package/rules/.source/quicktvui/src/qt/QtAPIModule.ts +3 -0
- package/rules/.source/quicktvui/src/qt/warning.ts +9 -0
- package/rules/.source/quicktvui/src/qtListen/README.md +76 -0
- package/rules/.source/quicktvui/src/qtListen/effect.ts +141 -0
- package/rules/.source/quicktvui/src/qtListen/index.ts +11 -0
- package/rules/.source/quicktvui/src/qtListen/qtArray.ts +156 -0
- package/rules/.source/quicktvui/src/qtListen/qtDiff.ts +143 -0
- package/rules/.source/quicktvui/src/qtListen/reactive.ts +205 -0
- package/rules/.source/quicktvui/src/qtListen/ref.ts +98 -0
- package/rules/.source/quicktvui/src/qtListen/types.ts +311 -0
- package/rules/.source/quicktvui/src/qtListen/watch.ts +233 -0
- package/rules/.source/quicktvui/src/replace-child/QTIReplaceChildView.ts +5 -0
- package/rules/.source/quicktvui/src/replace-child/QTReplaceChildView.ts +30 -0
- package/rules/.source/quicktvui/src/replace-child/QtReplaceChildViewAPI.ts +37 -0
- package/rules/.source/quicktvui/src/row/QTIRow.ts +3 -0
- package/rules/.source/quicktvui/src/row/QtRowAPI.ts +9 -0
- package/rules/.source/quicktvui/src/row/index.vue +29 -0
- package/rules/.source/quicktvui/src/scroll-view/QTIScrollView.ts +7 -0
- package/rules/.source/quicktvui/src/scroll-view/QTScrollView.ts +45 -0
- package/rules/.source/quicktvui/src/scroll-view/QtScrollViewAPI.ts +62 -0
- package/rules/.source/quicktvui/src/section/index.vue +40 -0
- package/rules/.source/quicktvui/src/seekbar/QTISeekBar.ts +277 -0
- package/rules/.source/quicktvui/src/seekbar/QTSeekBar.ts +1380 -0
- package/rules/.source/quicktvui/src/seekbar/QTSeekBarGravity.ts +5 -0
- package/rules/.source/quicktvui/src/seekbar/QTSeekBarIndicatorMode.ts +6 -0
- package/rules/.source/quicktvui/src/seekbar/QTSeekBarMode.ts +4 -0
- package/rules/.source/quicktvui/src/seekbar/QTSeekBarTickMarkGravity.ts +5 -0
- package/rules/.source/quicktvui/src/seekbar/QTSeekBarTickMarkLayoutGravity.ts +4 -0
- package/rules/.source/quicktvui/src/seekbar/QTSeekBarTickMarkMode.ts +4 -0
- package/rules/.source/quicktvui/src/seekbar/QtSeekBarAPI.ts +2645 -0
- package/rules/.source/quicktvui/src/series/DataAdapter.ts +329 -0
- package/rules/.source/quicktvui/src/series/QTIMediaSeries.ts +33 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeries.ts +9 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesData.ts +9 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesDataStyle.ts +4 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesEvent.ts +7 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesGroup.ts +8 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesGroupStyle.ts +58 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesStyleType.ts +5 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesType.ts +8 -0
- package/rules/.source/quicktvui/src/series/QTMediaSeriesVip.ts +4 -0
- package/rules/.source/quicktvui/src/series/QtMediaSeriesAPI.ts +140 -0
- package/rules/.source/quicktvui/src/series/component/media-series.vue +160 -0
- package/rules/.source/quicktvui/src/series/index.vue +316 -0
- package/rules/.source/quicktvui/src/series/item/media-series-number-item.vue +212 -0
- package/rules/.source/quicktvui/src/series/item/media-series-text-item.vue +239 -0
- package/rules/.source/quicktvui/src/tab/QTITab.ts +163 -0
- package/rules/.source/quicktvui/src/tab/QTTab.ts +8 -0
- package/rules/.source/quicktvui/src/tab/QTTabDataManager.ts +620 -0
- package/rules/.source/quicktvui/src/tab/QTTabEvent.ts +11 -0
- package/rules/.source/quicktvui/src/tab/QTTabEventParams.ts +12 -0
- package/rules/.source/quicktvui/src/tab/QTTabIndex.ts +8 -0
- package/rules/.source/quicktvui/src/tab/QTTabItem.ts +5 -0
- package/rules/.source/quicktvui/src/tab/QTTabItemType.ts +3 -0
- package/rules/.source/quicktvui/src/tab/QTTabPage.ts +5 -0
- package/rules/.source/quicktvui/src/tab/QTTabPageData.ts +11 -0
- package/rules/.source/quicktvui/src/tab/QTTabPageDataState.ts +8 -0
- package/rules/.source/quicktvui/src/tab/QTTabPageState.ts +8 -0
- package/rules/.source/quicktvui/src/tab/QtTabAPI.ts +578 -0
- package/rules/.source/quicktvui/src/tab/index.vue +1561 -0
- package/rules/.source/quicktvui/src/tab/useQtTabWatch.ts +203 -0
- package/rules/.source/quicktvui/src/text/QTIText.ts +12 -0
- package/rules/.source/quicktvui/src/text/QTTextSpan.ts +6 -0
- package/rules/.source/quicktvui/src/text/QTTextSpanAttribute.ts +6 -0
- package/rules/.source/quicktvui/src/text/QTTextSpanAttributeType.ts +4 -0
- package/rules/.source/quicktvui/src/text/QtTextAPI.ts +90 -0
- package/rules/.source/quicktvui/src/text/index.vue +44 -0
- package/rules/.source/quicktvui/src/theme/button.css +195 -0
- package/rules/.source/quicktvui/src/typings/shims-vue.d.ts +6 -0
- package/rules/.source/quicktvui/src/ul/QTIUL.ts +34 -0
- package/rules/.source/quicktvui/src/ul/QTULInitPosition.ts +3 -0
- package/rules/.source/quicktvui/src/ul/QtULAPI.ts +232 -0
- package/rules/.source/quicktvui/src/utils/QtVirtualViewAPI.ts +32 -0
- package/rules/.source/quicktvui/src/utils/VirtualView.ts +124 -0
- package/rules/.source/quicktvui/src/utils/functions.ts +1 -0
- package/rules/.source/quicktvui/src/utils/index.ts +3 -0
- package/rules/.source/quicktvui/src/utils/make-installer.ts +16 -0
- package/rules/.source/quicktvui/src/utils/objects.ts +4 -0
- package/rules/.source/quicktvui/src/utils/type.ts +1 -0
- package/rules/.source/quicktvui/src/utils/types.ts +42 -0
- package/rules/.source/quicktvui/src/utils/utils.ts +62 -0
- package/rules/.source/quicktvui/src/utils/vue/index.ts +3 -0
- package/rules/.source/quicktvui/src/utils/vue/install.ts +48 -0
- package/rules/.source/quicktvui/src/utils/vue/props/index.ts +3 -0
- package/rules/.source/quicktvui/src/utils/vue/props/runtime.ts +129 -0
- package/rules/.source/quicktvui/src/utils/vue/props/types.ts +165 -0
- package/rules/.source/quicktvui/src/utils/vue/props/util.ts +10 -0
- package/rules/.source/quicktvui/src/utils/vue/typescript.ts +9 -0
- package/rules/.source/quicktvui/src/view/QTIView.ts +3 -0
- package/rules/.source/quicktvui/src/view/QTIViewVisibility.ts +5 -0
- package/rules/.source/quicktvui/src/view/QTViewEvent.ts +3 -0
- package/rules/.source/quicktvui/src/view/QTViewState.ts +12 -0
- package/rules/.source/quicktvui/src/view/QtViewAPI.ts +9 -0
- package/rules/.source/quicktvui/src/view/index.vue +24 -0
- package/rules/.source/quicktvui/src/waterfall/QtWaterfallAPI.ts +219 -0
- package/rules/.source/quicktvui/src/waterfall/README.md +143 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTIWaterfall.ts +49 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTScrollState.ts +5 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfall.ts +13 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallCardItem.ts +11 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallCardPlaceHolder.ts +10 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallCardSection.ts +12 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallDataAdapter.ts +195 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallDataManager.ts +305 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallEvent.ts +11 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallFlexStyle.ts +19 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallIndex.ts +7 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallItem.ts +9 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallItemType.ts +7 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallPlaceholder.ts +5 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallPluginItem.ts +9 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallPluginSection.ts +8 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallSection.ts +17 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallSectionType.ts +14 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallTabItem.ts +10 -0
- package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallVisibleType.ts +7 -0
- package/rules/.source/quicktvui/src/waterfall/index.vue +704 -0
- package/rules/.source/quicktvui/src/waterfall/item/card-item.vue +49 -0
- package/rules/.source/quicktvui/src/waterfall/item/plugin-item.vue +52 -0
- package/rules/.source/quicktvui/src/waterfall/section/blank-section.vue +27 -0
- package/rules/.source/quicktvui/src/waterfall/section/card-section.vue +81 -0
- package/rules/.source/quicktvui/src/waterfall/section/end-section.vue +50 -0
- package/rules/.source/quicktvui/src/waterfall/section/flex-section.vue +167 -0
- package/rules/.source/quicktvui/src/waterfall/section/list-section.vue +247 -0
- package/rules/.source/quicktvui/src/waterfall/section/loading-section.vue +34 -0
- package/rules/.source/quicktvui/src/waterfall/section/plugin-section.vue +87 -0
- package/rules/.source/quicktvui/src/waterfall/section/section-title.vue +63 -0
- package/rules/.source/quicktvui/src/waterfall/section/vue-section.vue +44 -0
- package/rules/.source/quicktvui/src/webview/QTIWebView.ts +199 -0
- package/rules/.source/quicktvui/src/webview/QTWebView.ts +957 -0
- package/rules/.source/quicktvui/src/webview/QTWebViewInterceptRule.ts +4 -0
- package/rules/.source/quicktvui/src/webview/QTWebViewLayerType.ts +6 -0
- package/rules/.source/quicktvui/src/webview/QTWebViewSniffingRule.ts +18 -0
- package/rules/.source/quicktvui/src/webview/QtWebViewAPI.ts +1963 -0
- package/rules/.source/quicktvui/src/x5webview/QTIX5WebView.ts +211 -0
- package/rules/.source/quicktvui/src/x5webview/QTX5WebView.ts +1014 -0
- package/rules/.source/quicktvui/src/x5webview/QTX5WebViewInterceptRule.ts +4 -0
- package/rules/.source/quicktvui/src/x5webview/QTX5WebViewLayerType.ts +6 -0
- package/rules/.source/quicktvui/src/x5webview/QTX5WebViewSniffingRule.ts +18 -0
- package/rules/.source/quicktvui/src/x5webview/QtX5WebViewAPI.ts +2015 -0
- package/rules/.source/quicktvui/tsconfig.json +34 -0
- package/rules/.source/quicktvui/web-types.json +1 -0
- package/rules/.source/quicktvui/yarn.lock +72 -0
- package/rules/.source/web/audio/index.ts +9 -0
- package/rules/.source/web/audio/src/audio.ts +34 -0
- package/rules/.source/web/audio/src/audio.vue +146 -0
- package/rules/.source/web/audio/src/instance.ts +3 -0
- package/rules/.source/web/audio-service/index.ts +10 -0
- package/rules/.source/web/audio-service/src/audio-service.ts +34 -0
- package/rules/.source/web/audio-service/src/audio-service.vue +115 -0
- package/rules/.source/web/audio-service/src/instance.ts +3 -0
- package/rules/.source/web/base/index.ts +1 -0
- package/rules/.source/web/base/src/base-types.ts +1 -0
- package/rules/.source/web/component.ts +25 -0
- package/rules/.source/web/docs/h.txt +6 -0
- package/rules/.source/web/docs/video.txt +88 -0
- package/rules/.source/web/h1/index.ts +9 -0
- package/rules/.source/web/h1/src/h1.ts +9 -0
- package/rules/.source/web/h1/src/h1.vue +30 -0
- package/rules/.source/web/h1/src/instance.ts +3 -0
- package/rules/.source/web/h2/index.ts +9 -0
- package/rules/.source/web/h2/src/h2.ts +9 -0
- package/rules/.source/web/h2/src/h2.vue +30 -0
- package/rules/.source/web/h2/src/instance.ts +3 -0
- package/rules/.source/web/h3/index.ts +9 -0
- package/rules/.source/web/h3/src/h3.ts +9 -0
- package/rules/.source/web/h3/src/h3.vue +30 -0
- package/rules/.source/web/h3/src/instance.ts +3 -0
- package/rules/.source/web/h4/index.ts +9 -0
- package/rules/.source/web/h4/src/h4.ts +9 -0
- package/rules/.source/web/h4/src/h4.vue +30 -0
- package/rules/.source/web/h4/src/instance.ts +3 -0
- package/rules/.source/web/h5/index.ts +9 -0
- package/rules/.source/web/h5/src/h5.ts +9 -0
- package/rules/.source/web/h5/src/h5.vue +30 -0
- package/rules/.source/web/h5/src/instance.ts +3 -0
- package/rules/.source/web/h6/index.ts +9 -0
- package/rules/.source/web/h6/src/h6.ts +9 -0
- package/rules/.source/web/h6/src/h6.vue +30 -0
- package/rules/.source/web/h6/src/instance.ts +3 -0
- package/rules/.source/web/index.ts +84 -0
- package/rules/.source/web/package.json +24 -0
- package/rules/.source/web/plugin.ts +3 -0
- package/rules/.source/web/rollup.config.js +37 -0
- package/rules/.source/web/shims-vue.d.ts +6 -0
- package/rules/.source/web/source/index.ts +9 -0
- package/rules/.source/web/source/src/instance.ts +3 -0
- package/rules/.source/web/source/src/source.ts +17 -0
- package/rules/.source/web/source/src/source.vue +19 -0
- package/rules/.source/web/tsconfig.json +34 -0
- package/rules/.source/web/utils/functions.ts +1 -0
- package/rules/.source/web/utils/index.ts +3 -0
- package/rules/.source/web/utils/make-installer.ts +16 -0
- package/rules/.source/web/utils/objects.ts +4 -0
- package/rules/.source/web/utils/types.ts +42 -0
- package/rules/.source/web/utils/vue/index.ts +3 -0
- package/rules/.source/web/utils/vue/install.ts +48 -0
- package/rules/.source/web/utils/vue/props/index.ts +3 -0
- package/rules/.source/web/utils/vue/props/runtime.ts +129 -0
- package/rules/.source/web/utils/vue/props/types.ts +165 -0
- package/rules/.source/web/utils/vue/props/util.ts +10 -0
- package/rules/.source/web/utils/vue/typescript.ts +9 -0
- package/rules/.source/web/video/index.ts +9 -0
- package/rules/.source/web/video/src/instance.ts +3 -0
- package/rules/.source/web/video/src/video.ts +34 -0
- package/rules/.source/web/video/src/video.vue +171 -0
- package/rules/.windsurfrules +16 -1
- package/rules/AGENTS.md +16 -1
- package/rules/CLAUDE.md +10 -1
- package/rules/GEMINI.md +44 -460
|
@@ -0,0 +1,1123 @@
|
|
|
1
|
+
import { camelize, isBorderStyle, isLength, splitLayers } from "../utils/utils";
|
|
2
|
+
import { tryConvertNumber } from "../utils/utils";
|
|
3
|
+
import { warn } from "../log/log";
|
|
4
|
+
import translateColor from "./color-parser";
|
|
5
|
+
|
|
6
|
+
const PROPERTIES_MAP: any = {
|
|
7
|
+
textDecoration: "textDecorationLine",
|
|
8
|
+
boxShadowOffset: "shadowOffset",
|
|
9
|
+
boxShadowOffsetX: "shadowOffsetX",
|
|
10
|
+
boxShadowOffsetY: "shadowOffsetY",
|
|
11
|
+
boxShadowOpacity: "shadowOpacity",
|
|
12
|
+
boxShadowRadius: "shadowRadius",
|
|
13
|
+
boxShadowSpread: "shadowSpread",
|
|
14
|
+
boxShadowColor: "shadowColor",
|
|
15
|
+
caretColor: "caret-color",
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// linear-gradient direction description map
|
|
19
|
+
const LINEAR_GRADIENT_DIRECTION_MAP: any = {
|
|
20
|
+
totop: "0",
|
|
21
|
+
totopright: "totopright",
|
|
22
|
+
toright: "90",
|
|
23
|
+
tobottomright: "tobottomright",
|
|
24
|
+
tobottom: "180", // default value
|
|
25
|
+
tobottomleft: "tobottomleft",
|
|
26
|
+
toleft: "270",
|
|
27
|
+
totopleft: "totopleft",
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const DEGREE_UNIT = {
|
|
31
|
+
TURN: "turn",
|
|
32
|
+
RAD: "rad",
|
|
33
|
+
DEG: "deg",
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const commentRegexp = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Trim `str`.
|
|
40
|
+
*/
|
|
41
|
+
function trim(str: any) {
|
|
42
|
+
return str ? str.trim() : "";
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Adds non-enumerable parent node reference to each node.
|
|
47
|
+
*/
|
|
48
|
+
function addParent(obj: any, parent: any) {
|
|
49
|
+
const isNode = obj && typeof obj.type === "string";
|
|
50
|
+
const childParent = isNode ? obj : parent;
|
|
51
|
+
Object.keys(obj).forEach((k) => {
|
|
52
|
+
const value = obj[k];
|
|
53
|
+
if (Array.isArray(value)) {
|
|
54
|
+
value.forEach((v) => {
|
|
55
|
+
addParent(v, childParent);
|
|
56
|
+
});
|
|
57
|
+
} else if (value && typeof value === "object") {
|
|
58
|
+
addParent(value, childParent);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
if (isNode) {
|
|
62
|
+
Object.defineProperty(obj, "parent", {
|
|
63
|
+
configurable: true,
|
|
64
|
+
writable: true,
|
|
65
|
+
enumerable: false,
|
|
66
|
+
value: parent || null,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
return obj;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Convert the px unit to pt directly.
|
|
74
|
+
* We found to the behavior of convert the unit directly is correct.
|
|
75
|
+
*/
|
|
76
|
+
function convertPxUnitToPt(value: any) {
|
|
77
|
+
// If value is number just ignore
|
|
78
|
+
if (Number.isInteger(value)) {
|
|
79
|
+
return value;
|
|
80
|
+
}
|
|
81
|
+
// If value unit is rpx, don't need to filter
|
|
82
|
+
if (typeof value === "string" && value.endsWith("rpx")) {
|
|
83
|
+
return value;
|
|
84
|
+
}
|
|
85
|
+
// If value unit is px, change to use pt as 1:1.
|
|
86
|
+
if (typeof value === "string" && value.endsWith("px")) {
|
|
87
|
+
const num = parseFloat(value.slice(0, value.indexOf("px")));
|
|
88
|
+
if (!Number.isNaN(num)) {
|
|
89
|
+
value = num;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return value;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Parse the CSS to be AST tree.
|
|
97
|
+
*/
|
|
98
|
+
function parseCSS(css: any, options: any) {
|
|
99
|
+
options = options || {};
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Positional.
|
|
103
|
+
*/
|
|
104
|
+
let lineno = 1;
|
|
105
|
+
let column = 1;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Update lineno and column based on `str`.
|
|
109
|
+
*/
|
|
110
|
+
function updatePosition(str: any) {
|
|
111
|
+
const lines = str.match(/\n/g);
|
|
112
|
+
if (lines) lineno += lines.length;
|
|
113
|
+
const i = str.lastIndexOf("\n");
|
|
114
|
+
column = ~i ? str.length - i : column + str.length;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Mark position and patch `node.position`.
|
|
119
|
+
*/
|
|
120
|
+
function position() {
|
|
121
|
+
const start = { line: lineno, column };
|
|
122
|
+
return (node: any) => {
|
|
123
|
+
node.position = new Position(start);
|
|
124
|
+
whitespace();
|
|
125
|
+
return node;
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Store position information for a node
|
|
131
|
+
*/
|
|
132
|
+
class Position {
|
|
133
|
+
content: any;
|
|
134
|
+
end: any;
|
|
135
|
+
source: any;
|
|
136
|
+
start: any;
|
|
137
|
+
constructor(start: any) {
|
|
138
|
+
this.start = start;
|
|
139
|
+
this.end = { line: lineno, column };
|
|
140
|
+
this.source = options.source;
|
|
141
|
+
this.content = css;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Error `msg`.
|
|
147
|
+
*/
|
|
148
|
+
const errorsList: any = [];
|
|
149
|
+
function error(msg: any) {
|
|
150
|
+
const err = new Error(`${options.source}:${lineno}:${column}: ${msg}`);
|
|
151
|
+
(err as any).reason = msg;
|
|
152
|
+
(err as any).filename = options.source;
|
|
153
|
+
(err as any).line = lineno;
|
|
154
|
+
(err as any).column = column;
|
|
155
|
+
(err as any).source = css;
|
|
156
|
+
if (options.silent) {
|
|
157
|
+
errorsList.push(err);
|
|
158
|
+
} else {
|
|
159
|
+
throw err;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Parse stylesheet.
|
|
165
|
+
*/
|
|
166
|
+
function stylesheet() {
|
|
167
|
+
const rulesList = rules();
|
|
168
|
+
|
|
169
|
+
return {
|
|
170
|
+
type: "stylesheet",
|
|
171
|
+
stylesheet: {
|
|
172
|
+
source: options.source,
|
|
173
|
+
rules: rulesList,
|
|
174
|
+
parsingErrors: errorsList,
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Opening brace.
|
|
181
|
+
*/
|
|
182
|
+
function open() {
|
|
183
|
+
return match(/^{\s*/);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Closing brace.
|
|
188
|
+
*/
|
|
189
|
+
function close() {
|
|
190
|
+
return match(/^}/);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Parse ruleset.
|
|
195
|
+
*/
|
|
196
|
+
function rules() {
|
|
197
|
+
let node;
|
|
198
|
+
const rules: any = [];
|
|
199
|
+
whitespace();
|
|
200
|
+
comments(rules);
|
|
201
|
+
// eslint-disable-next-line no-cond-assign
|
|
202
|
+
while (css.length && css.charAt(0) !== "}" && (node = atrule() || rule())) {
|
|
203
|
+
if (node !== false) {
|
|
204
|
+
rules.push(node);
|
|
205
|
+
comments(rules);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return rules;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Match `re` and return captures.
|
|
213
|
+
*/
|
|
214
|
+
function match(re: any) {
|
|
215
|
+
const m = re.exec(css);
|
|
216
|
+
if (!m) {
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
219
|
+
const str = m[0];
|
|
220
|
+
updatePosition(str);
|
|
221
|
+
css = css.slice(str.length);
|
|
222
|
+
return m;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Parse whitespace.
|
|
227
|
+
*/
|
|
228
|
+
function whitespace() {
|
|
229
|
+
match(/^\s*/);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Parse comments;
|
|
234
|
+
*/
|
|
235
|
+
function comments(rules: any[] = []): any[] {
|
|
236
|
+
let c;
|
|
237
|
+
rules = rules || [];
|
|
238
|
+
while ((c = comment()) !== null) {
|
|
239
|
+
if (c !== false) {
|
|
240
|
+
rules.push(c);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
return rules;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Parse comment.
|
|
248
|
+
*/
|
|
249
|
+
function comment() {
|
|
250
|
+
const pos = position();
|
|
251
|
+
if (css.charAt(0) !== "/" || css.charAt(1) !== "*") {
|
|
252
|
+
return null;
|
|
253
|
+
}
|
|
254
|
+
let i = 2;
|
|
255
|
+
while (
|
|
256
|
+
css.charAt(i) !== "" &&
|
|
257
|
+
(css.charAt(i) !== "*" || css.charAt(i + 1) !== "/")
|
|
258
|
+
) {
|
|
259
|
+
i += 1;
|
|
260
|
+
}
|
|
261
|
+
i += 2;
|
|
262
|
+
if (css.charAt(i - 1) === "") {
|
|
263
|
+
return error("End of comment missing");
|
|
264
|
+
}
|
|
265
|
+
const str = css.slice(2, i - 2);
|
|
266
|
+
column += 2;
|
|
267
|
+
updatePosition(str);
|
|
268
|
+
css = css.slice(i);
|
|
269
|
+
column += 2;
|
|
270
|
+
return pos({
|
|
271
|
+
type: "comment",
|
|
272
|
+
comment: str,
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Parse selector.
|
|
278
|
+
*/
|
|
279
|
+
|
|
280
|
+
function selector() {
|
|
281
|
+
const m = match(/^([^{]+)/);
|
|
282
|
+
if (!m) {
|
|
283
|
+
return null;
|
|
284
|
+
}
|
|
285
|
+
/* @fix Remove all comments from selectors
|
|
286
|
+
* http://ostermiller.org/findcomment.html */
|
|
287
|
+
return trim(m[0])
|
|
288
|
+
.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g, "")
|
|
289
|
+
.replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g, (m: any) =>
|
|
290
|
+
m.replace(/,/g, "\u200C"),
|
|
291
|
+
)
|
|
292
|
+
.split(/\s*(?![^(]*\)),\s*/)
|
|
293
|
+
.map((s: any) => s.replace(/\u200C/g, ","));
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* convert string value to string degree
|
|
298
|
+
* @param {string} value
|
|
299
|
+
* @param {string} unit
|
|
300
|
+
*/
|
|
301
|
+
function convertToDegree(value: any, unit = DEGREE_UNIT.DEG) {
|
|
302
|
+
const convertedNumValue = parseFloat(value);
|
|
303
|
+
let result = value || "";
|
|
304
|
+
const [, decimals] = value.split(".");
|
|
305
|
+
if (decimals && decimals.length > 2) {
|
|
306
|
+
result = convertedNumValue.toFixed(2);
|
|
307
|
+
}
|
|
308
|
+
switch (unit) {
|
|
309
|
+
// turn unit
|
|
310
|
+
case DEGREE_UNIT.TURN:
|
|
311
|
+
result = `${(convertedNumValue * 360).toFixed(2)}`;
|
|
312
|
+
break;
|
|
313
|
+
// radius unit
|
|
314
|
+
case DEGREE_UNIT.RAD:
|
|
315
|
+
result = `${((180 / Math.PI) * convertedNumValue).toFixed(2)}`;
|
|
316
|
+
break;
|
|
317
|
+
default:
|
|
318
|
+
}
|
|
319
|
+
return result;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* parse gradient angle or direction
|
|
324
|
+
* @param {string} value
|
|
325
|
+
*/
|
|
326
|
+
function getLinearGradientAngle(value: any) {
|
|
327
|
+
const processedValue = (value || "").replace(/\s*/g, "").toLowerCase();
|
|
328
|
+
const reg =
|
|
329
|
+
/^([+-]?(?=(?<digit>\d+))\k<digit>\.?\d*)+(deg|turn|rad)|(to\w+)$/g;
|
|
330
|
+
const valueList = reg.exec(processedValue);
|
|
331
|
+
if (!Array.isArray(valueList)) return;
|
|
332
|
+
// default direction is to bottom, i.e. 180degree
|
|
333
|
+
let angle = "180";
|
|
334
|
+
const [direction, angleValue, angleUnit] = valueList;
|
|
335
|
+
if (angleValue && angleUnit) {
|
|
336
|
+
// angle value
|
|
337
|
+
angle = convertToDegree(angleValue, angleUnit);
|
|
338
|
+
} else if (
|
|
339
|
+
direction &&
|
|
340
|
+
typeof LINEAR_GRADIENT_DIRECTION_MAP[direction] !== "undefined"
|
|
341
|
+
) {
|
|
342
|
+
// direction description
|
|
343
|
+
angle = LINEAR_GRADIENT_DIRECTION_MAP[direction];
|
|
344
|
+
} else {
|
|
345
|
+
warn(
|
|
346
|
+
"linear-gradient direction or angle is invalid, default value [to bottom] would be used",
|
|
347
|
+
);
|
|
348
|
+
}
|
|
349
|
+
return angle;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/**
|
|
353
|
+
* parse gradient color stop
|
|
354
|
+
* @param {string} value
|
|
355
|
+
*/
|
|
356
|
+
function getLinearGradientColorStop(value: any) {
|
|
357
|
+
const processedValue = (value || "").replace(/\s+/g, " ").trim();
|
|
358
|
+
const [color, percentage] = processedValue.split(/\s+(?![^(]*?\))/);
|
|
359
|
+
const percentageCheckReg = /^([+-]?\d+\.?\d*)%$/g;
|
|
360
|
+
if (color && !percentageCheckReg.exec(color) && !percentage) {
|
|
361
|
+
return {
|
|
362
|
+
color: translateColor(color),
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
if (color && percentageCheckReg.exec(percentage)) {
|
|
366
|
+
return {
|
|
367
|
+
// color stop ratio
|
|
368
|
+
ratio: parseFloat(percentage.split("%")[0]) / 100,
|
|
369
|
+
color: translateColor(color),
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
warn("linear-gradient color stop is invalid");
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* parse backgroundImage
|
|
377
|
+
* @param {string} property
|
|
378
|
+
* @param {string|Object|number|boolean} value
|
|
379
|
+
* @returns {(string|{})[]}
|
|
380
|
+
*/
|
|
381
|
+
function parseBackgroundImage(property: any, value: any) {
|
|
382
|
+
let processedValue = value;
|
|
383
|
+
let processedProperty = property;
|
|
384
|
+
|
|
385
|
+
const layers = splitLayers(processedValue);
|
|
386
|
+
for (const layer of layers) {
|
|
387
|
+
if (layer.indexOf("linear-gradient") === 0) {
|
|
388
|
+
processedProperty = "linearGradient";
|
|
389
|
+
const valueString = layer.substring(
|
|
390
|
+
layer.indexOf("(") + 1,
|
|
391
|
+
layer.lastIndexOf(")"),
|
|
392
|
+
);
|
|
393
|
+
const tokens = valueString.split(/,(?![^(]*?\))/);
|
|
394
|
+
const colorStopList: any = [];
|
|
395
|
+
processedValue = {};
|
|
396
|
+
tokens.forEach((value: any, index: any) => {
|
|
397
|
+
if (index === 0) {
|
|
398
|
+
// the angle of linear-gradient parameter can be optional
|
|
399
|
+
const angle = getLinearGradientAngle(value);
|
|
400
|
+
if (angle) {
|
|
401
|
+
processedValue.angle = angle;
|
|
402
|
+
} else {
|
|
403
|
+
// if angle ignored, default direction is to bottom, i.e. 180degree
|
|
404
|
+
processedValue.angle = "180";
|
|
405
|
+
const colorObject = getLinearGradientColorStop(value);
|
|
406
|
+
if (colorObject) colorStopList.push(colorObject);
|
|
407
|
+
}
|
|
408
|
+
} else {
|
|
409
|
+
const colorObject = getLinearGradientColorStop(value);
|
|
410
|
+
if (colorObject) colorStopList.push(colorObject);
|
|
411
|
+
}
|
|
412
|
+
});
|
|
413
|
+
processedValue.colorStopList = colorStopList;
|
|
414
|
+
}
|
|
415
|
+
//url
|
|
416
|
+
else if (layer.startsWith("url(")) {
|
|
417
|
+
const regexp = /(?:\(['"]?)(.*?)(?:['"]?\))/;
|
|
418
|
+
const executed = regexp.exec(layer);
|
|
419
|
+
if (executed && executed.length > 1) {
|
|
420
|
+
processedProperty = property;
|
|
421
|
+
[, processedValue] = executed;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
return [processedProperty, processedValue];
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
function parseBackground(property: any, value: any) {
|
|
429
|
+
let processedValue = value;
|
|
430
|
+
let processedProperty = property;
|
|
431
|
+
|
|
432
|
+
const layers = splitLayers(processedValue);
|
|
433
|
+
for (const layer of layers) {
|
|
434
|
+
if (layer.indexOf("linear-gradient") === 0) {
|
|
435
|
+
processedProperty = "linearGradient";
|
|
436
|
+
const valueString = layer.substring(
|
|
437
|
+
layer.indexOf("(") + 1,
|
|
438
|
+
layer.lastIndexOf(")"),
|
|
439
|
+
);
|
|
440
|
+
const tokens = valueString.split(/,(?![^(]*?\))/);
|
|
441
|
+
const colorStopList: any = [];
|
|
442
|
+
processedValue = {};
|
|
443
|
+
tokens.forEach((value: any, index: any) => {
|
|
444
|
+
if (index === 0) {
|
|
445
|
+
// the angle of linear-gradient parameter can be optional
|
|
446
|
+
const angle = getLinearGradientAngle(value);
|
|
447
|
+
if (angle) {
|
|
448
|
+
processedValue.angle = angle;
|
|
449
|
+
} else {
|
|
450
|
+
// if angle ignored, default direction is to bottom, i.e. 180degree
|
|
451
|
+
processedValue.angle = "180";
|
|
452
|
+
const colorObject = getLinearGradientColorStop(value);
|
|
453
|
+
if (colorObject) colorStopList.push(colorObject);
|
|
454
|
+
}
|
|
455
|
+
} else {
|
|
456
|
+
const colorObject = getLinearGradientColorStop(value);
|
|
457
|
+
if (colorObject) colorStopList.push(colorObject);
|
|
458
|
+
}
|
|
459
|
+
});
|
|
460
|
+
processedValue.colorStopList = colorStopList;
|
|
461
|
+
}
|
|
462
|
+
//url
|
|
463
|
+
else if (layer.startsWith("url(")) {
|
|
464
|
+
const regexp = /(?:\(['"]?)(.*?)(?:['"]?\))/;
|
|
465
|
+
const executed = regexp.exec(layer);
|
|
466
|
+
if (executed && executed.length > 1) {
|
|
467
|
+
processedProperty = property;
|
|
468
|
+
[, processedValue] = executed;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
//color
|
|
472
|
+
else if (translateColor(layer)) {
|
|
473
|
+
processedProperty = "backgroundColor";
|
|
474
|
+
processedValue = layer;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
return [processedProperty, processedValue];
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
function parseBorder(property: any, value: any) {
|
|
481
|
+
const parts =
|
|
482
|
+
typeof value === "number"
|
|
483
|
+
? [value.toString()]
|
|
484
|
+
: value.trim().split(/\s+/);
|
|
485
|
+
|
|
486
|
+
let width = "",
|
|
487
|
+
style = "",
|
|
488
|
+
color: string | number = "";
|
|
489
|
+
|
|
490
|
+
for (const part of parts) {
|
|
491
|
+
if (!width && isLength(part)) {
|
|
492
|
+
width = convertPxUnitToPt(part);
|
|
493
|
+
} else if (!style && isBorderStyle(part)) {
|
|
494
|
+
style = part;
|
|
495
|
+
} else if (!color && translateColor(part)) {
|
|
496
|
+
color = part;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
if (style && style != "solid") {
|
|
501
|
+
warn(
|
|
502
|
+
`[borderStyle] 目前仅支持 'solid' },已将 '${style}' 替换为 'solid'`,
|
|
503
|
+
);
|
|
504
|
+
style = "solid";
|
|
505
|
+
}
|
|
506
|
+
return [width, style, color];
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
function parseBorderRadius(property: any, value: any) {
|
|
510
|
+
const parts =
|
|
511
|
+
typeof value === "number"
|
|
512
|
+
? [value.toString()]
|
|
513
|
+
: value.trim().split(/\s+/);
|
|
514
|
+
|
|
515
|
+
let result: string[] = [];
|
|
516
|
+
|
|
517
|
+
switch (parts.length) {
|
|
518
|
+
case 1:
|
|
519
|
+
result = [parts[0], parts[0], parts[0], parts[0]];
|
|
520
|
+
break;
|
|
521
|
+
case 2:
|
|
522
|
+
result = [parts[0], parts[1], parts[0], parts[1]];
|
|
523
|
+
break;
|
|
524
|
+
case 3:
|
|
525
|
+
result = [parts[0], parts[1], parts[2], parts[1]];
|
|
526
|
+
break;
|
|
527
|
+
case 4:
|
|
528
|
+
result = [parts[0], parts[1], parts[2], parts[3]];
|
|
529
|
+
break;
|
|
530
|
+
default:
|
|
531
|
+
warn(`[border-radius] 不支持的格式: ${value}`);
|
|
532
|
+
result = ["0", "0", "0", "0"];
|
|
533
|
+
}
|
|
534
|
+
return result.map((v) => convertPxUnitToPt(v));
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Parse declaration.
|
|
539
|
+
*/
|
|
540
|
+
function declaration() {
|
|
541
|
+
const pos = position();
|
|
542
|
+
// prop
|
|
543
|
+
let prop = match(/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);
|
|
544
|
+
if (!prop) {
|
|
545
|
+
return null;
|
|
546
|
+
}
|
|
547
|
+
prop = trim(prop[0]);
|
|
548
|
+
// :
|
|
549
|
+
if (!match(/^:\s*/)) {
|
|
550
|
+
return error("property missing ':'");
|
|
551
|
+
}
|
|
552
|
+
// val
|
|
553
|
+
// const propertyName = prop.replace(commentRegexp, "");
|
|
554
|
+
// const camelizedProperty = camelize(propertyName);
|
|
555
|
+
// let property = (() => {
|
|
556
|
+
// const property = PROPERTIES_MAP[camelizedProperty];
|
|
557
|
+
// if (property) {
|
|
558
|
+
// return property;
|
|
559
|
+
// }
|
|
560
|
+
// return camelizedProperty;
|
|
561
|
+
// })();
|
|
562
|
+
|
|
563
|
+
const propertyName = prop.replace(commentRegexp, "");
|
|
564
|
+
let property = propertyName;
|
|
565
|
+
|
|
566
|
+
// 仅非 CSS 变量才驼峰处理
|
|
567
|
+
if (!propertyName.startsWith("--")) {
|
|
568
|
+
const camelizedProperty = camelize(propertyName);
|
|
569
|
+
property = PROPERTIES_MAP[camelizedProperty] || camelizedProperty;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
const val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/);
|
|
573
|
+
let value = val ? trim(val[0]).replace(commentRegexp, "") : "";
|
|
574
|
+
|
|
575
|
+
//提取 !important
|
|
576
|
+
let important = false;
|
|
577
|
+
const importantMatch = value.match(/^(.*?)(?:\s*)!important\s*$/i);
|
|
578
|
+
if (importantMatch) {
|
|
579
|
+
value = importantMatch[1];
|
|
580
|
+
important = true;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
switch (property) {
|
|
584
|
+
case "backgroundImage": {
|
|
585
|
+
[property, value] = parseBackgroundImage(property, value);
|
|
586
|
+
break;
|
|
587
|
+
}
|
|
588
|
+
case "background": {
|
|
589
|
+
[property, value] = parseBackground(property, value);
|
|
590
|
+
break;
|
|
591
|
+
}
|
|
592
|
+
case "border": {
|
|
593
|
+
const parts = parseBorder(property, value);
|
|
594
|
+
if (Array.isArray(parts)) {
|
|
595
|
+
const [width, style, color] = parts;
|
|
596
|
+
const declarations: Declaration[] = [];
|
|
597
|
+
|
|
598
|
+
if (width) {
|
|
599
|
+
declarations.push(
|
|
600
|
+
pos({
|
|
601
|
+
type: "declaration",
|
|
602
|
+
property: "borderWidth",
|
|
603
|
+
value: convertPxUnitToPt(tryConvertNumber(width + "")),
|
|
604
|
+
...(important && { important: true }),
|
|
605
|
+
}),
|
|
606
|
+
);
|
|
607
|
+
}
|
|
608
|
+
if (style) {
|
|
609
|
+
declarations.push(
|
|
610
|
+
pos({
|
|
611
|
+
type: "declaration",
|
|
612
|
+
property: "borderStyle",
|
|
613
|
+
value: style,
|
|
614
|
+
...(important && { important: true }),
|
|
615
|
+
}),
|
|
616
|
+
);
|
|
617
|
+
}
|
|
618
|
+
if (color) {
|
|
619
|
+
declarations.push(
|
|
620
|
+
pos({
|
|
621
|
+
type: "declaration",
|
|
622
|
+
property: "borderColor",
|
|
623
|
+
value: color,
|
|
624
|
+
...(important && { important: true }),
|
|
625
|
+
}),
|
|
626
|
+
);
|
|
627
|
+
}
|
|
628
|
+
match(/^[;\s]*/); // 吃掉结尾 ;
|
|
629
|
+
return declarations;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
break;
|
|
633
|
+
}
|
|
634
|
+
case "focusBorder": {
|
|
635
|
+
const parts = parseBorder(property, value);
|
|
636
|
+
if (Array.isArray(parts)) {
|
|
637
|
+
const [width, style, color] = parts;
|
|
638
|
+
const declarations: Declaration[] = [];
|
|
639
|
+
|
|
640
|
+
if (width) {
|
|
641
|
+
declarations.push(
|
|
642
|
+
pos({
|
|
643
|
+
type: "declaration",
|
|
644
|
+
property: "focusBorderWidth",
|
|
645
|
+
value: convertPxUnitToPt(tryConvertNumber(width + "")),
|
|
646
|
+
...(important && { important: true }),
|
|
647
|
+
}),
|
|
648
|
+
);
|
|
649
|
+
}
|
|
650
|
+
if (style) {
|
|
651
|
+
declarations.push(
|
|
652
|
+
pos({
|
|
653
|
+
type: "declaration",
|
|
654
|
+
property: "focusBorderStyle",
|
|
655
|
+
value: style,
|
|
656
|
+
...(important && { important: true }),
|
|
657
|
+
}),
|
|
658
|
+
);
|
|
659
|
+
}
|
|
660
|
+
if (color) {
|
|
661
|
+
declarations.push(
|
|
662
|
+
pos({
|
|
663
|
+
type: "declaration",
|
|
664
|
+
property: "focusBorderColor",
|
|
665
|
+
value: color,
|
|
666
|
+
...(important && { important: true }),
|
|
667
|
+
}),
|
|
668
|
+
);
|
|
669
|
+
}
|
|
670
|
+
match(/^[;\s]*/); // 吃掉结尾 ;
|
|
671
|
+
return declarations;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
break;
|
|
675
|
+
}
|
|
676
|
+
case "borderRadius": {
|
|
677
|
+
const parts = parseBorderRadius(property, value);
|
|
678
|
+
if (Array.isArray(parts)) {
|
|
679
|
+
const declarations: Declaration[] = [];
|
|
680
|
+
const [topLeft, topRight, bottomRight, bottomLeft] = parts;
|
|
681
|
+
if (topLeft) {
|
|
682
|
+
declarations.push(
|
|
683
|
+
pos({
|
|
684
|
+
type: "declaration",
|
|
685
|
+
property: "borderTopLeftRadius",
|
|
686
|
+
value: convertPxUnitToPt(tryConvertNumber(topLeft + "")),
|
|
687
|
+
...(important && { important: true }),
|
|
688
|
+
}),
|
|
689
|
+
);
|
|
690
|
+
}
|
|
691
|
+
if (topRight) {
|
|
692
|
+
declarations.push(
|
|
693
|
+
pos({
|
|
694
|
+
type: "declaration",
|
|
695
|
+
property: "borderTopRightRadius",
|
|
696
|
+
value: convertPxUnitToPt(tryConvertNumber(topRight + "")),
|
|
697
|
+
...(important && { important: true }),
|
|
698
|
+
}),
|
|
699
|
+
);
|
|
700
|
+
}
|
|
701
|
+
if (bottomRight) {
|
|
702
|
+
declarations.push(
|
|
703
|
+
pos({
|
|
704
|
+
type: "declaration",
|
|
705
|
+
property: "borderBottomRightRadius",
|
|
706
|
+
value: convertPxUnitToPt(tryConvertNumber(bottomRight + "")),
|
|
707
|
+
...(important && { important: true }),
|
|
708
|
+
}),
|
|
709
|
+
);
|
|
710
|
+
}
|
|
711
|
+
if (bottomLeft) {
|
|
712
|
+
declarations.push(
|
|
713
|
+
pos({
|
|
714
|
+
type: "declaration",
|
|
715
|
+
property: "borderBottomLeftRadius",
|
|
716
|
+
value: convertPxUnitToPt(tryConvertNumber(bottomLeft + "")),
|
|
717
|
+
...(important && { important: true }),
|
|
718
|
+
}),
|
|
719
|
+
);
|
|
720
|
+
}
|
|
721
|
+
match(/^[;\s]*/); // 吃掉结尾 ;
|
|
722
|
+
return declarations;
|
|
723
|
+
}
|
|
724
|
+
break;
|
|
725
|
+
}
|
|
726
|
+
case "transform": {
|
|
727
|
+
const regex = /(\w+\s*)(?:\(['"]?)(.*?)(?:['"]?\))/g;
|
|
728
|
+
const oldValue = value;
|
|
729
|
+
value = [];
|
|
730
|
+
let group;
|
|
731
|
+
while ((group = regex.exec(oldValue))) {
|
|
732
|
+
const key = group[1];
|
|
733
|
+
let v = group[2];
|
|
734
|
+
if (v.indexOf(".") === 0) {
|
|
735
|
+
v = `0${v}`;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
if (parseFloat(v).toString() === v) {
|
|
739
|
+
v = parseFloat(v);
|
|
740
|
+
} else {
|
|
741
|
+
v = convertPxUnitToPt(v);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
const transform: any = {};
|
|
745
|
+
transform[key] = v;
|
|
746
|
+
value.push(transform);
|
|
747
|
+
}
|
|
748
|
+
break;
|
|
749
|
+
}
|
|
750
|
+
case "fontWeight":
|
|
751
|
+
// Keep string and going on.
|
|
752
|
+
break;
|
|
753
|
+
case "textShadowOffset": {
|
|
754
|
+
const pos = value
|
|
755
|
+
.split(" ")
|
|
756
|
+
.filter((v: any) => v)
|
|
757
|
+
.map((v: any) => convertPxUnitToPt(v));
|
|
758
|
+
const [width] = pos;
|
|
759
|
+
let [, height] = pos;
|
|
760
|
+
if (!height) {
|
|
761
|
+
height = width;
|
|
762
|
+
}
|
|
763
|
+
value = {
|
|
764
|
+
width,
|
|
765
|
+
height,
|
|
766
|
+
};
|
|
767
|
+
break;
|
|
768
|
+
}
|
|
769
|
+
case "shadowOffset": {
|
|
770
|
+
const pos = value
|
|
771
|
+
.split(" ")
|
|
772
|
+
.filter((v: any) => v)
|
|
773
|
+
.map((v: any) => convertPxUnitToPt(v));
|
|
774
|
+
const [x] = pos;
|
|
775
|
+
let [, y] = pos;
|
|
776
|
+
if (!y) {
|
|
777
|
+
y = x;
|
|
778
|
+
}
|
|
779
|
+
// FIXME: should not be width and height, should be x and y.
|
|
780
|
+
value = {
|
|
781
|
+
x,
|
|
782
|
+
y,
|
|
783
|
+
};
|
|
784
|
+
break;
|
|
785
|
+
}
|
|
786
|
+
case "collapsable":
|
|
787
|
+
value = value !== "false";
|
|
788
|
+
break;
|
|
789
|
+
default: {
|
|
790
|
+
value = tryConvertNumber(value);
|
|
791
|
+
// Convert the px to pt for specific properties
|
|
792
|
+
value = convertPxUnitToPt(value);
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
const ret = pos({
|
|
797
|
+
type: "declaration",
|
|
798
|
+
value,
|
|
799
|
+
property,
|
|
800
|
+
...(important && { important: true }),
|
|
801
|
+
});
|
|
802
|
+
// ;
|
|
803
|
+
match(/^[;\s]*/);
|
|
804
|
+
return ret;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
/**
|
|
808
|
+
* Parse declarations.
|
|
809
|
+
*/
|
|
810
|
+
function declarations() {
|
|
811
|
+
let decls: any = [];
|
|
812
|
+
if (!open()) return error("missing '{'");
|
|
813
|
+
comments(decls);
|
|
814
|
+
// declarations
|
|
815
|
+
let decl;
|
|
816
|
+
while ((decl = declaration()) !== null) {
|
|
817
|
+
if (decl !== false) {
|
|
818
|
+
if (Array.isArray(decl)) {
|
|
819
|
+
decls = decls.concat(decl);
|
|
820
|
+
} else {
|
|
821
|
+
decls.push(decl);
|
|
822
|
+
}
|
|
823
|
+
comments(decls);
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
if (!close()) return error("missing '}'");
|
|
827
|
+
return decls;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* Parse keyframe.
|
|
832
|
+
*/
|
|
833
|
+
function keyframe() {
|
|
834
|
+
let m;
|
|
835
|
+
const vals: any[] = [];
|
|
836
|
+
const pos = position();
|
|
837
|
+
while ((m = match(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/)) !== null) {
|
|
838
|
+
vals.push(m[1]);
|
|
839
|
+
match(/^,\s*/);
|
|
840
|
+
}
|
|
841
|
+
if (!vals.length) {
|
|
842
|
+
return null;
|
|
843
|
+
}
|
|
844
|
+
return pos({
|
|
845
|
+
type: "keyframe",
|
|
846
|
+
values: vals,
|
|
847
|
+
declarations: declarations(),
|
|
848
|
+
});
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Parse keyframes.
|
|
853
|
+
*/
|
|
854
|
+
function atkeyframes() {
|
|
855
|
+
const pos = position();
|
|
856
|
+
let m = match(/^@([-\w]+)?keyframes\s*/);
|
|
857
|
+
if (!m) {
|
|
858
|
+
return null;
|
|
859
|
+
}
|
|
860
|
+
const vendor = m[1];
|
|
861
|
+
// identifier
|
|
862
|
+
m = match(/^([-\w]+)\s*/);
|
|
863
|
+
if (!m) {
|
|
864
|
+
return error("@keyframes missing name");
|
|
865
|
+
}
|
|
866
|
+
const name = m[1];
|
|
867
|
+
if (!open()) return error("@keyframes missing '{'");
|
|
868
|
+
let frame;
|
|
869
|
+
let frames = comments();
|
|
870
|
+
while ((frame = keyframe()) !== null) {
|
|
871
|
+
frames.push(frame);
|
|
872
|
+
frames = frames.concat(comments());
|
|
873
|
+
}
|
|
874
|
+
if (!close()) return error("@keyframes missing '}'");
|
|
875
|
+
return pos({
|
|
876
|
+
type: "keyframes",
|
|
877
|
+
name,
|
|
878
|
+
vendor,
|
|
879
|
+
keyframes: frames,
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* Parse supports.
|
|
885
|
+
*/
|
|
886
|
+
function atsupports() {
|
|
887
|
+
const pos = position();
|
|
888
|
+
const m = match(/^@supports *([^{]+)/);
|
|
889
|
+
if (!m) {
|
|
890
|
+
return null;
|
|
891
|
+
}
|
|
892
|
+
const supports = trim(m[1]);
|
|
893
|
+
if (!open()) return error("@supports missing '{'");
|
|
894
|
+
const style = comments().concat(rules());
|
|
895
|
+
if (!close()) return error("@supports missing '}'");
|
|
896
|
+
return pos({
|
|
897
|
+
type: "supports",
|
|
898
|
+
supports,
|
|
899
|
+
rules: style,
|
|
900
|
+
});
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Parse host.
|
|
905
|
+
*/
|
|
906
|
+
function athost() {
|
|
907
|
+
const pos = position();
|
|
908
|
+
const m = match(/^@host\s*/);
|
|
909
|
+
if (!m) {
|
|
910
|
+
return null;
|
|
911
|
+
}
|
|
912
|
+
if (!open()) {
|
|
913
|
+
return error("@host missing '{'");
|
|
914
|
+
}
|
|
915
|
+
const style = comments().concat(rules());
|
|
916
|
+
if (!close()) {
|
|
917
|
+
return error("@host missing '}'");
|
|
918
|
+
}
|
|
919
|
+
return pos({
|
|
920
|
+
type: "host",
|
|
921
|
+
rules: style,
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* Parse media.
|
|
927
|
+
*/
|
|
928
|
+
function atmedia() {
|
|
929
|
+
const pos = position();
|
|
930
|
+
const m = match(/^@media *([^{]+)/);
|
|
931
|
+
if (!m) {
|
|
932
|
+
return null;
|
|
933
|
+
}
|
|
934
|
+
const media = trim(m[1]);
|
|
935
|
+
if (!open()) {
|
|
936
|
+
return error("@media missing '{'");
|
|
937
|
+
}
|
|
938
|
+
const style = comments().concat(rules());
|
|
939
|
+
if (!close()) {
|
|
940
|
+
return error("@media missing '}'");
|
|
941
|
+
}
|
|
942
|
+
return pos({
|
|
943
|
+
type: "media",
|
|
944
|
+
media,
|
|
945
|
+
rules: style,
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
/**
|
|
950
|
+
* Parse custom-media.
|
|
951
|
+
*/
|
|
952
|
+
function atcustommedia() {
|
|
953
|
+
const pos = position();
|
|
954
|
+
const m = match(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);
|
|
955
|
+
if (!m) {
|
|
956
|
+
return null;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
return pos({
|
|
960
|
+
type: "custom-media",
|
|
961
|
+
name: trim(m[1]),
|
|
962
|
+
media: trim(m[2]),
|
|
963
|
+
});
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* Parse paged media.
|
|
968
|
+
*/
|
|
969
|
+
function atpage() {
|
|
970
|
+
const pos = position();
|
|
971
|
+
const m = match(/^@page */);
|
|
972
|
+
if (!m) {
|
|
973
|
+
return null;
|
|
974
|
+
}
|
|
975
|
+
const sel = selector() || [];
|
|
976
|
+
if (!open()) {
|
|
977
|
+
return error("@page missing '{'");
|
|
978
|
+
}
|
|
979
|
+
let decls = comments();
|
|
980
|
+
// declarations
|
|
981
|
+
let decl;
|
|
982
|
+
while ((decl = declaration()) !== null) {
|
|
983
|
+
decls.push(decl);
|
|
984
|
+
decls = decls.concat(comments());
|
|
985
|
+
}
|
|
986
|
+
if (!close()) {
|
|
987
|
+
return error("@page missing '}'");
|
|
988
|
+
}
|
|
989
|
+
return pos({
|
|
990
|
+
type: "page",
|
|
991
|
+
selectors: sel,
|
|
992
|
+
declarations: decls,
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* Parse document.
|
|
998
|
+
*/
|
|
999
|
+
function atdocument() {
|
|
1000
|
+
const pos = position();
|
|
1001
|
+
const m = match(/^@([-\w]+)?document *([^{]+)/);
|
|
1002
|
+
if (!m) {
|
|
1003
|
+
return null;
|
|
1004
|
+
}
|
|
1005
|
+
const vendor = trim(m[1]);
|
|
1006
|
+
const doc = trim(m[2]);
|
|
1007
|
+
if (!open()) {
|
|
1008
|
+
return error("@document missing '{'");
|
|
1009
|
+
}
|
|
1010
|
+
const style = comments().concat(rules());
|
|
1011
|
+
if (!close()) {
|
|
1012
|
+
return error("@document missing '}'");
|
|
1013
|
+
}
|
|
1014
|
+
return pos({
|
|
1015
|
+
type: "document",
|
|
1016
|
+
document: doc,
|
|
1017
|
+
vendor,
|
|
1018
|
+
rules: style,
|
|
1019
|
+
});
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* Parse font-face.
|
|
1024
|
+
*/
|
|
1025
|
+
function atfontface() {
|
|
1026
|
+
const pos = position();
|
|
1027
|
+
const m = match(/^@font-face\s*/);
|
|
1028
|
+
if (!m) {
|
|
1029
|
+
return null;
|
|
1030
|
+
}
|
|
1031
|
+
if (!open()) {
|
|
1032
|
+
return error("@font-face missing '{'");
|
|
1033
|
+
}
|
|
1034
|
+
let decls = comments();
|
|
1035
|
+
// declarations
|
|
1036
|
+
let decl;
|
|
1037
|
+
while ((decl = declaration()) !== null) {
|
|
1038
|
+
decls.push(decl);
|
|
1039
|
+
decls = decls.concat(comments());
|
|
1040
|
+
}
|
|
1041
|
+
if (!close()) {
|
|
1042
|
+
return error("@font-face missing '}'");
|
|
1043
|
+
}
|
|
1044
|
+
return pos({
|
|
1045
|
+
type: "font-face",
|
|
1046
|
+
declarations: decls,
|
|
1047
|
+
});
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* Parse import
|
|
1052
|
+
*/
|
|
1053
|
+
const atimport = compileAtRule("import");
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* Parse charset
|
|
1057
|
+
*/
|
|
1058
|
+
const atcharset = compileAtRule("charset");
|
|
1059
|
+
|
|
1060
|
+
/**
|
|
1061
|
+
* Parse namespace
|
|
1062
|
+
*/
|
|
1063
|
+
const atnamespace = compileAtRule("namespace");
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* Parse non-block at-rules
|
|
1067
|
+
*/
|
|
1068
|
+
function compileAtRule(name: any) {
|
|
1069
|
+
const re = new RegExp(`^@${name}\\s*([^;]+);`);
|
|
1070
|
+
return () => {
|
|
1071
|
+
const pos = position();
|
|
1072
|
+
const m = match(re);
|
|
1073
|
+
if (!m) {
|
|
1074
|
+
return null;
|
|
1075
|
+
}
|
|
1076
|
+
const ret: any = { type: name };
|
|
1077
|
+
ret[name] = m[1].trim();
|
|
1078
|
+
return pos(ret);
|
|
1079
|
+
};
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
/**
|
|
1083
|
+
* Parse at rule.
|
|
1084
|
+
*/
|
|
1085
|
+
function atrule() {
|
|
1086
|
+
if (css[0] !== "@") {
|
|
1087
|
+
return null;
|
|
1088
|
+
}
|
|
1089
|
+
return (
|
|
1090
|
+
atkeyframes() ||
|
|
1091
|
+
atmedia() ||
|
|
1092
|
+
atcustommedia() ||
|
|
1093
|
+
atsupports() ||
|
|
1094
|
+
atimport() ||
|
|
1095
|
+
atcharset() ||
|
|
1096
|
+
atnamespace() ||
|
|
1097
|
+
atdocument() ||
|
|
1098
|
+
atpage() ||
|
|
1099
|
+
athost() ||
|
|
1100
|
+
atfontface()
|
|
1101
|
+
);
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* Parse rule.
|
|
1106
|
+
*/
|
|
1107
|
+
function rule() {
|
|
1108
|
+
const pos = position();
|
|
1109
|
+
const sel = selector();
|
|
1110
|
+
if (!sel) return error("selector missing");
|
|
1111
|
+
comments();
|
|
1112
|
+
return pos({
|
|
1113
|
+
type: "rule",
|
|
1114
|
+
selectors: sel,
|
|
1115
|
+
declarations: declarations(),
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
// @ts-expect-error TS(2554): Expected 2 arguments, but got 1.
|
|
1119
|
+
return addParent(stylesheet());
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
export default parseCSS;
|
|
1123
|
+
export { PROPERTIES_MAP };
|